PageSourceSearch

https://www.love2say.de/customer/i_p4/global/js/stimulus.js

js love2say.de collected 2026-10-04 03:33:33 UTC 39,668 bytes, 6 lines download raw bytes

1class x{constructor(e,t,s){this.eventTarget=e,this.eventName=t,this.eventOptions=s,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(e){this.unorderedBindings.add(e)}bindingDisconnected(e){this.unorderedBindings.delete(e)}handleEvent(e){const t=S(e);for(const s of this.bindings){if(t.immediatePropagationStopped)break;s.handleEvent(t)}}get bindings(){return Array.from(this.unorderedBindings).sort((e,t)=>{const s=e.index,n=t.index;return s<n?-1:s>n?1:0})}}function S(r){if("immediatePropagationStopped"in r)return r;{const{stopImmediatePropagation:e}=r;return Object.assign(r,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}class B{constructor(e){this.application=e,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(e=>e.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(e=>e.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((e,t)=>e.concat(Array.from(t.values())),[])}bindingConnected(e){this.fetchEventListenerForBinding(e).bindingConnected(e)}bindingDisconnected(e){this.fetchEventListenerForBinding(e).bindingDisconnected(e)}handleError(e,t,s={}){this.application.handleError(e,`Error ${t}`,s)}fetchEventListenerForBinding(e){const{eventTarget:t,eventName:s,eventOptions:n}=e;return this.fetchEventListener(t,s,n)}fetchEventListener(e,t,s){const n=this.fetchEventListenerMapForEventTarget(e),i=this.cacheKey(t,s);let o=n.get(i);return o||(o=this.createEventListener(e,t,s),n.set(i,o)),o}createEventListener(e,t,s){const n=new x(e,t,s);return this.started&&n.connect(),n}fetchEventListenerMapForEventTarget(e){let t=this.eventListenerMaps.get(e);return t||(t=new Map,this.eventListenerMaps.set(e,t)),t}cacheKey(e,t){const s=[e];return Object.keys(t).sort().forEach(n=>{s.push(`${t[n]?"":"!"}${n}`)}),s.join(":")}}const L=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function N(r){const t=r.trim().match(L)||[];return{eventTarget:F(t[4]),eventName:t[2],eventOptions:t[9]?j(t[9]):{},identifier:t[5],methodName:t[7]}}function F(r){if(r=="window")return window;if(r=="document")return document}function j(r){return r.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})}function D(r){if(r==window)return"window";if(r==document)return"document"}function E(r){return r.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function h(r){return r.charAt(0).toUpperCase()+r.slice(1)}function T(r){return r.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function I(r){return r.match(/[^\s]+/g)||[]}class V{constructor(e,t,s){this.element=e,this.index=t,this.eventTarget=s.eventTarget||e,this.eventName=s.eventName||$(e)||u("missing event name"),this.eventOptions=s.eventOptions||{},this.identifier=s.identifier||u("missing identifier"),this.methodName=s.methodName||u("missing method name")}static forToken(e){return new this(e.element,e.index,N(e.content))}toString(){const e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}->${this.identifier}#${this.methodName}`}get params(){return this.eventTarget instanceof Element?this.getParamsFromEventTargetAttributes(this.eventTarget):{}}getParamsFromEventTargetAttributes(e){const t={},s=new RegExp(`^data-${this.identifier}-(.+)-param$`);return Array.from(e.attributes).forEach(({name:i,value:o})=>{const c=i.match(s),l=c&&c[1];l&&Object.assign(t,{[E(l)]:K(o)})}),t}get eventTargetName(){return D(this.eventTarget)}}const v={a:r=>"click",button:r=>"click",form:r=>"submit",details:r=>"toggle",input:r=>r.getAttribute("type")=="submit"?"click":"input",select:r=>"change",textarea:r=>"input"};function $(r){const e=r.tagName.toLowerCase();if(e in v)return v[e](r)}function u(r){throw new Error(r)}function K(r){try{return JSON.parse(r)}catch{return r}}class P{constructor(e,t){this.context=e,this.action=t}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}
vendor: 5,117 bytes, line 1
1get identifier(){return this.context.identifier}handleEvent(e){this.willBeInvokedByEvent(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const e=this.controller[this.methodName];if(typeof e=="function")return e;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}invokeWithEvent(e){const{target:t,currentTarget:s}=e;try{const{params:n}=this.action,i=Object.assign(e,{params:n});this.method.call(this.controller,i),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:s,action:this.methodName})}catch(n){const{identifier:i,controller:o,element:c,index:l}=this,M={identifier:i,controller:o,element:c,index:l,event:e};this.context.handleError(n,`invoking action "${this.action}"`,M)}}willBeInvokedByEvent(e){const t=e.target;return this.element===t?!0:t instanceof Element&&this.element.contains(t)?this.scope.containsElement(t):this.scope.containsElement(this.action.element)}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class R{constructor(e,t){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(s=>this.processMutations(s))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(e){this.started&&(this.mutationObserver.disconnect(),this.started=!1),e(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const e=new Set(this.matchElementsInTree());for(const t of Array.from(this.elements))e.has(t)||this.removeElement(t);for(const t of Array.from(e))this.addElement(t)}}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){e.type=="attributes"?this.processAttributeChange(e.target,e.attributeName):e.type=="childList"&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))}processAttributeChange(e,t){const s=e;this.elements.has(s)?this.delegate.elementAttributeChanged&&this.matchElement(s)?this.delegate.elementAttributeChanged(s,t):this.removeElement(s):this.matchElement(s)&&this.addElement(s)}processRemovedNodes(e){for(const t of Array.from(e)){const s=this.elementFromNode(t);s&&this.processTree(s,this.removeElement)}}processAddedNodes(e){for(const t of Array.from(e)){const s=this.elementFromNode(t);s&&this.elementIsActive(s)&&this.processTree(s,this.addElement)}}matchElement(e){return this.delegate.matchElement(e)}matchElementsInTree(e=this.element){return this.delegate.matchElementsInTree(e)}processTree(e,t){for(const s of this.matchElementsInTree(e))t.call(this,s)}elementFromNode(e){if(e.nodeType==Node.ELEMENT_NODE)return e}elementIsActive(e){return e.isConnected!=this.element.isConnected?!1:this.element.contains(e)}addElement(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))}removeElement(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))}}class z{constructor(e,t,s){this.attributeName=t,this.delegate=s,this.elementObserver=new R(e,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(e){this.elementObserver.pause(e)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(e){return e.hasAttribute(this.attributeName)}matchElementsInTree(e){const t=this.matchElement(e)?[e]:[],s=Array.from(e.querySelectorAll(this.selector));return t.concat(s)}elementMatched(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)}elementUnmatched(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)}elementAttributeChanged(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)}}class U{constructor(e,t){this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(s=>this.processMutations(s))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const e of this.knownAttributeNames)this.refreshAttribute(e,null)}processMutations(e){if(this.started)for(const t of e)this.processMutation(t)}processMutation(e){const t=e.attributeName;t&&this.refreshAttribute(t,e.oldValue)}refreshAttribute(e,t){const s=this.delegate.getStringMapKeyForAttribute(e);
1if(s!=null){this.stringMap.has(e)||this.stringMapKeyAdded(s,e);const n=this.element.getAttribute(e);if(this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,s,t),n==null){const i=this.stringMap.get(e);this.stringMap.delete(e),i&&this.stringMapKeyRemoved(s,e,i)}else this.stringMap.set(e,n)}}stringMapKeyAdded(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)}stringMapValueChanged(e,t,s){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t,s)}stringMapKeyRemoved(e,t,s){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t,s)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(e=>e.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}function q(r,e,t){O(r,e).add(t)}function W(r,e,t){O(r,e).delete(t),G(r,e)}function O(r,e){let t=r.get(e);return t||(t=new Set,r.set(e,t)),t}function G(r,e){const t=r.get(e);t!=null&&t.size==0&&r.delete(e)}class g{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((t,s)=>t.concat(Array.from(s)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((t,s)=>t+s.size,0)}add(e,t){q(this.valuesByKey,e,t)}delete(e,t){W(this.valuesByKey,e,t)}has(e,t){const s=this.valuesByKey.get(e);return s!=null&&s.has(t)}hasKey(e){return this.valuesByKey.has(e)}hasValue(e){return Array.from(this.valuesByKey.values()).some(s=>s.has(e))}getValuesForKey(e){const t=this.valuesByKey.get(e);return t?Array.from(t):[]}getKeysForValue(e){return Array.from(this.valuesByKey).filter(([t,s])=>s.has(e)).map(([t,s])=>t)}}class w{constructor(e,t,s){this.attributeObserver=new z(e,t,this),this.delegate=s,this.tokensByElement=new g}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(e){this.attributeObserver.pause(e)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(e){this.tokensMatched(this.readTokensForElement(e))}elementAttributeValueChanged(e){const[t,s]=this.refreshTokensForElement(e);this.tokensUnmatched(t),this.tokensMatched(s)}elementUnmatchedAttribute(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))}tokensMatched(e){e.forEach(t=>this.tokenMatched(t))}tokensUnmatched(e){e.forEach(t=>this.tokenUnmatched(t))}tokenMatched(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)}tokenUnmatched(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)}refreshTokensForElement(e){const t=this.tokensByElement.getValuesForKey(e),s=this.readTokensForElement(e),n=J(t,s).findIndex(([i,o])=>!X(i,o));return n==-1?[[],[]]:[t.slice(n),s.slice(n)]}readTokensForElement(e){const t=this.attributeName,s=e.getAttribute(t)||"";return H(s,e,t)}}function H(r,e,t){return r.trim().split(/\s+/).filter(s=>s.length).map((s,n)=>({element:e,attributeName:t,content:s,index:n}))}function J(r,e){const t=Math.max(r.length,e.length);return Array.from({length:t},(s,n)=>[r[n],e[n]])}function X(r,e){return r&&e&&r.index==e.index&&r.content==e.content}class _{constructor(e,t,s){this.tokenListObserver=new w(e,t,this),this.delegate=s,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(e){const{element:t}=e,{value:s}=this.fetchParseResultForToken(e);s&&(this.fetchValuesByTokenForElement(t).set(e,s),this.delegate.elementMatchedValue(t,s))}tokenUnmatched(e){const{element:t}=e,{value:s}=this.fetchParseResultForToken(e);s&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,s))}fetchParseResultForToken(e){let t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t}fetchValuesByTokenForElement(e){let t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t}parseToken(e){try{return{value:this.delegate.parseValueForToken(e)}}catch(t){return{error:t}}}}class Z{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new _(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}
vendor: 4,838 bytes, line 1
1get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(e){const t=new P(this.context,e);this.bindingsByAction.set(e,t),this.delegate.bindingConnected(t)}disconnectAction(e){const t=this.bindingsByAction.get(e);t&&(this.bindingsByAction.delete(e),this.delegate.bindingDisconnected(t))}disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e)),this.bindingsByAction.clear()}parseValueForToken(e){const t=V.forToken(e);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class Q{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new U(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap,this.invokeChangedCallbacksForDefaultValues()}start(){this.stringMapObserver.start()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(e){if(e in this.valueDescriptorMap)return this.valueDescriptorMap[e].name}stringMapKeyAdded(e,t){const s=this.valueDescriptorMap[t];this.hasValue(e)||this.invokeChangedCallback(e,s.writer(this.receiver[e]),s.writer(s.defaultValue))}stringMapValueChanged(e,t,s){const n=this.valueDescriptorNameMap[t];e!==null&&(s===null&&(s=n.writer(n.defaultValue)),this.invokeChangedCallback(t,e,s))}stringMapKeyRemoved(e,t,s){const n=this.valueDescriptorNameMap[e];this.hasValue(e)?this.invokeChangedCallback(e,n.writer(this.receiver[e]),s):this.invokeChangedCallback(e,n.writer(n.defaultValue),s)}invokeChangedCallbacksForDefaultValues(){for(const{key:e,name:t,defaultValue:s,writer:n}of this.valueDescriptors)s!=null&&!this.controller.data.has(e)&&this.invokeChangedCallback(t,n(s),void 0)}invokeChangedCallback(e,t,s){const n=`${e}Changed`,i=this.receiver[n];if(typeof i=="function"){const o=this.valueDescriptorNameMap[e],c=o.reader(t);let l=s;s&&(l=o.reader(s)),i.call(this.receiver,c,l)}}get valueDescriptors(){const{valueDescriptorMap:e}=this;return Object.keys(e).map(t=>e[t])}get valueDescriptorNameMap(){const e={};return Object.keys(this.valueDescriptorMap).forEach(t=>{const s=this.valueDescriptorMap[t];e[s.name]=s}),e}hasValue(e){const t=this.valueDescriptorNameMap[e],s=`has${h(t.name)}`;return this.receiver[s]}}class Y{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new g}start(){this.tokenListObserver||(this.tokenListObserver=new w(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:e,content:t}){this.scope.containsElement(e)&&this.connectTarget(e,t)}tokenUnmatched({element:e,content:t}){this.disconnectTarget(e,t)}connectTarget(e,t){var s;this.targetsByName.has(t,e)||(this.targetsByName.add(t,e),(s=this.tokenListObserver)===null||s===void 0||s.pause(()=>this.delegate.targetConnected(e,t)))}disconnectTarget(e,t){var s;this.targetsByName.has(t,e)&&(this.targetsByName.delete(t,e),(s=this.tokenListObserver)===null||s===void 0||s.pause(()=>this.delegate.targetDisconnected(e,t)))}disconnectAllTargets(){for(const e of this.targetsByName.keys)for(const t of this.targetsByName.getValuesForKey(e))this.disconnectTarget(t,e)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}class ee{constructor(e,t){this.logDebugActivity=(s,n={})=>{const{identifier:i,controller:o,element:c}=this;n=Object.assign({identifier:i,controller:o,element:c},n),this.application.logDebugActivity(this.identifier,s,n)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new Z(this,this.dispatcher),this.valueObserver=new Q(this,this.controller),this.targetObserver=new Y(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(s){this.handleError(s,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(e){this.handleError(e,"connecting controller")}}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(e){this.handleError(e,"disconnecting controller")}this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}
1get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,s={}){const{identifier:n,controller:i,element:o}=this;s=Object.assign({identifier:n,controller:i,element:o},s),this.application.handleError(e,`Error ${t}`,s)}targetConnected(e,t){this.invokeControllerMethod(`${t}TargetConnected`,e)}targetDisconnected(e,t){this.invokeControllerMethod(`${t}TargetDisconnected`,e)}invokeControllerMethod(e,...t){const s=this.controller;typeof s[e]=="function"&&s[e](...t)}}function f(r,e){const t=C(r);return Array.from(t.reduce((s,n)=>(se(n,e).forEach(i=>s.add(i)),s),new Set))}function te(r,e){return C(r).reduce((s,n)=>(s.push(...re(n,e)),s),[])}function C(r){const e=[];for(;r;)e.push(r),r=Object.getPrototypeOf(r);return e.reverse()}function se(r,e){const t=r[e];return Array.isArray(t)?t:[]}function re(r,e){const t=r[e];return t?Object.keys(t).map(s=>[s,t[s]]):[]}function ne(r){return ie(r,oe(r))}function ie(r,e){const t=he(r),s=ae(r.prototype,e);return Object.defineProperties(t.prototype,s),t}function oe(r){return f(r,"blessings").reduce((t,s)=>{const n=s(r);for(const i in n){const o=t[i]||{};t[i]=Object.assign(o,n[i])}return t},{})}function ae(r,e){return le(e).reduce((t,s)=>{const n=ce(r,e,s);return n&&Object.assign(t,{[s]:n}),t},{})}function ce(r,e,t){const s=Object.getOwnPropertyDescriptor(r,t);if(!(s&&"value"in s)){const i=Object.getOwnPropertyDescriptor(e,t).value;return s&&(i.get=s.get||i.get,i.set=s.set||i.set),i}}const le=(()=>typeof Object.getOwnPropertySymbols=="function"?r=>[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)]:Object.getOwnPropertyNames)(),he=(()=>{function r(t){function s(){return Reflect.construct(t,arguments,new.target)}return s.prototype=Object.create(t.prototype,{constructor:{value:s}}),Reflect.setPrototypeOf(s,t),s}function e(){const s=r(function(){this.a.call(this)});return s.prototype.a=function(){},new s}try{return e(),r}catch{return s=>class extends s{}}})();function ue(r){return{identifier:r.identifier,controllerConstructor:ne(r.controllerConstructor)}}class de{constructor(e,t){this.application=e,this.definition=ue(t),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(e){const t=this.fetchContextForScope(e);this.connectedContexts.add(t),t.connect()}disconnectContextForScope(e){const t=this.contextsByScope.get(e);t&&(this.connectedContexts.delete(t),t.disconnect())}fetchContextForScope(e){let t=this.contextsByScope.get(e);return t||(t=new ee(this,e),this.contextsByScope.set(e,t)),t}}class ge{constructor(e){this.scope=e}has(e){return this.data.has(this.getDataKey(e))}get(e){return this.getAll(e)[0]}getAll(e){const t=this.data.get(this.getDataKey(e))||"";return I(t)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class fe{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(e){const t=this.getAttributeNameForKey(e);return this.element.getAttribute(t)}set(e,t){const s=this.getAttributeNameForKey(e);return this.element.setAttribute(s,t),this.get(e)}has(e){const t=this.getAttributeNameForKey(e);return this.element.hasAttribute(t)}delete(e){if(this.has(e)){const t=this.getAttributeNameForKey(e);return this.element.removeAttribute(t),!0}else return!1}getAttributeNameForKey(e){return`data-${this.identifier}-${T(e)}`}}class me{constructor(e){this.warnedKeysByObject=new WeakMap,this.logger=e}warn(e,t,s){let n=this.warnedKeysByObject.get(e);n||(n=new Set,this.warnedKeysByObject.set(e,n)),n.has(t)||(n.add(t),this.logger.warn(s,e))}}function d(r,e){return`[${r}~="${e}"]`}class pe{constructor(e){this.scope=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(e){return this.find(e)!=null}find(...e){return e.reduce((t,s)=>t||this.findTarget(s)||this.findLegacyTarget(s),void 0)}findAll(...e){return e.reduce((t,s)=>[...t,...this.findAllTargets(s),...this.findAllLegacyTargets(s)],[])}findTarget(e){const t=this.getSelectorForTargetName(e);return this.scope.findElement(t)}findAllTargets(e){const t=this.getSelectorForTargetName(e);return this.scope.findAllElements(t)}getSelectorForTargetName(e){const t=this.schema.targetAttributeForScope(this.identifier);return d(t,e)}findLegacyTarget(e){const t=this.getLegacySelectorForTargetName(e);return this.deprecate(this.scope.findElement(t),e)}findAllLegacyTargets(e){const t=this.getLegacySelectorForTargetName(e);return this.scope.findAllElements(t).map(s=>this.deprecate(s,e))}getLegacySelectorForTargetName(e){const t=`${this.identifier}.${e}`;return d(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:s}=this,n=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(s);this.guide.warn(e,`target:${t}`,`Please replace ${n}="${s}.${t}" with ${i}="${t}". The ${n} attribute is deprecated and will be removed in a future version of Stimulus.`)}return e}get guide(){return this.scope.guide}}class be{constructor(e,t,s,n){this.targets=new pe(this),this.classes=new ge(this),this.data=new fe(this),this.containsElement=i=>i.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=s,this.guide=new me(n)}findElement(e){return this.element.matches(e)?this.element:this.queryElements(e).find(this.containsElement)}findAllElements(e){return[...this.element.matches(e)?[this.element]:[],...this.queryElements(e).filter(this.containsElement)]}queryElements(e){return Array.from(this.element.querySelectorAll(e))}get controllerSelector(){return d(this.schema.controllerAttribute,this.identifier)}}class ve{constructor(e,t,s){this.element=e,this.schema=t,this.delegate=s,this.valueListObserver=new _(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(e){const{element:t,content:s}=e,n=this.fetchScopesByIdentifierForElement(t);let i=n.get(s);
1return i||(i=this.delegate.createScopeForElementAndIdentifier(t,s),n.set(s,i)),i}elementMatchedValue(e,t){const s=(this.scopeReferenceCounts.get(t)||0)+1;this.scopeReferenceCounts.set(t,s),s==1&&this.delegate.scopeConnected(t)}elementUnmatchedValue(e,t){const s=this.scopeReferenceCounts.get(t);s&&(this.scopeReferenceCounts.set(t,s-1),s==1&&this.delegate.scopeDisconnected(t))}fetchScopesByIdentifierForElement(e){let t=this.scopesByIdentifierByElement.get(e);return t||(t=new Map,this.scopesByIdentifierByElement.set(e,t)),t}}class ye{constructor(e){this.application=e,this.scopeObserver=new ve(this.element,this.schema,this),this.scopesByIdentifier=new g,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((e,t)=>e.concat(t.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(e){this.unloadIdentifier(e.identifier);const t=new de(this.application,e);this.connectModule(t)}unloadIdentifier(e){const t=this.modulesByIdentifier.get(e);t&&this.disconnectModule(t)}getContextForElementAndIdentifier(e,t){const s=this.modulesByIdentifier.get(t);if(s)return s.contexts.find(n=>n.element==e)}handleError(e,t,s){this.application.handleError(e,t,s)}createScopeForElementAndIdentifier(e,t){return new be(this.schema,e,t,this.logger)}scopeConnected(e){this.scopesByIdentifier.add(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.connectContextForScope(e)}scopeDisconnected(e){this.scopesByIdentifier.delete(e.identifier,e);const t=this.modulesByIdentifier.get(e.identifier);t&&t.disconnectContextForScope(e)}connectModule(e){this.modulesByIdentifier.set(e.identifier,e),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(s=>e.connectContextForScope(s))}disconnectModule(e){this.modulesByIdentifier.delete(e.identifier),this.scopesByIdentifier.getValuesForKey(e.identifier).forEach(s=>e.disconnectContextForScope(s))}}const Ae={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:r=>`data-${r}-target`};class m{constructor(e=document.documentElement,t=Ae){this.logger=console,this.debug=!1,this.logDebugActivity=(s,n,i={})=>{this.debug&&this.logFormattedMessage(s,n,i)},this.element=e,this.schema=t,this.dispatcher=new B(this),this.router=new ye(this)}static start(e,t){const s=new m(e,t);return s.start(),s}async start(){await Ee(),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(e,t){t.shouldLoad&&this.load({identifier:e,controllerConstructor:t})}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(n=>this.router.loadDefinition(n))}unload(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(n=>this.router.unloadIdentifier(n))}get controllers(){return this.router.contexts.map(e=>e.controller)}getControllerForElementAndIdentifier(e,t){const s=this.router.getContextForElementAndIdentifier(e,t);return s?s.controller:null}handleError(e,t,s){var n;this.logger.error(`%s
2
3%o
4
5%o`,t,e,s),(n=window.onerror)===null||n===void 0||n.call(window,t,"",0,0,e)}logFormattedMessage(e,t,s={}){s=Object.assign({application:this},s),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},s)),this.logger.groupEnd()}}function Ee(){return new Promise(r=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>r()):r()})}function Te(r){return f(r,"classes").reduce((t,s)=>Object.assign(t,Oe(s)),{})}function Oe(r){return{[`${r}Class`]:{get(){const{classes:e}=this;if(e.has(r))return e.get(r);{const t=e.getAttributeName(r);throw new Error(`Missing attribute "${t}"`)}}},[`${r}Classes`]:{get(){return this.classes.getAll(r)}},[`has${h(r)}Class`]:{get(){return this.classes.has(r)}}}}function we(r){return f(r,"targets").reduce((t,s)=>Object.assign(t,_e(s)),{})}function _e(r){return{[`${r}Target`]:{get(){const e=this.targets.find(r);if(e)return e;throw new Error(`Missing target element "${r}" for "${this.identifier}" controller`)}},[`${r}Targets`]:{get(){return this.targets.findAll(r)}},[`has${h(r)}Target`]:{get(){return this.targets.has(r)}}}}function Ce(r){const e=te(r,"values"),t={valueDescriptorMap:{get(){return e.reduce((s,n)=>{const i=k(n),o=this.data.getAttributeNameForKey(i.key);return Object.assign(s,{[o]:i})},{})}}};return e.reduce((s,n)=>Object.assign(s,ke(n)),t)}function ke(r){const e=k(r),{key:t,name:s,reader:n,writer:i}=e;return{[s]:{get(){const o=this.data.get(t);return o!==null?n(o):e.defaultValue},set(o){o===void 0?this.data.delete(t):this.data.set(t,i(o))}},[`has${h(s)}`]:{get(){return this.data.has(t)||e.hasCustomDefaultValue}}}}function k([r,e]){return Be(r,e)}function p(r){switch(r){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function b(r){switch(typeof r){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(r))return"array";if(Object.prototype.toString.call(r)==="[object Object]")return"object"}function Me(r){const e=p(r.type);if(e){const t=b(r.default);if(e!==t)throw new Error(`Type "${e}" must match the type of the default value. Given default value: "${r.default}" as "${t}"`);return e}}function xe(r){const e=Me(r),t=b(r),s=p(r),n=e||t||s;if(n)return n;throw new Error(`Unknown value type "${r}"`)}function Se(r){const e=p(r);if(e)return Le[e];const t=r.default;return t!==void 0?t:r}function Be(r,e){const t=`${T(r)}-value`,s=xe(e);return{type:s,key:t,name:E(t),get defaultValue(){return Se(e)},get hasCustomDefaultValue(){return b(e)!==void 0}
5,reader:Ne[s],writer:y[s]||y.default}}const Le={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Ne={array(r){const e=JSON.parse(r);if(!Array.isArray(e))throw new TypeError("Expected array");return e},boolean(r){return!(r=="0"||r=="false")},number(r){return Number(r)},object(r){const e=JSON.parse(r);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("Expected object");return e},string(r){return r}},y={default:Fe,array:A,object:A};function A(r){return JSON.stringify(r)}function Fe(r){return`${r}`}class a{constructor(e){this.context=e}static get shouldLoad(){return!0}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:s={},prefix:n=this.identifier,bubbles:i=!0,cancelable:o=!0}={}){const c=n?`${n}:${e}`:e,l=new CustomEvent(c,{detail:s,bubbles:i,cancelable:o});return t.dispatchEvent(l),l}}a.blessings=[Te,we,Ce];a.targets=[];a.values={};class je extends a{static targets=["participationCount","participationAmount","currency","capValue","locales","startingBalance","startingBalanceInCurrencies"];calculateCap(){const e=this.participationAmountTarget.value*this.participationCountTarget.value;this.capValueTarget.innerHTML=String(e),this.currencyTarget.value!==""&&(this.capValueTarget.innerHTML=`${e} ${this.currencyTarget.value}`)}calculateStartingBalances(){const e=Array.from(this.localesTarget.selectedOptions).map(i=>i.value),t=this.constructor.currencyIsosFromLocales(e),s=this.startingBalanceTarget.value,n=[...t].map(this.constructor.panelistAmou
5ntFromCurrencyIso(s));this.startingBalanceInCurrenciesTarget.innerText=n.join(", ")}static currencyIsosFromLocales(e){let t=new Set;return e.forEach(s=>{let n=MarketingCurrencyModel.locale_currency_mapping[s];t.add(n)}),t}static panelistAmountFromCurrencyIso(e){return t=>{let s=MarketingCurrencyModel.currencies[t],n=Math.floor(e/s.subunit_to_unit),i=e%s.subunit_to_unit,o=(new Array(s.exponent).join("0")+i).slice(-s.exponent);return n+s.decimal_mark+o+" "+t}}}const De=Object.freeze(Object.defineProperty({__proto__:null,default:je},Symbol.toStringTag,{value:"Module"}));class Ie extends a{static targets=["buttonText"];toggle(){const e=this.buttonTextTarget.dataset.altText,t=this.buttonTextTarget.textContent;this.buttonTextTarget.textContent=e,this.buttonTextTarget.dataset.altText=t}}const Ve=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"}));class $e extends a{static targets=[];panel=document.querySelector("body").id;cookiebotPanels=["rms","tc","ix","mx","lx","ec","ks","gx","ix","vf"];initialize(){this.addCookieConsentEventListeners()}addCookieConsentEventListeners(){if(this.isContextRelevant()){const e=this.element.querySelector("#special_study_study_ad_effectiveness_value_yes"),t=this.element.querySelector("#special_study_study_ad_effectiveness_value_no");this.addClickEventListener(e,!0),this.addClickEventListener(t,!1)}}addClickEventListener(e,t){e.addEventListener("click",this.constructor.handleCookieConsentInputClick(t),!1)}isContextRelevant(){return this.cookiebotPanels.includes(this.panel)&&this.element.id==="study_ad_effectiveness"}static handleCookieConsentInputClick(e){return()=>{e===!0&&sendMessageToMobileApp("native_tracking_consent_required"),Cookiebot.bannerShowDisabled=!0,Cookiebot.submitCustomConsent(e,Cookiebot.consent.statistics,Cookiebot.consent.marketing)}}}const Ke=Object.freeze(Object.defineProperty({__proto__:null,default:$e},Symbol.toStringTag,{value:"Module"}));class Pe extends a{static targets=["userLocale","ecAtAd","ecChAd","cintAd","ad"];hideSignup(){this.constructor.hide(this.constructor.userTermsGroup),this.constructor.hide(this.constructor.createUserButton)}showSignup(){this.constructor.show(this.constructor.userTermsGroup),this.constructor.show(this.constructor.createUserButton)}hideAllAds(){this.adTargets.forEach(e=>{this.constructor.hide(e)})}showRelevantAd(){const e=this.currentConfig.adsBylocale[this.currentLocale];this.constructor.show(e)}hiddenSignupHandler(){this.hideAllAds(),this.hideSignup(),this.showRelevantAd()}visibleSignupHandler(){this.hideAllAds(),this.showSignup()}toggle(){this.currentLocale=this.userLocaleTarget.value,this.currentConfig.hiddenSignupLocales.includes(this.currentLocale)?this.hiddenSignupHandler():this.visibleSignupHandler()}get currentConfig(){return this.config[this.constructor.currentPanel]}get config(){return{ec:{hiddenSignupLocales:["de-AT"],adsBylocale:{"de-AT":this.targetIfExists("cintAdTarget")}},tc:{hiddenSignupLocales:["de-AT-tc","de-CH-tc"],adsBylocale:{"de-AT-tc":this.targetIfExists("ecAtAdTarget"),"de-CH-tc":this.targetIfExists("ecChAdTarget")}}}}targetIfExists(e){const t=this.constructor.capitalizeFirstLetter(e);return this[`has${t}`]&&this[e]}static capitalizeFirstLetter(e){return e[0].toUpperCase()+e.slice(1)}static hide(e){e.classList.add("d-none")}static show(e){e.classList.remove("d-none")}static get userTermsGroup(){return document.querySelector("#user-terms-group")}static get createUserButton(){return document.querySelector("#create_user")}static get currentPanel(){return document.body.id}}const Re=Object.freeze(Object.defineProperty({__proto__:null,default:Pe},Symbol.toStringTag,{value:"Module"}));class ze extends a{static values={delay:{type:Number,default:5e3}};connect(){this.timeout=setTimeout(()=>{Turbo.visit(window.location.href)},this.delayValue)}disconnect(){clearTimeout(this.timeout)}}const Ue=Object.freeze(Object.defineProperty({__proto__:null,default:ze},Symbol.toStringTag,{value:"Module"}));class qe extends a{static values={checkboxesSelector:String};get checkboxes(){return Array.from(document.querySelectorAll(this.checkboxesSelectorValue))}get allChecked(){return this.checkboxes.every(e=>e.checked)}get someChecked(){return this.checkboxes.some(e=>e.checked)}
5connect(){this.checkboxes.forEach(e=>{e.addEventListener("input",t=>this.update())})}toggle(){const e=!this.allChecked;this.checkboxes.forEach(t=>t.checked=e)}update(){this.element.checked=this.allChecked,this.element.indeterminate=!this.allChecked&&this.someChecked}}const We=Object.freeze(Object.defineProperty({__proto__:null,default:qe},Symbol.toStringTag,{value:"Module"}));class Ge extends a{static targets=["sharingBox"];share(){const e={title:this.sharingBoxTarget.dataset.title,text:this.sharingBoxTarget.dataset.text,url:this.sharingBoxTarget.dataset.link};typeof Android<"u"?sendMessageToMobileApp(e):navigator.share(e)}}const He=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"}));class Je extends a{static targets=["display","title","form"];display(){this.constructor.show(this.formTarget),this.constructor.hide(this.displayTarget),this.titleTarget.value=this.titleTarget.dataset.newTitle}static show(e){e.classList.remove("hide")}static hide(e){e.classList.add("hide")}}const Xe=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"}));var Ze=/^(?:.*?(?:controllers|components)\/|\.?\.\/)?(.+)(?:[_-]controller\..+?)$/;function Qe(r,e){r.load(Ye(e))}function Ye(r){return Object.entries(r).map(et).filter(e=>e)}function et([r,e]){const t=tt(r),s=e.default;if(t&&typeof s=="function")return{identifier:t,controllerConstructor:s}}function tt(r){const e=(r.match(Ze)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}const st=m.start(),rt=Object.assign({"/stimulus/controllers/affiliate_campaign_new_controller.js":De,"/stimulus/controllers/button_text_toggler_controller.js":Ve,"/stimulus/controllers/cookiebot_consent_submitter_controller.js":Ke,"/stimulus/controllers/locale_toggler_controller.js":Re,"/stimulus/controllers/reload_controller.js":Ue,"/stimulus/controllers/select_all_controller.js":We,"/stimulus/controllers/share_invitation_controller.js":He,"/stimulus/controllers/user_list_duplicate_controller.js":Xe});Qe(st,rt);
6//# sourceMappingURL=stimulus.a11b1e1a.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.