ariadne_view_components 0.0.96.12 → 0.0.96.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/app/assets/javascripts/ariadne_view_components.js +14 -14
- data/app/assets/javascripts/ariadne_view_components.js.br +0 -0
- data/app/assets/javascripts/ariadne_view_components.js.gz +0 -0
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/stylesheets/ariadne_view_components.css +1 -1
- data/app/assets/stylesheets/ariadne_view_components.css.br +0 -0
- data/app/assets/stylesheets/ariadne_view_components.css.gz +0 -0
- data/app/components/ariadne/form/label_helper.rb +2 -4
- data/app/components/ariadne/form/select/component.rb +3 -7
- data/app/components/ariadne/form/text_field/component.rb +36 -62
- data/lib/ariadne/view_components/version.rb +1 -1
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
class mi{constructor(t,e,{tabInsertsSuggestions:s,defaultFirstOption:i,scrollIntoViewOptions:r}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=s??!0,this.defaultFirstOption=i??!1,this.scrollIntoViewOptions=r??{block:"nearest",inline:"nearest"},this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=o=>pi(o,this),this.compositionEventHandler=o=>vi(o,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",fn),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",fn)}indicateDefaultOption(){var t;this.defaultFirstOption&&((t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(ge)[0])===null||t===void 0||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(ge)[0],s=Array.from(this.list.querySelectorAll('[role="option"]')).filter(ge),i=s.indexOf(e);if(i===s.length-1&&t===1||i===0&&t===-1){this.clearSelection(),this.input.focus();return}let r=t===1?0:s.length-1;if(e&&i>=0){const a=i+t;a>=0&&a<s.length&&(r=a)}const o=s[r];if(o)for(const a of s)a.removeAttribute("data-combobox-option-default"),o===a?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),bi(o),o.scrollIntoView(this.scrollIntoViewOptions)):a.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function pi(n,t){if(!(n.shiftKey||n.metaKey||n.altKey)&&!(!t.ctrlBindings&&n.ctrlKey)&&!t.isComposing)switch(n.key){case"Enter":mn(t.input,t.list)&&n.preventDefault();break;case"Tab":t.tabInsertsSuggestions&&mn(t.input,t.list)&&n.preventDefault();break;case"Escape":t.clearSelection();break;case"ArrowDown":t.navigate(1),n.preventDefault();break;case"ArrowUp":t.navigate(-1),n.preventDefault();break;case"n":t.ctrlBindings&&n.ctrlKey&&(t.navigate(1),n.preventDefault());break;case"p":t.ctrlBindings&&n.ctrlKey&&(t.navigate(-1),n.preventDefault());break;default:if(n.ctrlKey)break;t.clearSelection()}}function fn(n){if(!(n.target instanceof Element))return;const t=n.target.closest('[role="option"]');t&&t.getAttribute("aria-disabled")!=="true"&&gi(t,{event:n})}function mn(n,t){const e=t.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return e?(e.getAttribute("aria-disabled")==="true"||e.click(),!0):!1}function gi(n,t){n.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:t}))}function bi(n){n.dispatchEvent(new Event("combobox-select",{bubbles:!0}))}function ge(n){return!n.hidden&&!(n instanceof HTMLInputElement&&n.type==="hidden")&&(n.offsetWidth>0||n.offsetHeight>0)}function vi(n,t){t.isComposing=n.type==="compositionstart",document.getElementById(t.input.getAttribute("aria-controls")||"")&&t.clearSelection()}function yi(n,t=0){let e;return function(...s){clearTimeout(e),e=window.setTimeout(()=>{clearTimeout(e),n(...s)},t)}}const wi=window.testScreenReaderDelay||100;class Ei{constructor(t,e,s,i=!1){var r;if(this.container=t,this.input=e,this.results=s,this.combobox=new mi(e,s,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=s.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const o=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(o==null?void 0:o.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.popover?this.results.matches(":popover-open")&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=yi(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),(r=this.clearButton)===null||r===void 0||r.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),this.input.getAttribute("aria-expanded")==="true"&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.close()}onKeydown(t){if(t.key==="Escape"&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&t.key==="ArrowUp"&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&t.key==="ArrowDown"&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement)||(this.close(),e instanceof HTMLAnchorElement))return;const s=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=s,s||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout(()=>{this.feedback&&(this.feedback.textContent=t)},wi)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty){this.close();return}const e=this.container.src;if(!e)return;const s=new URL(e,window.location.href),i=new URLSearchParams(s.search.slice(1));i.append("q",t),s.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(s).then(r=>{this.results.innerHTML=r,this.identifyOptions(),this.combobox.indicateDefaultOption();const o=this.results.querySelectorAll('[role="option"]'),a=!!o.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,l=o.length,[c]=o,u=c==null?void 0:c.textContent;this.autoselectEnabled&&u?this.updateFeedbackForScreenReaders(`${l} results. ${u} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${l||"No"} results.`),a?this.open():this.close(),this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))}).catch(()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))})}open(){(this.results.popover?!this.results.matches(":popover-open"):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(":popover-open"):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}}var Y=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},be=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},Ti=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(e[s[i]]=n[s[i]]);return e},ft,kt,Lt,_t,Zt;const Ai=globalThis.HTMLElement||null;class xi extends Event{constructor(t,e){var{relatedTarget:s}=e,i=Ti(e,["relatedTarget"]);super(t,i),this.relatedTarget=s}}const J=new WeakMap;let ve=null;class Oi extends Ai{constructor(){super(...arguments),ft.add(this),kt.set(this,null),Lt.set(this,null),Zt.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){ve=t===null?t:Promise.resolve(t)}get forElement(){var t;if(!((t=Y(this,kt,"f"))===null||t===void 0)&&t.isConnected)return Y(this,kt,"f");const e=this.getAttribute("for"),s=this.getRootNode();return e&&(s instanceof Document||s instanceof ShadowRoot)?s.getElementById(e):null}set forElement(t){be(this,kt,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return!((t=Y(this,Lt,"f"))===null||t===void 0)&&t.isConnected?Y(this,Lt,"f"):this.querySelector("input")}set inputElement(t){be(this,Lt,t,"f"),Y(this,ft,"m",_t).call(this)}connectedCallback(){this.isConnected&&(Y(this,ft,"m",_t).call(this),new MutationObserver(()=>{J.get(this)||Y(this,ft,"m",_t).call(this)}).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=J.get(this);t&&(t.destroy(),J.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;(e=Y(this,Zt,"f"))===null||e===void 0||e.abort();const{signal:s}=be(this,Zt,new AbortController,"f"),i=await fetch(t.toString(),{signal:s,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());return ve?(await ve).createHTML(await i.text(),i):await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,s){var i,r;if(e===s)return;const o=J.get(this);if(o)switch((this.forElement!==((i=J.get(this))===null||i===void 0?void 0:i.results)||this.inputElement!==((r=J.get(this))===null||r===void 0?void 0:r.input))&&Y(this,ft,"m",_t).call(this),t){case"open":s===null?o.close():o.open();break;case"value":s!==null&&(o.input.value=s),this.dispatchEvent(new xi("auto-complete-change",{bubbles:!0,relatedTarget:o.input}));break}}}kt=new WeakMap,Lt=new WeakMap,Zt=new WeakMap,ft=new WeakSet,_t=function(){var t;(t=J.get(this))===null||t===void 0||t.destroy();const{forElement:e,inputElement:s}=this;if(!e||!s)return;const i=this.getAttribute("data-autoselect")==="true";J.set(this,new Ei(this,s,e,i)),e.setAttribute("role","listbox")};const ye=typeof globalThis<"u"?globalThis:window;try{ye.AutocompleteElement=ye.AutoCompleteElement=Oi.define()}catch(n){if(!(ye.DOMException&&n instanceof DOMException&&n.name==="NotSupportedError")&&!(n instanceof ReferenceError))throw n}class ke extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const s=[V(t,"compositionstart",i=>yn(this,i)),V(t,"compositionend",i=>yn(this,i)),V(t,"click",i=>bn(t,i)),V(t,"change",i=>bn(t,i)),V(t,"keydown",i=>_i(t,this,i)),V(t,"toggle",()=>pn(t,this),{once:!0}),V(t,"toggle",()=>Ci(t)),this.preload?V(t,"mouseover",()=>pn(t,this),{once:!0}):Si,...Mi(t)];gt.set(this,{subscriptions:s,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=gt.get(this);if(t){gt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const gt=new WeakMap,Si={unsubscribe(){}};function V(n,t,e,s=!1){return n.addEventListener(t,e,s),{unsubscribe:()=>{n.removeEventListener(t,e,s)}}}function pn(n,t){const e=t.getAttribute("src");if(!e)return;const s=gt.get(t);if(!s||s.loaded)return;s.loaded=!0;const i=t.querySelector("include-fragment");i&&!i.hasAttribute("src")&&(i.addEventListener("loadend",()=>ms(n)),i.setAttribute("src",e))}function Mi(n){let t=!1;const e=()=>t=!0,s=()=>t=!1,i=()=>{n.hasAttribute("open")&&(ms(n)||t||ki(n))};return[V(n,"mousedown",e),V(n,"keydown",s),V(n,"toggle",i)]}function Ci(n){if(n.hasAttribute("open"))for(const t of document.querySelectorAll("details[open] > details-menu")){const e=t.closest("details");e&&e!==n&&!e.contains(n)&&e.removeAttribute("open")}}function ms(n){if(!n.hasAttribute("open"))return!1;const t=n.querySelector("details-menu [autofocus]");return t?(t.focus(),!0):!1}function ki(n){const t=document.activeElement;if(t&&ps(t)&&n.contains(t))return;const e=Dt(n,!0);e&&e.focus()}function Dt(n,t){const e=Array.from(n.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),s=document.activeElement,i=s instanceof HTMLElement?e.indexOf(s):-1,r=t?e[i+1]:e[i-1],o=t?e[0]:e[e.length-1];return r||o}const gn=navigator.userAgent.match(/Macintosh/);function bn(n,t){const e=t.target;if(e instanceof Element&&e.closest("details")===n){if(t.type==="click"){const s=e.closest('[role="menuitem"], [role="menuitemradio"]');if(!s)return;const i=s.querySelector("input");if(s.tagName==="LABEL"&&e===i)return;s.tagName==="LABEL"&&i&&!i.checked||vn(s,n)}else if(t.type==="change"){const s=e.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');s&&vn(s,n)}}}function Li(n,t){for(const e of t.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const s=e.querySelector('input[type="radio"], input[type="checkbox"]');let i=(e===n).toString();s instanceof HTMLInputElement&&(i=s.indeterminate?"mixed":s.checked.toString()),e.setAttribute("aria-checked",i)}}function vn(n,t){if(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true")return;const e=n.closest("details-menu");!e||!e.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:n}}))||(Di(n,t),Li(n,t),n.getAttribute("role")!=="menuitemcheckbox"&&gs(t),e.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:n}})))}function _i(n,t,e){if(!(e instanceof KeyboardEvent)||n.querySelector("details[open]"))return;const s=gt.get(t);if(!s||s.isComposing)return;const i=e.target instanceof Element&&e.target.tagName==="SUMMARY";switch(e.key){case"Escape":n.hasAttribute("open")&&(gs(n),e.preventDefault(),e.stopPropagation());break;case"ArrowDown":{i&&!n.hasAttribute("open")&&n.setAttribute("open","");const r=Dt(n,!0);r&&r.focus(),e.preventDefault()}break;case"ArrowUp":{i&&!n.hasAttribute("open")&&n.setAttribute("open","");const r=Dt(n,!1);r&&r.focus(),e.preventDefault()}break;case"n":if(gn&&e.ctrlKey){const r=Dt(n,!0);r&&r.focus(),e.preventDefault()}break;case"p":if(gn&&e.ctrlKey){const r=Dt(n,!1);r&&r.focus(),e.preventDefault()}break;case" ":case"Enter":{const r=document.activeElement;r instanceof HTMLElement&&ps(r)&&r.closest("details")===n&&(e.preventDefault(),e.stopPropagation(),r.click())}break}}function ps(n){const t=n.getAttribute("role");return t==="menuitem"||t==="menuitemcheckbox"||t==="menuitemradio"}function gs(n){if(!n.hasAttribute("open"))return;n.removeAttribute("open");const e=n.querySelector("summary");e&&e.focus()}function Di(n,t){const e=t.querySelector("[data-menu-button]");if(!e)return;const s=Fi(n);if(s)e.textContent=s;else{const i=Bi(n);i&&(e.innerHTML=i)}}function Fi(n){if(!n)return null;const t=n.hasAttribute("data-menu-button-text")?n:n.querySelector("[data-menu-button-text]");return t?t.getAttribute("data-menu-button-text")||t.textContent:null}function Bi(n){if(!n)return null;const t=n.hasAttribute("data-menu-button-contents")?n:n.querySelector("[data-menu-button-contents]");return t?t.innerHTML:null}function yn(n,t){const e=gt.get(n);e&&(e.isComposing=t.type==="compositionstart")}window.customElements.get("details-menu")||(window.DetailsMenuElement=ke,window.customElements.define("details-menu",ke));const bt=new WeakMap,rt=new WeakMap,X=new WeakMap;function Vt(n){const t=n.currentTarget;if(!(t instanceof Et))return;const{box:e,image:s}=X.get(t)||{};if(!e||!s)return;let i=0,r=0;if(n instanceof KeyboardEvent)n.key==="ArrowUp"?r=-1:n.key==="ArrowDown"?r=1:n.key==="ArrowLeft"?i=-1:n.key==="ArrowRight"&&(i=1);else if(rt.has(t)&&n instanceof MouseEvent){const o=rt.get(t);i=n.pageX-o.dragStartX,r=n.pageY-o.dragStartY}else if(rt.has(t)&&n instanceof TouchEvent){const{pageX:o,pageY:a}=n.changedTouches[0],{dragStartX:l,dragStartY:c}=rt.get(t);i=o-l,r=a-c}if(i!==0||r!==0){const o=Math.min(Math.max(0,e.offsetLeft+i),s.width-e.offsetWidth),a=Math.min(Math.max(0,e.offsetTop+r),s.height-e.offsetHeight);e.style.left=`${o}px`,e.style.top=`${a}px`,ws(t,{x:o,y:a,width:e.offsetWidth,height:e.offsetHeight})}if(n instanceof MouseEvent)rt.set(t,{dragStartX:n.pageX,dragStartY:n.pageY});else if(n instanceof TouchEvent){const{pageX:o,pageY:a}=n.changedTouches[0];rt.set(t,{dragStartX:o,dragStartY:a})}}function vt(n){const t=n.target;if(!(t instanceof HTMLElement))return;const e=bs(t);if(!(e instanceof Et))return;const{box:s}=X.get(e)||{};if(!s)return;const i=e.getBoundingClientRect();let r,o,a;if(n instanceof KeyboardEvent){if(n.key==="Escape")return ys(e);if(n.key==="-"&&(a=-10),n.key==="="&&(a=10),!a)return;r=s.offsetWidth+a,o=s.offsetHeight+a,bt.set(e,{startX:s.offsetLeft,startY:s.offsetTop})}else if(n instanceof MouseEvent){const l=bt.get(e);if(!l)return;r=n.pageX-l.startX-i.left-window.pageXOffset,o=n.pageY-l.startY-i.top-window.pageYOffset}else if(n instanceof TouchEvent){const l=bt.get(e);if(!l)return;r=n.changedTouches[0].pageX-l.startX-i.left-window.pageXOffset,o=n.changedTouches[0].pageY-l.startY-i.top-window.pageYOffset}r&&o&&vs(e,r,o,!(n instanceof KeyboardEvent))}function bs(n){const t=n.getRootNode();return t instanceof ShadowRoot?t.host:n}function wn(n){const t=n.currentTarget;if(!(t instanceof HTMLElement))return;const e=bs(t);if(!(e instanceof Et))return;const{box:s}=X.get(e)||{};if(!s)return;const i=n.target;if(i instanceof HTMLElement)if(i.hasAttribute("data-direction")){const r=i.getAttribute("data-direction")||"";e.addEventListener("mousemove",vt),e.addEventListener("touchmove",vt,{passive:!0}),["nw","se"].indexOf(r)>=0&&e.classList.add("nwse"),["ne","sw"].indexOf(r)>=0&&e.classList.add("nesw"),bt.set(e,{startX:s.offsetLeft+(["se","ne"].indexOf(r)>=0?0:s.offsetWidth),startY:s.offsetTop+(["se","sw"].indexOf(r)>=0?0:s.offsetHeight)}),vt(n)}else e.addEventListener("mousemove",Vt),e.addEventListener("touchmove",Vt,{passive:!0})}function vs(n,t,e,s=!0){let i=Math.max(Math.abs(t),Math.abs(e),10);const r=bt.get(n);if(!r)return;const{box:o,image:a}=X.get(n)||{};if(!o||!a)return;i=Math.min(i,e>0?a.height-r.startY:r.startY,t>0?a.width-r.startX:r.startX);const l=s?Math.round(Math.max(0,t>0?r.startX:r.startX-i)):o.offsetLeft,c=s?Math.round(Math.max(0,e>0?r.startY:r.startY-i)):o.offsetTop;o.style.left=`${l}px`,o.style.top=`${c}px`,o.style.width=`${i}px`,o.style.height=`${i}px`,ws(n,{x:l,y:c,width:i,height:i})}function ys(n){const{image:t}=X.get(n)||{};if(!t)return;const e=Math.round(t.clientWidth>t.clientHeight?t.clientHeight:t.clientWidth);bt.set(n,{startX:(t.clientWidth-e)/2,startY:(t.clientHeight-e)/2}),vs(n,e,e)}function we(n){const t=n.currentTarget;t instanceof Et&&(rt.delete(t),t.classList.remove("nwse","nesw"),t.removeEventListener("mousemove",vt),t.removeEventListener("mousemove",Vt),t.removeEventListener("touchmove",vt),t.removeEventListener("touchmove",Vt))}function ws(n,t){const{image:e}=X.get(n)||{};if(!e)return;const s=e.naturalWidth/e.width;for(const i in t){const r=Math.round(t[i]*s);t[i]=r;const o=n.querySelector(`[data-image-crop-input='${i}']`);o instanceof HTMLInputElement&&(o.value=r.toString())}n.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:t}))}class Et extends HTMLElement{connectedCallback(){if(X.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML=`
|
1
|
+
class No{constructor(t,e,{tabInsertsSuggestions:s,defaultFirstOption:i,scrollIntoViewOptions:r}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=s??!0,this.defaultFirstOption=i??!1,this.scrollIntoViewOptions=r??{block:"nearest",inline:"nearest"},this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=o=>$o(o,this),this.compositionEventHandler=o=>Ho(o,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",xs),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",xs)}indicateDefaultOption(){var t;this.defaultFirstOption&&((t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Qe)[0])===null||t===void 0||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Qe)[0],s=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Qe),i=s.indexOf(e);if(i===s.length-1&&t===1||i===0&&t===-1){this.clearSelection(),this.input.focus();return}let r=t===1?0:s.length-1;if(e&&i>=0){const a=i+t;a>=0&&a<s.length&&(r=a)}const o=s[r];if(o)for(const a of s)a.removeAttribute("data-combobox-option-default"),o===a?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Ko(o),o.scrollIntoView(this.scrollIntoViewOptions)):a.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function $o(n,t){if(!(n.shiftKey||n.metaKey||n.altKey)&&!(!t.ctrlBindings&&n.ctrlKey)&&!t.isComposing)switch(n.key){case"Enter":Ss(t.input,t.list)&&n.preventDefault();break;case"Tab":t.tabInsertsSuggestions&&Ss(t.input,t.list)&&n.preventDefault();break;case"Escape":t.clearSelection();break;case"ArrowDown":t.navigate(1),n.preventDefault();break;case"ArrowUp":t.navigate(-1),n.preventDefault();break;case"n":t.ctrlBindings&&n.ctrlKey&&(t.navigate(1),n.preventDefault());break;case"p":t.ctrlBindings&&n.ctrlKey&&(t.navigate(-1),n.preventDefault());break;default:if(n.ctrlKey)break;t.clearSelection()}}function xs(n){if(!(n.target instanceof Element))return;const t=n.target.closest('[role="option"]');t&&t.getAttribute("aria-disabled")!=="true"&&jo(t,{event:n})}function Ss(n,t){const e=t.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return e?(e.getAttribute("aria-disabled")==="true"||e.click(),!0):!1}function jo(n,t){n.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:t}))}function Ko(n){n.dispatchEvent(new Event("combobox-select",{bubbles:!0}))}function Qe(n){return!n.hidden&&!(n instanceof HTMLInputElement&&n.type==="hidden")&&(n.offsetWidth>0||n.offsetHeight>0)}function Ho(n,t){t.isComposing=n.type==="compositionstart",document.getElementById(t.input.getAttribute("aria-controls")||"")&&t.clearSelection()}function Uo(n,t=0){let e;return function(...s){clearTimeout(e),e=window.setTimeout(()=>{clearTimeout(e),n(...s)},t)}}const Wo=window.testScreenReaderDelay||100;class zo{constructor(t,e,s,i=!1){var r;if(this.container=t,this.input=e,this.results=s,this.combobox=new No(e,s,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=s.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const o=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(o==null?void 0:o.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.popover?this.results.matches(":popover-open")&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=Uo(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),(r=this.clearButton)===null||r===void 0||r.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),this.input.getAttribute("aria-expanded")==="true"&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.close()}onKeydown(t){if(t.key==="Escape"&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&t.key==="ArrowUp"&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&t.key==="ArrowDown"&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement)||(this.close(),e instanceof HTMLAnchorElement))return;const s=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=s,s||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout(()=>{this.feedback&&(this.feedback.textContent=t)},Wo)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty){this.close();return}const e=this.container.src;if(!e)return;const s=new URL(e,window.location.href),i=new URLSearchParams(s.search.slice(1));i.append("q",t),s.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(s).then(r=>{this.results.innerHTML=r,this.identifyOptions(),this.combobox.indicateDefaultOption();const o=this.results.querySelectorAll('[role="option"]'),a=!!o.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,l=o.length,[c]=o,u=c==null?void 0:c.textContent;this.autoselectEnabled&&u?this.updateFeedbackForScreenReaders(`${l} results. ${u} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${l||"No"} results.`),a?this.open():this.close(),this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))}).catch(()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))})}open(){(this.results.popover?!this.results.matches(":popover-open"):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(":popover-open"):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}}var tt=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},Je=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},qo=function(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(e[s[i]]=n[s[i]]);return e},St,Yt,Xt,Gt,Me;const Yo=globalThis.HTMLElement||null;class Xo extends Event{constructor(t,e){var{relatedTarget:s}=e,i=qo(e,["relatedTarget"]);super(t,i),this.relatedTarget=s}}const rt=new WeakMap;let tn=null;class Go extends Yo{constructor(){super(...arguments),St.add(this),Yt.set(this,null),Xt.set(this,null),Me.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){tn=t===null?t:Promise.resolve(t)}get forElement(){var t;if(!((t=tt(this,Yt,"f"))===null||t===void 0)&&t.isConnected)return tt(this,Yt,"f");const e=this.getAttribute("for"),s=this.getRootNode();return e&&(s instanceof Document||s instanceof ShadowRoot)?s.getElementById(e):null}set forElement(t){Je(this,Yt,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return!((t=tt(this,Xt,"f"))===null||t===void 0)&&t.isConnected?tt(this,Xt,"f"):this.querySelector("input")}set inputElement(t){Je(this,Xt,t,"f"),tt(this,St,"m",Gt).call(this)}connectedCallback(){this.isConnected&&(tt(this,St,"m",Gt).call(this),new MutationObserver(()=>{rt.get(this)||tt(this,St,"m",Gt).call(this)}).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=rt.get(this);t&&(t.destroy(),rt.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;(e=tt(this,Me,"f"))===null||e===void 0||e.abort();const{signal:s}=Je(this,Me,new AbortController,"f"),i=await fetch(t.toString(),{signal:s,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());return tn?(await tn).createHTML(await i.text(),i):await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,s){var i,r;if(e===s)return;const o=rt.get(this);if(o)switch((this.forElement!==((i=rt.get(this))===null||i===void 0?void 0:i.results)||this.inputElement!==((r=rt.get(this))===null||r===void 0?void 0:r.input))&&tt(this,St,"m",Gt).call(this),t){case"open":s===null?o.close():o.open();break;case"value":s!==null&&(o.input.value=s),this.dispatchEvent(new Xo("auto-complete-change",{bubbles:!0,relatedTarget:o.input}));break}}}Yt=new WeakMap,Xt=new WeakMap,Me=new WeakMap,St=new WeakSet,Gt=function(){var t;(t=rt.get(this))===null||t===void 0||t.destroy();const{forElement:e,inputElement:s}=this;if(!e||!s)return;const i=this.getAttribute("data-autoselect")==="true";rt.set(this,new zo(this,s,e,i)),e.setAttribute("role","listbox")};const en=typeof globalThis<"u"?globalThis:window;try{en.AutocompleteElement=en.AutoCompleteElement=Go.define()}catch(n){if(!(en.DOMException&&n instanceof DOMException&&n.name==="NotSupportedError")&&!(n instanceof ReferenceError))throw n}class dn extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const s=[q(t,"compositionstart",i=>Ls(this,i)),q(t,"compositionend",i=>Ls(this,i)),q(t,"click",i=>Cs(t,i)),q(t,"change",i=>Cs(t,i)),q(t,"keydown",i=>na(t,this,i)),q(t,"toggle",()=>Ms(t,this),{once:!0}),q(t,"toggle",()=>Jo(t)),this.preload?q(t,"mouseover",()=>Ms(t,this),{once:!0}):Zo,...Qo(t)];Ct.set(this,{subscriptions:s,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Ct.get(this);if(t){Ct.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Ct=new WeakMap,Zo={unsubscribe(){}};function q(n,t,e,s=!1){return n.addEventListener(t,e,s),{unsubscribe:()=>{n.removeEventListener(t,e,s)}}}function Ms(n,t){const e=t.getAttribute("src");if(!e)return;const s=Ct.get(t);if(!s||s.loaded)return;s.loaded=!0;const i=t.querySelector("include-fragment");i&&!i.hasAttribute("src")&&(i.addEventListener("loadend",()=>qi(n)),i.setAttribute("src",e))}function Qo(n){let t=!1;const e=()=>t=!0,s=()=>t=!1,i=()=>{n.hasAttribute("open")&&(qi(n)||t||ta(n))};return[q(n,"mousedown",e),q(n,"keydown",s),q(n,"toggle",i)]}function Jo(n){if(n.hasAttribute("open"))for(const t of document.querySelectorAll("details[open] > details-menu")){const e=t.closest("details");e&&e!==n&&!e.contains(n)&&e.removeAttribute("open")}}function qi(n){if(!n.hasAttribute("open"))return!1;const t=n.querySelector("details-menu [autofocus]");return t?(t.focus(),!0):!1}function ta(n){const t=document.activeElement;if(t&&Yi(t)&&n.contains(t))return;const e=Zt(n,!0);e&&e.focus()}function Zt(n,t){const e=Array.from(n.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),s=document.activeElement,i=s instanceof HTMLElement?e.indexOf(s):-1,r=t?e[i+1]:e[i-1],o=t?e[0]:e[e.length-1];return r||o}const Os=navigator.userAgent.match(/Macintosh/);function Cs(n,t){const e=t.target;if(e instanceof Element&&e.closest("details")===n){if(t.type==="click"){const s=e.closest('[role="menuitem"], [role="menuitemradio"]');if(!s)return;const i=s.querySelector("input");if(s.tagName==="LABEL"&&e===i)return;s.tagName==="LABEL"&&i&&!i.checked||ks(s,n)}else if(t.type==="change"){const s=e.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');s&&ks(s,n)}}}function ea(n,t){for(const e of t.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const s=e.querySelector('input[type="radio"], input[type="checkbox"]');let i=(e===n).toString();s instanceof HTMLInputElement&&(i=s.indeterminate?"mixed":s.checked.toString()),e.setAttribute("aria-checked",i)}}function ks(n,t){if(n.hasAttribute("disabled")||n.getAttribute("aria-disabled")==="true")return;const e=n.closest("details-menu");!e||!e.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:n}}))||(sa(n,t),ea(n,t),n.getAttribute("role")!=="menuitemcheckbox"&&Xi(t),e.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:n}})))}function na(n,t,e){if(!(e instanceof KeyboardEvent)||n.querySelector("details[open]"))return;const s=Ct.get(t);if(!s||s.isComposing)return;const i=e.target instanceof Element&&e.target.tagName==="SUMMARY";switch(e.key){case"Escape":n.hasAttribute("open")&&(Xi(n),e.preventDefault(),e.stopPropagation());break;case"ArrowDown":{i&&!n.hasAttribute("open")&&n.setAttribute("open","");const r=Zt(n,!0);r&&r.focus(),e.preventDefault()}break;case"ArrowUp":{i&&!n.hasAttribute("open")&&n.setAttribute("open","");const r=Zt(n,!1);r&&r.focus(),e.preventDefault()}break;case"n":if(Os&&e.ctrlKey){const r=Zt(n,!0);r&&r.focus(),e.preventDefault()}break;case"p":if(Os&&e.ctrlKey){const r=Zt(n,!1);r&&r.focus(),e.preventDefault()}break;case" ":case"Enter":{const r=document.activeElement;r instanceof HTMLElement&&Yi(r)&&r.closest("details")===n&&(e.preventDefault(),e.stopPropagation(),r.click())}break}}function Yi(n){const t=n.getAttribute("role");return t==="menuitem"||t==="menuitemcheckbox"||t==="menuitemradio"}function Xi(n){if(!n.hasAttribute("open"))return;n.removeAttribute("open");const e=n.querySelector("summary");e&&e.focus()}function sa(n,t){const e=t.querySelector("[data-menu-button]");if(!e)return;const s=ia(n);if(s)e.textContent=s;else{const i=ra(n);i&&(e.innerHTML=i)}}function ia(n){if(!n)return null;const t=n.hasAttribute("data-menu-button-text")?n:n.querySelector("[data-menu-button-text]");return t?t.getAttribute("data-menu-button-text")||t.textContent:null}function ra(n){if(!n)return null;const t=n.hasAttribute("data-menu-button-contents")?n:n.querySelector("[data-menu-button-contents]");return t?t.innerHTML:null}function Ls(n,t){const e=Ct.get(n);e&&(e.isComposing=t.type==="compositionstart")}window.customElements.get("details-menu")||(window.DetailsMenuElement=dn,window.customElements.define("details-menu",dn));const kt=new WeakMap,ft=new WeakMap,et=new WeakMap;function re(n){const t=n.currentTarget;if(!(t instanceof Vt))return;const{box:e,image:s}=et.get(t)||{};if(!e||!s)return;let i=0,r=0;if(n instanceof KeyboardEvent)n.key==="ArrowUp"?r=-1:n.key==="ArrowDown"?r=1:n.key==="ArrowLeft"?i=-1:n.key==="ArrowRight"&&(i=1);else if(ft.has(t)&&n instanceof MouseEvent){const o=ft.get(t);i=n.pageX-o.dragStartX,r=n.pageY-o.dragStartY}else if(ft.has(t)&&n instanceof TouchEvent){const{pageX:o,pageY:a}=n.changedTouches[0],{dragStartX:l,dragStartY:c}=ft.get(t);i=o-l,r=a-c}if(i!==0||r!==0){const o=Math.min(Math.max(0,e.offsetLeft+i),s.width-e.offsetWidth),a=Math.min(Math.max(0,e.offsetTop+r),s.height-e.offsetHeight);e.style.left=`${o}px`,e.style.top=`${a}px`,Ji(t,{x:o,y:a,width:e.offsetWidth,height:e.offsetHeight})}if(n instanceof MouseEvent)ft.set(t,{dragStartX:n.pageX,dragStartY:n.pageY});else if(n instanceof TouchEvent){const{pageX:o,pageY:a}=n.changedTouches[0];ft.set(t,{dragStartX:o,dragStartY:a})}}function Lt(n){const t=n.target;if(!(t instanceof HTMLElement))return;const e=Gi(t);if(!(e instanceof Vt))return;const{box:s}=et.get(e)||{};if(!s)return;const i=e.getBoundingClientRect();let r,o,a;if(n instanceof KeyboardEvent){if(n.key==="Escape")return Qi(e);if(n.key==="-"&&(a=-10),n.key==="="&&(a=10),!a)return;r=s.offsetWidth+a,o=s.offsetHeight+a,kt.set(e,{startX:s.offsetLeft,startY:s.offsetTop})}else if(n instanceof MouseEvent){const l=kt.get(e);if(!l)return;r=n.pageX-l.startX-i.left-window.pageXOffset,o=n.pageY-l.startY-i.top-window.pageYOffset}else if(n instanceof TouchEvent){const l=kt.get(e);if(!l)return;r=n.changedTouches[0].pageX-l.startX-i.left-window.pageXOffset,o=n.changedTouches[0].pageY-l.startY-i.top-window.pageYOffset}r&&o&&Zi(e,r,o,!(n instanceof KeyboardEvent))}function Gi(n){const t=n.getRootNode();return t instanceof ShadowRoot?t.host:n}function Fs(n){const t=n.currentTarget;if(!(t instanceof HTMLElement))return;const e=Gi(t);if(!(e instanceof Vt))return;const{box:s}=et.get(e)||{};if(!s)return;const i=n.target;if(i instanceof HTMLElement)if(i.hasAttribute("data-direction")){const r=i.getAttribute("data-direction")||"";e.addEventListener("mousemove",Lt),e.addEventListener("touchmove",Lt,{passive:!0}),["nw","se"].indexOf(r)>=0&&e.classList.add("nwse"),["ne","sw"].indexOf(r)>=0&&e.classList.add("nesw"),kt.set(e,{startX:s.offsetLeft+(["se","ne"].indexOf(r)>=0?0:s.offsetWidth),startY:s.offsetTop+(["se","sw"].indexOf(r)>=0?0:s.offsetHeight)}),Lt(n)}else e.addEventListener("mousemove",re),e.addEventListener("touchmove",re,{passive:!0})}function Zi(n,t,e,s=!0){let i=Math.max(Math.abs(t),Math.abs(e),10);const r=kt.get(n);if(!r)return;const{box:o,image:a}=et.get(n)||{};if(!o||!a)return;i=Math.min(i,e>0?a.height-r.startY:r.startY,t>0?a.width-r.startX:r.startX);const l=s?Math.round(Math.max(0,t>0?r.startX:r.startX-i)):o.offsetLeft,c=s?Math.round(Math.max(0,e>0?r.startY:r.startY-i)):o.offsetTop;o.style.left=`${l}px`,o.style.top=`${c}px`,o.style.width=`${i}px`,o.style.height=`${i}px`,Ji(n,{x:l,y:c,width:i,height:i})}function Qi(n){const{image:t}=et.get(n)||{};if(!t)return;const e=Math.round(t.clientWidth>t.clientHeight?t.clientHeight:t.clientWidth);kt.set(n,{startX:(t.clientWidth-e)/2,startY:(t.clientHeight-e)/2}),Zi(n,e,e)}function nn(n){const t=n.currentTarget;t instanceof Vt&&(ft.delete(t),t.classList.remove("nwse","nesw"),t.removeEventListener("mousemove",Lt),t.removeEventListener("mousemove",re),t.removeEventListener("touchmove",Lt),t.removeEventListener("touchmove",re))}function Ji(n,t){const{image:e}=et.get(n)||{};if(!e)return;const s=e.naturalWidth/e.width;for(const i in t){const r=Math.round(t[i]*s);t[i]=r;const o=n.querySelector(`[data-image-crop-input='${i}']`);o instanceof HTMLInputElement&&(o.value=r.toString())}n.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:t}))}class Vt extends HTMLElement{connectedCallback(){if(et.has(this))return;const t=this.attachShadow({mode:"open"});t.innerHTML=`
|
2
2
|
<style>
|
3
3
|
:host { touch-action: none; display: block; }
|
4
4
|
:host(.nesw) { cursor: nesw-resize; }
|
@@ -76,24 +76,24 @@ class mi{constructor(t,e,{tabInsertsSuggestions:s,defaultFirstOption:i,scrollInt
|
|
76
76
|
</div>
|
77
77
|
</div>
|
78
78
|
</div>
|
79
|
-
`;const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const s=t.querySelector("img");s instanceof HTMLImageElement&&(
|
80
|
-
`).length>1}function
|
81
|
-
`);let e=0;for(let s=0;s<t.length;s++){const i=t[s].length+1;n.selectionStart>=e&&n.selectionStart<e+i&&(n.selectionStart=e),n.selectionEnd>=e&&n.selectionEnd<e+i&&(n.selectionEnd=e+i-1),e+=i}}function
|
82
|
-
`,2-r)),e.match(/\S/)&&o<2&&(l=
|
83
|
-
`,2-o)),a==null&&(a=""),l==null&&(l=""),{newlinesToAppend:a,newlinesToPrepend:l}}function
|
84
|
-
`:i,b=
|
85
|
-
${a}`:r;if(c){const
|
79
|
+
`;const e=t.querySelector("[data-crop-box]");if(!(e instanceof HTMLElement))return;const s=t.querySelector("img");s instanceof HTMLImageElement&&(et.set(this,{box:e,image:s}),s.addEventListener("load",()=>{this.loaded=!0,Qi(this)}),this.addEventListener("mouseleave",nn),this.addEventListener("touchend",nn),this.addEventListener("mouseup",nn),e.addEventListener("mousedown",Fs),e.addEventListener("touchstart",Fs,{passive:!0}),this.addEventListener("keydown",re),this.addEventListener("keydown",Lt),this.src&&(s.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(t){t?this.setAttribute("src",t):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(t){t?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(t,e,s){const{image:i}=et.get(this)||{};t==="src"&&(this.loaded=!1,i&&(i.src=s))}}window.customElements.get("image-crop")||(window.ImageCropElement=Vt,window.customElements.define("image-crop",Vt));var Ds=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},Oe,fn;const oa=["[data-md-button]","md-header","md-bold","md-italic","md-quote","md-code","md-link","md-image","md-unordered-list","md-ordered-list","md-task-list","md-mention","md-ref","md-strikethrough"];function tr(n){const t=[];for(const e of n.querySelectorAll(oa.join(", ")))e.hidden||e.offsetWidth<=0&&e.offsetHeight<=0||e.closest("markdown-toolbar")===n&&t.push(e);return t}function er(n){return function(t){(t.key===" "||t.key==="Enter")&&n(t)}}const B=new WeakMap,aa={"header-1":{prefix:"# "},"header-2":{prefix:"## "},"header-3":{prefix:"### "},"header-4":{prefix:"#### "},"header-5":{prefix:"##### "},"header-6":{prefix:"###### "},bold:{prefix:"**",suffix:"**",trimFirst:!0},italic:{prefix:"_",suffix:"_",trimFirst:!0},quote:{prefix:"> ",multiline:!0,surroundWithNewlines:!0},code:{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"},link:{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"},image:{prefix:"",replaceNext:"url",scanFor:"https?://"},"unordered-list":{prefix:"- ",multiline:!0,unorderedList:!0},"ordered-list":{prefix:"1. ",multiline:!0,orderedList:!0},"task-list":{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0},mention:{prefix:"@",prefixSpace:!0},ref:{prefix:"#",prefixSpace:!0},strikethrough:{prefix:"~~",suffix:"~~",trimFirst:!0}};class H extends HTMLElement{constructor(){super();const t=e=>{const s=B.get(this);s&&(e.preventDefault(),pn(this,s))};this.addEventListener("keydown",er(t)),this.addEventListener("click",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button")}click(){const t=B.get(this);t&&pn(this,t)}}class Vs extends H{constructor(){super(...arguments),Oe.add(this)}connectedCallback(){const t=parseInt(this.getAttribute("level")||"3",10);Ds(this,Oe,"m",fn).call(this,t)}static get observedAttributes(){return["level"]}attributeChangedCallback(t,e,s){if(t!=="level")return;const i=parseInt(s||"3",10);Ds(this,Oe,"m",fn).call(this,i)}}Oe=new WeakSet,fn=function(t){if(t<1||t>6)return;const e=`${"#".repeat(t)} `;B.set(this,{prefix:e})};window.customElements.get("md-header")||(window.MarkdownHeaderButtonElement=Vs,window.customElements.define("md-header",Vs));class _s extends H{connectedCallback(){B.set(this,{prefix:"**",suffix:"**",trimFirst:!0})}}window.customElements.get("md-bold")||(window.MarkdownBoldButtonElement=_s,window.customElements.define("md-bold",_s));class Ps extends H{connectedCallback(){B.set(this,{prefix:"_",suffix:"_",trimFirst:!0})}}window.customElements.get("md-italic")||(window.MarkdownItalicButtonElement=Ps,window.customElements.define("md-italic",Ps));class Bs extends H{connectedCallback(){B.set(this,{prefix:"> ",multiline:!0,surroundWithNewlines:!0})}}window.customElements.get("md-quote")||(window.MarkdownQuoteButtonElement=Bs,window.customElements.define("md-quote",Bs));class Rs extends H{connectedCallback(){B.set(this,{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"})}}window.customElements.get("md-code")||(window.MarkdownCodeButtonElement=Rs,window.customElements.define("md-code",Rs));class Is extends H{connectedCallback(){B.set(this,{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"})}}window.customElements.get("md-link")||(window.MarkdownLinkButtonElement=Is,window.customElements.define("md-link",Is));class Ns extends H{connectedCallback(){B.set(this,{prefix:"",replaceNext:"url",scanFor:"https?://"})}}window.customElements.get("md-image")||(window.MarkdownImageButtonElement=Ns,window.customElements.define("md-image",Ns));class $s extends H{connectedCallback(){B.set(this,{prefix:"- ",multiline:!0,unorderedList:!0})}}window.customElements.get("md-unordered-list")||(window.MarkdownUnorderedListButtonElement=$s,window.customElements.define("md-unordered-list",$s));class js extends H{connectedCallback(){B.set(this,{prefix:"1. ",multiline:!0,orderedList:!0})}}window.customElements.get("md-ordered-list")||(window.MarkdownOrderedListButtonElement=js,window.customElements.define("md-ordered-list",js));class Ks extends H{connectedCallback(){B.set(this,{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0})}}window.customElements.get("md-task-list")||(window.MarkdownTaskListButtonElement=Ks,window.customElements.define("md-task-list",Ks));class Hs extends H{connectedCallback(){B.set(this,{prefix:"@",prefixSpace:!0})}}window.customElements.get("md-mention")||(window.MarkdownMentionButtonElement=Hs,window.customElements.define("md-mention",Hs));class Us extends H{connectedCallback(){B.set(this,{prefix:"#",prefixSpace:!0})}}window.customElements.get("md-ref")||(window.MarkdownRefButtonElement=Us,window.customElements.define("md-ref",Us));class Ws extends H{connectedCallback(){B.set(this,{prefix:"~~",suffix:"~~",trimFirst:!0})}}window.customElements.get("md-strikethrough")||(window.MarkdownStrikethroughButtonElement=Ws,window.customElements.define("md-strikethrough",Ws));function zs(n){const{target:t,currentTarget:e}=n;if(!(t instanceof Element))return;const s=t.closest("[data-md-button]");if(!s||s.closest("markdown-toolbar")!==e)return;const i=s.getAttribute("data-md-button"),r=aa[i];r&&(n.preventDefault(),pn(t,r))}function qs(n){n.addEventListener("keydown",sr),n.setAttribute("tabindex","0"),n.addEventListener("focus",nr,{once:!0})}function Ys(n){n.removeEventListener("keydown",sr),n.removeAttribute("tabindex"),n.removeEventListener("focus",nr)}class ke extends HTMLElement{connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.hasAttribute("data-no-focus")||qs(this),this.addEventListener("keydown",er(zs)),this.addEventListener("click",zs)}attributeChangedCallback(t,e,s){t==="data-no-focus"&&(s===null?qs(this):Ys(this))}disconnectedCallback(){Ys(this)}get field(){const t=this.getAttribute("for");if(!t)return null;const e="getRootNode"in this?this.getRootNode():document;let s;return(e instanceof Document||e instanceof ShadowRoot)&&(s=e.getElementById(t)),s instanceof HTMLTextAreaElement?s:null}}ke.observedAttributes=["data-no-focus"];function nr({target:n}){if(!(n instanceof Element))return;n.removeAttribute("tabindex");let t="0";for(const e of tr(n))e.setAttribute("tabindex",t),t==="0"&&(e.focus(),t="-1")}function sr(n){const t=n.key;if(t!=="ArrowRight"&&t!=="ArrowLeft"&&t!=="Home"&&t!=="End")return;const e=n.currentTarget;if(!(e instanceof HTMLElement))return;const s=tr(e),i=s.indexOf(n.target),r=s.length;if(i===-1)return;let o=0;t==="ArrowLeft"&&(o=i-1),t==="ArrowRight"&&(o=i+1),t==="End"&&(o=r-1),o<0&&(o=r-1),o>r-1&&(o=0);for(let a=0;a<r;a+=1)s[a].setAttribute("tabindex",a===o?"0":"-1");n.preventDefault(),s[o].focus()}window.customElements.get("markdown-toolbar")||(window.MarkdownToolbarElement=ke,window.customElements.define("markdown-toolbar",ke));function mn(n){return n.trim().split(`
|
80
|
+
`).length>1}function Xs(n,t){return Array(t+1).join(n)}function la(n,t){let e=t;for(;n[e]&&n[e-1]!=null&&!n[e-1].match(/\s/);)e--;return e}function ca(n,t,e){let s=t;const i=e?/\n/:/\s/;for(;n[s]&&!n[s].match(i);)s++;return s}let dt=null;function ua(n,{text:t,selectionStart:e,selectionEnd:s}){const i=n.selectionStart,r=n.value.slice(0,i),o=n.value.slice(n.selectionEnd);if(dt===null||dt===!0){n.contentEditable="true";try{dt=document.execCommand("insertText",!1,t)}catch{dt=!1}n.contentEditable="false"}if(dt&&!n.value.slice(0,n.selectionStart).endsWith(t)&&(dt=!1),!dt){try{document.execCommand("ms-beginUndoUnit")}catch{}n.value=r+t+o;try{document.execCommand("ms-endUndoUnit")}catch{}n.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))}e!=null&&s!=null?n.setSelectionRange(e,s):n.setSelectionRange(i,n.selectionEnd)}function ha(n,t){const e=n.value.slice(n.selectionStart,n.selectionEnd);let s;t.orderedList||t.unorderedList?s=ba(n,t):t.multiline&&mn(e)?s=pa(n,t):s=ma(n,t),ua(n,s)}function da(n){const t=n.value.split(`
|
81
|
+
`);let e=0;for(let s=0;s<t.length;s++){const i=t[s].length+1;n.selectionStart>=e&&n.selectionStart<e+i&&(n.selectionStart=e),n.selectionEnd>=e&&n.selectionEnd<e+i&&(n.selectionEnd=e+i-1),e+=i}}function fa(n,t,e,s=!1){if(n.selectionStart===n.selectionEnd)n.selectionStart=la(n.value,n.selectionStart),n.selectionEnd=ca(n.value,n.selectionEnd,s);else{const i=n.selectionStart-t.length,r=n.selectionEnd+e.length,o=n.value.slice(i,n.selectionStart)===t,a=n.value.slice(n.selectionEnd,r)===e;o&&a&&(n.selectionStart=i,n.selectionEnd=r)}return n.value.slice(n.selectionStart,n.selectionEnd)}function jn(n){const t=n.value.slice(0,n.selectionStart),e=n.value.slice(n.selectionEnd),s=t.match(/\n*$/),i=e.match(/^\n*/),r=s?s[0].length:0,o=i?i[0].length:0;let a,l;return t.match(/\S/)&&r<2&&(a=Xs(`
|
82
|
+
`,2-r)),e.match(/\S/)&&o<2&&(l=Xs(`
|
83
|
+
`,2-o)),a==null&&(a=""),l==null&&(l=""),{newlinesToAppend:a,newlinesToPrepend:l}}function ma(n,t){let e,s;const{prefix:i,suffix:r,blockPrefix:o,blockSuffix:a,replaceNext:l,prefixSpace:c,scanFor:u,surroundWithNewlines:h}=t,d=n.selectionStart,m=n.selectionEnd;let f=n.value.slice(n.selectionStart,n.selectionEnd),g=mn(f)&&o.length>0?`${o}
|
84
|
+
`:i,b=mn(f)&&a.length>0?`
|
85
|
+
${a}`:r;if(c){const w=n.value[n.selectionStart-1];n.selectionStart!==0&&w!=null&&!w.match(/\s/)&&(g=` ${g}`)}f=fa(n,g,b,t.multiline);let p=n.selectionStart,v=n.selectionEnd;const E=l.length>0&&b.indexOf(l)>-1&&f.length>0;if(h){const w=jn(n);e=w.newlinesToAppend,s=w.newlinesToPrepend,g=e+i,b+=s}if(f.startsWith(g)&&f.endsWith(b)){const w=f.slice(g.length,f.length-b.length);if(d===m){let y=d-g.length;y=Math.max(y,p),y=Math.min(y,p+w.length),p=v=y}else v=p+w.length;return{text:w,selectionStart:p,selectionEnd:v}}else if(E)if(u.length>0&&f.match(u)){b=b.replace(l,f);const w=g+b;return p=v=p+g.length,{text:w,selectionStart:p,selectionEnd:v}}else{const w=g+f+b;return p=p+g.length+f.length+b.indexOf(l),v=p+l.length,{text:w,selectionStart:p,selectionEnd:v}}else{let w=g+f+b;p=d+g.length,v=m+g.length;const y=f.match(/^\s*|\s*$/g);if(t.trimFirst&&y){const T=y[0]||"",S=y[1]||"";w=T+g+f.trim()+b+S,p+=T.length,v-=S.length}return{text:w,selectionStart:p,selectionEnd:v}}}function pa(n,t){const{prefix:e,suffix:s,surroundWithNewlines:i}=t;let r=n.value.slice(n.selectionStart,n.selectionEnd),o=n.selectionStart,a=n.selectionEnd;const l=r.split(`
|
86
86
|
`);if(l.every(u=>u.startsWith(e)&&u.endsWith(s)))r=l.map(u=>u.slice(e.length,u.length-s.length)).join(`
|
87
87
|
`),a=o+r.length;else if(r=l.map(u=>e+u+s).join(`
|
88
|
-
`),i){const{newlinesToAppend:u,newlinesToPrepend:
|
88
|
+
`),i){const{newlinesToAppend:u,newlinesToPrepend:h}=jn(n);o+=u.length,a=o+r.length,r=u+r+h}return{text:r,selectionStart:o,selectionEnd:a}}function Gs(n){const t=n.split(`
|
89
89
|
`),e=/^\d+\.\s+/,s=t.every(r=>e.test(r));let i=t;return s&&(i=t.map(r=>r.replace(e,""))),{text:i.join(`
|
90
|
-
`),processed:s}}function
|
90
|
+
`),processed:s}}function Zs(n){const t=n.split(`
|
91
91
|
`),e="- ",s=t.every(r=>r.startsWith(e));let i=t;return s&&(i=t.map(r=>r.slice(e.length,r.length))),{text:i.join(`
|
92
|
-
`),processed:s}}function
|
93
|
-
`).map((
|
94
|
-
`)+m;return e?(s=Math.max(s+Mt(0,t.unorderedList).length+h.length,0),i=s):a.processed?(s=Math.max(n.selectionStart+h.length,0),i=n.selectionEnd+h.length+u-d):(s=Math.max(n.selectionStart+h.length,0),i=n.selectionEnd+h.length+u),{text:f,selectionStart:s,selectionEnd:i}}function De(n,t){const e=n.closest("markdown-toolbar");if(!(e instanceof Qt))return;const i=Object.assign(Object.assign({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1}),t),r=e.field;r&&(r.focus(),Vi(r,i))}localStorage.getItem("theme");window.matchMedia("(prefers-color-scheme: dark)").matches;class qi{constructor(t,e,s){this.eventTarget=t,this.eventName=e,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(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=Yi(t);for(const s of this.bindings){if(e.immediatePropagationStopped)break;s.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((t,e)=>{const s=t.index,i=e.index;return s<i?-1:s>i?1:0})}}function Yi(n){if("immediatePropagationStopped"in n)return n;{const{stopImmediatePropagation:t}=n;return Object.assign(n,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}class Xi{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(t=>t.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(t=>t.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((t,e)=>t.concat(Array.from(e.values())),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,s={}){this.application.handleError(t,`Error ${e}`,s)}clearEventListenersForBinding(t){const e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){const{eventTarget:e,eventName:s,eventOptions:i}=t,r=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(s,i);r.delete(o),r.size==0&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:s,eventOptions:i}=t;return this.fetchEventListener(e,s,i)}fetchEventListener(t,e,s){const i=this.fetchEventListenerMapForEventTarget(t),r=this.cacheKey(e,s);let o=i.get(r);return o||(o=this.createEventListener(t,e,s),i.set(r,o)),o}createEventListener(t,e,s){const i=new qi(t,e,s);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const s=[t];return Object.keys(e).sort().forEach(i=>{s.push(`${e[i]?"":"!"}${i}`)}),s.join(":")}}const Gi={stop({event:n,value:t}){return t&&n.stopPropagation(),!0},prevent({event:n,value:t}){return t&&n.preventDefault(),!0},self({event:n,value:t,element:e}){return t?e===n.target:!0}},Zi=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function Ji(n){const e=n.trim().match(Zi)||[];let s=e[2],i=e[3];return i&&!["keydown","keyup","keypress"].includes(s)&&(s+=`.${i}`,i=""),{eventTarget:Qi(e[4]),eventName:s,eventOptions:e[7]?tr(e[7]):{},identifier:e[5],methodName:e[6],keyFilter:e[1]||i}}function Qi(n){if(n=="window")return window;if(n=="document")return document}function tr(n){return n.split(":").reduce((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)}),{})}function er(n){if(n==window)return"window";if(n==document)return"document"}function Xe(n){return n.replace(/(?:[_-])([a-z0-9])/g,(t,e)=>e.toUpperCase())}function Fe(n){return Xe(n.replace(/--/g,"-").replace(/__/g,"_"))}function Wt(n){return n.charAt(0).toUpperCase()+n.slice(1)}function Os(n){return n.replace(/([A-Z])/g,(t,e)=>`-${e.toLowerCase()}`)}function nr(n){return n.match(/[^\s]+/g)||[]}function jn(n){return n!=null}function Be(n,t){return Object.prototype.hasOwnProperty.call(n,t)}const Hn=["meta","ctrl","alt","shift"];class sr{constructor(t,e,s,i){this.element=t,this.index=e,this.eventTarget=s.eventTarget||t,this.eventName=s.eventName||ir(t)||qt("missing event name"),this.eventOptions=s.eventOptions||{},this.identifier=s.identifier||qt("missing identifier"),this.methodName=s.methodName||qt("missing method name"),this.keyFilter=s.keyFilter||"",this.schema=i}static forToken(t,e){return new this(t.element,t.index,Ji(t.content),e)}toString(){const t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(t){if(!this.keyFilter)return!1;const e=this.keyFilter.split("+");if(this.keyFilterDissatisfied(t,e))return!0;const s=e.filter(i=>!Hn.includes(i))[0];return s?(Be(this.keyMappings,s)||qt(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[s].toLowerCase()!==t.key.toLowerCase()):!1}shouldIgnoreMouseEvent(t){if(!this.keyFilter)return!1;const e=[this.keyFilter];return!!this.keyFilterDissatisfied(t,e)}get params(){const t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:s,value:i}of Array.from(this.element.attributes)){const r=s.match(e),o=r&&r[1];o&&(t[Xe(o)]=rr(i))}return t}get eventTargetName(){return er(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(t,e){const[s,i,r,o]=Hn.map(a=>e.includes(a));return t.metaKey!==s||t.ctrlKey!==i||t.altKey!==r||t.shiftKey!==o}}const Un={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:n=>n.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function ir(n){const t=n.tagName.toLowerCase();if(t in Un)return Un[t](n)}function qt(n){throw new Error(n)}function rr(n){try{return JSON.parse(n)}catch{return n}}class or{constructor(t,e){this.context=t,this.action=e}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(t){const e=this.prepareActionEvent(t);this.willBeInvokedByEvent(t)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if(typeof t=="function")return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){const{element:e}=this.action,{actionDescriptorFilters:s}=this.context.application,{controller:i}=this.context;let r=!0;for(const[o,a]of Object.entries(this.eventOptions))if(o in s){const l=s[o];r=r&&l({name:o,value:a,event:t,element:e,controller:i})}else continue;return r}prepareActionEvent(t){return Object.assign(t,{params:this.action.params})}invokeWithEvent(t){const{target:e,currentTarget:s}=t;try{this.method.call(this.controller,t),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:s,action:this.methodName})}catch(i){const{identifier:r,controller:o,element:a,index:l}=this,c={identifier:r,controller:o,element:a,index:l,event:t};this.context.handleError(i,`invoking action "${this.action}"`,c)}}willBeInvokedByEvent(t){const e=t.target;return t instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(t)||t instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(t)?!1:this.element===e?!0:e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):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 Ss{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,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(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),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 t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){t.type=="attributes"?this.processAttributeChange(t.target,t.attributeName):t.type=="childList"&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){this.elements.has(t)?this.delegate.elementAttributeChanged&&this.matchElement(t)?this.delegate.elementAttributeChanged(t,e):this.removeElement(t):this.matchElement(t)&&this.addElement(t)}processRemovedNodes(t){for(const e of Array.from(t)){const s=this.elementFromNode(e);s&&this.processTree(s,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const s=this.elementFromNode(e);s&&this.elementIsActive(s)&&this.processTree(s,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const s of this.matchElementsInTree(t))e.call(this,s)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected!=this.element.isConnected?!1:this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class Ms{constructor(t,e,s){this.attributeName=e,this.delegate=s,this.elementObserver=new Ss(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],s=Array.from(t.querySelectorAll(this.selector));return e.concat(s)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}function ar(n,t,e){Cs(n,t).add(e)}function lr(n,t,e){Cs(n,t).delete(e),cr(n,t)}function Cs(n,t){let e=n.get(t);return e||(e=new Set,n.set(t,e)),e}function cr(n,t){const e=n.get(t);e!=null&&e.size==0&&n.delete(t)}class lt{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,s)=>e.concat(Array.from(s)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,s)=>e+s.size,0)}add(t,e){ar(this.valuesByKey,t,e)}delete(t,e){lr(this.valuesByKey,t,e)}has(t,e){const s=this.valuesByKey.get(t);return s!=null&&s.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some(s=>s.has(t))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter(([e,s])=>s.has(t)).map(([e,s])=>e)}}class ur{constructor(t,e,s,i){this._selector=e,this.details=i,this.elementObserver=new Ss(t,this),this.delegate=s,this.matchesByElement=new lt}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(t){this._selector=t,this.refresh()}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){const{selector:e}=this;if(e){const s=t.matches(e);return this.delegate.selectorMatchElement?s&&this.delegate.selectorMatchElement(t,this.details):s}else return!1}matchElementsInTree(t){const{selector:e}=this;if(e){const s=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(e)).filter(r=>this.matchElement(r));return s.concat(i)}else return[]}elementMatched(t){const{selector:e}=this;e&&this.selectorMatched(t,e)}elementUnmatched(t){const e=this.matchesByElement.getKeysForValue(t);for(const s of e)this.selectorUnmatched(t,s)}elementAttributeChanged(t,e){const{selector:s}=this;if(s){const i=this.matchElement(t),r=this.matchesByElement.has(s,t);i&&!r?this.selectorMatched(t,s):!i&&r&&this.selectorUnmatched(t,s)}}selectorMatched(t,e){this.delegate.selectorMatched(t,e,this.details),this.matchesByElement.add(e,t)}selectorUnmatched(t,e){this.delegate.selectorUnmatched(t,e,this.details),this.matchesByElement.delete(e,t)}}class hr{constructor(t,e){this.element=t,this.delegate=e,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 t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const s=this.delegate.getStringMapKeyForAttribute(t);if(s!=null){this.stringMap.has(t)||this.stringMapKeyAdded(s,t);const i=this.element.getAttribute(t);if(this.stringMap.get(t)!=i&&this.stringMapValueChanged(i,s,e),i==null){const r=this.stringMap.get(t);this.stringMap.delete(t),r&&this.stringMapKeyRemoved(s,t,r)}else this.stringMap.set(t,i)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,s){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,s)}stringMapKeyRemoved(t,e,s){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,s)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(t=>t.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class ks{constructor(t,e,s){this.attributeObserver=new Ms(t,e,this),this.delegate=s,this.tokensByElement=new lt}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,s]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(s)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach(e=>this.tokenMatched(e))}tokensUnmatched(t){t.forEach(e=>this.tokenUnmatched(e))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),s=this.readTokensForElement(t),i=fr(e,s).findIndex(([r,o])=>!mr(r,o));return i==-1?[[],[]]:[e.slice(i),s.slice(i)]}readTokensForElement(t){const e=this.attributeName,s=t.getAttribute(e)||"";return dr(s,t,e)}}function dr(n,t,e){return n.trim().split(/\s+/).filter(s=>s.length).map((s,i)=>({element:t,attributeName:e,content:s,index:i}))}function fr(n,t){const e=Math.max(n.length,t.length);return Array.from({length:e},(s,i)=>[n[i],t[i]])}function mr(n,t){return n&&t&&n.index==t.index&&n.content==t.content}class Ls{constructor(t,e,s){this.tokenListObserver=new ks(t,e,this),this.delegate=s,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:s}=this.fetchParseResultForToken(t);s&&(this.fetchValuesByTokenForElement(e).set(t,s),this.delegate.elementMatchedValue(e,s))}tokenUnmatched(t){const{element:e}=t,{value:s}=this.fetchParseResultForToken(t);s&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,s))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(e){return{error:e}}}}class pr{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new Ls(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(t){const e=new or(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach(t=>this.delegate.bindingDisconnected(t,!0)),this.bindingsByAction.clear()}parseValueForToken(t){const e=sr.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class gr{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new hr(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(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const s=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,s.writer(this.receiver[t]),s.writer(s.defaultValue))}stringMapValueChanged(t,e,s){const i=this.valueDescriptorNameMap[e];t!==null&&(s===null&&(s=i.writer(i.defaultValue)),this.invokeChangedCallback(e,t,s))}stringMapKeyRemoved(t,e,s){const i=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,i.writer(this.receiver[t]),s):this.invokeChangedCallback(t,i.writer(i.defaultValue),s)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:s,writer:i}of this.valueDescriptors)s!=null&&!this.controller.data.has(t)&&this.invokeChangedCallback(e,i(s),void 0)}invokeChangedCallback(t,e,s){const i=`${t}Changed`,r=this.receiver[i];if(typeof r=="function"){const o=this.valueDescriptorNameMap[t];try{const a=o.reader(e);let l=s;s&&(l=o.reader(s)),r.call(this.receiver,a,l)}catch(a){throw a instanceof TypeError&&(a.message=`Stimulus Value "${this.context.identifier}.${o.name}" - ${a.message}`),a}}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map(e=>t[e])}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach(e=>{const s=this.valueDescriptorMap[e];t[s.name]=s}),t}hasValue(t){const e=this.valueDescriptorNameMap[t],s=`has${Wt(e.name)}`;return this.receiver[s]}}class br{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new lt}start(){this.tokenListObserver||(this.tokenListObserver=new ks(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var s;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),(s=this.tokenListObserver)===null||s===void 0||s.pause(()=>this.delegate.targetConnected(t,e)))}disconnectTarget(t,e){var s;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),(s=this.tokenListObserver)===null||s===void 0||s.pause(()=>this.delegate.targetDisconnected(t,e)))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function Kt(n,t){const e=_s(n);return Array.from(e.reduce((s,i)=>(yr(i,t).forEach(r=>s.add(r)),s),new Set))}function vr(n,t){return _s(n).reduce((s,i)=>(s.push(...wr(i,t)),s),[])}function _s(n){const t=[];for(;n;)t.push(n),n=Object.getPrototypeOf(n);return t.reverse()}function yr(n,t){const e=n[t];return Array.isArray(e)?e:[]}function wr(n,t){const e=n[t];return e?Object.keys(e).map(s=>[s,e[s]]):[]}class Er{constructor(t,e){this.started=!1,this.context=t,this.delegate=e,this.outletsByName=new lt,this.outletElementsByName=new lt,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(t=>{this.setupSelectorObserverForOutlet(t),this.setupAttributeObserverForOutlet(t)}),this.started=!0,this.dependentContexts.forEach(t=>t.refresh()))}refresh(){this.selectorObserverMap.forEach(t=>t.refresh()),this.attributeObserverMap.forEach(t=>t.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(t=>t.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(t=>t.stop()),this.attributeObserverMap.clear())}selectorMatched(t,e,{outletName:s}){const i=this.getOutlet(t,s);i&&this.connectOutlet(i,t,s)}selectorUnmatched(t,e,{outletName:s}){const i=this.getOutletFromMap(t,s);i&&this.disconnectOutlet(i,t,s)}selectorMatchElement(t,{outletName:e}){const s=this.selector(e),i=this.hasOutlet(t,e),r=t.matches(`[${this.schema.controllerAttribute}~=${e}]`);return s?i&&r&&t.matches(s):!1}elementMatchedAttribute(t,e){const s=this.getOutletNameFromOutletAttributeName(e);s&&this.updateSelectorObserverForOutlet(s)}elementAttributeValueChanged(t,e){const s=this.getOutletNameFromOutletAttributeName(e);s&&this.updateSelectorObserverForOutlet(s)}elementUnmatchedAttribute(t,e){const s=this.getOutletNameFromOutletAttributeName(e);s&&this.updateSelectorObserverForOutlet(s)}connectOutlet(t,e,s){var i;this.outletElementsByName.has(s,e)||(this.outletsByName.add(s,t),this.outletElementsByName.add(s,e),(i=this.selectorObserverMap.get(s))===null||i===void 0||i.pause(()=>this.delegate.outletConnected(t,e,s)))}disconnectOutlet(t,e,s){var i;this.outletElementsByName.has(s,e)&&(this.outletsByName.delete(s,t),this.outletElementsByName.delete(s,e),(i=this.selectorObserverMap.get(s))===null||i===void 0||i.pause(()=>this.delegate.outletDisconnected(t,e,s)))}disconnectAllOutlets(){for(const t of this.outletElementsByName.keys)for(const e of this.outletElementsByName.getValuesForKey(t))for(const s of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(s,e,t)}updateSelectorObserverForOutlet(t){const e=this.selectorObserverMap.get(t);e&&(e.selector=this.selector(t))}setupSelectorObserverForOutlet(t){const e=this.selector(t),s=new ur(document.body,e,this,{outletName:t});this.selectorObserverMap.set(t,s),s.start()}setupAttributeObserverForOutlet(t){const e=this.attributeNameForOutletName(t),s=new Ms(this.scope.element,e,this);this.attributeObserverMap.set(t,s),s.start()}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}attributeNameForOutletName(t){return this.scope.schema.outletAttributeForScope(this.identifier,t)}getOutletNameFromOutletAttributeName(t){return this.outletDefinitions.find(e=>this.attributeNameForOutletName(e)===t)}get outletDependencies(){const t=new lt;return this.router.modules.forEach(e=>{const s=e.definition.controllerConstructor;Kt(s,"outlets").forEach(r=>t.add(r,e.identifier))}),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const t=this.dependentControllerIdentifiers;return this.router.contexts.filter(e=>t.includes(e.identifier))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find(s=>s.element===t)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class Tr{constructor(t,e){this.logDebugActivity=(s,i={})=>{const{identifier:r,controller:o,element:a}=this;i=Object.assign({identifier:r,controller:o,element:a},i),this.application.logDebugActivity(this.identifier,s,i)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new pr(this,this.dispatcher),this.valueObserver=new gr(this,this.controller),this.targetObserver=new br(this,this),this.outletObserver=new Er(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(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),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}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,s={}){const{identifier:i,controller:r,element:o}=this;s=Object.assign({identifier:i,controller:r,element:o},s),this.application.handleError(t,`Error ${e}`,s)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,s){this.invokeControllerMethod(`${Fe(s)}OutletConnected`,t,e)}outletDisconnected(t,e,s){this.invokeControllerMethod(`${Fe(s)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){const s=this.controller;typeof s[t]=="function"&&s[t](...e)}}function Ar(n){return xr(n,Or(n))}function xr(n,t){const e=kr(n),s=Sr(n.prototype,t);return Object.defineProperties(e.prototype,s),e}function Or(n){return Kt(n,"blessings").reduce((e,s)=>{const i=s(n);for(const r in i){const o=e[r]||{};e[r]=Object.assign(o,i[r])}return e},{})}function Sr(n,t){return Cr(t).reduce((e,s)=>{const i=Mr(n,t,s);return i&&Object.assign(e,{[s]:i}),e},{})}function Mr(n,t,e){const s=Object.getOwnPropertyDescriptor(n,e);if(!(s&&"value"in s)){const r=Object.getOwnPropertyDescriptor(t,e).value;return s&&(r.get=s.get||r.get,r.set=s.set||r.set),r}}const Cr=typeof Object.getOwnPropertySymbols=="function"?n=>[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)]:Object.getOwnPropertyNames,kr=(()=>{function n(e){function s(){return Reflect.construct(e,arguments,new.target)}return s.prototype=Object.create(e.prototype,{constructor:{value:s}}),Reflect.setPrototypeOf(s,e),s}function t(){const s=n(function(){this.a.call(this)});return s.prototype.a=function(){},new s}try{return t(),n}catch{return s=>class extends s{}}})();function Lr(n){return{identifier:n.identifier,controllerConstructor:Ar(n.controllerConstructor)}}class _r{constructor(t,e){this.application=t,this.definition=Lr(e),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(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new Tr(this,t),this.contextsByScope.set(t,e)),e}}class Dr{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){const e=this.data.get(this.getDataKey(t))||"";return nr(e)}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class Fr{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const s=this.getAttributeNameForKey(t);return this.element.setAttribute(s,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}else return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${Os(t)}`}}class Br{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,s){let i=this.warnedKeysByObject.get(t);i||(i=new Set,this.warnedKeysByObject.set(t,i)),i.has(e)||(i.add(e),this.logger.warn(s,t))}}function Pe(n,t){return`[${n}~="${t}"]`}class Pr{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,s)=>e||this.findTarget(s)||this.findLegacyTarget(s),void 0)}findAll(...t){return t.reduce((e,s)=>[...e,...this.findAllTargets(s),...this.findAllLegacyTargets(s)],[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){const e=this.schema.targetAttributeForScope(this.identifier);return Pe(e,t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map(s=>this.deprecate(s,t))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return Pe(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:s}=this,i=this.schema.targetAttribute,r=this.schema.targetAttributeForScope(s);this.guide.warn(t,`target:${e}`,`Please replace ${i}="${s}.${e}" with ${r}="${e}". The ${i} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class Rr{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,s)=>e||this.findOutlet(s),void 0)}findAll(...t){return t.reduce((e,s)=>[...e,...this.findAllOutlets(s)],[])}getSelectorForOutletName(t){const e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){const e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){const e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter(i=>this.matchesElement(i,t,e))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter(i=>this.matchesElement(i,t,e))}matchesElement(t,e,s){const i=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&i.split(" ").includes(s)}}class Ge{constructor(t,e,s,i){this.targets=new Pr(this),this.classes=new Dr(this),this.data=new Fr(this),this.containsElement=r=>r.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=s,this.guide=new Br(i),this.outlets=new Rr(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return Pe(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Ge(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class $r{constructor(t,e,s){this.element=t,this.schema=e,this.delegate=s,this.valueListObserver=new Ls(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(t){const{element:e,content:s}=t;return this.parseValueForElementAndIdentifier(e,s)}parseValueForElementAndIdentifier(t,e){const s=this.fetchScopesByIdentifierForElement(t);let i=s.get(e);return i||(i=this.delegate.createScopeForElementAndIdentifier(t,e),s.set(e,i)),i}elementMatchedValue(t,e){const s=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,s),s==1&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const s=this.scopeReferenceCounts.get(e);s&&(this.scopeReferenceCounts.set(e,s-1),s==1&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class Nr{constructor(t){this.application=t,this.scopeObserver=new $r(this.element,this.schema,this),this.scopesByIdentifier=new lt,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((t,e)=>t.concat(e.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new _r(this.application,t);this.connectModule(e);const s=t.controllerConstructor.afterLoad;s&&s.call(t.controllerConstructor,t.identifier,this.application)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const s=this.modulesByIdentifier.get(e);if(s)return s.contexts.find(i=>i.element==t)}proposeToConnectScopeForElementAndIdentifier(t,e){const s=this.scopeObserver.parseValueForElementAndIdentifier(t,e);s?this.scopeObserver.elementMatchedValue(s.element,s):console.error(`Couldn't find or create scope for identifier: "${e}" and element:`,t)}handleError(t,e,s){this.application.handleError(t,e,s)}createScopeForElementAndIdentifier(t,e){return new Ge(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(s=>t.connectContextForScope(s))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(s=>t.disconnectContextForScope(s))}}const Ir={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:n=>`data-${n}-target`,outletAttributeForScope:(n,t)=>`data-${n}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},Wn("abcdefghijklmnopqrstuvwxyz".split("").map(n=>[n,n]))),Wn("0123456789".split("").map(n=>[n,n])))};function Wn(n){return n.reduce((t,[e,s])=>Object.assign(Object.assign({},t),{[e]:s}),{})}class Vr{constructor(t=document.documentElement,e=Ir){this.logger=console,this.debug=!1,this.logDebugActivity=(s,i,r={})=>{this.debug&&this.logFormattedMessage(s,i,r)},this.element=t,this.schema=e,this.dispatcher=new Xi(this),this.router=new Nr(this),this.actionDescriptorFilters=Object.assign({},Gi)}static start(t,e){const s=new this(t,e);return s.start(),s}async start(){await jr(),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(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(i=>{i.controllerConstructor.shouldLoad&&this.router.loadDefinition(i)})}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(i=>this.router.unloadIdentifier(i))}get controllers(){return this.router.contexts.map(t=>t.controller)}getControllerForElementAndIdentifier(t,e){const s=this.router.getContextForElementAndIdentifier(t,e);return s?s.controller:null}handleError(t,e,s){var i;this.logger.error(`%s
|
92
|
+
`),processed:s}}function zt(n,t){return t?"- ":`${n+1}. `}function ga(n,t){let e,s,i;return n.orderedList?(s=Gs(t),e=Zs(s.text),i=e.text):(s=Zs(t),e=Gs(s.text),i=e.text),[s,e,i]}function ba(n,t){const e=n.selectionStart===n.selectionEnd;let s=n.selectionStart,i=n.selectionEnd;da(n);const r=n.value.slice(n.selectionStart,n.selectionEnd),[o,a,l]=ga(t,r),c=l.split(`
|
93
|
+
`).map((g,b)=>`${zt(b,t.unorderedList)}${g}`),u=c.reduce((g,b,p)=>g+zt(p,t.unorderedList).length,0),h=c.reduce((g,b,p)=>g+zt(p,!t.unorderedList).length,0);if(o.processed)return e?(s=Math.max(s-zt(0,t.unorderedList).length,0),i=s):(s=n.selectionStart,i=n.selectionEnd-u),{text:l,selectionStart:s,selectionEnd:i};const{newlinesToAppend:d,newlinesToPrepend:m}=jn(n),f=d+c.join(`
|
94
|
+
`)+m;return e?(s=Math.max(s+zt(0,t.unorderedList).length+d.length,0),i=s):a.processed?(s=Math.max(n.selectionStart+d.length,0),i=n.selectionEnd+d.length+u-h):(s=Math.max(n.selectionStart+d.length,0),i=n.selectionEnd+d.length+u),{text:f,selectionStart:s,selectionEnd:i}}function pn(n,t){const e=n.closest("markdown-toolbar");if(!(e instanceof ke))return;const i=Object.assign(Object.assign({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1}),t),r=e.field;r&&(r.focus(),ha(r,i))}localStorage.getItem("theme");window.matchMedia("(prefers-color-scheme: dark)").matches;class ya{constructor(t,e,s){this.eventTarget=t,this.eventName=e,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(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=va(t);for(const s of this.bindings){if(e.immediatePropagationStopped)break;s.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((t,e)=>{const s=t.index,i=e.index;return s<i?-1:s>i?1:0})}}function va(n){if("immediatePropagationStopped"in n)return n;{const{stopImmediatePropagation:t}=n;return Object.assign(n,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,t.call(this)}})}}class wa{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(t=>t.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(t=>t.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((t,e)=>t.concat(Array.from(e.values())),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,s={}){this.application.handleError(t,`Error ${e}`,s)}clearEventListenersForBinding(t){const e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){const{eventTarget:e,eventName:s,eventOptions:i}=t,r=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(s,i);r.delete(o),r.size==0&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:s,eventOptions:i}=t;return this.fetchEventListener(e,s,i)}fetchEventListener(t,e,s){const i=this.fetchEventListenerMapForEventTarget(t),r=this.cacheKey(e,s);let o=i.get(r);return o||(o=this.createEventListener(t,e,s),i.set(r,o)),o}createEventListener(t,e,s){const i=new ya(t,e,s);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const s=[t];return Object.keys(e).sort().forEach(i=>{s.push(`${e[i]?"":"!"}${i}`)}),s.join(":")}}const Ea={stop({event:n,value:t}){return t&&n.stopPropagation(),!0},prevent({event:n,value:t}){return t&&n.preventDefault(),!0},self({event:n,value:t,element:e}){return t?e===n.target:!0}},Ta=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function Aa(n){const e=n.trim().match(Ta)||[];let s=e[2],i=e[3];return i&&!["keydown","keyup","keypress"].includes(s)&&(s+=`.${i}`,i=""),{eventTarget:xa(e[4]),eventName:s,eventOptions:e[7]?Sa(e[7]):{},identifier:e[5],methodName:e[6],keyFilter:e[1]||i}}function xa(n){if(n=="window")return window;if(n=="document")return document}function Sa(n){return n.split(":").reduce((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)}),{})}function Ma(n){if(n==window)return"window";if(n==document)return"document"}function Kn(n){return n.replace(/(?:[_-])([a-z0-9])/g,(t,e)=>e.toUpperCase())}function gn(n){return Kn(n.replace(/--/g,"-").replace(/__/g,"_"))}function de(n){return n.charAt(0).toUpperCase()+n.slice(1)}function ir(n){return n.replace(/([A-Z])/g,(t,e)=>`-${e.toLowerCase()}`)}function Oa(n){return n.match(/[^\s]+/g)||[]}function Qs(n){return n!=null}function bn(n,t){return Object.prototype.hasOwnProperty.call(n,t)}const Js=["meta","ctrl","alt","shift"];class Ca{constructor(t,e,s,i){this.element=t,this.index=e,this.eventTarget=s.eventTarget||t,this.eventName=s.eventName||ka(t)||Ee("missing event name"),this.eventOptions=s.eventOptions||{},this.identifier=s.identifier||Ee("missing identifier"),this.methodName=s.methodName||Ee("missing method name"),this.keyFilter=s.keyFilter||"",this.schema=i}static forToken(t,e){return new this(t.element,t.index,Aa(t.content),e)}toString(){const t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(t){if(!this.keyFilter)return!1;const e=this.keyFilter.split("+");if(this.keyFilterDissatisfied(t,e))return!0;const s=e.filter(i=>!Js.includes(i))[0];return s?(bn(this.keyMappings,s)||Ee(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[s].toLowerCase()!==t.key.toLowerCase()):!1}shouldIgnoreMouseEvent(t){if(!this.keyFilter)return!1;const e=[this.keyFilter];return!!this.keyFilterDissatisfied(t,e)}get params(){const t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:s,value:i}of Array.from(this.element.attributes)){const r=s.match(e),o=r&&r[1];o&&(t[Kn(o)]=La(i))}return t}get eventTargetName(){return Ma(this.eventTarget)}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(t,e){const[s,i,r,o]=Js.map(a=>e.includes(a));return t.metaKey!==s||t.ctrlKey!==i||t.altKey!==r||t.shiftKey!==o}}const ti={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:n=>n.getAttribute("type")=="submit"?"click":"input",select:()=>"change",textarea:()=>"input"};function ka(n){const t=n.tagName.toLowerCase();if(t in ti)return ti[t](n)}function Ee(n){throw new Error(n)}function La(n){try{return JSON.parse(n)}catch{return n}}class Fa{constructor(t,e){this.context=t,this.action=e}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(t){const e=this.prepareActionEvent(t);this.willBeInvokedByEvent(t)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if(typeof t=="function")return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){const{element:e}=this.action,{actionDescriptorFilters:s}=this.context.application,{controller:i}=this.context;let r=!0;for(const[o,a]of Object.entries(this.eventOptions))if(o in s){const l=s[o];r=r&&l({name:o,value:a,event:t,element:e,controller:i})}else continue;return r}prepareActionEvent(t){return Object.assign(t,{params:this.action.params})}invokeWithEvent(t){const{target:e,currentTarget:s}=t;try{this.method.call(this.controller,t),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:s,action:this.methodName})}catch(i){const{identifier:r,controller:o,element:a,index:l}=this,c={identifier:r,controller:o,element:a,index:l,event:t};this.context.handleError(i,`invoking action "${this.action}"`,c)}}willBeInvokedByEvent(t){const e=t.target;return t instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(t)||t instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(t)?!1:this.element===e?!0:e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):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 rr{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,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(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),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 t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){t.type=="attributes"?this.processAttributeChange(t.target,t.attributeName):t.type=="childList"&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){this.elements.has(t)?this.delegate.elementAttributeChanged&&this.matchElement(t)?this.delegate.elementAttributeChanged(t,e):this.removeElement(t):this.matchElement(t)&&this.addElement(t)}processRemovedNodes(t){for(const e of Array.from(t)){const s=this.elementFromNode(e);s&&this.processTree(s,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const s=this.elementFromNode(e);s&&this.elementIsActive(s)&&this.processTree(s,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const s of this.matchElementsInTree(t))e.call(this,s)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected!=this.element.isConnected?!1:this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class or{constructor(t,e,s){this.attributeName=e,this.delegate=s,this.elementObserver=new rr(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],s=Array.from(t.querySelectorAll(this.selector));return e.concat(s)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}function Da(n,t,e){ar(n,t).add(e)}function Va(n,t,e){ar(n,t).delete(e),_a(n,t)}function ar(n,t){let e=n.get(t);return e||(e=new Set,n.set(t,e)),e}function _a(n,t){const e=n.get(t);e!=null&&e.size==0&&n.delete(t)}class yt{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((e,s)=>e.concat(Array.from(s)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((e,s)=>e+s.size,0)}add(t,e){Da(this.valuesByKey,t,e)}delete(t,e){Va(this.valuesByKey,t,e)}has(t,e){const s=this.valuesByKey.get(t);return s!=null&&s.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some(s=>s.has(t))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter(([e,s])=>s.has(t)).map(([e,s])=>e)}}class Pa{constructor(t,e,s,i){this._selector=e,this.details=i,this.elementObserver=new rr(t,this),this.delegate=s,this.matchesByElement=new yt}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(t){this._selector=t,this.refresh()}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){const{selector:e}=this;if(e){const s=t.matches(e);return this.delegate.selectorMatchElement?s&&this.delegate.selectorMatchElement(t,this.details):s}else return!1}matchElementsInTree(t){const{selector:e}=this;if(e){const s=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(e)).filter(r=>this.matchElement(r));return s.concat(i)}else return[]}elementMatched(t){const{selector:e}=this;e&&this.selectorMatched(t,e)}elementUnmatched(t){const e=this.matchesByElement.getKeysForValue(t);for(const s of e)this.selectorUnmatched(t,s)}elementAttributeChanged(t,e){const{selector:s}=this;if(s){const i=this.matchElement(t),r=this.matchesByElement.has(s,t);i&&!r?this.selectorMatched(t,s):!i&&r&&this.selectorUnmatched(t,s)}}selectorMatched(t,e){this.delegate.selectorMatched(t,e,this.details),this.matchesByElement.add(e,t)}selectorUnmatched(t,e){this.delegate.selectorUnmatched(t,e,this.details),this.matchesByElement.delete(e,t)}}class Ba{constructor(t,e){this.element=t,this.delegate=e,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 t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const s=this.delegate.getStringMapKeyForAttribute(t);if(s!=null){this.stringMap.has(t)||this.stringMapKeyAdded(s,t);const i=this.element.getAttribute(t);if(this.stringMap.get(t)!=i&&this.stringMapValueChanged(i,s,e),i==null){const r=this.stringMap.get(t);this.stringMap.delete(t),r&&this.stringMapKeyRemoved(s,t,r)}else this.stringMap.set(t,i)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,s){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,s)}stringMapKeyRemoved(t,e,s){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,s)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(t=>t.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class lr{constructor(t,e,s){this.attributeObserver=new or(t,e,this),this.delegate=s,this.tokensByElement=new yt}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,s]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(s)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach(e=>this.tokenMatched(e))}tokensUnmatched(t){t.forEach(e=>this.tokenUnmatched(e))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),s=this.readTokensForElement(t),i=Ia(e,s).findIndex(([r,o])=>!Na(r,o));return i==-1?[[],[]]:[e.slice(i),s.slice(i)]}readTokensForElement(t){const e=this.attributeName,s=t.getAttribute(e)||"";return Ra(s,t,e)}}function Ra(n,t,e){return n.trim().split(/\s+/).filter(s=>s.length).map((s,i)=>({element:t,attributeName:e,content:s,index:i}))}function Ia(n,t){const e=Math.max(n.length,t.length);return Array.from({length:e},(s,i)=>[n[i],t[i]])}function Na(n,t){return n&&t&&n.index==t.index&&n.content==t.content}class cr{constructor(t,e,s){this.tokenListObserver=new lr(t,e,this),this.delegate=s,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:s}=this.fetchParseResultForToken(t);s&&(this.fetchValuesByTokenForElement(e).set(t,s),this.delegate.elementMatchedValue(e,s))}tokenUnmatched(t){const{element:e}=t,{value:s}=this.fetchParseResultForToken(t);s&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,s))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(e){return{error:e}}}}class $a{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new cr(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(t){const e=new Fa(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach(t=>this.delegate.bindingDisconnected(t,!0)),this.bindingsByAction.clear()}parseValueForToken(t){const e=Ca.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class ja{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new Ba(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(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const s=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,s.writer(this.receiver[t]),s.writer(s.defaultValue))}stringMapValueChanged(t,e,s){const i=this.valueDescriptorNameMap[e];t!==null&&(s===null&&(s=i.writer(i.defaultValue)),this.invokeChangedCallback(e,t,s))}stringMapKeyRemoved(t,e,s){const i=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,i.writer(this.receiver[t]),s):this.invokeChangedCallback(t,i.writer(i.defaultValue),s)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:s,writer:i}of this.valueDescriptors)s!=null&&!this.controller.data.has(t)&&this.invokeChangedCallback(e,i(s),void 0)}invokeChangedCallback(t,e,s){const i=`${t}Changed`,r=this.receiver[i];if(typeof r=="function"){const o=this.valueDescriptorNameMap[t];try{const a=o.reader(e);let l=s;s&&(l=o.reader(s)),r.call(this.receiver,a,l)}catch(a){throw a instanceof TypeError&&(a.message=`Stimulus Value "${this.context.identifier}.${o.name}" - ${a.message}`),a}}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map(e=>t[e])}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach(e=>{const s=this.valueDescriptorMap[e];t[s.name]=s}),t}hasValue(t){const e=this.valueDescriptorNameMap[t],s=`has${de(e.name)}`;return this.receiver[s]}}class Ka{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new yt}start(){this.tokenListObserver||(this.tokenListObserver=new lr(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var s;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),(s=this.tokenListObserver)===null||s===void 0||s.pause(()=>this.delegate.targetConnected(t,e)))}disconnectTarget(t,e){var s;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),(s=this.tokenListObserver)===null||s===void 0||s.pause(()=>this.delegate.targetDisconnected(t,e)))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function fe(n,t){const e=ur(n);return Array.from(e.reduce((s,i)=>(Ua(i,t).forEach(r=>s.add(r)),s),new Set))}function Ha(n,t){return ur(n).reduce((s,i)=>(s.push(...Wa(i,t)),s),[])}function ur(n){const t=[];for(;n;)t.push(n),n=Object.getPrototypeOf(n);return t.reverse()}function Ua(n,t){const e=n[t];return Array.isArray(e)?e:[]}function Wa(n,t){const e=n[t];return e?Object.keys(e).map(s=>[s,e[s]]):[]}class za{constructor(t,e){this.started=!1,this.context=t,this.delegate=e,this.outletsByName=new yt,this.outletElementsByName=new yt,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(t=>{this.setupSelectorObserverForOutlet(t),this.setupAttributeObserverForOutlet(t)}),this.started=!0,this.dependentContexts.forEach(t=>t.refresh()))}refresh(){this.selectorObserverMap.forEach(t=>t.refresh()),this.attributeObserverMap.forEach(t=>t.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(t=>t.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(t=>t.stop()),this.attributeObserverMap.clear())}selectorMatched(t,e,{outletName:s}){const i=this.getOutlet(t,s);i&&this.connectOutlet(i,t,s)}selectorUnmatched(t,e,{outletName:s}){const i=this.getOutletFromMap(t,s);i&&this.disconnectOutlet(i,t,s)}selectorMatchElement(t,{outletName:e}){const s=this.selector(e),i=this.hasOutlet(t,e),r=t.matches(`[${this.schema.controllerAttribute}~=${e}]`);return s?i&&r&&t.matches(s):!1}elementMatchedAttribute(t,e){const s=this.getOutletNameFromOutletAttributeName(e);s&&this.updateSelectorObserverForOutlet(s)}elementAttributeValueChanged(t,e){const s=this.getOutletNameFromOutletAttributeName(e);s&&this.updateSelectorObserverForOutlet(s)}elementUnmatchedAttribute(t,e){const s=this.getOutletNameFromOutletAttributeName(e);s&&this.updateSelectorObserverForOutlet(s)}connectOutlet(t,e,s){var i;this.outletElementsByName.has(s,e)||(this.outletsByName.add(s,t),this.outletElementsByName.add(s,e),(i=this.selectorObserverMap.get(s))===null||i===void 0||i.pause(()=>this.delegate.outletConnected(t,e,s)))}disconnectOutlet(t,e,s){var i;this.outletElementsByName.has(s,e)&&(this.outletsByName.delete(s,t),this.outletElementsByName.delete(s,e),(i=this.selectorObserverMap.get(s))===null||i===void 0||i.pause(()=>this.delegate.outletDisconnected(t,e,s)))}disconnectAllOutlets(){for(const t of this.outletElementsByName.keys)for(const e of this.outletElementsByName.getValuesForKey(t))for(const s of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(s,e,t)}updateSelectorObserverForOutlet(t){const e=this.selectorObserverMap.get(t);e&&(e.selector=this.selector(t))}setupSelectorObserverForOutlet(t){const e=this.selector(t),s=new Pa(document.body,e,this,{outletName:t});this.selectorObserverMap.set(t,s),s.start()}setupAttributeObserverForOutlet(t){const e=this.attributeNameForOutletName(t),s=new or(this.scope.element,e,this);this.attributeObserverMap.set(t,s),s.start()}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}attributeNameForOutletName(t){return this.scope.schema.outletAttributeForScope(this.identifier,t)}getOutletNameFromOutletAttributeName(t){return this.outletDefinitions.find(e=>this.attributeNameForOutletName(e)===t)}get outletDependencies(){const t=new yt;return this.router.modules.forEach(e=>{const s=e.definition.controllerConstructor;fe(s,"outlets").forEach(r=>t.add(r,e.identifier))}),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const t=this.dependentControllerIdentifiers;return this.router.contexts.filter(e=>t.includes(e.identifier))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find(s=>s.element===t)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class qa{constructor(t,e){this.logDebugActivity=(s,i={})=>{const{identifier:r,controller:o,element:a}=this;i=Object.assign({identifier:r,controller:o,element:a},i),this.application.logDebugActivity(this.identifier,s,i)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new $a(this,this.dispatcher),this.valueObserver=new ja(this,this.controller),this.targetObserver=new Ka(this,this),this.outletObserver=new za(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(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),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}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,s={}){const{identifier:i,controller:r,element:o}=this;s=Object.assign({identifier:i,controller:r,element:o},s),this.application.handleError(t,`Error ${e}`,s)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,s){this.invokeControllerMethod(`${gn(s)}OutletConnected`,t,e)}outletDisconnected(t,e,s){this.invokeControllerMethod(`${gn(s)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){const s=this.controller;typeof s[t]=="function"&&s[t](...e)}}function Ya(n){return Xa(n,Ga(n))}function Xa(n,t){const e=tl(n),s=Za(n.prototype,t);return Object.defineProperties(e.prototype,s),e}function Ga(n){return fe(n,"blessings").reduce((e,s)=>{const i=s(n);for(const r in i){const o=e[r]||{};e[r]=Object.assign(o,i[r])}return e},{})}function Za(n,t){return Ja(t).reduce((e,s)=>{const i=Qa(n,t,s);return i&&Object.assign(e,{[s]:i}),e},{})}function Qa(n,t,e){const s=Object.getOwnPropertyDescriptor(n,e);if(!(s&&"value"in s)){const r=Object.getOwnPropertyDescriptor(t,e).value;return s&&(r.get=s.get||r.get,r.set=s.set||r.set),r}}const Ja=typeof Object.getOwnPropertySymbols=="function"?n=>[...Object.getOwnPropertyNames(n),...Object.getOwnPropertySymbols(n)]:Object.getOwnPropertyNames,tl=(()=>{function n(e){function s(){return Reflect.construct(e,arguments,new.target)}return s.prototype=Object.create(e.prototype,{constructor:{value:s}}),Reflect.setPrototypeOf(s,e),s}function t(){const s=n(function(){this.a.call(this)});return s.prototype.a=function(){},new s}try{return t(),n}catch{return s=>class extends s{}}})();function el(n){return{identifier:n.identifier,controllerConstructor:Ya(n.controllerConstructor)}}class nl{constructor(t,e){this.application=t,this.definition=el(e),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(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new qa(this,t),this.contextsByScope.set(t,e)),e}}class sl{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){const e=this.data.get(this.getDataKey(t))||"";return Oa(e)}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class il{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const s=this.getAttributeNameForKey(t);return this.element.setAttribute(s,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}else return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${ir(t)}`}}class rl{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,s){let i=this.warnedKeysByObject.get(t);i||(i=new Set,this.warnedKeysByObject.set(t,i)),i.has(e)||(i.add(e),this.logger.warn(s,t))}}function yn(n,t){return`[${n}~="${t}"]`}class ol{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,s)=>e||this.findTarget(s)||this.findLegacyTarget(s),void 0)}findAll(...t){return t.reduce((e,s)=>[...e,...this.findAllTargets(s),...this.findAllLegacyTargets(s)],[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){const e=this.schema.targetAttributeForScope(this.identifier);return yn(e,t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map(s=>this.deprecate(s,t))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return yn(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:s}=this,i=this.schema.targetAttribute,r=this.schema.targetAttributeForScope(s);this.guide.warn(t,`target:${e}`,`Please replace ${i}="${s}.${e}" with ${r}="${e}". The ${i} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class al{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return this.find(t)!=null}find(...t){return t.reduce((e,s)=>e||this.findOutlet(s),void 0)}findAll(...t){return t.reduce((e,s)=>[...e,...this.findAllOutlets(s)],[])}getSelectorForOutletName(t){const e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){const e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){const e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter(i=>this.matchesElement(i,t,e))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter(i=>this.matchesElement(i,t,e))}matchesElement(t,e,s){const i=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&i.split(" ").includes(s)}}class Hn{constructor(t,e,s,i){this.targets=new ol(this),this.classes=new sl(this),this.data=new il(this),this.containsElement=r=>r.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=s,this.guide=new rl(i),this.outlets=new al(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return yn(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Hn(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class ll{constructor(t,e,s){this.element=t,this.schema=e,this.delegate=s,this.valueListObserver=new cr(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(t){const{element:e,content:s}=t;return this.parseValueForElementAndIdentifier(e,s)}parseValueForElementAndIdentifier(t,e){const s=this.fetchScopesByIdentifierForElement(t);let i=s.get(e);return i||(i=this.delegate.createScopeForElementAndIdentifier(t,e),s.set(e,i)),i}elementMatchedValue(t,e){const s=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,s),s==1&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const s=this.scopeReferenceCounts.get(e);s&&(this.scopeReferenceCounts.set(e,s-1),s==1&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class cl{constructor(t){this.application=t,this.scopeObserver=new ll(this.element,this.schema,this),this.scopesByIdentifier=new yt,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((t,e)=>t.concat(e.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new nl(this.application,t);this.connectModule(e);const s=t.controllerConstructor.afterLoad;s&&s.call(t.controllerConstructor,t.identifier,this.application)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const s=this.modulesByIdentifier.get(e);if(s)return s.contexts.find(i=>i.element==t)}proposeToConnectScopeForElementAndIdentifier(t,e){const s=this.scopeObserver.parseValueForElementAndIdentifier(t,e);s?this.scopeObserver.elementMatchedValue(s.element,s):console.error(`Couldn't find or create scope for identifier: "${e}" and element:`,t)}handleError(t,e,s){this.application.handleError(t,e,s)}createScopeForElementAndIdentifier(t,e){return new Hn(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(s=>t.connectContextForScope(s))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(s=>t.disconnectContextForScope(s))}}const ul={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:n=>`data-${n}-target`,outletAttributeForScope:(n,t)=>`data-${n}-${t}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},ei("abcdefghijklmnopqrstuvwxyz".split("").map(n=>[n,n]))),ei("0123456789".split("").map(n=>[n,n])))};function ei(n){return n.reduce((t,[e,s])=>Object.assign(Object.assign({},t),{[e]:s}),{})}class hl{constructor(t=document.documentElement,e=ul){this.logger=console,this.debug=!1,this.logDebugActivity=(s,i,r={})=>{this.debug&&this.logFormattedMessage(s,i,r)},this.element=t,this.schema=e,this.dispatcher=new wa(this),this.router=new cl(this),this.actionDescriptorFilters=Object.assign({},Ea)}static start(t,e){const s=new this(t,e);return s.start(),s}async start(){await dl(),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(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(i=>{i.controllerConstructor.shouldLoad&&this.router.loadDefinition(i)})}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(i=>this.router.unloadIdentifier(i))}get controllers(){return this.router.contexts.map(t=>t.controller)}getControllerForElementAndIdentifier(t,e){const s=this.router.getContextForElementAndIdentifier(t,e);return s?s.controller:null}handleError(t,e,s){var i;this.logger.error(`%s
|
95
95
|
|
96
96
|
%o
|
97
97
|
|
98
|
-
%o`,e,t,s),(i=window.onerror)===null||i===void 0||i.call(window,e,"",0,0,t)}logFormattedMessage(t,e,s={}){s=Object.assign({application:this},s),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},s)),this.logger.groupEnd()}}function jr(){return new Promise(n=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>n()):n()})}function Hr(n){return Kt(n,"classes").reduce((e,s)=>Object.assign(e,Ur(s)),{})}function Ur(n){return{[`${n}Class`]:{get(){const{classes:t}=this;if(t.has(n))return t.get(n);{const e=t.getAttributeName(n);throw new Error(`Missing attribute "${e}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${Wt(n)}Class`]:{get(){return this.classes.has(n)}}}}function Wr(n){return Kt(n,"outlets").reduce((e,s)=>Object.assign(e,Kr(s)),{})}function Kn(n,t,e){return n.application.getControllerForElementAndIdentifier(t,e)}function zn(n,t,e){let s=Kn(n,t,e);if(s||(n.application.router.proposeToConnectScopeForElementAndIdentifier(t,e),s=Kn(n,t,e),s))return s}function Kr(n){const t=Fe(n);return{[`${t}Outlet`]:{get(){const e=this.outlets.find(n),s=this.outlets.getSelectorForOutletName(n);if(e){const i=zn(this,e,n);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${n}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${n}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}Outlets`]:{get(){const e=this.outlets.findAll(n);return e.length>0?e.map(s=>{const i=zn(this,s,n);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${n}" instance for host controller "${this.identifier}"`,s)}).filter(s=>s):[]}},[`${t}OutletElement`]:{get(){const e=this.outlets.find(n),s=this.outlets.getSelectorForOutletName(n);if(e)return e;throw new Error(`Missing outlet element "${n}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(n)}},[`has${Wt(t)}Outlet`]:{get(){return this.outlets.has(n)}}}}function zr(n){return Kt(n,"targets").reduce((e,s)=>Object.assign(e,qr(s)),{})}function qr(n){return{[`${n}Target`]:{get(){const t=this.targets.find(n);if(t)return t;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${Wt(n)}Target`]:{get(){return this.targets.has(n)}}}}function Yr(n){const t=vr(n,"values"),e={valueDescriptorMap:{get(){return t.reduce((s,i)=>{const r=Ds(i,this.identifier),o=this.data.getAttributeNameForKey(r.key);return Object.assign(s,{[o]:r})},{})}}};return t.reduce((s,i)=>Object.assign(s,Xr(i)),e)}function Xr(n,t){const e=Ds(n,t),{key:s,name:i,reader:r,writer:o}=e;return{[i]:{get(){const a=this.data.get(s);return a!==null?r(a):e.defaultValue},set(a){a===void 0?this.data.delete(s):this.data.set(s,o(a))}},[`has${Wt(i)}`]:{get(){return this.data.has(s)||e.hasCustomDefaultValue}}}}function Ds([n,t],e){return Qr({controller:e,token:n,typeDefinition:t})}function te(n){switch(n){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function jt(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(n))return"array";if(Object.prototype.toString.call(n)==="[object Object]")return"object"}function Gr(n){const{controller:t,token:e,typeObject:s}=n,i=jn(s.type),r=jn(s.default),o=i&&r,a=i&&!r,l=!i&&r,c=te(s.type),u=jt(n.typeObject.default);if(a)return c;if(l)return u;if(c!==u){const d=t?`${t}.${e}`:e;throw new Error(`The specified default value for the Stimulus Value "${d}" must match the defined type "${c}". The provided default value of "${s.default}" is of type "${u}".`)}if(o)return c}function Zr(n){const{controller:t,token:e,typeDefinition:s}=n,r=Gr({controller:t,token:e,typeObject:s}),o=jt(s),a=te(s),l=r||o||a;if(l)return l;const c=t?`${t}.${s}`:e;throw new Error(`Unknown value type "${c}" for "${e}" value`)}function Jr(n){const t=te(n);if(t)return qn[t];const e=Be(n,"default"),s=Be(n,"type"),i=n;if(e)return i.default;if(s){const{type:r}=i,o=te(r);if(o)return qn[o]}return n}function Qr(n){const{token:t,typeDefinition:e}=n,s=`${Os(t)}-value`,i=Zr(n);return{type:i,key:s,name:Xe(s),get defaultValue(){return Jr(e)},get hasCustomDefaultValue(){return jt(e)!==void 0},reader:to[i],writer:Yn[i]||Yn.default}}const qn={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},to={array(n){const t=JSON.parse(n);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${n}" of type "${jt(t)}"`);return t},boolean(n){return!(n=="0"||String(n).toLowerCase()=="false")},number(n){return Number(n.replace(/_/g,""))},object(n){const t=JSON.parse(n);if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${n}" of type "${jt(t)}"`);return t},string(n){return n}},Yn={default:eo,array:Xn,object:Xn};function Xn(n){return JSON.stringify(n)}function eo(n){return`${n}`}let st=class{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}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 outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:s={},prefix:i=this.identifier,bubbles:r=!0,cancelable:o=!0}={}){const a=i?`${i}:${t}`:t,l=new CustomEvent(a,{detail:s,bubbles:r,cancelable:o});return e.dispatchEvent(l),l}};st.blessings=[Hr,zr,Yr,Wr];st.targets=[];st.outlets=[];st.values={};function F(){return function({targets:t,values:e}={}){const i=class i extends st{dispatchEvent(o,a,l={}){const c=new Event(a,{bubbles:l.bubbles||!1,cancelable:l.cancelable||!1});o.dispatchEvent(c)}};i.targets=Object.keys(t??{}),i.values=e??{};let s=i;return s}}class no extends F()({targets:{toggle:HTMLInputElement},values:{formMethod:String,formUrl:String,csrfToken:String,turbo:Boolean}}){connect(){this.toggling=!1}requiresFormSubmit(){return this.formUrlValue!=null}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.requiresFormSubmit()){this.performToggle(),this.toggling=!1;return}this.performToggle();try{await this.submitForm()}catch(t){t instanceof Error&&this.performToggle();return}finally{this.toggling=!1}}}performToggle(){this.isOn()?this.turnOff():this.turnOn()}turnOn(){this.isDisabled()||this.toggleTarget.setAttribute("aria-pressed","true")}turnOff(){this.isDisabled()||this.toggleTarget.setAttribute("aria-pressed","false")}isOn(){return this.toggleTarget.getAttribute("aria-pressed")==="true"}isOff(){return!this.isOn()}isDisabled(){return this.toggleTarget.getAttribute("disabled")!=null}async submitForm(){const t=new FormData,e=this.documentCsrfToken()||this.csrfTokenValue;if(e&&t.append(this.csrfField(),e),t.append(this.toggleTarget.name,this.isOn()?"true":"false"),!this.formUrlValue)throw new Error("invalid src");let s;const i={"Requested-With":"XMLHttpRequest"};this.turboValue&&(i.Accept="text/vnd.turbo-stream.html");try{s=await fetch(this.formUrlValue,{credentials:"same-origin",method:this.formMethodValue,headers:i,body:t})}catch(o){throw new Error(`A network error occurred, please try again: ${o.message}`)}if(!s.ok)throw new Error(await s.text());const r=s.headers.get("Content-Type");window.Turbo&&this.turbo&&(r!=null&&r.startsWith("text/vnd.turbo-stream.html"))&&window.Turbo.renderStreamMessage(await s.text())}csrfField(){return this.toggleTarget.getAttribute("csrf-field")||"authenticity_token"}documentCsrfToken(){const t=document.querySelector("meta[name=csrf-token]");return t&&t.getAttribute("content")}}const so=Object.freeze(Object.defineProperty({__proto__:null,default:no},Symbol.toStringTag,{value:"Module"})),dn=class dn extends F()({targets:{content:HTMLElement,chevron:HTMLElement},values:{open:{type:Boolean,default:!1}}}){connect(){this.applyState(this.openValue)}toggle(t){t&&t.stopPropagation(),this.openValue=!this.openValue}openValueChanged(t){this.applyState(t)}applyState(t){const e=this.contentTarget,s=this.hasChevronTarget?this.chevronTarget:null,i=e.scrollHeight;t?(e.classList.add("ariadne:animate-accordion-down"),e.classList.remove("ariadne:animate-accordion-up"),e.style.height=`${i}px`,this.element.classList.add("ariadne-sidebar-group-open"),this.element.classList.remove("ariadne-sidebar-group-closed"),s&&s.classList.add("ariadne:rotate-90"),setTimeout(()=>{this.openValue&&(e.style.height="auto")},200)):(e.classList.add("ariadne:animate-accordion-up"),e.classList.remove("ariadne:animate-accordion-down"),e.style.height=`${i}px`,e.offsetHeight,e.style.height="0px",this.element.classList.add("ariadne-sidebar-group-closed"),this.element.classList.remove("ariadne-sidebar-group-open"),s&&s.classList.remove("ariadne:rotate-90"))}};dn.classes=["open","closed"];let Re=dn;const io=Object.freeze(Object.defineProperty({__proto__:null,default:Re},Symbol.toStringTag,{value:"Module"}));function ro(n,t){n.indexOf(t)===-1&&n.push(t)}const Fs=(n,t,e)=>Math.min(Math.max(e,n),t),I={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"},ee=n=>typeof n=="number",yt=n=>Array.isArray(n)&&!ee(n[0]),oo=(n,t,e)=>{const s=t-n;return((e-n)%s+s)%s+n};function ao(n,t){return yt(n)?n[oo(0,n.length,t)]:n}const Bs=(n,t,e)=>-e*n+e*t+n,Ps=()=>{},Q=n=>n,Ze=(n,t,e)=>t-n===0?1:(e-n)/(t-n);function Rs(n,t){const e=n[n.length-1];for(let s=1;s<=t;s++){const i=Ze(0,t,s);n.push(Bs(e,1,i))}}function lo(n){const t=[0];return Rs(t,n-1),t}function co(n,t=lo(n.length),e=Q){const s=n.length,i=s-t.length;return i>0&&Rs(t,i),r=>{let o=0;for(;o<s-2&&!(r<t[o+1]);o++);let a=Fs(0,1,Ze(t[o],t[o+1],r));return a=ao(e,o)(a),Bs(n[o],n[o+1],a)}}const $s=n=>Array.isArray(n)&&ee(n[0]),$e=n=>typeof n=="object"&&!!n.createAnimation,Tt=n=>typeof n=="function",uo=n=>typeof n=="string",$t={ms:n=>n*1e3,s:n=>n/1e3},Ns=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,ho=1e-7,fo=12;function mo(n,t,e,s,i){let r,o,a=0;do o=t+(e-t)/2,r=Ns(o,s,i)-n,r>0?e=o:t=o;while(Math.abs(r)>ho&&++a<fo);return o}function Ft(n,t,e,s){if(n===t&&e===s)return Q;const i=r=>mo(r,0,1,n,e);return r=>r===0||r===1?r:Ns(i(r),t,s)}const po=(n,t="end")=>e=>{e=t==="end"?Math.min(e,.999):Math.max(e,.001);const s=e*n,i=t==="end"?Math.floor(s):Math.ceil(s);return Fs(0,1,i/n)},go={ease:Ft(.25,.1,.25,1),"ease-in":Ft(.42,0,1,1),"ease-in-out":Ft(.42,0,.58,1),"ease-out":Ft(0,0,.58,1)},bo=/\((.*?)\)/;function Gn(n){if(Tt(n))return n;if($s(n))return Ft(...n);const t=go[n];if(t)return t;if(n.startsWith("steps")){const e=bo.exec(n);if(e){const s=e[1].split(",");return po(parseFloat(s[0]),s[1].trim())}}return Q}class Is{constructor(t,e=[0,1],{easing:s,duration:i=I.duration,delay:r=I.delay,endDelay:o=I.endDelay,repeat:a=I.repeat,offset:l,direction:c="normal",autoplay:u=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=Q,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((h,m)=>{this.resolve=h,this.reject=m}),s=s||I.easing,$e(s)){const h=s.createAnimation(e);s=h.easing,e=h.keyframes||e,i=h.duration||i}this.repeat=a,this.easing=yt(s)?Q:Gn(s),this.updateDuration(i);const d=co(e,l,yt(s)?s.map(Gn):Q);this.tick=h=>{var m;r=r;let f=0;this.pauseTime!==void 0?f=this.pauseTime:f=(h-this.startTime)*this.rate,this.t=f,f/=1e3,f=Math.max(f-r,0),this.playState==="finished"&&this.pauseTime===void 0&&(f=this.totalDuration);const p=f/this.duration;let b=Math.floor(p),g=p%1;!g&&p>=1&&(g=1),g===1&&b--;const w=b%2;(c==="reverse"||c==="alternate"&&w||c==="alternate-reverse"&&!w)&&(g=1-g);const E=f>=this.totalDuration?1:Math.min(g,1),v=d(this.easing(E));t(v),this.pauseTime===void 0&&(this.playState==="finished"||f>=this.totalDuration+o)?(this.playState="finished",(m=this.resolve)===null||m===void 0||m.call(this,v)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},u&&this.play()}play(){const t=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=t-this.pauseTime:this.startTime||(this.startTime=t),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var t;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(t=this.reject)===null||t===void 0||t.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(t){this.duration=t,this.totalDuration=t*(this.repeat+1)}get currentTime(){return this.t}set currentTime(t){this.pauseTime!==void 0||this.rate===0?this.pauseTime=t:this.startTime=performance.now()-t/this.rate}get playbackRate(){return this.rate}set playbackRate(t){this.rate=t}}class vo{setAnimation(t){this.animation=t,t==null||t.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}}const Ee=new WeakMap;function Vs(n){return Ee.has(n)||Ee.set(n,{transforms:[],values:new Map}),Ee.get(n)}function yo(n,t){return n.has(t)||n.set(t,new vo),n.get(t)}const wo=["","X","Y","Z"],Eo=["translate","scale","rotate","skew"],ne={x:"translateX",y:"translateY",z:"translateZ"},Zn={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:n=>n+"deg"},To={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:n=>n+"px"},rotate:Zn,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:Q},skew:Zn},Ht=new Map,Je=n=>`--motion-${n}`,se=["x","y","z"];Eo.forEach(n=>{wo.forEach(t=>{se.push(n+t),Ht.set(Je(n+t),To[n])})});const Ao=(n,t)=>se.indexOf(n)-se.indexOf(t),xo=new Set(se),js=n=>xo.has(n),Oo=(n,t)=>{ne[t]&&(t=ne[t]);const{transforms:e}=Vs(n);ro(e,t),n.style.transform=So(e)},So=n=>n.sort(Ao).reduce(Mo,"").trim(),Mo=(n,t)=>`${n} ${t}(var(${Je(t)}))`,Ne=n=>n.startsWith("--"),Jn=new Set;function Co(n){if(!Jn.has(n)){Jn.add(n);try{const{syntax:t,initialValue:e}=Ht.has(n)?Ht.get(n):{};CSS.registerProperty({name:n,inherits:!1,syntax:t,initialValue:e})}catch{}}}const Te=(n,t)=>document.createElement("div").animate(n,t),Qn={cssRegisterProperty:()=>typeof CSS<"u"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{Te({opacity:[1]})}catch{return!1}return!0},finished:()=>!!Te({opacity:[0,1]},{duration:.001}).finished,linearEasing:()=>{try{Te({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}},Ae={},pt={};for(const n in Qn)pt[n]=()=>(Ae[n]===void 0&&(Ae[n]=Qn[n]()),Ae[n]);const ko=.015,Lo=(n,t)=>{let e="";const s=Math.round(t/ko);for(let i=0;i<s;i++)e+=n(Ze(0,s-1,i))+", ";return e.substring(0,e.length-2)},ts=(n,t)=>Tt(n)?pt.linearEasing()?`linear(${Lo(n,t)})`:I.easing:$s(n)?_o(n):n,_o=([n,t,e,s])=>`cubic-bezier(${n}, ${t}, ${e}, ${s})`;function Do(n,t){for(let e=0;e<n.length;e++)n[e]===null&&(n[e]=e?n[e-1]:t());return n}const Fo=n=>Array.isArray(n)?n:[n];function Ie(n){return ne[n]&&(n=ne[n]),js(n)?Je(n):n}const Yt={get:(n,t)=>{t=Ie(t);let e=Ne(t)?n.style.getPropertyValue(t):getComputedStyle(n)[t];if(!e&&e!==0){const s=Ht.get(t);s&&(e=s.initialValue)}return e},set:(n,t,e)=>{t=Ie(t),Ne(t)?n.style.setProperty(t,e):n.style[t]=e}};function Hs(n,t=!0){if(!(!n||n.playState==="finished"))try{n.stop?n.stop():(t&&n.commitStyles(),n.cancel())}catch{}}function Bo(n,t){var e;let s=(t==null?void 0:t.toDefaultUnit)||Q;const i=n[n.length-1];if(uo(i)){const r=((e=i.match(/(-?[\d.]+)([a-z%]*)/))===null||e===void 0?void 0:e[2])||"";r&&(s=o=>o+r)}return s}function Po(){return window.__MOTION_DEV_TOOLS_RECORD}function Ro(n,t,e,s={},i){const r=Po(),o=s.record!==!1&&r;let a,{duration:l=I.duration,delay:c=I.delay,endDelay:u=I.endDelay,repeat:d=I.repeat,easing:h=I.easing,persist:m=!1,direction:f,offset:p,allowWebkitAcceleration:b=!1,autoplay:g=!0}=s;const w=Vs(n),E=js(t);let v=pt.waapi();E&&Oo(n,t);const y=Ie(t),O=yo(w.values,y),x=Ht.get(y);return Hs(O.animation,!($e(h)&&O.generator)&&s.record!==!1),()=>{const _=()=>{var A,C;return(C=(A=Yt.get(n,y))!==null&&A!==void 0?A:x==null?void 0:x.initialValue)!==null&&C!==void 0?C:0};let T=Do(Fo(e),_);const D=Bo(T,x);if($e(h)){const A=h.createAnimation(T,t!=="opacity",_,y,O);h=A.easing,T=A.keyframes||T,l=A.duration||l}if(Ne(y)&&(pt.cssRegisterProperty()?Co(y):v=!1),E&&!pt.linearEasing()&&(Tt(h)||yt(h)&&h.some(Tt))&&(v=!1),v){x&&(T=T.map(k=>ee(k)?x.toDefaultUnit(k):k)),T.length===1&&(!pt.partialKeyframes()||o)&&T.unshift(_());const A={delay:$t.ms(c),duration:$t.ms(l),endDelay:$t.ms(u),easing:yt(h)?void 0:ts(h,l),direction:f,iterations:d+1,fill:"both"};a=n.animate({[y]:T,offset:p,easing:yt(h)?h.map(k=>ts(k,l)):void 0},A),a.finished||(a.finished=new Promise((k,M)=>{a.onfinish=k,a.oncancel=M}));const C=T[T.length-1];a.finished.then(()=>{m||(Yt.set(n,y,C),a.cancel())}).catch(Ps),b||(a.playbackRate=1.000001)}else if(i&&E)T=T.map(A=>typeof A=="string"?parseFloat(A):A),T.length===1&&T.unshift(parseFloat(_())),a=new i(A=>{Yt.set(n,y,D?D(A):A)},T,Object.assign(Object.assign({},s),{duration:l,easing:h}));else{const A=T[T.length-1];Yt.set(n,y,x&&ee(A)?x.toDefaultUnit(A):A)}return o&&r(n,t,T,{duration:l,delay:c,easing:h,repeat:d,offset:p},"motion-one"),O.setAnimation(a),a&&!g&&a.pause(),a}}const $o=(n,t)=>n[t]?Object.assign(Object.assign({},n),n[t]):Object.assign({},n);function No(n,t){return typeof n=="string"?n=document.querySelectorAll(n):n instanceof Element&&(n=[n]),Array.from(n||[])}const Io=n=>n(),Us=(n,t,e=I.duration)=>new Proxy({animations:n.map(Io).filter(Boolean),duration:e,options:t},jo),Vo=n=>n.animations[0],jo={get:(n,t)=>{const e=Vo(n);switch(t){case"duration":return n.duration;case"currentTime":return $t.s((e==null?void 0:e[t])||0);case"playbackRate":case"playState":return e==null?void 0:e[t];case"finished":return n.finished||(n.finished=Promise.all(n.animations.map(Ho)).catch(Ps)),n.finished;case"stop":return()=>{n.animations.forEach(s=>Hs(s))};case"forEachNative":return s=>{n.animations.forEach(i=>s(i,n))};default:return typeof(e==null?void 0:e[t])>"u"?void 0:()=>n.animations.forEach(s=>s[t]())}},set:(n,t,e)=>{switch(t){case"currentTime":e=$t.ms(e);case"playbackRate":for(let s=0;s<n.animations.length;s++)n.animations[s][t]=e;return!0}return!1}},Ho=n=>n.finished;function Uo(n,t,e){return Tt(n)?n(t,e):n}function Wo(n){return function(e,s,i={}){e=No(e);const r=e.length,o=[];for(let a=0;a<r;a++){const l=e[a];for(const c in s){const u=$o(i,c);u.delay=Uo(u.delay,a,r);const d=Ro(l,c,s[c],u,n);o.push(d)}}return Us(o,i,i.duration)}}const Ko=Wo(Is);function zo(n,t={}){return Us([()=>{const e=new Is(n,[0,1],t);return e.finished.catch(()=>{}),e}],t,t.duration)}function xe(n,t,e){return(Tt(n)?zo:Ko)(n,t,e)}let qo=class extends F()({targets:{icon:HTMLElement,content:HTMLElement},values:{open:Boolean}}){connect(){this.animationDurationValue=.15,this.openValue?this.open():this.close()}toggle(){this.openValue=!this.openValue}openValueChanged(t){t?this.open():this.close()}open(){this.hasContentTarget&&(this.revealContent(),this.hasIconTarget&&this.rotateIcon(),this.openValue=!0)}close(){this.hasContentTarget&&(this.hideContent(),this.hasIconTarget&&this.rotateIcon(),this.openValue=!1)}revealContent(){const t=this.contentTarget.scrollHeight;xe(this.contentTarget,{height:`${t}px`},{duration:this.animationDurationValue,easing:"ease-in-out"})}hideContent(){xe(this.contentTarget,{height:0},{duration:this.animationDurationValue,easing:"ease-in-out"})}rotateIcon(){xe(this.iconTarget,{rotate:`${this.openValue?180:0}deg`})}};const Yo=Object.freeze(Object.defineProperty({__proto__:null,default:qo},Symbol.toStringTag,{value:"Module"}));class Xo extends F()({targets:{banner:HTMLDivElement},values:{open:Boolean,autohide:{default:4e3,type:Number}}}){connect(){if(this.autohideValue!=0){const t=()=>{};setTimeout(()=>{this.hide().then(t).catch(t)},this.autohideValue)}}dismiss(){this.remove(),this.dispatchEvent(this.bannerTarget,"ariadne-banner:dismiss")}show(){this.bannerTarget.style.setProperty("display","initial")}remove(){const t=this.bannerTarget.parentElement;t&&t.removeChild(this.bannerTarget)}hide(){this.bannerTarget.style.setProperty("display","none")}}const Go=Object.freeze(Object.defineProperty({__proto__:null,default:Xo},Symbol.toStringTag,{value:"Module"}));function Zo(n){const t=document.createElement("pre");return t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="5px",t.textContent=n,t}function Ws(n){if("clipboard"in navigator)return navigator.clipboard.writeText(n.textContent||"");const t=getSelection();if(t==null)return Promise.reject(new Error);t.removeAllRanges();const e=document.createRange();return e.selectNodeContents(n),t.addRange(e),document.execCommand("copy"),t.removeAllRanges(),Promise.resolve()}function Ve(n){if("clipboard"in navigator)return navigator.clipboard.writeText(n);const t=document.body;if(!t)return Promise.reject(new Error);const e=Zo(n);return t.appendChild(e),Ws(e),t.removeChild(e),Promise.resolve()}async function Ks(n){const t=n.getAttribute("for"),e=n.getAttribute("value");function s(){n.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}if(n.getAttribute("aria-disabled")!=="true"){if(e)await Ve(e),s();else if(t){const i="getRootNode"in Element.prototype?n.getRootNode():n.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const r=i.getElementById(t);r&&(await Jo(r),s())}}}function Jo(n){return n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement?Ve(n.value):n instanceof HTMLAnchorElement&&n.hasAttribute("href")?Ve(n.href):Ws(n)}function Qo(n){const t=n.currentTarget;t instanceof HTMLElement&&Ks(t)}function zs(n){if(n.key===" "||n.key==="Enter"){const t=n.currentTarget;t instanceof HTMLElement&&(n.preventDefault(),Ks(t))}}function ta(n){n.currentTarget.addEventListener("keydown",zs)}function ea(n){n.currentTarget.removeEventListener("keydown",zs)}class na extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",Qo),this.addEventListener("focus",ta),this.addEventListener("blur",ea)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const es=typeof globalThis<"u"?globalThis:window;try{es.ClipboardCopyElement=na.define()}catch(n){if(!(es.DOMException&&n instanceof DOMException&&n.name==="NotSupportedError")&&!(n instanceof ReferenceError))throw n}const sa=2e3;class ia extends F()({targets:{initial:HTMLElement,confirmed:null},values:{hiddenClass:String,showClass:String}}){connect(){this.clipboardCopyElementTimers=new WeakMap}copy(t){var o;const e=t.target,s=this.clipboardCopyElementTimers.get(e),i=(o=e.parentNode)==null?void 0:o.querySelector("[data-clipboard-copy-feedback]"),r="Copied!";s?(clearTimeout(s),this.clipboardCopyElementTimers.delete(e)):(this.showConfirm(),i&&(i.textContent===r?i.textContent=`${r} `:i.textContent=r)),this.clipboardCopyElementTimers.set(e,window.setTimeout(()=>{this.showInitial(),this.hideConfirm(),this.clipboardCopyElementTimers.delete(e)},sa))}showConfirm(){this.hasConfirmedTarget&&(this.confirmedTarget.classList.remove(this.hiddenClassValue),this.confirmedTarget.classList.add(this.showClassValue),this.initialTarget.classList.add(this.hiddenClassValue))}showInitial(){this.initialTarget.classList.remove(this.hiddenClassValue),this.initialTarget.classList.add(this.showClassValue),this.hasConfirmedTarget&&this.confirmedTarget.classList.add(this.hiddenClassValue)}hideConfirm(){this.hasConfirmedTarget&&this.confirmedTarget.classList.remove(this.showClassValue)}}const ra=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"})),tt=Math.min,B=Math.max,ie=Math.round,Xt=Math.floor,W=n=>({x:n,y:n}),oa={left:"right",right:"left",bottom:"top",top:"bottom"},aa={start:"end",end:"start"};function je(n,t,e){return B(n,tt(t,e))}function xt(n,t){return typeof n=="function"?n(t):n}function et(n){return n.split("-")[0]}function Ot(n){return n.split("-")[1]}function qs(n){return n==="x"?"y":"x"}function Qe(n){return n==="y"?"height":"width"}function ut(n){return["top","bottom"].includes(et(n))?"y":"x"}function tn(n){return qs(ut(n))}function la(n,t,e){e===void 0&&(e=!1);const s=Ot(n),i=tn(n),r=Qe(i);let o=i==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=re(o)),[o,re(o)]}function ca(n){const t=re(n);return[He(n),t,He(t)]}function He(n){return n.replace(/start|end/g,t=>aa[t])}function ua(n,t,e){const s=["left","right"],i=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return e?t?i:s:t?s:i;case"left":case"right":return t?r:o;default:return[]}}function ha(n,t,e,s){const i=Ot(n);let r=ua(et(n),e==="start",s);return i&&(r=r.map(o=>o+"-"+i),t&&(r=r.concat(r.map(He)))),r}function re(n){return n.replace(/left|right|bottom|top/g,t=>oa[t])}function da(n){return{top:0,right:0,bottom:0,left:0,...n}}function Ys(n){return typeof n!="number"?da(n):{top:n,right:n,bottom:n,left:n}}function oe(n){const{x:t,y:e,width:s,height:i}=n;return{width:s,height:i,top:e,left:t,right:t+s,bottom:e+i,x:t,y:e}}function ns(n,t,e){let{reference:s,floating:i}=n;const r=ut(t),o=tn(t),a=Qe(o),l=et(t),c=r==="y",u=s.x+s.width/2-i.width/2,d=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:u,y:s.y-i.height};break;case"bottom":m={x:u,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:d};break;case"left":m={x:s.x-i.width,y:d};break;default:m={x:s.x,y:s.y}}switch(Ot(t)){case"start":m[o]-=h*(e&&c?-1:1);break;case"end":m[o]+=h*(e&&c?-1:1);break}return m}const fa=async(n,t,e)=>{const{placement:s="bottom",strategy:i="absolute",middleware:r=[],platform:o}=e,a=r.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:n,floating:t,strategy:i}),{x:u,y:d}=ns(c,s,l),h=s,m={},f=0;for(let p=0;p<a.length;p++){const{name:b,fn:g}=a[p],{x:w,y:E,data:v,reset:y}=await g({x:u,y:d,initialPlacement:s,placement:h,strategy:i,middlewareData:m,rects:c,platform:o,elements:{reference:n,floating:t}});u=w??u,d=E??d,m={...m,[b]:{...m[b],...v}},y&&f<=50&&(f++,typeof y=="object"&&(y.placement&&(h=y.placement),y.rects&&(c=y.rects===!0?await o.getElementRects({reference:n,floating:t,strategy:i}):y.rects),{x:u,y:d}=ns(c,h,l)),p=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:m}};async function en(n,t){var e;t===void 0&&(t={});const{x:s,y:i,platform:r,rects:o,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:m=0}=xt(t,n),f=Ys(m),b=a[h?d==="floating"?"reference":"floating":d],g=oe(await r.getClippingRect({element:(e=await(r.isElement==null?void 0:r.isElement(b)))==null||e?b:b.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),w=d==="floating"?{x:s,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),v=await(r.isElement==null?void 0:r.isElement(E))?await(r.getScale==null?void 0:r.getScale(E))||{x:1,y:1}:{x:1,y:1},y=oe(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:E,strategy:l}):w);return{top:(g.top-y.top+f.top)/v.y,bottom:(y.bottom-g.bottom+f.bottom)/v.y,left:(g.left-y.left+f.left)/v.x,right:(y.right-g.right+f.right)/v.x}}const ma=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:s,placement:i,rects:r,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=xt(n,t)||{};if(c==null)return{};const d=Ys(u),h={x:e,y:s},m=tn(i),f=Qe(m),p=await o.getDimensions(c),b=m==="y",g=b?"top":"left",w=b?"bottom":"right",E=b?"clientHeight":"clientWidth",v=r.reference[f]+r.reference[m]-h[m]-r.floating[f],y=h[m]-r.reference[m],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let x=O?O[E]:0;(!x||!await(o.isElement==null?void 0:o.isElement(O)))&&(x=a.floating[E]||r.floating[f]);const _=v/2-y/2,T=x/2-p[f]/2-1,D=tt(d[g],T),A=tt(d[w],T),C=D,k=x-p[f]-A,M=x/2-p[f]/2+_,dt=je(C,M,k),q=!l.arrow&&Ot(i)!=null&&M!==dt&&r.reference[f]/2-(M<C?D:A)-p[f]/2<0,U=q?M<C?M-C:M-k:0;return{[m]:h[m]+U,data:{[m]:dt,centerOffset:M-dt-U,...q&&{alignmentOffset:U}},reset:q}}}),pa=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,s;const{placement:i,middlewareData:r,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:p=!0,...b}=xt(n,t);if((e=r.arrow)!=null&&e.alignmentOffset)return{};const g=et(i),w=ut(a),E=et(a)===a,v=await(l.isRTL==null?void 0:l.isRTL(c.floating)),y=h||(E||!p?[re(a)]:ca(a)),O=f!=="none";!h&&O&&y.push(...ha(a,p,f,v));const x=[a,...y],_=await en(t,b),T=[];let D=((s=r.flip)==null?void 0:s.overflows)||[];if(u&&T.push(_[g]),d){const M=la(i,o,v);T.push(_[M[0]],_[M[1]])}if(D=[...D,{placement:i,overflows:T}],!T.every(M=>M<=0)){var A,C;const M=(((A=r.flip)==null?void 0:A.index)||0)+1,dt=x[M];if(dt)return{data:{index:M,overflows:D},reset:{placement:dt}};let q=(C=D.filter(U=>U.overflows[0]<=0).sort((U,G)=>U.overflows[1]-G.overflows[1])[0])==null?void 0:C.placement;if(!q)switch(m){case"bestFit":{var k;const U=(k=D.filter(G=>{if(O){const Z=ut(G.placement);return Z===w||Z==="y"}return!0}).map(G=>[G.placement,G.overflows.filter(Z=>Z>0).reduce((Z,fi)=>Z+fi,0)]).sort((G,Z)=>G[1]-Z[1])[0])==null?void 0:k[0];U&&(q=U);break}case"initialPlacement":q=a;break}if(i!==q)return{reset:{placement:q}}}return{}}}};async function ga(n,t){const{placement:e,platform:s,elements:i}=n,r=await(s.isRTL==null?void 0:s.isRTL(i.floating)),o=et(e),a=Ot(e),l=ut(e)==="y",c=["left","top"].includes(o)?-1:1,u=r&&l?-1:1,d=xt(t,n);let{mainAxis:h,crossAxis:m,alignmentAxis:f}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof f=="number"&&(m=a==="end"?f*-1:f),l?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const ba=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,s;const{x:i,y:r,placement:o,middlewareData:a}=t,l=await ga(t,n);return o===((e=a.offset)==null?void 0:e.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:o}}}}},va=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:s,placement:i}=t,{mainAxis:r=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:g,y:w}=b;return{x:g,y:w}}},...l}=xt(n,t),c={x:e,y:s},u=await en(t,l),d=ut(et(i)),h=qs(d);let m=c[h],f=c[d];if(r){const b=h==="y"?"top":"left",g=h==="y"?"bottom":"right",w=m+u[b],E=m-u[g];m=je(w,m,E)}if(o){const b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",w=f+u[b],E=f-u[g];f=je(w,f,E)}const p=a.fn({...t,[h]:m,[d]:f});return{...p,data:{x:p.x-e,y:p.y-s,enabled:{[h]:r,[d]:o}}}}}},ya=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){var e,s;const{placement:i,rects:r,platform:o,elements:a}=t,{apply:l=()=>{},...c}=xt(n,t),u=await en(t,c),d=et(i),h=Ot(i),m=ut(i)==="y",{width:f,height:p}=r.floating;let b,g;d==="top"||d==="bottom"?(b=d,g=h===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(g=d,b=h==="end"?"top":"bottom");const w=p-u.top-u.bottom,E=f-u.left-u.right,v=tt(p-u[b],w),y=tt(f-u[g],E),O=!t.middlewareData.shift;let x=v,_=y;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(_=E),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(x=w),O&&!h){const D=B(u.left,0),A=B(u.right,0),C=B(u.top,0),k=B(u.bottom,0);m?_=f-2*(D!==0||A!==0?D+A:B(u.left,u.right)):x=p-2*(C!==0||k!==0?C+k:B(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:x});const T=await o.getDimensions(a.floating);return f!==T.width||p!==T.height?{reset:{rects:!0}}:{}}}};function de(){return typeof window<"u"}function St(n){return Xs(n)?(n.nodeName||"").toLowerCase():"#document"}function R(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function z(n){var t;return(t=(Xs(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function Xs(n){return de()?n instanceof Node||n instanceof R(n).Node:!1}function j(n){return de()?n instanceof Element||n instanceof R(n).Element:!1}function K(n){return de()?n instanceof HTMLElement||n instanceof R(n).HTMLElement:!1}function ss(n){return!de()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof R(n).ShadowRoot}function zt(n){const{overflow:t,overflowX:e,overflowY:s,display:i}=H(n);return/auto|scroll|overlay|hidden|clip/.test(t+s+e)&&!["inline","contents"].includes(i)}function wa(n){return["table","td","th"].includes(St(n))}function fe(n){return[":popover-open",":modal"].some(t=>{try{return n.matches(t)}catch{return!1}})}function nn(n){const t=sn(),e=j(n)?H(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>e[s]?e[s]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(e.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(e.contain||"").includes(s))}function Ea(n){let t=nt(n);for(;K(t)&&!At(t);){if(nn(t))return t;if(fe(t))return null;t=nt(t)}return null}function sn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function At(n){return["html","body","#document"].includes(St(n))}function H(n){return R(n).getComputedStyle(n)}function me(n){return j(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function nt(n){if(St(n)==="html")return n;const t=n.assignedSlot||n.parentNode||ss(n)&&n.host||z(n);return ss(t)?t.host:t}function Gs(n){const t=nt(n);return At(t)?n.ownerDocument?n.ownerDocument.body:n.body:K(t)&&zt(t)?t:Gs(t)}function Ut(n,t,e){var s;t===void 0&&(t=[]),e===void 0&&(e=!0);const i=Gs(n),r=i===((s=n.ownerDocument)==null?void 0:s.body),o=R(i);if(r){const a=Ue(o);return t.concat(o,o.visualViewport||[],zt(i)?i:[],a&&e?Ut(a):[])}return t.concat(i,Ut(i,[],e))}function Ue(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Zs(n){const t=H(n);let e=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=K(n),r=i?n.offsetWidth:e,o=i?n.offsetHeight:s,a=ie(e)!==r||ie(s)!==o;return a&&(e=r,s=o),{width:e,height:s,$:a}}function rn(n){return j(n)?n:n.contextElement}function wt(n){const t=rn(n);if(!K(t))return W(1);const e=t.getBoundingClientRect(),{width:s,height:i,$:r}=Zs(t);let o=(r?ie(e.width):e.width)/s,a=(r?ie(e.height):e.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const Ta=W(0);function Js(n){const t=R(n);return!sn()||!t.visualViewport?Ta:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Aa(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==R(n)?!1:t}function ht(n,t,e,s){t===void 0&&(t=!1),e===void 0&&(e=!1);const i=n.getBoundingClientRect(),r=rn(n);let o=W(1);t&&(s?j(s)&&(o=wt(s)):o=wt(n));const a=Aa(r,e,s)?Js(r):W(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(r){const h=R(r),m=s&&j(s)?R(s):s;let f=h,p=Ue(f);for(;p&&s&&m!==f;){const b=wt(p),g=p.getBoundingClientRect(),w=H(p),E=g.left+(p.clientLeft+parseFloat(w.paddingLeft))*b.x,v=g.top+(p.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=E,c+=v,f=R(p),p=Ue(f)}}return oe({width:u,height:d,x:l,y:c})}function on(n,t){const e=me(n).scrollLeft;return t?t.left+e:ht(z(n)).left+e}function Qs(n,t,e){e===void 0&&(e=!1);const s=n.getBoundingClientRect(),i=s.left+t.scrollLeft-(e?0:on(n,s)),r=s.top+t.scrollTop;return{x:i,y:r}}function xa(n){let{elements:t,rect:e,offsetParent:s,strategy:i}=n;const r=i==="fixed",o=z(s),a=t?fe(t.floating):!1;if(s===o||a&&r)return e;let l={scrollLeft:0,scrollTop:0},c=W(1);const u=W(0),d=K(s);if((d||!d&&!r)&&((St(s)!=="body"||zt(o))&&(l=me(s)),K(s))){const m=ht(s);c=wt(s),u.x=m.x+s.clientLeft,u.y=m.y+s.clientTop}const h=o&&!d&&!r?Qs(o,l,!0):W(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:e.y*c.y-l.scrollTop*c.y+u.y+h.y}}function Oa(n){return Array.from(n.getClientRects())}function Sa(n){const t=z(n),e=me(n),s=n.ownerDocument.body,i=B(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=B(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-e.scrollLeft+on(n);const a=-e.scrollTop;return H(s).direction==="rtl"&&(o+=B(t.clientWidth,s.clientWidth)-i),{width:i,height:r,x:o,y:a}}function Ma(n,t){const e=R(n),s=z(n),i=e.visualViewport;let r=s.clientWidth,o=s.clientHeight,a=0,l=0;if(i){r=i.width,o=i.height;const c=sn();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:r,height:o,x:a,y:l}}function Ca(n,t){const e=ht(n,!0,t==="fixed"),s=e.top+n.clientTop,i=e.left+n.clientLeft,r=K(n)?wt(n):W(1),o=n.clientWidth*r.x,a=n.clientHeight*r.y,l=i*r.x,c=s*r.y;return{width:o,height:a,x:l,y:c}}function is(n,t,e){let s;if(t==="viewport")s=Ma(n,e);else if(t==="document")s=Sa(z(n));else if(j(t))s=Ca(t,e);else{const i=Js(n);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return oe(s)}function ti(n,t){const e=nt(n);return e===t||!j(e)||At(e)?!1:H(e).position==="fixed"||ti(e,t)}function ka(n,t){const e=t.get(n);if(e)return e;let s=Ut(n,[],!1).filter(a=>j(a)&&St(a)!=="body"),i=null;const r=H(n).position==="fixed";let o=r?nt(n):n;for(;j(o)&&!At(o);){const a=H(o),l=nn(o);!l&&a.position==="fixed"&&(i=null),(r?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||zt(o)&&!l&&ti(n,o))?s=s.filter(u=>u!==o):i=a,o=nt(o)}return t.set(n,s),s}function La(n){let{element:t,boundary:e,rootBoundary:s,strategy:i}=n;const o=[...e==="clippingAncestors"?fe(t)?[]:ka(t,this._c):[].concat(e),s],a=o[0],l=o.reduce((c,u)=>{const d=is(t,u,i);return c.top=B(d.top,c.top),c.right=tt(d.right,c.right),c.bottom=tt(d.bottom,c.bottom),c.left=B(d.left,c.left),c},is(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _a(n){const{width:t,height:e}=Zs(n);return{width:t,height:e}}function Da(n,t,e){const s=K(t),i=z(t),r=e==="fixed",o=ht(n,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=W(0);if(s||!s&&!r)if((St(t)!=="body"||zt(i))&&(a=me(t)),s){const h=ht(t,!0,r,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=on(i));const c=i&&!s&&!r?Qs(i,a):W(0),u=o.left+a.scrollLeft-l.x-c.x,d=o.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:o.width,height:o.height}}function Oe(n){return H(n).position==="static"}function rs(n,t){if(!K(n)||H(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return z(n)===e&&(e=e.ownerDocument.body),e}function ei(n,t){const e=R(n);if(fe(n))return e;if(!K(n)){let i=nt(n);for(;i&&!At(i);){if(j(i)&&!Oe(i))return i;i=nt(i)}return e}let s=rs(n,t);for(;s&&wa(s)&&Oe(s);)s=rs(s,t);return s&&At(s)&&Oe(s)&&!nn(s)?e:s||Ea(n)||e}const Fa=async function(n){const t=this.getOffsetParent||ei,e=this.getDimensions,s=await e(n.floating);return{reference:Da(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Ba(n){return H(n).direction==="rtl"}const Pa={convertOffsetParentRelativeRectToViewportRelativeRect:xa,getDocumentElement:z,getClippingRect:La,getOffsetParent:ei,getElementRects:Fa,getClientRects:Oa,getDimensions:_a,getScale:wt,isElement:j,isRTL:Ba};function ni(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function Ra(n,t){let e=null,s;const i=z(n);function r(){var a;clearTimeout(s),(a=e)==null||a.disconnect(),e=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),r();const c=n.getBoundingClientRect(),{left:u,top:d,width:h,height:m}=c;if(a||t(),!h||!m)return;const f=Xt(d),p=Xt(i.clientWidth-(u+h)),b=Xt(i.clientHeight-(d+m)),g=Xt(u),E={rootMargin:-f+"px "+-p+"px "+-b+"px "+-g+"px",threshold:B(0,tt(1,l))||1};let v=!0;function y(O){const x=O[0].intersectionRatio;if(x!==l){if(!v)return o();x?o(!1,x):s=setTimeout(()=>{o(!1,1e-7)},1e3)}x===1&&!ni(c,n.getBoundingClientRect())&&o(),v=!1}try{e=new IntersectionObserver(y,{...E,root:i.ownerDocument})}catch{e=new IntersectionObserver(y,E)}e.observe(n)}return o(!0),r}function si(n,t,e,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,c=rn(n),u=i||r?[...c?Ut(c):[],...Ut(t)]:[];u.forEach(g=>{i&&g.addEventListener("scroll",e,{passive:!0}),r&&g.addEventListener("resize",e)});const d=c&&a?Ra(c,e):null;let h=-1,m=null;o&&(m=new ResizeObserver(g=>{let[w]=g;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),e()}),c&&!l&&m.observe(c),m.observe(t));let f,p=l?ht(n):null;l&&b();function b(){const g=ht(n);p&&!ni(p,g)&&e(),p=g,f=requestAnimationFrame(b)}return e(),()=>{var g;u.forEach(w=>{i&&w.removeEventListener("scroll",e),r&&w.removeEventListener("resize",e)}),d==null||d(),(g=m)==null||g.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const an=ba,ln=va,cn=pa,$a=ya,Na=ma,un=(n,t,e)=>{const s=new Map,i={platform:Pa,...e},r={...i.platform,_c:s};return fa(n,t,{...i,platform:r})},os=(n,t)=>{const e=n[t];return typeof e=="function"?e:(...s)=>{}},We=(n,t,e)=>{let s=n;return e===!0?s=`${t.identifier}:${n}`:typeof e=="string"&&(s=`${e}:${n}`),s},Ke=(n,t,e)=>{const{bubbles:s,cancelable:i,composed:r}=t||{bubbles:!0,cancelable:!0,composed:!0};return t&&Object.assign(e,{originalEvent:t}),new CustomEvent(n,{bubbles:s,cancelable:i,composed:r,detail:e})};function Ia(n){const t=n.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth,i=t.top<=e&&t.top+t.height>0,r=t.left<=s&&t.left+t.width>0;return i&&r}function Va(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(e[s[i]]=n[s[i]]);return e}const Se={debug:!1,logger:console,dispatchEvent:!0,eventPrefix:!0};class ja{constructor(t,e={}){var s,i,r;this.log=(l,c)=>{this.debug&&(this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${l}`,"color: #3B82F6","color: unset"),this.logger.log(Object.assign({controllerId:this.controllerId},c)),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,c={})=>{if(this.dispatchEvent){const{event:u}=c,d=Va(c,["event"]),h=this.extendedEvent(l,u||null,d);this.targetElement.dispatchEvent(h),this.log("dispatchEvent",Object.assign({eventName:h.type},d))}},this.call=(l,c={})=>{const u=this.controller[l];if(typeof u=="function")return u.call(this.controller,c)},this.extendedEvent=(l,c,u)=>{const{bubbles:d,cancelable:h,composed:m}=c||{bubbles:!0,cancelable:!0,composed:!0};return c&&Object.assign(u,{originalEvent:c}),new CustomEvent(this.composeEventName(l),{bubbles:d,cancelable:h,composed:m,detail:u})},this.composeEventName=l=>{let c=l;return this.eventPrefix===!0?c=`${this.controller.identifier}:${l}`:typeof this.eventPrefix=="string"&&(c=`${this.eventPrefix}:${l}`),c},this.debug=(i=(s=e==null?void 0:e.debug)!==null&&s!==void 0?s:t.application.stimulusUseDebug)!==null&&i!==void 0?i:Se.debug,this.logger=(r=e==null?void 0:e.logger)!==null&&r!==void 0?r:Se.logger,this.controller=t,this.controllerId=t.element.id||t.element.dataset.id,this.targetElement=(e==null?void 0:e.element)||t.element;const{dispatchEvent:o,eventPrefix:a}=Object.assign({},Se,e);Object.assign(this,{dispatchEvent:o,eventPrefix:a}),this.controllerInitialize=t.initialize.bind(t),this.controllerConnect=t.connect.bind(t),this.controllerDisconnect=t.disconnect.bind(t)}}const Ha={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},Ua=(n,t={})=>{const e=n,{onlyVisible:s,dispatchEvent:i,events:r,eventPrefix:o}=Object.assign({},Ha,t),a=d=>{const h=(t==null?void 0:t.element)||e.element;if(!(h.contains(d.target)||!Ia(h)&&s)&&(e.clickOutside&&e.clickOutside(d),i)){const m=We("click:outside",e,o),f=Ke(m,d,{controller:e});h.dispatchEvent(f)}},l=()=>{r==null||r.forEach(d=>{window.addEventListener(d,a,!0)})},c=()=>{r==null||r.forEach(d=>{window.removeEventListener(d,a,!0)})},u=e.disconnect.bind(e);return Object.assign(e,{disconnect(){c(),u()}}),l(),[l,c]};class Wa extends st{}Wa.debounces=[];const Ka=200,as=(n,t=Ka)=>{let e=null;return function(){const s=Array.from(arguments),i=this,r=s.map(a=>a.params),o=()=>(s.forEach((a,l)=>a.params=r[l]),n.apply(i,s));e&&clearTimeout(e),e=setTimeout(o,t)}},za=(n,t)=>{const e=n;e.constructor.debounces.forEach(i=>{if(typeof i=="string"&&(e[i]=as(e[i],void 0)),typeof i=="object"){const{name:r,wait:o}=i;if(!r)return;e[r]=as(e[r],o||void 0)}})},qa={dispatchEvent:!0,eventPrefix:!0,visibleAttribute:"isVisible"},Ya=(n,t={})=>{const e=n,{dispatchEvent:s,eventPrefix:i,visibleAttribute:r}=Object.assign({},qa,t),o=(t==null?void 0:t.element)||e.element;e.intersectionElements||(e.intersectionElements=[]),e.intersectionElements.push(o);const a=v=>{const[y]=v;y.isIntersecting?c(y):o.hasAttribute(r)&&u(y)},l=new IntersectionObserver(a,t),c=v=>{if(o.setAttribute(r,"true"),os(e,"appear").call(e,v,l),s){const y=We("appear",e,i),O=Ke(y,null,{controller:e,entry:v,observer:l});o.dispatchEvent(O)}},u=v=>{if(o.removeAttribute(r),os(e,"disappear").call(e,v,l),s){const y=We("disappear",e,i),O=Ke(y,null,{controller:e,entry:v,observer:l});o.dispatchEvent(O)}},d=e.disconnect.bind(e),h=()=>{f(),d()},m=()=>{l.observe(o)},f=()=>{l.unobserve(o)},p=()=>e.intersectionElements.filter(v=>v.hasAttribute(r)).length===0,b=()=>e.intersectionElements.filter(v=>v.hasAttribute(r)).length===1,g=()=>e.intersectionElements.some(v=>v.hasAttribute(r)),w=()=>e.intersectionElements.every(v=>v.hasAttribute(r));return Object.assign(e,{isVisible:w,noneVisible:p,oneVisible:b,atLeastOneVisible:g,allVisible:w,disconnect:h}),m(),[m,f]};class Xa extends ja{constructor(t,e={}){super(t,e),this.observe=()=>{try{this.observer.observe(this.targetElement,this.options)}catch(s){this.controller.application.handleError(s,"At a minimum, one of childList, attributes, and/or characterData must be true",{})}},this.unobserve=()=>{this.observer.disconnect()},this.mutation=s=>{this.call("mutate",s),this.log("mutate",{entries:s}),this.dispatch("mutate",{entries:s})},this.targetElement=(e==null?void 0:e.element)||t.element,this.controller=t,this.options=e,this.observer=new MutationObserver(this.mutation),this.enhanceController(),this.observe()}enhanceController(){const t=this.controller.disconnect.bind(this.controller),e=()=>{this.unobserve(),t()};Object.assign(this.controller,{disconnect:e})}}const ii=(n,t={})=>{const e=new Xa(n,t);return[e.observe,e.unobserve]};class Ga extends st{}Ga.throttles=[];class Za extends F()({targets:{wrapper:HTMLDetailsElement,button:HTMLElement,popover:ke,options:HTMLDivElement},values:{clamped:Boolean,placement:String,dynamicLabelPrefix:String}}){constructor(){super(...arguments),this.changedIds=new Set}clickOutside(){this.element.open=!1,this.setupAutoUpdate(),this.close()}close(){this.changedIds.size>0&&(this.dispatch("changed"),this.changedIds.clear(),this.buttonTarget.setAttribute("aria-expanded","false"))}connect(){Ua(this),ii(this,{childList:!0,subtree:!0}),this.setupAutoUpdate(),this.setupForm()}disconnect(){var t;(t=this.unsubAutoUpdate)==null||t.call(this)}setupForm(){for(const t of["checkbox","radio"])for(const e of this.popoverTarget.querySelectorAll(`input[type="${t}"]`))e.addEventListener("change",s=>{const i=s.target;this.changedIds.has(i)?this.changedIds.delete(i):this.changedIds.add(i),this.dispatch("clicked",{detail:i})})}setupAutoUpdate(){var e;if(!this.element.open){(e=this.unsubAutoUpdate)==null||e.call(this);return}const t=()=>{const s=this.optionsTarget,i=this.clampedValue;un(this.buttonTarget,this.popoverTarget,{middleware:[an(6),cn(),ln({padding:6}),$a({apply({availableHeight:r}){let o=r-6;i&&o>400&&(o=400),Object.assign(s.style,{maxHeight:`${o}px`})}})],placement:this.placementValue,strategy:"fixed"}).then(({x:r,y:o})=>{Object.assign(this.popoverTarget.style,{left:`${r}px`,top:`${o}px`})})};t(),this.unsubAutoUpdate=si(this.buttonTarget,this.popoverTarget,t)}updateButtonLabel(t){var r;const s=t.target.querySelector("input[type=radio]:checked");if(!s)return;const i=((r=s.labels)==null?void 0:r.item(0)).textContent;this.buttonTarget.querySelector('[data-ariadne-ui-button-target="content"]').textContent=`${this.dynamicLabelPrefixValue}${i}`}toggle(){this.element.open=!this.element.open,this.setupAutoUpdate(),this.buttonTarget.setAttribute("aria-expanded","true")}}const Ja=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"}));function Qa(n){if(Array.isArray(n)){for(var t=0,e=Array(n.length);t<n.length;t++)e[t]=n[t];return e}else return Array.from(n)}var hn=!1;if(typeof window<"u"){var ls={get passive(){hn=!0}};window.addEventListener("testPassive",null,ls),window.removeEventListener("testPassive",null,ls)}var ae=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),ct=[],le=!1,ri=-1,Nt=void 0,at=void 0,It=void 0,oi=function(t){return ct.some(function(e){return!!(e.options.allowTouchMove&&e.options.allowTouchMove(t))})},ce=function(t){var e=t||window.event;return oi(e.target)||e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)},tl=function(t){if(It===void 0){var e=!!t&&t.reserveScrollBarGap===!0,s=window.innerWidth-document.documentElement.clientWidth;if(e&&s>0){var i=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);It=document.body.style.paddingRight,document.body.style.paddingRight=i+s+"px"}}Nt===void 0&&(Nt=document.body.style.overflow,document.body.style.overflow="hidden")},el=function(){It!==void 0&&(document.body.style.paddingRight=It,It=void 0),Nt!==void 0&&(document.body.style.overflow=Nt,Nt=void 0)},nl=function(){return window.requestAnimationFrame(function(){if(at===void 0){at={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,s=t.scrollX,i=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-s,setTimeout(function(){return window.requestAnimationFrame(function(){var r=i-window.innerHeight;r&&e>=i&&(document.body.style.top=-(e+r))})},300)}})},sl=function(){if(at!==void 0){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=at.position,document.body.style.top=at.top,document.body.style.left=at.left,window.scrollTo(e,t),at=void 0}},il=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},rl=function(t,e){var s=t.targetTouches[0].clientY-ri;return oi(t.target)?!1:e&&e.scrollTop===0&&s>0||il(e)&&s<0?ce(t):(t.stopPropagation(),!0)},ol=function(t,e){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!ct.some(function(i){return i.targetElement===t})){var s={targetElement:t,options:e||{}};ct=[].concat(Qa(ct),[s]),ae?nl():tl(e),ae&&(t.ontouchstart=function(i){i.targetTouches.length===1&&(ri=i.targetTouches[0].clientY)},t.ontouchmove=function(i){i.targetTouches.length===1&&rl(i,t)},le||(document.addEventListener("touchmove",ce,hn?{passive:!1}:void 0),le=!0))}},al=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}ct=ct.filter(function(e){return e.targetElement!==t}),ae&&(t.ontouchstart=null,t.ontouchmove=null,le&&ct.length===0&&(document.removeEventListener("touchmove",ce,hn?{passive:!1}:void 0),le=!1)),ae?sl():el()};class ll extends F()({targets:{dialog:HTMLDialogElement}}){close(t){this.dialogTarget.open&&(this.dialogTarget.close(),al(this.dialogTarget))}disconnect(){this.close()}open(t){t.preventDefault(),this.dialogTarget.showModal(),ol(this.dialogTarget,{reserveScrollBarGap:!0})}windowClick(t){t.target===this.dialogTarget&&this.close()}}const cl=Object.freeze(Object.defineProperty({__proto__:null,default:ll},Symbol.toStringTag,{value:"Module"}));class ul extends F()({targets:{emptyRoot:null,input:HTMLInputElement,searchString:null}}){handleNewQuery(t){let e=!1;for(const{el:s,searchString:i}of this.items){const r=i.includes(t.trim().toLowerCase());!e&&r&&(e=!0),r?s.classList.remove("ariadne:hidden"):s.classList.add("ariadne:hidden")}this.hasEmptyRootTarget&&(e?this.emptyRootTarget.classList.add("ariadne:hidden"):this.emptyRootTarget.classList.remove("ariadne:hidden"))}connect(){this.items=this.searchStringTargets.map(t=>({el:t,searchString:(t.textContent??"").trim().toLowerCase()})),Ya(this)}appear(){this.reset()}handleInput(){this.hasSearchStringTarget&&this.handleNewQuery(this.inputTarget.value)}reset(){this.handleNewQuery(""),this.hasInputTarget&&(this.inputTarget.value="")}}const hl=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"}));class dl extends F()({targets:{button:HTMLButtonElement,popover:HTMLElement},values:{placement:String}}){connect(){this.popoverTarget.addEventListener("toggle",t=>{t.newState==="open"&&this.updatePosition()})}toggle(){dispatchEvent(new CustomEvent("toggle",{detail:{newState:this.popoverTarget.open?"closed":"open"}}))}updatePosition(){si(this.buttonTarget,this.popoverTarget,()=>{un(this.buttonTarget,this.popoverTarget,{placement:this.placementValue,middleware:[an(5),cn(),ln({padding:5})]}).then(({x:t,y:e})=>{Object.assign(this.popoverTarget.style,{left:`${t}px`,top:`${e}px`})})})}}const fl=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"}));var ml=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},cs=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},Bt;class pl{formatToParts(t){const e=[];for(const s of t)e.push({type:"element",value:s}),e.push({type:"literal",value:", "});return e.slice(0,-1)}}const gl=typeof Intl<"u"&&Intl.ListFormat||pl,bl=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],vl={minimumIntegerDigits:2};class yl{constructor(t,e={}){Bt.set(this,void 0);let s=String(e.style||"short");s!=="long"&&s!=="short"&&s!=="narrow"&&s!=="digital"&&(s="short");let i=s==="digital"?"numeric":s;const r=e.hours||i;i=r==="2-digit"?"numeric":r;const o=e.minutes||i;i=o==="2-digit"?"numeric":o;const a=e.seconds||i;i=a==="2-digit"?"numeric":a;const l=e.milliseconds||i;ml(this,Bt,{locale:t,style:s,years:e.years||s==="digital"?"short":s,yearsDisplay:e.yearsDisplay==="always"?"always":"auto",months:e.months||s==="digital"?"short":s,monthsDisplay:e.monthsDisplay==="always"?"always":"auto",weeks:e.weeks||s==="digital"?"short":s,weeksDisplay:e.weeksDisplay==="always"?"always":"auto",days:e.days||s==="digital"?"short":s,daysDisplay:e.daysDisplay==="always"?"always":"auto",hours:r,hoursDisplay:e.hoursDisplay==="always"||s==="digital"?"always":"auto",minutes:o,minutesDisplay:e.minutesDisplay==="always"||s==="digital"?"always":"auto",seconds:a,secondsDisplay:e.secondsDisplay==="always"||s==="digital"?"always":"auto",milliseconds:l,millisecondsDisplay:e.millisecondsDisplay==="always"?"always":"auto"},"f")}resolvedOptions(){return cs(this,Bt,"f")}formatToParts(t){const e=[],s=cs(this,Bt,"f"),i=s.style,r=s.locale;for(const[o,a]of bl){const l=t[o];if(s[`${o}Display`]==="auto"&&!l)continue;const c=s[o],u=c==="2-digit"?vl:c==="numeric"?{}:{style:"unit",unit:a,unitDisplay:c};e.push(new Intl.NumberFormat(r,u).format(l))}return new gl(r,{type:"unit",style:i==="digital"?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map(e=>e.value).join("")}}Bt=new WeakMap;const ai=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,ue=["year","month","week","day","hour","minute","second","millisecond"],wl=n=>ai.test(n);class P{constructor(t=0,e=0,s=0,i=0,r=0,o=0,a=0,l=0){this.years=t,this.months=e,this.weeks=s,this.days=i,this.hours=r,this.minutes=o,this.seconds=a,this.milliseconds=l,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=this.sign===0}abs(){return new P(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if(typeof t=="string"){const s=String(t).trim(),i=s.startsWith("-")?-1:1,r=(e=s.match(ai))===null||e===void 0?void 0:e.slice(1).map(o=>(Number(o)||0)*i);return r?new P(...r):new P}else if(typeof t=="object"){const{years:s,months:i,weeks:r,days:o,hours:a,minutes:l,seconds:c,milliseconds:u}=t;return new P(s,i,r,o,a,l,c,u)}throw new RangeError("invalid duration")}static compare(t,e){const s=Date.now(),i=Math.abs(us(s,P.from(t)).getTime()-s),r=Math.abs(us(s,P.from(e)).getTime()-s);return i>r?-1:i<r?1:0}toLocaleString(t,e){return new yl(t,e).format(this)}}function us(n,t){const e=new Date(n);return t.sign<0?(e.setUTCSeconds(e.getUTCSeconds()+t.seconds),e.setUTCMinutes(e.getUTCMinutes()+t.minutes),e.setUTCHours(e.getUTCHours()+t.hours),e.setUTCDate(e.getUTCDate()+t.weeks*7+t.days),e.setUTCMonth(e.getUTCMonth()+t.months),e.setUTCFullYear(e.getUTCFullYear()+t.years)):(e.setUTCFullYear(e.getUTCFullYear()+t.years),e.setUTCMonth(e.getUTCMonth()+t.months),e.setUTCDate(e.getUTCDate()+t.weeks*7+t.days),e.setUTCHours(e.getUTCHours()+t.hours),e.setUTCMinutes(e.getUTCMinutes()+t.minutes),e.setUTCSeconds(e.getUTCSeconds()+t.seconds)),e}function El(n,t="second",e=Date.now()){const s=n.getTime()-e;if(s===0)return new P;const i=Math.sign(s),r=Math.abs(s),o=Math.floor(r/1e3),a=Math.floor(o/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=ue.indexOf(t)||ue.length;return new P(h>=0?d*i:0,h>=1?(u-d*12)*i:0,0,h>=3?(c-u*30)*i:0,h>=4?(l-c*24)*i:0,h>=5?(a-l*60)*i:0,h>=6?(o-a*60)*i:0,h>=7?(r-o*1e3)*i:0)}function li(n,{relativeTo:t=Date.now()}={}){if(t=new Date(t),n.blank)return n;const e=n.sign;let s=Math.abs(n.years),i=Math.abs(n.months),r=Math.abs(n.weeks),o=Math.abs(n.days),a=Math.abs(n.hours),l=Math.abs(n.minutes),c=Math.abs(n.seconds),u=Math.abs(n.milliseconds);u>=900&&(c+=Math.round(u/1e3)),(c||l||a||o||r||i||s)&&(u=0),c>=55&&(l+=Math.round(c/60)),(l||a||o||r||i||s)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||o||r||i||s)&&(l=0),o&&a>=12&&(o+=Math.round(a/24)),!o&&a>=21&&(o+=Math.round(a/24)),(o||r||i||s)&&(a=0);const d=t.getFullYear(),h=t.getMonth(),m=t.getDate();if(o>=27||s+i+o){const f=new Date(t);f.setDate(1),f.setMonth(h+i*e+1),f.setDate(0);const p=Math.max(0,m-f.getDate()),b=new Date(t);b.setFullYear(d+s*e),b.setDate(m-p),b.setMonth(h+i*e),b.setDate(m-p+o*e);const g=b.getFullYear()-t.getFullYear(),w=b.getMonth()-t.getMonth(),E=Math.abs(Math.round((Number(b)-Number(t))/864e5))+p,v=Math.abs(g*12+w);E<27?(o>=6?(r+=Math.round(o/7),o=0):o=E,i=s=0):v<=11?(i=v,s=0):(i=0,s=g*e),(i||s)&&(o=0)}return s&&(i=0),r>=4&&(i+=Math.round(r/4)),(i||s)&&(r=0),o&&r&&!i&&!s&&(r+=Math.round(o/7),o=0),new P(s*e,i*e,r*e,o*e,a*e,l*e,c*e,u*e)}function Tl(n,t){const e=li(n,t);if(e.blank)return[0,"second"];for(const s of ue){if(s==="millisecond")continue;const i=e[`${s}s`];if(i)return[i,s]}return[0,"second"]}var S=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},Gt=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},N,Pt,Rt,Ct,ot,ze,ci,ui,hi,di,mt;const Al=globalThis.HTMLElement||null,Me=new P,hs=new P(0,0,0,0,0,1);class xl extends Event{constructor(t,e,s,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=s,this.newTitle=i}}function ds(n){if(!n.date)return 1/0;if(n.format==="duration"||n.format==="elapsed"){const e=n.precision;if(e==="second")return 1e3;if(e==="minute")return 60*1e3}const t=Math.abs(Date.now()-n.date.getTime());return t<60*1e3?1e3:t<60*60*1e3?60*1e3:60*60*1e3}const Ce=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(n){if(this.elements.has(n))return;this.elements.add(n);const t=n.date;if(t&&t.getTime()){const e=ds(n),s=Date.now()+e;s<this.time&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.update(),e),this.time=s)}}unobserve(n){this.elements.has(n)&&this.elements.delete(n)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let n=1/0;for(const t of this.elements)n=Math.min(n,ds(t)),t.update();this.time=Math.min(60*60*1e3,n),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}};class Ol extends Al{constructor(){super(...arguments),N.add(this),Pt.set(this,!1),Rt.set(this,!1),ot.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),mt.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title"]}get onRelativeTimeUpdated(){return S(this,mt,"f")}set onRelativeTimeUpdated(t){S(this,mt,"f")&&this.removeEventListener("relative-time-updated",S(this,mt,"f")),Gt(this,mt,typeof t=="object"||typeof t=="function"?t:null,"f"),typeof t=="function"&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if(t==="numeric"||t==="2-digit")return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if(t==="numeric"||t==="2-digit")return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if(t==="numeric"||t==="2-digit")return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");if(t==="long"||t==="short"||t==="narrow")return t;if(this.format==="datetime"&&t!=="")return this.formatStyle}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=(t=this.getAttribute("day"))!==null&&t!==void 0?t:"numeric";if(e==="numeric"||e==="2-digit")return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(e!==""&&(e??(e=t==="datetime"?this.formatStyle:"short"),e==="numeric"||e==="2-digit"||e==="short"||e==="long"||e==="narrow"))return e}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");if(e==="numeric"||e==="2-digit")return e;if(!this.hasAttribute("year")&&new Date().getUTCFullYear()!==((t=this.date)===null||t===void 0?void 0:t.getUTCFullYear()))return"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if(t==="long"||t==="short"||t==="shortOffset"||t==="longOffset"||t==="shortGeneric"||t==="longGeneric")return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return(t=this.getAttribute("prefix"))!==null&&t!==void 0?t:this.format==="datetime"?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&wl(t)?t:"P30D"}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return t==="past"?"past":t==="future"?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return ue.includes(t)?t:this.format==="micro"?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return t==="datetime"?"datetime":t==="relative"?"relative":t==="duration"?"duration":t==="micro"?"micro":t==="elapsed"?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if(t==="long")return"long";if(t==="short")return"short";if(t==="narrow")return"narrow";const e=this.format;return e==="elapsed"||e==="micro"?"narrow":e==="datetime"?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(t==null?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Ce.unobserve(this)}attributeChangedCallback(t,e,s){e!==s&&(t==="title"&&Gt(this,Pt,s!==null&&(this.date&&S(this,N,"m",ze).call(this,this.date))!==s,"f"),!S(this,Rt,"f")&&!(t==="title"&&S(this,Pt,"f"))&&Gt(this,Rt,(async()=>{await Promise.resolve(),this.update(),Gt(this,Rt,!1,"f")})(),"f"))}update(){const t=S(this,ot,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let s=e;const i=this.date;if(typeof Intl>"u"||!Intl.DateTimeFormat||!i){S(this,ot,"f").textContent=t;return}const r=Date.now();S(this,Pt,"f")||(s=S(this,N,"m",ze).call(this,i)||"",s&&!this.noTitle&&this.setAttribute("title",s));const o=El(i,this.precision,r),a=S(this,N,"m",ci).call(this,o);let l=t;a==="duration"?l=S(this,N,"m",ui).call(this,o):a==="relative"?l=S(this,N,"m",hi).call(this,o):l=S(this,N,"m",di).call(this,i),l?S(this,ot,"f").textContent=l:this.shadowRoot===S(this,ot,"f")&&this.textContent&&(S(this,ot,"f").textContent=this.textContent),(l!==t||s!==e)&&this.dispatchEvent(new xl(t,l,e,s)),a==="relative"||a==="duration"?Ce.observe(this):Ce.unobserve(this)}}Pt=new WeakMap,Rt=new WeakMap,ot=new WeakMap,mt=new WeakMap,N=new WeakSet,Ct=function(){var t;const e=((t=this.closest("[lang]"))===null||t===void 0?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(e??"").toString()}catch{return"default"}},ze=function(t){return new Intl.DateTimeFormat(S(this,N,"a",Ct),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},ci=function(t){const e=this.format;if(e==="datetime")return"datetime";if(e==="duration"||e==="elapsed"||e==="micro")return"duration";if((e==="auto"||e==="relative")&&typeof Intl<"u"&&Intl.RelativeTimeFormat){const s=this.tense;if(s==="past"||s==="future"||P.compare(t,this.threshold)===1)return"relative"}return"datetime"},ui=function(t){const e=S(this,N,"a",Ct),s=this.format,i=this.formatStyle,r=this.tense;let o=Me;s==="micro"?(t=li(t),o=hs,(this.tense==="past"&&t.sign!==-1||this.tense==="future"&&t.sign!==1)&&(t=hs)):(r==="past"&&t.sign!==-1||r==="future"&&t.sign!==1)&&(t=o);const a=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[a]:"always"}):t.abs().toLocaleString(e,{style:i})},hi=function(t){const e=new Intl.RelativeTimeFormat(S(this,N,"a",Ct),{numeric:"auto",style:this.formatStyle}),s=this.tense;s==="future"&&t.sign!==1&&(t=Me),s==="past"&&t.sign!==-1&&(t=Me);const[i,r]=Tl(t);return r==="second"&&i<10?e.format(0,this.precision==="millisecond"?"second":this.precision):e.format(i,r)},di=function(t){const e=new Intl.DateTimeFormat(S(this,N,"a",Ct),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()};const fs=typeof globalThis<"u"?globalThis:window;try{fs.RelativeTimeElement=Ol.define()}catch(n){if(!(fs.DOMException&&n instanceof DOMException&&n.name==="NotSupportedError")&&!(n instanceof ReferenceError))throw n}class Sl extends F()({targets:{}}){}const Ml=Object.freeze(Object.defineProperty({__proto__:null,default:Sl},Symbol.toStringTag,{value:"Module"}));function Cl(){return/Mac|iMac|Macintosh|MacIntel/.test(navigator.userAgent)}class kl extends F()({targets:{alt:HTMLSpanElement,ctrl:HTMLSpanElement,shift:HTMLSpanElement}}){replaceSymbol(t,e){for(const s of t)s.innerText=e,s.classList.add("!font-fallback")}connect(){this.replaceSymbol(this.shiftTargets,"⇧"),Cl()&&(this.replaceSymbol(this.ctrlTargets,"⌘"),this.replaceSymbol(this.altTargets,"⌥"))}}const Ll=Object.freeze(Object.defineProperty({__proto__:null,default:kl},Symbol.toStringTag,{value:"Module"})),he=class he extends st{connect(){za(this)}save(){this.hasFormTarget?this.formTarget.requestSubmit():this.element.requestSubmit()}};he.debounces=["save"],he.targets=["form"];let qe=he;const _l=Object.freeze(Object.defineProperty({__proto__:null,default:qe},Symbol.toStringTag,{value:"Module"}));class Dl extends F()({targets:{button:HTMLButtonElement,form:HTMLFormElement}}){get form(){return this.hasFormTarget?this.formTarget:this.element}runCheck(){this.buttonTarget.disabled=!this.form.checkValidity()}connect(){this.form.addEventListener("input",()=>this.runCheck()),this.runCheck(),ii(this,{childList:!0,subtree:!0})}mutate(){this.runCheck()}}const Fl=Object.freeze(Object.defineProperty({__proto__:null,default:Dl},Symbol.toStringTag,{value:"Module"}));class Bl extends F()({targets:{perPage:HTMLSelectElement}}){connect(){}perPageChange(t){t.preventDefault();const s=t.target.value,i=new URL(window.location.href);new URLSearchParams(s.split("?")[1]).forEach((o,a)=>{i.searchParams.set(a,o)}),window.location.href=i.toString()}navigate(t){const e=t.target.closest("a");e&&(t.preventDefault(),window.location.href=e.href)}}const Pl=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"})),Rl=8,$l=8;class Nl extends F()({targets:{activator:HTMLElement,wrapper:HTMLDivElement,tooltip:HTMLDivElement,arrow:HTMLDivElement,text:HTMLSpanElement}}){async update(){const t=this.element.getAttribute("data-placement")||"top";un(this.activatorTarget,this.tooltipTarget,{placement:t,middleware:[an(Rl+$l),cn({padding:8}),ln({padding:8}),Na({element:this.arrowTarget})]}).then(({x:e,y:s,placement:i,middlewareData:r})=>{Object.assign(this.tooltipTarget.style,{left:`${e}px`,top:`${s}px`});const o=i.split("-")[0];this.tooltipTarget.setAttribute("data-side",o),this.arrowTarget.setAttribute("data-side",o);const{x:a,y:l}=r.arrow||{},c={top:"bottom",right:"left",bottom:"top",left:"right"}[o],u={left:a!=null?`${a}px`:"",top:l!=null?`${l}px`:"",right:"",bottom:""};c==="top"?u.bottom="-8px":c==="bottom"?u.top="-8px":c==="left"?u.right="-8px":c==="right"&&(u.left="-8px"),Object.assign(this.arrowTarget.style,u)})}showTooltip(t){this.wrapperTarget.classList.add("ariadne:block"),this.wrapperTarget.classList.remove("ariadne:hidden"),this.update()}hideTooltip(t){this.wrapperTarget.classList.add("ariadne:hidden"),this.wrapperTarget.classList.remove("ariadne:block")}}const Il=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"})),pe=Vr.start();pe.debug=!1;window.Stimulus=pe;const Vl=Object.assign({"../../components/ariadne/form/toggle/component.ts":so,"../../components/ariadne/layout/sidebar/group/component.ts":io,"../../components/ariadne/ui/accordion/component.ts":Yo,"../../components/ariadne/ui/banner/component.ts":Go,"../../components/ariadne/ui/clipboard_copy/component.ts":ra,"../../components/ariadne/ui/combobox/component.ts":Ja,"../../components/ariadne/ui/dialog/component.ts":cl,"../../components/ariadne/ui/list/component.ts":hl,"../../components/ariadne/ui/popover/component.ts":fl,"../../components/ariadne/ui/relative_time/component.ts":Ml,"../../components/ariadne/ui/shortcut/component.ts":Ll});for(const[n,t]of Object.entries(Vl)){const e=n.split("/"),s=e.slice(3,e.length-1).join("-").replaceAll("_","-").toLocaleLowerCase();pe.register(s,t.default)}const jl=Object.assign({"/controllers/form_autosubmit_controller.ts":_l,"/controllers/form_validity_controller.ts":Fl,"/controllers/pagination_controller.ts":Pl,"/controllers/tooltip_controller.ts":Il});for(const[n,t]of Object.entries(jl)){const e=n.split("/"),s=e[e.length-1].replace("_controller.ts","").replaceAll("_","-").toLocaleLowerCase();pe.register(`ariadne-${s}`,t.default)}
|
98
|
+
%o`,e,t,s),(i=window.onerror)===null||i===void 0||i.call(window,e,"",0,0,t)}logFormattedMessage(t,e,s={}){s=Object.assign({application:this},s),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},s)),this.logger.groupEnd()}}function dl(){return new Promise(n=>{document.readyState=="loading"?document.addEventListener("DOMContentLoaded",()=>n()):n()})}function fl(n){return fe(n,"classes").reduce((e,s)=>Object.assign(e,ml(s)),{})}function ml(n){return{[`${n}Class`]:{get(){const{classes:t}=this;if(t.has(n))return t.get(n);{const e=t.getAttributeName(n);throw new Error(`Missing attribute "${e}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${de(n)}Class`]:{get(){return this.classes.has(n)}}}}function pl(n){return fe(n,"outlets").reduce((e,s)=>Object.assign(e,gl(s)),{})}function ni(n,t,e){return n.application.getControllerForElementAndIdentifier(t,e)}function si(n,t,e){let s=ni(n,t,e);if(s||(n.application.router.proposeToConnectScopeForElementAndIdentifier(t,e),s=ni(n,t,e),s))return s}function gl(n){const t=gn(n);return{[`${t}Outlet`]:{get(){const e=this.outlets.find(n),s=this.outlets.getSelectorForOutletName(n);if(e){const i=si(this,e,n);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${n}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${n}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}Outlets`]:{get(){const e=this.outlets.findAll(n);return e.length>0?e.map(s=>{const i=si(this,s,n);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${n}" instance for host controller "${this.identifier}"`,s)}).filter(s=>s):[]}},[`${t}OutletElement`]:{get(){const e=this.outlets.find(n),s=this.outlets.getSelectorForOutletName(n);if(e)return e;throw new Error(`Missing outlet element "${n}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${s}".`)}},[`${t}OutletElements`]:{get(){return this.outlets.findAll(n)}},[`has${de(t)}Outlet`]:{get(){return this.outlets.has(n)}}}}function bl(n){return fe(n,"targets").reduce((e,s)=>Object.assign(e,yl(s)),{})}function yl(n){return{[`${n}Target`]:{get(){const t=this.targets.find(n);if(t)return t;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${de(n)}Target`]:{get(){return this.targets.has(n)}}}}function vl(n){const t=Ha(n,"values"),e={valueDescriptorMap:{get(){return t.reduce((s,i)=>{const r=hr(i,this.identifier),o=this.data.getAttributeNameForKey(r.key);return Object.assign(s,{[o]:r})},{})}}};return t.reduce((s,i)=>Object.assign(s,wl(i)),e)}function wl(n,t){const e=hr(n,t),{key:s,name:i,reader:r,writer:o}=e;return{[i]:{get(){const a=this.data.get(s);return a!==null?r(a):e.defaultValue},set(a){a===void 0?this.data.delete(s):this.data.set(s,o(a))}},[`has${de(i)}`]:{get(){return this.data.has(s)||e.hasCustomDefaultValue}}}}function hr([n,t],e){return xl({controller:e,token:n,typeDefinition:t})}function Le(n){switch(n){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function oe(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(n))return"array";if(Object.prototype.toString.call(n)==="[object Object]")return"object"}function El(n){const{controller:t,token:e,typeObject:s}=n,i=Qs(s.type),r=Qs(s.default),o=i&&r,a=i&&!r,l=!i&&r,c=Le(s.type),u=oe(n.typeObject.default);if(a)return c;if(l)return u;if(c!==u){const h=t?`${t}.${e}`:e;throw new Error(`The specified default value for the Stimulus Value "${h}" must match the defined type "${c}". The provided default value of "${s.default}" is of type "${u}".`)}if(o)return c}function Tl(n){const{controller:t,token:e,typeDefinition:s}=n,r=El({controller:t,token:e,typeObject:s}),o=oe(s),a=Le(s),l=r||o||a;if(l)return l;const c=t?`${t}.${s}`:e;throw new Error(`Unknown value type "${c}" for "${e}" value`)}function Al(n){const t=Le(n);if(t)return ii[t];const e=bn(n,"default"),s=bn(n,"type"),i=n;if(e)return i.default;if(s){const{type:r}=i,o=Le(r);if(o)return ii[o]}return n}function xl(n){const{token:t,typeDefinition:e}=n,s=`${ir(t)}-value`,i=Tl(n);return{type:i,key:s,name:Kn(s),get defaultValue(){return Al(e)},get hasCustomDefaultValue(){return oe(e)!==void 0},reader:Sl[i],writer:ri[i]||ri.default}}const ii={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Sl={array(n){const t=JSON.parse(n);if(!Array.isArray(t))throw new TypeError(`expected value of type "array" but instead got value "${n}" of type "${oe(t)}"`);return t},boolean(n){return!(n=="0"||String(n).toLowerCase()=="false")},number(n){return Number(n.replace(/_/g,""))},object(n){const t=JSON.parse(n);if(t===null||typeof t!="object"||Array.isArray(t))throw new TypeError(`expected value of type "object" but instead got value "${n}" of type "${oe(t)}"`);return t},string(n){return n}},ri={default:Ml,array:oi,object:oi};function oi(n){return JSON.stringify(n)}function Ml(n){return`${n}`}let ut=class{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}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 outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:s={},prefix:i=this.identifier,bubbles:r=!0,cancelable:o=!0}={}){const a=i?`${i}:${t}`:t,l=new CustomEvent(a,{detail:s,bubbles:r,cancelable:o});return e.dispatchEvent(l),l}};ut.blessings=[fl,bl,vl,pl];ut.targets=[];ut.outlets=[];ut.values={};function I(){return function({targets:t,values:e}={}){const i=class i extends ut{dispatchEvent(o,a,l={}){const c=new Event(a,{bubbles:l.bubbles||!1,cancelable:l.cancelable||!1});o.dispatchEvent(c)}};i.targets=Object.keys(t??{}),i.values=e??{};let s=i;return s}}class Ol extends I()({targets:{toggle:HTMLInputElement},values:{formMethod:String,formUrl:String,csrfToken:String,turbo:Boolean}}){connect(){this.toggling=!1}requiresFormSubmit(){return this.formUrlValue!=null}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.requiresFormSubmit()){this.performToggle(),this.toggling=!1;return}this.performToggle();try{await this.submitForm()}catch(t){t instanceof Error&&this.performToggle();return}finally{this.toggling=!1}}}performToggle(){this.isOn()?this.turnOff():this.turnOn()}turnOn(){this.isDisabled()||this.toggleTarget.setAttribute("aria-pressed","true")}turnOff(){this.isDisabled()||this.toggleTarget.setAttribute("aria-pressed","false")}isOn(){return this.toggleTarget.getAttribute("aria-pressed")==="true"}isOff(){return!this.isOn()}isDisabled(){return this.toggleTarget.getAttribute("disabled")!=null}async submitForm(){const t=new FormData,e=this.documentCsrfToken()||this.csrfTokenValue;if(e&&t.append(this.csrfField(),e),t.append(this.toggleTarget.name,this.isOn()?"true":"false"),!this.formUrlValue)throw new Error("invalid src");let s;const i={"Requested-With":"XMLHttpRequest"};this.turboValue&&(i.Accept="text/vnd.turbo-stream.html");try{s=await fetch(this.formUrlValue,{credentials:"same-origin",method:this.formMethodValue,headers:i,body:t})}catch(o){throw new Error(`A network error occurred, please try again: ${o.message}`)}if(!s.ok)throw new Error(await s.text());const r=s.headers.get("Content-Type");window.Turbo&&this.turbo&&(r!=null&&r.startsWith("text/vnd.turbo-stream.html"))&&window.Turbo.renderStreamMessage(await s.text())}csrfField(){return this.toggleTarget.getAttribute("csrf-field")||"authenticity_token"}documentCsrfToken(){const t=document.querySelector("meta[name=csrf-token]");return t&&t.getAttribute("content")}}const Cl=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),vs=class vs extends I()({targets:{content:HTMLElement,chevron:HTMLElement},values:{open:{type:Boolean,default:!1}}}){connect(){this.applyState(this.openValue)}toggle(t){t&&t.stopPropagation(),this.openValue=!this.openValue}openValueChanged(t){this.applyState(t)}applyState(t){const e=this.contentTarget,s=this.hasChevronTarget?this.chevronTarget:null,i=e.scrollHeight;t?(e.classList.add("ariadne:animate-accordion-down"),e.classList.remove("ariadne:animate-accordion-up"),e.style.height=`${i}px`,this.element.classList.add("ariadne-sidebar-group-open"),this.element.classList.remove("ariadne-sidebar-group-closed"),s&&s.classList.add("ariadne:rotate-90"),setTimeout(()=>{this.openValue&&(e.style.height="auto")},200)):(e.classList.add("ariadne:animate-accordion-up"),e.classList.remove("ariadne:animate-accordion-down"),e.style.height=`${i}px`,e.offsetHeight,e.style.height="0px",this.element.classList.add("ariadne-sidebar-group-closed"),this.element.classList.remove("ariadne-sidebar-group-open"),s&&s.classList.remove("ariadne:rotate-90"))}};vs.classes=["open","closed"];let vn=vs;const kl=Object.freeze(Object.defineProperty({__proto__:null,default:vn},Symbol.toStringTag,{value:"Module"})),Et=n=>n;let dr=Et;function Ll(n,t){n.indexOf(t)===-1&&n.push(t)}function fr(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}class mr{constructor(){this.subscriptions=[]}add(t){return Ll(this.subscriptions,t),()=>fr(this.subscriptions,t)}notify(t,e,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,e,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(t,e,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function pr(n,t){return t?n*(1e3/t):0}const Fl={useManualTiming:!1},Te=["read","resolveKeyframes","update","preRender","render","postRender"];function Dl(n,t){let e=new Set,s=new Set,i=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function l(u){o.has(u)&&(c.schedule(u),n()),u(a)}const c={schedule:(u,h=!1,d=!1)=>{const f=d&&i?e:s;return h&&o.add(u),f.has(u)||f.add(u),u},cancel:u=>{s.delete(u),o.delete(u)},process:u=>{if(a=u,i){r=!0;return}i=!0,[e,s]=[s,e],e.forEach(l),e.clear(),i=!1,r&&(r=!1,c.process(u))}};return c}const Vl=40;function _l(n,t){let e=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>e=!0,o=Te.reduce((p,v)=>(p[v]=Dl(r),p),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:h,postRender:d}=o,m=()=>{const p=performance.now();e=!1,i.delta=s?1e3/60:Math.max(Math.min(p-i.timestamp,Vl),1),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),d.process(i),i.isProcessing=!1,e&&t&&(s=!1,n(m))},f=()=>{e=!0,s=!0,i.isProcessing||n(m)};return{schedule:Te.reduce((p,v)=>{const E=o[v];return p[v]=(w,y=!1,T=!1)=>(e||f(),E.schedule(w,y,T)),p},{}),cancel:p=>{for(let v=0;v<Te.length;v++)o[Te[v]].cancel(p)},state:i,steps:o}}const{schedule:Z,cancel:wn,state:Fe}=_l(typeof requestAnimationFrame<"u"?requestAnimationFrame:Et,!0);let Ce;function Pl(){Ce=void 0}const ot={now:()=>(Ce===void 0&&ot.set(Fe.isProcessing||Fl.useManualTiming?Fe.timestamp:performance.now()),Ce),set:n=>{Ce=n,queueMicrotask(Pl)}},ai=30,Bl=n=>!isNaN(parseFloat(n));class Rl{constructor(t,e={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=ot.now();this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=ot.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Bl(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new mr);const s=this.events[t].add(e);return t==="change"?()=>{s(),Z.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){!e||!this.passiveEffect?this.updateAndNotify(t,e):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,e,s){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ot.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>ai)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,ai);return pr(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ae(n,t){return new Rl(n,t)}function Il(n,t,e){var s;if(n instanceof EventTarget)return[n];if(typeof n=="string"){let i=document;const r=(s=e==null?void 0:e[n])!==null&&s!==void 0?s:i.querySelectorAll(n);return r?Array.from(r):[]}return Array.from(n)}const We=(n,t,e)=>{const s=t-n;return s===0?1:(e-n)/s};function Un(n){let t;return()=>(t===void 0&&(t=n()),t)}const Nl=Un(()=>window.ScrollTimeline!==void 0);class $l{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=e}attachTimeline(t,e){const s=this.animations.map(i=>{if(Nl()&&i.attachTimeline)return i.attachTimeline(t);if(typeof e=="function")return e(i)});return()=>{s.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class gr extends $l{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}const nt=n=>n*1e3,st=n=>n/1e3,De=2e4;function Wn(n){let t=0;const e=50;let s=n.next(t);for(;!s.done&&t<De;)t+=e,s=n.next(t);return t>=De?1/0:t}const br=(n,t,e=10)=>{let s="";const i=Math.max(Math.round(t/e),2);for(let r=0;r<i;r++)s+=n(We(0,i-1,r))+", ";return`linear(${s.substring(0,s.length-2)})`},Tt=(n,t,e)=>e>t?t:e<n?n:e,jl=5;function yr(n,t,e){const s=Math.max(t-jl,0);return pr(e-n(s),t-s)}const C={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},li=.001;function Kl({duration:n=C.duration,bounce:t=C.bounce,velocity:e=C.velocity,mass:s=C.mass}){let i,r,o=1-t;o=Tt(C.minDamping,C.maxDamping,o),n=Tt(C.minDuration,C.maxDuration,st(n)),o<1?(i=c=>{const u=c*o,h=u*n,d=u-e,m=En(c,o),f=Math.exp(-h);return li-d/m*f},r=c=>{const h=c*o*n,d=h*e+e,m=Math.pow(o,2)*Math.pow(c,2)*n,f=Math.exp(-h),g=En(Math.pow(c,2),o);return(-i(c)+li>0?-1:1)*((d-m)*f)/g}):(i=c=>{const u=Math.exp(-c*n),h=(c-e)*n+1;return-.001+u*h},r=c=>{const u=Math.exp(-c*n),h=(e-c)*(n*n);return u*h});const a=5/n,l=Ul(i,r,a);if(n=nt(n),isNaN(l))return{stiffness:C.stiffness,damping:C.damping,duration:n};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:o*2*Math.sqrt(s*c),duration:n}}}const Hl=12;function Ul(n,t,e){let s=e;for(let i=1;i<Hl;i++)s=s-n(s)/t(s);return s}function En(n,t){return n*Math.sqrt(1-t*t)}const Wl=["duration","bounce"],zl=["stiffness","damping","mass"];function ci(n,t){return t.some(e=>n[e]!==void 0)}function ql(n){let t={velocity:C.velocity,stiffness:C.stiffness,damping:C.damping,mass:C.mass,isResolvedFromDuration:!1,...n};if(!ci(n,zl)&&ci(n,Wl))if(n.visualDuration){const e=n.visualDuration,s=2*Math.PI/(e*1.2),i=s*s,r=2*Tt(.05,1,1-(n.bounce||0))*Math.sqrt(i);t={...t,mass:C.mass,stiffness:i,damping:r}}else{const e=Kl(n);t={...t,...e,mass:C.mass},t.isResolvedFromDuration=!0}return t}function zn(n=C.visualDuration,t=C.bounce){const e=typeof n!="object"?{visualDuration:n,keyframes:[0,1],bounce:t}:n;let{restSpeed:s,restDelta:i}=e;const r=e.keyframes[0],o=e.keyframes[e.keyframes.length-1],a={done:!1,value:r},{stiffness:l,damping:c,mass:u,duration:h,velocity:d,isResolvedFromDuration:m}=ql({...e,velocity:-st(e.velocity||0)}),f=d||0,g=c/(2*Math.sqrt(l*u)),b=o-r,p=st(Math.sqrt(l/u)),v=Math.abs(b)<5;s||(s=v?C.restSpeed.granular:C.restSpeed.default),i||(i=v?C.restDelta.granular:C.restDelta.default);let E;if(g<1){const y=En(p,g);E=T=>{const S=Math.exp(-g*p*T);return o-S*((f+g*p*b)/y*Math.sin(y*T)+b*Math.cos(y*T))}}else if(g===1)E=y=>o-Math.exp(-p*y)*(b+(f+p*b)*y);else{const y=p*Math.sqrt(g*g-1);E=T=>{const S=Math.exp(-g*p*T),A=Math.min(y*T,300);return o-S*((f+g*p*b)*Math.sinh(A)+y*b*Math.cosh(A))/y}}const w={calculatedDuration:m&&h||null,next:y=>{const T=E(y);if(m)a.done=y>=h;else{let S=0;g<1&&(S=y===0?nt(f):yr(E,y,T));const A=Math.abs(S)<=s,M=Math.abs(o-T)<=i;a.done=A&&M}return a.value=a.done?o:T,a},toString:()=>{const y=Math.min(Wn(w),De),T=br(S=>w.next(y*S).value,y,30);return y+"ms "+T}};return w}function Yl(n,t=100,e){const s=e({...n,keyframes:[0,t]}),i=Math.min(Wn(s),De);return{type:"keyframes",ease:r=>s.next(i*r).value/t,duration:st(i)}}function ze(n){return typeof n=="function"}const Xl=(n,t,e)=>{const s=t-n;return((e-n)%s+s)%s+n},vr=n=>Array.isArray(n)&&typeof n[0]!="number";function wr(n,t){return vr(n)?n[Xl(0,n.length,t)]:n}const me=(n,t,e)=>n+(t-n)*e;function Er(n,t){const e=n[n.length-1];for(let s=1;s<=t;s++){const i=We(0,t,s);n.push(me(e,1,i))}}function Tr(n){const t=[0];return Er(t,n.length-1),t}const P=n=>!!(n&&n.getVelocity);function qn(n){return typeof n=="object"&&!Array.isArray(n)}function Ar(n,t,e,s){return typeof n=="string"&&qn(t)?Il(n,e,s):n instanceof NodeList?Array.from(n):Array.isArray(n)?n:[n]}function Gl(n,t,e){return n*(t+1)}function ui(n,t,e,s){var i;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,n+parseFloat(t)):t==="<"?e:(i=s.get(t))!==null&&i!==void 0?i:n}function Zl(n,t,e){for(let s=0;s<n.length;s++){const i=n[s];i.at>t&&i.at<e&&(fr(n,i),s--)}}function Ql(n,t,e,s,i,r){Zl(n,i,r);for(let o=0;o<t.length;o++)n.push({value:t[o],at:me(i,r,s[o]),easing:wr(e,o)})}function Jl(n,t){for(let e=0;e<n.length;e++)n[e]=n[e]/(t+1)}function tc(n,t){return n.at===t.at?n.value===null?1:t.value===null?-1:0:n.at-t.at}const ec="easeInOut";function nc(n,{defaultTransition:t={},...e}={},s,i){const r=t.duration||.3,o=new Map,a=new Map,l={},c=new Map;let u=0,h=0,d=0;for(let m=0;m<n.length;m++){const f=n[m];if(typeof f=="string"){c.set(f,h);continue}else if(!Array.isArray(f)){c.set(f.name,ui(h,f.at,u,c));continue}let[g,b,p={}]=f;p.at!==void 0&&(h=ui(h,p.at,u,c));let v=0;const E=(w,y,T,S=0,A=0)=>{const M=sc(w),{delay:O=0,times:F=Tr(M),type:R="keyframes",repeat:N,repeatType:V,repeatDelay:ht=0,...W}=y;let{ease:D=t.ease||"easeOut",duration:L}=y;const z=typeof O=="function"?O(S,A):O,ye=M.length,ws=ze(R)?R:i==null?void 0:i[R];if(ye<=2&&ws){let Ht=100;if(ye===2&&oc(M)){const Ut=M[1]-M[0];Ht=Math.abs(Ut)}const ve={...W};L!==void 0&&(ve.duration=nt(L));const we=Yl(ve,Ht,ws);D=we.ease,L=we.duration}L??(L=r);const Es=h+z;F.length===1&&F[0]===0&&(F[1]=1);const Ts=F.length-M.length;if(Ts>0&&Er(F,Ts),M.length===1&&M.unshift(null),N){L=Gl(L,N);const Ht=[...M],ve=[...F];D=Array.isArray(D)?[...D]:[D];const we=[...D];for(let Ut=0;Ut<N;Ut++){M.push(...Ht);for(let Wt=0;Wt<Ht.length;Wt++)F.push(ve[Wt]+(Ut+1)),D.push(Wt===0?"linear":wr(we,Wt-1))}Jl(F,N)}const As=Es+L;Ql(T,M,D,F,Es,As),v=Math.max(z+L,v),d=Math.max(As,d)};if(P(g)){const w=hi(g,a);E(b,p,di("default",w))}else{const w=Ar(g,b,s,l),y=w.length;for(let T=0;T<y;T++){b=b,p=p;const S=w[T],A=hi(S,a);for(const M in b)E(b[M],ic(p,M),di(M,A),T,y)}}u=h,h+=v}return a.forEach((m,f)=>{for(const g in m){const b=m[g];b.sort(tc);const p=[],v=[],E=[];for(let y=0;y<b.length;y++){const{at:T,value:S,easing:A}=b[y];p.push(S),v.push(We(0,d,T)),E.push(A||"easeOut")}v[0]!==0&&(v.unshift(0),p.unshift(p[0]),E.unshift(ec)),v[v.length-1]!==1&&(v.push(1),p.push(null)),o.has(f)||o.set(f,{keyframes:{},transition:{}});const w=o.get(f);w.keyframes[g]=p,w.transition[g]={...t,duration:d,ease:E,times:v,...e}}}),o}function hi(n,t){return!t.has(n)&&t.set(n,{}),t.get(n)}function di(n,t){return t[n]||(t[n]=[]),t[n]}function sc(n){return Array.isArray(n)?n:[n]}function ic(n,t){return n&&n[t]?{...n,...n[t]}:{...n}}const rc=n=>typeof n=="number",oc=n=>n.every(rc),le=new WeakMap;function xr(n,t){return n?n[t]||n.default||n:void 0}const Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rt=new Set(Bt),Sr=new Set(["width","height","top","left","right","bottom",...Bt]),ac=n=>Array.isArray(n),lc=n=>ac(n)?n[n.length-1]||0:n;function fi(n){const t=[{},{}];return n==null||n.values.forEach((e,s)=>{t[0][s]=e.get(),t[1][s]=e.getVelocity()}),t}function Mr(n,t,e,s){if(typeof t=="function"){const[i,r]=fi(s);t=t(e!==void 0?e:n.custom,i,r)}if(typeof t=="string"&&(t=n.variants&&n.variants[t]),typeof t=="function"){const[i,r]=fi(s);t=t(e!==void 0?e:n.custom,i,r)}return t}function cc(n,t,e){const s=n.getProps();return Mr(s,t,s.custom,n)}function uc(n,t,e){n.hasValue(t)?n.getValue(t).set(e):n.addValue(t,ae(e))}function hc(n,t){const e=cc(n,t);let{transitionEnd:s={},transition:i={},...r}=e||{};r={...r,...s};for(const o in r){const a=lc(r[o]);uc(n,o,a)}}function dc(n){return!!(P(n)&&n.add)}function fc(n,t){const e=n.getValue("willChange");if(dc(e))return e.add(t)}const Yn=n=>n.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),mc="framerAppearId",pc="data-"+Yn(mc);function gc(n){return n.props[pc]}function mi(n,t){n.timeline=t,n.onfinish=null}const Xn=n=>Array.isArray(n)&&typeof n[0]=="number",bc={linearEasing:void 0};function yc(n,t){const e=Un(n);return()=>{var s;return(s=bc[t])!==null&&s!==void 0?s:e()}}const Ve=yc(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function Or(n){return!!(typeof n=="function"&&Ve()||!n||typeof n=="string"&&(n in Tn||Ve())||Xn(n)||Array.isArray(n)&&n.every(Or))}const Qt=([n,t,e,s])=>`cubic-bezier(${n}, ${t}, ${e}, ${s})`,Tn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Qt([0,.65,.55,1]),circOut:Qt([.55,0,1,.45]),backIn:Qt([.31,.01,.66,-.59]),backOut:Qt([.33,1.53,.69,.99])};function Cr(n,t){if(n)return typeof n=="function"&&Ve()?br(n,t):Xn(n)?Qt(n):Array.isArray(n)?n.map(e=>Cr(e,t)||Tn.easeOut):Tn[n]}const kr=(n,t,e)=>(((1-3*e+3*t)*n+(3*e-6*t))*n+3*t)*n,vc=1e-7,wc=12;function Ec(n,t,e,s,i){let r,o,a=0;do o=t+(e-t)/2,r=kr(o,s,i)-n,r>0?e=o:t=o;while(Math.abs(r)>vc&&++a<wc);return o}function pe(n,t,e,s){if(n===t&&e===s)return Et;const i=r=>Ec(r,0,1,n,e);return r=>r===0||r===1?r:kr(i(r),t,s)}const Lr=n=>t=>t<=.5?n(2*t)/2:(2-n(2*(1-t)))/2,Fr=n=>t=>1-n(1-t),Dr=pe(.33,1.53,.69,.99),Gn=Fr(Dr),Vr=Lr(Gn),_r=n=>(n*=2)<1?.5*Gn(n):.5*(2-Math.pow(2,-10*(n-1))),Zn=n=>1-Math.sin(Math.acos(n)),Tc=Fr(Zn),Pr=Lr(Zn),Br=n=>/^0[^.\s]+$/u.test(n);function Ac(n){return typeof n=="number"?n===0:n!==null?n==="none"||n==="0"||Br(n):!0}const It={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},ce={...It,transform:n=>Tt(0,1,n)},Ae={...It,default:1},ne=n=>Math.round(n*1e5)/1e5,Qn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function xc(n){return n==null}const Sc=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Jn=(n,t)=>e=>!!(typeof e=="string"&&Sc.test(e)&&e.startsWith(n)||t&&!xc(e)&&Object.prototype.hasOwnProperty.call(e,t)),Rr=(n,t,e)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(Qn);return{[n]:parseFloat(i),[t]:parseFloat(r),[e]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Mc=n=>Tt(0,255,n),sn={...It,transform:n=>Math.round(Mc(n))},gt={test:Jn("rgb","red"),parse:Rr("red","green","blue"),transform:({red:n,green:t,blue:e,alpha:s=1})=>"rgba("+sn.transform(n)+", "+sn.transform(t)+", "+sn.transform(e)+", "+ne(ce.transform(s))+")"};function Oc(n){let t="",e="",s="",i="";return n.length>5?(t=n.substring(1,3),e=n.substring(3,5),s=n.substring(5,7),i=n.substring(7,9)):(t=n.substring(1,2),e=n.substring(2,3),s=n.substring(3,4),i=n.substring(4,5),t+=t,e+=e,s+=s,i+=i),{red:parseInt(t,16),green:parseInt(e,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const An={test:Jn("#"),parse:Oc,transform:gt.transform},ge=n=>({test:t=>typeof t=="string"&&t.endsWith(n)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${n}`}),it=ge("deg"),Ft=ge("%"),x=ge("px"),Cc=ge("vh"),kc=ge("vw"),pi={...Ft,parse:n=>Ft.parse(n)/100,transform:n=>Ft.transform(n*100)},Ot={test:Jn("hsl","hue"),parse:Rr("hue","saturation","lightness"),transform:({hue:n,saturation:t,lightness:e,alpha:s=1})=>"hsla("+Math.round(n)+", "+Ft.transform(ne(t))+", "+Ft.transform(ne(e))+", "+ne(ce.transform(s))+")"},_={test:n=>gt.test(n)||An.test(n)||Ot.test(n),parse:n=>gt.test(n)?gt.parse(n):Ot.test(n)?Ot.parse(n):An.parse(n),transform:n=>typeof n=="string"?n:n.hasOwnProperty("red")?gt.transform(n):Ot.transform(n)},Lc=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Fc(n){var t,e;return isNaN(n)&&typeof n=="string"&&(((t=n.match(Qn))===null||t===void 0?void 0:t.length)||0)+(((e=n.match(Lc))===null||e===void 0?void 0:e.length)||0)>0}const Ir="number",Nr="color",Dc="var",Vc="var(",gi="${}",_c=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ue(n){const t=n.toString(),e=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=t.replace(_c,l=>(_.test(l)?(s.color.push(r),i.push(Nr),e.push(_.parse(l))):l.startsWith(Vc)?(s.var.push(r),i.push(Dc),e.push(l)):(s.number.push(r),i.push(Ir),e.push(parseFloat(l))),++r,gi)).split(gi);return{values:e,split:a,indexes:s,types:i}}function $r(n){return ue(n).values}function jr(n){const{split:t,types:e}=ue(n),s=t.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=t[o],i[o]!==void 0){const a=e[o];a===Ir?r+=ne(i[o]):a===Nr?r+=_.transform(i[o]):r+=i[o]}return r}}const Pc=n=>typeof n=="number"?0:n;function Bc(n){const t=$r(n);return jr(n)(t.map(Pc))}const Nt={test:Fc,parse:$r,createTransformer:jr,getAnimatableNone:Bc},Rc=new Set(["brightness","contrast","saturate","opacity"]);function Ic(n){const[t,e]=n.slice(0,-1).split("(");if(t==="drop-shadow")return n;const[s]=e.match(Qn)||[];if(!s)return n;const i=e.replace(s,"");let r=Rc.has(t)?1:0;return s!==e&&(r*=100),t+"("+r+i+")"}const Nc=/\b([a-z-]*)\(.*?\)/gu,xn={...Nt,getAnimatableNone:n=>{const t=n.match(Nc);return t?t.map(Ic).join(" "):n}},$c={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,backgroundPositionX:x,backgroundPositionY:x},jc={rotate:it,rotateX:it,rotateY:it,rotateZ:it,scale:Ae,scaleX:Ae,scaleY:Ae,scaleZ:Ae,skew:it,skewX:it,skewY:it,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:ce,originX:pi,originY:pi,originZ:x},bi={...It,transform:Math.round},ts={...$c,...jc,zIndex:bi,size:x,fillOpacity:ce,strokeOpacity:ce,numOctaves:bi},Kc={...ts,color:_,backgroundColor:_,outlineColor:_,fill:_,stroke:_,borderColor:_,borderTopColor:_,borderRightColor:_,borderBottomColor:_,borderLeftColor:_,filter:xn,WebkitFilter:xn},Kr=n=>Kc[n];function Hr(n,t){let e=Kr(n);return e!==xn&&(e=Nt),e.getAnimatableNone?e.getAnimatableNone(t):void 0}const Hc=new Set(["auto","none","0"]);function Uc(n,t,e){let s=0,i;for(;s<n.length&&!i;){const r=n[s];typeof r=="string"&&!Hc.has(r)&&ue(r).values.length&&(i=n[s]),s++}if(i&&e)for(const r of t)n[r]=Hr(e,i)}const bt=n=>n*180/Math.PI,Sn=n=>{const t=bt(Math.atan2(n[1],n[0]));return Mn(t)},Wc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:n=>(Math.abs(n[0])+Math.abs(n[3]))/2,rotate:Sn,rotateZ:Sn,skewX:n=>bt(Math.atan(n[1])),skewY:n=>bt(Math.atan(n[2])),skew:n=>(Math.abs(n[1])+Math.abs(n[2]))/2},Mn=n=>(n=n%360,n<0&&(n+=360),n),yi=Sn,vi=n=>Math.sqrt(n[0]*n[0]+n[1]*n[1]),wi=n=>Math.sqrt(n[4]*n[4]+n[5]*n[5]),zc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vi,scaleY:wi,scale:n=>(vi(n)+wi(n))/2,rotateX:n=>Mn(bt(Math.atan2(n[6],n[5]))),rotateY:n=>Mn(bt(Math.atan2(-n[2],n[0]))),rotateZ:yi,rotate:yi,skewX:n=>bt(Math.atan(n[4])),skewY:n=>bt(Math.atan(n[1])),skew:n=>(Math.abs(n[1])+Math.abs(n[4]))/2};function Ei(n){return n.includes("scale")?1:0}function On(n,t){if(!n||n==="none")return Ei(t);const e=n.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(e)s=zc,i=e;else{const a=n.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Wc,i=a}if(!i)return Ei(t);const r=s[t],o=i[1].split(",").map(Yc);return typeof r=="function"?r(o):o[r]}const qc=(n,t)=>{const{transform:e="none"}=getComputedStyle(n);return On(e,t)};function Yc(n){return parseFloat(n.trim())}const Ti=n=>n===It||n===x,Xc=new Set(["x","y","z"]),Gc=Bt.filter(n=>!Xc.has(n));function Zc(n){const t=[];return Gc.forEach(e=>{const s=n.getValue(e);s!==void 0&&(t.push([e,s.get()]),s.set(e.startsWith("scale")?1:0))}),t}const _t={width:({x:n},{paddingLeft:t="0",paddingRight:e="0"})=>n.max-n.min-parseFloat(t)-parseFloat(e),height:({y:n},{paddingTop:t="0",paddingBottom:e="0"})=>n.max-n.min-parseFloat(t)-parseFloat(e),top:(n,{top:t})=>parseFloat(t),left:(n,{left:t})=>parseFloat(t),bottom:({y:n},{top:t})=>parseFloat(t)+(n.max-n.min),right:({x:n},{left:t})=>parseFloat(t)+(n.max-n.min),x:(n,{transform:t})=>On(t,"x"),y:(n,{transform:t})=>On(t,"y")};_t.translateX=_t.x;_t.translateY=_t.y;const vt=new Set;let Cn=!1,kn=!1;function Ur(){if(kn){const n=Array.from(vt).filter(s=>s.needsMeasurement),t=new Set(n.map(s=>s.element)),e=new Map;t.forEach(s=>{const i=Zc(s);i.length&&(e.set(s,i),s.render())}),n.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const i=e.get(s);i&&i.forEach(([r,o])=>{var a;(a=s.getValue(r))===null||a===void 0||a.set(o)})}),n.forEach(s=>s.measureEndState()),n.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}kn=!1,Cn=!1,vt.forEach(n=>n.complete()),vt.clear()}function Wr(){vt.forEach(n=>{n.readKeyframes(),n.needsMeasurement&&(kn=!0)})}function Qc(){Wr(),Ur()}class es{constructor(t,e,s,i,r,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(vt.add(this),Cn||(Cn=!0,Z.read(Wr),Z.resolveKeyframes(Ur))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:s,motionValue:i}=this;for(let r=0;r<t.length;r++)if(t[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&e){const l=s.readValue(e,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&o===void 0&&i.set(t[0])}else t[r]=t[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),vt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,vt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const zr=n=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(n),qr=n=>t=>typeof t=="string"&&t.startsWith(n),Yr=qr("--"),Jc=qr("var(--"),ns=n=>Jc(n)?tu.test(n.split("/*")[0].trim()):!1,tu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,eu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function nu(n){const t=eu.exec(n);if(!t)return[,];const[,e,s,i]=t;return[`--${e??s}`,i]}function Xr(n,t,e=1){const[s,i]=nu(n);if(!s)return;const r=window.getComputedStyle(t).getPropertyValue(s);if(r){const o=r.trim();return zr(o)?parseFloat(o):o}return ns(i)?Xr(i,t,e+1):i}const Gr=n=>t=>t.test(n),su={test:n=>n==="auto",parse:n=>n},Zr=[It,x,Ft,it,kc,Cc,su],Ai=n=>Zr.find(Gr(n));class Qr extends es{constructor(t,e,s,i,r){super(t,e,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:s}=this;if(!e||!e.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),ns(c))){const u=Xr(c,e.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Sr.has(s)||t.length!==2)return;const[i,r]=t,o=Ai(i),a=Ai(r);if(o!==a)if(Ti(o)&&Ti(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,s=[];for(let i=0;i<t.length;i++)Ac(t[i])&&s.push(i);s.length&&Uc(t,s,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=_t[s](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];i!==void 0&&t.getValue(s,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:s,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=_t[s](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{e.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const xi=(n,t)=>t==="zIndex"?!1:!!(typeof n=="number"||Array.isArray(n)||typeof n=="string"&&(Nt.test(n)||n==="0")&&!n.startsWith("url("));function iu(n){const t=n[0];if(n.length===1)return!0;for(let e=0;e<n.length;e++)if(n[e]!==t)return!0}function ru(n,t,e,s){const i=n[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const r=n[n.length-1],o=xi(i,t),a=xi(r,t);return!o||!a?!1:iu(n)||(e==="spring"||ze(e))&&s}const ou=n=>n!==null;function qe(n,{repeat:t,repeatType:e="loop"},s){const i=n.filter(ou),r=t&&e!=="loop"&&t%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}const au=40;class Jr{constructor({autoplay:t=!0,delay:e=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ot.now(),this.options={autoplay:t,delay:e,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>au?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Qc(),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=ot.now(),this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!ru(t,s,i,r))if(o)this.options.duration=0;else{l&&l(qe(t,this.options,e)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,e);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function rn(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+(t-n)*6*e:e<1/2?t:e<2/3?n+(t-n)*(2/3-e)*6:n}function lu({hue:n,saturation:t,lightness:e,alpha:s}){n/=360,t/=100,e/=100;let i=0,r=0,o=0;if(!t)i=r=o=e;else{const a=e<.5?e*(1+t):e+t-e*t,l=2*e-a;i=rn(l,a,n+1/3),r=rn(l,a,n),o=rn(l,a,n-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function _e(n,t){return e=>e>0?t:n}const on=(n,t,e)=>{const s=n*n,i=e*(t*t-s)+s;return i<0?0:Math.sqrt(i)},cu=[An,gt,Ot],uu=n=>cu.find(t=>t.test(n));function Si(n){const t=uu(n);if(!t)return!1;let e=t.parse(n);return t===Ot&&(e=lu(e)),e}const Mi=(n,t)=>{const e=Si(n),s=Si(t);if(!e||!s)return _e(n,t);const i={...e};return r=>(i.red=on(e.red,s.red,r),i.green=on(e.green,s.green,r),i.blue=on(e.blue,s.blue,r),i.alpha=me(e.alpha,s.alpha,r),gt.transform(i))},hu=(n,t)=>e=>t(n(e)),ss=(...n)=>n.reduce(hu),Ln=new Set(["none","hidden"]);function du(n,t){return Ln.has(n)?e=>e<=0?n:t:e=>e>=1?t:n}function fu(n,t){return e=>me(n,t,e)}function is(n){return typeof n=="number"?fu:typeof n=="string"?ns(n)?_e:_.test(n)?Mi:gu:Array.isArray(n)?to:typeof n=="object"?_.test(n)?Mi:mu:_e}function to(n,t){const e=[...n],s=e.length,i=n.map((r,o)=>is(r)(r,t[o]));return r=>{for(let o=0;o<s;o++)e[o]=i[o](r);return e}}function mu(n,t){const e={...n,...t},s={};for(const i in e)n[i]!==void 0&&t[i]!==void 0&&(s[i]=is(n[i])(n[i],t[i]));return i=>{for(const r in s)e[r]=s[r](i);return e}}function pu(n,t){var e;const s=[],i={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const o=t.types[r],a=n.indexes[o][i[o]],l=(e=n.values[a])!==null&&e!==void 0?e:0;s[r]=l,i[o]++}return s}const gu=(n,t)=>{const e=Nt.createTransformer(t),s=ue(n),i=ue(t);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?Ln.has(n)&&!i.values.length||Ln.has(t)&&!s.values.length?du(n,t):ss(to(pu(s,i),i.values),e):_e(n,t)};function eo(n,t,e){return typeof n=="number"&&typeof t=="number"&&typeof e=="number"?me(n,t,e):is(n)(n,t)}function Oi({keyframes:n,velocity:t=0,power:e=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=n[0],d={done:!1,value:h},m=A=>a!==void 0&&A<a||l!==void 0&&A>l,f=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let g=e*t;const b=h+g,p=o===void 0?b:o(b);p!==b&&(g=p-h);const v=A=>-g*Math.exp(-A/s),E=A=>p+v(A),w=A=>{const M=v(A),O=E(A);d.done=Math.abs(M)<=c,d.value=d.done?p:O};let y,T;const S=A=>{m(d.value)&&(y=A,T=zn({keyframes:[d.value,f(d.value)],velocity:yr(E,A,d.value),damping:i,stiffness:r,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:A=>{let M=!1;return!T&&y===void 0&&(M=!0,w(A),S(A)),y!==void 0&&A>=y?T.next(A-y):(!M&&w(A),d)}}}const bu=pe(.42,0,1,1),yu=pe(0,0,.58,1),no=pe(.42,0,.58,1),vu={linear:Et,easeIn:bu,easeInOut:no,easeOut:yu,circIn:Zn,circInOut:Pr,circOut:Tc,backIn:Gn,backInOut:Vr,backOut:Dr,anticipate:_r},Ci=n=>{if(Xn(n)){dr(n.length===4);const[t,e,s,i]=n;return pe(t,e,s,i)}else if(typeof n=="string")return vu[n];return n};function wu(n,t,e){const s=[],i=e||eo,r=n.length-1;for(let o=0;o<r;o++){let a=i(n[o],n[o+1]);if(t){const l=Array.isArray(t)?t[o]||Et:t;a=ss(l,a)}s.push(a)}return s}function Eu(n,t,{clamp:e=!0,ease:s,mixer:i}={}){const r=n.length;if(dr(r===t.length),r===1)return()=>t[0];if(r===2&&t[0]===t[1])return()=>t[1];const o=n[0]===n[1];n[0]>n[r-1]&&(n=[...n].reverse(),t=[...t].reverse());const a=wu(t,s,i),l=a.length,c=u=>{if(o&&u<n[0])return t[0];let h=0;if(l>1)for(;h<n.length-2&&!(u<n[h+1]);h++);const d=We(n[h],n[h+1],u);return a[h](d)};return e?u=>c(Tt(n[0],n[r-1],u)):c}function Tu(n,t){return n.map(e=>e*t)}function Au(n,t){return n.map(()=>t||no).splice(0,n.length-1)}function Pe({duration:n=300,keyframes:t,times:e,ease:s="easeInOut"}){const i=vr(s)?s.map(Ci):Ci(s),r={done:!1,value:t[0]},o=Tu(e&&e.length===t.length?e:Tr(t),n),a=Eu(o,t,{ease:Array.isArray(i)?i:Au(t,i)});return{calculatedDuration:n,next:l=>(r.value=a(l),r.done=l>=n,r)}}const xu=n=>{const t=({timestamp:e})=>n(e);return{start:()=>Z.update(t,!0),stop:()=>wn(t),now:()=>Fe.isProcessing?Fe.timestamp:ot.now()}},Su={decay:Oi,inertia:Oi,tween:Pe,keyframes:Pe,spring:zn},Mu=n=>n/100;class rs extends Jr{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:e,motionValue:s,element:i,keyframes:r}=this.options,o=(i==null?void 0:i.KeyframeResolver)||es,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(r,a,e,s,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=ze(e)?e:Su[e]||Pe;let l,c;a!==Pe&&typeof t[0]!="number"&&(l=ss(Mu,eo(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});r==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Wn(u));const{calculatedDuration:h}=u,d=h+i,m=d*(s+1)-i;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:d,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,e=!1){const{resolved:s}=this;if(!s){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:d,repeat:m,repeatType:f,repeatDelay:g,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?p<0:p>u;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let E=this.currentTime,w=r;if(m){const A=Math.min(this.currentTime,u)/h;let M=Math.floor(A),O=A%1;!O&&A>=1&&(O=1),O===1&&M--,M=Math.min(M,m+1),!!(M%2)&&(f==="reverse"?(O=1-O,g&&(O-=g/h)):f==="mirror"&&(w=o)),E=Tt(0,1,O)*h}const y=v?{done:!1,value:l[0]}:w.next(E);a&&(y.value=a(y.value));let{done:T}=y;!v&&c!==null&&(T=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return S&&i!==void 0&&(y.value=qe(l,this.options,i)),b&&b(y.value),S&&this.finish(),y}get duration(){const{resolved:t}=this;return t?st(t.calculatedDuration):0}get time(){return st(this.currentTime)}set time(t){t=nt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=st(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=xu,onPlay:e,startTime:s}=this.options;this.driver||(this.driver=t(r=>this.tick(r))),e&&e();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Ou=new Set(["opacity","clipPath","filter","transform"]);function Cu(n,t,e,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeInOut",times:l}={}){const c={[t]:e};l&&(c.offset=l);const u=Cr(a,i);return Array.isArray(u)&&(c.easing=u),n.animate(c,{delay:s,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const ku=Un(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Be=10,Lu=2e4;function Fu(n){return ze(n.type)||n.type==="spring"||!Or(n.ease)}function Du(n,t){const e=new rs({...t,keyframes:n,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:n[0]};const i=[];let r=0;for(;!s.done&&r<Lu;)s=e.sample(r),i.push(s.value),r+=Be;return{times:void 0,keyframes:i,duration:r-Be,ease:"linear"}}const so={anticipate:_r,backInOut:Vr,circInOut:Pr};function Vu(n){return n in so}class ki extends Jr{constructor(t){super(t);const{name:e,motionValue:s,element:i,keyframes:r}=this.options;this.resolver=new Qr(r,(o,a)=>this.onKeyframesResolved(o,a),e,s,i),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:s=300,times:i,ease:r,type:o,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof r=="string"&&Ve()&&Vu(r)&&(r=so[r]),Fu(this.options)){const{onComplete:h,onUpdate:d,motionValue:m,element:f,...g}=this.options,b=Du(t,g);t=b.keyframes,t.length===1&&(t[1]=t[0]),s=b.duration,i=b.times,r=b.ease,o="keyframes"}const u=Cu(a.owner.current,l,t,{...this.options,duration:s,times:i,ease:r});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(mi(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:h}=this.options;a.set(qe(t,this.options,e)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:s,times:i,type:o,ease:r,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return st(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return st(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:s}=e;s.currentTime=nt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:s}=e;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:e}=this;if(!e)return Et;const{animation:s}=e;mi(s,t)}return Et}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.playState==="finished"&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:s,duration:i,type:r,ease:o,times:a}=t;if(e.playState==="idle"||e.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:h,element:d,...m}=this.options,f=new rs({...m,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),g=nt(this.time);c.setWithVelocity(f.sample(g-Be).value,f.sample(g).value,Be)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:e,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=t;if(!e||!e.owner||!(e.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return ku()&&s&&Ou.has(s)&&(s!=="transform"||!c)&&!l&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const _u={type:"spring",stiffness:500,damping:25,restSpeed:10},Pu=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Bu={type:"keyframes",duration:.8},Ru={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Iu=(n,{keyframes:t})=>t.length>2?Bu:Rt.has(n)?n.startsWith("scale")?Pu(t[1]):_u:Ru;function Nu({when:n,delay:t,delayChildren:e,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const io=(n,t,e,s={},i,r)=>o=>{const a=xr(s,n)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-nt(l);let u={keyframes:Array.isArray(e)?e:[null,e],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:d=>{t.set(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:n,motionValue:t,element:r?void 0:i};Nu(a)||(u={...u,...Iu(n,u)}),u.duration&&(u.duration=nt(u.duration)),u.repeatDelay&&(u.repeatDelay=nt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),u.allowFlatten=!a.type&&!a.ease,h&&!r&&t.get()!==void 0){const d=qe(u.keyframes,a);if(d!==void 0)return Z.update(()=>{u.onUpdate(d),u.onComplete()}),new gr([])}return!r&&ki.supports(u)?new ki(u):new rs(u)};function $u({protectedKeys:n,needsAnimating:t},e){const s=n.hasOwnProperty(e)&&t[e]!==!0;return t[e]=!1,s}function ju(n,t,{delay:e=0,transitionOverride:s,type:i}={}){var r;let{transition:o=n.getDefaultTransition(),transitionEnd:a,...l}=t;s&&(o=s);const c=[],u=i&&n.animationState&&n.animationState.getState()[i];for(const h in l){const d=n.getValue(h,(r=n.latestValues[h])!==null&&r!==void 0?r:null),m=l[h];if(m===void 0||u&&$u(u,h))continue;const f={delay:e,...xr(o||{},h)};let g=!1;if(window.MotionHandoffAnimation){const p=gc(n);if(p){const v=window.MotionHandoffAnimation(p,h,Z);v!==null&&(f.startTime=v,g=!0)}}fc(n,h),d.start(io(h,d,m,n.shouldReduceMotion&&Sr.has(h)?{type:!1}:f,n,g));const b=d.animation;b&&c.push(b)}return a&&Promise.all(c).then(()=>{Z.update(()=>{a&&hc(n,a)})}),c}function Ku(n){return n instanceof SVGElement&&n.tagName!=="svg"}const Li=()=>({min:0,max:0}),os=()=>({x:Li(),y:Li()}),Fi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fn={};for(const n in Fi)Fn[n]={isEnabled:t=>Fi[n].some(e=>!!t[e])};const Hu=typeof window<"u",Dn={current:null},ro={current:!1};function Uu(){if(ro.current=!0,!!Hu)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),t=()=>Dn.current=n.matches;n.addListener(t),t()}else Dn.current=!1}const Wu=[...Zr,_,Nt],zu=n=>Wu.find(Gr(n));function qu(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}function Yu(n){return typeof n=="string"||Array.isArray(n)}const Xu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gu=["initial",...Xu];function oo(n){return qu(n.animate)||Gu.some(t=>Yu(n[t]))}function Zu(n){return!!(oo(n)||n.variants)}function Qu(n,t,e){for(const s in t){const i=t[s],r=e[s];if(P(i))n.addValue(s,i);else if(P(r))n.addValue(s,ae(i,{owner:n}));else if(r!==i)if(n.hasValue(s)){const o=n.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=n.getStaticValue(s);n.addValue(s,ae(o!==void 0?o:i,{owner:n}))}}for(const s in e)t[s]===void 0&&n.removeValue(s);return t}const Di=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ao{scrapeMotionValuesFromProps(t,e,s){return{}}constructor({parent:t,props:e,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=es,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=ot.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Z.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=o;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=e.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=e,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!r,this.isControllingVariants=oo(e),this.isVariantNode=Zu(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...d}=this.scrapeMotionValuesFromProps(e,{},this);for(const m in d){const f=d[m];l[m]!==void 0&&P(f)&&f.set(l[m],!1)}}mount(t){this.current=t,le.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,s)=>this.bindToMotionValue(s,e)),ro.current||Uu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Dn.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),wn(this.notifyUpdate),wn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Rt.has(t);s&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&Z.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),r(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fn){const e=Fn[t];if(!e)continue;const{isEnabled:s,Feature:i}=e;if(!this.features[t]&&i&&s(this.props)&&(this.features[t]=new i(this)),this.features[t]){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):os()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let s=0;s<Di.length;s++){const i=Di[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=t[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Qu(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const s=this.values.get(t);e!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&e!==void 0&&(s=ae(e===null?void 0:e,{owner:this}),this.addValue(t,s)),s}readValue(t,e){var s;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(zr(i)||Br(i))?i=parseFloat(i):!zu(i)&&Nt.test(e)&&(i=Hr(t,e)),this.setBaseTarget(t,P(i)?i.get():i)),P(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:s}=this.props;let i;if(typeof s=="string"||typeof s=="object"){const o=Mr(this.props,s,(e=this.presenceContext)===null||e===void 0?void 0:e.custom);o&&(i=o[t])}if(s&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!P(r)?r:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,e){return this.events[t]||(this.events[t]=new mr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class lo extends ao{constructor(){super(...arguments),this.KeyframeResolver=Qr}sortInstanceNodePosition(t,e){return t.compareDocumentPosition(e)&2?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:s}){delete e[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;P(t)&&(this.childSubscription=t.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const co=(n,t)=>t&&typeof n=="number"?t.transform(n):n,Ju={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},th=Bt.length;function eh(n,t,e){let s="",i=!0;for(let r=0;r<th;r++){const o=Bt[r],a=n[o];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(o.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||e){const c=co(a,ts[o]);if(!l){i=!1;const u=Ju[o]||o;s+=`${u}(${c}) `}e&&(t[o]=c)}}return s=s.trim(),e?s=e(t,i?"":s):i&&(s="none"),s}function uo(n,t,e){const{style:s,vars:i,transformOrigin:r}=n;let o=!1,a=!1;for(const l in t){const c=t[l];if(Rt.has(l)){o=!0;continue}else if(Yr(l)){i[l]=c;continue}else{const u=co(c,ts[l]);l.startsWith("origin")?(a=!0,r[l]=u):s[l]=u}}if(t.transform||(o||e?s.transform=eh(t,n.transform,e):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=r;s.transformOrigin=`${l} ${c} ${u}`}}const nh={offset:"stroke-dashoffset",array:"stroke-dasharray"},sh={offset:"strokeDashoffset",array:"strokeDasharray"};function ih(n,t,e=1,s=0,i=!0){n.pathLength=1;const r=i?nh:sh;n[r.offset]=x.transform(-s);const o=x.transform(t),a=x.transform(e);n[r.array]=`${o} ${a}`}function Vi(n,t,e){return typeof n=="string"?n:x.transform(t+e*n)}function rh(n,t,e){const s=Vi(t,n.x,n.width),i=Vi(e,n.y,n.height);return`${s} ${i}`}function oh(n,{attrX:t,attrY:e,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},u,h){if(uo(n,c,h),u){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:d,style:m,dimensions:f}=n;d.transform&&(f&&(m.transform=d.transform),delete d.transform),f&&(i!==void 0||r!==void 0||m.transform)&&(m.transformOrigin=rh(f,i!==void 0?i:.5,r!==void 0?r:.5)),t!==void 0&&(d.x=t),e!==void 0&&(d.y=e),s!==void 0&&(d.scale=s),o!==void 0&&ih(d,o,a,l,!1)}const ho=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),ah=n=>typeof n=="string"&&n.toLowerCase()==="svg";function lh(n,t){try{t.dimensions=typeof n.getBBox=="function"?n.getBBox():n.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function fo(n,{style:t,vars:e},s,i){Object.assign(n.style,t,i&&i.getProjectionStyles(s));for(const r in e)n.style.setProperty(r,e[r])}function ch(n,t,e,s){fo(n,t,void 0,s);for(const i in t.attrs)n.setAttribute(ho.has(i)?i:Yn(i),t.attrs[i])}const uh={};function hh(n,{layout:t,layoutId:e}){return Rt.has(n)||n.startsWith("origin")||(t||e!==void 0)&&(!!uh[n]||n==="opacity")}function mo(n,t,e){var s;const{style:i}=n,r={};for(const o in i)(P(i[o])||t.style&&P(t.style[o])||hh(o,n)||((s=e==null?void 0:e.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function dh(n,t,e){const s=mo(n,t,e);for(const i in n)if(P(n[i])||P(t[i])){const r=Bt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=n[i]}return s}class fh extends lo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=os,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&lh(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(Rt.has(e)){const s=Kr(e);return s&&s.default||0}return e=ho.has(e)?e:Yn(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,s){return dh(t,e,s)}onBindTransform(){this.current&&!this.renderState.dimensions&&Z.postRender(this.updateDimensions)}build(t,e,s){oh(t,e,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,s,i){ch(t,e,s,i)}mount(t){this.isSVGTag=ah(t.tagName),super.mount(t)}}function mh({top:n,left:t,right:e,bottom:s}){return{x:{min:t,max:e},y:{min:n,max:s}}}function ph(n,t){if(!t)return n;const e=t({x:n.left,y:n.top}),s=t({x:n.right,y:n.bottom});return{top:e.y,left:e.x,bottom:s.y,right:s.x}}function gh(n,t){return mh(ph(n.getBoundingClientRect(),t))}function bh(n){return window.getComputedStyle(n)}class yh extends lo{constructor(){super(...arguments),this.type="html",this.renderInstance=fo}readValueFromInstance(t,e){if(Rt.has(e))return qc(t,e);{const s=bh(t),i=(Yr(e)?s.getPropertyValue(e):s[e])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:e}){return gh(t,e)}build(t,e,s){uo(t,e,s.transformTemplate)}scrapeMotionValuesFromProps(t,e,s){return mo(t,e,s)}}function vh(n,t){return n in t}class wh extends ao{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(vh(e,t)){const s=t[e];if(typeof s=="string"||typeof s=="number")return s}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return os()}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function Eh(n){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},e=Ku(n)?new fh(t):new yh(t);e.mount(n),le.set(n,e)}function Th(n){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},e=new wh(t);e.mount(n),le.set(n,e)}function Ah(n,t,e){const s=P(n)?n:ae(n);return s.start(io("",s,t,e)),s.animation}function xh(n,t){return P(n)||typeof n=="number"||typeof n=="string"&&!qn(t)}function po(n,t,e,s){const i=[];if(xh(n,t))i.push(Ah(n,qn(t)&&t.default||t,e&&(e.default||e)));else{const r=Ar(n,t,s),o=r.length;for(let a=0;a<o;a++){const l=r[a],c=l instanceof Element?Eh:Th;le.has(l)||c(l);const u=le.get(l),h={...e};"delay"in h&&typeof h.delay=="function"&&(h.delay=h.delay(a,o)),i.push(...ju(u,{...t,transition:h},{}))}}return i}function Sh(n,t,e){const s=[];return nc(n,t,e,{spring:zn}).forEach(({keyframes:r,transition:o},a)=>{s.push(...po(a,r,o))}),s}function Mh(n){return Array.isArray(n)&&n.some(Array.isArray)}function Oh(n){function t(e,s,i){let r=[];return Mh(e)?r=Sh(e,s,n):r=po(e,s,i,n),new gr(r)}return t}const an=Oh();let Ch=class extends I()({targets:{icon:HTMLElement,content:HTMLElement},values:{open:Boolean}}){connect(){this.animationDurationValue=.15,this.openValue?this.open():this.close()}toggle(){this.openValue=!this.openValue}openValueChanged(t){t?this.open():this.close()}open(){this.hasContentTarget&&(this.revealContent(),this.hasIconTarget&&this.rotateIcon(),this.openValue=!0)}close(){this.hasContentTarget&&(this.hideContent(),this.hasIconTarget&&this.rotateIcon(),this.openValue=!1)}revealContent(){const t=this.contentTarget.scrollHeight;an(this.contentTarget,{height:`${t}px`},{duration:this.animationDurationValue,easing:"ease-in-out"})}hideContent(){an(this.contentTarget,{height:0},{duration:this.animationDurationValue,easing:"ease-in-out"})}rotateIcon(){an(this.iconTarget,{rotate:`${this.openValue?180:0}deg`})}};const kh=Object.freeze(Object.defineProperty({__proto__:null,default:Ch},Symbol.toStringTag,{value:"Module"}));class Lh extends I()({targets:{banner:HTMLDivElement},values:{open:Boolean,autohide:{default:4e3,type:Number}}}){connect(){if(this.autohideValue!=0){const t=()=>{};setTimeout(()=>{this.hide().then(t).catch(t)},this.autohideValue)}}dismiss(){this.remove(),this.dispatchEvent(this.bannerTarget,"ariadne-banner:dismiss")}show(){this.bannerTarget.style.setProperty("display","initial")}remove(){const t=this.bannerTarget.parentElement;t&&t.removeChild(this.bannerTarget)}hide(){this.bannerTarget.style.setProperty("display","none")}}const Fh=Object.freeze(Object.defineProperty({__proto__:null,default:Lh},Symbol.toStringTag,{value:"Module"}));function Dh(n){const t=document.createElement("pre");return t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="5px",t.textContent=n,t}function go(n){if("clipboard"in navigator)return navigator.clipboard.writeText(n.textContent||"");const t=getSelection();if(t==null)return Promise.reject(new Error);t.removeAllRanges();const e=document.createRange();return e.selectNodeContents(n),t.addRange(e),document.execCommand("copy"),t.removeAllRanges(),Promise.resolve()}function Vn(n){if("clipboard"in navigator)return navigator.clipboard.writeText(n);const t=document.body;if(!t)return Promise.reject(new Error);const e=Dh(n);return t.appendChild(e),go(e),t.removeChild(e),Promise.resolve()}async function bo(n){const t=n.getAttribute("for"),e=n.getAttribute("value");function s(){n.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}if(n.getAttribute("aria-disabled")!=="true"){if(e)await Vn(e),s();else if(t){const i="getRootNode"in Element.prototype?n.getRootNode():n.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const r=i.getElementById(t);r&&(await Vh(r),s())}}}function Vh(n){return n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement?Vn(n.value):n instanceof HTMLAnchorElement&&n.hasAttribute("href")?Vn(n.href):go(n)}function _h(n){const t=n.currentTarget;t instanceof HTMLElement&&bo(t)}function yo(n){if(n.key===" "||n.key==="Enter"){const t=n.currentTarget;t instanceof HTMLElement&&(n.preventDefault(),bo(t))}}function Ph(n){n.currentTarget.addEventListener("keydown",yo)}function Bh(n){n.currentTarget.removeEventListener("keydown",yo)}class Rh extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",_h),this.addEventListener("focus",Ph),this.addEventListener("blur",Bh)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const _i=typeof globalThis<"u"?globalThis:window;try{_i.ClipboardCopyElement=Rh.define()}catch(n){if(!(_i.DOMException&&n instanceof DOMException&&n.name==="NotSupportedError")&&!(n instanceof ReferenceError))throw n}const Ih=2e3;class Nh extends I()({targets:{initial:HTMLElement,confirmed:null},values:{hiddenClass:String,showClass:String}}){connect(){this.clipboardCopyElementTimers=new WeakMap}copy(t){var o;const e=t.target,s=this.clipboardCopyElementTimers.get(e),i=(o=e.parentNode)==null?void 0:o.querySelector("[data-clipboard-copy-feedback]"),r="Copied!";s?(clearTimeout(s),this.clipboardCopyElementTimers.delete(e)):(this.showConfirm(),i&&(i.textContent===r?i.textContent=`${r} `:i.textContent=r)),this.clipboardCopyElementTimers.set(e,window.setTimeout(()=>{this.showInitial(),this.hideConfirm(),this.clipboardCopyElementTimers.delete(e)},Ih))}showConfirm(){this.hasConfirmedTarget&&(this.confirmedTarget.classList.remove(this.hiddenClassValue),this.confirmedTarget.classList.add(this.showClassValue),this.initialTarget.classList.add(this.hiddenClassValue))}showInitial(){this.initialTarget.classList.remove(this.hiddenClassValue),this.initialTarget.classList.add(this.showClassValue),this.hasConfirmedTarget&&this.confirmedTarget.classList.add(this.hiddenClassValue)}hideConfirm(){this.hasConfirmedTarget&&this.confirmedTarget.classList.remove(this.showClassValue)}}const $h=Object.freeze(Object.defineProperty({__proto__:null,default:Nh},Symbol.toStringTag,{value:"Module"})),at=Math.min,$=Math.max,Re=Math.round,xe=Math.floor,G=n=>({x:n,y:n}),jh={left:"right",right:"left",bottom:"top",top:"bottom"},Kh={start:"end",end:"start"};function _n(n,t,e){return $(n,at(t,e))}function $t(n,t){return typeof n=="function"?n(t):n}function lt(n){return n.split("-")[0]}function jt(n){return n.split("-")[1]}function vo(n){return n==="x"?"y":"x"}function as(n){return n==="y"?"height":"width"}function At(n){return["top","bottom"].includes(lt(n))?"y":"x"}function ls(n){return vo(At(n))}function Hh(n,t,e){e===void 0&&(e=!1);const s=jt(n),i=ls(n),r=as(i);let o=i==="x"?s===(e?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[r]>t.floating[r]&&(o=Ie(o)),[o,Ie(o)]}function Uh(n){const t=Ie(n);return[Pn(n),t,Pn(t)]}function Pn(n){return n.replace(/start|end/g,t=>Kh[t])}function Wh(n,t,e){const s=["left","right"],i=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(n){case"top":case"bottom":return e?t?i:s:t?s:i;case"left":case"right":return t?r:o;default:return[]}}function zh(n,t,e,s){const i=jt(n);let r=Wh(lt(n),e==="start",s);return i&&(r=r.map(o=>o+"-"+i),t&&(r=r.concat(r.map(Pn)))),r}function Ie(n){return n.replace(/left|right|bottom|top/g,t=>jh[t])}function qh(n){return{top:0,right:0,bottom:0,left:0,...n}}function wo(n){return typeof n!="number"?qh(n):{top:n,right:n,bottom:n,left:n}}function Ne(n){const{x:t,y:e,width:s,height:i}=n;return{width:s,height:i,top:e,left:t,right:t+s,bottom:e+i,x:t,y:e}}function Pi(n,t,e){let{reference:s,floating:i}=n;const r=At(t),o=ls(t),a=as(o),l=lt(t),c=r==="y",u=s.x+s.width/2-i.width/2,h=s.y+s.height/2-i.height/2,d=s[a]/2-i[a]/2;let m;switch(l){case"top":m={x:u,y:s.y-i.height};break;case"bottom":m={x:u,y:s.y+s.height};break;case"right":m={x:s.x+s.width,y:h};break;case"left":m={x:s.x-i.width,y:h};break;default:m={x:s.x,y:s.y}}switch(jt(t)){case"start":m[o]-=d*(e&&c?-1:1);break;case"end":m[o]+=d*(e&&c?-1:1);break}return m}const Yh=async(n,t,e)=>{const{placement:s="bottom",strategy:i="absolute",middleware:r=[],platform:o}=e,a=r.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:n,floating:t,strategy:i}),{x:u,y:h}=Pi(c,s,l),d=s,m={},f=0;for(let g=0;g<a.length;g++){const{name:b,fn:p}=a[g],{x:v,y:E,data:w,reset:y}=await p({x:u,y:h,initialPlacement:s,placement:d,strategy:i,middlewareData:m,rects:c,platform:o,elements:{reference:n,floating:t}});u=v??u,h=E??h,m={...m,[b]:{...m[b],...w}},y&&f<=50&&(f++,typeof y=="object"&&(y.placement&&(d=y.placement),y.rects&&(c=y.rects===!0?await o.getElementRects({reference:n,floating:t,strategy:i}):y.rects),{x:u,y:h}=Pi(c,d,l)),g=-1)}return{x:u,y:h,placement:d,strategy:i,middlewareData:m}};async function cs(n,t){var e;t===void 0&&(t={});const{x:s,y:i,platform:r,rects:o,elements:a,strategy:l}=n,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:m=0}=$t(t,n),f=wo(m),b=a[d?h==="floating"?"reference":"floating":h],p=Ne(await r.getClippingRect({element:(e=await(r.isElement==null?void 0:r.isElement(b)))==null||e?b:b.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=h==="floating"?{x:s,y:i,width:o.floating.width,height:o.floating.height}:o.reference,E=await(r.getOffsetParent==null?void 0:r.getOffsetParent(a.floating)),w=await(r.isElement==null?void 0:r.isElement(E))?await(r.getScale==null?void 0:r.getScale(E))||{x:1,y:1}:{x:1,y:1},y=Ne(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:E,strategy:l}):v);return{top:(p.top-y.top+f.top)/w.y,bottom:(y.bottom-p.bottom+f.bottom)/w.y,left:(p.left-y.left+f.left)/w.x,right:(y.right-p.right+f.right)/w.x}}const Xh=n=>({name:"arrow",options:n,async fn(t){const{x:e,y:s,placement:i,rects:r,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=$t(n,t)||{};if(c==null)return{};const h=wo(u),d={x:e,y:s},m=ls(i),f=as(m),g=await o.getDimensions(c),b=m==="y",p=b?"top":"left",v=b?"bottom":"right",E=b?"clientHeight":"clientWidth",w=r.reference[f]+r.reference[m]-d[m]-r.floating[f],y=d[m]-r.reference[m],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let S=T?T[E]:0;(!S||!await(o.isElement==null?void 0:o.isElement(T)))&&(S=a.floating[E]||r.floating[f]);const A=w/2-y/2,M=S/2-g[f]/2-1,O=at(h[p],M),F=at(h[v],M),R=O,N=S-g[f]-F,V=S/2-g[f]/2+A,ht=_n(R,V,N),W=!l.arrow&&jt(i)!=null&&V!==ht&&r.reference[f]/2-(V<R?O:F)-g[f]/2<0,D=W?V<R?V-R:V-N:0;return{[m]:d[m]+D,data:{[m]:ht,centerOffset:V-ht-D,...W&&{alignmentOffset:D}},reset:W}}}),Gh=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(t){var e,s;const{placement:i,middlewareData:r,rects:o,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:g=!0,...b}=$t(n,t);if((e=r.arrow)!=null&&e.alignmentOffset)return{};const p=lt(i),v=At(a),E=lt(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),y=d||(E||!g?[Ie(a)]:Uh(a)),T=f!=="none";!d&&T&&y.push(...zh(a,g,f,w));const S=[a,...y],A=await cs(t,b),M=[];let O=((s=r.flip)==null?void 0:s.overflows)||[];if(u&&M.push(A[p]),h){const V=Hh(i,o,w);M.push(A[V[0]],A[V[1]])}if(O=[...O,{placement:i,overflows:M}],!M.every(V=>V<=0)){var F,R;const V=(((F=r.flip)==null?void 0:F.index)||0)+1,ht=S[V];if(ht)return{data:{index:V,overflows:O},reset:{placement:ht}};let W=(R=O.filter(D=>D.overflows[0]<=0).sort((D,L)=>D.overflows[1]-L.overflows[1])[0])==null?void 0:R.placement;if(!W)switch(m){case"bestFit":{var N;const D=(N=O.filter(L=>{if(T){const z=At(L.placement);return z===v||z==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(z=>z>0).reduce((z,ye)=>z+ye,0)]).sort((L,z)=>L[1]-z[1])[0])==null?void 0:N[0];D&&(W=D);break}case"initialPlacement":W=a;break}if(i!==W)return{reset:{placement:W}}}return{}}}};async function Zh(n,t){const{placement:e,platform:s,elements:i}=n,r=await(s.isRTL==null?void 0:s.isRTL(i.floating)),o=lt(e),a=jt(e),l=At(e)==="y",c=["left","top"].includes(o)?-1:1,u=r&&l?-1:1,h=$t(t,n);let{mainAxis:d,crossAxis:m,alignmentAxis:f}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&typeof f=="number"&&(m=a==="end"?f*-1:f),l?{x:m*u,y:d*c}:{x:d*c,y:m*u}}const Qh=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(t){var e,s;const{x:i,y:r,placement:o,middlewareData:a}=t,l=await Zh(t,n);return o===((e=a.offset)==null?void 0:e.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:o}}}}},Jh=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(t){const{x:e,y:s,placement:i}=t,{mainAxis:r=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:p,y:v}=b;return{x:p,y:v}}},...l}=$t(n,t),c={x:e,y:s},u=await cs(t,l),h=At(lt(i)),d=vo(h);let m=c[d],f=c[h];if(r){const b=d==="y"?"top":"left",p=d==="y"?"bottom":"right",v=m+u[b],E=m-u[p];m=_n(v,m,E)}if(o){const b=h==="y"?"top":"left",p=h==="y"?"bottom":"right",v=f+u[b],E=f-u[p];f=_n(v,f,E)}const g=a.fn({...t,[d]:m,[h]:f});return{...g,data:{x:g.x-e,y:g.y-s,enabled:{[d]:r,[h]:o}}}}}},td=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(t){var e,s;const{placement:i,rects:r,platform:o,elements:a}=t,{apply:l=()=>{},...c}=$t(n,t),u=await cs(t,c),h=lt(i),d=jt(i),m=At(i)==="y",{width:f,height:g}=r.floating;let b,p;h==="top"||h==="bottom"?(b=h,p=d===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(p=h,b=d==="end"?"top":"bottom");const v=g-u.top-u.bottom,E=f-u.left-u.right,w=at(g-u[b],v),y=at(f-u[p],E),T=!t.middlewareData.shift;let S=w,A=y;if((e=t.middlewareData.shift)!=null&&e.enabled.x&&(A=E),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(S=v),T&&!d){const O=$(u.left,0),F=$(u.right,0),R=$(u.top,0),N=$(u.bottom,0);m?A=f-2*(O!==0||F!==0?O+F:$(u.left,u.right)):S=g-2*(R!==0||N!==0?R+N:$(u.top,u.bottom))}await l({...t,availableWidth:A,availableHeight:S});const M=await o.getDimensions(a.floating);return f!==M.width||g!==M.height?{reset:{rects:!0}}:{}}}};function Ye(){return typeof window<"u"}function Kt(n){return Eo(n)?(n.nodeName||"").toLowerCase():"#document"}function K(n){var t;return(n==null||(t=n.ownerDocument)==null?void 0:t.defaultView)||window}function J(n){var t;return(t=(Eo(n)?n.ownerDocument:n.document)||window.document)==null?void 0:t.documentElement}function Eo(n){return Ye()?n instanceof Node||n instanceof K(n).Node:!1}function Y(n){return Ye()?n instanceof Element||n instanceof K(n).Element:!1}function Q(n){return Ye()?n instanceof HTMLElement||n instanceof K(n).HTMLElement:!1}function Bi(n){return!Ye()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof K(n).ShadowRoot}function be(n){const{overflow:t,overflowX:e,overflowY:s,display:i}=X(n);return/auto|scroll|overlay|hidden|clip/.test(t+s+e)&&!["inline","contents"].includes(i)}function ed(n){return["table","td","th"].includes(Kt(n))}function Xe(n){return[":popover-open",":modal"].some(t=>{try{return n.matches(t)}catch{return!1}})}function us(n){const t=hs(),e=Y(n)?X(n):n;return["transform","translate","scale","rotate","perspective"].some(s=>e[s]?e[s]!=="none":!1)||(e.containerType?e.containerType!=="normal":!1)||!t&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!t&&(e.filter?e.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(e.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(e.contain||"").includes(s))}function nd(n){let t=ct(n);for(;Q(t)&&!Pt(t);){if(us(t))return t;if(Xe(t))return null;t=ct(t)}return null}function hs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Pt(n){return["html","body","#document"].includes(Kt(n))}function X(n){return K(n).getComputedStyle(n)}function Ge(n){return Y(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function ct(n){if(Kt(n)==="html")return n;const t=n.assignedSlot||n.parentNode||Bi(n)&&n.host||J(n);return Bi(t)?t.host:t}function To(n){const t=ct(n);return Pt(t)?n.ownerDocument?n.ownerDocument.body:n.body:Q(t)&&be(t)?t:To(t)}function he(n,t,e){var s;t===void 0&&(t=[]),e===void 0&&(e=!0);const i=To(n),r=i===((s=n.ownerDocument)==null?void 0:s.body),o=K(i);if(r){const a=Bn(o);return t.concat(o,o.visualViewport||[],be(i)?i:[],a&&e?he(a):[])}return t.concat(i,he(i,[],e))}function Bn(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function Ao(n){const t=X(n);let e=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const i=Q(n),r=i?n.offsetWidth:e,o=i?n.offsetHeight:s,a=Re(e)!==r||Re(s)!==o;return a&&(e=r,s=o),{width:e,height:s,$:a}}function ds(n){return Y(n)?n:n.contextElement}function Dt(n){const t=ds(n);if(!Q(t))return G(1);const e=t.getBoundingClientRect(),{width:s,height:i,$:r}=Ao(t);let o=(r?Re(e.width):e.width)/s,a=(r?Re(e.height):e.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const sd=G(0);function xo(n){const t=K(n);return!hs()||!t.visualViewport?sd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function id(n,t,e){return t===void 0&&(t=!1),!e||t&&e!==K(n)?!1:t}function xt(n,t,e,s){t===void 0&&(t=!1),e===void 0&&(e=!1);const i=n.getBoundingClientRect(),r=ds(n);let o=G(1);t&&(s?Y(s)&&(o=Dt(s)):o=Dt(n));const a=id(r,e,s)?xo(r):G(0);let l=(i.left+a.x)/o.x,c=(i.top+a.y)/o.y,u=i.width/o.x,h=i.height/o.y;if(r){const d=K(r),m=s&&Y(s)?K(s):s;let f=d,g=Bn(f);for(;g&&s&&m!==f;){const b=Dt(g),p=g.getBoundingClientRect(),v=X(g),E=p.left+(g.clientLeft+parseFloat(v.paddingLeft))*b.x,w=p.top+(g.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,h*=b.y,l+=E,c+=w,f=K(g),g=Bn(f)}}return Ne({width:u,height:h,x:l,y:c})}function fs(n,t){const e=Ge(n).scrollLeft;return t?t.left+e:xt(J(n)).left+e}function So(n,t,e){e===void 0&&(e=!1);const s=n.getBoundingClientRect(),i=s.left+t.scrollLeft-(e?0:fs(n,s)),r=s.top+t.scrollTop;return{x:i,y:r}}function rd(n){let{elements:t,rect:e,offsetParent:s,strategy:i}=n;const r=i==="fixed",o=J(s),a=t?Xe(t.floating):!1;if(s===o||a&&r)return e;let l={scrollLeft:0,scrollTop:0},c=G(1);const u=G(0),h=Q(s);if((h||!h&&!r)&&((Kt(s)!=="body"||be(o))&&(l=Ge(s)),Q(s))){const m=xt(s);c=Dt(s),u.x=m.x+s.clientLeft,u.y=m.y+s.clientTop}const d=o&&!h&&!r?So(o,l,!0):G(0);return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:e.y*c.y-l.scrollTop*c.y+u.y+d.y}}function od(n){return Array.from(n.getClientRects())}function ad(n){const t=J(n),e=Ge(n),s=n.ownerDocument.body,i=$(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),r=$(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-e.scrollLeft+fs(n);const a=-e.scrollTop;return X(s).direction==="rtl"&&(o+=$(t.clientWidth,s.clientWidth)-i),{width:i,height:r,x:o,y:a}}function ld(n,t){const e=K(n),s=J(n),i=e.visualViewport;let r=s.clientWidth,o=s.clientHeight,a=0,l=0;if(i){r=i.width,o=i.height;const c=hs();(!c||c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:r,height:o,x:a,y:l}}function cd(n,t){const e=xt(n,!0,t==="fixed"),s=e.top+n.clientTop,i=e.left+n.clientLeft,r=Q(n)?Dt(n):G(1),o=n.clientWidth*r.x,a=n.clientHeight*r.y,l=i*r.x,c=s*r.y;return{width:o,height:a,x:l,y:c}}function Ri(n,t,e){let s;if(t==="viewport")s=ld(n,e);else if(t==="document")s=ad(J(n));else if(Y(t))s=cd(t,e);else{const i=xo(n);s={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Ne(s)}function Mo(n,t){const e=ct(n);return e===t||!Y(e)||Pt(e)?!1:X(e).position==="fixed"||Mo(e,t)}function ud(n,t){const e=t.get(n);if(e)return e;let s=he(n,[],!1).filter(a=>Y(a)&&Kt(a)!=="body"),i=null;const r=X(n).position==="fixed";let o=r?ct(n):n;for(;Y(o)&&!Pt(o);){const a=X(o),l=us(o);!l&&a.position==="fixed"&&(i=null),(r?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||be(o)&&!l&&Mo(n,o))?s=s.filter(u=>u!==o):i=a,o=ct(o)}return t.set(n,s),s}function hd(n){let{element:t,boundary:e,rootBoundary:s,strategy:i}=n;const o=[...e==="clippingAncestors"?Xe(t)?[]:ud(t,this._c):[].concat(e),s],a=o[0],l=o.reduce((c,u)=>{const h=Ri(t,u,i);return c.top=$(h.top,c.top),c.right=at(h.right,c.right),c.bottom=at(h.bottom,c.bottom),c.left=$(h.left,c.left),c},Ri(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function dd(n){const{width:t,height:e}=Ao(n);return{width:t,height:e}}function fd(n,t,e){const s=Q(t),i=J(t),r=e==="fixed",o=xt(n,!0,r,t);let a={scrollLeft:0,scrollTop:0};const l=G(0);if(s||!s&&!r)if((Kt(t)!=="body"||be(i))&&(a=Ge(t)),s){const d=xt(t,!0,r,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&(l.x=fs(i));const c=i&&!s&&!r?So(i,a):G(0),u=o.left+a.scrollLeft-l.x-c.x,h=o.top+a.scrollTop-l.y-c.y;return{x:u,y:h,width:o.width,height:o.height}}function ln(n){return X(n).position==="static"}function Ii(n,t){if(!Q(n)||X(n).position==="fixed")return null;if(t)return t(n);let e=n.offsetParent;return J(n)===e&&(e=e.ownerDocument.body),e}function Oo(n,t){const e=K(n);if(Xe(n))return e;if(!Q(n)){let i=ct(n);for(;i&&!Pt(i);){if(Y(i)&&!ln(i))return i;i=ct(i)}return e}let s=Ii(n,t);for(;s&&ed(s)&&ln(s);)s=Ii(s,t);return s&&Pt(s)&&ln(s)&&!us(s)?e:s||nd(n)||e}const md=async function(n){const t=this.getOffsetParent||Oo,e=this.getDimensions,s=await e(n.floating);return{reference:fd(n.reference,await t(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function pd(n){return X(n).direction==="rtl"}const gd={convertOffsetParentRelativeRectToViewportRelativeRect:rd,getDocumentElement:J,getClippingRect:hd,getOffsetParent:Oo,getElementRects:md,getClientRects:od,getDimensions:dd,getScale:Dt,isElement:Y,isRTL:pd};function Co(n,t){return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}function bd(n,t){let e=null,s;const i=J(n);function r(){var a;clearTimeout(s),(a=e)==null||a.disconnect(),e=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),r();const c=n.getBoundingClientRect(),{left:u,top:h,width:d,height:m}=c;if(a||t(),!d||!m)return;const f=xe(h),g=xe(i.clientWidth-(u+d)),b=xe(i.clientHeight-(h+m)),p=xe(u),E={rootMargin:-f+"px "+-g+"px "+-b+"px "+-p+"px",threshold:$(0,at(1,l))||1};let w=!0;function y(T){const S=T[0].intersectionRatio;if(S!==l){if(!w)return o();S?o(!1,S):s=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!Co(c,n.getBoundingClientRect())&&o(),w=!1}try{e=new IntersectionObserver(y,{...E,root:i.ownerDocument})}catch{e=new IntersectionObserver(y,E)}e.observe(n)}return o(!0),r}function ko(n,t,e,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,c=ds(n),u=i||r?[...c?he(c):[],...he(t)]:[];u.forEach(p=>{i&&p.addEventListener("scroll",e,{passive:!0}),r&&p.addEventListener("resize",e)});const h=c&&a?bd(c,e):null;let d=-1,m=null;o&&(m=new ResizeObserver(p=>{let[v]=p;v&&v.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),e()}),c&&!l&&m.observe(c),m.observe(t));let f,g=l?xt(n):null;l&&b();function b(){const p=xt(n);g&&!Co(g,p)&&e(),g=p,f=requestAnimationFrame(b)}return e(),()=>{var p;u.forEach(v=>{i&&v.removeEventListener("scroll",e),r&&v.removeEventListener("resize",e)}),h==null||h(),(p=m)==null||p.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const ms=Qh,ps=Jh,gs=Gh,yd=td,vd=Xh,bs=(n,t,e)=>{const s=new Map,i={platform:gd,...e},r={...i.platform,_c:s};return Yh(n,t,{...i,platform:r})},Ni=(n,t)=>{const e=n[t];return typeof e=="function"?e:(...s)=>{}},Rn=(n,t,e)=>{let s=n;return e===!0?s=`${t.identifier}:${n}`:typeof e=="string"&&(s=`${e}:${n}`),s},In=(n,t,e)=>{const{bubbles:s,cancelable:i,composed:r}=t||{bubbles:!0,cancelable:!0,composed:!0};return t&&Object.assign(e,{originalEvent:t}),new CustomEvent(n,{bubbles:s,cancelable:i,composed:r,detail:e})};function wd(n){const t=n.getBoundingClientRect(),e=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth,i=t.top<=e&&t.top+t.height>0,r=t.left<=s&&t.left+t.width>0;return i&&r}function Ed(n,t){var e={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&t.indexOf(s)<0&&(e[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)t.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(e[s[i]]=n[s[i]]);return e}const cn={debug:!1,logger:console,dispatchEvent:!0,eventPrefix:!0};class Td{constructor(t,e={}){var s,i,r;this.log=(l,c)=>{this.debug&&(this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${l}`,"color: #3B82F6","color: unset"),this.logger.log(Object.assign({controllerId:this.controllerId},c)),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,c={})=>{if(this.dispatchEvent){const{event:u}=c,h=Ed(c,["event"]),d=this.extendedEvent(l,u||null,h);this.targetElement.dispatchEvent(d),this.log("dispatchEvent",Object.assign({eventName:d.type},h))}},this.call=(l,c={})=>{const u=this.controller[l];if(typeof u=="function")return u.call(this.controller,c)},this.extendedEvent=(l,c,u)=>{const{bubbles:h,cancelable:d,composed:m}=c||{bubbles:!0,cancelable:!0,composed:!0};return c&&Object.assign(u,{originalEvent:c}),new CustomEvent(this.composeEventName(l),{bubbles:h,cancelable:d,composed:m,detail:u})},this.composeEventName=l=>{let c=l;return this.eventPrefix===!0?c=`${this.controller.identifier}:${l}`:typeof this.eventPrefix=="string"&&(c=`${this.eventPrefix}:${l}`),c},this.debug=(i=(s=e==null?void 0:e.debug)!==null&&s!==void 0?s:t.application.stimulusUseDebug)!==null&&i!==void 0?i:cn.debug,this.logger=(r=e==null?void 0:e.logger)!==null&&r!==void 0?r:cn.logger,this.controller=t,this.controllerId=t.element.id||t.element.dataset.id,this.targetElement=(e==null?void 0:e.element)||t.element;const{dispatchEvent:o,eventPrefix:a}=Object.assign({},cn,e);Object.assign(this,{dispatchEvent:o,eventPrefix:a}),this.controllerInitialize=t.initialize.bind(t),this.controllerConnect=t.connect.bind(t),this.controllerDisconnect=t.disconnect.bind(t)}}const Ad={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},xd=(n,t={})=>{const e=n,{onlyVisible:s,dispatchEvent:i,events:r,eventPrefix:o}=Object.assign({},Ad,t),a=h=>{const d=(t==null?void 0:t.element)||e.element;if(!(d.contains(h.target)||!wd(d)&&s)&&(e.clickOutside&&e.clickOutside(h),i)){const m=Rn("click:outside",e,o),f=In(m,h,{controller:e});d.dispatchEvent(f)}},l=()=>{r==null||r.forEach(h=>{window.addEventListener(h,a,!0)})},c=()=>{r==null||r.forEach(h=>{window.removeEventListener(h,a,!0)})},u=e.disconnect.bind(e);return Object.assign(e,{disconnect(){c(),u()}}),l(),[l,c]};class Sd extends ut{}Sd.debounces=[];const Md=200,$i=(n,t=Md)=>{let e=null;return function(){const s=Array.from(arguments),i=this,r=s.map(a=>a.params),o=()=>(s.forEach((a,l)=>a.params=r[l]),n.apply(i,s));e&&clearTimeout(e),e=setTimeout(o,t)}},Od=(n,t)=>{const e=n;e.constructor.debounces.forEach(i=>{if(typeof i=="string"&&(e[i]=$i(e[i],void 0)),typeof i=="object"){const{name:r,wait:o}=i;if(!r)return;e[r]=$i(e[r],o||void 0)}})},Cd={dispatchEvent:!0,eventPrefix:!0,visibleAttribute:"isVisible"},kd=(n,t={})=>{const e=n,{dispatchEvent:s,eventPrefix:i,visibleAttribute:r}=Object.assign({},Cd,t),o=(t==null?void 0:t.element)||e.element;e.intersectionElements||(e.intersectionElements=[]),e.intersectionElements.push(o);const a=w=>{const[y]=w;y.isIntersecting?c(y):o.hasAttribute(r)&&u(y)},l=new IntersectionObserver(a,t),c=w=>{if(o.setAttribute(r,"true"),Ni(e,"appear").call(e,w,l),s){const y=Rn("appear",e,i),T=In(y,null,{controller:e,entry:w,observer:l});o.dispatchEvent(T)}},u=w=>{if(o.removeAttribute(r),Ni(e,"disappear").call(e,w,l),s){const y=Rn("disappear",e,i),T=In(y,null,{controller:e,entry:w,observer:l});o.dispatchEvent(T)}},h=e.disconnect.bind(e),d=()=>{f(),h()},m=()=>{l.observe(o)},f=()=>{l.unobserve(o)},g=()=>e.intersectionElements.filter(w=>w.hasAttribute(r)).length===0,b=()=>e.intersectionElements.filter(w=>w.hasAttribute(r)).length===1,p=()=>e.intersectionElements.some(w=>w.hasAttribute(r)),v=()=>e.intersectionElements.every(w=>w.hasAttribute(r));return Object.assign(e,{isVisible:v,noneVisible:g,oneVisible:b,atLeastOneVisible:p,allVisible:v,disconnect:d}),m(),[m,f]};class Ld extends Td{constructor(t,e={}){super(t,e),this.observe=()=>{try{this.observer.observe(this.targetElement,this.options)}catch(s){this.controller.application.handleError(s,"At a minimum, one of childList, attributes, and/or characterData must be true",{})}},this.unobserve=()=>{this.observer.disconnect()},this.mutation=s=>{this.call("mutate",s),this.log("mutate",{entries:s}),this.dispatch("mutate",{entries:s})},this.targetElement=(e==null?void 0:e.element)||t.element,this.controller=t,this.options=e,this.observer=new MutationObserver(this.mutation),this.enhanceController(),this.observe()}enhanceController(){const t=this.controller.disconnect.bind(this.controller),e=()=>{this.unobserve(),t()};Object.assign(this.controller,{disconnect:e})}}const Lo=(n,t={})=>{const e=new Ld(n,t);return[e.observe,e.unobserve]};class Fd extends ut{}Fd.throttles=[];class Dd extends I()({targets:{wrapper:HTMLDetailsElement,button:HTMLElement,popover:dn,options:HTMLDivElement},values:{clamped:Boolean,placement:String,dynamicLabelPrefix:String}}){constructor(){super(...arguments),this.changedIds=new Set}clickOutside(){this.element.open=!1,this.setupAutoUpdate(),this.close()}close(){this.changedIds.size>0&&(this.dispatch("changed"),this.changedIds.clear(),this.buttonTarget.setAttribute("aria-expanded","false"))}connect(){xd(this),Lo(this,{childList:!0,subtree:!0}),this.setupAutoUpdate(),this.setupForm()}disconnect(){var t;(t=this.unsubAutoUpdate)==null||t.call(this)}setupForm(){for(const t of["checkbox","radio"])for(const e of this.popoverTarget.querySelectorAll(`input[type="${t}"]`))e.addEventListener("change",s=>{const i=s.target;this.changedIds.has(i)?this.changedIds.delete(i):this.changedIds.add(i),this.dispatch("clicked",{detail:i})})}setupAutoUpdate(){var e;if(!this.element.open){(e=this.unsubAutoUpdate)==null||e.call(this);return}const t=()=>{const s=this.optionsTarget,i=this.clampedValue;bs(this.buttonTarget,this.popoverTarget,{middleware:[ms(6),gs(),ps({padding:6}),yd({apply({availableHeight:r}){let o=r-6;i&&o>400&&(o=400),Object.assign(s.style,{maxHeight:`${o}px`})}})],placement:this.placementValue,strategy:"fixed"}).then(({x:r,y:o})=>{Object.assign(this.popoverTarget.style,{left:`${r}px`,top:`${o}px`})})};t(),this.unsubAutoUpdate=ko(this.buttonTarget,this.popoverTarget,t)}updateButtonLabel(t){var r;const s=t.target.querySelector("input[type=radio]:checked");if(!s)return;const i=((r=s.labels)==null?void 0:r.item(0)).textContent;this.buttonTarget.querySelector('[data-ariadne-ui-button-target="content"]').textContent=`${this.dynamicLabelPrefixValue}${i}`}toggle(){this.element.open=!this.element.open,this.setupAutoUpdate(),this.buttonTarget.setAttribute("aria-expanded","true")}}const Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Dd},Symbol.toStringTag,{value:"Module"}));function _d(n){if(Array.isArray(n)){for(var t=0,e=Array(n.length);t<n.length;t++)e[t]=n[t];return e}else return Array.from(n)}var ys=!1;if(typeof window<"u"){var ji={get passive(){ys=!0}};window.addEventListener("testPassive",null,ji),window.removeEventListener("testPassive",null,ji)}var $e=typeof window<"u"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1),wt=[],je=!1,Fo=-1,se=void 0,pt=void 0,ie=void 0,Do=function(t){return wt.some(function(e){return!!(e.options.allowTouchMove&&e.options.allowTouchMove(t))})},Ke=function(t){var e=t||window.event;return Do(e.target)||e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)},Pd=function(t){if(ie===void 0){var e=!!t&&t.reserveScrollBarGap===!0,s=window.innerWidth-document.documentElement.clientWidth;if(e&&s>0){var i=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);ie=document.body.style.paddingRight,document.body.style.paddingRight=i+s+"px"}}se===void 0&&(se=document.body.style.overflow,document.body.style.overflow="hidden")},Bd=function(){ie!==void 0&&(document.body.style.paddingRight=ie,ie=void 0),se!==void 0&&(document.body.style.overflow=se,se=void 0)},Rd=function(){return window.requestAnimationFrame(function(){if(pt===void 0){pt={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left};var t=window,e=t.scrollY,s=t.scrollX,i=t.innerHeight;document.body.style.position="fixed",document.body.style.top=-e,document.body.style.left=-s,setTimeout(function(){return window.requestAnimationFrame(function(){var r=i-window.innerHeight;r&&e>=i&&(document.body.style.top=-(e+r))})},300)}})},Id=function(){if(pt!==void 0){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=pt.position,document.body.style.top=pt.top,document.body.style.left=pt.left,window.scrollTo(e,t),pt=void 0}},Nd=function(t){return t?t.scrollHeight-t.scrollTop<=t.clientHeight:!1},$d=function(t,e){var s=t.targetTouches[0].clientY-Fo;return Do(t.target)?!1:e&&e.scrollTop===0&&s>0||Nd(e)&&s<0?Ke(t):(t.stopPropagation(),!0)},jd=function(t,e){if(!t){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}if(!wt.some(function(i){return i.targetElement===t})){var s={targetElement:t,options:e||{}};wt=[].concat(_d(wt),[s]),$e?Rd():Pd(e),$e&&(t.ontouchstart=function(i){i.targetTouches.length===1&&(Fo=i.targetTouches[0].clientY)},t.ontouchmove=function(i){i.targetTouches.length===1&&$d(i,t)},je||(document.addEventListener("touchmove",Ke,ys?{passive:!1}:void 0),je=!0))}},Kd=function(t){if(!t){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}wt=wt.filter(function(e){return e.targetElement!==t}),$e&&(t.ontouchstart=null,t.ontouchmove=null,je&&wt.length===0&&(document.removeEventListener("touchmove",Ke,ys?{passive:!1}:void 0),je=!1)),$e?Id():Bd()};class Hd extends I()({targets:{dialog:HTMLDialogElement}}){close(t){this.dialogTarget.open&&(this.dialogTarget.close(),Kd(this.dialogTarget))}disconnect(){this.close()}open(t){t.preventDefault(),this.dialogTarget.showModal(),jd(this.dialogTarget,{reserveScrollBarGap:!0})}windowClick(t){t.target===this.dialogTarget&&this.close()}}const Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Hd},Symbol.toStringTag,{value:"Module"}));class Wd extends I()({targets:{emptyRoot:null,input:HTMLInputElement,searchString:null}}){handleNewQuery(t){let e=!1;for(const{el:s,searchString:i}of this.items){const r=i.includes(t.trim().toLowerCase());!e&&r&&(e=!0),r?s.classList.remove("ariadne:hidden"):s.classList.add("ariadne:hidden")}this.hasEmptyRootTarget&&(e?this.emptyRootTarget.classList.add("ariadne:hidden"):this.emptyRootTarget.classList.remove("ariadne:hidden"))}connect(){this.items=this.searchStringTargets.map(t=>({el:t,searchString:(t.textContent??"").trim().toLowerCase()})),kd(this)}appear(){this.reset()}handleInput(){this.hasSearchStringTarget&&this.handleNewQuery(this.inputTarget.value)}reset(){this.handleNewQuery(""),this.hasInputTarget&&(this.inputTarget.value="")}}const zd=Object.freeze(Object.defineProperty({__proto__:null,default:Wd},Symbol.toStringTag,{value:"Module"}));class qd extends I()({targets:{button:HTMLButtonElement,popover:HTMLElement},values:{placement:String}}){connect(){this.popoverTarget.addEventListener("toggle",t=>{t.newState==="open"&&this.updatePosition()})}toggle(){dispatchEvent(new CustomEvent("toggle",{detail:{newState:this.popoverTarget.open?"closed":"open"}}))}updatePosition(){ko(this.buttonTarget,this.popoverTarget,()=>{bs(this.buttonTarget,this.popoverTarget,{placement:this.placementValue,middleware:[ms(5),gs(),ps({padding:5})]}).then(({x:t,y:e})=>{Object.assign(this.popoverTarget.style,{left:`${t}px`,top:`${e}px`})})})}}const Yd=Object.freeze(Object.defineProperty({__proto__:null,default:qd},Symbol.toStringTag,{value:"Module"}));var Xd=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},Ki=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},Jt;class Gd{formatToParts(t){const e=[];for(const s of t)e.push({type:"element",value:s}),e.push({type:"literal",value:", "});return e.slice(0,-1)}}const Zd=typeof Intl<"u"&&Intl.ListFormat||Gd,Qd=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],Jd={minimumIntegerDigits:2};class tf{constructor(t,e={}){Jt.set(this,void 0);let s=String(e.style||"short");s!=="long"&&s!=="short"&&s!=="narrow"&&s!=="digital"&&(s="short");let i=s==="digital"?"numeric":s;const r=e.hours||i;i=r==="2-digit"?"numeric":r;const o=e.minutes||i;i=o==="2-digit"?"numeric":o;const a=e.seconds||i;i=a==="2-digit"?"numeric":a;const l=e.milliseconds||i;Xd(this,Jt,{locale:t,style:s,years:e.years||s==="digital"?"short":s,yearsDisplay:e.yearsDisplay==="always"?"always":"auto",months:e.months||s==="digital"?"short":s,monthsDisplay:e.monthsDisplay==="always"?"always":"auto",weeks:e.weeks||s==="digital"?"short":s,weeksDisplay:e.weeksDisplay==="always"?"always":"auto",days:e.days||s==="digital"?"short":s,daysDisplay:e.daysDisplay==="always"?"always":"auto",hours:r,hoursDisplay:e.hoursDisplay==="always"||s==="digital"?"always":"auto",minutes:o,minutesDisplay:e.minutesDisplay==="always"||s==="digital"?"always":"auto",seconds:a,secondsDisplay:e.secondsDisplay==="always"||s==="digital"?"always":"auto",milliseconds:l,millisecondsDisplay:e.millisecondsDisplay==="always"?"always":"auto"},"f")}resolvedOptions(){return Ki(this,Jt,"f")}formatToParts(t){const e=[],s=Ki(this,Jt,"f"),i=s.style,r=s.locale;for(const[o,a]of Qd){const l=t[o];if(s[`${o}Display`]==="auto"&&!l)continue;const c=s[o],u=c==="2-digit"?Jd:c==="numeric"?{}:{style:"unit",unit:a,unitDisplay:c};e.push(new Intl.NumberFormat(r,u).format(l))}return new Zd(r,{type:"unit",style:i==="digital"?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map(e=>e.value).join("")}}Jt=new WeakMap;const Vo=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,He=["year","month","week","day","hour","minute","second","millisecond"],ef=n=>Vo.test(n);class j{constructor(t=0,e=0,s=0,i=0,r=0,o=0,a=0,l=0){this.years=t,this.months=e,this.weeks=s,this.days=i,this.hours=r,this.minutes=o,this.seconds=a,this.milliseconds=l,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=this.sign===0}abs(){return new j(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(t){var e;if(typeof t=="string"){const s=String(t).trim(),i=s.startsWith("-")?-1:1,r=(e=s.match(Vo))===null||e===void 0?void 0:e.slice(1).map(o=>(Number(o)||0)*i);return r?new j(...r):new j}else if(typeof t=="object"){const{years:s,months:i,weeks:r,days:o,hours:a,minutes:l,seconds:c,milliseconds:u}=t;return new j(s,i,r,o,a,l,c,u)}throw new RangeError("invalid duration")}static compare(t,e){const s=Date.now(),i=Math.abs(Hi(s,j.from(t)).getTime()-s),r=Math.abs(Hi(s,j.from(e)).getTime()-s);return i>r?-1:i<r?1:0}toLocaleString(t,e){return new tf(t,e).format(this)}}function Hi(n,t){const e=new Date(n);return t.sign<0?(e.setUTCSeconds(e.getUTCSeconds()+t.seconds),e.setUTCMinutes(e.getUTCMinutes()+t.minutes),e.setUTCHours(e.getUTCHours()+t.hours),e.setUTCDate(e.getUTCDate()+t.weeks*7+t.days),e.setUTCMonth(e.getUTCMonth()+t.months),e.setUTCFullYear(e.getUTCFullYear()+t.years)):(e.setUTCFullYear(e.getUTCFullYear()+t.years),e.setUTCMonth(e.getUTCMonth()+t.months),e.setUTCDate(e.getUTCDate()+t.weeks*7+t.days),e.setUTCHours(e.getUTCHours()+t.hours),e.setUTCMinutes(e.getUTCMinutes()+t.minutes),e.setUTCSeconds(e.getUTCSeconds()+t.seconds)),e}function nf(n,t="second",e=Date.now()){const s=n.getTime()-e;if(s===0)return new j;const i=Math.sign(s),r=Math.abs(s),o=Math.floor(r/1e3),a=Math.floor(o/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),h=Math.floor(u/12),d=He.indexOf(t)||He.length;return new j(d>=0?h*i:0,d>=1?(u-h*12)*i:0,0,d>=3?(c-u*30)*i:0,d>=4?(l-c*24)*i:0,d>=5?(a-l*60)*i:0,d>=6?(o-a*60)*i:0,d>=7?(r-o*1e3)*i:0)}function _o(n,{relativeTo:t=Date.now()}={}){if(t=new Date(t),n.blank)return n;const e=n.sign;let s=Math.abs(n.years),i=Math.abs(n.months),r=Math.abs(n.weeks),o=Math.abs(n.days),a=Math.abs(n.hours),l=Math.abs(n.minutes),c=Math.abs(n.seconds),u=Math.abs(n.milliseconds);u>=900&&(c+=Math.round(u/1e3)),(c||l||a||o||r||i||s)&&(u=0),c>=55&&(l+=Math.round(c/60)),(l||a||o||r||i||s)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||o||r||i||s)&&(l=0),o&&a>=12&&(o+=Math.round(a/24)),!o&&a>=21&&(o+=Math.round(a/24)),(o||r||i||s)&&(a=0);const h=t.getFullYear(),d=t.getMonth(),m=t.getDate();if(o>=27||s+i+o){const f=new Date(t);f.setDate(1),f.setMonth(d+i*e+1),f.setDate(0);const g=Math.max(0,m-f.getDate()),b=new Date(t);b.setFullYear(h+s*e),b.setDate(m-g),b.setMonth(d+i*e),b.setDate(m-g+o*e);const p=b.getFullYear()-t.getFullYear(),v=b.getMonth()-t.getMonth(),E=Math.abs(Math.round((Number(b)-Number(t))/864e5))+g,w=Math.abs(p*12+v);E<27?(o>=6?(r+=Math.round(o/7),o=0):o=E,i=s=0):w<=11?(i=w,s=0):(i=0,s=p*e),(i||s)&&(o=0)}return s&&(i=0),r>=4&&(i+=Math.round(r/4)),(i||s)&&(r=0),o&&r&&!i&&!s&&(r+=Math.round(o/7),o=0),new j(s*e,i*e,r*e,o*e,a*e,l*e,c*e,u*e)}function sf(n,t){const e=_o(n,t);if(e.blank)return[0,"second"];for(const s of He){if(s==="millisecond")continue;const i=e[`${s}s`];if(i)return[i,s]}return[0,"second"]}var k=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},Se=function(n,t,e,s,i){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!i:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?i.call(n,e):i?i.value=e:t.set(n,e),e},U,te,ee,qt,mt,Nn,Po,Bo,Ro,Io,Mt;const rf=globalThis.HTMLElement||null,un=new j,Ui=new j(0,0,0,0,0,1);class of extends Event{constructor(t,e,s,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=s,this.newTitle=i}}function Wi(n){if(!n.date)return 1/0;if(n.format==="duration"||n.format==="elapsed"){const e=n.precision;if(e==="second")return 1e3;if(e==="minute")return 60*1e3}const t=Math.abs(Date.now()-n.date.getTime());return t<60*1e3?1e3:t<60*60*1e3?60*1e3:60*60*1e3}const hn=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(n){if(this.elements.has(n))return;this.elements.add(n);const t=n.date;if(t&&t.getTime()){const e=Wi(n),s=Date.now()+e;s<this.time&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.update(),e),this.time=s)}}unobserve(n){this.elements.has(n)&&this.elements.delete(n)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let n=1/0;for(const t of this.elements)n=Math.min(n,Wi(t)),t.update();this.time=Math.min(60*60*1e3,n),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}};class af extends rf{constructor(){super(...arguments),U.add(this),te.set(this,!1),ee.set(this,!1),mt.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Mt.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title"]}get onRelativeTimeUpdated(){return k(this,Mt,"f")}set onRelativeTimeUpdated(t){k(this,Mt,"f")&&this.removeEventListener("relative-time-updated",k(this,Mt,"f")),Se(this,Mt,typeof t=="object"||typeof t=="function"?t:null,"f"),typeof t=="function"&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if(t==="numeric"||t==="2-digit")return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if(t==="numeric"||t==="2-digit")return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if(t==="numeric"||t==="2-digit")return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");if(t==="long"||t==="short"||t==="narrow")return t;if(this.format==="datetime"&&t!=="")return this.formatStyle}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=(t=this.getAttribute("day"))!==null&&t!==void 0?t:"numeric";if(e==="numeric"||e==="2-digit")return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(e!==""&&(e??(e=t==="datetime"?this.formatStyle:"short"),e==="numeric"||e==="2-digit"||e==="short"||e==="long"||e==="narrow"))return e}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");if(e==="numeric"||e==="2-digit")return e;if(!this.hasAttribute("year")&&new Date().getUTCFullYear()!==((t=this.date)===null||t===void 0?void 0:t.getUTCFullYear()))return"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if(t==="long"||t==="short"||t==="shortOffset"||t==="longOffset"||t==="shortGeneric"||t==="longGeneric")return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return(t=this.getAttribute("prefix"))!==null&&t!==void 0?t:this.format==="datetime"?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&ef(t)?t:"P30D"}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return t==="past"?"past":t==="future"?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return He.includes(t)?t:this.format==="micro"?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return t==="datetime"?"datetime":t==="relative"?"relative":t==="duration"?"duration":t==="micro"?"micro":t==="elapsed"?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if(t==="long")return"long";if(t==="short")return"short";if(t==="narrow")return"narrow";const e=this.format;return e==="elapsed"||e==="micro"?"narrow":e==="datetime"?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(t==null?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){hn.unobserve(this)}attributeChangedCallback(t,e,s){e!==s&&(t==="title"&&Se(this,te,s!==null&&(this.date&&k(this,U,"m",Nn).call(this,this.date))!==s,"f"),!k(this,ee,"f")&&!(t==="title"&&k(this,te,"f"))&&Se(this,ee,(async()=>{await Promise.resolve(),this.update(),Se(this,ee,!1,"f")})(),"f"))}update(){const t=k(this,mt,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let s=e;const i=this.date;if(typeof Intl>"u"||!Intl.DateTimeFormat||!i){k(this,mt,"f").textContent=t;return}const r=Date.now();k(this,te,"f")||(s=k(this,U,"m",Nn).call(this,i)||"",s&&!this.noTitle&&this.setAttribute("title",s));const o=nf(i,this.precision,r),a=k(this,U,"m",Po).call(this,o);let l=t;a==="duration"?l=k(this,U,"m",Bo).call(this,o):a==="relative"?l=k(this,U,"m",Ro).call(this,o):l=k(this,U,"m",Io).call(this,i),l?k(this,mt,"f").textContent=l:this.shadowRoot===k(this,mt,"f")&&this.textContent&&(k(this,mt,"f").textContent=this.textContent),(l!==t||s!==e)&&this.dispatchEvent(new of(t,l,e,s)),a==="relative"||a==="duration"?hn.observe(this):hn.unobserve(this)}}te=new WeakMap,ee=new WeakMap,mt=new WeakMap,Mt=new WeakMap,U=new WeakSet,qt=function(){var t;const e=((t=this.closest("[lang]"))===null||t===void 0?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(e??"").toString()}catch{return"default"}},Nn=function(t){return new Intl.DateTimeFormat(k(this,U,"a",qt),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Po=function(t){const e=this.format;if(e==="datetime")return"datetime";if(e==="duration"||e==="elapsed"||e==="micro")return"duration";if((e==="auto"||e==="relative")&&typeof Intl<"u"&&Intl.RelativeTimeFormat){const s=this.tense;if(s==="past"||s==="future"||j.compare(t,this.threshold)===1)return"relative"}return"datetime"},Bo=function(t){const e=k(this,U,"a",qt),s=this.format,i=this.formatStyle,r=this.tense;let o=un;s==="micro"?(t=_o(t),o=Ui,(this.tense==="past"&&t.sign!==-1||this.tense==="future"&&t.sign!==1)&&(t=Ui)):(r==="past"&&t.sign!==-1||r==="future"&&t.sign!==1)&&(t=o);const a=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[a]:"always"}):t.abs().toLocaleString(e,{style:i})},Ro=function(t){const e=new Intl.RelativeTimeFormat(k(this,U,"a",qt),{numeric:"auto",style:this.formatStyle}),s=this.tense;s==="future"&&t.sign!==1&&(t=un),s==="past"&&t.sign!==-1&&(t=un);const[i,r]=sf(t);return r==="second"&&i<10?e.format(0,this.precision==="millisecond"?"second":this.precision):e.format(i,r)},Io=function(t){const e=new Intl.DateTimeFormat(k(this,U,"a",qt),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${e.format(t)}`.trim()};const zi=typeof globalThis<"u"?globalThis:window;try{zi.RelativeTimeElement=af.define()}catch(n){if(!(zi.DOMException&&n instanceof DOMException&&n.name==="NotSupportedError")&&!(n instanceof ReferenceError))throw n}class lf extends I()({targets:{}}){}const cf=Object.freeze(Object.defineProperty({__proto__:null,default:lf},Symbol.toStringTag,{value:"Module"}));function uf(){return/Mac|iMac|Macintosh|MacIntel/.test(navigator.userAgent)}class hf extends I()({targets:{alt:HTMLSpanElement,ctrl:HTMLSpanElement,shift:HTMLSpanElement}}){replaceSymbol(t,e){for(const s of t)s.innerText=e,s.classList.add("!font-fallback")}connect(){this.replaceSymbol(this.shiftTargets,"⇧"),uf()&&(this.replaceSymbol(this.ctrlTargets,"⌘"),this.replaceSymbol(this.altTargets,"⌥"))}}const df=Object.freeze(Object.defineProperty({__proto__:null,default:hf},Symbol.toStringTag,{value:"Module"})),Ue=class Ue extends ut{connect(){Od(this)}save(){this.hasFormTarget?this.formTarget.requestSubmit():this.element.requestSubmit()}};Ue.debounces=["save"],Ue.targets=["form"];let $n=Ue;const ff=Object.freeze(Object.defineProperty({__proto__:null,default:$n},Symbol.toStringTag,{value:"Module"}));class mf extends I()({targets:{button:HTMLButtonElement,form:HTMLFormElement}}){get form(){return this.hasFormTarget?this.formTarget:this.element}runCheck(){this.buttonTarget.disabled=!this.form.checkValidity()}connect(){this.form.addEventListener("input",()=>this.runCheck()),this.runCheck(),Lo(this,{childList:!0,subtree:!0})}mutate(){this.runCheck()}}const pf=Object.freeze(Object.defineProperty({__proto__:null,default:mf},Symbol.toStringTag,{value:"Module"}));class gf extends I()({targets:{perPage:HTMLSelectElement}}){connect(){}perPageChange(t){t.preventDefault();const s=t.target.value,i=new URL(window.location.href);new URLSearchParams(s.split("?")[1]).forEach((o,a)=>{i.searchParams.set(a,o)}),window.location.href=i.toString()}navigate(t){const e=t.target.closest("a");e&&(t.preventDefault(),window.location.href=e.href)}}const bf=Object.freeze(Object.defineProperty({__proto__:null,default:gf},Symbol.toStringTag,{value:"Module"})),yf=8,vf=8;class wf extends I()({targets:{activator:HTMLElement,wrapper:HTMLDivElement,tooltip:HTMLDivElement,arrow:HTMLDivElement,text:HTMLSpanElement}}){async update(){const t=this.element.getAttribute("data-placement")||"top";bs(this.activatorTarget,this.tooltipTarget,{placement:t,middleware:[ms(yf+vf),gs({padding:8}),ps({padding:8}),vd({element:this.arrowTarget})]}).then(({x:e,y:s,placement:i,middlewareData:r})=>{Object.assign(this.tooltipTarget.style,{left:`${e}px`,top:`${s}px`});const o=i.split("-")[0];this.tooltipTarget.setAttribute("data-side",o),this.arrowTarget.setAttribute("data-side",o);const{x:a,y:l}=r.arrow||{},c={top:"bottom",right:"left",bottom:"top",left:"right"}[o],u={left:a!=null?`${a}px`:"",top:l!=null?`${l}px`:"",right:"",bottom:""};c==="top"?u.bottom="-8px":c==="bottom"?u.top="-8px":c==="left"?u.right="-8px":c==="right"&&(u.left="-8px"),Object.assign(this.arrowTarget.style,u)})}showTooltip(t){this.wrapperTarget.classList.add("ariadne:block"),this.wrapperTarget.classList.remove("ariadne:hidden"),this.update()}hideTooltip(t){this.wrapperTarget.classList.add("ariadne:hidden"),this.wrapperTarget.classList.remove("ariadne:block")}}const Ef=Object.freeze(Object.defineProperty({__proto__:null,default:wf},Symbol.toStringTag,{value:"Module"})),Ze=hl.start();Ze.debug=!1;window.Stimulus=Ze;const Tf=Object.assign({"../../components/ariadne/form/toggle/component.ts":Cl,"../../components/ariadne/layout/sidebar/group/component.ts":kl,"../../components/ariadne/ui/accordion/component.ts":kh,"../../components/ariadne/ui/banner/component.ts":Fh,"../../components/ariadne/ui/clipboard_copy/component.ts":$h,"../../components/ariadne/ui/combobox/component.ts":Vd,"../../components/ariadne/ui/dialog/component.ts":Ud,"../../components/ariadne/ui/list/component.ts":zd,"../../components/ariadne/ui/popover/component.ts":Yd,"../../components/ariadne/ui/relative_time/component.ts":cf,"../../components/ariadne/ui/shortcut/component.ts":df});for(const[n,t]of Object.entries(Tf)){const e=n.split("/"),s=e.slice(3,e.length-1).join("-").replaceAll("_","-").toLocaleLowerCase();Ze.register(s,t.default)}const Af=Object.assign({"/controllers/form_autosubmit_controller.ts":ff,"/controllers/form_validity_controller.ts":pf,"/controllers/pagination_controller.ts":bf,"/controllers/tooltip_controller.ts":Ef});for(const[n,t]of Object.entries(Af)){const e=n.split("/"),s=e[e.length-1].replace("_controller.ts","").replaceAll("_","-").toLocaleLowerCase();Ze.register(`ariadne-${s}`,t.default)}
|
99
99
|
//# sourceMappingURL=ariadne_view_components.js.map
|