CVE-2022-39357 (JavaScript, published 2022-10-26T15:15Z)
Description: value: Winter is a free, open-source content management system based on the Laravel PHP framework. The Snowboard framework in versions 1.1.8, 1.1.9, and 1.2.0 is vulnerable to prototype pollution in the main Snowboard class as well as its plugin loader. The 1.0 branch of Winter is not affected, as it does not contain the Snowboard framework. This issue has been patched in v1.1.10 and v1.2.1. As a workaround, one may avoid this issue by following some common security practices for JavaScript, including implementing a content security policy and auditing scripts.
Severity: nan (CVSS v3 base score: 9.8)
Weakness: CWE-1321 \u2014 Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.
Repository: https://github.com/wintercms/winter
Files changed:
modules/system/.eslintrc.json
modules/system/assets/js/build/system.js
modules/system/assets/js/snowboard/build/snowboard.base.debug.js
modules/system/assets/js/snowboard/build/snowboard.base.js
modules/system/assets/js/snowboard/build/snowboard.extras.js
modules/system/assets/js/snowboard/build/snowboard.request.js
modules/system/assets/js/snowboard/main/InnerProxyHandler.js
modules/system/assets/js/snowboard/main/PluginLoader.js
modules/system/assets/js/snowboard/main/ProxyHandler.js
modules/system/assets/js/snowboard/main/Snowboard.js
modules/system/assets/js/snowboard/snowboard.base.debug.js
modules/system/assets/js/snowboard/snowboard.base.js
modules/system/tests/js/cases/snowboard/main/PluginLoader.test.js
modules/system/tests/js/cases/snowboard/main/Snowboard.test.js
modules/system/tests/js/fixtures/framework/TestPlugin.js
modules/system/tests/js/fixtures/framework/TestSingleton.js
modules/system/tests/js/fixtures/framework/TestSingletonWithDependency.js
Commit message: Harden Snowboard (#687)

- The Snowboard and PluginLoader objects are now frozen and cannot be modified.
- Added a Proxy in front of Snowboard to handle plugin loading
- Plugin "Snowboard" instances are blocked from running certain methods
- Update tests to check hardening

Vulnerable code:
    }
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[290,450,988],{2026:function(t,e,n){"use strict";n(9529);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Request plugin.");class o extends Snowboard.PluginBase{construct(t,e,n){if("string"==typeof t){const e=document.querySelector(t);if(null===e)throw new Error(`No element was found with the given selector: ${t}`);this.element=e}else this.element=t;if(this.handler=e,this.options=n||{},this.fetchOptions={},this.responseData=null,this.responseError=null,this.cancelled=!1,this.checkRequest(),this.snowboard.globalEvent("ajaxSetup",this)){if(this.element){const t=new Event("ajaxSetup",{cancelable:!0});if(t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return void(this.cancelled=!0)}this.doClientValidation()?this.confirm?this.doConfirm().then((t=>{t&&this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)}))})):this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.handler.match(/^(?:\w+:{2})?on*/))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const t=new Promise(((t,e)=>{this.getFetch().then((n=>{n.ok||406===n.status?n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((e=>{t(s(s({},e),{},{X_WINTER_SUCCESS:406!==n.status,X_WINTER_RESPONSE_CODE:n.status}))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((e=>{t(e)}),(t=>{e(this.renderError(`Unable to process response: ${t}`))})):n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((t=>{e(this.renderError(t.message,t.exception,t.file,t.line,t.trace))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((t=>{e(this.renderError(t))}),(t=>{e(this.renderError(`Unable to process response: ${t}`))}))}),(t=>{e(this.renderError(`Unable to retrieve a response from the server: ${t}`))}))}));if(this.snowboard.globalEvent("ajaxStart",t,this),this.element){const e=new Event("ajaxPromise");e.promise=t,this.element.dispatchEvent(e)}return t}processUpdate(t){return new Promise(((e,n)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[t]))return void n();const r={};if(Object.entries(t).forEach((t=>{const[e,n]=t;"X_WINTER"!==e.substr(0,8)&&(r[e]=n)})),0===Object.keys(r).length)return void(t.X_WINTER_ASSETS?this.processAssets(t.X_WINTER_ASSETS).then((()=>{e()}),(()=>{n()})):e());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",t,this).then((async()=>{t.X_WINTER_ASSETS&&await this.processAssets(t.X_WINTER_ASSETS),this.doUpdate(r).then((()=>{window.requestAnimationFrame((()=>e()))}),(()=>{n()}))}),(()=>{n()}))}))}doUpdate(t){return new Promise((e=>{const n=[];Object.entries(t).forEach((t=>{const[e,r]=t;let s=this.options.update&&this.options.update[e]?this.options.update[e]:e,i="replace";"@"===s.substr(0,1)?(i="append",s=s.substr(1)):"^"===s.substr(0,1)?(i="prepend",s=s.substr(1)):"#"!==s.substr(0,1)&&"."!==s.substr(0,1)&&(i="noop");const o=document.querySelectorAll(s);o.length>0&&o.forEach((t=>{switch(i){case"append":t.innerHTML+=r;break;case"prepend":t.innerHTML=r+t.innerHTML;break;case"noop":break;default:t.innerHTML=r}n.push(t),this.snowboard.globalEvent("ajaxUpdate",t,r,this);const e=new Event("ajaxUpdate");e.content=r,t.dispatchEvent(e)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",n,this),e()}))}processResponse(t){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const t=new Event("ajaxDone",{cancelable:!0});if(t.responseData=this.responseData,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}this.flash&&t.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(t.X_WINTER_FLASH_MESSAGES),this.redirect||t.X_WINTER_REDIRECT?this.processRedirect(this.redirect||t.X_WINTER_REDIRECT):this.complete()}}processError(t){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const t=new Event("ajaxFail",{cancelable:!0});if(t.responseError=this.responseError,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}t instanceof Error?this.processErrorMessage(t.message):(t.X_WINTER_ERROR_FIELDS&&this.processValidationErrors(t.X_WINTER_ERROR_FIELDS),t.X_WINTER_ERROR_MESSAGE&&this.processErrorMessage(t.X_WINTER_ERROR_MESSAGE)),this.complete()}}processRedirect(t){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxRedirect",t,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const t=document.createEvent("CustomEvent");t.eventName="ajaxRedirected",this.element.dispatchEvent(t)}}),{once:!0}),window.location.assign(t))}processErrorMessage(t){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",t,this)&&window.alert(t)}processFlashMessages(t){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[t])||this.snowboard.globalEvent("ajaxFlashMessages",t,this)}processValidationErrors(t){"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,t])||this.snowboard.globalEvent("ajaxValidationErrors",this.form,t,this)}processAssets(t){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",t)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const t=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await t)return!0}catch(t){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const t=new Event("ajaxAlways");t.request=this,t.responseData=this.responseData,t.responseError=this.responseError,this.element.dispatchEvent(t)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const t={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(t["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(t["X-XSRF-TOKEN"]=this.xsrfToken),t}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const t="object"==typeof this.options.data?this.options.data:{},e=new FormData(this.form||void 0);return Object.keys(t).length>0&&Object.entries(t).forEach((t=>{const[n,r]=t;e.append(n,r)})),e}get confirm(){return this.options.confirm||!1}extractPartials(t){return Object.keys(t).join("&")}renderError(t,e,n,r,s){const i=new Error(t);return i.exception=e||null,i.file=n||null,i.line=r||null,i.trace=s||[],i}}Snowboard.addPlugin("request",o)},8809:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends window.Snowboard.Singleton{listens(){return{ajaxLoadAssets:"load"}}async load(t){if(t.js&&t.js.length>0)for(const e of t.js)try{await this.loadScript(e)}catch(t){return Promise.reject(t)}if(t.css&&t.css.length>0)for(const e of t.css)try{await this.loadStyle(e)}catch(t){return Promise.reject(t)}if(t.img&&t.img.length>0)for(const e of t.img)try{await this.loadImage(e)}catch(t){return Promise.reject(t)}return Promise.resolve()}loadScript(t){return new Promise(((e,n)=>{if(document.querySelector(`script[src="${t}"]`))return void e();const r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",t,r),n(new Error(`Unable to load script file: "${t}"`))})),document.body.append(r)}))}loadStyle(t){return new Promise(((e,n)=>{if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e();const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("href",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",t,r),n(new Error(`Unable to load stylesheet file: "${t}"`))})),document.head.append(r)}))}loadImage(t){return new Promise(((e,n)=>{const r=new Image;r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",t,r),n(new Error(`Unable to load image file: "${t}"`))})),r.src=t}))}}},9553:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.add(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.add(this.getLoadingClass(e.element))}ajaxDone(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.remove(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.remove(this.getLoadingClass(e.element))}getLoadingClass(t){return void 0!==t.dataset.attachLoading&&""!==t.dataset.attachLoading?t.dataset.attachLoading:"wn-loading"}}},5763:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(9529);class r extends Snowboard.PluginBase{construct(t,e){if(t instanceof Snowboard.PluginBase==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(e instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=t,this.element=e,this.refresh()}get(t){return void 0===t?this.instanceConfig:void 0!==this.instanceConfig[t]?this.instanceConfig[t]:void 0}set(t,e,n){if(void 0===t)throw new Error("You must provide a configuration key to set");this.instanceConfig[t]=e,!0===n&&(this.element.dataset[t]=e)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const t=this.getDefaults();if(!1===this.acceptedConfigs)return t;for(const e in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(e))&&(t[e]=this.coerceValue(this.element.dataset[e]));return t}coerceValue(t){const e=String(t);if("null"===e)return null;if("undefined"!==e){if(e.startsWith("base64:")){const t=e.replace(/^base64:/,""),n=atob(t);return this.coerceValue(n)}if(["true","yes"].includes(e.toLowerCase()))return!0;if(["false","no"].includes(e.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(e))return Number(e);try{return this.snowboard.jsonParser().parse(e)}catch(t){return""===e||e}}}}},2270:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n){if(this.message=t,this.type=e||"default",this.duration=Number(n||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((t=>t.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},6277:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(t){this.show(),t.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const t=this.stripe.cloneNode(!0);this.indicator.appendChild(t),this.stripe.remove(),this.stripe=t,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(t){this.counter-=1,!0===t&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},8032:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{listens(){return{ready:"ready"}}ready(){let t=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((e=>{e.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(t=!0)})),!t){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(t)}}}},8269:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n,r,s){if(t instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=t,"string"!=typeof e)throw new Error("Transition name must be specified as a string");if(this.transition=e,n&&"function"!=typeof n)throw new Error("Callback must be a valid function");this.callback=n,this.duration=r?this.parseDuration(r):null,this.trailTo=!0===s,this.doTransition()}eventClasses(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r={in:`${this.transition}-in`,active:`${this.transition}-active`,out:`${this.transition}-out`};if(0===e.length)return Object.values(r);const s=[];return Object.entries(r).forEach((t=>{const[n,r]=t;-1!==e.indexOf(n)&&s.push(r)})),s}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((t=>{this.element.classList.add(t)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((t=>{this.element.classList.remove(t)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((t=>{this.element.classList.remove(t)}))}parseDuration(t){const e=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(t),n=Number(e[1]);return"sec"===("s"===e[3]?"sec":"msec")?1e3*n+"ms":`${Math.floor(n)}ms`}}},1705:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});n(9529);class r{constructor(t){this.snowboard=t}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}class s extends r{}class i{constructor(t,e,n){this.name=t,this.snowboard=e,this.instance=n,this.instances=[],this.singleton=n.prototype instanceof s,this.initialised=n.prototype instanceof r,this.mocks={},this.originalFunctions={}}hasMethod(t){return!this.isFunction()&&"function"==typeof this.instance.prototype[t]}callMethod(){if(this.isFunction())return null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e,s=r.shift();return this.instance.prototype[s](r)}getInstance(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(this.isFunction())return this.instance(...n);if(!this.dependenciesFulfilled()){const t=this.getDependencies().filter((t=>!this.snowboard.getPluginNames().includes(t)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${t.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instances[0][e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instances[0][n]=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return r(t,...n)}}))),this.instances[0];Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instance.prototype[e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instance.prototype[n]=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return r(t,...n)}})));const s=new this.instance(this.snowboard,...n);return s.detach=()=>this.instances.splice(this.instances.indexOf(s),1),s.construct(...n),this.instances.push(s),s}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof r==!1}isSingleton(){return this.instance.prototype instanceof s==!0}isInitialised(){return this.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=new this.instance(this.snowboard,...e);r.detach=()=>this.instances.splice(this.instances.indexOf(r),1),r.construct(...e),this.instances.push(r),this.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((t=>t.toLowerCase()))}dependenciesFulfilled(){const t=this.getDependencies();let e=!0;return t.forEach((t=>{this.snowboard.hasPlugin(t)||(e=!1)})),e}mock(t,e){var n=this;if(!this.isFunction()){if(!this.instance.prototype[t])throw new Error(`Function "${t}" does not exist and cannot be mocked`);this.mocks[t]=e,this.originalFunctions[t]=this.instance.prototype[t],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][t]=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return e(n,...r)})}}unmock(t){this.isFunction()||this.mocks[t]&&(this.isSingleton()&&(this.instances[0][t]=this.originalFunctions[t]),delete this.mocks[t],delete this.originalFunctions[t])}}var o=n(26);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class h extends s{construct(){this.defaults={expires:null,path:"/",domain:null,secure:!1,sameSite:"Lax"}}setDefaults(t){if("object"!=typeof t)throw new Error("Cookie defaults must be provided as an object");Object.entries(t).forEach((t=>{const[e,n]=t;void 0!==this.defaults[e]&&(this.defaults[e]=n)}))}getDefaults(){const t={};return Object.entries(this.defaults).forEach((e=>{const[n,r]=e;null!==this.defaults[n]&&(t[n]=r)})),t}get(t){if(void 0===t){const t=o.Z.get();return Object.entries(t).forEach((e=>{const[n,r]=e;this.snowboard.globalEvent("cookie.get",n,r,(e=>{t[n]=e}))})),t}let e=o.Z.get(t);return this.snowboard.globalEvent("cookie.get",t,e,(t=>{e=t})),e}set(t,e,n){let r=e;return this.snowboard.globalEvent("cookie.set",t,e,(t=>{r=t})),o.Z.set(t,r,l(l({},this.getDefaults()),n))}remove(t,e){o.Z.remove(t,l(l({},this.getDefaults()),e))}}class u extends s{construct(){window.wnJSON=t=>this.parse(t),window.ocJSON=window.wnJSON}parse(t){const e=this.parseString(t);return JSON.parse(e)}parseString(t){let e=t.trim();if(!e.length)throw new Error("Broken JSON object.");let n="",r=null,s=null,i="";for(;e&&","===e[0];)e=e.substr(1);if('"'===e[0]||"'"===e[0]){if(e[e.length-1]!==e[0])throw new Error("Invalid string JSON object.");i='"';for(let t=1;t<e.length;t+=1)if("\\"===e[t])"'"===e[t+1]||(i+=e[t]),i+=e[t+1],t+=1;else{if(e[t]===e[0])return i+='"',i;'"'===e[t]?i+='\\"':i+=e[t]}throw new Error("Invalid string JSON object.")}if("true"===e||"false"===e)return e;if("null"===e)return"null";const o=parseFloat(e);if(!Number.isNaN(o))return o.toString();if("{"===e[0]){r="needKey",s=null,n="{";for(let t=1;t<e.length;t+=1)if(!this.isBlankChar(e[t]))if("needKey"!==r||'"'!==e[t]&&"'"!==e[t]){if("needKey"===r&&this.canBeKeyHead(e[t]))s=this.parseKey(e,t),n+='"',n+=s,n+='"',t+=s.length-1,r="afterKey";else if("afterKey"===r&&":"===e[t])n+=":",r=":";else if(":"===r)i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody";else if("afterBody"===r||"needKey"===r){let s=t;for(;","===e[s]||this.isBlankChar(e[s]);)s+=1;if("}"===e[s]&&s===e.length-1){for(;","===n[n.length-1];)n=n.substr(0,n.length-1);return n+="}",n}s!==t&&"{"!==n&&(n+=",",r="needKey",t=s-1)}}else s=this.parseKey(e,t+1,e[t]),n+=`"${s}"`,t+=s.length,t+=1,r="afterKey";throw new Error(`Broken JSON object near ${n}`)}if("["===e[0]){n="[",r="needBody";for(let t=1;t<e.length;t+=1)if(" "!==e[t]&&"\n"!==e[t]&&"\t"!==e[t])if("needBody"===r){if(","===e[t]){n+="null,";continue}if("]"===e[t]&&t===e.length-1)return","===n[n.length-1]&&(n=n.substr(0,n.length-1)),n+="]",n;i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody"}else if("afterBody"===r)if(","===e[t])for(n+=",",r="needBody";","===e[t+1]||this.isBlankChar(e[t+1]);)","===e[t+1]&&(n+="null,"),t+=1;else if("]"===e[t]&&t===e.length-1)return n+="]",n;throw new Error(`Broken JSON array near ${n}`)}return""}getBody(t,e){let n="";if('"'===t[e]||"'"===t[e]){n=t[e];for(let r=e+1;r<t.length;r+=1)if("\\"===t[r])n+=t[r],r+1<t.length&&(n+=t[r+1]),r+=1;else{if(t[r]===t[e])return n+=t[e],{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON string body near ${n}`)}if("t"===t[e]){if(t.indexOf("true",e)===e)return{originLength:"true".length,body:"true"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("f"===t[e]){if(t.indexOf("f",e)===e)return{originLength:"false".length,body:"false"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("n"===t[e]){if(t.indexOf("null",e)===e)return{originLength:"null".length,body:"null"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("-"===t[e]||"+"===t[e]||"."===t[e]||t[e]>="0"&&t[e]<="9"){n="";for(let r=e;r<t.length;r+=1){if(!("-"===t[r]||"+"===t[r]||"."===t[r]||t[r]>="0"&&t[r]<="9"))return{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===t[e]||"["===t[e]){const r=[t[e]];n=t[e];for(let s=e+1;s<t.length;s+=1){if(n+=t[s],"\\"===t[s])s+1<t.length&&(n+=t[s+1]),s+=1;else if('"'===t[s])'"'===r[r.length-1]?r.pop():"'"!==r[r.length-1]&&r.push(t[s]);else if("'"===t[s])"'"===r[r.length-1]?r.pop():'"'!==r[r.length-1]&&r.push(t[s]);else if('"'!==r[r.length-1]&&"'"!==r[r.length-1])if("{"===t[s])r.push("{");else if("}"===t[s]){if("{"!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}else if("["===t[s])r.push("[");else if("]"===t[s]){if("["!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}if(!r.length)return{originLength:s-e,body:n}}throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`)}throw new Error(`Broken JSON body near ${t.substr(e-5>=0?e-5:0,50)}`)}parseKey(t,e,n){let r="";for(let s=e;s<t.length;s+=1){if(n&&n===t[s])return r;if(!n&&(" "===t[s]||":"===t[s]))return r;r+=t[s],"\\"===t[s]&&s+1<t.length&&(r+=t[s+1],s+=1)}throw new Error(`Broken JSON syntax near ${r}`)}canBeKeyHead(t){return"\\"!==t[0]&&(t[0]>="a"&&t[0]<="z"||t[0]>="A"&&t[0]<="Z"||"_"===t[0]||(t[0]>="0"&&t[0]<="9"||("$"===t[0]||t.charCodeAt(0)>255)))}isBlankChar(t){return" "===t||"\n"===t||"\t"===t}}class d extends s{construct(){window.wnSanitize=t=>this.sanitize(t),window.ocSanitize=window.wnSanitize}sanitize(t,e){const n=(new DOMParser).parseFromString(t,"text/html"),r=void 0===e||"boolean"!=typeof e||e;return this.sanitizeNode(n.getRootNode()),r?n.body.innerHTML:n.innerHTML}sanitizeNode(t){if("SCRIPT"===t.tagName)return void t.remove();this.trimAttributes(t);Array.from(t.children).forEach((t=>{this.sanitizeNode(t)}))}trimAttributes(t){if(t.attributes)for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes.item(e).name,r=t.attributes.item(e).value;0!==n.indexOf("on")&&0!==r.indexOf("javascript:")||t.removeAttribute(n)}}}class f extends s{construct(){this.foundBaseUrl=null,this.baseUrl()}to(t){if(t.match(/[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i))return t;const e=t.replace(/^\/+/,"");return`${this.baseUrl()}${e}`}baseUrl(){if(null!==this.foundBaseUrl)return this.foundBaseUrl;if(null!==document.querySelector('script[data-module="snowboard-base"]'))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl),this.foundBaseUrl;if(null!==document.querySelector("base"))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector("base").getAttribute("href")),this.foundBaseUrl;const t=[window.location.protocol,"//",window.location.host,"/"];return this.foundBaseUrl=t.join(""),this.foundBaseUrl}validateBaseUrl(t){const e=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i.exec(t),n=e[2],r=e[4];if(n&&-1===["http","https"].indexOf(n.toLowerCase()))throw new Error("Invalid base URL detected");if(!r)throw new Error("Invalid base URL detected");return"/"===t.substr(-1)?t:`${t}/`}}class p{constructor(t,e){this.debugEnabled="boolean"==typeof e&&!0===e,this.autoInitSingletons="boolean"==typeof t&&!1===t,this.plugins={},this.listeners={},this.foundBaseUrl=null,this.domReady=!1,this.attachAbstracts(),this.loadUtilities(),this.initialise(),this.debug("Snowboard framework initialised")}attachAbstracts(){this.PluginBase=r,this.Singleton=s}loadUtilities(){this.addPlugin("cookie",h),this.addPlugin("jsonParser",u),this.addPlugin("sanitizer",d),this.addPlugin("url",f)}initialise(){window.addEventListener("DOMContentLoaded",(()=>{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.domReady=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((t=>{t.isSingleton()&&t.dependenciesFulfilled()&&t.initialiseSingleton()}))}addPlugin(t,e){var n=this;const s=t.toLowerCase();if(this.hasPlugin(s))throw new Error(`A plugin called "${t}" is already registered.`);if("function"!=typeof e&&e instanceof r==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[t]||void 0!==this[s])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[s]=new i(s,this,e);const o=function(){return n.plugins[s].getInstance(...arguments)};this[t]=o,this[s]=o,this.debug(`Plugin "${t}" registered`),Object.values(this.getPlugins()).forEach((t=>{if(t.isSingleton()&&!t.isInitialised()&&t.dependenciesFulfilled()&&t.hasMethod("listens")&&Object.keys(t.callMethod("listens")).includes("ready")&&this.domReady){const e=t.callMethod("listens").ready;t.callMethod(e)}}))}removePlugin(t){const e=t.toLowerCase();this.hasPlugin(e)?(this.plugins[e].getInstances().forEach((t=>{t.destruct()})),delete this.plugins[e],delete this[e],delete this[t],this.debug(`Plugin "${t}" removed`)):this.debug(`Plugin "${t}" already removed`)}hasPlugin(t){const e=t.toLowerCase();return void 0!==this.plugins[e]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(t){if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(t){const e=[];return Object.entries(this.plugins).forEach((n=>{const[r,s]=n;if(s.isFunction())return;if(!s.dependenciesFulfilled())return;if(!s.hasMethod("listens"))return;"string"==typeof s.callMethod("listens")[t]&&e.push(r)})),e}ready(t){this.domReady&&t(),this.on("ready",t)}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){if(!this.listeners[t])return;const n=this.listeners[t].indexOf(e);-1!==n&&this.listeners[t].splice(n,1)}globalEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global event "${t}"`,...n);const s=this.listensToEvent(t);if(0===s.length)return this.debug(`No listeners found for global event "${t}"`),!0;this.debug(`Listeners found for global event "${t}": ${s.join(", ")}`);let i=!1;return s.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const s=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!i){if(!r[s])throw new Error(`Missing "${s}" method in "${e}" plugin`);try{!1===r[s](...n)&&(i=!0,this.debug(`Global event "${t}" cancelled by "${e}" plugin`))}catch(n){this.error(`Error thrown in "${t}" event by "${e}" plugin.`,n)}}}))})),!i&&this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global event "${t}"`),this.listeners[t].forEach((e=>{if(!i)try{!1===e(...n)&&(i=!0,this.debug(`Global event "${t} cancelled by an ad-hoc listener.`))}catch(e){this.error(`Error thrown in "${t}" event by an ad-hoc listener.`,e)}}))),!i}globalPromiseEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global promise event "${t}"`);const s=this.listensToEvent(t);if(0===s.length)return this.debug(`No listeners found for global promise event "${t}"`),Promise.resolve();this.debug(`Listeners found for global promise event "${t}": ${s.join(", ")}`);const i=[];return s.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const s=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!r[s])throw new Error(`Missing "${s}" method in "${e}" plugin`);try{const t=r[s](...n);if(t instanceof Promise==!1)return;i.push(t)}catch(n){this.error(`Error thrown in "${t}" promise event by "${e}" plugin.`,n)}}))})),this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global promise event "${t}"`),this.listeners[t].forEach((e=>{try{const t=e(...n);if(t instanceof Promise==!1)return;i.push(t)}catch(e){this.error(`Error thrown in "${t}" promise event by an ad-hoc listener.`,e)}}))),0===i.length?Promise.resolve():Promise.all(i)}logMessage(t,e,n){console.groupCollapsed("%c[Snowboard]",`color: ${t}; font-weight: ${e?"bold":"normal"};`,n);for(var r=arguments.length,s=new Array(r>3?r-3:0),i=3;i<r;i++)s[i-3]=arguments[i];if(s.length){console.groupCollapsed(`%cParameters %c(${s.length})`,"color: rgb(45, 167, 199); font-weight: bold;","color: rgb(88, 88, 88); font-weight: normal;");let t=0;s.forEach((e=>{t+=1,console.log(`%c${t}:`,"color: rgb(88, 88, 88); font-weight: normal;",e)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}debug(t){if(this.debugEnabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}}error(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(229, 35, 35)",!0,t,...n)}}},4136:function(t,e,n){"use strict";var r=n(2270),s=n(8269),i=n(9553),o=n(6277),a=n(8032),l=n(8809),c=n(5763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(t=>{t.addPlugin("assetLoader",l.Z),t.addPlugin("dataConfig",c.Z),t.addPlugin("extrasStyles",a.Z),t.addPlugin("transition",s.Z),t.addPlugin("flash",r.Z),t.addPlugin("attachLoading",i.Z),t.addPlugin("stripeLoader",o.Z)})(window.Snowboard)},2165:function(t,e,n){"use strict";var r=n(1705);(t=>{const e=new r.Z(!0,!0);t.snowboard=e,t.Snowboard=e,t.SnowBoard=e})(window)},7111:function(t,e,n){var r=n(6733),s=n(9821),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(s(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),s=n(2391),i=n(1787).f,o=r("unscopables"),a=Array.prototype;null==a[o]&&i(a,o,{configurable:!0,value:s(null)}),t.exports=function(t){a[o][t]=!0}},1176:function(t,e,n){var r=n(5052),s=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(s(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),s=n(3231),i=n(9646),o=function(t){return function(e,n,o){var a,l=r(e),c=i(l),h=s(o,c);if(t&&n!=n){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((t||h in l)&&l[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},7079:function(t,e,n){var r=n(5968),s=r({}.toString),i=r("".slice);t.exports=function(t){return i(s(t),8,-1)}},7081:function(t,e,n){var r=n(8270),s=n(4826),i=n(7933),o=n(1787);t.exports=function(t,e,n){for(var a=s(e),l=o.f,c=i.f,h=0;h<a.length;h++){var u=a[h];r(t,u)||n&&r(n,u)||l(t,u,c(e,u))}}},5762:function(t,e,n){var r=n(7400),s=n(1787),i=n(5358);t.exports=r?function(t,e,n){return s.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),s=n(1787),i=n(6039),o=n(8400);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&i(n,c,a),a.global)l?t[e]=n:o(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:s.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),s=Object.defineProperty;t.exports=function(t,e){try{s(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),s=n(5052),i=r.document,o=s(i)&&s(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,s,i=n(9859),o=n(598),a=i.process,l=i.Deno,c=a&&a.versions||l&&l.version,h=c&&c.v8;h&&(s=(r=h.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!s&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(s=+r[1]),t.exports=s},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),s=n(7933).f,i=n(5762),o=n(4768),a=n(8400),l=n(7081),c=n(6541);t.exports=function(t,e){var n,h,u,d,f,p=t.target,g=t.global,b=t.stat;if(n=g?r:b?r[p]||a(p,{}):(r[p]||{}).prototype)for(h in e){if(d=e[h],u=t.dontCallGetSet?(f=s(n,h))&&f.value:n[h],!c(g?h:p+(b?".":"#")+h,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;l(d,u)}(t.sham||u&&u.sham)&&i(d,"sham",!0),o(n,h,d,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),s=Function.prototype.call;t.exports=r?s.bind(s):function(){return s.apply(s,arguments)}},1805:function(t,e,n){var r=n(7400),s=n(8270),i=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=s(i,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&o(i,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},5968:function(t,e,n){var r=n(7188),s=Function.prototype,i=s.bind,o=s.call,a=r&&i.bind(o,o);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),s=n(6733),i=function(t){return s(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),s=n(9650);t.exports=function(t,e){var n=t[e];return s(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),s=n(2991),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(s(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),s=n(4229),i=n(2635);t.exports=!r&&!s((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),s=n(4229),i=n(7079),o=Object,a=r("".split);t.exports=s((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):o(t)}:o},8511:function(t,e,n){var r=n(5968),s=n(6733),i=n(5353),o=r(Function.toString);s(i.inspectSource)||(i.inspectSource=function(t){return o(t)}),t.exports=i.inspectSource},6407:function(t,e,n){var r,s,i,o=n(1180),a=n(9859),l=n(5968),c=n(5052),h=n(5762),u=n(8270),d=n(5353),f=n(4399),p=n(5977),g="Object already initialized",b=a.TypeError,m=a.WeakMap;if(o||d.state){var v=d.state||(d.state=new m),w=l(v.get),y=l(v.has),E=l(v.set);r=function(t,e){if(y(v,t))throw b(g);return e.facade=t,E(v,t,e),e},s=function(t){return w(v,t)||{}},i=function(t){return y(v,t)}}else{var S=f("state");p[S]=!0,r=function(t,e){if(u(t,S))throw b(g);return e.facade=t,h(t,S,e),e},s=function(t){return u(t,S)?t[S]:{}},i=function(t){return u(t,S)}}t.exports={set:r,get:s,has:i,enforce:function(t){return i(t)?s(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=s(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),s=n(6733),i=/#|\.prototype\./,o=function(t,e){var n=l[a(t)];return n==h||n!=c&&(s(e)?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},l=o.data={},c=o.NATIVE="N",h=o.POLYFILL="P";t.exports=o},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),s="object"==typeof document&&document.all,i=void 0===s&&void 0!==s;t.exports=i?function(t){return"object"==typeof t?null!==t:r(t)||t===s}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),s=n(6733),i=n(1321),o=n(6969),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return s(e)&&i(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),s=n(6733),i=n(8270),o=n(7400),a=n(1805).CONFIGURABLE,l=n(8511),c=n(6407),h=c.enforce,u=c.get,d=Object.defineProperty,f=o&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),p=String(String).split("String"),g=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(o?d(t,"name",{value:e,configurable:!0}):t.name=e),f&&n&&i(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?o&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=h(t);return i(r,"source")||(r.source=p.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return s(this)&&u(this).source||l(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,s=n(1176),i=n(219),o=n(3837),a=n(5977),l=n(3777),c=n(2635),h=n(4399),u=h("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"</"+"script>"},p=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&r?p(r):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(r);for(var n=o.length;n--;)delete g.prototype[o[n]];return g()};a[u]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=s(t),n=new d,d.prototype=null,n[u]=t):n=g(),void 0===e?n:i.f(n,e)}},219:function(t,e,n){var r=n(7400),s=n(7137),i=n(1787),o=n(1176),a=n(905),l=n(5632);e.f=r&&!s?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=l(e),c=s.length,h=0;c>h;)i.f(t,n=s[h++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),s=n(4394),i=n(7137),o=n(1176),a=n(9310),l=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";e.f=r?i?function(t,e,n){if(o(t),e=a(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var r=h(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:d in n?n.configurable:r.configurable,enumerable:u in n?n.enumerable:r.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=a(e),o(n),s)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),s=n(266),i=n(9195),o=n(5358),a=n(905),l=n(9310),c=n(8270),h=n(4394),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=l(e),h)try{return u(t,e)}catch(t){}if(c(t,e))return o(!s(i.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),s=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,s)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),s=n(8270),i=n(905),o=n(9540).indexOf,a=n(5977),l=r([].push);t.exports=function(t,e){var n,r=i(t),c=0,h=[];for(n in r)!s(a,n)&&s(r,n)&&l(h,n);for(;e.length>c;)s(r,n=e[c++])&&(~o(h,n)||l(h,n));return h}},5632:function(t,e,n){var r=n(140),s=n(3837);t.exports=Object.keys||function(t){return r(t,s)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);e.f=s?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),s=n(6733),i=n(5052),o=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&s(n=t.toString)&&!i(a=r(n,t)))return a;if(s(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&s(n=t.toString)&&!i(a=r(n,t)))return a;throw o("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),s=n(5968),i=n(8151),o=n(894),a=n(1176),l=s([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?l(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),s=TypeError;t.exports=function(t){if(r(t))throw s("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),s=n(1441),i=r("keys");t.exports=function(t){return i[t]||(i[t]=s(t))}},5353:function(t,e,n){var r=n(9859),s=n(8400),i="__core-js_shared__",o=r[i]||s(i,{});t.exports=o},3036:function(t,e,n){var r=n(4231),s=n(5353);(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),s=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!s((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),s=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?s(n+e,0):i(n,e)}},905:function(t,e,n){var r=n(9337),s=n(8885);t.exports=function(t){return r(s(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),s=Math.min;t.exports=function(t){return t>0?s(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),s=Object;t.exports=function(t){return s(r(t))}},2066:function(t,e,n){var r=n(266),s=n(5052),i=n(9395),o=n(5300),a=n(2914),l=n(95),c=TypeError,h=l("toPrimitive");t.exports=function(t,e){if(!s(t)||i(t))return t;var n,l=o(t,h);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!s(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),s=n(9395);t.exports=function(t){var e=r(t,"string");return s(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),s=0,i=Math.random(),o=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++s+i,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),s=n(4229);t.exports=r&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),s=n(6733),i=r.WeakMap;t.exports=s(i)&&/native code/.test(String(i))},95:function(t,e,n){var r=n(9859),s=n(3036),i=n(8270),o=n(1441),a=n(4860),l=n(6969),c=s("wks"),h=r.Symbol,u=h&&h.for,d=l?h:h&&h.withoutSetter||o;t.exports=function(t){if(!i(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&i(h,t)?c[t]=h[t]:c[t]=l&&u?u(e):d(e)}return c[t]}},9529:function(t,e,n){"use strict";var r=n(3103),s=n(9540).includes,i=n(4229),o=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")}},function(t){var e=function(e){return t(t.s=e)};t.O(0,[109],(function(){return e(2165),e(2026),e(4136)}));t.O()}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[450],{1705:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});n(9529);class r{constructor(t){this.snowboard=t}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}class o extends r{}class i{constructor(t,e,n){this.name=t,this.snowboard=e,this.instance=n,this.instances=[],this.singleton=n.prototype instanceof o,this.initialised=n.prototype instanceof r,this.mocks={},this.originalFunctions={}}hasMethod(t){return!this.isFunction()&&"function"==typeof this.instance.prototype[t]}callMethod(){if(this.isFunction())return null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e,o=r.shift();return this.instance.prototype[o](r)}getInstance(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(this.isFunction())return this.instance(...n);if(!this.dependenciesFulfilled()){const t=this.getDependencies().filter((t=>!this.snowboard.getPluginNames().includes(t)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${t.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instances[0][e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instances[0][n]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return r(t,...n)}}))),this.instances[0];Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instance.prototype[e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instance.prototype[n]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return r(t,...n)}})));const o=new this.instance(this.snowboard,...n);return o.detach=()=>this.instances.splice(this.instances.indexOf(o),1),o.construct(...n),this.instances.push(o),o}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof r==!1}isSingleton(){return this.instance.prototype instanceof o==!0}isInitialised(){return this.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=new this.instance(this.snowboard,...e);r.detach=()=>this.instances.splice(this.instances.indexOf(r),1),r.construct(...e),this.instances.push(r),this.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((t=>t.toLowerCase()))}dependenciesFulfilled(){const t=this.getDependencies();let e=!0;return t.forEach((t=>{this.snowboard.hasPlugin(t)||(e=!1)})),e}mock(t,e){var n=this;if(!this.isFunction()){if(!this.instance.prototype[t])throw new Error(`Function "${t}" does not exist and cannot be mocked`);this.mocks[t]=e,this.originalFunctions[t]=this.instance.prototype[t],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][t]=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e(n,...r)})}}unmock(t){this.isFunction()||this.mocks[t]&&(this.isSingleton()&&(this.instances[0][t]=this.originalFunctions[t]),delete this.mocks[t],delete this.originalFunctions[t])}}var s=n(26);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class l extends o{construct(){this.defaults={expires:null,path:"/",domain:null,secure:!1,sameSite:"Lax"}}setDefaults(t){if("object"!=typeof t)throw new Error("Cookie defaults must be provided as an object");Object.entries(t).forEach((t=>{const[e,n]=t;void 0!==this.defaults[e]&&(this.defaults[e]=n)}))}getDefaults(){const t={};return Object.entries(this.defaults).forEach((e=>{const[n,r]=e;null!==this.defaults[n]&&(t[n]=r)})),t}get(t){if(void 0===t){const t=s.Z.get();return Object.entries(t).forEach((e=>{const[n,r]=e;this.snowboard.globalEvent("cookie.get",n,r,(e=>{t[n]=e}))})),t}let e=s.Z.get(t);return this.snowboard.globalEvent("cookie.get",t,e,(t=>{e=t})),e}set(t,e,n){let r=e;return this.snowboard.globalEvent("cookie.set",t,e,(t=>{r=t})),s.Z.set(t,r,u(u({},this.getDefaults()),n))}remove(t,e){s.Z.remove(t,u(u({},this.getDefaults()),e))}}class f extends o{construct(){window.wnJSON=t=>this.parse(t),window.ocJSON=window.wnJSON}parse(t){const e=this.parseString(t);return JSON.parse(e)}parseString(t){let e=t.trim();if(!e.length)throw new Error("Broken JSON object.");let n="",r=null,o=null,i="";for(;e&&","===e[0];)e=e.substr(1);if('"'===e[0]||"'"===e[0]){if(e[e.length-1]!==e[0])throw new Error("Invalid string JSON object.");i='"';for(let t=1;t<e.length;t+=1)if("\\"===e[t])"'"===e[t+1]||(i+=e[t]),i+=e[t+1],t+=1;else{if(e[t]===e[0])return i+='"',i;'"'===e[t]?i+='\\"':i+=e[t]}throw new Error("Invalid string JSON object.")}if("true"===e||"false"===e)return e;if("null"===e)return"null";const s=parseFloat(e);if(!Number.isNaN(s))return s.toString();if("{"===e[0]){r="needKey",o=null,n="{";for(let t=1;t<e.length;t+=1)if(!this.isBlankChar(e[t]))if("needKey"!==r||'"'!==e[t]&&"'"!==e[t]){if("needKey"===r&&this.canBeKeyHead(e[t]))o=this.parseKey(e,t),n+='"',n+=o,n+='"',t+=o.length-1,r="afterKey";else if("afterKey"===r&&":"===e[t])n+=":",r=":";else if(":"===r)i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody";else if("afterBody"===r||"needKey"===r){let o=t;for(;","===e[o]||this.isBlankChar(e[o]);)o+=1;if("}"===e[o]&&o===e.length-1){for(;","===n[n.length-1];)n=n.substr(0,n.length-1);return n+="}",n}o!==t&&"{"!==n&&(n+=",",r="needKey",t=o-1)}}else o=this.parseKey(e,t+1,e[t]),n+=`"${o}"`,t+=o.length,t+=1,r="afterKey";throw new Error(`Broken JSON object near ${n}`)}if("["===e[0]){n="[",r="needBody";for(let t=1;t<e.length;t+=1)if(" "!==e[t]&&"\n"!==e[t]&&"\t"!==e[t])if("needBody"===r){if(","===e[t]){n+="null,";continue}if("]"===e[t]&&t===e.length-1)return","===n[n.length-1]&&(n=n.substr(0,n.length-1)),n+="]",n;i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody"}else if("afterBody"===r)if(","===e[t])for(n+=",",r="needBody";","===e[t+1]||this.isBlankChar(e[t+1]);)","===e[t+1]&&(n+="null,"),t+=1;else if("]"===e[t]&&t===e.length-1)return n+="]",n;throw new Error(`Broken JSON array near ${n}`)}return""}getBody(t,e){let n="";if('"'===t[e]||"'"===t[e]){n=t[e];for(let r=e+1;r<t.length;r+=1)if("\\"===t[r])n+=t[r],r+1<t.length&&(n+=t[r+1]),r+=1;else{if(t[r]===t[e])return n+=t[e],{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON string body near ${n}`)}if("t"===t[e]){if(t.indexOf("true",e)===e)return{originLength:"true".length,body:"true"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("f"===t[e]){if(t.indexOf("f",e)===e)return{originLength:"false".length,body:"false"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("n"===t[e]){if(t.indexOf("null",e)===e)return{originLength:"null".length,body:"null"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("-"===t[e]||"+"===t[e]||"."===t[e]||t[e]>="0"&&t[e]<="9"){n="";for(let r=e;r<t.length;r+=1){if(!("-"===t[r]||"+"===t[r]||"."===t[r]||t[r]>="0"&&t[r]<="9"))return{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===t[e]||"["===t[e]){const r=[t[e]];n=t[e];for(let o=e+1;o<t.length;o+=1){if(n+=t[o],"\\"===t[o])o+1<t.length&&(n+=t[o+1]),o+=1;else if('"'===t[o])'"'===r[r.length-1]?r.pop():"'"!==r[r.length-1]&&r.push(t[o]);else if("'"===t[o])"'"===r[r.length-1]?r.pop():'"'!==r[r.length-1]&&r.push(t[o]);else if('"'!==r[r.length-1]&&"'"!==r[r.length-1])if("{"===t[o])r.push("{");else if("}"===t[o]){if("{"!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}else if("["===t[o])r.push("[");else if("]"===t[o]){if("["!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}if(!r.length)return{originLength:o-e,body:n}}throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`)}throw new Error(`Broken JSON body near ${t.substr(e-5>=0?e-5:0,50)}`)}parseKey(t,e,n){let r="";for(let o=e;o<t.length;o+=1){if(n&&n===t[o])return r;if(!n&&(" "===t[o]||":"===t[o]))return r;r+=t[o],"\\"===t[o]&&o+1<t.length&&(r+=t[o+1],o+=1)}throw new Error(`Broken JSON syntax near ${r}`)}canBeKeyHead(t){return"\\"!==t[0]&&(t[0]>="a"&&t[0]<="z"||t[0]>="A"&&t[0]<="Z"||"_"===t[0]||(t[0]>="0"&&t[0]<="9"||("$"===t[0]||t.charCodeAt(0)>255)))}isBlankChar(t){return" "===t||"\n"===t||"\t"===t}}class h extends o{construct(){window.wnSanitize=t=>this.sanitize(t),window.ocSanitize=window.wnSanitize}sanitize(t,e){const n=(new DOMParser).parseFromString(t,"text/html"),r=void 0===e||"boolean"!=typeof e||e;return this.sanitizeNode(n.getRootNode()),r?n.body.innerHTML:n.innerHTML}sanitizeNode(t){if("SCRIPT"===t.tagName)return void t.remove();this.trimAttributes(t);Array.from(t.children).forEach((t=>{this.sanitizeNode(t)}))}trimAttributes(t){if(t.attributes)for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes.item(e).name,r=t.attributes.item(e).value;0!==n.indexOf("on")&&0!==r.indexOf("javascript:")||t.removeAttribute(n)}}}class d extends o{construct(){this.foundBaseUrl=null,this.baseUrl()}to(t){if(t.match(/[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i))return t;const e=t.replace(/^\/+/,"");return`${this.baseUrl()}${e}`}baseUrl(){if(null!==this.foundBaseUrl)return this.foundBaseUrl;if(null!==document.querySelector('script[data-module="snowboard-base"]'))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl),this.foundBaseUrl;if(null!==document.querySelector("base"))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector("base").getAttribute("href")),this.foundBaseUrl;const t=[window.location.protocol,"//",window.location.host,"/"];return this.foundBaseUrl=t.join(""),this.foundBaseUrl}validateBaseUrl(t){const e=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i.exec(t),n=e[2],r=e[4];if(n&&-1===["http","https"].indexOf(n.toLowerCase()))throw new Error("Invalid base URL detected");if(!r)throw new Error("Invalid base URL detected");return"/"===t.substr(-1)?t:`${t}/`}}class g{constructor(t,e){this.debugEnabled="boolean"==typeof e&&!0===e,this.autoInitSingletons="boolean"==typeof t&&!1===t,this.plugins={},this.listeners={},this.foundBaseUrl=null,this.domReady=!1,this.attachAbstracts(),this.loadUtilities(),this.initialise(),this.debug("Snowboard framework initialised")}attachAbstracts(){this.PluginBase=r,this.Singleton=o}loadUtilities(){this.addPlugin("cookie",l),this.addPlugin("jsonParser",f),this.addPlugin("sanitizer",h),this.addPlugin("url",d)}initialise(){window.addEventListener("DOMContentLoaded",(()=>{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.domReady=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((t=>{t.isSingleton()&&t.dependenciesFulfilled()&&t.initialiseSingleton()}))}addPlugin(t,e){var n=this;const o=t.toLowerCase();if(this.hasPlugin(o))throw new Error(`A plugin called "${t}" is already registered.`);if("function"!=typeof e&&e instanceof r==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[t]||void 0!==this[o])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[o]=new i(o,this,e);const s=function(){return n.plugins[o].getInstance(...arguments)};this[t]=s,this[o]=s,this.debug(`Plugin "${t}" registered`),Object.values(this.getPlugins()).forEach((t=>{if(t.isSingleton()&&!t.isInitialised()&&t.dependenciesFulfilled()&&t.hasMethod("listens")&&Object.keys(t.callMethod("listens")).includes("ready")&&this.domReady){const e=t.callMethod("listens").ready;t.callMethod(e)}}))}removePlugin(t){const e=t.toLowerCase();this.hasPlugin(e)?(this.plugins[e].getInstances().forEach((t=>{t.destruct()})),delete this.plugins[e],delete this[e],delete this[t],this.debug(`Plugin "${t}" removed`)):this.debug(`Plugin "${t}" already removed`)}hasPlugin(t){const e=t.toLowerCase();return void 0!==this.plugins[e]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(t){if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(t){const e=[];return Object.entries(this.plugins).forEach((n=>{const[r,o]=n;if(o.isFunction())return;if(!o.dependenciesFulfilled())return;if(!o.hasMethod("listens"))return;"string"==typeof o.callMethod("listens")[t]&&e.push(r)})),e}ready(t){this.domReady&&t(),this.on("ready",t)}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){if(!this.listeners[t])return;const n=this.listeners[t].indexOf(e);-1!==n&&this.listeners[t].splice(n,1)}globalEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global event "${t}"`,...n);const o=this.listensToEvent(t);if(0===o.length)return this.debug(`No listeners found for global event "${t}"`),!0;this.debug(`Listeners found for global event "${t}": ${o.join(", ")}`);let i=!1;return o.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const o=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!i){if(!r[o])throw new Error(`Missing "${o}" method in "${e}" plugin`);try{!1===r[o](...n)&&(i=!0,this.debug(`Global event "${t}" cancelled by "${e}" plugin`))}catch(n){this.error(`Error thrown in "${t}" event by "${e}" plugin.`,n)}}}))})),!i&&this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global event "${t}"`),this.listeners[t].forEach((e=>{if(!i)try{!1===e(...n)&&(i=!0,this.debug(`Global event "${t} cancelled by an ad-hoc listener.`))}catch(e){this.error(`Error thrown in "${t}" event by an ad-hoc listener.`,e)}}))),!i}globalPromiseEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global promise event "${t}"`);const o=this.listensToEvent(t);if(0===o.length)return this.debug(`No listeners found for global promise event "${t}"`),Promise.resolve();this.debug(`Listeners found for global promise event "${t}": ${o.join(", ")}`);const i=[];return o.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const o=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!r[o])throw new Error(`Missing "${o}" method in "${e}" plugin`);try{const t=r[o](...n);if(t instanceof Promise==!1)return;i.push(t)}catch(n){this.error(`Error thrown in "${t}" promise event by "${e}" plugin.`,n)}}))})),this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global promise event "${t}"`),this.listeners[t].forEach((e=>{try{const t=e(...n);if(t instanceof Promise==!1)return;i.push(t)}catch(e){this.error(`Error thrown in "${t}" promise event by an ad-hoc listener.`,e)}}))),0===i.length?Promise.resolve():Promise.all(i)}logMessage(t,e,n){console.groupCollapsed("%c[Snowboard]",`color: ${t}; font-weight: ${e?"bold":"normal"};`,n);for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];if(o.length){console.groupCollapsed(`%cParameters %c(${o.length})`,"color: rgb(45, 167, 199); font-weight: bold;","color: rgb(88, 88, 88); font-weight: normal;");let t=0;o.forEach((e=>{t+=1,console.log(`%c${t}:`,"color: rgb(88, 88, 88); font-weight: normal;",e)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}debug(t){if(this.debugEnabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}}error(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(229, 35, 35)",!0,t,...n)}}},2165:function(t,e,n){"use strict";var r=n(1705);(t=>{const e=new r.Z(!0,!0);t.snowboard=e,t.Snowboard=e,t.SnowBoard=e})(window)},7111:function(t,e,n){var r=n(6733),o=n(9821),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),o=n(2391),i=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),o=n(3231),i=n(9646),s=function(t){return function(e,n,s){var a,u=r(e),c=i(u),l=o(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},7081:function(t,e,n){var r=n(8270),o=n(4826),i=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=o(e),u=s.f,c=i.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||u(t,f,c(e,f))}}},5762:function(t,e,n){var r=n(7400),o=n(1787),i=n(5358);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),o=n(1787),i=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&i(n,c,a),a.global)u?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),o=n(5052),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,o,i=n(9859),s=n(598),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),o=n(7933).f,i=n(5762),s=n(4768),a=n(8400),u=n(7081),c=n(6541);t.exports=function(t,e){var n,l,f,h,d,g=t.target,p=t.global,b=t.stat;if(n=p?r:b?r[g]||a(g,{}):(r[g]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(d=o(n,l))&&d.value:n[l],!c(p?l:g+(b?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(t.sham||f&&f.sham)&&i(h,"sham",!0),s(n,l,h,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},1805:function(t,e,n){var r=n(7400),o=n(8270),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5968:function(t,e,n){var r=n(7188),o=Function.prototype,i=o.bind,s=o.call,a=r&&i.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),o=n(6733),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),o=n(9650);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),o=n(2991),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),o=n(4229),i=n(2635);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),o=n(4229),i=n(7079),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),o=n(6733),i=n(5353),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},6407:function(t,e,n){var r,o,i,s=n(1180),a=n(9859),u=n(5968),c=n(5052),l=n(5762),f=n(8270),h=n(5353),d=n(4399),g=n(5977),p="Object already initialized",b=a.TypeError,y=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new y),w=u(v.get),m=u(v.has),O=u(v.set);r=function(t,e){if(m(v,t))throw b(p);return e.facade=t,O(v,t,e),e},o=function(t){return w(v,t)||{}},i=function(t){return m(v,t)}}else{var S=d("state");g[S]=!0,r=function(t,e){if(f(t,S))throw b(p);return e.facade=t,l(t,S,e),e},o=function(t){return f(t,S)?t[S]:{}},i=function(t){return f(t,S)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),o=n(6733),i=/#|\.prototype\./,s=function(t,e){var n=u[a(t)];return n==l||n!=c&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),o="object"==typeof document&&document.all,i=void 0===o&&void 0!==o;t.exports=i?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),o=n(6733),i=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),o=n(6733),i=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,u=n(8511),c=n(6407),l=c.enforce,f=c.get,h=Object.defineProperty,d=s&&!r((function(){return 8!==h((function(){}),"length",{value:8}).length})),g=String(String).split("String"),p=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),d&&n&&i(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return i(r,"source")||(r.source=g.join("string"==typeof e?e:"")),t};Function.prototype.toString=p((function(){return o(this)&&f(this).source||u(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,o=n(1176),i=n(219),s=n(3837),a=n(5977),u=n(3777),c=n(2635),l=n(4399),f=l("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"</"+"script>"},g=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;p="undefined"!=typeof document?document.domain&&r?g(r):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):g(r);for(var n=s.length;n--;)delete p.prototype[s[n]];return p()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:i.f(n,e)}},219:function(t,e,n){var r=n(7400),o=n(7137),i=n(1787),s=n(1176),a=n(905),u=n(5632);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=u(e),c=o.length,l=0;c>l;)i.f(t,n=o[l++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),o=n(4394),i=n(7137),s=n(1176),a=n(9310),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:h in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),o=n(266),i=n(9195),s=n(5358),a=n(905),u=n(9310),c=n(8270),l=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=u(e),l)try{return f(t,e)}catch(t){}if(c(t,e))return s(!o(i.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),o=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),o=n(8270),i=n(905),s=n(9540).indexOf,a=n(5977),u=r([].push);t.exports=function(t,e){var n,r=i(t),c=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&u(l,n);for(;e.length>c;)o(r,n=e[c++])&&(~s(l,n)||u(l,n));return l}},5632:function(t,e,n){var r=n(140),o=n(3837);t.exports=Object.keys||function(t){return r(t,o)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),o=n(6733),i=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),o=n(5968),i=n(8151),s=n(894),a=n(1176),u=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?u(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),o=n(1441),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5353:function(t,e,n){var r=n(9859),o=n(8400),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},3036:function(t,e,n){var r=n(4231),o=n(5353);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),o=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},905:function(t,e,n){var r=n(9337),o=n(8885);t.exports=function(t){return r(o(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),o=Object;t.exports=function(t){return o(r(t))}},2066:function(t,e,n){var r=n(266),o=n(5052),i=n(9395),s=n(5300),a=n(2914),u=n(95),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,u=s(t,l);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!o(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),o=n(9395);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),o=n(4229);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),o=n(6733),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},95:function(t,e,n){var r=n(9859),o=n(3036),i=n(8270),s=n(1441),a=n(4860),u=n(6969),c=o("wks"),l=r.Symbol,f=l&&l.for,h=u?l:l&&l.withoutSetter||s;t.exports=function(t){if(!i(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&i(l,t)?c[t]=l[t]:c[t]=u&&f?f(e):h(e)}return c[t]}},9529:function(t,e,n){"use strict";var r=n(3103),o=n(9540).includes,i=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){t.O(0,[109],(function(){return e=2165,t(t.s=e);var e}));t.O()}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[243],{1705:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});n(9529);class r{constructor(t){this.snowboard=t}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}class o extends r{}class i{constructor(t,e,n){this.name=t,this.snowboard=e,this.instance=n,this.instances=[],this.singleton=n.prototype instanceof o,this.initialised=n.prototype instanceof r,this.mocks={},this.originalFunctions={}}hasMethod(t){return!this.isFunction()&&"function"==typeof this.instance.prototype[t]}callMethod(){if(this.isFunction())return null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e,o=r.shift();return this.instance.prototype[o](r)}getInstance(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(this.isFunction())return this.instance(...n);if(!this.dependenciesFulfilled()){const t=this.getDependencies().filter((t=>!this.snowboard.getPluginNames().includes(t)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${t.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instances[0][e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instances[0][n]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return r(t,...n)}}))),this.instances[0];Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instance.prototype[e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instance.prototype[n]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return r(t,...n)}})));const o=new this.instance(this.snowboard,...n);return o.detach=()=>this.instances.splice(this.instances.indexOf(o),1),o.construct(...n),this.instances.push(o),o}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof r==!1}isSingleton(){return this.instance.prototype instanceof o==!0}isInitialised(){return this.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=new this.instance(this.snowboard,...e);r.detach=()=>this.instances.splice(this.instances.indexOf(r),1),r.construct(...e),this.instances.push(r),this.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((t=>t.toLowerCase()))}dependenciesFulfilled(){const t=this.getDependencies();let e=!0;return t.forEach((t=>{this.snowboard.hasPlugin(t)||(e=!1)})),e}mock(t,e){var n=this;if(!this.isFunction()){if(!this.instance.prototype[t])throw new Error(`Function "${t}" does not exist and cannot be mocked`);this.mocks[t]=e,this.originalFunctions[t]=this.instance.prototype[t],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][t]=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];return e(n,...r)})}}unmock(t){this.isFunction()||this.mocks[t]&&(this.isSingleton()&&(this.instances[0][t]=this.originalFunctions[t]),delete this.mocks[t],delete this.originalFunctions[t])}}var s=n(26);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class l extends o{construct(){this.defaults={expires:null,path:"/",domain:null,secure:!1,sameSite:"Lax"}}setDefaults(t){if("object"!=typeof t)throw new Error("Cookie defaults must be provided as an object");Object.entries(t).forEach((t=>{const[e,n]=t;void 0!==this.defaults[e]&&(this.defaults[e]=n)}))}getDefaults(){const t={};return Object.entries(this.defaults).forEach((e=>{const[n,r]=e;null!==this.defaults[n]&&(t[n]=r)})),t}get(t){if(void 0===t){const t=s.Z.get();return Object.entries(t).forEach((e=>{const[n,r]=e;this.snowboard.globalEvent("cookie.get",n,r,(e=>{t[n]=e}))})),t}let e=s.Z.get(t);return this.snowboard.globalEvent("cookie.get",t,e,(t=>{e=t})),e}set(t,e,n){let r=e;return this.snowboard.globalEvent("cookie.set",t,e,(t=>{r=t})),s.Z.set(t,r,u(u({},this.getDefaults()),n))}remove(t,e){s.Z.remove(t,u(u({},this.getDefaults()),e))}}class f extends o{construct(){window.wnJSON=t=>this.parse(t),window.ocJSON=window.wnJSON}parse(t){const e=this.parseString(t);return JSON.parse(e)}parseString(t){let e=t.trim();if(!e.length)throw new Error("Broken JSON object.");let n="",r=null,o=null,i="";for(;e&&","===e[0];)e=e.substr(1);if('"'===e[0]||"'"===e[0]){if(e[e.length-1]!==e[0])throw new Error("Invalid string JSON object.");i='"';for(let t=1;t<e.length;t+=1)if("\\"===e[t])"'"===e[t+1]||(i+=e[t]),i+=e[t+1],t+=1;else{if(e[t]===e[0])return i+='"',i;'"'===e[t]?i+='\\"':i+=e[t]}throw new Error("Invalid string JSON object.")}if("true"===e||"false"===e)return e;if("null"===e)return"null";const s=parseFloat(e);if(!Number.isNaN(s))return s.toString();if("{"===e[0]){r="needKey",o=null,n="{";for(let t=1;t<e.length;t+=1)if(!this.isBlankChar(e[t]))if("needKey"!==r||'"'!==e[t]&&"'"!==e[t]){if("needKey"===r&&this.canBeKeyHead(e[t]))o=this.parseKey(e,t),n+='"',n+=o,n+='"',t+=o.length-1,r="afterKey";else if("afterKey"===r&&":"===e[t])n+=":",r=":";else if(":"===r)i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody";else if("afterBody"===r||"needKey"===r){let o=t;for(;","===e[o]||this.isBlankChar(e[o]);)o+=1;if("}"===e[o]&&o===e.length-1){for(;","===n[n.length-1];)n=n.substr(0,n.length-1);return n+="}",n}o!==t&&"{"!==n&&(n+=",",r="needKey",t=o-1)}}else o=this.parseKey(e,t+1,e[t]),n+=`"${o}"`,t+=o.length,t+=1,r="afterKey";throw new Error(`Broken JSON object near ${n}`)}if("["===e[0]){n="[",r="needBody";for(let t=1;t<e.length;t+=1)if(" "!==e[t]&&"\n"!==e[t]&&"\t"!==e[t])if("needBody"===r){if(","===e[t]){n+="null,";continue}if("]"===e[t]&&t===e.length-1)return","===n[n.length-1]&&(n=n.substr(0,n.length-1)),n+="]",n;i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody"}else if("afterBody"===r)if(","===e[t])for(n+=",",r="needBody";","===e[t+1]||this.isBlankChar(e[t+1]);)","===e[t+1]&&(n+="null,"),t+=1;else if("]"===e[t]&&t===e.length-1)return n+="]",n;throw new Error(`Broken JSON array near ${n}`)}return""}getBody(t,e){let n="";if('"'===t[e]||"'"===t[e]){n=t[e];for(let r=e+1;r<t.length;r+=1)if("\\"===t[r])n+=t[r],r+1<t.length&&(n+=t[r+1]),r+=1;else{if(t[r]===t[e])return n+=t[e],{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON string body near ${n}`)}if("t"===t[e]){if(t.indexOf("true",e)===e)return{originLength:"true".length,body:"true"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("f"===t[e]){if(t.indexOf("f",e)===e)return{originLength:"false".length,body:"false"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("n"===t[e]){if(t.indexOf("null",e)===e)return{originLength:"null".length,body:"null"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("-"===t[e]||"+"===t[e]||"."===t[e]||t[e]>="0"&&t[e]<="9"){n="";for(let r=e;r<t.length;r+=1){if(!("-"===t[r]||"+"===t[r]||"."===t[r]||t[r]>="0"&&t[r]<="9"))return{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===t[e]||"["===t[e]){const r=[t[e]];n=t[e];for(let o=e+1;o<t.length;o+=1){if(n+=t[o],"\\"===t[o])o+1<t.length&&(n+=t[o+1]),o+=1;else if('"'===t[o])'"'===r[r.length-1]?r.pop():"'"!==r[r.length-1]&&r.push(t[o]);else if("'"===t[o])"'"===r[r.length-1]?r.pop():'"'!==r[r.length-1]&&r.push(t[o]);else if('"'!==r[r.length-1]&&"'"!==r[r.length-1])if("{"===t[o])r.push("{");else if("}"===t[o]){if("{"!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}else if("["===t[o])r.push("[");else if("]"===t[o]){if("["!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}if(!r.length)return{originLength:o-e,body:n}}throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`)}throw new Error(`Broken JSON body near ${t.substr(e-5>=0?e-5:0,50)}`)}parseKey(t,e,n){let r="";for(let o=e;o<t.length;o+=1){if(n&&n===t[o])return r;if(!n&&(" "===t[o]||":"===t[o]))return r;r+=t[o],"\\"===t[o]&&o+1<t.length&&(r+=t[o+1],o+=1)}throw new Error(`Broken JSON syntax near ${r}`)}canBeKeyHead(t){return"\\"!==t[0]&&(t[0]>="a"&&t[0]<="z"||t[0]>="A"&&t[0]<="Z"||"_"===t[0]||(t[0]>="0"&&t[0]<="9"||("$"===t[0]||t.charCodeAt(0)>255)))}isBlankChar(t){return" "===t||"\n"===t||"\t"===t}}class h extends o{construct(){window.wnSanitize=t=>this.sanitize(t),window.ocSanitize=window.wnSanitize}sanitize(t,e){const n=(new DOMParser).parseFromString(t,"text/html"),r=void 0===e||"boolean"!=typeof e||e;return this.sanitizeNode(n.getRootNode()),r?n.body.innerHTML:n.innerHTML}sanitizeNode(t){if("SCRIPT"===t.tagName)return void t.remove();this.trimAttributes(t);Array.from(t.children).forEach((t=>{this.sanitizeNode(t)}))}trimAttributes(t){if(t.attributes)for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes.item(e).name,r=t.attributes.item(e).value;0!==n.indexOf("on")&&0!==r.indexOf("javascript:")||t.removeAttribute(n)}}}class d extends o{construct(){this.foundBaseUrl=null,this.baseUrl()}to(t){if(t.match(/[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i))return t;const e=t.replace(/^\/+/,"");return`${this.baseUrl()}${e}`}baseUrl(){if(null!==this.foundBaseUrl)return this.foundBaseUrl;if(null!==document.querySelector('script[data-module="snowboard-base"]'))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl),this.foundBaseUrl;if(null!==document.querySelector("base"))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector("base").getAttribute("href")),this.foundBaseUrl;const t=[window.location.protocol,"//",window.location.host,"/"];return this.foundBaseUrl=t.join(""),this.foundBaseUrl}validateBaseUrl(t){const e=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i.exec(t),n=e[2],r=e[4];if(n&&-1===["http","https"].indexOf(n.toLowerCase()))throw new Error("Invalid base URL detected");if(!r)throw new Error("Invalid base URL detected");return"/"===t.substr(-1)?t:`${t}/`}}class g{constructor(t,e){this.debugEnabled="boolean"==typeof e&&!0===e,this.autoInitSingletons="boolean"==typeof t&&!1===t,this.plugins={},this.listeners={},this.foundBaseUrl=null,this.domReady=!1,this.attachAbstracts(),this.loadUtilities(),this.initialise(),this.debug("Snowboard framework initialised")}attachAbstracts(){this.PluginBase=r,this.Singleton=o}loadUtilities(){this.addPlugin("cookie",l),this.addPlugin("jsonParser",f),this.addPlugin("sanitizer",h),this.addPlugin("url",d)}initialise(){window.addEventListener("DOMContentLoaded",(()=>{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.domReady=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((t=>{t.isSingleton()&&t.dependenciesFulfilled()&&t.initialiseSingleton()}))}addPlugin(t,e){var n=this;const o=t.toLowerCase();if(this.hasPlugin(o))throw new Error(`A plugin called "${t}" is already registered.`);if("function"!=typeof e&&e instanceof r==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[t]||void 0!==this[o])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[o]=new i(o,this,e);const s=function(){return n.plugins[o].getInstance(...arguments)};this[t]=s,this[o]=s,this.debug(`Plugin "${t}" registered`),Object.values(this.getPlugins()).forEach((t=>{if(t.isSingleton()&&!t.isInitialised()&&t.dependenciesFulfilled()&&t.hasMethod("listens")&&Object.keys(t.callMethod("listens")).includes("ready")&&this.domReady){const e=t.callMethod("listens").ready;t.callMethod(e)}}))}removePlugin(t){const e=t.toLowerCase();this.hasPlugin(e)?(this.plugins[e].getInstances().forEach((t=>{t.destruct()})),delete this.plugins[e],delete this[e],delete this[t],this.debug(`Plugin "${t}" removed`)):this.debug(`Plugin "${t}" already removed`)}hasPlugin(t){const e=t.toLowerCase();return void 0!==this.plugins[e]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(t){if(!this.hasPlugin(t))throw new Error(`No plugin called "${t}" has been registered.`);return this.plugins[t]}listensToEvent(t){const e=[];return Object.entries(this.plugins).forEach((n=>{const[r,o]=n;if(o.isFunction())return;if(!o.dependenciesFulfilled())return;if(!o.hasMethod("listens"))return;"string"==typeof o.callMethod("listens")[t]&&e.push(r)})),e}ready(t){this.domReady&&t(),this.on("ready",t)}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){if(!this.listeners[t])return;const n=this.listeners[t].indexOf(e);-1!==n&&this.listeners[t].splice(n,1)}globalEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global event "${t}"`,...n);const o=this.listensToEvent(t);if(0===o.length)return this.debug(`No listeners found for global event "${t}"`),!0;this.debug(`Listeners found for global event "${t}": ${o.join(", ")}`);let i=!1;return o.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const o=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!i){if(!r[o])throw new Error(`Missing "${o}" method in "${e}" plugin`);try{!1===r[o](...n)&&(i=!0,this.debug(`Global event "${t}" cancelled by "${e}" plugin`))}catch(n){this.error(`Error thrown in "${t}" event by "${e}" plugin.`,n)}}}))})),!i&&this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global event "${t}"`),this.listeners[t].forEach((e=>{if(!i)try{!1===e(...n)&&(i=!0,this.debug(`Global event "${t} cancelled by an ad-hoc listener.`))}catch(e){this.error(`Error thrown in "${t}" event by an ad-hoc listener.`,e)}}))),!i}globalPromiseEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global promise event "${t}"`);const o=this.listensToEvent(t);if(0===o.length)return this.debug(`No listeners found for global promise event "${t}"`),Promise.resolve();this.debug(`Listeners found for global promise event "${t}": ${o.join(", ")}`);const i=[];return o.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const o=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!r[o])throw new Error(`Missing "${o}" method in "${e}" plugin`);try{const t=r[o](...n);if(t instanceof Promise==!1)return;i.push(t)}catch(n){this.error(`Error thrown in "${t}" promise event by "${e}" plugin.`,n)}}))})),this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global promise event "${t}"`),this.listeners[t].forEach((e=>{try{const t=e(...n);if(t instanceof Promise==!1)return;i.push(t)}catch(e){this.error(`Error thrown in "${t}" promise event by an ad-hoc listener.`,e)}}))),0===i.length?Promise.resolve():Promise.all(i)}logMessage(t,e,n){console.groupCollapsed("%c[Snowboard]",`color: ${t}; font-weight: ${e?"bold":"normal"};`,n);for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];if(o.length){console.groupCollapsed(`%cParameters %c(${o.length})`,"color: rgb(45, 167, 199); font-weight: bold;","color: rgb(88, 88, 88); font-weight: normal;");let t=0;o.forEach((e=>{t+=1,console.log(`%c${t}:`,"color: rgb(88, 88, 88); font-weight: normal;",e)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}debug(t){if(this.debugEnabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}}error(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(229, 35, 35)",!0,t,...n)}}},6236:function(t,e,n){"use strict";var r=n(1705);(t=>{const e=new r.Z;t.snowboard=e,t.Snowboard=e,t.SnowBoard=e})(window)},7111:function(t,e,n){var r=n(6733),o=n(9821),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),o=n(2391),i=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),o=n(3231),i=n(9646),s=function(t){return function(e,n,s){var a,u=r(e),c=i(u),l=o(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},7081:function(t,e,n){var r=n(8270),o=n(4826),i=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=o(e),u=s.f,c=i.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||u(t,f,c(e,f))}}},5762:function(t,e,n){var r=n(7400),o=n(1787),i=n(5358);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),o=n(1787),i=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&i(n,c,a),a.global)u?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),o=n(5052),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,o,i=n(9859),s=n(598),a=i.process,u=i.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(o=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),o=n(7933).f,i=n(5762),s=n(4768),a=n(8400),u=n(7081),c=n(6541);t.exports=function(t,e){var n,l,f,h,d,g=t.target,p=t.global,b=t.stat;if(n=p?r:b?r[g]||a(g,{}):(r[g]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(d=o(n,l))&&d.value:n[l],!c(p?l:g+(b?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(t.sham||f&&f.sham)&&i(h,"sham",!0),s(n,l,h,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},1805:function(t,e,n){var r=n(7400),o=n(8270),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),u=a&&"something"===function(){}.name,c=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:u,CONFIGURABLE:c}},5968:function(t,e,n){var r=n(7188),o=Function.prototype,i=o.bind,s=o.call,a=r&&i.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),o=n(6733),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),o=n(9650);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),o=n(2991),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),o=n(4229),i=n(2635);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),o=n(4229),i=n(7079),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),o=n(6733),i=n(5353),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},6407:function(t,e,n){var r,o,i,s=n(1180),a=n(9859),u=n(5968),c=n(5052),l=n(5762),f=n(8270),h=n(5353),d=n(4399),g=n(5977),p="Object already initialized",b=a.TypeError,y=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new y),w=u(v.get),m=u(v.has),O=u(v.set);r=function(t,e){if(m(v,t))throw b(p);return e.facade=t,O(v,t,e),e},o=function(t){return w(v,t)||{}},i=function(t){return m(v,t)}}else{var S=d("state");g[S]=!0,r=function(t,e){if(f(t,S))throw b(p);return e.facade=t,l(t,S,e),e},o=function(t){return f(t,S)?t[S]:{}},i=function(t){return f(t,S)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),o=n(6733),i=/#|\.prototype\./,s=function(t,e){var n=u[a(t)];return n==l||n!=c&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},u=s.data={},c=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),o="object"==typeof document&&document.all,i=void 0===o&&void 0!==o;t.exports=i?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),o=n(6733),i=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),o=n(6733),i=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,u=n(8511),c=n(6407),l=c.enforce,f=c.get,h=Object.defineProperty,d=s&&!r((function(){return 8!==h((function(){}),"length",{value:8}).length})),g=String(String).split("String"),p=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),d&&n&&i(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return i(r,"source")||(r.source=g.join("string"==typeof e?e:"")),t};Function.prototype.toString=p((function(){return o(this)&&f(this).source||u(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,o=n(1176),i=n(219),s=n(3837),a=n(5977),u=n(3777),c=n(2635),l=n(4399),f=l("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"</"+"script>"},g=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;p="undefined"!=typeof document?document.domain&&r?g(r):((e=c("iframe")).style.display="none",u.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):g(r);for(var n=s.length;n--;)delete p.prototype[s[n]];return p()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=o(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:i.f(n,e)}},219:function(t,e,n){var r=n(7400),o=n(7137),i=n(1787),s=n(1176),a=n(905),u=n(5632);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=u(e),c=o.length,l=0;c>l;)i.f(t,n=o[l++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),o=n(4394),i=n(7137),s=n(1176),a=n(9310),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:h in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),o=n(266),i=n(9195),s=n(5358),a=n(905),u=n(9310),c=n(8270),l=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=u(e),l)try{return f(t,e)}catch(t){}if(c(t,e))return s(!o(i.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),o=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),o=n(8270),i=n(905),s=n(9540).indexOf,a=n(5977),u=r([].push);t.exports=function(t,e){var n,r=i(t),c=0,l=[];for(n in r)!o(a,n)&&o(r,n)&&u(l,n);for(;e.length>c;)o(r,n=e[c++])&&(~s(l,n)||u(l,n));return l}},5632:function(t,e,n){var r=n(140),o=n(3837);t.exports=Object.keys||function(t){return r(t,o)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),o=n(6733),i=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),o=n(5968),i=n(8151),s=n(894),a=n(1176),u=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?u(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),o=n(1441),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5353:function(t,e,n){var r=n(9859),o=n(8400),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},3036:function(t,e,n){var r=n(4231),o=n(5353);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),o=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},905:function(t,e,n){var r=n(9337),o=n(8885);t.exports=function(t){return r(o(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),o=Object;t.exports=function(t){return o(r(t))}},2066:function(t,e,n){var r=n(266),o=n(5052),i=n(9395),s=n(5300),a=n(2914),u=n(95),c=TypeError,l=u("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,u=s(t,l);if(u){if(void 0===e&&(e="default"),n=r(u,t,e),!o(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),o=n(9395);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),o=n(4229);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),o=n(6733),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},95:function(t,e,n){var r=n(9859),o=n(3036),i=n(8270),s=n(1441),a=n(4860),u=n(6969),c=o("wks"),l=r.Symbol,f=l&&l.for,h=u?l:l&&l.withoutSetter||s;t.exports=function(t){if(!i(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&i(l,t)?c[t]=l[t]:c[t]=u&&f?f(e):h(e)}return c[t]}},9529:function(t,e,n){"use strict";var r=n(3103),o=n(9540).includes,i=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){t.O(0,[109],(function(){return e=6236,t(t.s=e);var e}));t.O()}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[459],{8809:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends window.Snowboard.Singleton{listens(){return{ajaxLoadAssets:"load"}}async load(t){if(t.js&&t.js.length>0)for(const e of t.js)try{await this.loadScript(e)}catch(t){return Promise.reject(t)}if(t.css&&t.css.length>0)for(const e of t.css)try{await this.loadStyle(e)}catch(t){return Promise.reject(t)}if(t.img&&t.img.length>0)for(const e of t.img)try{await this.loadImage(e)}catch(t){return Promise.reject(t)}return Promise.resolve()}loadScript(t){return new Promise(((e,n)=>{if(document.querySelector(`script[src="${t}"]`))return void e();const r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",t,r),n(new Error(`Unable to load script file: "${t}"`))})),document.body.append(r)}))}loadStyle(t){return new Promise(((e,n)=>{if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e();const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("href",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",t,r),n(new Error(`Unable to load stylesheet file: "${t}"`))})),document.head.append(r)}))}loadImage(t){return new Promise(((e,n)=>{const r=new Image;r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",t,r),n(new Error(`Unable to load image file: "${t}"`))})),r.src=t}))}}},9553:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.add(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.add(this.getLoadingClass(e.element))}ajaxDone(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.remove(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.remove(this.getLoadingClass(e.element))}getLoadingClass(t){return void 0!==t.dataset.attachLoading&&""!==t.dataset.attachLoading?t.dataset.attachLoading:"wn-loading"}}},5763:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(9529);class r extends Snowboard.PluginBase{construct(t,e){if(t instanceof Snowboard.PluginBase==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(e instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=t,this.element=e,this.refresh()}get(t){return void 0===t?this.instanceConfig:void 0!==this.instanceConfig[t]?this.instanceConfig[t]:void 0}set(t,e,n){if(void 0===t)throw new Error("You must provide a configuration key to set");this.instanceConfig[t]=e,!0===n&&(this.element.dataset[t]=e)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const t=this.getDefaults();if(!1===this.acceptedConfigs)return t;for(const e in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(e))&&(t[e]=this.coerceValue(this.element.dataset[e]));return t}coerceValue(t){const e=String(t);if("null"===e)return null;if("undefined"!==e){if(e.startsWith("base64:")){const t=e.replace(/^base64:/,""),n=atob(t);return this.coerceValue(n)}if(["true","yes"].includes(e.toLowerCase()))return!0;if(["false","no"].includes(e.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(e))return Number(e);try{return this.snowboard.jsonParser().parse(e)}catch(t){return""===e||e}}}}},2270:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n){if(this.message=t,this.type=e||"default",this.duration=Number(n||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((t=>t.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},6277:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(t){this.show(),t.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const t=this.stripe.cloneNode(!0);this.indicator.appendChild(t),this.stripe.remove(),this.stripe=t,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(t){this.counter-=1,!0===t&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},8032:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{listens(){return{ready:"ready"}}ready(){let t=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((e=>{e.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(t=!0)})),!t){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(t)}}}},8269:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n,r,i){if(t instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=t,"string"!=typeof e)throw new Error("Transition name must be specified as a string");if(this.transition=e,n&&"function"!=typeof n)throw new Error("Callback must be a valid function");this.callback=n,this.duration=r?this.parseDuration(r):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r={in:`${this.transition}-in`,active:`${this.transition}-active`,out:`${this.transition}-out`};if(0===e.length)return Object.values(r);const i=[];return Object.entries(r).forEach((t=>{const[n,r]=t;-1!==e.indexOf(n)&&i.push(r)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((t=>{this.element.classList.add(t)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((t=>{this.element.classList.remove(t)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((t=>{this.element.classList.remove(t)}))}parseDuration(t){const e=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(t),n=Number(e[1]);return"sec"===("s"===e[3]?"sec":"msec")?1e3*n+"ms":`${Math.floor(n)}ms`}}},3783:function(t,e,n){"use strict";var r=n(2270);class i extends Snowboard.Singleton{dependencies(){return["flash"]}listens(){return{ready:"ready",ajaxErrorMessage:"ajaxErrorMessage",ajaxFlashMessages:"ajaxFlashMessages"}}ready(){document.querySelectorAll('[data-control="flash-message"]').forEach((t=>{this.snowboard.flash(t.innerHTML,t.dataset.flashType,t.dataset.flashDuration)}))}ajaxErrorMessage(t){return this.snowboard.flash(t,"error"),!1}ajaxFlashMessages(t){return Object.entries(t).forEach((t=>{const[e,n]=t;this.snowboard.flash(n,e)})),!1}}var o=n(8269),s=n(9553),a=n(6277),c=n(8032),u=n(8809),l=n(5763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(t=>{t.addPlugin("assetLoader",u.Z),t.addPlugin("dataConfig",l.Z),t.addPlugin("extrasStyles",c.Z),t.addPlugin("transition",o.Z),t.addPlugin("flash",r.Z),t.addPlugin("flashListener",i),t.addPlugin("attachLoading",s.Z),t.addPlugin("stripeLoader",a.Z)})(window.Snowboard)},7111:function(t,e,n){var r=n(6733),i=n(9821),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),i=n(2391),o=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),i=n(3231),o=n(9646),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},7081:function(t,e,n){var r=n(8270),i=n(4826),o=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},5762:function(t,e,n){var r=n(7400),i=n(1787),o=n(5358);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),i=n(1787),o=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),i=n(5052),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,i,o=n(9859),s=n(598),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),i=n(7933).f,o=n(5762),s=n(4768),a=n(8400),c=n(7081),u=n(6541);t.exports=function(t,e){var n,l,f,d,h,p=t.target,m=t.global,v=t.stat;if(n=m?r:v?r[p]||a(p,{}):(r[p]||{}).prototype)for(l in e){if(d=e[l],f=t.dontCallGetSet?(h=i(n,l))&&h.value:n[l],!u(m?l:p+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;c(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),s(n,l,d,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1805:function(t,e,n){var r=n(7400),i=n(8270),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},5968:function(t,e,n){var r=n(7188),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),i=n(6733),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),i=n(9650);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),i=n(2991),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),i=n(4229),o=n(2635);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),i=n(4229),o=n(7079),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),i=n(6733),o=n(5353),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},6407:function(t,e,n){var r,i,o,s=n(1180),a=n(9859),c=n(5968),u=n(5052),l=n(5762),f=n(8270),d=n(5353),h=n(4399),p=n(5977),m="Object already initialized",v=a.TypeError,g=a.WeakMap;if(s||d.state){var b=d.state||(d.state=new g),y=c(b.get),w=c(b.has),x=c(b.set);r=function(t,e){if(w(b,t))throw v(m);return e.facade=t,x(b,t,e),e},i=function(t){return y(b,t)||{}},o=function(t){return w(b,t)}}else{var S=h("state");p[S]=!0,r=function(t,e){if(f(t,S))throw v(m);return e.facade=t,l(t,S,e),e},i=function(t){return f(t,S)?t[S]:{}},o=function(t){return f(t,S)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),i=n(6733),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),i="object"==typeof document&&document.all,o=void 0===i&&void 0!==i;t.exports=o?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),i=n(6733),o=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),i=n(6733),o=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,c=n(8511),u=n(6407),l=u.enforce,f=u.get,d=Object.defineProperty,h=s&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),p=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),h&&n&&o(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return o(r,"source")||(r.source=p.join("string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return i(this)&&f(this).source||c(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,i=n(1176),o=n(219),s=n(3837),a=n(5977),c=n(3777),u=n(2635),l=n(4399),f=l("IE_PROTO"),d=function(){},h=function(t){return"<script>"+t+"</"+"script>"},p=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;m="undefined"!=typeof document?document.domain&&r?p(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):p(r);for(var n=s.length;n--;)delete m.prototype[s[n]];return m()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=i(t),n=new d,d.prototype=null,n[f]=t):n=m(),void 0===e?n:o.f(n,e)}},219:function(t,e,n){var r=n(7400),i=n(7137),o=n(1787),s=n(1176),a=n(905),c=n(5632);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,n=i[l++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),i=n(4394),o=n(7137),s=n(1176),a=n(9310),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",h="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:d in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),i=n(266),o=n(9195),s=n(5358),a=n(905),c=n(9310),u=n(8270),l=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),i=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),i=n(8270),o=n(905),s=n(9540).indexOf,a=n(5977),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},5632:function(t,e,n){var r=n(140),i=n(3837);t.exports=Object.keys||function(t){return r(t,i)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),i=n(6733),o=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),i=n(5968),o=n(8151),s=n(894),a=n(1176),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),i=n(1441),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5353:function(t,e,n){var r=n(9859),i=n(8400),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},3036:function(t,e,n){var r=n(4231),i=n(5353);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),i=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},905:function(t,e,n){var r=n(9337),i=n(8885);t.exports=function(t){return r(i(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),i=Object;t.exports=function(t){return i(r(t))}},2066:function(t,e,n){var r=n(266),i=n(5052),o=n(9395),s=n(5300),a=n(2914),c=n(95),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),i=n(9395);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),i=n(4229);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),i=n(6733),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},95:function(t,e,n){var r=n(9859),i=n(3036),o=n(8270),s=n(1441),a=n(4860),c=n(6969),u=i("wks"),l=r.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&o(l,t)?u[t]=l[t]:u[t]=c&&f?f(e):d(e)}return u[t]}},9529:function(t,e,n){"use strict";var r=n(3103),i=n(9540).includes,o=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){var e;e=3783,t(t.s=e)}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[988],{2026:function(t,e,n){"use strict";n(9529);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Request plugin.");class s extends Snowboard.PluginBase{construct(t,e,n){if("string"==typeof t){const e=document.querySelector(t);if(null===e)throw new Error(`No element was found with the given selector: ${t}`);this.element=e}else this.element=t;if(this.handler=e,this.options=n||{},this.fetchOptions={},this.responseData=null,this.responseError=null,this.cancelled=!1,this.checkRequest(),this.snowboard.globalEvent("ajaxSetup",this)){if(this.element){const t=new Event("ajaxSetup",{cancelable:!0});if(t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return void(this.cancelled=!0)}this.doClientValidation()?this.confirm?this.doConfirm().then((t=>{t&&this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)}))})):this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.handler.match(/^(?:\w+:{2})?on*/))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const t=new Promise(((t,e)=>{this.getFetch().then((n=>{n.ok||406===n.status?n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((e=>{t(o(o({},e),{},{X_WINTER_SUCCESS:406!==n.status,X_WINTER_RESPONSE_CODE:n.status}))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((e=>{t(e)}),(t=>{e(this.renderError(`Unable to process response: ${t}`))})):n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((t=>{e(this.renderError(t.message,t.exception,t.file,t.line,t.trace))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((t=>{e(this.renderError(t))}),(t=>{e(this.renderError(`Unable to process response: ${t}`))}))}),(t=>{e(this.renderError(`Unable to retrieve a response from the server: ${t}`))}))}));if(this.snowboard.globalEvent("ajaxStart",t,this),this.element){const e=new Event("ajaxPromise");e.promise=t,this.element.dispatchEvent(e)}return t}processUpdate(t){return new Promise(((e,n)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[t]))return void n();const r={};if(Object.entries(t).forEach((t=>{const[e,n]=t;"X_WINTER"!==e.substr(0,8)&&(r[e]=n)})),0===Object.keys(r).length)return void(t.X_WINTER_ASSETS?this.processAssets(t.X_WINTER_ASSETS).then((()=>{e()}),(()=>{n()})):e());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",t,this).then((async()=>{t.X_WINTER_ASSETS&&await this.processAssets(t.X_WINTER_ASSETS),this.doUpdate(r).then((()=>{window.requestAnimationFrame((()=>e()))}),(()=>{n()}))}),(()=>{n()}))}))}doUpdate(t){return new Promise((e=>{const n=[];Object.entries(t).forEach((t=>{const[e,r]=t;let o=this.options.update&&this.options.update[e]?this.options.update[e]:e,i="replace";"@"===o.substr(0,1)?(i="append",o=o.substr(1)):"^"===o.substr(0,1)?(i="prepend",o=o.substr(1)):"#"!==o.substr(0,1)&&"."!==o.substr(0,1)&&(i="noop");const s=document.querySelectorAll(o);s.length>0&&s.forEach((t=>{switch(i){case"append":t.innerHTML+=r;break;case"prepend":t.innerHTML=r+t.innerHTML;break;case"noop":break;default:t.innerHTML=r}n.push(t),this.snowboard.globalEvent("ajaxUpdate",t,r,this);const e=new Event("ajaxUpdate");e.content=r,t.dispatchEvent(e)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",n,this),e()}))}processResponse(t){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const t=new Event("ajaxDone",{cancelable:!0});if(t.responseData=this.responseData,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}this.flash&&t.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(t.X_WINTER_FLASH_MESSAGES),this.redirect||t.X_WINTER_REDIRECT?this.processRedirect(this.redirect||t.X_WINTER_REDIRECT):this.complete()}}processError(t){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const t=new Event("ajaxFail",{cancelable:!0});if(t.responseError=this.responseError,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}t instanceof Error?this.processErrorMessage(t.message):(t.X_WINTER_ERROR_FIELDS&&this.processValidationErrors(t.X_WINTER_ERROR_FIELDS),t.X_WINTER_ERROR_MESSAGE&&this.processErrorMessage(t.X_WINTER_ERROR_MESSAGE)),this.complete()}}processRedirect(t){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxRedirect",t,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const t=document.createEvent("CustomEvent");t.eventName="ajaxRedirected",this.element.dispatchEvent(t)}}),{once:!0}),window.location.assign(t))}processErrorMessage(t){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",t,this)&&window.alert(t)}processFlashMessages(t){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[t])||this.snowboard.globalEvent("ajaxFlashMessages",t,this)}processValidationErrors(t){"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,t])||this.snowboard.globalEvent("ajaxValidationErrors",this.form,t,this)}processAssets(t){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",t)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const t=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await t)return!0}catch(t){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const t=new Event("ajaxAlways");t.request=this,t.responseData=this.responseData,t.responseError=this.responseError,this.element.dispatchEvent(t)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const t={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(t["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(t["X-XSRF-TOKEN"]=this.xsrfToken),t}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const t="object"==typeof this.options.data?this.options.data:{},e=new FormData(this.form||void 0);return Object.keys(t).length>0&&Object.entries(t).forEach((t=>{const[n,r]=t;e.append(n,r)})),e}get confirm(){return this.options.confirm||!1}extractPartials(t){return Object.keys(t).join("&")}renderError(t,e,n,r,o){const i=new Error(t);return i.exception=e||null,i.file=n||null,i.line=r||null,i.trace=o||[],i}}Snowboard.addPlugin("request",s)},7111:function(t,e,n){var r=n(6733),o=n(9821),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),o=n(2391),i=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),o=n(3231),i=n(9646),s=function(t){return function(e,n,s){var a,c=r(e),u=i(c),p=o(s,u);if(t&&n!=n){for(;u>p;)if((a=c[p++])!=a)return!0}else for(;u>p;p++)if((t||p in c)&&c[p]===n)return t||p||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},7081:function(t,e,n){var r=n(8270),o=n(4826),i=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=o(e),c=s.f,u=i.f,p=0;p<a.length;p++){var f=a[p];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},5762:function(t,e,n){var r=n(7400),o=n(1787),i=n(5358);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),o=n(1787),i=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&i(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),o=n(5052),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,o,i=n(9859),s=n(598),a=i.process,c=i.Deno,u=a&&a.versions||c&&c.version,p=u&&u.v8;p&&(o=(r=p.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),o=n(7933).f,i=n(5762),s=n(4768),a=n(8400),c=n(7081),u=n(6541);t.exports=function(t,e){var n,p,f,l,h,d=t.target,v=t.global,b=t.stat;if(n=v?r:b?r[d]||a(d,{}):(r[d]||{}).prototype)for(p in e){if(l=e[p],f=t.dontCallGetSet?(h=o(n,p))&&h.value:n[p],!u(v?p:d+(b?".":"#")+p,t.forced)&&void 0!==f){if(typeof l==typeof f)continue;c(l,f)}(t.sham||f&&f.sham)&&i(l,"sham",!0),s(n,p,l,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},1805:function(t,e,n){var r=n(7400),o=n(8270),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},5968:function(t,e,n){var r=n(7188),o=Function.prototype,i=o.bind,s=o.call,a=r&&i.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),o=n(6733),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),o=n(9650);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),o=n(2991),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),o=n(4229),i=n(2635);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),o=n(4229),i=n(7079),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),o=n(6733),i=n(5353),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},6407:function(t,e,n){var r,o,i,s=n(1180),a=n(9859),c=n(5968),u=n(5052),p=n(5762),f=n(8270),l=n(5353),h=n(4399),d=n(5977),v="Object already initialized",b=a.TypeError,m=a.WeakMap;if(s||l.state){var E=l.state||(l.state=new m),g=c(E.get),y=c(E.has),w=c(E.set);r=function(t,e){if(y(E,t))throw b(v);return e.facade=t,w(E,t,e),e},o=function(t){return g(E,t)||{}},i=function(t){return y(E,t)}}else{var x=h("state");d[x]=!0,r=function(t,e){if(f(t,x))throw b(v);return e.facade=t,p(t,x,e),e},o=function(t){return f(t,x)?t[x]:{}},i=function(t){return f(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),o=n(6733),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==p||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",p=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),o="object"==typeof document&&document.all,i=void 0===o&&void 0!==o;t.exports=i?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),o=n(6733),i=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),o=n(6733),i=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,c=n(8511),u=n(6407),p=u.enforce,f=u.get,l=Object.defineProperty,h=s&&!r((function(){return 8!==l((function(){}),"length",{value:8}).length})),d=String(String).split("String"),v=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(s?l(t,"name",{value:e,configurable:!0}):t.name=e),h&&n&&i(n,"arity")&&t.length!==n.arity&&l(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?s&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=p(t);return i(r,"source")||(r.source=d.join("string"==typeof e?e:"")),t};Function.prototype.toString=v((function(){return o(this)&&f(this).source||c(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,o=n(1176),i=n(219),s=n(3837),a=n(5977),c=n(3777),u=n(2635),p=n(4399),f=p("IE_PROTO"),l=function(){},h=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete v.prototype[s[n]];return v()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=o(t),n=new l,l.prototype=null,n[f]=t):n=v(),void 0===e?n:i.f(n,e)}},219:function(t,e,n){var r=n(7400),o=n(7137),i=n(1787),s=n(1176),a=n(905),c=n(5632);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=c(e),u=o.length,p=0;u>p;)i.f(t,n=o[p++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),o=n(4394),i=n(7137),s=n(1176),a=n(9310),c=TypeError,u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",h="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n.writable){var r=p(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:l in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),o=n(266),i=n(9195),s=n(5358),a=n(905),c=n(9310),u=n(8270),p=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),p)try{return f(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),o=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),o=n(8270),i=n(905),s=n(9540).indexOf,a=n(5977),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,p=[];for(n in r)!o(a,n)&&o(r,n)&&c(p,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(p,n)||c(p,n));return p}},5632:function(t,e,n){var r=n(140),o=n(3837);t.exports=Object.keys||function(t){return r(t,o)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),o=n(6733),i=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),o=n(5968),i=n(8151),s=n(894),a=n(1176),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),o=n(1441),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5353:function(t,e,n){var r=n(9859),o=n(8400),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},3036:function(t,e,n){var r=n(4231),o=n(5353);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.0",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.0/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),o=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},905:function(t,e,n){var r=n(9337),o=n(8885);t.exports=function(t){return r(o(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),o=Object;t.exports=function(t){return o(r(t))}},2066:function(t,e,n){var r=n(266),o=n(5052),i=n(9395),s=n(5300),a=n(2914),c=n(95),u=TypeError,p=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=s(t,p);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),o=n(9395);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),o=n(4229);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),o=n(6733),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},95:function(t,e,n){var r=n(9859),o=n(3036),i=n(8270),s=n(1441),a=n(4860),c=n(6969),u=o("wks"),p=r.Symbol,f=p&&p.for,l=c?p:p&&p.withoutSetter||s;t.exports=function(t){if(!i(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&i(p,t)?u[t]=p[t]:u[t]=c&&f?f(e):l(e)}return u[t]}},9529:function(t,e,n){"use strict";var r=n(3103),o=n(9540).includes,i=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){var e;e=2026,t(t.s=e)}]);
        this.snowboard = snowboard;
        this.singleton = instance.prototype instanceof Singleton;
        this.initialised = instance.prototype instanceof PluginBase;
        return this.initialised;
        this.initialised = true;
        this.domReady = false;

            this.domReady = true;
        const callback = (...parameters) => this.plugins[lowerName].getInstance(...parameters);
        this[name] = callback;
        this[lowerName] = callback;
                && this.domReady
        if (!this.hasPlugin(name)) {
            throw new Error(`No plugin called "${name}" has been registered.`);
        return this.plugins[name];
        if (this.domReady) {

    const snowboard = new Snowboard(true, true);
    const snowboard = new Snowboard();
                        expect(Snowboard.hasPlugin('test')).toBe(true);
                            expect.arrayContaining(['jsonparser', 'sanitizer', 'test'])
                        expect(Snowboard.test).toEqual(expect.any(Function));
                        const instance = Snowboard.test();
                        expect(instance.snowboard).toBe(Snowboard);
                        const instanceOne = Snowboard.test();
                        const instanceTwo = Snowboard.test();
                        const factory = Snowboard.getPlugin('test');
                        Snowboard.removePlugin('test');
                        expect(Snowboard.hasPlugin('test')).toEqual(false);
                        expect(Snowboard.test).not.toBeDefined();
                        expect(Snowboard.hasPlugin('test')).toBe(true);
                            expect.arrayContaining(['jsonparser', 'sanitizer', 'test'])
                        expect(Snowboard.test).toEqual(expect.any(Function));
                        const instance = Snowboard.test();
                        expect(instance.snowboard).toBe(Snowboard);
                        const instanceOne = Snowboard.test();
                        const instanceTwo = Snowboard.test();
                        const factory = Snowboard.getPlugin('test');
                        Snowboard.removePlugin('test');
                        expect(Snowboard.hasPlugin('test')).toEqual(false);
                        expect(Snowboard.test).not.toBeDefined();
    Snowboard.addPlugin('test', TestPlugin);
    Snowboard.addPlugin('test', TestSingleton);

Fixed code:
    },
    "ignorePatterns": [
        "tests/js",
        "**/build/*.js"
    ]
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[290,450,988],{2026:function(t,e,n){"use strict";n(9529);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Request plugin.");class o extends Snowboard.PluginBase{construct(t,e,n){if("string"==typeof t){const e=document.querySelector(t);if(null===e)throw new Error(`No element was found with the given selector: ${t}`);this.element=e}else this.element=t;if(this.handler=e,this.options=n||{},this.fetchOptions={},this.responseData=null,this.responseError=null,this.cancelled=!1,this.checkRequest(),this.snowboard.globalEvent("ajaxSetup",this)){if(this.element){const t=new Event("ajaxSetup",{cancelable:!0});if(t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return void(this.cancelled=!0)}this.doClientValidation()?this.confirm?this.doConfirm().then((t=>{t&&this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)}))})):this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.handler.match(/^(?:\w+:{2})?on*/))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const t=new Promise(((t,e)=>{this.getFetch().then((n=>{n.ok||406===n.status?n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((e=>{t(s(s({},e),{},{X_WINTER_SUCCESS:406!==n.status,X_WINTER_RESPONSE_CODE:n.status}))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((e=>{t(e)}),(t=>{e(this.renderError(`Unable to process response: ${t}`))})):n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((t=>{e(this.renderError(t.message,t.exception,t.file,t.line,t.trace))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((t=>{e(this.renderError(t))}),(t=>{e(this.renderError(`Unable to process response: ${t}`))}))}),(t=>{e(this.renderError(`Unable to retrieve a response from the server: ${t}`))}))}));if(this.snowboard.globalEvent("ajaxStart",t,this),this.element){const e=new Event("ajaxPromise");e.promise=t,this.element.dispatchEvent(e)}return t}processUpdate(t){return new Promise(((e,n)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[t]))return void n();const r={};if(Object.entries(t).forEach((t=>{const[e,n]=t;"X_WINTER"!==e.substr(0,8)&&(r[e]=n)})),0===Object.keys(r).length)return void(t.X_WINTER_ASSETS?this.processAssets(t.X_WINTER_ASSETS).then((()=>{e()}),(()=>{n()})):e());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",t,this).then((async()=>{t.X_WINTER_ASSETS&&await this.processAssets(t.X_WINTER_ASSETS),this.doUpdate(r).then((()=>{window.requestAnimationFrame((()=>e()))}),(()=>{n()}))}),(()=>{n()}))}))}doUpdate(t){return new Promise((e=>{const n=[];Object.entries(t).forEach((t=>{const[e,r]=t;let s=this.options.update&&this.options.update[e]?this.options.update[e]:e,i="replace";"@"===s.substr(0,1)?(i="append",s=s.substr(1)):"^"===s.substr(0,1)?(i="prepend",s=s.substr(1)):"#"!==s.substr(0,1)&&"."!==s.substr(0,1)&&(i="noop");const o=document.querySelectorAll(s);o.length>0&&o.forEach((t=>{switch(i){case"append":t.innerHTML+=r;break;case"prepend":t.innerHTML=r+t.innerHTML;break;case"noop":break;default:t.innerHTML=r}n.push(t),this.snowboard.globalEvent("ajaxUpdate",t,r,this);const e=new Event("ajaxUpdate");e.content=r,t.dispatchEvent(e)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",n,this),e()}))}processResponse(t){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const t=new Event("ajaxDone",{cancelable:!0});if(t.responseData=this.responseData,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}this.flash&&t.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(t.X_WINTER_FLASH_MESSAGES),this.redirect||t.X_WINTER_REDIRECT?this.processRedirect(this.redirect||t.X_WINTER_REDIRECT):this.complete()}}processError(t){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const t=new Event("ajaxFail",{cancelable:!0});if(t.responseError=this.responseError,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}t instanceof Error?this.processErrorMessage(t.message):(t.X_WINTER_ERROR_FIELDS&&this.processValidationErrors(t.X_WINTER_ERROR_FIELDS),t.X_WINTER_ERROR_MESSAGE&&this.processErrorMessage(t.X_WINTER_ERROR_MESSAGE)),this.complete()}}processRedirect(t){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxRedirect",t,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const t=document.createEvent("CustomEvent");t.eventName="ajaxRedirected",this.element.dispatchEvent(t)}}),{once:!0}),window.location.assign(t))}processErrorMessage(t){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",t,this)&&window.alert(t)}processFlashMessages(t){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[t])||this.snowboard.globalEvent("ajaxFlashMessages",t,this)}processValidationErrors(t){"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,t])||this.snowboard.globalEvent("ajaxValidationErrors",this.form,t,this)}processAssets(t){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",t)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const t=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await t)return!0}catch(t){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const t=new Event("ajaxAlways");t.request=this,t.responseData=this.responseData,t.responseError=this.responseError,this.element.dispatchEvent(t)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const t={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(t["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(t["X-XSRF-TOKEN"]=this.xsrfToken),t}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const t="object"==typeof this.options.data?this.options.data:{},e=new FormData(this.form||void 0);return Object.keys(t).length>0&&Object.entries(t).forEach((t=>{const[n,r]=t;e.append(n,r)})),e}get confirm(){return this.options.confirm||!1}extractPartials(t){return Object.keys(t).join("&")}renderError(t,e,n,r,s){const i=new Error(t);return i.exception=e||null,i.file=n||null,i.line=r||null,i.trace=s||[],i}}Snowboard.addPlugin("request",o)},8809:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends window.Snowboard.Singleton{listens(){return{ajaxLoadAssets:"load"}}async load(t){if(t.js&&t.js.length>0)for(const e of t.js)try{await this.loadScript(e)}catch(t){return Promise.reject(t)}if(t.css&&t.css.length>0)for(const e of t.css)try{await this.loadStyle(e)}catch(t){return Promise.reject(t)}if(t.img&&t.img.length>0)for(const e of t.img)try{await this.loadImage(e)}catch(t){return Promise.reject(t)}return Promise.resolve()}loadScript(t){return new Promise(((e,n)=>{if(document.querySelector(`script[src="${t}"]`))return void e();const r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",t,r),n(new Error(`Unable to load script file: "${t}"`))})),document.body.append(r)}))}loadStyle(t){return new Promise(((e,n)=>{if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e();const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("href",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",t,r),n(new Error(`Unable to load stylesheet file: "${t}"`))})),document.head.append(r)}))}loadImage(t){return new Promise(((e,n)=>{const r=new Image;r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",t,r),n(new Error(`Unable to load image file: "${t}"`))})),r.src=t}))}}},9553:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.add(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.add(this.getLoadingClass(e.element))}ajaxDone(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.remove(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.remove(this.getLoadingClass(e.element))}getLoadingClass(t){return void 0!==t.dataset.attachLoading&&""!==t.dataset.attachLoading?t.dataset.attachLoading:"wn-loading"}}},5763:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(9529);class r extends Snowboard.PluginBase{construct(t,e){if(t instanceof Snowboard.PluginBase==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(e instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=t,this.element=e,this.refresh()}get(t){return void 0===t?this.instanceConfig:void 0!==this.instanceConfig[t]?this.instanceConfig[t]:void 0}set(t,e,n){if(void 0===t)throw new Error("You must provide a configuration key to set");this.instanceConfig[t]=e,!0===n&&(this.element.dataset[t]=e)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const t=this.getDefaults();if(!1===this.acceptedConfigs)return t;for(const e in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(e))&&(t[e]=this.coerceValue(this.element.dataset[e]));return t}coerceValue(t){const e=String(t);if("null"===e)return null;if("undefined"!==e){if(e.startsWith("base64:")){const t=e.replace(/^base64:/,""),n=atob(t);return this.coerceValue(n)}if(["true","yes"].includes(e.toLowerCase()))return!0;if(["false","no"].includes(e.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(e))return Number(e);try{return this.snowboard.jsonParser().parse(e)}catch(t){return""===e||e}}}}},2270:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n){if(this.message=t,this.type=e||"default",this.duration=Number(n||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((t=>t.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},6277:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(t){this.show(),t.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const t=this.stripe.cloneNode(!0);this.indicator.appendChild(t),this.stripe.remove(),this.stripe=t,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(t){this.counter-=1,!0===t&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},8032:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{listens(){return{ready:"ready"}}ready(){let t=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((e=>{e.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(t=!0)})),!t){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(t)}}}},8269:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n,r,s){if(t instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=t,"string"!=typeof e)throw new Error("Transition name must be specified as a string");if(this.transition=e,n&&"function"!=typeof n)throw new Error("Callback must be a valid function");this.callback=n,this.duration=r?this.parseDuration(r):null,this.trailTo=!0===s,this.doTransition()}eventClasses(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r={in:`${this.transition}-in`,active:`${this.transition}-active`,out:`${this.transition}-out`};if(0===e.length)return Object.values(r);const s=[];return Object.entries(r).forEach((t=>{const[n,r]=t;-1!==e.indexOf(n)&&s.push(r)})),s}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((t=>{this.element.classList.add(t)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((t=>{this.element.classList.remove(t)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((t=>{this.element.classList.remove(t)}))}parseDuration(t){const e=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(t),n=Number(e[1]);return"sec"===("s"===e[3]?"sec":"msec")?1e3*n+"ms":`${Math.floor(n)}ms`}}},1662:function(t,e){"use strict";e.Z={get(t,e,n){if("string"==typeof e){const n=e.toLowerCase();if(t.hasPlugin(n))return function(){return Reflect.get(t,"plugins")[n].getInstance(...arguments)}}return Reflect.get(t,e,n)},has(t,e){if("string"==typeof e){const n=e.toLowerCase();if(t.hasPlugin(n))return!0}return Reflect.has(t,e)}}},5878:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});n(9529);class r{constructor(t){this.snowboard=t}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}class s extends r{}var i={get(t,e,n){if("string"==typeof e){const n=e.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(e))throw new Error(`You cannot use the "${e}" Snowboard method within a plugin.`);if(t.hasPlugin(n))return function(){return Reflect.get(t,"plugins")[n].getInstance(...arguments)}}return Reflect.get(t,e,n)},has(t,e){if("string"==typeof e){const n=e.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(e))return!1;if(t.hasPlugin(n))return!0}return Reflect.has(t,e)}};class o{constructor(t,e,n){this.name=t,this.snowboard=new Proxy(e,i),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(o.prototype),Object.freeze(this)}hasMethod(t){return!this.isFunction()&&"function"==typeof this.instance.prototype[t]}callMethod(){if(this.isFunction())return null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e,s=r.shift();return this.instance.prototype[s](r)}getInstance(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(this.isFunction())return this.instance(...n);if(!this.dependenciesFulfilled()){const t=this.getDependencies().filter((t=>!this.snowboard.getPluginNames().includes(t)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${t.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instances[0][e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instances[0][n]=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return r(t,...n)}}))),this.instances[0];Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instance.prototype[e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instance.prototype[n]=function(){for(var e=arguments.length,n=new Array(e),s=0;s<e;s++)n[s]=arguments[s];return r(t,...n)}})));const s=new this.instance(this.snowboard,...n);return s.detach=()=>this.instances.splice(this.instances.indexOf(s),1),s.construct(...n),this.instances.push(s),s}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof r==!1}isSingleton(){return this.instance.prototype instanceof s==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=new this.instance(this.snowboard,...e);r.detach=()=>this.instances.splice(this.instances.indexOf(r),1),r.construct(...e),this.instances.push(r),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((t=>t.toLowerCase()))}dependenciesFulfilled(){const t=this.getDependencies();let e=!0;return t.forEach((t=>{this.snowboard.hasPlugin(t)||(e=!1)})),e}mock(t,e){var n=this;if(!this.isFunction()){if(!this.instance.prototype[t])throw new Error(`Function "${t}" does not exist and cannot be mocked`);this.mocks[t]=e,this.originalFunctions[t]=this.instance.prototype[t],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][t]=function(){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];return e(n,...r)})}}unmock(t){this.isFunction()||this.mocks[t]&&(this.isSingleton()&&(this.instances[0][t]=this.originalFunctions[t]),delete this.mocks[t],delete this.originalFunctions[t])}}var a=n(26);function l(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function c(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){h(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function h(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class u extends s{construct(){this.defaults={expires:null,path:"/",domain:null,secure:!1,sameSite:"Lax"}}setDefaults(t){if("object"!=typeof t)throw new Error("Cookie defaults must be provided as an object");Object.entries(t).forEach((t=>{const[e,n]=t;void 0!==this.defaults[e]&&(this.defaults[e]=n)}))}getDefaults(){const t={};return Object.entries(this.defaults).forEach((e=>{const[n,r]=e;null!==this.defaults[n]&&(t[n]=r)})),t}get(t){if(void 0===t){const t=a.Z.get();return Object.entries(t).forEach((e=>{const[n,r]=e;this.snowboard.globalEvent("cookie.get",n,r,(e=>{t[n]=e}))})),t}let e=a.Z.get(t);return this.snowboard.globalEvent("cookie.get",t,e,(t=>{e=t})),e}set(t,e,n){let r=e;return this.snowboard.globalEvent("cookie.set",t,e,(t=>{r=t})),a.Z.set(t,r,c(c({},this.getDefaults()),n))}remove(t,e){a.Z.remove(t,c(c({},this.getDefaults()),e))}}class d extends s{construct(){window.wnJSON=t=>this.parse(t),window.ocJSON=window.wnJSON}parse(t){const e=this.parseString(t);return JSON.parse(e)}parseString(t){let e=t.trim();if(!e.length)throw new Error("Broken JSON object.");let n="",r=null,s=null,i="";for(;e&&","===e[0];)e=e.substr(1);if('"'===e[0]||"'"===e[0]){if(e[e.length-1]!==e[0])throw new Error("Invalid string JSON object.");i='"';for(let t=1;t<e.length;t+=1)if("\\"===e[t])"'"===e[t+1]||(i+=e[t]),i+=e[t+1],t+=1;else{if(e[t]===e[0])return i+='"',i;'"'===e[t]?i+='\\"':i+=e[t]}throw new Error("Invalid string JSON object.")}if("true"===e||"false"===e)return e;if("null"===e)return"null";const o=parseFloat(e);if(!Number.isNaN(o))return o.toString();if("{"===e[0]){r="needKey",s=null,n="{";for(let t=1;t<e.length;t+=1)if(!this.isBlankChar(e[t]))if("needKey"!==r||'"'!==e[t]&&"'"!==e[t]){if("needKey"===r&&this.canBeKeyHead(e[t]))s=this.parseKey(e,t),n+='"',n+=s,n+='"',t+=s.length-1,r="afterKey";else if("afterKey"===r&&":"===e[t])n+=":",r=":";else if(":"===r)i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody";else if("afterBody"===r||"needKey"===r){let s=t;for(;","===e[s]||this.isBlankChar(e[s]);)s+=1;if("}"===e[s]&&s===e.length-1){for(;","===n[n.length-1];)n=n.substr(0,n.length-1);return n+="}",n}s!==t&&"{"!==n&&(n+=",",r="needKey",t=s-1)}}else s=this.parseKey(e,t+1,e[t]),n+=`"${s}"`,t+=s.length,t+=1,r="afterKey";throw new Error(`Broken JSON object near ${n}`)}if("["===e[0]){n="[",r="needBody";for(let t=1;t<e.length;t+=1)if(" "!==e[t]&&"\n"!==e[t]&&"\t"!==e[t])if("needBody"===r){if(","===e[t]){n+="null,";continue}if("]"===e[t]&&t===e.length-1)return","===n[n.length-1]&&(n=n.substr(0,n.length-1)),n+="]",n;i=this.getBody(e,t),t=t+i.originLength-1,n+=this.parseString(i.body),r="afterBody"}else if("afterBody"===r)if(","===e[t])for(n+=",",r="needBody";","===e[t+1]||this.isBlankChar(e[t+1]);)","===e[t+1]&&(n+="null,"),t+=1;else if("]"===e[t]&&t===e.length-1)return n+="]",n;throw new Error(`Broken JSON array near ${n}`)}return""}getBody(t,e){let n="";if('"'===t[e]||"'"===t[e]){n=t[e];for(let r=e+1;r<t.length;r+=1)if("\\"===t[r])n+=t[r],r+1<t.length&&(n+=t[r+1]),r+=1;else{if(t[r]===t[e])return n+=t[e],{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON string body near ${n}`)}if("t"===t[e]){if(t.indexOf("true",e)===e)return{originLength:"true".length,body:"true"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("f"===t[e]){if(t.indexOf("f",e)===e)return{originLength:"false".length,body:"false"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("n"===t[e]){if(t.indexOf("null",e)===e)return{originLength:"null".length,body:"null"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("-"===t[e]||"+"===t[e]||"."===t[e]||t[e]>="0"&&t[e]<="9"){n="";for(let r=e;r<t.length;r+=1){if(!("-"===t[r]||"+"===t[r]||"."===t[r]||t[r]>="0"&&t[r]<="9"))return{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===t[e]||"["===t[e]){const r=[t[e]];n=t[e];for(let s=e+1;s<t.length;s+=1){if(n+=t[s],"\\"===t[s])s+1<t.length&&(n+=t[s+1]),s+=1;else if('"'===t[s])'"'===r[r.length-1]?r.pop():"'"!==r[r.length-1]&&r.push(t[s]);else if("'"===t[s])"'"===r[r.length-1]?r.pop():'"'!==r[r.length-1]&&r.push(t[s]);else if('"'!==r[r.length-1]&&"'"!==r[r.length-1])if("{"===t[s])r.push("{");else if("}"===t[s]){if("{"!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}else if("["===t[s])r.push("[");else if("]"===t[s]){if("["!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}if(!r.length)return{originLength:s-e,body:n}}throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`)}throw new Error(`Broken JSON body near ${t.substr(e-5>=0?e-5:0,50)}`)}parseKey(t,e,n){let r="";for(let s=e;s<t.length;s+=1){if(n&&n===t[s])return r;if(!n&&(" "===t[s]||":"===t[s]))return r;r+=t[s],"\\"===t[s]&&s+1<t.length&&(r+=t[s+1],s+=1)}throw new Error(`Broken JSON syntax near ${r}`)}canBeKeyHead(t){return"\\"!==t[0]&&(t[0]>="a"&&t[0]<="z"||t[0]>="A"&&t[0]<="Z"||"_"===t[0]||(t[0]>="0"&&t[0]<="9"||("$"===t[0]||t.charCodeAt(0)>255)))}isBlankChar(t){return" "===t||"\n"===t||"\t"===t}}class f extends s{construct(){window.wnSanitize=t=>this.sanitize(t),window.ocSanitize=window.wnSanitize}sanitize(t,e){const n=(new DOMParser).parseFromString(t,"text/html"),r=void 0===e||"boolean"!=typeof e||e;return this.sanitizeNode(n.getRootNode()),r?n.body.innerHTML:n.innerHTML}sanitizeNode(t){if("SCRIPT"===t.tagName)return void t.remove();this.trimAttributes(t);Array.from(t.children).forEach((t=>{this.sanitizeNode(t)}))}trimAttributes(t){if(t.attributes)for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes.item(e).name,r=t.attributes.item(e).value;0!==n.indexOf("on")&&0!==r.indexOf("javascript:")||t.removeAttribute(n)}}}class p extends s{construct(){this.foundBaseUrl=null,this.baseUrl()}to(t){if(t.match(/[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i))return t;const e=t.replace(/^\/+/,"");return`${this.baseUrl()}${e}`}baseUrl(){if(null!==this.foundBaseUrl)return this.foundBaseUrl;if(null!==document.querySelector('script[data-module="snowboard-base"]'))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl),this.foundBaseUrl;if(null!==document.querySelector("base"))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector("base").getAttribute("href")),this.foundBaseUrl;const t=[window.location.protocol,"//",window.location.host,"/"];return this.foundBaseUrl=t.join(""),this.foundBaseUrl}validateBaseUrl(t){const e=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i.exec(t),n=e[2],r=e[4];if(n&&-1===["http","https"].indexOf(n.toLowerCase()))throw new Error("Invalid base URL detected");if(!r)throw new Error("Invalid base URL detected");return"/"===t.substr(-1)?t:`${t}/`}}class g{constructor(t,e){this.debugEnabled="boolean"==typeof e&&!0===e,this.autoInitSingletons="boolean"==typeof t&&!1===t,this.plugins={},this.listeners={},this.foundBaseUrl=null,this.readiness={dom:!1},Object.seal(this.readiness),this.attachAbstracts(),Object.freeze(g.prototype),Object.freeze(this),this.loadUtilities(),this.initialise(),this.debug("Snowboard framework initialised")}attachAbstracts(){this.PluginBase=r,this.Singleton=s,Object.freeze(this.PluginBase.prototype),Object.freeze(this.PluginBase),Object.freeze(this.Singleton.prototype),Object.freeze(this.Singleton)}loadUtilities(){this.addPlugin("cookie",u),this.addPlugin("jsonParser",d),this.addPlugin("sanitizer",f),this.addPlugin("url",p)}initialise(){window.addEventListener("DOMContentLoaded",(()=>{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((t=>{t.isSingleton()&&t.dependenciesFulfilled()&&t.initialiseSingleton()}))}addPlugin(t,e){const n=t.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${t}" is already registered.`);if("function"!=typeof e&&e instanceof r==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[t]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new o(n,this,e),this.debug(`Plugin "${t}" registered`),Object.values(this.getPlugins()).forEach((t=>{if(t.isSingleton()&&!t.isInitialised()&&t.dependenciesFulfilled()&&t.hasMethod("listens")&&Object.keys(t.callMethod("listens")).includes("ready")&&this.readiness.dom){const e=t.callMethod("listens").ready;t.callMethod(e)}}))}removePlugin(t){const e=t.toLowerCase();this.hasPlugin(e)?(this.plugins[e].getInstances().forEach((t=>{t.destruct()})),delete this.plugins[e],delete this[e],delete this[t],this.debug(`Plugin "${t}" removed`)):this.debug(`Plugin "${t}" already removed`)}hasPlugin(t){const e=t.toLowerCase();return void 0!==this.plugins[e]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(t){const e=t.toLowerCase();if(!this.hasPlugin(e))throw new Error(`No plugin called "${e}" has been registered.`);return this.plugins[e]}listensToEvent(t){const e=[];return Object.entries(this.plugins).forEach((n=>{const[r,s]=n;if(s.isFunction())return;if(!s.dependenciesFulfilled())return;if(!s.hasMethod("listens"))return;"string"==typeof s.callMethod("listens")[t]&&e.push(r)})),e}ready(t){this.readiness.dom&&t(),this.on("ready",t)}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){if(!this.listeners[t])return;const n=this.listeners[t].indexOf(e);-1!==n&&this.listeners[t].splice(n,1)}globalEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global event "${t}"`,...n);const s=this.listensToEvent(t);if(0===s.length)return this.debug(`No listeners found for global event "${t}"`),!0;this.debug(`Listeners found for global event "${t}": ${s.join(", ")}`);let i=!1;return s.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const s=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!i){if(!r[s])throw new Error(`Missing "${s}" method in "${e}" plugin`);try{!1===r[s](...n)&&(i=!0,this.debug(`Global event "${t}" cancelled by "${e}" plugin`))}catch(n){this.error(`Error thrown in "${t}" event by "${e}" plugin.`,n)}}}))})),!i&&this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global event "${t}"`),this.listeners[t].forEach((e=>{if(!i)try{!1===e(...n)&&(i=!0,this.debug(`Global event "${t} cancelled by an ad-hoc listener.`))}catch(e){this.error(`Error thrown in "${t}" event by an ad-hoc listener.`,e)}}))),!i}globalPromiseEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global promise event "${t}"`);const s=this.listensToEvent(t);if(0===s.length)return this.debug(`No listeners found for global promise event "${t}"`),Promise.resolve();this.debug(`Listeners found for global promise event "${t}": ${s.join(", ")}`);const i=[];return s.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const s=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!r[s])throw new Error(`Missing "${s}" method in "${e}" plugin`);try{const t=r[s](...n);if(t instanceof Promise==!1)return;i.push(t)}catch(n){this.error(`Error thrown in "${t}" promise event by "${e}" plugin.`,n)}}))})),this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global promise event "${t}"`),this.listeners[t].forEach((e=>{try{const t=e(...n);if(t instanceof Promise==!1)return;i.push(t)}catch(e){this.error(`Error thrown in "${t}" promise event by an ad-hoc listener.`,e)}}))),0===i.length?Promise.resolve():Promise.all(i)}logMessage(t,e,n){console.groupCollapsed("%c[Snowboard]",`color: ${t}; font-weight: ${e?"bold":"normal"};`,n);for(var r=arguments.length,s=new Array(r>3?r-3:0),i=3;i<r;i++)s[i-3]=arguments[i];if(s.length){console.groupCollapsed(`%cParameters %c(${s.length})`,"color: rgb(45, 167, 199); font-weight: bold;","color: rgb(88, 88, 88); font-weight: normal;");let t=0;s.forEach((e=>{t+=1,console.log(`%c${t}:`,"color: rgb(88, 88, 88); font-weight: normal;",e)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}debug(t){if(this.debugEnabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}}error(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(229, 35, 35)",!0,t,...n)}}},4136:function(t,e,n){"use strict";var r=n(2270),s=n(8269),i=n(9553),o=n(6277),a=n(8032),l=n(8809),c=n(5763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(t=>{t.addPlugin("assetLoader",l.Z),t.addPlugin("dataConfig",c.Z),t.addPlugin("extrasStyles",a.Z),t.addPlugin("transition",s.Z),t.addPlugin("flash",r.Z),t.addPlugin("attachLoading",i.Z),t.addPlugin("stripeLoader",o.Z)})(window.Snowboard)},2165:function(t,e,n){"use strict";var r=n(5878),s=n(1662);(t=>{const e=new Proxy(new r.Z(!0,!0),s.Z);t.snowboard=e,t.Snowboard=e,t.SnowBoard=e})(window)},7111:function(t,e,n){var r=n(6733),s=n(9821),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(s(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),s=n(2391),i=n(1787).f,o=r("unscopables"),a=Array.prototype;null==a[o]&&i(a,o,{configurable:!0,value:s(null)}),t.exports=function(t){a[o][t]=!0}},1176:function(t,e,n){var r=n(5052),s=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(s(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),s=n(3231),i=n(9646),o=function(t){return function(e,n,o){var a,l=r(e),c=i(l),h=s(o,c);if(t&&n!=n){for(;c>h;)if((a=l[h++])!=a)return!0}else for(;c>h;h++)if((t||h in l)&&l[h]===n)return t||h||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},7079:function(t,e,n){var r=n(5968),s=r({}.toString),i=r("".slice);t.exports=function(t){return i(s(t),8,-1)}},7081:function(t,e,n){var r=n(8270),s=n(4826),i=n(7933),o=n(1787);t.exports=function(t,e,n){for(var a=s(e),l=o.f,c=i.f,h=0;h<a.length;h++){var u=a[h];r(t,u)||n&&r(n,u)||l(t,u,c(e,u))}}},5762:function(t,e,n){var r=n(7400),s=n(1787),i=n(5358);t.exports=r?function(t,e,n){return s.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),s=n(1787),i=n(6039),o=n(8400);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&i(n,c,a),a.global)l?t[e]=n:o(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:s.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),s=Object.defineProperty;t.exports=function(t,e){try{s(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),s=n(5052),i=r.document,o=s(i)&&s(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,s,i=n(9859),o=n(598),a=i.process,l=i.Deno,c=a&&a.versions||l&&l.version,h=c&&c.v8;h&&(s=(r=h.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!s&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(s=+r[1]),t.exports=s},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),s=n(7933).f,i=n(5762),o=n(4768),a=n(8400),l=n(7081),c=n(6541);t.exports=function(t,e){var n,h,u,d,f,p=t.target,g=t.global,b=t.stat;if(n=g?r:b?r[p]||a(p,{}):(r[p]||{}).prototype)for(h in e){if(d=e[h],u=t.dontCallGetSet?(f=s(n,h))&&f.value:n[h],!c(g?h:p+(b?".":"#")+h,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;l(d,u)}(t.sham||u&&u.sham)&&i(d,"sham",!0),o(n,h,d,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),s=Function.prototype.call;t.exports=r?s.bind(s):function(){return s.apply(s,arguments)}},1805:function(t,e,n){var r=n(7400),s=n(8270),i=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=s(i,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&o(i,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},5968:function(t,e,n){var r=n(7188),s=Function.prototype,i=s.bind,o=s.call,a=r&&i.bind(o,o);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),s=n(6733),i=function(t){return s(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),s=n(9650);t.exports=function(t,e){var n=t[e];return s(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),s=n(2991),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(s(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),s=n(4229),i=n(2635);t.exports=!r&&!s((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),s=n(4229),i=n(7079),o=Object,a=r("".split);t.exports=s((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):o(t)}:o},8511:function(t,e,n){var r=n(5968),s=n(6733),i=n(5353),o=r(Function.toString);s(i.inspectSource)||(i.inspectSource=function(t){return o(t)}),t.exports=i.inspectSource},6407:function(t,e,n){var r,s,i,o=n(1180),a=n(9859),l=n(5968),c=n(5052),h=n(5762),u=n(8270),d=n(5353),f=n(4399),p=n(5977),g="Object already initialized",b=a.TypeError,m=a.WeakMap;if(o||d.state){var w=d.state||(d.state=new m),v=l(w.get),y=l(w.has),E=l(w.set);r=function(t,e){if(y(w,t))throw b(g);return e.facade=t,E(w,t,e),e},s=function(t){return v(w,t)||{}},i=function(t){return y(w,t)}}else{var S=f("state");p[S]=!0,r=function(t,e){if(u(t,S))throw b(g);return e.facade=t,h(t,S,e),e},s=function(t){return u(t,S)?t[S]:{}},i=function(t){return u(t,S)}}t.exports={set:r,get:s,has:i,enforce:function(t){return i(t)?s(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=s(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),s=n(6733),i=/#|\.prototype\./,o=function(t,e){var n=l[a(t)];return n==h||n!=c&&(s(e)?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},l=o.data={},c=o.NATIVE="N",h=o.POLYFILL="P";t.exports=o},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),s="object"==typeof document&&document.all,i=void 0===s&&void 0!==s;t.exports=i?function(t){return"object"==typeof t?null!==t:r(t)||t===s}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),s=n(6733),i=n(1321),o=n(6969),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return s(e)&&i(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),s=n(6733),i=n(8270),o=n(7400),a=n(1805).CONFIGURABLE,l=n(8511),c=n(6407),h=c.enforce,u=c.get,d=Object.defineProperty,f=o&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),p=String(String).split("String"),g=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(o?d(t,"name",{value:e,configurable:!0}):t.name=e),f&&n&&i(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?o&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=h(t);return i(r,"source")||(r.source=p.join("string"==typeof e?e:"")),t};Function.prototype.toString=g((function(){return s(this)&&u(this).source||l(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,s=n(1176),i=n(219),o=n(3837),a=n(5977),l=n(3777),c=n(2635),h=n(4399),u=h("IE_PROTO"),d=function(){},f=function(t){return"<script>"+t+"</"+"script>"},p=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;g="undefined"!=typeof document?document.domain&&r?p(r):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(r);for(var n=o.length;n--;)delete g.prototype[o[n]];return g()};a[u]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=s(t),n=new d,d.prototype=null,n[u]=t):n=g(),void 0===e?n:i.f(n,e)}},219:function(t,e,n){var r=n(7400),s=n(7137),i=n(1787),o=n(1176),a=n(905),l=n(5632);e.f=r&&!s?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=l(e),c=s.length,h=0;c>h;)i.f(t,n=s[h++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),s=n(4394),i=n(7137),o=n(1176),a=n(9310),l=TypeError,c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",f="writable";e.f=r?i?function(t,e,n){if(o(t),e=a(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&f in n&&!n.writable){var r=h(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:d in n?n.configurable:r.configurable,enumerable:u in n?n.enumerable:r.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=a(e),o(n),s)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),s=n(266),i=n(9195),o=n(5358),a=n(905),l=n(9310),c=n(8270),h=n(4394),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=l(e),h)try{return u(t,e)}catch(t){}if(c(t,e))return o(!s(i.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),s=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,s)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),s=n(8270),i=n(905),o=n(9540).indexOf,a=n(5977),l=r([].push);t.exports=function(t,e){var n,r=i(t),c=0,h=[];for(n in r)!s(a,n)&&s(r,n)&&l(h,n);for(;e.length>c;)s(r,n=e[c++])&&(~o(h,n)||l(h,n));return h}},5632:function(t,e,n){var r=n(140),s=n(3837);t.exports=Object.keys||function(t){return r(t,s)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,s=r&&!n.call({1:2},1);e.f=s?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),s=n(6733),i=n(5052),o=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&s(n=t.toString)&&!i(a=r(n,t)))return a;if(s(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&s(n=t.toString)&&!i(a=r(n,t)))return a;throw o("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),s=n(5968),i=n(8151),o=n(894),a=n(1176),l=s([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=o.f;return n?l(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),s=TypeError;t.exports=function(t){if(r(t))throw s("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),s=n(1441),i=r("keys");t.exports=function(t){return i[t]||(i[t]=s(t))}},5353:function(t,e,n){var r=n(9859),s=n(8400),i="__core-js_shared__",o=r[i]||s(i,{});t.exports=o},3036:function(t,e,n){var r=n(4231),s=n(5353);(t.exports=function(t,e){return s[t]||(s[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),s=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!s((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),s=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?s(n+e,0):i(n,e)}},905:function(t,e,n){var r=n(9337),s=n(8885);t.exports=function(t){return r(s(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),s=Math.min;t.exports=function(t){return t>0?s(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),s=Object;t.exports=function(t){return s(r(t))}},2066:function(t,e,n){var r=n(266),s=n(5052),i=n(9395),o=n(5300),a=n(2914),l=n(95),c=TypeError,h=l("toPrimitive");t.exports=function(t,e){if(!s(t)||i(t))return t;var n,l=o(t,h);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!s(n)||i(n))return n;throw c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),s=n(9395);t.exports=function(t){var e=r(t,"string");return s(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),s=0,i=Math.random(),o=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++s+i,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),s=n(4229);t.exports=r&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),s=n(6733),i=r.WeakMap;t.exports=s(i)&&/native code/.test(String(i))},95:function(t,e,n){var r=n(9859),s=n(3036),i=n(8270),o=n(1441),a=n(4860),l=n(6969),c=s("wks"),h=r.Symbol,u=h&&h.for,d=l?h:h&&h.withoutSetter||o;t.exports=function(t){if(!i(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&i(h,t)?c[t]=h[t]:c[t]=l&&u?u(e):d(e)}return c[t]}},9529:function(t,e,n){"use strict";var r=n(3103),s=n(9540).includes,i=n(4229),o=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return s(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")}},function(t){var e=function(e){return t(t.s=e)};t.O(0,[109],(function(){return e(2165),e(2026),e(4136)}));t.O()}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[450],{1662:function(t,e){"use strict";e.Z={get(t,e,n){if("string"==typeof e){const n=e.toLowerCase();if(t.hasPlugin(n))return function(){return Reflect.get(t,"plugins")[n].getInstance(...arguments)}}return Reflect.get(t,e,n)},has(t,e){if("string"==typeof e){const n=e.toLowerCase();if(t.hasPlugin(n))return!0}return Reflect.has(t,e)}}},5878:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});n(9529);class r{constructor(t){this.snowboard=t}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}class i extends r{}var o={get(t,e,n){if("string"==typeof e){const n=e.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(e))throw new Error(`You cannot use the "${e}" Snowboard method within a plugin.`);if(t.hasPlugin(n))return function(){return Reflect.get(t,"plugins")[n].getInstance(...arguments)}}return Reflect.get(t,e,n)},has(t,e){if("string"==typeof e){const n=e.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(e))return!1;if(t.hasPlugin(n))return!0}return Reflect.has(t,e)}};class s{constructor(t,e,n){this.name=t,this.snowboard=new Proxy(e,o),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(s.prototype),Object.freeze(this)}hasMethod(t){return!this.isFunction()&&"function"==typeof this.instance.prototype[t]}callMethod(){if(this.isFunction())return null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e,i=r.shift();return this.instance.prototype[i](r)}getInstance(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(this.isFunction())return this.instance(...n);if(!this.dependenciesFulfilled()){const t=this.getDependencies().filter((t=>!this.snowboard.getPluginNames().includes(t)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${t.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instances[0][e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instances[0][n]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return r(t,...n)}}))),this.instances[0];Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instance.prototype[e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instance.prototype[n]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return r(t,...n)}})));const i=new this.instance(this.snowboard,...n);return i.detach=()=>this.instances.splice(this.instances.indexOf(i),1),i.construct(...n),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof r==!1}isSingleton(){return this.instance.prototype instanceof i==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=new this.instance(this.snowboard,...e);r.detach=()=>this.instances.splice(this.instances.indexOf(r),1),r.construct(...e),this.instances.push(r),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((t=>t.toLowerCase()))}dependenciesFulfilled(){const t=this.getDependencies();let e=!0;return t.forEach((t=>{this.snowboard.hasPlugin(t)||(e=!1)})),e}mock(t,e){var n=this;if(!this.isFunction()){if(!this.instance.prototype[t])throw new Error(`Function "${t}" does not exist and cannot be mocked`);this.mocks[t]=e,this.originalFunctions[t]=this.instance.prototype[t],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][t]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e(n,...r)})}}unmock(t){this.isFunction()||this.mocks[t]&&(this.isSingleton()&&(this.instances[0][t]=this.originalFunctions[t]),delete this.mocks[t],delete this.originalFunctions[t])}}var a=n(26);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class f extends i{construct(){this.defaults={expires:null,path:"/",domain:null,secure:!1,sameSite:"Lax"}}setDefaults(t){if("object"!=typeof t)throw new Error("Cookie defaults must be provided as an object");Object.entries(t).forEach((t=>{const[e,n]=t;void 0!==this.defaults[e]&&(this.defaults[e]=n)}))}getDefaults(){const t={};return Object.entries(this.defaults).forEach((e=>{const[n,r]=e;null!==this.defaults[n]&&(t[n]=r)})),t}get(t){if(void 0===t){const t=a.Z.get();return Object.entries(t).forEach((e=>{const[n,r]=e;this.snowboard.globalEvent("cookie.get",n,r,(e=>{t[n]=e}))})),t}let e=a.Z.get(t);return this.snowboard.globalEvent("cookie.get",t,e,(t=>{e=t})),e}set(t,e,n){let r=e;return this.snowboard.globalEvent("cookie.set",t,e,(t=>{r=t})),a.Z.set(t,r,u(u({},this.getDefaults()),n))}remove(t,e){a.Z.remove(t,u(u({},this.getDefaults()),e))}}class h extends i{construct(){window.wnJSON=t=>this.parse(t),window.ocJSON=window.wnJSON}parse(t){const e=this.parseString(t);return JSON.parse(e)}parseString(t){let e=t.trim();if(!e.length)throw new Error("Broken JSON object.");let n="",r=null,i=null,o="";for(;e&&","===e[0];)e=e.substr(1);if('"'===e[0]||"'"===e[0]){if(e[e.length-1]!==e[0])throw new Error("Invalid string JSON object.");o='"';for(let t=1;t<e.length;t+=1)if("\\"===e[t])"'"===e[t+1]||(o+=e[t]),o+=e[t+1],t+=1;else{if(e[t]===e[0])return o+='"',o;'"'===e[t]?o+='\\"':o+=e[t]}throw new Error("Invalid string JSON object.")}if("true"===e||"false"===e)return e;if("null"===e)return"null";const s=parseFloat(e);if(!Number.isNaN(s))return s.toString();if("{"===e[0]){r="needKey",i=null,n="{";for(let t=1;t<e.length;t+=1)if(!this.isBlankChar(e[t]))if("needKey"!==r||'"'!==e[t]&&"'"!==e[t]){if("needKey"===r&&this.canBeKeyHead(e[t]))i=this.parseKey(e,t),n+='"',n+=i,n+='"',t+=i.length-1,r="afterKey";else if("afterKey"===r&&":"===e[t])n+=":",r=":";else if(":"===r)o=this.getBody(e,t),t=t+o.originLength-1,n+=this.parseString(o.body),r="afterBody";else if("afterBody"===r||"needKey"===r){let i=t;for(;","===e[i]||this.isBlankChar(e[i]);)i+=1;if("}"===e[i]&&i===e.length-1){for(;","===n[n.length-1];)n=n.substr(0,n.length-1);return n+="}",n}i!==t&&"{"!==n&&(n+=",",r="needKey",t=i-1)}}else i=this.parseKey(e,t+1,e[t]),n+=`"${i}"`,t+=i.length,t+=1,r="afterKey";throw new Error(`Broken JSON object near ${n}`)}if("["===e[0]){n="[",r="needBody";for(let t=1;t<e.length;t+=1)if(" "!==e[t]&&"\n"!==e[t]&&"\t"!==e[t])if("needBody"===r){if(","===e[t]){n+="null,";continue}if("]"===e[t]&&t===e.length-1)return","===n[n.length-1]&&(n=n.substr(0,n.length-1)),n+="]",n;o=this.getBody(e,t),t=t+o.originLength-1,n+=this.parseString(o.body),r="afterBody"}else if("afterBody"===r)if(","===e[t])for(n+=",",r="needBody";","===e[t+1]||this.isBlankChar(e[t+1]);)","===e[t+1]&&(n+="null,"),t+=1;else if("]"===e[t]&&t===e.length-1)return n+="]",n;throw new Error(`Broken JSON array near ${n}`)}return""}getBody(t,e){let n="";if('"'===t[e]||"'"===t[e]){n=t[e];for(let r=e+1;r<t.length;r+=1)if("\\"===t[r])n+=t[r],r+1<t.length&&(n+=t[r+1]),r+=1;else{if(t[r]===t[e])return n+=t[e],{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON string body near ${n}`)}if("t"===t[e]){if(t.indexOf("true",e)===e)return{originLength:"true".length,body:"true"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("f"===t[e]){if(t.indexOf("f",e)===e)return{originLength:"false".length,body:"false"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("n"===t[e]){if(t.indexOf("null",e)===e)return{originLength:"null".length,body:"null"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("-"===t[e]||"+"===t[e]||"."===t[e]||t[e]>="0"&&t[e]<="9"){n="";for(let r=e;r<t.length;r+=1){if(!("-"===t[r]||"+"===t[r]||"."===t[r]||t[r]>="0"&&t[r]<="9"))return{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===t[e]||"["===t[e]){const r=[t[e]];n=t[e];for(let i=e+1;i<t.length;i+=1){if(n+=t[i],"\\"===t[i])i+1<t.length&&(n+=t[i+1]),i+=1;else if('"'===t[i])'"'===r[r.length-1]?r.pop():"'"!==r[r.length-1]&&r.push(t[i]);else if("'"===t[i])"'"===r[r.length-1]?r.pop():'"'!==r[r.length-1]&&r.push(t[i]);else if('"'!==r[r.length-1]&&"'"!==r[r.length-1])if("{"===t[i])r.push("{");else if("}"===t[i]){if("{"!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}else if("["===t[i])r.push("[");else if("]"===t[i]){if("["!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}if(!r.length)return{originLength:i-e,body:n}}throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`)}throw new Error(`Broken JSON body near ${t.substr(e-5>=0?e-5:0,50)}`)}parseKey(t,e,n){let r="";for(let i=e;i<t.length;i+=1){if(n&&n===t[i])return r;if(!n&&(" "===t[i]||":"===t[i]))return r;r+=t[i],"\\"===t[i]&&i+1<t.length&&(r+=t[i+1],i+=1)}throw new Error(`Broken JSON syntax near ${r}`)}canBeKeyHead(t){return"\\"!==t[0]&&(t[0]>="a"&&t[0]<="z"||t[0]>="A"&&t[0]<="Z"||"_"===t[0]||(t[0]>="0"&&t[0]<="9"||("$"===t[0]||t.charCodeAt(0)>255)))}isBlankChar(t){return" "===t||"\n"===t||"\t"===t}}class g extends i{construct(){window.wnSanitize=t=>this.sanitize(t),window.ocSanitize=window.wnSanitize}sanitize(t,e){const n=(new DOMParser).parseFromString(t,"text/html"),r=void 0===e||"boolean"!=typeof e||e;return this.sanitizeNode(n.getRootNode()),r?n.body.innerHTML:n.innerHTML}sanitizeNode(t){if("SCRIPT"===t.tagName)return void t.remove();this.trimAttributes(t);Array.from(t.children).forEach((t=>{this.sanitizeNode(t)}))}trimAttributes(t){if(t.attributes)for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes.item(e).name,r=t.attributes.item(e).value;0!==n.indexOf("on")&&0!==r.indexOf("javascript:")||t.removeAttribute(n)}}}class d extends i{construct(){this.foundBaseUrl=null,this.baseUrl()}to(t){if(t.match(/[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i))return t;const e=t.replace(/^\/+/,"");return`${this.baseUrl()}${e}`}baseUrl(){if(null!==this.foundBaseUrl)return this.foundBaseUrl;if(null!==document.querySelector('script[data-module="snowboard-base"]'))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl),this.foundBaseUrl;if(null!==document.querySelector("base"))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector("base").getAttribute("href")),this.foundBaseUrl;const t=[window.location.protocol,"//",window.location.host,"/"];return this.foundBaseUrl=t.join(""),this.foundBaseUrl}validateBaseUrl(t){const e=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i.exec(t),n=e[2],r=e[4];if(n&&-1===["http","https"].indexOf(n.toLowerCase()))throw new Error("Invalid base URL detected");if(!r)throw new Error("Invalid base URL detected");return"/"===t.substr(-1)?t:`${t}/`}}class p{constructor(t,e){this.debugEnabled="boolean"==typeof e&&!0===e,this.autoInitSingletons="boolean"==typeof t&&!1===t,this.plugins={},this.listeners={},this.foundBaseUrl=null,this.readiness={dom:!1},Object.seal(this.readiness),this.attachAbstracts(),Object.freeze(p.prototype),Object.freeze(this),this.loadUtilities(),this.initialise(),this.debug("Snowboard framework initialised")}attachAbstracts(){this.PluginBase=r,this.Singleton=i,Object.freeze(this.PluginBase.prototype),Object.freeze(this.PluginBase),Object.freeze(this.Singleton.prototype),Object.freeze(this.Singleton)}loadUtilities(){this.addPlugin("cookie",f),this.addPlugin("jsonParser",h),this.addPlugin("sanitizer",g),this.addPlugin("url",d)}initialise(){window.addEventListener("DOMContentLoaded",(()=>{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((t=>{t.isSingleton()&&t.dependenciesFulfilled()&&t.initialiseSingleton()}))}addPlugin(t,e){const n=t.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${t}" is already registered.`);if("function"!=typeof e&&e instanceof r==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[t]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new s(n,this,e),this.debug(`Plugin "${t}" registered`),Object.values(this.getPlugins()).forEach((t=>{if(t.isSingleton()&&!t.isInitialised()&&t.dependenciesFulfilled()&&t.hasMethod("listens")&&Object.keys(t.callMethod("listens")).includes("ready")&&this.readiness.dom){const e=t.callMethod("listens").ready;t.callMethod(e)}}))}removePlugin(t){const e=t.toLowerCase();this.hasPlugin(e)?(this.plugins[e].getInstances().forEach((t=>{t.destruct()})),delete this.plugins[e],delete this[e],delete this[t],this.debug(`Plugin "${t}" removed`)):this.debug(`Plugin "${t}" already removed`)}hasPlugin(t){const e=t.toLowerCase();return void 0!==this.plugins[e]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(t){const e=t.toLowerCase();if(!this.hasPlugin(e))throw new Error(`No plugin called "${e}" has been registered.`);return this.plugins[e]}listensToEvent(t){const e=[];return Object.entries(this.plugins).forEach((n=>{const[r,i]=n;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;"string"==typeof i.callMethod("listens")[t]&&e.push(r)})),e}ready(t){this.readiness.dom&&t(),this.on("ready",t)}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){if(!this.listeners[t])return;const n=this.listeners[t].indexOf(e);-1!==n&&this.listeners[t].splice(n,1)}globalEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global event "${t}"`,...n);const i=this.listensToEvent(t);if(0===i.length)return this.debug(`No listeners found for global event "${t}"`),!0;this.debug(`Listeners found for global event "${t}": ${i.join(", ")}`);let o=!1;return i.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const i=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!o){if(!r[i])throw new Error(`Missing "${i}" method in "${e}" plugin`);try{!1===r[i](...n)&&(o=!0,this.debug(`Global event "${t}" cancelled by "${e}" plugin`))}catch(n){this.error(`Error thrown in "${t}" event by "${e}" plugin.`,n)}}}))})),!o&&this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global event "${t}"`),this.listeners[t].forEach((e=>{if(!o)try{!1===e(...n)&&(o=!0,this.debug(`Global event "${t} cancelled by an ad-hoc listener.`))}catch(e){this.error(`Error thrown in "${t}" event by an ad-hoc listener.`,e)}}))),!o}globalPromiseEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global promise event "${t}"`);const i=this.listensToEvent(t);if(0===i.length)return this.debug(`No listeners found for global promise event "${t}"`),Promise.resolve();this.debug(`Listeners found for global promise event "${t}": ${i.join(", ")}`);const o=[];return i.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const i=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!r[i])throw new Error(`Missing "${i}" method in "${e}" plugin`);try{const t=r[i](...n);if(t instanceof Promise==!1)return;o.push(t)}catch(n){this.error(`Error thrown in "${t}" promise event by "${e}" plugin.`,n)}}))})),this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global promise event "${t}"`),this.listeners[t].forEach((e=>{try{const t=e(...n);if(t instanceof Promise==!1)return;o.push(t)}catch(e){this.error(`Error thrown in "${t}" promise event by an ad-hoc listener.`,e)}}))),0===o.length?Promise.resolve():Promise.all(o)}logMessage(t,e,n){console.groupCollapsed("%c[Snowboard]",`color: ${t}; font-weight: ${e?"bold":"normal"};`,n);for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(i.length){console.groupCollapsed(`%cParameters %c(${i.length})`,"color: rgb(45, 167, 199); font-weight: bold;","color: rgb(88, 88, 88); font-weight: normal;");let t=0;i.forEach((e=>{t+=1,console.log(`%c${t}:`,"color: rgb(88, 88, 88); font-weight: normal;",e)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}debug(t){if(this.debugEnabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}}error(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(229, 35, 35)",!0,t,...n)}}},2165:function(t,e,n){"use strict";var r=n(5878),i=n(1662);(t=>{const e=new Proxy(new r.Z(!0,!0),i.Z);t.snowboard=e,t.Snowboard=e,t.SnowBoard=e})(window)},7111:function(t,e,n){var r=n(6733),i=n(9821),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),i=n(2391),o=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),i=n(3231),o=n(9646),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},7081:function(t,e,n){var r=n(8270),i=n(4826),o=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},5762:function(t,e,n){var r=n(7400),i=n(1787),o=n(5358);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),i=n(1787),o=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),i=n(5052),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,i,o=n(9859),s=n(598),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),i=n(7933).f,o=n(5762),s=n(4768),a=n(8400),c=n(7081),u=n(6541);t.exports=function(t,e){var n,l,f,h,g,d=t.target,p=t.global,b=t.stat;if(n=p?r:b?r[d]||a(d,{}):(r[d]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(g=i(n,l))&&g.value:n[l],!u(p?l:d+(b?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(t.sham||f&&f.sham)&&o(h,"sham",!0),s(n,l,h,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1805:function(t,e,n){var r=n(7400),i=n(8270),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},5968:function(t,e,n){var r=n(7188),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),i=n(6733),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),i=n(9650);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),i=n(2991),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),i=n(4229),o=n(2635);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),i=n(4229),o=n(7079),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),i=n(6733),o=n(5353),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},6407:function(t,e,n){var r,i,o,s=n(1180),a=n(9859),c=n(5968),u=n(5052),l=n(5762),f=n(8270),h=n(5353),g=n(4399),d=n(5977),p="Object already initialized",b=a.TypeError,y=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new y),w=c(v.get),m=c(v.has),O=c(v.set);r=function(t,e){if(m(v,t))throw b(p);return e.facade=t,O(v,t,e),e},i=function(t){return w(v,t)||{}},o=function(t){return m(v,t)}}else{var S=g("state");d[S]=!0,r=function(t,e){if(f(t,S))throw b(p);return e.facade=t,l(t,S,e),e},i=function(t){return f(t,S)?t[S]:{}},o=function(t){return f(t,S)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),i=n(6733),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),i="object"==typeof document&&document.all,o=void 0===i&&void 0!==i;t.exports=o?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),i=n(6733),o=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),i=n(6733),o=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,c=n(8511),u=n(6407),l=u.enforce,f=u.get,h=Object.defineProperty,g=s&&!r((function(){return 8!==h((function(){}),"length",{value:8}).length})),d=String(String).split("String"),p=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&o(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return o(r,"source")||(r.source=d.join("string"==typeof e?e:"")),t};Function.prototype.toString=p((function(){return i(this)&&f(this).source||c(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,i=n(1176),o=n(219),s=n(3837),a=n(5977),c=n(3777),u=n(2635),l=n(4399),f=l("IE_PROTO"),h=function(){},g=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;p="undefined"!=typeof document?document.domain&&r?d(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete p.prototype[s[n]];return p()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=i(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:o.f(n,e)}},219:function(t,e,n){var r=n(7400),i=n(7137),o=n(1787),s=n(1176),a=n(905),c=n(5632);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,n=i[l++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),i=n(4394),o=n(7137),s=n(1176),a=n(9310),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",g="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&g in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:h in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),i=n(266),o=n(9195),s=n(5358),a=n(905),c=n(9310),u=n(8270),l=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),i=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),i=n(8270),o=n(905),s=n(9540).indexOf,a=n(5977),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},5632:function(t,e,n){var r=n(140),i=n(3837);t.exports=Object.keys||function(t){return r(t,i)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),i=n(6733),o=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),i=n(5968),o=n(8151),s=n(894),a=n(1176),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),i=n(1441),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5353:function(t,e,n){var r=n(9859),i=n(8400),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},3036:function(t,e,n){var r=n(4231),i=n(5353);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),i=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},905:function(t,e,n){var r=n(9337),i=n(8885);t.exports=function(t){return r(i(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),i=Object;t.exports=function(t){return i(r(t))}},2066:function(t,e,n){var r=n(266),i=n(5052),o=n(9395),s=n(5300),a=n(2914),c=n(95),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),i=n(9395);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),i=n(4229);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),i=n(6733),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},95:function(t,e,n){var r=n(9859),i=n(3036),o=n(8270),s=n(1441),a=n(4860),c=n(6969),u=i("wks"),l=r.Symbol,f=l&&l.for,h=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&o(l,t)?u[t]=l[t]:u[t]=c&&f?f(e):h(e)}return u[t]}},9529:function(t,e,n){"use strict";var r=n(3103),i=n(9540).includes,o=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){t.O(0,[109],(function(){return e=2165,t(t.s=e);var e}));t.O()}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[243],{1662:function(t,e){"use strict";e.Z={get(t,e,n){if("string"==typeof e){const n=e.toLowerCase();if(t.hasPlugin(n))return function(){return Reflect.get(t,"plugins")[n].getInstance(...arguments)}}return Reflect.get(t,e,n)},has(t,e){if("string"==typeof e){const n=e.toLowerCase();if(t.hasPlugin(n))return!0}return Reflect.has(t,e)}}},5878:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});n(9529);class r{constructor(t){this.snowboard=t}construct(){}dependencies(){return[]}listens(){return{}}destruct(){this.detach(),delete this.snowboard}destructor(){this.destruct()}}class i extends r{}var o={get(t,e,n){if("string"==typeof e){const n=e.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(e))throw new Error(`You cannot use the "${e}" Snowboard method within a plugin.`);if(t.hasPlugin(n))return function(){return Reflect.get(t,"plugins")[n].getInstance(...arguments)}}return Reflect.get(t,e,n)},has(t,e){if("string"==typeof e){const n=e.toLowerCase();if(["attachAbstracts","loadUtilities","initialise","initialiseSingletons"].includes(e))return!1;if(t.hasPlugin(n))return!0}return Reflect.has(t,e)}};class s{constructor(t,e,n){this.name=t,this.snowboard=new Proxy(e,o),this.instance=n,Object.freeze(this.instance),this.instances=[],this.singleton={initialised:!1},Object.seal(this.singleton),this.mocks={},this.originalFunctions={},Object.freeze(s.prototype),Object.freeze(this)}hasMethod(t){return!this.isFunction()&&"function"==typeof this.instance.prototype[t]}callMethod(){if(this.isFunction())return null;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=e,i=r.shift();return this.instance.prototype[i](r)}getInstance(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];if(this.isFunction())return this.instance(...n);if(!this.dependenciesFulfilled()){const t=this.getDependencies().filter((t=>!this.snowboard.getPluginNames().includes(t)));throw new Error(`The "${this.name}" plugin requires the following plugins: ${t.join(", ")}`)}if(this.isSingleton())return 0===this.instances.length&&this.initialiseSingleton(...n),Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instances[0][e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instances[0][n]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return r(t,...n)}}))),this.instances[0];Object.keys(this.mocks).length>0&&(Object.entries(this.originalFunctions).forEach((t=>{const[e,n]=t;this.instance.prototype[e]=n})),Object.entries(this.mocks).forEach((e=>{const[n,r]=e;this.instance.prototype[n]=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return r(t,...n)}})));const i=new this.instance(this.snowboard,...n);return i.detach=()=>this.instances.splice(this.instances.indexOf(i),1),i.construct(...n),this.instances.push(i),i}getInstances(){return this.isFunction()?[]:this.instances}isFunction(){return"function"==typeof this.instance&&this.instance.prototype instanceof r==!1}isSingleton(){return this.instance.prototype instanceof i==!0}isInitialised(){return!this.isSingleton()||this.singleton.initialised}initialiseSingleton(){if(!this.isSingleton())return;for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r=new this.instance(this.snowboard,...e);r.detach=()=>this.instances.splice(this.instances.indexOf(r),1),r.construct(...e),this.instances.push(r),this.singleton.initialised=!0}getDependencies(){return this.isFunction()||"function"!=typeof this.instance.prototype.dependencies?[]:this.instance.prototype.dependencies().map((t=>t.toLowerCase()))}dependenciesFulfilled(){const t=this.getDependencies();let e=!0;return t.forEach((t=>{this.snowboard.hasPlugin(t)||(e=!1)})),e}mock(t,e){var n=this;if(!this.isFunction()){if(!this.instance.prototype[t])throw new Error(`Function "${t}" does not exist and cannot be mocked`);this.mocks[t]=e,this.originalFunctions[t]=this.instance.prototype[t],this.isSingleton()&&0===this.instances.length&&(this.initialiseSingleton(),this.instances[0][t]=function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e(n,...r)})}}unmock(t){this.isFunction()||this.mocks[t]&&(this.isSingleton()&&(this.instances[0][t]=this.originalFunctions[t]),delete this.mocks[t],delete this.originalFunctions[t])}}var a=n(26);function c(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?c(Object(n),!0).forEach((function(e){l(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class f extends i{construct(){this.defaults={expires:null,path:"/",domain:null,secure:!1,sameSite:"Lax"}}setDefaults(t){if("object"!=typeof t)throw new Error("Cookie defaults must be provided as an object");Object.entries(t).forEach((t=>{const[e,n]=t;void 0!==this.defaults[e]&&(this.defaults[e]=n)}))}getDefaults(){const t={};return Object.entries(this.defaults).forEach((e=>{const[n,r]=e;null!==this.defaults[n]&&(t[n]=r)})),t}get(t){if(void 0===t){const t=a.Z.get();return Object.entries(t).forEach((e=>{const[n,r]=e;this.snowboard.globalEvent("cookie.get",n,r,(e=>{t[n]=e}))})),t}let e=a.Z.get(t);return this.snowboard.globalEvent("cookie.get",t,e,(t=>{e=t})),e}set(t,e,n){let r=e;return this.snowboard.globalEvent("cookie.set",t,e,(t=>{r=t})),a.Z.set(t,r,u(u({},this.getDefaults()),n))}remove(t,e){a.Z.remove(t,u(u({},this.getDefaults()),e))}}class h extends i{construct(){window.wnJSON=t=>this.parse(t),window.ocJSON=window.wnJSON}parse(t){const e=this.parseString(t);return JSON.parse(e)}parseString(t){let e=t.trim();if(!e.length)throw new Error("Broken JSON object.");let n="",r=null,i=null,o="";for(;e&&","===e[0];)e=e.substr(1);if('"'===e[0]||"'"===e[0]){if(e[e.length-1]!==e[0])throw new Error("Invalid string JSON object.");o='"';for(let t=1;t<e.length;t+=1)if("\\"===e[t])"'"===e[t+1]||(o+=e[t]),o+=e[t+1],t+=1;else{if(e[t]===e[0])return o+='"',o;'"'===e[t]?o+='\\"':o+=e[t]}throw new Error("Invalid string JSON object.")}if("true"===e||"false"===e)return e;if("null"===e)return"null";const s=parseFloat(e);if(!Number.isNaN(s))return s.toString();if("{"===e[0]){r="needKey",i=null,n="{";for(let t=1;t<e.length;t+=1)if(!this.isBlankChar(e[t]))if("needKey"!==r||'"'!==e[t]&&"'"!==e[t]){if("needKey"===r&&this.canBeKeyHead(e[t]))i=this.parseKey(e,t),n+='"',n+=i,n+='"',t+=i.length-1,r="afterKey";else if("afterKey"===r&&":"===e[t])n+=":",r=":";else if(":"===r)o=this.getBody(e,t),t=t+o.originLength-1,n+=this.parseString(o.body),r="afterBody";else if("afterBody"===r||"needKey"===r){let i=t;for(;","===e[i]||this.isBlankChar(e[i]);)i+=1;if("}"===e[i]&&i===e.length-1){for(;","===n[n.length-1];)n=n.substr(0,n.length-1);return n+="}",n}i!==t&&"{"!==n&&(n+=",",r="needKey",t=i-1)}}else i=this.parseKey(e,t+1,e[t]),n+=`"${i}"`,t+=i.length,t+=1,r="afterKey";throw new Error(`Broken JSON object near ${n}`)}if("["===e[0]){n="[",r="needBody";for(let t=1;t<e.length;t+=1)if(" "!==e[t]&&"\n"!==e[t]&&"\t"!==e[t])if("needBody"===r){if(","===e[t]){n+="null,";continue}if("]"===e[t]&&t===e.length-1)return","===n[n.length-1]&&(n=n.substr(0,n.length-1)),n+="]",n;o=this.getBody(e,t),t=t+o.originLength-1,n+=this.parseString(o.body),r="afterBody"}else if("afterBody"===r)if(","===e[t])for(n+=",",r="needBody";","===e[t+1]||this.isBlankChar(e[t+1]);)","===e[t+1]&&(n+="null,"),t+=1;else if("]"===e[t]&&t===e.length-1)return n+="]",n;throw new Error(`Broken JSON array near ${n}`)}return""}getBody(t,e){let n="";if('"'===t[e]||"'"===t[e]){n=t[e];for(let r=e+1;r<t.length;r+=1)if("\\"===t[r])n+=t[r],r+1<t.length&&(n+=t[r+1]),r+=1;else{if(t[r]===t[e])return n+=t[e],{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON string body near ${n}`)}if("t"===t[e]){if(t.indexOf("true",e)===e)return{originLength:"true".length,body:"true"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("f"===t[e]){if(t.indexOf("f",e)===e)return{originLength:"false".length,body:"false"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("n"===t[e]){if(t.indexOf("null",e)===e)return{originLength:"null".length,body:"null"};throw new Error(`Broken JSON boolean body near ${t.substr(0,e+10)}`)}if("-"===t[e]||"+"===t[e]||"."===t[e]||t[e]>="0"&&t[e]<="9"){n="";for(let r=e;r<t.length;r+=1){if(!("-"===t[r]||"+"===t[r]||"."===t[r]||t[r]>="0"&&t[r]<="9"))return{originLength:n.length,body:n};n+=t[r]}throw new Error(`Broken JSON number body near ${n}`)}if("{"===t[e]||"["===t[e]){const r=[t[e]];n=t[e];for(let i=e+1;i<t.length;i+=1){if(n+=t[i],"\\"===t[i])i+1<t.length&&(n+=t[i+1]),i+=1;else if('"'===t[i])'"'===r[r.length-1]?r.pop():"'"!==r[r.length-1]&&r.push(t[i]);else if("'"===t[i])"'"===r[r.length-1]?r.pop():'"'!==r[r.length-1]&&r.push(t[i]);else if('"'!==r[r.length-1]&&"'"!==r[r.length-1])if("{"===t[i])r.push("{");else if("}"===t[i]){if("{"!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}else if("["===t[i])r.push("[");else if("]"===t[i]){if("["!==r[r.length-1])throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`);r.pop()}if(!r.length)return{originLength:i-e,body:n}}throw new Error(`Broken JSON ${"{"===t[e]?"object":"array"} body near ${n}`)}throw new Error(`Broken JSON body near ${t.substr(e-5>=0?e-5:0,50)}`)}parseKey(t,e,n){let r="";for(let i=e;i<t.length;i+=1){if(n&&n===t[i])return r;if(!n&&(" "===t[i]||":"===t[i]))return r;r+=t[i],"\\"===t[i]&&i+1<t.length&&(r+=t[i+1],i+=1)}throw new Error(`Broken JSON syntax near ${r}`)}canBeKeyHead(t){return"\\"!==t[0]&&(t[0]>="a"&&t[0]<="z"||t[0]>="A"&&t[0]<="Z"||"_"===t[0]||(t[0]>="0"&&t[0]<="9"||("$"===t[0]||t.charCodeAt(0)>255)))}isBlankChar(t){return" "===t||"\n"===t||"\t"===t}}class g extends i{construct(){window.wnSanitize=t=>this.sanitize(t),window.ocSanitize=window.wnSanitize}sanitize(t,e){const n=(new DOMParser).parseFromString(t,"text/html"),r=void 0===e||"boolean"!=typeof e||e;return this.sanitizeNode(n.getRootNode()),r?n.body.innerHTML:n.innerHTML}sanitizeNode(t){if("SCRIPT"===t.tagName)return void t.remove();this.trimAttributes(t);Array.from(t.children).forEach((t=>{this.sanitizeNode(t)}))}trimAttributes(t){if(t.attributes)for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes.item(e).name,r=t.attributes.item(e).value;0!==n.indexOf("on")&&0!==r.indexOf("javascript:")||t.removeAttribute(n)}}}class d extends i{construct(){this.foundBaseUrl=null,this.baseUrl()}to(t){if(t.match(/[-a-z0-9_+:]+:\/\/[-a-z0-9@:%._+~#=]{1,256}\.[a-z0-9()]{1,6}\b([-a-z0-9()@:%_+.~#?&//=]*)/i))return t;const e=t.replace(/^\/+/,"");return`${this.baseUrl()}${e}`}baseUrl(){if(null!==this.foundBaseUrl)return this.foundBaseUrl;if(null!==document.querySelector('script[data-module="snowboard-base"]'))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector('script[data-module="snowboard-base"]').dataset.baseUrl),this.foundBaseUrl;if(null!==document.querySelector("base"))return this.foundBaseUrl=this.validateBaseUrl(document.querySelector("base").getAttribute("href")),this.foundBaseUrl;const t=[window.location.protocol,"//",window.location.host,"/"];return this.foundBaseUrl=t.join(""),this.foundBaseUrl}validateBaseUrl(t){const e=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/i.exec(t),n=e[2],r=e[4];if(n&&-1===["http","https"].indexOf(n.toLowerCase()))throw new Error("Invalid base URL detected");if(!r)throw new Error("Invalid base URL detected");return"/"===t.substr(-1)?t:`${t}/`}}class p{constructor(t,e){this.debugEnabled="boolean"==typeof e&&!0===e,this.autoInitSingletons="boolean"==typeof t&&!1===t,this.plugins={},this.listeners={},this.foundBaseUrl=null,this.readiness={dom:!1},Object.seal(this.readiness),this.attachAbstracts(),Object.freeze(p.prototype),Object.freeze(this),this.loadUtilities(),this.initialise(),this.debug("Snowboard framework initialised")}attachAbstracts(){this.PluginBase=r,this.Singleton=i,Object.freeze(this.PluginBase.prototype),Object.freeze(this.PluginBase),Object.freeze(this.Singleton.prototype),Object.freeze(this.Singleton)}loadUtilities(){this.addPlugin("cookie",f),this.addPlugin("jsonParser",h),this.addPlugin("sanitizer",g),this.addPlugin("url",d)}initialise(){window.addEventListener("DOMContentLoaded",(()=>{this.autoInitSingletons&&this.initialiseSingletons(),this.globalEvent("ready"),this.readiness.dom=!0}))}initialiseSingletons(){Object.values(this.plugins).forEach((t=>{t.isSingleton()&&t.dependenciesFulfilled()&&t.initialiseSingleton()}))}addPlugin(t,e){const n=t.toLowerCase();if(this.hasPlugin(n))throw new Error(`A plugin called "${t}" is already registered.`);if("function"!=typeof e&&e instanceof r==!1)throw new Error("The provided plugin must extend the PluginBase class, or must be a callback function.");if(void 0!==this[t]||void 0!==this[n])throw new Error("The given name is already in use for a property or method of the Snowboard class.");this.plugins[n]=new s(n,this,e),this.debug(`Plugin "${t}" registered`),Object.values(this.getPlugins()).forEach((t=>{if(t.isSingleton()&&!t.isInitialised()&&t.dependenciesFulfilled()&&t.hasMethod("listens")&&Object.keys(t.callMethod("listens")).includes("ready")&&this.readiness.dom){const e=t.callMethod("listens").ready;t.callMethod(e)}}))}removePlugin(t){const e=t.toLowerCase();this.hasPlugin(e)?(this.plugins[e].getInstances().forEach((t=>{t.destruct()})),delete this.plugins[e],delete this[e],delete this[t],this.debug(`Plugin "${t}" removed`)):this.debug(`Plugin "${t}" already removed`)}hasPlugin(t){const e=t.toLowerCase();return void 0!==this.plugins[e]}getPlugins(){return this.plugins}getPluginNames(){return Object.keys(this.plugins)}getPlugin(t){const e=t.toLowerCase();if(!this.hasPlugin(e))throw new Error(`No plugin called "${e}" has been registered.`);return this.plugins[e]}listensToEvent(t){const e=[];return Object.entries(this.plugins).forEach((n=>{const[r,i]=n;if(i.isFunction())return;if(!i.dependenciesFulfilled())return;if(!i.hasMethod("listens"))return;"string"==typeof i.callMethod("listens")[t]&&e.push(r)})),e}ready(t){this.readiness.dom&&t(),this.on("ready",t)}on(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].includes(e)||this.listeners[t].push(e)}off(t,e){if(!this.listeners[t])return;const n=this.listeners[t].indexOf(e);-1!==n&&this.listeners[t].splice(n,1)}globalEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global event "${t}"`,...n);const i=this.listensToEvent(t);if(0===i.length)return this.debug(`No listeners found for global event "${t}"`),!0;this.debug(`Listeners found for global event "${t}": ${i.join(", ")}`);let o=!1;return i.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const i=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!o){if(!r[i])throw new Error(`Missing "${i}" method in "${e}" plugin`);try{!1===r[i](...n)&&(o=!0,this.debug(`Global event "${t}" cancelled by "${e}" plugin`))}catch(n){this.error(`Error thrown in "${t}" event by "${e}" plugin.`,n)}}}))})),!o&&this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global event "${t}"`),this.listeners[t].forEach((e=>{if(!o)try{!1===e(...n)&&(o=!0,this.debug(`Global event "${t} cancelled by an ad-hoc listener.`))}catch(e){this.error(`Error thrown in "${t}" event by an ad-hoc listener.`,e)}}))),!o}globalPromiseEvent(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.debug(`Calling global promise event "${t}"`);const i=this.listensToEvent(t);if(0===i.length)return this.debug(`No listeners found for global promise event "${t}"`),Promise.resolve();this.debug(`Listeners found for global promise event "${t}": ${i.join(", ")}`);const o=[];return i.forEach((e=>{const r=this.getPlugin(e);if(r.isFunction())return;r.isSingleton()&&0===r.getInstances().length&&r.initialiseSingleton();const i=r.callMethod("listens")[t];r.getInstances().forEach((r=>{if(!r[i])throw new Error(`Missing "${i}" method in "${e}" plugin`);try{const t=r[i](...n);if(t instanceof Promise==!1)return;o.push(t)}catch(n){this.error(`Error thrown in "${t}" promise event by "${e}" plugin.`,n)}}))})),this.listeners[t]&&this.listeners[t].length>0&&(this.debug(`Found ${this.listeners[t].length} ad-hoc listener(s) for global promise event "${t}"`),this.listeners[t].forEach((e=>{try{const t=e(...n);if(t instanceof Promise==!1)return;o.push(t)}catch(e){this.error(`Error thrown in "${t}" promise event by an ad-hoc listener.`,e)}}))),0===o.length?Promise.resolve():Promise.all(o)}logMessage(t,e,n){console.groupCollapsed("%c[Snowboard]",`color: ${t}; font-weight: ${e?"bold":"normal"};`,n);for(var r=arguments.length,i=new Array(r>3?r-3:0),o=3;o<r;o++)i[o-3]=arguments[o];if(i.length){console.groupCollapsed(`%cParameters %c(${i.length})`,"color: rgb(45, 167, 199); font-weight: bold;","color: rgb(88, 88, 88); font-weight: normal;");let t=0;i.forEach((e=>{t+=1,console.log(`%c${t}:`,"color: rgb(88, 88, 88); font-weight: normal;",e)})),console.groupEnd(),console.groupCollapsed("%cTrace","color: rgb(45, 167, 199); font-weight: bold;"),console.trace(),console.groupEnd()}else console.trace();console.groupEnd()}log(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}debug(t){if(this.debugEnabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(45, 167, 199)",!1,t,...n)}}error(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.logMessage("rgb(229, 35, 35)",!0,t,...n)}}},6236:function(t,e,n){"use strict";var r=n(5878),i=n(1662);(t=>{const e=new Proxy(new r.Z,i.Z);t.snowboard=e,t.Snowboard=e,t.SnowBoard=e})(window)},7111:function(t,e,n){var r=n(6733),i=n(9821),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),i=n(2391),o=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),i=n(3231),o=n(9646),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},7081:function(t,e,n){var r=n(8270),i=n(4826),o=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},5762:function(t,e,n){var r=n(7400),i=n(1787),o=n(5358);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),i=n(1787),o=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),i=n(5052),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,i,o=n(9859),s=n(598),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),i=n(7933).f,o=n(5762),s=n(4768),a=n(8400),c=n(7081),u=n(6541);t.exports=function(t,e){var n,l,f,h,g,d=t.target,p=t.global,b=t.stat;if(n=p?r:b?r[d]||a(d,{}):(r[d]||{}).prototype)for(l in e){if(h=e[l],f=t.dontCallGetSet?(g=i(n,l))&&g.value:n[l],!u(p?l:d+(b?".":"#")+l,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;c(h,f)}(t.sham||f&&f.sham)&&o(h,"sham",!0),s(n,l,h,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1805:function(t,e,n){var r=n(7400),i=n(8270),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},5968:function(t,e,n){var r=n(7188),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),i=n(6733),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),i=n(9650);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),i=n(2991),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),i=n(4229),o=n(2635);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),i=n(4229),o=n(7079),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),i=n(6733),o=n(5353),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},6407:function(t,e,n){var r,i,o,s=n(1180),a=n(9859),c=n(5968),u=n(5052),l=n(5762),f=n(8270),h=n(5353),g=n(4399),d=n(5977),p="Object already initialized",b=a.TypeError,y=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new y),w=c(v.get),m=c(v.has),O=c(v.set);r=function(t,e){if(m(v,t))throw b(p);return e.facade=t,O(v,t,e),e},i=function(t){return w(v,t)||{}},o=function(t){return m(v,t)}}else{var S=g("state");d[S]=!0,r=function(t,e){if(f(t,S))throw b(p);return e.facade=t,l(t,S,e),e},i=function(t){return f(t,S)?t[S]:{}},o=function(t){return f(t,S)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),i=n(6733),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),i="object"==typeof document&&document.all,o=void 0===i&&void 0!==i;t.exports=o?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),i=n(6733),o=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),i=n(6733),o=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,c=n(8511),u=n(6407),l=u.enforce,f=u.get,h=Object.defineProperty,g=s&&!r((function(){return 8!==h((function(){}),"length",{value:8}).length})),d=String(String).split("String"),p=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?h(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&o(n,"arity")&&t.length!==n.arity&&h(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&h(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return o(r,"source")||(r.source=d.join("string"==typeof e?e:"")),t};Function.prototype.toString=p((function(){return i(this)&&f(this).source||c(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,i=n(1176),o=n(219),s=n(3837),a=n(5977),c=n(3777),u=n(2635),l=n(4399),f=l("IE_PROTO"),h=function(){},g=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(g("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;p="undefined"!=typeof document?document.domain&&r?d(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(g("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete p.prototype[s[n]];return p()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=i(t),n=new h,h.prototype=null,n[f]=t):n=p(),void 0===e?n:o.f(n,e)}},219:function(t,e,n){var r=n(7400),i=n(7137),o=n(1787),s=n(1176),a=n(905),c=n(5632);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,n=i[l++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),i=n(4394),o=n(7137),s=n(1176),a=n(9310),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",g="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&g in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:h in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),i=n(266),o=n(9195),s=n(5358),a=n(905),c=n(9310),u=n(8270),l=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),i=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),i=n(8270),o=n(905),s=n(9540).indexOf,a=n(5977),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},5632:function(t,e,n){var r=n(140),i=n(3837);t.exports=Object.keys||function(t){return r(t,i)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),i=n(6733),o=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),i=n(5968),o=n(8151),s=n(894),a=n(1176),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),i=n(1441),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5353:function(t,e,n){var r=n(9859),i=n(8400),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},3036:function(t,e,n){var r=n(4231),i=n(5353);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),i=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},905:function(t,e,n){var r=n(9337),i=n(8885);t.exports=function(t){return r(i(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),i=Object;t.exports=function(t){return i(r(t))}},2066:function(t,e,n){var r=n(266),i=n(5052),o=n(9395),s=n(5300),a=n(2914),c=n(95),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),i=n(9395);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),i=n(4229);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),i=n(6733),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},95:function(t,e,n){var r=n(9859),i=n(3036),o=n(8270),s=n(1441),a=n(4860),c=n(6969),u=i("wks"),l=r.Symbol,f=l&&l.for,h=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&o(l,t)?u[t]=l[t]:u[t]=c&&f?f(e):h(e)}return u[t]}},9529:function(t,e,n){"use strict";var r=n(3103),i=n(9540).includes,o=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){t.O(0,[109],(function(){return e=6236,t(t.s=e);var e}));t.O()}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[459],{8809:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends window.Snowboard.Singleton{listens(){return{ajaxLoadAssets:"load"}}async load(t){if(t.js&&t.js.length>0)for(const e of t.js)try{await this.loadScript(e)}catch(t){return Promise.reject(t)}if(t.css&&t.css.length>0)for(const e of t.css)try{await this.loadStyle(e)}catch(t){return Promise.reject(t)}if(t.img&&t.img.length>0)for(const e of t.img)try{await this.loadImage(e)}catch(t){return Promise.reject(t)}return Promise.resolve()}loadScript(t){return new Promise(((e,n)=>{if(document.querySelector(`script[src="${t}"]`))return void e();const r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("src",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","script",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","script",t,r),n(new Error(`Unable to load script file: "${t}"`))})),document.body.append(r)}))}loadStyle(t){return new Promise(((e,n)=>{if(document.querySelector(`link[rel="stylesheet"][href="${t}"]`))return void e();const r=document.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("href",t),r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","style",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","style",t,r),n(new Error(`Unable to load stylesheet file: "${t}"`))})),document.head.append(r)}))}loadImage(t){return new Promise(((e,n)=>{const r=new Image;r.addEventListener("load",(()=>{this.snowboard.globalEvent("assetLoader.loaded","image",t,r),e()})),r.addEventListener("error",(()=>{this.snowboard.globalEvent("assetLoader.error","image",t,r),n(new Error(`Unable to load image file: "${t}"`))})),r.src=t}))}}},9553:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ajaxStart:"ajaxStart",ajaxDone:"ajaxDone"}}ajaxStart(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.add(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.add(this.getLoadingClass(e.element))}ajaxDone(t,e){if(e.element)if("FORM"===e.element.tagName){const t=e.element.querySelectorAll("[data-attach-loading]");t.length>0&&t.forEach((t=>{t.classList.remove(this.getLoadingClass(t))}))}else void 0!==e.element.dataset.attachLoading&&e.element.classList.remove(this.getLoadingClass(e.element))}getLoadingClass(t){return void 0!==t.dataset.attachLoading&&""!==t.dataset.attachLoading?t.dataset.attachLoading:"wn-loading"}}},5763:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});n(9529);class r extends Snowboard.PluginBase{construct(t,e){if(t instanceof Snowboard.PluginBase==!1)throw new Error("You must provide a Snowboard plugin to enable data configuration");if(e instanceof HTMLElement==!1)throw new Error("Data configuration can only be extracted from HTML elements");this.instance=t,this.element=e,this.refresh()}get(t){return void 0===t?this.instanceConfig:void 0!==this.instanceConfig[t]?this.instanceConfig[t]:void 0}set(t,e,n){if(void 0===t)throw new Error("You must provide a configuration key to set");this.instanceConfig[t]=e,!0===n&&(this.element.dataset[t]=e)}refresh(){this.acceptedConfigs=this.getAcceptedConfigs(),this.instanceConfig=this.processConfig()}getAcceptedConfigs(){return void 0!==this.instance.acceptAllDataConfigs&&!0===this.instance.acceptAllDataConfigs||void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()&&Object.keys(this.instance.defaults())}getDefaults(){return void 0!==this.instance.defaults&&"function"==typeof this.instance.defaults&&"object"==typeof this.instance.defaults()?this.instance.defaults():{}}processConfig(){const t=this.getDefaults();if(!1===this.acceptedConfigs)return t;for(const e in this.element.dataset)(!0===this.acceptedConfigs||this.acceptedConfigs.includes(e))&&(t[e]=this.coerceValue(this.element.dataset[e]));return t}coerceValue(t){const e=String(t);if("null"===e)return null;if("undefined"!==e){if(e.startsWith("base64:")){const t=e.replace(/^base64:/,""),n=atob(t);return this.coerceValue(n)}if(["true","yes"].includes(e.toLowerCase()))return!0;if(["false","no"].includes(e.toLowerCase()))return!1;if(/^[-+]?[0-9]+(\.[0-9]+)?$/.test(e))return Number(e);try{return this.snowboard.jsonParser().parse(e)}catch(t){return""===e||e}}}}},2270:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n){if(this.message=t,this.type=e||"default",this.duration=Number(n||7),this.duration<0)throw new Error("Flash duration must be a positive number, or zero");this.clear(),this.timer=null,this.flashTimer=null,this.create()}dependencies(){return["transition"]}destruct(){null!==this.timer&&window.clearTimeout(this.timer),this.flashTimer&&this.flashTimer.remove(),this.flash&&(this.flash.remove(),this.flash=null,this.flashTimer=null),super.destruct()}create(){this.snowboard.globalEvent("flash.create",this),this.flash=document.createElement("DIV"),this.flash.innerHTML=this.message,this.flash.classList.add("flash-message",this.type),this.flash.removeAttribute("data-control"),this.flash.addEventListener("click",(()=>this.remove())),this.flash.addEventListener("mouseover",(()=>this.stopTimer())),this.flash.addEventListener("mouseout",(()=>this.startTimer())),this.duration>0?(this.flashTimer=document.createElement("DIV"),this.flashTimer.classList.add("flash-timer"),this.flash.appendChild(this.flashTimer)):this.flash.classList.add("no-timer"),document.body.appendChild(this.flash),this.snowboard.transition(this.flash,"show",(()=>{this.startTimer()}))}remove(){this.snowboard.globalEvent("flash.remove",this),this.stopTimer(),this.snowboard.transition(this.flash,"hide",(()=>{this.flash.remove(),this.flash=null,this.destruct()}))}clear(){document.querySelectorAll("body > div.flash-message").forEach((t=>t.remove()))}startTimer(){0!==this.duration&&(this.timerTrans=this.snowboard.transition(this.flashTimer,"timeout",null,`${this.duration}.0s`,!0),this.timer=window.setTimeout((()=>this.remove()),1e3*this.duration))}stopTimer(){this.timerTrans&&this.timerTrans.cancel(),this.timer&&window.clearTimeout(this.timer)}}},6277:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{dependencies(){return["request"]}listens(){return{ready:"ready",ajaxStart:"ajaxStart"}}ready(){this.counter=0,this.createStripe()}ajaxStart(t){this.show(),t.then((()=>{this.hide()})).catch((()=>{this.hide()}))}createStripe(){this.indicator=document.createElement("DIV"),this.stripe=document.createElement("DIV"),this.stripeLoaded=document.createElement("DIV"),this.indicator.classList.add("stripe-loading-indicator","loaded"),this.stripe.classList.add("stripe"),this.stripeLoaded.classList.add("stripe-loaded"),this.indicator.appendChild(this.stripe),this.indicator.appendChild(this.stripeLoaded),document.body.appendChild(this.indicator)}show(){this.counter+=1;const t=this.stripe.cloneNode(!0);this.indicator.appendChild(t),this.stripe.remove(),this.stripe=t,this.counter>1||(this.indicator.classList.remove("loaded"),document.body.classList.add("wn-loading"))}hide(t){this.counter-=1,!0===t&&(this.counter=0),this.counter<=0&&(this.indicator.classList.add("loaded"),document.body.classList.remove("wn-loading"))}}},8032:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.Singleton{listens(){return{ready:"ready"}}ready(){let t=!1;if(document.querySelectorAll('link[rel="stylesheet"]').forEach((e=>{e.href.endsWith("/modules/system/assets/css/snowboard.extras.css")&&(t=!0)})),!t){const t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("href",this.snowboard.url().to("/modules/system/assets/css/snowboard.extras.css")),document.head.appendChild(t)}}}},8269:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r extends Snowboard.PluginBase{construct(t,e,n,r,i){if(t instanceof HTMLElement==!1)throw new Error("A HTMLElement must be provided for transitioning");if(this.element=t,"string"!=typeof e)throw new Error("Transition name must be specified as a string");if(this.transition=e,n&&"function"!=typeof n)throw new Error("Callback must be a valid function");this.callback=n,this.duration=r?this.parseDuration(r):null,this.trailTo=!0===i,this.doTransition()}eventClasses(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const r={in:`${this.transition}-in`,active:`${this.transition}-active`,out:`${this.transition}-out`};if(0===e.length)return Object.values(r);const i=[];return Object.entries(r).forEach((t=>{const[n,r]=t;-1!==e.indexOf(n)&&i.push(r)})),i}doTransition(){null!==this.duration&&(this.element.style.transitionDuration=this.duration),this.resetClasses(),this.eventClasses("in","active").forEach((t=>{this.element.classList.add(t)})),window.requestAnimationFrame((()=>{"0s"!==window.getComputedStyle(this.element)["transition-duration"]?(this.element.addEventListener("transitionend",(()=>this.onTransitionEnd()),{once:!0}),window.requestAnimationFrame((()=>{this.element.classList.remove(this.eventClasses("in")[0]),this.element.classList.add(this.eventClasses("out")[0])}))):(this.resetClasses(),this.callback&&this.callback.apply(this.element),this.destruct())}))}onTransitionEnd(){this.eventClasses("active",this.trailTo?"":"out").forEach((t=>{this.element.classList.remove(t)})),this.callback&&this.callback.apply(this.element),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}cancel(){this.element.removeEventListener("transitionend",(()=>this.onTransitionEnd),{once:!0}),this.resetClasses(),null!==this.duration&&(this.element.style.transitionDuration=null),this.destruct()}resetClasses(){this.eventClasses().forEach((t=>{this.element.classList.remove(t)}))}parseDuration(t){const e=/^([0-9]+(\.[0-9]+)?)(m?s)?$/.exec(t),n=Number(e[1]);return"sec"===("s"===e[3]?"sec":"msec")?1e3*n+"ms":`${Math.floor(n)}ms`}}},3783:function(t,e,n){"use strict";var r=n(2270);class i extends Snowboard.Singleton{dependencies(){return["flash"]}listens(){return{ready:"ready",ajaxErrorMessage:"ajaxErrorMessage",ajaxFlashMessages:"ajaxFlashMessages"}}ready(){document.querySelectorAll('[data-control="flash-message"]').forEach((t=>{this.snowboard.flash(t.innerHTML,t.dataset.flashType,t.dataset.flashDuration)}))}ajaxErrorMessage(t){return this.snowboard.flash(t,"error"),!1}ajaxFlashMessages(t){return Object.entries(t).forEach((t=>{const[e,n]=t;this.snowboard.flash(n,e)})),!1}}var o=n(8269),s=n(9553),a=n(6277),c=n(8032),u=n(8809),l=n(5763);if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the extra plugins.");(t=>{t.addPlugin("assetLoader",u.Z),t.addPlugin("dataConfig",l.Z),t.addPlugin("extrasStyles",c.Z),t.addPlugin("transition",o.Z),t.addPlugin("flash",r.Z),t.addPlugin("flashListener",i),t.addPlugin("attachLoading",s.Z),t.addPlugin("stripeLoader",a.Z)})(window.Snowboard)},7111:function(t,e,n){var r=n(6733),i=n(9821),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),i=n(2391),o=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&o(a,s,{configurable:!0,value:i(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),i=n(3231),o=n(9646),s=function(t){return function(e,n,s){var a,c=r(e),u=o(c),l=i(s,u);if(t&&n!=n){for(;u>l;)if((a=c[l++])!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},7081:function(t,e,n){var r=n(8270),i=n(4826),o=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=i(e),c=s.f,u=o.f,l=0;l<a.length;l++){var f=a[l];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},5762:function(t,e,n){var r=n(7400),i=n(1787),o=n(5358);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),i=n(1787),o=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&o(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),i=n(5052),o=r.document,s=i(o)&&i(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,i,o=n(9859),s=n(598),a=o.process,c=o.Deno,u=a&&a.versions||c&&c.version,l=u&&u.v8;l&&(i=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),i=n(7933).f,o=n(5762),s=n(4768),a=n(8400),c=n(7081),u=n(6541);t.exports=function(t,e){var n,l,f,d,h,p=t.target,m=t.global,v=t.stat;if(n=m?r:v?r[p]||a(p,{}):(r[p]||{}).prototype)for(l in e){if(d=e[l],f=t.dontCallGetSet?(h=i(n,l))&&h.value:n[l],!u(m?l:p+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof d==typeof f)continue;c(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),s(n,l,d,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},1805:function(t,e,n){var r=n(7400),i=n(8270),o=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=i(o,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(o,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},5968:function(t,e,n){var r=n(7188),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),i=n(6733),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),i=n(9650);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),i=n(2991),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),i=n(4229),o=n(2635);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),i=n(4229),o=n(7079),s=Object,a=r("".split);t.exports=i((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),i=n(6733),o=n(5353),s=r(Function.toString);i(o.inspectSource)||(o.inspectSource=function(t){return s(t)}),t.exports=o.inspectSource},6407:function(t,e,n){var r,i,o,s=n(1180),a=n(9859),c=n(5968),u=n(5052),l=n(5762),f=n(8270),d=n(5353),h=n(4399),p=n(5977),m="Object already initialized",v=a.TypeError,g=a.WeakMap;if(s||d.state){var b=d.state||(d.state=new g),y=c(b.get),w=c(b.has),x=c(b.set);r=function(t,e){if(w(b,t))throw v(m);return e.facade=t,x(b,t,e),e},i=function(t){return y(b,t)||{}},o=function(t){return w(b,t)}}else{var S=h("state");p[S]=!0,r=function(t,e){if(f(t,S))throw v(m);return e.facade=t,l(t,S,e),e},i=function(t){return f(t,S)?t[S]:{}},o=function(t){return f(t,S)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=i(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),i=n(6733),o=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==l||n!=u&&(i(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),i="object"==typeof document&&document.all,o=void 0===i&&void 0!==i;t.exports=o?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),i=n(6733),o=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),i=n(6733),o=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,c=n(8511),u=n(6407),l=u.enforce,f=u.get,d=Object.defineProperty,h=s&&!r((function(){return 8!==d((function(){}),"length",{value:8}).length})),p=String(String).split("String"),m=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||a&&t.name!==e)&&(s?d(t,"name",{value:e,configurable:!0}):t.name=e),h&&n&&o(n,"arity")&&t.length!==n.arity&&d(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?s&&d(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=l(t);return o(r,"source")||(r.source=p.join("string"==typeof e?e:"")),t};Function.prototype.toString=m((function(){return i(this)&&f(this).source||c(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,i=n(1176),o=n(219),s=n(3837),a=n(5977),c=n(3777),u=n(2635),l=n(4399),f=l("IE_PROTO"),d=function(){},h=function(t){return"<script>"+t+"</"+"script>"},p=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},m=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;m="undefined"!=typeof document?document.domain&&r?p(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):p(r);for(var n=s.length;n--;)delete m.prototype[s[n]];return m()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=i(t),n=new d,d.prototype=null,n[f]=t):n=m(),void 0===e?n:o.f(n,e)}},219:function(t,e,n){var r=n(7400),i=n(7137),o=n(1787),s=n(1176),a=n(905),c=n(5632);e.f=r&&!i?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),i=c(e),u=i.length,l=0;u>l;)o.f(t,n=i[l++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),i=n(4394),o=n(7137),s=n(1176),a=n(9310),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",d="configurable",h="writable";e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n.writable){var r=l(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:d in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),i=n(266),o=n(9195),s=n(5358),a=n(905),c=n(9310),u=n(8270),l=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(u(t,e))return s(!i(o.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),i=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),i=n(8270),o=n(905),s=n(9540).indexOf,a=n(5977),c=r([].push);t.exports=function(t,e){var n,r=o(t),u=0,l=[];for(n in r)!i(a,n)&&i(r,n)&&c(l,n);for(;e.length>u;)i(r,n=e[u++])&&(~s(l,n)||c(l,n));return l}},5632:function(t,e,n){var r=n(140),i=n(3837);t.exports=Object.keys||function(t){return r(t,i)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),i=n(6733),o=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!o(a=r(n,t)))return a;if(i(n=t.valueOf)&&!o(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!o(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),i=n(5968),o=n(8151),s=n(894),a=n(1176),c=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=s.f;return n?c(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),i=n(1441),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},5353:function(t,e,n){var r=n(9859),i=n(8400),o="__core-js_shared__",s=r[o]||i(o,{});t.exports=s},3036:function(t,e,n){var r=n(4231),i=n(5353);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),i=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},905:function(t,e,n){var r=n(9337),i=n(8885);t.exports=function(t){return r(i(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),i=Object;t.exports=function(t){return i(r(t))}},2066:function(t,e,n){var r=n(266),i=n(5052),o=n(9395),s=n(5300),a=n(2914),c=n(95),u=TypeError,l=c("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var n,c=s(t,l);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!i(n)||o(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),i=n(9395);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),i=0,o=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++i+o,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),i=n(4229);t.exports=r&&i((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),i=n(6733),o=r.WeakMap;t.exports=i(o)&&/native code/.test(String(o))},95:function(t,e,n){var r=n(9859),i=n(3036),o=n(8270),s=n(1441),a=n(4860),c=n(6969),u=i("wks"),l=r.Symbol,f=l&&l.for,d=c?l:l&&l.withoutSetter||s;t.exports=function(t){if(!o(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&o(l,t)?u[t]=l[t]:u[t]=c&&f?f(e):d(e)}return u[t]}},9529:function(t,e,n){"use strict";var r=n(3103),i=n(9540).includes,o=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:o((function(){return!Array(1).includes()}))},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){var e;e=3783,t(t.s=e)}]);
(self.webpackChunk_wintercms_wn_system_module=self.webpackChunk_wintercms_wn_system_module||[]).push([[988],{2026:function(t,e,n){"use strict";n(9529);function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){i(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}if(void 0===window.Snowboard)throw new Error("Snowboard must be loaded in order to use the Request plugin.");class s extends Snowboard.PluginBase{construct(t,e,n){if("string"==typeof t){const e=document.querySelector(t);if(null===e)throw new Error(`No element was found with the given selector: ${t}`);this.element=e}else this.element=t;if(this.handler=e,this.options=n||{},this.fetchOptions={},this.responseData=null,this.responseError=null,this.cancelled=!1,this.checkRequest(),this.snowboard.globalEvent("ajaxSetup",this)){if(this.element){const t=new Event("ajaxSetup",{cancelable:!0});if(t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return void(this.cancelled=!0)}this.doClientValidation()?this.confirm?this.doConfirm().then((t=>{t&&this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)}))})):this.doAjax().then((t=>{if(t.cancelled)return this.cancelled=!0,void this.complete();this.responseData=t,this.processUpdate(t).then((()=>{!1===t.X_WINTER_SUCCESS?this.processError(t):this.processResponse(t)}))}),(t=>{this.responseError=t,this.processError(t)})):this.cancelled=!0}else this.cancelled=!0}dependencies(){return["cookie","jsonParser"]}checkRequest(){if(this.element&&this.element instanceof Element==!1)throw new Error("The element provided must be an Element instance");if(void 0===this.handler)throw new Error("The AJAX handler name is not specified.");if(!this.handler.match(/^(?:\w+:{2})?on*/))throw new Error('Invalid AJAX handler name. The correct handler name format is: "onEvent".')}getFetch(){return this.fetchOptions=void 0!==this.options.fetchOptions&&"object"==typeof this.options.fetchOptions?this.options.fetchOptions:{method:"POST",headers:this.headers,body:this.data,redirect:"follow",mode:"same-origin"},this.snowboard.globalEvent("ajaxFetchOptions",this.fetchOptions,this),fetch(this.url,this.fetchOptions)}doClientValidation(){return!0!==this.options.browserValidate||!this.form||!1!==this.form.checkValidity()||(this.form.reportValidity(),!1)}doAjax(){if(!1===this.snowboard.globalEvent("ajaxBeforeSend",this))return Promise.resolve({cancelled:!0});const t=new Promise(((t,e)=>{this.getFetch().then((n=>{n.ok||406===n.status?n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((e=>{t(o(o({},e),{},{X_WINTER_SUCCESS:406!==n.status,X_WINTER_RESPONSE_CODE:n.status}))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((e=>{t(e)}),(t=>{e(this.renderError(`Unable to process response: ${t}`))})):n.headers.has("Content-Type")&&n.headers.get("Content-Type").includes("/json")?n.json().then((t=>{e(this.renderError(t.message,t.exception,t.file,t.line,t.trace))}),(t=>{e(this.renderError(`Unable to parse JSON response: ${t}`))})):n.text().then((t=>{e(this.renderError(t))}),(t=>{e(this.renderError(`Unable to process response: ${t}`))}))}),(t=>{e(this.renderError(`Unable to retrieve a response from the server: ${t}`))}))}));if(this.snowboard.globalEvent("ajaxStart",t,this),this.element){const e=new Event("ajaxPromise");e.promise=t,this.element.dispatchEvent(e)}return t}processUpdate(t){return new Promise(((e,n)=>{if("function"==typeof this.options.beforeUpdate&&!1===this.options.beforeUpdate.apply(this,[t]))return void n();const r={};if(Object.entries(t).forEach((t=>{const[e,n]=t;"X_WINTER"!==e.substr(0,8)&&(r[e]=n)})),0===Object.keys(r).length)return void(t.X_WINTER_ASSETS?this.processAssets(t.X_WINTER_ASSETS).then((()=>{e()}),(()=>{n()})):e());this.snowboard.globalPromiseEvent("ajaxBeforeUpdate",t,this).then((async()=>{t.X_WINTER_ASSETS&&await this.processAssets(t.X_WINTER_ASSETS),this.doUpdate(r).then((()=>{window.requestAnimationFrame((()=>e()))}),(()=>{n()}))}),(()=>{n()}))}))}doUpdate(t){return new Promise((e=>{const n=[];Object.entries(t).forEach((t=>{const[e,r]=t;let o=this.options.update&&this.options.update[e]?this.options.update[e]:e,i="replace";"@"===o.substr(0,1)?(i="append",o=o.substr(1)):"^"===o.substr(0,1)?(i="prepend",o=o.substr(1)):"#"!==o.substr(0,1)&&"."!==o.substr(0,1)&&(i="noop");const s=document.querySelectorAll(o);s.length>0&&s.forEach((t=>{switch(i){case"append":t.innerHTML+=r;break;case"prepend":t.innerHTML=r+t.innerHTML;break;case"noop":break;default:t.innerHTML=r}n.push(t),this.snowboard.globalEvent("ajaxUpdate",t,r,this);const e=new Event("ajaxUpdate");e.content=r,t.dispatchEvent(e)}))})),this.snowboard.globalEvent("ajaxUpdateComplete",n,this),e()}))}processResponse(t){if((!this.options.success||"function"!=typeof this.options.success||!1!==this.options.success(this.responseData,this))&&!1!==this.snowboard.globalEvent("ajaxSuccess",this.responseData,this)){if(this.element){const t=new Event("ajaxDone",{cancelable:!0});if(t.responseData=this.responseData,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}this.flash&&t.X_WINTER_FLASH_MESSAGES&&this.processFlashMessages(t.X_WINTER_FLASH_MESSAGES),this.redirect||t.X_WINTER_REDIRECT?this.processRedirect(this.redirect||t.X_WINTER_REDIRECT):this.complete()}}processError(t){if((!this.options.error||"function"!=typeof this.options.error||!1!==this.options.error(this.responseError,this))&&!1!==this.snowboard.globalEvent("ajaxError",this.responseError,this)){if(this.element){const t=new Event("ajaxFail",{cancelable:!0});if(t.responseError=this.responseError,t.request=this,this.element.dispatchEvent(t),t.defaultPrevented)return}t instanceof Error?this.processErrorMessage(t.message):(t.X_WINTER_ERROR_FIELDS&&this.processValidationErrors(t.X_WINTER_ERROR_FIELDS),t.X_WINTER_ERROR_MESSAGE&&this.processErrorMessage(t.X_WINTER_ERROR_MESSAGE)),this.complete()}}processRedirect(t){"function"==typeof this.options.handleRedirectResponse&&!1===this.options.handleRedirectResponse.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxRedirect",t,this)&&(window.addEventListener("popstate",(()=>{if(this.element){const t=document.createEvent("CustomEvent");t.eventName="ajaxRedirected",this.element.dispatchEvent(t)}}),{once:!0}),window.location.assign(t))}processErrorMessage(t){"function"==typeof this.options.handleErrorMessage&&!1===this.options.handleErrorMessage.apply(this,[t])||!1!==this.snowboard.globalEvent("ajaxErrorMessage",t,this)&&window.alert(t)}processFlashMessages(t){"function"==typeof this.options.handleFlashMessages&&!1===this.options.handleFlashMessages.apply(this,[t])||this.snowboard.globalEvent("ajaxFlashMessages",t,this)}processValidationErrors(t){"function"==typeof this.options.handleValidationErrors&&!1===this.options.handleValidationErrors.apply(this,[this.form,t])||this.snowboard.globalEvent("ajaxValidationErrors",this.form,t,this)}processAssets(t){return this.snowboard.globalPromiseEvent("ajaxLoadAssets",t)}async doConfirm(){if("function"==typeof this.options.handleConfirmMessage)return!1!==this.options.handleConfirmMessage.apply(this,[this.confirm]);if(0===this.snowboard.listensToEvent("ajaxConfirmMessage").length)return window.confirm(this.confirm);const t=this.snowboard.globalPromiseEvent("ajaxConfirmMessage",this.confirm,this);try{if(await t)return!0}catch(t){return!1}return!1}complete(){if(this.options.complete&&"function"==typeof this.options.complete&&this.options.complete(this.responseData,this),this.snowboard.globalEvent("ajaxDone",this.responseData,this),this.element){const t=new Event("ajaxAlways");t.request=this,t.responseData=this.responseData,t.responseError=this.responseError,this.element.dispatchEvent(t)}this.destruct()}get form(){return this.options.form?"string"==typeof this.options.form?document.querySelector(this.options.form):this.options.form:this.element?"FORM"===this.element.tagName?this.element:this.element.closest("form"):null}get context(){return{handler:this.handler,options:this.options}}get headers(){const t={"X-Requested-With":"XMLHttpRequest","X-WINTER-REQUEST-HANDLER":this.handler,"X-WINTER-REQUEST-PARTIALS":this.extractPartials(this.options.update||[])};return this.flash&&(t["X-WINTER-REQUEST-FLASH"]=1),this.xsrfToken&&(t["X-XSRF-TOKEN"]=this.xsrfToken),t}get loading(){return this.options.loading||!1}get url(){return this.options.url||window.location.href}get redirect(){return this.options.redirect&&this.options.redirect.length?this.options.redirect:null}get flash(){return this.options.flash||!1}get files(){return!0===this.options.files&&(void 0!==FormData||(this.snowboard.debug("This browser does not support file uploads"),!1))}get xsrfToken(){return this.snowboard.cookie().get("XSRF-TOKEN")}get data(){const t="object"==typeof this.options.data?this.options.data:{},e=new FormData(this.form||void 0);return Object.keys(t).length>0&&Object.entries(t).forEach((t=>{const[n,r]=t;e.append(n,r)})),e}get confirm(){return this.options.confirm||!1}extractPartials(t){return Object.keys(t).join("&")}renderError(t,e,n,r,o){const i=new Error(t);return i.exception=e||null,i.file=n||null,i.line=r||null,i.trace=o||[],i}}Snowboard.addPlugin("request",s)},7111:function(t,e,n){var r=n(6733),o=n(9821),i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not a function")}},9736:function(t,e,n){var r=n(95),o=n(2391),i=n(1787).f,s=r("unscopables"),a=Array.prototype;null==a[s]&&i(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},1176:function(t,e,n){var r=n(5052),o=String,i=TypeError;t.exports=function(t){if(r(t))return t;throw i(o(t)+" is not an object")}},9540:function(t,e,n){var r=n(905),o=n(3231),i=n(9646),s=function(t){return function(e,n,s){var a,c=r(e),u=i(c),p=o(s,u);if(t&&n!=n){for(;u>p;)if((a=c[p++])!=a)return!0}else for(;u>p;p++)if((t||p in c)&&c[p]===n)return t||p||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},7079:function(t,e,n){var r=n(5968),o=r({}.toString),i=r("".slice);t.exports=function(t){return i(o(t),8,-1)}},7081:function(t,e,n){var r=n(8270),o=n(4826),i=n(7933),s=n(1787);t.exports=function(t,e,n){for(var a=o(e),c=s.f,u=i.f,p=0;p<a.length;p++){var f=a[p];r(t,f)||n&&r(n,f)||c(t,f,u(e,f))}}},5762:function(t,e,n){var r=n(7400),o=n(1787),i=n(5358);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},5358:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4768:function(t,e,n){var r=n(6733),o=n(1787),i=n(6039),s=n(8400);t.exports=function(t,e,n,a){a||(a={});var c=a.enumerable,u=void 0!==a.name?a.name:e;if(r(n)&&i(n,u,a),a.global)c?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(c=!0):delete t[e]}catch(t){}c?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},8400:function(t,e,n){var r=n(9859),o=Object.defineProperty;t.exports=function(t,e){try{o(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},7400:function(t,e,n){var r=n(4229);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},2635:function(t,e,n){var r=n(9859),o=n(5052),i=r.document,s=o(i)&&o(i.createElement);t.exports=function(t){return s?i.createElement(t):{}}},598:function(t,e,n){var r=n(1333);t.exports=r("navigator","userAgent")||""},6358:function(t,e,n){var r,o,i=n(9859),s=n(598),a=i.process,c=i.Deno,u=a&&a.versions||c&&c.version,p=u&&u.v8;p&&(o=(r=p.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),t.exports=o},3837:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3103:function(t,e,n){var r=n(9859),o=n(7933).f,i=n(5762),s=n(4768),a=n(8400),c=n(7081),u=n(6541);t.exports=function(t,e){var n,p,f,l,h,d=t.target,v=t.global,b=t.stat;if(n=v?r:b?r[d]||a(d,{}):(r[d]||{}).prototype)for(p in e){if(l=e[p],f=t.dontCallGetSet?(h=o(n,p))&&h.value:n[p],!u(v?p:d+(b?".":"#")+p,t.forced)&&void 0!==f){if(typeof l==typeof f)continue;c(l,f)}(t.sham||f&&f.sham)&&i(l,"sham",!0),s(n,p,l,t)}}},4229:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},7188:function(t,e,n){var r=n(4229);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},266:function(t,e,n){var r=n(7188),o=Function.prototype.call;t.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},1805:function(t,e,n){var r=n(7400),o=n(8270),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:u}},5968:function(t,e,n){var r=n(7188),o=Function.prototype,i=o.bind,s=o.call,a=r&&i.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},1333:function(t,e,n){var r=n(9859),o=n(6733),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t]):r[t]&&r[t][e]}},5300:function(t,e,n){var r=n(7111),o=n(9650);t.exports=function(t,e){var n=t[e];return o(n)?void 0:r(n)}},9859:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},8270:function(t,e,n){var r=n(5968),o=n(2991),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},5977:function(t){t.exports={}},3777:function(t,e,n){var r=n(1333);t.exports=r("document","documentElement")},4394:function(t,e,n){var r=n(7400),o=n(4229),i=n(2635);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},9337:function(t,e,n){var r=n(5968),o=n(4229),i=n(7079),s=Object,a=r("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?a(t,""):s(t)}:s},8511:function(t,e,n){var r=n(5968),o=n(6733),i=n(5353),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return s(t)}),t.exports=i.inspectSource},6407:function(t,e,n){var r,o,i,s=n(1180),a=n(9859),c=n(5968),u=n(5052),p=n(5762),f=n(8270),l=n(5353),h=n(4399),d=n(5977),v="Object already initialized",b=a.TypeError,m=a.WeakMap;if(s||l.state){var E=l.state||(l.state=new m),g=c(E.get),y=c(E.has),w=c(E.set);r=function(t,e){if(y(E,t))throw b(v);return e.facade=t,w(E,t,e),e},o=function(t){return g(E,t)||{}},i=function(t){return y(E,t)}}else{var x=h("state");d[x]=!0,r=function(t,e){if(f(t,x))throw b(v);return e.facade=t,p(t,x,e),e},o=function(t){return f(t,x)?t[x]:{}},i=function(t){return f(t,x)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!u(e)||(n=o(e)).type!==t)throw b("Incompatible receiver, "+t+" required");return n}}}},6733:function(t){t.exports=function(t){return"function"==typeof t}},6541:function(t,e,n){var r=n(4229),o=n(6733),i=/#|\.prototype\./,s=function(t,e){var n=c[a(t)];return n==p||n!=u&&(o(e)?r(e):!!e)},a=s.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",p=s.POLYFILL="P";t.exports=s},9650:function(t){t.exports=function(t){return null==t}},5052:function(t,e,n){var r=n(6733),o="object"==typeof document&&document.all,i=void 0===o&&void 0!==o;t.exports=i?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},4231:function(t){t.exports=!1},9395:function(t,e,n){var r=n(1333),o=n(6733),i=n(1321),s=n(6969),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return o(e)&&i(e.prototype,a(t))}},9646:function(t,e,n){var r=n(4237);t.exports=function(t){return r(t.length)}},6039:function(t,e,n){var r=n(4229),o=n(6733),i=n(8270),s=n(7400),a=n(1805).CONFIGURABLE,c=n(8511),u=n(6407),p=u.enforce,f=u.get,l=Object.defineProperty,h=s&&!r((function(){return 8!==l((function(){}),"length",{value:8}).length})),d=String(String).split("String"),v=t.exports=function(t,e,n){"Symbol("===String(e).slice(0,7)&&(e="["+String(e).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!i(t,"name")||a&&t.name!==e)&&(s?l(t,"name",{value:e,configurable:!0}):t.name=e),h&&n&&i(n,"arity")&&t.length!==n.arity&&l(t,"length",{value:n.arity});try{n&&i(n,"constructor")&&n.constructor?s&&l(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=p(t);return i(r,"source")||(r.source=d.join("string"==typeof e?e:"")),t};Function.prototype.toString=v((function(){return o(this)&&f(this).source||c(this)}),"toString")},917:function(t){var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},2391:function(t,e,n){var r,o=n(1176),i=n(219),s=n(3837),a=n(5977),c=n(3777),u=n(2635),p=n(4399),f=p("IE_PROTO"),l=function(){},h=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?d(r):((e=u("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):d(r);for(var n=s.length;n--;)delete v.prototype[s[n]];return v()};a[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(l.prototype=o(t),n=new l,l.prototype=null,n[f]=t):n=v(),void 0===e?n:i.f(n,e)}},219:function(t,e,n){var r=n(7400),o=n(7137),i=n(1787),s=n(1176),a=n(905),c=n(5632);e.f=r&&!o?Object.defineProperties:function(t,e){s(t);for(var n,r=a(e),o=c(e),u=o.length,p=0;u>p;)i.f(t,n=o[p++],r[n]);return t}},1787:function(t,e,n){var r=n(7400),o=n(4394),i=n(7137),s=n(1176),a=n(9310),c=TypeError,u=Object.defineProperty,p=Object.getOwnPropertyDescriptor,f="enumerable",l="configurable",h="writable";e.f=r?i?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&h in n&&!n.writable){var r=p(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:l in n?n.configurable:r.configurable,enumerable:f in n?n.enumerable:r.enumerable,writable:!1})}return u(t,e,n)}:u:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7933:function(t,e,n){var r=n(7400),o=n(266),i=n(9195),s=n(5358),a=n(905),c=n(9310),u=n(8270),p=n(4394),f=Object.getOwnPropertyDescriptor;e.f=r?f:function(t,e){if(t=a(t),e=c(e),p)try{return f(t,e)}catch(t){}if(u(t,e))return s(!o(i.f,t,e),t[e])}},8151:function(t,e,n){var r=n(140),o=n(3837).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},894:function(t,e){e.f=Object.getOwnPropertySymbols},1321:function(t,e,n){var r=n(5968);t.exports=r({}.isPrototypeOf)},140:function(t,e,n){var r=n(5968),o=n(8270),i=n(905),s=n(9540).indexOf,a=n(5977),c=r([].push);t.exports=function(t,e){var n,r=i(t),u=0,p=[];for(n in r)!o(a,n)&&o(r,n)&&c(p,n);for(;e.length>u;)o(r,n=e[u++])&&(~s(p,n)||c(p,n));return p}},5632:function(t,e,n){var r=n(140),o=n(3837);t.exports=Object.keys||function(t){return r(t,o)}},9195:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},2914:function(t,e,n){var r=n(266),o=n(6733),i=n(5052),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!i(a=r(n,t)))return a;if(o(n=t.valueOf)&&!i(a=r(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!i(a=r(n,t)))return a;throw s("Can't convert object to primitive value")}},4826:function(t,e,n){var r=n(1333),o=n(5968),i=n(8151),s=n(894),a=n(1176),c=o([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=i.f(a(t)),n=s.f;return n?c(e,n(t)):e}},8885:function(t,e,n){var r=n(9650),o=TypeError;t.exports=function(t){if(r(t))throw o("Can't call method on "+t);return t}},4399:function(t,e,n){var r=n(3036),o=n(1441),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},5353:function(t,e,n){var r=n(9859),o=n(8400),i="__core-js_shared__",s=r[i]||o(i,{});t.exports=s},3036:function(t,e,n){var r=n(4231),o=n(5353);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.25.1",mode:r?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE",source:"https://github.com/zloirock/core-js"})},4860:function(t,e,n){var r=n(6358),o=n(4229);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3231:function(t,e,n){var r=n(3329),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},905:function(t,e,n){var r=n(9337),o=n(8885);t.exports=function(t){return r(o(t))}},3329:function(t,e,n){var r=n(917);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},4237:function(t,e,n){var r=n(3329),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},2991:function(t,e,n){var r=n(8885),o=Object;t.exports=function(t){return o(r(t))}},2066:function(t,e,n){var r=n(266),o=n(5052),i=n(9395),s=n(5300),a=n(2914),c=n(95),u=TypeError,p=c("toPrimitive");t.exports=function(t,e){if(!o(t)||i(t))return t;var n,c=s(t,p);if(c){if(void 0===e&&(e="default"),n=r(c,t,e),!o(n)||i(n))return n;throw u("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},9310:function(t,e,n){var r=n(2066),o=n(9395);t.exports=function(t){var e=r(t,"string");return o(e)?e:e+""}},9821:function(t){var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},1441:function(t,e,n){var r=n(5968),o=0,i=Math.random(),s=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+i,36)}},6969:function(t,e,n){var r=n(4860);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7137:function(t,e,n){var r=n(7400),o=n(4229);t.exports=r&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1180:function(t,e,n){var r=n(9859),o=n(6733),i=r.WeakMap;t.exports=o(i)&&/native code/.test(String(i))},95:function(t,e,n){var r=n(9859),o=n(3036),i=n(8270),s=n(1441),a=n(4860),c=n(6969),u=o("wks"),p=r.Symbol,f=p&&p.for,l=c?p:p&&p.withoutSetter||s;t.exports=function(t){if(!i(u,t)||!a&&"string"!=typeof u[t]){var e="Symbol."+t;a&&i(p,t)?u[t]=p[t]:u[t]=c&&f?f(e):l(e)}return u[t]}},9529:function(t,e,n){"use strict";var r=n(3103),o=n(9540).includes,i=n(4229),s=n(9736);r({target:"Array",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")}},function(t){var e;e=2026,t(t.s=e)}]);
/**
 * Internal proxy for Snowboard.
 *
 * This handler wraps the Snowboard instance that is passed to the constructor of plugin instances.
 * It prevents access to the following methods:
 *  - `attachAbstracts`: No need to attach abstracts again.
 *  - `loadUtilties`: No need to load utilities again.
 *  - `initialise`: Snowboard is already initialised.
 *  - `initialiseSingletons`: Singletons are already initialised.
 */
export default {
    get(target, prop, receiver) {
        if (typeof prop === 'string') {
            const propLower = prop.toLowerCase();

            if (['attachAbstracts', 'loadUtilities', 'initialise', 'initialiseSingletons'].includes(prop)) {
                throw new Error(`You cannot use the "${prop}" Snowboard method within a plugin.`);
            }

            if (target.hasPlugin(propLower)) {
                return (...params) => Reflect.get(target, 'plugins')[propLower].getInstance(...params);
            }
        }

        return Reflect.get(target, prop, receiver);
    },

    has(target, prop) {
        if (typeof prop === 'string') {
            const propLower = prop.toLowerCase();

            if (['attachAbstracts', 'loadUtilities', 'initialise', 'initialiseSingletons'].includes(prop)) {
                return false;
            }

            if (target.hasPlugin(propLower)) {
                return true;
            }
        }

        return Reflect.has(target, prop);
    },
};
import InnerProxyHandler from './InnerProxyHandler';
        this.snowboard = new Proxy(
            snowboard,
            InnerProxyHandler,
        );

        // Freeze instance that has been inserted into this loader
        Object.freeze(this.instance);

        this.singleton = {
            initialised: false,
        };
        // Prevent further extension of the singleton status object
        Object.seal(this.singleton);


        // Freeze loader itself
        Object.freeze(PluginLoader.prototype);
        Object.freeze(this);
        if (!this.isSingleton()) {
            return true;
        }

        return this.singleton.initialised;
        this.singleton.initialised = true;
export default {
    get(target, prop, receiver) {
        if (typeof prop === 'string') {
            const propLower = prop.toLowerCase();

            if (target.hasPlugin(propLower)) {
                return (...params) => Reflect.get(target, 'plugins')[propLower].getInstance(...params);
            }
        }

        return Reflect.get(target, prop, receiver);
    },

    has(target, prop) {
        if (typeof prop === 'string') {
            const propLower = prop.toLowerCase();

            if (target.hasPlugin(propLower)) {
                return true;
            }
        }

        return Reflect.has(target, prop);
    },
};
        this.readiness = {
            dom: false,
        };
        // Seal readiness from being added to further, but allow the properties to be modified.
        Object.seal(this.readiness);

        // Freeze the Snowboard class to prevent further modifications.
        Object.freeze(Snowboard.prototype);
        Object.freeze(this);


        Object.freeze(this.PluginBase.prototype);
        Object.freeze(this.PluginBase);
        Object.freeze(this.Singleton.prototype);
        Object.freeze(this.Singleton);
            this.readiness.dom = true;
                && this.readiness.dom
        const lowerName = name.toLowerCase();

        if (!this.hasPlugin(lowerName)) {
            throw new Error(`No plugin called "${lowerName}" has been registered.`);
        return this.plugins[lowerName];
        if (this.readiness.dom) {
import ProxyHandler from './main/ProxyHandler';
    const snowboard = new Proxy(
        new Snowboard(true, true),
        ProxyHandler,
    );
import ProxyHandler from './main/ProxyHandler';
    const snowboard = new Proxy(
        new Snowboard(),
        ProxyHandler,
    );

    it('is frozen on construction and doesn\'t allow prototype pollution', function () {
        FakeDom
            .new()
            .addScript([
                'modules/system/assets/js/build/manifest.js',
                'modules/system/assets/js/snowboard/build/snowboard.vendor.js',
                'modules/system/assets/js/snowboard/build/snowboard.base.js',
            ])
            .render()
            .then(
                (dom) => {
                    const loader = dom.window.Snowboard.getPlugin('sanitizer');

                    expect(() => {
                        loader.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        loader.newProperty = 'test';
                    }).toThrow(TypeError);

                    expect(() => {
                        loader.singleton.test = 'test';
                    }).toThrow(TypeError);

                    expect(loader.newMethod).toBeUndefined();
                    expect(loader.newProperty).toBeUndefined();
                },
                (error) => {
                    throw error;
                }
            );
    });

    it('should prevent modification of root instances', function () {
        FakeDom
            .new()
            .addScript([
                'modules/system/assets/js/build/manifest.js',
                'modules/system/assets/js/snowboard/build/snowboard.vendor.js',
                'modules/system/assets/js/snowboard/build/snowboard.base.js',
                'modules/system/tests/js/fixtures/framework/TestPlugin.js',
                'modules/system/tests/js/fixtures/framework/TestSingleton.js',
            ])
            .render()
            .then(
                (dom) => {
                    const rootInstance = dom.window.Snowboard.getPlugin('testPlugin').instance;

                    expect(() => {
                        rootInstance.newMethod = () => {
                            return true;
                        }
                    }).toThrow(TypeError);

                    expect(rootInstance.newMethod).toBeUndefined();

                    // Modifications can however be made to instances retrieved from the loader
                    const loadedInstance = dom.window.Snowboard.getPlugin('testPlugin').getInstance();

                    loadedInstance.newMethod = () => {
                        return true;
                    };
                    expect(loadedInstance.newMethod).toEqual(expect.any(Function));
                    expect(loadedInstance.newMethod()).toBe(true);

                    // But shouldn't follow through to new instances
                    const loadedInstanceTwo = dom.window.Snowboard.getPlugin('testPlugin').getInstance();
                    expect(loadedInstanceTwo.newMethod).toBeUndefined();

                    // The same rules apply for singletons, except that modifications will follow through to other uses
                    // of the singleton, since it's only one global instance.
                    const rootSingleton = dom.window.Snowboard.getPlugin('testSingleton').instance;

                    expect(() => {
                        rootSingleton.newMethod = () => {
                            return true;
                        }
                    }).toThrow(TypeError);

                    const loadedSingleton = dom.window.Snowboard.getPlugin('testSingleton').getInstance();

                    loadedSingleton.newMethod = () => {
                        return true;
                    };
                    expect(loadedSingleton.newMethod).toEqual(expect.any(Function));
                    expect(loadedSingleton.newMethod()).toBe(true);

                    const loadedSingletonTwo = dom.window.Snowboard.getPlugin('testSingleton').getInstance();
                    expect(loadedSingletonTwo.newMethod).toEqual(expect.any(Function));
                    expect(loadedSingletonTwo.newMethod()).toBe(true);
                }
            );
    });
    it('is frozen on construction and doesn\'t allow prototype pollution', function () {
        FakeDom
            .new()
            .addScript([
                'modules/system/assets/js/build/manifest.js',
                'modules/system/assets/js/snowboard/build/snowboard.vendor.js',
                'modules/system/assets/js/snowboard/build/snowboard.base.js',
                'modules/system/tests/js/fixtures/framework/TestPlugin.js',
            ])
            .render()
            .then(
                (dom) => {
                    expect(() => {
                        dom.window.Snowboard.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.newProperty = 'test';
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.readiness.test = 'test';
                    }).toThrow(TypeError);

                    expect(dom.window.Snowboard.newMethod).toBeUndefined();
                    expect(dom.window.Snowboard.newProperty).toBeUndefined();

                    // You should not be able to modify the Snowboard object fed to plugins either
                    const instance = dom.window.Snowboard.testPlugin();
                    expect(() => {
                        instance.snowboard.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);
                },
                (error) => {
                    throw error;
                }
            );
    });

                        expect('testPlugin' in Snowboard).toEqual(true);
                        expect('testSingleton' in Snowboard).toEqual(false);

                        expect(Snowboard.hasPlugin('testPlugin')).toBe(true);
                            expect.arrayContaining(['jsonparser', 'sanitizer', 'testplugin'])
                        const instance = Snowboard.testPlugin();
                        expect(instance.snowboard).toBeDefined();
                        expect(instance.snowboard.getPlugin).toEqual(expect.any(Function));
                        expect(() => {
                            const method = instance.snowboard.initialise;
                        }).toThrow('cannot use');
                        const instanceOne = Snowboard.testPlugin();
                        const instanceTwo = Snowboard.testPlugin();
                        const factory = Snowboard.getPlugin('testPlugin');
                        Snowboard.removePlugin('testPlugin');
                        expect(Snowboard.hasPlugin('testPlugin')).toEqual(false);
                        expect(Snowboard.testPlugin).not.toBeDefined();
                        expect('testPlugin' in Snowboard).toEqual(false);
                        expect('testSingleton' in Snowboard).toEqual(true);

                        expect(Snowboard.hasPlugin('testSingleton')).toBe(true);
                            expect.arrayContaining(['jsonparser', 'sanitizer', 'testsingleton'])
                        expect(Snowboard.testSingleton).toEqual(expect.any(Function));
                        const instance = Snowboard.testSingleton();
                        expect(instance.snowboard).toBeDefined();
                        expect(instance.snowboard.getPlugin).toEqual(expect.any(Function));
                        expect(() => {
                            const method = instance.snowboard.initialise;
                        }).toThrow('cannot use');
                        const instanceOne = Snowboard.testSingleton();
                        const instanceTwo = Snowboard.testSingleton();
                        const factory = Snowboard.getPlugin('testSingleton');
                        Snowboard.removePlugin('testSingleton');
                        expect(Snowboard.hasPlugin('testSingleton')).toEqual(false);
                        expect(Snowboard.testSingleton).not.toBeDefined();

    it('will allow plugins to call other plugin methods', function () {
        FakeDom
            .new()
            .addScript([
                'modules/system/assets/js/build/manifest.js',
                'modules/system/assets/js/snowboard/build/snowboard.vendor.js',
                'modules/system/assets/js/snowboard/build/snowboard.base.js',
                'modules/system/tests/js/fixtures/framework/TestDependencyOne.js',
                'modules/system/tests/js/fixtures/framework/TestSingletonWithDependency.js',
            ])
            .render()
            .then(
                (dom) => {
                    // Run assertions
                    const Snowboard = dom.window.Snowboard;
                    const instance = Snowboard.testSingleton();

                    expect(instance.dependencyTest()).toEqual('Tested');
                },
                (error) => {
                    throw error;
                }
            );
    });

    it('doesn\'t allow PluginBase or Singleton abstracts to be modified', function () {
        FakeDom
            .new()
            .addScript([
                'modules/system/assets/js/build/manifest.js',
                'modules/system/assets/js/snowboard/build/snowboard.vendor.js',
                'modules/system/assets/js/snowboard/build/snowboard.base.js',
            ])
            .render()
            .then(
                (dom) => {
                    expect(() => {
                        dom.window.Snowboard.PluginBase.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.PluginBase.destruct = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.PluginBase.prototype.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.Singleton.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.Singleton.destruct = () => {
                            return true;
                        };
                    }).toThrow(TypeError);

                    expect(() => {
                        dom.window.Snowboard.Singleton.prototype.newMethod = () => {
                            return true;
                        };
                    }).toThrow(TypeError);
                },
            );
    });
    Snowboard.addPlugin('testPlugin', TestPlugin);
    Snowboard.addPlugin('testSingleton', TestSingleton);

        dependencyTest() {
            return this.snowboard.testDependencyOne().testMethod();
        }