@stormid/cookie-banner
Advanced tools
Comparing version 1.0.0-alpha.16 to 1.0.0-alpha.17
@@ -1,2 +0,2 @@ | ||
var e=["click","keydown"],n=[13,32],t={ec:"Banner",ea:"Displays",cm1:1},s={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},a={ec:"Save preferences",ea:"CookiePrefs"},c=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},o=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},l=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},u=function(){},d=function(e){return/radio|checkbox/i.test(e.type)},p=function(e,n){return!d(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),d(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},m="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),g="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),f=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},b={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===g.indexOf(n[1])&&-1===m.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},v.apply(this,arguments)}var y=function(e,n){return n},h=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},k=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},x=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(k,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},w=function(e){e.settings.necessary.forEach(function(n){return n(e)})},j=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},_=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(v({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:_()}),t))},N=function(e){e.settings.hideBannerOnFormPage&&document.querySelector("."+e.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,t))},S=function(t){return function(r){var a=document.querySelector("."+r.settings.classNames.banner);if(a){var o=[].slice.call(document.querySelectorAll("."+r.settings.classNames.acceptBtn)),l=document.querySelector("."+r.settings.classNames.optionsBtn);e.forEach(function(e){o.forEach(function(i){i.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(h,Object.keys(r.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[c,x(t),q(a),B(t,!1),function(e){e.settings.tid&&O(e,v({},s,{cd2:j(t.getState().consent)}))}])})}),l&&r.settings.tid&&l.addEventListener(e,function(e){return O(r,i)})})}}},q=function(e){return function(){return e&&e.parentNode&&e.parentNode.removeChild(e)}},B=function(e,n){return void 0===n&&(n=!0),function(t){var s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&O(t,r);var i=document.querySelector("."+t.settings.classNames.form),l=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),m=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(p,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(m()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(h,m(),[o,c,x(e),q(l),z(u),function(e){if(e.settings.tid){var n=j(e.consent);O(e,v({},a,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])})}}},z=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};module.exports=function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,t=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var s=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,f(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||f(),s||{}]}catch(e){return[!1,f(),{}]}}(e),i=s[0];return t.update(y,{settings:e,persistentMeasurementParams:!!e.tid&&(r=s[1],a=e.tid,{tid:a,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:s[2]},[w,x(t),i?u:N,B(t),S(t)]),{getState:t.getState}}var r,a}(Object.assign({},b,e,{types:Object.keys(e.types).reduce(l(e),b.types)}))}; | ||
var e=["click","keydown"],n=[13,32],t={ec:"Banner",ea:"Displays",cm1:1},s={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},a={ec:"Save preferences",ea:"CookiePrefs"},c=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},o=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},l=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},u=function(){},d=function(e){return/radio|checkbox/i.test(e.type)},p=function(e,n){return!d(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),d(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},m="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),g="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),f=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},b={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===g.indexOf(n[1])&&-1===m.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},v.apply(this,arguments)}var y=function(e,n){return n},h=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},k=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},w=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(k,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},x=function(e){e.settings.necessary.forEach(function(n){return n(e)})},j=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},_=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(v({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:_()}),t))},N=function(e){e.settings.hideBannerOnFormPage&&document.querySelector("."+e.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,t))},S=function(t){return function(r){var a=document.querySelector("."+r.settings.classNames.banner);if(a){var o=[].slice.call(document.querySelectorAll("."+r.settings.classNames.acceptBtn)),l=document.querySelector("."+r.settings.classNames.optionsBtn);e.forEach(function(e){o.forEach(function(i){i.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(h,Object.keys(r.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[c,w(t),B(a),q(t,!1),function(e){e.settings.tid&&O(e,v({},s,{cd2:j(t.getState().consent)}))}])})}),l&&r.settings.tid&&l.addEventListener(e,function(e){return O(r,i)})})}}},B=function(e){return function(){return e&&e.parentNode&&e.parentNode.removeChild(e)}},q=function(e,n){return void 0===n&&(n=!0),function(t){var s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&O(t,r);var i=document.querySelector("."+t.settings.classNames.form),l=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),m=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(p,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(m()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(h,m(),[o,c,w(e),B(l),T(u),function(e){if(e.settings.tid){var n=j(e.consent);O(e,v({},a,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])}),window.location.hash.substring(1)===i.id&&window.scrollTo(0,i.getBoundingClientRect().top+window.scrollY)}}},T=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};module.exports=function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,t=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var s=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,f(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||f(),s||{}]}catch(e){return[!1,f(),{}]}}(e),i=s[0];return t.update(y,{settings:e,persistentMeasurementParams:!!e.tid&&(r=s[1],a=e.tid,{tid:a,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:s[2]},[x,w(t),i?u:N,q(t),S(t)]),{getState:t.getState}}var r,a}(Object.assign({},b,e,{types:Object.keys(e.types).reduce(l(e),b.types)}))}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
const e=["click","keydown"],t=[13,32],s={ec:"Banner",ea:"Displays",cm1:1},n={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},a={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},i={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},r={ec:"Save preferences",ea:"CookiePrefs"},c=e=>{document.cookie=[`${e.settings.name}=${btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))};`,`expires=${new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()};`,e.settings.path?`path=${e.settings.path};`:"",e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join("")},o=e=>{document.cookie.split("; ").map(e=>({name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"})).map((e=>t=>document.cookie=[`${t.name}=${t.value};`,`expires=${t.expiry};`,`path=${e.settings.path};`,e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join(""))(e))},l=e=>(t,s)=>(t[s]=t[s]?Object.assign({},t[s],{fns:t[s].fns.concat(e.types[s].fns)}):e.types[s],t),d=()=>{},p=e=>/radio|checkbox/i.test(e.type),m=(e,t)=>(!p(t)&&(e=>null!=e.value&&e.value.length>0)(t)&&(e=t.value),p(t)&&t.checked&&(Array.isArray(e)?e.push(t.value):e=[t.value]),e),g="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),u="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),b=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});var y={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":`.${(e=>{let t=(e=e.replace(/^www\./,"")).split(".");for(;t.length>3;)t.shift();return 3===t.length&&-1===u.indexOf(t[1])&&-1===g.indexOf(t[2])&&t.shift(),t.join(".")})(window.location.hostname)}`,secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:e=>`<section role="dialog" aria-live="polite" aria-label="Your privacy" class="${e.classNames.banner}">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="${e.policyURL}">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary ${e.classNames.acceptBtn}">Accept and close</button>\n <a class="privacy-banner__link ${e.classNames.optionsBtn}" rel="noopener noreferrer nofollow" href="${e.policyURL}">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>`,messageTemplate:e=>`<div class="${e.settings.classNames.formMessage}" aria-role="alert">${e.settings.savedMessage}</div>`,formTemplate:e=>`<form id="preferences" class="${e.settings.classNames.form}" novalidate>\n ${Object.keys(e.settings.types).map(t=>`<fieldset class="${e.settings.classNames.fieldset}">\n <legend class="${e.settings.classNames.legend}">\n <span class="${e.settings.classNames.title}">${e.settings.types[t].title}</span>\n <span class="${e.settings.classNames.description}">${e.settings.types[t].description}</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="1"\n ${1===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.yes}</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="0"\n ${0===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.no}</span>\n </label> \n </div>\n </div>\n </fieldset>`).join("")}\n <button class="${e.settings.classNames.submitBtn}"${Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":""}>Save my settings</button>\n </form>`};function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},f.apply(this,arguments)}const v=(e,t)=>t,h=(e,t)=>Object.assign({},e,{consent:Object.assign({},e.consent,t)}),k=(e,t)=>Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,t)})}),x=e=>t=>{Object.keys(t.consent).forEach(e=>{t.settings.types[e]&&!0!==t.settings.types[e].executed&&t.consent[e]&&Boolean(t.consent[e])&&t.settings.types[e].fns.forEach(e=>e(t))}),e.update(k,Object.keys(t.settings.types).reduce((e,s)=>(e[s]=Object.assign({},t.settings.types[s],{executed:t.settings.types[s].executed||t.consent[s]&&Boolean(t.consent[s])}),e),{}))},w=e=>{e.settings.necessary.forEach(t=>t(e))},$=(e,t)=>({tid:t,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?`${window.screen.width}x${window.screen.height}`:null,vp:`${document.documentElement.clientWidth}x${document.documentElement.clientHeight}`,cid:e,cd1:e,cd3:location.hostname,cd4:"consentAPI"}),j=e=>Object.keys(e).filter(t=>e[t]).join(","),_=()=>{try{const e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=(e,t,s="collect")=>(e=>{if(navigator.sendBeacon)return void navigator.sendBeacon(e);const t=document.createElement("img");return t.width=1,t.height=1,t.src=e,t})(((e,t)=>`https://www.google-analytics.com/${t}?${(e=>Object.keys(e).reduce((t,s)=>(null!==e[s]&&t.push(`${s}=${encodeURIComponent(e[s])}`),t),[]).join("&"))(e)}`)(f({},e.persistentMeasurementParams,t,e.settings.debug?{}:{z:_()}),s)),N=e=>{e.settings.hideBannerOnFormPage&&document.querySelector(`.${e.settings.classNames.formContainer}`)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,s))},S=s=>i=>{const r=document.querySelector(`.${i.settings.classNames.banner}`);if(!r)return;const o=[].slice.call(document.querySelectorAll(`.${i.settings.classNames.acceptBtn}`)),l=document.querySelector(`.${i.settings.classNames.optionsBtn}`);e.forEach(e=>{o.forEach(a=>{a.addEventListener(e,e=>{(e=>!!e.keyCode&&!~t.indexOf(e.keyCode)||e.which&&3===e.which)(e)||s.update(h,Object.keys(i.settings.types).reduce((e,t)=>(e[t]=1,e),{}),[c,x(s),q(r),B(s,!1),e=>{e.settings.tid&&O(e,f({},n,{cd2:j(s.getState().consent)}))}])})}),l&&i.settings.tid&&l.addEventListener(e,e=>O(i,a))})},q=e=>()=>e&&e.parentNode&&e.parentNode.removeChild(e),B=(e,t=!0)=>s=>{const n=document.querySelector(`.${s.settings.classNames.formContainer}`);if(!n)return;n.innerHTML=s.settings.formTemplate((e=>Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce((t,s)=>(e.settings.types[s].suggested&&(t[s]=1),t),{})}))(s)),s.settings.tid&&t&&O(s,i);const a=document.querySelector(`.${s.settings.classNames.form}`),l=document.querySelector(`.${s.settings.classNames.banner}`),d=document.querySelector(`.${s.settings.classNames.submitBtn}`),p=[].slice.call(document.querySelectorAll(`.${s.settings.classNames.field}`)).reduce((e,t)=>{const s=t.getAttribute("name").replace("privacy-","");return e[s]?e[s].push(t):e[s]=[t],e},{}),g=()=>Object.keys(p).reduce((e,t)=>{const s=p[t].reduce(m,"");return s&&(e[t]=parseInt(s,10)),e},{}),u=e=>{Object.keys(g()).length===Object.keys(p).length&&(d.removeAttribute("disabled"),a.removeEventListener("change",u))};d.hasAttribute("disabled")&&a.addEventListener("change",u),a.addEventListener("submit",t=>{t.preventDefault(),e.update(h,g(),[o,c,x(e),q(l),z(d),e=>{if(!e.settings.tid)return;const t=j(e.consent);O(e,f({},r,{cd2:""===t?"None":t,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}])})},z=e=>t=>{e.insertAdjacentHTML("afterend",t.settings.messageTemplate(t)),e.setAttribute("disabled","disabled"),window.setTimeout(()=>{e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)};var E=e=>(e=>{if(!(()=>{try{document.cookie="cookietest=1";const e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})())return;const t=(()=>{let e={};return{update:(t,s,n)=>{e=t(e,s),n&&n.forEach(t=>t(e))},getState:()=>e}})();e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");const[s,n,a]=(e=>{try{const t=(e=>{const t=document.cookie.split("; ");for(let s=0;s<=t.length;s++){if(!t[s])return!1;const[n,a]=t[s].split("=");if(n===e.name)return window.atob(a)}return!1})(e);if(!t)return[!1,b(),{}];const{cid:s,consent:n}=JSON.parse(t);return[void 0!==n,s||b(),n||{}]}catch(e){return[!1,b(),{}]}})(e);return t.update(v,{settings:e,persistentMeasurementParams:!!e.tid&&$(n,e.tid),consent:a},[w,x(t),s?d:N,B(t),S(t)]),{getState:t.getState}})(Object.assign({},y,e,{types:Object.keys(e.types).reduce(l(e),y.types)}));export{E as default}; | ||
const e=["click","keydown"],t=[13,32],s={ec:"Banner",ea:"Displays",cm1:1},n={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},a={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},i={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},r={ec:"Save preferences",ea:"CookiePrefs"},c=e=>{document.cookie=[`${e.settings.name}=${btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))};`,`expires=${new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()};`,e.settings.path?`path=${e.settings.path};`:"",e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join("")},o=e=>{document.cookie.split("; ").map(e=>({name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"})).map((e=>t=>document.cookie=[`${t.name}=${t.value};`,`expires=${t.expiry};`,`path=${e.settings.path};`,e.settings.domain?`domain=${e.settings.domain};`:"",e.settings.samesite?`SameSite=${e.settings.samesite};`:"",e.settings.secure?"secure":""].join(""))(e))},l=e=>(t,s)=>(t[s]=t[s]?Object.assign({},t[s],{fns:t[s].fns.concat(e.types[s].fns)}):e.types[s],t),d=()=>{},p=e=>/radio|checkbox/i.test(e.type),m=(e,t)=>(!p(t)&&(e=>null!=e.value&&e.value.length>0)(t)&&(e=t.value),p(t)&&t.checked&&(Array.isArray(e)?e.push(t.value):e=[t.value]),e),g="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),u="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),b=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});var y={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":`.${(e=>{let t=(e=e.replace(/^www\./,"")).split(".");for(;t.length>3;)t.shift();return 3===t.length&&-1===u.indexOf(t[1])&&-1===g.indexOf(t[2])&&t.shift(),t.join(".")})(window.location.hostname)}`,secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:e=>`<section role="dialog" aria-live="polite" aria-label="Your privacy" class="${e.classNames.banner}">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="${e.policyURL}">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary ${e.classNames.acceptBtn}">Accept and close</button>\n <a class="privacy-banner__link ${e.classNames.optionsBtn}" rel="noopener noreferrer nofollow" href="${e.policyURL}">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>`,messageTemplate:e=>`<div class="${e.settings.classNames.formMessage}" aria-role="alert">${e.settings.savedMessage}</div>`,formTemplate:e=>`<form id="preferences" class="${e.settings.classNames.form}" novalidate>\n ${Object.keys(e.settings.types).map(t=>`<fieldset class="${e.settings.classNames.fieldset}">\n <legend class="${e.settings.classNames.legend}">\n <span class="${e.settings.classNames.title}">${e.settings.types[t].title}</span>\n <span class="${e.settings.classNames.description}">${e.settings.types[t].description}</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="1"\n ${1===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.yes}</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="${e.settings.classNames.field}"\n type="radio"\n name="privacy-${t.split(" ")[0].replace(" ","-")}"\n value="0"\n ${0===e.consent[t]?"checked":""}>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">${e.settings.types[t].labels.no}</span>\n </label> \n </div>\n </div>\n </fieldset>`).join("")}\n <button class="${e.settings.classNames.submitBtn}"${Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":""}>Save my settings</button>\n </form>`};function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n])}return e},f.apply(this,arguments)}const v=(e,t)=>t,h=(e,t)=>Object.assign({},e,{consent:Object.assign({},e.consent,t)}),k=(e,t)=>Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,t)})}),w=e=>t=>{Object.keys(t.consent).forEach(e=>{t.settings.types[e]&&!0!==t.settings.types[e].executed&&t.consent[e]&&Boolean(t.consent[e])&&t.settings.types[e].fns.forEach(e=>e(t))}),e.update(k,Object.keys(t.settings.types).reduce((e,s)=>(e[s]=Object.assign({},t.settings.types[s],{executed:t.settings.types[s].executed||t.consent[s]&&Boolean(t.consent[s])}),e),{}))},x=e=>{e.settings.necessary.forEach(t=>t(e))},$=(e,t)=>({tid:t,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?`${window.screen.width}x${window.screen.height}`:null,vp:`${document.documentElement.clientWidth}x${document.documentElement.clientHeight}`,cid:e,cd1:e,cd3:location.hostname,cd4:"consentAPI"}),j=e=>Object.keys(e).filter(t=>e[t]).join(","),_=()=>{try{const e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=(e,t,s="collect")=>(e=>{if(navigator.sendBeacon)return void navigator.sendBeacon(e);const t=document.createElement("img");return t.width=1,t.height=1,t.src=e,t})(((e,t)=>`https://www.google-analytics.com/${t}?${(e=>Object.keys(e).reduce((t,s)=>(null!==e[s]&&t.push(`${s}=${encodeURIComponent(e[s])}`),t),[]).join("&"))(e)}`)(f({},e.persistentMeasurementParams,t,e.settings.debug?{}:{z:_()}),s)),N=e=>{e.settings.hideBannerOnFormPage&&document.querySelector(`.${e.settings.classNames.formContainer}`)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,s))},S=s=>i=>{const r=document.querySelector(`.${i.settings.classNames.banner}`);if(!r)return;const o=[].slice.call(document.querySelectorAll(`.${i.settings.classNames.acceptBtn}`)),l=document.querySelector(`.${i.settings.classNames.optionsBtn}`);e.forEach(e=>{o.forEach(a=>{a.addEventListener(e,e=>{(e=>!!e.keyCode&&!~t.indexOf(e.keyCode)||e.which&&3===e.which)(e)||s.update(h,Object.keys(i.settings.types).reduce((e,t)=>(e[t]=1,e),{}),[c,w(s),B(r),q(s,!1),e=>{e.settings.tid&&O(e,f({},n,{cd2:j(s.getState().consent)}))}])})}),l&&i.settings.tid&&l.addEventListener(e,e=>O(i,a))})},B=e=>()=>e&&e.parentNode&&e.parentNode.removeChild(e),q=(e,t=!0)=>s=>{const n=document.querySelector(`.${s.settings.classNames.formContainer}`);if(!n)return;n.innerHTML=s.settings.formTemplate((e=>Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce((t,s)=>(e.settings.types[s].suggested&&(t[s]=1),t),{})}))(s)),s.settings.tid&&t&&O(s,i);const a=document.querySelector(`.${s.settings.classNames.form}`),l=document.querySelector(`.${s.settings.classNames.banner}`),d=document.querySelector(`.${s.settings.classNames.submitBtn}`),p=[].slice.call(document.querySelectorAll(`.${s.settings.classNames.field}`)).reduce((e,t)=>{const s=t.getAttribute("name").replace("privacy-","");return e[s]?e[s].push(t):e[s]=[t],e},{}),g=()=>Object.keys(p).reduce((e,t)=>{const s=p[t].reduce(m,"");return s&&(e[t]=parseInt(s,10)),e},{}),u=e=>{Object.keys(g()).length===Object.keys(p).length&&(d.removeAttribute("disabled"),a.removeEventListener("change",u))};d.hasAttribute("disabled")&&a.addEventListener("change",u),a.addEventListener("submit",t=>{t.preventDefault(),e.update(h,g(),[o,c,w(e),B(l),T(d),e=>{if(!e.settings.tid)return;const t=j(e.consent);O(e,f({},r,{cd2:""===t?"None":t,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}])}),window.location.hash.substring(1)===a.id&&window.scrollTo(0,a.getBoundingClientRect().top+window.scrollY)},T=e=>t=>{e.insertAdjacentHTML("afterend",t.settings.messageTemplate(t)),e.setAttribute("disabled","disabled"),window.setTimeout(()=>{e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)};var z=e=>(e=>{if(!(()=>{try{document.cookie="cookietest=1";const e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})())return;const t=(()=>{let e={};return{update:(t,s,n)=>{e=t(e,s),n&&n.forEach(t=>t(e))},getState:()=>e}})();e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");const[s,n,a]=(e=>{try{const t=(e=>{const t=document.cookie.split("; ");for(let s=0;s<=t.length;s++){if(!t[s])return!1;const[n,a]=t[s].split("=");if(n===e.name)return window.atob(a)}return!1})(e);if(!t)return[!1,b(),{}];const{cid:s,consent:n}=JSON.parse(t);return[void 0!==n,s||b(),n||{}]}catch(e){return[!1,b(),{}]}})(e);return t.update(v,{settings:e,persistentMeasurementParams:!!e.tid&&$(n,e.tid),consent:a},[x,w(t),s?d:N,q(t),S(t)]),{getState:t.getState}})(Object.assign({},y,e,{types:Object.keys(e.types).reduce(l(e),y.types)}));export{z as default}; | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e||self).CookieBanner=n()}(this,function(){var e=["click","keydown"],n=[13,32],t={ec:"Banner",ea:"Displays",cm1:1},s={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},a={ec:"Save preferences",ea:"CookiePrefs"},c=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},o=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},l=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},u=function(){},d=function(e){return/radio|checkbox/i.test(e.type)},p=function(e,n){return!d(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),d(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},m="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),f="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},b={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===f.indexOf(n[1])&&-1===m.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},v.apply(this,arguments)}var y=function(e,n){return n},h=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},k=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},x=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(k,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},w=function(e){e.settings.necessary.forEach(function(n){return n(e)})},j=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},_=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(v({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:_()}),t))},N=function(e){e.settings.hideBannerOnFormPage&&document.querySelector("."+e.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,t))},S=function(t){return function(r){var a=document.querySelector("."+r.settings.classNames.banner);if(a){var o=[].slice.call(document.querySelectorAll("."+r.settings.classNames.acceptBtn)),l=document.querySelector("."+r.settings.classNames.optionsBtn);e.forEach(function(e){o.forEach(function(i){i.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(h,Object.keys(r.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[c,x(t),B(a),T(t,!1),function(e){e.settings.tid&&O(e,v({},s,{cd2:j(t.getState().consent)}))}])})}),l&&r.settings.tid&&l.addEventListener(e,function(e){return O(r,i)})})}}},B=function(e){return function(){return e&&e.parentNode&&e.parentNode.removeChild(e)}},T=function(e,n){return void 0===n&&(n=!0),function(t){var s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&O(t,r);var i=document.querySelector("."+t.settings.classNames.form),l=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),m=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(p,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(m()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(h,m(),[o,c,x(e),B(l),q(u),function(e){if(e.settings.tid){var n=j(e.consent);O(e,v({},a,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])})}}},q=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};return function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,t=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var s=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,g(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||g(),s||{}]}catch(e){return[!1,g(),{}]}}(e),i=s[0];return t.update(y,{settings:e,persistentMeasurementParams:!!e.tid&&(r=s[1],a=e.tid,{tid:a,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:s[2]},[w,x(t),i?u:N,T(t),S(t)]),{getState:t.getState}}var r,a}(Object.assign({},b,e,{types:Object.keys(e.types).reduce(l(e),b.types)}))}}); | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e||self).CookieBanner=n()}(this,function(){var e=["click","keydown"],n=[13,32],t={ec:"Banner",ea:"Displays",cm1:1},s={ec:"Save preferences",ea:"Banner",cm2:1,cm3:1},i={ec:"Banner",ea:"Clicks",el:"Edit preferences",cm4:1},r={ec:"CookiePrefsWidget",ea:"Displays",cm5:1},a={ec:"Save preferences",ea:"CookiePrefs"},c=function(e){document.cookie=[e.settings.name+"="+btoa(JSON.stringify({consent:e.consent,cid:e.persistentMeasurementParams.cid}))+";","expires="+new Date((new Date).getTime()+24*e.settings.expiry*60*60*1e3).toGMTString()+";",e.settings.path?"path="+e.settings.path+";":"",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")},o=function(e){document.cookie.split("; ").map(function(e){return{name:e.split("=")[0],value:e.split("=")[1],expiry:"Thu, 01 Jan 1970 00:00:01 GMT"}}).map(function(e){return function(n){return document.cookie=[n.name+"="+n.value+";","expires="+n.expiry+";","path="+e.settings.path+";",e.settings.domain?"domain="+e.settings.domain+";":"",e.settings.samesite?"SameSite="+e.settings.samesite+";":"",e.settings.secure?"secure":""].join("")}}(e))},l=function(e){return function(n,t){return n[t]=n[t]?Object.assign({},n[t],{fns:n[t].fns.concat(e.types[t].fns)}):e.types[t],n}},u=function(){},d=function(e){return/radio|checkbox/i.test(e.type)},p=function(e,n){return!d(n)&&function(e){return null!=e.value&&e.value.length>0}(n)&&(e=n.value),d(n)&&n.checked&&(Array.isArray(e)?e.push(n.value):e=[n.value]),e},m="ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|be|bf|bg|bh|bi|bj|bm|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|cl|cm|cn|co|cr|cu|cv|cw|cx|cz|de|dj|dk|dm|do|dz|ec|ee|eg|es|et|eu|fi|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|im|in|io|iq|ir|is|it|je|jo|jp|kg|ki|km|kn|kp|kr|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|na|nc|ne|nf|ng|nl|no|nr|nu|nz|om|pa|pe|pf|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|yt".split("|"),f="netlify|azurewebsites|com|edu|gov|net|mil|org|nom|sch|caa|res|off|gob|int|tur|ip6|uri|urn|asn|act|nsw|qld|tas|vic|pro|biz|adm|adv|agr|arq|art|ato|bio|bmd|cim|cng|cnt|ecn|eco|emp|eng|esp|etc|eti|far|fnd|fot|fst|g12|ggf|imb|ind|inf|jor|jus|leg|lel|mat|med|mus|not|ntr|odo|ppg|psc|psi|qsl|rec|slg|srv|teo|tmp|trd|vet|zlg|web|ltd|sld|pol|fin|k12|lib|pri|aip|fie|eun|sci|prd|cci|pvt|mod|idv|rel|sex|gen|nic|abr|bas|cal|cam|emr|fvg|laz|lig|lom|mar|mol|pmn|pug|sar|sic|taa|tos|umb|vao|vda|ven|mie|北海道|和歌山|神奈川|鹿児島|ass|rep|tra|per|ngo|soc|grp|plc|its|air|and|bus|can|ddr|jfk|mad|nrw|nyc|ski|spy|tcm|ulm|usa|war|fhs|vgs|dep|eid|fet|fla|flå|gol|hof|hol|sel|vik|cri|iwi|ing|abo|fam|gok|gon|gop|gos|aid|atm|gsm|sos|elk|waw|est|aca|bar|cpa|jur|law|sec|plo|www|bir|cbg|jar|khv|msk|nov|nsk|ptz|rnd|spb|stv|tom|tsk|udm|vrn|cmw|kms|nkz|snz|pub|fhv|red|ens|nat|rns|rnu|bbs|tel|bel|kep|nhs|dni|fed|isa|nsn|gub|e12|tec|орг|обр|упр|alt|nis|jpn|mex|ath|iki|nid|gda|inc".split("|"),g=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},b={name:".CookiePreferences",path:"/",domain:"localhost"===window.location.hostname?"":"."+function(e){for(var n=(e=e.replace(/^www\./,"")).split(".");n.length>3;)n.shift();return 3===n.length&&-1===f.indexOf(n[1])&&-1===m.indexOf(n[2])&&n.shift(),n.join(".")}(window.location.hostname),secure:!0,samesite:"strict",expiry:365,types:{},necessary:[],policyURL:"/cookie-policy/#preferences",classNames:{banner:"privacy-banner",acceptBtn:"privacy-banner__accept",submitBtn:"privacy-banner__submit",optionsBtn:"privacy-banner__options",field:"privacy-banner__field",form:"privacy-banner__form",fieldset:"privacy-banner__fieldset",legend:"privacy-banner__legend",formContainer:"privacy-banner__form-container",formMessage:"privacy-banner__form-msg",title:"privacy-banner__form-title",description:"privacy-banner__form-description"},hideBannerOnFormPage:!0,savedMessage:"Your settings have been saved.",bannerTemplate:function(e){return'<section role="dialog" aria-live="polite" aria-label="Your privacy" class="'+e.classNames.banner+'">\n <div class="privacy-content">\n <div class="wrap">\n \x3c!--googleoff: all--\x3e\n <div class="privacy-banner__title">Cookies</div>\n <p>We use cookies to improve your experience on our site and show you personalised advertising.</p>\n <p>Find out more from our <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="/privacy-policy">privacy policy</a> and <a class="privacy-banner__link" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">cookie policy</a>.</p>\n <button type="button" class="btn btn--primary '+e.classNames.acceptBtn+'">Accept and close</button>\n <a class="privacy-banner__link '+e.classNames.optionsBtn+'" rel="noopener noreferrer nofollow" href="'+e.policyURL+'">Your options</a>\n \x3c!--googleon: all--\x3e\n </div>\n </div>\n </section>'},messageTemplate:function(e){return'<div class="'+e.settings.classNames.formMessage+'" aria-role="alert">'+e.settings.savedMessage+"</div>"},formTemplate:function(e){return'<form id="preferences" class="'+e.settings.classNames.form+'" novalidate>\n '+Object.keys(e.settings.types).map(function(n){return'<fieldset class="'+e.settings.classNames.fieldset+'">\n <legend class="'+e.settings.classNames.legend+'">\n <span class="'+e.settings.classNames.title+'">'+e.settings.types[n].title+'</span>\n <span class="'+e.settings.classNames.description+'">'+e.settings.types[n].description+'</span>\n </legend>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="1"\n '+(1===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">I am OK with this</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.yes+'</span>\n </label> \n </div>\n </div>\n <div class="form-row">\n <div class="relative">\n <label class="privacy-banner__label">\n <input\n class="'+e.settings.classNames.field+'"\n type="radio"\n name="privacy-'+n.split(" ")[0].replace(" ","-")+'"\n value="0"\n '+(0===e.consent[n]?"checked":"")+'>\n <span class="privacy-banner__label-text">No thank you</span>\n <span class="privacy-banner__label-description">'+e.settings.types[n].labels.no+"</span>\n </label> \n </div>\n </div>\n </fieldset>"}).join("")+'\n <button class="'+e.settings.classNames.submitBtn+'"'+(Object.keys(e.consent).length!==Object.keys(e.settings.types).length?" disabled":"")+">Save my settings</button>\n </form>"}};function v(){return v=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},v.apply(this,arguments)}var y=function(e,n){return n},h=function(e,n){return Object.assign({},e,{consent:Object.assign({},e.consent,n)})},k=function(e,n){return Object.assign({},e,{settings:Object.assign({},e.settings,{types:Object.assign({},e.settings.types,n)})})},w=function(e){return function(n){Object.keys(n.consent).forEach(function(e){n.settings.types[e]&&!0!==n.settings.types[e].executed&&n.consent[e]&&Boolean(n.consent[e])&&n.settings.types[e].fns.forEach(function(e){return e(n)})}),e.update(k,Object.keys(n.settings.types).reduce(function(e,t){return e[t]=Object.assign({},n.settings.types[t],{executed:n.settings.types[t].executed||n.consent[t]&&Boolean(n.consent[t])}),e},{}))}},x=function(e){e.settings.necessary.forEach(function(n){return n(e)})},j=function(e){return Object.keys(e).filter(function(n){return e[n]}).join(",")},_=function(){try{var e=new Uint32Array(1);return window.crypto.getRandomValues(e),2147483647&e[0]}catch(e){return Math.round(2147483647*Math.random())}},O=function(e,n,t){return void 0===t&&(t="collect"),function(e){if(!navigator.sendBeacon){var n=document.createElement("img");return n.width=1,n.height=1,n.src=e,n}navigator.sendBeacon(e)}(function(e,n){return"https://www.google-analytics.com/"+n+"?"+function(e){return Object.keys(e).reduce(function(n,t){return null!==e[t]&&n.push(t+"="+encodeURIComponent(e[t])),n},[]).join("&")}(e)}(v({},e.persistentMeasurementParams,n,e.settings.debug?{}:{z:_()}),t))},N=function(e){e.settings.hideBannerOnFormPage&&document.querySelector("."+e.settings.classNames.formContainer)||(document.body.firstElementChild.insertAdjacentHTML("beforebegin",e.settings.bannerTemplate(e.settings)),e.settings.tid&&O(e,t))},S=function(t){return function(r){var a=document.querySelector("."+r.settings.classNames.banner);if(a){var o=[].slice.call(document.querySelectorAll("."+r.settings.classNames.acceptBtn)),l=document.querySelector("."+r.settings.classNames.optionsBtn);e.forEach(function(e){o.forEach(function(i){i.addEventListener(e,function(e){(function(e){return!!e.keyCode&&!~n.indexOf(e.keyCode)||e.which&&3===e.which})(e)||t.update(h,Object.keys(r.settings.types).reduce(function(e,n){return e[n]=1,e},{}),[c,w(t),B(a),T(t,!1),function(e){e.settings.tid&&O(e,v({},s,{cd2:j(t.getState().consent)}))}])})}),l&&r.settings.tid&&l.addEventListener(e,function(e){return O(r,i)})})}}},B=function(e){return function(){return e&&e.parentNode&&e.parentNode.removeChild(e)}},T=function(e,n){return void 0===n&&(n=!0),function(t){var s=document.querySelector("."+t.settings.classNames.formContainer);if(s){s.innerHTML=t.settings.formTemplate(function(e){return Object.keys(e.consent).length>0?e:Object.assign({},e,{consent:Object.keys(e.settings.types).reduce(function(n,t){return e.settings.types[t].suggested&&(n[t]=1),n},{})})}(t)),t.settings.tid&&n&&O(t,r);var i=document.querySelector("."+t.settings.classNames.form),l=document.querySelector("."+t.settings.classNames.banner),u=document.querySelector("."+t.settings.classNames.submitBtn),d=[].slice.call(document.querySelectorAll("."+t.settings.classNames.field)).reduce(function(e,n){var t=n.getAttribute("name").replace("privacy-","");return e[t]?e[t].push(n):e[t]=[n],e},{}),m=function(){return Object.keys(d).reduce(function(e,n){var t=d[n].reduce(p,"");return t&&(e[n]=parseInt(t,10)),e},{})};u.hasAttribute("disabled")&&i.addEventListener("change",function e(n){Object.keys(m()).length===Object.keys(d).length&&(u.removeAttribute("disabled"),i.removeEventListener("change",e))}),i.addEventListener("submit",function(n){n.preventDefault(),e.update(h,m(),[o,c,w(e),B(l),q(u),function(e){if(e.settings.tid){var n=j(e.consent);O(e,v({},a,{cd2:""===n?"None":n,cm2:e.consent.performance?e.consent.performance:0,cm3:e.consent.thirdParty?e.consent.thirdParty:0}))}}])}),window.location.hash.substring(1)===i.id&&window.scrollTo(0,i.getBoundingClientRect().top+window.scrollY)}}},q=function(e){return function(n){e.insertAdjacentHTML("afterend",n.settings.messageTemplate(n)),e.setAttribute("disabled","disabled"),window.setTimeout(function(){e.parentNode.removeChild(e.nextElementSibling),e.removeAttribute("disabled")},3e3)}};return function(e){return function(e){if(function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}}()){var n,t=(n={},{update:function(e,t,s){n=e(n,t),s&&s.forEach(function(e){return e(n)})},getState:function(){return n}});e.tid||console.warn("The tid setting is missing. A tid is required for banner measurements.");var s=function(e){try{var n=function(e){for(var n=document.cookie.split("; "),t=0;t<=n.length;t++){if(!n[t])return!1;var s=n[t].split("=");if(s[0]===e.name)return window.atob(s[1])}return!1}(e);if(!n)return[!1,g(),{}];var t=JSON.parse(n),s=t.consent;return[void 0!==s,t.cid||g(),s||{}]}catch(e){return[!1,g(),{}]}}(e),i=s[0];return t.update(y,{settings:e,persistentMeasurementParams:!!e.tid&&(r=s[1],a=e.tid,{tid:a,v:1,t:"event",ds:"cookiebanner",dh:location.hostname,uip:"0.0.0.0",sr:window.screen?window.screen.width+"x"+window.screen.height:null,vp:document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,cid:r,cd1:r,cd3:location.hostname,cd4:"consentAPI"}),consent:s[2]},[x,w(t),i?u:N,T(t),S(t)]),{getState:t.getState}}var r,a}(Object.assign({},b,e,{types:Object.keys(e.types).reduce(l(e),b.types)}))}}); | ||
//# sourceMappingURL=index.umd.js.map |
# Measurements | ||
If a Google Analytics tid configuration option is passed in when initialising the Cookie Banner instance, the following data will be passed to the Analytics account using the Google Measurement API. | ||
If a Google Analytics tid configuration option is set when initialising the Cookie Banner instance, the following data will be sent to the Analytics account using the Google Measurement API. | ||
@@ -71,12 +71,10 @@ | ||
| --------- | ------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- | | ||
| ec | 'Save Preferences' | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ec | | ||
| ea | 'CookiePrefs' | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ea | | ||
| ec | 'Save Preferences' | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ec | | ||
| ea | 'CookiePrefs' | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#ea | | ||
| cd2 | Comma separated string of all cookie categories, e.g. 'performance,thirdParty' | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cd | | ||
| cm2 | 1 if performance is true, else 0 * | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cm | | ||
| cm3 | 1 if thirdPatyr is true, else 0 * | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cm | | ||
| cm2 | 1 if performance is true, else 0 [1] | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cm | | ||
| cm3 | 1 if thirdPatyr is true, else 0 [1] | https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cm | | ||
* Note that the cm2 and cm3 parameters relate to specific cookie categories names - 'performance' and 'third party' cookies respectively. | ||
[1] Note that the cm2 and cm3 parameters relate to specific cookie categories names - 'performance' and 'third party' cookies respectively. | ||
Storm defines performance cookies as those that are used to provide anonymous measurements that are used to measure the performance of the web application only. Third party cookies are defined as those that Storm has no control over and includes advertising, marketing, and third party service cookies that are loaded via iframes, embeds, and external libraries. | ||
If your application does not have these categories, the cm2 and cm3 |
{ | ||
"name": "@stormid/cookie-banner", | ||
"version": "1.0.0-alpha.16", | ||
"version": "1.0.0-alpha.17", | ||
"description": "GDPR compliant cookie banner", | ||
@@ -31,3 +31,3 @@ "author": "stormid", | ||
}, | ||
"gitHead": "9042db4005411c4360ba3e8188e03333c10098f2" | ||
"gitHead": "713e975c02ea4ca3bf116a5206cd2e5eeb8cb5d9" | ||
} |
@@ -12,7 +12,9 @@ # Cookie banner | ||
## Usage | ||
Cookie consent is based on categorising cookies and the functions that initialise them, desribing them in a configuration object passed into the module at initialisition. | ||
Cookie consent is based on categorising cookies and the functions that initialise them, describing them in a configuration object passed into the module at initialisition. | ||
The cookie banner renders itself if no consent preferences are recorded in the browser. The consent form renders into a DOMElement with a particular className configurable options (classNames.formContainer). | ||
The cookie banner renders itself if no consent preferences are recorded in the browser. | ||
The consent form renders into a DOMElement with a particular className configurable options (classNames.formContainer). | ||
Install the package | ||
@@ -23,3 +25,3 @@ ``` | ||
Create a container element for the consent form | ||
Create a container element for the consent form. | ||
``` | ||
@@ -26,0 +28,0 @@ <div class="privacy-banner__form-container"></div> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
210722
13
195
170