summaryrefslogtreecommitdiff
path: root/miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/sznrecommend-measure.min.js
diff options
context:
space:
mode:
Diffstat (limited to 'miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/sznrecommend-measure.min.js')
-rw-r--r--miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/sznrecommend-measure.min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/sznrecommend-measure.min.js b/miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/sznrecommend-measure.min.js
new file mode 100644
index 0000000..7849df9
--- /dev/null
+++ b/miniany/doc/Můžeme věřit překladačům_ Projekty řešící schéma „důvěřivé důvěry“ - Root.cz_files/sznrecommend-measure.min.js
@@ -0,0 +1 @@
+!function(){"use strict";class e{constructor(e,t){this.target="",this.isFirst=!0,this.maxLength=2048,this.target=`${t||"https://confessor.iva.seznam.cz"}/${e}`}delimiter(){return this.isFirst?(this.isFirst=!1,"?"):"&"}append(e){const t=this.target+this.delimiter()+e;t.length<this.maxLength&&(this.target=t)}encode(e){return encodeURIComponent(e)}appendValue(e,t){return this.append(this.encode(e)+"="+this.encode(t)),this}send(){(new Image).src=this.target}}const t=e=>{window.sznIVA||(window.sznIVA={errorStorage:new Set}),window.sznIVA.errorStorage||(window.sznIVA.errorStorage=new Set),window.sznIVA.errorStorage.add(e)},n=e=>!(!window.sznIVA||!window.sznIVA.errorStorage)&&window.sznIVA.errorStorage.has(e);var o,r;!function(e){e.AD_LOAD="adload",e.RECASS_CLICK="recass-click",e.RECASS_ERROR="recass-error",e.RECASS_IMPRESS="recass-impress",e.RECASS_READ="recass-read",e.RECASS_VIS_IMPRESS="recass-vis-impress"}(o||(o={})),function(e){e.E2001="DOT not found",e.E2002="DOT init error",e.E2003="No zoneData found",e.E2004="No elements with recommend data-attribute tag found",e.E2005="Failed to parse JSON on recommend tag",e.E2006="No valid zone_id parameter provided",e.E2007="Cannot parse data-dot-data parameter!",e.E2008="No valid parameters = types",e.E2009="No valid parameters = Array length is 0",e.E2010="SSP sspGetAds",e.E2011="SSP loading",e.E2012="getRecomendations",e.E2100="Cannot set element id in sssp ad repository",e.E2101="SSP getAds error",e.E2102="Data attribute value set in [data-recass-category] is not valid querySelector. Deafult value will be used.",e.E1001="DOT auto appended by recass",e.E1002="Setting pageViewId for page",e.E1003="Setting pageViewId from SSP",e.E1004="Recommendation boxes count =",e.E1005="Fetching recommend data-attribute tags",e.E1006="Building position. SSP Ads =",e.E1007="Final parsed / merged ADs =",e.E1008="zoneData",e.E1009="Starting get recommended articles with parameters",e.E1010="Data object transformed to array",e.E1011="Ad request is present",e.E1012="Ad section for Seznam Native",e.E1013="Got ads from SSP",e.E1100="Logging to Reporter",e.E1101="Inserting adMarking to element",e.E1102="Getting ads from SSP...",e.E1103="Loading AD image (lazy)",e.E1104="Sending SKLIK Impress hits",e.E1105="Sending SERVED hits",e.E1200="Loading SSP",e.E1201="SSP already present",e.E1202="SSP loaded successfully",e.E1203="No need to load SSP",e.E1300="Parsing Xandr native ad from zoneId",e.E1301="Parsing ad type from zoneId",e.E1302="Parsed ad type to",e.E1303="Parsed DRTG to",e.E1304="Parsed Xandr native to",e.E1305="Parsed Banner to"}(r||(r={}));const s=(e,t="log",n,...o)=>{const{name:r,fColor:s,bColor:i}=e,a=`display: inline-block; color: ${s}; background: ${i}; padding: 1px 4px; border-radius: 3px;`,d=`%c${r}${n?" "+n:""}`;"table"===t&&1===o.length?(console.log(d,a),console.table(o[0])):"table"===t&&2===o.length?(console.log(d,a,o[0]),console.table(o[1])):console[t](d,a,...o)},i="sznivadbg",a=(e=window)=>!(e.top!==e.self&&!e.Cypress||e.frameElement),d=()=>{var e;return null===(e=window.sznIVA)||void 0===e?void 0:e.debugger},l=e=>{window.sznIVA=window.sznIVA||{},window.sznIVA.debugger=Object.assign(Object.assign({},window.sznIVA.debugger),e)},c=e=>{const t=window.location.search||"",n=new RegExp(`${e}=([^&]*)`),o=t.match(n)||[];return o.length>1?o[1]:null},g=()=>{var e;const t=c(i);if(t)return t;const n=(()=>{var e;return null===(e=d())||void 0===e?void 0:e.topFrameRule})();if(n)return n;try{const t=(null===(e=window.localStorage)||void 0===e?void 0:e.getItem(i))||"";if(t)return t}catch(e){s(u(),"warn",void 0,JSON.stringify(e))}return""};const u=()=>({name:"debugger",fColor:"#AAA",bColor:"#777"});a()?window.addEventListener("message",(e=>(e=>{var t;if(e.source&&"iva_dbg_event_request_debug_settings"===e.data.type){const n=g();e.source.postMessage({type:"iva_dbg_event_debug_settings",rule:n},"*"),(null===(t=d())||void 0===t?void 0:t.iframeBridgeNotified)||(n&&s(u(),void 0,void 0,`Top frame sends a debugger rule "${n}" to iframes.`),l({iframeBridgeNotified:!0}))}})(e))):(window.addEventListener("message",(e=>(e=>{"iva_dbg_event_debug_settings"===e.data.type&&l({topFrameRule:e.data.rule})})(e))),window.top.postMessage({type:"iva_dbg_event_request_debug_settings"},document.referrer||"*"));const m=(p={bColor:"#0094c5",fColor:"#fff",name:"RECASS"},(()=>{var e,t,n;const o=c("sznivadbgsave");if(null===o)return;const r=null===(e=window.localStorage)||void 0===e?void 0:e.getItem(i);o==r||null===r&&""===o||(""===o?(null===(t=window.localStorage)||void 0===t||t.removeItem(i),s(u(),void 0,void 0,"Rule was removed from the local storage.")):(null===(n=window.localStorage)||void 0===n||n.setItem(i,null!=o?o:""),s(u(),void 0,void 0,`Rule "${o}" was saved to the local storage.`)))})(),(p=Object.assign({fColor:"white",bColor:"black"},p))&&p.name&&p.fColor&&p.bColor?(...e)=>{const t=["log","warn","error","info","table"],n=e.length,o=(e=>{var t;const n=g();return!(null===(t=d())||void 0===t?void 0:t.welcomeNotified)&&n&&a()&&(l({welcomeNotified:!0}),s(u(),"log",void 0,`===============================================\n | 🕷 DEBUGGER is set to "${n}".\n | Use "1" to let any component log or use component name[s] to filter them.\n | Using "!component" lets log all components except those listed.\n | Save the rule to local storage using GET parameter "?sznivadbgsave=${n}"\n | and remove it by "?sznivadbgsave=".\n \`=======================================================`)),((e,t)=>!(!e||"1"!==e&&(~e.indexOf("!")?~e.toLowerCase().indexOf(`!${t.toLowerCase()}`):!~e.toLowerCase().indexOf(t.toLowerCase()))))(n,e)})(p.name);if(!o||0===n)return o;if(1===n&&"object"==typeof e[0]&&!Array.isArray(e[0])&&null!==e[0]){const t=e[0],{state:n,type:r,subName:i,message:a}=t,d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n}(t,["state","type","subName","message"]);if(o){const e=[];void 0!==a&&e.push(a),1===Object.values(d).length?e.push(d[Object.keys(d)[0]]):Object.values(d).length&&e.push(d),s(p,r,i,...e)}return n&&((e,t,n)=>{const{name:o}=e,r=`iva_dbg_event_${o}`,s=Object.assign({state:t},n);window.sznIVA=window.sznIVA||{},window.sznIVA[o]=window.sznIVA[o]||{},Object.assign(window.sznIVA[o],s);const i=new CustomEvent(r,{detail:s});window.dispatchEvent(i)})(p,n,d),o}return o&&1===n?(s(p,"log",void 0,e[0]),o):o&&2===n&&~t.indexOf(e[0])?(s(p,e[0],void 0,e[1]),o):o&&n>1&&!~t.indexOf(e[0])?(s(p,"log",void 0,...e),o):o&&n>2&&~t.indexOf(e[0])?(s(p,e[0],void 0,...e.slice(1)),o):(s(u(),"warn",void 0,"Debugger received unknown argument combination. args:",e),o)}:()=>!1);var p,w=(e,t)=>{m({type:"info",subName:e,data:t,message:r[e]})},v=(e,t)=>{m({type:"error",subName:e,data:t,message:r[e]})};const f=new class{constructor(){this.myDOT=null,this.dotScript=null}appendDotScript(){const e=document.createElement("script");e.src="https://h.seznam.cz/js/dot-nano.js",document.head.insertBefore(e,document.head.firstChild),this.dotScript=e,w("E1001")}configureDOT(){window.DOT.isConfigured()||window.DOT.cfg({service:"sklikp",load:!1,mousedown:!1,impress:!1})}initMyDOT(e){this.myDOT=window.DOT.getNewInstance(),this.myDOT.cfg({host:"h.seznam.cz",service:"recassp",mousedown:!1,impress:e,load:!1})}doInit(e){return new Promise(((t,n)=>{var o;const r=e=>{this.configureDOT(),this.initMyDOT(e),t()};window.DOT&&void 0===(null===(o=window.DOT)||void 0===o?void 0:o.isFallback)?r(e):(this.appendDotScript(),this.dotScript.onload=()=>{var o,s;window.DOT&&void 0===(null===(o=window.DOT)||void 0===o?void 0:o.isFallback)?r(e):!0!==(null===(s=window.DOT)||void 0===s?void 0:s.isFallback)?(window.DOT={hit:()=>null,getNewInstance:()=>null,getCfgValue:()=>null,isConfigured:()=>!1,cfg:()=>null,isFallback:!0},n("DOT script loaded, but failed to create DOT instance!")):t()},this.dotScript.onerror=()=>{n("DOT script loading failed!")})}))}init(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return new Promise(((t,n)=>{if(this.myDOT)return void t();const o=()=>{this.doInit(e).then((()=>t()),(e=>n(e)))};"complete"!==document.readyState?window.addEventListener("load",o):o()}))}log(e,t,n){if(!this.myDOT)return e===o.RECASS_CLICK&&"function"==typeof n?n():void v("E2001");this.myDOT.hit("event",{d:Object.assign(Object.assign({},t),{action:e})},"function"==typeof n?n:null)}};var S=f;!function(){const r=document.querySelectorAll("script[data-webid]"),s=Array.from(r).map((e=>e.getAttribute("data-webid")));s.length>1?console.error("Multiple WebId instances. Script must be called only once!"):0!==s.length?((o=>{const{endpoint:r,baseUrl:s,scriptName:i}={endpoint:"recass-static",scriptName:"sznrecommend-measure.min.js"},a=`${i}-init`;n(a)||(t(a),window.addEventListener("error",(o=>{const{error:a}=o;if(!a||!a.stack||!a.message)return;const{message:d,stack:l}=a,c=`${i}-${d}`;n(c)||l.indexOf(i)>-1&&(new e(r,s).appendValue("msg",d).appendValue("script",i).appendValue("href",window.location.href).appendValue("referrer",document.referrer).appendValue("stack",l).send(),t(c))})))})(),S.init(!1).then((()=>{S.log(o.RECASS_READ,{web_id:parseInt(s[0],10)})}))):console.error("Missing 'webid' parameter!")}()}(); \ No newline at end of file