chunk-vendor-542a6b40.js 159 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. 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;s<n;s++)if(l=t[s],c=l.selector(r[1])){for(i=u.length,o=!1;i--;)if(u[i].index===l&&u[i].key===c){o=!0;break}o||u.push({index:l,key:c});break}}while(r);return u}function Dr(t,e){var n,s,i;for(n=0,s=t.length;n<s;n++)if(i=t[n],e.isPrototypeOf(i))return i}k.prototype.logDefaultIndexUsed=function(){},k.prototype.add=function(t,e){var n,s,i,r,o,a,c,l,u=this.activeIndexes,d=this.selectors;if(typeof t=="string"){for(n={id:this.uid++,selector:t,data:e},c=Ln(this.indexes,t),s=0;s<c.length;s++)l=c[s],r=l.key,i=l.index,o=Dr(u,i),o||(o=Object.create(i),o.map=new mt,u.push(o)),i===this.indexes.default&&this.logDefaultIndexUsed(n),a=o.map.get(r),a||(a=[],o.map.set(r,a)),a.push(n);this.size++,d.push(t)}},k.prototype.remove=function(t,e){if(typeof t=="string"){var n,s,i,r,o,a,c,l,u=this.activeIndexes,d={},p=arguments.length===1;for(n=Ln(this.indexes,t),i=0;i<n.length;i++)for(s=n[i],r=u.length;r--;)if(a=u[r],s.index.isPrototypeOf(a)){if(c=a.map.get(s.key),c)for(o=c.length;o--;)l=c[o],l.selector===t&&(p||l.data===e)&&(c.splice(o,1),d[l.id]=!0);break}this.size-=Object.keys(d).length}};function Sn(t,e){return t.id-e.id}k.prototype.queryAll=function(t){if(!this.selectors.length)return[];var e={},n=[],s=this.querySelectorAll(this.selectors.join(", "),t),i,r,o,a,c,l,u,d;for(i=0,o=s.length;i<o;i++)for(c=s[i],l=this.matches(c),r=0,a=l.length;r<a;r++)d=l[r],e[d.id]?u=e[d.id]:(u={id:d.id,selector:d.selector,data:d.data,elements:[]},e[d.id]=u,n.push(u)),u.elements.push(c);return n.sort(Sn)},k.prototype.matches=function(t){if(!t)return[];var e,n,s,i,r,o,a,c,l,u,d,p=this.activeIndexes,h={},m=[];for(e=0,i=p.length;e<i;e++)if(a=p[e],c=a.element(t),c){for(n=0,r=c.length;n<r;n++)if(l=a.map.get(c[n]))for(s=0,o=l.length;s<o;s++)u=l[s],d=u.id,!h[d]&&this.matchesSelector(t,u.selector)&&(h[d]=!0,m.push(u))}return m.sort(Sn)};var _e=null,pt=null,gt=[];function Mn(t,e){var n=[];function s(){var r=n;n=[],e(r)}function i(){for(var r=arguments.length,o=Array(r),a=0;a<r;a++)o[a]=arguments[a];n.push(o),n.length===1&&bt(t,s)}return i}function bt(t,e){pt||(pt=new MutationObserver($r)),_e||(_e=t.createElement("div"),pt.observe(_e,{attributes:!0})),gt.push(e),_e.setAttribute("data-twiddle",""+Date.now())}function $r(){var t=gt;gt=[];for(var e=0;e<t.length;e++)try{t[e]()}catch(n){setTimeout(function(){throw n},0)}}var Cn=new WeakMap,ce=new WeakMap,He=new WeakMap,W=new WeakMap;function Oe(t,e){for(var n=0;n<e.length;n++){var s=e[n],i=s[0],r=s[1],o=s[2];i===Fe?(Rr(o,r),_r(o,r)):i===Pn?In(o,r):i===We&&Hr(t.observers,r)}}function Rr(t,e){if(e instanceof t.elementConstructor){var n=Cn.get(e);if(n||(n=[],Cn.set(e,n)),n.indexOf(t.id)===-1){var s=void 0;if(t.initialize&&(s=t.initialize.call(void 0,e)),s){var i=ce.get(e);i||(i={},ce.set(e,i)),i[""+t.id]=s}n.push(t.id)}}}function _r(t,e){if(e instanceof t.elementConstructor){var n=W.get(e);if(n||(n=[],W.set(e,n)),n.indexOf(t.id)===-1){t.elements.push(e);var s=ce.get(e),i=s?s[""+t.id]:null;if(i&&i.add&&i.add.call(void 0,e),t.subscribe){var r=t.subscribe.call(void 0,e);if(r){var o=He.get(e);o||(o={},He.set(e,o)),o[""+t.id]=r}}t.add&&t.add.call(void 0,e),n.push(t.id)}}}function In(t,e){if(e instanceof t.elementConstructor){var n=W.get(e);if(!!n){var s=t.elements.indexOf(e);if(s!==-1&&t.elements.splice(s,1),s=n.indexOf(t.id),s!==-1){var i=ce.get(e),r=i?i[""+t.id]:null;if(r&&r.remove&&r.remove.call(void 0,e),t.subscribe){var o=He.get(e),a=o?o[""+t.id]:null;a&&a.unsubscribe&&a.unsubscribe()}t.remove&&t.remove.call(void 0,e),n.splice(s,1)}n.length===0&&W.delete(e)}}}function Hr(t,e){var n=W.get(e);if(!!n){for(var s=n.slice(0),i=0;i<s.length;i++){var r=t[s[i]];if(!!r){var o=r.elements.indexOf(e);o!==-1&&r.elements.splice(o,1);var a=ce.get(e),c=a?a[""+r.id]:null;c&&c.remove&&c.remove.call(void 0,e);var l=He.get(e),u=l?l[""+r.id]:null;u&&u.unsubscribe&&u.unsubscribe(),r.remove&&r.remove.call(void 0,e)}}W.delete(e)}}var vt=null;function Or(t){if(vt===null){var e=t.createElement("div"),n=t.createElement("div"),s=t.createElement("div");e.appendChild(n),n.appendChild(s),e.innerHTML="",vt=s.parentNode!==n}return vt}function Nn(t){return"matches"in t||"webkitMatchesSelector"in t||"mozMatchesSelector"in t||"oMatchesSelector"in t||"msMatchesSelector"in t}var Fe=1,Pn=2,We=3;function Fr(t,e,n){for(var s=0;s<n.length;s++){var i=n[s];i.type==="childList"?(Dn(t,e,i.addedNodes),Wr(t,e,i.removedNodes)):i.type==="attributes"&&qe(t,e,i.target)}Or(t.ownerDocument)&&Ur(t,e)}function Dn(t,e,n){for(var s=0;s<n.length;s++){var i=n[s];if(Nn(i))for(var r=t.selectorSet.matches(i),o=0;o<r.length;o++){var a=r[o].data;e.push([Fe,i,a])}if("querySelectorAll"in i)for(var c=t.selectorSet.queryAll(i),l=0;l<c.length;l++)for(var u=c[l],d=u.data,p=u.elements,h=0;h<p.length;h++)e.push([Fe,p[h],d])}}function Wr(t,e,n){for(var s=0;s<n.length;s++){var i=n[s];if("querySelectorAll"in i){e.push([We,i]);for(var r=i.querySelectorAll("*"),o=0;o<r.length;o++)e.push([We,r[o]])}}}function qe(t,e,n){if(Nn(n))for(var s=t.selectorSet.matches(n),i=0;i<s.length;i++){var r=s[i].data;e.push([Fe,n,r])}if("querySelectorAll"in n){var o=W.get(n);if(o)for(var a=0;a<o.length;a++){var c=t.observers[o[a]];c&&(t.selectorSet.matchesSelector(n,c.selector)||e.push([Pn,n,c]))}}}function qr(t,e,n){if("querySelectorAll"in n){qe(t,e,n);for(var s=n.querySelectorAll("*"),i=0;i<s.length;i++)qe(t,e,s[i])}}function Br(t,e,n){for(var s=0;s<n.length;s++)for(var i=n[s],r=i.form?i.form.elements:t.rootNode.querySelectorAll("input"),o=0;o<r.length;o++)qe(t,e,r[o])}function Ur(t,e){for(var n=0;n<t.observers.length;n++){var s=t.observers[n];if(s)for(var i=s.elements,r=0;r<i.length;r++){var o=i[r];o.parentNode||e.push([We,o])}}}function Vr(t,e){var n=t.readyState;n==="interactive"||n==="complete"?bt(t,e):t.addEventListener("DOMContentLoaded",bt(t,e))}var jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kr=0;function le(t){this.rootNode=t.nodeType===9?t.documentElement:t,this.ownerDocument=t.nodeType===9?t:t.ownerDocument,this.observers=[],this.selectorSet=new k,this.mutationObserver=new MutationObserver(Xr.bind(this,this)),this._scheduleAddRootNodes=Mn(this.ownerDocument,Yr.bind(this,this)),this._handleThrottledChangedTargets=Mn(this.ownerDocument,Jr.bind(this,this)),this.rootNode.addEventListener("change",Gr.bind(this,this),!1),Vr(this.ownerDocument,zr.bind(this,this))}le.prototype.disconnect=function(){this.mutationObserver.disconnect()},le.prototype.observe=function(t,e){var n=void 0;typeof e=="function"?n={selector:t,initialize:e}:(typeof e=="undefined"?"undefined":jr(e))==="object"?(n=e,n.selector=t):n=t;var s=this,i={id:Kr++,selector:n.selector,initialize:n.initialize,add:n.add,remove:n.remove,subscribe:n.subscribe,elements:[],elementConstructor:n.hasOwnProperty("constructor")?n.constructor:this.ownerDocument.defaultView.Element,abort:function(){s._abortObserving(i)}};return this.selectorSet.add(i.selector,i),this.observers[i.id]=i,this._scheduleAddRootNodes(),i},le.prototype._abortObserving=function(t){for(var e=t.elements,n=0;n<e.length;n++)In(t,e[n]);this.selectorSet.remove(t.selector,t),delete this.observers[t.id]},le.prototype.triggerObservers=function(t){var e=[];qr(this,e,t),Oe(this,e)};function zr(t){t.mutationObserver.observe(t.rootNode,{childList:!0,attributes:!0,subtree:!0}),t._scheduleAddRootNodes()}function Yr(t){var e=[];Dn(t,e,[t.rootNode]),Oe(t,e)}function Xr(t,e){var n=[];Fr(t,n,e),Oe(t,n)}function Gr(t,e){t._handleThrottledChangedTargets(e.target)}function Jr(t,e){var n=[];Br(t,n,e),Oe(t,n)}var wt=void 0;function Qr(){return wt||(wt=new le(window.document)),wt}function Zr(){var t;return(t=Qr()).observe.apply(t,arguments)}var $n={},Rn={},Et=new WeakMap,_n=new WeakMap,yt=new WeakMap,Hn=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function On(t,e,n){var s=t[e];return t[e]=function(){return n.apply(t,arguments),s.apply(t,arguments)},t}function eo(t,e,n){var s=[],i=e;do{if(i.nodeType!==1)break;var r=t.matches(i);if(r.length){var o={node:i,observers:r};n?s.unshift(o):s.push(o)}}while(i=i.parentElement);return s}function to(){Et.set(this,!0)}function no(){Et.set(this,!0),_n.set(this,!0)}function so(){return yt.get(this)||null}function Fn(t,e){!Hn||Object.defineProperty(t,"currentTarget",{configurable:!0,enumerable:!0,get:e||Hn.get})}function io(t){try{return t.eventPhase,!0}catch(e){return!1}}function ro(t){if(!!io(t)){var e=t.eventPhase===1?Rn:$n,n=e[t.type];if(!!n){var s=eo(n,t.target,t.eventPhase===1);if(!!s.length){On(t,"stopPropagation",to),On(t,"stopImmediatePropagation",no),Fn(t,so);for(var i=0,r=s.length;i<r&&!Et.get(t);i++){var o=s[i];yt.set(t,o.node);for(var a=0,c=o.observers.length;a<c&&!_n.get(t);a++)o.observers[a].data.call(o.node,t)}yt.delete(t),Fn(t)}}}}function oo(t,e,n){var s=arguments.length>3&&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}))}/**
  2. * @license
  3. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  4. * This code may only be used under the BSD style license found at
  5. * http://polymer.github.io/LICENSE.txt
  6. * The complete set of authors may be found at
  7. * http://polymer.github.io/AUTHORS.txt
  8. * The complete set of contributors may be found at
  9. * http://polymer.github.io/CONTRIBUTORS.txt
  10. * Code distributed by Google as part of the polymer project is also
  11. * subject to an additional IP rights grant found at
  12. * http://polymer.github.io/PATENTS.txt
  13. */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);/**
  14. * @license
  15. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  16. * This code may only be used under the BSD style license found at
  17. * http://polymer.github.io/LICENSE.txt
  18. * The complete set of authors may be found at
  19. * http://polymer.github.io/AUTHORS.txt
  20. * The complete set of contributors may be found at
  21. * http://polymer.github.io/CONTRIBUTORS.txt
  22. * Code distributed by Google as part of the polymer project is also
  23. * subject to an additional IP rights grant found at
  24. * http://polymer.github.io/PATENTS.txt
  25. */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}};/**
  26. * @license
  27. * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
  28. * This code may only be used under the BSD style license found at
  29. * http://polymer.github.io/LICENSE.txt
  30. * The complete set of authors may be found at
  31. * http://polymer.github.io/AUTHORS.txt
  32. * The complete set of contributors may be found at
  33. * http://polymer.github.io/CONTRIBUTORS.txt
  34. * Code distributed by Google as part of the polymer project is also
  35. * subject to an additional IP rights grant found at
  36. * http://polymer.github.io/PATENTS.txt
  37. */const S={},Bn={};/**
  38. * @license
  39. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  40. * This code may only be used under the BSD style license found at
  41. * http://polymer.github.io/LICENSE.txt
  42. * The complete set of authors may be found at
  43. * http://polymer.github.io/AUTHORS.txt
  44. * The complete set of contributors may be found at
  45. * http://polymer.github.io/CONTRIBUTORS.txt
  46. * Code distributed by Google as part of the polymer project is also
  47. * subject to an additional IP rights grant found at
  48. * http://polymer.github.io/PATENTS.txt
  49. */const R=`{{lit-${String(Math.random()).slice(2)}}}`,Un=`<!--${R}-->`,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(;c<u;){const d=r.nextNode();if(d===null){r.currentNode=i.pop();continue}if(a++,d.nodeType===1){if(d.hasAttributes()){const p=d.attributes,{length:h}=p;let m=0;for(let f=0;f<h;f++)jn(p[f].name,de)&&m++;for(;m-- >0;){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<f;b++){let g,E=m[b];if(E==="")g=C();else{const x=At.exec(E);x!==null&&jn(x[2],de)&&(E=E.slice(0,x.index)+x[1]+x[2].slice(0,-de.length)+x[3]),g=document.createTextNode(E)}h.insertBefore(g,d),this.parts.push({type:"node",index:++a})}m[f]===""?(h.insertBefore(C(),d),s.push(d)):d.data=m[f],c+=f}}else if(d.nodeType===8)if(d.data===R){const p=d.parentNode;(d.previousSibling===null||a===o)&&(a++,p.insertBefore(C(),d)),o=a,this.parts.push({type:"node",index:a}),d.nextSibling===null?d.data="":(s.push(d),a--),c++}else{let p=-1;for(;(p=d.data.indexOf(R,p+1))!==-1;)this.parts.push({type:"node",index:-1}),c++}}for(const d of s)d.parentNode.removeChild(d)}}const jn=(t,e)=>{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"'`<>=]*|"[^"]*|'[^']*))$/;/**
  50. * @license
  51. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  52. * This code may only be used under the BSD style license found at
  53. * http://polymer.github.io/LICENSE.txt
  54. * The complete set of authors may be found at
  55. * http://polymer.github.io/AUTHORS.txt
  56. * The complete set of contributors may be found at
  57. * http://polymer.github.io/CONTRIBUTORS.txt
  58. * Code distributed by Google as part of the polymer project is also
  59. * subject to an additional IP rights grant found at
  60. * http://polymer.github.io/PATENTS.txt
  61. */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<s.length;){if(a=s[r],!uo(a)){this.__parts.push(void 0),r++;continue}for(;o<a.index;)o++,c.nodeName==="TEMPLATE"&&(n.push(c),i.currentNode=c.content),(c=i.nextNode())===null&&(i.currentNode=n.pop(),c=i.nextNode());if(a.type==="node"){const l=this.processor.handleTextExpression(this.options);l.insertAfterNode(c.previousSibling),this.__parts.push(l)}else this.__parts.push(...this.processor.handleAttributeExpressions(c,a.name,a.strings,this.options));r++}return qn&&(document.adoptNode(e),customElements.upgrade(e)),e}}/**
  62. * @license
  63. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  64. * This code may only be used under the BSD style license found at
  65. * http://polymer.github.io/LICENSE.txt
  66. * The complete set of authors may be found at
  67. * http://polymer.github.io/AUTHORS.txt
  68. * The complete set of contributors may be found at
  69. * http://polymer.github.io/CONTRIBUTORS.txt
  70. * Code distributed by Google as part of the polymer project is also
  71. * subject to an additional IP rights grant found at
  72. * http://polymer.github.io/PATENTS.txt
  73. */const fo=` ${R} `;class zn{constructor(e,n,s,i){this.strings=e,this.values=n,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let n="",s=!1;for(let i=0;i<e;i++){const r=this.strings[i],o=r.lastIndexOf("<!--");s=(o>-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}}/**
  74. * @license
  75. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  76. * This code may only be used under the BSD style license found at
  77. * http://polymer.github.io/LICENSE.txt
  78. * The complete set of authors may be found at
  79. * http://polymer.github.io/AUTHORS.txt
  80. * The complete set of contributors may be found at
  81. * http://polymer.github.io/CONTRIBUTORS.txt
  82. * Code distributed by Google as part of the polymer project is also
  83. * subject to an additional IP rights grant found at
  84. * http://polymer.github.io/PATENTS.txt
  85. */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;i<s.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new xt(this)}_getValue(){const e=this.strings,n=e.length-1;let s="";for(let i=0;i<n;i++){s+=e[i];const r=this.parts[i];if(r!==void 0){const o=r.value;if(Be(o)||!Yn(o))s+=typeof o=="string"?o:String(o);else for(const a of o)s+=typeof a=="string"?a:String(a)}}return s+=e[n],s}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class xt{constructor(e){this.value=void 0,this.committer=e}setValue(e){e!==S&&(!Be(e)||e!==this.value)&&(this.value=e,ue(e)||(this.committer.dirty=!0))}commit(){for(;ue(this.value);){const e=this.value;this.value=S,e(this)}this.value!==S&&this.committer.commit()}}class Y{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(C()),this.endNode=e.appendChild(C())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=C()),e.__insert(this.endNode=C())}insertAfterPart(e){e.__insert(this.startNode=C()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){for(;ue(this.__pendingValue);){const n=this.__pendingValue;this.__pendingValue=S,n(this)}const e=this.__pendingValue;e!==S&&(Be(e)?e!==this.value&&this.__commitText(e):e instanceof zn?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):Yn(e)?this.__commitIterable(e):e===Bn?(this.value=Bn,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const n=this.startNode.nextSibling;e=e==null?"":e;const s=typeof e=="string"?e:String(e);n===this.endNode.previousSibling&&n.nodeType===3?n.data=s:this.__commitNode(document.createTextNode(s)),this.value=e}__commitTemplateResult(e){const n=this.options.templateFactory(e);if(this.value instanceof Kn&&this.value.template===n)this.value.update(e.values);else{const s=new Kn(n,e.processor,this.options),i=s._clone();s.update(e.values),this.__commitNode(i),this.value=s}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const n=this.value;let s=0,i;for(const r of e)i=n[s],i===void 0&&(i=new Y(this.options),n.push(i),s===0?i.appendIntoPart(this):i.insertAfterPart(n[s-1])),i.setValue(r),i.commit(),s++;s<n.length&&(n.length=s,this.clear(i&&i.endNode))}clear(e=this.startNode){Tt(this.startNode.parentNode,e.nextSibling,this.endNode)}}class ho{constructor(e,n,s){if(this.value=void 0,this.__pendingValue=void 0,s.length!==2||s[0]!==""||s[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=n,this.strings=s}setValue(e){this.__pendingValue=e}commit(){for(;ue(this.__pendingValue);){const n=this.__pendingValue;this.__pendingValue=S,n(this)}if(this.__pendingValue===S)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=S}}class mo extends Xn{constructor(e,n,s){super(e,n,s);this.single=s.length===2&&s[0]===""&&s[1]===""}_createPart(){return new po(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class po extends xt{}let Gn=!1;try{const t={get capture(){return Gn=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}class go{constructor(e,n,s){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=n,this.eventContext=s,this.__boundHandleEvent=i=>this.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);/**
  86. * @license
  87. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  88. * This code may only be used under the BSD style license found at
  89. * http://polymer.github.io/LICENSE.txt
  90. * The complete set of authors may be found at
  91. * http://polymer.github.io/AUTHORS.txt
  92. * The complete set of contributors may be found at
  93. * http://polymer.github.io/CONTRIBUTORS.txt
  94. * Code distributed by Google as part of the polymer project is also
  95. * subject to an additional IP rights grant found at
  96. * http://polymer.github.io/PATENTS.txt
  97. */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;/**
  98. * @license
  99. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  100. * This code may only be used under the BSD style license found at
  101. * http://polymer.github.io/LICENSE.txt
  102. * The complete set of authors may be found at
  103. * http://polymer.github.io/AUTHORS.txt
  104. * The complete set of contributors may be found at
  105. * http://polymer.github.io/CONTRIBUTORS.txt
  106. * Code distributed by Google as part of the polymer project is also
  107. * subject to an additional IP rights grant found at
  108. * http://polymer.github.io/PATENTS.txt
  109. */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;/**
  110. * @license
  111. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  112. * This code may only be used under the BSD style license found at
  113. * http://polymer.github.io/LICENSE.txt
  114. * The complete set of authors may be found at
  115. * http://polymer.github.io/AUTHORS.txt
  116. * The complete set of contributors may be found at
  117. * http://polymer.github.io/CONTRIBUTORS.txt
  118. * Code distributed by Google as part of the polymer project is also
  119. * subject to an additional IP rights grant found at
  120. * http://polymer.github.io/PATENTS.txt
  121. */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()});/**
  122. * @license
  123. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  124. * This code may only be used under the BSD style license found at
  125. * http://polymer.github.io/LICENSE.txt
  126. * The complete set of authors may be found at
  127. * http://polymer.github.io/AUTHORS.txt
  128. * The complete set of contributors may be found at
  129. * http://polymer.github.io/CONTRIBUTORS.txt
  130. * Code distributed by Google as part of the polymer project is also
  131. * subject to an additional IP rights grant found at
  132. * http://polymer.github.io/PATENTS.txt
  133. */(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;s<e.length;s+=1){const i=e[s];let r=n.get(i);if(s===e.length-1)return r instanceof Ue&&(n.delete(r),r=null),r||(r=new Lt(n),n.children[i]=r),r;r instanceof Lt&&(r=null),r||(r=new Ue(n),n.children[i]=r),n=r}return n}delete(e){for(const n in this.children)if(this.children[n]===e){const i=delete this.children[n];return Object.keys(this.children).length===0&&this.parent&&this.parent.delete(this),i}return!1}}function St(t){if(!(t instanceof HTMLElement))return!1;const e=t.nodeName.toLowerCase(),n=(t.getAttribute("type")||"").toLowerCase();return e==="select"||e==="textarea"||e==="input"&&n!=="submit"&&n!=="reset"&&n!=="checkbox"&&n!=="radio"||t.isContentEditable}function yo(t){St(t)?t.focus():t.click()}function ko(t){return t.split(",").map(e=>e.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)}/**
  134. * @license
  135. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  136. * This code may only be used under the BSD style license found at
  137. * http://polymer.github.io/LICENSE.txt
  138. * The complete set of authors may be found at
  139. * http://polymer.github.io/AUTHORS.txt
  140. * The complete set of contributors may be found at
  141. * http://polymer.github.io/CONTRIBUTORS.txt
  142. * Code distributed by Google as part of the polymer project is also
  143. * subject to an additional IP rights grant found at
  144. * http://polymer.github.io/PATENTS.txt
  145. */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;r<t.length&&!(r>n.lastRenderedIndex);r++){const o=t[r];if(Be(o)||typeof o.then!="function"){e.setValue(o),n.lastRenderedIndex=r;break}r<i&&o===s[r]||(n.lastRenderedIndex=as,i=0,Promise.resolve(o).then(a=>{const c=n.values.indexOf(o);c>-1&&c<n.lastRenderedIndex&&(n.lastRenderedIndex=c,e.setValue(a),e.commit())}))}}));function Dt(t,e=0,{start:n=!0,middle:s=!0,once:i=!1}={}){let r=0,o,a=!1;function c(...l){if(a)return;const u=Date.now()-r;r=Date.now(),n?(n=!1,t.apply(this,l),i&&c.cancel()):(s&&u<e||!s)&&(clearTimeout(o),o=setTimeout(()=>{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;i<t.length;i+=1)t[i]==="{"&&t[i+1]==="{"&&t[i-1]!=="\\"&&!s?(s=!0,e&&(yield{type:"string",start:n,end:i,value:e}),e="{{",n=i,i+=2):t[i]==="}"&&t[i+1]==="}"&&t[i-1]!=="\\"&&s&&(s=!1,yield{type:"part",start:n,end:i+2,value:e.slice(2).trim()},e="",i+=2,n=i),e+=t[i]||"";e&&(yield{type:"string",start:n,end:t.length,value:e})}var us=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},_=function(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)},I,Ke;class $t{constructor(e,n){this.expression=n,I.set(this,void 0),Ke.set(this,""),us(this,I,e),_(this,I).updateParent("")}get attributeName(){return _(this,I).attr.name}get attributeNamespace(){return _(this,I).attr.namespaceURI}get value(){return _(this,Ke)}set value(e){us(this,Ke,e||""),_(this,I).updateParent(e)}get element(){return _(this,I).element}get booleanValue(){return _(this,I).booleanValue}set booleanValue(e){_(this,I).booleanValue=e}}I=new WeakMap,Ke=new WeakMap;class Oo{constructor(e,n){this.element=e,this.attr=n,this.partList=[]}get booleanValue(){return this.element.hasAttributeNS(this.attr.namespaceURI,this.attr.name)}set booleanValue(e){if(this.partList.length!==1)throw new DOMException("Operation not supported","NotSupportedError");this.partList[0].value=e?"":null}append(e){this.partList.push(e)}updateParent(e){if(this.partList.length===1&&e===null)this.element.removeAttributeNS(this.attr.namespaceURI,this.attr.name);else{const n=this.partList.map(s=>typeof 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<n.attributes.length;s+=1){const i=n.attributes.item(s);if(i&&i.value.includes("{{")){const r=new Oo(n,i);for(const o of ls(i.value))if(o.type==="string")r.append(o.value);else{const a=new $t(r,o.value);r.append(a),yield a}}}else if(n instanceof Text&&n.textContent&&n.textContent.includes("{{"))for(const s of ls(n.textContent)){s.end<n.textContent.length&&n.splitText(s.end),s.type==="part"&&(yield new G(n,s.value));break}}class ge extends DocumentFragment{constructor(e,n,s=Fo){var i,r;super();me.set(this,void 0),pe.set(this,void 0),Object.getPrototypeOf(this!==ge.prototype)&&Object.setPrototypeOf(this,ge.prototype),this.appendChild(e.content.cloneNode(!0)),hs(this,pe,Array.from(Wo(this))),hs(this,me,s),(r=(i=ze(this,me)).createCallback)===null||r===void 0||r.call(i,this,ze(this,pe),n)}update(e){ze(this,me).processCallback(this,ze(this,pe),e)}}v("e",ge),me=new WeakMap,pe=new WeakMap;function qo(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)}function Bo(t){const e=new URLSearchParams,n=new FormData(t).entries();for(const[s,i]of[...n])e.append(s,i.toString());return e.toString()}class Uo extends Error{constructor(e,n){super(e);this.response=n}}function ms(){let t,e;return[new Promise(function(s,i){t=s,e=i}),t,e]}let J;const ps=[],gs=[];function Vo(t){ps.push(t)}function jo(t){gs.push(t)}function Ko(t,e){J||(J=new Map,document.addEventListener("submit",Yo));const n=J.get(t)||[];J.set(t,[...n,e])}function zo(t){const e=[];for(const n of J.keys())if(t.matches(n)){const s=J.get(n)||[];e.push(...s)}return e}function Yo(t){if(!(t.target instanceof HTMLFormElement))return;const e=t.target,n=zo(e);if(n.length===0)return;const s=Go(e),[i,r,o]=ms();t.preventDefault(),Xo(n,e,s,i).then(async a=>{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&&d<e||!s)&&(clearTimeout(o),o=setTimeout(function(){r=Date.now(),t(...u),i&&l.cancel()},s?e-d:e))}};return c.cancel=function(){clearTimeout(o),a=!0},c}function na(t,e=0,{start:n=!1,middle:s=!1,once:i=!1}={}){return ta(t,e,{start:n,middle:s,once:i})}const be=new WeakMap;class Ft extends HTMLElement{connectedCallback(){const e=this.input;if(!e)return;const n=na(ra.bind(null,this),300),s={check:n,controller:null};be.set(this,s),e.addEventListener("input",Ls),e.addEventListener("input",n),e.autocomplete="off",e.spellcheck=!1}disconnectedCallback(){const e=this.input;if(!e)return;const n=be.get(this);!n||(be.delete(this),e.removeEventListener("input",Ls),e.removeEventListener("input",n.check),e.setCustomValidity(""))}attributeChangedCallback(e){if(e==="required"){const n=this.input;if(!n)return;n.required=this.required}}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const e=this.getAttribute("src");if(!e)return"";const n=this.ownerDocument.createElement("a");return n.href=e,n.href}set src(e){this.setAttribute("src",e)}get csrf(){const e=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||e instanceof HTMLInputElement&&e.value||""}set csrf(e){this.setAttribute("csrf",e)}get required(){return this.hasAttribute("required")}set required(e){e?this.setAttribute("required",""):this.removeAttribute("required")}}function Ls(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof Ft))return;const s=n.src,i=n.csrf,r=be.get(n);if(!s||!i||!r)return;let o="Verifying\u2026";const a=c=>o=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=`
  146. <style>
  147. :host { touch-action: none; display: block; }
  148. :host(.nesw) { cursor: nesw-resize; }
  149. :host(.nwse) { cursor: nwse-resize; }
  150. :host(.nesw) .crop-box, :host(.nwse) .crop-box { cursor: inherit; }
  151. :host([loaded]) .crop-image { display: block; }
  152. :host([loaded]) ::slotted([data-loading-slot]), .crop-image { display: none; }
  153. .crop-wrapper {
  154. position: relative;
  155. font-size: 0;
  156. }
  157. .crop-container {
  158. user-select: none;
  159. -ms-user-select: none;
  160. -moz-user-select: none;
  161. -webkit-user-select: none;
  162. position: absolute;
  163. overflow: hidden;
  164. z-index: 1;
  165. top: 0;
  166. width: 100%;
  167. height: 100%;
  168. }
  169. :host([rounded]) .crop-box {
  170. border-radius: 50%;
  171. box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.3);
  172. }
  173. .crop-box {
  174. position: absolute;
  175. border: 1px dashed #fff;
  176. box-sizing: border-box;
  177. cursor: move;
  178. }
  179. :host([rounded]) .crop-outline {
  180. outline: none;
  181. }
  182. .crop-outline {
  183. position: absolute;
  184. top: 0;
  185. bottom: 0;
  186. left: 0;
  187. right: 0;
  188. outline: 4000px solid rgba(0, 0, 0, .3);
  189. }
  190. .handle { position: absolute; }
  191. :host([rounded]) .handle::before { border-radius: 50%; }
  192. .handle:before {
  193. position: absolute;
  194. display: block;
  195. padding: 4px;
  196. transform: translate(-50%, -50%);
  197. content: ' ';
  198. background: #fff;
  199. border: 1px solid #767676;
  200. }
  201. .ne { top: 0; right: 0; cursor: nesw-resize; }
  202. .nw { top: 0; left: 0; cursor: nwse-resize; }
  203. .se { bottom: 0; right: 0; cursor: nwse-resize; }
  204. .sw { bottom: 0; left: 0; cursor: nesw-resize; }
  205. </style>
  206. <slot></slot>
  207. <div class="crop-wrapper">
  208. <img width="100%" class="crop-image" alt="">
  209. <div class="crop-container">
  210. <div data-crop-box class="crop-box">
  211. <div class="crop-outline"></div>
  212. <div data-direction="nw" class="handle nw"></div>
  213. <div data-direction="ne" class="handle ne"></div>
  214. <div data-direction="sw" class="handle sw"></div>
  215. <div data-direction="se" class="handle se"></div>
  216. </div>
  217. </div>
  218. </div>
  219. `;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;a<r;a+=1)s[a].setAttribute("tabindex",a===o?"0":"-1");t.preventDefault(),s[o].focus()}window.customElements.get("markdown-toolbar")||(window.MarkdownToolbarElement=zt,window.customElements.define("markdown-toolbar",zt));function Yt(t){return t.trim().split(`
  220. `).length>1}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(`
  221. `);let n=0;for(let s=0;s<e.length;s++){const i=e[s].length+1;t.selectionStart>=n&&t.selectionStart<n+i&&(t.selectionStart=n),t.selectionEnd>=n&&t.selectionEnd<n+i&&(t.selectionEnd=n+i-1),n+=i}}function Ka(t,e,n,s=!1){if(t.selectionStart===t.selectionEnd)t.selectionStart=qa(t.value,t.selectionStart),t.selectionEnd=Ba(t.value,t.selectionEnd,s);else{const i=t.selectionStart-e.length,r=t.selectionEnd+n.length,o=t.value.slice(i,t.selectionStart)===e,a=t.value.slice(t.selectionEnd,r)===n;o&&a&&(t.selectionStart=i,t.selectionEnd=r)}return t.value.slice(t.selectionStart,t.selectionEnd)}function Xt(t){const e=t.value.slice(0,t.selectionStart),n=t.value.slice(t.selectionEnd),s=e.match(/\n*$/),i=n.match(/^\n*/),r=s?s[0].length:0,o=i?i[0].length:0;let a,c;return e.match(/\S/)&&r<2&&(a=pi(`
  222. `,2-r)),n.match(/\S/)&&o<2&&(c=pi(`
  223. `,2-o)),a==null&&(a=""),c==null&&(c=""),{newlinesToAppend:a,newlinesToPrepend:c}}function za(t,e){let n,s;const{prefix:i,suffix:r,blockPrefix:o,blockSuffix:a,replaceNext:c,prefixSpace:l,scanFor:u,surroundWithNewlines:d}=e,p=t.selectionStart,h=t.selectionEnd;let m=t.value.slice(t.selectionStart,t.selectionEnd),f=Yt(m)&&o.length>0?`${o}
  224. `:i,b=Yt(m)&&a.length>0?`
  225. ${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(`
  226. `);if(c.every(u=>u.startsWith(n)&&u.endsWith(s)))r=c.map(u=>u.slice(n.length,u.length-s.length)).join(`
  227. `),a=o+r.length;else if(r=c.map(u=>n+u+s).join(`
  228. `),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(`
  229. `),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(`
  230. `),processed:s}}function bi(t){const e=t.split(`
  231. `),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(`
  232. `),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(`
  233. `).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(`
  234. `)+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<n&&n++;const i={list:w.sourceList,index:w.sourceIndex},r={list:s,index:n},o=Jt.get(w.dragging);o&&o.sortFinished({src:i,dst:r})}function oc(){!w||(w.dragging.classList.remove("is-dragging"),w.dragging.classList.remove("is-ghost"),w.didDrop||w.sourceList.insertBefore(w.dragging,w.sourceSibling),w=null)}function ac(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")}}const yi=new WeakMap;class se extends HTMLElement{connectedCallback(){this.addEventListener("change",n=>{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=`
  235. <span class="handle">
  236. <svg class="drag-handle" aria-hidden="true" width="16" height="16">
  237. <path d="M10 13a1 1 0 100-2 1 1 0 000 2zm-4 0a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zM6 5a1 1 0 100-2 1 1 0 000 2z"/>
  238. </svg>
  239. </span>`;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&&a<s.length&&(r=a)}const o=s[r];if(!!o)for(const a of s)o===a?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),kc(this.list,o)):a.setAttribute("aria-selected","false")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const e of this.list.querySelectorAll('[aria-selected="true"]'))e.setAttribute("aria-selected","false")}}v("C",tn);function vc(t,e){if(!(t.shiftKey||t.metaKey||t.altKey)&&!(!en&&t.ctrlKey)&&!e.isComposing)switch(t.key){case"Enter":case"Tab":wc(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":en&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":en&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}function Si(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');!e||e.getAttribute("aria-disabled")!=="true"&&Ec(e)}function wc(t,e){const n=e.querySelector('[aria-selected="true"]');return n?(n.getAttribute("aria-disabled")==="true"||n.click(),!0):!1}function Ec(t){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0}))}function Mi(t){return!t.hidden&&!(t instanceof HTMLInputElement&&t.type==="hidden")&&(t.offsetWidth>0||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<i)return;if(s){if(r!=null){if(r===o)return;o=r-1}if(t[o+1]===" "&&n>=o+2||t.lastIndexOf(`
  240. `,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<u;l++){const d=Ci[l];c.push(`${d}:${a.getPropertyValue(d)};`)}s.style.cssText=c.join(" ")}const i=document.createElement("span");i.style.cssText="position: absolute;",i.innerHTML="&nbsp;";let r,o;if(typeof e=="number"){let a=t.value.substring(0,e);a&&(r=document.createTextNode(a)),a=t.value.substring(e),a&&(o=document.createTextNode(a))}else{const a=t.value;a&&(r=document.createTextNode(a))}if(r&&s.appendChild(r),s.appendChild(i),o&&s.appendChild(o),!s.parentElement){if(!t.parentElement)throw new Error("textField must have a parentElement to mirror");t.parentElement.insertBefore(s,t)}return s.scrollTop=t.scrollTop,s.scrollLeft=t.scrollLeft,{mirror:s,marker:i}}function Mc(t,e=t.selectionEnd){const{mirror:n,marker:s}=Sc(t,e),i=n.getBoundingClientRect(),r=s.getBoundingClientRect();return setTimeout(()=>{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<n;e++)t=ie[e],t.textContent=t.getFormattedDate()||""}window.customElements.get("relative-time")||(window.RelativeTimeElement=Le,window.customElements.define("relative-time",Le));class Oi extends Le{getFormattedDate(){const e=this.getAttribute("format"),n=this.date;if(!!n)return e==="micro"?new xe(n,Ae(this)).microTimeAgo():new xe(n,Ae(this)).timeAgo()}}window.customElements.get("time-ago")||(window.TimeAgoElement=Oi,window.customElements.define("time-ago",Oi));class Fi extends Le{getFormattedDate(){const e=this.getAttribute("format"),n=this.date;if(!!n)return e==="micro"?new xe(n,Ae(this)).microTimeUntil():new xe(n,Ae(this)).timeUntil()}}window.customElements.get("time-until")||(window.TimeUntilElement=Fi,window.customElements.define("time-until",Fi));class Wc extends CustomEvent{constructor(e,n){super(e,n);this.relatedTarget=n.relatedTarget}}function qc(t,e=0){let n;return function(...s){clearTimeout(n),n=window.setTimeout(()=>{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)?`
  241. ![](${t})
  242. `: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
  243. `)}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(" | ")}
  244. ${i.join(" | ")}
  245. `,o=e.map(a=>Array.from(a.querySelectorAll("td")).map(er).join(" | ")).join(`
  246. `);return`
  247. ${r}${o}
  248. `}function tr(t){if(Array.from(t.types).indexOf("text/html")===-1)return;const e=t.getData("text/html");if(!/<table/i.test(e))return;let i=new DOMParser().parseFromString(e,"text/html").querySelector("table");if(i=!i||i.closest("[data-paste-markdown-skip]")?null:i,!i)return;const r=dl(i);return e.replace(/<meta.*?>/,"").replace(/<table[.\S\s]*<\/table>/,`
  249. ${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="<unknown>";function pl(t){var e=t.split(`
  250. `);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|<anonymous>|\/).*?)(?::(\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<s.length;++i)if(s[i]===t)return n+i;return n}function Ml(t){if(t instanceof HTMLAnchorElement&&t.childNodes.length===1){const e=t.childNodes[0];if(e instanceof HTMLImageElement)return e.src===t.href}return!1}function Cl(t){return t.nodeName==="IMG"||t.firstChild!=null}function Il(t){return t.nodeName==="INPUT"&&t instanceof HTMLInputElement&&t.type==="checkbox"}let at=0;function Nl(t){const e=t.childNodes[0],n=t.childNodes[1];return e&&t.childNodes.length<3?(e.nodeName==="OL"||e.nodeName==="UL")&&(!n||n.nodeType===Node.TEXT_NODE&&!(n.textContent||"").trim()):!1}function ct(t){return t.replace(/&/g,"&amp;").replace(/'/g,"&apos;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}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=`\`\`\`
  251. ${e.replace(/\n+$/,"")}
  252. \`\`\`
  253. `,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}
  254. `,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?`<img alt="${ct(e)}"${s}${i} src="${ct(n)}">`:`![${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,`
  255. > `)}
  256. `}select(e){this.selection&&(this.selection.removeAllRanges(),this.selection.selectAllChildren(e))}insert(e){e.value?e.value=`${e.value}
  257. ${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<e;r++)try{return await(i?Promise.race([t(),i]):t())}catch(o){if(o.name==="AbortError"||r===e-1)throw o;const a=Math.pow(2,r)*1e3,c=Yl(a*.1);await Kl(Math.min(n,a+c),s)}throw new Error("retry failed")}function mn(t){return new Promise((e,n)=>{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<t.length;n+=e)yield t.slice(n,n+e)}function lr(t){return new Promise((e,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<e;r++)try{return await(i?Promise.race([t(),i]):t())}catch(o){if(o.name==="AbortError"||r===e-1)throw o;const a=Math.pow(2,r)*1e3,c=ru(a*.1);await iu(Math.min(n,a+c),s)}throw new Error("retry failed")}var ur;(function(t){t.Deploy="Alive Redeploy",t.Reconnect="Alive Reconnect"})(ur||(ur={}));function au(){return`${Math.round(Math.random()*(Math.pow(2,31)-1))}_${Math.round(Date.now()/1e3)}`}function cu(t){const e=t.match(/\/u\/(\d+)\/ws/);return e?+e[1]:0}class lu{constructor(e,n,s,i){this.url=e,this.getUrl=n,this.inSharedWorker=s,this.notify=i,this.subscriptions=new ar,this.state="online",this.retrying=null,this.connectionCount=0,this.presence=new Bl,this.presenceMetadata=new rr,this.intentionallyDisconnected=!1,this.lastCameOnline=0,this.userId=cu(e),this.presenceId=au(),this.presenceKey=ir(this.userId,this.presenceId),this.socket=this.connect()}subscribe(e){const n=this.subscriptions.add(...e);this.sendSubscribe(n);for(const s of e){const i=s.topic.name;!lt(i)||this.notifyCachedPresence(s.subscriber,i)}}unsubscribe(e){const n=this.subscriptions.delete(...e);this.sendUnsubscribe(n)}unsubscribeAll(...e){const n=this.subscriptions.drain(...e);this.sendUnsubscribe(n);const s=this.presenceMetadata.removeSubscribers(e);this.sendPresenceMetadataUpdate(s)}requestPresence(e,n){for(const s of n)this.notifyCachedPresence(e,s)}notifyCachedPresence(e,n){const s=this.presence.getChannelItems(n);s.length!==0&&this.notifyPresenceChannel(n,s)}updatePresenceMetadata(e){const n=new Set;for(const s of e)this.presenceMetadata.setMetadata(s),n.add(s.channelName);this.sendPresenceMetadataUpdate(n)}sendPresenceMetadataUpdate(e){if(!e.size)return;const n=[];for(const s of e){const i=this.subscriptions.topic(s);i&&n.push(i)}this.sendSubscribe(n)}online(){var e;this.lastCameOnline=Date.now(),this.state="online",(e=this.retrying)===null||e===void 0||e.abort(),this.socket.open()}offline(){var e;this.state="offline",(e=this.retrying)===null||e===void 0||e.abort(),this.socket.close()}shutdown(){this.inSharedWorker&&self.close()}get reconnectWindow(){const e=Date.now()-this.lastCameOnline<60*1e3;return this.connectionCount===0||this.intentionallyDisconnected||e?0:10*1e3}socketDidOpen(){this.intentionallyDisconnected=!1,this.connectionCount++,this.socket.url=this.getUrlWithPresenceId(),this.sendSubscribe(this.subscriptions.topics())}socketDidClose(e,n,s){if(this.redeployEarlyReconnectTimeout!==void 0&&clearTimeout(this.redeployEarlyReconnectTimeout),s==="Alive Reconnect")this.intentionallyDisconnected=!0;else if(s==="Alive Redeploy"){this.intentionallyDisconnected=!0;const r=(3+Math.random()*22)*60*1e3;this.redeployEarlyReconnectTimeout=setTimeout(()=>{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+(r<n?`{{ ${r} }}`:""),""),bn.set(this.strings,e),e}}renderInto(e){const n=this.template;if(fr.get(e)!==n){fr.set(e,n);const s=new ge(n,this.values,this.processor);hr.set(e,s),e instanceof G?e.replace(...s.children):e.appendChild(s);return}hr.get(e).update(this.values)}}const wu=Rt(vu);function Eu(t,...e){return new vn(t,e,wu)}function yu(t,e){t.renderInto(e)}const $u=v("a1",fu(t=>e=>{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<s.firstHiddenTime&&(i.value=c.startTime,i.entries.push(c),j.add(i),n()))},o=performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],a=o?null:dt("paint",r);(o||a)&&(n=F(t,i,e),o&&r(o),De(function(c){i=D("FCP"),n=F(t,i,e),requestAnimationFrame(function(){requestAnimationFrame(function(){i.value=performance.now()-c.timeStamp,j.add(i),n()})})}))}),br=!1,En=-1,Ru=v("a2",function(t,e){br||(ku(function(l){En=l.value}),br=!0);var n,s=function(l){En>-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&&Pe<mr-Tu){var t={entryType:"first-input",name:O.type,target:O.target,cancelable:O.cancelable,startTime:O.timeStamp,processingStart:O.timeStamp+Pe};ut.forEach(function(e){e(t)}),ut=[]}},Au=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?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.startTime<s.firstHiddenTime&&(i.value=a.processingStart-a.startTime,i.entries.push(a),j.add(i),n())},o=dt("first-input",r);n=F(t,i,e),o&&ft(function(){o.takeRecords().map(r),o.disconnect()},!0),o&&De(function(){var a;i=D("FID"),n=F(t,i,e),ut=[],Pe=-1,O=null,Er(addEventListener),a=r,ut.push(a),wr()})}),Hu=v("a5",function(t,e){var n,s=wn(),i=D("LCP"),r=function(c){var l=c.startTime;l<s.firstHiddenTime&&(i.value=l,i.entries.push(c)),n()},o=dt("largest-contentful-paint",r);if(o){n=F(t,i,e);var a=function(){j.has(i)||(o.takeRecords().map(r),o.disconnect(),j.add(i),n())};["keydown","click"].forEach(function(c){addEventListener(c,a,{once:!0,capture:!0})}),ft(a,!0),De(function(c){i=D("LCP"),n=F(t,i,e),requestAnimationFrame(function(){requestAnimationFrame(function(){i.value=performance.now()-c.timeStamp,j.add(i),n()})})})}}),Ou=v("a6",function(t){var e,n=D("TTFB");e=function(){try{var s=performance.getEntriesByType("navigation")[0]||function(){var i=performance.timing,r={entryType:"navigation",startTime:0};for(var o in i)o!=="navigationStart"&&o!=="toJSON"&&(r[o]=Math.max(i[o]-i.navigationStart,0));return r}();if(n.value=n.delta=s.responseStart,n.value<0)return;n.entries=[s],t(n)}catch(i){}},document.readyState==="complete"?setTimeout(e,0):addEventListener("pageshow",e)}),Fu=v("aa",typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{});function xu(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}function Lu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Su(t,e){return e={exports:{}},t(e,e.exports),e.exports}function Mu(t){return t&&t.default||t}var Cu=Object.defineProperty,yn=(t,e)=>Cu(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");/**
  258. * @license
  259. * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
  260. * This code may only be used under the BSD style license found at
  261. * http://polymer.github.io/LICENSE.txt
  262. * The complete set of authors may be found at
  263. * http://polymer.github.io/AUTHORS.txt
  264. * The complete set of contributors may be found at
  265. * http://polymer.github.io/CONTRIBUTORS.txt
  266. * Code distributed by Google as part of the polymer project is also
  267. * subject to an additional IP rights grant found at
  268. * http://polymer.github.io/PATENTS.txt
  269. */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)}));/**
  270. * @license
  271. * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
  272. * This code may only be used under the BSD style license found at
  273. * http://polymer.github.io/LICENSE.txt
  274. * The complete set of authors may be found at
  275. * http://polymer.github.io/AUTHORS.txt
  276. * The complete set of contributors may be found at
  277. * http://polymer.github.io/CONTRIBUTORS.txt
  278. * Code distributed by Google as part of the polymer project is also
  279. * subject to an additional IP rights grant found at
  280. * http://polymer.github.io/PATENTS.txt
  281. */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)}}))}}});
  282. //# sourceMappingURL=chunk-vendor-3f9569c1.js.map