primer_view_components 0.36.4 → 0.37.0
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 +26 -0
- data/app/assets/javascripts/components/primer/beta/details_toggle_element.d.ts +39 -0
- data/app/assets/javascripts/components/primer/primer.d.ts +1 -0
- data/app/assets/javascripts/primer_view_components.js +1 -1
- data/app/assets/javascripts/primer_view_components.js.map +1 -1
- data/app/components/primer/alpha/action_menu/action_menu_element.js +13 -3
- data/app/components/primer/alpha/action_menu/action_menu_element.ts +14 -2
- data/app/components/primer/alpha/dropdown.rb +8 -0
- data/app/components/primer/alpha/form_control.rb +47 -7
- data/app/components/primer/alpha/toggle_switch.html.erb +1 -1
- data/app/components/primer/alpha/toggle_switch.js +1 -0
- data/app/components/primer/alpha/toggle_switch.rb +14 -2
- data/app/components/primer/alpha/toggle_switch.ts +1 -0
- data/app/components/primer/beta/button.html.erb +1 -1
- data/app/components/primer/beta/button.rb +2 -1
- data/app/components/primer/beta/details.html.erb +8 -6
- data/app/components/primer/beta/details.rb +42 -0
- data/app/components/primer/beta/details_toggle_element.d.ts +39 -0
- data/app/components/primer/beta/details_toggle_element.js +60 -0
- data/app/components/primer/beta/details_toggle_element.ts +57 -0
- data/app/components/primer/beta/markdown.rb +1 -0
- data/app/components/primer/beta/nav_list.rb +1 -1
- data/app/components/primer/primer.d.ts +1 -0
- data/app/components/primer/primer.js +1 -0
- data/app/components/primer/primer.ts +1 -0
- data/app/lib/primer/forms/action_menu.html.erb +1 -1
- data/app/lib/primer/forms/action_menu.rb +5 -0
- data/lib/primer/view_components/version.rb +2 -2
- data/lib/primer/yard/component_manifest.rb +11 -10
- data/lib/primer/yard/lookbook_pages_backend.rb +8 -0
- data/previews/primer/alpha/action_menu_preview/multiple_select_form.html.erb +1 -1
- data/previews/primer/alpha/form_control_preview/playground.html.erb +14 -6
- data/previews/primer/alpha/overlay_preview.rb +0 -31
- data/previews/primer/alpha/select_preview.rb +6 -6
- data/previews/primer/alpha/text_field_preview.rb +22 -22
- data/previews/primer/alpha/toggle_switch_preview.rb +4 -0
- data/previews/primer/alpha/tooltip_preview.rb +1 -1
- data/previews/primer/beta/details_preview.rb +12 -0
- data/previews/primer/beta/markdown_preview.rb +9 -9
- data/previews/primer/beta/relative_time_preview.rb +20 -10
- data/static/arguments.json +18 -0
- data/static/constants.json +4 -0
- data/static/info_arch.json +140 -70
- data/static/previews.json +27 -52
- metadata +6 -4
- data/previews/primer/alpha/overlay_preview/in_an_action_menu.html.erb +0 -13
- data/previews/primer/alpha/overlay_preview/overlay_with_header_filter.html.erb +0 -16
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(){"use strict";var t,e,n,i,s,o,r,a,l=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},c=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const u=new WeakMap;let d=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),n.set(this,new IntersectionObserver((e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,n,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",i).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){d=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,n){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",i).call(this):"loading"===e&&this.isConnected&&"eager"!==n&&"eager"===this.loading&&l(this,t,"m",i).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",i).call(this),"lazy"===this.loading&&l(this,n,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){u.delete(this),l(this,t,"m",i).call(this)}}e=new WeakMap,n=new WeakMap,t=new WeakSet,i=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,n,"f").unobserve(this);try{const n=await l(this,t,"m",s).call(this);if(n instanceof Error)throw n;const i=n,o=document.createElement("template");o.innerHTML=i;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,n=u.get(this);if(n&&n.src===e)return n.data;{let n;return n=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),u.set(this,{src:e,data:n}),n}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t){await new Promise((t=>setTimeout(t,0)));for(const e of t)this.dispatchEvent(new Event(e))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const n=await this.fetch(this.request());if(200!==n.status)throw new Error(`Failed to load resource: the server responded with a status of ${n.status}`);const i=n.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||i&&i.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${i}`);const s=await n.text();let o=s;if(d){o=(await d).createHTML(s,n)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"]),e}var e};const h="undefined"!=typeof globalThis?globalThis:window;try{h.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(h.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=f.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function m(t,e,n){const i=t.input;if(!i)return;const s=f.get(t);if(!s)return;const o=i.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let u;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let d="";try{u=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),i}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),d=await u.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}u&&u.ok?(a.innerHTML=d,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:n?n.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(n){clearTimeout(e),e=setTimeout((()=>{clearTimeout(e),t(n)}),300)}}function g(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}function b(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function v(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){L(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const n=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)S(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&L(t)}));n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,E.delete(t),n.disconnect()}};return E.set(t,i),i}function L(t){for(const e of t.querySelectorAll("[data-action]"))S(e);t instanceof Element&&t.hasAttribute("data-action")&&S(t)}function k(t){const e=t.currentTarget;for(const n of T(e))if(t.type===n.type){const i=e.closest(n.tag);w.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(n.tag)){const e=s.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function S(t){for(const e of T(t))t.addEventListener(e.type,k)}const M=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),C=(t,e="property")=>{const n=M(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const x="attr";function I(t,e){V(t,x).add(e)}const D=new WeakSet;function O(t,e){if(D.has(t))return;D.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=V(n,x));for(const n of e){const e=t[n],s=C(`${i}${n}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,n,o),n in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const P=new Map,H=new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),R=new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)})),q={ready:()=>H,firstInteraction:()=>R,visible:t=>new Promise((e=>{const n=new IntersectionObserver((t=>{for(const i of t)if(i.isIntersecting)return e(),void n.disconnect()}),{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))n.observe(e)}))},W=new WeakMap;function F(t){cancelAnimationFrame(W.get(t)||0),W.set(t,requestAnimationFrame((()=>{for(const e of P.keys()){const n=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||n){const i=n?.getAttribute("data-load-on")||"ready",s=i in q?q[i]:q.ready;for(const t of P.get(e)||[])s(e).then(t);P.delete(e),W.delete(t)}}})))}let B;const N=Symbol.for("catalyst");class ${constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>C(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...V(t.prototype,x)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=M(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),O(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),L(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){B||(B=new MutationObserver((t=>{if(P.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&F(t)}))),F(t),B.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,s){O(t),"data-catalyst"!==e&&s&&s.call(t,e,n,i)}}function V(t,e){if(!Object.prototype.hasOwnProperty.call(t,N)){const e=t[N],n=t[N]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[N];return n.has(e)||n.set(e,new Set),n.get(e)}function j(t,e){V(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function K(t,e){V(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)||i.push(s);for(const s of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)===t&&i.push(s);return i}(this,e)}})}function U(t){new $(t)}var z;class Y{constructor(t){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}})),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const n=t.querySelector(".ActionListItem-truncationTooltip");if(!n)continue;const i=e.scrollWidth>e.clientWidth;n.style.display=i?"":"none"}}}let _=class ActionListElement extends HTMLElement{constructor(){super(...arguments),z.set(this,void 0)}connectedCallback(){v(this,z,new Y(this),"f")}disconnectedCallback(){b(this,z,"f").unobserve(this)}};z=new WeakMap,_=g([U],_);const G={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},X={start:["end","center"],end:["start","center"],center:["end","start"]};function J(t,e,n={}){const i=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e instanceof Element;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),s=getComputedStyle(n),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:i.top+o,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-o-l,n===document.body?window.innerHeight:-1/0)}}(i),o=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,n,i,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let u=Q(n,i,s,o,a,l),d=s,h=o;if(u.top-=e.top,u.left-=e.left,!r){const r=G[s];let f=0;if(r){let t=s;for(;f<r.length&&tt(t,u,c,n);){const s=r[f++];t=s,u=Q(n,i,s,o,a,l),u.top-=e.top,u.left-=e.left,d=s}}const m=X[o];let p=0;if(m){let t=o;for(;p<m.length&&et(t,u,c,n);){const s=m[p++];t=s,u=Q(n,i,d,s,a,l),u.top-=e.top,u.left-=e.left,h=s}}u.top<c.top&&(u.top=c.top),u.left<c.left&&(u.left=c.left),u.left+n.width>t.width+c.left&&(u.left=t.width+c.left-n.width),r&&f<r.length&&u.top+n.height>t.height+c.top&&(u.top=Math.max(t.height+c.top-n.height,0))}return Object.assign(Object.assign({},u),{anchorSide:d,anchorAlign:h})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,s,o;const r=null!==(e=t.side)&&void 0!==e?e:Z.side,a=null!==(n=t.align)&&void 0!==n?n:Z.align;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:Z.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?Z.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:Z.allowOutOfBounds}}(n))}const Z={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function Q(t,e,n,i,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-s-t.height:"outside-bottom"===n?l=a+s:"outside-left"===n?c=e.left-s-t.width:"outside-right"===n&&(c=r+s),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===n?l=e.top+s:"inside-bottom"===n?l=a-s-t.height:"inside-left"===n?c=e.left+s:"inside-right"===n?c=r-s-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function tt(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function et(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function*nt(t,e={}){var n,i;const s=null!==(n=e.strict)&&void 0!==n&&n,o=null!==(i=e.onlyTabbable)&&void 0!==i&&i?ot:st,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function it(t,e=!1){return nt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function st(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(n||i||s||o)return!1;if(e){const e=getComputedStyle(t),n=0===t.offsetWidth||0===t.offsetHeight,i=["hidden","collapse"].includes(e.visibility),s="none"===e.display||!t.offsetParent,o=0===t.getClientRects().length;if(n||i||o||s)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function ot(t,e=!1){return st(t,e)&&"-1"!==t.getAttribute("tabindex")}let rt=!1;function at(){}try{const t=Object.create({},{signal:{get(){rt=!0}}});window.addEventListener("test",at,t),window.removeEventListener("test",at,t)}catch(t){}function lt(){rt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",(()=>{this.removeEventListener(e,n,i)})),t.call(this,e,n,i)}}(),rt=!0)}lt();const ct=[];let ut,dt;function ht(t,e,n){const i=new AbortController,s=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=it(t,!0);null==e||e.focus()};const r=document.createElement("span");r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=it(t);null==e||e.focus()},t.prepend(o),t.append(r);const a=function(t,e){const n=new MutationObserver((n=>{for(const i of n)if("childList"===i.type&&i.addedNodes.length){if(Array.from(i.addedNodes).filter((t=>t instanceof HTMLElement&&t.classList.contains("sentinel")&&"SPAN"===t.tagName)).length)return;const n=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==n?void 0:n.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}}));return n.observe(t,{childList:!0}),n}(t,[o,r]);let l;function c(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(l=n);if(l&&ot(l)&&t.contains(l))return void l.focus();if(e&&t.contains(e))return void e.focus();{const e=it(t);return void(null==e||e.focus())}}}const u=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(ut){const t=ut;ut.container.setAttribute("data-focus-trap","suspended"),ut.controller.abort(),ct.push(t)}u.signal.addEventListener("abort",(()=>{ut=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=ct.findIndex((e=>e.container===t));n>=0&&ct.splice(n,1),a.disconnect(),function(){const t=ct.pop();t&&ht(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{c(t.target)}),{signal:u.signal,capture:!0}),c(document.activeElement),ut={container:t,controller:u,initialFocus:e,originalSignal:s};const d=ct.findIndex((e=>e.container===t));if(d>=0&&ct.splice(d,1),!n)return i}function ft(){return void 0===dt&&(dt=/^mac/i.test(window.navigator.platform)),dt}let mt=1e4;var pt;lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(pt||(pt={}));const gt={ArrowLeft:pt.ArrowHorizontal,ArrowDown:pt.ArrowVertical,ArrowUp:pt.ArrowVertical,ArrowRight:pt.ArrowHorizontal,h:pt.HL,j:pt.JK,k:pt.JK,l:pt.HL,a:pt.AD,s:pt.WS,w:pt.WS,d:pt.AD,Tab:pt.Tab,Home:pt.HomeAndEnd,End:pt.HomeAndEnd,PageUp:pt.PageUpDown,PageDown:pt.PageUpDown,Backspace:pt.Backspace},bt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function vt(t){const e=bt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const n=ft();if(n&&t.metaKey||!n&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}const wt="data-is-active-descendant",yt="data-has-active-descendant";function Et(t,e){var n,i,s,o,r;const a=[],l=new WeakMap,c=null!==(n=null==e?void 0:e.bindKeys)&&void 0!==n?n:((null==e?void 0:e.getNextFocusable)?pt.ArrowAll:pt.ArrowVertical)|pt.HomeAndEnd,u=null!==(i=null==e?void 0:e.focusOutBehavior)&&void 0!==i?i:"stop",d=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",h=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(o=null==e?void 0:e.preventScroll)&&void 0!==o&&o;function g(){return a[0]}function b(t,e=!1){const n=m;m=t,h?t&&document.activeElement===h?v(n,t,e):w():(n&&n!==t&&l.has(n)&&n.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,n,i=!1){n.id||n.setAttribute("id","__primer_id_"+mt++),e&&e!==n&&e.removeAttribute(wt),h&&(i||h.getAttribute("aria-activedescendant")!==n.id)&&(h.setAttribute("aria-activedescendant",n.id),t.setAttribute(yt,n.id),n.setAttribute(wt,i?"activated-directly":"activated-indirectly"),null==f||f(n,e,i))}function w(e=m){"first"===d&&(m=void 0),null==h||h.removeAttribute("aria-activedescendant"),t.removeAttribute(yt),null==e||e.removeAttribute(wt);for(const e of t.querySelectorAll(`[${wt}]`))null==e||e.removeAttribute(wt);null==f||f(void 0,e,!1)}function y(...t){const n=t.filter((t=>{var n,i;return null===(i=null===(n=null==e?void 0:e.focusableElementFilter)||void 0===n?void 0:n.call(e,t))||void 0===i||i}));if(0!==n.length){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let n=0,i=a.length-1;for(;n<=i;){const t=Math.floor((n+i)/2);E(e,a[t])?i=t-1:n=t+1}return n}(n),0,...n);for(const t of n)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const n=l.get(e);if(void 0!==n&&(null===n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),l.delete(e)),e===m){b(g())}}}const L={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};y(...nt(t,L));b("function"==typeof d?d(document.body):g());new MutationObserver((t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&A(...nt(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&A(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&y(...nt(t,L));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&y(e.target)}})).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const k=new AbortController,T=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:k.signal;let S;T.addEventListener("abort",(()=>{A(...a)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(S=a.indexOf(t.target))}),{signal:T}),h?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(h.focus({preventScroll:p}),b(t.target))}),{signal:T}),t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=a.find((e=>e.contains(t)));e&&b(e)}),{signal:T,capture:!0}),h.addEventListener("focusin",(()=>{m?v(void 0,m):b(g())}),{signal:T}),h.addEventListener("focusout",(()=>{w()}),{signal:T})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==S)S>=0&&a[S]!==m&&b(a[S]),S=void 0;else if("previous"===d)b(e.target);else if("closest"===d||"first"===d){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===C?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof d)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=d(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);C=void 0}),{signal:T});const M=null!=h?h:t;let C;return"closest"===d&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(C=vt(t))}),{signal:T,capture:!0}),M.addEventListener("keydown",(n=>{var i;if(n.key in bt){const s=gt[n.key];if(!n.defaultPrevented&&(s&c)>0&&!function(t,e){const n=t.key,i=[...n].length,s=e instanceof HTMLInputElement&&"text"===e.type||e instanceof HTMLTextAreaElement;if(s&&(1===i||"Home"===n||"End"===n))return!0;if(e instanceof HTMLSelectElement){if(1===i)return!0;if("ArrowDown"===n&&ft()&&!t.metaKey)return!0;if("ArrowDown"===n&&!ft()&&t.altKey)return!0}if(e instanceof HTMLTextAreaElement&&("PageUp"===n||"PageDown"===n))return!0;if(s){const t=e,i=0===t.selectionStart&&0===t.selectionEnd,s=t.selectionStart===t.value.length&&t.selectionEnd===t.value.length;if("ArrowLeft"===n&&!i)return!0;if("ArrowRight"===n&&!s)return!0;if(t instanceof HTMLTextAreaElement){if("ArrowUp"===n&&!i)return!0;if("ArrowDown"===n&&!s)return!0}}return!1}(n,document.activeElement)){const s=vt(n);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(i=document.activeElement)&&void 0!==i?i:void 0,n)),!o){const e=function(){if(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let i=e;"previous"===s?i-=1:"start"===s?i=0:"next"===s?i+=1:i=a.length-1,i<0&&(i="wrap"===u&&"Tab"!==n.key?a.length-1:0),i>=a.length&&(i="wrap"===u&&"Tab"!==n.key?0:a.length-1),e!==i&&(o=a[i])}h?b(o||m,!0):o&&(C=s,o.focus({preventScroll:p})),("Tab"!==n.key||o)&&n.preventDefault()}}}),{signal:T}),k}var At,Lt,kt,Tt,St,Mt,Ct;const xt=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Ot&&t.update()}})),It=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Ot&&t.update()}}));var Dt;!function(t){t[t.Item=0]="Item",t[t.Divider=1]="Divider"}(Dt||(Dt={}));let Ot=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),At.add(this),Lt.set(this,null)}connectedCallback(){It.observe(this),xt.observe(this),requestAnimationFrame((()=>{this.style.overflow="visible",this.update()}))}disconnectedCallback(){It.unobserve(this),xt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,n=e?.getAttribute("data-for");n&&document.getElementById(n)?.click()}update(){const t=b(this,At,"a",kt);if(!t)return;const e=t.getBoundingClientRect().top;let n=null;b(this,At,"m",Ct).call(this,((t,i,s)=>{const o=t.getBoundingClientRect().top;return s===Dt.Item&&(o>e?(b(this,At,"m",St).call(this,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),n===Dt.Divider&&b(this,At,"m",St).call(this,i-1)):(b(this,At,"m",Tt).call(this,i),i===this.items.length-1&&(this.moreMenu.hidden=!0),n===Dt.Divider&&b(this,At,"m",Tt).call(this,i-1))),n=s,!0})),b(this,Lt,"f")&&b(this,Lt,"f").abort(),v(this,Lt,Et(this,{bindKeys:pt.ArrowHorizontal|pt.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),n=e>-1&&"visible"===this.items[e].style.visibility,i=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return n||i}}),"f")}};Lt=new WeakMap,At=new WeakSet,kt=function(){let t=null;return b(this,At,"m",Ct).call(this,((e,n,i)=>i!==Dt.Item||(t=e,!1))),t},Tt=function(t){const e=this.items[t],n=b(this,At,"a",Mt)[t];e&&n&&(e.style.setProperty("visibility","visible"),n.hidden=!0)},St=function(t){const e=this.items[t],n=b(this,At,"a",Mt)[t];e&&n&&(e.style.setProperty("visibility","hidden"),n.hidden=!1)},Mt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},Ct=function(t){for(let e=0;e<this.items.length;e++){const n=this.items[e],i=n.classList.contains("ActionBar-divider")?Dt.Divider:Dt.Item;if(!t(n,e,i))break}},g([K],Ot.prototype,"items",void 0),g([j],Ot.prototype,"itemContainer",void 0),g([j],Ot.prototype,"moreMenu",void 0),Ot=g([U],Ot),window.ActionBarElement=Ot;class DetailsMenuElement 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 n=[Rt(t,"compositionstart",(t=>Ut(this,t))),Rt(t,"compositionend",(t=>Ut(this,t))),Rt(t,"click",(e=>$t(t,e))),Rt(t,"change",(e=>$t(t,e))),Rt(t,"keydown",(e=>function(t,e,n){if(!(n instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const i=Pt.get(e);if(!i||i.isComposing)return;const s=n.target instanceof Element&&"SUMMARY"===n.target.tagName;switch(n.key){case"Escape":t.hasAttribute("open")&&(Kt(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case"n":if(Nt&&n.ctrlKey){const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"p":if(Nt&&n.ctrlKey){const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&jt(e)&&e.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),e.click())}}}(t,this,e))),Rt(t,"toggle",(()=>qt(t,this)),{once:!0}),Rt(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(t))),this.preload?Rt(t,"mouseover",(()=>qt(t,this)),{once:!0}):Ht,...Wt(t)];Pt.set(this,{subscriptions:n,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Pt.get(this);if(t){Pt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Pt=new WeakMap,Ht={unsubscribe(){}};function Rt(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function qt(t,e){const n=e.getAttribute("src");if(!n)return;const i=Pt.get(e);if(!i)return;if(i.loaded)return;i.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",(()=>Ft(t))),s.setAttribute("src",n))}function Wt(t){let e=!1;return[Rt(t,"mousedown",(()=>e=!0)),Rt(t,"keydown",(()=>e=!1)),Rt(t,"toggle",(()=>{t.hasAttribute("open")&&(Ft(t)||e||function(t){const e=document.activeElement;if(e&&jt(e)&&t.contains(e))return;const n=Bt(t,!0);n&&n.focus()}(t))}))]}function Ft(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Bt(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,s=i instanceof HTMLElement?n.indexOf(i):-1,o=e?n[s+1]:n[s-1],r=e?n[0]:n[n.length-1];return o||r}const Nt=navigator.userAgent.match(/Macintosh/);function $t(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||Vt(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Vt(e,t)}}function Vt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&Kt(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function jt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function Kt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function Ut(t,e){const n=Pt.get(t);n&&(n.isComposing="compositionstart"===e.type)}var zt,Yt;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const _t=(()=>{const t=new Set;let e=null,n=null;function i(){for(const e of t)e.update()}return s=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new IntersectionObserver((e=>{for(const n of e){const e=n.target;n.isIntersecting?(e.update(),t.add(e)):t.delete(e)}}))),n||(n=new ResizeObserver((()=>{for(const e of t)e.update()}))),n.observe(s.ownerDocument.documentElement),e.observe(s)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),zt.set(this,null),Yt.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,zt,"f"))return b(this,zt,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,zt,t,"f"),b(this,zt,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",(()=>this.update())),_t(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,Yt,"f")),v(this,Yt,requestAnimationFrame((()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:n}=J(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"})),"f"))}}var Gt,Xt,Jt;function Zt(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){const e=document.getElementById(i);if(e instanceof HTMLDialogElement){e.showModal(),t.preventDefault();let i=n,s=!1;for(;i;)i=i.parentElement?.closest("[popover]:not(:popover-open)"),i&&"auto"===i.popover&&(i.classList.add("dialog-inside-popover-fix"),i.popover="manual",i.showPopover(),s=!0);s&&(e.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",(()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())}),{once:!0}))}}if(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i){const t=document.getElementById(i);t instanceof HTMLDialogElement&&t.open&&t.close()}}zt=new WeakMap,Yt=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),Gt.add(this),Xt.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,Xt,new AbortController,"f");document.addEventListener("click",Zt,!0),document.addEventListener("click",this,{signal:t}),this.ownerDocument.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-this.ownerDocument.body.clientWidth+"px"),new MutationObserver((t=>{for(const e of t)e.target===this.dialog&&b(this,Gt,"m",Jt).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Gt,"m",Jt).call(this)}disconnectedCallback(){b(this,Xt,"f")?.abort()}handleEvent(t){const e=t.target,n=this.dialog;if(e!==n||!n?.open)return;const i=n.getBoundingClientRect();i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width||n.close()}}Xt=new WeakMap,Gt=new WeakSet,Jt=function(){this.dialog&&this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),this.dialog.close(),this.dialog.showModal())},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var Qt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...i}={}){super(t,i),this.oldState=String(e||""),this.newState=String(n||"")}},te=new WeakMap;function ee(t,e,n){te.set(t,setTimeout((()=>{te.has(t)&&t.dispatchEvent(new Qt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var ne=globalThis.ShadowRoot||function(){},ie=globalThis.HTMLDialogElement||function(){},se=new WeakMap,oe=new WeakMap,re=new WeakMap;function ae(t){return re.get(t)||"hidden"}var le=new WeakMap;function ce(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===ae(t))&&(!(!e&&"hidden"!==ae(t))&&(!(t instanceof ie&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function ue(t){return t?Array.from(oe.get(t.ownerDocument)||[]).indexOf(t)+1:0}function de(t){const e=me(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||fe(t))instanceof ne&&(t=t.host),t instanceof Document)return}}(t);return ue(e)>ue(n)?e:n}function he(t){const e=oe.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function fe(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?fe(t.parentNode):t}function me(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===re.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||fe(t))instanceof ne&&(t=t.host),t instanceof Document)return}}function pe(t){return!(t.hidden||t instanceof ne)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function ge(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const i=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=i.currentNode;for(;s;){if(pe(s))return s;s=i.nextNode()}})(t)?.focus()}var be=new WeakMap;function ve(t){if(!ce(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Qt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!ce(t,!1))return;let n=!1;if("auto"===t.popover){const n=t.getAttribute("popover");if(Ee(function(t){const e=new Map;let n=0;for(const i of oe.get(t.ownerDocument)||[])e.set(i,n),n+=1;e.set(t,n),n+=1;let i=null;return function(t){const n=me(t);if(null===n)return null;const s=e.get(n);(null===i||e.get(i)<s)&&(i=n)}(t.parentElement||fe(t)),i}(t)||e,!1,!0),n!==t.getAttribute("popover")||!ce(t,!1))return}he(e)||(n=!0),be.delete(t);const i=e.activeElement;t.classList.add(":popover-open"),re.set(t,"showing"),se.has(e)||se.set(e,new Set),se.get(e).add(t),ge(t),"auto"===t.popover&&(oe.has(e)||oe.set(e,new Set),oe.get(e).add(t),Te(le.get(t),!0)),n&&i&&"auto"===t.popover&&be.set(t,i),ee(t,"closed","open")}function we(t,e=!1,n=!1){if(!ce(t,!0))return;const i=t.ownerDocument;if("auto"===t.popover&&(Ee(t,e,n),!ce(t,!0)))return;if(Te(le.get(t),!1),le.delete(t),n&&(t.dispatchEvent(new Qt("beforetoggle",{oldState:"open",newState:"closed"})),!ce(t,!0)))return;se.get(i)?.delete(t),oe.get(i)?.delete(t),t.classList.remove(":popover-open"),re.set(t,"hidden"),n&&ee(t,"open","closed");const s=be.get(t);s&&(be.delete(t),e&&s.focus())}function ye(t,e=!1,n=!1){let i=he(t);for(;i;)we(i,e,n),i=he(t)}function Ee(t,e,n){const i=t.ownerDocument||t;if(t instanceof Document)return ye(i,e,n);let s=null,o=!1;for(const e of oe.get(i)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return ye(i,e,n);for(;s&&"showing"===ae(s)&&oe.get(i)?.size;)we(s,e,n)}var Ae=new WeakMap;function Le(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!he(n))return;const i=de(e);if(i&&"pointerdown"===t.type)Ae.set(n,i);else if("pointerup"===t.type){const t=Ae.get(n)===i;Ae.delete(n),t&&Ee(i||n,!1,!0)}}var ke=new WeakMap;function Te(t,e=!1){if(!t)return;ke.has(t)||ke.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=ke.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var Se=globalThis.ShadowRoot||function(){};function Me(t,e,n){const i=t[e];Object.defineProperty(t,e,{value(t){return i.call(this,n(t))}})}var Ce=/(^|[^\\]):popover-open\b/g;function xe(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var Ie,De,Oe,Pe,He=null;function Re(t){const e=xe();if(null===He)try{(He=new CSSStyleSheet).replaceSync(e)}catch{He=!1}if(!1===He){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[He,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(Ce,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Qt,Me(Document.prototype,"querySelector",t),Me(Document.prototype,"querySelectorAll",t),Me(Element.prototype,"querySelector",t),Me(Element.prototype,"querySelectorAll",t),Me(Element.prototype,"matches",t),Me(Element.prototype,"closest",t),Me(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){ve(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){we(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===re.get(this)&&void 0===t||!1===t?we(this,!0,!0):void 0!==t&&!0!==t||ve(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return Re(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&Re(t.shadowRoot),t}}});const i=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),i.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),i.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=i.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return i.delete(this),null;const e=fe(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof Se)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const i=fe(n);if(!(i instanceof Se||i instanceof Document))return;const s=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=ae(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?we(e,!0,!0):ce(e,!1)&&(le.set(e,t),ve(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||Ee(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",Le),t.addEventListener("pointerup",Le)})(document),Re(document)}();const qe=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),We=t=>t.textContent?.trim()[0].toLowerCase(),Fe=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Ie.add(this),De.set(this,null),Oe.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,Oe,new AbortController,"f");const{signal:t}=b(this,Oe,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,Oe,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:n}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(qe)){b(this,De,"f")?.abort();const{signal:e}=v(this,De,new AbortController,"f");for(const n of b(this,Ie,"a",Pe)){n.setAttribute("tabindex",n===t.target?"0":"-1");const i=t.target.closest("[popover]");n===t.target&&"auto"===i?.popover&&i.closest("focus-group")===this&&i.addEventListener("toggle",(t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,De,"f")?.abort(),n.setAttribute("tabindex","-1"),i.id)){const t=this.querySelector(`[popovertarget="${i.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Ie,"a",Pe)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const i=Array.from(b(this,Ie,"a",Pe));let s=i.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=i.length-1,t.preventDefault();else{if(!this.mnemonics||!Fe.test(o))return;{const e=o.toLowerCase(),r=s>0&&We(t.target)===e?s:0;s=i.findIndex(((t,n)=>n>r&&We(t)===e)),s<0&&!n&&(s=i.findIndex((t=>We(t)===e)))}}n&&s<0&&(s=0),!n&&s>=i.length&&(s=0);const r=i.at(Math.min(s,i.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}De=new WeakMap,Oe=new WeakMap,Ie=new WeakSet,Pe=function(){return this.querySelectorAll(qe)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let Be=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver((t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth})),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],Be.prototype,"hasOverflow",void 0),g([I],Be.prototype,"labelledBy",void 0),Be=g([U],Be),window.ScrollableRegionElement=Be;const Ne=(t,e,n)=>{if(e())n();else{const i=new MutationObserver((()=>{e()&&(n(),i.disconnect())}));i.observe(t,{childList:!0,subtree:!0})}};var $e,Ve,je,Ke;function Ue(t){document.activeElement!==t&&t?.focus()}const ze=[];function Ye(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,e.show(),void t.preventDefault()}if(ze.length&&(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i)){const t=document.getElementById(i);if(t instanceof ModalDialogElement){const e=ze.findIndex((t=>t.id===i));ze.splice(e,1),t.close(n.hasAttribute("data-submit-dialog-id"))}}}function _e(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ye(t)}function Ge(t){const e=t.target;if(e?.closest("button"))return;const n=ze[ze.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(ze.pop(),n.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),$e.add(this),Ve.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,$e,"a",je)?.classList.remove("Overlay--hidden"),b(this,Ve,"f").signal.aborted&&v(this,Ve,new AbortController,"f"),ht(this,this.querySelector("[autofocus]"),b(this,Ve,"f").signal),ze.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,$e,"a",je)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,Ve,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");Ue(t?it(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ye),document.addEventListener("keydown",_e),document.addEventListener("mousedown",Ge),this.addEventListener("keydown",(t=>b(this,$e,"m",Ke).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var Xe,Je,Ze,Qe,tn,en,nn,sn;Ve=new WeakMap,$e=new WeakSet,je=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},Ke=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let on=class NavListElement extends HTMLElement{constructor(){super(...arguments),Xe.add(this),Je.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Je,new Y(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Je,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,Xe,"m",Ze).call(this,t);return!!e&&(b(this,Xe,"m",en).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,Xe,"m",Qe).call(this,t);return!!e&&(b(this,Xe,"m",en).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,Xe,"m",tn).call(this);return!!t&&(b(this,Xe,"m",en).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let n=e.closest("button");if(!n){const t=e.getAttribute("aria-labelledby");if(!t)return;n=document.getElementById(t)}this.itemIsExpanded(n)&&"Escape"===t.key&&this.collapseItem(n),t.stopPropagation()}};var rn,an,ln;Je=new WeakMap,Xe=new WeakSet,Ze=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},Qe=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},tn=function(){return b(this,Xe,"m",Qe).call(this,window.location.pathname)},en=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,Xe,"m",nn).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const n=b(this,Xe,"m",sn).call(this,t);n&&(this.expandItem(n),n.classList.add("ActionListContent--hasActiveSubItem"))},nn=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,Xe,"m",sn).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},sn=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([K],on.prototype,"items",void 0),g([j],on.prototype,"topLevelList",void 0),on=g([U],on);let cn=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),rn.add(this),ln.set(this,new Y(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const n=await fetch(t);if(!n.ok)return;e=await n.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const n=b(this,rn,"m",an).call(this,document,e);n?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const i=t.target.closest("button").getAttribute("data-list-id");document.getElementById(i).append(n),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var un,dn;ln=new WeakMap,rn=new WeakSet,an=function(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)},g([j],cn.prototype,"showMoreItem",void 0),g([K],cn.prototype,"focusMarkers",void 0),cn=g([U],cn),window.NavListGroupElement=cn;let hn=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),un.add(this)}connectedCallback(){b(this,un,"m",dn).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true")}};un=new WeakSet,dn=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([K],hn.prototype,"items",void 0),hn=g([U],hn),window.customElements.get("segmented-control")||(window.SegmentedControlElement=hn,window.customElements.define("segmented-control",hn));let fn=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const n={"Requested-With":"XMLHttpRequest"};this.turbo&&(n.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:n,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const i=e.headers.get("Content-Type");window.Turbo&&this.turbo&&i?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var mn,pn,gn,bn,vn,wn,yn,En,An,Ln;g([j],fn.prototype,"switch",void 0),g([j],fn.prototype,"loadingSpinner",void 0),g([j],fn.prototype,"errorIcon",void 0),g([I],fn.prototype,"turbo",void 0),fn=g([U],fn),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=fn,window.customElements.define("toggle-switch",fn));const kn=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),Tn="sr-only",Sn=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Mn(t){for(const e of Dn)e!==t&&(kn(e)?e.hidePopover():Dn.delete(e))}function Cn(){Mn()}function xn(t){setTimeout((()=>{for(const e of Dn)kn(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const In=new Set,Dn=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),mn.add(this),pn.set(this,void 0),gn.set(this,"center"),bn.set(this,"outside-bottom"),vn.set(this,!1),wn.set(this,"mouse")}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: var(--overlay-width-small);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,wn,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&kn(this)?this.hidePopover():t||kn(this)||this.showPopover()}get hiddenFromView(){return!kn(this)}connectedCallback(){if(In.add(this),b(this,mn,"m",En).call(this),b(this,mn,"m",An).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}if(b(this,mn,"m",yn).call(this,!1),v(this,vn,!0,"f"),!this.control)return;this.setAttribute("role","tooltip"),b(this,pn,"f")?.abort(),v(this,pn,new AbortController,"f");const{signal:t}=b(this,pn,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Cn),this.ownerDocument.addEventListener("focusin",xn),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})}disconnectedCallback(){In.delete(this),Dn.delete(this),b(this,pn,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=kn(this),n="mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")),i="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this,a=i||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!n||kn(this)?e&&a&&kn(this)&&this.hidePopover():(v(this,wn,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,mn,"m",yn).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("id"===t||"data-type"===t?b(this,mn,"m",En).call(this):"data-direction"===t&&b(this,mn,"m",An).call(this))}}var On,Pn;pn=new WeakMap,gn=new WeakMap,bn=new WeakMap,vn=new WeakMap,wn=new WeakMap,mn=new WeakSet,yn=function(t){t?(Dn.add(this),this.classList.remove(Tn),Mn(this),b(this,mn,"m",Ln).call(this)):(Dn.delete(this),this.classList.remove(...Sn),this.classList.add(Tn))},En=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},An=function(){this.classList.remove(...Sn);const t=this.direction;"n"===t?(v(this,gn,"center","f"),v(this,bn,"outside-top","f")):"ne"===t?(v(this,gn,"end","f"),v(this,bn,"outside-top","f")):"e"===t?(v(this,gn,"center","f"),v(this,bn,"outside-right","f")):"se"===t?(v(this,gn,"end","f"),v(this,bn,"outside-bottom","f")):"s"===t?(v(this,gn,"center","f"),v(this,bn,"outside-bottom","f")):"sw"===t?(v(this,gn,"start","f"),v(this,bn,"outside-bottom","f")):"w"===t?(v(this,gn,"center","f"),v(this,bn,"outside-left","f")):"nw"===t&&(v(this,gn,"start","f"),v(this,bn,"outside-top","f"))},Ln=function(){if(!this.control)return;if(!b(this,vn,"f")||!kn(this))return;const t=J(this,this.control,{side:b(this,bn,"f"),align:b(this,gn,"f"),anchorOffset:0}),e=t.anchorSide,n=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let Hn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),On.add(this)}dismiss(){if("remove"===b(this,On,"a",Pn)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};On=new WeakSet,Pn=function(){return this.getAttribute("data-dismiss-scheme")},g([j],Hn.prototype,"titleText",void 0),Hn=g([U],Hn),window.customElements.get("x-banner")||(window.XBannerElement=Hn,window.customElements.define("x-banner",Hn));class Rn{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Wn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Wn(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,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",qn),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",qn)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Fn)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Fn)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Fn),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(s=e)}const o=n[s];if(o)for(const t of n)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Bn(this.list,o)):t.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 qn(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function Wn(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Fn(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Bn(t,e){(function(t,e){const n=t.scrollTop,i=n+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=n&&o<=i})(t,e)||(t.scrollTop=e.offsetTop)}const Nn=window.testScreenReaderDelay||100;class $n{constructor(t,e,n,i=!1){var s;if(this.container=t,this.input=e,this.results=n,this.combobox=new Rn(e,n,{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=n.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 t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.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=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout((()=>{clearTimeout(n),t(...i)}),e)}}(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),null===(s=this.clearButton)||void 0===s||s.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(),"true"===this.input.getAttribute("aria-expanded")&&(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("Escape"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!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))return;if(this.close(),e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||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)}),Nn)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(n).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length,i=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${i} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),n?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 Vn,jn,Kn,Un,zn,Yn=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},_n=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},Gn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const Xn=globalThis.HTMLElement||null;class Jn extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,Gn(e,["relatedTarget"])),this.relatedTarget=n}}const Zn=new WeakMap;let Qn=null;class AutoCompleteElement extends Xn{constructor(){super(...arguments),Vn.add(this),jn.set(this,null),Kn.set(this,null),zn.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Qn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Yn(this,jn,"f"))||void 0===t?void 0:t.isConnected)return Yn(this,jn,"f");const e=this.getAttribute("for"),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){_n(this,jn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Yn(this,Kn,"f"))||void 0===t?void 0:t.isConnected)?Yn(this,Kn,"f"):this.querySelector("input")}set inputElement(t){_n(this,Kn,t,"f"),Yn(this,Vn,"m",Un).call(this)}connectedCallback(){this.isConnected&&(Yn(this,Vn,"m",Un).call(this),new MutationObserver((()=>{Zn.get(this)||Yn(this,Vn,"m",Un).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=Zn.get(this);t&&(t.destroy(),Zn.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;null===(e=Yn(this,zn,"f"))||void 0===e||e.abort();const{signal:n}=_n(this,zn,new AbortController,"f"),i=await fetch(t.toString(),{signal:n,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());if(Qn){return(await Qn).createHTML(await i.text(),i)}return await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,n){var i,s;if(e===n)return;const o=Zn.get(this);if(o)switch(this.forElement===(null===(i=Zn.get(this))||void 0===i?void 0:i.results)&&this.inputElement===(null===(s=Zn.get(this))||void 0===s?void 0:s.input)||Yn(this,Vn,"m",Un).call(this),t){case"open":null===n?o.close():o.open();break;case"value":null!==n&&(o.input.value=n),this.dispatchEvent(new Jn("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}jn=new WeakMap,Kn=new WeakMap,zn=new WeakMap,Vn=new WeakSet,Un=function(){var t;null===(t=Zn.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:n}=this;if(!e||!n)return;const i="true"===this.getAttribute("data-autoselect");Zn.set(this,new $n(this,n,e,i)),e.setAttribute("role","listbox")};const ti="undefined"!=typeof globalThis?globalThis:window;try{ti.AutocompleteElement=ti.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(ti.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ei(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function ni(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),ei(n),e.removeChild(n),Promise.resolve()}async function ii(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(n)await ni(n),i();else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const o=n.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?ni(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?ni(s.href):ei(s)),i())}}function si(t){const e=t.currentTarget;e instanceof HTMLElement&&ii(e)}function oi(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),ii(e))}}function ri(t){t.currentTarget.addEventListener("keydown",oi)}function ai(t){t.currentTarget.removeEventListener("keydown",oi)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",si),this.addEventListener("focus",ri),this.addEventListener("blur",ai)}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 li="undefined"!=typeof globalThis?globalThis:window;try{li.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(li.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ci(t){t.style.display="inline-block"}function ui(t){t.style.display="none"}const di=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=di.get(t),n=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),i="Copied!";e?(clearTimeout(e),di.delete(t)):(!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ui(e),ci(n))}(t),n&&(n.textContent===i?n.textContent=`${i} `:n.textContent=i)),di.set(t,setTimeout((()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ci(e),ui(n))}(t),di.delete(t)}),2e3))}));var hi,fi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},mi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const pi="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},gi=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],bi={minimumIntegerDigits:2};class vi{constructor(t,e={}){hi.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const s=e.hours||i;i="2-digit"===s?"numeric":s;const o=e.minutes||i;i="2-digit"===o?"numeric":o;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;fi(this,hi,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return mi(this,hi,"f")}formatToParts(t){const e=[],n=mi(this,hi,"f"),i=n.style,s=n.locale;for(const[i,o]of gi){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?bi:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new pi(s,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}hi=new WeakMap;const wi=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,yi=["year","month","week","day","hour","minute","second","millisecond"];class Ei{constructor(t=0,e=0,n=0,i=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,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=0===this.sign}abs(){return new Ei(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("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,s=null===(e=n.match(wi))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*i));return s?new Ei(...s):new Ei}if("object"==typeof t){const{years:e,months:n,weeks:i,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new Ei(e,n,i,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(Ai(n,Ei.from(t)).getTime()-n),s=Math.abs(Ai(n,Ei.from(e)).getTime()-n);return i>s?-1:i<s?1:0}toLocaleString(t,e){return new vi(t,e).format(this)}}function Ai(t,e){const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+7*e.weeks+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),n}function Li(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const n=t.sign;let i=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),u=Math.abs(t.milliseconds);u>=900&&(c+=Math.round(u/1e3)),(c||l||a||r||o||s||i)&&(u=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||i)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||i)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||i)&&(a=0);const d=e.getFullYear(),h=e.getMonth(),f=e.getDate();if(r>=27||i+s+r){const t=new Date(e);t.setDate(1),t.setMonth(h+s*n+1),t.setDate(0);const a=Math.max(0,f-t.getDate()),l=new Date(e);l.setFullYear(d+i*n),l.setDate(f-a),l.setMonth(h+s*n),l.setDate(f-a+r*n);const c=l.getFullYear()-e.getFullYear(),u=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+u);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,s=i=0):p<=11?(s=p,i=0):(s=0,i=c*n),(s||i)&&(r=0)}return i&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||i)&&(o=0),r&&o&&!s&&!i&&(o+=Math.round(r/7),r=0),new Ei(i*n,s*n,o*n,r*n,a*n,l*n,c*n,u*n)}var ki,Ti,Si,Mi,Ci,xi,Ii,Di,Oi,Pi,Hi,Ri=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},qi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const Wi=globalThis.HTMLElement||null,Fi=new Ei,Bi=new Ei(0,0,0,0,0,1);class Ni extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function $i(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Vi=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=$i(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,$i(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Wi{constructor(){super(...arguments),ki.add(this),Ti.set(this,!1),Si.set(this,!1),Ci.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Hi.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 Ri(this,Hi,"f")}set onRelativeTimeUpdated(t){Ri(this,Hi,"f")&&this.removeEventListener("relative-time-updated",Ri(this,Hi,"f")),qi(this,Hi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,wi.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return yi.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"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=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Vi.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&qi(this,Ti,null!==n&&(this.date&&Ri(this,ki,"m",xi).call(this,this.date))!==n,"f"),Ri(this,Si,"f")||"title"===t&&Ri(this,Ti,"f")||qi(this,Si,(async()=>{await Promise.resolve(),this.update(),qi(this,Si,!1,"f")})(),"f"))}update(){const t=Ri(this,Ci,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Ri(this,Ci,"f").textContent=t);const s=Date.now();Ri(this,Ti,"f")||(n=Ri(this,ki,"m",xi).call(this,i)||"",n&&!this.noTitle&&this.setAttribute("title",n));const o=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new Ei;const s=Math.sign(i),o=Math.abs(i),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=yi.indexOf(e)||yi.length;return new Ei(h>=0?d*s:0,h>=1?(u-12*d)*s:0,0,h>=3?(c-30*u)*s:0,h>=4?(l-24*c)*s:0,h>=5?(a-60*l)*s:0,h>=6?(r-60*a)*s:0,h>=7?(o-1e3*r)*s:0)}(i,this.precision,s),r=Ri(this,ki,"m",Ii).call(this,o);let a=t;a="duration"===r?Ri(this,ki,"m",Di).call(this,o):"relative"===r?Ri(this,ki,"m",Oi).call(this,o):Ri(this,ki,"m",Pi).call(this,i),a?Ri(this,Ci,"f").textContent=a:this.shadowRoot===Ri(this,Ci,"f")&&this.textContent&&(Ri(this,Ci,"f").textContent=this.textContent),a===t&&n===e||this.dispatchEvent(new Ni(t,a,e,n)),"relative"===r||"duration"===r?Vi.observe(this):Vi.unobserve(this)}}Ti=new WeakMap,Si=new WeakMap,Ci=new WeakMap,Hi=new WeakMap,ki=new WeakSet,Mi=function(){var t;return(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang")||"default"},xi=function(t){return new Intl.DateTimeFormat(Ri(this,ki,"a",Mi),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Ii=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===Ei.compare(t,this.threshold))return"relative"}return"datetime"},Di=function(t){const e=Ri(this,ki,"a",Mi),n=this.format,i=this.formatStyle,s=this.tense;let o=Fi;"micro"===n?(t=Li(t),o=Bi,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Bi)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},Oi=function(t){const e=new Intl.RelativeTimeFormat(Ri(this,ki,"a",Mi),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=Fi),"past"===n&&-1!==t.sign&&(t=Fi);const[i,s]=function(t,e){const n=Li(t,e);if(n.blank)return[0,"second"];for(const t of yi){if("millisecond"===t)continue;const e=n[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===s&&i<10?e.format(0,"millisecond"===this.precision?"second":this.precision):e.format(i,s)},Pi=function(t){const e=new Intl.DateTimeFormat(Ri(this,ki,"a",Mi),{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 ji="undefined"!=typeof globalThis?globalThis:window;try{ji.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(ji.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function Ki(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const n=t.target;if(!(n instanceof HTMLElement))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const i=Ki(this),s=i.indexOf(i.find((t=>t.matches('[aria-selected="true"]')))),[o,r]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some((e=>t.code===e))){let t=s+1;t>=i.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=s-1;t<0&&(t=i.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(i.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Ki(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)}));for(const t of Ki(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Ki(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],s=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}const Ui="undefined"!=typeof globalThis?globalThis:window;try{Ui.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Ui.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let zi=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function Yi(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,c),s&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),i?e-u:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:n,middle:i,once:s})}g([K],zi.prototype,"fields",void 0),zi=g([U],zi),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:zi}),window.customElements.define("primer-multi-input",zi));var _i,Gi,Xi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ji=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};!function(t){t.GET="GET",t.POST="POST"}(Gi||(Gi={}));const Zi=new WeakMap;class Qi extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class ts extends Qi{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class es extends Qi{constructor(){super("complete")}}class ns extends Qi{constructor(t){super("success"),this.response=t}}class is extends ts{constructor(){super("start","Verifying…")}}class ss extends ts{constructor(t){super("error","Validation failed"),this.response=t}}class os extends Qi{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),_i.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Xi(this,_i,"f")}set onloadend(t){Xi(this,_i,"f")&&this.removeEventListener("loadend",Xi(this,_i,"f")),Ji(this,_i,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=Yi(ls.bind(null,this),300),n={check:e,controller:null};Zi.set(this,n);const i=rs.bind(null,e);t.addEventListener("blur",i),t.addEventListener("input",i),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=Zi.get(this);e&&(Zi.delete(this),t.removeEventListener("input",as),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return Gi[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}get onlyValidateOnBlur(){const t=this.getAttribute("only-validate-on-blur");return"true"===t||""===t}}function rs(t,e){const n=e.currentTarget;if(!(n instanceof HTMLInputElement))return;const i=n.closest("auto-check");i instanceof AutoCheckElement&&("input"===e.type&&i.setAttribute("dirty",""),0!==n.value.length&&("blur"!==e.type&&!i.onlyValidateOnBlur||"blur"===e.type&&i.onlyValidateOnBlur&&!i.validateOnKeystroke&&i.hasAttribute("dirty")||"input"===e.type&&i.onlyValidateOnBlur&&i.validateOnKeystroke)&&(as(e),t()))}function as(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,s=n.csrf,o=n.httpMethod,r=Zi.get(n);if(!i||"POST"===o&&!s||!r)return;const a=new is;e.dispatchEvent(a),n.required&&e.setCustomValidity(a.message)}async function ls(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,s=t.csrf,o=Zi.get(t),r=t.httpMethod;if(!i||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(i,window.location.origin);"POST"===r?(a.append(n,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new os(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const n=await async function(t,e,n){"GET"===n.method&&delete n.body;try{const i=await fetch(e,n);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(n.ok)t.required&&e.setCustomValidity(""),t.onlyValidateOnBlur&&(t.validateOnKeystroke=!1),e.dispatchEvent(new ns(n.clone()));else{t.onlyValidateOnBlur&&(t.validateOnKeystroke=!0);const i=new ss(n.clone());e.dispatchEvent(i),t.required&&e.setCustomValidity(i.message)}o.controller=null,e.dispatchEvent(new es)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new es))}}_i=new WeakMap;const cs="undefined"!=typeof globalThis?globalThis:window;try{cs.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(cs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var us;let ds=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),us.set(this,void 0)}connectedCallback(){b(this,us,"f")?.abort();const{signal:t}=v(this,us,new AbortController,"f");this.addEventListener("auto-check-success",(async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()}),{signal:t}),this.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:t})}disconnectedCallback(){b(this,us,"f")?.abort()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const n=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(n)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};us=new WeakMap,g([j],ds.prototype,"inputElement",void 0),g([j],ds.prototype,"validationElement",void 0),g([j],ds.prototype,"validationMessageElement",void 0),g([j],ds.prototype,"validationSuccessIcon",void 0),g([j],ds.prototype,"validationErrorIcon",void 0),g([j],ds.prototype,"leadingVisual",void 0),g([j],ds.prototype,"leadingSpinner",void 0),ds=g([U],ds);let hs=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var fs,ms,ps,gs,bs,vs,ws,ys,Es,As,Ls,ks,Ts,Ss,Ms,Cs,xs,Is,Ds,Os,Ps;g([j],hs.prototype,"validationElement",void 0),g([j],hs.prototype,"validationMessageElement",void 0),hs=g([U],hs);const Hs=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'],Rs=Hs.map((t=>`:not([hidden]) > ${t}`));let qs=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),fs.add(this),ms.set(this,void 0),ps.set(this,""),gs.set(this,""),bs.set(this,!1),vs.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const n of t){const t=n.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:n?.getAttribute("data-value"),element:n})}return e}connectedCallback(){const{signal:t}=v(this,ms,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.popoverElement?.addEventListener("toggle",this,{signal:t}),b(this,fs,"m",Ds).call(this),b(this,fs,"m",Os).call(this),b(this,fs,"m",ws).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,fs,"m",Is).call(this)&&this.overlay?.update()};v(this,vs,new IntersectionObserver((t=>{for(const n of t){n.target===this.invokerElement&&(n.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}})),"f"),Ne(this,(()=>Boolean(this.invokerElement)),(()=>b(this,vs,"f").observe(this.invokerElement)))}disconnectedCallback(){b(this,ms,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),n=b(this,fs,"m",As).call(this,t);if("toggle"===t.type&&"open"===t.newState&&b(this,fs,"a",Ps)?.focus(),e&&"mousedown"===t.type)return void v(this,bs,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return b(this,fs,"m",Ls).call(this,t),void v(this,bs,!1,"f");if("focusout"===t.type){if(b(this,bs,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,fs,"m",Ms).call(this)}))}const i=t.target.closest(Rs.join(","));if(null!==i&&n){if(b(this,fs,"m",ys).call(this,t))return;const e=i.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e))return void b(this,fs,"m",ks).call(this,t,n)}return b(this,fs,"m",Es).call(this,t)&&(t.preventDefault(),i.click()),void b(this,fs,"m",Ts).call(this,i)}"include-fragment-replaced"===t.type&&b(this,fs,"m",Ss).call(this)}get items(){return Array.from(this.querySelectorAll(Rs.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,fs,"m",Ts).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,fs,"m",Ts).call(this,e)}}};ms=new WeakMap,ps=new WeakMap,gs=new WeakMap,bs=new WeakMap,vs=new WeakMap,fs=new WeakSet,ws=function(){const{signal:t}=b(this,ms,"f");for(const e of this.querySelectorAll(Hs.join(",")))e.addEventListener("click",b(this,fs,"m",ys).bind(this),{signal:t}),e.addEventListener("keydown",b(this,fs,"m",ys).bind(this),{signal:t})},ys=function(t){if(!b(this,fs,"m",As).call(this,t))return!1;const e=t.target.closest(Rs.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Es=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},As=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,fs,"m",Es).call(this,t)},Ls=function(t){t.preventDefault(),t.stopPropagation(),b(this,fs,"m",Is).call(this)?b(this,fs,"m",xs).call(this):b(this,fs,"m",Cs).call(this)},ks=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,fs,"m",Is).call(this)&&b(this,fs,"m",xs).call(this));const t=this.ownerDocument.activeElement,i=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(i||s||o)&&setTimeout((()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()}),0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},Ts=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,fs,"m",Is).call(this)&&b(this,fs,"m",xs).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,fs,"m",Ds).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,fs,"m",Os).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Ss=function(){b(this,fs,"a",Ps)&&b(this,fs,"a",Ps).focus(),b(this,fs,"m",ws).call(this)},Ms=function(){b(this,fs,"m",xs).call(this)},Cs=function(){this.popoverElement?.showPopover()},xs=function(){this.popoverElement?.hidePopover()},Is=function(){return this.popoverElement?.matches(":popover-open")},Ds=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,ps,b(this,ps,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=this.dynamicLabelPrefix,i.textContent=e.textContent||"",t.replaceChildren(n,i)}else t.textContent=b(this,ps,"f")},Os=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,gs,b(this,gs,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=b(this,gs,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},Ps=function(){return this.querySelector(Rs.join(","))},g([j],qs.prototype,"includeFragment",void 0),g([j],qs.prototype,"overlay",void 0),qs=g([U],qs),window.customElements.get("action-menu")||(window.ActionMenuElement=qs,window.customElements.define("action-menu",qs));const Ws="less",Fs="equal",Bs="greater";var Ns,$s,Vs,js,Ks,Us=t=>{throw TypeError(t)},zs=(t,e,n)=>e.has(t)||Us("Cannot "+n),Ys=(t,e,n)=>(zs(t,e,"read from private field"),n?n.call(t):e.get(t)),_s=(t,e,n)=>e.has(t)?Us("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Gs=(t,e,n,i)=>(zs(t,e,"write to private field"),e.set(t,n),n),Xs=(t,e,n)=>(zs(t,e,"access private method"),n);class Js{constructor({compareFn:t}){_s(this,Vs),_s(this,Ns),_s(this,$s),Gs(this,Ns,t),Gs(this,$s,[])}insert(t){Ys(this,$s).push(t),Xs(this,Vs,Ks).call(this)}pop(){const t=Ys(this,$s)[0];return Ys(this,$s)[Ys(this,$s).length-1]&&(Ys(this,$s)[0]=Ys(this,$s)[Ys(this,$s).length-1],Ys(this,$s).pop()),Xs(this,Vs,js).call(this),t}peek(){return Ys(this,$s)[0]}delete(t){const e=Ys(this,$s).indexOf(t);-1!==e&&(ao(Ys(this,$s),e,Ys(this,$s).length-1),Ys(this,$s).pop(),Xs(this,Vs,js).call(this))}clear(){Gs(this,$s,[])}get size(){return Ys(this,$s).length}}function Zs(t){return 2*t+1}function Qs(t){return 2*t+2}function to(t){return Math.floor((t-1)/2)}function eo(t,e){return Zs(t)<e}function no(t,e){return Qs(t)<e}function io(t){return t>0}function so(t,e){return t[Zs(e)]}function oo(t,e){return t[Qs(e)]}function ro(t,e){return t[to(e)]}function ao(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}Ns=new WeakMap,$s=new WeakMap,Vs=new WeakSet,js=function(){let t=0;for(;eo(t,Ys(this,$s).length);){let e=Zs(t);if(no(t,Ys(this,$s).length)&&Ys(this,Ns).call(this,oo(Ys(this,$s),t),so(Ys(this,$s),t))===Ws&&(e=Qs(t)),Ys(this,Ns).call(this,Ys(this,$s)[t],Ys(this,$s)[e])===Ws)break;ao(Ys(this,$s),t,e),t=e}},Ks=function(){let t=Ys(this,$s).length-1;for(;io(t)&&Ys(this,Ns).call(this,Ys(this,$s)[t],ro(Ys(this,$s),t))===Ws;)ao(Ys(this,$s),t,to(t)),t=to(t)};var lo,co,uo,ho,fo=Object.defineProperty,mo=t=>{throw TypeError(t)},po=(t,e,n)=>((t,e,n)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),go=(t,e,n)=>e.has(t)||mo("Cannot "+n),bo=(t,e,n)=>(go(t,e,"read from private field"),n?n.call(t):e.get(t)),vo=(t,e,n)=>e.has(t)?mo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),wo=(t,e,n,i)=>(go(t,e,"write to private field"),e.set(t,n),n);lo=Symbol.toStringTag;class yo{constructor(){po(this,lo,"Deferred"),vo(this,co),vo(this,uo),vo(this,ho),wo(this,co,new Promise(((t,e)=>{wo(this,uo,t),wo(this,ho,e)})))}then(t,e){return Promise.prototype.then.apply(bo(this,co),[t,e])}catch(t){return Promise.prototype.catch.apply(bo(this,co),[t])}finally(t){return Promise.prototype.finally.apply(bo(this,co),[t])}resolve(t){bo(this,uo).call(this,t)}reject(t){bo(this,ho).call(this,t)}getPromise(){return bo(this,co)}}co=new WeakMap,uo=new WeakMap,ho=new WeakMap;var Eo,Ao,Lo,ko,To,So,Mo=t=>{throw TypeError(t)},Co=(t,e,n)=>e.has(t)||Mo("Cannot "+n),xo=(t,e,n)=>(Co(t,e,"read from private field"),n?n.call(t):e.get(t)),Io=(t,e,n)=>e.has(t)?Mo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Do=(t,e,n,i)=>(Co(t,e,"write to private field"),e.set(t,n),n),Oo=(t,e,n)=>(Co(t,e,"access private method"),n);class LiveRegionElement extends HTMLElement{constructor(){if(super(),Io(this,ko),Io(this,Eo),Io(this,Ao),Io(this,Lo),!this.shadowRoot){const t=function(){if(Po)return Po;return Po=document.createElement("template"),Po.innerHTML=Ho,Po}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}Do(this,Eo,!1),Do(this,Lo,null),Do(this,Ao,new Js({compareFn:Ro}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:n,politeness:i="polite"}=e,s=Date.now(),o=new yo,r={deferred:o,politeness:i,contents:t,scheduled:void 0!==n?s+n:s};return xo(this,Ao).insert(r),Oo(this,ko,To).call(this),{...o.getPromise(),cancel:()=>{xo(this,Ao).delete(r),o.resolve()}}}announceFromElement(t,e){const n=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==n)return this.announce(n,e);return{...Promise.resolve(),cancel:qo}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==xo(this,Lo)&&(clearTimeout(xo(this,Lo)),Do(this,Lo,null)),Do(this,Eo,!1),xo(this,Ao).clear()}}Eo=new WeakMap,Ao=new WeakMap,Lo=new WeakMap,ko=new WeakSet,To=function(){if(xo(this,Eo))return;let t=xo(this,Ao).peek();if(!t)return;null!==xo(this,Lo)&&(clearTimeout(xo(this,Lo)),Do(this,Lo,null));const e=Date.now();if(t.scheduled<=e)return t=xo(this,Ao).pop(),t&&Oo(this,ko,So).call(this,t),void Oo(this,ko,To).call(this);const n=t.scheduled-e;Do(this,Lo,window.setTimeout((()=>{Do(this,Lo,null),Oo(this,ko,To).call(this)}),n))},So=function(t){Do(this,Eo,!0);const{contents:e,deferred:n,politeness:i}=t,s=this.shadowRoot?.getElementById(i);if(!s)throw Do(this,Eo,!1),new Error(`Unable to find container for message. Expected a container with id="${i}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==xo(this,Lo)&&clearTimeout(xo(this,Lo)),n.resolve(),this.delay>0?Do(this,Lo,window.setTimeout((()=>{Do(this,Lo,null),Do(this,Eo,!1),Oo(this,ko,To).call(this)}),this.delay)):(Do(this,Lo,null),Do(this,Eo,!1),Oo(this,ko,To).call(this))};let Po=null;const Ho='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function Ro(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?Fs:t.scheduled<e.scheduled?Ws:Bs:"assertive"===t.politeness&&"assertive"!==e.politeness?Ws:"assertive"!==t.politeness&&"assertive"===e.politeness?Bs:Fs}function qo(){}var Wo,Fo,Bo,No,$o,Vo,jo,Ko,Uo,zo,Yo,_o,Go,Xo,Jo,Zo,Qo,tr,er,nr,ir,sr,or,rr,ar,lr,cr,ur,dr,hr,fr,mr,pr,gr,br,vr,wr,yr,Er,Ar;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Lr=['[role="option"]'],kr=Lr.join(","),Tr=Lr.map((t=>`:not([hidden]) > ${t}`)).join(",");var Sr,Mr;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Sr||(Sr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Mr||(Mr={}));const Cr=(()=>{const t=new Set;let e=null;function n(){for(const e of t)e.updateAnchorPosition()}return i=>{window.addEventListener("resize",n),window.addEventListener("scroll",n),e||(e=new ResizeObserver((()=>{for(const e of t)e.updateAnchorPosition()}))),e.observe(i.ownerDocument.documentElement),i.addEventListener("dialog:close",(()=>{i.invokerElement?.setAttribute("aria-expanded","false"),t.delete(i)})),i.addEventListener("dialog:open",(()=>{t.add(i)}))}})();let xr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),Wo.add(this),Fo.set(this,void 0),Bo.set(this,void 0),No.set(this,""),$o.set(this,""),Vo.set(this,new Map),jo.set(this,null),Ko.set(this,null),Uo.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"multiple"===this.selectVariant?"aria-checked":"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,Vo,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=J(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,Bo,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,Wo,"m",br).call(this),b(this,Wo,"m",vr).call(this),b(this,Wo,"m",zo).call(this),Cr(this),Ne(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),Ne(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})})),v(this,Fo,new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,Wo,"a",dr)===Sr.LOCAL&&b(this,Wo,"m",rr).call(this))}})),"f"),Ne(this,(()=>Boolean(this.dialog)),(()=>{b(this,Fo,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,Wo,"a",dr)===Sr.LOCAL&&Ne(this,(()=>this.items.length>0),(()=>{b(this,Wo,"m",rr).call(this),b(this,Wo,"m",vr).call(this)}))}disconnectedCallback(){b(this,Bo,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,Wo,"m",or).call(this,t);if(t.target===this.remoteInput)return void b(this,Wo,"m",ir).call(this,t);const e=this.invokerElement?.contains(t.target),n=this.closeButton?.contains(t.target),i=b(this,Wo,"m",Xo).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return void b(this,Wo,"m",mr).call(this,t);if(n&&i)return;if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Tr)?.parentElement;if(null!=s&&i){if(b(this,Wo,"m",_o).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e)&&this.contains(n))return void b(this,Wo,"m",pr).call(this,t,n)}return b(this,Wo,"m",Go).call(this,t)&&(t.preventDefault(),b(this,Wo,"m",Ar).call(this,s)?.click()),void b(this,Wo,"m",gr).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,Wo,"m",er).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Tr)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(kr)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,Wo,"m",Ar).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,Wo,"m",Ar).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,Wo,"m",Ar).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,Wo,"m",gr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,Wo,"m",gr).call(this,t)}};Fo=new WeakMap,Bo=new WeakMap,No=new WeakMap,$o=new WeakMap,Vo=new WeakMap,jo=new WeakMap,Ko=new WeakMap,Uo=new WeakMap,Wo=new WeakSet,zo=function(){const{signal:t}=b(this,Bo,"f");for(const e of this.querySelectorAll(Lr.join(",")))e.addEventListener("click",b(this,Wo,"m",_o).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Wo,"m",_o).bind(this),{signal:t})},Yo=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const n=b(this,Wo,"m",Ar).call(this,e);n&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?n.setAttribute("tabindex","-1"):(n.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,Wo,"a",wr)&&b(this,Wo,"m",Ar).call(this,b(this,Wo,"a",wr))?.setAttribute("tabindex","0")},_o=function(t){if(!b(this,Wo,"m",Xo).call(this,t))return!1;const e=t.target.closest(Tr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Go=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Xo=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Wo,"m",Go).call(this,t)},Jo=function(){for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");n&&b(this,Vo,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,Wo,"m",vr).call(this)},Zo=function(t){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,Vo,"f").set(n,{value:n,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},Qo=function(t){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,Vo,"f").delete(n)},tr=function(){b(this,Wo,"a",hr)&&(b(this,jo,"f")&&clearTimeout(b(this,jo,"f")),b(this,Ko,"f")&&clearTimeout(b(this,Ko,"f")),v(this,Ko,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,jo,setTimeout((()=>{b(this,Wo,"a",hr)?.showLeadingSpinner()}),1e3),"f"))},er=function(t){switch(t.type){case"include-fragment-replaced":b(this,Wo,"m",rr).call(this);break;case"loadstart":b(this,Wo,"m",nr).call(this,!1);break;case"loadend":b(this,Wo,"a",hr)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,Wo,"m",nr).call(this,!0);const t=this.fragmentErrorElement;if(t&&!t.hasAttribute("hidden"))return void this.liveRegion.announceFromElement(t,{politeness:"assertive"});break}}},nr=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},ir=function(t){switch(t.type){case"remote-input-success":b(this,Wo,"m",cr).call(this),b(this,Wo,"m",rr).call(this),b(this,Wo,"m",Jo).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,Wo,"m",lr).call(this,Mr.BODY):b(this,Wo,"m",lr).call(this,Mr.BANNER);break;case"loadstart":if(!b(this,Wo,"m",fr).call(this)){if(b(this,Wo,"m",cr).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,Wo,"m",tr).call(this)}break;case"loadend":b(this,Wo,"a",hr)?.hideLeadingSpinner(),b(this,Ko,"f")&&clearTimeout(b(this,Ko,"f")),b(this,jo,"f")&&clearTimeout(b(this,jo,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},sr=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},or=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,Wo,"m",Ar).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,Wo,"m",Ar).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const n=b(this,Wo,"m",Ar).call(this,e);n&&n.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],n=b(this,Wo,"m",Ar).call(this,e);n&&n.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,Wo,"m",fr).call(this)||b(this,Wo,"m",tr).call(this),b(this,Wo,"a",dr)===Sr.LOCAL||b(this,Wo,"a",dr)===Sr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,Wo,"m",rr).call(this)}},rr=function(){if(!this.list)return;let t=!1;if(b(this,Wo,"m",fr).call(this)){const e=this.filterInputTextField?.value??"",n=this.filterFn||b(this,Wo,"m",sr);for(const i of this.items)n(i,e)?(b(this,Wo,"m",Er).call(this,i),t=!0):b(this,Wo,"m",yr).call(this,i)}else t=this.items.length>0;b(this,Wo,"m",Yo).call(this),b(this,Wo,"m",ur).call(this);for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");b(this,Uo,"f")?n&&!b(this,Vo,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"false"):n&&!b(this,Vo,"f").has(n)&&this.isItemChecked(t)&&b(this,Wo,"m",Zo).call(this,t)}v(this,Uo,!0,"f"),this.noResults&&(b(this,Wo,"m",ar).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},ar=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},lr=function(t){let e=this.fragmentErrorElement;t===Mr.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},cr=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},ur=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},dr=function(){if(!this.list)return Sr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Sr.LOCAL;case"eventually_local":return Sr.EVENTUALLY_LOCAL;default:return Sr.REMOTE}},hr=function(){return this.filterInputTextField?.closest("primer-text-field")},fr=function(){return b(this,Wo,"a",dr)===Sr.LOCAL||b(this,Wo,"a",dr)===Sr.EVENTUALLY_LOCAL},mr=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},pr=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,i=this.contains(t);(e||i)&&setTimeout((()=>this.invokerElement?.focus()),0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},gr=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{this.open&&this.hide()})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),n=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:n,value:b(this,Wo,"m",Ar).call(this,t)?.getAttribute("data-value")}})))return;const i=b(this,Wo,"m",Ar).call(this,t);if("single"===this.selectVariant){if(i?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,Wo,"m",Ar).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,Vo,"f").clear(),n&&(b(this,Wo,"m",Zo).call(this,t),i?.setAttribute(this.ariaSelectionType,"true")),b(this,Wo,"m",br).call(this)}}else i?.setAttribute(this.ariaSelectionType,`${n}`),n?b(this,Wo,"m",Zo).call(this,t):b(this,Wo,"m",Qo).call(this,t);b(this,Wo,"m",vr).call(this),b(this,Wo,"m",Yo).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:n,value:b(this,Wo,"m",Ar).call(this,t)?.getAttribute("data-value")}}))},br=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,No,b(this,No,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,No,"f");if(e){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=`${this.dynamicLabelPrefix} `,i.textContent=e,t.replaceChildren(n,i),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,No,"f")},vr=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,$o,b(this,$o,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=e.inputName||b(this,$o,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},wr=function(){return this.querySelector(Tr)?.parentElement||null},yr=function(t){t&&t.setAttribute("hidden","hidden")},Er=function(t){t&&t.removeAttribute("hidden")},Ar=function(t){return t.querySelector(".ActionListContent")},g([j],xr.prototype,"includeFragment",void 0),g([j],xr.prototype,"dialog",void 0),g([j],xr.prototype,"filterInputTextField",void 0),g([j],xr.prototype,"remoteInput",void 0),g([j],xr.prototype,"list",void 0),g([j],xr.prototype,"noResults",void 0),g([j],xr.prototype,"fragmentErrorElement",void 0),g([j],xr.prototype,"bannerErrorElement",void 0),g([j],xr.prototype,"bodySpinner",void 0),g([j],xr.prototype,"liveRegion",void 0),xr=g([U],xr),window.customElements.get("select-panel")||(window.SelectPanelElement=xr,window.customElements.define("select-panel",xr))}();
|
1
|
+
!function(){"use strict";var t,e,n,i,s,o,r,a,l=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},c=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const u=new WeakMap;let d=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),n.set(this,new IntersectionObserver((e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,n,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",i).call(this)}}),{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){d=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,n){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",i).call(this):"loading"===e&&this.isConnected&&"eager"!==n&&"eager"===this.loading&&l(this,t,"m",i).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",i).call(this),"lazy"===this.loading&&l(this,n,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){u.delete(this),l(this,t,"m",i).call(this)}}e=new WeakMap,n=new WeakMap,t=new WeakSet,i=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,n,"f").unobserve(this);try{const n=await l(this,t,"m",s).call(this);if(n instanceof Error)throw n;const i=n,o=document.createElement("template");o.innerHTML=i;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,n=u.get(this);if(n&&n.src===e)return n.data;{let n;return n=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),u.set(this,{src:e,data:n}),n}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t){await new Promise((t=>setTimeout(t,0)));for(const e of t)this.dispatchEvent(new Event(e))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const n=await this.fetch(this.request());if(200!==n.status)throw new Error(`Failed to load resource: the server responded with a status of ${n.status}`);const i=n.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find((t=>t.match(/^\s*\*\/\*/)))||i&&i.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${i}`);const s=await n.text();let o=s;if(d){o=(await d).createHTML(s,n)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"]),e}var e};const h="undefined"!=typeof globalThis?globalThis:window;try{h.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(h.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p((e=>t(e))),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=f.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function m(t,e,n){const i=t.input;if(!i)return;const s=f.get(t);if(!s)return;const o=i.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let u;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let d="";try{u=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),i}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),d=await u.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}u&&u.ok?(a.innerHTML=d,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:n?n.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(n){clearTimeout(e),e=setTimeout((()=>{clearTimeout(e),t(n)}),300)}}function g(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}function b(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function v(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){L(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const n=new MutationObserver((t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)S(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&L(t)}));n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,E.delete(t),n.disconnect()}};return E.set(t,i),i}function L(t){for(const e of t.querySelectorAll("[data-action]"))S(e);t instanceof Element&&t.hasAttribute("data-action")&&S(t)}function k(t){const e=t.currentTarget;for(const n of T(e))if(t.type===n.type){const i=e.closest(n.tag);w.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(n.tag)){const e=s.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function S(t){for(const e of T(t))t.addEventListener(e.type,k)}const C=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),M=(t,e="property")=>{const n=C(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const x="attr";function I(t,e){V(t,x).add(e)}const D=new WeakSet;function O(t,e){if(D.has(t))return;D.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=V(n,x));for(const n of e){const e=t[n],s=M(`${i}${n}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,n,o),n in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const P=new Map,H=new Promise((t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",(()=>t()),{once:!0})})),R=new Promise((t=>{const e=new AbortController;e.signal.addEventListener("abort",(()=>t()));const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)})),q={ready:()=>H,firstInteraction:()=>R,visible:t=>new Promise((e=>{const n=new IntersectionObserver((t=>{for(const i of t)if(i.isIntersecting)return e(),void n.disconnect()}),{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))n.observe(e)}))},W=new WeakMap;function F(t){cancelAnimationFrame(W.get(t)||0),W.set(t,requestAnimationFrame((()=>{for(const e of P.keys()){const n=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||n){const i=n?.getAttribute("data-load-on")||"ready",s=i in q?q[i]:q.ready;for(const t of P.get(e)||[])s(e).then(t);P.delete(e),W.delete(t)}}})))}let B;const N=Symbol.for("catalyst");class ${constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>M(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...V(t.prototype,x)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=C(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),O(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),L(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){B||(B=new MutationObserver((t=>{if(P.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&F(t)}))),F(t),B.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,s){O(t),"data-catalyst"!==e&&s&&s.call(t,e,n,i)}}function V(t,e){if(!Object.prototype.hasOwnProperty.call(t,N)){const e=t[N],n=t[N]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[N];return n.has(e)||n.set(e,new Set),n.get(e)}function U(t,e){V(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function j(t,e){V(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)||i.push(s);for(const s of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)===t&&i.push(s);return i}(this,e)}})}function K(t){new $(t)}var z;class Y{constructor(t){this.resizeObserver=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}})),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const n=t.querySelector(".ActionListItem-truncationTooltip");if(!n)continue;const i=e.scrollWidth>e.clientWidth;n.style.display=i?"":"none"}}}let _=class ActionListElement extends HTMLElement{constructor(){super(...arguments),z.set(this,void 0)}connectedCallback(){v(this,z,new Y(this),"f")}disconnectedCallback(){b(this,z,"f").unobserve(this)}};z=new WeakMap,_=g([K],_);const G={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},X={start:["end","center"],end:["start","center"],center:["end","start"]};function J(t,e,n={}){const i=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e instanceof Element;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),s=getComputedStyle(n),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map((t=>parseInt(t,10)||0));return{top:i.top+o,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-o-l,n===document.body?window.innerHeight:-1/0)}}(i),o=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map((t=>parseInt(t,10)||0));return function(t,e,n,i,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let u=Q(n,i,s,o,a,l),d=s,h=o;if(u.top-=e.top,u.left-=e.left,!r){const r=G[s];let f=0;if(r){let t=s;for(;f<r.length&&tt(t,u,c,n);){const s=r[f++];t=s,u=Q(n,i,s,o,a,l),u.top-=e.top,u.left-=e.left,d=s}}const m=X[o];let p=0;if(m){let t=o;for(;p<m.length&&et(t,u,c,n);){const s=m[p++];t=s,u=Q(n,i,d,s,a,l),u.top-=e.top,u.left-=e.left,h=s}}u.top<c.top&&(u.top=c.top),u.left<c.left&&(u.left=c.left),u.left+n.width>t.width+c.left&&(u.left=t.width+c.left-n.width),r&&f<r.length&&u.top+n.height>t.height+c.top&&(u.top=Math.max(t.height+c.top-n.height,0))}return Object.assign(Object.assign({},u),{anchorSide:d,anchorAlign:h})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,s,o;const r=null!==(e=t.side)&&void 0!==e?e:Z.side,a=null!==(n=t.align)&&void 0!==n?n:Z.align;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:Z.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?Z.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:Z.allowOutOfBounds}}(n))}const Z={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function Q(t,e,n,i,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-s-t.height:"outside-bottom"===n?l=a+s:"outside-left"===n?c=e.left-s-t.width:"outside-right"===n&&(c=r+s),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===n?l=e.top+s:"inside-bottom"===n?l=a-s-t.height:"inside-left"===n?c=e.left+s:"inside-right"===n?c=r-s-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function tt(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function et(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function*nt(t,e={}){var n,i;const s=null!==(n=e.strict)&&void 0!==n&&n,o=null!==(i=e.onlyTabbable)&&void 0!==i&&i?ot:st,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function it(t,e=!1){return nt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function st(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(n||i||s||o)return!1;if(e){const e=getComputedStyle(t),n=0===t.offsetWidth||0===t.offsetHeight,i=["hidden","collapse"].includes(e.visibility),s="none"===e.display||!t.offsetParent,o=0===t.getClientRects().length;if(n||i||o||s)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function ot(t,e=!1){return st(t,e)&&"-1"!==t.getAttribute("tabindex")}let rt=!1;function at(){}try{const t=Object.create({},{signal:{get(){rt=!0}}});window.addEventListener("test",at,t),window.removeEventListener("test",at,t)}catch(t){}function lt(){rt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",(()=>{this.removeEventListener(e,n,i)})),t.call(this,e,n,i)}}(),rt=!0)}lt();const ct=[];let ut,dt;function ht(t,e,n){const i=new AbortController,s=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=it(t,!0);null==e||e.focus()};const r=document.createElement("span");r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=it(t);null==e||e.focus()},t.prepend(o),t.append(r);const a=function(t,e){const n=new MutationObserver((n=>{for(const i of n)if("childList"===i.type&&i.addedNodes.length){if(Array.from(i.addedNodes).filter((t=>t instanceof HTMLElement&&t.classList.contains("sentinel")&&"SPAN"===t.tagName)).length)return;const n=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==n?void 0:n.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}}));return n.observe(t,{childList:!0}),n}(t,[o,r]);let l;function c(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(l=n);if(l&&ot(l)&&t.contains(l))return void l.focus();if(e&&t.contains(e))return void e.focus();{const e=it(t);return void(null==e||e.focus())}}}const u=function(t){const e=new AbortController;return t.addEventListener("abort",(()=>{e.abort()})),e}(s);if(ut){const t=ut;ut.container.setAttribute("data-focus-trap","suspended"),ut.controller.abort(),ct.push(t)}u.signal.addEventListener("abort",(()=>{ut=void 0})),s.addEventListener("abort",(()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=ct.findIndex((e=>e.container===t));n>=0&&ct.splice(n,1),a.disconnect(),function(){const t=ct.pop();t&&ht(t.container,t.initialFocus,t.originalSignal)}()})),document.addEventListener("focus",(t=>{c(t.target)}),{signal:u.signal,capture:!0}),c(document.activeElement),ut={container:t,controller:u,initialFocus:e,originalSignal:s};const d=ct.findIndex((e=>e.container===t));if(d>=0&&ct.splice(d,1),!n)return i}function ft(){return void 0===dt&&(dt=/^mac/i.test(window.navigator.platform)),dt}let mt=1e4;var pt;lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(pt||(pt={}));const gt={ArrowLeft:pt.ArrowHorizontal,ArrowDown:pt.ArrowVertical,ArrowUp:pt.ArrowVertical,ArrowRight:pt.ArrowHorizontal,h:pt.HL,j:pt.JK,k:pt.JK,l:pt.HL,a:pt.AD,s:pt.WS,w:pt.WS,d:pt.AD,Tab:pt.Tab,Home:pt.HomeAndEnd,End:pt.HomeAndEnd,PageUp:pt.PageUpDown,PageDown:pt.PageUpDown,Backspace:pt.Backspace},bt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function vt(t){const e=bt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const n=ft();if(n&&t.metaKey||!n&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}const wt="data-is-active-descendant",yt="data-has-active-descendant";function Et(t,e){var n,i,s,o,r;const a=[],l=new WeakMap,c=null!==(n=null==e?void 0:e.bindKeys)&&void 0!==n?n:((null==e?void 0:e.getNextFocusable)?pt.ArrowAll:pt.ArrowVertical)|pt.HomeAndEnd,u=null!==(i=null==e?void 0:e.focusOutBehavior)&&void 0!==i?i:"stop",d=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",h=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(o=null==e?void 0:e.preventScroll)&&void 0!==o&&o;function g(){return a[0]}function b(t,e=!1){const n=m;m=t,h?t&&document.activeElement===h?v(n,t,e):w():(n&&n!==t&&l.has(n)&&n.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,n,i=!1){n.id||n.setAttribute("id","__primer_id_"+mt++),e&&e!==n&&e.removeAttribute(wt),h&&(i||h.getAttribute("aria-activedescendant")!==n.id)&&(h.setAttribute("aria-activedescendant",n.id),t.setAttribute(yt,n.id),n.setAttribute(wt,i?"activated-directly":"activated-indirectly"),null==f||f(n,e,i))}function w(e=m){"first"===d&&(m=void 0),null==h||h.removeAttribute("aria-activedescendant"),t.removeAttribute(yt),null==e||e.removeAttribute(wt);for(const e of t.querySelectorAll(`[${wt}]`))null==e||e.removeAttribute(wt);null==f||f(void 0,e,!1)}function y(...t){const n=t.filter((t=>{var n,i;return null===(i=null===(n=null==e?void 0:e.focusableElementFilter)||void 0===n?void 0:n.call(e,t))||void 0===i||i}));if(0!==n.length){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let n=0,i=a.length-1;for(;n<=i;){const t=Math.floor((n+i)/2);E(e,a[t])?i=t-1:n=t+1}return n}(n),0,...n);for(const t of n)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const n=l.get(e);if(void 0!==n&&(null===n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),l.delete(e)),e===m){b(g())}}}const L={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};y(...nt(t,L));b("function"==typeof d?d(document.body):g());new MutationObserver((t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&A(...nt(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&A(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&y(...nt(t,L));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&y(e.target)}})).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const k=new AbortController,T=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:k.signal;let S;T.addEventListener("abort",(()=>{A(...a)})),t.addEventListener("mousedown",(t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(S=a.indexOf(t.target))}),{signal:T}),h?(t.addEventListener("focusin",(t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(h.focus({preventScroll:p}),b(t.target))}),{signal:T}),t.addEventListener("mousemove",(({target:t})=>{if(!(t instanceof Node))return;const e=a.find((e=>e.contains(t)));e&&b(e)}),{signal:T,capture:!0}),h.addEventListener("focusin",(()=>{m?v(void 0,m):b(g())}),{signal:T}),h.addEventListener("focusout",(()=>{w()}),{signal:T})):t.addEventListener("focusin",(e=>{if(e.target instanceof HTMLElement)if(void 0!==S)S>=0&&a[S]!==m&&b(a[S]),S=void 0;else if("previous"===d)b(e.target);else if("closest"===d||"first"===d){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===M?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof d)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=d(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);M=void 0}),{signal:T});const C=null!=h?h:t;let M;return"closest"===d&&document.addEventListener("keydown",(t=>{"Tab"===t.key&&(M=vt(t))}),{signal:T,capture:!0}),C.addEventListener("keydown",(n=>{var i;if(n.key in bt){const s=gt[n.key];if(!n.defaultPrevented&&(s&c)>0&&!function(t,e){const n=t.key,i=[...n].length,s=e instanceof HTMLInputElement&&"text"===e.type||e instanceof HTMLTextAreaElement;if(s&&(1===i||"Home"===n||"End"===n))return!0;if(e instanceof HTMLSelectElement){if(1===i)return!0;if("ArrowDown"===n&&ft()&&!t.metaKey)return!0;if("ArrowDown"===n&&!ft()&&t.altKey)return!0}if(e instanceof HTMLTextAreaElement&&("PageUp"===n||"PageDown"===n))return!0;if(s){const t=e,i=0===t.selectionStart&&0===t.selectionEnd,s=t.selectionStart===t.value.length&&t.selectionEnd===t.value.length;if("ArrowLeft"===n&&!i)return!0;if("ArrowRight"===n&&!s)return!0;if(t instanceof HTMLTextAreaElement){if("ArrowUp"===n&&!i)return!0;if("ArrowDown"===n&&!s)return!0}}return!1}(n,document.activeElement)){const s=vt(n);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(i=document.activeElement)&&void 0!==i?i:void 0,n)),!o){const e=function(){if(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let i=e;"previous"===s?i-=1:"start"===s?i=0:"next"===s?i+=1:i=a.length-1,i<0&&(i="wrap"===u&&"Tab"!==n.key?a.length-1:0),i>=a.length&&(i="wrap"===u&&"Tab"!==n.key?0:a.length-1),e!==i&&(o=a[i])}h?b(o||m,!0):o&&(M=s,o.focus({preventScroll:p})),("Tab"!==n.key||o)&&n.preventDefault()}}}),{signal:T}),k}var At,Lt,kt,Tt,St,Ct,Mt;const xt=new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Ot&&t.update()}})),It=new ResizeObserver((t=>{for(const e of t){const t=e.target;t instanceof Ot&&t.update()}}));var Dt;!function(t){t[t.Item=0]="Item",t[t.Divider=1]="Divider"}(Dt||(Dt={}));let Ot=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),At.add(this),Lt.set(this,null)}connectedCallback(){It.observe(this),xt.observe(this),requestAnimationFrame((()=>{this.style.overflow="visible",this.update()}))}disconnectedCallback(){It.unobserve(this),xt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,n=e?.getAttribute("data-for");n&&document.getElementById(n)?.click()}update(){const t=b(this,At,"a",kt);if(!t)return;const e=t.getBoundingClientRect().top;let n=null;b(this,At,"m",Mt).call(this,((t,i,s)=>{const o=t.getBoundingClientRect().top;return s===Dt.Item&&(o>e?(b(this,At,"m",St).call(this,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),n===Dt.Divider&&b(this,At,"m",St).call(this,i-1)):(b(this,At,"m",Tt).call(this,i),i===this.items.length-1&&(this.moreMenu.hidden=!0),n===Dt.Divider&&b(this,At,"m",Tt).call(this,i-1))),n=s,!0})),b(this,Lt,"f")&&b(this,Lt,"f").abort(),v(this,Lt,Et(this,{bindKeys:pt.ArrowHorizontal|pt.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),n=e>-1&&"visible"===this.items[e].style.visibility,i=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return n||i}}),"f")}};Lt=new WeakMap,At=new WeakSet,kt=function(){let t=null;return b(this,At,"m",Mt).call(this,((e,n,i)=>i!==Dt.Item||(t=e,!1))),t},Tt=function(t){const e=this.items[t],n=b(this,At,"a",Ct)[t];e&&n&&(e.style.setProperty("visibility","visible"),n.hidden=!0)},St=function(t){const e=this.items[t],n=b(this,At,"a",Ct)[t];e&&n&&(e.style.setProperty("visibility","hidden"),n.hidden=!1)},Ct=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},Mt=function(t){for(let e=0;e<this.items.length;e++){const n=this.items[e],i=n.classList.contains("ActionBar-divider")?Dt.Divider:Dt.Item;if(!t(n,e,i))break}},g([j],Ot.prototype,"items",void 0),g([U],Ot.prototype,"itemContainer",void 0),g([U],Ot.prototype,"moreMenu",void 0),Ot=g([K],Ot),window.ActionBarElement=Ot;class DetailsMenuElement 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 n=[Rt(t,"compositionstart",(t=>Kt(this,t))),Rt(t,"compositionend",(t=>Kt(this,t))),Rt(t,"click",(e=>$t(t,e))),Rt(t,"change",(e=>$t(t,e))),Rt(t,"keydown",(e=>function(t,e,n){if(!(n instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const i=Pt.get(e);if(!i||i.isComposing)return;const s=n.target instanceof Element&&"SUMMARY"===n.target.tagName;switch(n.key){case"Escape":t.hasAttribute("open")&&(jt(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case"n":if(Nt&&n.ctrlKey){const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"p":if(Nt&&n.ctrlKey){const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&Ut(e)&&e.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),e.click())}}}(t,this,e))),Rt(t,"toggle",(()=>qt(t,this)),{once:!0}),Rt(t,"toggle",(()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(t))),this.preload?Rt(t,"mouseover",(()=>qt(t,this)),{once:!0}):Ht,...Wt(t)];Pt.set(this,{subscriptions:n,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Pt.get(this);if(t){Pt.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Pt=new WeakMap,Ht={unsubscribe(){}};function Rt(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function qt(t,e){const n=e.getAttribute("src");if(!n)return;const i=Pt.get(e);if(!i)return;if(i.loaded)return;i.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",(()=>Ft(t))),s.setAttribute("src",n))}function Wt(t){let e=!1;return[Rt(t,"mousedown",(()=>e=!0)),Rt(t,"keydown",(()=>e=!1)),Rt(t,"toggle",(()=>{t.hasAttribute("open")&&(Ft(t)||e||function(t){const e=document.activeElement;if(e&&Ut(e)&&t.contains(e))return;const n=Bt(t,!0);n&&n.focus()}(t))}))]}function Ft(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Bt(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,s=i instanceof HTMLElement?n.indexOf(i):-1,o=e?n[s+1]:n[s-1],r=e?n[0]:n[n.length-1];return o||r}const Nt=navigator.userAgent.match(/Macintosh/);function $t(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||Vt(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Vt(e,t)}}function Vt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&jt(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function Ut(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function jt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function Kt(t,e){const n=Pt.get(t);n&&(n.isComposing="compositionstart"===e.type)}var zt,Yt;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const _t=(()=>{const t=new Set;let e=null,n=null;function i(){for(const e of t)e.update()}return s=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new IntersectionObserver((e=>{for(const n of e){const e=n.target;n.isIntersecting?(e.update(),t.add(e)):t.delete(e)}}))),n||(n=new ResizeObserver((()=>{for(const e of t)e.update()}))),n.observe(s.ownerDocument.documentElement),e.observe(s)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),zt.set(this,null),Yt.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,zt,"f"))return b(this,zt,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,zt,t,"f"),b(this,zt,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",(()=>this.update())),_t(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,Yt,"f")),v(this,Yt,requestAnimationFrame((()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:n}=J(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"})),"f"))}}var Gt,Xt,Jt;function Zt(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){const e=document.getElementById(i);if(e instanceof HTMLDialogElement){e.showModal(),t.preventDefault();let i=n,s=!1;for(;i;)i=i.parentElement?.closest("[popover]:not(:popover-open)"),i&&"auto"===i.popover&&(i.classList.add("dialog-inside-popover-fix"),i.popover="manual",i.showPopover(),s=!0);s&&(e.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",(()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())}),{once:!0}))}}if(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i){const t=document.getElementById(i);t instanceof HTMLDialogElement&&t.open&&t.close()}}zt=new WeakMap,Yt=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),Gt.add(this),Xt.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,Xt,new AbortController,"f");document.addEventListener("click",Zt,!0),document.addEventListener("click",this,{signal:t}),this.ownerDocument.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-this.ownerDocument.body.clientWidth+"px"),new MutationObserver((t=>{for(const e of t)e.target===this.dialog&&b(this,Gt,"m",Jt).call(this)})).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Gt,"m",Jt).call(this)}disconnectedCallback(){b(this,Xt,"f")?.abort()}handleEvent(t){const e=t.target,n=this.dialog;if(e!==n||!n?.open)return;const i=n.getBoundingClientRect();i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width||n.close()}}Xt=new WeakMap,Gt=new WeakSet,Jt=function(){this.dialog&&this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",(t=>t.stopImmediatePropagation()),{once:!0}),this.dialog.close(),this.dialog.showModal())},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var Qt=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...i}={}){super(t,i),this.oldState=String(e||""),this.newState=String(n||"")}},te=new WeakMap;function ee(t,e,n){te.set(t,setTimeout((()=>{te.has(t)&&t.dispatchEvent(new Qt("toggle",{cancelable:!1,oldState:e,newState:n}))}),0))}var ne=globalThis.ShadowRoot||function(){},ie=globalThis.HTMLDialogElement||function(){},se=new WeakMap,oe=new WeakMap,re=new WeakMap;function ae(t){return re.get(t)||"hidden"}var le=new WeakMap;function ce(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===ae(t))&&(!(!e&&"hidden"!==ae(t))&&(!(t instanceof ie&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function ue(t){return t?Array.from(oe.get(t.ownerDocument)||[]).indexOf(t)+1:0}function de(t){const e=me(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||fe(t))instanceof ne&&(t=t.host),t instanceof Document)return}}(t);return ue(e)>ue(n)?e:n}function he(t){const e=oe.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function fe(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?fe(t.parentNode):t}function me(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===re.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||fe(t))instanceof ne&&(t=t.host),t instanceof Document)return}}function pe(t){return!(t.hidden||t instanceof ne)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function ge(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const i=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=i.currentNode;for(;s;){if(pe(s))return s;s=i.nextNode()}})(t)?.focus()}var be=new WeakMap;function ve(t){if(!ce(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new Qt("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!ce(t,!1))return;let n=!1;if("auto"===t.popover){const n=t.getAttribute("popover");if(Ee(function(t){const e=new Map;let n=0;for(const i of oe.get(t.ownerDocument)||[])e.set(i,n),n+=1;e.set(t,n),n+=1;let i=null;return function(t){const n=me(t);if(null===n)return null;const s=e.get(n);(null===i||e.get(i)<s)&&(i=n)}(t.parentElement||fe(t)),i}(t)||e,!1,!0),n!==t.getAttribute("popover")||!ce(t,!1))return}he(e)||(n=!0),be.delete(t);const i=e.activeElement;t.classList.add(":popover-open"),re.set(t,"showing"),se.has(e)||se.set(e,new Set),se.get(e).add(t),ge(t),"auto"===t.popover&&(oe.has(e)||oe.set(e,new Set),oe.get(e).add(t),Te(le.get(t),!0)),n&&i&&"auto"===t.popover&&be.set(t,i),ee(t,"closed","open")}function we(t,e=!1,n=!1){if(!ce(t,!0))return;const i=t.ownerDocument;if("auto"===t.popover&&(Ee(t,e,n),!ce(t,!0)))return;if(Te(le.get(t),!1),le.delete(t),n&&(t.dispatchEvent(new Qt("beforetoggle",{oldState:"open",newState:"closed"})),!ce(t,!0)))return;se.get(i)?.delete(t),oe.get(i)?.delete(t),t.classList.remove(":popover-open"),re.set(t,"hidden"),n&&ee(t,"open","closed");const s=be.get(t);s&&(be.delete(t),e&&s.focus())}function ye(t,e=!1,n=!1){let i=he(t);for(;i;)we(i,e,n),i=he(t)}function Ee(t,e,n){const i=t.ownerDocument||t;if(t instanceof Document)return ye(i,e,n);let s=null,o=!1;for(const e of oe.get(i)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return ye(i,e,n);for(;s&&"showing"===ae(s)&&oe.get(i)?.size;)we(s,e,n)}var Ae=new WeakMap;function Le(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!he(n))return;const i=de(e);if(i&&"pointerdown"===t.type)Ae.set(n,i);else if("pointerup"===t.type){const t=Ae.get(n)===i;Ae.delete(n),t&&Ee(i||n,!1,!0)}}var ke=new WeakMap;function Te(t,e=!1){if(!t)return;ke.has(t)||ke.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=ke.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var Se=globalThis.ShadowRoot||function(){};function Ce(t,e,n){const i=t[e];Object.defineProperty(t,e,{value(t){return i.call(this,n(t))}})}var Me=/(^|[^\\]):popover-open\b/g;function xe(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var Ie,De,Oe,Pe,He=null;function Re(t){const e=xe();if(null===He)try{(He=new CSSStyleSheet).replaceSync(e)}catch{He=!1}if(!1===He){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[He,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(Me,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||Qt,Ce(Document.prototype,"querySelector",t),Ce(Document.prototype,"querySelectorAll",t),Ce(Element.prototype,"querySelector",t),Ce(Element.prototype,"querySelectorAll",t),Ce(Element.prototype,"matches",t),Ce(Element.prototype,"closest",t),Ce(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){ve(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){we(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===re.get(this)&&void 0===t||!1===t?we(this,!0,!0):void 0!==t&&!0!==t||ve(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return Re(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&Re(t.shadowRoot),t}}});const i=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),i.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),i.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=i.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return i.delete(this),null;const e=fe(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof Se)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const i=fe(n);if(!(i instanceof Se||i instanceof Document))return;const s=e.find((t=>t.matches?.("[popovertargetaction],[popovertarget]")));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=ae(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?we(e,!0,!0):ce(e,!1)&&(le.set(e,t),ve(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||Ee(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",Le),t.addEventListener("pointerup",Le)})(document),Re(document)}();const qe=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map((t=>`:not([hidden]) > ${t}`)).join(", "),We=t=>t.textContent?.trim()[0].toLowerCase(),Fe=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Ie.add(this),De.set(this,null),Oe.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,Oe,new AbortController,"f");const{signal:t}=b(this,Oe,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,Oe,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:n}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(qe)){b(this,De,"f")?.abort();const{signal:e}=v(this,De,new AbortController,"f");for(const n of b(this,Ie,"a",Pe)){n.setAttribute("tabindex",n===t.target?"0":"-1");const i=t.target.closest("[popover]");n===t.target&&"auto"===i?.popover&&i.closest("focus-group")===this&&i.addEventListener("toggle",(t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,De,"f")?.abort(),n.setAttribute("tabindex","-1"),i.id)){const t=this.querySelector(`[popovertarget="${i.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Ie,"a",Pe)[0]?.setAttribute("tabindex","0")}}),{signal:e})}}}else if(t instanceof KeyboardEvent){const i=Array.from(b(this,Ie,"a",Pe));let s=i.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=i.length-1,t.preventDefault();else{if(!this.mnemonics||!Fe.test(o))return;{const e=o.toLowerCase(),r=s>0&&We(t.target)===e?s:0;s=i.findIndex(((t,n)=>n>r&&We(t)===e)),s<0&&!n&&(s=i.findIndex((t=>We(t)===e)))}}n&&s<0&&(s=0),!n&&s>=i.length&&(s=0);const r=i.at(Math.min(s,i.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}De=new WeakMap,Oe=new WeakMap,Ie=new WeakSet,Pe=function(){return this.querySelectorAll(qe)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let Be=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver((t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth})),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],Be.prototype,"hasOverflow",void 0),g([I],Be.prototype,"labelledBy",void 0),Be=g([K],Be),window.ScrollableRegionElement=Be;const Ne=(t,e,n)=>{if(e())n();else{const i=new MutationObserver((()=>{e()&&(n(),i.disconnect())}));i.observe(t,{childList:!0,subtree:!0})}};var $e,Ve,Ue,je;function Ke(t){document.activeElement!==t&&t?.focus()}const ze=[];function Ye(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,e.show(),void t.preventDefault()}if(ze.length&&(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i)){const t=document.getElementById(i);if(t instanceof ModalDialogElement){const e=ze.findIndex((t=>t.id===i));ze.splice(e,1),t.close(n.hasAttribute("data-submit-dialog-id"))}}}function _e(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ye(t)}function Ge(t){const e=t.target;if(e?.closest("button"))return;const n=ze[ze.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",(t=>{t.target===e&&(ze.pop(),n.close())}),{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),$e.add(this),Ve.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,$e,"a",Ue)?.classList.remove("Overlay--hidden"),b(this,Ve,"f").signal.aborted&&v(this,Ve,new AbortController,"f"),ht(this,this.querySelector("[autofocus]"),b(this,Ve,"f").signal),ze.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,$e,"a",Ue)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,Ve,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");Ke(t?it(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ye),document.addEventListener("keydown",_e),document.addEventListener("mousedown",Ge),this.addEventListener("keydown",(t=>b(this,$e,"m",je).call(this,t)))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var Xe,Je,Ze,Qe,tn,en,nn,sn;Ve=new WeakMap,$e=new WeakSet,Ue=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},je=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let on=class NavListElement extends HTMLElement{constructor(){super(...arguments),Xe.add(this),Je.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Je,new Y(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Je,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,Xe,"m",Ze).call(this,t);return!!e&&(b(this,Xe,"m",en).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,Xe,"m",Qe).call(this,t);return!!e&&(b(this,Xe,"m",en).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,Xe,"m",tn).call(this);return!!t&&(b(this,Xe,"m",en).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let n=e.closest("button");if(!n){const t=e.getAttribute("aria-labelledby");if(!t)return;n=document.getElementById(t)}this.itemIsExpanded(n)&&"Escape"===t.key&&this.collapseItem(n),t.stopPropagation()}};var rn,an,ln;Je=new WeakMap,Xe=new WeakSet,Ze=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},Qe=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},tn=function(){return b(this,Xe,"m",Qe).call(this,window.location.pathname)},en=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,Xe,"m",nn).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const n=b(this,Xe,"m",sn).call(this,t);n&&(this.expandItem(n),n.classList.add("ActionListContent--hasActiveSubItem"))},nn=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,Xe,"m",sn).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},sn=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([j],on.prototype,"items",void 0),g([U],on.prototype,"topLevelList",void 0),on=g([K],on);let cn=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),rn.add(this),ln.set(this,new Y(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const n=await fetch(t);if(!n.ok)return;e=await n.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const n=b(this,rn,"m",an).call(this,document,e);n?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const i=t.target.closest("button").getAttribute("data-list-id");document.getElementById(i).append(n),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var un,dn;ln=new WeakMap,rn=new WeakSet,an=function(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)},g([U],cn.prototype,"showMoreItem",void 0),g([j],cn.prototype,"focusMarkers",void 0),cn=g([K],cn),window.NavListGroupElement=cn;let hn=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),un.add(this)}connectedCallback(){b(this,un,"m",dn).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true")}};un=new WeakSet,dn=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([j],hn.prototype,"items",void 0),hn=g([K],hn),window.customElements.get("segmented-control")||(window.SegmentedControlElement=hn,window.customElements.define("segmented-control",hn));let fn=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const n={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(n.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:n,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const i=e.headers.get("Content-Type");window.Turbo&&this.turbo&&i?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var mn,pn,gn,bn,vn,wn,yn,En,An,Ln;g([U],fn.prototype,"switch",void 0),g([U],fn.prototype,"loadingSpinner",void 0),g([U],fn.prototype,"errorIcon",void 0),g([I],fn.prototype,"turbo",void 0),fn=g([K],fn),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=fn,window.customElements.define("toggle-switch",fn));const kn=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),Tn="sr-only",Sn=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function Cn(t){for(const e of Dn)e!==t&&(kn(e)?e.hidePopover():Dn.delete(e))}function Mn(){Cn()}function xn(t){setTimeout((()=>{for(const e of Dn)kn(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()}),0)}const In=new Set,Dn=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),mn.add(this),pn.set(this,void 0),gn.set(this,"center"),bn.set(this,"outside-bottom"),vn.set(this,!1),wn.set(this,"mouse")}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: var(--overlay-width-small);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,wn,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&kn(this)?this.hidePopover():t||kn(this)||this.showPopover()}get hiddenFromView(){return!kn(this)}connectedCallback(){if(In.add(this),b(this,mn,"m",En).call(this),b(this,mn,"m",An).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}if(b(this,mn,"m",yn).call(this,!1),v(this,vn,!0,"f"),!this.control)return;this.setAttribute("role","tooltip"),b(this,pn,"f")?.abort(),v(this,pn,new AbortController,"f");const{signal:t}=b(this,pn,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Mn),this.ownerDocument.addEventListener("focusin",xn),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})}disconnectedCallback(){In.delete(this),Dn.delete(this),b(this,pn,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=kn(this),n="mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")),i="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this,a=i||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!n||kn(this)?e&&a&&kn(this)&&this.hidePopover():(v(this,wn,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,mn,"m",yn).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("id"===t||"data-type"===t?b(this,mn,"m",En).call(this):"data-direction"===t&&b(this,mn,"m",An).call(this))}}var On,Pn;pn=new WeakMap,gn=new WeakMap,bn=new WeakMap,vn=new WeakMap,wn=new WeakMap,mn=new WeakSet,yn=function(t){t?(Dn.add(this),this.classList.remove(Tn),Cn(this),b(this,mn,"m",Ln).call(this)):(Dn.delete(this),this.classList.remove(...Sn),this.classList.add(Tn))},En=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},An=function(){this.classList.remove(...Sn);const t=this.direction;"n"===t?(v(this,gn,"center","f"),v(this,bn,"outside-top","f")):"ne"===t?(v(this,gn,"end","f"),v(this,bn,"outside-top","f")):"e"===t?(v(this,gn,"center","f"),v(this,bn,"outside-right","f")):"se"===t?(v(this,gn,"end","f"),v(this,bn,"outside-bottom","f")):"s"===t?(v(this,gn,"center","f"),v(this,bn,"outside-bottom","f")):"sw"===t?(v(this,gn,"start","f"),v(this,bn,"outside-bottom","f")):"w"===t?(v(this,gn,"center","f"),v(this,bn,"outside-left","f")):"nw"===t&&(v(this,gn,"start","f"),v(this,bn,"outside-top","f"))},Ln=function(){if(!this.control)return;if(!b(this,vn,"f")||!kn(this))return;const t=J(this,this.control,{side:b(this,bn,"f"),align:b(this,gn,"f"),anchorOffset:0}),e=t.anchorSide,n=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let Hn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),On.add(this)}dismiss(){if("remove"===b(this,On,"a",Pn)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};On=new WeakSet,Pn=function(){return this.getAttribute("data-dismiss-scheme")},g([U],Hn.prototype,"titleText",void 0),Hn=g([K],Hn),window.customElements.get("x-banner")||(window.XBannerElement=Hn,window.customElements.define("x-banner",Hn));class Rn{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Wn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Wn(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,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",qn),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",qn)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter(Fn)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Fn)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Fn),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(s=e)}const o=n[s];if(o)for(const t of n)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Bn(this.list,o)):t.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 qn(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function Wn(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Fn(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function Bn(t,e){(function(t,e){const n=t.scrollTop,i=n+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;return s>=n&&o<=i})(t,e)||(t.scrollTop=e.offsetTop)}const Nn=window.testScreenReaderDelay||100;class $n{constructor(t,e,n,i=!1){var s;if(this.container=t,this.input=e,this.results=n,this.combobox=new Rn(e,n,{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=n.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 t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.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=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout((()=>{clearTimeout(n),t(...i)}),e)}}(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),null===(s=this.clearButton)||void 0===s||s.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(),"true"===this.input.getAttribute("aria-expanded")&&(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("Escape"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!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))return;if(this.close(),e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||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)}),Nn)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(n).then((t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length,i=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${i} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),n?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 Vn,Un,jn,Kn,zn,Yn=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},_n=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},Gn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const Xn=globalThis.HTMLElement||null;class Jn extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,Gn(e,["relatedTarget"])),this.relatedTarget=n}}const Zn=new WeakMap;let Qn=null;class AutoCompleteElement extends Xn{constructor(){super(...arguments),Vn.add(this),Un.set(this,null),jn.set(this,null),zn.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){Qn=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Yn(this,Un,"f"))||void 0===t?void 0:t.isConnected)return Yn(this,Un,"f");const e=this.getAttribute("for"),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){_n(this,Un,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Yn(this,jn,"f"))||void 0===t?void 0:t.isConnected)?Yn(this,jn,"f"):this.querySelector("input")}set inputElement(t){_n(this,jn,t,"f"),Yn(this,Vn,"m",Kn).call(this)}connectedCallback(){this.isConnected&&(Yn(this,Vn,"m",Kn).call(this),new MutationObserver((()=>{Zn.get(this)||Yn(this,Vn,"m",Kn).call(this)})).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=Zn.get(this);t&&(t.destroy(),Zn.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;null===(e=Yn(this,zn,"f"))||void 0===e||e.abort();const{signal:n}=_n(this,zn,new AbortController,"f"),i=await fetch(t.toString(),{signal:n,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());if(Qn){return(await Qn).createHTML(await i.text(),i)}return await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,n){var i,s;if(e===n)return;const o=Zn.get(this);if(o)switch(this.forElement===(null===(i=Zn.get(this))||void 0===i?void 0:i.results)&&this.inputElement===(null===(s=Zn.get(this))||void 0===s?void 0:s.input)||Yn(this,Vn,"m",Kn).call(this),t){case"open":null===n?o.close():o.open();break;case"value":null!==n&&(o.input.value=n),this.dispatchEvent(new Jn("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}Un=new WeakMap,jn=new WeakMap,zn=new WeakMap,Vn=new WeakSet,Kn=function(){var t;null===(t=Zn.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:n}=this;if(!e||!n)return;const i="true"===this.getAttribute("data-autoselect");Zn.set(this,new $n(this,n,e,i)),e.setAttribute("role","listbox")};const ti="undefined"!=typeof globalThis?globalThis:window;try{ti.AutocompleteElement=ti.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(ti.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ei(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function ni(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),ei(n),e.removeChild(n),Promise.resolve()}async function ii(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(n)await ni(n),i();else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const o=n.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?ni(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?ni(s.href):ei(s)),i())}}function si(t){const e=t.currentTarget;e instanceof HTMLElement&&ii(e)}function oi(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),ii(e))}}function ri(t){t.currentTarget.addEventListener("keydown",oi)}function ai(t){t.currentTarget.removeEventListener("keydown",oi)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",si),this.addEventListener("focus",ri),this.addEventListener("blur",ai)}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 li="undefined"!=typeof globalThis?globalThis:window;try{li.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(li.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ci(t){t.style.display="inline-block"}function ui(t){t.style.display="none"}const di=new WeakMap;document.addEventListener("clipboard-copy",(({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=di.get(t),n=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),i="Copied!";e?(clearTimeout(e),di.delete(t)):(!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ui(e),ci(n))}(t),n&&(n.textContent===i?n.textContent=`${i} `:n.textContent=i)),di.set(t,setTimeout((()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ci(e),ui(n))}(t),di.delete(t)}),2e3))}));var hi,fi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},mi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const pi="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},gi=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],bi={minimumIntegerDigits:2};class vi{constructor(t,e={}){hi.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const s=e.hours||i;i="2-digit"===s?"numeric":s;const o=e.minutes||i;i="2-digit"===o?"numeric":o;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;fi(this,hi,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return mi(this,hi,"f")}formatToParts(t){const e=[],n=mi(this,hi,"f"),i=n.style,s=n.locale;for(const[i,o]of gi){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?bi:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new pi(s,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map((t=>t.value)).join("")}}hi=new WeakMap;const wi=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,yi=["year","month","week","day","hour","minute","second","millisecond"];class Ei{constructor(t=0,e=0,n=0,i=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,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=0===this.sign}abs(){return new Ei(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("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,s=null===(e=n.match(wi))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*i));return s?new Ei(...s):new Ei}if("object"==typeof t){const{years:e,months:n,weeks:i,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new Ei(e,n,i,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(Ai(n,Ei.from(t)).getTime()-n),s=Math.abs(Ai(n,Ei.from(e)).getTime()-n);return i>s?-1:i<s?1:0}toLocaleString(t,e){return new vi(t,e).format(this)}}function Ai(t,e){const n=new Date(t);return e.sign<0?(n.setUTCSeconds(n.getUTCSeconds()+e.seconds),n.setUTCMinutes(n.getUTCMinutes()+e.minutes),n.setUTCHours(n.getUTCHours()+e.hours),n.setUTCDate(n.getUTCDate()+7*e.weeks+e.days),n.setUTCMonth(n.getUTCMonth()+e.months),n.setUTCFullYear(n.getUTCFullYear()+e.years)):(n.setUTCFullYear(n.getUTCFullYear()+e.years),n.setUTCMonth(n.getUTCMonth()+e.months),n.setUTCDate(n.getUTCDate()+7*e.weeks+e.days),n.setUTCHours(n.getUTCHours()+e.hours),n.setUTCMinutes(n.getUTCMinutes()+e.minutes),n.setUTCSeconds(n.getUTCSeconds()+e.seconds)),n}function Li(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const n=t.sign;let i=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),u=Math.abs(t.milliseconds);u>=900&&(c+=Math.round(u/1e3)),(c||l||a||r||o||s||i)&&(u=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||i)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||i)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||i)&&(a=0);const d=e.getFullYear(),h=e.getMonth(),f=e.getDate();if(r>=27||i+s+r){const t=new Date(e);t.setDate(1),t.setMonth(h+s*n+1),t.setDate(0);const a=Math.max(0,f-t.getDate()),l=new Date(e);l.setFullYear(d+i*n),l.setDate(f-a),l.setMonth(h+s*n),l.setDate(f-a+r*n);const c=l.getFullYear()-e.getFullYear(),u=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+u);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,s=i=0):p<=11?(s=p,i=0):(s=0,i=c*n),(s||i)&&(r=0)}return i&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||i)&&(o=0),r&&o&&!s&&!i&&(o+=Math.round(r/7),r=0),new Ei(i*n,s*n,o*n,r*n,a*n,l*n,c*n,u*n)}var ki,Ti,Si,Ci,Mi,xi,Ii,Di,Oi,Pi,Hi,Ri=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},qi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const Wi=globalThis.HTMLElement||null,Fi=new Ei,Bi=new Ei(0,0,0,0,0,1);class Ni extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function $i(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Vi=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=$i(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,$i(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Wi{constructor(){super(...arguments),ki.add(this),Ti.set(this,!1),Si.set(this,!1),Mi.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Hi.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 Ri(this,Hi,"f")}set onRelativeTimeUpdated(t){Ri(this,Hi,"f")&&this.removeEventListener("relative-time-updated",Ri(this,Hi,"f")),qi(this,Hi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,wi.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return yi.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"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=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Vi.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&qi(this,Ti,null!==n&&(this.date&&Ri(this,ki,"m",xi).call(this,this.date))!==n,"f"),Ri(this,Si,"f")||"title"===t&&Ri(this,Ti,"f")||qi(this,Si,(async()=>{await Promise.resolve(),this.update(),qi(this,Si,!1,"f")})(),"f"))}update(){const t=Ri(this,Mi,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Ri(this,Mi,"f").textContent=t);const s=Date.now();Ri(this,Ti,"f")||(n=Ri(this,ki,"m",xi).call(this,i)||"",n&&!this.noTitle&&this.setAttribute("title",n));const o=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new Ei;const s=Math.sign(i),o=Math.abs(i),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),u=Math.floor(c/30),d=Math.floor(u/12),h=yi.indexOf(e)||yi.length;return new Ei(h>=0?d*s:0,h>=1?(u-12*d)*s:0,0,h>=3?(c-30*u)*s:0,h>=4?(l-24*c)*s:0,h>=5?(a-60*l)*s:0,h>=6?(r-60*a)*s:0,h>=7?(o-1e3*r)*s:0)}(i,this.precision,s),r=Ri(this,ki,"m",Ii).call(this,o);let a=t;a="duration"===r?Ri(this,ki,"m",Di).call(this,o):"relative"===r?Ri(this,ki,"m",Oi).call(this,o):Ri(this,ki,"m",Pi).call(this,i),a?Ri(this,Mi,"f").textContent=a:this.shadowRoot===Ri(this,Mi,"f")&&this.textContent&&(Ri(this,Mi,"f").textContent=this.textContent),a===t&&n===e||this.dispatchEvent(new Ni(t,a,e,n)),"relative"===r||"duration"===r?Vi.observe(this):Vi.unobserve(this)}}Ti=new WeakMap,Si=new WeakMap,Mi=new WeakMap,Hi=new WeakMap,ki=new WeakSet,Ci=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(null!=e?e:"").toString()}catch(t){return"default"}},xi=function(t){return new Intl.DateTimeFormat(Ri(this,ki,"a",Ci),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Ii=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===Ei.compare(t,this.threshold))return"relative"}return"datetime"},Di=function(t){const e=Ri(this,ki,"a",Ci),n=this.format,i=this.formatStyle,s=this.tense;let o=Fi;"micro"===n?(t=Li(t),o=Bi,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Bi)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},Oi=function(t){const e=new Intl.RelativeTimeFormat(Ri(this,ki,"a",Ci),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=Fi),"past"===n&&-1!==t.sign&&(t=Fi);const[i,s]=function(t,e){const n=Li(t,e);if(n.blank)return[0,"second"];for(const t of yi){if("millisecond"===t)continue;const e=n[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===s&&i<10?e.format(0,"millisecond"===this.precision?"second":this.precision):e.format(i,s)},Pi=function(t){const e=new Intl.DateTimeFormat(Ri(this,ki,"a",Ci),{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 Ui="undefined"!=typeof globalThis?globalThis:window;try{Ui.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Ui.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ji(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}class TabContainerElement extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const n=t.target;if(!(n instanceof HTMLElement))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const i=ji(this),s=i.indexOf(i.find((t=>t.matches('[aria-selected="true"]')))),[o,r]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some((e=>t.code===e))){let t=s+1;t>=i.length&&(t=0),this.selectTab(t)}else if(r.some((e=>t.code===e))){let t=s-1;t<0&&(t=i.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(i.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=ji(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)}));for(const t of ji(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=ji(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],s=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:s}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),s.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:s}}))}}}const Ki="undefined"!=typeof globalThis?globalThis:window;try{Ki.TabContainerElement=TabContainerElement.define()}catch(t){if(!(Ki.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let zi=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function Yi(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let o,r=0,a=!1;function l(...c){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,c),s&&l.cancel()):(i&&u<e||!i)&&(clearTimeout(o),o=setTimeout((()=>{r=Date.now(),t.apply(this,c),s&&l.cancel()}),i?e-u:e))}return l.cancel=()=>{clearTimeout(o),a=!0},l}(t,e,{start:n,middle:i,once:s})}g([j],zi.prototype,"fields",void 0),zi=g([K],zi),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:zi}),window.customElements.define("primer-multi-input",zi));var _i,Gi,Xi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Ji=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};!function(t){t.GET="GET",t.POST="POST"}(Gi||(Gi={}));const Zi=new WeakMap;class Qi extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class ts extends Qi{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class es extends Qi{constructor(){super("complete")}}class ns extends Qi{constructor(t){super("success"),this.response=t}}class is extends ts{constructor(){super("start","Verifying…")}}class ss extends ts{constructor(t){super("error","Validation failed"),this.response=t}}class os extends Qi{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),_i.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return Xi(this,_i,"f")}set onloadend(t){Xi(this,_i,"f")&&this.removeEventListener("loadend",Xi(this,_i,"f")),Ji(this,_i,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=Yi(ls.bind(null,this),300),n={check:e,controller:null};Zi.set(this,n);const i=rs.bind(null,e);t.addEventListener("blur",i),t.addEventListener("input",i),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=Zi.get(this);e&&(Zi.delete(this),t.removeEventListener("input",as),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return Gi[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}get onlyValidateOnBlur(){const t=this.getAttribute("only-validate-on-blur");return"true"===t||""===t}}function rs(t,e){const n=e.currentTarget;if(!(n instanceof HTMLInputElement))return;const i=n.closest("auto-check");i instanceof AutoCheckElement&&("input"===e.type&&i.setAttribute("dirty",""),0!==n.value.length&&("blur"!==e.type&&!i.onlyValidateOnBlur||"blur"===e.type&&i.onlyValidateOnBlur&&!i.validateOnKeystroke&&i.hasAttribute("dirty")||"input"===e.type&&i.onlyValidateOnBlur&&i.validateOnKeystroke)&&(as(e),t()))}function as(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,s=n.csrf,o=n.httpMethod,r=Zi.get(n);if(!i||"POST"===o&&!s||!r)return;const a=new is;e.dispatchEvent(a),n.required&&e.setCustomValidity(a.message)}async function ls(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,s=t.csrf,o=Zi.get(t),r=t.httpMethod;if(!i||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(i,window.location.origin);"POST"===r?(a.append(n,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new os(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const n=await async function(t,e,n){"GET"===n.method&&delete n.body;try{const i=await fetch(e,n);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(n.ok)t.required&&e.setCustomValidity(""),t.onlyValidateOnBlur&&(t.validateOnKeystroke=!1),e.dispatchEvent(new ns(n.clone()));else{t.onlyValidateOnBlur&&(t.validateOnKeystroke=!0);const i=new ss(n.clone());e.dispatchEvent(i),t.required&&e.setCustomValidity(i.message)}o.controller=null,e.dispatchEvent(new es)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new es))}}_i=new WeakMap;const cs="undefined"!=typeof globalThis?globalThis:window;try{cs.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(cs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var us;let ds=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),us.set(this,void 0)}connectedCallback(){b(this,us,"f")?.abort();const{signal:t}=v(this,us,new AbortController,"f");this.addEventListener("auto-check-success",(async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()}),{signal:t}),this.addEventListener("auto-check-error",(async t=>{const e=await t.detail.response.text();this.setError(e)}),{signal:t})}disconnectedCallback(){b(this,us,"f")?.abort()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const n=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(n)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};us=new WeakMap,g([U],ds.prototype,"inputElement",void 0),g([U],ds.prototype,"validationElement",void 0),g([U],ds.prototype,"validationMessageElement",void 0),g([U],ds.prototype,"validationSuccessIcon",void 0),g([U],ds.prototype,"validationErrorIcon",void 0),g([U],ds.prototype,"leadingVisual",void 0),g([U],ds.prototype,"leadingSpinner",void 0),ds=g([K],ds);let hs=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",(t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")})),this.addEventListener("toggleSwitchSuccess",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})),this.addEventListener("toggleSwitchLoading",(()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}))}};var fs,ms,ps,gs,bs,vs,ws,ys,Es,As,Ls,ks,Ts,Ss,Cs,Ms,xs,Is,Ds,Os,Ps;g([U],hs.prototype,"validationElement",void 0),g([U],hs.prototype,"validationMessageElement",void 0),hs=g([K],hs);const Hs=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]'],Rs=Hs.map((t=>`:not([hidden]) > ${t}`));let qs=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),fs.add(this),ms.set(this,void 0),ps.set(this,""),gs.set(this,""),bs.set(this,!1),vs.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const n of t){const t=n.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:n?.getAttribute("data-value"),element:n})}return e}connectedCallback(){const{signal:t}=v(this,ms,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.popoverElement?.addEventListener("toggle",this,{signal:t}),b(this,fs,"m",Ds).call(this),b(this,fs,"m",Os).call(this),b(this,fs,"m",ws).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,fs,"m",Is).call(this)&&this.overlay?.update()};v(this,vs,new IntersectionObserver((t=>{for(const n of t){n.target===this.invokerElement&&(n.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}})),"f"),Ne(this,(()=>Boolean(this.invokerElement)),(()=>b(this,vs,"f").observe(this.invokerElement))),this.includeFragment||this.setAttribute("data-ready","true")}disconnectedCallback(){b(this,ms,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),n=b(this,fs,"m",As).call(this,t);if("toggle"===t.type&&"open"===t.newState&&window.requestAnimationFrame((()=>{b(this,fs,"a",Ps)?.focus()})),e&&"mousedown"===t.type)return void v(this,bs,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return b(this,fs,"m",Ls).call(this,t),void v(this,bs,!1,"f");if("focusout"===t.type){if(b(this,bs,"f"))return;return void requestAnimationFrame((()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,fs,"m",Cs).call(this)}))}const i=t.target.closest(Rs.join(","));if(null!==i&&n){if(b(this,fs,"m",ys).call(this,t))return;const e=i.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e))return void b(this,fs,"m",ks).call(this,t,n)}return b(this,fs,"m",Es).call(this,t)&&(t.preventDefault(),i.click()),void b(this,fs,"m",Ts).call(this,i)}"include-fragment-replaced"===t.type&&b(this,fs,"m",Ss).call(this)}get items(){return Array.from(this.querySelectorAll(Rs.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,fs,"m",Ts).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,fs,"m",Ts).call(this,e)}}};ms=new WeakMap,ps=new WeakMap,gs=new WeakMap,bs=new WeakMap,vs=new WeakMap,fs=new WeakSet,ws=function(){const{signal:t}=b(this,ms,"f");for(const e of this.querySelectorAll(Hs.join(",")))e.addEventListener("click",b(this,fs,"m",ys).bind(this),{signal:t}),e.addEventListener("keydown",b(this,fs,"m",ys).bind(this),{signal:t})},ys=function(t){if(!b(this,fs,"m",As).call(this,t))return!1;const e=t.target.closest(Rs.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Es=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},As=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,fs,"m",Es).call(this,t)},Ls=function(t){t.preventDefault(),t.stopPropagation(),b(this,fs,"m",Is).call(this)?b(this,fs,"m",xs).call(this):b(this,fs,"m",Ms).call(this)},ks=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,fs,"m",Is).call(this)&&b(this,fs,"m",xs).call(this));const t=this.ownerDocument.activeElement,i=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(i||s||o)&&setTimeout((()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()}),0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},Ts=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{b(this,fs,"m",Is).call(this)&&b(this,fs,"m",xs).call(this)})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,fs,"m",Ds).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,fs,"m",Os).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Ss=function(){b(this,fs,"a",Ps)?.focus(),b(this,fs,"m",ws).call(this),this.setAttribute("data-ready","true")},Cs=function(){b(this,fs,"m",xs).call(this)},Ms=function(){this.popoverElement?.showPopover()},xs=function(){this.popoverElement?.hidePopover()},Is=function(){return this.popoverElement?.matches(":popover-open")},Ds=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,ps,b(this,ps,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=this.dynamicLabelPrefix,i.textContent=e.textContent||"",t.replaceChildren(n,i)}else t.textContent=b(this,ps,"f")},Os=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,gs,b(this,gs,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=b(this,gs,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},Ps=function(){return this.querySelector(Rs.join(","))},g([U],qs.prototype,"includeFragment",void 0),g([U],qs.prototype,"overlay",void 0),qs=g([K],qs),window.customElements.get("action-menu")||(window.ActionMenuElement=qs,window.customElements.define("action-menu",qs));const Ws="less",Fs="equal",Bs="greater";var Ns,$s,Vs,Us,js,Ks=t=>{throw TypeError(t)},zs=(t,e,n)=>e.has(t)||Ks("Cannot "+n),Ys=(t,e,n)=>(zs(t,e,"read from private field"),n?n.call(t):e.get(t)),_s=(t,e,n)=>e.has(t)?Ks("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Gs=(t,e,n,i)=>(zs(t,e,"write to private field"),e.set(t,n),n),Xs=(t,e,n)=>(zs(t,e,"access private method"),n);class Js{constructor({compareFn:t}){_s(this,Vs),_s(this,Ns),_s(this,$s),Gs(this,Ns,t),Gs(this,$s,[])}insert(t){Ys(this,$s).push(t),Xs(this,Vs,js).call(this)}pop(){const t=Ys(this,$s)[0];return Ys(this,$s)[Ys(this,$s).length-1]&&(Ys(this,$s)[0]=Ys(this,$s)[Ys(this,$s).length-1],Ys(this,$s).pop()),Xs(this,Vs,Us).call(this),t}peek(){return Ys(this,$s)[0]}delete(t){const e=Ys(this,$s).indexOf(t);-1!==e&&(ao(Ys(this,$s),e,Ys(this,$s).length-1),Ys(this,$s).pop(),Xs(this,Vs,Us).call(this))}clear(){Gs(this,$s,[])}get size(){return Ys(this,$s).length}}function Zs(t){return 2*t+1}function Qs(t){return 2*t+2}function to(t){return Math.floor((t-1)/2)}function eo(t,e){return Zs(t)<e}function no(t,e){return Qs(t)<e}function io(t){return t>0}function so(t,e){return t[Zs(e)]}function oo(t,e){return t[Qs(e)]}function ro(t,e){return t[to(e)]}function ao(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}Ns=new WeakMap,$s=new WeakMap,Vs=new WeakSet,Us=function(){let t=0;for(;eo(t,Ys(this,$s).length);){let e=Zs(t);if(no(t,Ys(this,$s).length)&&Ys(this,Ns).call(this,oo(Ys(this,$s),t),so(Ys(this,$s),t))===Ws&&(e=Qs(t)),Ys(this,Ns).call(this,Ys(this,$s)[t],Ys(this,$s)[e])===Ws)break;ao(Ys(this,$s),t,e),t=e}},js=function(){let t=Ys(this,$s).length-1;for(;io(t)&&Ys(this,Ns).call(this,Ys(this,$s)[t],ro(Ys(this,$s),t))===Ws;)ao(Ys(this,$s),t,to(t)),t=to(t)};var lo,co,uo,ho,fo=Object.defineProperty,mo=t=>{throw TypeError(t)},po=(t,e,n)=>((t,e,n)=>e in t?fo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),go=(t,e,n)=>e.has(t)||mo("Cannot "+n),bo=(t,e,n)=>(go(t,e,"read from private field"),n?n.call(t):e.get(t)),vo=(t,e,n)=>e.has(t)?mo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),wo=(t,e,n,i)=>(go(t,e,"write to private field"),e.set(t,n),n);lo=Symbol.toStringTag;class yo{constructor(){po(this,lo,"Deferred"),vo(this,co),vo(this,uo),vo(this,ho),wo(this,co,new Promise(((t,e)=>{wo(this,uo,t),wo(this,ho,e)})))}then(t,e){return Promise.prototype.then.apply(bo(this,co),[t,e])}catch(t){return Promise.prototype.catch.apply(bo(this,co),[t])}finally(t){return Promise.prototype.finally.apply(bo(this,co),[t])}resolve(t){bo(this,uo).call(this,t)}reject(t){bo(this,ho).call(this,t)}getPromise(){return bo(this,co)}}co=new WeakMap,uo=new WeakMap,ho=new WeakMap;var Eo,Ao,Lo,ko,To,So,Co=t=>{throw TypeError(t)},Mo=(t,e,n)=>e.has(t)||Co("Cannot "+n),xo=(t,e,n)=>(Mo(t,e,"read from private field"),n?n.call(t):e.get(t)),Io=(t,e,n)=>e.has(t)?Co("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Do=(t,e,n,i)=>(Mo(t,e,"write to private field"),e.set(t,n),n),Oo=(t,e,n)=>(Mo(t,e,"access private method"),n);class LiveRegionElement extends HTMLElement{constructor(){if(super(),Io(this,ko),Io(this,Eo),Io(this,Ao),Io(this,Lo),!this.shadowRoot){const t=function(){if(Po)return Po;return Po=document.createElement("template"),Po.innerHTML=Ho,Po}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}Do(this,Eo,!1),Do(this,Lo,null),Do(this,Ao,new Js({compareFn:Ro}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:n,politeness:i="polite"}=e,s=Date.now(),o=new yo,r={deferred:o,politeness:i,contents:t,scheduled:void 0!==n?s+n:s};return xo(this,Ao).insert(r),Oo(this,ko,To).call(this),{...o.getPromise(),cancel:()=>{xo(this,Ao).delete(r),o.resolve()}}}announceFromElement(t,e){const n=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==n)return this.announce(n,e);return{...Promise.resolve(),cancel:qo}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==xo(this,Lo)&&(clearTimeout(xo(this,Lo)),Do(this,Lo,null)),Do(this,Eo,!1),xo(this,Ao).clear()}}Eo=new WeakMap,Ao=new WeakMap,Lo=new WeakMap,ko=new WeakSet,To=function(){if(xo(this,Eo))return;let t=xo(this,Ao).peek();if(!t)return;null!==xo(this,Lo)&&(clearTimeout(xo(this,Lo)),Do(this,Lo,null));const e=Date.now();if(t.scheduled<=e)return t=xo(this,Ao).pop(),t&&Oo(this,ko,So).call(this,t),void Oo(this,ko,To).call(this);const n=t.scheduled-e;Do(this,Lo,window.setTimeout((()=>{Do(this,Lo,null),Oo(this,ko,To).call(this)}),n))},So=function(t){Do(this,Eo,!0);const{contents:e,deferred:n,politeness:i}=t,s=this.shadowRoot?.getElementById(i);if(!s)throw Do(this,Eo,!1),new Error(`Unable to find container for message. Expected a container with id="${i}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==xo(this,Lo)&&clearTimeout(xo(this,Lo)),n.resolve(),this.delay>0?Do(this,Lo,window.setTimeout((()=>{Do(this,Lo,null),Do(this,Eo,!1),Oo(this,ko,To).call(this)}),this.delay)):(Do(this,Lo,null),Do(this,Eo,!1),Oo(this,ko,To).call(this))};let Po=null;const Ho='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function Ro(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?Fs:t.scheduled<e.scheduled?Ws:Bs:"assertive"===t.politeness&&"assertive"!==e.politeness?Ws:"assertive"!==t.politeness&&"assertive"===e.politeness?Bs:Fs}function qo(){}var Wo,Fo,Bo,No,$o,Vo,Uo,jo,Ko,zo,Yo,_o,Go,Xo,Jo,Zo,Qo,tr,er,nr,ir,sr,or,rr,ar,lr,cr,ur,dr,hr,fr,mr,pr,gr,br,vr,wr,yr,Er,Ar;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Lr=['[role="option"]'],kr=Lr.join(","),Tr=Lr.map((t=>`:not([hidden]) > ${t}`)).join(",");var Sr,Cr;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Sr||(Sr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Cr||(Cr={}));const Mr=(()=>{const t=new Set;let e=null;function n(){for(const e of t)e.updateAnchorPosition()}return i=>{window.addEventListener("resize",n),window.addEventListener("scroll",n),e||(e=new ResizeObserver((()=>{for(const e of t)e.updateAnchorPosition()}))),e.observe(i.ownerDocument.documentElement),i.addEventListener("dialog:close",(()=>{i.invokerElement?.setAttribute("aria-expanded","false"),t.delete(i)})),i.addEventListener("dialog:open",(()=>{t.add(i)}))}})();let xr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),Wo.add(this),Fo.set(this,void 0),Bo.set(this,void 0),No.set(this,""),$o.set(this,""),Vo.set(this,new Map),Uo.set(this,null),jo.set(this,null),Ko.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"multiple"===this.selectVariant?"aria-checked":"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,Vo,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=J(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,Bo,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,Wo,"m",br).call(this),b(this,Wo,"m",vr).call(this),b(this,Wo,"m",zo).call(this),Mr(this),Ne(this,(()=>Boolean(this.remoteInput)),(()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})})),Ne(this,(()=>Boolean(this.includeFragment)),(()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})})),v(this,Fo,new IntersectionObserver((t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,Wo,"a",dr)===Sr.LOCAL&&b(this,Wo,"m",rr).call(this))}})),"f"),Ne(this,(()=>Boolean(this.dialog)),(()=>{b(this,Fo,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()})),b(this,Wo,"a",dr)===Sr.LOCAL&&Ne(this,(()=>this.items.length>0),(()=>{b(this,Wo,"m",rr).call(this),b(this,Wo,"m",vr).call(this)}))}disconnectedCallback(){b(this,Bo,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,Wo,"m",or).call(this,t);if(t.target===this.remoteInput)return void b(this,Wo,"m",ir).call(this,t);const e=this.invokerElement?.contains(t.target),n=this.closeButton?.contains(t.target),i=b(this,Wo,"m",Xo).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return void b(this,Wo,"m",mr).call(this,t);if(n&&i)return;if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Tr)?.parentElement;if(null!=s&&i){if(b(this,Wo,"m",_o).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e)&&this.contains(n))return void b(this,Wo,"m",pr).call(this,t,n)}return b(this,Wo,"m",Go).call(this,t)&&(t.preventDefault(),b(this,Wo,"m",Ar).call(this,s)?.click()),void b(this,Wo,"m",gr).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,Wo,"m",er).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Tr)).map((t=>t.parentElement))}get items(){return Array.from(this.querySelectorAll(kr)).map((t=>t.parentElement))}get focusableItem(){for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,Wo,"m",Ar).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,Wo,"m",Ar).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,Wo,"m",Ar).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,Wo,"m",gr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,Wo,"m",gr).call(this,t)}};Fo=new WeakMap,Bo=new WeakMap,No=new WeakMap,$o=new WeakMap,Vo=new WeakMap,Uo=new WeakMap,jo=new WeakMap,Ko=new WeakMap,Wo=new WeakSet,zo=function(){const{signal:t}=b(this,Bo,"f");for(const e of this.querySelectorAll(Lr.join(",")))e.addEventListener("click",b(this,Wo,"m",_o).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Wo,"m",_o).bind(this),{signal:t})},Yo=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const n=b(this,Wo,"m",Ar).call(this,e);n&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?n.setAttribute("tabindex","-1"):(n.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,Wo,"a",wr)&&b(this,Wo,"m",Ar).call(this,b(this,Wo,"a",wr))?.setAttribute("tabindex","0")},_o=function(t){if(!b(this,Wo,"m",Xo).call(this,t))return!1;const e=t.target.closest(Tr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Go=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Xo=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Wo,"m",Go).call(this,t)},Jo=function(){for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");n&&b(this,Vo,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,Wo,"m",vr).call(this)},Zo=function(t){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,Vo,"f").set(n,{value:n,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},Qo=function(t){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,Vo,"f").delete(n)},tr=function(){b(this,Wo,"a",hr)&&(b(this,Uo,"f")&&clearTimeout(b(this,Uo,"f")),b(this,jo,"f")&&clearTimeout(b(this,jo,"f")),v(this,jo,setTimeout((()=>{this.liveRegion.announce("Loading")}),2e3),"f"),v(this,Uo,setTimeout((()=>{b(this,Wo,"a",hr)?.showLeadingSpinner()}),1e3),"f"))},er=function(t){switch(t.type){case"include-fragment-replaced":b(this,Wo,"m",rr).call(this);break;case"loadstart":b(this,Wo,"m",nr).call(this,!1);break;case"loadend":b(this,Wo,"a",hr)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,Wo,"m",nr).call(this,!0);const t=this.fragmentErrorElement;if(t&&!t.hasAttribute("hidden"))return void this.liveRegion.announceFromElement(t,{politeness:"assertive"});break}}},nr=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},ir=function(t){switch(t.type){case"remote-input-success":b(this,Wo,"m",cr).call(this),b(this,Wo,"m",rr).call(this),b(this,Wo,"m",Jo).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,Wo,"m",lr).call(this,Cr.BODY):b(this,Wo,"m",lr).call(this,Cr.BANNER);break;case"loadstart":if(!b(this,Wo,"m",fr).call(this)){if(b(this,Wo,"m",cr).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,Wo,"m",tr).call(this)}break;case"loadend":b(this,Wo,"a",hr)?.hideLeadingSpinner(),b(this,jo,"f")&&clearTimeout(b(this,jo,"f")),b(this,Uo,"f")&&clearTimeout(b(this,Uo,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},sr=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},or=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,Wo,"m",Ar).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,Wo,"m",Ar).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const n=b(this,Wo,"m",Ar).call(this,e);n&&n.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],n=b(this,Wo,"m",Ar).call(this,e);n&&n.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,Wo,"m",fr).call(this)||b(this,Wo,"m",tr).call(this),b(this,Wo,"a",dr)===Sr.LOCAL||b(this,Wo,"a",dr)===Sr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,Wo,"m",rr).call(this)}},rr=function(){if(!this.list)return;let t=!1;if(b(this,Wo,"m",fr).call(this)){const e=this.filterInputTextField?.value??"",n=this.filterFn||b(this,Wo,"m",sr);for(const i of this.items)n(i,e)?(b(this,Wo,"m",Er).call(this,i),t=!0):b(this,Wo,"m",yr).call(this,i)}else t=this.items.length>0;b(this,Wo,"m",Yo).call(this),b(this,Wo,"m",ur).call(this);for(const t of this.items){const e=b(this,Wo,"m",Ar).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");b(this,Ko,"f")?n&&!b(this,Vo,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"false"):n&&!b(this,Vo,"f").has(n)&&this.isItemChecked(t)&&b(this,Wo,"m",Zo).call(this,t)}v(this,Ko,!0,"f"),this.noResults&&(b(this,Wo,"m",ar).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},ar=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},lr=function(t){let e=this.fragmentErrorElement;t===Cr.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},cr=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},ur=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},dr=function(){if(!this.list)return Sr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Sr.LOCAL;case"eventually_local":return Sr.EVENTUALLY_LOCAL;default:return Sr.REMOTE}},hr=function(){return this.filterInputTextField?.closest("primer-text-field")},fr=function(){return b(this,Wo,"a",dr)===Sr.LOCAL||b(this,Wo,"a",dr)===Sr.EVENTUALLY_LOCAL},mr=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},pr=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,i=this.contains(t);(e||i)&&setTimeout((()=>this.invokerElement?.focus()),0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},gr=function(t){if("multiple"!==this.selectVariant&&setTimeout((()=>{this.open&&this.hide()})),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),n=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:n,value:b(this,Wo,"m",Ar).call(this,t)?.getAttribute("data-value")}})))return;const i=b(this,Wo,"m",Ar).call(this,t);if("single"===this.selectVariant){if(i?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,Wo,"m",Ar).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,Vo,"f").clear(),n&&(b(this,Wo,"m",Zo).call(this,t),i?.setAttribute(this.ariaSelectionType,"true")),b(this,Wo,"m",br).call(this)}}else i?.setAttribute(this.ariaSelectionType,`${n}`),n?b(this,Wo,"m",Zo).call(this,t):b(this,Wo,"m",Qo).call(this,t);b(this,Wo,"m",vr).call(this),b(this,Wo,"m",Yo).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:n,value:b(this,Wo,"m",Ar).call(this,t)?.getAttribute("data-value")}}))},br=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,No,b(this,No,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,No,"f");if(e){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=`${this.dynamicLabelPrefix} `,i.textContent=e,t.replaceChildren(n,i),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,No,"f")},vr=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,$o,b(this,$o,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=e.inputName||b(this,$o,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},wr=function(){return this.querySelector(Tr)?.parentElement||null},yr=function(t){t&&t.setAttribute("hidden","hidden")},Er=function(t){t&&t.removeAttribute("hidden")},Ar=function(t){return t.querySelector(".ActionListContent")},g([U],xr.prototype,"includeFragment",void 0),g([U],xr.prototype,"dialog",void 0),g([U],xr.prototype,"filterInputTextField",void 0),g([U],xr.prototype,"remoteInput",void 0),g([U],xr.prototype,"list",void 0),g([U],xr.prototype,"noResults",void 0),g([U],xr.prototype,"fragmentErrorElement",void 0),g([U],xr.prototype,"bannerErrorElement",void 0),g([U],xr.prototype,"bodySpinner",void 0),g([U],xr.prototype,"liveRegion",void 0),xr=g([K],xr),window.customElements.get("select-panel")||(window.SelectPanelElement=xr,window.customElements.define("select-panel",xr));let Ir=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed")||"Expand";this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open")||"Collapse";this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};g([U],Ir.prototype,"detailsTarget",void 0),g([U],Ir.prototype,"summaryTarget",void 0),Ir=g([K],Ir),window.DetailsToggleElement=Ir}();
|
2
2
|
//# sourceMappingURL=primer_view_components.js.map
|