var nytroseo=function(e){"use strict";function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a,i=!0,r=!1;return{s:function(){o=e[Symbol.iterator]()},n:function(){var e=o.next();return i=e.done,e},e:function(e){r=!0,a=e},f:function(){try{i||null==o.return||o.return()}finally{if(r)throw a}}}}function r(e){if(!e.IsDescriptionOptimized){try{!function(e){if(null!==e.data.description&&void 0!==e.data.description&&""!==e.data.description){var t=e.document.getElementsByTagName("meta");if(1<(t=Array.from(t).filter(function(e){return"description"===e.name})).length)for(var n=t.length-1;0=l)return;if(u===s)return void d.push(i);if(r.length<=0)return void d.push(i);r.forEach(function(e,t){var n=g(r);n.splice(t,1);var o=0===i.length?[e]:i.concat(e);a(o,n,d,s,l,u+1,c+1)})}([],e,o,t,n,0,1),o.map(function(e){return e.join(", ")})}(r.data.keywords,t,e.length):[r.data.title];g(e).forEach(function(e,t){if(!r.optimizedImages.has(e))try{var n=e.getAttribute("alt");if(n&&!d)return r.optimizedImages.set(e,void 0),void console.debug("nytroseo : image skip because no keywords and alt exists");var o=s[t%s.length],a=o&&o.length?o:"",i=n?n+", "+a:a;e.setAttribute("alt",i),console.debug("nytroseo : image optimized : "+i),r.optimizedImages.set(e,void 0)}catch(e){console.warn(e,"nytroseo : image optimization failed")}})}else console.debug("nytroseo : no images detected")}function m(e){if(!e.IsNoIndexOptimized){try{!function(e){var t=e.document.getElementsByTagName("meta");if(1<(t=Array.from(t).filter(function(e){return"robots"===e.name})).length)for(var n=t.length-1;0a.data.keywords.length||a.data.maxKeywordsInAlts<=0)&&(a.data.maxKeywordsInAlts=a.data.keywords.length);var i=a.data.settings;i&&i.useTitleOptimization&&null!==(o=a).data.title&&void 0!==o.data.title&&o.document.title!==o.data.title&&""!==o.data.title&&(o.document.title=o.data.title,console.debug("nytroseo : title optimized : "+o.data.title)),i&&i.useDescriptionOptimization&&r(a),i&&i.useImagesOptimization&&(n=(t=a).document.getElementsByTagName("img"),c(t,n)),i&&i.useAnchorOptimization&&function(e){e.optimizedLinks||(e.optimizedLinks=new Map);var t=e.document.getElementsByTagName("a");l(e,t)}(a),i&&i.useNoIndexOptimization&&m(a),i&&i.useKeywordsInFooter&&f(a)}catch(e){a.onProcessingError(e)}}},{key:"onDataLoadingError",value:function(e){console.warn(e,"nytroseo : loading data failed")}},{key:"onProcessingError",value:function(e){console.warn(e,"nytroseo : processing failed")}},{key:"handleNewImages",value:function(e){if(this&&this.data){var t=this.data.settings;t&&t.useImagesOptimization&&c(this,e)}}},{key:"handleNewLinks",value:function(e){if(this&&this.data){var t=this.data.settings;t&&t.useAnchorOptimization&&l(this,e)}}},{key:"bindFunctions",value:function(e){var t=this;e.forEach(function(e){t[e]=t[e].bind(t)})}},{key:"getQueryParameterByName",value:function(e){var t=window.location.href;e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null}},{key:"aggregateTextWithKeywordsByComma",value:function(e,t,n){var o=this.data.keywords,a=n*t%o.length,i=o.slice(a,Math.min(a+t,o.length));i.lengtht&&(n.length=t),""+n.join(", ")}}]),n}(),h=y.PredefinedSiteId;function p(){return window.__ns_plugin||(window.__ns_plugin=new n(window.__ns_configs)),window.__ns_plugin}return h&&"PREDEFINED_SITE_ID"!==h&&"00000000-0000-0000-0000-000000000000"!==h&&(console.debug("nytroseo : 0 : predefined site id : "+h),window.__ns_configs={document:document,siteId:h}),window.__ns_plugin=void 0,document.addEventListener("DOMContentLoaded",function(){console.debug("nytroseo : 1 : dom content loaded");try{new MutationObserver(function(e){var t,n,o,a=[],i=[],r=s(e);try{for(r.s();!(t=r.n()).done;){var d=t.value;"childList"===d.type&&d.addedNodes.forEach(function(e){"IMG"===e.tagName?a.push(e):"A"===e.tagName&&i.push(e)})}}catch(e){r.e(e)}finally{r.f()}n=a,window.__ns_plugin&&n&&n.length&&(console.debug("nytroseo : - : new images detected (count: ".concat(n.length,")")),window.__ns_plugin.handleNewImages(n)),o=i,window.__ns_plugin&&o&&o.length&&(console.debug("nytroseo : - : new links detected (count: ".concat(o.length,")")),window.__ns_plugin.handleNewLinks(o))}).observe(document.body,{childList:!0,subtree:!0})}catch(e){console.warn(e)}!function e(t){if(!(10