1import{_ as t,i as e,s as n,x as o,a as i,b as r}from"./lit-element-afec73a0.js";import{c as a,a as s,b as c}from"./redux-ade66c6c.js";import{_ as l}from"./query-assigned-elements-14faa521.js";import{n as d}from"./property-cd0e8171.js";import{G as u}from"./glider-356a5abc.js";import{f as h}from"./index-cd2d2930.js";import{F as m}from"./de-d8a203eb.js";import"./_commonjsHelpers-52dcbb45.js"; 2/** 3 * @license 4 * Copyright 2017 Google LLC 5 * SPDX-License-Identifier: BSD-3-Clause 6 */function p(e){return d(t(t({},e),{},{state:!0}))}var g,f,v;function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function y(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach((function(e){k(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function w(t,e,n,o,i,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(o,i)}function _(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var r=t.apply(e,n);function a(t){w(r,o,i,a,s,"next",t)}function s(t){w(r,o,i,a,s,"throw",t)}a(void 0)}))}}function k(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function S(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var E,C,j=e(E||(E=S([":host {\n display: var(--toujou-consent-display, block);\n}"])));class x extends n{static get is(){return"toujou-consent"}render(){return o(g||(g=i(['\n <slot id="content"></slot>\n '])))}static get styles(){return j}static get properties(){return{consentState:{type:Boolean},listenTo:{type:String},listenOn:{type:String}}}set consentState(t){"checkbox"===this.consentInputType&&(this.querySelector(".consent__checkbox").checked=t)}set listenTo(t){t.split(/\s+/).forEach((t=>{this.addEventListener(t,this._handleEvent)}))}constructor(){super(),this._handleEvent=this._handleEvent.bind(this),this.listenOn="*",this._consentType=this.getAttribute("consenttype"),this._getConsentInputType(),this.consentState=null}connectedCallback(){super.connectedCallback()}_handleEvent(t){"click"===t.type?this._dispatchClickEvent():"change"===t.type&&this._dispatchChangeEvent()}firstUpdated(){this._dispatchReadyEvent()}_dispatchChangeEvent(){var t=new CustomEvent("toujou-consent-checkbox-changed",{bubbles:!0,composed:!0,detail:{consentElement:this}});this.dispatchEvent(t)}_dispatchClickEvent(){var t=new CustomEvent("toujou-consent-button-clicked",{bubbles:!0,composed:!0});this.dispatchEvent(t)}_dispatchReadyEvent(){var t=new CustomEvent("toujou-consent-connected",{bubbles:!0,composed:!0,detail:{consentType:this._consentType}});this.dispatchEvent(t)}_getConsentInputType(){var t=this.querySelectorAll(".consent__checkbox"),e=this.querySelectorAll(".consent__button");t.length>0?this.consentInputType="checkbox":e.length>0&&(this.consentInputType="button")}}customElements.define(x.is,x);var T=e(C||(C=S([":host {\n display: var(--toujou-consent-widget-display, block);\n}\n\n"]))),O="CHECK_CONSENT_EXPIRY",I="SAVE_ALL_CONSENTS",A="SAVE_SINGLE_CONSENT",M="DISMISS_CONSENT_BOX",N="UNDISMISS_CONSENT_BOX",L={consents:{consentBoxDismissed:!1}},R=!1;function P(){var e=function(e,n){var o,i,r,a;switch(n.type){case O:var s=Date.now(),c=t({},e.consents);for(var l in c)"consentBoxDismissed"!==l&&(null!==(i=null===(o=c[l])||void 0===o?void 0:o.consentLifetime)&&void 0!==i?i:0)>0&&(null!==(a=null===(r=c[l])||void 0===r?void 0:r.consentExpirationDate)&&void 0!==a?a:0)<=s&&(delete c[l],c.consentBoxDismissed=!1);
6return t(t({},e),{},{consents:c});case"CLEAR_CONSENT_TYPE_DATA":var d=t({},e.consents);return delete d[n.payload],t(t({},e),{},{consents:d});case I:var u=t(t({},e.consents),n.payload);return t(t({},e),{},{consents:u});case A:var h=t({},e.consents);return h[n.payload.consentType]=t({},n.payload.consentData),t(t({},e),{},{consents:h});case M:var m=t({},e.consents);return m.consentBoxDismissed=!0,t(t({},e),{},{consents:m});case N:var p=t({},e.consents);return p.consentBoxDismissed=!1,t(t({},e),{},{consents:p})}return e}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,arguments.length>1?arguments[1]:void 0);return"object"==typeof window.dataLayer&&(!R||void 0!==e.consents.consentBoxDismissed&&e.consents.consentBoxDismissed)&&(window.dataLayer.push(t({event:"consent-changed"},e.consents)),R=!0),e}var z={setItem(t,e){document.cookie="".concat(t,"=").concat(e,";path=/;")},getItem(t){for(var e="".concat(t,"="),n=document.cookie.split(";"),o=0,i=n.length;o<i;o++){for(var r=n[o];" "===r.charAt(0);)r=r.substring(1,r.length);if(0===r.indexOf(e))return r.substring(e.length,r.length)}return null}},F=(t,e,n)=>{try{var o=JSON.stringify(t);return void e.setItem(n,o)}catch(t){console.error("There was an error while saving the consents data to storage: Error: ".concat(t))}},D=(t,e)=>{try{var n=t.getItem(e);return null===n?{}:JSON.parse(n)}catch(t){return console.error("There was a problem loading the consents data from storage. Error: ".concat(t)),{}}},B=t=>{var e={},n={};for(var o in t)"consentBoxDismissed"===o?n[o]=t[o]:0===t[o].consentLifetime?e[o]=t[o]:t[o].consentLifetime>0&&(n[o]=t[o]);F({consents:e},z,"consentsState"),F({consents:n},localStorage,"consentsState")},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({trace:!0,traceLimit:25}):a)(...e),o=s(P,t,n);return o.dispatch({type:O}),o}((()=>{var e=D(z,"consentsState"),n=D(localStorage,"consentsState");return{consents:t(t({},e.consents),n.consents)}})(),[c((t=>{var{getState:e}=t;return t=>n=>{var o=t(n),i=e();for(var r in i){if("consents"!==r)return void console.error('Unknown data "key" found while saving to session / local Storage');B(i.consents)}return o}}))]),U=["tracking","html","maps","video","ads"];class q{constructor(t){this.isRendered=!1,this.templateElement=t}renderInto(t){this.isRendered||(t.insertNode(this.getContent(t)),this.isRendered=!0)}getContent(t){if(!this.isCommentedTemplate(this.templateElement))return document.importNode(this.templateElement.content,!0);var e=this.uncommentTemplate(this.templateElement);return t.createContextualFragment(e)}isCommentedTemplate(t){var e=t.innerHTML.trim();return e.startsWith("\x3c!--")&&e.endsWith("--\x3e")}uncommentTemplate(t){var e=t.innerHTML.trim();return e.substring(4,e.length-3).trim()}}class H{constructor(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"template[data-toujou-third-party-content]";(this.host=t).addController(this),this.selector=n,this.templateRenderer=e}hostConnected(){}hostDisconnected(){}onConsentsChanged(t){for(var[e,n]of Object.entries(t))"object"==typeof n&&n.consentGiven&&document.querySelectorAll(this.selector+'[data-content-type="'+e+'"]').forEach((t=>{var e=document.createRange();e.setStartAfter(t),e.collapse(!0),new this.templateRenderer(t).renderInto(e),t.remove()}))}}class V extends n{static get is(){return"toujou-consent-widget"}render(){return o(f||(f=i(['\n <slot name="consentWidgetHeader"></slot>\n <slot id="consentElements"></slot>\n <slot name="consentWarning" id="consentWarning"></slot>\n '])))}static get styles(){return T}set _warningVisible(t){this.setAttribute("warningvisible",t)}static get properties(){return{inPage:{type:Boolean},listenTo:{type:String},listenOn:{type:String},_warningVisible:{type:Boolean},deactivated:{type:Boolean}}}set listenTo(t){t.split(/\s+/).forEach((t=>{this.addEventListener(t,this._handleEvent)}))}set _dismissedBox(t){this.inPage||(t?this.setAttribute("hidden",""):this.removeAttribute("hidden")),this._warningVisible=this.inPage&&!t}constructor(){var t;super(),this.inPage=!1,this.deactivated=!1,this.consentTypeNames=U,this.listenOn="*",this.templateController=new H(this),this.onStateChange=this.onStateChange.bind(this),this._handleEvent=this._handleEvent.bind(this),this.store=W,this.store.subscribe(this.onStateChange),this._state=this.store.getState(),this._warningVisible=this.inPage,this.templateController.onConsentsChanged(null!==(t=this._state.consents)&&void 0!==t?t:{}),"#aaa"===window.location.hash&&(this.deactivated=!0),this.addEventListener("toujou-consent-connected",this._handleConsentConnected),this.addEventListener("toujou-consent-checkbox-changed",this._handleConsentCheckboxChanged)}connectedCallback(){super.connectedCallback(),this._dismissedBox=!!this._state.consents&&this._state.consents.consentBoxDismissed,this.deactivated?setTimeout((()=>{this._prepareToSaveConsents(),this._dismissConsentBox(),this._dispatchConsentDeactivated()})):setTimeout((()=>{var t=this.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not
6([tabindex="-1"])');t.length>0&&t[0].focus()}))}firstUpdated(){this.consentTypeNames.forEach((t=>{var e=this.querySelector('toujou-consent[consenttype="'.concat(t,'"]'));this._state.consents.consentBoxDismissed&&!this._state.consents[t]&&e&&this._undismissConsentBox()}))}onStateChange(){var t;this._state=this.store.getState(),this._dismissedBox=this._state.consents.consentBoxDismissed,this.templateController.onConsentsChanged(null!==(t=this._state.consents)&&void 0!==t?t:{}),this._updateAllConsentElementsStates()}_handleEvent(t){t.stopPropagation(),"click"===t.type&&!this.inPage&&t.target.matches(this.listenOn)&&this._handleConsentBoxSaveButtonClick(t.target)}_handleConsentCheckboxChanged(t){this.inPage&&!0===this._state.consents.consentBoxDismissed&&(this._prepareToSaveConsents(),this._dispatchAddSnackbar(t.target.getAttribute("snackbarmessage")))}_handleConsentBoxSaveButtonClick(t){t.hasAttribute("accept-all")?this._prepareToSaveConsents(!0):t.hasAttribute("deny-all")?this._prepareToSaveConsents(!1):this._prepareToSaveConsents(null),this._dismissConsentBox()}_prepareToSaveConsents(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this._getAllConsents(t);this._saveAllConsents(e)}_getAllConsents(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e={},n=this.querySelectorAll("toujou-consent");return n&&n.forEach((n=>{var o=n.getAttribute("consenttype");e[o]=this._createNewConsentData(n,t)})),e}_createNewConsentData(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.querySelector(".consent__checkbox");null!==e&&(n.checked=e);var o=this._createConsentLifeInMillis(t.getAttribute("consenttype"),t.getAttribute("consentlifetime")),i=n.checked,r=Date.now();return{consentGiven:i,consentCreationDate:r,consentExpirationDate:r+o,consentLifetime:o}}_createConsentLifeInMillis(t,e){return"tracking"===t?"0"===e?63072e6:0:24*e*60*60*1e3}_dismissConsentBox(){this.store.dispatch({type:M}),this._dispatchConsentWidgetDismissedEvent()}_undismissConsentBox(){this.store.dispatch({type:N})}_saveAllConsents(t){this.store.dispatch((t=>({type:I,payload:t}))(t))}_handleConsentConnected(t){this._setConsentElementState(t.target)}_setConsentElementState(t){if("TOUJOU-CONSENT"===t.tagName){var e=t.getAttribute("consenttype"),n="1"===t.getAttribute("prechecked");t.consentState=this._getConsentTypeState(this._state,e,n)}}_updateAllConsentElementsStates(){this.querySelectorAll("toujou-consent").forEach((t=>{this._setConsentElementState(t)}))}_getConsentTypeState(t,e,n){var o,i=null;return null!==(o=null==t?void 0:t.consents[e])&&void 0!==o&&o&&(i=t.consents[e]),i?i.consentGiven:n}_dispatchAddSnackbar(t){var e=new CustomEvent("toujou-add-snackbar",{bubbles:!0,composed:!0,detail:{message:t,type:"auto",duration:2500,variant:"success"}});this.dispatchEvent(e)}_dispatchConsentWidgetDismissedEvent(){var t=new CustomEvent("toujou-consent-widget-dismissed",{bubbles:!0,composed:!0});this.dispatchEvent(t)}_dispatchConsentDeactivated(){var t=new CustomEvent("toujou-consent-widget-deactivated",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}customElements.define(V.is,V); 7/*! 8 * Cookie-store v4.0.0-next.2 9 * https://github.com/markcellus/cookie-store 10 * 11 * Copyright (c) 2022 Mark 12 * Licensed under the MIT license 13 */ 14var G,Y=decodeURIComponent,J=/; */;function X(t,e){try{return"boolean"==typeof e?decodeURIComponent(t):e(t)}catch(e){return t}}!function(t){t.strict="strict",t.lax="lax",t.none="none"}(G||(G={}));class K extends Event{constructor(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{changed:[],deleted:[]};super(t,e),this.changed=e.changed||[],this.deleted=e.deleted||[]}}class $ extends EventTarget{constructor(){throw super(),new TypeError("Illegal Constructor")}get[Symbol.toStringTag](){return"CookieStore"}get(t){var e=this;return _((function*(){if(null==t)throw new TypeError("CookieStoreGetOptions must not be empty");if(t instanceof Object&&!Object.keys(t).length)throw new TypeError("CookieStoreGetOptions must not be empty");return(yield e.getAll(t))[0]}))()}set(t,e){var n=this;return _((function*(){var o,i,r,a={name:"",value:"",path:"/",secure:!1,sameSite:G.strict,expires:null,domain:null};if("string"==typeof t)a.name=t,a.value=e;else{if(Object.assign(a,t),a.path&&!a.path.startsWith("/"))throw new TypeError('Cookie path must start with "/"');if(null===(o=a.domain)||void 0===o?void 0:o.startsWith("."))throw new TypeError('Cookie domain cannot start with "."');if(a.domain&&a.domain!==window.location.hostname)throw new TypeError("Cookie domain must domain-match current host");if((null===(i=a.name)||void 0===i?void 0:i.startsWith("__Host"))&&a.domain)throw new TypeError("Cookie domain must not be specified for host cookies");if((null===(r=a.name)||void 0===r?void 0:r.startsWith("__Host"))&&"/"!=a.path)throw new TypeError("Cookie path must not be specified for host cookies");a.path&&a.path.endsWith("/")&&(a.path=a.path.slice(0,-1)),""===a.path&&(a.path="/")}if(""===a.name&&a.value&&a.value.includes("="))throw new TypeError("Cookie value cannot contain '=' if the name is empty");a.name&&a.name.startsWith("__Host")&&(a.secure=!0);var s="".concat(a.name,"=").concat(encodeURIComponent(a.value));switch(a.domain&&(s+="; Domain="+a.domain),a.path&&(s+="; Path="+a.path),"number"==typeof a.expires?s+="; Expires="+new Date(a.expires).toUTCString():a.expires instanceof Date&&(s+="; Expires="+a.expires.toUTCString()),(a.name&&a.name.startsWith("__Secure")||a.secure)&&(a.sameSite=G.lax,s+="; Secure"),a.sameSite){case G.lax:s+="; SameSite=Lax";break;case G.strict:s+="; SameSite=Strict";break;case G.none:s+="; SameSite=None"}var c=n.get(a);if(document.cookie=s,n.onchange){var l=[],d=[];c&&!(yield n.get(a))?d.push(y(y({},a),{},{value:void 0})):l.push(a);var u=new K("change",{changed:l,deleted:d});n.onchange(u)}}))()}getAll(t){return _((function*(){var e,n,o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var n=[],o=e||{},i=t.split(J),r=o.decode||Y,a=0;a<i.length;a++){var s=i[a],c=s.indexOf("=");if(!(c<0)){var l=s.substr(0,c).trim(),d=s.substr(++c,s.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),null==n[l]&&n.push({name:l,value:X(d,r)})}}return n}(document.cookie);if(null==t||0===Object.keys(t).length)return o;if("string"==typeof t?e=t:(e=t.name,n=t.url),n){var i=new URL(n,window.location.origin);if(window.location.href!==i.href||window.location.origin!==i.origin)throw new TypeError("URL must match the document URL");return o.slice(0,1)}return o.filter((t=>t.name===e))}))()}delete(t){var e=this;return _((function*(){var n={name:"",value:"",path:"/",secure:!1,sameSite:G.strict,expires:null,domain:null};"string"==typeof t?n.name=t:Object.assign(n,t),n.expires=0,yield e.set(n)}))()}}var Q=new WeakMap,Z=new WeakMap;class tt{get[Symbol.toStringTag](){return"CookieStoreManager"}constructor(){throw new TypeError("Illegal Constructor")}subscribe(t){var e=this;return _((function*(){var n=Q.get(e)||[],o=Z.get(e);if(!o)throw new TypeError("Illegal invocation");var i=function*(){var t=r.name,e=new URL(r.url||"",o.scope).toString();if(n.some((n=>n.name===t&&n.url===e)))return"continue";n.push({name:r.name,url:e})};for(var r of t)yield*i();Q.set(e,n)}))()}getSubscriptions(){var t=this;return _((function*(){return(Q.get(t)||[]).map((t=>{var{name:e,url:n}=t;return{name:e,url:n}}))}))()}unsubscribe(t){var e=this;return _((function*(){var n=Q.get(e)||[],o=Z.get(e);if(!o)throw new TypeError("Illegal invocation");var i=function*(){var t=r.name,e=new URL(r.url||"",o.scope).toString();n=n.filter((n=>n.name!==t||n.url!==e))};for(var r of t)yield*i();Q.set(e,n)}))()}}"undefined"==typeof ServiceWorkerRegistration||"cookies"in ServiceWorkerRegistration.prototype||Ob
14ject.defineProperty(ServiceWorkerRegistration.prototype,"cookies",{configurable:!0,enumerable:!0,get(){var t=Object.create(tt.prototype);return Z.set(t,this),Object.defineProperty(this,"cookies",{value:t}),t}});var et,nt=Object.create($.prototype);window.dataLayer=window.dataLayer||[];class ot extends HTMLElement{get analyticsid(){return this.getAttribute("analyticsid")}constructor(){super(),this.hidden=!0,this.style.display="contents",this.onStateChange=this.onStateChange.bind(this),this.store=W}connectedCallback(){this._storeUnsubscribe=this.store.subscribe(this.onStateChange),this.onStateChange()}disconnectedCallback(){this._storeUnsubscribe&&this._storeUnsubscribe()}onStateChange(){var t=this.store.getState().consents.tracking||null;JSON.stringify(t)!==JSON.stringify(this.consentState)&&(this.consentState=t,this._handleConsentState(this.consentState))}_handleConsentState(t){"object"==typeof t&&null!==t&&t.consentGiven?this._instantiateGoogleAnalytics(t):this._disableGoogleAnalytics()}_instantiateGoogleAnalytics(t){if(!this.gaIsInstantiated){var e=this.analyticsid;window["ga-disable-".concat(e)]=!1;var n={cookie_expires:t.consentExpirationDate,anonymize_ip:!0};window.gtag=o,this._ga||(this._ga=this._addAnalyticsScriptTag(e),o("js",new Date)),o("config",e,n),this.gaIsInstantiated=!0,this._dispatchGtagLoadedEvent()}function o(){window.dataLayer.push(arguments)}}_addAnalyticsScriptTag(t){var e="https://www.googletagmanager.com/gtag/js?id=".concat(t),n=document.createElement("script"),o=document.getElementsByTagName("script")[0];return n.async=!0,n.src=e,o.parentNode.insertBefore(n,o),!0}_disableGoogleAnalytics(){["_ga","_gid","_gat"].forEach((t=>{nt.delete(t)})),window["ga-disable-".concat(this.analyticsid)]=!0,this.gaIsInstantiated=!1}_dispatchGtagLoadedEvent(){var t=new CustomEvent("toujou-gtag-loaded",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}customElements.define("toujou-tracking-google-analytics",ot),window._paq=window._paq||[];class it extends HTMLElement{get url(){return this.getAttribute("url").replace(/^\/\//,"".concat(window.location.protocol,"//"))}get siteid(){return this.getAttribute("siteid")}constructor(){super(),this.hidden=!0,this.style.display="contents",this.onStateChange=this.onStateChange.bind(this),this.store=W}connectedCallback(){this._instantiateMatomo(),this._storeUnsubscribe=this.store.subscribe(this.onStateChange),this.onStateChange()}disconnectedCallback(){this._storeUnsubscribe&&this._storeUnsubscribe()}onStateChange(){var t=this.store.getState().consents.tracking||null;JSON.stringify(t)!==JSON.stringify(this.consentState)&&(this.consentState=t,this._handleConsentState(this.consentState))}_handleConsentState(t){var{_paq:e}=window;"object"==typeof t&&null!==t&&t.consentGiven?this._enableAnonymizedTracking(t,e):this._disableAnonymizedTracking(e)}_enableAnonymizedTracking(t,e){e.push(["setCookieConsentGiven"])}_disableAnonymizedTracking(t){t.push(["forgetCookieConsentGiven"]),nt.getAll().then((t=>t.forEach((t=>{(t.name.match(/^_pk_.*$/)||t.name.match(/^_mtm_.*$/)||t.name.match(/^MATOMO.*$/))&&nt.delete(t.name)}))))}_instantiateMatomo(){if(!this.matomoIsInstantiated){var t=new URL(this.url),e=new URL(t);e.pathname="/matomo.php";var n=new URL(t);n.pathname="/matomo.js";var{_paq:o}=window;o.push(["requireCookieConsent"]),o.push(["trackPageView"]),o.push(["enableLinkTracking"]),o.push(["setTrackerUrl",e.toString()]),o.push(["setSiteId",this.siteid]),this._matomo||(this._matomo=this._addMatomoScriptTag(n)),this.matomoIsInstantiated=!0,this._dispatchMatomoLoadedEvent()}}_addMatomoScriptTag(t){var e=document.createElement("script"),n=document.getElementsByTagName("script")[0];return e.async=!0,e.src=t.toString(),n.parentNode.insertBefore(e,n),!0}_dispatchMatomoLoadedEvent(){var t=new CustomEvent("toujou-matomo-loaded",{bubbles:!0,composed:!0});this.dispatchEvent(t)}}customElements.define("toujou-tracking-matomo",it);var rt,at=e(et||(et=S([":host {\n display: var(--toujou-third-party-content-display, flex);\n -webkit-box-align: var(--toujou-third-party-content-align-items, stretch);\n -ms-flex-align: var(--toujou-third-party-content-align-items, stretch);\n align-items: var(--toujou-third-party-content-align-items, stretch);\n -webkit-box-pack: var(--toujou-third-party-content-justify-content, center);\n -ms-flex-pack: var(--toujou-third-party-content-justify-content, center);\n justify-content: var(--toujou-third-party-content-justify-content, center);\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: var(--toujou-third-party-content-flex-direction, column);\n flex-direction: var(--toujou-third-party-content-flex-direction, column);\n position: var(--toujou-third-party-content-position, relative);\n top: var(--toujou-third-party-content-top, 0);\n left: var(--toujou-third-party-content-left, 0);\n height: var(--toujou-third-party-content-height, 100%);\n width: var(--toujou-third-party-content-width, 100%);\n}\n\n:host([contenttype='maps']) {\n position: var(--toujou-third-party-content-maps-position, absolute);\n}\n\niframe {\n border: var(--toujou-third-party-content-iframe-border, none);\n position: var(--toujou-third-party-content-iframe-position, absolute);\n height: var(--toujou-third-party-content-iframe-height, 100%);\n width: var(--toujou-third-party-content-iframe-width, 100%);\n}\n\n:host([contenttype='html']) iframe {\n position: var(--toujou-third-party-content-html-iframe-position, relative);\n}\n"])));
14class st extends n{set store(t){this._storeUnsubscribe&&(this._storeUnsubscribe(),this._storeUnsubscribe=this._store=null,this.consent=null),t&&(this._storeUnsubscribe=t.subscribe(this.onStateChange),this._store=t,this.onStateChange())}get store(){return this._store}static get is(){return"toujou-third-party-content"}static get styles(){return at}render(){return o(v||(v=i(['\n <slot id="templatedContent" @slotchange="','"></slot>\n <div @click="','">\n <slot name="placeholder" id="placeholderContainer" class="placeholder-slot"></slot>\n </div>\n '])),this._handleSlotChange,this._handlePlaceholderClick)}constructor(){super(),this._store=null,this._storeUnsubscribe=null,this.isIntersecting=!1,this.contentTypeAllowed=!1,this.show=!1,this.consent=null,this.onStateChange=this.onStateChange.bind(this),this._handleConsentButtonClick=this._handleConsentButtonClick.bind(this)}connectedCallback(){super.connectedCallback(),this.store||(this.store=W),this._isContentTypeAllowed(this.consent),this._addEventListeners(),this._addIntersectionObserver()}updated(t){t.has("isIntersecting")&&this.isIntersecting&&!this.show&&(this.show=!0),(t.has("contentTypeAllowed")||t.has("show"))&&this.contentTypeAllowed&&this.show&&this._showContent()}onStateChange(){var t,e,n;this.consent=null!==(n=null===(e=null===(t=this._store.getState())||void 0===t?void 0:t.consents)||void 0===e?void 0:e[this.contentType])&&void 0!==n&&n,this._isContentTypeAllowed(this.consent)}_addEventListeners(){window.addEventListener("toujou-consent-widget-dismissed",(()=>{this._isContentTypeAllowed(this.consent)})),window.addEventListener("toujou-consent-button-clicked",this._handleConsentButtonClick)}_handleConsentButtonClick(t){var e=t.target;this.querySelectorAll(".consent").forEach((n=>{n===e&&(this._saveSingleConsent(t.target.getAttribute("consenttype"),this._createNewConsentData(t.target)),this._dispatchAddSnackbar(t.target.getAttribute("snackbarmessage")))}))}_createNewConsentData(t){var e=24*t.getAttribute("consentLifetime")*60*60*1e3;return{consentGiven:!0,consentCreationDate:Date.now(),consentExpirationDate:Date.now()+e,consentLifetime:e}}_saveSingleConsent(t,e){this.store.dispatch(((t,e)=>({type:A,payload:{consentType:t,consentData:e}}))(t,e))}_dispatchAddSnackbar(t){var e=new CustomEvent("toujou-add-snackbar",{bubbles:!0,composed:!0,detail:{message:t,type:"auto",duration:2500,variant:"success"}});this.dispatchEvent(e)}_handlePlaceholderClick(t){t.target.hasAttribute("ttpc-showcontentonce")&&this._handleShowContentOnceClick()}_handleShowContentOnceClick(){this._showContent()}_addIntersectionObserver(){new IntersectionObserver(((t,e)=>{this.isIntersecting=t[0].isIntersecting,this.isIntersecting&&e.unobserve(this)})).observe(this)}_clearRenderedContent(){this.querySelector(".toujou-third-party-content__templated-content").innerHTML=""}
14_handleSlotChange(){}_isContentTypeAllowed(t){this.contentTypeAllowed=null!==t&&(t.consentGiven||!1),"#aaa"===window.location.hash&&(this.contentTypeAllowed=!0)}_showContent(){this._clearRenderedContent();var t=this.shadowRoot.querySelector("#templatedContent").assignedNodes({flatten:!0}).filter((t=>"TEMPLATE"===t.tagName)),e=this.querySelector(".toujou-third-party-content__templated-content"),n=document.createRange();n.selectNodeContents(e),t.forEach((t=>{new q(t).renderInto(n)})),this.setAttribute("showingcontent","")}}l([d()],st.prototype,"contentType",void 0),l([d()],st.prototype,"store",null),l([d({type:Boolean})],st.prototype,"isIntersecting",void 0),l([p()],st.prototype,"contentTypeAllowed",void 0),l([p()],st.prototype,"show",void 0),l([p()],st.prototype,"consent",void 0),customElements.define(st.is,st);class ct extends n{createRenderRoot(){return this}constructor(){super(),this.consentTypeNames=U,this.onStateChange=this.onStateChange.bind(this),this.store=W,this.store.subscribe(this.onStateChange),this.state=this.store.getState()}}class lt extends ct{static get is(){return"toujou-consent-state-emitter-gtm"}onStateChange(){if(this.state=this.store.getState(),!window.gtag)throw new Error("TOUJOU: Could not get the gtag library to set the ads consent state!");this._updateGtmTrackingState(),this._updateGtmAdsState()}_updateGtmTrackingState(){var t=this.state.consents.tracking,e={analytics_storage:!0===(null==t?void 0:t.consentGiven)?"granted":"denied"};this._sendGtagConsentUpdate(e)}_updateGtmAdsState(){var t=this.state.consents.ads,e=!0===(null==t?void 0:t.consentGiven)?"granted":"denied",n={ad_storage:e,ad_user_data:e,ad_personalization:e};this._sendGtagConsentUpdate(n)}_sendGtagConsentUpdate(t){window.gtag("consent","update",t)}}customElements.define(lt.is,lt);let dt=class extends n{static get is(){return"toujou-lazy-render"}get templates(){return this.shadowRoot.querySelector("#slot").assignedNodes({flatten:!0}).filter((t=>"TEMPLATE"===t.tagName))}render(){return o(rt||(rt=i(['\n <slot id="slot"></slot>'])))}connectedCallback(){super.connectedCallback(),this.intersectionObserver=new IntersectionObserver((t=>{t.some((t=>t.isIntersecting))&&(this.renderTemplates(),this.intersectionObserver.disconnect())})),this.intersectionObserver.observe(this)}disconnectedCallback(){this.intersectionObserver&&this.intersectionObserver.disconnect(),super.disconnectedCallback()}
14renderTemplates(){this.templates.forEach((t=>{var e=document.importNode(t.content,!0);t.parentNode.insertBefore(e,t)}))}};customElements.define(dt.is,dt);var ut,ht,mt,pt;class gt extends n{constructor(){super(...arguments),this._frameDuration=1e3/60,this._observer=new IntersectionObserver(((t,e)=>{t.forEach((t=>{t.isIntersecting&&t.intersectionRatio>=.75&&(this._dispatchCounterEvent("toujou-counter-animation-start"),this._animate(),this._observer.unobserve(this._numberEl))}))}),{threshold:1}),this._init=()=>{this._startNumberVal=parseFloat(this.startNumber),this._endNumberVal=parseFloat(this.endNumber),this._animationDuration=this._getAnimationDuration(),this._totalFrames=Math.round(this._animationDuration/this._frameDuration),this._pageLang=document.documentElement.getAttribute("lang")||"de-DE",this._observer.observe(this._numberEl),this._dispatchCounterEvent("toujou-counter-init")},this._animate=()=>{var t=0,e=()=>{var n,o=(n=++t/this._totalFrames)*(2-n),i=this._endNumberVal>=this._startNumberVal?Math.round(this._startNumberVal+(this._endNumberVal-this._startNumberVal)*o):Math.round(this._startNumberVal-(this._startNumberVal-this._endNumberVal)*o);parseFloat(this._numberEl.textContent.replace(/,/g,""))!==i&&(this._numberEl.textContent=new Intl.NumberFormat(this._pageLang).format(i)),t<this._totalFrames?requestAnimationFrame(e):(this._numberEl.textContent=new Intl.NumberFormat(this._pageLang).format(this._endNumberVal),this._dispatchCounterEvent("toujou-counter-animation-end"))};requestAnimationFrame(e)},this._getAnimationDuration=()=>{this._animationSpeedVarName="--counter-animation-duration-".concat(this.animationSpeed?this.animationSpeed:"medium");var t=getComputedStyle(this),e=parseInt(t.getPropertyValue("".concat(this._animationSpeedVarName)));return e||(console.warn("TOUJOU: could not get the counter animation duration variable. Using fallback value",this),e=3e3),e},this._dispatchCounterEvent=t=>{this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0,detail:{counter:this}}))}}static get is(){return"toujou-counter"}createRenderRoot(){return this}firstUpdated(t){super.firstUpdated(t),this.startNumber&&this.endNumber?(this._numberEl=this.querySelector(".counter__number-text"),this._numberEl?(this.animationSpeed||console.warn("TOUJOU: could not get the counter animation speed. Using default value!",this),window.matchMedia("(prefers-reduced-motion: reduce)").matches?this._numberEl.textContent=this.endNumber:this._init()):console.error("TOUJOU: could not get the counter number element!",this)):console.error("TOUJOU: could not get start and end values for the counter animation!",this)}}gt.properties={startNumber:{type:String,attribute:"start-number"},endNumber:{type:String,attribute:"end-number"},animationSpeed:{type:String,attribute:"animation-speed"}},customElements.define(gt.is,gt);var ft=e(ut||(ut=i([":host {\n display: var(--toujou-poster-reveal-display, block);\n position: var(--toujou-poster-reveal-position, relative);\n}\n"]))),vt="toujou-poster-reveal-activate";class bt extends n{constructor(){super(...arguments),this.activated=!1}static get is(){return"toujou-poster-reveal"}static get styles(){return ft}activate(){this.activated||(this.activated=!0,this.dispatchEvent(new CustomEvent(vt,{bubbles:!0,composed:!0})))}render(){return o(ht||(ht=i(["\n ","\n "])),this.activated?o(pt||(pt=i(['\n <slot name="content"></slot>\n ']))):o(mt||(mt=i(['\n <slot name="poster"></slot>\n <slot name="trigger" @click=',"></slot>\n "])),this.activate))}}l([d({type:Boolean,reflect:!0})],bt.prototype,"activated",void 0),customElements.define(bt.is,bt);var yt=null,wt=0,_t=new WeakMap,kt=["autoplay","encrypted-media","picture-in-picture"],St="https://www.youtube.com/iframe_api",Et="toujou-poster-reveal-video-play-requested",Ct="toujou-poster-reveal-video-playing",jt="toujou-poster-reveal-video-error",xt=["youtube.com","youtube-nocookie.com","youtu.be"],Tt=["vimeo.com"],Ot=5e3,It=2e3,At=!1;function Mt(t){var e=_t.get(t);if(e)return e;var n=(yt||(yt=new Promise(((t,e)=>
14{if("undefined"!=typeof YT&&YT.Player)t();else{var n=window.onYouTubeIframeAPIReady;if(window.onYouTubeIframeAPIReady=()=>{null==n||n(),t()},!document.querySelector('script[src="'.concat(St,'"]'))){var o=document.createElement("script");o.src=St,o.onerror=()=>{e(new Error("Failed to load YouTube IFrame API."))},document.head.appendChild(o)}}})))).then((()=>new Promise((e=>{t.id||(t.id="youtube-player-".concat(++wt)),new YT.Player(t.id,{events:{onReady:t=>e(t.target)}})}))));return _t.set(t,n),n}function Nt(t,e){return Lt.apply(this,arguments)}function Lt(){return(Lt=r((function*(t,e){try{zt(t,Et,{provider:"youtube"}),function(t){var e=new Set(t.allow.split(";").map((t=>t.trim())).filter(Boolean)),n=!1;for(var o of kt)e.has(o)||(e.add(o),n=!0);return n&&(t.allow=Array.from(e).join("; ")),n}(e)&&(yield function(t){return new Promise(((e,n)=>{var o=window.setTimeout((()=>{t.removeEventListener("load",i),n(new Error("Timed out while reloading iframe."))}),Ot),i=()=>{window.clearTimeout(o),t.removeEventListener("load",i),e()};t.addEventListener("load",i);try{var r=new URL(t.src,window.location.href);r.searchParams.set("_r",Date.now().toString()),t.src=r.toString()}catch(e){window.clearTimeout(o),t.removeEventListener("load",i),n(e)}}))}(e),_t.delete(e)),!function(t){t.mute(),t.setVolume(30),t.playVideo(),t.unMute()}(yield Mt(e)),zt(t,Ct,{provider:"youtube"})}catch(n){zt(t,jt,{provider:"youtube",error:n}),console.warn("Could not start YouTube video playback.",{src:e.src,error:n})}}))).apply(this,arguments)}function Rt(t,e){var n;zt(t,Et,{provider:"vimeo"}),null===(n=e.contentWindow)||void 0===n||n.postMessage({method:"play"},"*"),zt(t,Ct,{provider:"vimeo"})}function Pt(t){try{var{hostname:e}=new URL(t.src,window.location.href);if(xt.some((t=>e===t||e.endsWith(".".concat(t)))))return"youtube";if(Tt.some((t=>e===t||e.endsWith(".".concat(t)))))return"vimeo"}catch(t){}return null}function zt(t,e,n){t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:n}))}At||(At=!0,window.addEventListener(vt,(t=>{var e=t.target;e&&function(t){var e=Array.from(t.querySelectorAll("iframe"));return e.length>0?Promise.resolve(e):new Promise((e=>{var n=window.setTimeout((()=>{o.disconnect(),e(Array.from(t.querySelectorAll("iframe")))}),It),o=new MutationObserver((()=>{var i=Array.from(t.querySelectorAll("iframe"));i.length>0&&(window.clearTimeout(n),o.disconnect(),e(i))}));o.observe(t,{childList:!0,subtree:!0})}))}(e).then((t=>{0!==t.length&&function(t,e){for(var n of e)switch(Pt(n)){case"youtube":Nt(t,n);break;case"vimeo":Rt(t,n)}}(e,t)}))})));var Ft=!1;if("undefined"!=typeof window){var Dt={get passive(){Ft=!0}};window.addEventListener("testPassive",null,Dt),window.removeEventListener("testPassive",null,Dt)}var Bt,Wt="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),Ut=[],qt=!1,Ht=-1,Vt=void 0,Gt=void 0,Yt=function(t){return Ut.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},Jt=function(t){var e=t||window.event;return!!Yt(e.target)||(e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1))},Xt=function(){void 0!==Gt&&(document.body.style.paddingRight=Gt,Gt=void 0),void 0!==Vt&&(document.body.style.overflow=Vt,Vt=void 0)},Kt=function(t,e){if(t){if(!Ut.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};Ut=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(Ut),[n]),Wt?(t.ontouchstart=function(t){1===t.targetTouches.length&&(Ht=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-Ht;!Yt(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?Jt(t):t.stopPropagation())}(e,t)},qt||(document.addEventListener("touchmove",Jt,Ft?{passive:!1}:void 0),qt=!0)):function(t){if(void 0===Gt){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;e&&n>0&&(Gt=document.body.style.paddingRight,document.body.style.paddingRight=n+"px")}void 0===Vt&&(Vt=document.body.style.overflow,document.body.style.overflow="hidden")}(e)}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")},$t={exports:{}};Bt=$t,function(t){if("undefined"!=typeof window){var e=0,n=!1,o=!1,i=7,r="[iFrameSizer]",a=r.length,s=null,c=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),d={}
14,u=null,h=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){_("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),m={};window.jQuery!==t&&function(t){t.fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(t){return this.filter("iframe").each((function(e,n){R(n,t)})).end()}):w("","Unable to bind to jQuery, it is not fully loaded.")}(window.jQuery),"function"==typeof t&&t.amd?t([],B):Bt.exports=B(),window.iFrameResize=window.iFrameResize||B()}function p(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function g(t,e,n){t.addEventListener(e,n,!1)}function f(t,e,n){t.removeEventListener(e,n,!1)}function v(t){return r+"["+function(t){var e="Host page: "+t;return window.top!==window.self&&(e=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+t:"Nested host page: "+t),e}(t)+"]"}function b(t){return d[t]?d[t].log:n}function y(t,e){k("log",t,e,b(t))}function w(t,e){k("info",t,e,b(t))}function _(t,e){k("warn",t,e,!0)}function k(t,e,n,o){!0===o&&"object"==typeof window.console&&console[t](v(e),n)}function S(t){function e(){c("Height"),c("Width"),M((function(){A(B),T(W),k("onResized",B)}),B,"init")}function n(t){return"border-box"!==t.boxSizing?0:(t.paddingTop?parseInt(t.paddingTop,10):0)+(t.paddingBottom?parseInt(t.paddingBottom,10):0)}function o(t){return"border-box"!==t.boxSizing?0:(t.borderTopWidth?parseInt(t.borderTopWidth,10):0)+(t.borderBottomWidth?parseInt(t.borderBottomWidth,10):0)}function c(t){var e=Number(d[W]["max"+t]),n=Number(d[W]["min"+t]),o=t.toLowerCase(),i=Number(B[o]);y(W,"Checking "+o+" is in range "+n+"-"+e),i<n&&(i=n,y(W,"Set "+o+" to min value")),i>e&&(i=e,y(W,"Set "+o+" to max value")),B[o]=""+i}function l(t){return D.slice(D.indexOf(":")+i+t)}function u(t,e){var n,o,i;n=function(){var n,o;N("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),o=B.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:o.height,iframeWidth:o.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(o.top-n.top,10),offsetLeft:parseInt(o.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),t,e)},o=32,m[i=e]||(m[i]=setTimeout((function(){m[i]=null,n()}),o))}function h(t){var e=t.getBoundingClientRect();return x(W),{x:Math.floor(Number(e.left)+Number(s.x)),y:Math.floor(Number(e.top)+Number(s.y))}}function p(t){var e=t?h(B.iframe):{x:0,y:0},n={x:Number(B.width)+e.x,y:Number(B.height)+e.y};y(W,"Reposition requested from iFrame (offset x:"+e.x+" y:"+e.y+")"),window.top===window.self?(s=n,v(),y(W,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(t?"Offset":"")](n.x,n.y):_(W,"Unable to scroll to requested position, window.parentIFrame not found")}function v(){!1===k("onScroll",s)?O():T(W)}function b(t){var e={};if(0===Number(B.width)&&0===Number(B.height)){var n=l(9).split(":");e={x:n[1],y:n[0]}}else e={x:B.width,y:B.height};k(t,{iframe:B.iframe,screenX:Number(e.x),screenY:Number(e.y),type:B.type})}function k(t,e){return E(W,t,e)}var S,C,R,P,z,F,D=t.data,B={},W=null;"[iFrameResizerChild]Ready"===D?function(){for(var t in d)N("iFrame requested init",L(t),d[t].iframe,t)}():r===(""+D).slice(0,a)&&D.slice(a).split(":")[0]in d?(R=D.slice(a).split(":"),P=R[1]?parseInt(R[1],10):0,z=d[R[0]]&&d[R[0]].iframe,F=getComputedStyle(z),B={iframe:z,id:R[0],height:P+n(F)+o(F),width:R[2],type:R[3]}
14,W=B.id,d[W]&&(d[W].loaded=!0),(C=B.type in{true:1,false:1,undefined:1})&&y(W,"Ignoring init message from meta parent page"),!C&&function(t){var e=!0;return d[t]||(e=!1,_(B.type+" No settings for "+t+". Message was: "+D)),e}(W)&&(y(W,"Received: "+D),S=!0,null===B.iframe&&(_(W,"IFrame ("+B.id+") not found"),S=!1),S&&function(){var e,n=t.origin,o=d[W]&&d[W].checkOrigin;if(o&&""+n!="null"&&!(o.constructor===Array?function(){var t=0,e=!1;for(y(W,"Checking connection is from allowed list of origins: "+o);t<o.length;t++)if(o[t]===n){e=!0;break}return e}():(e=d[W]&&d[W].remoteHost,y(W,"Checking connection is from: "+e),n===e)))throw new Error("Unexpected message received from: "+n+" for "+B.iframe.id+". Message was: "+t.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(d[W]&&d[W].firstRun&&d[W]&&(d[W].firstRun=!1),B.type){case"close":j(B.iframe);break;case"message":r=l(6),y(W,"onMessage passed: {iframe: "+B.iframe.id+", message: "+r+"}"),k("onMessage",{iframe:B.iframe,message:JSON.parse(r)}),y(W,"--");break;case"mouseenter":b("onMouseEnter");break;case"mouseleave":b("onMouseLeave");break;case"autoResize":d[W].autoResize=JSON.parse(l(9));break;case"scrollTo":p(!1);break;case"scrollToOffset":p(!0);break;case"pageInfo":u(d[W]&&d[W].iframe,W),function(){function t(t,o){function i(){d[n]?u(d[n].iframe,n):e()}["scroll","resize"].forEach((function(e){y(n,t+e+" listener for sendPageInfo"),o(window,e,i)}))}function e(){t("Remove ",f)}var n=W;t("Add ",g),d[n]&&(d[n].stopPageInfo=e)}();break;case"pageInfoStop":d[W]&&d[W].stopPageInfo&&(d[W].stopPageInfo(),delete d[W].stopPageInfo);break;case"inPageLink":n=l(9).split("#")[1]||"",o=decodeURIComponent(n),(i=document.getElementById(o)||document.getElementsByName(o)[0])?(t=h(i),y(W,"Moving to in page link (#"+n+") at x: "+t.x+" y: "+t.y),s={x:t.x,y:t.y},v(),y(W,"--")):window.top===window.self?y(W,"In page link #"+n+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(n):y(W,"In page link #"+n+" not found and window.parentIFrame not found");break;case"reset":I(B);break;case"init":e(),k("onInit",B.iframe);break;default:0===Number(B.width)&&0===Number(B.height)?_("Unsupported message received ("+B.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):e()}var t,n,o,i,r}())):w(W,"Ignored: "+D)}function E(t,e,n){var o=null,i=null;if(d[t]){if("function"!=typeof(o=d[t][e]))throw new TypeError(e+" on iFrame["+t+"] is not a function");i=o(n)}return i}function C(t){var e=t.id;delete d[e]}function j(t){var e=t.id;if(!1!==E(e,"onClose",e)){y(e,"Removing iFrame: "+e);try{t.parentNode&&t.parentNode.removeChild(t)}catch(t){_(t)}E(e,"onClosed",e),y(e,"--"),C(t)}else y(e,"Close iframe cancelled by onClose event")}function x(e){null===s&&y(e,"Get page position: "+(s={x:window.pageXOffset===t?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===t?document.documentElement.scrollTop:window.pageYOffset}).x+","+s.y)}function T(t){null!==s&&(window.scrollTo(s.x,s.y),y(t,"Set page position: "+s.x+","+s.y),O())}function O(){s=null}function I(t){y(t.id,"Size reset requested by "+("init"===t.type?"host page":"iFrame")),x(t.id),M((function(){A(t),N("reset","reset",t.iframe,t.id)}),t,"reset")}function A(t){function e(e){o||"0"!==t[e]||(o=!0,y(i,"Hidden iFrame detected, creating visibility listener"),function(){function t(){function t(t){function e(e){return"0px"===(d[t]&&d[t].iframe.style[e])}function n(t){return null!==t.offsetParent}d[t]&&n(d[t].iframe)&&(e("height")||e("width"))&&N("Visibility change","resize",d[t].iframe,t)}Object.keys(d).forEach((function(e){t(e)}))}function e(e){y("window","Mutation observed: "+e[0].target+" "+e[0].type),P(t,16)}function n(){var t=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new o(e).observe(t,n)}var o=p();o&&n()}())}function n(n){!function(e){t.id?(t.iframe.style[e]=t[e]+"px",y(t.id,"IFrame ("+i+") "+e+" set to "+t[e]+"px")):y("undefined","messageData id not set")}(n),e(n)}var i=t.iframe.id;d[i]&&(d[i].sizeHeight&&n("height"),d[i].sizeWidth&&n("width"))}function M(t,e,n){n!==e.type&&c&&!window.jasmine?(y(e.id,"Requesting animation frame"),c(t)):t()}function N(t,e,n,o,i){var a,s=!1;o=o||n.id,d[o]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(a=d[o]&&d[o].targetOrigin,y(o,"["+t+"] Sending msg to iframe["+o+"] ("+e+") targetOrigin: "+a),n.contentWindow.postMessage(r+e,a)):_(o,"["+t+"] IFrame("+o+") not found"),i&&d[o]&&d[o].warningTimeout&&(d[o].msgTimeout=setTimeout((function(){!d[o]||d[o].loaded||s||(s=!0,_(o,"IFrame has not responded within "+d[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),d[o].warningTimeout)))}function L(t){return t+":"+d[t].bodyMarginV1+":"+d[t].sizeWidth+":"+d[t].log+":"+d[t].interval+":"+d[t].enablePublicMethods+":"+d[t].autoResize+":"+d[t].bodyMargin+":"+d[t].heightCalculationMethod+":"+d[t].bodyBackgroun
14d+":"+d[t].bodyPadding+":"+d[t].tolerance+":"+d[t].inPageLinks+":"+d[t].resizeFrom+":"+d[t].widthCalculationMethod+":"+d[t].mouseEvents}function R(o,i){function r(t){var e=t.split("Callback");if(2===e.length){var n="on"+e[0].charAt(0).toUpperCase()+e[0].slice(1);this[n]=this[t],delete this[t],_(a,"Deprecated: '"+t+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a=function(t){if("string"!=typeof t)throw new TypeError("Invaild id for iFrame. Expected String");var r;return""===t&&(o.id=(r=i&&i.id||h.id+e++,null!==document.getElementById(r)&&(r+=e++),t=r),n=(i||{}).log,y(t,"Added missing iframe ID: "+t+" ("+o.src+")")),t}(o.id);a in d&&"iFrameResizer"in o?_(a,"Ignored iFrame, already setup."):(function(t){var e;t=t||{},d[a]=Object.create(null),d[a].iframe=o,d[a].firstRun=!0,d[a].remoteHost=o.src&&o.src.split("/").slice(0,3).join("/"),function(t){if("object"!=typeof t)throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(r,t),function(t){for(var e in h)Object.prototype.hasOwnProperty.call(h,e)&&(d[a][e]=Object.prototype.hasOwnProperty.call(t,e)?t[e]:h[e])}(t),d[a]&&(d[a].targetOrigin=!0===d[a].checkOrigin?""===(e=d[a].remoteHost)||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e:"*")}(i),function(){switch(y(a,"IFrame scrolling "+(d[a]&&d[a].scrolling?"enabled":"disabled")+" for "+a),o.style.overflow=!1===(d[a]&&d[a].scrolling)?"hidden":"auto",d[a]&&d[a].scrolling){case"omit":break;case!0:o.scrolling="yes";break;case!1:o.scrolling="no";break;default:o.scrolling=d[a]?d[a].scrolling:"no"}}(),function(){function t(t){var e=d[a][t];1/0!==e&&0!==e&&(o.style[t]="number"==typeof e?e+"px":e,y(a,"Set "+t+" = "+o.style[t]))}function e(t){if(d[a]["min"+t]>d[a]["max"+t])throw new Error("Value for min"+t+" can not be greater than max"+t)}e("Height"),e("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(d[a]&&d[a].bodyMargin)&&"0"!==(d[a]&&d[a].bodyMargin)||(d[a].bodyMarginV1=d[a].bodyMargin,d[a].bodyMargin=d[a].bodyMargin+"px"),function(e){var n=p();n&&function(t){o.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===o&&j(o)}))}))})).observe(o.parentNode,{childList:!0})}(n),g(o,"load",(function(){var n,i;N("iFrame.onload",e,o,t,!0),n=d[a]&&d[a].firstRun,i=d[a]&&d[a].heightCalculationMethod in l,!n&&i&&I({iframe:o,height:0,width:0,type:"init"})})),N("init",e,o,t,!0)}(L(a)),d[a]&&(d[a].iframe.iFrameResizer={close:j.bind(null,d[a].iframe),removeListeners:C.bind(null,d[a].iframe),resize:N.bind(null,"Window resize","resize",d[a].iframe),moveToAnchor:function(t){N("Move to anchor","moveToAnchor:"+t,d[a].iframe,a)},sendMessage:function(t){N("Send Message","message:"+(t=JSON.stringify(t)),d[a].iframe,a)}}))}function P(t,e){null===u&&(u=setTimeout((function(){u=null,t()}),e))}function z(){"hidden"!==document.visibilityState&&(y("document","Trigger event: Visibility change"),P((function(){F("Tab Visible","resize")}),16))}function F(t,e){Object.keys(d).forEach((function(n){(function(t){return d[t]&&"parent"===d[t].resizeFrom&&d[t].autoResize&&!d[t].firstRun})(n)&&N(t,e,d[n].iframe,n)}))}function D(){g(window,"message",S),g(window,"resize",(function(){var t;y("window","Trigger event: "+(t="resize")),P((function(){F("Window "+t,"resize")}),16)})),g(document,"visibilitychange",z),g(document,"-webkit-visibilitychange",z)}function B(){function e(t,e){e&&(function(){if(!e.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==e.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+e.tagName+">")}(),R(e,t),n.push(e))}var n;return function(){var t,e=["moz","webkit","o","ms"];for(t=0;t<e.length&&!c;t+=1)c=window[e[t]+"RequestAnimationFrame"];c?c=c.bind(window):y("setup","RequestAnimationFrame not supported")}(),D(),function(o,i){switch(n=[],function(t){t&&t.enablePublicMethods&&_("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(o),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),e.bind(t,o));break;case"object":e(o,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return n}}}();var Qt=$t.exports,Zt={exports:{}};!function(t){!function(e){if("undefined"!=typeof window){var n=!0,o=10,i="",r=0,a="",s=null,c="",l=!1,d={resize:1,click:1},u=128,h=!0,m=1,p="bodyOffset",g=p,f=!0,v="",b={},y=32,w=null,_=!1,k=!1,S="[iFrameSizer]",E=S.length,C="",j={max:1,min:1,bodyScroll:1,documentElementScroll:1},x="child",T=window.parent,O="*",I=0,A=!1,M=null,N=16,L=1,R="scroll",P=R,z=window,F=function(){at("onMessage function not defined")},D=function(){},B=function(){},W={height:function(){return at("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return at("Custom width calculation function not defined"),document.body.scrollWidth}},U={},q=!1;try{var H=Object.create({},{passive:{get:function(){q=!0}}});window.addEventListener("test",et,H),window.removeEventListener("test",et,H)}catch(t){}var V,G,Y,J,X,K,$,Q={bodyOffset:function(){return document.body.offsetHeight+vt("marginTop")+vt("marginBottom")},offset:function(){return Q.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return W.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,yt(Q))},min:function(){return Math.min.apply(null,yt(Q))},grow:function(){return Q.max()},lowestElement:function(){return Math.max(Q.bodyOffset()||Q.documentElementOffset(),bt("bottom",_t()))},taggedElement:function(){return wt("bottom","data-iframe-height")}},Z={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return W.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Z.bodyScroll(),Z.documentElementScroll())},max:function(){return Math.max.apply(null,yt(Z))},min:function(){return Math.min.apply(null,yt(Z))},rightMostElement:function(){return bt("right",_t())},taggedElement:function(){return wt("right","data-iframe-width")}},tt=(V=kt,X=null,K=0,$=function(){K=Date.now(),X=null,J=V.apply(G,Y),X||(G=Y=null)},function(){var t=Date.now();K||(K=t);var e=N-(t-K);return G=this,Y=arguments,e<=0||e>N?(X&&(clearTimeout(X),X=null),K=t,J=V.apply(G,Y),X||(G=Y=null)):X||(X=setTimeout($,e)),J});nt(window,"message",(function(n){var o={init:function(){v=n.data,T=n.source,st(),h=!1,setTimeout((function(){f=!1}),u)},reset:function(){f?rt("Page reset ignored by init"):(rt("Page size reset by host page"),Ct("resetPage"))},resize:function(){St("resizeParent","Parent window requested size check")},moveToAnchor:function(){b.findTarget(r())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var t=r();rt("PageInfoFromParent called from parent: "+t),B(JSON.parse(t)),rt(" --")},message:function(){var t=r();rt("onMessage called from parent: "+t),F(JSON.parse(t)),rt(" --")}};function i(){return n.data.split("]")[1].split(":")[0]}function r(){return n.data.slice(n.data.indexOf(":")+1)}function a(){return n.data.split(":")[2]in{true:1,false:1}}function s(){var r=i();r in o?o[r]():!t.exports&&"iFrameResize"in window||window.jQuery!==e&&"iFrameResize"in window.jQuery.prototype||a()||at("Unexpected message ("+n.data+")")}S===(""+n.data).slice(0,E)&&(!1===h?s():a()?o.init():rt('Ignored message of type "'+i()+'". Received before initialization.'))})),nt(window,"readystatechange",Tt),Tt()}function et(){}function nt(t,e,n,o){t.addEventListener(e,n,!!q&&(o||{}))}function ot(t){return t.charAt(0).toUpperCase()+t.slice(1)}function it(t){return S+"["+C+"] "+t}function rt(t){_&&"object"==typeof window.console&&console.log(it(t))}function at(t){"object"==typeof window.console&&console.warn(it(t))}function st(){var t;!function(){function t(t){return"true"===t}var o=v.slice(E).split(":");C=o[0],r=e===o[1]?r:Number(o[1]),l=e===o[2]?l:t(o[2]),_=e===o[3]?_:t(o[3]),y=e===o[4]?y:Number(o[4]),n=e===o[6]?n:t(o[6]),a=o[7],g=e===o[8]?g:o[8],i=o[9],c=o[10],I=e===o[11]?I:Number(o[11]),b.enable=e!==o[12]&&t(o[12]),x=e===o[13]?x:o[13],P=e===o[14]?P:o[14],k=e===o[15]?k:t(o[15])}(),rt("Initialising iFrame ("+window.location.href+")"),function(){function t(){var t=window.iFrameResizer;rt("Reading data from page: "+JSON.stringify(t)),Object.keys(t).forEach(ct,t),F="onMessage"in t?t.onMessage:F,D="onReady"in t?t.onReady:D,O="targetOrigin"in t?t.targetOrigin:O,g="heightCalculationMethod"in t?t.height
vendor: 5,327 bytes, line 14
14CalculationMethod:g,P="widthCalculationMethod"in t?t.widthCalculationMethod:P}function e(t,e){return"function"==typeof t&&(rt("Setup custom "+e+"CalcMethod"),W[e]=t,t="custom"),t}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(t(),g=e(g,"height"),P=e(P,"width"));rt("TargetOrigin for parent set to: "+O)}(),function(){e===a&&(a=r+"px");lt("margin",function(t,e){-1!==e.indexOf("-")&&(at("Negative CSS value ignored for "+t),e="");return e}("margin",a))}(),lt("background",i),lt("padding",c),(t=document.createElement("div")).style.clear="both",t.style.display="block",t.style.height="0",document.body.appendChild(t),mt(),pt(),document.documentElement.style.height="",document.body.style.height="",rt('HTML & body height set to "auto"'),rt("Enable public methods"),z.parentIFrame={autoResize:function(t){return!0===t&&!1===n?(n=!0,gt()):!1===t&&!0===n&&(n=!1,ut("remove"),null!==s&&s.disconnect(),clearInterval(w)),xt(0,0,"autoResize",JSON.stringify(n)),n},close:function(){xt(0,0,"close")},getId:function(){return C},getPageInfo:function(t){"function"==typeof t?(B=t,xt(0,0,"pageInfo")):(B=function(){},xt(0,0,"pageInfoStop"))},moveToAnchor:function(t){b.findTarget(t)},reset:function(){jt("parentIFrame.reset")},scrollTo:function(t,e){xt(e,t,"scrollTo")},scrollToOffset:function(t,e){xt(e,t,"scrollToOffset")},sendMessage:function(t,e){xt(0,0,"message",JSON.stringify(t),e)},setHeightCalculationMethod:function(t){g=t,mt()},setWidthCalculationMethod:function(t){P=t,pt()},setTargetOrigin:function(t){rt("Set targetOrigin: "+t),O=t},size:function(t,e){St("size","parentIFrame.size("+(t||"")+(e?","+e:"")+")",t,e)}},function(){if(!0!==k)return;function t(t){xt(0,0,t.type,t.screenY+":"+t.screenX)}function e(e,n){rt("Add event listener: "+n),nt(window.document,e,t)}e("mouseenter","Mouse Enter"),e("mouseleave","Mouse Leave")}(),gt(),b=function(){function t(){return{x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}}function n(e){var n=e.getBoundingClientRect(),o=t();return{x:parseInt(n.left,10)+parseInt(o.x,10),y:parseInt(n.top,10)+parseInt(o.y,10)}}function o(t){function o(t){var e=n(t);rt("Moving to in page link (#"+i+") at x: "+e.x+" y: "+e.y),xt(e.y,e.x,"scrollToOffset")}var i=t.split("#")[1]||t,r=decodeURIComponent(i),a=document.getElementById(r)||document.getElementsByName(r)[0];e===a?(rt("In page link (#"+i+") not found in iFrame, so sending to parent"),xt(0,0,"inPageLink","#"+i)):o(a)}function i(){var t=window.location.hash,e=window.location.href;""!==t&&"#"!==t&&o(e)}function r(){function t(t){function e(t){t.preventDefault(),o(this.getAttribute("href"))}"#"!==t.getAttribute("href")&&nt(t,"click",e)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),t)}function a(){nt(window,"hashchange",i)}function s(){setTimeout(i,u)}function c(){Array.prototype.forEach&&document.querySelectorAll?(rt("Setting up location.hash handlers"),r(),a(),s()):at("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}b.enable?c():rt("In page linking not enabled");return{findTarget:o}}(),St("init","Init message from host page"),D()}function ct(t){var e=t.split("Callback");if(2===e.length){var n="on"+e[0].charAt(0).toUpperCase()+e[0].slice(1);this[n]=this[t],delete this[t],at("Deprecated: '"+t+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function lt(t,n){e!==n&&""!==n&&"null"!==n&&(document.body.style[t]=n,rt("Body "+t+' set to "'+n+'"'))}function dt(t){var e={add:function(e){function n(){St(t.eventName,t.eventType)}U[e]=n,nt(window,e,n,{passive:!0})},remove:function(t){var e,n,o,i=U[t];delete U[t],e=window,n=t,o=i,e.removeEventListener(n,o,!1)}};t.eventNames&&Array.prototype.map?(t.eventName=t.eventNames[0],t.eventNames.map(e[t.method])):e[t.method](t.eventName),rt(ot(t.method)+" event listener: "+t.eventType)}function ut(t){dt({method:t,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),dt({method:t,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),dt({method:t,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),dt({method:t,eventType:"Input",eventName:"input"}),dt({method:t,eventType:"Mouse Up",eventName:"mouseup"}),dt({method:t,eventType:"Mouse Down",eventName:"mousedown"}),dt({method:t,eventType:"Orientation Change",eventName:"orientationchange"}),dt({method:t,eventType:"Print",eventNames:["afterprint","beforeprint"]}),dt({method:t,eventType:"Ready State Change",eventName:"readystatechange"}),dt({method:t,eventType:"Touch Start",eventName:"touchstart"}),dt({method:t,eventType:"Touch End",eventName:"touchend"}),dt({method:t,eventType:"Touch Cancel",eventName:"touchcancel"}),dt({method:t,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),dt({method:t,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),dt({method:t,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}
14),"child"===x&&dt({method:t,eventType:"IFrame Resized",eventName:"resize"})}function ht(t,e,n,o){return e!==t&&(t in n||(at(t+" is not a valid option for "+o+"CalculationMethod."),t=e),rt(o+' calculation method set to "'+t+'"')),t}function mt(){g=ht(g,p,Q,"height")}function pt(){P=ht(P,R,Z,"width")}function gt(){var t;!0===n?(ut("add"),t=0>y,window.MutationObserver||window.WebKitMutationObserver?t?ft():s=function(){function t(t){function e(t){!1===t.complete&&(rt("Attach listeners to "+t.src),t.addEventListener("load",i,!1),t.addEventListener("error",r,!1),c.push(t))}"attributes"===t.type&&"src"===t.attributeName?e(t.target):"childList"===t.type&&Array.prototype.forEach.call(t.target.querySelectorAll("img"),e)}function e(t){c.splice(c.indexOf(t),1)}function n(t){rt("Remove listeners from "+t.src),t.removeEventListener("load",i,!1),t.removeEventListener("error",r,!1),e(t)}function o(t,e,o){n(t.target),St(e,o+": "+t.target.src)}function i(t){o(t,"imageLoad","Image loaded")}function r(t){o(t,"imageLoadFailed","Image load failed")}function a(e){St("mutationObserver","mutationObserver: "+e[0].target+" "+e[0].type),e.forEach(t)}function s(){var t=document.querySelector("body"),e={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return d=new l(a),rt("Create body MutationObserver"),d.observe(t,e),d}var c=[],l=window.MutationObserver||window.WebKitMutationObserver,d=s();return{disconnect:function(){"disconnect"in d&&(rt("Disconnect body MutationObserver"),d.disconnect(),c.forEach(n))}}}():(rt("MutationObserver not supported in this browser!"),ft())):rt("Auto Resize disabled")}function ft(){0!==y&&(rt("setInterval: "+y+"ms"),w=setInterval((function(){St("interval","setInterval: "+y)}),Math.abs(y)))}function vt(t,e){var n=0;return e=e||document.body,n=null===(n=document.defaultView.getComputedStyle(e,null))?0:n[t],parseInt(n,o)}function bt(t,e){for(var n=e.length,o=0,i=0,r=ot(t),a=Date.now(),s=0;s<n;s++)(o=e[s].getBoundingClientRect()[t]+vt("margin"+r,e[s]))>i&&(i=o);return a=Date.now()-a,rt("Parsed "+n+" HTML elements"),rt("Element position calculated in "+a+"ms"),function(t){t>N/2&&rt("Event throttle increased to "+(N=2*t)+"ms")}(a),i}function yt(t){return[t.bodyOffset(),t.bodyScroll(),t.documentElementOffset(),t.documentElementScroll()]}function wt(t,e){var n=document.querySelectorAll("["+e+"]");return 0===n.length&&(at("No tagged elements ("+e+") found on page"),document.querySelectorAll("body *")),bt(t,n)}function _t(){return document.querySelectorAll("body *")}function kt(t,n,o,i){var r,a;!function(){function t(t,e){return!(Math.abs(t-e)<=I)}return r=e===o?Q[g]():o,a=e===i?Z[P]():i,t(m,r)||l&&t(L,a)}()&&"init"!==t?!(t in{init:1,interval:1,size:1})&&(g in j||l&&P in j)?jt(n):t in{interval:1}||rt("No change in size detected"):(Et(),xt(m=r,L=a,t))}function St(t,e,n,o){A&&t in d?rt("Trigger event cancelled: "+t):(t in{reset:1,resetPage:1,init:1}||rt("Trigger event: "+e),"init"===t?kt(t,e,n,o):tt(t,e,n,o))}function Et(){A||(A=!0,rt("Trigger event lock on")),clearTimeout(M),M=setTimeout((function(){A=!1,rt("Trigger event lock off"),rt("--")}),u)}function Ct(t){m=Q[g](),L=Z[P](),xt(m,L,t)}function jt(t){var e=g;g=p,rt("Reset trigger event: "+t),Et(),Ct("reset"),g=e}function xt(t,n,o,i,r){var a;e===r?r=O:rt("Message targetOrigin: "+r),rt("Sending message to host page ("+(a=C+":"+t+":"+n+":"+o+(e===i?"":":"+i))+")"),T.postMessage(S+a,r)}function Tt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()}(Zt);var te={iframeResize:Qt,iframeResizer:Qt,contentWindow:Zt.exports};function ee(t){var e=function(t){var e=document.createElement("a");return e.href=t,{protocol:e.protocol,href:e.href,path:e.pathname,search:e.search,hash:e.hash}}(t),n=e.href.substr(0,e.href.length-e.hash.length),o=window.location.href.replace(/#.*$/,"");return e.hash&&n===o}function ne(t,e){var n=JSON.stringify(e),o=0;if(0===n.length)return o;for(var i=0;i<n.length;i++){o=(o<<5)-o+n.charCodeAt(i),o&=o}return"".concat(t,"-").concat(o)}function oe(t,e,n,o,i){var r=document.createElement("toujou-modal"),a=document.createElement("iframe"),s=ne("iframe",e);if(r.id=t,a.name=s,document.body.appendChild(r),ee(n)){var c=document.querySelector(n),l=c instanceof HTMLTemplateElement?document.importNode(c.content,!0).children:c.childNodes;c.title&&(r.title=c.title);for(var d=0;d<l.length;d++)r.appendChild(l[d])}else if(i&&"POST"===o){var u=function(t,e,n){var o=document.createElement("form"),i=document.createElement("input");return o.action=t,o.method="POST",o.target=n,e.forEach((t=>{var[e,n]=t;i.name=e,i.value=n.toString(),o.appendChild(i.cloneNode())})),o.style.visibility="hidden",o}(n,i,s);r.appendChild(u),r.appendChild(a),u.submit(),u.remove()}else"GET"===o&&(a.src=n,r.appendChild(a));return r}var ie,re,ae,se,ce,le=e(ie||(ie=i(['@-webkit-keyframes progress{0%{width:0}18%{width:3%}20%{width:20%}38%{width:23%}40%{width:40%}58%{width:43%}60%{width:60%}78%{width:63%}80%{width:80%}98%{width:83%}to{width:100%}}@keyframes progress{0%{width:0}18%{width:3%}20%{width:20%}38%{width:23%}40%{width:40%}58%{width:43%}60%{width:60%}78%{width:63%}80%{width:80%}98%{width:83%}to{width:100%}}*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{position:fixed;top:0;left:0;height:100vh;width:100%;z-index:15;background:var(--toujou-modal-backdrop-color, rgba(0, 0, 0, 0.6));visibility:hidden}:host([allow-outside-scroll]){position:absolute;height:100%;min-height:100vh}:host([no-backdrop]){background:0 0}:host([visible]){visibility:visible}#scroller{overflow-y:auto;height:100vh}:host([allow-outside-scroll]) #scroller{height:100%}#content{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:var(--toujou-modal-container-justify-content, center);-ms-flex-pack:var(--toujou-modal-container-justify-content, center);justify-content:var(--toujou-modal-container-justify-content, center);min-height:var(--toujou-modal-container-min-height, 100%);height:var(--toujou-modal-container-height, 100vh);width:var(--toujou-modal-container-width, 100vw)}#modal-content{margin:var(--toujou-modal-content-margin, 2rem auto);width:var(--toujou-modal-content-width, 100%);max-width:var(--toujou-modal-content-max-width, calc(100vw - 1rem));background:var(--toujou-modal-content-background, #fff);-webkit-box-shadow:var(--toujou-modal-content-shadow, 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4));box-shadow:var(--toujou-modal-content-shadow, 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4));border:var(--toujou-modal-content-border, none);border-radius:var(--toujou-modal-content-border-radius, 0px 0px 0px 0px);max-height:var(--toujou-modal-content-max-height, 100vh);overflow:var(--toujou-modal-content-overflow, auto);scroll-behavior:var(--toujou-modal-scroll-behavior, smooth)}@media only screen and (min-width:51rem){#modal-content{min-width:var(--toujou-modal-content-min-width, 42.5rem);max-width:var(--toujou-modal-content-max-width, 50rem)}}#modal-header{position:var(--toujou-modal-header-position, relative);padding:var(--toujou-modal-header-padding, 0.5rem);background:var(--toujou-modal-header-background, var(--neutral-color--050));border-bottom:var(--toujou-modal-header-border-bottom, 1px solid var(--neutral-color--200));-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:var(--toujou-modal-header-display, flex);-webkit-box-pack:var(--toujou-modal-header-justify, space-between);-ms-flex-pack:var(--toujou-modal-header-justify, space-between);justify-content:var(--toujou-modal-header-justify, space-between);width:var(--toujou-modal-header-width, 100%);top:var(--toujou-modal-header-top, unset);-webkit-box-shadow:var(--toujou-modal-header-box-shadow, none);box-shadow:var(--toujou-modal-header-box-shadow, none)}:host([no-header]) #modal-header{padding:0;border-bottom:none}#modal-header h3{color:var(--toujou-modal-title-color, var(--secondary-color));display:var(--toujou-modal-title-display, flex);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:var(--toujou-modal-title-align, flex-start);-ms-flex-pack:var(--toujou-modal-title-align, flex-start);justify-content:var(--toujou-modal-title-align, flex-start);font-family:var(--toujou-modal-title-font-family, var(--headline__family));
14font-weight:var(--toujou-modal-title-font-weight, 500);font-size:var(--toujou-modal-title-font-size, 1.21875rem);line-height:1.1;margin:0;padding:var(--toujou-modal-title-padding, 0 0.5rem);text-align:left;width:100%}#modal-header-close{display:var(--toujou-modal-close-display, block);position:var(--toujou-modal-close-position, relative);font-weight:700;line-height:1;font-family:var(--toujou-modal-close-font-family, var(--headline__family));font-size:var(--toujou-modal-close-font-size, 2em);padding:var(--toujou-modal-close-padding, 0.25rem 0.675rem);background:var(--toujou-modal-close-background, var(--primary-color));background-size:var(--toujou-modal-close-background-size, contain);background-position:var(--toujou-modal-close-background-position, center);background-repeat:var(--toujou-modal-close-background-repeat, no-repeat);border:var(--toujou-modal-close-border, 1px solid var(--primary-color));border-radius:var(--toujou-modal-close-border-radius, 2px);color:var(--toujou-modal-close-color, #fff);cursor:pointer;margin:var(--toujou-modal-close-margin, 0 0 0 1.5rem);outline:0;text-align:center;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:auto;top:var(--toujou-modal-close-top, 0);bottom:var(--toujou-modal-close-bottom, 0);left:var(--toujou-modal-close-left, 0);right:var(--toujou-modal-close-right, 0)}#modal-header-close:focus,#modal-header-close:hover{background:var(--toujou-modal-close-hover-background, var(--primary-color--dark));background-size:var(--toujou-modal-close-hover-background-size, contain);background-position:var(--toujou-modal-close-hover-background-position, center);background-repeat:var(--toujou-modal-close-hover-background-repeat, no-repeat);border:var(--toujou-modal-close-hover-border, 1px solid var(--primary-color--dark));color:var(--toujou-modal-close-hover-color, #fff)}#dog-ear-close{position:absolute;top:0;right:0;z-index:2;width:0;height:0;border:0;border-top:3rem solid var(--primary-color);border-left:3rem solid transparent;padding:0;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#dog-ear-close:after,#dog-ear-close:before{content:"";background:#fff;position:absolute;display:block;height:2px;width:.75rem;right:.375rem;top:-2.25rem}#dog-ear-close:before{-webkit-transform:rotate(45deg);transform:rotate(45deg)}#dog-ear-close:after{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}#progress-bar{display:none;position:absolute;bottom:-2px;left:0;height:var(--toujou-modal-progressbar-height, 4px);width:100%;opacity:0;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}:host([loading]) #progress-bar{display:block;opacity:1}#progress-bar:before{content:"";display:block;height:4px;width:50%;background:var(--toujou-modal-progressbar-color, var(--primary-color));-webkit-animation:var(--toujou-modal-progressbar-animation, progress 6s linear infinite);animation:var(--toujou-modal-progressbar-animation, progress 6s linear infinite)}@media only screen and (min-width:42.5rem){#modal-header h3{font-size:var(--toujou-modal-title-font-size, 1.625rem)}}#modal-content ::slotted(iframe){border:0;width:100%}']))),de={reserveScrollBarGap:!0},ue=[];
14class he extends n{static get is(){return"toujou-modal"}static get styles(){return le}render(){return o(re||(re=i(['\n <div id="scroller" @click="','" part="scroller">\n <div id="content" part="content">\n <div id="modal-content" part="modal-content">\n <div id="modal-header" part="modal-header">\n ','\n <div id="progress-bar" part="progress-bar"></div>\n </div>\n <slot id="slot" @slotchange="','"></slot>\n </div>\n </div>\n </div>\n'])),this.onClick,this.noHeader?o(ae||(ae=i(['\n <button id="dog-ear-close" dialog-dismiss part="dog-ear-close"></button>']))):o(se||(se=i(['\n <h3 part="headline">','</h3>\n <button id="modal-header-close" dialog-dismiss part="modal-header-close">Ã</button>\n '])),this.title),this.onSlotchange)}static get properties(){return{opened:{type:Boolean,reflect:!0},title:{type:String},noHeader:{type:Boolean,attribute:"no-header",reflect:!0},allowOutsideScroll:{type:Boolean,attribute:"allow-outside-scroll",reflect:!0},noBackdrop:{type:Boolean,attribute:"no-backdrop",reflect:!0},loading:{type:Boolean,reflect:!0},keepOnClose:{type:Boolean,attribute:"keep-on-close",reflect:!0}}}open(){this.opened=!0}close(){this.opened=!1}constructor(t){super(t),this.opened=!1,this.loading=!1,this.keepOnClose=!1,this.intersectionObserver=new IntersectionObserver((t=>{t[0]&&this.onPosition(t[0])})),this.iframeResizerMap=new Map,window.addEventListener("keydown",this.onKeyDown.bind(this)),window.addEventListener("message",this.onWindowPostMessage.bind(this))}disconnectedCallback(){Wt?(Ut.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),qt&&(document.removeEventListener("touchmove",Jt,Ft?{passive:!1}:void 0),qt=!1),Ht=-1):Xt(),Ut=[],window.removeEventListener("keydown",this.onKeyDown),window.addEventListener("message",this.onWindowPostMessage)}toggle(){this.opened=!this.opened}firstUpdated(){this.$={scroller:this.shadowRoot.querySelector("#scroller"),content:this.shadowRoot.querySelector("#content"),modalContent:this.shadowRoot.querySelector("#modal-content"),slot:this.shadowRoot.querySelector("#slot")}}updated(t){t.has("opened")&&void 0!==t.get("opened")&&(this.opened?this.onOpen():this.onClose(),this.hidden=!this.opened)}onOpen(){var t;this.intersectionObserver.observe(this),this.allowOutsideScroll?document.body.styleposition="relative":Kt(this.$.scroller,de),t=this,ue.forEach((t=>t.close())),ue.push(t),setTimeout((()=>{this.setAttribute("visible",""),this.dispatchModalEvent("toujou-modal-opened")}))}onClose(){var t;this.removeAttribute("visible"),function(t){if(t===ue[ue.length-1]){ue.pop();var e=ue.pop();e&&e.open()}}(this),this.allowOutsideScroll?document.body.style.position="":(t=this.$.scroller)?(Ut=Ut.filter((function(e){return e.targetElement!==t})),Wt?(t.ontouchstart=null,t.ontouchmove=null,qt&&0===Ut.length&&(document.removeEventListener("touchmove",Jt,Ft?{passive:!1}:void 0),qt=!1)):Ut.length||Xt()):console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices."),this.intersectionObserver.unobserve(this),this.dispatchModalEvent("toujou-modal-closed"),!1===this.keepOnClose&&setTimeout((()=>{this.remove()}),5)}onLoad(t){this.loading=t}onClick(t){if(t.composed){var e=t.composedPath();e.includes(this.$.modalContent)&&!e.some((t=>t instanceof HTMLElement&&t.hasAttribute("dialog-dismiss")))||this.close()}}onPosition(t){var e=Math.max(t.intersectionRect.y,Math.abs(t.boundingClientRect.y));this.$.content.style["min-height"]="".concat(t.intersectionRect.height,"px"),this.$.content.style.top=e?"".concat(e,"px"):""}onSlotchange(){var t=this.$.slot.assignedNodes().filter((t=>t instanceof HTMLIFrameElement));this.iframeResizerMap.forEach(((e,n)=>{t.includes(n)||this.iframeResizerMap.delete(n)})),t.forEach((t=>{this.loading=!0,t.addEventListener("load",(()=>{this.iframeResizerMap.has(t)||this.listenToIframeReadyState(t)}))}))}listenToIframeReadyState(t){this.loading=!0,this.iframeResizerMap.set(t,this.createIframeResizer(t)),t.contentWindow.addEventListener("beforeunload",(()=>{this.loading=!0}));try{this.title=t.contentWindow.document.title||this.title}catch(t){this.title=""}this.loading=!1,this.dispatchModalEvent("toujou-modal-loaded")}createIframeResizer(t){var e={};try{e=JSON.parse(t.getAttribute("toujou-iframe"))||{}}catch(t){(console.error||console.log).call(console,t.stack||t)}return e.initCallback=()=>{this.loading=!1},e.closedCallback=()=>{this.close()},te.iframeResizer(e,t)}
14dispatchModalEvent(t){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0}))}onKeyDown(t){t.target.closest(".form")||"Escape"!==t.key&&27!==t.keyCode||this.close()}onWindowPostMessage(t){"toujou-modal-close"===t.data&&this.close()}}customElements.define(he.is,he),document.addEventListener("click",(t=>{if(!t.metaKey&&!t.ctrlKey){var e=function(t){for(var e=t.composedPath(),n=0;n<e.indexOf(document.body);n++){var o=e[n];if(o.hasAttribute&&o.hasAttribute("target")&&o!==document.body)return o}}(t);if((e instanceof HTMLElement||e instanceof SVGElement)&&!(e instanceof HTMLFormElement)){if("toujou-modal"===e.getAttribute("target")){var n=e.getAttribute("href"),o=-1!==n.indexOf("?")?n.split("?")[0]+"?toujou-ajax-modal=1&"+n.split("?")[1]:-1!==n.indexOf("#")?n.split("#")[0]+"?toujou-ajax-modal=1#"+n.split("#")[1]:n+"?toujou-ajax-modal=1",[i,r]=function(t,e){if(t.hasAttribute("data-modal-post")){var n=t.getAttribute("data-modal-post");e.method="POST",e.body=n;var o=[];return new URL("http://localhost/?".concat(n)).searchParams.forEach(((t,e)=>{o.push([e,t])})),[o,e]}return[null,e]}(e,{src:o});!function(t,e,n,o){var i=ne("toujou-modal",t),r=document.getElementById(i)||oe(i,t,e,n,o);setTimeout((()=>{r.open()}))}(r,o,i?"POST":"GET",i),t.preventDefault(),t.stopPropagation()}if("toujou-modal-close"===e.getAttribute("target"))if(window.location!==window.parent.location){window.parent.postMessage("toujou-modal-close","*"),t.preventDefault(),t.stopPropagation()}}}}));var me,pe,ge,fe,ve,be=e(ce||(ce=i([":host{background-color:var(--toujou-snackbar-bg-color, #2c2c2c);border:var(--toujou-snackbar-border, 1px solid var(--bg-color));display:var(--toujou-snackbar-display, flex);width:var(--toujou-snackbar-width, calc(100% - 2rem));max-width:var(--toujou-snackbar-max-width, 640px);position:var(--toujou-snackbar-position, fixed);bottom:var(--toujou-snackbar-bottom, 1rem);left:var(--toujou-snackbar-left, 1rem);padding:var(--toujou-snackbar-padding, 1rem);border-radius:var(--toujou-snackbar-border-radius, 0.25rem);z-index:var(--toujou-snackbar-z-index, 100);-webkit-transform:var(--toujou-snackbar-transform, translateY(calc(100% + 1rem)));transform:var(--toujou-snackbar-transform, translateY(calc(100% + 1rem)));opacity:var(--toujou-snackbar-opacity, 0);-webkit-transition:var(--toujou-snackbar-transition, all 0.25s ease-out);transition:var(--toujou-snackbar-transition, all 0.25s ease-out)}:host([visible]){-webkit-transform:var(--toujou-snackbar-visible-transform, translateY(0));transform:var(--toujou-snackbar-visible-transform, translateY(0));opacity:var(--toujou-snackbar-visible-opacity, 1)}.snackbar__message{-webkit-box-flex:var(--toujou-snackbar-message-grow, 1);-ms-flex-positive:var(--toujou-snackbar-message-grow, 1);flex-grow:var(--toujou-snackbar-message-grow, 1);color:var(--toujou-snackbar-message-color, white);margin:var(--toujou-snackbar-message-margin, 0);padding:var(--toujou-snackbar-message-padding, 0 1rem 0 0)}.snackbar__button{border:var(--toujou-snackbar-button-border, none);background:var(--toujou-snackbar-button-bg, none);font-size:var(--toujou-snackbar-button-font-size, 0.875rem);font-family:var(--toujou-snackbar-button-font-family, var(--paragraph__family));text-transform:var(--toujou-snackbar-button--text-transform, uppercase);color:var(--toujou-snackbar-button-color, var(--primary-color));margin:var(--toujou-snackbar-button-margin, 0);outline:var(--toujou-snackbar-button-outline, none)}.snackbar__button:hover{cursor:var(--toujou-snackbar-button-hover-cursor, pointer);opacity:var(--toujou-snackbar-button-hover-opacity, 0.75)}:host([snackbartype=auto]) .snackbar__button{display:none}:host([success]){border:var(--toujou-snackbar-success-border, 1px solid var(--success-color))}:host([success]) .snackbar__message{color:var(--toujou-snackbar-success-message-color, var(--success-color))}:host([success]) .snackbar__button{color:var(--toujou-snackbar-success-button-color, white)}:host([warning]){border:var(--toujou-snackbar-warning-border, 1px solid var(--warning-color))}:host([warning]) .snackbar__message{color:var(--toujou-snackbar-warning-message-color, var(--warning-color))}:host([warning]) .snackbar__button{color:var(--toujou-snackbar-warning-button-color, white)}:host([error]){border:var(--toujou-snackbar-error-border, 1px solid var(--error-color))}:host([error]) .snackbar__message{color:var(--toujou-snackbar-error-message-color, var(--error-color))}:host([error]) .snackbar__button{color:var(--toujou-snackbar-error-button-color, white)}:host([info]){border:var(--toujou-snackbar-info-border, 1px solid #81d4fa)}:host([info]) .snackbar__message{color:var(--toujou-snackbar-info-message-color, #81d4fa)}:host([info]) .snackbar__button{color:var(--toujou-snackbar-info-button-color, white)}
14"])));class ye extends n{static get is(){return"toujou-snackbar"}render(){return o(me||(me=i(['\n <p class="snackbar__message">','</p>\n <button class="snackbar__button" @click="','">',"</button>\n "])),this.message,this._handleButtonClick,this.buttonText)}static get styles(){return be}static get properties(){return{showing:{type:Boolean},cue:{type:Array},message:{type:String},buttonText:{type:String},snackbarType:{type:String}}}set showing(t){t?this.setAttribute("visible",""):this.removeAttribute("visible")}set snackbarType(t){this.setAttribute("snackbarType",t)}set variant(t){this.setAttribute(t,"")}constructor(t){super(t),this.cue=[],this._animationStart=null,this._possibleVariants=["success","warning","error","info"],window.addEventListener("toujou-add-snackbar",(()=>{this._removeHiddenState()}),{once:!0}),window.addEventListener("toujou-add-snackbar",(t=>{this._handleAddSnackbar(t)}))}connectedCallback(){super.connectedCallback(),this.showing=!1,this._timer=this._timer.bind(this)}updated(t){t.has("cue")&&this.cue.length>0?this._showSnackbar(this.cue[0]):t.has("cue")&&this.cue.length>1&&"auto"===this.cue[0].type?this._checkAutoReplacement():t.has("cue")&&
140===this.cue.length&&this._resetVisibleValues()}_handleAddSnackbar(t){this.cue=[...this.cue,t.detail]}_checkAutoReplacement(){this.cue.length>1&&"auto"===this.cue[0].type&&(this._wasReplaced=!0)}_handleButtonClick(){this._hideSnackbar()}_hideSnackbar(){this.showing=!1,this.addEventListener("transitionend",this._afterHide)}_afterHide(){this._removeSnackbarFromCue(),this._removeSnackbarVariantAttribute(),this.removeEventListener("transitionend",this._afterHide)}_removeSnackbarFromCue(){this.cue=this.cue.slice(1)}_removeSnackbarVariantAttribute(){this._possibleVariants.forEach((t=>{this.hasAttribute(t)&&this.removeAttribute(t)}))}_resetVisibleValues(){this.message=null,this.buttonText=null}_showSnackbar(){setTimeout((()=>{this._setSnackbarValues(this.cue[0]),"auto"===this.cue[0].type&&(this._animationStart=Date.now(),this._timer(this._animationStart,this._duration)),this.showing=!0,this.snackbarType=this.cue[0].type}))}_removeHiddenState(){this.removeAttribute("hidden")}_timer(){var t=Date.now();if(this._wasReplaced)return this._removeSnackbarFromCue(),this._wasReplaced=!1,void cancelAnimationFrame(this._timer);t-this._animationStart>=this._duration?(this._hideSnackbar(),cancelAnimationFrame(this._timer)):requestAnimationFrame(this._timer)}_setSnackbarValues(t){t.message&&(this.message=t.message),t.variant&&this._possibleVariants.includes(t.variant)&&(this.variant=t.variant),this.buttonText=t.buttonText||"OK",this._duration=t.duration||2500}}customElements.define(ye.is,ye);class we extends HTMLElement{static get properties(){return{scrollPosition:{type:Number},lastScrollPosition:{type:Number},isPageWithHeader:{type:Boolean},headerHeight:{type:Number},isScrollUp:{type:Boolean}}}get type(){return this.getAttribute("topbartype")}constructor(){super(),this.scrollPosition=null,this.lastScrollPosition=0,this.isScrollUp=!1,this.isPageWithHeader=null,this.headerHeight=0,this.lastBackgroun
14dStatus=null,this.lastBarVisibilityStatus=null,this.topbarHideOffset=document.querySelector(".top-bar").offsetHeight}connectedCallback(){"scrolling"===this.type&&this._initScrollingTopbar(),window.addEventListener("scroll",(()=>{this.scrollPosition=this._getScrollPosition(),this.isScrollUp=this._getScrollDirection(),this.lastScrollPosition=this.scrollPosition,"scrolling"===this.type&&(this._updateScrollingBarVisibility(),this._updateScrollingBarBackground())})),this.addEventListener("toujou-burger-button-click",this._handleBurgerButtonClick)}_getScrollPosition(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}_getScrollDirection(){return this.scrollPosition<this.lastScrollPosition}_handleBurgerButtonClick(t){t.detail.state?document.body.setAttribute("menuopen",""):document.body.removeAttribute("menuopen")}_initScrollingTopbar(){var t=document.querySelector("header");t?(this.isPageWithHeader=!0,this.isPageWithHeader=t.offsetHeight):this.isPageWithHeader=!1,this._updateScrollingBarVisibility(),this._updateScrollingBarBackground()}_updateScrollingBarVisibility(){var t=this.scrollPosition>this.topbarHideOffset&&!this.isScrollUp;t!==this.lastBarVisibilityStatus&&(t?(this.classList.add("top-bar--scroll-hidden"),this._dispatchTopbarEvent("toujou-topbar-hide")):(this.classList.remove("top-bar--scroll-hidden"),this._dispatchTopbarEvent("toujou-topbar-unhide")),this.lastBarVisibilityStatus=t)}_updateScrollingBarBackground(){var t=!this.isPageWithHeader||this.scrollPosition>this.topbarHideOffset;
14t!==this.lastBackgroundStatus&&(t?(this.classList.add("top-bar--with-background"),this._dispatchTopbarEvent("toujou-topbar-add-background")):(this.classList.remove("top-bar--with-background"),this._dispatchTopbarEvent("toujou-topbar-remove-background")),this.lastBackgroundStatus=t)}_dispatchTopbarEvent(t){this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0}))}}customElements.define("toujou-topbar",we);class _e extends n{static get is(){return"toujou-burger"}static get properties(){return{listenTo:{type:String},toggleElement:{type:String}}}render(){return o(pe||(pe=i(['\n <slot id="content"></slot>\n '])))}set _status(t){this.setAttribute("aria-pressed",t),this.setAttribute("aria-expanded",t),this._elementToToggle.setAttribute("aria-hidden",!t)}connectedCallback(){super.connectedCallback(),this._elementToToggle=document.querySelector(this.toggleElement),this._stateInput=document.querySelector(this.listenTo),this._stateInput&&this._stateInput.addEventListener("change",this._handleStateChange.bind(this)),this.addEventListener("keydown",this._onKeydown)}_onKeydown(t){"Enter"!==t.code&&"Space"!==t.code||this.click()}_handleStateChange(t){this._status=t.currentTarget.checked,this.dispatchEvent(new CustomEvent("toujou-burger-button-click",{bubbles:!0,composed:!0,detail:{state:t.currentTarget.checked}}))}}function ke(t){if(!t)return 0;if(t.classList.contains("inpage-nav__label")){var e=getComputedStyle(t),n=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight);return t.offsetWidth+n}return t.offsetWidth}function Se(t,e,n,o){return function(t){var e=0;return Object.keys(t).forEach((n=>{var o=getComputedStyle(t[n].item),i=parseFloat(o.paddingLeft)+parseFloat(o.paddingRight);e+=t[n].item.offsetWidth+i})),e}(t)+ke(e)+ke(n)*(o?3:1)}customElements.define(_e.is,_e);
14class Ee extends n{static get is(){return"toujou-inpage-nav"}render(){return o(ge||(ge=i(['\n <slot></slot>\n <slot name="cta" id="cta"></slot>\n '])))}static get properties(){return{isMobile:{type:Boolean,reflect:!0},mobileOpen:{type:Boolean,reflect:!0},_currentSectionID:{type:String},_targetSections:{type:Map}}}set _currentSectionID(t){this._navItems&&(t?this._previousCurrentSectionID!==t&&(this._updateLabelVisibility(t),this._updateNavItemsState(t)):(this._updateLabelVisibility(!1),this._updateNavItemsState(null)))}constructor(){super(),this.mobileBreakpointOffset=this._getMobileBreakpointOffset(),this._currentSectionID=null,this._previousCurrentSectionID=null,this._isCentered=this.hasAttribute("centered"),this._isAuto=this.hasAttribute("is-auto"),this._targetSections=new Map,this._rootMarginsSize=-200,setTimeout((()=>{this._init()}))}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this._checkIsMobileState.bind(this)),this._toggle.removeEventListener("click",this._mobileOpenToggle.bind(this)),this.addEventListener("click",this._handleNavClick.bind(this))}attributeChangedCallback(t,e,n){super.attributeChangedCallback(t,e,n),"ismobile"!==t&&"mobileopen"!==t||this._updateAriaAttributes(t,n)}_init(){this._getChildrenElements(),this._navItems?(this._toggle=this.querySelector(".inpage-nav__toggle"),this._checkIsMobileState(),this._addTargetObservers(),window.addEventListener("resize",this._checkIsMobileState.bind(this)),this._toggle.addEventListener("click",this._mobileOpenToggle.bind(this)),this.addEventListener("click",this._handleNavClick.bind(this))):console.error("Could not initialize the inpage-nav. Error: No nav items!!!")}_getChildrenElements(){this._navItems={},this._navLabel=this.querySelector(".inpage-nav__label")||null,this._cta=this.querySelector('[slot="cta"]'),(this.querySelectorAll(".inpage-nav__item")||null).forEach(((t,e)=>{var n=t.querySelector("a").getAttribute("href");this._navItems[e]={item:t,link:n,target:document.querySelector(n)}}))}_checkIsMobileState(){this.isMobile=!1,window.requestAnimationFrame((()=>{this._navBreakpoint=Se(this._navItems,this._navLabel,this._cta,this._isCentered),this.isMobile=this._navBreakpoint>this.offsetWidth-this.mobileBreakpointOffset}))}_addTargetObservers(){var t={rootMargin:"".concat(this._rootMarginsSize,"px 0px ").concat(this._rootMarginsSize,"px 0px"),threshold:this._createThresholdList(50)};this.observer=new IntersectionObserver(this._handleObserver.bind(this),t),Object.keys(this._navItems).forEach((t=>{var e=this._navItems[t].target;if(e instanceof HTMLElement){this._targetSections.set(e,!1);var n=e.hasAttribute("id")?e:e.nextElementSibling;this.observer.observe(n)}}))}_createThresholdList(t){return[...Array(t).keys()].map((e=>e/t))}_handleObserver(t){t.forEach((t=>{this._targetSections.set(t.target,t.isIntersecting)})),this._updateSectionsAttributes(),this._updateActiveItemUI()}_updateSectionsAttributes(){var t=!1;this._targetSections.forEach(((e,n)=>{n.toggleAttribute("inpageNavTargetVisible",!t&&e),e&&!t&&(t=e)}))}_updateActiveItemUI(){var t=document.querySelector("*[inpageNavTargetVisible]")||null;t?this._currentSectionID="#".concat(t.id.toString()):!t&&this._navLabel?this._currentSectionID=null:t||this._navLabel||(this._currentSectionID=this._navItems[0].link)}_mobileOpenToggle(){this.mobileOpen=!this.mobileOpen}_handleNavClick(t){t.target.classList.contains("inpage-nav__link")&&(this.mobileOpen=!1)}_updateAriaAttributes(t){"mobileopen"===t?this._toggle.setAttribute("aria-expanded",this.mobileOpen):"ismobile"===t&&this._toggle.setAttribute("aria-hidden",!this.isMobile)}_updateLabelVisibility(t){this._navLabel&&(t?this._navLabel.removeAttribute("visible"):this._navLabel.setAttribute("visible",""))}_updateNavItemsState(t){var e=this.querySelector(".inpage-nav__item[active]");e&&(e.removeAttribute("active"),e.removeAttribute("aria-current")),Object.keys(this._navItems).forEach((e=>{this._navItems[e].link===t&&(this._navItems[e].item.setAttribute("active",""),this._navItems[e].item.setAttribute("aria-current","true"))})),this._previousCurrentSectionID=t}_getMobileBreakpointOffset(){var t=getComputedStyle(document.documentElement);return parseInt(t.getPropertyValue("--toujou-inpage-nav-breakpoint-offset")||180,10)}}customElements.define(Ee.is,Ee);
14class Ce extends n{static get is(){return"toujou-cover-slider"}render(){return o(fe||(fe=i(["\n <slot></slot>\n "])))}constructor(){super(),this._isSlide=!1,this._sliderFrame=null,this._maxCardWidth=null,this._cardGap=null,this._cardWidthWithGap=this._maxCardWidth+this._cardGap,this._numberOfSlidesInSlider=0,this._showHalf=!0,this._slidesThatFitIntoScreen=3,this._sliderOptions={slidesToShow:3.5,slidesToScroll:1,draggable:!0,scrollLock:!0,resizeLock:!0,rewind:!0},this._resizeObserver=new ResizeObserver((t=>{t.forEach((()=>this._updateUI()))}))}set _isSlide(t){t?this.removeAttribute("noslider"):this.setAttribute("noslider","")}firstUpdated(t){super.firstUpdated(t),this._sliderFrame=this.querySelector(".imagecard-cover__frame"),this._arrowPrev=this.querySelector(".slider__control--prev"),this._arrowNext=this.querySelector(".slider__control--next"),this._numberOfSlidesInSlider=this.querySelectorAll(".imagecard-cover__slide").length,this._createSlider(),this._updateUI()}connectedCallback(){super.connectedCallback(),this._resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this._resizeObserver.unobserve(this)}_createSlider(){this._slider=new u(this._sliderFrame,t(t({},this._sliderOptions),{},{arrows:{prev:this._arrowPrev,next:this._arrowNext}})),this._refreshSlider()}_updateUI(){this._updateCustomProperties(),this._slidesThatFitIntoScreen=this._calculateSlidesThatFitIntoScreen(),this._isSlide=this._slidesThatFitIntoScreen<=this._numberOfSlidesInSlider,this._updateSliderOptions(),this._refreshSlider()}_updateSliderOptions(){this._slider.setOption({slidesToShow:this._slidesThatFitIntoScreen})}_calculateSlidesThatFitIntoScreen(){return this._sliderWidth=this.getBoundingClientRect().width,Math.ceil(this._sliderWidth/this._cardWidthWithGap)+(this._showHalf?.5:0)}_refreshSlider(){this._slider.refresh()}_updateCustomProperties(){var t=getComputedStyle(this);this._maxCardWidth=+t.getPropertyValue("--toujou-imagecard-cover-card-max-width"),this._cardGap=+t.getPropertyValue("--toujou-imagecard-cover-card-gap");var e=t.getPropertyValue("--toujou-imagecard-cover-card-show-half");this._showHalf="0"!==e,this._cardWidthWithGap=this._maxCardWidth+this._cardGap}}customElements.define(Ce.is,Ce);var je,xe=e(ve||(ve=i(['@-webkit-keyframes rotationAnimation{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotationAnimation{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes dashAnimation{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes dashAnimation{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-webkit-keyframes colorAnimation{0%,20%{stroke:var(--toujou-spinner-start-color)}80%,to{stroke:var(--toujou-spinner-end-color)}}@keyframes colorAnimation{0%,20%{stroke:var(--toujou-spinner-start-color)}80%,to{stroke:var(--toujou-spinner-end-color)}}*{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--toujou-spinner-size:5rem;--toujou-spinner-thickness:4;--toujou-spinner-start-color:var(--primary-color--light);--toujou-spinner-end-color:var(--primary-color--dark);--toujou-spinner-animation-duration:2s;--toujou-spinner-dash-animation-duration:1.4s;--toujou-spinner-display:inline-flex;width:var(--toujou-spinner-size);height:var(--toujou-spinner-size);position:relative;display:var(--toujou-spinner-display);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}:host([centered-on-page]){position:fixed;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);z-index:100}.toujou-spinner__spinner::before{content:"";display:block;padding-top:100%}.toujou-spinner__svg{-webkit-animation:rotationAnimation var(--toujou-spinner-animation-duration) linear infinite;animation:rotationAnimation var(--toujou-spinner-animation-duration) linear infinite;height:100%;-webkit-transform-origin:center center;transform-origin:center center;width:100%;position:absolute;top:0;bottom:0;left:0;right:0;margin:auto}.toujou-spinner__circle{stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:dashAnimation var(--toujou-spinner-dash-animation-duration) ease-in-out infinite,colorAnimation var(--toujou-spinner-dash-animation-duration) ease-in-out infinite;animation:dashAnimation var(--toujou-spinner-dash-animation-duration) ease-in-out infinite,colorAnimation var(--toujou-spinner-dash-animation-duration) ease-in-out infinite;stroke-linecap:round;stroke-width:var(--toujou-spinner-thickness);fill:none}'])));
14class Te extends n{static get is(){return"toujou-spinner"}static get styles(){return xe}render(){return o(je||(je=i(['\n <svg class="toujou-spinner__svg" viewBox="25 25 50 50">\n <circle class="toujou-spinner__circle" cx="50" cy="50" r="20" stroke-miterlimit="10"/>\n </svg>\n '])))}}customElements.define(Te.is,Te);var Oe,Ie=t=>String(t).padStart(2,"0");function Ae(t){return"".concat(t.getFullYear(),"-").concat(Ie(t.getMonth()+1),"-").concat(Ie(t.getDate()))}function Me(t){var e=t.match(/\d+/g);return new Date(e[0],e[1]-1,e[2])}class Ne extends n{static get is(){return"toujou-datepicker"}static get properties(){return{mode:{type:String},dateFormat:{type:String,attribute:"date-format"},altFormat:{type:String,attribute:"alt-format"},minDate:{type:String},maxDate:{type:String},enableTime:{type:Boolean},monthPicker:{type:Boolean}}}constructor(){super(),this.dateFormat="d.m.Y",this.mode="single",this.altFormat=null,this.minDate=null,this.maxDate=null,this.enableTime=!1,this.monthPicker=!1}createRenderRoot(){return this}connectedCallback(){super.connectedCallback();var t=(document.documentElement.getAttribute("lang")||"en-US").substring(0,2);h.l10ns[t]&&h.localize(h.l10ns[t]);var e=this.querySelector("input");e&&this._initDatepicker(e)}_initDatepicker(t){var e={dateFormat:this.dateFormat,altInput:null!==this.altFormat,altFormat:this.altFormat?this.altFormat:this.dateFormat,minDate:this.minDate,maxDate:this.maxDate,enableTime:this.enableTime,time_24hr:!0,allowInput:!1,mode:this.mode,onClose(e,n,o){var i=new CustomEvent("close",{bubbles:!0,composed:!0,detail:{selectedDates:e,dateStr:n,instance:o}});t.dispatchEvent(i)}};if(this.monthPicker){e.altInput=!0,0!==window.navigator.maxTouchPoints&&function(){var t=document.createElement("input");try{t.type="month"}catch(t){}return"month"===t.type}()?e.altFormat="F Y":e.plugins=[new m({altFormat:"F Y"})]}var n=t.getAttribute("value");if(n&&""!==n)try{e.defaultDate=h.parseDate(n,this.dateFormat)}catch(t){}h(t,e)}}customElements.define(Ne.is,Ne);class Le extends Ne{static get is(){return"toujou-daterangepicker"}constructor(){super(),this.mode="range",this._onDateRangeChange=this._onDateRangeChange.bind(this)}createRenderRoot(){return this}get dateFromInput(){return this.querySelector(".date-range--from")}get dateUntilInput(){return this.querySelector(".date-range--until")}get dateFacedInput(){return this.querySelector(".date-range--facade")}get flatpickr(){if(null==this.dateFacedInput)throw new Error("Facade is missing");if(!1===Object.prototype.hasOwnProperty.call(this.dateFacedInput,"_flatpickr"))throw new Error("Flatpickr is not initialized");return this.dateFacedInput._flatpickr}connectedCallback(){super.connectedCallback(),this._initDatepicker(this.dateFacedInput),this.dateFacedInput.addEventListener("change",this._onDateRangeChange)}disconnectedCallback(){super.disconnectedCallback(),this.dateFacedInput.removeEventListener("change",this._onDateRangeChange)}firstUpdated(t){super.firstUpdated(t);var e=[],n=this.dateFromInput.value,o=this.dateUntilInput.value;n&&""!==n&&e.push(Me(n)),o&&""!==o&&e.push(Me(o)),this.flatpickr.setDate(e)}_onDateRangeChange(){var{selectedDates:t}=this.flatpickr;this.dateFromInput.value=Ae(t[0]),this.dateUntilInput.value=Ae(t[t.length-1])}}customElements.define(Le.is,Le);
14class Re extends n{static get is(){return"toujou-iframe-resizer"}render(){return o(Oe||(Oe=i(['\n <slot @slotchange="','"></slot>'])),this.handleSlotChange)}handleSlotChange(t){t.target.assignedNodes({flatten:!0}).filter((t=>t instanceof HTMLIFrameElement)).forEach((t=>{var e={};try{e=JSON.parse(t.getAttribute("toujou-iframe"))||{}}catch(t){(console.error||console.log).call(console,t.stack||t)}te.iframeResizer(e,t)}))}}customElements.define(Re.is,Re);//# sourceMappingURL=toujou-webcomponents-bundle.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.