System.register([],function(v){"use strict";return{execute:function(){v({$:yu,F:Vo,H:To,J:Ao,K:pl,L:jo,N:Ol,O:Hl,P:_l,S:k,U:Fl,Z:lt,a:oo,a0:Eu,a7:Mu,a8:kr,a9:Su,ab:xu,ac:Lu,ad:is,ae:Dt,aj:_o,b:Io,c:Ro,d:Ho,f:ao,h:Zn,j:Po,k:cs,m:al,n:Qc,o:Zr,q:nl,r:Ko,s:Jc,t:Co,v:fl,w:cl,x:Zc,y:sl,z:hl});function k(){if(!(this instanceof k))return new k;this.size=0,this.uid=0,this.selectors=[],this.indexes=Object.create(this.indexes),this.activeIndexes=[]}var ae=window.document.documentElement,Cr=ae.matches||ae.webkitMatchesSelector||ae.mozMatchesSelector||ae.oMatchesSelector||ae.msMatchesSelector;k.prototype.matchesSelector=function(t,e){return Cr.call(t,e)},k.prototype.querySelectorAll=function(t,e){return e.querySelectorAll(t)},k.prototype.indexes=[];var Ir=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;k.prototype.indexes.push({name:"ID",selector:function(e){var n;if(n=e.match(Ir))return n[0].slice(1)},element:function(e){if(e.id)return[e.id]}});var Nr=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;k.prototype.indexes.push({name:"CLASS",selector:function(e){var n;if(n=e.match(Nr))return n[0].slice(1)},element:function(e){var n=e.className;if(n){if(typeof n=="string")return n.split(/\s/);if(typeof n=="object"&&"baseVal"in n)return n.baseVal.split(/\s/)}}});var Pr=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;k.prototype.indexes.push({name:"TAG",selector:function(e){var n;if(n=e.match(Pr))return n[0].toUpperCase()},element:function(e){return[e.nodeName.toUpperCase()]}}),k.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}};var mt;typeof window.Map=="function"?mt=window.Map:mt=function(){function t(){this.map={}}return t.prototype.get=function(e){return this.map[e+" "]},t.prototype.set=function(e,n){this.map[e+" "]=n},t}();var xn=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function Ln(t,e){t=t.slice(0).concat(t.default);var n=t.length,s,i,r,o,a=e,c,l,u=[];do if(xn.exec(""),(r=xn.exec(a))&&(a=r[3],r[2]||!a)){for(s=0;s3&&arguments[3]!==void 0?arguments[3]:{},i=!!s.capture,r=i?Rn:$n,o=r[t];o||(o=new k,r[t]=o,document.addEventListener(t,ro,i)),o.add(e,n)}function ao(t,e,n){return t.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n}))}/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const Wn=new WeakMap,kt=t=>(...e)=>{const n=t(...e);return Wn.set(n,!0),n},ue=t=>typeof t=="function"&&Wn.has(t);/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const qn=window.customElements!==void 0&&window.customElements.polyfillWrapFlushCallback!==void 0,co=(t,e,n=null,s=null)=>{for(;e!==n;){const i=e.nextSibling;t.insertBefore(e,s),e=i}},Tt=(t,e,n=null)=>{for(;e!==n;){const s=e.nextSibling;t.removeChild(e),e=s}};/** * @license * Copyright (c) 2018 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const S={},Bn={};/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const R=`{{lit-${String(Math.random()).slice(2)}}}`,Un=``,Vn=new RegExp(`${R}|${Un}`),de="$lit$";class lo{constructor(e,n){this.parts=[],this.element=n;const s=[],i=[],r=document.createTreeWalker(n.content,133,null,!1);let o=0,a=-1,c=0;const{strings:l,values:{length:u}}=e;for(;c0;){const f=l[c],b=At.exec(f)[2],g=b.toLowerCase()+de,E=d.getAttribute(g);d.removeAttribute(g);const x=E.split(Vn);this.parts.push({type:"attribute",index:a,name:b,strings:x}),c+=x.length-1}}d.tagName==="TEMPLATE"&&(i.push(d),r.currentNode=d.content)}else if(d.nodeType===3){const p=d.data;if(p.indexOf(R)>=0){const h=d.parentNode,m=p.split(Vn),f=m.length-1;for(let b=0;b{const n=t.length-e.length;return n>=0&&t.slice(n)===e},uo=t=>t.index!==-1,C=()=>document.createComment(""),At=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */class Kn{constructor(e,n,s){this.__parts=[],this.template=e,this.processor=n,this.options=s}update(e){let n=0;for(const s of this.__parts)s!==void 0&&s.setValue(e[n]),n++;for(const s of this.__parts)s!==void 0&&s.commit()}_clone(){const e=qn?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],s=this.template.parts,i=document.createTreeWalker(e,133,null,!1);let r=0,o=0,a,c=i.nextNode();for(;r-1||s)&&r.indexOf("-->",o+1)===-1;const a=At.exec(r);a===null?n+=r+(s?fo:Un):n+=r.substr(0,a.index)+a[1]+a[2]+de+a[3]+R}return n+=this.strings[e],n}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const Be=t=>t===null||!(typeof t=="object"||typeof t=="function"),Yn=t=>Array.isArray(t)||!!(t&&t[Symbol.iterator]);class Xn{constructor(e,n,s){this.dirty=!0,this.element=e,this.name=n,this.strings=s,this.parts=[];for(let i=0;ithis.handleEvent(i)}setValue(e){this.__pendingValue=e}commit(){for(;ue(this.__pendingValue);){const r=this.__pendingValue;this.__pendingValue=S,r(this)}if(this.__pendingValue===S)return;const e=this.__pendingValue,n=this.value,s=e==null||n!=null&&(e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive),i=e!=null&&(n==null||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=bo(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=S}handleEvent(e){typeof this.value=="function"?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const bo=t=>t&&(Gn?{capture:t.capture,passive:t.passive,once:t.once}:t.capture);/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */class vo{handleAttributeExpressions(e,n,s,i){const r=n[0];return r==="."?new mo(e,n.slice(1),s).parts:r==="@"?[new go(e,n.slice(1),i.eventContext)]:r==="?"?[new ho(e,n.slice(1),s)]:new Xn(e,n,s).parts}handleTextExpression(e){return new Y(e)}}const wo=new vo;/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */function Eo(t){let e=Jn.get(t.type);e===void 0&&(e={stringsArray:new WeakMap,keyString:new Map},Jn.set(t.type,e));let n=e.stringsArray.get(t.strings);if(n!==void 0)return n;const s=t.strings.join(R);return n=e.keyString.get(s),n===void 0&&(n=new lo(t,t.getTemplateElement()),e.keyString.set(s,n)),e.stringsArray.set(t.strings,n),n}const Jn=new Map;/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const Qn=new WeakMap,Iu=v("g",(t,e,n)=>{let s=Qn.get(e);s===void 0&&(Tt(e,e.firstChild),Qn.set(e,s=new Y(Object.assign({templateFactory:Eo},n))),s.appendInto(e)),s.setValue(t),s.commit()});/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.1.2");const Nu=v("i",(t,...e)=>new zn(t,e,"html",wo));class Lt{constructor(e){this.children=[],this.parent=e}delete(e){const n=this.children.indexOf(e);return n===-1?!1:(this.children=this.children.slice(0,n).concat(this.children.slice(n+1)),this.children.length===0&&this.parent.delete(this),!0)}add(e){return this.children.push(e),this}}class Ue{constructor(e){this.parent=null,this.children={},this.parent=e||null}get(e){return this.children[e]}insert(e){let n=this;for(let s=0;se.split(" "))}function Zn(t){const e=t.code.startsWith("Key")&&t.shiftKey&&t.key.toUpperCase()===t.key;return`${t.ctrlKey?"Control+":""}${t.altKey?"Alt+":""}${t.metaKey?"Meta+":""}${t.shiftKey&&!e?"Shift+":""}${t.key}`}const fe=new Ue,es=new WeakMap;let Mt=fe,Ve=null;function Ct(){Ve=null,Mt=fe}function ts(t){if(t.defaultPrevented||!(t.target instanceof Node))return;if(St(t.target)){const n=t.target;if(!n.id||!n.ownerDocument.querySelector(`[data-hotkey-scope=${n.id}]`))return}Ve!=null&&window.clearTimeout(Ve),Ve=window.setTimeout(Ct,1500);const e=Mt.get(Zn(t));if(!e){Ct();return}if(Mt=e,e instanceof Lt){const n=t.target;let s=!1,i;const r=St(n);for(let o=e.children.length-1;o>=0;o-=1){i=e.children[o];const a=i.getAttribute("data-hotkey-scope");if(!r&&!a||r&&n.id===a){s=!0;break}}i&&s&&(yo(i),t.preventDefault()),Ct()}}function To(t,e){Object.keys(fe.children).length===0&&document.addEventListener("keydown",ts);const s=ko(e||t.getAttribute("data-hotkey")||"").map(i=>fe.insert(i).add(t));es.set(t,s)}function Ao(t){const e=es.get(t);if(e&&e.length)for(const n of e)n&&n.delete(t);Object.keys(fe.children).length===0&&document.removeEventListener("keydown",ts)}const It=new WeakSet;function xo(t){It.add(t),t.shadowRoot&&(Nt(t.shadowRoot),ns(t.shadowRoot)),Nt(t),ns(t.ownerDocument)}const je=new WeakMap;function ns(t=document){if(je.has(t))return je.get(t);let e=!1;const n=new MutationObserver(i=>{for(const r of i)if(r.type==="attributes"&&r.target instanceof Element)Pt(r.target);else if(r.type==="childList"&&r.addedNodes.length)for(const o of r.addedNodes)o instanceof Element&&Nt(o)});n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const s={get closed(){return e},unsubscribe(){e=!0,je.delete(t),n.disconnect()}};return je.set(t,s),s}function Nt(t){for(const e of t.querySelectorAll("[data-action]"))Pt(e);t instanceof Element&&t.hasAttribute("data-action")&&Pt(t)}function Lo(t){const e=t.currentTarget;for(const n of ss(e))if(t.type===n.type){const s=e.closest(n.tag);It.has(s)&&typeof s[n.method]=="function"&&s[n.method](t);const i=e.getRootNode();if(i instanceof ShadowRoot&&It.has(i.host)&&i.host.matches(n.tag)){const r=i.host;typeof r[n.method]=="function"&&r[n.method](t)}}}function*ss(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const n=e.lastIndexOf(":"),s=e.lastIndexOf("#");yield{type:e.slice(0,n),tag:e.slice(n+1,s),method:e.slice(s+1)}}}function Pt(t){for(const e of ss(t))t.addEventListener(e.type,Lo)}function So(t){const e=t.name.replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/(^-|-Element$)/g,"").toLowerCase();window.customElements.get(e)||(window[t.name]=t,window.customElements.define(e,t))}function is(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot){for(const s of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!s.closest(n))return s}for(const s of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(s.closest(n)===t)return s}function Mo(t,e){const n=t.tagName.toLowerCase(),s=[];if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))i.closest(n)||s.push(i);for(const i of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))i.closest(n)===t&&s.push(i);return s}function Co(t,e){return Object.defineProperty(t,e,{configurable:!0,get(){return is(this,e)}})}function Io(t,e){return Object.defineProperty(t,e,{configurable:!0,get(){return Mo(this,e)}})}function No(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:e.getAttribute("data-shadowroot")==="closed"?"closed":"open"}).append(e.content.cloneNode(!0))}const he=new WeakMap;function Po(t,e){he.has(t)||he.set(t,[]),he.get(t).push(e)}function Do(t,e){e||(e=he.get(Object.getPrototypeOf(t))||[]);for(const n of e){const s=t[n],i=rs(n);let r={get(){return this.getAttribute(i)||""},set(o){this.setAttribute(i,o||"")}};typeof s=="number"?r={get(){return Number(this.getAttribute(i)||0)},set(o){this.setAttribute(i,o)}}:typeof s=="boolean"&&(r={get(){return this.hasAttribute(i)},set(o){this.toggleAttribute(i,o)}}),Object.defineProperty(t,n,r),n in t&&!t.hasAttribute(i)&&r.set.call(t,s)}}function rs(t){return`data-${t.replace(/([A-Z]($|[a-z]))/g,"-$1")}`.replace(/--/g,"-").toLowerCase()}function $o(t){let e=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{get(){const n=he.get(t.prototype);return n?n.map(rs).concat(e):e},set(n){e=n}})}function Ro(t){const e=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){this.toggleAttribute("data-catalyst",!0),No(this),Do(this),e&&e.call(this),xo(this)},$o(t),So(t)}/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const os=new WeakMap,as=2147483647,Pu=v("u",kt((...t)=>e=>{let n=os.get(e);n===void 0&&(n={lastRenderedIndex:as,values:[]},os.set(e,n));const s=n.values;let i=s.length;n.values=t;for(let r=0;rn.lastRenderedIndex);r++){const o=t[r];if(Be(o)||typeof o.then!="function"){e.setValue(o),n.lastRenderedIndex=r;break}r{const c=n.values.indexOf(o);c>-1&&c{r=Date.now(),t.apply(this,l),i&&c.cancel()},s?e-u:e))}return c.cancel=()=>{clearTimeout(o),a=!0},c}function cs(t,e=0,{start:n=!1,middle:s=!1,once:i=!1}={}){return Dt(t,e,{start:n,middle:s,once:i})}function _o(t=0,e={}){return(n,s,i)=>{if(!i||typeof i.value!="function")throw new Error("debounce can only decorate functions");const r=i.value;i.value=Dt(r,t,e),Object.defineProperty(n,s,i)}}function Ho(t=0,e={}){return(n,s,i)=>{if(!i||typeof i.value!="function")throw new Error("debounce can only decorate functions");const r=i.value;i.value=cs(r,t,e),Object.defineProperty(n,s,i)}}function*ls(t){let e="",n=0,s=!1;for(let i=0;itypeof s=="string"?s:s.value).join("");this.element.setAttributeNS(this.attr.namespaceURI,this.attr.name,n)}}}var ds=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n},X=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},N;class G{constructor(e,n){this.expression=n,N.set(this,void 0),ds(this,N,[e]),e.textContent=""}get value(){return X(this,N).map(e=>e.textContent).join("")}set value(e){this.replace(e)}get previousSibling(){return X(this,N)[0].previousSibling}get nextSibling(){return X(this,N)[X(this,N).length-1].nextSibling}replace(...e){const n=e.map(s=>typeof s=="string"?new Text(s):s);n.length||n.push(new Text("")),X(this,N)[0].before(...n);for(const s of X(this,N))s.remove();ds(this,N,n)}}N=new WeakMap;function Rt(t){return{createCallback(e,n,s){this.processCallback(e,n,s)},processCallback(e,n,s){var i;if(!(typeof s!="object"||!s)){for(const r of n)if(r.expression in s){const o=(i=s[r.expression])!==null&&i!==void 0?i:"";t(r,o)}}}}}function _t(t,e){t.value=String(e)}function fs(t,e){return typeof e=="boolean"&&t instanceof $t&&typeof t.element[t.attributeName]=="boolean"?(t.booleanValue=e,!0):!1}const Fo=Rt(_t),Du=v("p",Rt((t,e)=>{fs(t,e)||_t(t,e)}));var hs=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n},ze=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},me,pe;function*Wo(t){const e=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,null,!1);let n;for(;n=e.nextNode();)if(n instanceof Element&&n.hasAttributes())for(let s=0;s{if(a){for(const c of gs)await c(e);Jo(s).then(r,o).catch(()=>{}).then(()=>{for(const c of ps)c(e)})}else e.submit()},a=>{e.submit(),setTimeout(()=>{throw a})})}async function Xo(t,e,n,s){let i=!1;for(const r of t){const[o,a]=ms(),c=()=>(i=!0,a(),s),l={text:c,json:()=>(n.headers.set("Accept","application/json"),c()),html:()=>(n.headers.set("Accept","text/html"),c())};await Promise.race([o,r(e,l,n)])}return i}function Go(t){const e={method:t.method||"GET",url:t.action,headers:new Headers({"X-Requested-With":"XMLHttpRequest"}),body:null};if(e.method.toUpperCase()==="GET"){const n=Bo(t);n&&(e.url+=(~e.url.indexOf("?")?"&":"?")+n)}else e.body=new FormData(t);return e}async function Jo(t){const e=await window.fetch(t.url,{method:t.method,body:t.body!==null?t.body:void 0,headers:t.headers,credentials:"same-origin"}),n={url:e.url,status:e.status,statusText:e.statusText,headers:e.headers,text:"",get json(){const i=this,r=JSON.parse(i.text);return delete i.json,i.json=r,i.json},get html(){const i=this;return delete i.html,i.html=qo(document,i.text),i.html}},s=await e.text();if(n.text=s,e.ok)return n;throw new Uo("request failed",n)}const bs="data-close-dialog",vs=`[${bs}]`;function ws(t){let e=Array.from(t.querySelectorAll("[autofocus]")).filter(ys)[0];e||(e=t,t.setAttribute("tabindex","-1")),e.focus()}function Es(t){const e=t.currentTarget;e instanceof Element&&(t.key==="Escape"||t.key==="Esc"?(Ht(e,!1),t.stopPropagation()):t.key==="Tab"&&Zo(t))}function ys(t){return t.tabIndex>=0&&!t.disabled&&Qo(t)}function Qo(t){return!t.hidden&&(!t.type||t.type!=="hidden")&&(t.offsetWidth>0||t.offsetHeight>0)}function Zo(t){if(!(t.currentTarget instanceof Element))return;const e=t.currentTarget.querySelector("details-dialog");if(!e)return;t.preventDefault();const n=Array.from(e.querySelectorAll("*")).filter(ys);if(n.length===0)return;const s=t.shiftKey?-1:1,i=e.getRootNode(),r=e.contains(i.activeElement)?i.activeElement:null;let o=s===-1?-1:0;if(r instanceof HTMLElement){const a=n.indexOf(r);a!==-1&&(o=a+s)}o<0?o=n.length-1:o=o%n.length,n[o].focus()}function ks(t){const e=t.querySelector("details-dialog");return e instanceof Q?e.dispatchEvent(new CustomEvent("details-dialog-close",{bubbles:!0,cancelable:!0})):!0}function Ts(t){if(!(t.currentTarget instanceof Element))return;const e=t.currentTarget.closest("details");!e||!e.hasAttribute("open")||ks(e)||(t.preventDefault(),t.stopPropagation())}function As(t){const e=t.currentTarget;if(!(e instanceof Element))return;const n=e.querySelector("details-dialog");if(n instanceof Q)if(e.hasAttribute("open")){const s="getRootNode"in n?n.getRootNode():document;s.activeElement instanceof HTMLElement&&q.set(n,{details:e,activeElement:s.activeElement}),ws(n),e.addEventListener("keydown",Es)}else{for(const i of n.querySelectorAll("form"))i.reset();const s=ea(e,n);s&&s.focus(),e.removeEventListener("keydown",Es)}}function ea(t,e){const n=q.get(e);return n&&n.activeElement instanceof HTMLElement?n.activeElement:t.querySelector("summary")}function Ht(t,e){e!==t.hasAttribute("open")&&(e?t.setAttribute("open",""):ks(t)&&t.removeAttribute("open"))}function Ye(t){const e=t.currentTarget;if(!(e instanceof Element))return;const n=e.querySelector("details-dialog");if(!(n instanceof Q))return;const s=n.querySelector("include-fragment:not([src])");if(!s)return;const i=n.src;i!==null&&(s.addEventListener("loadend",()=>{e.hasAttribute("open")&&ws(n)}),s.setAttribute("src",i),Ot(e))}function xs(t,e,n){Ot(t),e&&t.addEventListener("toggle",Ye,{once:!0}),e&&n&&t.addEventListener("mouseover",Ye,{once:!0})}function Ot(t){t.removeEventListener("toggle",Ye),t.removeEventListener("mouseover",Ye)}const q=new WeakMap;class Q extends HTMLElement{static get CLOSE_ATTR(){return bs}static get CLOSE_SELECTOR(){return vs}constructor(){super();q.set(this,{details:null,activeElement:null}),this.addEventListener("click",function({target:e}){if(!(e instanceof Element))return;const n=e.closest("details");n&&e.closest(vs)&&Ht(n,!1)})}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e||"")}get preload(){return this.hasAttribute("preload")}set preload(e){e?this.setAttribute("preload",""):this.removeAttribute("preload")}connectedCallback(){this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true");const e=q.get(this);if(!e)return;const n=this.parentElement;if(!n)return;const s=n.querySelector("summary");s&&(s.hasAttribute("role")||s.setAttribute("role","button"),s.addEventListener("click",Ts,{capture:!0})),n.addEventListener("toggle",As),e.details=n,xs(n,this.src,this.preload)}disconnectedCallback(){const e=q.get(this);if(!e)return;const{details:n}=e;if(!n)return;n.removeEventListener("toggle",As),Ot(n);const s=n.querySelector("summary");s&&s.removeEventListener("click",Ts,{capture:!0}),e.details=null}toggle(e){const n=q.get(this);if(!n)return;const{details:s}=n;!s||Ht(s,e)}static get observedAttributes(){return["src","preload"]}attributeChangedCallback(){const e=q.get(this);if(!e)return;const{details:n}=e;!n||xs(n,this.src,this.preload)}}v("D",Q),window.customElements.get("details-dialog")||(window.DetailsDialogElement=Q,window.customElements.define("details-dialog",Q));function ta(t,e=0,{start:n=!0,middle:s=!0,once:i=!1}={}){var r=0,o,a=!1,c=function l(...u){if(!a){var d=Date.now()-r;r=Date.now(),n?(n=!1,t(...u),i&&l.cancel()):(s&&do=c;e.dispatchEvent(new CustomEvent("auto-check-start",{bubbles:!0,detail:{setValidity:a}})),n.required&&e.setCustomValidity(o)}function sa(){return"AbortController"in window?new AbortController:{signal:null,abort(){}}}async function ia(t,e,n){try{const s=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),s}catch(s){throw s.name!=="AbortError"&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),s}}async function ra(t){const e=t.input;if(!e)return;const n=t.src,s=t.csrf,i=be.get(t);if(!n||!s||!i){t.required&&e.setCustomValidity("");return}if(!e.value.trim()){t.required&&e.setCustomValidity("");return}const r=new FormData;r.append("authenticity_token",s),r.append("value",e.value),e.dispatchEvent(new CustomEvent("auto-check-send",{bubbles:!0,detail:{body:r}})),i.controller?i.controller.abort():t.dispatchEvent(new CustomEvent("loadstart")),i.controller=sa();try{const o=await ia(t,n,{credentials:"same-origin",signal:i.controller.signal,method:"POST",body:r});o.ok?oa(o,e,t.required):aa(o,e,t.required),i.controller=null,e.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0}))}catch(o){o.name!=="AbortError"&&(i.controller=null,e.dispatchEvent(new CustomEvent("auto-check-complete",{bubbles:!0})))}}function oa(t,e,n){n&&e.setCustomValidity(""),e.dispatchEvent(new CustomEvent("auto-check-success",{bubbles:!0,detail:{response:t.clone()}}))}function aa(t,e,n){let s="Validation failed";const i=r=>s=r;e.dispatchEvent(new CustomEvent("auto-check-error",{bubbles:!0,detail:{response:t.clone(),setValidity:i}})),n&&e.setCustomValidity(s)}window.customElements.get("auto-check")||(window.AutoCheckElement=Ft,window.customElements.define("auto-check",Ft));class Ss extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(e){e?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(e){this.setAttribute("src",e)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const e=this.parentElement;if(!e)return;const n=e.querySelector("summary");n&&(n.setAttribute("aria-haspopup","menu"),n.hasAttribute("role")||n.setAttribute("role","button"));const s=[M(e,"compositionstart",i=>Rs(this,i)),M(e,"compositionend",i=>Rs(this,i)),M(e,"click",i=>Ns(e,i)),M(e,"change",i=>Ns(e,i)),M(e,"keydown",i=>ha(e,this,i)),M(e,"toggle",()=>Ms(e,this),{once:!0}),M(e,"toggle",()=>ua(e)),this.preload?M(e,"mouseover",()=>Ms(e,this),{once:!0}):ca,...la(e)];Z.set(this,{subscriptions:s,loaded:!1,isComposing:!1})}disconnectedCallback(){const e=Z.get(this);if(!!e){Z.delete(this);for(const n of e.subscriptions)n.unsubscribe()}}}const Z=new WeakMap,ca={unsubscribe(){}};function M(t,e,n,s=!1){return t.addEventListener(e,n,s),{unsubscribe:()=>{t.removeEventListener(e,n,s)}}}function Ms(t,e){const n=e.getAttribute("src");if(!n)return;const s=Z.get(e);if(!s||s.loaded)return;s.loaded=!0;const i=e.querySelector("include-fragment");i&&!i.hasAttribute("src")&&(i.addEventListener("loadend",()=>Cs(t)),i.setAttribute("src",n))}function la(t){let e=!1;const n=()=>e=!0,s=()=>e=!1,i=()=>{!t.hasAttribute("open")||Cs(t)||e||da(t)};return[M(t,"mousedown",n),M(t,"keydown",s),M(t,"toggle",i)]}function ua(t){if(!!t.hasAttribute("open"))for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}function Cs(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return e?(e.focus(),!0):!1}function da(t){const e=document.activeElement;if(e&&Ds(e)&&t.contains(e))return;const n=ve(t,!0);n&&n.focus()}function ve(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled]):not([aria-disabled="true"])')),s=document.activeElement,i=s instanceof HTMLElement?n.indexOf(s):-1,r=e?n[i+1]:n[i-1],o=e?n[0]:n[n.length-1];return r||o}const Is=navigator.userAgent.match(/Macintosh/);function Ns(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t){if(e.type==="click"){const s=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!s)return;const i=s.querySelector("input");if(s.tagName==="LABEL"&&n===i)return;s.tagName==="LABEL"&&i&&!i.checked||Ps(s,t)}else if(e.type==="change"){const s=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');s&&Ps(s,t)}}}function fa(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const s=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();s instanceof HTMLInputElement&&(i=s.indeterminate?"mixed":s.checked.toString()),n.setAttribute("aria-checked",i)}}function Ps(t,e){if(t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return;const n=t.closest("details-menu");!n||!n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))||(ma(t,e),fa(t,e),t.getAttribute("role")!=="menuitemcheckbox"&&$s(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function ha(t,e,n){if(!(n instanceof KeyboardEvent)||t.querySelector("details[open]"))return;const s=Z.get(e);if(!s||s.isComposing)return;const i=n.target instanceof Element&&n.target.tagName==="SUMMARY";switch(n.key){case"Escape":t.hasAttribute("open")&&($s(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{i&&!t.hasAttribute("open")&&t.setAttribute("open","");const r=ve(t,!0);r&&r.focus(),n.preventDefault()}break;case"ArrowUp":{i&&!t.hasAttribute("open")&&t.setAttribute("open","");const r=ve(t,!1);r&&r.focus(),n.preventDefault()}break;case"n":if(Is&&n.ctrlKey){const r=ve(t,!0);r&&r.focus(),n.preventDefault()}break;case"p":if(Is&&n.ctrlKey){const r=ve(t,!1);r&&r.focus(),n.preventDefault()}break;case" ":case"Enter":{const r=document.activeElement;r instanceof HTMLElement&&Ds(r)&&r.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),r.click())}break}}function Ds(t){const e=t.getAttribute("role");return e==="menuitem"||e==="menuitemcheckbox"||e==="menuitemradio"}function $s(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const n=t.querySelector("summary");n&&n.focus()}function ma(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const s=pa(t);if(s)n.textContent=s;else{const i=ga(t);i&&(n.innerHTML=i)}}function pa(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}function ga(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}function Rs(t,e){const n=Z.get(t);!n||(n.isComposing=e.type==="compositionstart")}window.customElements.get("details-menu")||(window.DetailsMenuElement=Ss,window.customElements.define("details-menu",Ss));class H{constructor(e,n){this.file=e,this.directory=n,this.state="pending",this.id=null,this.href=null,this.name=null,this.percent=0}static traverse(e,n){return ba(e,n)}static from(e){const n=[];for(const s of e)if(s instanceof File)n.push(new H(s));else if(s instanceof H)n.push(s);else throw new Error("Unexpected type");return n}get fullPath(){return this.directory?`${this.directory}/${this.file.name}`:this.file.name}isImage(){return["image/gif","image/png","image/jpg","image/jpeg"].indexOf(this.file.type)>-1}isVideo(){return["video/mp4","video/quicktime"].indexOf(this.file.type)>-1}saving(e){if(this.state!=="pending"&&this.state!=="saving")throw new Error(`Unexpected transition from ${this.state} to saving`);this.state="saving",this.percent=e}saved(e){var n,s,i;if(this.state!=="pending"&&this.state!=="saving")throw new Error(`Unexpected transition from ${this.state} to saved`);this.state="saved",this.id=(n=e==null?void 0:e.id)!==null&&n!==void 0?n:null,this.href=(s=e==null?void 0:e.href)!==null&&s!==void 0?s:null,this.name=(i=e==null?void 0:e.name)!==null&&i!==void 0?i:null}isPending(){return this.state==="pending"}isSaving(){return this.state==="saving"}isSaved(){return this.state==="saved"}}v("af",H);function ba(t,e){return e&&ya(t)?Hs("",ka(t)):Promise.resolve(_s(Array.from(t.files||[])).map(n=>new H(n)))}function va(t){return t.name.startsWith(".")}function _s(t){return Array.from(t).filter(e=>!va(e))}function wa(t){return new Promise(function(e,n){t.file(e,n)})}function Ea(t){return new Promise(function(e,n){const s=[],i=t.createReader(),r=()=>{i.readEntries(o=>{o.length>0?(s.push(...o),r()):e(s)},n)};r()})}async function Hs(t,e){const n=[];for(const s of _s(e))if(s.isDirectory)n.push(...await Hs(s.fullPath,await Ea(s)));else{const i=await wa(s);n.push(new H(i,t))}return n}function ya(t){return t.items&&Array.from(t.items).some(e=>{const n=e.webkitGetAsEntry&&e.webkitGetAsEntry();return n&&n.isDirectory})}function ka(t){return Array.from(t.items).map(e=>e.webkitGetAsEntry()).filter(e=>e!=null)}class we extends HTMLElement{connectedCallback(){this.addEventListener("dragenter",Xe),this.addEventListener("dragover",Xe),this.addEventListener("dragleave",Fs),this.addEventListener("drop",Ws),this.addEventListener("paste",qs),this.addEventListener("change",Bs)}disconnectedCallback(){this.removeEventListener("dragenter",Xe),this.removeEventListener("dragover",Xe),this.removeEventListener("dragleave",Fs),this.removeEventListener("drop",Ws),this.removeEventListener("paste",qs),this.removeEventListener("change",Bs)}get directory(){return this.hasAttribute("directory")}set directory(e){e?this.setAttribute("directory",""):this.removeAttribute("directory")}async attach(e){const n=e instanceof DataTransfer?await H.traverse(e,this.directory):H.from(e);this.dispatchEvent(new CustomEvent("file-attachment-accept",{bubbles:!0,cancelable:!0,detail:{attachments:n}}))&&n.length&&this.dispatchEvent(new CustomEvent("file-attachment-accepted",{bubbles:!0,detail:{attachments:n}}))}}function Os(t){return Array.from(t.types).indexOf("Files")>=0}let Wt=null;function Xe(t){const e=t.currentTarget;Wt&&clearTimeout(Wt),Wt=window.setTimeout(()=>e.removeAttribute("hover"),200);const n=t.dataTransfer;!n||!Os(n)||(n.dropEffect="copy",e.setAttribute("hover",""),t.preventDefault())}function Fs(t){t.dataTransfer&&(t.dataTransfer.dropEffect="none"),t.currentTarget.removeAttribute("hover"),t.stopPropagation(),t.preventDefault()}function Ws(t){const e=t.currentTarget;if(!(e instanceof we))return;e.removeAttribute("hover");const n=t.dataTransfer;!n||!Os(n)||(e.attach(n),t.stopPropagation(),t.preventDefault())}const Ta=/^image\/(gif|png|jpeg)$/;function Aa(t){for(const e of t)if(e.kind==="file"&&Ta.test(e.type))return e.getAsFile();return null}function qs(t){if(!t.clipboardData||!t.clipboardData.items)return;const e=t.currentTarget;if(!(e instanceof we))return;const n=Aa(t.clipboardData.items);if(!n)return;const s=[n];e.attach(s),t.preventDefault()}function Bs(t){const e=t.currentTarget;if(!(e instanceof we))return;const n=t.target;if(!(n instanceof HTMLInputElement))return;const s=e.getAttribute("input");if(s&&n.id!==s)return;const i=n.files;!i||i.length===0||(e.attach(i),n.value="")}window.customElements.get("file-attachment")||(window.FileAttachmentElement=we,window.customElements.define("file-attachment",we));class qt extends HTMLElement{constructor(){super();this.currentQuery=null,this.filter=null,this.debounceInputChange=Ca(()=>Bt(this,!0)),this.boundFilterResults=()=>{Bt(this,!1)}}static get observedAttributes(){return["aria-owns"]}attributeChangedCallback(e,n){n&&e==="aria-owns"&&Bt(this,!1)}connectedCallback(){const e=this.input;!e||(e.setAttribute("autocomplete","off"),e.setAttribute("spellcheck","false"),e.addEventListener("focus",this.boundFilterResults),e.addEventListener("change",this.boundFilterResults),e.addEventListener("input",this.debounceInputChange))}disconnectedCallback(){const e=this.input;!e||(e.removeEventListener("focus",this.boundFilterResults),e.removeEventListener("change",this.boundFilterResults),e.removeEventListener("input",this.debounceInputChange))}get input(){const e=this.querySelector("input");return e instanceof HTMLInputElement?e:null}reset(){const e=this.input;e&&(e.value="",e.dispatchEvent(new Event("change",{bubbles:!0})))}}v("G",qt);async function Bt(t,e=!1){const n=t.input;if(!n)return;const s=n.value.trim(),i=t.getAttribute("aria-owns");if(!i)return;const r=document.getElementById(i);if(!r)return;const o=r.hasAttribute("data-filter-list")?r:r.querySelector("[data-filter-list]");if(!o||(t.dispatchEvent(new CustomEvent("filter-input-start",{bubbles:!0})),e&&t.currentQuery===s))return;t.currentQuery=s;const a=t.filter||xa,c=o.childElementCount;let l=0,u=!1;for(const h of Array.from(o.children)){if(!(h instanceof HTMLElement))continue;const m=La(h),f=a(h,m,s);f.hideNew===!0&&(u=f.hideNew),h.hidden=!f.match,f.match&&l++}const d=r.querySelector("[data-filter-new-item]"),p=!!d&&s.length>0&&!u;d instanceof HTMLElement&&(d.hidden=!p,p&&Sa(d,s)),Ma(r,l>0||p),t.dispatchEvent(new CustomEvent("filter-input-updated",{bubbles:!0,detail:{count:l,total:c}}))}function xa(t,e,n){return{match:e.toLowerCase().indexOf(n.toLowerCase())!==-1,hideNew:e===n}}function La(t){return((t.querySelector("[data-filter-item-text]")||t).textContent||"").trim()}function Sa(t,e){const n=t.querySelector("[data-filter-new-item-text]");n&&(n.textContent=e);const s=t.querySelector("[data-filter-new-item-value]");(s instanceof HTMLInputElement||s instanceof HTMLButtonElement)&&(s.value=e)}function Ma(t,e){const n=t.querySelector("[data-filter-empty-state]");n instanceof HTMLElement&&(n.hidden=e)}function Ca(t){let e;return function(){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t()},300)}}window.customElements.get("filter-input")||(window.FilterInputElement=qt,window.customElements.define("filter-input",qt));function Ia(){const t=/\bWindows NT 6.1\b/.test(navigator.userAgent),e=/\bWindows NT 6.2\b/.test(navigator.userAgent),n=/\bWindows NT 6.3\b/.test(navigator.userAgent),s=/\bFreeBSD\b/.test(navigator.userAgent),i=/\bLinux\b/.test(navigator.userAgent)&&!/\bAndroid\b/.test(navigator.userAgent);return!(t||e||n||i||s)}const Na=new Set(["\u{1F44B}","\u{1F91A}","\u{1F590}\uFE0F","\u270B","\u{1F596}","\u{1F44C}","\u{1F90F}","\u270C\uFE0F","\u{1F91E}","\u{1F91F}","\u{1F918}","\u{1F919}","\u{1F448}","\u{1F449}","\u{1F446}","\u{1F595}","\u{1F447}","\u261D\uFE0F","\u{1F44D}","\u{1F44E}","\u270A","\u{1F44A}","\u{1F91B}","\u{1F91C}","\u{1F44F}","\u{1F64C}","\u{1F450}","\u{1F932}","\u{1F64F}","\u270D\uFE0F","\u{1F485}","\u{1F933}","\u{1F4AA}","\u{1F9B5}","\u{1F9B6}","\u{1F442}","\u{1F9BB}","\u{1F443}","\u{1F476}","\u{1F9D2}","\u{1F466}","\u{1F467}","\u{1F9D1}","\u{1F471}","\u{1F468}","\u{1F9D4}","\u{1F471}\u200D\u2642\uFE0F","\u{1F468}\u200D\u{1F9B0}","\u{1F468}\u200D\u{1F9B1}","\u{1F468}\u200D\u{1F9B3}","\u{1F468}\u200D\u{1F9B2}","\u{1F469}","\u{1F471}\u200D\u2640\uFE0F","\u{1F469}\u200D\u{1F9B0}","\u{1F469}\u200D\u{1F9B1}","\u{1F469}\u200D\u{1F9B3}","\u{1F469}\u200D\u{1F9B2}","\u{1F9D3}","\u{1F474}","\u{1F475}","\u{1F64D}","\u{1F64D}\u200D\u2642\uFE0F","\u{1F64D}\u200D\u2640\uFE0F","\u{1F64E}","\u{1F64E}\u200D\u2642\uFE0F","\u{1F64E}\u200D\u2640\uFE0F","\u{1F645}","\u{1F645}\u200D\u2642\uFE0F","\u{1F645}\u200D\u2640\uFE0F","\u{1F646}","\u{1F646}\u200D\u2642\uFE0F","\u{1F646}\u200D\u2640\uFE0F","\u{1F481}","\u{1F481}\u200D\u2642\uFE0F","\u{1F481}\u200D\u2640\uFE0F","\u{1F64B}","\u{1F64B}\u200D\u2642\uFE0F","\u{1F64B}\u200D\u2640\uFE0F","\u{1F9CF}","\u{1F9CF}\u200D\u2642\uFE0F","\u{1F9CF}\u200D\u2640\uFE0F","\u{1F647}","\u{1F647}\u200D\u2642\uFE0F","\u{1F647}\u200D\u2640\uFE0F","\u{1F926}","\u{1F926}\u200D\u2642\uFE0F","\u{1F926}\u200D\u2640\uFE0F","\u{1F937}","\u{1F937}\u200D\u2642\uFE0F","\u{1F937}\u200D\u2640\uFE0F","\u{1F468}\u200D\u2695\uFE0F","\u{1F469}\u200D\u2695\uFE0F","\u{1F468}\u200D\u{1F393}","\u{1F469}\u200D\u{1F393}","\u{1F468}\u200D\u{1F3EB}","\u{1F469}\u200D\u{1F3EB}","\u{1F468}\u200D\u2696\uFE0F","\u{1F469}\u200D\u2696\uFE0F","\u{1F468}\u200D\u{1F33E}","\u{1F469}\u200D\u{1F33E}","\u{1F468}\u200D\u{1F373}","\u{1F469}\u200D\u{1F373}","\u{1F468}\u200D\u{1F527}","\u{1F469}\u200D\u{1F527}","\u{1F468}\u200D\u{1F3ED}","\u{1F469}\u200D\u{1F3ED}","\u{1F468}\u200D\u{1F4BC}","\u{1F469}\u200D\u{1F4BC}","\u{1F468}\u200D\u{1F52C}","\u{1F469}\u200D\u{1F52C}","\u{1F468}\u200D\u{1F4BB}","\u{1F469}\u200D\u{1F4BB}","\u{1F468}\u200D\u{1F3A4}","\u{1F469}\u200D\u{1F3A4}","\u{1F468}\u200D\u{1F3A8}","\u{1F469}\u200D\u{1F3A8}","\u{1F468}\u200D\u2708\uFE0F","\u{1F469}\u200D\u2708\uFE0F","\u{1F468}\u200D\u{1F680}","\u{1F469}\u200D\u{1F680}","\u{1F468}\u200D\u{1F692}","\u{1F469}\u200D\u{1F692}","\u{1F46E}","\u{1F46E}\u200D\u2642\uFE0F","\u{1F46E}\u200D\u2640\uFE0F","\u{1F575}\uFE0F","\u{1F575}\uFE0F\u200D\u2642\uFE0F","\u{1F575}\uFE0F\u200D\u2640\uFE0F","\u{1F482}","\u{1F482}\u200D\u2642\uFE0F","\u{1F482}\u200D\u2640\uFE0F","\u{1F477}","\u{1F477}\u200D\u2642\uFE0F","\u{1F477}\u200D\u2640\uFE0F","\u{1F934}","\u{1F478}","\u{1F473}","\u{1F473}\u200D\u2642\uFE0F","\u{1F473}\u200D\u2640\uFE0F","\u{1F472}","\u{1F9D5}","\u{1F935}","\u{1F470}","\u{1F930}","\u{1F931}","\u{1F47C}","\u{1F385}","\u{1F936}","\u{1F9B8}","\u{1F9B8}\u200D\u2642\uFE0F","\u{1F9B8}\u200D\u2640\uFE0F","\u{1F9B9}","\u{1F9B9}\u200D\u2642\uFE0F","\u{1F9B9}\u200D\u2640\uFE0F","\u{1F9D9}","\u{1F9D9}\u200D\u2642\uFE0F","\u{1F9D9}\u200D\u2640\uFE0F","\u{1F9DA}","\u{1F9DA}\u200D\u2642\uFE0F","\u{1F9DA}\u200D\u2640\uFE0F","\u{1F9DB}","\u{1F9DB}\u200D\u2642\uFE0F","\u{1F9DB}\u200D\u2640\uFE0F","\u{1F9DC}","\u{1F9DC}\u200D\u2642\uFE0F","\u{1F9DC}\u200D\u2640\uFE0F","\u{1F9DD}","\u{1F9DD}\u200D\u2642\uFE0F","\u{1F9DD}\u200D\u2640\uFE0F","\u{1F486}","\u{1F486}\u200D\u2642\uFE0F","\u{1F486}\u200D\u2640\uFE0F","\u{1F487}","\u{1F487}\u200D\u2642\uFE0F","\u{1F487}\u200D\u2640\uFE0F","\u{1F6B6}","\u{1F6B6}\u200D\u2642\uFE0F","\u{1F6B6}\u200D\u2640\uFE0F","\u{1F9CD}","\u{1F9CD}\u200D\u2642\uFE0F","\u{1F9CD}\u200D\u2640\uFE0F","\u{1F9CE}","\u{1F9CE}\u200D\u2642\uFE0F","\u{1F9CE}\u200D\u2640\uFE0F","\u{1F468}\u200D\u{1F9AF}","\u{1F469}\u200D\u{1F9AF}","\u{1F468}\u200D\u{1F9BC}","\u{1F469}\u200D\u{1F9BC}","\u{1F468}\u200D\u{1F9BD}","\u{1F469}\u200D\u{1F9BD}","\u{1F3C3}","\u{1F3C3}\u200D\u2642\uFE0F","\u{1F3C3}\u200D\u2640\uFE0F","\u{1F483}","\u{1F57A}","\u{1F574}\uFE0F","\u{1F9D6}","\u{1F9D6}\u200D\u2642\uFE0F","\u{1F9D6}\u200D\u2640\uFE0F","\u{1F9D7}","\u{1F9D7}\u200D\u2642\uFE0F","\u{1F9D7}\u200D\u2640\uFE0F","\u{1F3C7}","\u{1F3C2}","\u{1F3CC}\uFE0F","\u{1F3CC}\uFE0F\u200D\u2642\uFE0F","\u{1F3CC}\uFE0F\u200D\u2640\uFE0F","\u{1F3C4}","\u{1F3C4}\u200D\u2642\uFE0F","\u{1F3C4}\u200D\u2640\uFE0F","\u{1F6A3}","\u{1F6A3}\u200D\u2642\uFE0F","\u{1F6A3}\u200D\u2640\uFE0F","\u{1F3CA}","\u{1F3CA}\u200D\u2642\uFE0F","\u{1F3CA}\u200D\u2640\uFE0F","\u26F9\uFE0F","\u26F9\uFE0F\u200D\u2642\uFE0F","\u26F9\uFE0F\u200D\u2640\uFE0F","\u{1F3CB}\uFE0F","\u{1F3CB}\uFE0F\u200D\u2642\uFE0F","\u{1F3CB}\uFE0F\u200D\u2640\uFE0F","\u{1F6B4}","\u{1F6B4}\u200D\u2642\uFE0F","\u{1F6B4}\u200D\u2640\uFE0F","\u{1F6B5}","\u{1F6B5}\u200D\u2642\uFE0F","\u{1F6B5}\u200D\u2640\uFE0F","\u{1F938}","\u{1F938}\u200D\u2642\uFE0F","\u{1F938}\u200D\u2640\uFE0F","\u{1F93D}","\u{1F93D}\u200D\u2642\uFE0F","\u{1F93D}\u200D\u2640\uFE0F","\u{1F93E}","\u{1F93E}\u200D\u2642\uFE0F","\u{1F93E}\u200D\u2640\uFE0F","\u{1F939}","\u{1F939}\u200D\u2642\uFE0F","\u{1F939}\u200D\u2640\uFE0F","\u{1F9D8}","\u{1F9D8}\u200D\u2642\uFE0F","\u{1F9D8}\u200D\u2640\uFE0F","\u{1F6C0}","\u{1F6CC}","\u{1F9D1}\u200D\u{1F91D}\u200D\u{1F9D1}","\u{1F46D}","\u{1F46B}","\u{1F46C}"]);function Ge(t){return Na.has(t)}const Je="\u200D",Pa=65039;function Da(t,e){const n=Qe(t);if(!Ge(n))return t;const s=js(e);return s?n.split(Je).map(i=>Ge(i)?Us(i,s):i).join(Je):t}function $a(t,e){const n=Qe(t);if(!Ge(n))return t;const s=e.map(i=>js(i));return n.split(Je).map(i=>{if(!Ge(i))return i;const r=s.shift();return r?Us(i,r):i}).join(Je)}function Qe(t){return[...t].filter(e=>!Vs(e.codePointAt(0))).join("")}function Us(t,e){const n=[...t].map(s=>s.codePointAt(0));return n[1]&&(Vs(n[1])||n[1]===Pa)?n[1]=e:n.splice(1,0,e),String.fromCodePoint(...n)}function Vs(t){return t>=127995&&t<=127999}function js(t){switch(t){case 1:return 127995;case 2:return 127996;case 3:return 127997;case 4:return 127998;case 5:return 127999;default:return null}}class Ks extends HTMLElement{get image(){return this.firstElementChild instanceof HTMLImageElement?this.firstElementChild:null}get tone(){return(this.getAttribute("tone")||"").split(" ").map(e=>{const n=parseInt(e,10);return n>=0&&n<=5?n:0}).join(" ")}set tone(e){this.setAttribute("tone",e)}connectedCallback(){if(this.image===null&&!Ia()){const e=this.getAttribute("fallback-src");if(e){this.textContent="";const n=Ra(this);n.src=e,this.appendChild(n)}}this.hasAttribute("tone")&&zs(this)}static get observedAttributes(){return["tone"]}attributeChangedCallback(e){switch(e){case"tone":zs(this);break}}}function zs(t){if(t.image)return;const e=t.tone.split(" ").map(n=>parseInt(n,10));if(e.length===0)t.textContent=Qe(t.textContent||"");else if(e.length===1){const n=e[0];t.textContent=n===0?Qe(t.textContent||""):Da(t.textContent||"",n)}else t.textContent=$a(t.textContent||"",e)}function Ra(t){const e=document.createElement("img");return e.className="emoji",e.alt=t.getAttribute("alias")||"",e.height=20,e.width=20,e}window.customElements.get("g-emoji")||(window.GEmojiElement=Ks,window.customElements.define("g-emoji",Ks));const Ys=new WeakMap,Ut=new IntersectionObserver(t=>{for(const e of t)if(e.isIntersecting){const{target:n}=e;if(Ut.unobserve(n),!(n instanceof et))return;n.loading==="lazy"&&Ze(n)}},{rootMargin:"0px 0px 256px 0px",threshold:.01});function Vt(){return new Promise(t=>setTimeout(t,0))}async function Ze(t){return Ut.unobserve(t),jt(t).then(function(e){const n=document.createElement("template");n.innerHTML=e;const s=document.importNode(n.content,!0);!t.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:s}}))||(t.replaceWith(s),t.dispatchEvent(new CustomEvent("include-fragment-replaced")))},function(){t.classList.add("is-error")})}function jt(t){const e=t.src;let n=Ys.get(t);return n&&n.src===e?n.data:(e?n=_a(t):n=Promise.reject(new Error("missing src")),Ys.set(t,{src:e,data:n}),n)}function _a(t){return Vt().then(()=>(t.dispatchEvent(new Event("loadstart")),t.fetch(t.request()))).then(e=>{if(e.status!==200)throw new Error(`Failed to load resource: the server responded with a status of ${e.status}`);const n=e.headers.get("Content-Type");if(!Ha(t.accept)&&(!n||!n.includes(t.accept?t.accept:"text/html")))throw new Error(`Failed to load resource: expected ${t.accept||"text/html"} but was ${n}`);return e.text()}).then(e=>(Vt().then(()=>{t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend"))}),e),e=>{throw Vt().then(()=>{t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))}),e})}function Ha(t){return t&&!!t.split(",").find(e=>e.match(/^\s*\*\/\*/))}class et extends HTMLElement{static get observedAttributes(){return["src","loading"]}get src(){const e=this.getAttribute("src");if(e){const n=this.ownerDocument.createElement("a");return n.href=e,n.href}else return""}set src(e){this.setAttribute("src",e)}get loading(){return this.getAttribute("loading")==="lazy"?"lazy":"eager"}set loading(e){this.setAttribute("loading",e)}get accept(){return this.getAttribute("accept")||""}set accept(e){this.setAttribute("accept",e)}get data(){return jt(this)}attributeChangedCallback(e,n){e==="src"?this.isConnected&&this.loading==="eager"&&Ze(this):e==="loading"&&this.isConnected&&n!=="eager"&&this.loading==="eager"&&Ze(this)}connectedCallback(){this.src&&this.loading==="eager"&&Ze(this),this.loading==="lazy"&&Ut.observe(this)}request(){const e=this.src;if(!e)throw new Error("missing src");return new Request(e,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return jt(this)}fetch(e){return fetch(e)}}v("I",et),window.customElements.get("include-fragment")||(window.IncludeFragmentElement=et,window.customElements.define("include-fragment",et));const ee=new WeakMap,B=new WeakMap,P=new WeakMap;function Ee(t){const e=t.currentTarget;if(!(e instanceof ne))return;const{box:n,image:s}=P.get(e)||{};if(!n||!s)return;let i=0,r=0;if(t instanceof KeyboardEvent)t.key==="ArrowUp"?r=-1:t.key==="ArrowDown"?r=1:t.key==="ArrowLeft"?i=-1:t.key==="ArrowRight"&&(i=1);else if(B.has(e)&&t instanceof MouseEvent){const o=B.get(e);i=t.pageX-o.dragStartX,r=t.pageY-o.dragStartY}else if(B.has(e)&&t instanceof TouchEvent){const{pageX:o,pageY:a}=t.changedTouches[0],{dragStartX:c,dragStartY:l}=B.get(e);i=o-c,r=a-l}if(i!==0||r!==0){const o=Math.min(Math.max(0,n.offsetLeft+i),s.width-n.offsetWidth),a=Math.min(Math.max(0,n.offsetTop+r),s.height-n.offsetHeight);n.style.left=`${o}px`,n.style.top=`${a}px`,Zs(e,{x:o,y:a,width:n.offsetWidth,height:n.offsetHeight})}if(t instanceof MouseEvent)B.set(e,{dragStartX:t.pageX,dragStartY:t.pageY});else if(t instanceof TouchEvent){const{pageX:o,pageY:a}=t.changedTouches[0];B.set(e,{dragStartX:o,dragStartY:a})}}function te(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=Xs(e);if(!(n instanceof ne))return;const{box:s}=P.get(n)||{};if(!s)return;const i=n.getBoundingClientRect();let r,o,a;if(t instanceof KeyboardEvent){if(t.key==="Escape")return Qs(n);if(t.key==="-"&&(a=-10),t.key==="="&&(a=10),!a)return;r=s.offsetWidth+a,o=s.offsetHeight+a,ee.set(n,{startX:s.offsetLeft,startY:s.offsetTop})}else if(t instanceof MouseEvent){const c=ee.get(n);if(!c)return;r=t.pageX-c.startX-i.left-window.pageXOffset,o=t.pageY-c.startY-i.top-window.pageYOffset}else if(t instanceof TouchEvent){const c=ee.get(n);if(!c)return;r=t.changedTouches[0].pageX-c.startX-i.left-window.pageXOffset,o=t.changedTouches[0].pageY-c.startY-i.top-window.pageYOffset}r&&o&&Js(n,r,o,!(t instanceof KeyboardEvent))}function Xs(t){const e=t.getRootNode();return e instanceof ShadowRoot?e.host:t}function Gs(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;const n=Xs(e);if(!(n instanceof ne))return;const{box:s}=P.get(n)||{};if(!s)return;const i=t.target;if(i instanceof HTMLElement)if(i.hasAttribute("data-direction")){const r=i.getAttribute("data-direction")||"";n.addEventListener("mousemove",te),n.addEventListener("touchmove",te,{passive:!0}),["nw","se"].indexOf(r)>=0&&n.classList.add("nwse"),["ne","sw"].indexOf(r)>=0&&n.classList.add("nesw"),ee.set(n,{startX:s.offsetLeft+(["se","ne"].indexOf(r)>=0?0:s.offsetWidth),startY:s.offsetTop+(["se","sw"].indexOf(r)>=0?0:s.offsetHeight)}),te(t)}else n.addEventListener("mousemove",Ee),n.addEventListener("touchmove",Ee,{passive:!0})}function Js(t,e,n,s=!0){let i=Math.max(Math.abs(e),Math.abs(n),10);const r=ee.get(t);if(!r)return;const{box:o,image:a}=P.get(t)||{};if(!o||!a)return;i=Math.min(i,n>0?a.height-r.startY:r.startY,e>0?a.width-r.startX:r.startX);const c=s?Math.round(Math.max(0,e>0?r.startX:r.startX-i)):o.offsetLeft,l=s?Math.round(Math.max(0,n>0?r.startY:r.startY-i)):o.offsetTop;o.style.left=`${c}px`,o.style.top=`${l}px`,o.style.width=`${i}px`,o.style.height=`${i}px`,Zs(t,{x:c,y:l,width:i,height:i})}function Qs(t){const{image:e}=P.get(t)||{};if(!e)return;const n=Math.round(e.clientWidth>e.clientHeight?e.clientHeight:e.clientWidth);ee.set(t,{startX:(e.clientWidth-n)/2,startY:(e.clientHeight-n)/2}),Js(t,n,n)}function Kt(t){const e=t.currentTarget;e instanceof ne&&(B.delete(e),e.classList.remove("nwse","nesw"),e.removeEventListener("mousemove",te),e.removeEventListener("mousemove",Ee),e.removeEventListener("touchmove",te),e.removeEventListener("touchmove",Ee))}function Zs(t,e){const{image:n}=P.get(t)||{};if(!n)return;const s=n.naturalWidth/n.width;for(const i in e){const r=Math.round(e[i]*s);e[i]=r;const o=t.querySelector(`[data-image-crop-input='${i}']`);o instanceof HTMLInputElement&&(o.value=r.toString())}t.dispatchEvent(new CustomEvent("image-crop-change",{bubbles:!0,detail:e}))}class ne extends HTMLElement{connectedCallback(){if(P.has(this))return;const e=this.attachShadow({mode:"open"});e.innerHTML=`
`;const n=e.querySelector("[data-crop-box]");if(!(n instanceof HTMLElement))return;const s=e.querySelector("img");s instanceof HTMLImageElement&&(P.set(this,{box:n,image:s}),s.addEventListener("load",()=>{this.loaded=!0,Qs(this)}),this.addEventListener("mouseleave",Kt),this.addEventListener("touchend",Kt),this.addEventListener("mouseup",Kt),n.addEventListener("mousedown",Gs),n.addEventListener("touchstart",Gs,{passive:!0}),this.addEventListener("keydown",Ee),this.addEventListener("keydown",te),this.src&&(s.src=this.src))}static get observedAttributes(){return["src"]}get src(){return this.getAttribute("src")}set src(e){e?this.setAttribute("src",e):this.removeAttribute("src")}get loaded(){return this.hasAttribute("loaded")}set loaded(e){e?this.setAttribute("loaded",""):this.removeAttribute("loaded")}attributeChangedCallback(e,n,s){const{image:i}=P.get(this)||{};e==="src"&&(this.loaded=!1,i&&(i.src=s))}}window.customElements.get("image-crop")||(window.ImageCropElement=ne,window.customElements.define("image-crop",ne));const Oa=["[data-md-button]","md-header","md-bold","md-italic","md-quote","md-code","md-link","md-image","md-unordered-list","md-ordered-list","md-task-list","md-mention","md-ref","md-strikethrough"];function ei(t){const e=[];for(const n of t.querySelectorAll(Oa.join(", ")))n.hidden||n.offsetWidth<=0&&n.offsetHeight<=0||n.closest("markdown-toolbar")===t&&e.push(n);return e}function Fa(t){return function(e){(e.key===" "||e.key==="Enter")&&(e.preventDefault(),t(e))}}const A=new WeakMap;class L extends HTMLElement{constructor(){super();const e=()=>{const n=A.get(this);!n||vi(this,n)};this.addEventListener("keydown",Fa(e)),this.addEventListener("click",e)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","button")}click(){const e=A.get(this);!e||vi(this,e)}}class ti extends L{constructor(){super();const e=parseInt(this.getAttribute("level")||"3",10);if(e<1||e>6)return;const n=`${"#".repeat(e)} `;A.set(this,{prefix:n})}}window.customElements.get("md-header")||(window.MarkdownHeaderButtonElement=ti,window.customElements.define("md-header",ti));class ni extends L{constructor(){super();A.set(this,{prefix:"**",suffix:"**",trimFirst:!0})}}window.customElements.get("md-bold")||(window.MarkdownBoldButtonElement=ni,window.customElements.define("md-bold",ni));class si extends L{constructor(){super();A.set(this,{prefix:"_",suffix:"_",trimFirst:!0})}}window.customElements.get("md-italic")||(window.MarkdownItalicButtonElement=si,window.customElements.define("md-italic",si));class ii extends L{constructor(){super();A.set(this,{prefix:"> ",multiline:!0,surroundWithNewlines:!0})}}window.customElements.get("md-quote")||(window.MarkdownQuoteButtonElement=ii,window.customElements.define("md-quote",ii));class ri extends L{constructor(){super();A.set(this,{prefix:"`",suffix:"`",blockPrefix:"```",blockSuffix:"```"})}}window.customElements.get("md-code")||(window.MarkdownCodeButtonElement=ri,window.customElements.define("md-code",ri));class oi extends L{constructor(){super();A.set(this,{prefix:"[",suffix:"](url)",replaceNext:"url",scanFor:"https?://"})}}window.customElements.get("md-link")||(window.MarkdownLinkButtonElement=oi,window.customElements.define("md-link",oi));class ai extends L{constructor(){super();A.set(this,{prefix:"![",suffix:"](url)",replaceNext:"url",scanFor:"https?://"})}}window.customElements.get("md-image")||(window.MarkdownImageButtonElement=ai,window.customElements.define("md-image",ai));class ci extends L{constructor(){super();A.set(this,{prefix:"- ",multiline:!0,unorderedList:!0})}}window.customElements.get("md-unordered-list")||(window.MarkdownUnorderedListButtonElement=ci,window.customElements.define("md-unordered-list",ci));class li extends L{constructor(){super();A.set(this,{prefix:"1. ",multiline:!0,orderedList:!0})}}window.customElements.get("md-ordered-list")||(window.MarkdownOrderedListButtonElement=li,window.customElements.define("md-ordered-list",li));class ui extends L{constructor(){super();A.set(this,{prefix:"- [ ] ",multiline:!0,surroundWithNewlines:!0})}}window.customElements.get("md-task-list")||(window.MarkdownTaskListButtonElement=ui,window.customElements.define("md-task-list",ui));class di extends L{constructor(){super();A.set(this,{prefix:"@",prefixSpace:!0})}}window.customElements.get("md-mention")||(window.MarkdownMentionButtonElement=di,window.customElements.define("md-mention",di));class fi extends L{constructor(){super();A.set(this,{prefix:"#",prefixSpace:!0})}}window.customElements.get("md-ref")||(window.MarkdownRefButtonElement=fi,window.customElements.define("md-ref",fi));class hi extends L{constructor(){super();A.set(this,{prefix:"~~",suffix:"~~",trimFirst:!0})}}window.customElements.get("md-strikethrough")||(window.MarkdownStrikethroughButtonElement=hi,window.customElements.define("md-strikethrough",hi));class zt extends HTMLElement{constructor(){super()}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","toolbar"),this.addEventListener("keydown",mi),this.setAttribute("tabindex","0"),this.addEventListener("focus",Wa,{once:!0})}disconnectedCallback(){this.removeEventListener("keydown",mi)}get field(){const e=this.getAttribute("for");if(!e)return null;const n="getRootNode"in this?this.getRootNode():document;let s;return(n instanceof Document||n instanceof ShadowRoot)&&(s=n.getElementById(e)),s instanceof HTMLTextAreaElement?s:null}}function Wa({target:t}){if(!(t instanceof Element))return;t.removeAttribute("tabindex");let e="0";for(const n of ei(t))n.setAttribute("tabindex",e),e==="0"&&(n.focus(),e="-1")}function mi(t){const e=t.key;if(e!=="ArrowRight"&&e!=="ArrowLeft"&&e!=="Home"&&e!=="End")return;const n=t.currentTarget;if(!(n instanceof HTMLElement))return;const s=ei(n),i=s.indexOf(t.target),r=s.length;if(i===-1)return;let o=0;e==="ArrowLeft"&&(o=i-1),e==="ArrowRight"&&(o=i+1),e==="End"&&(o=r-1),o<0&&(o=r-1),o>r-1&&(o=0);for(let a=0;a1}function pi(t,e){return Array(e+1).join(t)}function qa(t,e){let n=e;for(;t[n]&&t[n-1]!=null&&!t[n-1].match(/\s/);)n--;return n}function Ba(t,e,n){let s=e;const i=n?/\n/:/\s/;for(;t[s]&&!t[s].match(i);)s++;return s}let U=null;function Ua(t,{text:e,selectionStart:n,selectionEnd:s}){const i=t.selectionStart,r=t.value.slice(0,i),o=t.value.slice(t.selectionEnd);if(U===null||U===!0){t.contentEditable="true";try{U=document.execCommand("insertText",!1,e)}catch(a){U=!1}t.contentEditable="false"}if(U&&!t.value.slice(0,t.selectionStart).endsWith(e)&&(U=!1),!U){try{document.execCommand("ms-beginUndoUnit")}catch(a){}t.value=r+e+o;try{document.execCommand("ms-endUndoUnit")}catch(a){}t.dispatchEvent(new CustomEvent("input",{bubbles:!0,cancelable:!0}))}n!=null&&s!=null?t.setSelectionRange(n,s):t.setSelectionRange(i,t.selectionEnd)}function Va(t,e){const n=t.value.slice(t.selectionStart,t.selectionEnd);let s;e.orderedList||e.unorderedList?s=Ga(t,e):e.multiline&&Yt(n)?s=Ya(t,e):s=za(t,e),Ua(t,s)}function ja(t){const e=t.value.split(` `);let n=0;for(let s=0;s=n&&t.selectionStart=n&&t.selectionEnd0?`${o} `:i,b=Yt(m)&&a.length>0?` ${a}`:r;if(l){const T=t.value[t.selectionStart-1];t.selectionStart!==0&&T!=null&&!T.match(/\s/)&&(f=` ${f}`)}m=Ka(t,f,b,e.multiline);let g=t.selectionStart,E=t.selectionEnd;const x=c.length>0&&b.indexOf(c)>-1&&m.length>0;if(d){const T=Xt(t);n=T.newlinesToAppend,s=T.newlinesToPrepend,f=n+i,b+=s}if(m.startsWith(f)&&m.endsWith(b)){const T=m.slice(f.length,m.length-b.length);if(p===h){let $=p-f.length;$=Math.max($,g),$=Math.min($,g+T.length),g=E=$}else E=g+T.length;return{text:T,selectionStart:g,selectionEnd:E}}else if(x)if(u.length>0&&m.match(u)){b=b.replace(c,m);const T=f+b;return g=E=g+f.length,{text:T,selectionStart:g,selectionEnd:E}}else{const T=f+m+b;return g=g+f.length+m.length+b.indexOf(c),E=g+c.length,{text:T,selectionStart:g,selectionEnd:E}}else{let T=f+m+b;g=p+f.length,E=h+f.length;const $=m.match(/^\s*|\s*$/g);if(e.trimFirst&&$){const Sr=$[0]||"",Mr=$[1]||"";T=Sr+f+m.trim()+b+Mr,g+=Sr.length,E-=Mr.length}return{text:T,selectionStart:g,selectionEnd:E}}}function Ya(t,e){const{prefix:n,suffix:s,surroundWithNewlines:i}=e;let r=t.value.slice(t.selectionStart,t.selectionEnd),o=t.selectionStart,a=t.selectionEnd;const c=r.split(` `);if(c.every(u=>u.startsWith(n)&&u.endsWith(s)))r=c.map(u=>u.slice(n.length,u.length-s.length)).join(` `),a=o+r.length;else if(r=c.map(u=>n+u+s).join(` `),i){const{newlinesToAppend:u,newlinesToPrepend:d}=Xt(t);o+=u.length,a=o+r.length,r=u+r+d}return{text:r,selectionStart:o,selectionEnd:a}}function gi(t){const e=t.split(` `),n=/^\d+\.\s+/,s=e.every(r=>n.test(r));let i=e;return s&&(i=e.map(r=>r.replace(n,""))),{text:i.join(` `),processed:s}}function bi(t){const e=t.split(` `),n="- ",s=e.every(r=>r.startsWith(n));let i=e;return s&&(i=e.map(r=>r.slice(n.length,r.length))),{text:i.join(` `),processed:s}}function ye(t,e){return e?"- ":`${t+1}. `}function Xa(t,e){let n,s,i;return t.orderedList?(s=gi(e),n=bi(s.text),i=n.text):(s=bi(e),n=gi(s.text),i=n.text),[s,n,i]}function Ga(t,e){const n=t.selectionStart===t.selectionEnd;let s=t.selectionStart,i=t.selectionEnd;ja(t);const r=t.value.slice(t.selectionStart,t.selectionEnd),[o,a,c]=Xa(e,r),l=c.split(` `).map((f,b)=>`${ye(b,e.unorderedList)}${f}`),u=l.reduce((f,b,g)=>f+ye(g,e.unorderedList).length,0),d=l.reduce((f,b,g)=>f+ye(g,!e.unorderedList).length,0);if(o.processed)return n?(s=Math.max(s-ye(0,e.unorderedList).length,0),i=s):(s=t.selectionStart,i=t.selectionEnd-u),{text:c,selectionStart:s,selectionEnd:i};const{newlinesToAppend:p,newlinesToPrepend:h}=Xt(t),m=p+l.join(` `)+h;return n?(s=Math.max(s+ye(0,e.unorderedList).length+p.length,0),i=s):a.processed?(s=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+u-d):(s=Math.max(t.selectionStart+p.length,0),i=t.selectionEnd+p.length+u),{text:m,selectionStart:s,selectionEnd:i}}function vi(t,e){const n=t.closest("markdown-toolbar");if(!(n instanceof zt))return;const i=Object.assign(Object.assign({},{prefix:"",suffix:"",blockPrefix:"",blockSuffix:"",multiline:!1,replaceNext:"",prefixSpace:!1,scanFor:"",surroundWithNewlines:!1,orderedList:!1,unorderedList:!1,trimFirst:!1}),e),r=n.field;r&&(r.focus(),Va(r,i))}const tt=new WeakMap;class Gt extends HTMLElement{constructor(){super();const e=wi.bind(null,this,!0),n={currentQuery:null,oninput:Za(e),fetch:e,controller:null};tt.set(this,n)}static get observedAttributes(){return["src"]}attributeChangedCallback(e,n){n&&e==="src"&&wi(this,!1)}connectedCallback(){const e=this.input;if(!e)return;e.setAttribute("autocomplete","off"),e.setAttribute("spellcheck","false");const n=tt.get(this);!n||(e.addEventListener("focus",n.fetch),e.addEventListener("change",n.fetch),e.addEventListener("input",n.oninput))}disconnectedCallback(){const e=this.input;if(!e)return;const n=tt.get(this);!n||(e.removeEventListener("focus",n.fetch),e.removeEventListener("change",n.fetch),e.removeEventListener("input",n.oninput))}get input(){const e=this.querySelector("input, textarea");return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement?e:null}get src(){return this.getAttribute("src")||""}set src(e){this.setAttribute("src",e)}}v("E",Gt);function Ja(){return"AbortController"in window?new AbortController:{signal:null,abort(){}}}async function wi(t,e){const n=t.input;if(!n)return;const s=tt.get(t);if(!s)return;const i=n.value;if(e&&s.currentQuery===i)return;s.currentQuery=i;const r=t.src;if(!r)return;const o=document.getElementById(t.getAttribute("aria-owns")||"");if(!o)return;const a=new URL(r,window.location.href),c=new URLSearchParams(a.search);c.append(t.getAttribute("param")||"q",i),a.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller=Ja();let l,u="";try{l=await Qa(t,a.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),u=await l.text(),t.removeAttribute("loading"),s.controller=null}catch(d){d.name!=="AbortError"&&(t.removeAttribute("loading"),s.controller=null);return}l&&l.ok?(o.innerHTML=u,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}async function Qa(t,e,n){try{const s=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),s}catch(s){throw s.name!=="AbortError"&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),s}}function Za(t){let e;return function(){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t()},300)}}window.customElements.get("remote-input")||(window.RemoteInputElement=Gt,window.customElements.define("remote-input",Gt));const Jt=new WeakMap;let w=null;function ec(){return!!w}function tc(t,e,n){Jt.set(t,{sortStarted:e,sortFinished:n}),t.addEventListener("dragstart",sc),t.addEventListener("dragenter",ic),t.addEventListener("dragend",oc),t.addEventListener("drop",rc),t.addEventListener("dragover",ac)}function nc(t,e){if(t.parentNode===e.parentNode){let n=t;for(;n;){if(n===e)return!0;n=n.previousElementSibling}}return!1}function Ei(t,e){return t.closest("task-lists")===e.closest("task-lists")}function sc(t){if(t.currentTarget!==t.target)return;const e=t.currentTarget;if(!(e instanceof Element))return;const n=e.closest(".contains-task-list");if(!n||(e.classList.add("is-ghost"),t.dataTransfer&&t.dataTransfer.setData("text/plain",(e.textContent||"").trim()),!e.parentElement))return;const s=Array.from(e.parentElement.children),i=s.indexOf(e),r=Jt.get(e);r&&r.sortStarted(n),w={didDrop:!1,dragging:e,dropzone:e,sourceList:n,sourceSibling:s[i+1]||null,sourceIndex:i}}function ic(t){if(!w)return;const e=t.currentTarget;if(e instanceof Element){if(!Ei(w.dragging,e)){t.stopPropagation();return}t.preventDefault(),t.dataTransfer&&(t.dataTransfer.dropEffect="move"),w.dropzone!==e&&(w.dragging.classList.add("is-dragging"),w.dropzone=e,nc(w.dragging,e)?e.before(w.dragging):e.after(w.dragging))}}function rc(t){if(!w)return;t.preventDefault(),t.stopPropagation();const e=t.currentTarget;if(!(e instanceof Element)||(w.didDrop=!0,!w.dragging.parentElement))return;let n=Array.from(w.dragging.parentElement.children).indexOf(w.dragging);const s=e.closest(".contains-task-list");if(!s||w.sourceIndex===n&&w.sourceList===s)return;w.sourceList===s&&w.sourceIndex{const s=n.target;s instanceof HTMLInputElement&&(!s.classList.contains("task-list-item-checkbox")||this.dispatchEvent(new CustomEvent("task-lists-check",{bubbles:!0,detail:{position:dc(s),checked:s.checked}})))});const e=new MutationObserver(xi.bind(null,this));yi.set(this,e),e.observe(this,{childList:!0,subtree:!0}),xi(this)}disconnectedCallback(){const e=yi.get(this);e&&e.disconnect()}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get sortable(){return this.hasAttribute("sortable")}set sortable(e){e?this.setAttribute("sortable",""):this.removeAttribute("sortable")}static get observedAttributes(){return["disabled"]}attributeChangedCallback(e,n,s){if(n!==s)switch(e){case"disabled":Li(this);break}}}v("T",se);const ki=document.createElement("template");ki.innerHTML=` `;const Ti=new WeakMap;function cc(t){if(Ti.get(t))return;Ti.set(t,!0);const e=t.closest("task-lists");if(!(e instanceof se)||e.querySelectorAll(".task-list-item").length<=1)return;const n=ki.content.cloneNode(!0),s=n.querySelector(".handle");if(t.prepend(n),!s)throw new Error("handle not found");s.addEventListener("mouseenter",gc),s.addEventListener("mouseleave",bc),tc(t,mc,pc),t.addEventListener("mouseenter",lc),t.addEventListener("mouseleave",uc)}function lc(t){const e=t.currentTarget;if(!(e instanceof Element))return;const n=e.closest("task-lists");n instanceof se&&n.sortable&&!n.disabled&&e.classList.add("hovered")}function uc(t){const e=t.currentTarget;e instanceof Element&&e.classList.remove("hovered")}function dc(t){const e=Qt(t);if(!e)throw new Error(".contains-task-list not found");const n=t.closest(".task-list-item"),s=Array.from(e.children).filter(r=>r.tagName==="LI"),i=n?s.indexOf(n):-1;return[hc(e),i]}function Qt(t){const e=t.parentElement;return e?e.closest(".contains-task-list"):null}function fc(t){return Qt(t)===Ai(t)}function Ai(t){const e=Qt(t);return e?Ai(e)||e:null}function xi(t){const e=t.querySelectorAll(".contains-task-list > .task-list-item");for(const n of e)fc(n)&&cc(n);Li(t)}function Li(t){for(const e of t.querySelectorAll(".task-list-item"))e.classList.toggle("enabled",!t.disabled);for(const e of t.querySelectorAll(".task-list-item-checkbox"))e instanceof HTMLInputElement&&(e.disabled=t.disabled)}function hc(t){const e=t.closest("task-lists");if(!e)throw new Error("parent not found");return Array.from(e.querySelectorAll("ol, ul")).indexOf(t)}const Zt=new WeakMap;function mc(t){const e=t.closest("task-lists");if(!e)throw new Error("parent not found");Zt.set(e,Array.from(e.querySelectorAll("ol, ul")))}function pc({src:t,dst:e}){const n=t.list.closest("task-lists");if(!n)return;const s=Zt.get(n);!s||(Zt.delete(n),n.dispatchEvent(new CustomEvent("task-lists-move",{bubbles:!0,detail:{src:[s.indexOf(t.list),t.index],dst:[s.indexOf(e.list),e.index]}})))}function gc(t){const e=t.currentTarget;if(!(e instanceof Element))return;const n=e.closest(".task-list-item");if(!n)return;const s=n.closest("task-lists");s instanceof se&&s.sortable&&!s.disabled&&n.setAttribute("draggable","true")}function bc(t){if(ec())return;const e=t.currentTarget;if(!(e instanceof Element))return;const n=e.closest(".task-list-item");!n||n.setAttribute("draggable","false")}window.customElements.get("task-lists")||(window.TaskListsElement=se,window.customElements.define("task-lists",se));const en=!!navigator.userAgent.match(/Macintosh/);class tn{constructor(e,n){this.input=e,this.list=n,this.isComposing=!1,n.id||(n.id=`combobox-${Math.random().toString().slice(2,6)}`),this.keyboardEventHandler=s=>vc(s,this),this.compositionEventHandler=s=>yc(s,this),this.inputHandler=this.clearSelection.bind(this),e.setAttribute("role","combobox"),e.setAttribute("aria-controls",n.id),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-autocomplete","list"),e.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",Si)}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",Si)}navigate(e=1){const n=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter(Mi)[0],s=Array.from(this.list.querySelectorAll('[role="option"]')).filter(Mi),i=s.indexOf(n);if(i===s.length-1&&e===1||i===0&&e===-1){this.clearSelection(),this.input.focus();return}let r=e===1?0:s.length-1;if(n&&i>=0){const a=i+e;a>=0&&a0||t.offsetHeight>0)}function yc(t,e){e.isComposing=t.type==="compositionstart",!!document.getElementById(e.input.getAttribute("aria-controls")||"")&&e.clearSelection()}function kc(t,e){Tc(t,e)||(t.scrollTop=e.offsetTop)}function Tc(t,e){const n=t.scrollTop,s=n+t.clientHeight,i=e.offsetTop,r=i+e.clientHeight;return i>=n&&r<=s}const Ac=/\s|\(|\[/;function xc(t,e,n,{multiWord:s,lookBackIndex:i,lastMatchPosition:r}={multiWord:!1,lookBackIndex:0,lastMatchPosition:null}){let o=t.lastIndexOf(e,n-1);if(o===-1||o=o+2||t.lastIndexOf(` `,n-1)>o||t.lastIndexOf(".",n-1)>o)return}else if(t.lastIndexOf(" ",n-1)>o)return;const a=t[o-1];return a&&!Ac.test(a)?void 0:{text:t.substring(o+e.length,n),position:o+e.length}}const Lc=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],Ci=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],Ii=new WeakMap;function Sc(t,e){const n=t.nodeName.toLowerCase();if(n!=="textarea"&&n!=="input")throw new Error("expected textField to a textarea or input");let s=Ii.get(t);if(s&&s.parentElement===t.parentElement)s.innerHTML="";else{s=document.createElement("div"),Ii.set(t,s);const a=window.getComputedStyle(t),c=Lc.slice(0);n==="textarea"?c.push("white-space:pre-wrap;"):c.push("white-space:nowrap;");for(let l=0,u=Ci.length;l{n.remove()},5e3),{top:r.top-i.top,left:r.left-i.left}}const nt=new WeakMap;class Cc{constructor(e,n){this.expander=e,this.input=n,this.combobox=null,this.menu=null,this.match=null,this.justPasted=!1,this.lookBackIndex=0,this.oninput=this.onInput.bind(this),this.onpaste=this.onPaste.bind(this),this.onkeydown=this.onKeydown.bind(this),this.oncommit=this.onCommit.bind(this),this.onmousedown=this.onMousedown.bind(this),this.onblur=this.onBlur.bind(this),this.interactingWithList=!1,n.addEventListener("paste",this.onpaste),n.addEventListener("input",this.oninput),n.addEventListener("keydown",this.onkeydown),n.addEventListener("blur",this.onblur)}destroy(){this.input.removeEventListener("paste",this.onpaste),this.input.removeEventListener("input",this.oninput),this.input.removeEventListener("keydown",this.onkeydown),this.input.removeEventListener("blur",this.onblur)}dismissMenu(){this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex)}activate(e,n){if(this.input!==document.activeElement)return;this.deactivate(),this.menu=n,n.id||(n.id=`text-expander-${Math.floor(Math.random()*1e5).toString()}`),this.expander.append(n),this.combobox=new tn(this.input,n);const{top:s,left:i}=Mc(this.input,e.position);n.style.top=`${s}px`,n.style.left=`${i}px`,this.combobox.start(),n.addEventListener("combobox-commit",this.oncommit),n.addEventListener("mousedown",this.onmousedown),this.combobox.navigate(1)}deactivate(){const e=this.menu;return!e||!this.combobox?!1:(this.menu=null,e.removeEventListener("combobox-commit",this.oncommit),e.removeEventListener("mousedown",this.onmousedown),this.combobox.destroy(),this.combobox=null,e.remove(),!0)}onCommit({target:e}){const n=e;if(!(n instanceof HTMLElement)||!this.combobox)return;const s=this.match;if(!s)return;const i=this.input.value.substring(0,s.position-s.key.length),r=this.input.value.substring(s.position+s.text.length),o={item:n,key:s.key,value:null};if(!this.expander.dispatchEvent(new CustomEvent("text-expander-value",{cancelable:!0,detail:o}))||!o.value)return;const c=`${o.value} `;this.input.value=i+c+r;const l=i.length+c.length;this.deactivate(),this.input.focus(),this.input.selectionStart=l,this.input.selectionEnd=l,this.lookBackIndex=l,this.match=null}onBlur(){if(this.interactingWithList){this.interactingWithList=!1;return}this.deactivate()}onPaste(){this.justPasted=!0}async onInput(){if(this.justPasted){this.justPasted=!1;return}const e=this.findMatch();if(e){this.match=e;const n=await this.notifyProviders(e);if(!this.match)return;n?this.activate(e,n):this.deactivate()}else this.match=null,this.deactivate()}findMatch(){const e=this.input.selectionEnd||0,n=this.input.value;e<=this.lookBackIndex&&(this.lookBackIndex=e-1);for(const{key:s,multiWord:i}of this.expander.keys){const r=xc(n,s,e,{multiWord:i,lookBackIndex:this.lookBackIndex,lastMatchPosition:this.match?this.match.position:null});if(r)return{text:r.text,key:s,position:r.position}}}async notifyProviders(e){const n=[],s=a=>n.push(a);return this.expander.dispatchEvent(new CustomEvent("text-expander-change",{cancelable:!0,detail:{provide:s,text:e.text,key:e.key}}))?(await Promise.all(n)).filter(a=>a.matched).map(a=>a.fragment)[0]:void 0}onMousedown(){this.interactingWithList=!0}onKeydown(e){e.key==="Escape"&&(this.match=null,this.deactivate()&&(this.lookBackIndex=this.input.selectionEnd||this.lookBackIndex,e.stopImmediatePropagation(),e.preventDefault()))}}class Ni extends HTMLElement{get keys(){const e=this.getAttribute("keys"),n=e?e.split(" "):[],s=this.getAttribute("multiword"),i=s?s.split(" "):[],r=i.length===0&&this.hasAttribute("multiword");return n.map(o=>({key:o,multiWord:r||i.includes(o)}))}connectedCallback(){const e=this.querySelector('input[type="text"], textarea');if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))return;const n=new Cc(this,e);nt.set(this,n)}disconnectedCallback(){const e=nt.get(this);!e||(e.destroy(),nt.delete(this))}dismiss(){const e=nt.get(this);!e||e.dismissMenu()}}window.customElements.get("text-expander")||(window.TextExpanderElement=Ni,window.customElements.define("text-expander",Ni));const Pi=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Di=["January","February","March","April","May","June","July","August","September","October","November","December"];function V(t){return`0${t}`.slice(-2)}function ke(t,e){const n=t.getDay(),s=t.getDate(),i=t.getMonth(),r=t.getFullYear(),o=t.getHours(),a=t.getMinutes(),c=t.getSeconds();return e.replace(/%([%aAbBcdeHIlmMpPSwyYZz])/g,function(l){let u;switch(l[1]){case"%":return"%";case"a":return Pi[n].slice(0,3);case"A":return Pi[n];case"b":return Di[i].slice(0,3);case"B":return Di[i];case"c":return t.toString();case"d":return V(s);case"e":return String(s);case"H":return V(o);case"I":return V(ke(t,"%l"));case"l":return String(o===0||o===12?12:(o+12)%12);case"m":return V(i+1);case"M":return V(a);case"p":return o>11?"PM":"AM";case"P":return o>11?"pm":"am";case"S":return V(c);case"w":return String(n);case"y":return V(r%100);case"Y":return String(r);case"Z":return u=t.toString().match(/\((\w+)\)$/),u?u[1]:"";case"z":return u=t.toString().match(/\w([+-]\d\d\d\d) /),u?u[1]:""}return""})}function Te(t){let e;return function(){if(e)return e;if("Intl"in window)try{return e=new Intl.DateTimeFormat(void 0,t),e}catch(n){if(!(n instanceof RangeError))throw n}}}let st=null;const Ic=Te({day:"numeric",month:"short"});function $i(){if(st!==null)return st;const t=Ic();return t?(st=!!t.format(new Date(0)).match(/^\d/),st):!1}let it=null;const Nc=Te({day:"numeric",month:"short",year:"numeric"});function Pc(){if(it!==null)return it;const t=Nc();return t?(it=!!t.format(new Date(0)).match(/\d,/),it):!0}function Dc(t){return new Date().getUTCFullYear()===t.getUTCFullYear()}function $c(t,e){if("Intl"in window&&"RelativeTimeFormat"in window.Intl)try{return new Intl.RelativeTimeFormat(t,e)}catch(n){if(!(n instanceof RangeError))throw n}}function Ae(t){const e=t.closest("[lang]");return e instanceof HTMLElement&&e.lang?e.lang:"default"}const nn=new WeakMap;class Ri extends HTMLElement{static get observedAttributes(){return["datetime","day","format","lang","hour","minute","month","second","title","weekday","year","time-zone-name"]}connectedCallback(){const e=this.getFormattedTitle();e&&!this.hasAttribute("title")&&this.setAttribute("title",e);const n=this.getFormattedDate();n&&(this.textContent=n)}attributeChangedCallback(e,n,s){const i=this.getFormattedTitle();if(e==="datetime"){const c=Date.parse(s);isNaN(c)?nn.delete(this):nn.set(this,new Date(c))}const r=this.getFormattedTitle(),o=this.getAttribute("title");e!=="title"&&r&&(!o||o===i)&&this.setAttribute("title",r);const a=this.getFormattedDate();a&&(this.textContent=a)}get date(){return nn.get(this)}getFormattedTitle(){const e=this.date;if(!e)return;const n=Rc();if(n)return n.format(e);try{return e.toLocaleString()}catch(s){if(s instanceof RangeError)return e.toString();throw s}}getFormattedDate(){}}const Rc=Te({day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),sn=new WeakMap;class _i extends Ri{attributeChangedCallback(e,n,s){(e==="hour"||e==="minute"||e==="second"||e==="time-zone-name")&&sn.delete(this),super.attributeChangedCallback(e,n,s)}getFormattedDate(){const e=this.date;if(!e)return;const n=_c(this,e)||"",s=Hc(this,e)||"";return`${n} ${s}`.trim()}}function _c(t,e){const n={weekday:{short:"%a",long:"%A"},day:{numeric:"%e","2-digit":"%d"},month:{short:"%b",long:"%B"},year:{numeric:"%Y","2-digit":"%y"}};let s=$i()?"weekday day month year":"weekday month day, year";for(const i in n){const r=n[i][t.getAttribute(i)||""];s=s.replace(i,r||"")}return s=s.replace(/(\s,)|(,\s$)/,""),ke(e,s).replace(/\s+/," ").trim()}function Hc(t,e){const n={},s=t.getAttribute("hour");(s==="numeric"||s==="2-digit")&&(n.hour=s);const i=t.getAttribute("minute");(i==="numeric"||i==="2-digit")&&(n.minute=i);const r=t.getAttribute("second");(r==="numeric"||r==="2-digit")&&(n.second=r);const o=t.getAttribute("time-zone-name");if((o==="short"||o==="long")&&(n.timeZoneName=o),Object.keys(n).length===0)return;let a=sn.get(t);a||(a=Te(n),sn.set(t,a));const c=a();if(c)return c.format(e);{const l=n.second?"%H:%M:%S":"%H:%M";return ke(e,l)}}window.customElements.get("local-time")||(window.LocalTimeElement=_i,window.customElements.define("local-time",_i));class xe{constructor(e,n){this.date=e,this.locale=n}toString(){const e=this.timeElapsed();if(e)return e;{const n=this.timeAhead();return n||`on ${this.formatDate()}`}}timeElapsed(){const e=new Date().getTime()-this.date.getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24);return e>=0&&r<30?this.timeAgoFromMs(e):null}timeAhead(){const e=this.date.getTime()-new Date().getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24);return e>=0&&r<30?this.timeUntil():null}timeAgo(){const e=new Date().getTime()-this.date.getTime();return this.timeAgoFromMs(e)}timeAgoFromMs(e){const n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return e<0?y(this.locale,0,"second"):n<10?y(this.locale,0,"second"):n<45?y(this.locale,-n,"second"):n<90?y(this.locale,-s,"minute"):s<45?y(this.locale,-s,"minute"):s<90?y(this.locale,-i,"hour"):i<24?y(this.locale,-i,"hour"):i<36?y(this.locale,-r,"day"):r<30?y(this.locale,-r,"day"):o<18?y(this.locale,-o,"month"):y(this.locale,-a,"year")}microTimeAgo(){const e=new Date().getTime()-this.date.getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return s<1?"1m":s<60?`${s}m`:i<24?`${i}h`:r<365?`${r}d`:`${a}y`}timeUntil(){const e=this.date.getTime()-new Date().getTime();return this.timeUntilFromMs(e)}timeUntilFromMs(e){const n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return o>=18?y(this.locale,a,"year"):o>=12?y(this.locale,a,"year"):r>=45?y(this.locale,o,"month"):r>=30?y(this.locale,o,"month"):i>=36?y(this.locale,r,"day"):i>=24?y(this.locale,r,"day"):s>=90?y(this.locale,i,"hour"):s>=45?y(this.locale,i,"hour"):n>=90?y(this.locale,s,"minute"):n>=45?y(this.locale,s,"minute"):n>=10?y(this.locale,n,"second"):y(this.locale,0,"second")}microTimeUntil(){const e=this.date.getTime()-new Date().getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return r>=365?`${a}y`:i>=24?`${r}d`:s>=60?`${i}h`:s>1?`${s}m`:"1m"}formatDate(){let e=$i()?"%e %b":"%b %e";return Dc(this.date)||(e+=Pc()?", %Y":" %Y"),ke(this.date,e)}formatTime(){const e=Fc();return e?e.format(this.date):ke(this.date,"%l:%M%P")}}function y(t,e,n){const s=$c(t,{numeric:"auto"});return s?s.format(e,n):Oc(e,n)}function Oc(t,e){if(t===0)switch(e){case"year":case"quarter":case"month":case"week":return`this ${e}`;case"day":return"today";case"hour":case"minute":return`in 0 ${e}s`;case"second":return"now"}else if(t===1)switch(e){case"year":case"quarter":case"month":case"week":return`next ${e}`;case"day":return"tomorrow";case"hour":case"minute":case"second":return`in 1 ${e}`}else if(t===-1)switch(e){case"year":case"quarter":case"month":case"week":return`last ${e}`;case"day":return"yesterday";case"hour":case"minute":case"second":return`1 ${e} ago`}else if(t>1)switch(e){case"year":case"quarter":case"month":case"week":case"day":case"hour":case"minute":case"second":return`in ${t} ${e}s`}else if(t<-1)switch(e){case"year":case"quarter":case"month":case"week":case"day":case"hour":case"minute":case"second":return`${-t} ${e}s ago`}throw new RangeError(`Invalid unit argument for format() '${e}'`)}const Fc=Te({hour:"numeric",minute:"2-digit"});class Le extends Ri{getFormattedDate(){const e=this.date;if(!!e)return new xe(e,Ae(this)).toString()}connectedCallback(){ie.push(this),Se||(Hi(),Se=window.setInterval(Hi,60*1e3)),super.connectedCallback()}disconnectedCallback(){const e=ie.indexOf(this);e!==-1&&ie.splice(e,1),ie.length||Se&&(clearInterval(Se),Se=null)}}v("R",Le);const ie=[];let Se;function Hi(){let t,e,n;for(e=0,n=ie.length;e{clearTimeout(n),t(...s)},e)}}const rn=new WeakMap;function Bc(t,e){const n=new XMLHttpRequest;return n.open("GET",e,!0),n.setRequestHeader("Accept","text/fragment+html"),Uc(t,n)}function Uc(t,e){const n=rn.get(t);n&&n.abort(),rn.set(t,e);const s=()=>rn.delete(t),i=Vc(e);return i.then(s,s),i}function Vc(t){return new Promise((e,n)=>{t.onload=function(){t.status>=200&&t.status<300?e(t.responseText):n(new Error(t.responseText))},t.onerror=n,t.send()})}class jc{constructor(e,n,s){this.container=e,this.input=n,this.results=s,this.combobox=new tn(n,s),this.results.hidden=!0,this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=qc(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.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)}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)}onKeydown(e){if(e.key==="Escape"&&this.container.open)this.container.open=!1,e.stopPropagation(),e.preventDefault();else if(e.altKey&&e.key==="ArrowUp"&&this.container.open)this.container.open=!1,e.stopPropagation(),e.preventDefault();else if(e.altKey&&e.key==="ArrowDown"&&!this.container.open){if(!this.input.value.trim())return;this.container.open=!0,e.stopPropagation(),e.preventDefault()}}onInputFocus(){this.fetchResults()}onInputBlur(){if(this.interactingWithList){this.interactingWithList=!1;return}this.container.open=!1}onCommit({target:e}){const n=e;if(!(n instanceof HTMLElement)||(this.container.open=!1,n instanceof HTMLAnchorElement))return;const s=n.getAttribute("data-autocomplete-value")||n.textContent;this.container.value=s}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let e=0;for(const n of this.results.querySelectorAll('[role="option"]:not([id])'))n.id=`${this.results.id}-option-${e++}`}fetchResults(){const e=this.input.value.trim();if(!e){this.container.open=!1;return}const n=this.container.src;if(!n)return;const s=new URL(n,window.location.href),i=new URLSearchParams(s.search.slice(1));i.append("q",e),s.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),Bc(this.input,s.toString()).then(r=>{this.results.innerHTML=r,this.identifyOptions();const o=!!this.results.querySelector('[role="option"]');this.container.open=o,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.hidden||(this.combobox.start(),this.results.hidden=!1)}close(){this.results.hidden||(this.combobox.stop(),this.results.hidden=!0)}}const rt=new WeakMap;class on extends HTMLElement{constructor(){super()}connectedCallback(){const e=this.getAttribute("for");if(!e)return;const n=this.querySelector("input"),s=document.getElementById(e);!(n instanceof HTMLInputElement)||!s||(rt.set(this,new jc(this,n,s)),s.setAttribute("role","listbox"))}disconnectedCallback(){const e=rt.get(this);e&&(e.destroy(),rt.delete(this))}get src(){return this.getAttribute("src")||""}set src(e){this.setAttribute("src",e)}get value(){return this.getAttribute("value")||""}set value(e){this.setAttribute("value",e)}get open(){return this.hasAttribute("open")}set open(e){e?this.setAttribute("open",""):this.removeAttribute("open")}static get observedAttributes(){return["open","value"]}attributeChangedCallback(e,n,s){if(n===s)return;const i=rt.get(this);if(!!i)switch(e){case"open":s===null?i.close():i.open();break;case"value":s!==null&&(i.input.value=s),this.dispatchEvent(new Wc("auto-complete-change",{bubbles:!0,relatedTarget:i.input}));break}}}v("A",on),window.customElements.get("auto-complete")||(window.AutocompleteElement=on,window.customElements.define("auto-complete",on));function Kc(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}function Wi(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent);const e=getSelection();if(e==null)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 an(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=Kc(t);return e.appendChild(n),Wi(n),e.removeChild(n),Promise.resolve()}function qi(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function s(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}if(n)an(n).then(s);else if(e){const i="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(i instanceof Document||"ShadowRoot"in window&&i instanceof ShadowRoot))return;const r=i.getElementById(e);r&&zc(r).then(s)}}function zc(t){return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?an(t.value):t instanceof HTMLAnchorElement&&t.hasAttribute("href")?an(t.href):Wi(t)}function Yc(t){const e=t.currentTarget;e instanceof HTMLElement&&qi(e)}function Bi(t){if(t.key===" "||t.key==="Enter"){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),qi(e))}}function Xc(t){t.currentTarget.addEventListener("keydown",Bi)}function Gc(t){t.currentTarget.removeEventListener("keydown",Bi)}class cn extends HTMLElement{constructor(){super();this.addEventListener("click",Yc),this.addEventListener("focus",Xc),this.addEventListener("blur",Gc)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(e){this.setAttribute("value",e)}}v("l",cn),window.customElements.get("clipboard-copy")||(window.ClipboardCopyElement=cn,window.customElements.define("clipboard-copy",cn));function ot(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter(e=>e instanceof HTMLElement&&e.closest(t.tagName)===t)}class ln extends HTMLElement{constructor(){super();this.addEventListener("keydown",e=>{const n=e.target;if(!(n instanceof HTMLElement)||n.closest(this.tagName)!==this||n.getAttribute("role")!=="tab"&&!n.closest('[role="tablist"]'))return;const s=ot(this),i=s.indexOf(s.find(r=>r.matches('[aria-selected="true"]')));if(e.code==="ArrowRight"){let r=i+1;r>=s.length&&(r=0),Me(this,r)}else if(e.code==="ArrowLeft"){let r=i-1;r<0&&(r=s.length-1),Me(this,r)}else e.code==="Home"?(Me(this,0),e.preventDefault()):e.code==="End"&&(Me(this,s.length-1),e.preventDefault())}),this.addEventListener("click",e=>{const n=ot(this);if(!(e.target instanceof Element)||e.target.closest(this.tagName)!==this)return;const s=e.target.closest('[role="tab"]');if(!(s instanceof HTMLElement)||!s.closest('[role="tablist"]'))return;const i=n.indexOf(s);Me(this,i)})}connectedCallback(){for(const e of ot(this))e.hasAttribute("aria-selected")||e.setAttribute("aria-selected","false"),e.hasAttribute("tabindex")||(e.getAttribute("aria-selected")==="true"?e.setAttribute("tabindex","0"):e.setAttribute("tabindex","-1"))}}v("B",ln);function Me(t,e){const n=ot(t),s=Array.from(t.querySelectorAll('[role="tabpanel"]')).filter(a=>a.closest(t.tagName)===t),i=n[e],r=s[e];if(!!t.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:r}}))){for(const a of n)a.setAttribute("aria-selected","false"),a.setAttribute("tabindex","-1");for(const a of s)a.hidden=!0,!a.hasAttribute("tabindex")&&!a.hasAttribute("data-tab-container-no-tabstop")&&a.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),r.hidden=!1,t.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:r}}))}}window.customElements.get("tab-container")||(window.TabContainerElement=ln,window.customElements.define("tab-container",ln)),window.IncludeFragmentElement.prototype.fetch=t=>(t.headers.append("X-Requested-With","XMLHttpRequest"),window.fetch(t));function Jc(t){let e=!1,n=null;t.addEventListener("mousedown",o),t.addEventListener("change",i);function s(l,u,d,p=!1){u instanceof HTMLInputElement&&(u.indeterminate=p,u.checked!==d&&(u.checked=d,setTimeout(()=>{const h=new CustomEvent("change",{bubbles:!0,cancelable:!1,detail:{relatedTarget:l}});u.dispatchEvent(h)})))}function i(l){const u=l.target;u instanceof Element&&(u.hasAttribute("data-check-all")?r(l):u.hasAttribute("data-check-all-item")&&a(l))}function r(l){if(l instanceof CustomEvent&&l.detail){const{relatedTarget:d}=l.detail;if(d&&d.hasAttribute("data-check-all-item"))return}const u=l.target;if(u instanceof HTMLInputElement){n=null;for(const d of t.querySelectorAll("[data-check-all-item]"))s(u,d,u.checked);u.indeterminate=!1,c()}}function o(l){if(!(l.target instanceof Element))return;(l.target instanceof HTMLLabelElement&&l.target.control||l.target).hasAttribute("data-check-all-item")&&(e=l.shiftKey)}function a(l){if(l instanceof CustomEvent&&l.detail){const{relatedTarget:h}=l.detail;if(h&&(h.hasAttribute("data-check-all")||h.hasAttribute("data-check-all-item")))return}const u=l.target;if(!(u instanceof HTMLInputElement))return;const d=Array.from(t.querySelectorAll("[data-check-all-item]"));if(e&&n){const[h,m]=[d.indexOf(n),d.indexOf(u)].sort();for(const f of d.slice(h,+m+1||9e9))s(u,f,u.checked)}e=!1,n=u;const p=t.querySelector("[data-check-all]");if(p){const h=d.length,m=d.filter(g=>g instanceof HTMLInputElement&&g.checked).length,f=m===h,b=h>m&&m>0;s(u,p,f,b)}c()}function c(){const l=t.querySelector("[data-check-all-count]");if(l){const u=t.querySelectorAll("[data-check-all-item]:checked").length;l.textContent=u.toString()}}return{unsubscribe:()=>{t.removeEventListener("mousedown",o),t.removeEventListener("change",i)}}}function re(t,e){var n,s,i;const r=t.value.slice(0,(n=t.selectionStart)!==null&&n!==void 0?n:void 0),o=t.value.slice((s=t.selectionEnd)!==null&&s!==void 0?s:void 0);let a=!0;t.contentEditable="true";try{a=document.execCommand("insertText",!1,e)}catch(c){a=!1}if(t.contentEditable="false",a&&!t.value.slice(0,(i=t.selectionStart)!==null&&i!==void 0?i:void 0).endsWith(e)&&(a=!1),!a){try{document.execCommand("ms-beginUndoUnit")}catch(c){}t.value=r+e+o;try{document.execCommand("ms-endUndoUnit")}catch(c){}t.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))}}function Qc(t){t.addEventListener("dragover",Vi),t.addEventListener("drop",Ui),t.addEventListener("paste",ji)}function Zc(t){t.removeEventListener("dragover",Vi),t.removeEventListener("drop",Ui),t.removeEventListener("paste",ji)}function Ui(t){const e=t.dataTransfer;if(!e||el(e)||!zi(e))return;const n=Yi(e);if(!n.some(un))return;t.stopPropagation(),t.preventDefault();const s=t.currentTarget;s instanceof HTMLTextAreaElement&&re(s,n.map(Ki).join(""))}function Vi(t){const e=t.dataTransfer;e&&(e.dropEffect="link")}function ji(t){const e=t.clipboardData;if(!e||!zi(e))return;const n=Yi(e);if(!n.some(un))return;t.stopPropagation(),t.preventDefault();const s=t.currentTarget;s instanceof HTMLTextAreaElement&&re(s,n.map(Ki).join(""))}function Ki(t){return un(t)?` ![](${t}) `:t}function el(t){return Array.from(t.types).indexOf("Files")>=0}function zi(t){return Array.from(t.types).indexOf("text/uri-list")>=0}function Yi(t){return(t.getData("text/uri-list")||"").split(`\r `)}const tl=/\.(gif|png|jpe?g)$/i;function un(t){return tl.test(t)}function nl(t){t.addEventListener("paste",Xi)}function sl(t){t.removeEventListener("paste",Xi)}function Xi(t){const e=t.clipboardData;if(!e||!il(e))return;const n=t.currentTarget;if(!(n instanceof HTMLTextAreaElement))return;const s=e.getData("text/plain");if(!s||!Gi(s)||rl(n))return;const i=n.value.substring(n.selectionStart,n.selectionEnd);!i.length||Gi(i.trim())||(t.stopPropagation(),t.preventDefault(),re(n,ol(i,s)))}function il(t){return Array.from(t.types).includes("text/plain")}function rl(t){const e=t.selectionStart||0;return e>1?t.value.substring(e-2,e)==="](":!1}function ol(t,e){return`[${t}](${e})`}function Gi(t){return/^https?:\/\//i.test(t)}function al(t){t.addEventListener("dragover",Qi),t.addEventListener("drop",Ji),t.addEventListener("paste",Zi)}function cl(t){t.removeEventListener("dragover",Qi),t.removeEventListener("drop",Ji),t.removeEventListener("paste",Zi)}function Ji(t){const e=t.dataTransfer;if(!e||ll(e))return;const n=tr(e);if(!n)return;t.stopPropagation(),t.preventDefault();const s=t.currentTarget;s instanceof HTMLTextAreaElement&&re(s,n)}function Qi(t){const e=t.dataTransfer;e&&(e.dropEffect="copy")}function Zi(t){if(!t.clipboardData)return;const e=tr(t.clipboardData);if(!e)return;t.stopPropagation(),t.preventDefault();const n=t.currentTarget;n instanceof HTMLTextAreaElement&&re(n,e)}function ll(t){return Array.from(t.types).indexOf("Files")>=0}function er(t){const e="\xA0";return(t.textContent||"").trim().replace(/\|/g,"\\|").replace(/\n/g," ")||e}function ul(t){return Array.from(t.querySelectorAll("td, th")).map(er)}function dl(t){const e=Array.from(t.querySelectorAll("tr")),n=e.shift();if(!n)return"";const s=ul(n),i=s.map(()=>"--"),r=`${s.join(" | ")} ${i.join(" | ")} `,o=e.map(a=>Array.from(a.querySelectorAll("td")).map(er).join(" | ")).join(` `);return` ${r}${o} `}function tr(t){if(Array.from(t.types).indexOf("text/html")===-1)return;const e=t.getData("text/html");if(!//,"").replace(//,` ${r}`)}function fl(t){t.addEventListener("paste",nr)}function hl(t){t.removeEventListener("paste",nr)}function nr(t){const e=t.clipboardData;if(!e||!ml(e))return;const n=t.currentTarget;if(!(n instanceof HTMLTextAreaElement))return;const s=e.getData("text/x-gfm");!s||(t.stopPropagation(),t.preventDefault(),re(n,s))}function ml(t){return Array.from(t.types).indexOf("text/x-gfm")>=0}var Ce="";function pl(t){var e=t.split(` `);return e.reduce(function(n,s){var i=vl(s)||El(s)||Tl(s)||Sl(s)||xl(s);return i&&n.push(i),n},[])}var gl=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,bl=/\((\S*)(?::(\d+))(?::(\d+))\)/;function vl(t){var e=gl.exec(t);if(!e)return null;var n=e[2]&&e[2].indexOf("native")===0,s=e[2]&&e[2].indexOf("eval")===0,i=bl.exec(e[2]);return s&&i!=null&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]),{file:n?null:e[2],methodName:e[1]||Ce,arguments:n?[e[2]]:[],lineNumber:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}var wl=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function El(t){var e=wl.exec(t);return e?{file:e[2],methodName:e[1]||Ce,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}var yl=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,kl=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Tl(t){var e=yl.exec(t);if(!e)return null;var n=e[3]&&e[3].indexOf(" > eval")>-1,s=kl.exec(e[3]);return n&&s!=null&&(e[3]=s[1],e[4]=s[2],e[5]=null),{file:e[3],methodName:e[1]||Ce,arguments:e[2]?e[2].split(","):[],lineNumber:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}var Al=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function xl(t){var e=Al.exec(t);return e?{file:e[3],methodName:e[1]||Ce,arguments:[],lineNumber:+e[4],column:e[5]?+e[5]:null}:null}var Ll=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Sl(t){var e=Ll.exec(t);return e?{file:e[2],methodName:e[1]||Ce,arguments:[],lineNumber:+e[3],column:e[4]?+e[4]:null}:null}function dn(t){const e=t.parentNode;if(e===null||!(e instanceof HTMLElement))throw new Error;let n=0;e instanceof HTMLOListElement&&e.start!==1&&(n=e.start-1);const s=e.children;for(let i=0;i/g,">")}const oe={INPUT(t){return t instanceof HTMLInputElement&&t.checked?"[x] ":"[ ] "},CODE(t){const e=t.textContent||"";return t.parentNode&&t.parentNode.nodeName==="PRE"?(t.textContent=`\`\`\` ${e.replace(/\n+$/,"")} \`\`\` `,t):e.indexOf("`")>=0?`\`\` ${e} \`\``:`\`${e}\``},P(t){const e=document.createElement("p"),n=t.textContent||"";return e.textContent=n.replace(/<(\/?)(pre|strong|weak|em)>/g,"\\<$1$2\\>"),e},STRONG(t){return`**${t.textContent||""}**`},EM(t){return`_${t.textContent||""}_`},DEL(t){return`~${t.textContent||""}~`},BLOCKQUOTE(t){const e=(t.textContent||"").trim().replace(/^/gm,"> "),n=document.createElement("pre");return n.textContent=`${e} `,n},A(t){const e=t.textContent||"",n=t.getAttribute("href");return/^https?:/.test(e)&&e===n?e:n?`[${e}](${n})`:e},IMG(t){const e=t.getAttribute("alt")||"",n=t.getAttribute("src");if(!n)throw new Error;const s=t.hasAttribute("width")?` width="${ct(t.getAttribute("width")||"")}"`:"",i=t.hasAttribute("height")?` height="${ct(t.getAttribute("height")||"")}"`:"";return s||i?`${ct(e)}`:`![${e}](${n})`},LI(t){const e=t.parentNode;if(!e)throw new Error;let n="";Nl(t)||(e.nodeName==="OL"?at>0&&!e.previousSibling?n=`${dn(t)+at+1}\\. `:n=`${dn(t)+1}. `:n="* ");const s=n.replace(/\S/g," "),i=(t.textContent||"").trim().replace(/^/gm,s),r=document.createElement("pre");return r.textContent=i.replace(s,n),r},OL(t){const e=document.createElement("li");return e.appendChild(document.createElement("br")),t.append(e),t},H1(t){const e=parseInt(t.nodeName.slice(1));return t.prepend(`${Array(e+1).join("#")} `),t},UL(t){return t}};oe.UL=oe.OL;for(let t=2;t<=6;++t)oe[`H${t}`]=oe.H1;function Pl(t){const e=document.createNodeIterator(t,NodeFilter.SHOW_ELEMENT,{acceptNode(i){return i.nodeName in oe&&!Ml(i)&&(Cl(i)||Il(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}}),n=[];let s=e.nextNode();for(;s;)s instanceof HTMLElement&&n.push(s),s=e.nextNode();n.reverse();for(const i of n)i.replaceWith(oe[i.nodeName](i))}function Dl(t,e){const n=t.startContainer;if(!n||!n.parentNode||!(n.parentNode instanceof HTMLElement))throw new Error("the range must start within an HTMLElement");const s=n.parentNode;let i=t.cloneContents();if(e){const a=i.querySelector(e);a&&(i=document.createDocumentFragment(),i.appendChild(a))}at=0;const r=s.closest("li");if(s.closest("pre")){const a=document.createElement("pre");a.appendChild(i),i=document.createDocumentFragment(),i.appendChild(a)}else if(r&&r.parentNode&&(r.parentNode.nodeName==="OL"&&(at=dn(r)),!i.querySelector("li"))){const a=document.createElement("li");if(!r.parentNode)throw new Error;const c=document.createElement(r.parentNode.nodeName);a.appendChild(i),c.appendChild(a),i=document.createDocumentFragment(),i.appendChild(c)}return i}class sr{constructor(){this.selection=window.getSelection()}closest(e){const n=this.range.startContainer,s=n instanceof Element?n:n.parentElement;return s?s.closest(e):null}get active(){var e;return(((e=this.selection)===null||e===void 0?void 0:e.rangeCount)||0)>0}get range(){var e;return((e=this.selection)===null||e===void 0?void 0:e.rangeCount)?this.selection.getRangeAt(0):new Range}set range(e){var n,s;(n=this.selection)===null||n===void 0||n.removeAllRanges(),(s=this.selection)===null||s===void 0||s.addRange(e)}get selectionText(){var e;return((e=this.selection)===null||e===void 0?void 0:e.toString().trim())||""}get quotedText(){return`> ${this.selectionText.replace(/\n/g,` > `)} `}select(e){this.selection&&(this.selection.removeAllRanges(),this.selection.selectAllChildren(e))}insert(e){e.value?e.value=`${e.value} ${this.quotedText}`:e.value=this.quotedText,e.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1})),e.focus(),e.selectionStart=e.value.length,e.scrollTop=e.scrollHeight}}v("Q",sr);class $l extends sr{constructor(e="",n){super();this.scopeSelector=e,this.callback=n}get selectionText(){var e,n;if(!this.selection)return"";const s=Dl(this.range,(e=this.scopeSelector)!==null&&e!==void 0?e:"");(n=this.callback)===null||n===void 0||n.call(this,s),Pl(s);const i=document.body;if(!i)return"";const r=document.createElement("div");r.appendChild(s),r.style.cssText="position:absolute;left:-9999px;",i.appendChild(r);let o="";try{const a=document.createRange();a.selectNodeContents(r),this.selection.removeAllRanges(),this.selection.addRange(a),o=this.selection.toString(),this.selection.removeAllRanges(),a.detach()}finally{i.removeChild(r)}return o.trim()}}v("M",$l);let fn=null;function Rl(t){return!!t.id&&t.value!==t.defaultValue&&t.form!==fn}function _l(t,e){var n,s;const i=(n=e==null?void 0:e.selector)!==null&&n!==void 0?n:".js-session-resumable",o=`${(s=e==null?void 0:e.keyPrefix)!==null&&s!==void 0?s:"session-resume:"}${t}`,a=[];for(const l of document.querySelectorAll(i))(l instanceof HTMLInputElement||l instanceof HTMLTextAreaElement)&&a.push(l);let c=a.filter(l=>Rl(l)).map(l=>[l.id,l.value]);if(c.length)try{const l=sessionStorage.getItem(o);if(l!==null){const d=JSON.parse(l).filter(function(p){return!c.some(h=>h[0]===p[0])});c=c.concat(d)}sessionStorage.setItem(o,JSON.stringify(c))}catch(l){}}function Hl(t,e){var n;const i=`${(n=e==null?void 0:e.keyPrefix)!==null&&n!==void 0?n:"session-resume:"}${t}`;let r;try{r=sessionStorage.getItem(i)}catch(c){}if(!r)return;const o=[],a=[];for(const[c,l]of JSON.parse(r)){const u=new CustomEvent("session:resume",{bubbles:!0,cancelable:!0,detail:{targetId:c,targetValue:l}});if(document.dispatchEvent(u)){const d=document.getElementById(c);d&&(d instanceof HTMLInputElement||d instanceof HTMLTextAreaElement)?d.value===d.defaultValue&&(d.value=l,o.push(d)):a.push([c,l])}}if(a.length===0)try{sessionStorage.removeItem(i)}catch(c){}else sessionStorage.setItem(i,JSON.stringify(a));setTimeout(function(){for(const c of o)c.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!0}))},0)}function Ol(t){fn=t.target,setTimeout(function(){t.defaultPrevented&&(fn=null)},0)}function Fl(t){var e=null,n=!1,s=void 0,i=void 0,r=void 0;function o(h){if(s!==h.clientX||i!==h.clientY){var m=t.style.height;r&&r!==m&&(n=!0,t.style.maxHeight="",t.removeEventListener("mousemove",o)),r=m}s=h.clientX,i=h.clientY}var a=t.ownerDocument,c=a.documentElement;function l(){for(var h=0,m=t;m!==a.body&&m!==null;)h+=m.offsetTop||0,m=m.offsetParent;var f=h-a.defaultView.pageYOffset,b=c.clientHeight-(f+t.offsetHeight);return{top:f,bottom:b}}function u(){if(!n&&t.value!==e&&!(t.offsetWidth<=0&&t.offsetHeight<=0)){var h=l(),m=h.top,f=h.bottom;if(!(m<0||f<0)){var b=Number(getComputedStyle(t).height.replace(/px/,""))+f;t.style.maxHeight=b-100+"px";var g=t.parentElement;if(g instanceof HTMLElement){var E=g.style.height;g.style.height=getComputedStyle(g).height,t.style.height="auto",t.style.height=t.scrollHeight+"px",g.style.height=E,r=t.style.height}e=t.value}}}function d(){n=!1,t.style.height="",t.style.maxHeight=""}t.addEventListener("mousemove",o),t.addEventListener("input",u),t.addEventListener("change",u);var p=t.form;return p&&p.addEventListener("reset",d),t.value&&u(),{unsubscribe:function(){t.removeEventListener("mousemove",o),t.removeEventListener("input",u),t.removeEventListener("change",u),p&&p.removeEventListener("reset",d)}}}function ir(t,e){return`${t}:${e}`}function hn(t){const[e,n]=t.p.split(".");return{userId:t.u,presenceKey:ir(t.u,e),connectionCount:Number(n),metadata:t.m||[]}}const Wl="presence-";function lt(t){return t.startsWith(Wl)}class ql{constructor(){this.presenceItems=new Map}shouldUsePresenceItem(e){const n=this.presenceItems.get(e.presenceKey);return!n||n.connectionCount<=e.connectionCount}addPresenceItem(e){!this.shouldUsePresenceItem(e)||this.presenceItems.set(e.presenceKey,e)}removePresenceItem(e){!this.shouldUsePresenceItem(e)||this.presenceItems.delete(e.presenceKey)}replacePresenceItems(e){this.presenceItems.clear();for(const n of e)this.addPresenceItem(n)}getPresenceItems(){return Array.from(this.presenceItems.values())}}class Bl{constructor(){this.presenceChannels=new Map}getPresenceChannel(e){const n=this.presenceChannels.get(e)||new ql;return this.presenceChannels.set(e,n),n}handleMessage(e,n){const s=this.getPresenceChannel(e);switch(n.e){case"pf":s.replacePresenceItems(n.d.map(hn));break;case"pa":s.addPresenceItem(hn(n.d));break;case"pr":s.removePresenceItem(hn(n.d));break}return this.getChannelItems(e)}getChannelItems(e){return this.getPresenceChannel(e).getPresenceItems()}clearChannel(e){this.presenceChannels.delete(e)}}const Ie=v("_","_i");function Ul(t){return Object.assign(Object.assign({},t),{isLocal:!0})}class Vl{constructor(){this.subscriberMetadata=new Map}setMetadata(e,n){this.subscriberMetadata.set(e,n)}removeSubscribers(e){let n=!1;for(const s of e)n=this.subscriberMetadata.delete(s)||n;return n}getMetadata(e){if(!e){const r=[];let o;for(const a of this.subscriberMetadata.values())for(const c of a)if(Ie in c){const l=Boolean(c[Ie]);o=o===void 0?l:l&&o}else r.push(c);return o!==void 0&&r.push({[Ie]:o?1:0}),r}const n=[],{subscriber:s,markAllAsLocal:i}=e;for(const[r,o]of this.subscriberMetadata){const c=i||r===s?o.map(Ul):o;n.push(...c)}return n}hasSubscribers(){return this.subscriberMetadata.size>0}}class rr{constructor(){this.metadataByChannel=new Map}setMetadata({subscriber:e,channelName:n,metadata:s}){let i=this.metadataByChannel.get(n);i||(i=new Vl,this.metadataByChannel.set(n,i)),i.setMetadata(e,s)}removeSubscribers(e){const n=new Set;for(const[s,i]of this.metadataByChannel)i.removeSubscribers(e)&&n.add(s),i.hasSubscribers()||this.metadataByChannel.delete(s);return n}getChannelMetadata(e,n){const s=this.metadataByChannel.get(e);return(s==null?void 0:s.getMetadata(n))||[]}}v("Y",rr);async function jl(t,e){let n;const s=new Promise((i,r)=>{n=self.setTimeout(()=>r(new Error("timeout")),t)});if(!e)return s;try{await Promise.race([s,mn(e)])}catch(i){throw self.clearTimeout(n),i}}async function Kl(t,e){let n;const s=new Promise(i=>{n=self.setTimeout(i,t)});if(!e)return s;try{await Promise.race([s,mn(e)])}catch(i){throw self.clearTimeout(n),i}}async function zl(t,e,n=1/0,s){const i=s?mn(s):null;for(let r=0;r{const s=new Error("aborted");s.name="AbortError",t.aborted?n(s):t.addEventListener("abort",()=>n(s))})}function Yl(t){return Math.floor(Math.random()*Math.floor(t))}async function Xl(t,e,n){const s=new WebSocket(t),i=Ql(s);try{return await Promise.race([i,jl(e,n)]),s}catch(r){throw Gl(i),r}}async function Gl(t){try{(await t).close()}catch(e){}}function Jl(t,e){return zl(()=>Xl(t,e.timeout,e.signal),e.attempts,e.maxDelay,e.signal)}function Ql(t){return new Promise((e,n)=>{t.readyState===WebSocket.OPEN?e(t):(t.onerror=()=>{t.onerror=null,t.onopen=null,n(new Error("connect failed"))},t.onopen=()=>{t.onerror=null,t.onopen=null,e(t)})})}class or{constructor(e,n,s){this.socket=null,this.opening=null,this.url=e,this.delegate=n,this.policy=s}async open(){if(this.opening||this.socket)return;this.opening=new AbortController;const e=Object.assign(Object.assign({},this.policy),{signal:this.opening.signal});try{this.socket=await Jl(this.url,e)}catch(n){this.delegate.socketDidFinish(this);return}finally{this.opening=null}this.socket.onclose=n=>{this.socket=null,this.delegate.socketDidClose(this,n.code,n.reason),(this.delegate.socketShouldRetry?!this.delegate.socketShouldRetry(this,n.code):eu(n.code))?this.delegate.socketDidFinish(this):setTimeout(()=>this.open(),Zl(100,100+(this.delegate.reconnectWindow||50)))},this.socket.onmessage=n=>{this.delegate.socketDidReceiveMessage(this,n.data)},this.delegate.socketDidOpen(this)}close(e,n){this.opening?(this.opening.abort(),this.opening=null):this.socket&&(this.socket.onclose=null,this.socket.close(e,n),this.socket=null,this.delegate.socketDidClose(this,e,n),this.delegate.socketDidFinish(this))}send(e){this.socket&&this.socket.send(e)}isOpen(){return!!this.socket}}v("ai",or);function Zl(t,e){return Math.random()*(e-t)+t}function eu(t){return t===tu||t===nu}const tu=1008,nu=1011;class su{constructor(e){if(this.map=new Map,e)for(const[n,s]of e)this.set(n,s)}get(e){const n=this.map.get(e);return n||new Set}set(e,n){let s=this.map.get(e);return s||(s=new Set,this.map.set(e,s)),s.add(n),this}has(e){return this.map.has(e)}delete(e,n){const s=this.map.get(e);if(!s)return!1;if(!n)return this.map.delete(e);const i=s.delete(n);return s.size||this.map.delete(e),i}drain(e){const n=[];for(const s of this.keys())this.delete(s,e)&&!this.has(s)&&n.push(s);return n}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}[Symbol.iterator](){return this.entries()}clear(){this.map.clear()}get size(){return this.map.size}}class ar{constructor(){this.subscriptions=new su,this.signatures=new Map}add(...e){const n=[];for(const{subscriber:s,topic:i}of e)this.subscriptions.has(i.name)||(n.push(i),this.signatures.set(i.name,i)),this.subscriptions.set(i.name,s);return n}delete(...e){const n=[];for(const{subscriber:s,topic:i}of e)this.subscriptions.delete(i.name,s)&&!this.subscriptions.has(i.name)&&(n.push(i),this.signatures.delete(i.name));return n}drain(...e){const n=[];for(const s of e)for(const i of this.subscriptions.drain(s)){const r=this.signatures.get(i);this.signatures.delete(i),n.push(r)}return n}topics(){return this.signatures.values()}topic(e){return this.signatures.get(e)||null}subscribers(e){return this.subscriptions.get(e).values()}}v("X",ar);function*cr(t,e){for(let n=0;n{const s=new Error("aborted");s.name="AbortError",t.aborted?n(s):t.addEventListener("abort",()=>n(s))})}async function iu(t,e){let n;const s=new Promise(i=>{n=self.setTimeout(i,t)});if(!e)return s;try{await Promise.race([s,lr(e)])}catch(i){throw self.clearTimeout(n),i}}function ru(t){return Math.floor(Math.random()*Math.floor(t))}async function ou(t,e,n=1/0,s){const i=s?lr(s):null;for(let r=0;r{this.intentionallyDisconnected=!0,this.socket.close(1e3,"Alive Redeploy Early Client Reconnect")},r)}}socketDidFinish(){this.state!=="offline"&&this.reconnect()}socketDidReceiveMessage(e,n){const s=JSON.parse(n);switch(s.e){case"ack":{this.handleAck(s);break}case"msg":{this.handleMessage(s);break}}}handleAck(e){for(const n of this.subscriptions.topics())n.offset=e.off}handleMessage(e){const n=e.ch,s=this.subscriptions.topic(n);if(!!s){if(s.offset=e.off,"e"in e.data){const i=this.presence.handleMessage(n,e.data);this.notifyPresenceChannel(n,i);return}e.data.wait||(e.data.wait=0),this.notify(this.subscriptions.subscribers(n),{channel:n,type:"message",data:e.data})}}notifyPresenceChannel(e,n){var s,i;const r=new Map;for(const o of n){const{userId:a,metadata:c,presenceKey:l}=o,u=r.get(a)||{userId:a,isOwnUser:a===this.userId,metadata:[]};if(l!==this.presenceKey){for(const d of c){if(Ie in d){u.isIdle!==!1&&(u.isIdle=Boolean(d[Ie]));continue}u.metadata.push(d)}r.set(a,u)}}for(const o of this.subscriptions.subscribers(e)){const a=this.userId,c=Array.from(r.values()).filter(d=>d.userId!==a),l=(i=(s=r.get(this.userId))===null||s===void 0?void 0:s.metadata)!==null&&i!==void 0?i:[],u=this.presenceMetadata.getChannelMetadata(e,{subscriber:o,markAllAsLocal:!this.inSharedWorker});this.notify([o],{channel:e,type:"presence",data:[{userId:a,isOwnUser:!0,metadata:[...l,...u]},...c]})}}async reconnect(){if(!this.retrying)try{this.retrying=new AbortController;const e=await ou(this.getUrl,1/0,6e4,this.retrying.signal);e?(this.url=e,this.socket=this.connect()):this.shutdown()}catch(e){if(e.name!=="AbortError")throw e}finally{this.retrying=null}}getUrlWithPresenceId(){const e=new URL(this.url,self.location.origin);return e.searchParams.set("shared",this.inSharedWorker.toString()),e.searchParams.set("p",`${this.presenceId}.${this.connectionCount}`),e.toString()}connect(){const e=new or(this.getUrlWithPresenceId(),this,{timeout:4e3,attempts:7});return e.open(),e}sendSubscribe(e){const n=Array.from(e);for(const s of cr(n,25)){const i={};for(const r of s)lt(r.name)?i[r.signed]=JSON.stringify(this.presenceMetadata.getChannelMetadata(r.name)):i[r.signed]=r.offset;this.socket.send(JSON.stringify({subscribe:i}))}}sendUnsubscribe(e){const n=Array.from(e,s=>s.signed);for(const s of cr(n,25))this.socket.send(JSON.stringify({unsubscribe:s}));for(const s of e)lt(s.name)&&this.presence.clearChannel(s.name)}}v("V",lu);class pn{constructor(e,n){this.name=e,this.signed=n,this.offset=""}static parse(e){const[n,s]=e.split("--");if(!n||!s)return null;const i=JSON.parse(atob(n));return!i.c||!i.t?null:new pn(i.c,e)}}v("W",pn);const dr=new WeakSet;function uu(t){return dr.has(t)}function du(t,e){return uu(e)?(e(t),!0):!1}function fu(t){return(...e)=>{const n=t(...e);return dr.add(n),n}}const Ne=new WeakMap;class gn{constructor(e,n){this.element=e,this.type=n,this.element.addEventListener(this.type,this),Ne.get(this.element).set(this.type,this)}set(e){typeof e=="function"?this.handleEvent=e.bind(this.element):typeof e=="object"&&typeof e.handleEvent=="function"?this.handleEvent=e.handleEvent.bind(e):(this.element.removeEventListener(this.type,this),Ne.get(this.element).delete(this.type))}static for(e){Ne.has(e.element)||Ne.set(e.element,new Map);const n=e.attributeName.slice(2),s=Ne.get(e.element);return s.has(n)?s.get(n):new gn(e.element,n)}}function hu(t,e){return t instanceof $t&&t.attributeName.startsWith("on")?(gn.for(t).set(e),t.element.removeAttributeNS(t.attributeNamespace,t.attributeName),!0):!1}function mu(t,e){return e instanceof vn&&t instanceof G?(e.renderInto(t),!0):!1}function pu(t,e){return e instanceof DocumentFragment&&t instanceof G?(e.childNodes.length&&t.replace(...e.childNodes),!0):!1}function gu(t){return typeof t=="object"&&Symbol.iterator in t}function bu(t,e){if(!gu(e))return!1;if(t instanceof G){const n=[];for(const s of e)if(s instanceof vn){const i=document.createDocumentFragment();s.renderInto(i),n.push(...i.childNodes)}else s instanceof DocumentFragment?n.push(...s.childNodes):n.push(String(s));return n.length&&t.replace(...n),!0}else return t.value=Array.from(e).join(" "),!0}function vu(t,e){du(t,e)||fs(t,e)||hu(t,e)||mu(t,e)||pu(t,e)||bu(t,e)||_t(t,e)}const bn=new WeakMap,fr=new WeakMap,hr=new WeakMap;class vn{constructor(e,n,s){this.strings=e,this.values=n,this.processor=s}get template(){if(bn.has(this.strings))return bn.get(this.strings);{const e=document.createElement("template"),n=this.strings.length-1;return e.innerHTML=this.strings.reduce((s,i,r)=>s+i+(re=>{if(!(e instanceof G))return;const n=document.createElement("template");n.innerHTML=t;const s=document.importNode(n.content,!0);e.replace(...s.childNodes)}));var O,Pe,mr,ut,D=function(t,e){return{name:t,value:e===void 0?-1:e,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},dt=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if(t==="first-input"&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver(function(s){return s.getEntries().map(e)});return n.observe({type:t,buffered:!0}),n}}catch(s){}},ft=function(t,e){var n=function s(i){i.type!=="pagehide"&&document.visibilityState!=="hidden"||(t(i),e&&(removeEventListener("visibilitychange",s,!0),removeEventListener("pagehide",s,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},De=function(t){addEventListener("pageshow",function(e){e.persisted&&t(e)},!0)},j=typeof WeakSet=="function"?new WeakSet:new Set,F=function(t,e,n){var s;return function(){e.value>=0&&(n||j.has(e)||document.visibilityState==="hidden")&&(e.delta=e.value-(s||0),(e.delta||s===void 0)&&(s=e.value,t(e)))}},$e=-1,pr=function(){return document.visibilityState==="hidden"?0:1/0},gr=function(){ft(function(t){var e=t.timeStamp;$e=e},!0)},wn=function(){return $e<0&&($e=pr(),gr(),De(function(){setTimeout(function(){$e=pr(),gr()},0)})),{get firstHiddenTime(){return $e}}},ku=v("a3",function(t,e){var n,s=wn(),i=D("FCP"),r=function(c){c.name==="first-contentful-paint"&&(a&&a.disconnect(),c.startTime-1&&t(l)},i=D("CLS",0),r=0,o=[],a=function(l){if(!l.hadRecentInput){var u=o[0],d=o[o.length-1];r&&l.startTime-d.startTime<1e3&&l.startTime-u.startTime<5e3?(r+=l.value,o.push(l)):(r=l.value,o=[l]),r>i.value&&(i.value=r,i.entries=o,n())}},c=dt("layout-shift",a);c&&(n=F(s,i,e),ft(function(){c.takeRecords().map(a),n()}),De(function(){r=0,En=-1,i=D("CLS",0),n=F(s,i,e)}))}),Re={passive:!0,capture:!0},Tu=new Date,vr=function(t,e){O||(O=e,Pe=t,mr=new Date,Er(removeEventListener),wr())},wr=function(){if(Pe>=0&&Pe1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(n,s){var i=function(){vr(n,s),o()},r=function(){o()},o=function(){removeEventListener("pointerup",i,Re),removeEventListener("pointercancel",r,Re)};addEventListener("pointerup",i,Re),addEventListener("pointercancel",r,Re)}(e,t):vr(e,t)}},Er=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Au,Re)})},_u=v("a4",function(t,e){var n,s=wn(),i=D("FID"),r=function(a){a.startTimeCu(t,"name",{value:e,configurable:!0});const K=new Map;function ht(t){for(const e of K.keys())if(customElements.get(e)||t.querySelector(e)||t.matches(e)){for(const n of K.get(e)||[])n();K.delete(e)}}yn(ht,"scan");let yr=!1;function kn(){yr=!0,ht(document.body),new MutationObserver(e=>{if(!!K.size)for(const n of e)for(const s of n.addedNodes)s instanceof Element&&ht(s)}).observe(document,{subtree:!0,childList:!0})}yn(kn,"prepare");function kr(t,e){K.has(t)||K.set(t,[]),K.get(t).push(e),document.readyState==="interactive"||document.readyState==="complete"?yr?ht(document.body):kn():document.addEventListener("DOMContentLoaded",kn,{once:!0})}yn(kr,"whenSeen");/** * @license * Copyright (c) 2018 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const Wu=v("ag",kt(t=>e=>{if(t===void 0&&e instanceof xt){if(t!==e.value){const n=e.committer.name;e.committer.element.removeAttribute(n)}}else e.setValue(t)}));/** * @license * Copyright (c) 2017 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * The complete set of authors may be found at * http://polymer.github.io/AUTHORS.txt * The complete set of contributors may be found at * http://polymer.github.io/CONTRIBUTORS.txt * Code distributed by Google as part of the polymer project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */const Tr=(t,e)=>{const n=t.startNode.parentNode,s=e===void 0?t.endNode:e.startNode,i=n.insertBefore(C(),s);n.insertBefore(C(),s);const r=new Y(t.options);return r.insertAfterNode(i),r},z=(t,e)=>(t.setValue(e),t.commit(),t),Tn=(t,e,n)=>{const s=t.startNode.parentNode,i=n?n.startNode:t.endNode,r=e.endNode.nextSibling;r!==i&&co(s,e.startNode,r,i)},An=t=>{Tt(t.startNode.parentNode,t.startNode,t.endNode.nextSibling)},Ar=(t,e,n)=>{const s=new Map;for(let i=e;i<=n;i++)s.set(t[i],i);return s},xr=new WeakMap,Lr=new WeakMap,qu=v("ah",kt((t,e,n)=>{let s;return n===void 0?n=e:e!==void 0&&(s=e),i=>{if(!(i instanceof Y))throw new Error("repeat can only be used in text bindings");const r=xr.get(i)||[],o=Lr.get(i)||[],a=[],c=[],l=[];let u=0;for(const g of t)l[u]=s?s(g,u):u,c[u]=n(g,u),u++;let d,p,h=0,m=r.length-1,f=0,b=c.length-1;for(;h<=m&&f<=b;)if(r[h]===null)h++;else if(r[m]===null)m--;else if(o[h]===l[f])a[f]=z(r[h],c[f]),h++,f++;else if(o[m]===l[b])a[b]=z(r[m],c[b]),m--,b--;else if(o[h]===l[b])a[b]=z(r[h],c[b]),Tn(i,r[h],a[b+1]),h++,b--;else if(o[m]===l[f])a[f]=z(r[m],c[f]),Tn(i,r[m],r[h]),m--,f++;else if(d===void 0&&(d=Ar(l,f,b),p=Ar(o,h,m)),!d.has(o[h]))An(r[h]),h++;else if(!d.has(o[m]))An(r[m]),m--;else{const g=p.get(l[f]),E=g!==void 0?r[g]:null;if(E===null){const x=Tr(i,r[h]);z(x,c[f]),a[f]=x}else a[f]=z(E,c[f]),Tn(i,E,r[h]),r[g]=null;f++}for(;f<=b;){const g=Tr(i,a[b+1]);z(g,c[f]),a[f++]=g}for(;h<=m;){const g=r[h++];g!==null&&An(g)}xr.set(i,a),Lr.set(i,l)}}))}}}); //# sourceMappingURL=chunk-vendor-3f9569c1.js.map