1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DycvC1GJ.js","assets/connectToChild-CYVGlWxw.js"])))=>i.map(i=>d[i]); 2var sn=Object.defineProperty;var nn=(i,e,t)=>e in i?sn(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var u=(i,e,t)=>nn(i,typeof e!="symbol"?e+"":e,t);const rn="modulepreload",on=function(i){return"/vite/"+i},Ot={},ve=function(e,t,s){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),o=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));n=Promise.all(t.map(a=>{if(a=on(a),a in Ot)return;Ot[a]=!0;const l=a.endsWith(".css"),d=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const m=document.createElement("link");if(m.rel=l?"stylesheet":rn,l||(m.as="script",m.crossOrigin=""),m.href=a,o&&m.setAttribute("nonce",o),document.head.appendChild(m),l)return new Promise((T,c)=>{m.addEventListener("load",T),m.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})}))}return n.then(()=>e()).catch(r=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=r,window.dispatchEvent(o),!o.defaultPrevented)throw r})};class an{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=ln(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 ln(i){if("immediatePropagationStopped"in i)return i;{const{stopImmediatePropagation:e}=i;return Object.assign(i,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}class cn{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),r=this.cacheKey(t,s);let o=n.get(r);return o||(o=this.createEventListener(e,t,s),n.set(r,o)),o}createEventListener(e,t,s){const n=new an(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 hn=/^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;function dn(i){const t=i.trim().match(hn)||[];return{eventTarget:un(t[4]),eventName:t[2],eventOptions:t[9]?fn(t[9]):{},identifier:t[5],methodName:t[7]}}function un(i){if(i=="window")return window;if(i=="document")return document}function fn(i){return i.split(":").reduce((e,t)=>Object.assign(e,{[t.replace(/^!/,"")]:!/^!/.test(t)}),{})}function mn(i){if(i==window)return"window";if(i==document)return"document"}function ri(i){return i.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function Ne(i){return i.charAt(0).toUpperCase()+i.slice(1)}function oi(i){return i.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function pn(i){return i.match(/[^\s]+/g)||[]}class gn{constructor(e,t,s){this.element=e,this.index=t,this.eventTarget=s.eventTarget||e,this.eventName=s.eventName||bn(e)||Ue("missing event name"),this.eventOptions=s.eventOptions||{},this.identifier=s.identifier||Ue("missing identifier"),this.methodName=s.methodName||Ue("missing method n
2ame")}static forToken(e){return new this(e.element,e.index,dn(e.content))}toString(){const e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${e}->${this.identifier}#${this.methodName}`}get params(){const e={},t=new RegExp(`^data-${this.identifier}-(.+)-param$`);for(const{name:s,value:n}of Array.from(this.element.attributes)){const r=s.match(t),o=r&&r[1];o&&(e[ri(o)]=vn(n))}return e}get eventTargetName(){return mn(this.eventTarget)}}const Rt={a:i=>"click",button:i=>"click",form:i=>"submit",details:i=>"toggle",input:i=>i.getAttribute("type")=="submit"?"click":"input",select:i=>"change",textarea:i=>"input"};function bn(i){const e=i.tagName.toLowerCase();if(e in Rt)return Rt[e](i)}function Ue(i){throw new Error(i)}function vn(i){try{return JSON.parse(i)}catch{return i}}class yn{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}get identifier(){return this.context.identifier}handleEvent(e){this.willBeInvokedByEvent(e)&&this.shouldBeInvokedPerSelf(e)&&(this.processStopPropagation(e),this.processPreventDefault(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}"`)}processStopPropagation(e){this.eventOptions.stop&&e.stopPropagation()}processPreventDefault(e){this.eventOptions.prevent&&e.preventDefault()}invokeWithEvent(e){const{target:t,currentTarget:s}=e;try{const{params:n}=this.action,r=Object.assign(e,{params:n});this.method.call(this.controller,r),this.context.logDebugActivity(this.methodName,{event:e,target:t,currentTarget:s,action:this.methodName})}catch(n){const{identifier:r,controller:o,element:a,index:l}=this,d={identifier:r,controller:o,element:a,index:l,event:e};this.context.handleError(n,`invoking action "${this.action}"`,d)}}shouldBeInvokedPerSelf(e){return this.action.eventOptions.self===!0?this.action.element===e.target:!0}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 wn{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 En{constructor(e,t,s){this.attributeName=t,this.delegate=s,this.elementObserver=new wn(e,this)}
2get 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 _n{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);if(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 r=this.stringMap.get(e);this.stringMap.delete(e),r&&this.stringMapKeyRemoved(s,e,r)}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 Sn(i,e,t){ai(i,e).add(t)}function Tn(i,e,t){ai(i,e).delete(t),An(i,e)}function ai(i,e){let t=i.get(e);return t||(t=new Set,i.set(e,t)),t}function An(i,e){const t=i.get(e);t!=null&&t.size==0&&i.delete(e)}class ft{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){Sn(this.valuesByKey,e,t)}delete(e,t){Tn(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 li{constructor(e,t,s){this.attributeObserver=new En(e,t,this),this.delegate=s,this.tokensByElement=new ft}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=Cn(t,s).findIndex(([r,o])=>!kn(r,o));return n==-1?[[],[]]:[t.slice(n),s.slice(n)]}readTokensForElement(e){const t=this.attributeName,s=e.getAttribute(t)||"";return Ln(s,e,t)}}function Ln(i,e,t){return i.trim().split(/\s+/).filter(s=>s.length).map((s,n)=>({element:e,attributeName:t,content:s,index:n}))}function Cn(i,e){const t=Math.max(i.length,e.length);return Array.from({length:t},(s,n)=>[i[n],e[n]])}function kn(i,e){return i&&e&&i.index==e.index&&i.content==e.content}class ci{constructor(e,t,s){this.tokenListObserver=new li(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()}
vendor: 1,660 bytes, line 2
2get 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 Pn{constructor(e,t){this.context=e,this.delegate=t,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new ci(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get 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 yn(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))}
2disconnectAllActions(){this.bindings.forEach(e=>this.delegate.bindingDisconnected(e)),this.bindingsByAction.clear()}parseValueForToken(e){const t=gn.forToken(e);if(t.identifier==this.identifier)return t}elementMatchedValue(e,t){this.connectAction(t)}elementUnmatchedValue(e,t){this.disconnectAction(t)}}class On{constructor(e,t){this.context=e,this.receiver=t,this.stringMapObserver=new _n(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}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`,r=this.receiver[n];if(typeof r=="function"){const o=this.valueDescriptorNameMap[e];try{const a=o.reader(t);let l=s;s&&(l=o.reader(s)),r.call(this.receiver,a,l)}catch(a){throw a instanceof TypeError?new TypeError(`Stimulus Value "${this.context.identifier}.${o.name}" - ${a.message}`):a}}}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${Ne(t.name)}`;return this.receiver[s]}}class Rn{constructor(e,t){this.context=e,this.delegate=t,this.targetsByName=new ft}start(){this.tokenListObserver||(this.tokenListObserver=new li(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 Mn{constructor(e,t){this.logDebugActivity=(s,n={})=>{const{identifier:r,controller:o,element:a}=this;n=Object.assign({identifier:r,controller:o,element:a},n),this.application.logDebugActivity(this.identifier,s,n)},this.module=e,this.scope=t,this.controller=new e.controllerConstructor(this),this.bindingObserver=new Pn(this,this.dispatcher),this.valueObserver=new On(this,this.controller),this.targetObserver=new Rn(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}
2get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(e,t,s={}){const{identifier:n,controller:r,element:o}=this;s=Object.assign({identifier:n,controller:r,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 mt(i,e){const t=hi(i);return Array.from(t.reduce((s,n)=>(Fn(n,e).forEach(r=>s.add(r)),s),new Set))}function xn(i,e){return hi(i).reduce((s,n)=>(s.push(...In(n,e)),s),[])}function hi(i){const e=[];for(;i;)e.push(i),i=Object.getPrototypeOf(i);return e.reverse()}function Fn(i,e){const t=i[e];return Array.isArray(t)?t:[]}function In(i,e){const t=i[e];return t?Object.keys(t).map(s=>[s,t[s]]):[]}function jn(i){return Nn(i,Bn(i))}function Nn(i,e){const t=qn(i),s=Dn(i.prototype,e);return Object.defineProperties(t.prototype,s),t}function Bn(i){return mt(i,"blessings").reduce((t,s)=>{const n=s(i);for(const r in n){const o=t[r]||{};t[r]=Object.assign(o,n[r])}return t},{})}function Dn(i,e){return Vn(e).reduce((t,s)=>
2{const n=Hn(i,e,s);return n&&Object.assign(t,{[s]:n}),t},{})}function Hn(i,e,t){const s=Object.getOwnPropertyDescriptor(i,t);if(!(s&&"value"in s)){const r=Object.getOwnPropertyDescriptor(e,t).value;return s&&(r.get=s.get||r.get,r.set=s.set||r.set),r}}const Vn=typeof Object.getOwnPropertySymbols=="function"?i=>[...Object.getOwnPropertyNames(i),...Object.getOwnPropertySymbols(i)]:Object.getOwnPropertyNames,qn=(()=>{function i(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=i(function(){this.a.call(this)});return s.prototype.a=function(){},new s}try{return e(),i}catch{return s=>class extends s{}}})();function $n(i){return{identifier:i.identifier,controllerConstructor:jn(i.controllerConstructor)}}class Un{constructor(e,t){this.application=e,this.definition=$n(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 Mn(this,e),this.contextsByScope.set(e,t)),t}}class zn{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 pn(t)}getAttributeName(e){return this.data.getAttributeNameForKey(this.getDataKey(e))}getDataKey(e){return`${e}-class`}get data(){return this.scope.data}}class Wn{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}-${oi(e)}`}}class Kn{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 Ye(i,e){return`[${i}~="${e}"]`}class Jn{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 Ye(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 Ye(this.schema.targetAttribute,t)}deprecate(e,t){if(e){const{identifier:s}=this,n=this.schema.targetAttribute,r=this.schema.targetAttributeForScope(s);this.guide.warn(e,`target:${t}`,`Please replace ${n}="${s}.${t}" with ${r}="${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 Gn{constructor(e,t,s,n){this.targets=new Jn(this),this.classes=new zn(this),this.data=new Wn(this),this.containsElement=r=>r.closest(this.controllerSelector)===this.element,this.schema=e,this.element=t,this.identifier=s,this.guide=new Kn(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 Ye(this.schema.controllerAttribute,this.identifier)}}class Xn{constructor(e,t,s){this.element=e,this.schema=t,this.delegate=s,this.valueListObserver=new ci(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 r=n.get(s);return r||(r=this.delegate.createScopeForElementAndIdentifier(t,s),n.set(s,r)),r}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 Yn{constructor(e){this.application=e,this.scopeObserver=new Xn(this.element,this.schema,this),this.scopesByIdentifier=new ft,this.modulesByIdentifier=new Map}
2get 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 Un(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 Gn(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 Zn={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:i=>`data-${i}-target`};class di{constructor(e=document.documentElement,t=Zn){this.logger=console,this.debug=!1,this.logDebugActivity=(s,n,r={})=>{this.debug&&this.logFormattedMessage(s,n,r)},this.element=e,this.schema=t,this.dispatcher=new cn(this),this.router=new Yn(this)}static start(e,t){const s=new di(e,t);return s.start(),s}async start(){await Qn(),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){this.load({identifier:e,controllerConstructor:t})}load(e,...t){(Array.isArray(e)?e:[e,...t]).forEach(n=>{n.controllerConstructor.shouldLoad&&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 3 4%o 5 6%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 Qn(){return new Promise(i=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>i()):i()})}function er(i){return mt(i,"classes").reduce((t,s)=>Object.assign(t,tr(s)),{})}function tr(i){return{[`${i}Class`]:{get(){const{classes:e}=this;if(e.has(i))return e.get(i);{const t=e.getAttributeName(i);throw new Error(`Missing attribute "${t}"`)}}},[`${i}Classes`]:{get(){return this.classes.getAll(i)}},[`has${Ne(i)}Class`]:{get(){return this.classes.has(i)}}}}function ir(i){return mt(i,"targets").reduce((t,s)=>Object.assign(t,sr(s)),{})}function sr(i){return{[`${i}Target`]:{get(){const e=this.targets.find(i);if(e)return e;throw new Error(`Missing target element "${i}" for "${this.identifier}" controller`)}},[`${i}Targets`]:{get(){return this.targets.findAll(i)}},[`has${Ne(i)}Target`]:{get(){return this.targets.has(i)}}}}function nr(i){const e=xn(i,"values"),t={valueDescriptorMap:{get(){return e.reduce((s,n)=>{const r=ui(n,this.identifier),o=this.data.getAttributeNameForKey(r.key);return Object.assign(s,{[o]:r})},{})}}};return e.reduce((s,n)=>Object.assign(s,rr(n)),t)}function rr(i,e){const t=ui(i,e),{key:s,name:n,reader:r,writer:o}=t;return{[n]:{get(){const a=this.data.get(s);
6return a!==null?r(a):t.defaultValue},set(a){a===void 0?this.data.delete(s):this.data.set(s,o(a))}},[`has${Ne(n)}`]:{get(){return this.data.has(s)||t.hasCustomDefaultValue}}}}function ui([i,e],t){return cr({controller:t,token:i,typeDefinition:e})}function pt(i){switch(i){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function _e(i){switch(typeof i){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(i))return"array";if(Object.prototype.toString.call(i)==="[object Object]")return"object"}function or(i){const e=pt(i.typeObject.type);if(!e)return;const t=_e(i.typeObject.default);if(e!==t){const s=i.controller?`${i.controller}.${i.token}`:i.token;throw new Error(`The specified default value for the Stimulus Value "${s}" must match the defined type "${e}". The provided default value of "${i.typeObject.default}" is of type "${t}".`)}return e}function ar(i){const e=or({controller:i.controller,token:i.token,typeObject:i.typeDefinition}),t=_e(i.typeDefinition),s=pt(i.typeDefinition),n=e||t||s;if(n)return n;const r=i.controller?`${i.controller}.${i.typeDefinition}`:i.token;throw new Error(`Unknown value type "${r}" for "${i.token}" value`)}function lr(i){const e=pt(i);if(e)return hr[e];const t=i.default;return t!==void 0?t:i}function cr(i){const e=`${oi(i.token)}-value`,t=ar(i);return{type:t,key:e,name:ri(e),get defaultValue(){return lr(i.typeDefinition)},get hasCustomDefaultValue(){return _e(i.typeDefinition)!==void 0},reader:dr[t],writer:Mt[t]||Mt.default}}const hr={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},dr={array(i){const e=JSON.parse(i);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${i}" of type "${_e(e)}"`);return e},boolean(i){return!(i=="0"||String(i).toLowerCase()=="false")},number(i){return Number(i)},object(i){const e=JSON.parse(i);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${i}" of type "${_e(e)}"`);return e},string(i){return i}},Mt={default:ur,array:xt,object:xt};function xt(i){return JSON.stringify(i)}function ur(i){return`${i}`}class g{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:r=!0,cancelable:o=!0}={}){const a=n?`${n}:${e}`:e,l=new CustomEvent(a,{detail:s,bubbles:r,cancelable:o});return t.dispatchEvent(l),l}}g.blessings=[er,ir,nr];g.targets=[];g.values={};var fi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function bc(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}
6),Object.keys(i).forEach(function(s){var n=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:function(){return i[s]}})}),t}var fr={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},ze=fr,gt={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function mr(i){return i.trim().replace(gt.whitespace," ")}function pr(i){return encodeURIComponent(i).replace(gt.urlHexPairs,br)}function gr(i){return Object.keys(ze).forEach(function(e){ze[e].test(i)&&(i=i.replace(ze[e],e))}),i}function br(i){switch(i){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return i.toLowerCase()}}function Ze(i){if(typeof i!="string")throw new TypeError("Expected a string, but received "+typeof i);i.charCodeAt(0)===65279&&(i=i.slice(1));var e=gr(mr(i)).replace(gt.quotes,"'");return"data:image/svg+xml,"+pr(e)}Ze.toSrcset=function(e){return Ze(e).replace(/ /g,"%20")};var vr=Ze;const mi=Te(vr);
6class Qe extends g{importQrcodeGenerator(){return ve(()=>import("./qrcode-BXo_yT1o.js").then(e=>e.q),[]).then(e=>(console.log(e),e.default))}generateSvg(){this.importQrcodeGenerator().then(e=>{const t=e(4,"L");t.addData(this.textValue),t.make();const s=t.createSvgTag(10,40).replace(/width="\d+px"/,'width="100%"').replace(/height="\d+px"/,'height="100%"');this.displayTarget.innerHTML=s,this.svgButtonTarget.href=mi(s),setTimeout(()=>{this.imageButtonTarget.href=t.createDataURL(10,40)},100)})}}u(Qe,"values",{text:String}),u(Qe,"targets",["display","imageButton","svgButton"]);const vc=Object.freeze(Object.defineProperty({__proto__:null,default:Qe},Symbol.toStringTag,{value:"Module"}));class yr extends g{openQrcode(){const e=new CustomEvent("open-qrcode");window.dispatchEvent(e)}}const yc=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"}));class wr extends g{constructor(){super(...arguments);u(this,"_handleClickWindow",t=>{t.target.dataset.activatorPreventHide!=="true"&&this._handleHide()})}connect(){window.addEventListener("click",this._handleClickWindow)}disconnect(){window.removeEventListener("click",this._handleClickWindow)}show(t){t.stopPropagation(),this.element.classList.add("is-activator-active"),document.body.style.overflow="hidden";const s=this.element.querySelector("[data-activator-focus-on-show]");s&&s.focus()}hide(t){t.stopPropagation(),alert(t.target),t.target.dataset.activatorPreventHide!=="true"&&this._handleHide()}_handleHide(){this.element.classList.remove("is-activator-active"),document.body.style.overflow="auto"}}const wc=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"}));class pi extends g{initialize(){console.debug("Stimulus.js - add-block")}connect(){}disconnect(){var e;(e=this._rootEl)==null||e.remove()}openDialog(){this._rootEl||(this._rootEl=document.createElement("div"),this._rootEl.setAttribute("data-controller","render-react"),this._rootEl.setAttribute("data-render-react-component-value","AddBlockDialog"),this._rootEl.setAttribute("data-render-react-props-value",JSON.stringify({block_id:this.blockIdValue,mode:this.modeValue,record_type:this.recordTypeValue,record_id:this.recordIdValue,site_id:this.siteIdValue,site_subdomain:this.siteSubdomainValue,column_id:this.columnIdValue})),document.body.appendChild(this._rootEl))}}u(pi,"values",{blockId:String,mode:String,recordType:String,recordId:String,siteId:String,siteSubdomain:String,columnId:String});const Ec=Object.freeze(Object.defineProperty({__proto__:null,default:pi},Symbol.toStringTag,{value:"Module"}));var Er=function(i){return i.replace(/[^A-Za-z0-9-]/g,"-").replace(/--+/g,"-").replace(/^-|-$/g,"").toLowerCase()};const _r=Te(Er);class Sr extends g{initialize(){this._anchors=[]}connect(){const e=this.element.dataset.anchorifySelector;if(!e)throw"Element must have data-anchorify-selector attribute.";this.element.querySelectorAll(e).forEach(s=>{const n=s.textContent;if(n.trim().length<=0)return;const r=this._generateAnchor(n),o=document.createElement("a");o.innerText="#",o.className="theme-anchorify",o.setAttribute("href","#"+r),o.setAttribute("name",r),s.insertBefore(o,s.childNodes[0])})}disconnect(){}_generateAnchor(e){let t=_r(e);const s=this._anchors.filter(n=>n==t);return this._anchors.push(t),s.length>0&&(t+="-"+s.length),t}}const _c=Object.freeze(Object.defineProperty({__proto__:null,default:Sr},Symbol.toStringTag,{value:"Module"})),Ft=(i,e)=>{const t=i[e];return typeof t=="function"?t:(...s)=>{}},It=(i,e,t)=>{let s=i;return t===!0?s=`${e.identifier}:${i}`:typeof t=="string"&&(s=`${t}:${i}`),s},jt=(i,e,t)=>{const{bubbles:s,cancelable:n,composed:r}={bubbles:!0,cancelable:!0,composed:!0};return new CustomEvent(i,{bubbles:s,cancelable:n,composed:r,detail
6:t})};function Tr(i,e){var t={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&e.indexOf(s)<0&&(t[s]=i[s]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,s=Object.getOwnPropertySymbols(i);n<s.length;n++)e.indexOf(s[n])<0&&Object.prototype.propertyIsEnumerable.call(i,s[n])&&(t[s[n]]=i[s[n]]);return t}const We={debug:!1,logger:console,dispatchEvent:!0,eventPrefix:!0};class Ar{constructor(e,t={}){var s,n,r;this.log=(l,d)=>{this.debug&&(this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${l}`,"color: #3B82F6","color: unset"),this.logger.log(Object.assign({controllerId:this.controllerId},d)),this.logger.groupEnd())},this.warn=l=>{this.logger.warn(`%c${this.controller.identifier} %c${l}`,"color: #3B82F6; font-weight: bold","color: unset")},this.dispatch=(l,d={})=>{if(this.dispatchEvent){const{event:m}=d,T=Tr(d,["event"]),c=this.extendedEvent(l,m||null,T);this.targetElement.dispatchEvent(c),this.log("dispatchEvent",Object.assign({eventName:c.type},T))}},this.call=(l,d={})=>{const m=this.controller[l];if(typeof m=="function")return m.call(this.controller,d)},this.extendedEvent=(l,d,m)=>{const{bubbles:T,cancelable:c,composed:E}=d||{bubbles:!0,cancelable:!0,composed:!0};return d&&Object.assign(m,{originalEvent:d}),new CustomEvent(this.composeEventName(l),{bubbles:T,cancelable:c,composed:E,detail:m})},this.composeEventName=l=>{let d=l;return this.eventPrefix===!0?d=`${this.controller.identifier}:${l}`:typeof this.eventPrefix=="string"&&(d=`${this.eventPrefix}:${l}`),d},this.debug=(n=(s=t==null?void 0:t.debug)!==null&&s!==void 0?s:e.application.stimulusUseDebug)!==null&&n!==void 0?n:We.debug,this.logger=(r=t==null?void 0:t.logger)!==null&&r!==void 0?r:We.logger,this.controller=e,this.controllerId=e.element.id||e.element.dataset.id,this.targetElement=(t==null?void 0:t.element)||e.element;const{dispatchEvent:o,eventPrefix:a}=Object.assign({},We,t);Object.assign(this,{dispatchEvent:o,eventPrefix:a}),this.controllerInitialize=e.initialize.bind(e),this.controllerConnect=e.connect.bind(e),this.controllerDisconnect=e.disconnect.bind(e)}}class Lr extends g{}Lr.debounces=[];class Cr extends Ar{constructor(e,t={}){super(e,t),this.observe=()=>{this.targetElement.addEventListener("mouseenter",this.onEnter),this.targetElement.addEventListener("mouseleave",this.onLeave)},this.unobserve=()=>{this.targetElement.removeEventListener("mouseenter",this.onEnter),this.targetElement.removeEventListener("mouseleave",this.onLeave)},this.onEnter=s=>{this.call("mouseEnter",s),this.log("mouseEnter",{hover:!0}),this.dispatch("mouseEnter",{hover:!1})},this.onLeave=s=>{this.call("mouseLeave",s),this.log("mouseLeave",{hover:!1}),this.dispatch("mouseLeave",{hover:!1})},this.controller=e,this.enhanceController(),this.observe()}enhanceController(){const e=this.controller.disconnect.bind(this.controller),t=()=>{this.unobserve(),e()};Object.assign(this.controller,{disconnect:t})}}const kr=(i,e={})=>{const t=i,s=new Cr(t,e);return[s.observe,s.unobserve]},Pr={dispatchEvent:!0,eventPrefix:!0,visibleAttribute:"isVisible"},Or=(i,e={})=>{const t=i,{dispatchEvent:s,eventPrefix:n,visibleAttribute:r}=Object.assign({},Pr,e),o=(e==null?void 0:e.element)||t.element;t.intersectionElements||(t.intersectionElements=[]),t.intersectionElements.push(o);const a=S=>{const[h]=S;h.isIntersecting?d(h):o.hasAttribute(r)&&m(h)},l=new IntersectionObserver(a,e),d=S=>{if(o.setAttribute(r,"true"),Ft(t,"appear").call(t,S,l),s){const h=It("appear",t,n),f=jt(h,null,{controller:t,entry:S,observer:l});o.dispatchEvent(f)}},m=S=>{if(o.removeAttribute(r),Ft(t,"disappear").call(t,S,l),s){const h=It("disappear",t,n),f=jt(h,null,{controller:t,entry:S,observer:l});o.dispatchEvent(f)}},T=t.disconnect.bind(t),c=()=>{A(),T()},E=()=>{l.observe(o)},A=()=>{l.unobserve(o)},_=()=>t.intersectionElements.filter(S=>S.hasAttribute(r)).length===0,O=()=>t.intersectionElements.filter(S=>S.hasAttribute(r)).length===1,k=()=>t.intersectionElements.some(S=>S.hasAttribute(r)),P=()=>t.intersectionElements.every(S=>S.hasAttribute(r));return Object.assign(t,{isVisible:P,noneVisible:_,oneVisible:O,atLeastOneVisible:k,allVisible:P,disconnect:c}),E(),[E,A]};class Rr extends g{}Rr.throttles=[];var Mr=typeof global=="object"&&global&&global.Object===Object&&global,xr=typeof self=="object"&&self&&self.Object===Object&&self,Fr=Mr||xr||Function("return this")(),xe=Fr.Symbol,gi=Object.prototype,Ir=gi.hasOwnProperty,jr=gi.toString,ye=xe?xe.toStringTag:void 0;function Nr(i){var e=Ir.call(i,ye),t=i[ye];try{i[ye]=void 0;var s=!0}catch{}var n=jr.call(i);return s&&(e?i[ye]=t:delete i[ye]),n}var Br=Object.prototype,Dr=Br.toString;function Hr(i){return Dr.call(i)}
6var Vr="[object Null]",qr="[object Undefined]",Nt=xe?xe.toStringTag:void 0;function $r(i){return i==null?i===void 0?qr:Vr:Nt&&Nt in Object(i)?Nr(i):Hr(i)}function Ur(i){var e=typeof i;return i!=null&&(e=="object"||e=="function")}var zr="[object AsyncFunction]",Wr="[object Function]",Kr="[object GeneratorFunction]",Jr="[object Proxy]";function Bt(i){if(!Ur(i))return!1;var e=$r(i);return e==Wr||e==Kr||e==zr||e==Jr}function Gr(i){var e=i==null?0:i.length;return e?i[e-1]:void 0}let Xr=class{constructor(e){this.response=e}get statusCode(){return this.response.status}get redirected(){return this.response.redirected}get ok(){return this.response.ok}get unauthenticated(){return this.statusCode===401}get unprocessableEntity(){return this.statusCode===422}get authenticationURL(){return this.response.headers.get("WWW-Authenticate")}get contentType(){return(this.response.headers.get("Content-Type")||"").replace(/;.*$/,"")}get headers(){return this.response.headers}get html(){return this.contentType.match(/^(application|text)\/(html|xhtml\+xml)$/)?this.text:Promise.reject(new Error(`Expected an HTML response but got "${this.contentType}" instead`))}get json(){return this.contentType.match(/^application\/.*json$/)?this.responseJson||(this.responseJson=this.response.json()):Promise.reject(new Error(`Expected a JSON response but got "${this.contentType}" instead`))}get text(){return this.responseText||(this.responseText=this.response.text())}get isTurboStream(){return this.contentType.match(/^text\/vnd\.turbo-stream\.html/)}async renderTurboStream(){if(this.isTurboStream)window.Turbo?await window.Turbo.renderStreamMessage(await this.text):console.warn("You must set `window.Turbo = Turbo` to automatically process Turbo Stream events with request.js");else return Promise.reject(new Error(`Expected a Turbo Stream response but got "${this.contentType}" instead`))}};class Yr{static register(e){this.interceptor=e}static get(){return this.interceptor}static reset(){this.interceptor=void 0}}function Zr(i){const e=document.cookie?document.cookie.split("; "):[],t=`${encodeURIComponent(i)}=`,s=e.find(n=>n.startsWith(t));if(s){const n=s.split("=").slice(1).join("=");if(n)return decodeURIComponent(n)}}function Qr(i){const e={};for(const t in i){const s=i[t];s!==void 0&&(e[t]=s)}return e}function Dt(i){const e=document.head.querySelector(`meta[name="${i}"]`);return e&&e.content}function eo(i){return[...i].reduce((e,[t,s])=>e.concat(typeof s=="string"?[[t,s]]:[]),[])}function to(i,e){for(const[t,s]of e)s instanceof window.File||(i.has(t)&&!t.includes("[]")?(i.delete(t),i.set(t,s)):i.append(t,s))}let Be=class{constructor(e,t,s={}){this.method=e,this.options=s,this.originalUrl=t.toString()}async perform(){try{const t=Yr.get();t&&await t(this)}catch(t){console.error(t)}const e=new Xr(await window.fetch(this.url,this.fetchOptions));return e.unauthenticated&&e.authenticationURL?Promise.reject(window.location.href=e.authenticationURL):(e.ok&&e.isTurboStream&&await e.renderTurboStream(),e)}addHeader(e,t){const s=this.additionalHeaders;s[e]=t,this.options.headers=s}sameHostname(){if(!this.originalUrl.startsWith("http:"))return!0;try{return new URL(this.originalUrl).hostname===window.location.hostname}catch{return!0}}get fetchOptions(){return{method:this.method.toUpperCase(),headers:this.headers,body:this.formattedBody,signal:this.signal,credentials:"same-origin",redirect:this.redirect}}get headers(){const e={"X-Requested-With":"XMLHttpRequest","Content-Type":this.contentType,Accept:this.accept};return this.sameHostname()&&(e["X-CSRF-Token"]=this.csrfToken),Qr(Object.assign(e,this.additionalHeaders))}get csrfToken(){return Zr(Dt("csrf-param"))||Dt("csrf-token")}get contentType(){return this.options.contentType?this.options.contentType:this.body==null||this.body instanceof window.FormData?void 0:this.body instanceof window.File?this.body.type:"application/json"}get accept(){switch(this.responseKind){case"html":return"text/html, application/xhtml+xml";case"turbo-stream":return"text/vnd.turbo-stream.html, text/html, application/xhtml+xml";case"json":return"application/json, application/vnd.api+json";default:return"*/*"}}get body(){return this.options.body}get query(){const e=(this.originalUrl.split("?")[1]||"").split("#")[0],t=new URLSearchParams(e);let s=this.options.query;s instanceof window.FormData?s=eo(s):s instanceof window.URLSearchParams?s=s.entries():s=Object.entries(s||{}),to(t,s);const n=t.toString();return n.length>0?`?${n}`:""}get url(){return this.originalUrl.split("?")[0].split("#")[0]+this.query}get responseKind(){return this.options.responseKind||"html"}get signal(){return this.options.signal}get redirect(){return this.options.redirect||"follow"}get additionalHeaders(){return this.options.headers||{}}get formattedBody(){const e=Object.prototype.toString.call(this.body)==="[object String]";return this.headers["Content-Type"]==="application/json"&&!e?JSON.stringify(this.body):this.body}};async function bi(i,e){return new Be("get",i,e).perform()}async function io(i,e){return new Be("post",i,e).perform()}async function Ht(i,e){return new Be("patch",i,e).perform()}async function Ac(i,e){return new Be("delete",i,e).perform()}class et extends g{connect(){this.element.blockEditor=this,kr(this,{element:this.element})}mouseEnter(e){this._blockEditorParents(e.target).forEach(s=>{s.blockEditor&&s.blockEditor.element.classList.remove("block-editor--hover")}),this.element.classList.add("block-editor--hover")}mouseLeave(e){this.element.classList.remove("block-editor--hover");const t=this._blockEditorParents(e.target),s=Gr(t);s!=null&&s.blockEditor&&s.blockEditor.element.classList.add("block-editor--hover")}edit(){if(!this.editUrlValue)throw"block-editor controller must have edit-url-value";if(this.isEditing())return;this.element.closest(".site-editable--active")&&bi(this.editUrlValue,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})}moveUp(){if(!this.moveUpUrlValue)throw"block-editor controller must have move-up-url-value";Ht(this.moveUpUrlValue,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})}moveDown(){if(!this.moveDownUrlValue)throw"block-editor controller must have move-down-url-value";Ht(this.moveDownUrlValue,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})}isEditing(){return this.element.classList.contains("block-editor--editing")}_nearestBlockEditor(e){var s,n;let t=e.parentNode;for(;t&&!(((n=(s=t.dataset)==null?void 0:s.controller)==null?void 0:n.indexOf("block-editor"))>=0);)t=t.parentNode;return t}_blockEditorParents(e){var n,r;const t=[];let s=e.parentNode;for(;s;)((r=(n=s.dataset)==null?void 0:n.controller)==null?void 0:r.indexOf("block-editor"))>=0&&t.push(s),s=s.parentNode;return t}}u(et,"targets",["content","bar","editor","overlay"]),u(et,"values",{editUrl:String,moveUpUrl:String,moveDownUrl:String});const Lc=Object.freeze(Object.defineProperty({__proto__:null,default:et},Symbol.toStringTag,{value:"Module"}));function z(i,e){for(let t in e)i.style[t]=e[t]}class so extends g{constructor(){super(...arguments);u(this,"_handleClickOutside",t=>{if(this._popper.style.display!=="none"&&this._popper&&!this._popper.contains(t.target)){z(this._popper,{display:"none"}),document.removeEventListener("click",this._handleClickOutside);return}});u(this,"_handleClickWindow",t=>{let s=t.target;if(s.closest("trix-editor")||s.closest(".block-editor__editor"))return;if(!(s instanceof HTMLAnchorElement)){let d=!1;for(;s&&s!==document;){if(s instanceof HTMLAnchorElement){d=!0;break}s=s.parentNode}if(!d)return}if(s.host===window.location.host&&(s.pathname.startsWith("/preview/")||s.pathname.startsWith("/builder/")||s.pathname.startsWith("/editable/"))||s.target==="_blank")return;t.preventDefault();const n=s.getAttribute("href"),r=s.offsetHeight,o=s.offsetParent,a=s.offsetTop,l=s.offsetLeft;o.appendChild(this._popper),this._popper.innerHTML=` 7 Cannot open external link in preview. 8 Click to open in new tab.<br> 9 <a 10 href="${n}" 11 target="_blank" 12 style="color: #2196f3; text-decoration: underline;" 13 > 14 ${n} 15 </a> 16 `,z(this._popper,{display:"block",position:"absolute",top:`${a+r}px`,left:`${l}px`,zIndex:1e3}),setTimeout(()=>{document.addEventListener("click",this._handleClickOutside)},100)})}initialize(){console.debug("Stimulus.js - block-external-links")}connect(){window.addEventListener("mousedown",t=>{const s=t.target;s.closest("trix-editor")||s instanceof HTMLAnchorElement&&t.preventDefault()}),window.addEventListener("click",this._handleClickWindow),this._popper=document.createElement("div"),z(this._popper,{display:"none",position:"absolute",padding:"8px 12px",lineHeight:"20px",fontSize:"14px",color:"rgba(0, 0, 0, .87)",backgroundColor:"#fff",border:"1px solid #ccc",borderRadius:"4px",minWidth:"240px",textAlign:"left"}),this._popper.addEventListener("click",t=>t.stopPropagation())}disconnect(){this._links&&this._links.forEach(t=>{t.removeEventListener("click",this._handleClickAnchor)}),this._popper&&this._popper.remove(),document.removeEventListener("click",this._handleClickOutside)}}const Cc=Object.freeze(Object.defineProperty({__proto__:null,default:so},Symbol.toStringTag,{value:"Module"}));class tt extends g{constructor(){super(...arguments);u(this,"_clearField",()=>
16{this.fieldTarget.value="",this.fieldTarget.focus(),this._handleInputField()});u(this,"_handleInputField",()=>{this.fieldTarget.value?(this.fieldTarget.style.paddingRight="40px",this.buttonTarget.style.display="block"):(this.fieldTarget.style.paddingRight="0px",this.buttonTarget.style.display="none")})}initialize(){console.debug("Stimulus.js - clear-field")}connect(){!this.buttonTarget||!this.fieldTarget||(this._handleInputField(),this.buttonTarget.addEventListener("click",this._clearField),this.fieldTarget.addEventListener("input",this._handleInputField))}disconnect(){!this.buttonTarget||!this.fieldTarget||(this.buttonTarget.removeEventListener("click",this._clearField),this.fieldTarget.removeEventListener("input",this._handleInputField))}}u(tt,"targets",["field","button"]),u(tt,"values",{});const kc=Object.freeze(Object.defineProperty({__proto__:null,default:tt},Symbol.toStringTag,{value:"Module"}));class it extends g{constructor(){super(...arguments);u(this,"_handleClick",async()=>{if(this.contentValue)await this._copy(this.contentValue);else if(this.selectorValue){const s=document.querySelector(this.selectorValue),n=s.innerHTML,r=s.textContent;await this._copy(n,r)}else return;const t=this.labelTarget.innerHTML;this.labelTarget.innerHTML="Copied!",setTimeout(()=>{this.labelTarget.innerHTML=t},2e3)})}initialize(){console.debug("Stimulus.js - clipboard-copy")}connect(){this._supportsClipboard()?(this.element.style.cursor="pointer",this.element.addEventListener("click",this._handleClick)):this.element.style.display="none"}disconnect(){this._supportsClipboard()&&this.element.removeEventListener("click",this._handleClick)}_supportsClipboard(){return navigator.clipboard&&window.isSecureContext}async _copy(t,s){try{if(navigator.clipboard&&window.ClipboardItem){const n=new Blob([t],{type:"text/html"}),r=new Blob([s],{type:"text/plain"}),o=new ClipboardItem({"text/html":n,"text/plain":r});await navigator.clipboard.write([o])}else throw new Error("Clipboard API not available")}catch(n){console.error("Failed to copy:",n),this._copyHtmlContentFallback(t)}}_copyHtmlContentFallback(t){const s=document.createElement("div");s.contentEditable="true",document.body.appendChild(s),s.innerHTML=t,s.unselectable="off",s.focus(),document.execCommand("selectAll",!1,null),document.execCommand("copy"),document.body.removeChild(s)}}u(it,"values",{selector:String,content:String}),u(it,"targets",["label"]);const Pc=Object.freeze(Object.defineProperty({__proto__:null,default:it},Symbol.toStringTag,{value:"Module"}));var vi={exports:{}};(function(i,e){(function(t,s){i.exports=s()})(fi,function(){var t=function(){},s={},n={},r={};function o(c,E){c=c.push?c:[c];var A=[],_=c.length,O=_,k,P,F,S;for(k=function(h,f){f.length&&A.push(h),O--,O||E(A)};_--;){if(P=c[_],F=n[P],F){k(P,F);continue}S=r[P]=r[P]||[],S.push(k)}}function a(c,E){if(c){var A=r[c];if(n[c]=E,!!A)for(;A.length;)A[0](c,E),A.splice(0,1)}}function l(c,E){c.call&&(c={success:c}),E.length?(c.error||t)(E):(c.success||t)(c)}function d(c,E,A,_){var O=document,k=A.async,P=(A.numRetries||0)+1,F=A.before||t,S=c.replace(/[\?|#].*$/,""),h=c.replace(/^(css|img)!/,""),f,v;_=_||0,/(^css!|\.css$)/.test(S)?(v=O.createElement("link"),v.rel="stylesheet",v.href=h,f="hideFocus"in v,f&&v.relList&&(f=0,v.rel="preload",v.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(S)?(v=O.createElement("img"),v.src=h):(v=O.createElement("script"),v.src=c,v.async=k===void 0?!0:k),v.onload=v.onerror=v.onbeforeload=function(G){var w=G.type[0];if(f)try{v.sheet.cssText.length||(w="e")}catch(W){W.code!=18&&(w="e")}if(w=="e"){if(_+=1,_<P)return d(c,E,A,_)}else if(v.rel=="preload"&&v.as=="style")return v.rel="stylesheet";E(c,w,G.defaultPrevented)},F(c,v)!==!1&&O.head.appendChild(v)}function m(c,E,A){c=c.push?c:[c];var _=c.length,O=_,k=[],P,F;for(P=function(S,h,f){if(h=="e"&&k.push(S),h=="b")if(f)k.push(S);else return;_--,_||E(k)},F=0;F<O;F++)d(c[F],P,A)}function T(c,E,A){var _,O;if(E&&E.trim&&(_=E),O=(_?A:E)||{},_){if(_ in s)throw"LoadJS";s[_]=!0}function k(P,F){m(c,function(S){l(O,S),P&&l({success:P,error:F},S),a(_,S)},O)}if(O.returnPromise)return new Promise(k);k()}return T.ready=function(E,A){return o(E,function(_){l(A,_)}),T},T.done=function(E){a(E,[])},T.reset=function(){s={},n={},r={}},T.isDefined=function(E){return E in s},T})})(vi);var no=vi.exports;const he=Te(no);function ro(){return window.Popper?(console.log("Popper is already loaded."),Promise.resolve()):he(["https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"],"popper",{returnPromise:!0}).then(()=>{console.log("Popper.js is loaded.")})}class yi extends g{constructor(){super(...arguments);u(this,"_handleClickTooltip",t=>{t.stopPropagation()});u(this,"_handleClickWindow",t=>{t.target!==this.element&&this.hideTooltip()});
16u(this,"_handleClickFnRef",t=>{if(t.preventDefault(),this._tooltip.hasAttribute("data-show")){this.hideTooltip();return}ro().then(()=>{this._popper||(this._popper=Popper.createPopper(this.element,this._tooltip,{placement:"bottom",modifiers:[{name:"offset",options:{offset:[0,12]}},{name:"preventOverflow",options:{padding:16}}]})),this._popper.update(),this.showTooltip()})})}initialize(){this._popper=null}connect(){const t=document.querySelector(`#${this.tooltipIdValue}`);!t||this.element.closest(".fancy-footnote-tooltip")||(this._tooltip=t.cloneNode(!0),document.body.appendChild(this._tooltip),this._tooltip.addEventListener("click",this._handleClickTooltip),this.element.addEventListener("click",this._handleClickFnRef),window.addEventListener("click",this._handleClickWindow))}disconnect(){this._tooltip&&(this._tooltip.removeEventListener("click",this._handleClickTooltip),this._tooltip.remove(),this.element.removeEventListener("click",this._handleClickFnRef),window.removeEventListener("click",this._handleClickWindow))}hideTooltip(){this._tooltip.removeAttribute("data-show")}showTooltip(){this._tooltip.setAttribute("data-show","")}}u(yi,"values",{tooltipId:String});const Oc=Object.freeze(Object.defineProperty({__proto__:null,default:yi},Symbol.toStringTag,{value:"Module"}));class oo extends g{click(){const e=this.element.dataset.formId;if(!e)return;const t=document.getElementById(e);if(!t)return;const s=t.querySelector("input[type=submit]");s&&s.click()}}const Rc=Object.freeze(Object.defineProperty({__proto__:null,default:oo},Symbol.toStringTag,{value:"Module"})),ao=/^\/document\/d\/e\/[a-zA-Z0-9_\-]+\/pub$/,lo=/^\/spreadsheets\/d\/e\/[a-zA-Z0-9_\-]+\/pubhtml$/,co=/^\/presentation\/d\/e\/[a-zA-Z0-9_\-]+\/pub$/,ho=/^\/forms\/d\/e\/[a-zA-Z0-9_\-]+\/viewform$/;function uo(i){let e;try{e=new URL(i)}catch{return null}const t=e.hostname,s=e.pathname;if(t!=="docs.google.com")return null;if(s.match(ao))e.searchParams.set("embedded","true");else if(s.match(ho))e.searchParams.set("usp",null),e.searchParams.set("embedded","true");else if(s.match(lo))e.searchParams.set("widget","true"),e.searchParams.set("headers","false");else if(s.match(co)){const n=s.replace(/\/pub$/,"/embed");e.pathname=n}else return null;return{type:"docs",embedUrl:e.toString()}}const Ke={"16:9":{paddingTop:16/9*100+"%"},letter:{paddingTop:11/8.5*100+"%"},a4:{paddingTop:297/210*100+"%"},square:{paddingTop:"100%"}},Vt={"16:9":{paddingTop:9/16*100+"%"},letter:{paddingTop:8.5/11*100+"%"},a4:{paddingTop:210/297*100+"%"},square:{paddingTop:"100%"}};class fo extends g{connect(){const{block:e}=this.element.dataset;if(!e)return;const{url:t,orientation:s,aspect_ratio:n}=JSON.parse(e);if(!t)return;const{type:r,embedUrl:o}=uo(t);if(!r||!o)return null;z(this.element,{overflow:"hidden",position:"relative",paddingTop:Ke["16:9"]});let a;s==="portrait"?a=Ke[n]||Ke["16:9"]:a=Vt[n]||Vt["16:9"],z(this.element,a);const l=document.createElement("iframe");l.src=o,z(l,{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none"}),this.element.appendChild(l)}}const Mc=Object.freeze(Object.defineProperty({__proto__:null,default:fo},Symbol.toStringTag,{value:"Module"}));class mo extends g{constructor(){super(...arguments);u(this,"_handleClick",()=>{const t=this.element.dataset.gotoUrl;Turbolinks.visit(t)})}connect(){if(this.element.addEventListener("click",this._handleClick),this.element.style.cursor="pointer",!this.element.dataset.gotoUrl)throw"Element must have data-goto-url attribute."}disconnect(){this.element.removeEventListener("click",this._handleClick)}}const xc=Object.freeze(Object.defineProperty({__proto__:null,default:mo},Symbol.toStringTag,{value:"Module"}));let Le=null;function po(){return window.hljs?(console.log("Highlight is already loaded."),Promise.resolve()):Le||(Le=he(["https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/default.min.css","https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/highlight.min.js"],"highlight",{returnPromise:!0}).then(()=>{console.log("Loaded Highlight.")}),Le)}class go extends g{connect(){const e=this.element.querySelector("code");window.addEventListener("load",()=>{po().then(()=>{window.hljs.highlightElement(e)})})}}const Fc=Object.freeze(Object.defineProperty({__proto__:null,default:go},Symbol.toStringTag,{value:"Module"}));class bo extends g{constructor(){super(...arguments);u(this,"_handleClickAnchor",t=>{t.stopImmediatePropagation()});u(this,"_handleClick",t=>{const s=this.element.dataset.href;window.location.href=s})}connect(){this.element.addEventListener("click",this._handleClick),this._links=this.element.querySelectorAll("a"),this._links.forEach(t=>{t.addEventListener("click",this._handleClickAnchor)})}disconnect(){this._links&&this._links.forEach(t=>{t.removeEventListener("click",this._handleClickAnchor)})}}const Ic=Object.freeze(Object.defineProperty({__proto__:null,default:bo},Symbol.toStringTag,{value:"Module"}));let qt=null;class vo extends g{constructor(){super(...arguments);u(this,"_handleTouchEnd",()=>{document.querySelectorAll('[data-controller="load-altmetric"]').forEach(s=>{s.isEqualNode(this.element)||this._hidePopover(s)})});u(this,"_handleClickWindow",()=>{this._hidePopover(this.element)})}connect(){if(this.element.addEventListener("touchend",this._handleTouchEnd),window.addEventListener("click",this._handleClickWindow),window._altmetric_embed_init){console.log("Altmetric is already loaded."),window._altmetric_embed_init(
16);return}qt||(qt=he("https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js","altmetric",{returnPromise:!0}).then(()=>{console.log("Loaded Altmetric. Setting it up.")}))}_hidePopover(t){const s=t.querySelector("a");s&&s.dispatchEvent(new MouseEvent("mouseout"))}disconnect(){this.element.removeEventListener("touchend",this._handleTouchEnd),window.removeEventListener("click",this._handleClickWindow)}}const jc=Object.freeze(Object.defineProperty({__proto__:null,default:vo},Symbol.toStringTag,{value:"Module"}));class yo extends g{connect(){var e=this.element.textContent;e.match(/(?:\$|\\\(|\\\[|\\begin\{.*?})/)&&(console.log("There is math in the page. Typeset them."),window.MathJax?this.renderMathJax():(console.log("Loading MathJax library..."),ve(()=>import("./loadMathJax-CBUnA-uB.js"),[]).then(t=>t.default).then(t=>{t().then(()=>{this.renderMathJax()})})))}disconnect(){}renderMathJax(){window.MathJax?(window.MathJax.typesetClear&&window.MathJax.typesetClear([this.element]),console.log("Typesetting with MathJax..."),window.MathJax.typesetPromise?window.MathJax.typesetPromise([this.element]).catch(e=>console.error(e)):window.MathJax.typeset&&window.MathJax.typeset([this.element])):console.error("MathJax is not loaded.")}}const Nc=Object.freeze(Object.defineProperty({__proto__:null,default:yo},Symbol.toStringTag,{value:"Module"}));class wi extends g{show(e){e.preventDefault(),e.stopPropagation(),this.modalTarget.classList.add("ot-dialog--open");const t=this.modalTarget.querySelector("#user_email");t&&t.focus()}hide(e){e.preventDefault(),e.stopPropagation(),this.modalTarget.classList.remove("ot-dialog--open")}}u(wi,"targets",["modal"]);const Bc=Object.freeze(Object.defineProperty({__proto__:null,default:wi},Symbol.toStringTag,{value:"Module"}));class wo extends g{constructor(){super(...arguments);u(this,"_handleBeforeVisit",()=>{this._handleHide()});u(this,"_handleStopPropagation",t=>{t.stopPropagation()});u(this,"_handleShow",()=>{this.element.classList.add("is-active"),this.element.classList.add("is-modal-active"),document.body.style.overflow="hidden"});u(this,"_handleHide",()=>{this.element.classList.remove("is-active"),this.element.classList.remove("is-modal-active"),document.body.style.overflow="auto"})}connect(){document.addEventListener("turbo:before-visit",this._handleBeforeVisit),document.addEventListener("click",this._handleHide),this.element.addEventListener("click",this._handleStopPropagation)}disconnect(){document.removeEventListener("turbo:before-visit",this._handleBeforeVisit),document.removeEventListener("click",this._handleHide),this.element.removeEventListener("click",this._handleStopPropagation)}show(t){t.stopPropagation(),this._handleShow()}hide(t){t.stopPropagation(),this._handleHide()}toggle(t){t.stopPropagation(),this.element.classList.contains("is-modal-active")?this._handleHide():this._handleShow()}}const Dc=Object.freeze(Object.defineProperty({__proto__:null,default:wo},Symbol.toStringTag,{value:"Module"}));var bt=Eo;function Eo(i,e,t){var s=null,n=null,r=t&&t.leading,o=t&&t.trailing;r==null&&(r=!0),o==null&&(o=!r),r==!0&&(o=!1);var a=function(){s&&(clearTimeout(s),s=null)},l=function(){var m=n;a(),m&&m()},d=function(){var m=r&&!s,T=this,c=arguments;if(n=function(){return i.apply(T,c)},s||(s=setTimeout(function(){if(s=null,o)return n()},e)),m)return m=!1,n()};return d.cancel=a,d.flush=l,d}class st extends g{constructor(){super(...arguments);u(this,"_handleResize",bt(()=>{const t=this.linksContainerTarget,n=t.getBoundingClientRect().width-this.subtractWidthValue,r=t.querySelectorAll(this.linksItemSelectorValue),o=this.menuContainerTarget.querySelectorAll(this.menuItemSelectorValue);let a=0,l=0;r.forEach((d,m)=>{if(m>=o.length){console.error("There are more links than there are menu items.");return}const T=o[m];d.style.display="block";const c=d.getBoundingClientRect();a+=c.width,a>n?(d.style.display="none",T.style.display="block",l+=1):(d.style.display="block",T.style.display="none")}),this.menuContainerTarget.style.display=l>0?"block":"none"},100))}initialize(){console.debug("Stimulus.js - overflow-nav")}connect(){this._handleResize(),window.addEventListener("resize",this._handleResize),this._linkEls=document.querySelectorAll('link[rel="stylesheet"]'),this._linkEls.forEac
16h(t=>{t.addEventListener("load",this._handleResize)})}disconnect(){window.removeEventListener("resize",this._handleResize),this._linkEls.forEach(t=>{t.removeEventListener("load",this._handleResize)})}}u(st,"targets",["linksContainer","menuContainer"]),u(st,"values",{linksItemSelector:String,menuItemSelector:String,subtractWidth:{type:Number,default:0}});const Hc=Object.freeze(Object.defineProperty({__proto__:null,default:st},Symbol.toStringTag,{value:"Module"}));class _o extends g{initialize(){console.debug("Stimulus.js - pdf-embed")}showFullScreen(){this.element.classList.add("pdf-embed-fullscreen")}hideFullScreen(){this.element.classList.remove("pdf-embed-fullscreen")}download(e){const{url:t,filename:s}=e.params;this.downloadFile(t,s)}async downloadFile(e,t){try{const s=await fetch(e);if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);const n=await s.blob(),r=window.URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download=t,document.body.appendChild(o),o.click()}catch(s){console.error("Download failed:",s)}}}const Vc=Object.freeze(Object.defineProperty({__proto__:null,default:_o},Symbol.toStringTag,{value:"Module"}));var Ei={exports:{}};/** 17 * PDFObject v2.2.6 18 * https://github.com/pipwerks/PDFObject 19 * @license 20 * Copyright (c) 2008-2021 Philip Hutchison 21 * MIT-style license: http://pipwerks.mit-license.org/ 22 * UMD module pattern from https://github.com/umdjs/umd/blob/master/templates/returnExports.js 23 */(function(i){(function(e,t){i.exports?i.exports=t():e.PDFObject=t()})(fi,function(){if(typeof window>"u"||window.navigator===void 0||window.navigator.userAgent===void 0||window.navigator.mimeTypes===void 0)return!1;let e="2.2.6",t=window.navigator,s=window.navigator.userAgent,n="ActiveXObject"in window,r=window.Promise!==void 0,o=t.mimeTypes["application/pdf"]!==void 0,l=t.platform!==void 0&&t.platform==="MacIntel"&&t.maxTouchPoints!==void 0&&t.maxTouchPoints>1||/Mobi|Tablet|Android|iPad|iPhone/.test(s),d=!l&&t.vendor!==void 0&&/Apple/.test(t.vendor)&&/Safari/.test(s),m=!l&&/irefox/.test(s)&&s.split("rv:").length>1?parseInt(s.split("rv:")[1].split(".")[0],10)>18:!1,T=function(h){var f;try{f=new ActiveXObject(h)}catch{f=null}return f},E=!l&&(r||m||o||n&&function(){return!!(T("AcroPDF.PDF")||T("PDF.PdfCtrl"))}()),A=function(h){let f="",v;if(h){for(v in h)h.hasOwnProperty(v)&&(f+=encodeURIComponent(v)+"="+encodeURIComponent(h[v])+"&");f&&(f="#"+f,f=f.slice(0,f.length-1))}return f},_=function(h,f){return f||console.log("[PDFObject] "+h),!1},O=function(h){for(;h.firstChild;)h.removeChild(h.firstChild)},k=function(h){let f=document.body;return typeof h=="string"?f=document.querySelector(h):window.jQuery!==void 0&&h instanceof jQuery&&h.length?f=h.get(0):h.nodeType!==void 0&&h.nodeType===1&&(f=h),f},P=function(h,f,v,G,w,W){O(h);let R=G+"?file="+encodeURIComponent(f)+v,B=document.createElement("div"),I=document.createElement("iframe");return I.src=R,I.className="pdfobject",I.type="application/pdf",I.frameborder="0",I.allow="fullscreen",w&&(I.id=w),W||(B.style.cssText="position: absolute; top: 0; right: 0; bottom: 0; left: 0;",I.style.cssText="border: none; width: 100%; height: 100%;",h.style.position="relative",h.style.overflow="auto"),B.appendChild(I),h.appendChild(B),h.classList.add("pdfobject-container"),h.getElementsByTagName("iframe")[0]},F=function(h,f,v,G,w,W,R,B,I,le){O(f);let $=document.createElement(h);if($.src=G+w,$.className="pdfobject",$.type="application/pdf",$.title=I,B&&($.id=B),h==="iframe"&&($.allow="fullscreen"),!le){let X=h==="embed"?"overflow: auto;":"border: none;";v&&v!==document.body?X+="width: "+W+"; height: "+R+";":X+="position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;",$.style.cssText=X}return f.classList.add("pdfobject-container"),f.appendChild($),f.getElementsByTagName(h)[0]},S=function(h,f,v){let G=f||!1,w=v||{},W=typeof w.id=="string"?w.id:"",R=w.page||!1,B=w.pdfOpenParams||{},I=w.fallbackLink||!0,le=w.width||"100%",$=w.height||"100%",X=w.title||"Embedded PDF",b=typeof w.assumptionMode=="boolean"?w.assumptionMode:!0,p=typeof w.forcePDFJS=="boolean"?w.forcePDFJS:!1,M=typeof w.supportRedirect=="boolean"?w.supportRedirect:!1,y=typeof w.omitInlineStyles=="boolean"?w.omitInlineStyles:!1,C=typeof w.suppressConsole=="boolean"?w.suppressConsole:!1,te=typeof w.forceIframe=="boolean"?w.forceIframe:!1,V=w.PDFJS_URL||!1,U=k(G),ce="",q="",fe="<p>This browser does not support inline PDFs. Please download the PDF to view it: <a href='[url]'>Download PDF</a></p>";
23return typeof h!="string"?_("URL is not valid",C):U?(R&&(B.page=R),q=A(B),p&&V?P(U,h,q,V,W,y):E||b&&!l?F(te||M||d?"iframe":"embed",U,f,h,q,le,$,W,X,y):V?P(U,h,q,V,W,y):(I&&(ce=typeof I=="string"?I:fe,U.innerHTML=ce.replace(/\[url\]/g,h)),_("This browser does not support embedded PDFs",C))):_("Target element cannot be determined",C)};return{embed:function(h,f,v){return S(h,f,v)},pdfobjectversion:function(){return e}(),supportsPDFs:function(){return E}()}})})(Ei);var So=Ei.exports;const To=Te(So),Je={"16:9":{paddingTop:16/9*100+"%"},letter:{paddingTop:11/8.5*100+"%"},a4:{paddingTop:297/210*100+"%"},square:{paddingTop:"100%"}},$t={"16:9":{paddingTop:9/16*100+"%"},letter:{paddingTop:8.5/11*100+"%"},a4:{paddingTop:210/297*100+"%"},square:{paddingTop:"100%"}};class Ao extends g{connect(){const{url:e,orientation:t,aspectRatio:s}=this.element.dataset;z(this.element,{overflow:"hidden",position:"relative",paddingTop:Je.letter});let n;t==="portrait"?n=Je[s]||Je["16:9"]:n=$t[s]||$t["16:9"],z(this.element,n),To.embed(e,this.element,{forcePDFJS:!1,PDFJS_URL:"https://mozilla.github.io/pdf.js/legacy/web/viewer.html",pdfOpenParams:{pagemode:"none"}});const r=this.element.querySelector("iframe, embed");r&&z(r,{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:"none"})}}const qc=Object.freeze(Object.defineProperty({__proto__:null,default:Ao},Symbol.toStringTag,{value:"Module"}));function Lo(){return he.isDefined("egjs-grid")||he(["https://cdn.jsdelivr.net/npm/@egjs/[email protected]/dist/grid.min.js"],"egjs-grid"),window.Grid?(console.log("Grid is already loaded."),Promise.resolve()):new Promise((i,e)=>{he.ready("egjs-grid",{success:function(){console.log("@egjs/grid is loaded."),i()},error:function(t){e(t)}})})}class Co extends g{initialize(){console.debug("Stimulus.js - picture-gallery")}connect(){Lo().then(()=>{this._onLoadEgjsGrid()})}_onLoadEgjsGrid(){const e=this.element.querySelectorAll("img"),t=Array.from(e).map(s=>new Promise(n=>{s.width&&s.height?n([s.width,s.height]):s.onload=()=>n([s.width,s.height])}));Promise.all(t).then(()=>{new Grid.JustifiedGrid(this.element,{defaultDirection:"end",gap:16,rowRange:0,columnRange:[1,4],sizeRange:[100,200],isCroppedSize:!1,displayedRow:-1,useResizeObserver:!0,observeChildren:!1}).renderItems()})}}const $c=Object.freeze(Object.defineProperty({__proto__:null,default:Co},Symbol.toStringTag,{value:"Module"}));class _i extends g{initialize(){console.debug("Stimulus.js - picture-lightbox")}openModal(e){this.modalTarget.style.display="flex",this.show(e)}show(e){e.stopPropagation();const t=e.currentTarget.dataset.pictureLightboxIndex;this.frameTargets.forEach(s=>{s.dataset.pictureLightboxIndex===t?s.style.display="flex":s.style.display="none"})}stopPropagation(e){e.stopPropagation()}closeModal(){this.modalTarget.style.display="none"}connect(){}disconnect(){}}u(_i,"targets",["modal","frame"]);const Uc=Object.freeze(Object.defineProperty({__proto__:null,default:_i},Symbol.toStringTag,{value:"Module"}));class nt extends g{constructor(){super(...arguments);u(this,"_positionBody",bt(()=>{const t=this.$anchor.getBoundingClientRect();let s={position:"fixed",top:t.top+t.height+"px"};this.transformOriginHorizontalValue==="left"?this.anchorOriginHorizontalValue==="left"?s.left=t.left+"px":s.left=t.right+"px":this.anchorOriginHorizontalValue==="left"?s.right=document.documentElement.clientWidth-t.left+"px":s.right=document.documentElement.clientWidth-t.right+"px",z(this.$body,s)},100))}initialize(){console.debug("Stimulus.js - popover2")}connect(){this._show=!1,this.$overlay=this.overlayTarget,this.$body=this.bodyTarget,this.$anchor=this.anchorTarget,window.addEventListener("resize",this._positionBody)}disconnect(){window.removeEventListener("resize",this._positionBody)}show(){this._show=!0,document.body.style.overflow="hidden",this.$overlay.style.display="block",this.$body.style.display="block",this._positionBody()}hide(){this._show=!1,document.body.style.overflow="",this.$overlay.style.display="none",this.$body.style.display="none"}}u(nt,"values",{anchorOriginHorizontal:{type:String,default:"left"},transformOriginHorizontal:{type:String,default:"left"}}),u(nt,"targets",["anchor","body","overlay"]);const zc=Object.freeze(Object.defineProperty({__proto__:null,default:nt},Symbol.toStringTag,{value:"Module"}));class ko extends g{show(){this.element.classList.add("is-active")}hide(){this.element.classList.remove("is-active")}toggle(){this.element.classList.contains("is-active")?this.hide():this.show()}}const Wc=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"}));class rt extends g{connect(){Or(this)}appear(){this.generateSvg()}
23importQrcodeGenerator(){return ve(()=>import("./qrcode-BXo_yT1o.js").then(e=>e.q),[]).then(e=>(console.log(e),e.default))}generateSvg(){this.importQrcodeGenerator().then(e=>{const t=e(4,"L");t.addData(this.textValue),t.make();const s=t.createSvgTag(10,40).replace(/width="\d+px"/,'width="100%"').replace(/height="\d+px"/,'height="100%"');this.displayTarget.innerHTML=s,this.svgButtonTarget.href=mi(s),setTimeout(()=>{this.imageButtonTarget.href=t.createDataURL(10,40)},100)})}}u(rt,"values",{text:String}),u(rt,"targets",["display","imageButton","svgButton"]);const Kc=Object.freeze(Object.defineProperty({__proto__:null,default:rt},Symbol.toStringTag,{value:"Module"}));class Si extends g{connect(){grecaptcha.render("recaptchaV2",{sitekey:this.siteKeyValue})}}u(Si,"values",{siteKey:String});const Jc=Object.freeze(Object.defineProperty({__proto__:null,default:Si},Symbol.toStringTag,{value:"Module"}));class Ti extends g{constructor(){super(...arguments);u(this,"_loadScript",()=>{if(typeof grecaptcha<"u"){console.log("Recaptcha is already loaded");return}const t=document.createElement("script"),n=`?onload=${this.renderCallbackValue}&render=${this.siteKeyValue}`;t.src="https://www.google.com/recaptcha/api.js"+n,document.body.appendChild(t)})}initialize(){console.debug("Stimulus.js - recaptcha-v3")}connect(){window.addEventListener("scroll",()=>{window.scrollY>0&&this._loadScript()},!0),this.element.addEventListener("click",this._loadScript)}}u(Ti,"values",{siteKey:String,renderCallback:String});const Gc=Object.freeze(Object.defineProperty({__proto__:null,default:Ti},Symbol.toStringTag,{value:"Module"}));class Ai extends g{initialize(){console.debug("Stimulus.js - render-react")}async connect(){const{default:e}=await ve(async()=>{const{default:t}=await import("./RenderReact-D01794dB.js").then(s=>s.d);return{default:t}},[]);this.renderReact=new e(this.element,this.componentValue,this.propsValue),this.renderReact.render()}disconnect(){var e;(e=this.renderReact)==null||e.unmount()}}u(Ai,"values",{component:String,props:String});const Xc=Object.freeze(Object.defineProperty({__proto__:null,default:Ai},Symbol.toStringTag,{value:"Module"}));var pe=typeof Reflect=="object"?Reflect:null,Ut=pe&&typeof pe.apply=="function"?pe.apply:function(e,t,s){return Function.prototype.apply.call(e,t,s)},Re;pe&&typeof pe.ownKeys=="function"?Re=pe.ownKeys:Object.getOwnPropertySymbols?Re=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Re=function(e){return Object.getOwnPropertyNames(e)};function Po(i){console&&console.warn&&console.warn(i)}var Li=Number.isNaN||function(e){return e!==e};function L(){L.init.call(this)}var Oo=L;L.EventEmitter=L;L.prototype._events=void 0;L.prototype._eventsCount=0;L.prototype._maxListeners=void 0;var zt=10;function De(i){if(typeof i!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof i)}Object.defineProperty(L,"defaultMaxListeners",{enumerable:!0,get:function(){return zt},set:function(i){if(typeof i!="number"||i<0||Li(i))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+i+".");zt=i}});L.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};L.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||Li(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function Ci(i){return i._maxListeners===void 0?L.defaultMaxListeners:i._maxListeners}L.prototype.getMaxListeners=function(){return Ci(this)};L.prototype.emit=function(e){for(var t=[],s=1;s<arguments.length;s++)t.push(arguments[s]);var n=e==="error",r=this._events;if(r!==void 0)n=n&&r.error===void 0;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=r[e];if(l===void 0)return!1;if(typeof l=="function")Ut(l,this,t);else for(var d=l.length,m=Mi(l,d),s=0;s<d;++s)Ut(m[s],this,t);return!0};function ki(i,e,t,s){var n,r,o;
23if(De(t),r=i._events,r===void 0?(r=i._events=Object.create(null),i._eventsCount=0):(r.newListener!==void 0&&(i.emit("newListener",e,t.listener?t.listener:t),r=i._events),o=r[e]),o===void 0)o=r[e]=t,++i._eventsCount;else if(typeof o=="function"?o=r[e]=s?[t,o]:[o,t]:s?o.unshift(t):o.push(t),n=Ci(i),n>0&&o.length>n&&!o.warned){o.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=i,a.type=e,a.count=o.length,Po(a)}return i}L.prototype.addListener=function(e,t){return ki(this,e,t,!1)};L.prototype.on=L.prototype.addListener;L.prototype.prependListener=function(e,t){return ki(this,e,t,!0)};function Ro(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Pi(i,e,t){var s={fired:!1,wrapFn:void 0,target:i,type:e,listener:t},n=Ro.bind(s);return n.listener=t,s.wrapFn=n,n}L.prototype.once=function(e,t){return De(t),this.on(e,Pi(this,e,t)),this};L.prototype.prependOnceListener=function(e,t){return De(t),this.prependListener(e,Pi(this,e,t)),this};L.prototype.removeListener=function(e,t){var s,n,r,o,a;if(De(t),n=this._events,n===void 0)return this;if(s=n[e],s===void 0)return this;if(s===t||s.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,s.listener||t));else if(typeof s!="function"){for(r=-1,o=s.length-1;o>=0;o--)if(s[o]===t||s[o].listener===t){a=s[o].listener,r=o;break}if(r<0)return this;r===0?s.shift():Mo(s,r),s.length===1&&(n[e]=s[0]),n.removeListener!==void 0&&this.emit("removeListener",e,a||t)}return this};L.prototype.off=L.prototype.removeListener;L.prototype.removeAllListeners=function(e){var t,s,n;if(s=this._events,s===void 0)return this;if(s.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):s[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete s[e]),this;if(arguments.length===0){var r=Object.keys(s),o;for(n=0;n<r.length;++n)o=r[n],o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=s[e],typeof t=="function")this.removeListener(e,t);else if(t!==void 0)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this};function Oi(i,e,t){var s=i._events;if(s===void 0)return[];var n=s[e];return n===void 0?[]:typeof n=="function"?t?[n.listener||n]:[n]:t?xo(n):Mi(n,n.length)}L.prototype.listeners=function(e){return Oi(this,e,!0)};L.prototype.rawListeners=function(e){return Oi(this,e,!1)};L.listenerCount=function(i,e){return typeof i.listenerCount=="function"?i.listenerCount(e):Ri.call(i,e)};L.prototype.listenerCount=Ri;function Ri(i){var e=this._events;if(e!==void 0){var t=e[i];if(typeof t=="function")return 1;if(t!==void 0)return t.length}return 0}L.prototype.eventNames=function(){return this._eventsCount>0?Re(this._events):[]};function Mi(i,e){for(var t=new Array(e),s=0;s<e;++s)t[s]=i[s];return t}function Mo(i,e){for(;e+1<i.length;e++)i[e]=i[e+1];i.pop()}function xo(i){for(var e=new Array(i.length),t=0;t<e.length;++t)e[t]=i[t].listener||i[t];return e}const Fo=Te(Oo);(function(){if(window.Reflect===void 0||window.customElements===void 0||window.customElements.polyfillWrapFlushCallback)return;const i=HTMLElement,e={HTMLElement:function(){return Reflect.construct(i,[],this.constructor)}};window.HTMLElement=e.HTMLElement,HTMLElement.prototype=i.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,i)})();(function(i){if(typeof i.requestSubmit=="function")return;i.requestSubmit=function(s){s?(e(s,this),s.click()):(s=document.createElement("input"),s.type="submit",s.hidden=!0,this.appendChild(s),s.click(),this.removeChild(s))};function e(s,n){s instanceof HTMLElement||t(TypeError,"parameter 1 is not of type 'HTMLElement'"),s.type=="submit"||t(TypeError,"The specified element is not a submit button"),s.form==n||t(DOMException,"The specified element is not owned by this form element","NotFoundError")}function t(s,n,r){throw new s("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+n+".",r)}})(HTMLFormElement.prototype);const xi=new WeakMap;function Io(i){const e=i instanceof Element?i:i instanceof Node?i.parentElement:null,t=e?e.closest("input, button"):null;return(t==null?void 0:t.type)=="submit"?t:null}function jo(i){const e=Io(i.target);e&&e.form&&xi.set(e.form,e)}(function(){if("submitter"in Event.prototype)return;let i=window.Event.prototype;if("SubmitEvent"in window&&/Apple Computer/.test(navigator.vendor))i=window.SubmitEvent.prototype;else if("SubmitEvent"in window)return;
23addEventListener("click",jo,!0),Object.defineProperty(i,"submitter",{get(){if(this.type=="submit"&&this.target instanceof HTMLFormElement)return xi.get(this.target)}})})();var oe;(function(i){i.eager="eager",i.lazy="lazy"})(oe||(oe={}));class ee extends HTMLElement{static get observedAttributes(){return["disabled","complete","loading","src"]}constructor(){super(),this.loaded=Promise.resolve(),this.delegate=new ee.delegateConstructor(this)}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){e=="loading"?this.delegate.loadingStyleChanged():e=="complete"?this.delegate.completeChanged():e=="src"?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get loading(){return No(this.getAttribute("loading")||"")}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var e,t;return(t=(e=this.ownerDocument)===null||e===void 0?void 0:e.documentElement)===null||t===void 0?void 0:t.hasAttribute("data-turbo-preview")}}function No(i){switch(i.toLowerCase()){case"lazy":return oe.lazy;default:return oe.eager}}function N(i){return new URL(i.toString(),document.baseURI)}function de(i){let e;if(i.hash)return i.hash.slice(1);if(e=i.href.match(/#(.*)$/))return e[1]}function vt(i,e){const t=(e==null?void 0:e.getAttribute("formaction"))||i.getAttribute("action")||i.action;return N(t)}function Bo(i){return($o(i).match(/\.[^.]*$/)||[])[0]||""}function Do(i){return!!Bo(i).match(/^(?:|\.(?:htm|html|xhtml|php))$/)}function Ho(i,e){const t=Uo(e);return i.href===N(t).href||i.href.startsWith(t)}function ge(i,e){return Ho(i,e)&&Do(i)}function ot(i){const e=de(i);return e!=null?i.href.slice(0,-(e.length+1)):i.href}function Ce(i){return ot(i)}function Vo(i,e){return N(i).href==N(e).href}function qo(i){return i.pathname.split("/").slice(1)}function $o(i){return qo(i).slice(-1)[0]}function Uo(i){return zo(i.origin+i.pathname)}function zo(i){return i.endsWith("/")?i:i+"/"}class yt{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return N(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}function Se(i){if(i.getAttribute("data-turbo-eval")=="false")return i;{const e=document.createElement("script"),t=Ie("csp-nonce");return t&&(e.nonce=t),e.textContent=i.textContent,e.async=!1,Wo(e,i),e}}function Wo(i,e){for(const{name:t,value:s}of e.attributes)i.setAttribute(t,s)}function Ko(i){const e=document.createElement("template");return e.innerHTML=i,e.content}function j(i,{target:e,cancelable:t,detail:s}={}){const n=new CustomEvent(i,{cancelable:t,bubbles:!0,composed:!0,detail:s});return e&&e.isConnected?e.dispatchEvent(n):document.documentElement.dispatchEvent(n),n}function Me(){return new Promise(i=>requestAnimationFrame(()=>i()))}function Jo(){return new Promise(i=>setTimeout(()=>i(),0))}function Go(){return Promise.resolve()}function Fi(i=""){return new DOMParser().parseFromString(i,"text/html")}function Ii(i,...e){const t=Xo(i,e).replace(/^\n/,"").split(` 24`),s=t[0].match(/^\s+/),n=s?s[0].length:0;return t.map(r=>r.slice(n)).join(` 25`)}function Xo(i,e){return i.reduce((t,s,n)=>{const r=e[n]==null?"":e[n];return t+s+r},"")}function be(){return Array.from({length:36}).map((i,e)=>e==8||e==13||e==18||e==23?"-":e==14?"4":e==19?(Math.floor(Math.random()*4)+8).toString(16):Math.floor(Math.random()*15).toString(16)).join("")}function Fe(i,...e){for(const t of e.map(s=>s==null?void 0:s.getAttribute(i)))if(typeof t=="string")return t;return null}function Yo(i,...e){return e.some(t=>t&&t.hasAttribute(i))}function at(...i){for(const e of i)e.localName=="turbo-frame"&&e.setAttribute("busy",""),e.setAttribute("aria-busy","true")}function lt(...i){for(const e of i)e.localName=="turbo-frame"&&e.removeAttribute("busy"),e.removeAttribute("aria-busy")}function Zo(i,e=2e3){return new Promise(t=>{const s=()=>{i.removeEventListener("error",s),i.removeEventListener("load",s),t()};i.addEventListener("load",s,{once:!0}),i.addEventListener("error",s,{once:!0}),setTimeout(t,e)})}function ji(i){switch(i){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function Qo(i){return i=="advance"||i=="replace"||i=="restore"}
25function He(...i){const e=Fe("data-turbo-action",...i);return Qo(e)?e:null}function Ni(i){return document.querySelector(`meta[name="${i}"]`)}function Ie(i){const e=Ni(i);return e&&e.content}function ea(i,e){let t=Ni(i);return t||(t=document.createElement("meta"),t.setAttribute("name",i),document.head.appendChild(t)),t.setAttribute("content",e),t}function je(i,e){var t;if(i instanceof Element)return i.closest(e)||je(i.assignedSlot||((t=i.getRootNode())===null||t===void 0?void 0:t.host),e)}var D;(function(i){i[i.get=0]="get",i[i.post=1]="post",i[i.put=2]="put",i[i.patch=3]="patch",i[i.delete=4]="delete"})(D||(D={}));function ta(i){switch(i.toLowerCase()){case"get":return D.get;case"post":return D.post;case"put":return D.put;case"patch":return D.patch;case"delete":return D.delete}}class wt{constructor(e,t,s,n=new URLSearchParams,r=null){this.abortController=new AbortController,this.resolveRequestPromise=o=>{},this.delegate=e,this.method=t,this.headers=this.defaultHeaders,this.body=n,this.url=s,this.target=r}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){const{fetchOptions:e}=this;this.delegate.prepareRequest(this),await this.allowRequestToBeIntercepted(e);try{this.delegate.requestStarted(this);const t=await fetch(this.url.href,e);return await this.receive(t)}catch(t){if(t.name!=="AbortError")throw this.willDelegateErrorHandling(t)&&this.delegate.requestErrored(this,t),t}finally{this.delegate.requestFinished(this)}}async receive(e){const t=new yt(e);return j("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get fetchOptions(){var e;return{method:D[this.method].toUpperCase(),credentials:"same-origin",headers:this.headers,redirect:"follow",body:this.isSafe?null:this.body,signal:this.abortSignal,referrer:(e=this.delegate.referrer)===null||e===void 0?void 0:e.href}}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isSafe(){return this.method===D.get}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async allowRequestToBeIntercepted(e){const t=new Promise(n=>this.resolveRequestPromise=n);j("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&await t}willDelegateErrorHandling(e){return!j("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}}class ia{constructor(e,t){this.started=!1,this.intersect=s=>{const n=s.slice(-1)[0];n!=null&&n.isIntersecting&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class ue{static wrap(e){return typeof e=="string"?new this(Ko(e)):e}constructor(e){this.fragment=sa(e)}}ue.contentType="text/vnd.turbo-stream.html";function sa(i){for(const e of i.querySelectorAll("turbo-stream")){const t=document.importNode(e,!0);for(const s of t.templateElement.content.querySelectorAll("script"))s.replaceWith(Se(s));e.replaceWith(t)}return i}var ne;(function(i){i[i.initialized=0]="initialized",i[i.requesting=1]="requesting",i[i.waiting=2]="waiting",i[i.receiving=3]="receiving",i[i.stopping=4]="stopping",i[i.stopped=5]="stopped"})(ne||(ne={}));var re;(function(i){i.urlEncoded="application/x-www-form-urlencoded",i.multipart="multipart/form-data",i.plain="text/plain"})(re||(re={}));function na(i){switch(i.toLowerCase()){case re.multipart:return re.multipart;case re.plain:return re.plain;default:return re.urlEncoded}}class Ae{static confirmMethod(e,t,s){return Promise.resolve(confirm(e))}constructor(e,t,s,n=!1){this.state=ne.initialized,this.delegate=e,this.formElement=t,this.submitter=s,this.formData=ra(t,s),this.location=N(this.action),this.method==D.get&&la(this.location,[...this.body.entries()]),this.fetchRequest=new wt(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=n}get method(){var e;const t=((e=this.submitter)===null||e===void 0?void 0:e.getAttribute("formmethod"))||this.formElement.getAttribute("method")||"";return ta(t.toLowerCase())||D.get}get action(){var e;
25const t=typeof this.formElement.action=="string"?this.formElement.action:null;return!((e=this.submitter)===null||e===void 0)&&e.hasAttribute("formaction")?this.submitter.getAttribute("formaction")||"":this.formElement.getAttribute("action")||t||""}get body(){return this.enctype==re.urlEncoded||this.method==D.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var e;return na(((e=this.submitter)===null||e===void 0?void 0:e.getAttribute("formenctype"))||this.formElement.enctype)}get isSafe(){return this.fetchRequest.isSafe}get stringFormData(){return[...this.formData].reduce((e,[t,s])=>e.concat(typeof s=="string"?[[t,s]]:[]),[])}async start(){const{initialized:e,requesting:t}=ne,s=Fe("data-turbo-confirm",this.submitter,this.formElement);if(!(typeof s=="string"&&!await Ae.confirmMethod(s,this.formElement,this.submitter))&&this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){const{stopping:e,stopped:t}=ne;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareRequest(e){if(!e.isSafe){const t=oa(Ie("csrf-param"))||Ie("csrf-token");t&&(e.headers["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(e)&&e.acceptResponseType(ue.contentType)}requestStarted(e){var t;this.state=ne.waiting,(t=this.submitter)===null||t===void 0||t.setAttribute("disabled",""),this.setSubmitsWith(),j("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else if(this.requestMustRedirect(e)&&aa(t)){const s=new Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,s)}else this.state=ne.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){var t;this.state=ne.stopped,(t=this.submitter)===null||t===void 0||t.removeAttribute("disabled"),this.resetSubmitterText(),j("turbo:submit-end",{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}setSubmitsWith(){if(!(!this.submitter||!this.submitsWith)){if(this.submitter.matches("button"))this.originalSubmitText=this.submitter.innerHTML,this.submitter.innerHTML=this.submitsWith;else if(this.submitter.matches("input")){const e=this.submitter;this.originalSubmitText=e.value,e.value=this.submitsWith}}}resetSubmitterText(){if(!(!this.submitter||!this.originalSubmitText)){if(this.submitter.matches("button"))this.submitter.innerHTML=this.originalSubmitText;else if(this.submitter.matches("input")){const e=this.submitter;e.value=this.originalSubmitText}}}requestMustRedirect(e){return!e.isSafe&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isSafe||Yo("data-turbo-stream",this.submitter,this.formElement)}get submitsWith(){var e;return(e=this.submitter)===null||e===void 0?void 0:e.getAttribute("data-turbo-submits-with")}}function ra(i,e){const t=new FormData(i),s=e==null?void 0:e.getAttribute("name"),n=e==null?void 0:e.getAttribute("value");return s&&t.append(s,n||""),t}function oa(i){if(i!=null){const t=(document.cookie?document.cookie.split("; "):[]).find(s=>s.startsWith(i));if(t){const s=t.split("=").slice(1).join("=");return s?decodeURIComponent(s):void 0}}}function aa(i){return i.statusCode==200&&!i.redirected}function la(i,e){const t=new URLSearchParams;for(const[s,n]of e)n instanceof File||t.append(s,n);return i.search=t.toString(),i}class Ve{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return this.getElementForAnchor(e)!=null}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){const e="[inert], :disabled, [hidden], details:not([open]), dialog:not([open])";for(const t of this.element.querySelectorAll("[autofocus]"))if(t.closest(e)==null)return t;return null}get permanentElements(){return Di(this.element)}getPermanentElementById(e){return Bi(this.element,e)}getPermanentElementMapForSnapshot(e){const t={};for(const s of this.permanentElements){const{id:n}=s,r=e.getPermanentElementById(n);r&&(t[n]=[s,r])}return t}}function Bi(i,e){return i.querySelector(`#${e}[data-turbo-permanent]`)}function Di(i){return i.querySelectorAll("[id][data-turbo-permanent]")}class Et{constructor(e,t){this.started=!1,this.submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)},this.submitBubbled=s=>{if(!s.defaultPrevented){const n=s.target instanceof HTMLFormElement?s.target:void 0,r=s.submitter||void 0;n&&ca(n,r)&&ha(n,r)&&this.delegate.willSubmitForm(n,r)&&(s.preventDefault(),s.stopImmediatePropagation(),this.delegate.formSubmitted(n,r))}},this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}}function ca(i,e){return((e==null?void 0:e.getAttribute("formmethod"))||i.getAttribute("method"))!="dialog"}function ha(i,e){if(e!=null&&e.hasAttribute("formtarget")||i.hasAttribute("target")){const t=(e==null?void 0:e.getAttribute("formtarget"))||i.target;for(const s of document.getElementsByName(t))if(s instanceof HTMLIFrameElement)return!1;return!0}else return!0}class Hi{constructor(e,t){this.resolveRenderPromise=s=>{},this.resolveInterceptionPromise=s=>{},this.delegate=e,this.element=t}scrollToAnchor(e){const t=this.snapshot.getElementForAnchor(e);t?(this.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(de(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}
25async render(e){const{isPreview:t,shouldRender:s,newSnapshot:n}=e;if(s)try{this.renderPromise=new Promise(l=>this.resolveRenderPromise=l),this.renderer=e,await this.prepareToRenderSnapshot(e);const r=new Promise(l=>this.resolveInterceptionPromise=l),o={resume:this.resolveInterceptionPromise,render:this.renderer.renderElement};this.delegate.allowsImmediateRender(n,o)||await r,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(n,t),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class da extends Hi{missing(){this.element.innerHTML='<strong class="turbo-frame-error">Content missing</strong>'}get snapshot(){return new Ve(this.element)}}class Vi{constructor(e,t){this.clickBubbled=s=>{this.respondsToEventTarget(s.target)?this.clickEvent=s:delete this.clickEvent},this.linkClicked=s=>{this.clickEvent&&this.respondsToEventTarget(s.target)&&s.target instanceof Element&&this.delegate.shouldInterceptLinkClick(s.target,s.detail.url,s.detail.originalEvent)&&(this.clickEvent.preventDefault(),s.preventDefault(),this.delegate.linkClickIntercepted(s.target,s.detail.url,s.detail.originalEvent)),delete this.clickEvent},this.willVisit=s=>{delete this.clickEvent},this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}respondsToEventTarget(e){const t=e instanceof Element?e:e instanceof Node?e.parentElement:null;return t&&t.closest("turbo-frame, html")==this.element}}class qi{constructor(e,t){this.started=!1,this.clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)},this.clickBubbled=s=>{if(s instanceof MouseEvent&&this.clickEventIsSignificant(s)){const n=s.composedPath&&s.composedPath()[0]||s.target,r=this.findLinkFromClickTarget(n);if(r&&ua(r)){const o=this.getLocationForLink(r);this.delegate.willFollowLinkToLocation(r,o,s)&&(s.preventDefault(),this.delegate.followedLinkToLocation(r,o))}}},this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}findLinkFromClickTarget(e){return je(e,"a[href]:not([target^=_]):not([download])")}getLocationForLink(e){return N(e.getAttribute("href")||"")}}function ua(i){if(i.hasAttribute("target")){for(const e of document.getElementsByName(i.target))if(e instanceof HTMLIFrameElement)return!1;return!0}else return!0}class $i{constructor(e,t){this.delegate=e,this.linkInterceptor=new qi(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}willFollowLinkToLocation(e,t,s){return this.delegate.willSubmitFormLinkToLocation(e,t,s)&&e.hasAttribute("data-turbo-method")}followedLinkToLocation(e,t){const s=document.createElement("form"),n="hidden";for(const[T,c]of t.searchParams)s.append(Object.assign(document.createElement("input"),{type:n,name:T,value:c}));const r=Object.assign(t,{search:""});s.setAttribute("data-turbo","true"),s.setAttribute("action",r.href),s.setAttribute("hidden","");const o=e.getAttribute("data-turbo-method");o&&s.setAttribute("method",o);const a=e.getAttribute("data-turbo-frame");a&&s.setAttribute("data-turbo-frame",a);const l=He(e);l&&s.setAttribute("data-turbo-action",l);const d=e.getAttribute("data-turbo-confirm");d&&s.setAttribute("data-turbo-confirm",d),e.hasAttribute("data-turbo-stream")&&s.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,s),document.body.appendChild(s),s.addEventListener("turbo:submit-end",()=>s.remove(),{once:!0}),requestAnimationFrame(()=>s.requestSubmit())}}class Ui{static async preservingPermanentElements(e,t,s){const n=new this(e,t);n.enter(),await s(),n.leave()}constructor(e,t){this.delegate=e,this.permanentElementMap=t}enter(){for(const e in this.permanentElementMap){const[t,s]=this.permanentElementMap[e];this.delegate.enteringBardo(t,s),this.replaceNewPermanentElementWithPlaceholder(s)}}leave(){for(const e in this.permanentElementMap){const[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){const t=fa(e);e.replaceWith(t)}replaceCurrentPermanentElementWithClone(e){const t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){const t=this.getPlaceholderById(e.id);t==null||t.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}function fa(i){const e=document.createElement("meta");return e.setAttribute("name","turbo-permanent-placeholder"),e.setAttribute("content",i.id),e}class _t{constructor(e,t,s,n,r=!0){this.activeElement=null,this.currentSnapshot=e,this.newSnapsh
25ot=t,this.isPreview=n,this.willRender=r,this.renderElement=s,this.promise=new Promise((o,a)=>this.resolvingFunctions={resolve:o,reject:a})}get shouldRender(){return!0}get reloadReason(){}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await Ui.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){const e=this.connectedSnapshot.firstAutofocusableElement;ma(e)&&e.focus()}enteringBardo(e){this.activeElement||e.contains(this.currentSnapshot.activeElement)&&(this.activeElement=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.activeElement)&&this.activeElement instanceof HTMLElement&&(this.activeElement.focus(),this.activeElement=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}}function ma(i){return i&&typeof i.focus=="function"}class ct extends _t{static renderElement(e,t){var s;const n=document.createRange();n.selectNodeContents(e),n.deleteContents();const r=t,o=(s=r.ownerDocument)===null||s===void 0?void 0:s.createRange();o&&(o.selectNodeContents(r),e.appendChild(o.extractContents()))}constructor(e,t,s,n,r,o=!0){super(t,s,n,r,o),this.delegate=e}get shouldRender(){return!0}async render(){await Me(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await Me(),this.focusFirstAutofocusableElement(),await Me(),this.activateScriptElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){const e=this.currentElement.firstElementChild,t=pa(this.currentElement.getAttribute("data-autoscroll-block"),"end"),s=ga(this.currentElement.getAttribute("data-autoscroll-behavior"),"auto");if(e)return e.scrollIntoView({block:t,behavior:s}),!0}return!1}activateScriptElements(){for(const e of this.newScriptElements){const t=Se(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}}function pa(i,e){return i=="end"||i=="start"||i=="center"||i=="nearest"?i:e}function ga(i,e){return i=="auto"||i=="smooth"?i:e}class Q{static get defaultCSS(){return Ii` 26 .turbo-progress-bar { 27 position: fixed; 28 display: block; 29 top: 0; 30 left: 0; 31 height: 3px; 32 background: #0076ff; 33 z-index: 2147483647; 34 transition: 35 width ${Q.animationDuration}ms ease-out, 36 opacity ${Q.animationDuration/2}ms ${Q.animationDuration/2}ms ease-in; 37 transform: translate3d(0, 0, 0); 38 } 39 `}constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,Q.animationDuration*1.5)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,Q.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+this.value*90}%`})}createStylesheetElement(){const e=document.createElement("style");return e.type="text/css",e.textContent=Q.defaultCSS,this.cspNonce&&(e.nonce=this.cspNonce),e}createProgressElement(){const e=document.createElement("div");return e.className="turbo-progress-bar",e}get cspNonce(){return Ie("csp-nonce")}}Q.animationDuration=300;class ba extends Ve{constructor(){super(...arguments),this.detailsByOuterHTML=this.children.filter(e=>!Ea(e)).map(e=>Ta(e)).reduce((e,t)=>
39{const{outerHTML:s}=t,n=s in e?e[s]:{type:va(t),tracked:ya(t),elements:[]};return Object.assign(Object.assign({},e),{[s]:Object.assign(Object.assign({},n),{elements:[...n.elements,t]})})},{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(s=>!(s in t.detailsByOuterHTML)).map(s=>this.detailsByOuterHTML[s]).filter(({type:s})=>s==e).map(({elements:[s]})=>s)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{const{type:s,tracked:n,elements:r}=this.detailsByOuterHTML[t];return s==null&&!n?[...e,...r]:r.length>1?[...e,...r.slice(1)]:e},[])}getMetaValue(e){const t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,s)=>{const{elements:[n]}=this.detailsByOuterHTML[s];return Sa(n,e)?n:t},void 0)}}function va(i){if(wa(i))return"script";if(_a(i))return"stylesheet"}function ya(i){return i.getAttribute("data-turbo-track")=="reload"}function wa(i){return i.localName=="script"}function Ea(i){return i.localName=="noscript"}function _a(i){const e=i.localName;return e=="style"||e=="link"&&i.getAttribute("rel")=="stylesheet"}function Sa(i,e){return i.localName=="meta"&&i.getAttribute("name")==e}function Ta(i){return i.hasAttribute("nonce")&&i.setAttribute("nonce",""),i}class J extends Ve{static fromHTMLString(e=""){return this.fromDocument(Fi(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({head:e,body:t}){return new this(t,new ba(e))}constructor(e,t){super(e),this.headSnapshot=t}clone(){const e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),s=e.querySelectorAll("select");for(const[n,r]of t.entries()){const o=s[n];for(const a of o.selectedOptions)a.selected=!1;for(const a of r.selectedOptions)o.options[a.index].selected=!0}for(const n of e.querySelectorAll('input[type="password"]'))n.value="";return new J(e,this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var e;const t=(e=this.getSetting("root"))!==null&&e!==void 0?e:"/";return N(t)}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return this.cacheControlValue!="no-preview"}get isCacheable(){return this.cacheControlValue!="no-cache"}get isVisitable(){return this.getSetting("visit-control")!="reload"}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}var me;(function(i){i.visitStart="visitStart",i.requestStart="requestStart",i.requestEnd="requestEnd",i.visitEnd="visitEnd"})(me||(me={}));var K;(function(i){i.initialized="initialized",i.started="started",i.canceled="canceled",i.failed="failed",i.completed="completed"})(K||(K={}));const Aa={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1};var ae;(function(i){i[i.networkFailure=0]="networkFailure",i[i.timeoutFailure=-1]="timeoutFailure",i[i.contentTypeMismatch=-2]="contentTypeMismatch"})(ae||(ae={}));class La{constructor(e,t,s,n={}){this.identifier=be(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.shouldCacheSnapshot=!0,this.acceptsStreamResponse=!1,this.snapshotCached=!1,this.state=K.initialized,this.delegate=e,this.location=t,this.restorationIdentifier=s||be();const{action:r,historyChanged:o,referrer:a,snapshot:l,snapshotHTML:d,response:m,visitCachedSnapshot:T,willRender:c,updateHistory:E,shouldCacheSnapshot:A,acceptsStreamResponse:_}=Object.assign(Object.assign({},Aa),n);this.action=r,this.historyChanged=o,this.referrer=a,this.snapshot=l,this.snapshotHTML=d,this.response=m,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=T,this.willRender=c,this.updateHistory=E,this.scrolled=!c,this.shouldCacheSnapshot=A,this.acceptsStreamResponse=_}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==K.initialized&&(this.recordTimingMetric(me.visitStart),this.state=K.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==K.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=K.canceled)}complete(){this.state==K.started&&(this.recordTimingMetric(me.visitEnd),this.state=K.completed,this.followRedirect(),this.followedRedirect||(this.adapter.visitCompleted(this),this.delegate.visitCompleted(this)))}fail(){this.state==K.started&&(this.state=K.failed,this.adapter.visitFailed(this))}changeHistory(){var e;if(!this.historyChanged&&this.updateHistory){const t=this.location.href===((e=this.referrer)===null||e===void 0?void 0:e.href)?"replace":this.action,s=ji(t);this.history.update(s,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new wt(this,D.get,this.location),this.request.perform())}
39simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(me.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){const{statusCode:t}=e;Wt(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(me.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){const{statusCode:e,responseHTML:t}=this.response;this.render(async()=>{this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,Wt(e)&&t!=null?(await this.view.renderPage(J.fromHTMLString(t),!1,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),this.complete()):(await this.view.renderError(J.fromHTMLString(t),this),this.adapter.visitRendered(this),this.fail())})}}getCachedSnapshot(){const e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!de(this.location)||e.hasAnchor(de(this.location)))&&(this.action=="restore"||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return J.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return this.getCachedSnapshot()!=null}loadCachedSnapshot(){const e=this.getCachedSnapshot();if(e){const t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.view.renderPage(e,t,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){var e;this.redirectedToLocation&&!this.followedRedirect&&(!((e=this.response)===null||e===void 0)&&e.redirected)&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response,shouldCacheSnapshot:!1,willRender:!1}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(async()=>{this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)})}prepareRequest(e){this.acceptsStreamResponse&&e.acceptResponseType(ue.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){const s=await t.responseHTML,{redirected:n,statusCode:r}=t;s==null?this.recordResponse({statusCode:ae.contentTypeMismatch,redirected:n}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.recordResponse({statusCode:r,responseHTML:s,redirected:n}))}async requestFailedWithResponse(e,t){const s=await t.responseHTML,{redirected:n,statusCode:r}=t;s==null?this.recordResponse({statusCode:ae.contentTypeMismatch,redirected:n}):this.recordResponse({statusCode:r,responseHTML:s,redirected:n})}requestErrored(e,t){this.recordResponse({statusCode:ae.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){!this.scrolled&&!this.view.forceReloaded&&(this.action=="restore"?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){const{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){const e=de(this.location);if(e!=null)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=new Date().getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return typeof this.response=="object"}shouldIssueRequest(){return this.isSamePage?!1:this.action=="restore"?!this.hasCachedSnapshot():this.willRender}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(t=>{this.frame=requestAnimationFrame(()=>t())}),await e(),delete this.frame}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function Wt(i){return i>=200&&i<300}class Ca{constructor(e){this.progressBar=new Q,this.showProgressBar=()=>{this.progressBar.show()},this.session=e}visitProposedToLocation(e,t){this.navigator.startVisit(e,(t==null?void 0:t.restorationIdentifier)||be(),t)}visitStarted(e){this.location=e.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||e.action!="restore"?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,t){switch(t){case ae.networkFailure:case ae.timeoutFailure:case ae.contentTypeMismatch:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(e){}pageInvalidated(e){this.reload(e)}visitFailed(e){}visitRendered(e){}
39formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),this.visitProgressBarTimeout!=null&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){this.formProgressBarTimeout==null&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),this.formProgressBarTimeout!=null&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(e){var t;j("turbo:reload",{detail:e}),window.location.href=((t=this.location)===null||t===void 0?void 0:t.toString())||window.location.href}get navigator(){return this.session.navigator}}class ka{constructor(){this.selector="[data-turbo-temporary]",this.deprecatedSelector="[data-turbo-cache=false]",this.started=!1,this.removeTemporaryElements=e=>{for(const t of this.temporaryElements)t.remove()}}start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeTemporaryElements,!1))}get temporaryElements(){return[...document.querySelectorAll(this.selector),...this.temporaryElementsWithDeprecation]}get temporaryElementsWithDeprecation(){const e=document.querySelectorAll(this.deprecatedSelector);return e.length&&console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`),[...e]}}class Pa{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new Vi(this,t),this.formSubmitObserver=new Et(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,s){return this.shouldRedirect(e)}linkClickIntercepted(e,t,s){const n=this.findFrameElement(e);n&&n.delegate.linkClickIntercepted(e,t,s)}willSubmitForm(e,t){return e.closest("turbo-frame")==null&&this.shouldSubmit(e,t)&&this.shouldRedirect(e,t)}formSubmitted(e,t){const s=this.findFrameElement(e,t);s&&s.delegate.formSubmitted(e,t)}shouldSubmit(e,t){var s;const n=vt(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),o=N((s=r==null?void 0:r.content)!==null&&s!==void 0?s:"/");return this.shouldRedirect(e,t)&&ge(n,o)}shouldRedirect(e,t){if(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)){const n=this.findFrameElement(e,t);return n?n!=e.closest("turbo-frame"):!1}else return!1}findFrameElement(e,t){const s=(t==null?void 0:t.getAttribute("data-turbo-frame"))||e.getAttribute("data-turbo-frame");if(s&&s!="_top"){const n=this.element.querySelector(`#${s}:not([disabled])`);if(n instanceof ee)return n}}}class Oa{constructor(e){this.restorationIdentifier=be(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.onPopState=t=>{if(this.shouldHandlePopState()){const{turbo:s}=t.state||{};if(s){this.location=new URL(window.location.href);const{restorationIdentifier:n}=s;this.restorationIdentifier=n,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,n)}}},this.onPageLoad=async t=>{await Go(),this.pageLoaded=!0},this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,s=be()){const n={turbo:{restorationIdentifier:s}};e.call(history,n,"",t.href),this.location=t,this.restorationIdentifier=s}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){const{restorationIdentifier:t}=this,s=this.restorationData[t];this.restorationData[t]=Object.assign(Object.assign({},s),e)}assumeControlOfScrollRestoration(){var e;this.previousScrollRestoration||(this.previousScrollRestoration=(e=history.scrollRestoration)!==null&&e!==void 0?e:"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||document.readyState=="complete"}}class Ra{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&(ge(e,this.view.snapshot.rootLocation)?this.delegate.visitProposedToLocation(e,t):window.location.href=e.toString())}startVisit(e,t,s={}){this.stop(),this.currentVisit=new La(this,N(e),t,Object.assign({referrer:this.location},s)),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new Ae(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}formSubmissionStarted(e){typeof this.adapter.formSubmissionStarted=="function"&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){const s=await t.responseHTML;if(s){const n=e.isSafe;n||this.view.clearSnapshotCache();const{statusCode:r,redirected:o}=t,l={action:this.getActionForFormSubmission(e),shouldCacheSnapshot:n,response:{statusCode:r,responseHTML:s,redirected:o}};this.proposeVisit(t.location,l)}}}async formSubmissionFailedWithResponse(e,t){const s=await t.responseHTML;if(s){const n=J.fromHTMLString(s);t.serverError?await this.view.renderError(n,this.currentVisit):await this.view.renderPage(n,!1,!0,this.currentVisit),this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){typeof this.adapter.formSubmissionFinished=="function"&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(e,t){const s=de(e),n=de(this.view.lastRenderedLocation),r=t==="restore"&&typeof s>"u";return t!=="replace"&&ot(e)===ot(this.view.lastRenderedLocation)&&(r||s!=null&&s!==n)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrolledToSamePageLocation(e,t)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}getActionForFormSubmission({submitter:e,formElement:t}){return He(e,t)||"advance"}}var Z;(function(i){i[i.initial=0]="initial",i[i.loading=1]="loading",i[i.interactive=2]="interactive",i[i.complete=3]="complete"})(Z||(Z={}));class Ma{constructor(e){this.stage=Z.initial,this.started=!1,this.interpretReadyState=()=>{const{readyState:t}=this;t=="interactive"?this.pageIsInteractive():t=="complete"&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=e}start(){this.started||(this.stage==Z.initial&&(this.stage=Z.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==Z.loading&&(this.stage=Z.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==Z.interactive&&(this.stage=Z.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class xa{constructor(e){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}updatePosition(e){this.delegate.scrollPositionChanged(e)}}class Fa{render({fragment:e}){Ui.preservingPermanentElements(this,Ia(e),()=>document.documentElement.appendChild(e))}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}}function Ia(i){const e=Di(document.documentElement),t={};for(const s of e){const{id:n}=s;for(const r of i.querySelectorAll("turbo-stream")){const o=Bi(r.templateElement.content,n);o&&(t[n]=[s,o])}}return t}class ja{constructor(e){this.sources=new Set,this.started=!1,this.inspectFetchResponse=t=>{const s=Na(t);s&&Ba(s)&&(t.preventDefault(),this.receiveMessageResponse(s))},this.receiveMessageEvent=t=>
39{this.started&&typeof t.data=="string"&&this.receiveMessageHTML(t.data)},this.delegate=e}start(){this.started||(this.started=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}async receiveMessageResponse(e){const t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(ue.wrap(e))}}function Na(i){var e;const t=(e=i.detail)===null||e===void 0?void 0:e.fetchResponse;if(t instanceof yt)return t}function Ba(i){var e;return((e=i.contentType)!==null&&e!==void 0?e:"").startsWith(ue.contentType)}class Kt extends _t{static renderElement(e,t){const{documentElement:s,body:n}=document;s.replaceChild(t,n)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){const{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(const e of this.scriptElements){const t=e.parentNode;if(t){const s=Se(e);t.replaceChild(s,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}}class ht extends _t{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){if(!this.newSnapshot.isVisitable)return{reason:"turbo_visit_control_is_reload"};if(!this.trackedElementsAreIdentical)return{reason:"tracked_element_mismatch"}}async prepareToRender(){await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}async mergeHead(){const e=this.mergeProvisionalElements(),t=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),await e,await t}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){const e=[];for(const t of this.newHeadStylesheetElements)e.push(Zo(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(const e of this.newHeadScriptElements)document.head.appendChild(Se(e))}async mergeProvisionalElements(){const e=[...this.newHeadProvisionalElements];for(const t of this.currentHeadProvisionalElements)this.isCurrentElementInElementList(t,e)||document.head.removeChild(t);for(const t of e)document.head.appendChild(t)}isCurrentElementInElementList(e,t){for(const[s,n]of t.entries()){if(e.tagName=="TITLE"){if(n.tagName!="TITLE")continue;if(e.innerHTML==n.innerHTML)return t.splice(s,1),!0}if(n.isEqualNode(e))return t.splice(s,1),!0}return!1}removeCurrentHeadProvisionalElements(){for(const e of this.currentHeadProvisionalElements)document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(const e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(const e of this.newBodyScriptElements){const t=Se(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class Da{constructor(e){this.keys=[],this.snapshots={},this.size=e}has(e){return Ce(e)in this.snapshots}get(e){if(this.has(e)){const t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots={}}read(e){return this.snapshots[Ce(e)]}write(e,t){this.snapshots[Ce(e)]=t}touch(e){const t=Ce(e),s=this.keys.indexOf(t);s>-1&&this.keys.splice(s,1),this.keys.unshift(t),this.trim()}trim(){for(const e of this.keys.splice(this.size))delete this.snapshots[e]}}class Ha extends Hi{constructor(){super(...arguments),this.snapshotCache=new Da(10),this.lastRenderedLocation=new URL(location.href),this.forceReloaded=!1}renderPage(e,t=!1,s=!0,n){const r=new ht(this.snapshot,e,ht.renderElement,t,s);return r.shouldRender?n==null||n.changeHistory():this.forceReloaded=!0,this.render(r)}renderError(e,t){t==null||t.changeHistory();const s=new Kt(this.snapshot,e,Kt.renderElement,!1);return this.render(s)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();const{lastRenderedLocation:t}=this;await Jo();const s=e.clone();return this.snapshotCache.put(t,s),s}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}get snapshot(){return J.fromElement(this.element)}}class Va{constructor(e){this.selector="a[data-turbo-preload]",this.delegate=e}get snapshotCache(){return this.delegate.navigator.view.snapshotCache}
39start(){if(document.readyState==="loading")return document.addEventListener("DOMContentLoaded",()=>{this.preloadOnLoadLinksForView(document.body)});this.preloadOnLoadLinksForView(document.body)}preloadOnLoadLinksForView(e){for(const t of e.querySelectorAll(this.selector))this.preloadURL(t)}async preloadURL(e){const t=new URL(e.href);if(!this.snapshotCache.has(t))try{const n=await(await fetch(t.toString(),{headers:{"VND.PREFETCH":"true",Accept:"text/html"}})).text(),r=J.fromHTMLString(n);this.snapshotCache.put(t,r)}catch{}}}class qa{constructor(){this.navigator=new Ra(this),this.history=new Oa(this),this.preloader=new Va(this),this.view=new Ha(this,document.documentElement),this.adapter=new Ca(this),this.pageObserver=new Ma(this),this.cacheObserver=new ka,this.linkClickObserver=new qi(this,window),this.formSubmitObserver=new Et(this,document),this.scrollObserver=new xa(this),this.streamObserver=new ja(this),this.formLinkClickObserver=new $i(this,document.documentElement),this.frameRedirector=new Pa(this,document.documentElement),this.streamMessageRenderer=new Fa,this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1,this.formMode="on"}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){const s=t.frame?document.getElementById(t.frame):null;s instanceof ee?(s.src=e.toString(),s.loaded):this.navigator.proposeVisit(N(e),t)}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(ue.wrap(e))}clearCache(){this.view.clearSnapshotCache()}setProgressBarDelay(e){this.progressBarDelay=e}setFormMode(e){this.formMode=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(e,t){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&ge(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}willFollowLinkToLocation(e,t,s){return this.elementIsNavigatable(e)&&ge(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,s)}followedLinkToLocation(e,t){const s=this.getActionForLink(e),n=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:s,acceptsStreamResponse:n})}allowsVisitingLocationWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){Jt(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||at(document.documentElement),Jt(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){lt(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithActionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplicationAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){const s=vt(e,t);return this.submissionIsNavigatable(e,t)&&ge(N(s),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){var e;!((e=this.navigator.currentVisit)===null||e===void 0)&&e.silent||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){const s=this.notifyApplicationBeforeRender(e,t),{defaultPrevented:n,detail:{render:r}}=s;return this.view.renderer&&r&&(this.view.renderer.renderElement=r),!n}viewRenderedSnapshot(e,t){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,s){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,s).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,s){return j("turbo:click",{target:e,detail:{url:t.href,originalEvent:s},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return j("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return j("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return j("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return j("turbo:before-render",{detail:Object.assign({newBody:e},t),cancelable:!0})}notifyApplicationAfterRender(){return j("turbo:render")}notifyApplicationAfterPageLoad(e={}){return j("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationAfterFrameLoad(e){return j("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return j("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if(this.formMode=="off")return!1;{const s=t?this.elementIsNavigatable(t):!0;return this.formMode=="optin"?s&&e.closest('[data-turbo="true"]')!=null:s&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){const t=je(e,"[data-turbo]"),s=je(e,"turbo-frame");return this.drive||s?t?t.getAttribute("data-turbo")!="false":!0:t?t.getAttribute("data-turbo")=="true":!1}getActionForLink(e){return He(e)||"advance"}get snapshot(){return this.view.snapshot}}function Jt(i){Object.defineProperties(i,$a)}const $a={absoluteURL:{get(){return this.toString()}}};class Ua{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.setCacheControl("")}exemptPageFromCache(){this.setCacheControl("no-cache")}exemptPageFromPreview(){this.setCacheControl("no-preview")}setCacheControl(e){ea("turbo-cache-control",e)}}
39const zi={after(){this.targetElements.forEach(i=>{var e;return(e=i.parentElement)===null||e===void 0?void 0:e.insertBefore(this.templateContent,i.nextSibling)})},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(i=>i.append(this.templateContent))},before(){this.targetElements.forEach(i=>{var e;return(e=i.parentElement)===null||e===void 0?void 0:e.insertBefore(this.templateContent,i)})},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(i=>i.prepend(this.templateContent))},remove(){this.targetElements.forEach(i=>i.remove())},replace(){this.targetElements.forEach(i=>i.replaceWith(this.templateContent))},update(){this.targetElements.forEach(i=>{i.innerHTML="",i.append(this.templateContent)})}},x=new qa,za=new Ua(x),{navigator:Wa}=x;function Wi(){x.start()}function Ka(i){x.registerAdapter(i)}function Ki(i,e){x.visit(i,e)}function St(i){x.connectStreamSource(i)}function Tt(i){x.disconnectStreamSource(i)}function Ja(i){x.renderStreamMessage(i)}function Ga(){console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),x.clearCache()}function Xa(i){x.setProgressBarDelay(i)}function Ya(i){Ae.confirmMethod=i}function Za(i){x.setFormMode(i)}var Qa=Object.freeze({__proto__:null,navigator:Wa,session:x,cache:za,PageRenderer:ht,PageSnapshot:J,FrameRenderer:ct,start:Wi,registerAdapter:Ka,visit:Ki,connectStreamSource:St,disconnectStreamSource:Tt,renderStreamMessage:Ja,clearCache:Ga,setProgressBarDelay:Xa,setConfirmMethod:Ya,setFormMode:Za,StreamActions:zi});class el extends Error{}class tl{constructor(e){this.fetchResponseLoaded=t=>{},this.currentFetchRequest=null,this.resolveVisitPromise=()=>{},this.connected=!1,this.hasBeenLoaded=!1,this.ignoredAttributes=new Set,this.action=null,this.visitCachedSnapshot=({element:t})=>{const s=t.querySelector("#"+this.element.id);s&&this.previousFrameElement&&s.replaceChildren(...this.previousFrameElement.children),delete this.previousFrameElement},this.element=e,this.view=new da(this,this.element),this.appearanceObserver=new ia(this,this.element),this.formLinkClickObserver=new $i(this,this.element),this.linkInterceptor=new Vi(this,this.element),this.restorationIdentifier=be(),this.formSubmitObserver=new Et(this,this.element)}connect(){this.connected||(this.connected=!0,this.loadingStyle==oe.lazy?this.appearanceObserver.start():this.loadSourceURL(),this.formLinkClickObserver.start(),this.linkInterceptor.start(),this.formSubmitObserver.start())}disconnect(){this.connected&&(this.connected=!1,this.appearanceObserver.stop(),this.formLinkClickObserver.stop(),this.linkInterceptor.stop(),this.formSubmitObserver.stop())}disabledChanged(){this.loadingStyle==oe.eager&&this.loadSourceURL()}sourceURLChanged(){this.isIgnoringChangesTo("src")||(this.element.isConnected&&(this.complete=!1),(this.loadingStyle==oe.eager||this.hasBeenLoaded)&&this.loadSourceURL())}sourceURLReloaded(){const{src:e}=this.element;return this.ignoringChangesToAttribute("complete",()=>{this.element.removeAttribute("complete")}),this.element.src=null,this.element.src=e,this.element.loaded}completeChanged(){this.isIgnoringChangesTo("complete")||this.loadSourceURL()}loadingStyleChanged(){this.loadingStyle==oe.lazy?this.appearanceObserver.start():(this.appearanceObserver.stop(),this.loadSourceURL())}async loadSourceURL(){this.enabled&&this.isActive&&!this.complete&&this.sourceURL&&(this.element.loaded=this.visit(N(this.sourceURL)),this.appearanceObserver.stop(),await this.element.loaded,this.hasBeenLoaded=!0)}async loadResponse(e){(e.redirected||e.succeeded&&e.isHTML)&&(this.sourceURL=e.response.url);try{const t=await e.responseHTML;if(t){const s=Fi(t);J.fromDocument(s).isVisitable?await this.loadFrameResponse(e,s):await this.handleUnvisitableFrameResponse(e)}}finally{this.fetchResponseLoaded=()=>{}}}elementAppearedInViewport(e){this.proposeVisitIfNavigatedWithAction(e,e),this.loadSourceURL()}willSubmitFormLinkToLocation(e){return this.shouldInterceptNavigation(e)}submittedFormLinkToLocation(e,t,s){const n=this.findFrameElement(e);n&&s.setAttribute("data-turbo-frame",n.id)}shouldInterceptLinkClick(e,t,s){return this.shouldInterceptNavigation(e)}linkClickIntercepted(e,t){this.navigateFrame(e,t)}willSubmitForm(e,t){return e.closest("turbo-frame")==this.element&&this.shouldInterceptNavigation(e,t)}formSubmitted(e,t){this.formSubmission&&this.formSubmission.stop(),this.formSubmission=new Ae(this,e,t);const{fetchRequest:s}=this.formSubmission;this.prepareRequest(s),this.formSubmission.start()}prepareRequest(e){var t;e.headers["Turbo-Frame"]=this.id,!((t=this.currentNavigationElement)===null||t===void 0)&&t.hasAttribute("data-turbo-stream")&&e.acceptResponseType(ue.contentType)}requestStarted(e){at(this.element)}requestPreventedHandlingResponse(e,t){this.resolveVisitPromise()}async requestSucceededWithResponse(e,t){await this.loadResponse(t),this.resolveVisitPromise()}async requestFailedWithResponse(e,t){await this.loadResponse(t),this.resolveVisitPromise()}requestErrored(e,t){console.error(t),this.resolveVisitPromise()}requestFinished(e){lt(this.element)}formSubmissionStarted({formElement:e}){at(e,this.findFrameElement(e))}formSubmissionSucceededWithResponse(e,t){const s=this.findFrameElement(e.formElement,e.submitter);s.delegate.proposeVisitIfNavigatedWithAction(s,e.formElement,e.submitter),s.delegate.loadResponse(t),e.isSafe||x.clearCache()}formSubmissionFailedWithResponse(e,t){this.element.delegate.loadResponse(t),x.clearCache()}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished({formElement:e}){lt(e,this.findFrameElement(e))}allowsImmediateRender({element:e},t){const s=j("turbo:before-frame-render",{target:this.element,detail
39:Object.assign({newFrame:e},t),cancelable:!0}),{defaultPrevented:n,detail:{render:r}}=s;return this.view.renderer&&r&&(this.view.renderer.renderElement=r),!n}viewRenderedSnapshot(e,t){}preloadOnLoadLinksForView(e){x.preloadOnLoadLinksForView(e)}viewInvalidated(){}willRenderFrame(e,t){this.previousFrameElement=e.cloneNode(!0)}async loadFrameResponse(e,t){const s=await this.extractForeignFrameElement(t.body);if(s){const n=new Ve(s),r=new ct(this,this.view.snapshot,n,ct.renderElement,!1,!1);this.view.renderPromise&&await this.view.renderPromise,this.changeHistory(),await this.view.render(r),this.complete=!0,x.frameRendered(e,this.element),x.frameLoaded(this.element),this.fetchResponseLoaded(e)}else this.willHandleFrameMissingFromResponse(e)&&this.handleFrameMissingFromResponse(e)}async visit(e){var t;const s=new wt(this,D.get,e,new URLSearchParams,this.element);return(t=this.currentFetchRequest)===null||t===void 0||t.cancel(),this.currentFetchRequest=s,new Promise(n=>{this.resolveVisitPromise=()=>{this.resolveVisitPromise=()=>{},this.currentFetchRequest=null,n()},s.perform()})}navigateFrame(e,t,s){const n=this.findFrameElement(e,s);n.delegate.proposeVisitIfNavigatedWithAction(n,e,s),this.withCurrentNavigationElement(e,()=>{n.src=t})}proposeVisitIfNavigatedWithAction(e,t,s){if(this.action=He(s,t,e),this.action){const n=J.fromElement(e).clone(),{visitCachedSnapshot:r}=e.delegate;e.delegate.fetchResponseLoaded=o=>{if(e.src){const{statusCode:a,redirected:l}=o,d=e.ownerDocument.documentElement.outerHTML,T={response:{statusCode:a,redirected:l,responseHTML:d},visitCachedSnapshot:r,willRender:!1,updateHistory:!1,restorationIdentifier:this.restorationIdentifier,snapshot:n};this.action&&(T.action=this.action),x.visit(e.src,T)}}}}changeHistory(){if(this.action){const e=ji(this.action);x.history.update(e,N(this.element.src||""),this.restorationIdentifier)}}async handleUnvisitableFrameResponse(e){console.warn(`The response (${e.statusCode}) from <turbo-frame id="${this.element.id}"> is performing a full page visit due to turbo-visit-control.`),await this.visitResponse(e.response)}willHandleFrameMissingFromResponse(e){this.element.setAttribute("complete","");const t=e.response,s=async(r,o={})=>{r instanceof Response?this.visitResponse(r):x.visit(r,o)};return!j("turbo:frame-missing",{target:this.element,detail:{response:t,visit:s},cancelable:!0}).defaultPrevented}handleFrameMissingFromResponse(e){this.view.missing(),this.throwFrameMissingError(e)}throwFrameMissingError(e){const t=`The response (${e.statusCode}) did not contain the expected <turbo-frame id="${this.element.id}"> and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;throw new el(t)}async visitResponse(e){const t=new yt(e),s=await t.responseHTML,{location:n,redirected:r,statusCode:o}=t;return x.visit(n,{response:{redirected:r,statusCode:o,responseHTML:s}})}findFrameElement(e,t){var s;const n=Fe("data-turbo-frame",t,e)||this.element.getAttribute("target");return(s=Gt(n))!==null&&s!==void 0?s:this.element}async extractForeignFrameElement(e){let t;const s=CSS.escape(this.id);try{if(t=Xt(e.querySelector(`turbo-frame#${s}`),this.sourceURL),t)return t;if(t=Xt(e.querySelector(`turbo-frame[src][recurse~=${s}]`),this.sourceURL),t)return await t.loaded,await this.extractForeignFrameElement(t)}catch(n){return console.error(n),new ee}return null}formActionIsVisitable(e,t){const s=vt(e,t);return ge(N(s),this.rootLocation)}shouldInterceptNavigation(e,t){const s=Fe("data-turbo-frame",t,e)||this.element.getAttribute("target");if(e instanceof HTMLFormElement&&!this.formActionIsVisitable(e,t)||!this.enabled||s=="_top")return!1;if(s){const n=Gt(s);if(n)return!n.disabled}return!(!x.elementIsNavigatable(e)||t&&!x.elementIsNavigatable(t))}get id(){return this.element.id}get enabled(){return!this.element.disabled}get sourceURL(){if(this.element.src)return this.element.src}set sourceURL(e){this.ignoringChangesToAttribute("src",()=>{this.element.src=e??null})}get loadingStyle(){return this.element.loading}get isLoading(){return this.formSubmission!==void 0||this.resolveVisitPromise()!==void 0}get complete(){return this.element.hasAttribute("complete")}set complete(e){this.ignoringChangesToAttribute("complete",()=>{e?this.element.setAttribute("complete",""):this.element.removeAttribute("complete")}
39)}get isActive(){return this.element.isActive&&this.connected}get rootLocation(){var e;const t=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),s=(e=t==null?void 0:t.content)!==null&&e!==void 0?e:"/";return N(s)}isIgnoringChangesTo(e){return this.ignoredAttributes.has(e)}ignoringChangesToAttribute(e,t){this.ignoredAttributes.add(e),t(),this.ignoredAttributes.delete(e)}withCurrentNavigationElement(e,t){this.currentNavigationElement=e,t(),delete this.currentNavigationElement}}function Gt(i){if(i!=null){const e=document.getElementById(i);if(e instanceof ee)return e}}function Xt(i,e){if(i){const t=i.getAttribute("src");if(t!=null&&e!=null&&Vo(t,e))throw new Error(`Matching <turbo-frame id="${i.id}"> element has a source URL which references itself`);if(i.ownerDocument!==document&&(i=document.importNode(i,!0)),i instanceof ee)return i.connectedCallback(),i.disconnectedCallback(),i}}class At extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){var e;return(e=this.renderPromise)!==null&&e!==void 0?e:this.renderPromise=(async()=>{const t=this.beforeRenderEvent;this.dispatchEvent(t)&&(await Me(),await t.detail.render(this))})()}disconnect(){try{this.remove()}catch{}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){var e;const t=this.targetElements.flatMap(n=>[...n.children]).filter(n=>!!n.id),s=[...((e=this.templateContent)===null||e===void 0?void 0:e.children)||[]].filter(n=>!!n.id).map(n=>n.id);return t.filter(n=>s.includes(n.id))}get performAction(){if(this.action){const e=zi[this.action];if(e)return e;this.raise("unknown action")}this.raise("action attribute is missing")}get targetElements(){if(this.target)return this.targetElementsById;if(this.targets)return this.targetElementsByQuery;this.raise("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(this.firstElementChild===null){const e=this.ownerDocument.createElement("template");return this.appendChild(e),e}else if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise("first child element must be a <template> element")}get action(){return this.getAttribute("action")}get target(){return this.getAttribute("target")}get targets(){return this.getAttribute("targets")}raise(e){throw new Error(`${this.description}: ${e}`)}get description(){var e,t;return(t=((e=this.outerHTML.match(/<[^>]+>/))!==null&&e!==void 0?e:[])[0])!==null&&t!==void 0?t:"<turbo-stream>"}get beforeRenderEvent(){return new CustomEvent("turbo:before-stream-render",{bubbles:!0,cancelable:!0,detail:{newStream:this,render:At.renderElement}})}get targetElementsById(){var e;const t=(e=this.ownerDocument)===null||e===void 0?void 0:e.getElementById(this.target);return t!==null?[t]:[]}get targetElementsByQuery(){var e;const t=(e=this.ownerDocument)===null||e===void 0?void 0:e.querySelectorAll(this.targets);return t.length!==0?Array.prototype.slice.call(t):[]}}class il extends HTMLElement{constructor(){super(...arguments),this.streamSource=null}connectedCallback(){this.streamSource=this.src.match(/^ws{1,2}:/)?new WebSocket(this.src):new EventSource(this.src),St(this.streamSource)}disconnectedCallback(){this.streamSource&&Tt(this.streamSource)}get src(){return this.getAttribute("src")||""}}ee.delegateConstructor=tl;customElements.get("turbo-frame")===void 0&&customElements.define("turbo-frame",ee);customElements.get("turbo-stream")===void 0&&customElements.define("turbo-stream",At);customElements.get("turbo-stream-source")===void 0&&customElements.define("turbo-stream-source",il);(()=>{let i=document.currentScript;if(i&&!i.hasAttribute("data-turbo-suppress-warning"))for(i=i.parentElement;i;){if(i==document.body)return console.warn(Ii` 40 You are loading Turbo from a <script> element inside the <body> element. This is probably not what you meant to do! 41 42 Load your applicationâs JavaScript bundle inside the <head> element instead. <script> elements in <body> are evaluated with each page change. 43 44 For more information, see: https://turbo.hotwired.dev/handbook/building#working-with-script-elements 45 46 ââ 47 Suppress this warning by adding a "data-turbo-suppress-warning" attribute to: %s 48 `,i.outerHTML);i=i.parentElement}})();window.Turbo=Qa;Wi();let ie=null;
48const Yt=new Fo,we={connect(i){if(Bt(ie)){i();return}ve(()=>import("./index-DycvC1GJ.js"),__vite__mapDeps([0,1])).then(e=>e.connectToParent).then(e=>{console.log("connected"),ie=e({methods:{turboVisit(t){Ki(t,{action:"replace"})},activateSiteEditable:t=>{Yt.emit("activatedSiteEditable",t)}}}),Bt(i)&&i()})},events:Yt,disconnect(){console.log("disconnect"),ie==null||ie.destroy()},promise(){return ie==null?void 0:ie.promise}};class sl extends g{constructor(){super(...arguments);u(this,"_updateParentPathnameAndHash",()=>{we.promise().then(t=>{let s=location.pathname;s=s.replace(/^\/preview\/[^\/]+/,""),t.setPathname(s+location.hash)})})}initialize(){this._isActive=!1}connect(){we.connect(()=>{this._setupSiteEditables(),this._setupTurboLoad(),this._updateParentPathnameAndHash(),we.promise().then(t=>{t.isActiveSiteEditable().then(s=>{this._isActive=s,this._updateActiveStyle()})})}),we.events.on("activatedSiteEditable",t=>{this._isActive=t,this._updateActiveStyle()})}disconnect(){this._teardownSiteEditables(),this._teardownTurboLoad()}_updateActiveStyle(){this._isActive?this.element.classList.add("site-editable--active"):this.element.classList.remove("site-editable--active")}_setupSiteEditables(){this.element.querySelectorAll("[data-site-editable-id]").forEach(s=>{this._setupOverlayForEditable(s)})}_teardownSiteEditables(){this.element.querySelectorAll("[data-site-editable-id]").forEach(s=>{this._teardownOverlayForEditable(s)})}_setupOverlayForEditable(t){let s=t.querySelector(".site-editable-overlay");s||(s=document.createElement("div"),s.classList.add("site-editable-overlay"),t.dataset.siteEditableLabel&&(s.innerHTML=t.dataset.siteEditableLabel),t.appendChild(s),s.addEventListener("click",()=>{const n=t.dataset.siteEditableId;we.promise().then(r=>{r.edit(n).then(()=>{})})}))}_teardownOverlayForEditable(t){let s=t.querySelector(".site-editable-overlay");s&&s.remove()}_setupTurboLoad(){document.addEventListener("turbo:load",this._updateParentPathnameAndHash),window.addEventListener("hashchange",this._updateParentPathnameAndHash)}_teardownTurboLoad(){document.removeEventListener("turbo:load",this._updateParentPathnameAndHash),window.removeEventListener("hashchange",this._updateParentPathnameAndHash)}}const Yc=Object.freeze(Object.defineProperty({__proto__:null,default:sl},Symbol.toStringTag,{value:"Module"}));function nl(){const i=document.querySelectorAll("meta[name=turbolinks-referrer]");return i.length==0?null:i[0].getAttribute("content")}class rl extends g{constructor(){super(...arguments);u(this,"_handleClick",t=>{const s=this.element.getAttribute("href"),n=window.location.origin+s,r=nl()||document.referrer;n==r&&(t.preventDefault(),t.stopPropagation(),window.history.back())})}connect(){this.element.addEventListener("click",this._handleClick)}disconnect(){this.element.removeEventListener("click",this._handleClick)}}const Zc=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"}));class Ji extends g{constructor(){super(...arguments);u(this,"_handleScroll",bt(t=>{clearTimeout(this.scrollEndTimeoutId),this.scrollEndTimeoutId=setTimeout(this._handleScrollEnd,200),this._updateSticky()},100,{leading:!0,trailing:!0}));u(this,"_handleScrollEnd",t=>{let s=window.scrollY;const n=()=>{window.scrollY!==s?(s=window.scrollY,window.requestAnimationFrame(n)):this._updateSticky()};window.requestAnimationFrame(n)})}connect(){this._updateSticky(),window.addEventListener("scroll",this._handleScroll)}disconnect(){window.removeEventListener("scroll",this._handleScroll)}_updateSticky(){window.scrollY>this.thresholdValue?this.element.classList.add(this.classNameValue):this.element.classList.remove(this.classNameValue)}}u(Ji,"values",{className:String,threshold:{type:Number,default:0}});const Qc=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),ol={async get(i){const e=`https://www.tiktok.com/oembed?url=${i}`;return await fetch(e,{method:"GET"})}};class al extends g{connect(){const{block:e,placeholderId:t}=this.element.dataset;if(!e||!t)return;const{url:s}=JSON.parse(e);s&&(this._observer=cl(this.element,(n,r)=>{if(this._iframeAdded)return;const o=n.reduce((a,l)=>{const d=Array.from(l.addedNodes).find(m=>m.nodeName==="IFRAME");return d&&(a=d),a},void 0);o&&(this._iframeAdded=o,o.addEventListener("load",()=>{this._setupPlaceholder(),this.element.style.display="flex"}))}),ol.get(s).then(n=>n.json()).then(n=>{const r=hl(n);this._setupEmbed(r)}
48))}_setupPlaceholder(){const{placeholderId:e}=this.element.dataset,t=document.getElementById(e);t&&(t.style.display="none")}_setupEmbed(e){const t=document.createElement("script");t.src=e.scriptSrc,document.querySelector("head").appendChild(t),this.element.innerHTML=e.html}disconnect(){this._observer&&this._observer.disconnect()}}const ll={attributes:!0,characterData:!0,childList:!0,subtree:!0};function cl(i,e,t=ll){const s=new MutationObserver(e);return s.observe(i,t),s}function hl(i){const{html:e}=i,t=document.createElement("div");t.innerHTML=e;const s=t.getElementsByTagName("script")[0];return s?{scriptSrc:s.src,html:e}:null}const eh=Object.freeze(Object.defineProperty({__proto__:null,default:al},Symbol.toStringTag,{value:"Module"}));class dt extends g{initialize(){console.debug("Stimulus.js - toggle")}toggle(){this.hasElementTarget?this.elementTarget.classList.toggle("is-toggle-on"):this.element.classList.toggle("is-toggle-on")}on(){this.hasElementTarget?this.elementTarget.classList.add("is-toggle-on"):this.element.classList.add("is-toggle-on")}off(){this.hasElementTarget?this.elementTarget.classList.remove("is-toggle-on"):this.element.classList.remove("is-toggle-on")}}u(dt,"targets",["element"]),u(dt,"values",{onClass:{type:String,default:"is-toggle-on"}});const th=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"}));class dl extends g{initialize(){console.debug("Initialized Stimulus controller: turbo")}getTurboStream(e){e.preventDefault(),bi(e.target.href,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})}postTurboStream(e){e.preventDefault(),io(e.target.href,{contentType:"text/vnd.turbo-stream.html",responseKind:"turbo-stream"})}}const ih=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"})),ul=/^\/\w{1,15}\/status\/(\d+)$/,fl=/^\/(\w{1,15})$/,Ge={type:null,props:null};function ml(i){let e;try{e=new URL(i)}catch{return Ge}const t=e.hostname,s=e.pathname;if(t!=="twitter.com")return Ge;let n;return(n=s.match(ul))?{type:"tweet",props:{tweetId:n[1]}}:(n=s.match(fl))?{type:"timeline",props:{sourceType:"profile",screenName:n[1]}}:Ge}let ke=null;function pl(){return window.twttr?(console.log("Twitter Widgets is already loaded."),Promise.resolve()):ke||(ke=he(["https://platform.twitter.com/widgets.js"],"twitter-widgets",{returnPromise:!0}).then(()=>{console.log("Loaded Twitter Widgets.")}),ke)}class gl extends g{connect(){const{block:e,placeholderId:t}=this.element.dataset;if(!e||!t)return;const s=JSON.parse(e);s!=null&&s.url&&pl().then(()=>{this._onLoadTwitterWidgets(s)})}_onLoadTwitterWidgets(e){const{url:t,hide_thread:s}=e,{type:n,props:r}=ml(t);switch(n){case"tweet":{const o={conversation:s?"none":null};window.twttr.widgets.createTweet(r.tweetId,this.element,o).then(a=>{this._hidePlaceholder(),console.log(`Rendered tweet at ${t}`)})}case"timeline":window.twttr.widgets.createTimeline(r,this.element).then(o=>{this._hidePlaceholder(),console.log(`Rendered timeline at ${t}`)})}}_hidePlaceholder(){const{placeholderId:e}=this.element.dataset,t=document.getElementById(e);t&&(t.style.display="none")}}const sh=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),bl=/^\/(\d+)$/,vl=/^\/embed\/(\d+)$/;function yl(i){const e=i.hostname,t=i.pathname;if(e!=="vimeo.com")return null;let s;return(s=t.match(bl))?s[1]:null}function wl(i){const e=i.hostname,t=i.pathname;if(e!=="player.vimeo.com")return null;let s;return(s=t.match(vl))?s[1]:null}function El(i){let e;try{e=new URL(i)}catch{return null}if(!["https:","http:"].includes(e.protocol))return null;let t=null;return(t=yl(e))||(t=wl(e))?t:null}const _l=/^[A-Za-z0-9_-]{11}$/,Sl=/^\/([A-Za-z0-9_-]{11})$/,Tl=/^\/watch\/([A-Za-z0-9_-]{11})$/,Al=/^\/v\/([A-Za-z0-9_-]{11})$/,Ll=/^\/embed\/([A-Za-z0-9_-]{11})$/;function Cl(i){const e=i.hostname,t=i.pathname,s=i.searchParams;if(e!=="www.youtube.com"||!["/watch","/embed","/embed/watch","/attribution_link"].includes(t))return null;const n=s.get("v");return n&&_l.test(n)?n:null}function kl(i){const e=i.hostname,t=i.pathname;if(e!=="www.youtube.com")return null;let s;return(s=t.match(Tl))||(s=t.match(Ll))||(s=t.match(Al))?s[1]:null}function Pl(i){const e=i.hostname,t=i.pathname;if(e!=="youtu.be")return null;const s=t.match(Sl);return s?s[1]:null}function Ol(i){let e;try{e=new URL(i)}catch{return null}if(!["https:","http:"].includes(e.protocol))return null;let t=null;return(t=Cl(e))||(t=kl(e))||(t=Pl(e))?t:null}class Rl extends g{connect(){const{block:e}=this.element.dataset;if(!e)return;const{url:t}=JSON.parse(e);if(!t)return;let s,n;if(s=Ol(t))n=`https://www.youtube.com/embed/${s}`;else if(s=El(t))n=`https://player.vimeo.com/video/${s}`;else return null;z(this.element,{overflow:"hidden",position:"relative",paddingTop:"56%"});const r=document.createElement("iframe");r.src=n,r.setAttribute("allowFullScreen",!0),z(r,{position:"absolute",top:0,left:0,width:"100%",height:"100%",border:0}),this.element.appendChild(r)}}const nh=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"}));let Gi;
48async function Ml(){return Gi||Zt(xl().then(Zt))}function Zt(i){return Gi=i}async function xl(){const{createConsumer:i}=await ve(async()=>{const{createConsumer:e}=await import("./index-o9rNW36s.js");return{createConsumer:e}},[]);return i()}async function Fl(i,e){const{subscriptions:t}=await Ml();return t.create(i,e)}function ut(i){return!i||typeof i!="object"||i instanceof Date||i instanceof RegExp?i:Array.isArray(i)?i.map(ut):Object.keys(i).reduce(function(e,t){var s=t[0].toLowerCase()+t.slice(1).replace(/([A-Z]+)/g,function(n,r){return"_"+r.toLowerCase()});return e[s]=ut(i[t]),e},{})}class Il extends HTMLElement{async connectedCallback(){St(this),this.subscription=await Fl(this.channel,{received:this.dispatchMessageEvent.bind(this),connected:this.subscriptionConnected.bind(this),disconnected:this.subscriptionDisconnected.bind(this)})}disconnectedCallback(){Tt(this),this.subscription&&this.subscription.unsubscribe()}dispatchMessageEvent(e){const t=new MessageEvent("message",{data:e});return this.dispatchEvent(t)}subscriptionConnected(){this.setAttribute("connected","")}subscriptionDisconnected(){this.removeAttribute("connected")}get channel(){const e=this.getAttribute("channel"),t=this.getAttribute("signed-stream-name");return{channel:e,signed_stream_name:t,...ut({...this.dataset})}}}customElements.get("turbo-cable-stream-source")===void 0&&customElements.define("turbo-cable-stream-source",Il);function jl(i){if(i.target instanceof HTMLFormElement){const{target:e,detail:{fetchOptions:t}}=i;e.addEventListener("turbo:submit-start",({detail:{formSubmission:{submitter:s}}})=>{const n=Dl(t.body)?t.body:new URLSearchParams,r=Nl(s,n,e);/get/i.test(r)||(/post/i.test(r)?n.delete("_method"):n.set("_method",r),t.method="post")},{once:!0})}}function Nl(i,e,t){const s=Bl(i),n=e.get("_method"),r=t.getAttribute("method")||"get";return typeof s=="string"?s:typeof n=="string"?n:r}function Bl(i){return(i instanceof HTMLButtonElement||i instanceof HTMLInputElement)&&i.hasAttribute("formmethod")?i.formMethod:null}function Dl(i){return i instanceof FormData||i instanceof URLSearchParams}addEventListener("turbo:before-fetch-request",jl);var Qt=11;function Hl(i,e){var t=e.attributes,s,n,r,o,a;if(!(e.nodeType===Qt||i.nodeType===Qt)){for(var l=t.length-1;l>=0;l--)s=t[l],n=s.name,r=s.namespaceURI,o=s.value,r?(n=s.localName||n,a=i.getAttributeNS(r,n),a!==o&&(s.prefix==="xmlns"&&(n=s.name),i.setAttributeNS(r,n,o))):(a=i.getAttribute(n),a!==o&&i.setAttribute(n,o));for(var d=i.attributes,m=d.length-1;m>=0;m--)s=d[m],n=s.name,r=s.namespaceURI,r?(n=s.localName||n,e.hasAttributeNS(r,n)||i.removeAttributeNS(r,n)):e.hasAttribute(n)||i.removeAttribute(n)}}var Pe,Vl="http://www.w3.org/1999/xhtml",H=typeof document>"u"?void 0:document,ql=!!H&&"content"in H.createElement("template"),$l=!!H&&H.createRange&&"createContextualFragment"in H.createRange();function Ul(i){var e=H.createElement("template");return e.innerHTML=i,e.content.childNodes[0]}function zl(i){Pe||(Pe=H.createRange(),Pe.selectNode(H.body));var e=Pe.createContextualFragment(i);return e.childNodes[0]}function Wl(i){var e=H.createElement("body");return e.innerHTML=i,e.childNodes[0]}function Kl(i){return i=i.trim(),ql?Ul(i):$l?zl(i):Wl(i)}function Oe(i,e){var t=i.nodeName,s=e.nodeName,n,r;return t===s?!0:(n=t.charCodeAt(0),r=s.charCodeAt(0),n<=90&&r>=97?t===s.toUpperCase():r<=90&&n>=97?s===t.toUpperCase():!1)}function Jl(i,e){return!e||e===Vl?H.createElement(i):H.createElementNS(e,i)}function Gl(i,e){for(var t=i.firstChild;t;){var s=t.nextSibling;e.appendChild(t),t=s}return e}function Xe(i,e,t){i[t]!==e[t]&&(i[t]=e[t],i[t]?i.setAttribute(t,""):i.removeAttribute(t))}var ei={OPTION:function(i,e){var t=i.parentNode;if(t){var s=t.nodeName.toUpperCase();s==="OPTGROUP"&&(t=t.parentNode,s=t&&t.nodeName.toUpperCase()),s==="SELECT"&&!t.hasAttribute("multiple")&&(i.hasAttribute("selected")&&!e.selected&&(i.setAttribute("selected","selected"),i.removeAttribute("selected")),t.selectedIndex=-1)}Xe(i,e,"selected")},INPUT:function(i,e){Xe(i,e,"checked"),Xe(i,e,"disabled"),i.value!==e.value&&(i.value=e.value),e.hasAttribute("value")||i.removeAttribute("value")},TEXTAREA:function(i,e){var t=e.value;i.value!==t&&(i.value=t);var s=i.firstChild;if(s){var n=s.nodeValue;if(n==t||!t&&n==i.placeholder)return;s.nodeValue=t}},SELECT:function(i,e){if(!e.hasAttribute("multiple")){for(var t=-1,s=0,n=i.firstChild,r,o;n;
48)if(o=n.nodeName&&n.nodeName.toUpperCase(),o==="OPTGROUP")r=n,n=r.firstChild;else{if(o==="OPTION"){if(n.hasAttribute("selected")){t=s;break}s++}n=n.nextSibling,!n&&r&&(n=r.nextSibling,r=null)}i.selectedIndex=t}}},Ee=1,ti=11,ii=3,si=8;function se(){}function Xl(i){if(i)return i.getAttribute&&i.getAttribute("id")||i.id}function Yl(i){return function(t,s,n){if(n||(n={}),typeof s=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var r=s;s=H.createElement("html"),s.innerHTML=r}else s=Kl(s);else s.nodeType===ti&&(s=s.firstElementChild);var o=n.getNodeKey||Xl,a=n.onBeforeNodeAdded||se,l=n.onNodeAdded||se,d=n.onBeforeElUpdated||se,m=n.onElUpdated||se,T=n.onBeforeNodeDiscarded||se,c=n.onNodeDiscarded||se,E=n.onBeforeElChildrenUpdated||se,A=n.skipFromChildren||se,_=n.addChild||function(b,p){return b.appendChild(p)},O=n.childrenOnly===!0,k=Object.create(null),P=[];function F(b){P.push(b)}function S(b,p){if(b.nodeType===Ee)for(var M=b.firstChild;M;){var y=void 0;p&&(y=o(M))?F(y):(c(M),M.firstChild&&S(M,p)),M=M.nextSibling}}function h(b,p,M){T(b)!==!1&&(p&&p.removeChild(b),c(b),S(b,M))}function f(b){if(b.nodeType===Ee||b.nodeType===ti)for(var p=b.firstChild;p;){var M=o(p);M&&(k[M]=p),f(p),p=p.nextSibling}}f(t);function v(b){l(b);for(var p=b.firstChild;p;){var M=p.nextSibling,y=o(p);if(y){var C=k[y];C&&Oe(p,C)?(p.parentNode.replaceChild(C,p),w(C,p)):v(p)}else v(p);p=M}}function G(b,p,M){for(;p;){var y=p.nextSibling;(M=o(p))?F(M):h(p,b,!0),p=y}}function w(b,p,M){var y=o(p);y&&delete k[y],!(!M&&(d(b,p)===!1||(i(b,p),m(b),E(b,p)===!1)))&&(b.nodeName!=="TEXTAREA"?W(b,p):ei.TEXTAREA(b,p))}function W(b,p){var M=A(b),y=p.firstChild,C=b.firstChild,te,V,U,ce,q;e:for(;y;){for(ce=y.nextSibling,te=o(y);!M&&C;){if(U=C.nextSibling,y.isSameNode&&y.isSameNode(C)){y=ce,C=U;continue e}V=o(C);var fe=C.nodeType,Y=void 0;if(fe===y.nodeType&&(fe===Ee?(te?te!==V&&((q=k[te])?U===q?Y=!1:(b.insertBefore(q,C),V?F(V):h(C,b,!0),C=q):Y=!1):V&&(Y=!1),Y=Y!==!1&&Oe(C,y),Y&&w(C,y)):(fe===ii||fe==si)&&(Y=!0,C.nodeValue!==y.nodeValue&&(C.nodeValue=y.nodeValue))),Y){y=ce,C=U;continue e}V?F(V):h(C,b,!0),C=U}if(te&&(q=k[te])&&Oe(q,y))_(b,q),w(q,y);else{var $e=a(y);$e!==!1&&($e&&(y=$e),y.actualize&&(y=y.actualize(b.ownerDocument||H)),_(b,y),v(y))}y=ce,C=U}G(b,C,V);var Pt=ei[b.nodeName];Pt&&Pt(b,p)}var R=t,B=R.nodeType,I=s.nodeType;if(!O){if(B===Ee)I===Ee?Oe(t,s)||(c(t),R=Gl(t,Jl(s.nodeName,s.namespaceURI))):R=s;else if(B===ii||B===si){if(I===B)return R.nodeValue!==s.nodeValue&&(R.nodeValue=s.nodeValue),R;R=s}}if(R===s)c(t);else{if(s.isSameNode&&s.isSameNode(R))return;if(w(R,s,O),P)for(var le=0,$=P.length;le<$;le++){var X=k[P[le]];X&&h(X,X.parentNode,!1)}}return!O&&R!==t&&t.parentNode&&(R.actualize&&(R=R.actualize(t.ownerDocument||H)),t.parentNode.replaceChild(R,t)),R}}var Zl=Yl(Hl);function Ql(){const i={childrenOnly:this.hasAttribute("children-only")};this.targetElements.forEach(e=>{Zl(e,i.childrenOnly?this.templateContent:this.templateElement.innerHTML,i)})}const ec=i=>{i.morph=Ql};function Lt(i){return i.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function tc(i){return i.charAt(0).toUpperCase()+i.slice(1)}function ic(i){return i.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function qe(i){return i?i.match(/[^\s]+/g)||[]:[]}function Ct(i){try{return JSON.parse(i)}catch{return i}}var sc=Object.freeze({__proto__:null,camelize:Lt,capitalize:tc,dasherize:ic,tokenize:qe,typecast:Ct});function Xi(){const i=qe(this.getAttribute("classes"));i.length>0?this.targetElements.forEach(e=>e.classList.add(...i)):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "add_css_class"')}function Yi(){const i=this.getAttribute("attribute");i?this.targetElements.forEach(e=>e.removeAttribute(i)):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "remove_attribute"')}function Zi(){const i=qe(this.getAttribute("classes"));i.length>0?this.targetElements.forEach(e=>e.classList.remove(...i)):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "remove_css_class"')}function Qi(){const i=this.getAttribute("attribute"),e=this.getAttribute("value")||"";
48i?this.targetElements.forEach(t=>t.setAttribute(i,e)):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "set_attribute"')}function es(){const i=this.getAttribute("attribute"),e=this.getAttribute("force");if(!i){console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "toggle_attribute"');return}const t=e===null?void 0:e.toLowerCase()==="true";this.targetElements.forEach(s=>{s.toggleAttribute(i,t)})}function ts(){const i=this.getAttribute("attribute"),e=this.getAttribute("value")||"";i?this.targetElements.forEach(t=>t.dataset[Lt(i)]=e):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "set_dataset_attribute"')}function is(){const i=this.getAttribute("name"),e=Ct(this.getAttribute("value")||"");i?this.targetElements.forEach(t=>t[i]=e):console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_property"')}function ss(){const i=this.getAttribute("name"),e=this.getAttribute("value")||"";i?this.targetElements.forEach(t=>t.style[i]=e):console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_style"')}function ns(){const i=this.getAttribute("styles")||"";this.targetElements.forEach(e=>e.setAttribute("style",i))}function rs(){const i=this.getAttribute("value")||"";this.targetElements.forEach(e=>e.value=i)}function os(){const i=qe(this.getAttribute("classes"));i.length>0?this.targetElements.forEach(e=>{i.forEach(t=>e.classList.toggle(t))}):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "toggle_css_class"')}function as(){const i=this.getAttribute("from")||"",e=this.getAttribute("to")||"";i&&e?this.targetElements.forEach(t=>{t.classList.replace(i,e)||console.warn(`[TurboPower] The "${i}" CSS class provided in the "from" attribute for the "replace_css_class" action was not found on the target element. No replacements made.`,t)}):console.warn('[TurboPower] no "from" or "to" class provided for Turbo Streams operation "replace_css_class"')}function ls(i){i.add_css_class=Xi,i.remove_css_class=Zi,i.remove_attribute=Yi,i.set_attribute=Qi,i.toggle_attribute=es,i.set_dataset_attribute=ts,i.set_property=is,i.set_style=ss,i.set_styles=ns,i.set_value=rs,i.toggle_css_class=os,i.replace_css_class=as}function cs(){window.location.reload()}function hs(){const i=this.getAttribute("align-to-top"),e=this.getAttribute("block"),t=this.getAttribute("inline"),s=this.getAttribute("behavior");if(i)this.targetElements.forEach(n=>n.scrollIntoView(i==="true"));else if(e||t||s){const n={};e&&(n.block=e),t&&(n.inline=t),s&&(n.behavior=s),this.targetElements.forEach(r=>r.scrollIntoView(n))}else this.targetElements.forEach(n=>n.scrollIntoView())}function ds(){this.targetElements.forEach(i=>i.focus())}function us(){const i=this.getAttribute("title")||"";let e=document.head.querySelector("title");e||(e=document.createElement("title"),document.head.appendChild(e)),e.textContent=i}function fs(i){i.reload=cs,i.scroll_into_view=hs,i.set_focus=ds,i.set_title=us}function ms(){const i=this.getAttribute("message"),e=this.getAttribute("level")||"log";console[e](i)}function ps(){const i=JSON.parse(this.getAttribute("data")||"[]"),e=JSON.parse(this.getAttribute("columns")||"[]");console.table(i,e)}function gs(i){i.console_log=ms,i.console_table=ps}function bs(){console.warn("[TurboPower] The `invoke` Turbo Stream Action was removed from TurboPower. If you'd like to continue using this action please use the successor library instead. Read more here: https://github.com/hopsoft/turbo_boost-streams")}function vs(i){i.invoke||(i.invoke=bs)}class nc{constructor(e){this.ATTRIBUTE_TO_COOKIE_KEY_MAPPING=[["domain","Domain",!1],["path","Path",!1],["expires","Expires",!1],["max-age","Max-Age",!1],["http-only","HttpOnly",!0],["secure","Secure",!0],["same-site","SameSite",!1]],this.streamElement=e}build(){let e=`${this.streamElement.getAttribute("name")}=${this.streamElement.getAttribute("value")}`;return this.ATTRIBUTE_TO_COOKIE_KEY_MAPPING.forEach(([t,s,n])=>{const r=this.streamElement.getAttribute(t);if(r!==null){const o=n?s:`${s}=${r}`;e=`${e}; ${o}`}}),e}}function ys(){const i=this.getAttribute("cookie")||"";document.cookie=i}function ws(){const i=new nc(this);document.cookie=i.build()}function Es(i){i.set_cookie=ys,i.set_cookie_item=ws}function _s(){const i=this.getAttribute("parent");
48if(i){const e=document.querySelector(i);e?this.targetElements.forEach(t=>e.appendChild(t)):console.error(`[TurboPower] couldn't find parent element using selector "${i}" for Turbo Streams operation "graft"`)}else console.error('[TurboPower] no "parent" selector provided for Turbo Streams operation "graft"')}function Ss(){const i=this.templateContent.textContent||"";this.targetElements.forEach(e=>e.innerHTML=i)}function Ts(){const i=this.getAttribute("position")||"beforebegin",e=this.templateContent.textContent||"";this.targetElements.forEach(t=>t.insertAdjacentHTML(i,e))}function As(){const i=this.getAttribute("position")||"beforebegin",e=this.getAttribute("text")||"";this.targetElements.forEach(t=>t.insertAdjacentText(i,e))}function Ls(){const i=this.templateContent.textContent||"";this.targetElements.forEach(e=>e.outerHTML=i)}function Cs(){const i=this.getAttribute("name"),e=this.getAttribute("content")||"";if(i){let t=document.head.querySelector(`meta[name='${i}']`);t||(t=document.createElement("meta"),t.name=i,document.head.appendChild(t)),t.content=e}else console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_meta"')}function ks(){const i=this.getAttribute("text")||"";this.targetElements.forEach(e=>e.textContent=i)}function Ps(i){i.graft=_s,i.inner_html=Ss,i.insert_adjacent_html=Ts,i.insert_adjacent_text=As,i.outer_html=Ls,i.text_content=ks,i.set_meta=Cs}function Os(){const i=this.getAttribute("name");let e=null;try{e=this.templateContent.textContent}catch{}try{const t=e?JSON.parse(e):{};if(i){const s={bubbles:!0,cancelable:!0,detail:t},n=new CustomEvent(i,s);this.targetElements.forEach(r=>r.dispatchEvent(n))}else console.warn('[TurboPower] no "name" provided for Turbo Streams operation "dispatch_event"')}catch(t){console.error(`[TurboPower] error proccessing provided "detail" in "<template>" ("${e}") for Turbo Streams operation "dispatch_event".`,`Error: "${t.message}"`)}}function Rs(i){i.dispatch_event=Os}function Ms(){this.targetElements.forEach(i=>i.reset())}function xs(i){i.reset_form=Ms}function Fs(){const i=this.getAttribute("url"),e=this.getAttribute("state"),t=this.getAttribute("title")||"";window.history.pushState(e,t,i)}function Is(){const i=this.getAttribute("url"),e=this.getAttribute("state"),t=this.getAttribute("title")||"";window.history.replaceState(e,t,i)}function js(){window.history.back()}function rc(){window.history.forward()}function Ns(){const i=Number(this.getAttribute("delta"))||0;window.history.go(i)}function Bs(i){i.push_state=Fs,i.replace_state=Is,i.history_back=js,i.history_go=Ns}const oc=["dir","lang","badge","body","tag","icon","image","data","vibrate","renotify","require-interaction","actions","silent"],ni=i=>{const e=i.getAttribute("title")||"",t=Array.from(i.attributes).filter(n=>oc.includes(n.name)).map(n=>[Lt(n.name),Ct(n.value)]),s=Object.fromEntries(t);new Notification(e,s)};function Ds(){window.Notification?Notification.permission==="granted"?ni(this):Notification.permission!=="denied"&&Notification.requestPermission().then(i=>{i==="granted"&&ni(this)}):alert("This browser does not support desktop notification")}function Hs(i){i.notification=Ds}function kt(i){return i==="session"?window.sessionStorage:window.localStorage}function Vs(){const i=this.getAttribute("type");kt(i).clear()}function qs(){const i=this.getAttribute("key"),e=this.getAttribute("value")||"",t=this.getAttribute("type");i?kt(t).setItem(i,e):console.warn('[TurboPower] no "key" provided for Turbo Streams operation "set_storage_item"')}function $s(){const i=this.getAttribute("key"),e=this.getAttribute("type");i?kt(e).removeItem(i):console.warn('[TurboPower] no "key" provided for Turbo Streams operation "remove_storage_item"')}function Us(i){i.clear_storage=Vs,i.set_storage_item=qs,i.remove_storage_item=$s}var ac={get location(){return window.TurboPowerLocation||window.location}};function zs(){const i=this.getAttribute("url")||"/",e=this.getAttribute("turbo-action")||"advance",t=this.getAttribute("turbo-frame"),s=this.getAttribute("turbo")!=="false",n={action:e};t&&(n.frame=t),s&&window.Turbo?window.Turbo.visit(i,n):ac.location.assign(i)}function Ws(){window.Turbo.cache.clear()}function Ks(i){i.redirect_to=zs,i.turbo_clear_cache=Ws}function Js(){const i=this.getAttribute("value")||0;window.Turbo.navigator.adapter.progressBar.setValue(Number(i))}function Gs(){window.Turbo.navigator.adapter.progressBar.show()}function Xs(){window.Turbo.navigator.adapter.progressBar.hide()}function Ys(i){i.turbo_progress_bar_set_value=Js,i.turbo_progress_bar_show=Gs,i.turbo_progress_bar_hide=Xs}
48function Zs(){this.targetElements.forEach(i=>i.reload())}function Qs(){const i=this.getAttribute("src");this.targetElements.forEach(e=>e.src=i)}function en(i){i.turbo_frame_reload=Zs,i.turbo_frame_set_src=Qs}function tn(i){ls(i),fs(i),gs(i),vs(i),Es(i),Ps(i),Rs(i),xs(i),Bs(i),Hs(i),Us(i),Ks(i),Ys(i),en(i)}var lc=Object.freeze({__proto__:null,add_css_class:Xi,clear_storage:Vs,console_log:ms,console_table:ps,dispatch_event:Os,graft:_s,history_back:js,history_forward:rc,history_go:Ns,inner_html:Ss,insert_adjacent_html:Ts,insert_adjacent_text:As,invoke:bs,notification:Ds,outer_html:Ls,push_state:Fs,redirect_to:zs,register:tn,registerAttributesActions:ls,registerBrowserActions:fs,registerDOMActions:Ps,registerDebugActions:gs,registerDeprecatedActions:vs,registerDocumentActions:Es,registerEventsActions:Rs,registerFormActions:xs,registerHistoryActions:Bs,registerNotificationActions:Hs,registerStorageActions:Us,registerTurboActions:Ks,registerTurboFrameActions:en,registerTurboProgressBarActions:Ys,reload:cs,remove_attribute:Yi,remove_css_class:Zi,remove_storage_item:$s,replace_css_class:as,replace_state:Is,reset_form:Ms,scroll_into_view:hs,set_attribute:Qi,set_cookie:ys,set_cookie_item:ws,set_dataset_attribute:ts,set_focus:ds,set_meta:Cs,set_property:is,set_storage_item:qs,set_style:ss,set_styles:ns,set_title:us,set_value:rs,text_content:ks,toggle_attribute:es,toggle_css_class:os,turbo_clear_cache:Ws,turbo_frame_reload:Zs,turbo_frame_set_src:Qs,turbo_progress_bar_hide:Xs,turbo_progress_bar_set_value:Js,turbo_progress_bar_show:Gs});function cc(i){ec(i),tn(i)}function hc(i,e,t){t[i]=e}var rh={initialize:cc,register:hc,Actions:lc,Utils:sc},dc=/^(?:.*?(?:controllers|components)\/|\.?\.\/)?(.+)(?:[_-]controller\..+?)$/;function oh(i,e){i.load(uc(e))}function uc(i){return Object.entries(i).map(fc).filter(e=>e)}function fc([i,e]){const t=mc(i),s=e.default;if(t&&typeof s=="function")return{identifier:t,controllerConstructor:s}}function mc(i){const e=(i.match(dc)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}export{xe as $,di as A,Wc as B,Kc as C,Jc as D,Gc as E,Xc as F,Yc as G,Zc as H,Qc as I,eh as J,th as K,ih as L,sh as M,nh as N,Te as O,he as P,ve as Q,io as R,zi as S,fi as T,Bt as U,bi as V,Ac as W,we as X,Ur as Y,Fr as Z,vc as _,yc as a,uo as a0,ol as a1,ml as a2,El as a3,Ol as a4,$r as a5,Mr as a6,Fo as a7,bc as a8,Gr as a9,wc as b,Ec as c,_c as d,Lc as e,Cc as f,kc as g,Pc as h,rh as i,Oc as j,Rc as k,Mc as l,xc as m,Fc as n,Ic as o,jc as p,Nc as q,oh as r,Bc as s,Dc as t,Hc as u,Vc as v,qc as w,$c as x,Uc as y,zc as z};
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.