!function(){"use strict";function e(e){e.fn._fadeIn=e.fn.fadeIn;var t=e.noop||function(){},o=/MSIE/.test(navigator.userAgent),n=/MSIE 6.0/.test(navigator.userAgent)&&!/MSIE 8.0/.test(navigator.userAgent),i=(document.documentMode,"function"==typeof document.createElement("div").style.setExpression&&document.createElement("div").style.setExpression);e.blockUI=function(e){d(window,e)},e.unblockUI=function(e){a(window,e)},e.growlUI=function(t,o,n,i){var s=e('<div class="growlUI"></div>');t&&s.append("<h1>"+t+"</h1>"),o&&s.append("<h2>"+o+"</h2>"),n===undefined&&(n=3e3);var l=function(t){t=t||{},e.blockUI({message:s,fadeIn:"undefined"!=typeof t.fadeIn?t.fadeIn:700,fadeOut:"undefined"!=typeof t.fadeOut?t.fadeOut:1e3,timeout:"undefined"!=typeof t.timeout?t.timeout:n,centerY:!1,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})};l();s.css("opacity");s.on("mouseover",function(){l({fadeIn:0,timeout:3e4});var t=e(".blockMsg");t.stop(),t.fadeTo(300,1)}).on("mouseout",function(){e(".blockMsg").fadeOut(1e3)})},e.fn.block=function(t){if(this[0]===window)return e.blockUI(t),this;var o=e.extend({},e.blockUI.defaults,t||{});return this.each(function(){var t=e(this);o.ignoreIfBlocked&&t.data("blockUI.isBlocked")||t.unblock({fadeOut:0})}),this.each(function(){"static"==e.css(this,"position")&&(this.style.position="relative",e(this).data("blockUI.static",!0)),this.style.zoom=1,d(this,t)})},e.fn.unblock=function(t){return this[0]===window?(e.unblockUI(t),this):this.each(function(){a(this,t)})},e.blockUI.version=2.7,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},cursorReset:"default",growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,focusableElements:":input:enabled:visible",onBlock:null,onUnblock:null,onOverlayClick:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg",ignoreIfBlocked:!1};var s=null,l=[];function d(d,c){var u,b,h=d==window,k=c&&c.message!==undefined?c.message:undefined;if(!(c=e.extend({},e.blockUI.defaults,c||{})).ignoreIfBlocked||!e(d).data("blockUI.isBlocked")){if(c.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,c.overlayCSS||{}),u=e.extend({},e.blockUI.defaults.css,c.css||{}),c.onOverlayClick&&(c.overlayCSS.cursor="pointer"),b=e.extend({},e.blockUI.defaults.themedCSS,c.themedCSS||{}),k=k===undefined?c.message:k,h&&s&&a(window,{fadeOut:0}),k&&"string"!=typeof k&&(k.parentNode||k.jquery)){var y=k.jquery?k[0]:k,m={};e(d).data("blockUI.history",m),m.el=y,m.parent=y.parentNode,m.display=y.style.display,m.position=y.style.position,m.parent&&m.parent.removeChild(y)}e(d).data("blockUI.onUnblock",c.onUnblock);var g,v,I,w,U=c.baseZ;g=o||c.forceIframe?e('<iframe class="blockUI" style="z-index:'+U+++';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+c.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),v=c.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+U+++';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+U+++';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),c.theme&&h?(w='<div class="blockUI '+c.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(U+10)+';display:none;position:fixed">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):c.theme?(w='<div class="blockUI '+c.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(U+10)+';display:none;position:absolute">',c.title&&(w+='<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(c.title||"&nbsp;")+"</div>"),w+='<div class="ui-widget-content ui-dialog-content"></div>',w+="</div>"):w=h?'<div class="blockUI '+c.blockMsgClass+' blockPage" style="z-index:'+(U+10)+';display:none;position:fixed"></div>':'<div class="blockUI '+c.blockMsgClass+' blockElement" style="z-index:'+(U+10)+';display:none;position:absolute"></div>',I=e(w),k&&(c.theme?(I.css(b),I.addClass("ui-widget-content")):I.css(u)),c.theme||v.css(c.overlayCSS),v.css("position",h?"fixed":"absolute"),(o||c.forceIframe)&&g.css("opacity",0);var x=[g,v,I],C=e(h?"body":d);e.each(x,function(){this.appendTo(C)}),c.theme&&c.draggable&&e.fn.draggable&&I.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var S=i&&(!e.support.boxModel||e("object,embed",h?null:d).length>0);if(n||S){if(h&&c.allowBodyStretch&&e.support.boxModel&&e("html,body").css("height","100%"),(n||!e.support.boxModel)&&!h)var E=p(d,"borderTopWidth"),O=p(d,"borderLeftWidth"),T=E?"(0 - "+E+")":0,M=O?"(0 - "+O+")":0;e.each(x,function(e,t){var o=t[0].style;if(o.position="absolute",e<2)h?o.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.support.boxModel?0:"+c.quirksmodeOffsetHack+') + "px"'):o.setExpression("height",'this.parentNode.offsetHeight + "px"'),h?o.setExpression("width",'jQuery.support.boxModel&&document.documentElement.clientWidth||document.body.clientWidth + "px"'):o.setExpression("width",'this.parentNode.offsetWidth + "px"'),M&&o.setExpression("left",M),T&&o.setExpression("top",T);else if(c.centerY)h&&o.setExpression("top",'(document.documentElement.clientHeight||document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah=document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "px"'),o.marginTop=0;else if(!c.centerY&&h){var n="((document.documentElement.scrollTop ? document.documentElement.scrollTop:document.body.scrollTop) + "+(c.css&&c.css.top?parseInt(c.css.top,10):0)+') + "px"';o.setExpression("top",n)}})}if(k&&(c.theme?I.find(".ui-widget-content").append(k):I.append(k),(k.jquery||k.nodeType)&&e(k).show()),(o||c.forceIframe)&&c.showOverlay&&g.show(),c.fadeIn){var B=c.onBlock?c.onBlock:t,j=c.showOverlay&&!k?B:t,H=k?B:t;c.showOverlay&&v._fadeIn(c.fadeIn,j),k&&I._fadeIn(c.fadeIn,H)}else c.showOverlay&&v.show(),k&&I.show(),c.onBlock&&c.onBlock.bind(I)();if(r(1,d,c),h?(s=I[0],l=e(c.focusableElements,s),c.focusInput&&setTimeout(f,20)):function(e,t,o){var n=e.parentNode,i=e.style,s=(n.offsetWidth-e.offsetWidth)/2-p(n,"borderLeftWidth"),l=(n.offsetHeight-e.offsetHeight)/2-p(n,"borderTopWidth");t&&(i.left=s>0?s+"px":"0");o&&(i.top=l>0?l+"px":"0")}(I[0],c.centerX,c.centerY),c.timeout){var z=setTimeout(function(){h?e.unblockUI(c):e(d).unblock(c)},c.timeout);e(d).data("blockUI.timeout",z)}}}function a(t,o){var n,i,d=t==window,a=e(t),u=a.data("blockUI.history"),f=a.data("blockUI.timeout");f&&(clearTimeout(f),a.removeData("blockUI.timeout")),o=e.extend({},e.blockUI.defaults,o||{}),r(0,t,o),null===o.onUnblock&&(o.onUnblock=a.data("blockUI.onUnblock"),a.removeData("blockUI.onUnblock")),i=d?e(document.body).children().filter(".blockUI").add("body > .blockUI"):a.find(">.blockUI"),o.cursorReset&&(i.length>1&&(i[1].style.cursor=o.cursorReset),i.length>2&&(i[2].style.cursor=o.cursorReset)),d&&(s=l=null),o.fadeOut?(n=i.length,i.stop().fadeOut(o.fadeOut,function(){0==--n&&c(i,u,o,t)})):c(i,u,o,t)}function c(t,o,n,i){var s=e(i);if(!s.data("blockUI.isBlocked")){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),o&&o.el&&(o.el.style.display=o.display,o.el.style.position=o.position,o.el.style.cursor="default",o.parent&&o.parent.appendChild(o.el),s.removeData("blockUI.history")),s.data("blockUI.static")&&s.css("position","static"),"function"==typeof n.onUnblock&&n.onUnblock(i,n);var l=e(document.body),d=l.width(),a=l[0].style.width;l.width(d-1).width(d),l[0].style.width=a}}function r(t,o,n){var i=o==window,l=e(o);if((t||(!i||s)&&(i||l.data("blockUI.isBlocked")))&&(l.data("blockUI.isBlocked",t),i&&n.bindEvents&&(!t||n.showOverlay))){var d="mousedown mouseup keydown keypress keyup touchstart touchend touchmove";t?e(document).on(d,n,u):e(document).off(d,u)}}function u(t){if("keydown"===t.type&&t.keyCode&&9==t.keyCode&&s&&t.data.constrainTabKey){var o=l,n=!t.shiftKey&&t.target===o[o.length-1],i=t.shiftKey&&t.target===o[0];if(n||i)return setTimeout(function(){f(i)},10),!1}var d=t.data,a=e(t.target);return a.hasClass("blockOverlay")&&d.onOverlayClick&&d.onOverlayClick(t),a.parents("div."+d.blockMsgClass).length>0||0===a.parents().children().filter("div.blockUI").length}function f(e){if(l){var t=l[!0===e?l.length-1:0];t&&t.trigger("focus")}}function p(t,o){return parseInt(e.css(t,o),10)||0}}"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}();
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}return function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(f){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})});
function on_keydown_remove_from_cart(e){" "===e.key&&(e.preventDefault(),e.currentTarget.click())}function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count");if(e){var o=e.innerHTML;e.setAttribute("aria-hidden","true");var t=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=o,clearTimeout(t)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{function t(o){["Enter"," "].includes(o.key)&&(o.preventDefault(),e(".woocommerce-store-notice__dismiss-link").click())}e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function n(r){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),r.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("click",n).off("keydown",t)}).on("keydown",t)}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id");e(this).append('<button type="button" class="show-password-input" aria-label="'+woocommerce_params.i18n_password_show+'" aria-describedBy="'+o+'"></button>')}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").focus()}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),"undefined"==typeof wc_add_to_cart_params&&e(document.body).on("keydown",".remove_from_cart_button",on_keydown_remove_from_cart),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focus_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready);
(function(){var l,a;l=this,a=function(){"use strict";var l={},a={};try{"undefined"!=typeof window&&(l=window),"undefined"!=typeof document&&(a=document)}catch(l){}var e=(l.navigator||{}).userAgent,r=void 0===e?"":e,n=l,o=a,u=(n.document,!!o.documentElement&&!!o.head&&"function"==typeof o.addEventListener&&o.createElement,~r.indexOf("MSIE")||r.indexOf("Trident/"),"___FONT_AWESOME___"),t=function(){try{return"production"===process.env.NODE_ENV}catch(l){return!1}}();var f=n||{};f[u]||(f[u]={}),f[u].styles||(f[u].styles={}),f[u].hooks||(f[u].hooks={}),f[u].shims||(f[u].shims=[]);var i=f[u],s=[["glass",null,"glass-martini"],["meetup","fab",null],["star-o","far","star"],["remove",null,"times"],["close",null,"times"],["gear",null,"cog"],["trash-o","far","trash-alt"],["file-o","far","file"],["clock-o","far","clock"],["arrow-circle-o-down","far","arrow-alt-circle-down"],["arrow-circle-o-up","far","arrow-alt-circle-up"],["play-circle-o","far","play-circle"],["repeat",null,"redo"],["rotate-right",null,"redo"],["refresh",null,"sync"],["list-alt","far",null],["dedent",null,"outdent"],["video-camera",null,"video"],["picture-o","far","image"],["photo","far","image"],["image","far","image"],["pencil",null,"pencil-alt"],["map-marker",null,"map-marker-alt"],["pencil-square-o","far","edit"],["share-square-o","far","share-square"],["check-square-o","far","check-square"],["arrows",null,"arrows-alt"],["times-circle-o","far","times-circle"],["check-circle-o","far","check-circle"],["mail-forward",null,"share"],["expand",null,"expand-alt"],["compress",null,"compress-alt"],["eye","far",null],["eye-slash","far",null],["warning",null,"exclamation-triangle"],["calendar",null,"calendar-alt"],["arrows-v",null,"arrows-alt-v"],["arrows-h",null,"arrows-alt-h"],["bar-chart","far","chart-bar"],["bar-chart-o","far","chart-bar"],["twitter-square","fab",null],["facebook-square","fab",null],["gears",null,"cogs"],["thumbs-o-up","far","thumbs-up"],["thumbs-o-down","far","thumbs-down"],["heart-o","far","heart"],["sign-out",null,"sign-out-alt"],["linkedin-square","fab","linkedin"],["thumb-tack",null,"thumbtack"],["external-link",null,"external-link-alt"],["sign-in",null,"sign-in-alt"],["github-square","fab",null],["lemon-o","far","lemon"],["square-o","far","square"],["bookmark-o","far","bookmark"],["twitter","fab",null],["facebook","fab","facebook-f"],["facebook-f","fab","facebook-f"],["github","fab",null],["credit-card","far",null],["feed",null,"rss"],["hdd-o","far","hdd"],["hand-o-right","far","hand-point-right"],["hand-o-left","far","hand-point-left"],["hand-o-up","far","hand-point-up"],["hand-o-down","far","hand-point-down"],["arrows-alt",null,"expand-arrows-alt"],["group",null,"users"],["chain",null,"link"],["scissors",null,"cut"],["files-o","far","copy"],["floppy-o","far","save"],["navicon",null,"bars"],["reorder",null,"bars"],["pinterest","fab",null],["pinterest-square","fab",null],["google-plus-square","fab",null],["google-plus","fab","google-plus-g"],["money","far","money-bill-alt"],["unsorted",null,"sort"],["sort-desc",null,"sort-down"],["sort-asc",null,"sort-up"],["linkedin","fab","linkedin-in"],["rotate-left",null,"undo"],["legal",null,"gavel"],["tachometer",null,"tachometer-alt"],["dashboard",null,"tachometer-alt"],["comment-o","far","comment"],["comments-o","far","comments"],["flash",null,"bolt"],["clipboard","far",null],["paste","far","clipboard"],["lightbulb-o","far","lightbulb"],["exchange",null,"exchange-alt"],["cloud-download",null,"cloud-download-alt"],["cloud-upload",null,"cloud-upload-alt"],["bell-o","far","bell"],["cutlery",null,"utensils"],["file-text-o","far","file-alt"],["building-o","far","building"],["hospital-o","far","hospital"],["tablet",null,"tablet-alt"],["mobile",null,"mobile-alt"],["mobile-phone",null,"mobile-alt"],["circle-o","far","circle"],["mail-reply",null,"reply"],["github-alt","fab",null],["folder-o","far","folder"],["folder-open-o","far","folder-open"],["smile-o","far","smile"],["frown-o","far","frown"],["meh-o","far","meh"],["keyboard-o","far","keyboard"],["flag-o","far","flag"],["mail-reply-all",null,"reply-all"],["star-half-o","far","star-half"],["star-half-empty","far","star-half"],["star-half-full","far","star-half"],["code-fork",null,"code-branch"],["chain-broken",null,"unlink"],["shield",null,"shield-alt"],["calendar-o","far","calendar"],["maxcdn","fab",null],["html5","fab",null],["css3","fab",null],["ticket",null,"ticket-alt"],["minus-square-o","far","minus-square"],["level-up",null,"level-up-alt"],["level-down",null,"level-down-alt"],["pencil-square",null,"pen-square"],["external-link-square",null,"external-link-square-alt"],["compass","far",null],["caret-square-o-down","far","caret-square-down"],["toggle-down","far","caret-square-down"],["caret-square-o-up","far","caret-square-up"],["toggle-up","far","caret-square-up"],["caret-square-o-right","far","caret-square-right"],["toggle-right","far","caret-square-right"],["eur",null,"euro-sign"],["euro",null,"euro-sign"],["gbp",null,"pound-sign"],["usd",null,"dollar-sign"],["dollar",null,"dollar-sign"],["inr",null,"rupee-sign"],["rupee",null,"rupee-sign"],["jpy",null,"yen-sign"],["cny",null,"yen-sign"],["rmb",null,"yen-sign"],["yen",null,"yen-sign"],["rub",null,"ruble-sign"],["ruble",null,"ruble-sign"],["rouble",null,"ruble-sign"],["krw",null,"won-sign"],["won",null,"won-sign"],["btc","fab",null],["bitcoin","fab","btc"],["file-text",null,"file-alt"],["sort-alpha-asc",null,"sort-alpha-down"],["sort-alpha-desc",null,"sort-alpha-down-alt"],["sort-amount-asc",null,"sort-amount-down"],["sort-amount-desc",null,"sort-amount-down-alt"],["sort-numeric-asc",null,"sort-numeric-down"],["sort-numeric-desc",null,"sort-numeric-down-alt"],["youtube-square","fab",null],["youtube","fab",null],["xing","fab",null],["xing-square","fab",null],["youtube-play","fab","youtube"],["dropbox","fab",null],["stack-overflow","fab",null],["instagram","fab",null],["flickr","fab",null],["adn","fab",null],["bitbucket","fab",null],["bitbucket-square","fab","bitbucket"],["tumblr","fab",null],["tumblr-square","fab",null],["long-arrow-down",null,"long-arrow-alt-down"],["long-arrow-up",null,"long-arrow-alt-up"],["long-arrow-left",null,"long-arrow-alt-left"],["long-arrow-right",null,"long-arrow-alt-right"],["apple","fab",null],["windows","fab",null],["android","fab",null],["linux","fab",null],["dribbble","fab",null],["skype","fab",null],["foursquare","fab",null],["trello","fab",null],["gratipay","fab",null],["gittip","fab","gratipay"],["sun-o","far","sun"],["moon-o","far","moon"],["vk","fab",null],["weibo","fab",null],["renren","fab",null],["pagelines","fab",null],["stack-exchange","fab",null],["arrow-circle-o-right","far","arrow-alt-circle-right"],["arrow-circle-o-left","far","arrow-alt-circle-left"],["caret-square-o-left","far","caret-square-left"],["toggle-left","far","caret-square-left"],["dot-circle-o","far","dot-circle"],["vimeo-square","fab",null],["try",null,"lira-sign"],["turkish-lira",null,"lira-sign"],["plus-square-o","far","plus-square"],["slack","fab",null],["wordpress","fab",null],["openid","fab",null],["institution",null,"university"],["bank",null,"university"],["mortar-board",null,"graduation-cap"],["yahoo","fab",null],["google","fab",null],["reddit","fab",null],["reddit-square","fab",null],["stumbleupon-circle","fab",null],["stumbleupon","fab",null],["delicious","fab",null],["digg","fab",null],["pied-piper-pp","fab",null],["pied-piper-alt","fab",null],["drupal","fab",null],["joomla","fab",null],["spoon",null,"utensil-spoon"],["behance","fab",null],["behance-square","fab",null],["steam","fab",null],["steam-square","fab",null],["automobile",null,"car"],["envelope-o","far","envelope"],["spotify","fab",null],["deviantart","fab",null],["soundcloud","fab",null],["file-pdf-o","far","file-pdf"],["file-word-o","far","file-word"],["file-excel-o","far","file-excel"],["file-powerpoint-o","far","file-powerpoint"],["file-image-o","far","file-image"],["file-photo-o","far","file-image"],["file-picture-o","far","file-image"],["file-archive-o","far","file-archive"],["file-zip-o","far","file-archive"],["file-audio-o","far","file-audio"],["file-sound-o","far","file-audio"],["file-video-o","far","file-video"],["file-movie-o","far","file-video"],["file-code-o","far","file-code"],["vine","fab",null],["codepen","fab",null],["jsfiddle","fab",null],["life-ring","far",null],["life-bouy","far","life-ring"],["life-buoy","far","life-ring"],["life-saver","far","life-ring"],["support","far","life-ring"],["circle-o-notch",null,"circle-notch"],["rebel","fab",null],["ra","fab","rebel"],["resistance","fab","rebel"],["empire","fab",null],["ge","fab","empire"],["git-square","fab",null],["git","fab",null],["hacker-news","fab",null],["y-combinator-square","fab","hacker-news"],["yc-square","fab","hacker-news"],["tencent-weibo","fab",null],["qq","fab",null],["weixin","fab",null],["wechat","fab","weixin"],["send",null,"paper-plane"],["paper-plane-o","far","paper-plane"],["send-o","far","paper-plane"],["circle-thin","far","circle"],["header",null,"heading"],["sliders",null,"sliders-h"],["futbol-o","far","futbol"],["soccer-ball-o","far","futbol"],["slideshare","fab",null],["twitch","fab",null],["yelp","fab",null],["newspaper-o","far","newspaper"],["paypal","fab",null],["google-wallet","fab",null],["cc-visa","fab",null],["cc-mastercard","fab",null],["cc-discover","fab",null],["cc-amex","fab",null],["cc-paypal","fab",null],["cc-stripe","fab",null],["bell-slash-o","far","bell-slash"],["trash",null,"trash-alt"],["copyright","far",null],["eyedropper",null,"eye-dropper"],["area-chart",null,"chart-area"],["pie-chart",null,"chart-pie"],["line-chart",null,"chart-line"],["lastfm","fab",null],["lastfm-square","fab",null],["ioxhost","fab",null],["angellist","fab",null],["cc","far","closed-captioning"],["ils",null,"shekel-sign"],["shekel",null,"shekel-sign"],["sheqel",null,"shekel-sign"],["meanpath","fab","font-awesome"],["buysellads","fab",null],["connectdevelop","fab",null],["dashcube","fab",null],["forumbee","fab",null],["leanpub","fab",null],["sellsy","fab",null],["shirtsinbulk","fab",null],["simplybuilt","fab",null],["skyatlas","fab",null],["diamond","far","gem"],["intersex",null,"transgender"],["facebook-official","fab","facebook"],["pinterest-p","fab",null],["whatsapp","fab",null],["hotel",null,"bed"],["viacoin","fab",null],["medium","fab",null],["y-combinator","fab",null],["yc","fab","y-combinator"],["optin-monster","fab",null],["opencart","fab",null],["expeditedssl","fab",null],["battery-4",null,"battery-full"],["battery",null,"battery-full"],["battery-3",null,"battery-three-quarters"],["battery-2",null,"battery-half"],["battery-1",null,"battery-quarter"],["battery-0",null,"battery-empty"],["object-group","far",null],["object-ungroup","far",null],["sticky-note-o","far","sticky-note"],["cc-jcb","fab",null],["cc-diners-club","fab",null],["clone","far",null],["hourglass-o","far","hourglass"],["hourglass-1",null,"hourglass-start"],["hourglass-2",null,"hourglass-half"],["hourglass-3",null,"hourglass-end"],["hand-rock-o","far","hand-rock"],["hand-grab-o","far","hand-rock"],["hand-paper-o","far","hand-paper"],["hand-stop-o","far","hand-paper"],["hand-scissors-o","far","hand-scissors"],["hand-lizard-o","far","hand-lizard"],["hand-spock-o","far","hand-spock"],["hand-pointer-o","far","hand-pointer"],["hand-peace-o","far","hand-peace"],["registered","far",null],["creative-commons","fab",null],["gg","fab",null],["gg-circle","fab",null],["tripadvisor","fab",null],["odnoklassniki","fab",null],["odnoklassniki-square","fab",null],["get-pocket","fab",null],["wikipedia-w","fab",null],["safari","fab",null],["chrome","fab",null],["firefox","fab",null],["opera","fab",null],["internet-explorer","fab",null],["television",null,"tv"],["contao","fab",null],["500px","fab",null],["amazon","fab",null],["calendar-plus-o","far","calendar-plus"],["calendar-minus-o","far","calendar-minus"],["calendar-times-o","far","calendar-times"],["calendar-check-o","far","calendar-check"],["map-o","far","map"],["commenting",null,"comment-dots"],["commenting-o","far","comment-dots"],["houzz","fab",null],["vimeo","fab","vimeo-v"],["black-tie","fab",null],["fonticons","fab",null],["reddit-alien","fab",null],["edge","fab",null],["credit-card-alt",null,"credit-card"],["codiepie","fab",null],["modx","fab",null],["fort-awesome","fab",null],["usb","fab",null],["product-hunt","fab",null],["mixcloud","fab",null],["scribd","fab",null],["pause-circle-o","far","pause-circle"],["stop-circle-o","far","stop-circle"],["bluetooth","fab",null],["bluetooth-b","fab",null],["gitlab","fab",null],["wpbeginner","fab",null],["wpforms","fab",null],["envira","fab",null],["wheelchair-alt","fab","accessible-icon"],["question-circle-o","far","question-circle"],["volume-control-phone",null,"phone-volume"],["asl-interpreting",null,"american-sign-language-interpreting"],["deafness",null,"deaf"],["hard-of-hearing",null,"deaf"],["glide","fab",null],["glide-g","fab",null],["signing",null,"sign-language"],["viadeo","fab",null],["viadeo-square","fab",null],["snapchat","fab",null],["snapchat-ghost","fab",null],["snapchat-square","fab",null],["pied-piper","fab",null],["first-order","fab",null],["yoast","fab",null],["themeisle","fab",null],["google-plus-official","fab","google-plus"],["google-plus-circle","fab","google-plus"],["font-awesome","fab",null],["fa","fab","font-awesome"],["handshake-o","far","handshake"],["envelope-open-o","far","envelope-open"],["linode","fab",null],["address-book-o","far","address-book"],["vcard",null,"address-card"],["address-card-o","far","address-card"],["vcard-o","far","address-card"],["user-circle-o","far","user-circle"],["user-o","far","user"],["id-badge","far",null],["drivers-license",null,"id-card"],["id-card-o","far","id-card"],["drivers-license-o","far","id-card"],["quora","fab",null],["free-code-camp","fab",null],["telegram","fab",null],["thermometer-4",null,"thermometer-full"],["thermometer",null,"thermometer-full"],["thermometer-3",null,"thermometer-three-quarters"],["thermometer-2",null,"thermometer-half"],["thermometer-1",null,"thermometer-quarter"],["thermometer-0",null,"thermometer-empty"],["bathtub",null,"bath"],["s15",null,"bath"],["window-maximize","far",null],["window-restore","far",null],["times-rectangle",null,"window-close"],["window-close-o","far","window-close"],["times-rectangle-o","far","window-close"],["bandcamp","fab",null],["grav","fab",null],["etsy","fab",null],["imdb","fab",null],["ravelry","fab",null],["eercast","fab","sellcast"],["snowflake-o","far","snowflake"],["superpowers","fab",null],["wpexplorer","fab",null],["cab",null,"taxi"]];return function(l){try{l()}catch(l){if(!t)throw l}}(function(){var l;"function"==typeof i.hooks.addShims?i.hooks.addShims(s):(l=i.shims).push.apply(l,s)}),s},"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):l["fontawesome-free-shims"]=a();})();
function klikenGetCartItems(){
jQuery.post(fetchCartItems.ajax_url, {
action: fetchCartItems.action,
_ajax_nonce: fetchCartItems.nonce
}, function (data){
if(typeof sw!=='object'||!data) return;
let itemsForFBQ=[];
let itemsForGTAG=[];
let swCart=[];
sw.config.currency=fetchCartItems.currency;
for (let item in data){
itemsForFBQ.push({
"id": `${data[item].product_id}`,
"quantity": `${data[item].quantity}`
});
itemsForGTAG.push({
"id": `${data[item].product_id}`,
"name": `${data[item].product_name}`,
"price": `${data[item].price}`,
"quantity": `${data[item].quantity}`,
"google_business_vertical": "retail"
});
swCart.push({
"id": `${data[item].product_id}`,
"name": `${data[item].product_name}`,
"price": `${data[item].price}`,
"quantity": `${data[item].quantity}`,
"currency": sw.config.currency
});
}
sw.track("AddToCart",
{
"content_type": "product",
"contents": itemsForFBQ
});
sw.gEvent("add_to_cart",
{
"items": itemsForGTAG
});
sw.register_shopcart({
"items": swCart
});
});
}
jQuery(document).ready(function (){
jQuery('body').on('added_to_cart updated_cart_totals', function (){
klikenGetCartItems();
});
});
(()=>{"use strict";var e,t,s,n,r,o,i,c;!function(e){e.PING="ping",e.GET_TC_DATA="getTCData",e.GET_IN_APP_TC_DATA="getInAppTCData",e.GET_VENDOR_LIST="getVendorList",e.ADD_EVENT_LISTENER="addEventListener",e.REMOVE_EVENT_LISTENER="removeEventListener"}(e||(e={})),function(e){e.STUB="stub",e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"}(t||(t={})),function(e){e.VISIBLE="visible",e.HIDDEN="hidden",e.DISABLED="disabled"}(s||(s={})),function(e){e.TC_LOADED="tcloaded",e.CMP_UI_SHOWN="cmpuishown",e.USER_ACTION_COMPLETE="useractioncomplete"}(n||(n={}));class a{listenerId;callback;next;param;success=!0;constructor(e,t,s,n){Object.assign(this,{callback:e,listenerId:s,param:t,next:n});try{this.respond()}catch(e){this.invokeCallback(null)}}invokeCallback(e){const t=null!==e;"function"==typeof this.next?this.callback(this.next,e,t):this.callback(e,t)}}class l extends a{respond(){this.throwIfParamInvalid(),this.invokeCallback(new m(this.param,this.listenerId))}throwIfParamInvalid(){if(!(void 0===this.param||Array.isArray(this.param)&&this.param.every(Number.isInteger)))throw new Error("Invalid Parameter")}}class p{eventQueue=new Map;queueNumber=0;add(e){return this.eventQueue.set(this.queueNumber,e),this.queueNumber++}remove(e){return this.eventQueue.delete(e)}exec(){this.eventQueue.forEach((e,t)=>{new l(e.callback,e.param,t,e.next)})}clear(){this.queueNumber=0,this.eventQueue.clear()}get size(){return this.eventQueue.size}}class d{static apiVersion="2";static tcfPolicyVersion;static eventQueue=new p;static cmpStatus=t.LOADING;static disabled=!1;static displayStatus=s.HIDDEN;static cmpId;static cmpVersion;static eventStatus;static gdprApplies;static tcModel;static tcString;static reset(){delete this.cmpId,delete this.cmpVersion,delete this.eventStatus,delete this.gdprApplies,delete this.tcModel,delete this.tcString,delete this.tcfPolicyVersion,this.cmpStatus=t.LOADING,this.disabled=!1,this.displayStatus=s.HIDDEN,this.eventQueue.clear()}}class u{cmpId=d.cmpId;cmpVersion=d.cmpVersion;gdprApplies=d.gdprApplies;tcfPolicyVersion=d.tcfPolicyVersion}class h extends u{cmpStatus=t.ERROR}class m extends u{tcString;listenerId;eventStatus;cmpStatus;isServiceSpecific;useNonStandardTexts;publisherCC;purposeOneTreatment;outOfBand;purpose;vendor;specialFeatureOptins;publisher;constructor(e,t){if(super(),this.eventStatus=d.eventStatus,this.cmpStatus=d.cmpStatus,this.listenerId=t,d.gdprApplies){const t=d.tcModel;this.tcString=d.tcString,this.isServiceSpecific=t.isServiceSpecific,this.useNonStandardTexts=t.useNonStandardTexts,this.purposeOneTreatment=t.purposeOneTreatment,this.publisherCC=t.publisherCountryCode,this.outOfBand={allowedVendors:this.createVectorField(t.vendorsAllowed,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.purpose={consents:this.createVectorField(t.purposeConsents),legitimateInterests:this.createVectorField(t.purposeLegitimateInterests)},this.vendor={consents:this.createVectorField(t.vendorConsents,e),legitimateInterests:this.createVectorField(t.vendorLegitimateInterests,e),disclosedVendors:this.createVectorField(t.vendorsDisclosed,e)},this.specialFeatureOptins=this.createVectorField(t.specialFeatureOptins),this.publisher={consents:this.createVectorField(t.publisherConsents),legitimateInterests:this.createVectorField(t.publisherLegitimateInterests),customPurpose:{consents:this.createVectorField(t.publisherCustomConsents),legitimateInterests:this.createVectorField(t.publisherCustomLegitimateInterests)},restrictions:this.createRestrictions(t.publisherRestrictions)}}}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();for(let n=1;n<=s;n++){const s=n.toString();e.getRestrictions(n).forEach(e=>{const n=e.purposeId.toString();t[n]||(t[n]={}),t[n][s]=e.restrictionType})}}return t}createVectorField(e,t){return t?t.reduce((t,s)=>(t[String(s)]=e.has(Number(s)),t),{}):[...e].reduce((e,t)=>(e[t[0].toString(10)]=t[1],e),{})}}class g extends m{constructor(e){super(e),delete this.outOfBand}createVectorField(e){return[...e].reduce((e,t)=>e+(t[1]?"1":"0"),"")}createRestrictions(e){const t={};if(e.numRestrictions>0){const s=e.getMaxVendorId();e.getRestrictions().forEach(e=>{t[e.purposeId.toString()]="_".repeat(s)});for(let n=0;n<s;n++){const s=n+1;e.getRestrictions(s).forEach(e=>{const s=e.restrictionType.toString(),r=e.purposeId.toString(),o=t[r].substr(0,n),i=t[r].substr(n+1);t[r]=o+s+i})}}return t}}class f extends u{cmpLoaded=!0;cmpStatus=d.cmpStatus;displayStatus=d.displayStatus;apiVersion=String(d.apiVersion);gvlVersion;constructor(){super(),d.tcModel&&d.tcModel.vendorListVersion&&(this.gvlVersion=+d.tcModel.vendorListVersion)}}class v extends a{respond(){this.invokeCallback(new f)}}class _ extends l{respond(){this.throwIfParamInvalid(),this.invokeCallback(new g(this.param))}}class y extends Error{constructor(e){super(e),this.name="DecodingError"}}class S extends Error{constructor(e){super(e),this.name="EncodingError"}}class I extends Error{constructor(e){super(e),this.name="GVLError"}}class C extends Error{constructor(e,t,s=""){super(`invalid value ${t} passed for ${e} ${s}`),this.name="TCModelError"}}class E{static DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";static REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]);static BASIS=6;static LCM=24;static encode(e){if(!/^[0-1]+$/.test(e))throw new S("Invalid bitField");const t=e.length%this.LCM;e+=t?"0".repeat(this.LCM-t):"";let s="";for(let t=0;t<e.length;t+=this.BASIS)s+=this.DICT[parseInt(e.substr(t,this.BASIS),2)];return s}static decode(e){if(!/^[A-Za-z0-9\-_]+$/.test(e))throw new y("Invalidly encoded Base64URL string");let t="";for(let s=0;s<e.length;s++){const n=this.REVERSE_DICT.get(e[s]).toString(2);t+="0".repeat(this.BASIS-n.length)+n}return t}}class b{static langSet=new Set(["AR","BG","BS","CA","CS","CY","DA","DE","EL","EN","ES","ET","EU","FI","FR","GL","HE","HI","HR","HU","ID","IS","IT","JA","KA","KO","LT","LV","MK","MS","MT","NL","NO","PL","PT-BR","PT-PT","RO","RU","SK","SL","SQ","SR-LATN","SR-CYRL","SV","SW","TH","TL","TR","UK","VI","ZH","ZH-HANT"]);has(e){return b.langSet.has(e)}parseLanguage(e){const t=(e=e.toUpperCase()).split("-")[0];if(e.length>=2&&2==t.length){if(b.langSet.has(e))return e;if(b.langSet.has(t))return t;const s=t+"-"+t;if(b.langSet.has(s))return s;for(const s of b.langSet)if(-1!==s.indexOf(e)||-1!==s.indexOf(t))return s}throw new Error(`unsupported language ${e}`)}forEach(e){b.langSet.forEach(e)}get size(){return b.langSet.size}}class L{static cmpId="cmpId";static cmpVersion="cmpVersion";static consentLanguage="consentLanguage";static consentScreen="consentScreen";static created="created";static supportOOB="supportOOB";static isServiceSpecific="isServiceSpecific";static lastUpdated="lastUpdated";static numCustomPurposes="numCustomPurposes";static policyVersion="policyVersion";static publisherCountryCode="publisherCountryCode";static publisherCustomConsents="publisherCustomConsents";static publisherCustomLegitimateInterests="publisherCustomLegitimateInterests";static publisherLegitimateInterests="publisherLegitimateInterests";static publisherConsents="publisherConsents";static publisherRestrictions="publisherRestrictions";static purposeConsents="purposeConsents";static purposeLegitimateInterests="purposeLegitimateInterests";static purposeOneTreatment="purposeOneTreatment";static specialFeatureOptins="specialFeatureOptins";static useNonStandardTexts="useNonStandardTexts";static vendorConsents="vendorConsents";static vendorLegitimateInterests="vendorLegitimateInterests";static vendorListVersion="vendorListVersion";static vendorsAllowed="vendorsAllowed";static vendorsDisclosed="vendorsDisclosed";static version="version"}class A{clone(){const e=new this.constructor;return Object.keys(this).forEach(t=>{const s=this.deepClone(this[t]);void 0!==s&&(e[t]=s)}),e}deepClone(e){const t=typeof e;if("number"===t||"string"===t||"boolean"===t)return e;if(null!==e&&"object"===t){if("function"==typeof e.clone)return e.clone();if(e instanceof Date)return new Date(e.getTime());if(void 0!==e[Symbol.iterator]){const t=[];for(const s of e)t.push(this.deepClone(s));return e instanceof Array?t:new e.constructor(t)}{const t={};for(const s in e)e.hasOwnProperty(s)&&(t[s]=this.deepClone(e[s]));return t}}}}!function(e){e[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"}(r||(r={}));class w extends A{static hashSeparator="-";purposeId_;restrictionType;constructor(e,t){super(),void 0!==e&&(this.purposeId=e),void 0!==t&&(this.restrictionType=t)}static unHash(e){const t=e.split(this.hashSeparator),s=new w;if(2!==t.length)throw new C("hash",e);return s.purposeId=parseInt(t[0],10),s.restrictionType=parseInt(t[1],10),s}get hash(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return`${this.purposeId}${w.hashSeparator}${this.restrictionType}`}get purposeId(){return this.purposeId_}set purposeId(e){this.purposeId_=e}isValid(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===r.NOT_ALLOWED||this.restrictionType===r.REQUIRE_CONSENT||this.restrictionType===r.REQUIRE_LI)}isSameAs(e){return this.purposeId===e.purposeId&&this.restrictionType===e.restrictionType}}class z extends A{bitLength=0;map=new Map;gvl_;has(e){return this.map.has(e)}isOkToHave(e,t,s){let n=!0;if(this.gvl?.vendors){const o=this.gvl.vendors[s];if(o)if(e===r.NOT_ALLOWED)n=o.legIntPurposes.includes(t)||o.purposes.includes(t);else if(o.flexiblePurposes.length)switch(e){case r.REQUIRE_CONSENT:n=o.flexiblePurposes.includes(t)&&o.legIntPurposes.includes(t);break;case r.REQUIRE_LI:n=o.flexiblePurposes.includes(t)&&o.purposes.includes(t)}else n=!1;else n=!1}return n}add(e,t){if(this.isOkToHave(t.restrictionType,t.purposeId,e)){const s=t.hash;this.has(s)||(this.map.set(s,new Set),this.bitLength=0),this.map.get(s).add(e)}}restrictPurposeToLegalBasis(e){const t=Array.from(this.gvl.vendorIds),s=e.hash,n=t[t.length-1],r=[...Array(n).keys()].map(e=>e+1);if(this.has(s))for(let e=1;e<=n;e++)this.map.get(s).add(e);else this.map.set(s,new Set(r)),this.bitLength=0}getVendors(e){let t=[];if(e){const s=e.hash;this.has(s)&&(t=Array.from(this.map.get(s)))}else{const e=new Set;this.map.forEach(t=>{t.forEach(t=>{e.add(t)})}),t=Array.from(e)}return t.sort((e,t)=>e-t)}getRestrictionType(e,t){let s;return this.getRestrictions(e).forEach(e=>{e.purposeId===t&&(void 0===s||s>e.restrictionType)&&(s=e.restrictionType)}),s}vendorHasRestriction(e,t){let s=!1;const n=this.getRestrictions(e);for(let e=0;e<n.length&&!s;e++)s=t.isSameAs(n[e]);return s}getMaxVendorId(){let e=0;return this.map.forEach(t=>{e=Math.max(Array.from(t)[t.size-1],e)}),e}getRestrictions(e){const t=[];return this.map.forEach((s,n)=>{e?s.has(e)&&t.push(w.unHash(n)):t.push(w.unHash(n))}),t}getPurposes(){const e=new Set;return this.map.forEach((t,s)=>{e.add(w.unHash(s).purposeId)}),Array.from(e)}remove(e,t){const s=t.hash,n=this.map.get(s);n&&(n.delete(e),0==n.size&&(this.map.delete(s),this.bitLength=0))}set gvl(e){this.gvl_||(this.gvl_=e,this.map.forEach((e,t)=>{const s=w.unHash(t);Array.from(e).forEach(t=>{this.isOkToHave(s.restrictionType,s.purposeId,t)||e.delete(t)})}))}get gvl(){return this.gvl_}isEmpty(){return 0===this.map.size}get numRestrictions(){return this.map.size}}!function(e){e.COOKIE="cookie",e.WEB="web",e.APP="app"}(o||(o={})),function(e){e.CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"}(i||(i={}));class T{static ID_TO_KEY=[i.CORE,i.VENDORS_DISCLOSED,i.VENDORS_ALLOWED,i.PUBLISHER_TC];static KEY_TO_ID={[i.CORE]:0,[i.VENDORS_DISCLOSED]:1,[i.VENDORS_ALLOWED]:2,[i.PUBLISHER_TC]:3}}class V extends A{bitLength=0;maxId_=0;set_=new Set;*[Symbol.iterator](){for(let e=1;e<=this.maxId;e++)yield[e,this.has(e)]}values(){return this.set_.values()}get maxId(){return this.maxId_}has(e){return this.set_.has(e)}unset(e){Array.isArray(e)?e.forEach(e=>this.unset(e)):"object"==typeof e?this.unset(Object.keys(e).map(e=>Number(e))):(this.set_.delete(Number(e)),this.bitLength=0,e===this.maxId&&(this.maxId_=0,this.set_.forEach(e=>{this.maxId_=Math.max(this.maxId,e)})))}isIntMap(e){let t="object"==typeof e;return t=t&&Object.keys(e).every(t=>{let s=Number.isInteger(parseInt(t,10));return s=s&&this.isValidNumber(e[t].id),s=s&&void 0!==e[t].name,s}),t}isValidNumber(e){return parseInt(e,10)>0}isSet(e){let t=!1;return e instanceof Set&&(t=Array.from(e).every(this.isValidNumber)),t}set(e){if(Array.isArray(e))e.forEach(e=>this.set(e));else if(this.isSet(e))this.set(Array.from(e));else if(this.isIntMap(e))this.set(Object.keys(e).map(e=>Number(e)));else{if(!this.isValidNumber(e))throw new C("set()",e,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(e),this.maxId_=Math.max(this.maxId,e),this.bitLength=0}}empty(){this.set_=new Set,this.maxId_=0}forEach(e){for(let t=1;t<=this.maxId;t++)e(this.has(t),t)}get size(){return this.set_.size}setAll(e){this.set(e)}}class O{static[L.cmpId]=12;static[L.cmpVersion]=12;static[L.consentLanguage]=12;static[L.consentScreen]=6;static[L.created]=36;static[L.isServiceSpecific]=1;static[L.lastUpdated]=36;static[L.policyVersion]=6;static[L.publisherCountryCode]=12;static[L.publisherLegitimateInterests]=24;static[L.publisherConsents]=24;static[L.purposeConsents]=24;static[L.purposeLegitimateInterests]=24;static[L.purposeOneTreatment]=1;static[L.specialFeatureOptins]=12;static[L.useNonStandardTexts]=1;static[L.vendorListVersion]=12;static[L.version]=6;static anyBoolean=1;static encodingType=1;static maxId=16;static numCustomPurposes=6;static numEntries=12;static numRestrictions=12;static purposeId=6;static restrictionType=2;static segmentType=3;static singleOrRange=1;static vendorId=16}class P{static encode(e,t){let s;if("string"==typeof e&&(e=parseInt(e,10)),s=e.toString(2),s.length>t||e<0)throw new S(`${e} too large to encode into ${t}`);return s.length<t&&(s="0".repeat(t-s.length)+s),s}static decode(e,t){if(t!==e.length)throw new y("invalid bit length");return parseInt(e,2)}}class k{static encode(e,t){return P.encode(Math.round(e.getTime()/100),t)}static decode(e,t){if(t!==e.length)throw new y("invalid bit length");const s=new Date;return s.setTime(100*P.decode(e,t)),s}}class R{static encode(e){return String(Number(e))}static decode(e){return"1"===e}}class D{static encode(e,t){let s="";for(let n=1;n<=t;n++)s+=R.encode(e.has(n));return s}static decode(e,t){if(e.length!==t)throw new y("bitfield encoding length mismatch");const s=new V;for(let n=1;n<=t;n++)R.decode(e[n-1])&&s.set(n);return s.bitLength=e.length,s}}class N{static encode(e,t){const s=(e=e.toUpperCase()).charCodeAt(0)-65,n=e.charCodeAt(1)-65;if(s<0||s>25||n<0||n>25)throw new S(`invalid language code: ${e}`);if(t%2==1)throw new S(`numBits must be even, ${t} is not valid`);return t/=2,P.encode(s,t)+P.encode(n,t)}static decode(e,t){let s;if(t!==e.length||e.length%2)throw new y("invalid bit length for language");{const t=65,n=e.length/2,r=P.decode(e.slice(0,n),n)+t,o=P.decode(e.slice(n),n)+t;s=String.fromCharCode(r)+String.fromCharCode(o)}return s}}class F{static encode(e){let t=P.encode(e.numRestrictions,O.numRestrictions);if(!e.isEmpty()){const s=(t,s)=>{for(let n=t+1;n<=s;n++)if(e.gvl.vendorIds.has(n))return n;return t};e.getRestrictions().forEach(n=>{t+=P.encode(n.purposeId,O.purposeId),t+=P.encode(n.restrictionType,O.restrictionType);const r=e.getVendors(n),o=r.length;let i=0,c=0,a="";for(let e=0;e<o;e++){const t=r[e];if(0===c&&(i++,c=t),e===o-1||r[e+1]>s(t,r[o-1])){const e=!(t===c);a+=R.encode(e),a+=P.encode(c,O.vendorId),e&&(a+=P.encode(t,O.vendorId)),c=0}}t+=P.encode(i,O.numEntries),t+=a})}return t}static decode(e){let t=0;const s=new z,n=P.decode(e.substr(t,O.numRestrictions),O.numRestrictions);t+=O.numRestrictions;for(let r=0;r<n;r++){const n=P.decode(e.substr(t,O.purposeId),O.purposeId);t+=O.purposeId;const r=P.decode(e.substr(t,O.restrictionType),O.restrictionType);t+=O.restrictionType;const o=new w(n,r),i=P.decode(e.substr(t,O.numEntries),O.numEntries);t+=O.numEntries;for(let n=0;n<i;n++){const n=R.decode(e.substr(t,O.anyBoolean));t+=O.anyBoolean;const r=P.decode(e.substr(t,O.vendorId),O.vendorId);if(t+=O.vendorId,n){const n=P.decode(e.substr(t,O.vendorId),O.vendorId);if(t+=O.vendorId,n<r)throw new y(`Invalid RangeEntry: endVendorId ${n} is less than ${r}`);for(let e=r;e<=n;e++)s.add(e,o)}else s.add(r,o)}}return s.bitLength=t,s}}!function(e){e[e.FIELD=0]="FIELD",e[e.RANGE=1]="RANGE"}(c||(c={}));class x{static encode(e){const t=[];let s,n=[],r=P.encode(e.maxId,O.maxId),o="";const i=O.maxId+O.encodingType,a=i+e.maxId,l=2*O.vendorId+O.singleOrRange+O.numEntries;let p=i+O.numEntries;return e.forEach((r,i)=>{o+=R.encode(r),s=e.maxId>l&&p<a,s&&r&&(e.has(i+1)?0===n.length&&(n.push(i),p+=O.singleOrRange,p+=O.vendorId):(n.push(i),p+=O.vendorId,t.push(n),n=[]))}),s?(r+=String(c.RANGE),r+=this.buildRangeEncoding(t)):(r+=String(c.FIELD),r+=o),r}static decode(e,t){let s,n=0;const r=P.decode(e.substr(n,O.maxId),O.maxId);n+=O.maxId;const o=P.decode(e.charAt(n),O.encodingType);if(n+=O.encodingType,o===c.RANGE){if(s=new V,1===t){if("1"===e.substr(n,1))throw new y("Unable to decode default consent=1");n++}const r=P.decode(e.substr(n,O.numEntries),O.numEntries);n+=O.numEntries;for(let t=0;t<r;t++){const t=R.decode(e.charAt(n));n+=O.singleOrRange;const r=P.decode(e.substr(n,O.vendorId),O.vendorId);if(n+=O.vendorId,t){const t=P.decode(e.substr(n,O.vendorId),O.vendorId);n+=O.vendorId;for(let e=r;e<=t;e++)s.set(e)}else s.set(r)}}else{const t=e.substr(n,r);n+=r,s=D.decode(t,r)}return s.bitLength=n,s}static buildRangeEncoding(e){const t=e.length;let s=P.encode(t,O.numEntries);return e.forEach(e=>{const t=1===e.length;s+=R.encode(!t),s+=P.encode(e[0],O.vendorId),t||(s+=P.encode(e[1],O.vendorId))}),s}}function U(){return{[L.version]:P,[L.created]:k,[L.lastUpdated]:k,[L.cmpId]:P,[L.cmpVersion]:P,[L.consentScreen]:P,[L.consentLanguage]:N,[L.vendorListVersion]:P,[L.policyVersion]:P,[L.isServiceSpecific]:R,[L.useNonStandardTexts]:R,[L.specialFeatureOptins]:D,[L.purposeConsents]:D,[L.purposeLegitimateInterests]:D,[L.purposeOneTreatment]:R,[L.publisherCountryCode]:N,[L.vendorConsents]:x,[L.vendorLegitimateInterests]:x,[L.publisherRestrictions]:F,segmentType:P,[L.vendorsDisclosed]:x,[L.vendorsAllowed]:x,[L.publisherConsents]:D,[L.publisherLegitimateInterests]:D,[L.numCustomPurposes]:P,[L.publisherCustomConsents]:D,[L.publisherCustomLegitimateInterests]:D}}class M{1={[i.CORE]:[L.version,L.created,L.lastUpdated,L.cmpId,L.cmpVersion,L.consentScreen,L.consentLanguage,L.vendorListVersion,L.purposeConsents,L.vendorConsents]};2={[i.CORE]:[L.version,L.created,L.lastUpdated,L.cmpId,L.cmpVersion,L.consentScreen,L.consentLanguage,L.vendorListVersion,L.policyVersion,L.isServiceSpecific,L.useNonStandardTexts,L.specialFeatureOptins,L.purposeConsents,L.purposeLegitimateInterests,L.purposeOneTreatment,L.publisherCountryCode,L.vendorConsents,L.vendorLegitimateInterests,L.publisherRestrictions],[i.PUBLISHER_TC]:[L.publisherConsents,L.publisherLegitimateInterests,L.numCustomPurposes,L.publisherCustomConsents,L.publisherCustomLegitimateInterests],[i.VENDORS_ALLOWED]:[L.vendorsAllowed],[i.VENDORS_DISCLOSED]:[L.vendorsDisclosed]}}class H{1=[i.CORE];2=[i.CORE];constructor(e,t){if(2===e.version)if(e.isServiceSpecific)this[2].push(i.PUBLISHER_TC),this[2].push(i.VENDORS_DISCLOSED);else{const s=!(!t||!t.isForVendors);s&&!0!==e[L.supportOOB]||this[2].push(i.VENDORS_DISCLOSED),s&&(e[L.supportOOB]&&e[L.vendorsAllowed].size>0&&this[2].push(i.VENDORS_ALLOWED),this[2].push(i.PUBLISHER_TC))}}}class q{static fieldSequence=new M;static encode(e,t){let s;try{s=this.fieldSequence[String(e.version)][t]}catch(s){throw new S(`Unable to encode version: ${e.version}, segment: ${t}`)}let n="";t!==i.CORE&&(n=P.encode(T.KEY_TO_ID[t],O.segmentType));const r=U();return s.forEach(s=>{const o=e[s],i=r[s];let c=O[s];void 0===c&&this.isPublisherCustom(s)&&(c=Number(e[L.numCustomPurposes]));try{n+=i.encode(o,c)}catch(e){throw new S(`Error encoding ${t}->${s}: ${e.message}`)}}),E.encode(n)}static decode(e,t,s){const n=E.decode(e);let r=0;s===i.CORE&&(t.version=P.decode(n.substr(r,O[L.version]),O[L.version])),s!==i.CORE&&(r+=O.segmentType);const o=this.fieldSequence[String(t.version)][s],c=U();return o.forEach(e=>{const s=c[e];let o=O[e];if(void 0===o&&this.isPublisherCustom(e)&&(o=Number(t[L.numCustomPurposes])),0!==o){const i=n.substr(r,o);if(t[e]=s===x?s.decode(i,t.version):s.decode(i,o),Number.isInteger(o))r+=o;else{if(!Number.isInteger(t[e].bitLength))throw new y(e);r+=t[e].bitLength}}}),t}static isPublisherCustom(e){return 0===e.indexOf("publisherCustom")}}class G{static processor=[e=>e,(e,t)=>{e.publisherRestrictions.gvl=t,e.purposeLegitimateInterests.unset([1,3,4,5,6]);const s=new Map;return s.set("legIntPurposes",e.vendorLegitimateInterests),s.set("purposes",e.vendorConsents),s.forEach((s,n)=>{s.forEach((o,i)=>{if(o){const o=t.vendors[i];if(!o||o.deletedDate)s.unset(i);else if(0===o[n].length)if("legIntPurposes"===n&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0)s.set(i);else if("legIntPurposes"===n&&o.purposes.length>0&&0===o.legIntPurposes.length&&o.specialPurposes.length>0)s.set(i);else if(e.isServiceSpecific)if(0===o.flexiblePurposes.length)s.unset(i);else{const t=e.publisherRestrictions.getRestrictions(i);let o=!1;for(let e=0,s=t.length;e<s&&!o;e++)o=t[e].restrictionType===r.REQUIRE_CONSENT&&"purposes"===n||t[e].restrictionType===r.REQUIRE_LI&&"legIntPurposes"===n;o||s.unset(i)}else s.unset(i)}})}),e}];static process(e,t){const s=e.gvl;if(!s)throw new S("Unable to encode TCModel without a GVL");if(!s.isReady)throw new S("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(e=e.clone()).consentLanguage=s.language.slice(0,2).toUpperCase(),t?.version>0&&t?.version<=this.processor.length?e.version=t.version:e.version=this.processor.length;const n=e.version-1;if(!this.processor[n])throw new S(`Invalid version: ${e.version}`);return this.processor[n](e,s)}}class B{static absCall(e,t,s,n){return new Promise((r,o)=>{const i=new XMLHttpRequest;i.withCredentials=s,i.addEventListener("load",()=>{if(i.readyState==XMLHttpRequest.DONE)if(i.status>=200&&i.status<300){let e=i.response;if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}r(e)}else o(new Error(`HTTP Status: ${i.status} response type: ${i.responseType}`))}),i.addEventListener("error",()=>{o(new Error("error"))}),i.addEventListener("abort",()=>{o(new Error("aborted"))}),null===t?i.open("GET",e,!0):i.open("POST",e,!0),i.responseType="json",i.timeout=n,i.ontimeout=()=>{o(new Error("Timeout "+n+"ms "+e))},i.send(t)})}static post(e,t,s=!1,n=0){return this.absCall(e,JSON.stringify(t),s,n)}static fetch(e,t=!1,s=0){return this.absCall(e,null,t,s)}}class j extends A{static LANGUAGE_CACHE=new Map;static CACHE=new Map;static LATEST_CACHE_KEY=0;static DEFAULT_LANGUAGE="EN";static consentLanguages=new b;static baseUrl_;static set baseUrl(e){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(e))throw new I("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");e.length>0&&"/"!==e[e.length-1]&&(e+="/"),this.baseUrl_=e}static get baseUrl(){return this.baseUrl_}static latestFilename="vendor-list.json";static versionedFilename="archives/vendor-list-v[VERSION].json";static languageFilename="purposes-[LANG].json";readyPromise;gvlSpecificationVersion;vendorListVersion;tcfPolicyVersion;lastUpdated;purposes;specialPurposes;features;specialFeatures;isReady_=!1;vendors_;vendorIds;fullVendorList;byPurposeVendorMap;bySpecialPurposeVendorMap;byFeatureVendorMap;bySpecialFeatureVendorMap;stacks;dataCategories;lang_;cacheLang_;isLatest=!1;constructor(e,t){super();let s=j.baseUrl,n=t?.language;if(n)try{n=j.consentLanguages.parseLanguage(n)}catch(e){throw new I("Error during parsing the language: "+e.message)}if(this.lang_=n||j.DEFAULT_LANGUAGE,this.cacheLang_=n||j.DEFAULT_LANGUAGE,this.isVendorList(e))this.populate(e),this.readyPromise=Promise.resolve();else{if(!s)throw new I("must specify GVL.baseUrl before loading GVL json");if(e>0){const t=e;j.CACHE.has(t)?(this.populate(j.CACHE.get(t)),this.readyPromise=Promise.resolve()):(s+=j.versionedFilename.replace("[VERSION]",String(t)),this.readyPromise=this.fetchJson(s))}else j.CACHE.has(j.LATEST_CACHE_KEY)?(this.populate(j.CACHE.get(j.LATEST_CACHE_KEY)),this.readyPromise=Promise.resolve()):(this.isLatest=!0,this.readyPromise=this.fetchJson(s+j.latestFilename))}}static emptyLanguageCache(e){let t=!1;return null==e&&j.LANGUAGE_CACHE.size>0?(j.LANGUAGE_CACHE=new Map,t=!0):"string"==typeof e&&this.consentLanguages.has(e.toUpperCase())&&(j.LANGUAGE_CACHE.delete(e.toUpperCase()),t=!0),t}static emptyCache(e){let t=!1;return Number.isInteger(e)&&e>=0?(j.CACHE.delete(e),t=!0):void 0===e&&(j.CACHE=new Map,t=!0),t}cacheLanguage(){j.LANGUAGE_CACHE.has(this.cacheLang_)||j.LANGUAGE_CACHE.set(this.cacheLang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,dataCategories:this.dataCategories})}async fetchJson(e){try{this.populate(await B.fetch(e))}catch(e){throw new I(e.message)}}getJson(){return{gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.clonePurposes(),specialPurposes:this.cloneSpecialPurposes(),features:this.cloneFeatures(),specialFeatures:this.cloneSpecialFeatures(),stacks:this.cloneStacks(),...this.dataCategories?{dataCategories:this.cloneDataCategories()}:{},vendors:this.cloneVendors()}}cloneSpecialFeatures(){const e={};for(const t of Object.keys(this.specialFeatures))e[t]=j.cloneFeature(this.specialFeatures[t]);return e}cloneFeatures(){const e={};for(const t of Object.keys(this.features))e[t]=j.cloneFeature(this.features[t]);return e}cloneStacks(){const e={};for(const t of Object.keys(this.stacks))e[t]=j.cloneStack(this.stacks[t]);return e}cloneDataCategories(){const e={};for(const t of Object.keys(this.dataCategories))e[t]=j.cloneDataCategory(this.dataCategories[t]);return e}cloneSpecialPurposes(){const e={};for(const t of Object.keys(this.specialPurposes))e[t]=j.clonePurpose(this.specialPurposes[t]);return e}clonePurposes(){const e={};for(const t of Object.keys(this.purposes))e[t]=j.clonePurpose(this.purposes[t]);return e}static clonePurpose(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneFeature(e){return{id:e.id,name:e.name,description:e.description,...e.descriptionLegal?{descriptionLegal:e.descriptionLegal}:{},...e.illustrations?{illustrations:Array.from(e.illustrations)}:{}}}static cloneDataCategory(e){return{id:e.id,name:e.name,description:e.description}}static cloneStack(e){return{id:e.id,name:e.name,description:e.description,purposes:Array.from(e.purposes),specialFeatures:Array.from(e.specialFeatures)}}static cloneDataRetention(e){return{..."number"==typeof e.stdRetention?{stdRetention:e.stdRetention}:{},purposes:{...e.purposes},specialPurposes:{...e.specialPurposes}}}static cloneVendorUrls(e){return e.map(e=>({langId:e.langId,privacy:e.privacy,...e.legIntClaim?{legIntClaim:e.legIntClaim}:{}}))}static cloneVendor(e){return{id:e.id,name:e.name,purposes:Array.from(e.purposes),legIntPurposes:Array.from(e.legIntPurposes),flexiblePurposes:Array.from(e.flexiblePurposes),specialPurposes:Array.from(e.specialPurposes),features:Array.from(e.features),specialFeatures:Array.from(e.specialFeatures),...e.overflow?{overflow:{httpGetLimit:e.overflow.httpGetLimit}}:{},..."number"==typeof e.cookieMaxAgeSeconds||null===e.cookieMaxAgeSeconds?{cookieMaxAgeSeconds:e.cookieMaxAgeSeconds}:{},...void 0!==e.usesCookies?{usesCookies:e.usesCookies}:{},...e.policyUrl?{policyUrl:e.policyUrl}:{},...void 0!==e.cookieRefresh?{cookieRefresh:e.cookieRefresh}:{},...void 0!==e.usesNonCookieAccess?{usesNonCookieAccess:e.usesNonCookieAccess}:{},...e.dataRetention?{dataRetention:this.cloneDataRetention(e.dataRetention)}:{},...e.urls?{urls:this.cloneVendorUrls(e.urls)}:{},...e.dataDeclaration?{dataDeclaration:Array.from(e.dataDeclaration)}:{},...e.deviceStorageDisclosureUrl?{deviceStorageDisclosureUrl:e.deviceStorageDisclosureUrl}:{},...e.deletedDate?{deletedDate:e.deletedDate}:{}}}cloneVendors(){const e={};for(const t of Object.keys(this.fullVendorList))e[t]=j.cloneVendor(this.fullVendorList[t]);return e}async changeLanguage(e){let t=e;try{t=j.consentLanguages.parseLanguage(e)}catch(e){throw new I("Error during parsing the language: "+e.message)}const s=e.toUpperCase();if((t.toLowerCase()!==j.DEFAULT_LANGUAGE.toLowerCase()||j.LANGUAGE_CACHE.has(s))&&t!==this.lang_)if(this.lang_=t,j.LANGUAGE_CACHE.has(s)){const e=j.LANGUAGE_CACHE.get(s);for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}else{const e=j.baseUrl+j.languageFilename.replace("[LANG]",this.lang_.toLowerCase());try{await this.fetchJson(e),this.cacheLang_=s,this.cacheLanguage()}catch(e){throw new I("unable to load language: "+e.message)}}}get language(){return this.lang_}isVendorList(e){return void 0!==e&&void 0!==e.vendors}populate(e){this.purposes=e.purposes,this.specialPurposes=e.specialPurposes,this.features=e.features,this.specialFeatures=e.specialFeatures,this.stacks=e.stacks,this.dataCategories=e.dataCategories,this.isVendorList(e)&&(this.gvlSpecificationVersion=e.gvlSpecificationVersion,this.tcfPolicyVersion=e.tcfPolicyVersion,this.vendorListVersion=e.vendorListVersion,this.lastUpdated=e.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=e.vendors,this.fullVendorList=e.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&j.CACHE.set(j.LATEST_CACHE_KEY,this.getJson()),j.CACHE.has(this.vendorListVersion)||j.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()}mapVendors(e){this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach(e=>{this.byPurposeVendorMap[e]={legInt:new Set,consent:new Set,flexible:new Set}}),Object.keys(this.specialPurposes).forEach(e=>{this.bySpecialPurposeVendorMap[e]=new Set}),Object.keys(this.features).forEach(e=>{this.byFeatureVendorMap[e]=new Set}),Object.keys(this.specialFeatures).forEach(e=>{this.bySpecialFeatureVendorMap[e]=new Set}),Array.isArray(e)||(e=Object.keys(this.fullVendorList).map(e=>+e)),this.vendorIds=new Set(e),this.vendors_=e.reduce((e,t)=>{const s=this.vendors_[String(t)];return s&&void 0===s.deletedDate&&(s.purposes.forEach(e=>{this.byPurposeVendorMap[String(e)].consent.add(t)}),s.specialPurposes.forEach(e=>{this.bySpecialPurposeVendorMap[String(e)].add(t)}),s.legIntPurposes.forEach(e=>{this.byPurposeVendorMap[String(e)].legInt.add(t)}),s.flexiblePurposes&&s.flexiblePurposes.forEach(e=>{this.byPurposeVendorMap[String(e)].flexible.add(t)}),s.features.forEach(e=>{this.byFeatureVendorMap[String(e)].add(t)}),s.specialFeatures.forEach(e=>{this.bySpecialFeatureVendorMap[String(e)].add(t)}),e[t]=s),e},{})}getFilteredVendors(e,t,s,n){const r=e.charAt(0).toUpperCase()+e.slice(1);let o;const i={};return o="purpose"===e&&s?this["by"+r+"VendorMap"][String(t)][s]:this["by"+(n?"Special":"")+r+"VendorMap"][String(t)],o.forEach(e=>{i[String(e)]=this.vendors[String(e)]}),i}getVendorsWithConsentPurpose(e){return this.getFilteredVendors("purpose",e,"consent")}getVendorsWithLegIntPurpose(e){return this.getFilteredVendors("purpose",e,"legInt")}getVendorsWithFlexiblePurpose(e){return this.getFilteredVendors("purpose",e,"flexible")}getVendorsWithSpecialPurpose(e){return this.getFilteredVendors("purpose",e,void 0,!0)}getVendorsWithFeature(e){return this.getFilteredVendors("feature",e)}getVendorsWithSpecialFeature(e){return this.getFilteredVendors("feature",e,void 0,!0)}get vendors(){return this.vendors_}narrowVendorsTo(e){this.mapVendors(e)}get isReady(){return this.isReady_}clone(){const e=new j(this.getJson());return this.lang_!==j.DEFAULT_LANGUAGE&&e.changeLanguage(this.lang_),e}static isInstanceOf(e){return"object"==typeof e&&"function"==typeof e.narrowVendorsTo}}class Q extends A{static consentLanguages=j.consentLanguages;isServiceSpecific_=!1;supportOOB_=!0;useNonStandardTexts_=!1;purposeOneTreatment_=!1;publisherCountryCode_="AA";version_=2;consentScreen_=0;policyVersion_=5;consentLanguage_="EN";cmpId_=0;cmpVersion_=0;vendorListVersion_=0;numCustomPurposes_=0;gvl_;created;lastUpdated;specialFeatureOptins=new V;purposeConsents=new V;purposeLegitimateInterests=new V;publisherConsents=new V;publisherLegitimateInterests=new V;publisherCustomConsents=new V;publisherCustomLegitimateInterests=new V;customPurposes;vendorConsents=new V;vendorLegitimateInterests=new V;vendorsDisclosed=new V;vendorsAllowed=new V;publisherRestrictions=new z;constructor(e){super(),e&&(this.gvl=e),this.updated()}set gvl(e){j.isInstanceOf(e)||(e=new j(e)),this.gvl_=e,this.publisherRestrictions.gvl=e}get gvl(){return this.gvl_}set cmpId(e){if(e=Number(e),!(Number.isInteger(e)&&e>1))throw new C("cmpId",e);this.cmpId_=e}get cmpId(){return this.cmpId_}set cmpVersion(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new C("cmpVersion",e);this.cmpVersion_=e}get cmpVersion(){return this.cmpVersion_}set consentScreen(e){if(e=Number(e),!(Number.isInteger(e)&&e>-1))throw new C("consentScreen",e);this.consentScreen_=e}get consentScreen(){return this.consentScreen_}set consentLanguage(e){this.consentLanguage_=e}get consentLanguage(){return this.consentLanguage_}set publisherCountryCode(e){if(!/^([A-z]){2}$/.test(e))throw new C("publisherCountryCode",e);this.publisherCountryCode_=e.toUpperCase()}get publisherCountryCode(){return this.publisherCountryCode_}set vendorListVersion(e){if((e=0|Number(e))<0)throw new C("vendorListVersion",e);this.vendorListVersion_=e}get vendorListVersion(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_}set policyVersion(e){if(this.policyVersion_=parseInt(e,10),this.policyVersion_<0)throw new C("policyVersion",e)}get policyVersion(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_}set version(e){this.version_=parseInt(e,10)}get version(){return this.version_}set isServiceSpecific(e){this.isServiceSpecific_=e}get isServiceSpecific(){return this.isServiceSpecific_}set useNonStandardTexts(e){this.useNonStandardTexts_=e}get useNonStandardTexts(){return this.useNonStandardTexts_}set supportOOB(e){this.supportOOB_=e}get supportOOB(){return this.supportOOB_}set purposeOneTreatment(e){this.purposeOneTreatment_=e}get purposeOneTreatment(){return this.purposeOneTreatment_}setAllVendorConsents(){this.vendorConsents.set(this.gvl.vendors)}unsetAllVendorConsents(){this.vendorConsents.empty()}setAllVendorsDisclosed(){this.vendorsDisclosed.set(this.gvl.vendors)}unsetAllVendorsDisclosed(){this.vendorsDisclosed.empty()}setAllVendorsAllowed(){this.vendorsAllowed.set(this.gvl.vendors)}unsetAllVendorsAllowed(){this.vendorsAllowed.empty()}setAllVendorLegitimateInterests(){this.vendorLegitimateInterests.set(this.gvl.vendors)}unsetAllVendorLegitimateInterests(){this.vendorLegitimateInterests.empty()}setAllPurposeConsents(){this.purposeConsents.set(this.gvl.purposes)}unsetAllPurposeConsents(){this.purposeConsents.empty()}setAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.set(this.gvl.purposes)}unsetAllPurposeLegitimateInterests(){this.purposeLegitimateInterests.empty()}setAllSpecialFeatureOptins(){this.specialFeatureOptins.set(this.gvl.specialFeatures)}unsetAllSpecialFeatureOptins(){this.specialFeatureOptins.empty()}setAll(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()}unsetAll(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()}get numCustomPurposes(){let e=this.numCustomPurposes_;if("object"==typeof this.customPurposes){const t=Object.keys(this.customPurposes).sort((e,t)=>Number(e)-Number(t));e=parseInt(t.pop(),10)}return e}set numCustomPurposes(e){if(this.numCustomPurposes_=parseInt(e,10),this.numCustomPurposes_<0)throw new C("numCustomPurposes",e)}updated(){const e=new Date,t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()));this.created=t,this.lastUpdated=t}}class ${static encode(e,t){let s,n="";return e=G.process(e,t),s=Array.isArray(t?.segments)?t.segments:new H(e,t)[""+e.version],s.forEach((t,r)=>{let o="";r<s.length-1&&(o="."),n+=q.encode(e,t)+o}),n}static decode(e,t){const s=e.split("."),n=s.length;t||(t=new Q);for(let e=0;e<n;e++){const n=s[e],r=E.decode(n.charAt(0)).substr(0,O.segmentType),o=T.ID_TO_KEY[P.decode(r,O.segmentType).toString()];q.decode(n,t,o)}return t}}class W extends a{respond(){const e=d.tcModel,t=e.vendorListVersion;let s;void 0===this.param&&(this.param=t),s=this.param===t&&e.gvl?e.gvl:new j(this.param),s.readyPromise.then(()=>{this.invokeCallback(s.getJson())})}}class Y extends l{respond(){this.listenerId=d.eventQueue.add({callback:this.callback,param:this.param,next:this.next}),super.respond()}}class K extends a{respond(){this.invokeCallback(d.eventQueue.remove(this.param))}}class J{static[e.PING]=v;static[e.GET_TC_DATA]=l;static[e.GET_IN_APP_TC_DATA]=_;static[e.GET_VENDOR_LIST]=W;static[e.ADD_EVENT_LISTENER]=Y;static[e.REMOVE_EVENT_LISTENER]=K}class Z{static set_=new Set([0,2,void 0,null]);static has(e){return"string"==typeof e&&(e=Number(e)),this.set_.has(e)}}const X="__tcfapi";class ee{callQueue;customCommands;constructor(t){if(t){let s=e.ADD_EVENT_LISTENER;if(t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed: Use ${e.GET_TC_DATA} instead`);if(s=e.REMOVE_EVENT_LISTENER,t?.[s])throw new Error(`Built-In Custom Commmand for ${s} not allowed`);t?.[e.GET_TC_DATA]&&(t[e.ADD_EVENT_LISTENER]=t[e.GET_TC_DATA],t[e.REMOVE_EVENT_LISTENER]=t[e.GET_TC_DATA]),this.customCommands=t}try{this.callQueue=window[X]()||[]}catch(e){this.callQueue=[]}finally{window[X]=this.apiCall.bind(this),this.purgeQueuedCalls()}}apiCall(t,s,n,...r){if("string"!=typeof t)n(null,!1);else if(Z.has(s)){if("function"!=typeof n)throw new Error("invalid callback function");d.disabled?n(new h,!1):this.isCustomCommand (t)||this.isBuiltInCommand (t)?this.isCustomCommand (t)&&!this.isBuiltInCommand (t)?this.customCommands[t](n,...r):t===e.PING?this.isCustomCommand (t)?new J[t](this.customCommands[t],r[0],null,n):new J[t](n,r[0]):void 0===d.tcModel?this.callQueue.push([t,s,n,...r]):this.isCustomCommand (t)&&this.isBuiltInCommand (t)?new J[t](this.customCommands[t],r[0],null,n):new J[t](n,r[0]):n(null,!1)}else n(null,!1)}purgeQueuedCalls(){const e=this.callQueue;this.callQueue=[],e.forEach(e=>{window[X](...e)})}isCustomCommand (e){return this.customCommands&&"function"==typeof this.customCommands[e]}isBuiltInCommand (e){return void 0!==J[e]}}class te{callResponder;isServiceSpecific;numUpdates=0;constructor(e,t,s=!1,n){this.throwIfInvalidInt(e,"cmpId",2),this.throwIfInvalidInt(t,"cmpVersion",0),d.cmpId=e,d.cmpVersion=t,d.tcfPolicyVersion=5,this.isServiceSpecific=!!s,this.callResponder=new ee(n)}throwIfInvalidInt(e,t,s){if(!("number"==typeof e&&Number.isInteger(e)&&e>=s))throw new Error(`Invalid ${t}: ${e}`)}update(e,r=!1){if(d.disabled)throw new Error("CmpApi Disabled");d.cmpStatus=t.LOADED,r?(d.displayStatus=s.VISIBLE,d.eventStatus=n.CMP_UI_SHOWN):void 0===d.tcModel?(d.displayStatus=s.DISABLED,d.eventStatus=n.TC_LOADED):(d.displayStatus=s.HIDDEN,d.eventStatus=n.USER_ACTION_COMPLETE),d.gdprApplies=null!==e,d.gdprApplies?(""===e?(d.tcModel=new Q,d.tcModel.cmpId=d.cmpId,d.tcModel.cmpVersion=d.cmpVersion):d.tcModel=$.decode(e),d.tcModel.isServiceSpecific=this.isServiceSpecific,d.tcfPolicyVersion=Number(d.tcModel.policyVersion),d.tcString=e):d.tcModel=null,0===this.numUpdates?this.callResponder.purgeQueuedCalls():d.eventQueue.exec(),this.numUpdates++}disable(){d.disabled=!0,d.cmpStatus=t.ERROR}}const se=1===cmplz_tcf.isServiceSpecific,ne=["gl","eu","bg","ca","cs","da","de","el","es","et","fi","fr","hr","hu","it","ja","lt","lv","mt","nl","no","pl","pt","ro","ru","sk","sl","sr","sv","tr","zh"],re=ne.length,oe=document.documentElement.lang.length?document.documentElement.lang.toLowerCase():"en";let ie,ce="en";for(let e=0;e<re;e++){const t=ne[e];if("nb-no"===oe){ce="no";break}if(0===oe.indexOf(t)){ce=t;break}}"eu"===ce&&(ce="eus");let ae=[],le=[];const pe=cmplz_tcf.ac_mode,de=null!==document.getElementById("cmplz-tcf-us-vendor-container"),ue=cmplz_tcf.cmp_url+"cmp/vendorlist/additional-consent-providers.csv";let he,me,ge,fe,ve,_e=cmplz_tcf.cmp_url+"cmp/vendorlist/purposes-"+ce+".json";function ye(e){if("undefined"==typeof document)return"";const t="undefined"!=typeof complianz?complianz.prefix:"cmplz_",s=("; "+document.cookie).split("; "+t+e+"=");return 2===s.length?s.pop().split(";").shift():""}function Se(e,t,s){document.addEventListener(e,e=>{e.target.closest(t)&&s(e)})}function Ie(e){return null===e.offsetParent}ne.includes(ce)||(ce="en",_e=cmplz_tcf.cmp_url+"cmp/vendorlist/vendor-list.json");const Ce=new Promise(function(e){he=e}),Ee=new Promise(function(e){me=e}),be=new Promise(function(e){ge=e}),Le=new Promise(function(e){fe=e}),Ae=new Promise(function(e){ve=e}),we=pe?fetch(ue).then(e=>e.text()).then(e=>{const t=e.split("\n");t.shift(),le=t.map(e=>{if(0===e.length)return null;const[t,s,n,r]=function(e){const t=/"(.*?)"|([^,]+)/g,s=[];let n;for(;null!==(n=t.exec(e));)s.push(n[1]||n[2]);return s}(e);return{id:parseInt(t),name:s,policyUrl:n,domains:r,consent:0}}),le=le.filter(e=>null!==e)}).catch(e=>{cmplz_tcf.debug&&console.log("Error loading AC vendors:",e)}):Promise.resolve(),ze=fetch(_e,{method:"GET"}).then(e=>e.json()).then(e=>{ie=e}).catch(e=>{cmplz_tcf.debug&&console.log("Error loading purposes:",e)});Promise.all([we,ze]).then(()=>{ge()}),document.addEventListener("wp_consent_type_defined",function(){he()}),document.addEventListener("cmplz_cookie_warning_loaded",function(){complianz.disable_cookiebanner||fe()}),document.addEventListener("cmplz_revoke",function(e){const t=e.detail;ve(t)}),Ce.then(()=>{}),be.then(()=>{const e=S(),t=window.localStorage.getItem("cmplz_ac_string");j.baseUrl=cmplz_tcf.cmp_url+"cmp/vendorlist",ae=ie.dataCategories;const s=new j(ie);let n=null;s.changeLanguage(ce).then(()=>s.readyPromise).then(()=>{n=s.clone()});let r=new Q(s);r.publisherCountryCode=cmplz_tcf.publisherCountryCode,r.cmpId=332,r.cmpVersion=1,r.isServiceSpecific=se,r.policyVersion=5,r.UseNonStandardStacks=0,r.useNonStandardStacks=!1,r.useNonStandardTexts=!1,r.purposeOneTreatment=!1;const o=new te(332,1,se,{getTCData:(e,s,n)=>{s&&"object"==typeof s&&(t&&(s.addtlConsent=t,s.enableAdvertiserConsentMode=!(0===le.length||void 0===le[0].consent)),r.vendorsDisclosed&&(s.vendorsDisclosed={},Array.from(r.vendorsDisclosed).forEach(e=>{const t=parseInt(e,10);isNaN(t)||(s.vendorsDisclosed[t]=!0)})),s.policyVersion=r.policyVersion||5,s.useNonStandardStacks=r.useNonStandardStacks||!1,s.useNonStandardTexts=r.useNonStandardTexts||!1,s.purposeOneTreatment=r.purposeOneTreatment||!1),e(s,n)}});function i(){d(),function(){r.setAllVendorLegitimateInterests();for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.specialPurposes.length&&r.vendorLegitimateInterests.unset(t.id)}}(),r.setAllPurposeLegitimateInterests();for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),m("purpose_legitimate_interest",cmplz_tcf.purposes[e]);r.setAllSpecialFeatureOptins();for(const e in cmplz_tcf.specialFeatures)r.specialFeatureOptins.set(cmplz_tcf.specialFeatures[e]),m("specialfeature",cmplz_tcf.specialFeatures[e]);r.setAllPurposeConsents();for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),m("purpose_consent",cmplz_tcf.purposes[e]);r.setAllVendorConsents(),document.querySelectorAll(".cmplz-tcf-input").forEach(e=>{e.checked=!0}),I(r,_()),cmplz_set_cookie("banner-status","dismissed")}function c(e){p(),r.unsetAllPurposeLegitimateInterests(),function(){r.unsetAllVendorLegitimateInterests();for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.purposes.length&&0===t.flexiblePurposes.length&&0===t.specialFeatures.length&&0!==t.specialPurposes.length&&r.vendorLegitimateInterests.set(t.id)}}(),r.unsetAllSpecialFeatureOptins();for(const e in cmplz_tcf.specialFeatures)r.specialFeatureOptins.unset(cmplz_tcf.specialFeatures[e]),g("specialfeature",cmplz_tcf.specialFeatures[e]);for(const e in cmplz_tcf.purposes)r.purposeConsents.set(cmplz_tcf.purposes[e]),g("purpose_consent",cmplz_tcf.purposes[e]);r.unsetAllVendorConsents(),document.querySelectorAll(".cmplz-tcf-input").forEach(e=>{e.disabled||(e.checked=!1)}),I(r,_()),e&&location.reload()}r.gvl.readyPromise.then(()=>{const s=function(e){let t=Object.values(e).map(e=>e.id),s=y("purposes",e,cmplz_tcf.purposes);t=t.filter(e=>s.includes(e)),s=y("specialPurposes",e,cmplz_tcf.specialPurposes),t=t.filter(e=>s.includes(e)),s=y("features",e,cmplz_tcf.features),t=t.filter(e=>s.includes(e)),s=y("specialFeatures",e,cmplz_tcf.specialFeatures),t=t.filter(e=>s.includes(e));const n=Object.keys(cmplz_tcf.excludedVendors).map(function(e){return cmplz_tcf.excludedVendors[e]});return t=t.filter(e=>!n.includes(e)),t}(r.gvl.getJson().vendors);if(r.gvl.narrowVendorsTo(s),e&&"string"==typeof e&&e.length>0)try{r=$.decode(e,r),r.vendorsDisclosed||(r.vendorsDisclosed=new Set,cmplz_tcf.debug&&console.log("TCF v2.2: Upgraded v2.0 TC String, initialized disclosed vendors")),void 0===r.useNonStandardStacks&&(r.useNonStandardStacks=!1),void 0===r.useNonStandardTexts&&(r.useNonStandardTexts=!1),void 0===r.purposeOneTreatment&&(r.purposeOneTreatment=!1),I(r,_()),le=a(t,le)}catch(e){cmplz_tcf.debug&&(console.error("TCF: Error decoding TC String:",e),console.log("TCF: Clearing invalid TC String, user will need to re-consent")),localStorage.cmplz_tcf_consent&&localStorage.removeItem("cmplz_tcf_consent")}else cmplz_tcf.debug&&console.log("TCF: No stored consent found, waiting for user choice");me()}),Promise.all([Ce,Ee]).then(()=>{if(function(e){const t=document.getElementById("cmplz-tcf-vendor-container");if(null===t)return;t.innerHTML="";const s=document.getElementById("cmplz-tcf-vendor-template").innerHTML,n=w(ie.purposes,cmplz_tcf.purposes),o=w(ie.specialPurposes,cmplz_tcf.specialPurposes),a=w(ie.features,cmplz_tcf.features),p=w(ie.specialFeatures,cmplz_tcf.specialFeatures);v("purpose_consent",n,"statistics"),v("purpose_consent",n,"marketing"),v("purpose_legitimate_interest",n,"statistics"),v("purpose_legitimate_interest",n,"marketing"),v("feature",a,!1),v("specialpurpose",o,!1),v("specialfeature",p,!1),0===p.length&&(document.getElementById("cmplz-tcf-specialfeatures-wrapper").style.display="none");for(const o in e)if(e.hasOwnProperty(o)){let i=s;const c=e[o];r.vendorsDisclosed&&r.vendorsDisclosed.set(c.id);const a=c.purposes.concat(c.legIntPurposes);let l="";for(const e in a)if(a.hasOwnProperty(e)){const t=a[e];let s=!1;for(const e in n)if(n.hasOwnProperty(e)&&n[e].id===t){s=n[e].name;const r=c.dataRetention&&c.dataRetention.hasOwnProperty("stdRetention")?c.dataRetention.stdRetention:null;let o=c.dataRetention&&c.dataRetention.hasOwnProperty(t)?c.dataRetention[t]:r;void 0===o&&(o=cmplz_tcf.undeclared_string),l+='<div class="cmplz-tcf-purpose"><a href="https://cookiedatabase.org/tcf/'+s.replace(/ /g,"-").replace(/\//g,"-").toLowerCase()+'" target="_blank" rel="noopener noreferrer nofollow">'+s+"</a>| "+cmplz_tcf.retention_string+": "+o+"</div>"}}const p=A(c,ae),d=Math.round(c.cookieMaxAgeSeconds/86400);cmplz_tcf.debug&&console.log(c),i=i.replace(/{cookie_retention_seconds}/g,c.cookieMaxAgeSeconds),i=i.replace(/{cookie_retention_days}/g,d),i=i.replace(/{vendor_name}/g,c.name),i=i.replace(/{vendor_categories}/g,p),i=i.replace(/{vendor_id}/g,c.id),i=i.replace(/{purposes}/g,l);let u=!1,h=!1;c.urls.hasOwnProperty(0)&&(u=c.urls[0].privacy,h=c.urls[0].legIntClaim,u&&(i=i.replace(/{privacy_policy}/g,u)),h&&(i=i.replace(/{legitimate_interest}/g,h)));const m=L(c,n);i=i.replace(/{data_retention}/g,m);const g=document.createElement("div");g.innerHTML=i;const f=g.firstChild;f.querySelector(".cmplz-tcf-vendor-input").checked=r.vendorConsents.has(c.id)||r.vendorLegitimateInterests.has(c.id),f.querySelector(".cmplz-tcf-vendor-input").setAttribute("data-vendor_id",c.id),f.querySelector(".cmplz-tcf-consent-input").checked=r.vendorConsents.has(c.id),f.querySelector(".cmplz-tcf-consent-input").setAttribute("data-vendor_id",c.id),0!==c.legIntPurposes.length&&(f.querySelector(".cmplz_tcf_legitimate_interest_checkbox").style.display="block",f.querySelector(".cmplz-tcf-legitimate-interest-input").setAttribute("data-vendor_id",c.id),f.querySelector(".cmplz-tcf-legitimate-interest-input").checked=r.vendorLegitimateInterests.has(c.id)),h||(f.querySelector(".cmplz-tcf-legint-link").style.display="none",f.querySelector(".cmplz-tcf-legint-link").classList.add("not-available")),c.usesNonCookieAccess?g.querySelector(".non-cookie-storage-active").style.display="block":g.querySelector(".non-cookie-storage-inactive").style.display="block",c.cookieRefresh?g.querySelector(".non-cookie-refresh-active").style.display="block":g.querySelector(".non-cookie-refresh-inactive").style.display="block",c.cookieMaxAgeSeconds<=0?g.querySelector(".session-storage").style.display="block":c.cookieMaxAgeSeconds<=86400?g.querySelector(".retention_seconds").style.display="block":g.querySelector(".retention_days").style.display="block";const v=document.createDocumentFragment();f.classList.add("cmplz-vendortype-tcf"),v.appendChild(f),t.appendChild(f)}for(const e in le)if(le.hasOwnProperty(e)){let n=s;const o=le[e];r.vendorsDisclosed&&r.vendorsDisclosed.set(o.id),n=n.replace(/{vendor_name}/g,o.name),n=n.replace(/{vendor_id}/g,o.id),n=n.replace(/{privacy_policy}/g,o.policyUrl),n=n.replace(/{vendor_categories}/g,cmplz_tcf.undeclared_string);const i='<div class="cmplz-data-retention"><strong>'+cmplz_tcf.retention_string+":</strong> "+cmplz_tcf.ac_vendor_retention_string+"</div>";n=n.replace(/{data_retention}/g,i);const c=document.createElement("div");c.innerHTML=n;const a=c.firstChild;a.querySelector(".cmplz-tcf-vendor-input").checked=1===o.consent,a.querySelector(".cmplz-tcf-vendor-input").setAttribute("data-ac_vendor_id",o.id),a.querySelector(".cmplz-tcf-consent-input").checked=1===o.consent,a.querySelector(".cmplz-tcf-consent-input").setAttribute("data-ac_vendor_id",o.id);const l=document.createDocumentFragment();a.classList.add("cmplz-vendortype-ac"),l.appendChild(a),t.appendChild(a)}function d(e){const t=e.querySelector(".cmplz-tcf-consent-input"),s=e.querySelector(".cmplz-tcf-legitimate-interest-input"),n=e.querySelector(".cmplz_tcf_legitimate_interest_checkbox"),r=e.querySelector(".cmplz-tcf-vendor-input"),o=!!t&&t.checked,i=!(!n||Ie(n)||!s)&&s.checked;r.checked=o||i}Se("click",".cmplz-tcf-legitimate-interest-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=t.closest(".cmplz-tcf-vendor-container");t.checked?r.vendorLegitimateInterests.set(s):r.vendorLegitimateInterests.unset(s),d(n),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-consent-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=t.closest(".cmplz-tcf-vendor-container");s&&(t.checked?r.vendorConsents.set(s):r.vendorConsents.unset(s),d(n));const o=parseInt(t.getAttribute("data-ac_vendor_id"));o&&(t.checked?(u(o),n.querySelector(".cmplz-tcf-vendor-input").checked=!0):(l(o),n.querySelector(".cmplz-tcf-vendor-input").checked=!1)),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-vendor-input",function(e){const t=e.target,s=parseInt(t.getAttribute("data-vendor_id")),n=parseInt(t.getAttribute("data-ac_vendor_id")),o=t.closest(".cmplz-tcf-vendor-container");s?t.checked?(r.vendorConsents.set(s),r.vendorLegitimateInterests.set(s),o.querySelector(".cmplz-tcf-legitimate-interest-input").checked=!0,o.querySelector(".cmplz-tcf-consent-input").checked=!0):(r.vendorConsents.unset(s),r.vendorLegitimateInterests.unset(s),o.querySelector(".cmplz-tcf-legitimate-interest-input").checked=!1,o.querySelector(".cmplz-tcf-consent-input").checked=!1):n&&(t.checked?(u(n),o.querySelector(".cmplz-tcf-consent-input").checked=!0):(l(n),o.querySelector(".cmplz-tcf-consent-input").checked=!1)),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-toggle-info",function(e){const t=e.target;e.preventDefault(),Ie()?t.style.display="block":t.style.display="none"}),Se("click",".cmplz-tcf-toggle-vendor",function(e){const t=e.target;e.preventDefault();const s=t.closest(".cmplz-tcf-vendor-container").querySelector(".cmplz-tcf-info");Ie(s)?(t.classList.add("cmplz-tcf-rl"),t.classList.remove("cmplz-tcf-rm"),s.style.display="block"):(t.classList.add("cmplz-tcf-rm"),t.classList.remove("cmplz-tcf-rl"),s.style.display="none")}),Se("click","#cmplz-tcf-selectall",function(){for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];r.vendorConsents.set(s.id),document.querySelector("#cmplz-tcf-"+s.id).checked=!0}document.querySelectorAll("[data-vendor_id]").forEach(e=>{e.checked=!0}),i()}),Se("click","#cmplz-tcf-deselectall",function(){for(const t in e)if(e.hasOwnProperty(t)){const s=e[t];r.vendorConsents.unset(s.id),document.querySelector("#cmplz-tcf-"+s.id).checked=!1}c(!0)});const h=new CustomEvent("cmplz_vendor_container_loaded",{detail:complianz.region});document.dispatchEvent(h)}(r.gvl.vendors),"optin"===complianz.consenttype){cmplz_tcf.debug&&console.log(r);const e=new Date;Date.parse(r.created)<e.getTime()-31536e6?I(null,_()):I(r,_())}else cmplz_tcf.debug&&console.log("not an optin tcf region"),I(null,!1)}),Promise.all([Le,Ee,be]).then(()=>{!function(){if(!b(complianz.region))return;if("optin"===complianz.consenttype){const e=E("marketing",!1),t=E("statistics",!1),s=w(w(ie.purposes,cmplz_tcf.purposes),e),n=w(w(ie.purposes,cmplz_tcf.purposes),t),r=w(ie.features,cmplz_tcf.features),o=w(ie.specialPurposes,cmplz_tcf.specialPurposes),i=w(ie.specialFeatures,cmplz_tcf.specialFeatures);0===r.length&&(document.querySelector(".cmplz-tcf .cmplz-features").style.display="none"),0===o.length&&(document.querySelector(".cmplz-tcf .cmplz-specialpurposes").style.display="none"),0===i.length&&(document.querySelector(".cmplz-tcf .cmplz-specialfeatures").style.display="none"),0===n.length&&(document.querySelector(".cmplz-tcf .cmplz-statistics").style.display="none"),document.querySelector(".cmplz-tcf .cmplz-statistics .cmplz-description").innerHTML=z(n),document.querySelector(".cmplz-tcf .cmplz-marketing .cmplz-description").innerHTML=z(s),document.querySelector(".cmplz-tcf .cmplz-features .cmplz-description").innerHTML=z(r),document.querySelector(".cmplz-tcf .cmplz-specialfeatures .cmplz-title").innerHTML=z(i),document.querySelector(".cmplz-tcf .cmplz-specialpurposes .cmplz-title").innerHTML=z(o)}const e=document.querySelectorAll(".cmplz-manage-vendors.tcf");if(e){let t="optin"===complianz.consenttype?r.gvl.vendorIds.size:"";pe&&"optin"===complianz.consenttype&&(t+=le.length),e.forEach(e=>{e.innerHTML=e.innerHTML.replace("{vendor_count}",t)})}const t=document.getElementById("cmplz-tcf-wrapper"),s=document.getElementById("cmplz-tcf-wrapper-nojavascript");t&&(t.style.display="block",s.style.display="none")}()}),Ae.then(e=>{b(complianz.region)&&c(e)}),document.addEventListener("cmplz_fire_categories",function(e){"optin"===complianz.consenttype&&cmplz_in_array("marketing",e.detail.categories)&&i()});const a=(e,t)=>{const s=h(e);t.forEach(e=>{s.includes(e.id)&&(e.consent=1)});const n=new Set(Object.values(r.gvl.vendors).map(e=>e.name));return t.filter(e=>!n.has(e.name))},l=e=>{le.forEach(t=>{parseInt(t.id)===e&&(t.consent=0)})},p=()=>{le.forEach(e=>{e.consent=0})},d=()=>{le.forEach(e=>{e.consent=1})},u=e=>{le.forEach(t=>{parseInt(t.id)===e&&(t.consent=1)})},h=e=>e&&0!==e.length?e.split("~")[1].split(".").map(e=>parseInt(e)):[];function m(e,t){if("purpose_consent"===e){r.purposeConsents.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].purposes.includes(t)&&!s.purposes.includes(t)&&r.gvl.vendors[s.id].purposes.push(t)}}if("purpose_legitimate_interest"===e){r.purposeLegitimateInterests.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].purposes.includes(t)&&!s.purposes.includes(t)&&r.gvl.vendors[s.id].purposes.push(t)}}if("specialfeature"===e){r.specialFeatureOptins.set(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].specialFeatures.includes(t)&&!s.specialFeatures.includes(t)&&r.gvl.vendors[s.id].specialFeatures.push(t)}}if("feature"===e)for(const e in r.gvl.vendors){const s=r.gvl.vendors[e];n.vendors[s.id].features.includes(t)&&!s.features.includes(t)&&r.gvl.vendors[s.id].features.push(t)}}function g(e,t){if("purpose_consent"===e){r.purposeConsents.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.purposes.indexOf(t);n>-1&&r.gvl.vendors[s.id].purposes.splice(n,1)}}if("purpose_legitimate_interest"===e){r.purposeLegitimateInterests.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.legIntPurposes.indexOf(t);n>-1&&r.gvl.vendors[s.id].legIntPurposes.splice(n,1)}}if("specialfeature"===e){r.specialFeatureOptins.unset(t);for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.specialFeatures.indexOf(t);n>-1&&r.gvl.vendors[s.id].specialFeatures.splice(n,1)}}if("feature"===e)for(const e in r.gvl.vendors){const s=r.gvl.vendors[e],n=s.features.indexOf(t);n>-1&&r.gvl.vendors[s.id].features.splice(n,1)}}function f(e,t,s,n,o){const{name:i,description:c,id:a,illustrations:l}=t,p=l&&l.hasOwnProperty(0)?l[0]:"",d=function(e,t,s){const n=[];for(const e in t)for(const r in s)if(t[e].purposes.includes(s[""+r])){n.push(t[e].id);break}return n}(0,r.gvl.vendors,[a]).length,u=c.split("*").join(", "),h=document.getElementById("cmplz-tcf-type-template").innerHTML.replace(/{type_name}/g,i).replace(/{type_count}/g,d).replace(/{type_description}/g,u).replace(/{type_id}/g,a).replace(/{type_example}/g,p).replace(/{type}/g,e),m=document.createElement("div");m.innerHTML=h;const g=m.firstChild,f=g.querySelector(`.cmplz-tcf-${e}-input`);f.checked=n,f.disabled=o,f.setAttribute(`data-${e}_id`,a),s.appendChild(g)}function v(e,t,s){let n,o=e;!1!==s&&(o=s+"-"+o,n=E(s,!1));const i=document.getElementById("cmplz-tcf-"+o+"s-container");if(null!==i){i.innerHTML="";for(const o in t)if(t.hasOwnProperty(o)){const c=t[o];if(!s||n.includes(c.id)){let t=!1,s=!1;"purpose_consent"===e&&(t=r.purposeConsents.has(c.id)),"purpose_legitimate_interest"===e&&(t=r.purposeLegitimateInterests.has(c.id)),"specialfeature"===e&&(t=r.specialFeatureOptins.has(c.id)),"feature"!==e&&"specialpurpose"!==e||(t=s=!0),f(e,c,i,t,s)}}Se("click",".cmplz-tcf-"+e+"-input",function(t){const s=t.target,n=parseInt(s.getAttribute("data-"+e+"_id")),o=s.checked;document.querySelectorAll("[data-"+e+'_id="'+n+'"]').forEach(e=>{e.checked=o}),"purpose_consent"===e&&r.purposeConsents[o?"set":"unset"](n),"purpose_legitimate_interest"===e&&r.purposeLegitimateInterests[o?"set":"unset"](n),"specialfeature"===e&&r.specialFeatureOptins[o?"set":"unset"](n),o?m(e,n):g(e,n),function(){for(const e in r.gvl.vendors){const t=r.gvl.vendors[e];0===t.legIntPurposes.length&&0===t.specialPurposes.length&&r.vendorLegitimateInterests.unset(t.id),0===t.legIntPurposes.length&&0===t.purposes.length&&0===t.flexiblePurposes.length&&0===t.specialFeatures.length&&0!==t.specialPurposes.length&&r.vendorLegitimateInterests.set(t.id)}}(),I(r,!0),cmplz_set_cookie("banner-status","dismissed")}),Se("click",".cmplz-tcf-toggle",function(e){const t=e.target;e.preventDefault();const s=t.closest("label").querySelector(".cmplz-tcf-type-description");Ie(s)?(t.classList.add("cmplz-tcf-rl"),t.classList.remove("cmplz-tcf-rm"),s.style.display="block"):(t.classList.add("cmplz-tcf-rm"),t.classList.remove("cmplz-tcf-rl"),s.style.display="none")})}}function _(){let e=!0;"dismissed"===ye("banner-status")&&(e=!1);const t=null!==document.getElementById("cmplz-tcf-vendor-container");return e||t}function y(e,t,s){const n=[];for(const r of Object.values(t)){const t=r[e];Object.values(t).every(e=>s.includes(e))&&n.push(r.id)}return n}function S(){const e=ye("policy_id");return(!e||"undefined"!=typeof complianz&&complianz.current_policy_id!==e)&&localStorage.cmplz_tcf_consent&&localStorage.removeItem("cmplz_tcf_consent"),window.localStorage.getItem("cmplz_tcf_consent")}function I(e,t){!function(){if(0===le.length||void 0===le[0].consent)return;let e="1~";const t=le.filter(e=>1===e.consent);0!==t.length?(e+=t.map(e=>e.id).join("."),window.localStorage.setItem("cmplz_ac_string",e)):localStorage.cmplz_ac_string&&localStorage.removeItem("cmplz_ac_string")}();let s=null;e&&(e.created=C(e.lastUpdated),e.lastUpdated=C(e.lastUpdated),e.vendorsDisclosed||(e.vendorsDisclosed=new Set),void 0===e.useNonStandardStacks&&(e.useNonStandardStacks=!1),void 0===e.useNonStandardTexts&&(e.useNonStandardTexts=!1),void 0===e.purposeOneTreatment&&(e.purposeOneTreatment=!1),s=$.encode(e)),o.update(s,t),window.localStorage.setItem("cmplz_tcf_consent",s)}function C(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function E(e,t){return"functional"===e||"preferences"===e?[]:"marketing"===e?t?[1,2,3,4,5,6,7,8,9,10,11]:[1,2,3,4,5,6,10,11]:"statistics"===e?[1,7,8,9]:[]}function b(e){return!!cmplz_in_array(e,complianz.tcf_regions)}function L(e,t){if(!e.dataRetention)return'<div class="cmplz-data-retention"><strong>'+cmplz_tcf.retention_string+":</strong> "+cmplz_tcf.undeclared_string+"</div>";const s=e.dataRetention.stdRetention||cmplz_tcf.undeclared_string;let n='<div class="cmplz-data-retention">';if(n+="<strong>"+cmplz_tcf.retention_string+":</strong> ",s===cmplz_tcf.undeclared_string?n+=s:n+=s+" "+cmplz_tcf.days_string,e.dataRetention.purposes&&Object.keys(e.dataRetention.purposes).length>0){n+="<br><strong>"+cmplz_tcf.purpose_retention_string+":</strong>",n+='<ul class="cmplz-retention-list">';for(const[s,r]of Object.entries(e.dataRetention.purposes)){const e=t.find(e=>e.id===parseInt(s));e&&(n+="<li>"+e.name+": "+r+" "+cmplz_tcf.days_string+"</li>")}n+="</ul>"}return n+="</div>",n}function A(e,t){if(!e.dataDeclaration||0===e.dataDeclaration.length)return cmplz_tcf.undeclared_string;const s=[];for(const n in e.dataDeclaration)if(e.dataDeclaration.hasOwnProperty(n)){const r=e.dataDeclaration[n];for(const e in t)if(t.hasOwnProperty(e)&&t[e].id===r){s.push(t[e].name);break}}return s.length>0?s.join(", "):cmplz_tcf.undeclared_string}function w(e,t){const s=[];for(const n in e)(t.includes(""+e[n].id)||t.includes(e[n].id))&&s.push(e[n]);return s}function z(e){let t="";const s=e.length-1;for(const n in e)e.hasOwnProperty(n)&&(t+=e[n].name,t+=n<s?", ":".");return t}Se("click",".cmplz-manage-consent",function(){const e=S();o.update(e,!0)})});let Te;const Ve=new Promise(function(e){Te=e}),Oe=cmplz_tcf.cmp_url+"cmp/vendorlist/lspa.json";let Pe;Ce.then(()=>{"optout"===complianz.consenttype||de?(fetch(Oe,{method:"GET"}).then(e=>e.json()).then(function(e){Pe=e,Te()}),cmplz_tcf.ccpa_applies?(cmplz_set_cookie("usprivacy","1YN"+cmplz_tcf.lspact,!1),document.addEventListener("cmplz_fire_categories",function(e){let t="1YY"+cmplz_tcf.lspact;cmplz_in_array("marketing",e.detail.categories)&&(t="1YN"+cmplz_tcf.lspact),cmplz_set_cookie("usprivacy",t,!1)})):cmplz_set_cookie("usprivacy","1---"+cmplz_tcf.lspact,!1),Ve.then(()=>{const e=Pe.signatories,t=document.getElementById("cmplz-tcf-us-vendor-container");if(null===t)return;t.innerHTML="";const s=document.getElementById("cmplz-tcf-vendor-template").innerHTML;for(const n in e)if(e.hasOwnProperty(n)){let r=s;const o=e[n];r=r.replace(/{vendor_name}/g,o.signatoryLegalName);let i=!0;-1===o.optoutUrl.indexOf("http")?(i=!1,r=r.replace(/{optout_string}/g,o.optoutUrl)):r=r.replace(/{optout_url}/g,o.optoutUrl);const c=document.createElement("div");c.innerHTML=r;const a=c.firstChild;i?(a.querySelector(".cmplz-tcf-optout-string").style.display="none",a.querySelector(".cmplz-tcf-optout-url").style.display="block"):(a.querySelector(".cmplz-tcf-optout-string").style.display="block",a.querySelector(".cmplz-tcf-optout-url").style.display="none"),document.createDocumentFragment().appendChild(a),t.appendChild(a)}document.querySelector("#cmplz-tcf-wrapper").style.display="block",document.querySelector("#cmplz-tcf-wrapper-nojavascript").style.display="none"})):cmplz_tcf.debug&&console.log("not an optout tcf region or page")}),document.addEventListener("cmplz_dnsmpi_submit",function(){cmplz_tcf.debug&&console.log("fire data deletion request for TCF"),__uspapi("performDeletion",1)})})();