@graview/guest 0.1.56 → 0.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +6 -2
  2. package/dist/headless/judge.d.ts.map +1 -1
  3. package/dist/headless/judge.js +5 -0
  4. package/dist/headless/judge.js.map +1 -1
  5. package/dist/headless/runtime.generated.d.ts.map +1 -1
  6. package/dist/headless/runtime.generated.js +1 -1
  7. package/dist/headless/runtime.generated.js.map +1 -1
  8. package/dist/host/css.d.ts.map +1 -1
  9. package/dist/host/css.js +3 -2
  10. package/dist/host/css.js.map +1 -1
  11. package/dist/host/manifest.d.ts +8 -2
  12. package/dist/host/manifest.d.ts.map +1 -1
  13. package/dist/host/manifest.js +51 -12
  14. package/dist/host/manifest.js.map +1 -1
  15. package/dist/host/open-judge.d.ts +5 -1
  16. package/dist/host/open-judge.d.ts.map +1 -1
  17. package/dist/host/open-judge.js.map +1 -1
  18. package/dist/host/open-render.d.ts.map +1 -1
  19. package/dist/host/open-render.js +62 -1
  20. package/dist/host/open-render.js.map +1 -1
  21. package/dist/host/pictures.d.ts +23 -3
  22. package/dist/host/pictures.d.ts.map +1 -1
  23. package/dist/host/pictures.js +51 -14
  24. package/dist/host/pictures.js.map +1 -1
  25. package/dist/host/view-runtime.generated.d.ts.map +1 -1
  26. package/dist/host/view-runtime.generated.js +1 -1
  27. package/dist/host/view-runtime.generated.js.map +1 -1
  28. package/dist/host/worker-react.d.ts +2 -1
  29. package/dist/host/worker-react.d.ts.map +1 -1
  30. package/dist/host/worker-react.js +4 -2
  31. package/dist/host/worker-react.js.map +1 -1
  32. package/dist/open-kit.d.ts +22 -2
  33. package/dist/open-kit.d.ts.map +1 -1
  34. package/dist/open-kit.js +23 -3
  35. package/dist/open-kit.js.map +1 -1
  36. package/package.json +3 -3
@@ -4,5 +4,5 @@
4
4
  * it in front of a view's own source, for an isolate the host picked.
5
5
  * Carries Remote DOM (MIT, Shopify Inc.).
6
6
  */
7
- export const HEADLESS_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var I=Symbol(\"name\"),Re=Symbol(\"prefix\"),Ce=Symbol(\"value\"),D=Symbol(\"ns\"),ne=Symbol(\"owner\"),j=Symbol(\"owner_document\"),ge=Symbol(\"attributes\"),V=Symbol(\"prev\"),S=Symbol(\"next\"),M=Symbol(\"child\"),re=Symbol(\"parent\"),Pe=Symbol(\"host\"),le=Symbol(\"data\"),Ue=Symbol(\"listeners\"),or=Symbol(\"isTrusted\"),Ke=Symbol(\"path\"),Ze=Symbol(\"stop_immediate_propagation\"),Je=Symbol(\"dispatching\"),Ne=Symbol(\"content\"),z=Symbol(\"hooks\"),Wt=Symbol(\"extensions\"),Ge=Symbol(\"hooks_dispatch\"),X=Symbol(\"is_connected\"),Qe=Symbol(\"create_element\"),Qr=0,se=1,et=2,tt=3,nt=8,je=9,eo=10,_e=11,H=\"http://www.w3.org/1999/xhtml\",ce=\"http://www.w3.org/2000/svg\",to=\"http://www.w3.org/XML/1998/namespace\",Tt=\"http://www.w3.org/2000/xmlns/\";function qt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function Y(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function no(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function U(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var ro=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,oo=/[\\0\\t\\n\\f\\r />=]/u,ni=/[\\0\\t\\n\\f\\r />]/u;function xe(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function so(t){ro.test(t)||ir(t)}function sr(t){(t===\"\"||oo.test(t))&&ir(t)}function Xt(t,e,n){let r=xe(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ni.test(i))||(n===\"element\"?!ro.test(a):a===\"\"||oo.test(a)))&&ir(o),i!=null&&r==null)throw U(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==to)throw U(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Tt)throw U(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Tt&&o!==\"xmlns\"&&i!==\"xmlns\")throw U(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function ir(t){throw U(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Kt=0,Zt=1,io=2,ar=3,ri=typeof performance>\"u\"?Date.now:performance.now.bind(performance),K=class{static NONE=Kt;static CAPTURING_PHASE=Zt;static AT_TARGET=io;static BUBBLING_PHASE=ar;timeStamp=ri();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Kt;[Ke]=[];[Ze]=!1;[Je]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,or,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[or]}composedPath(){return[...this[Ke]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Ze]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function lr(t,e,n){if(t.cancelBubble)return;let o=e[Ue]?.get(t.type)?.[n===Zt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?io:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(oi,0,a)}if(t[Ze])break}}function oi(t){throw t}var vt=[],Jt=new WeakMap;function Qt(t,e){let n=Jt.get(t);n?n.push(e):Jt.set(t,[e]),vt[vt.length-1].push(t)}function Z(t){let e=[];vt.push(e);let n;try{n=t()}catch(r){vt.pop();try{ao(e)}catch{}throw r}return vt.pop(),ao(e),n}function ao(t){let e,n=!1;for(let r of t){let o=Jt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Jt.delete(r)}}if(n)throw e}var en=[],St=[],cr=!1;function Ve(t){for(let e of t)en.push(e),e[1]&&St.push(e[1]);if(!cr){cr=!0;try{let e,n=!1;for(let r=0;r<en.length;r++){let[o,s]=en[r];s&&St.splice(St.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{en.length=0,St.length=0,cr=!1}}}function kt(t){let e=t;for(;e;){if(St.includes(e))return!0;e=e[re]??e[Pe]}return!1}var Ot=Symbol(\"listenerRegistrations\"),Ie=class{[Ue]=void 0;[Ot]=void 0;[j]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let a=dr(o),l=this[Ot];l||(l=new Map,this[Ot]=l);let u=l.get(e);u||(u={},l.set(e,u));let m=u[a];if(m||(m=new Map,u[a]=m),m.has(n))return;let E=this,c={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(c.normalizedListener=function(...f){if(c.signal?.aborted){tn(E,c);return}return c.once&&tn(E,c),typeof c.listener==\"object\"?c.listener.handleEvent(...f):c.listener.call(this,...f)});let y=this[Ue];y||(y=new Map,this[Ue]=y);let N=y.get(e);N||(N={},y.set(e,N));let T=N[a];if(T||(T=new Set,N[a]=T),m.set(n,c),T.add(c),i){let p=()=>{tn(E,c)};c.abortListener=p,i.addEventListener(\"abort\",p,{once:!0})}this[j]?.defaultView[Ge].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return si.call(this,e,n,r)}dispatchEvent(e){if(e[Je])throw U(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[Je]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ke]=n;for(let s=n.length;s--;)if(lr(e,n[s],Zt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(lr(e,o[s],ar),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[Je]=!1,e.cancelBubble=!1,e[Ze]=!1,e.eventPhase=Kt,e.currentTarget=null,e[Ke]=[]}}};function si(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=dr(!!r),s=this[Ot]?.get(t)?.[o]?.get(e);s&&tn(this,s)}function dr(t){return t?\"capture\":\"bubble\"}function tn(t,e){let n=dr(e.capture),r=t[Ot],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[Ue],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[j]?.defaultView[Ge].removeEventListener?.(t,e.type,e.listener,e.capture))}var de=class extends Array{item(e){return this[e]??null}};var Rt=0,lo=1,mr=2,pr=3,Ct=4,co=0,uo=1,on=2,sn=3,fo=4,fr=5,mo=6,po=7,nn=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function ii(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function oe(t){throw U(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function an(t,e){let n=typeof e==\"string\"?Pt(e):[{combinator:Ct,matchers:e}],r=null,o=t[M];return o&&n[0].matchers.length&&hr(o,n,s=>(r=s,!1)),r}function ln(t,e){let n=typeof e==\"string\"?Pt(e):[{combinator:Ct,matchers:e}],r=new de,o=t[M];return o&&n[0].matchers.length&&hr(o,n,s=>{r.push(s)}),r}function Pt(t,e=!1,n=!1){let r={combinator:Ct,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&oe(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&oe(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&oe(t),l[1]===\">\"?r.combinator=lo:l[1]===\"+\"?r.combinator=pr:l[1]===\"~\"?r.combinator=mr:r.combinator=Rt,r={combinator:Ct,matchers:[]},o.push(r));let u=l[8]?Y(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&oe(t);let E,c=l[4]??l[5]??l[7];if(l[2]){nn.test(u)||oe(t);let y=l[5],N=y?.[0];if(l[3]==null&&(N==='\"'||N===\"'\")){let T=l[0].lastIndexOf(y);c=i.slice(l.index+T+1),s.lastIndex=i.length}else y!=null&&!nn.test(y)&&oe(t);E=fo}else l[6]?(nn.test(u)||oe(t),E=l[6]===\"#\"?on:sn):l[8]?E=l[9]==null?fr:mo:l[7]===\"*\"?E=co:l[7]&&nn.test(l[7])?E=uo:oe(t);l[9]?([c,s.lastIndex]=ii(i,s.lastIndex),u!==\"has\"&&u!==\"not\"&&oe(t),u===\"has\"&&e&&oe(t),Pt(c,e||u===\"has\",u===\"has\")):E===fr&&oe(t),r.matchers.push({type:E,name:u,value:c}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&oe(t),o}function ai(t,e){let n=Pt(e);return n[0]?.matchers.length?At(t,n):!1}function li(t,e){let n=Pt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Rt,s={type:po,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Rt,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===pr||o===mr?t[S]:t[M];if(!i)return!1;let a=!1;return hr(i,n,()=>(a=!0,!1),t),a}function hr(t,e,n,r){let o=[],s=t;for(;s;){if(te(s)){if(At(s,e,r)&&n(s)===!1)return!1;let i=s[M];if(i){let a=s[S];a&&o.push(a),s=i;continue}}s=s[S]??o.pop()??null}return!0}function At(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Ct){if(!rn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||At(t,a,n)}let s=r===lo||r===Rt?re:V,i=t[s];if(!i)return!1;if(r===Rt||r===mr){for(;i;){if(te(i)&&rn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||At(i,a,n))return!0}i=i[s]}return!1}else{if(r===pr&&!te(i)){for(;i&&!te(i);)i=i[s];if(!i)return!1}if(!te(i)||!rn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||At(i,a,n)}}function ur(t,e){return t.getAttributeNS(null,t.namespaceURI===H?Y(e):e)}function rn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(rn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case co:return o===\"*\";case uo:return t.namespaceURI===H?t.localName===Y(o):t.localName===o;case on:return ur(t,\"id\")===o;case sn:let i=ur(t,\"class\");return i?qt(i).includes(o):!1;case fo:let a=ur(t,o);return s==null?a!=null:a===s;case po:return t===n;case fr:oe(`:${o}`);case mo:switch(o){case\"has\":return li(t,s||\"\");case\"not\":return!ai(t,s||\"\");default:oe(`:${o}(${s})`)}}return!1}function ci(t){return t.nodeType===et}function _t(t){return le in t}function yr(t){return t.nodeType===tt}function di(t){return t.nodeType===nt}function te(t){return t.nodeType===se}function gr(t){return t.nodeType===_e}function bo(t){return\"appendChild\"in t}function cn(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let a=[];for(let l of Dt(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!te(l)))continue;let u=l[ge];if(u)for(let E of u)o.has(E)||(o.add(E),e.push(E));let m=l[Ne];m&&!o.has(m)&&!r.has(m)&&(r.add(m),n.push(m))}s??=a}return{nodes:e,treeNodes:s}}function It(t,e){for(let n of t)n[j]=e}function ho(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[j]=e,r}function go(t,e){if(yr(t))return e.createTextNode(t.data);if(di(t))return e.createComment(t.data);if(ci(t))return ho(t,e);if(te(t)){let n=e[Qe](t[I],t.namespaceURI,t[Re],t.localName);if(t[ge])for(let r=0;r<t[ge].length;r++){let o=t[ge].item(r);n.attributes.setNamedItem(ho(o,e))}return n}else{if(gr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[j]=e,n}}}function dn(t,e,n=t.ownerDocument){if(t.nodeType===je)throw U(\"Cannot clone a document node\",\"NotSupportedError\");let r=go(t,n);if(!e||!te(t)&&!gr(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,te(i.source)&&i.source.namespaceURI===H&&i.source.localName===\"template\"){let m=i.source[Ne];m&&(o.has(m)&&yo(),o.add(m),i.contentSource=m,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&yo(),o.add(a);let u=go(a,n);te(a)||gr(a)?s.push({source:a,destination:u,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(u)}return r}function yo(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function un(t,e){let n=String(e);return n===\"\"?null:an(t,[{type:on,name:n}])}function fn(t,e){let n=[...new Set(qt(String(e)))];return ln(t,n.map(r=>({type:sn,name:r})))}function mn(t,e){let n=String(e),r=Y(n),o=[];for(let s of pn(t))te(s)&&(n===\"*\"||(s.namespaceURI===H?s[I]===r:s[I]===n))&&o.push(s);return o}function pn(t){let e=[],n=[],r=t[M];for(;r;){e.push(r);let o=r[M],s=r[S];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Dt(t){let e=pn(t);return e.unshift(t),e}var ue=class extends Ie{nodeType=Qr;[I]=\"\";[re]=null;[Pe]=null;[M]=null;[V]=null;[S]=null;[X]=!1;get[z](){return this[j].defaultView[Ge]}get localName(){return this[I]}get nodeName(){return this[I]}get ownerDocument(){return this[j]}get isConnected(){return this[X]}isDefaultNamespace(e){let n=xe(e);return ui(this)===n}get parentNode(){return this[re]}set parentNode(e){}get parentElement(){let e=this[re];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[V]}set previousSibling(e){}get nextSibling(){return this[S]}set nextSibling(e){}get previousElementSibling(){let e=this[V];for(;e&&e.nodeType!==1;)e=e[V];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[S];for(;e&&e.nodeType!==1;)e=e[S];return e}set nextElementSibling(e){}get firstChild(){return this[M]}set firstChild(e){}get lastChild(){let e=this[M];for(;e;){let n=e[S];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return _t(this)?this.data:null}set nodeValue(e){_t(this)&&(this.data=e)}get textContent(){if(_t(this))return this.data;let e=\"\";for(let n of pn(this))yr(n)&&(e+=n.data);return e}set textContent(e){if(_t(this))this.data=e;else if(bo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return dn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function ui(t){let e=t;for(;e;)switch(e.nodeType){case se:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Tt,\"xmlns\");if(r!=null&&r.prefix==null)return xe(r.value);e=n.parentElement;break}case je:e=e.documentElement;break;case eo:case _e:return null;case et:e=e.ownerElement;break;default:e=e.parentElement}return null}var fe=Symbol(\"insertNode\"),wr=Symbol(\"preflightInsertions\"),hn=Symbol(\"replaceNode\"),De=class extends ue{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=ze(e),r=this.parentNode;if(r)return br(o=>{Te(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Er(r,n,o);this.parentNode===r?r[hn](i,this,o):r[fe](i,s,o)})}before(...e){let n=ze(e),r=this.parentNode;if(r)return br(o=>{Te(r,n);let s=this[V];for(;s&&n.includes(s);)s=s[V];let i=Er(r,n,o);r[fe](i,s?s[S]:r.firstChild,o)})}after(...e){let n=ze(e),r=this.parentNode;if(r)return br(o=>{Te(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Er(r,n,o);r[fe](i,s,o)})}};function br(t){return Z(()=>{let e=[];try{t(e)}catch(n){try{Ve(e)}catch{}throw n}Ve(e)})}function ze(t){return t.map(e=>e instanceof ue?e:String(e))}function Mt(t,e){return e instanceof ue?e:t.ownerDocument.createTextNode(String(e))}function Te(t,e){for(let n of e){if(!(n instanceof ue))continue;let r=t;for(;r;){if(r===n)throw U(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[re]??r[Pe]}}}function Er(t,e,n){let r=[];for(let s of e)r.push(Mt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[wr](r);for(let s of r)o[fe](s,null,n);return o}var gn,Nr=0,Eo=0,wo=0,No=0,rt=!1,Tr=!1,Lt=!1,yn=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=fi(n),o=gn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Nr++:xr(i,-1),s.set(this,r),xr(r,1),this.#e.add(e)}disconnect(){let e=gn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Nr--,xr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Nr===0&&(gn=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function me(t){let e=gn;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let a=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;a=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new de,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new de,target:t.target,type:t.type})}function bn(...t){let e=new de;return e.push(...t),e}function fi(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function xr(t,e){t.attributes&&(Eo+=e),t.characterData&&(wo+=e),t.childList&&(No+=e),rt=Eo>0,Tr=wo>0,Lt=No>0}var ye=class extends De{childNodes=new de;children=new de;appendChild(e){return Z(()=>this[fe](e,null))}insertBefore(e,n){return Z(()=>this[fe](e,n||null))}append(...e){return Z(()=>{let n=ze(e.filter(r=>r!=null));n.length>1&&Te(this,n);for(let r of n)this[fe](Mt(this,r),null)})}prepend(...e){return Z(()=>{let n=ze(e.filter(o=>o!=null));n.length>1&&Te(this,n);let r=this.firstChild;for(let o of n)this[fe](Mt(this,o),r)})}replaceChildren(...e){return Z(()=>{let n=ze(e.filter(o=>o!=null));Te(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[fe](Mt(this,o),null)})}removeChild(e){return Z(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw U(\"The node is not a child of this node\",\"NotFoundError\");let n=this[X]?Dt(e):void 0,r=e[V],o=e[S],s=En(this,e);if(n)for(let i of n)i[X]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ve(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return Z(()=>this[hn](e,n))}[hn](e,n,r){if(Te(this,[e]),n.parentNode!==this)throw U(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[V],s=n[S],i=this.prepareInsertion(e),a=this[X]?Dt(n):void 0,l=new Set(i.map(({node:c})=>c)),u=s;for(;u&&l.has(u);)u=u[S];let m=En(this,n);if(a){for(let y of a)y[X]=!1;let c=new Set(a);for(let y of i)c.has(y.node)&&(y.shouldDisconnect=!1)}this.commitInsertion(i,u);let E=this[X];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,E),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,m),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return ln(this,e)}querySelector(e){return an(this,e)}[fe](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[wr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(Te(this,[e]),n&&n.parentNode!==this)throw U(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[S]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[X];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ve(e)}prepareInsertion(e){let n=[];if(e.nodeType===_e){let i=e[M];for(;i;)n.push(i),i=i[S]}else n.push(e);let r=this[X],o=this[j],s=[];for(let i of n){let a=i[X],l=a||r,u,m;if(i[j]===o)l&&(u=Dt(i));else{let E=cn(i);m=E.nodes,l&&(u=E.treeNodes)}s.push({node:i,nodes:u,adoption:m,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[re];if(i){let a=s.node[V],l=s.node[S];s.source={parent:i,index:En(i,s.node),previousSibling:a,nextSibling:l}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[j];for(let{adoption:s}of e)s&&It(s,r);let o=this[X];for(let{nodes:s}of e)if(s)for(let i of s)i[X]=o}attachChild(e,n){if(n){let s=n[V];e[S]=n,e[V]=s,s?s[S]=e:this[M]=e,n[V]=e}else{e[S]=null;let s=this[M];if(s){let i;for(;i=s[S];)s=i;s[S]=e,e[V]=s}else this[M]=e,e[V]=null}let r=te(e);e[re]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!te(s);)s=s[S];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[V],nextSibling:e[S]}}queueRemovalMutationRecord(e,n,r,o){Lt&&me({type:\"childList\",target:e,removedNodes:bn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Lt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),me({type:\"childList\",target:this,addedNodes:bn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==se||kt(this)?[]:[[()=>this[z].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===se&&!kt(s.parent)&&n.push([()=>s.parent[z].removeChild?.(s.parent,o,s.index)]),this.nodeType===se&&!kt(this)&&n.push([()=>this[z].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){To(e,n)}};function xo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[X]?n.treeNodes:void 0,s=e[V],i=e[S],a=En(t,e);if(o)for(let u of o)u[X]=!1;It(n.nodes,r),Lt&&me({type:\"childList\",target:t,removedNodes:bn(e),previousSibling:s,nextSibling:i}),o&&To(o,\"disconnectedCallback\");let l=[];t.nodeType===se&&!kt(t)&&l.push([()=>t[z].removeChild?.(t,e,a)]),Ve(l)}function En(t,e){let n=e[V],r=e[S];n?n[S]=r:t[M]=r,r&&(r[V]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),te(e)&&t.children.splice(t.children.indexOf(e),1),e[re]=null,e[S]=null,e[V]=null,o}function To(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Qt(n,()=>r.call(n))}}function Ht(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Qt(t,()=>i.call(t,e,n,r,o))}var wn=class{[M]=null;constructor(e){this[ne]=e}getNamedItem(e){let n=String(e),r=this[ne][D]===H?Y(n):n,o=this[M];for(;o;){if(o.name===r)return o;o=o[S]}return null}getNamedItemNS(e,n){let r=xe(e),o=String(n),s=this[M];for(;s;){if(s.localName===o&&s[D]===r)return s;s=s[S]}return null}item(e){let n=this[M],r=0;for(;n;){if(r++===e)return n;n=n[S]}return null}get length(){let e=0,n=this[M];for(;n;)e++,n=n[S];return e}removeNamedItem(e){let n=String(e),r=this[ne][D]===H?Y(n):n;return Z(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=xe(e),o=String(n);return Z(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[D]===r))}removeNamedItemImmediately(e){let n=this[ne],r=this[M],o=null;for(;r!=null;){if(e(r)){o&&(o[S]=r[S]),this[M]===r&&(this[M]=r[S]);let s=r.value;return r[S]=null,r[ne]=null,rt&&me({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[D],oldValue:s}),n[z].removeAttribute?.(n,r.name,r[D]),Ht(n,r.localName,s,null,r[D]),r}o=r,r=r[S]}return null}setNamedItem(e){return Z(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[ne],r=e[ne];if(r!=null&&r!==n)throw U(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[M],i=null;for(;s;){if(s.localName===e.localName&&s[D]===e[D]){if(s===e)return s;i?i[S]=e:this[M]=e,e[S]=s[S],s[S]=null,o=s;break}i=s,s=s[S]}o==null&&(i?i[S]=e:this[M]=e),e[ne]=n,e[j]=n[j],o&&(o[ne]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&rt&&me({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[D],oldValue:o?.value??null}),l&&n[z].removeAttribute?.(n,o.name,o[D]),(a||l)&&n[z].setAttribute?.(n,e.name,e.value,e[D]),a&&Ht(n,e.localName,o?.value??null,e.value,e[D]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[M];for(;e;)yield e,e=e[S]}};var Fe=class extends ue{nodeType=et;[D]=null;[S]=null;[ne]=null;constructor(e,n,r){super(),this[I]=e,this[Ce]=n,r&&(this[D]=r)}get nodeName(){return this[I]}set nodeName(e){}get name(){return this[I]}set name(e){}get localName(){if(this[D]==null)return this[I];let e=this[I].indexOf(\":\");return e<0?this[I]:this[I].slice(e+1)}get prefix(){if(this[D]==null)return null;let e=this[I].indexOf(\":\");return e<0?null:this[I].slice(0,e)}get value(){return this[Ce]}set value(e){let n=String(e),r=this[ne];if(!r){this[Ce]=n;return}Z(()=>{let o=this[Ce];this[Ce]=n,rt&&o!==n&&me({type:\"attributes\",target:r,attributeName:this[I],attributeNamespace:this[D],oldValue:o}),this[z].setAttribute?.(r,this[I],n,this[D]),Ht(r,this.localName,o,n,this[D])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[ne]}get namespaceURI(){return this[D]}get specified(){return!0}};var mi={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},pi=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),hi=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,ko=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,gi=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",yi=/^(?:color|face|size)$/i;function vo(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return mi[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Oo(t){return t.namespaceURI===H&&pi.has(t.localName)}function So(t){let e=t.localName;return t[D]===ce&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function bi(t,e){if(gi.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(ko))if(yi.test(n[1]))return!0;return!1}function Nn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(hi)){let a=i[1];if(a){let l=i[2],u=Y(a),m=o[o.length-1]?.element??e,E=m[D]===ce?ce:H;if(u===\"svg\")E=ce;else if(E===ce){if(So(m))E=H;else if(bi(u,l)){for(;o.length>0;){let N=o[o.length-1];if(N.element[D]!==ce||So(N.element))break;o.pop(),s=N.target}E=H}}let c=E===H?u:a,y=n[Qe](c,E,null,c);for(let N of l.matchAll(ko))y.setAttribute(N[1],vo(N[3]||N[4]||\"\"));if(s.append(y),Oo(y)||E!==H&&i[4])continue;o.push({element:y,target:s}),s=E===H&&u===\"template\"?y.content:y}else if(i[5]){let l=Y(i[5]);for(let u=o.length-1;u>=0;u--){let m=o[u],E=Y(m.element[I]);if(E===l){s=m.target,o.length=u;break}if(m.element[D]===H&&E===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(vo(i[7]))}return r}function xn(t){return Ro([{type:\"content\",child:t[M]}])}function Ao(t){return Ro([{type:\"opening\",node:t}])}function Ro(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case se:{let o=r;e.push(`<${o[I]}`);let s=o[ge]?.[M];for(;s;){e.push(` ${s[I]}`);let a=s[Ce];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[S]}if(e.push(\">\"),Oo(o))break;let i=o.namespaceURI===H&&o.localName===\"template\"?o[Ne]:o;t.push({type:\"closing\",name:o[I]}),t.push({type:\"content\",child:i?.[M]??null});break}case tt:{let o=r;e.push(o[le].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case nt:{let o=r;e.push(`<!--${o[le]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[S]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var W=class extends ye{nodeType=se;[D]=H;[Re]=null;get namespaceURI(){return this[D]}get prefix(){return this[Re]}get localName(){let e=this[Re];return e==null?this[I]:this[I].slice(e.length+1)}get nodeName(){return this[D]===H?no(this[I]):this[I]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Fe(\"slot\",n))}get attributes(){let e=this[ge];return e||(e=new wn(this),this[ge]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return mn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return fn(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);sr(r);let s=this[D]===H?Y(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Fe(s,o))}setAttributeNS(e,n,r){let o=xe(e),s=String(n),i=String(r),a=Xt(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new Fe(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);sr(r);let o=this[D]===H?Y(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Fe(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[D]===H?Y(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Ao(this)}get innerHTML(){return xn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Nn(String(e),this);this.replaceChildren(n)}}};var ot=class t extends W{[D]=ce;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Me=class extends De{[le]=\"\";constructor(e){super(),this[le]=e==null?\"\":String(e)}setData(e){let n=Tr,r=n?this[le]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[le]=o,n&&r!==o&&me({type:\"characterData\",target:this,oldValue:r}),this[z].setText?.(this,o)}get data(){return this[le]}set data(e){this.setData(e)}};var st=class extends Me{nodeType=tt;[I]=\"#text\"};var it=class extends Me{nodeType=nt;[I]=\"#comment\"};var at=class extends ye{nodeType=_e;[I]=\"#document-fragment\";[j]=typeof window<\"u\"?window.document:null;getElementById(e){return un(this,e)}};var lt=class extends W{get content(){let e=this[Ne];return e||(e=this.ownerDocument.createDocumentFragment(),e[Pe]=this,this[Ne]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Nn(String(e),this))}get innerHTML(){let e=this[Ne];return e?xn(e):\"\"}};var Tn=class extends W{};var vn=class extends W{};var Sn=class extends W{};var $t=class extends ye{nodeType=je;[I]=\"#document\";[X]=!0;constructor(e){super(),this.defaultView=e,this[j]=this,this.documentElement=On(new Sn,this,\"html\"),this.body=On(new Tn,this,\"body\"),this.head=On(new vn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return fn(this,e)}createElement(e){let n=String(e);return so(n),vr(this,Y(n))}createElementNS(e,n){let r=Xt(e,n,\"element\");return vr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Qe](e,n,r,o){return vr(this,e,n,r,o)}createTextNode(e){let n=kn(new st(e),this);return this[z].createText?.(n,n.data),n}createComment(e){return kn(new it(e),this)}createDocumentFragment(){return kn(new at,this)}createEvent(){return new K(\"\")}getElementById(e){return un(this,e)}getElementsByTagName(e){return mn(this,e)}importNode(e,n){if(e.nodeType===je)throw U(\"Cannot import a document node\",\"NotSupportedError\");return dn(e,n,this)}adoptNode(e){if(e[j]===this)return e;let n=cn(e);return Z(()=>{let r=e.parentNode;return r?xo(r,e,n,this):It(n.nodes,this),e})}};function kn(t,e){return Object.defineProperty(t,j,{value:e,writable:!0,enumerable:!1}),t}function vr(t,e,n=H,r=null,o=e){let s;if(n===ce)s=new ot;else if(n===H&&o===\"template\")s=new lt;else if(n===H){let i=t.defaultView.customElements.get(o);s=i?new i:new W}else s=new W;return On(s,t,e,n,r)}function On(t,e,n,r=H,o=null){return kn(t,e),Object.defineProperties(t,{[I]:{value:n},[D]:{value:r},[Re]:{value:o}}),e[z].createElement?.(t,r),t}var An=class extends K{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Rn=class extends K{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Cn=class extends K{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Pn=class extends K{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var _n=class extends K{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var In=class extends K{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Dn=class extends W{};var Ei=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,wi=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Co(t){return Ei.test(t)&&!wi.has(t)}function Po(t){return U(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Mn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Co(e))throw Po(e);if(this.registry.has(e))throw U(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw U(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!Co(e))return Promise.reject(Po(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var Ni=[\"onerror\",\"onunhandledrejection\"],Io=Symbol.for(\"@remote-dom/polyfill/global-property\");function Do(t){return Object.getOwnPropertyDescriptors(t)}function Mo(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ie.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Sr(r.value.bind(t)),e[n]=r);return e}function Lo(t){let e={};for(let n of Ni)e[n]={configurable:!0,enumerable:!0,get:Sr(()=>t[n]),set:Sr(r=>{t[n]=r})};return e}function xi(t){return Object.assign(Do(t),Mo(t),Lo(t))}function Sr(t){return Object.defineProperty(t,Io,{value:!0}),t}function _o(t,e){for(let n of Reflect.ownKeys(e)){let r=Ti(t,n);(r==null||vi(r))&&Object.defineProperty(t,n,e[n])}}function Ti(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function vi(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Io]===!0)}var Be=class extends Ie{[z]={};[Wt]=[];[Ge]=ki(this);name=\"\";window=this;parent=this;self=this;top=this;document=new $t(this);customElements=new Mn;location=globalThis.location;navigator=globalThis.navigator;Event=K;ErrorEvent=Rn;PromiseRejectionEvent=Cn;ToggleEvent=Pn;FocusEvent=_n;ClipboardEvent=In;EventTarget=Ie;CustomEvent=An;Node=ue;ParentNode=ye;ChildNode=De;DocumentFragment=at;Document=$t;CharacterData=Me;Comment=it;Text=st;Element=W;HTMLElement=Dn;SVGElement=ot;HTMLTemplateElement=lt;MutationObserver=yn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Si(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Do(e),s=Object.assign(Mo(e),Lo(e));delete o.self,Object.defineProperties(globalThis,o),_o(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),_o(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,xi(e))}};function Si(t,e){t[Wt].push(e(t)??{})}function ki(t){return{createElement:ve.bind(null,t,\"createElement\"),setAttribute:ve.bind(null,t,\"setAttribute\"),removeAttribute:ve.bind(null,t,\"removeAttribute\"),createText:ve.bind(null,t,\"createText\"),setText:ve.bind(null,t,\"setText\"),insertChild:ve.bind(null,t,\"insertChild\"),removeChild:ve.bind(null,t,\"removeChild\"),addEventListener:ve.bind(null,t,\"addEventListener\"),removeEventListener:ve.bind(null,t,\"removeEventListener\")}}function ve(t,e,...n){for(let s of t[Wt])s[e]?.apply(s,n);let r=t[z];r[e]?.apply(r,n)}var Ln=new Be;var kr=\"~\";var Le=new WeakMap;function ct(t){return Le.get(t)}var Cr=new WeakMap,Ai=0;function ie(t){let e=Cr.get(t);return e==null&&(e=String(Ai++),Hn(t,e)),e}function Hn(t,e){Cr.set(t,e)}var Ar=new WeakMap;function Ri(t){return Ar.get(t)}var Rr=new WeakMap;function Ci(t){let e=Rr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Pi=new WeakMap;function _i(t){return Pi.get(t)}function Pr(t,e,n){let r=Ar.get(t);if(r==null&&(r={},Ar.set(t,r)),r[e]===n)return;r[e]=n;let o=Le.get(t);o?.mutate([[3,ie(t),e,n,1]])}function He(t,e,n){let r=Rr.get(t);if(r==null&&(r={},Rr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Le.get(t);o?.mutate([[3,ie(t),e,n,2]])}function dt(t,e){if(Le.get(t)!==e&&(Le.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)dt(t.childNodes[r],e)}function $n(t){if(Le.get(t)!=null&&(Le.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)$n(t.childNodes[n])}function ut(t){let{nodeType:e}=t;switch(e){case 1:return{id:ie(t),type:e,element:t.localName,properties:Or(Ri(t)),attributes:Or(Ci(t)),eventListeners:Or(_i(t)),children:Array.from(t.childNodes).map(ut)};case 3:case 8:return{id:ie(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Or(t){return t?{...t}:void 0}function _r(t,e,...n){let r=Cr.get(t),o=Le.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var ft=Ln[z];ft.insertChild=(t,e,n)=>{let r=ct(t);r!=null&&(dt(e,r),r.mutate([[0,ie(t),ut(e),n]]))};ft.removeChild=(t,e,n)=>{let r=ct(t);r!=null&&($n(e),r.mutate([[1,ie(t),n]]))};ft.setText=(t,e)=>{let n=ct(t);n?.mutate([[2,ie(t),e]])};ft.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||He(t,e,n)};ft.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||He(t,e)};Be.setGlobal(Ln);var Uo=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],Go=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],jo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Vo=[\"TEMPORARY\",\"PERSISTENT\"],Qd=Object.freeze([...Uo,...Go,...jo,...Vo]),eu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),$o=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function zo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Uo,...Go,...jo,...e,\"constructor\",Symbol.toStringTag]),i=(g,d)=>{let x=Reflect.getOwnPropertyDescriptor(g,d);return x===void 0||!(\"value\"in x)||x.writable||x.configurable?!1:n.primitivesStay&&typeof d==\"symbol\"&&(typeof x.value!=\"object\"||x.value===null)&&typeof x.value!=\"function\"?!0:Vo.includes(d)&&typeof x.value==\"number\"},a=t,l=a.setTimeout,u=a.setInterval,m=a.crypto,E=(g,d)=>function(x,k,...C){if(typeof x!=\"function\")throw new TypeError(`${d} takes a function: a guest view cannot run code from text`);return g.call(t,x,k,...C)},c=m?Object.freeze({getRandomValues:g=>m.getRandomValues(g)}):void 0,y=a.document?.defaultView;if(y&&y!==a)for(let g of Reflect.ownKeys(y))typeof g==\"symbol\"||s.has(g)||Reflect.deleteProperty(y,g)||o.push(`window.${g}`);let N=[];for(let g=t;g&&g!==Object.prototype;g=Object.getPrototypeOf(g))N.push(g);for(let g of N)for(let d of Reflect.ownKeys(g))s.has(d)||(Reflect.deleteProperty(g,d)?r.push($o(d)):i(g,d)||o.push($o(d)));let T=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},p=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let g of p){let d=T();Object.defineProperty(d,\"prototype\",{value:g,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(g,\"constructor\",{value:d,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),g===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:d,writable:!0,enumerable:!1,configurable:!0})}let f=(g,d)=>{Reflect.defineProperty(t,g,{value:d,writable:!0,enumerable:!0,configurable:!0})||o.push(g)};f(\"setTimeout\",E(l,\"setTimeout\")),f(\"setInterval\",E(u,\"setInterval\")),c&&f(\"crypto\",c);for(let g of N.slice(1))Object.freeze(g);for(let g of Reflect.ownKeys(t)){let d=Reflect.getOwnPropertyDescriptor(t,g);Reflect.defineProperty(t,g,\"value\"in d?{...d,writable:!1,configurable:!1}:{...d,configurable:!1})}let b;try{b=Reflect.preventExtensions(t)}catch{b=!1}return{removed:r,stuck:o,sealed:b}}var Ut=class extends HTMLElement{constructor(){super(),Hn(this,kr)}connect(e){if(ct(this)===e||(dt(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,kr,ut(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Pr(this,e,n)}callRemoteMethod(e,...n){return _r(this,e,...n)}};var w={},Un={empty:!0},Ii={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},mt={div:w,section:w,article:w,aside:w,header:w,footer:w,nav:w,hgroup:w,search:w,address:w,figure:w,figcaption:w,blockquote:w,p:w,pre:w,hr:Un,br:Un,wbr:Un,h1:w,h2:w,h3:w,h4:w,h5:w,h6:w,span:w,strong:w,em:w,b:w,i:w,u:w,s:w,small:w,mark:w,abbr:w,cite:w,q:w,code:w,kbd:w,samp:w,var:w,sub:w,sup:w,dfn:w,bdi:w,bdo:w,ruby:w,rt:w,rp:w,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:w,menu:w,dl:w,dt:w,dd:w,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:w,caption:w,thead:w,tbody:w,tfoot:w,tr:w,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:w,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:w,output:w,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":Un},Di=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Mi={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Di.map(t=>[t,\"css\"]))},Se={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Gn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Fo={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Bo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},pe={...Se,in:\"text\",result:\"text\"},Yo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},jn={svg:{attributes:{...Se,...Gn}},g:w,defs:w,symbol:{attributes:{...Se,...Gn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Se,href:\"fragment\"}},title:w,desc:w,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Se,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...Yo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Yo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Se,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Se,...Gn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Gn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:w,filter:{attributes:{...Se,filterUnits:Fo,primitiveUnits:Fo}},feBlend:{attributes:{...pe,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...pe,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:pe},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...pe,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...pe,in2:\"text\",scale:\"number\",xChannelSelector:Bo,yChannelSelector:Bo}},feDropShadow:{attributes:{...pe,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:pe},feGaussianBlur:{attributes:{...pe,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:pe},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...pe,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...pe,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Se,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var Wo=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],qo=[\"region\"],Gt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Vn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function Li(t){return/^aria-[a-z]+$/.test(t)}function Hi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Xo=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"mask-origin\",\"mask-clip\",\"mask-composite\",\"mask-mode\",\"mask-type\",\"-webkit-mask\",\"-webkit-mask-image\",\"-webkit-mask-size\",\"-webkit-mask-position\",\"-webkit-mask-repeat\",\"-webkit-mask-origin\",\"-webkit-mask-clip\",\"-webkit-mask-composite\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"-webkit-text-stroke\",\"-webkit-text-stroke-width\",\"-webkit-text-stroke-color\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"animation-timeline\",\"animation-range\",\"animation-range-start\",\"animation-range-end\",\"scroll-timeline\",\"scroll-timeline-name\",\"scroll-timeline-axis\",\"view-timeline\",\"view-timeline-name\",\"view-timeline-axis\",\"view-timeline-inset\",\"timeline-scope\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Ko=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\",\"scroll\",\"view\"],Zo=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],Jo=[\"media\",\"supports\",\"container\",\"keyframes\"],Qo={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},es=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],zn=64e3,Ir=4e3,ts=1e5,jt=512e3,Dr=1e4,ns=\"http://www.w3.org/1999/xhtml\",rs=\"http://www.w3.org/2000/svg\",$i=new Map(Object.keys(jn).map(t=>[t.toLowerCase(),t]));function Fn(t){return $i.get(t.toLowerCase())}function Bn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[mt[e]?.attributes,Ii]:[jn[e]?.attributes,Mi],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(Li(r)||Hi(r))return{name:r,kind:\"text\"}}function os(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var ss=[\"wheel\",\"drag\",\"pinch\"];var is=\"~\",Yn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),be=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>be(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,be(r,e+1)]))};function as(){let t=new Map,e=new Map,n=new Map([[is,{children:[],listeners:new Map}]]),r=0,o=u=>{let m=e.get(u);return m===void 0&&(m=r+=1,e.set(u,m),t.set(m,{listener:u,count:0})),t.get(m).count+=1,m},s=u=>{let m=t.get(u);m&&(m.count-=1,!(m.count>0)&&(t.delete(u),e.delete(m.listener)))},i=u=>{let m=n.get(u);if(m){n.delete(u);for(let E of m.listeners.values())s(E);for(let E of m.children)i(E)}},a=(u,m,E=0)=>{if(!Yn(u)||E>64)return be(u);let c=typeof u.id==\"string\"?u.id:void 0,y=m&&c!==void 0&&c!==is;y&&i(c);let N={children:[],listeners:new Map};y&&n.set(c,N);let T={};for(let[p,f]of Object.entries(u))p===\"children\"&&Array.isArray(f)?T[p]=f.map(b=>{let g=a(b,y,E+1);return y&&Yn(b)&&typeof b.id==\"string\"&&N.children.push(b.id),g}):p===\"eventListeners\"&&Yn(f)?T[p]=Object.fromEntries(Object.entries(f).map(([b,g])=>{if(typeof g!=\"function\"||!y)return[b,void 0];let d=o(g);return N.listeners.set(b,d),[b,{listener:d}]})):T[p]=be(f,E+1);return T},l=u=>{if(!Array.isArray(u))return be(u);let[m,E]=u,c=typeof E==\"string\"?n.get(E):void 0;if(m===0){let y=a(u[2],c!==void 0),N=Yn(u[2])?u[2].id:void 0;if(c&&typeof N==\"string\"&&n.has(N)){let T=Number(u[3]);c.children.splice(Number.isInteger(T)&&T>=0&&T<=c.children.length?T:c.children.length,0,N)}return[m,be(E),y,be(u[3])]}if(m===1){let y=Number(u[2]);return c&&Number.isInteger(y)&&y>=0&&y<c.children.length&&i(c.children.splice(y,1)[0]),be(u)}if(m===3&&u[4]===3){let y=String(u[2]),N=u[3],T=c&&typeof N==\"function\"?o(N):void 0,p=c?.listeners.get(y);return p!==void 0&&s(p),T===void 0?c?.listeners.delete(y):c.listeners.set(y,T),[m,be(E),y,T===void 0?void 0:{listener:T},3]}return be(u)};return{encode:u=>u.map(l),listener:u=>t.get(u)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Mr=\"graview-view-root\",Ui=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Gi=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),ji=t=>Object.freeze({html:t,toString:()=>t}),ls=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),cs=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(cs).join(\"\"):ls(t)?t.html:Gi(String(t));function ds(t){customElements.get(Mr)||customElements.define(Mr,Ut);let e=Event,n=as(),r=new Set,o=new Set,s,i=[],a=new Set;for(let h of[\"closest\",\"matches\",\"dataset\"]){let v=()=>{throw new TypeError(`A view's element has no ${h}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};h in Element.prototype||Object.defineProperty(Element.prototype,h,h===\"dataset\"?{get:v}:{value:v})}let l=document.createElement(Mr),u=h=>{let v=O=>{for(let _ of Array.from(O.childNodes)){if(_.nodeType!==1)continue;if(ie(_)===h)return _;let P=v(_);if(P)return P}};return v(l)},m=h=>{let v=u(h.target);if(!v)return;let O=new e(h.event,{bubbles:!0}),_={};for(let P of Ui)h[P]!==void 0&&(_[P]=h[P]);for(let P of Object.keys(_))Object.defineProperty(O,P,{value:_[P],enumerable:!0});v.dispatchEvent(O);for(let P of o){if(P.type!==h.event)continue;let $;try{$=new Set(Array.from(l.querySelectorAll(P.selector)))}catch{continue}for(let ee=v;ee&&ee!==l;ee=ee.parentNode)if($.has(ee)){P.listener(Object.freeze({type:h.event,target:v,element:ee,..._}));break}}},E=h=>{if(h.type===\"dom-event\"&&typeof h.target==\"string\")return m(h);if(h.type===\"notice\")return t.warn(h.text);if(h.type!==\"props\")return;s=h.props;let v=t.now();for(let P of r)try{P(h.props)}catch($){t.threw($)}let O=t.now()-v,_=h.push;typeof _==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:_,ms:O})))},c;l.connect({mutate(h){c||(c=[],t.microtask(()=>{let v=c??[];c=void 0,t.send({type:\"render\",records:n.encode(v)})})),c.push(...h)},call:()=>{}});let y=h=>h.nodeType===1?h.getAttribute(\"data-key\")??h.getAttribute(\"id\"):null,N=(h,v)=>h.nodeType===v.nodeType&&(h.nodeType!==1||h.localName===v.localName&&h.namespaceURI===v.namespaceURI&&y(h)===y(v));function T(h,v){let O=Array.from(v.childNodes),_=0;for(let P of O){let $=h.childNodes[_]??null;if($&&N($,P)){p($,P),_+=1;continue}if(y(P)!==null){let Ae=Array.from(h.childNodes).slice(_+1).find(xt=>N(xt,P));if(Ae){h.insertBefore(Ae,$),p(Ae,P),_+=1;continue}}h.insertBefore(P,$),_+=1}for(;h.childNodes.length>_;)h.removeChild(h.lastChild)}function p(h,v){if(h.nodeType!==1){h.data!==v.data&&(h.data=v.data);return}let O=h,_=v,P=f(O);for(let $ of O.getAttributeNames())_.hasAttribute($)||(O.removeAttribute($),P&&He(O,$,void 0));for(let $ of _.getAttributeNames()){let ee=_.getAttribute($);O.getAttribute($)!==ee&&O.setAttribute($,ee),P&&He(O,$,ee)}T(O,_)}let f=h=>h.localName.includes(\"-\");function b(h){for(let v of Array.from(h.childNodes)){if(v.nodeType!==1)continue;let O=v;if(f(O))for(let _ of O.getAttributeNames())He(O,_,O.getAttribute(_)??void 0);b(O)}}function g(h,v,O){for(let _ of Array.from(h.childNodes)){if(_.nodeType!==1)continue;let P=_,$=P.localName,ee=v||$.toLowerCase()===\"svg\",Ae=ee?Fn($):Object.prototype.hasOwnProperty.call(mt,$.toLowerCase())?$.toLowerCase():void 0;if(!Ae){O.add(`<${$}>`);continue}for(let xt of P.getAttributeNames())(!Bn(ee?\"svg\":\"html\",Ae,xt)||!ee&&Vn[Ae]?.includes(xt.toLowerCase()))&&O.add(`${Ae} ${xt}`);g(P,ee,O)}}function d(h){let v=document.createElement(\"div\"),O=Array.isArray(h)?h:[h];for(let P of O)if(P!=null)if(typeof P==\"string\"||ls(P)){let $=document.createElement(\"div\");$.innerHTML=typeof P==\"string\"?P:P.html,v.append(...Array.from($.childNodes))}else v.append(P);let _=new Set;g(v,!1,_),i=[..._],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),b(v),T(l,v)}let x=[],k=new Set(ss),C=\"[]\",R=!1,A=()=>{R||(R=!0,t.microtask(()=>{R=!1;let h=[...new Map([...o].filter(O=>k.has(O.type)).map(O=>[`${O.type} ${O.selector}`,{event:O.type,selector:O.selector}])).entries()].sort(([O],[_])=>O<_?-1:O>_?1:0).map(([,O])=>O),v=JSON.stringify(h);v!==C&&(C=v,t.send({type:\"gestures\",bound:h}))}))},q=\"[]\",L=!1,B=()=>{L||(L=!0,t.microtask(()=>{L=!1;let h=[...new Set([...o].filter(O=>O.type===\"click\"&&typeof O.selector==\"string\").map(O=>O.selector))].sort().slice(0,200),v=JSON.stringify(h);v!==q&&(q=v,t.send({type:\"clicks\",selectors:h}))}))};return{view:Object.freeze({get props(){return s},onProps(h){return r.add(h),s&&h(s),()=>void r.delete(h)},render:d,style(h){typeof h!=\"string\"||x.includes(h)||(x.push(h),t.send({type:\"style\",sheets:[...x]}))},on(h,v,O){let _={type:h,selector:v,listener:O};return o.add(_),typeof h==\"string\"&&!a.has(h)&&(a.add(h),t.send({type:\"hears\",events:[h]})),k.has(h)&&A(),h===\"click\"&&B(),()=>{o.delete(_),k.has(h)&&A(),h===\"click\"&&B()}},act:(h,v={})=>t.act(h,v),navigate(h){if(typeof h==\"string\")return t.navigate(h);let v=os(h);v&&t.send(v)},html(h,...v){return ji(h.reduce((O,_,P)=>O+_+(P<v.length?cs(v[P]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:E,find:h=>{try{let v=l.querySelectorAll(h)[0];return v?ie(v):void 0}catch{return}},listened:h=>{let v=new Set;for(let O of o)if(O.type===h)try{for(let _ of Array.from(l.querySelectorAll(O.selector))){let P=ie(_);P&&v.add(P)}}catch{}return[...v]}}}var us=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Vt(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=us(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&us(s.title)===o):void 0)}var Ee=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,pt=\" This run was not handed the views the host keeps, so a titled view's place is not among these: if it names one, the link goes there.\",zt=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var fs=[\"https:\",\"mailto:\",\"tel:\"];function ms(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!fs.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function ps(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=ms(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function hs(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function gs(t,e){let n=ms(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&hs(e.origins).includes(new URL(n).origin)))return n}function ys(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!fs.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=hs(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}var J=t=>t>=48&&t<=57,bs=t=>J(t)||t>=65&&t<=70||t>=97&&t<=102,jr=t=>t>=65&&t<=90||t>=97&&t<=122,Vr=t=>t>=128,Wn=t=>jr(t)||Vr(t)||t===95,Es=t=>Wn(t)||J(t)||t===45,ws=t=>t===10,ke=t=>t===10||t===9||t===32,Vi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,he=-1;function zi(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function Fi(t){let e=zi(t),n=0,r=(p=0)=>n+p<e.length?e[n+p]:he,o=[],s=(p,f)=>p===92&&f!==10&&f!==he,i=(p,f,b)=>p===45?Wn(f)||f===45||s(f,b):Wn(p)?!0:s(p,f),a=(p,f,b)=>p===43||p===45?J(f)||f===46&&J(b):J(p===46?f:p),l=()=>{let p=r();if(n+=1,p===he)return 65533;if(bs(p)){let f=String.fromCodePoint(p);for(;f.length<6&&bs(r());)f+=String.fromCodePoint(r()),n+=1;ke(r())&&(n+=1);let b=parseInt(f,16);return b===0||b>=55296&&b<=57343||b>1114111?65533:b}return p},u=()=>{let p=\"\";for(;;){let f=r();if(Es(f))p+=String.fromCodePoint(f),n+=1;else if(s(f,r(1)))n+=1,p+=String.fromCodePoint(l());else return p}},m=()=>{let p=\"\";for((r()===43||r()===45)&&(p+=String.fromCodePoint(e[n++]));J(r());)p+=String.fromCodePoint(e[n++]);if(r()===46&&J(r(1)))for(p+=String.fromCodePoint(e[n++],e[n++]);J(r());)p+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(J(r(1))||(r(1)===43||r(1)===45)&&J(r(2))))for(p+=String.fromCodePoint(e[n++]),J(r())||(p+=String.fromCodePoint(e[n++]));J(r());)p+=String.fromCodePoint(e[n++]);return p},E=()=>{let p=m();return i(r(),r(1),r(2))?{type:\"dimension\",repr:p,unit:u()}:r()===37?(n+=1,{type:\"percentage\",repr:p}):{type:\"number\",repr:p}},c=()=>{for(;;){let p=r();if(n+=1,p===41||p===he)return;s(p,r())&&l()}},y=()=>{let p=\"\";for(;ke(r());)n+=1;for(;;){let f=r();if(n+=1,f===41)return{type:\"url\",value:p};if(f===he)return{type:\"url\",value:p};if(ke(f)){for(;ke(r());)n+=1;return r()===41||r()===he?(r()===41&&(n+=1),{type:\"url\",value:p}):(c(),{type:\"bad-url\"})}if(f===34||f===39||f===40||Vi(f))return c(),{type:\"bad-url\"};if(f===92){if(s(f,r()))p+=String.fromCodePoint(l());else return c(),{type:\"bad-url\"};continue}p+=String.fromCodePoint(f)}},N=()=>{let p=u();if(p.toLowerCase()===\"url\"&&r()===40){for(n+=1;ke(r())&&ke(r(1));)n+=1;let f=ke(r())?r(1):r();return f===34||f===39?{type:\"function\",value:p}:y()}return r()===40?(n+=1,{type:\"function\",value:p}):{type:\"ident\",value:p}},T=p=>{let f=\"\";for(;;){let b=r();if(n+=1,b===p||b===he)return{type:\"string\",value:f};if(ws(b))return n-=1,{type:\"bad-string\"};if(b===92){if(r()===he)continue;if(ws(r())){n+=1;continue}f+=String.fromCodePoint(l());continue}f+=String.fromCodePoint(b)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==he&&!(r()===42&&r(1)===47);)n+=1;r()!==he&&(n+=2)}let p=r();if(p===he)return o;if(ke(p)){for(;ke(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,p){case 34:case 39:o.push(T(p));continue;case 35:if(Es(r())||s(r(),r(1))){let f=i(r(),r(1),r(2));o.push({type:\"hash\",value:u(),id:f})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(p,r(),r(1))?(n-=1,o.push(E())):o.push({type:\"delim\",value:String.fromCodePoint(p)});continue;case 44:o.push({type:\",\"});continue;case 45:a(p,r(),r(1))?(n-=1,o.push(E())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(p,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:u()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(p,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:J(p)?(n-=1,o.push(E())):Wn(p)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(p)})}}}var Ss={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},ks=32,Hr=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Os(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Ns(t,Ss[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Ns(t,\")\",e+1)}:n}function Ns(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>ks){t.next(),r.push({type:\"bad-string\"});continue}r.push(Os(t,n))}}function ht(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let a=[];r+=1;let l;for(;r<t.length;){let u=t[r];if(r+=1,u.type===\";\")break;if(u.type===\"block\"&&u.open===\"{\"){l=u.value;break}a.push(u)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function zr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let a=t[i];if(a.type===\";\"||a.type===\"block\"&&a.open===\"{\")return i+1}return t.length})();e.push(...ht(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let a=As(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((u,m)=>m>n&&u.type===\"block\"&&u.open===\"{\");e.push(...ht(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...ht(t.slice(n,o+1),!1)),n=o+1}return e}function As(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Fr(t){let e=new Hr(Fi(t)),n=[];for(;e.peek();)n.push(Os(e,0));return n}function qn(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&J(r)||o===1&&J(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Vr(r)||r===45||r===95||J(r)||jr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Xn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Vr(r)||r===45||r===95||J(r)||jr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function $r(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function Bi(t){let e=Xn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Xn(t.slice(1))}`:e}var xs=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function Yi(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function Wi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return qn(t.value);case\"at-keyword\":return`@${qn(t.value)}`;case\"hash\":return`#${Xn(t.value)}`;case\"string\":return $r(t.value);case\"url\":return`url(${$r(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${Bi(t.unit)}`;case\"func\":return`${qn(t.name)}(${gt(t.value)})`;case\"block\":return`${t.open}${gt(t.value)}${Ss[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function gt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Yi(xs(n),xs(r))&&(e+=\"/**/\"),e+=Wi(r),n=r);return e}var qi=new Set(Xo),Rs=new Set(Ko),Ts=new Set(Zo),Xi=new Set(Jo),Ki=new Set(es),vs=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Oe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Zi=t=>Oe(t);function Ur(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&Ts.has(t)&&vs.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=Oe(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(u=>u.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&Ts.has(t)&&vs.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!Rs.has(s)){n({reason:\"function\",name:s});return}let i=Ur(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=Ur(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}var Ji=/^(animation|transition|scroll-behavior)/;function Zn(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:Zi(t.name);if(!r&&!qi.has(o)){e({reason:\"property\",name:o});return}let s=Qo[o];if(s){let l=t.value.filter(E=>E.type!==\"whitespace\"),u=l[0],m=l.length===1&&u?.type===\"ident\"?Oe(u.value):void 0;if(!m||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(m)){e({reason:\"value\",name:o});return}return`${o}: ${m}${t.important?\" !important\":\"\"}`}let i=Ur(r?void 0:o,t.value,e);if(!i)return;let a=gt(i).trim();return`${r?`--${Xn(t.name.slice(2))}`:o}: ${a}${t.important&&!(n&&Ji.test(o))?\" !important\":\"\"}`}function Cs(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let a=Oe(s.type===\"ident\"?s.value:s.name);if(Ki.has(a)||a.startsWith(\"-webkit-\")||a.startsWith(\"-moz-\"))return e({reason:\"selector\",name:a}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function Lr(t,e,n){let r=[];for(let o of zr(t))if(o.type===\"declaration\"){let s=Zn(o,e);s&&r.push(`${s};`)}else{let s=Kn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Qi(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=Oe(s.name);return e===\"supports\"&&i===\"selector\"?Cs(s.value,n):Rs.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=zr(s.value);if(i.length===1&&i[0].type===\"declaration\")return Zn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?gt(t).trim():void 0}function Gr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(Gt,Oe(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:Oe(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Gr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Gr(e.value)}:e})}function Kn(t,e,n,r){if(n>ks){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(m=>m.type===\"whitespace\"||m.type===\",\"||m.type===\"percentage\"||m.type===\"ident\"&&[\"from\",\"to\"].includes(Oe(m.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${gt(t.prelude).trim()} { ${Lr(t.block,e,n)} }`}if(!Cs(t.prelude,e))return;let l=gt(Gr(t.prelude)).trim();if(l===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${l} { ${Lr(t.block,e,n)} }`}let o=Oe(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!Xi.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let l=t.prelude.filter(c=>c.type!==\"whitespace\"),u=l[0];if(l.length!==1||!u||u.type!==\"ident\"&&u.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let m=ht(t.block,!1).map(c=>Kn(c,e,n+1,\"keyframes\")).filter(c=>c!==void 0);return`@keyframes ${u.type===\"ident\"?qn(u.value):$r(u.value)} { ${m.join(\" \")} }`}let i=Qi(t.prelude,s,e);if(i===void 0)return;let a=r===\"style\"?Lr(t.block,e,n):ht(t.block,!1).map(l=>Kn(l,e,n+1,\"sheet\")).filter(l=>l!==void 0).join(\" \");return`@${s} ${i} { ${a} }`}function ea(t,e=zn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:ht(Fr(t),!0).map(s=>Kn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function Ps(t,e=zn){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:\"size\"});continue}o+=s.length;let i=ea(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function _s(t,e=zn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of zr(Fr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Zn(s,r,!0);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function Is(t,e){let n,r=Zn(As(t,Fr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function Ds(t,e){if(e===\"svg\"){let r=Fn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(mt,n)?Object.prototype.hasOwnProperty.call(Gt,n)?{namespace:\"html\",name:Gt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Jn(t,e){return(t===\"html\"?mt[e]:jn[e])?.empty===!0}var ta=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,na=/^[0-9A-Za-z\\s.,+\\-%()]*$/,ra=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,oa=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,sa=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Ms=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ia=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function aa(t,e){if(sa.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(ia.test(n))return Ms.exec(n)?.[0]}function Ls(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Hs(e.origins),s=Ms.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>jt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${jt.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${s}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",a=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${a.slice(0,-1).join(\", \")} or ${a[a.length-1]}.`}function Hs(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function la(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:Hs(e).includes(n.origin)?n.href:void 0}catch{return}}function Br(t,e,n,r,o){let s=Bn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Vn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=ca(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200),...r.length>jt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>Wo.includes(a.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(a=>({reason:a.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:a}))}:{}}}function ca(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>ts||!na.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>jt)return o(\"url\");if(oa.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?aa(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=la(n,r.imageOrigins);return a?{value:a}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>Ir)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return ta.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return ra.test(n)?{value:n}:o(\"url\");case\"style\":{let s=_s(n,Ir);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=Is(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var da=\"http://www.w3.org/1999/xhtml\",ua=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var Qn=(t,...e)=>t.namespaceURI===da&&e.includes(t.localName),fa=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),ma=t=>Qn(t,\"textarea\",\"select\")||Qn(t,\"input\")&&!ua.has(fa(t));function $s(t){if(Qn(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(Qn(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(ma(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var pa=\"http://www.w3.org/1999/xhtml\",yt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof We?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},Ye=class extends yt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Yr=class extends yt{nodeType=8;get textContent(){return\"\"}},We=class extends yt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},Wr=class extends yt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new We(this,e,n)}createElement(e){return new We(this,pa,e)}createTextNode(e){return new Ye(this,e)}createComment(e){return new Yr(this)}};function Us(){let t=new Wr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var qr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Gs=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),js=new Set([\"style\",\"template\",\"datalist\",\"option\"]),F=t=>t.replace(/\\s+/g,\" \").trim();function ha(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var ae=t=>t instanceof We,Ft=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function Q(t){return t instanceof Ye?t.data:!ae(t)||Ft(t)||js.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(Q).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*qe(t){for(let e of t.childNodes)ae(e)&&(yield e,yield*qe(e))}function ga(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute(\"data-record\")!==null&&(i=!0),a!==t&&(a.localName===\"fieldset\"||a.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function ya(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(u=>u.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(u=>u.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(u=>`\"${u.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let u=l.indexOf(\":\"),m=u>0?l.slice(u+1):\"\";u<=0||m===\"\"||n.has(l)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${l}\"${n.has(l)?\", which names a record and no relation\":\"\"}.`}):n.has(m)||s.push({at:o,says:`data-drop-connect names \"${m}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Vs(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let c of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(c.id,c);let i=c=>Vt(e.places,c)!==void 0;for(let c of qe(t)){let y=c.getAttribute(\"data-act\");y!==null&&r.add(y);let N=y!==null&&c.getAttribute(\"data-debounce\")===null?$s(c):void 0;N&&n.push({at:`drawing <${c.localName} data-act=\"${y}\">`,says:N});let T=c.getAttribute(\"data-record\");T!==null&&(o.add(T),!s.has(T)&&!i(T)&&n.push({at:`drawing <${c.localName} data-record=\"${T}\">`,says:e.placesUnsure?`It names \"${T}\", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${Ee(e.places)}${pt}`:`It names \"${T}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${Ee(e.places)}`}));let p=c.getAttribute(\"data-place\");p!==null&&!i(p)&&n.push({at:`drawing <${c.localName} data-place=\"${p}\">`,says:e.placesUnsure?`It names the place \"${p}\", which is none of the places this run was told of.${Ee(e.places)}${pt}`:`It names the place \"${p}\", which this app does not have.${Ee(e.places)}`}),n.push(...ga(c)),n.push(...ya(c,e,s))}let a=c=>{if(c.localName===\"graview-video\")return;let y=c.getAttribute(\"data-record\");if(y!==null)return y;let N=c.getAttribute(\"data-key\")??c.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let T=new Set;for(let p of qe(c)){let f=p.getAttribute(\"data-record\");f!==null&&p.localName!==\"graview-video\"&&T.add(f)}return T.size===1?[...T][0]:void 0},l=(c,y)=>{let N=s.get(y),T=N?.kind??(y.includes(\":\")?y.slice(0,y.indexOf(\":\")):\"\"),p=[...qe(c)],f=p.find(d=>d.localName in qr)??p.find(d=>d.localName===\"a\"&&d.getAttribute(\"data-record\")===y)??p.find(d=>d.localName===\"strong\"||d.localName===\"b\"),b=F(f?Q(f):\"\")||N?.label||y,g=m(c,f);return!f&&g[0]?.t===\"text\"&&F(g[0].text)===b&&g.shift(),{id:y,kind:T,title:b,parts:g}},u=c=>{let y=[...qe(c)].filter(f=>f.localName===\"tr\"&&!Ft(f)),N=y.find(f=>f.parentElement?.localName===\"thead\"||f.childNodes.every(b=>!ae(b)||b.localName===\"th\")),T=N?N.childNodes.filter(ae).map(f=>F(Q(f))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:y.filter(f=>f!==N).map(f=>{let b=f.childNodes.filter(ae),g=a(f),d=g?s.get(g):void 0;return{id:g??\"\",kind:d?.kind??\"\",title:F(Q(b[0]??f)),parts:b.slice(1).map((x,k)=>({t:\"field\",label:T[k+1]??\"\",text:F(Q(x))}))}})}]}};function m(c,y){let N=[],T=\"\",p=()=>{let b=F(T);T=\"\",b&&N.push({t:\"text\",text:b})},f=c.childNodes;for(let b=0;b<f.length;b+=1){let g=f[b];if(g===y)continue;if(g instanceof Ye){T+=g.data;continue}if(!ae(g)||Ft(g)||js.has(g.localName))continue;if(y&&[...qe(g)].includes(y)){p(),N.push(...m(g,y));continue}let d=[];for(let x=b;x<f.length;x+=1){let k=f[x];if(k instanceof Ye&&F(k.data)===\"\")continue;if(!ae(k)||Ft(k)||Gs.has(k.localName)||k.localName in qr)break;let C=a(k);if(!C)break;d.push({element:k,id:C}),b=x}if(d.length>0){p();let x=d.every(k=>k.element.localName===\"li\"||k.element.localName===\"tr\");N.push({t:\"list\",as:x?\"row\":\"card\",columns:1,groups:[{items:d.map(k=>l(k.element,k.id))}]});continue}N.push(...E(g,x=>T+=x,p))}return p(),N}function E(c,y,N){let T=c.localName;if(Gs.has(T)&&T!==\"label\")return y(Q(c)),[];if(T===\"mark\"){N();let f=F(Q(c));return f?[{t:\"badge\",text:f}]:[]}N();let p=qr[T]??(c.getAttribute(\"role\")===\"heading\"?Number(c.getAttribute(\"aria-level\")??2):void 0);if(p!==void 0){let f=F(Q(c));return f?[{t:\"heading\",level:p,text:f}]:[]}switch(T){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:c.childNodes.filter(b=>ae(b)&&b.localName===\"li\"&&!Ft(b)).map(b=>{let g=a(b);if(g)return l(b,g);let d=m(b),x=d[0],k=x&&(x.t===\"text\"||x.t===\"heading\")?x.text:\"\";return{id:\"\",kind:\"\",title:k,parts:k?d.slice(1):d}})}]}];case\"table\":return[u(c)];case\"dl\":{let f=[],b=\"\";for(let g of c.childNodes.filter(ae))if(g.localName===\"dt\")b=F(Q(g));else if(g.localName===\"dd\")f.push({t:\"field\",label:b,text:F(Q(g))});else if(g.localName===\"div\")for(let d of g.childNodes.filter(ae))d.localName===\"dt\"?b=F(Q(d)):d.localName===\"dd\"&&f.push({t:\"field\",label:b,text:F(Q(d))});return f}case\"figure\":{let f=c.childNodes.find(d=>ae(d)&&d.localName===\"figcaption\"),b=F(c.childNodes.filter(d=>d!==f).map(Q).join(\" \")),g=f?F(Q(f)):\"\";return b?[{t:\"figure\",text:b,...g?{label:g}:{}}]:g?[{t:\"text\",text:g}]:[]}case\"meter\":case\"progress\":{let f=Number(c.getAttribute(\"value\")??0),b=Number(c.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:c.getAttribute(\"aria-label\")??c.getAttribute(\"title\")??\"\",text:`${Math.round(f/b*100)}%`}]}case\"svg\":{let f=c.childNodes.find(d=>ae(d)&&d.localName===\"title\"),b=F(c.getAttribute(\"aria-label\")??(f?Q(f):\"\"));if(b)return[{t:\"text\",text:b,tone:\"picture\"}];let g=[...qe(c)].filter(d=>d.localName===\"text\").map(d=>F(Q(d))).filter(Boolean);return g.length>0?[{t:\"text\",text:g.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let f=F(c.getAttribute(\"alt\")??\"\");return f?[{t:\"text\",text:f,tone:\"picture\"}]:[]}case\"graview-video\":{let f=c.getAttribute(\"data-field\")??\"\",b=s.get(c.getAttribute(\"data-record\")??\"\"),g=b&&f&&Object.hasOwn(b,f)?b[f]:void 0,d=(Array.isArray(g)?g:[g])[Number(c.getAttribute(\"data-index\")??\"0\")];return!d||typeof d.name!=\"string\"||typeof d.type!=\"string\"||!d.type.startsWith(\"video/\")?(n.push({at:`drawing <graview-video data-field=\"${f}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[]):[{t:\"text\",text:`${typeof d.caption==\"string\"&&d.caption.trim()?d.caption.trim():d.name}, ${ha(typeof d.duration==\"number\"?{duration:d.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let f=F(Q(c));return f?[{t:\"text\",text:f,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let f=F(c.getAttribute(\"aria-label\")??c.getAttribute(\"placeholder\")??c.getAttribute(\"name\")??\"\"),b=T===\"select\"?F(Q(c.childNodes.find(g=>ae(g)&&g.localName===\"option\"&&g.selected)??c)):c.value;return[{t:\"field\",label:f,text:b}]}case\"label\":return m(c);default:return m(c)}}return{parts:m(t),problems:n,acts:[...r],records:[...o]}}var ba=0,Ea=1,wa=2,Na=3,zs=1,xa=2,Fs=3,Ta=1,va=3,Sa=8,Bs=\"~\",Bt=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ys=new Set([\"input\",\"select\",\"textarea\",\"option\"]),ka=new Set([\"value\",\"checked\",\"selected\"]),Ws=[\"aria-label\",\"aria-labelledby\",\"title\"],Oa=t=>Ws.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function qs(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:\"div\",namespace:\"html\",children:[],id:Bs};s.set(Bs,a);let l=0,u=!1,m=new WeakMap,E=new Map,c=d=>{o.push(d),o.length>200&&o.shift(),e.onRefused?.(d)},y=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),N=(d,x)=>{if(d.namespace===\"html\"&&d.name&&Ys.has(d.name))return d.dom;if(x?.namespace===\"html\"&&x.name===\"textarea\")return x.dom},T=(d,x)=>{let k=d.dom,C=m.get(k)??k.getAttribute(\"role\");if(C===null||!C.split(/\\s+/).some(R=>qo.includes(R.toLowerCase())))return void m.delete(k);if(Oa(k)){m.delete(k),k.getAttribute(\"role\")!==C&&k.setAttribute(\"role\",C);return}m.set(k,C),k.removeAttribute(\"role\"),x&&c({reason:\"value\",element:d.name,name:\"role\"})},p=(d,x,k,C=!0)=>{let R=d.dom;if(k!=null&&typeof k!=\"string\")return c({reason:\"value\",element:d.name,name:x});let A=Br(d.namespace,d.name,x,k??null,e);if(\"refused\"in A){let $e=Br(d.namespace,d.name,x,null,e);return\"refused\"in $e||R.removeAttribute($e.name),!(\"refused\"in $e)&&$e.name===\"role\"&&m.delete(R),c(A.refused)}for(let $e of A.dropped??[])c($e);let q=d.namespace===\"html\"&&ka.has(A.name)&&Ys.has(d.name),L=R,B=q?A.name===\"value\"?L.value:A.name===\"checked\"?L.checked:L.selected:void 0;A.name===\"role\"&&m.delete(R),A.value===null?R.removeAttribute(A.name):R.setAttribute(A.name,A.value),C&&(A.name===\"role\"||Ws.includes(A.name))&&T(d,A.name===\"role\"),e.onAttribute?.(R,A.name),q&&(A.name===\"value\"&&\"value\"in L?(L.value=A.value??\"\",B!==L.value&&e.onFieldSet?.(R)):A.name===\"checked\"&&\"checked\"in L?(L.checked=A.value!==null,B!==L.checked&&e.onFieldSet?.(R)):A.name===\"selected\"&&\"selected\"in L&&(L.selected=A.value!==null,B!==L.selected&&e.onFieldSet?.(R.parentElement?.closest(\"select\")??R)))},f=d=>{if(!d.refused){l-=1,d.id!==void 0&&s.delete(d.id);for(let x of d.children)f(x)}},b=(d,x)=>{if(!Bt(d)||typeof d.id!=\"string\"||s.has(d.id))return c({reason:\"record\"}),y();if(l>=r)return c({reason:\"budget\"}),u||(u=!0,e.onOverBudget?.()),y();let k=d.id;if(d.type===Sa)return y();if(d.type===va){if(Jn(x.namespace,x.name))return c({reason:\"child\",element:x.name}),y();let L=n.createTextNode(String(d.data??\"\").slice(0,Dr)),B={dom:L,children:[],text:!0,id:k,parent:x};return s.set(k,B),i.set(L,k),l+=1,B}if(d.type!==Ta)return c({reason:\"record\"}),y();let C=String(d.element);if(Jn(x.namespace,x.name))return c({reason:\"child\",element:C}),y();let R=Ds(C,x.namespace);if(\"refused\"in R)return c(R.refused),y();let A=n.createElementNS(R.namespace===\"svg\"?rs:ns,R.name);R.as&&A.setAttribute(\"data-graview-as\",R.as),R.namespace===\"html\"&&R.name===\"img\"&&A.setAttribute(\"referrerpolicy\",\"no-referrer\"),R.namespace===\"html\"&&R.name===\"a\"&&(A.setAttribute(\"target\",\"_blank\"),A.setAttribute(\"rel\",\"noopener noreferrer\"),A.setAttribute(\"referrerpolicy\",\"no-referrer\"));let q={dom:A,name:R.name,namespace:R.namespace,children:[],id:k,parent:x};if(s.set(k,q),i.set(A,k),l+=1,Bt(d.attributes)){for(let[L,B]of Object.entries(d.attributes))p(q,L,B,!1);T(q,!0)}if(e.decorate?.(A,R.name,R.namespace),Bt(d.properties))for(let L of Object.keys(d.properties))c({reason:\"attribute\",element:R.name,name:L});if(Bt(d.eventListeners))for(let L of Object.keys(d.eventListeners))d.eventListeners[L]!=null&&c({reason:\"attribute\",element:R.name,name:`on${L}`});if(Array.isArray(d.children))for(let L of d.children){let B=b(L,q);q.children.push(B),A.appendChild(B.dom)}return q},g=d=>{if(!Array.isArray(d))return c({reason:\"record\"});let[x,k]=d,C=typeof k==\"string\"?s.get(k):void 0;if(!C)return c({reason:\"record\"});switch(x){case ba:{if(C.text)return c({reason:\"record\"});let R=Number(d[3]),A=Number.isInteger(R)&&R>=0&&R<=C.children.length?R:C.children.length,q=d[2],L=Bt(q)&&typeof q.id==\"string\"?E.get(q.id):void 0,B;L&&L.parent?.namespace===C.namespace&&!Jn(C.namespace,C.name)?(E.delete(q.id),L.parent=C,B=L):B=b(q,C),C.dom.insertBefore(B.dom,C.children[A]?.dom??null),C.children.splice(A,0,B),C.namespace===\"html\"&&C.name===\"textarea\"&&e.onFieldSet?.(C.dom);return}case Ea:{let R=Number(d[2]),A=C.children[R];if(!A)return c({reason:\"record\"});C.children.splice(R,1),A.dom.parentNode?.removeChild(A.dom),A.id!==void 0&&!A.refused?E.set(A.id,A):f(A);return}case wa:{if(!C.text)return c({reason:\"record\"});C.dom.data=String(d[2]??\"\").slice(0,Dr);let R=N(C,C.parent);R&&e.onFieldSet?.(R);return}case Na:{if(C===a||C.text)return c({reason:\"record\"});let R=String(d[2]),A=d[4]??zs;return A===xa?p(C,R,d[3]):c(A===zs||A===Fs?{reason:\"attribute\",element:C.name,name:A===Fs?`on${R}`:R}:{reason:\"record\"})}default:return c({reason:\"record\"})}};return{apply(d,x){if(!Array.isArray(d))return c({reason:\"record\"}),!0;try{for(let k=0;k<d.length;k+=1){if(x&&k%32===0&&x())return!1;g(d[k])}return!0}finally{for(let k of E.values())f(k);E.clear()}},get refused(){return o},get size(){return l},idOf:d=>i.get(d),elementOf(d){let x=s.get(d);return x&&!x.text&&x!==a?x.dom:void 0},dispose(){for(let d of a.children)f(d);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Xs(t,e,n){let{root:r}=Us(),o=!1,s=qs(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let l of t)s.apply(l);let i=[...s.refused],a=\"\";if(e){let l=Ps(e);a=l.css;for(let u of l.refused)i.push({reason:\"css\",name:\"stylesheet\",css:u})}return{root:r,refused:i,size:s.size,over:o,css:a,elementOf:l=>s.elementOf(l)}}var er=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",Ks={animate:er,animateTransform:er,animateMotion:er,set:er,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",role:` A role of the app's chrome or notices is the app's; role=\"region\" is drawn while it has a name (aria-label).`};function Aa(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(Ks,s)?Ks[s]:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o(\"element\"in t?t.element:void 0)}`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.${o(`${\"element\"in t?t.element:\"\"}${r}`)}`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${ys(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Ls(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.${o(t.css?.name)}`}}}function Zs(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let m of t.asked)if(!r.has(m.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${m.name}\", which its manifest does not name.`};let o=ps(e.props),s=Xs(t.renders,t.sheets,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:m=>m}:{},link:m=>gs(m,{handed:o,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(s.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let i=[...e.places,...(e.lists??[]).filter(m=>!e.places.some(E=>E.as===m)).map(m=>({as:m}))],a=e.placesUnsure===!0,l=Vs(s.root,{props:e.props,places:i,...a?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let m of l.acts)if(!r.has(m))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${m}\" (data-act), which its manifest does not name.`};let u=[...s.refused.map(m=>Aa(m,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...l.problems];for(let m of t.went)\"record\"in m&&!(e.props.node?.id===m.record||(e.props.nodes??[]).some(E=>E.id===m.record)||Vt(i,m.record))&&u.push({at:\"navigate\",says:a?`It goes to ${zt(m.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${Ee(i)}${pt}`:`It goes to ${zt(m.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${Ee(i)}`}),\"place\"in m&&!Vt(i,m.place)&&u.push({at:\"navigate\",says:a?`It goes to the place ${zt(m.place)}, which is none of the places this run was told of.${Ee(i)}${pt}`:`It goes to the place ${zt(m.place)}, which this app does not have.${Ee(i)}`});return{ok:!0,parts:l.parts,problems:u,drawn:s}}var Xr=\"graviewHeadless\",Kr=\"graviewHeadlessView\";var ei=globalThis,Ra=Promise.prototype.then,Ca=Promise.resolve(),nr=t=>void Ra.call(Ca,t),tr=ei.performance,Yt=tr&&typeof tr.now==\"function\"?tr.now.bind(tr):Date.now,Xe=JSON.stringify,ti=JSON.parse,Pa=Object.defineProperty,Jr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),bt=t=>{try{return ti(Xe(t??null))}catch{return null}},G={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},we,rr=(t,e)=>{we??={reason:t,detail:e}},Et=t=>{G.logs.length<50&&G.logs.push(t.slice(0,500))},Nt={removed:[],stuck:[],sealed:!1},wt=ds({send(t){G.messages+=1,t.type===\"render\"?G.renders.push(bt(t.records)):t.type===\"style\"?G.sheets=(bt(t.sheets)??[]).map(String):t.type===\"gestures\"?G.gestures=bt(t.bound):t.type===\"navigate\"&&\"place\"in t?G.went.push({place:String(t.place),...t.where!==void 0?{where:bt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&G.went.push({record:String(t.to),...t.where!==void 0?{where:bt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return G.messages+=1,G.asked.push({name:String(t),args:bt(e)}),Promise.resolve({type:\"answer\",id:G.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){G.messages+=1,G.went.push({record:String(t)})},microtask:nr,now:Yt,threw:t=>rr(\"error\",`It threw: ${Jr(t)}`),warn:Et,hardening:()=>Nt}),Js=!1,Zr=!1;function _a(t){if(Zr||typeof t!=\"function\"||(Zr=!0,we))return;let e=Yt();try{t.call(void 0,wt.view)}catch(n){rr(\"error\",`It threw: ${Jr(n)}`)}G.ms+=Yt()-e}async function Ia(t){if(Js)return Xe({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Js=!0;let e;try{e=ti(String(t))}catch{return Xe({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Zr&&!we)return Xe({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=Yt();we||wt.hear({type:\"props\",props:e.props,push:1}),G.ms+=Yt()-n,G.ms>=e.limits.pushMs&&rr(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!we;o+=1)await new Promise(s=>nr(s));if(we||(G.clicks=wt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!we){let o=wt.find(e.press.selector);if(G.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:G.asked.length,went:G.went.length,renders:G.renders.length},o!==void 0){wt.hear({type:\"dom-event\",target:o,event:\"click\"});for(let s=0;s<64&&!we;s+=1)await new Promise(i=>nr(i))}}if(we)return Xe({ok:!1,...we,transcript:G});let r=Zs(G,e);return r.ok?Xe({ok:!0,transcript:G,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:Nt.removed.length,sealed:Nt.sealed}}):Xe({ok:!1,reason:r.reason,detail:r.detail,transcript:G})}var Da=Object.freeze({log:(...t)=>Et(t.map(String).join(\" \")),info:(...t)=>Et(t.map(String).join(\" \")),debug:(...t)=>Et(t.map(String).join(\" \")),warn:(...t)=>Et(t.map(String).join(\" \")),error:(...t)=>Et(t.map(Jr).join(\" \"))}),Ma=0,Qs=()=>Ma+=1,La=[[\"console\",Da],[\"setTimeout\",Qs],[\"setInterval\",Qs],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",nr],[\"graview\",wt.view],[Kr,_a],[Xr,t=>Ia(t)]];for(let[t,e]of La)Pa(ei,t,{value:e,writable:!0,enumerable:!1,configurable:!0});Nt=zo(globalThis,[\"graview\",Kr,Xr],{primitivesStay:!0});Nt.stuck.length>0&&rr(\"refused\",`This isolate could not be hardened: ${Nt.stuck.join(\", \")} would not go.`);})();\n";
7
+ export const HEADLESS_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var D=Symbol(\"name\"),_e=Symbol(\"prefix\"),Ie=Symbol(\"value\"),M=Symbol(\"ns\"),se=Symbol(\"owner\"),F=Symbol(\"owner_document\"),Ee=Symbol(\"attributes\"),B=Symbol(\"prev\"),k=Symbol(\"next\"),L=Symbol(\"child\"),ie=Symbol(\"parent\"),De=Symbol(\"host\"),ue=Symbol(\"data\"),je=Symbol(\"listeners\"),ir=Symbol(\"isTrusted\"),Je=Symbol(\"path\"),Qe=Symbol(\"stop_immediate_propagation\"),et=Symbol(\"dispatching\"),ve=Symbol(\"content\"),Y=Symbol(\"hooks\"),Xt=Symbol(\"extensions\"),Ve=Symbol(\"hooks_dispatch\"),Z=Symbol(\"is_connected\"),tt=Symbol(\"create_element\"),to=0,le=1,nt=2,rt=3,ot=8,ze=9,no=10,Me=11,U=\"http://www.w3.org/1999/xhtml\",fe=\"http://www.w3.org/2000/svg\",ro=\"http://www.w3.org/XML/1998/namespace\",St=\"http://www.w3.org/2000/xmlns/\";function Kt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function X(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function oo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function j(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var so=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,io=/[\\0\\t\\n\\f\\r />=]/u,ii=/[\\0\\t\\n\\f\\r />]/u;function Se(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function ao(t){so.test(t)||lr(t)}function ar(t){(t===\"\"||io.test(t))&&lr(t)}function Zt(t,e,n){let r=Se(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ii.test(i))||(n===\"element\"?!so.test(a):a===\"\"||io.test(a)))&&lr(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==ro)throw j(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==St)throw j(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===St&&o!==\"xmlns\"&&i!==\"xmlns\")throw j(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function lr(t){throw j(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Jt=0,Qt=1,lo=2,cr=3,ai=typeof performance>\"u\"?Date.now:performance.now.bind(performance),J=class{static NONE=Jt;static CAPTURING_PHASE=Qt;static AT_TARGET=lo;static BUBBLING_PHASE=cr;timeStamp=ai();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Jt;[Je]=[];[Qe]=!1;[et]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ir,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[ir]}composedPath(){return[...this[Je]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Qe]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function dr(t,e,n){if(t.cancelBubble)return;let o=e[je]?.get(t.type)?.[n===Qt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?lo:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(li,0,a)}if(t[Qe])break}}function li(t){throw t}var kt=[],en=new WeakMap;function tn(t,e){let n=en.get(t);n?n.push(e):en.set(t,[e]),kt[kt.length-1].push(t)}function Q(t){let e=[];kt.push(e);let n;try{n=t()}catch(r){kt.pop();try{co(e)}catch{}throw r}return kt.pop(),co(e),n}function co(t){let e,n=!1;for(let r of t){let o=en.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}en.delete(r)}}if(n)throw e}var nn=[],Ot=[],ur=!1;function Fe(t){for(let e of t)nn.push(e),e[1]&&Ot.push(e[1]);if(!ur){ur=!0;try{let e,n=!1;for(let r=0;r<nn.length;r++){let[o,s]=nn[r];s&&Ot.splice(Ot.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{nn.length=0,Ot.length=0,ur=!1}}}function At(t){let e=t;for(;e;){if(Ot.includes(e))return!0;e=e[ie]??e[De]}return!1}var Rt=Symbol(\"listenerRegistrations\"),Le=class{[je]=void 0;[Rt]=void 0;[F]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let a=fr(o),l=this[Rt];l||(l=new Map,this[Rt]=l);let c=l.get(e);c||(c={},l.set(e,c));let u=c[a];if(u||(u=new Map,c[a]=u),u.has(n))return;let w=this,d={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(d.normalizedListener=function(...f){if(d.signal?.aborted){rn(w,d);return}return d.once&&rn(w,d),typeof d.listener==\"object\"?d.listener.handleEvent(...f):d.listener.call(this,...f)});let p=this[je];p||(p=new Map,this[je]=p);let N=p.get(e);N||(N={},p.set(e,N));let v=N[a];if(v||(v=new Set,N[a]=v),u.set(n,d),v.add(d),i){let m=()=>{rn(w,d)};d.abortListener=m,i.addEventListener(\"abort\",m,{once:!0})}this[F]?.defaultView[Ve].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return ci.call(this,e,n,r)}dispatchEvent(e){if(e[et])throw j(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[et]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Je]=n;for(let s=n.length;s--;)if(dr(e,n[s],Qt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(dr(e,o[s],cr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[et]=!1,e.cancelBubble=!1,e[Qe]=!1,e.eventPhase=Jt,e.currentTarget=null,e[Je]=[]}}};function ci(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=fr(!!r),s=this[Rt]?.get(t)?.[o]?.get(e);s&&rn(this,s)}function fr(t){return t?\"capture\":\"bubble\"}function rn(t,e){let n=fr(e.capture),r=t[Rt],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[je],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[F]?.defaultView[Ve].removeEventListener?.(t,e.type,e.listener,e.capture))}var me=class extends Array{item(e){return this[e]??null}};var Pt=0,uo=1,hr=2,gr=3,_t=4,fo=0,mo=1,an=2,ln=3,po=4,pr=5,ho=6,go=7,on=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function di(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function ae(t){throw j(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function cn(t,e){let n=typeof e==\"string\"?It(e):[{combinator:_t,matchers:e}],r=null,o=t[L];return o&&n[0].matchers.length&&yr(o,n,s=>(r=s,!1)),r}function dn(t,e){let n=typeof e==\"string\"?It(e):[{combinator:_t,matchers:e}],r=new me,o=t[L];return o&&n[0].matchers.length&&yr(o,n,s=>{r.push(s)}),r}function It(t,e=!1,n=!1){let r={combinator:_t,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===\">\"?r.combinator=uo:l[1]===\"+\"?r.combinator=gr:l[1]===\"~\"?r.combinator=hr:r.combinator=Pt,r={combinator:_t,matchers:[]},o.push(r));let c=l[8]?X(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let w,d=l[4]??l[5]??l[7];if(l[2]){on.test(c)||ae(t);let p=l[5],N=p?.[0];if(l[3]==null&&(N==='\"'||N===\"'\")){let v=l[0].lastIndexOf(p);d=i.slice(l.index+v+1),s.lastIndex=i.length}else p!=null&&!on.test(p)&&ae(t);w=po}else l[6]?(on.test(c)||ae(t),w=l[6]===\"#\"?an:ln):l[8]?w=l[9]==null?pr:ho:l[7]===\"*\"?w=fo:l[7]&&on.test(l[7])?w=mo:ae(t);l[9]?([d,s.lastIndex]=di(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&ae(t),c===\"has\"&&e&&ae(t),It(d,e||c===\"has\",c===\"has\")):w===pr&&ae(t),r.matchers.push({type:w,name:c,value:d}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function ui(t,e){let n=It(e);return n[0]?.matchers.length?Ct(t,n):!1}function fi(t,e){let n=It(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Pt,s={type:go,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Pt,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===gr||o===hr?t[k]:t[L];if(!i)return!1;let a=!1;return yr(i,n,()=>(a=!0,!1),t),a}function yr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(Ct(s,e,r)&&n(s)===!1)return!1;let i=s[L];if(i){let a=s[k];a&&o.push(a),s=i;continue}}s=s[k]??o.pop()??null}return!0}function Ct(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===_t){if(!sn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Ct(t,a,n)}let s=r===uo||r===Pt?ie:B,i=t[s];if(!i)return!1;if(r===Pt||r===hr){for(;i;){if(oe(i)&&sn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Ct(i,a,n))return!0}i=i[s]}return!1}else{if(r===gr&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!sn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Ct(i,a,n)}}function mr(t,e){return t.getAttributeNS(null,t.namespaceURI===U?X(e):e)}function sn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(sn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case fo:return o===\"*\";case mo:return t.namespaceURI===U?t.localName===X(o):t.localName===o;case an:return mr(t,\"id\")===o;case ln:let i=mr(t,\"class\");return i?Kt(i).includes(o):!1;case po:let a=mr(t,o);return s==null?a!=null:a===s;case go:return t===n;case pr:ae(`:${o}`);case ho:switch(o){case\"has\":return fi(t,s||\"\");case\"not\":return!ui(t,s||\"\");default:ae(`:${o}(${s})`)}}return!1}function mi(t){return t.nodeType===nt}function Dt(t){return ue in t}function Er(t){return t.nodeType===rt}function pi(t){return t.nodeType===ot}function oe(t){return t.nodeType===le}function br(t){return t.nodeType===Me}function wo(t){return\"appendChild\"in t}function un(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let a=[];for(let l of Lt(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let c=l[Ee];if(c)for(let w of c)o.has(w)||(o.add(w),e.push(w));let u=l[ve];u&&!o.has(u)&&!r.has(u)&&(r.add(u),n.push(u))}s??=a}return{nodes:e,treeNodes:s}}function Mt(t,e){for(let n of t)n[F]=e}function yo(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[F]=e,r}function bo(t,e){if(Er(t))return e.createTextNode(t.data);if(pi(t))return e.createComment(t.data);if(mi(t))return yo(t,e);if(oe(t)){let n=e[tt](t[D],t.namespaceURI,t[_e],t.localName);if(t[Ee])for(let r=0;r<t[Ee].length;r++){let o=t[Ee].item(r);n.attributes.setNamedItem(yo(o,e))}return n}else{if(br(t))return e.createDocumentFragment();{let n=new t.constructor;return n[F]=e,n}}}function fn(t,e,n=t.ownerDocument){if(t.nodeType===ze)throw j(\"Cannot clone a document node\",\"NotSupportedError\");let r=bo(t,n);if(!e||!oe(t)&&!br(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,oe(i.source)&&i.source.namespaceURI===U&&i.source.localName===\"template\"){let u=i.source[ve];u&&(o.has(u)&&Eo(),o.add(u),i.contentSource=u,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&Eo(),o.add(a);let c=bo(a,n);oe(a)||br(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function Eo(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function mn(t,e){let n=String(e);return n===\"\"?null:cn(t,[{type:an,name:n}])}function pn(t,e){let n=[...new Set(Kt(String(e)))];return dn(t,n.map(r=>({type:ln,name:r})))}function hn(t,e){let n=String(e),r=X(n),o=[];for(let s of gn(t))oe(s)&&(n===\"*\"||(s.namespaceURI===U?s[D]===r:s[D]===n))&&o.push(s);return o}function gn(t){let e=[],n=[],r=t[L];for(;r;){e.push(r);let o=r[L],s=r[k];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Lt(t){let e=gn(t);return e.unshift(t),e}var pe=class extends Le{nodeType=to;[D]=\"\";[ie]=null;[De]=null;[L]=null;[B]=null;[k]=null;[Z]=!1;get[Y](){return this[F].defaultView[Ve]}get localName(){return this[D]}get nodeName(){return this[D]}get ownerDocument(){return this[F]}get isConnected(){return this[Z]}isDefaultNamespace(e){let n=Se(e);return hi(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[B]}set previousSibling(e){}get nextSibling(){return this[k]}set nextSibling(e){}get previousElementSibling(){let e=this[B];for(;e&&e.nodeType!==1;)e=e[B];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[k];for(;e&&e.nodeType!==1;)e=e[k];return e}set nextElementSibling(e){}get firstChild(){return this[L]}set firstChild(e){}get lastChild(){let e=this[L];for(;e;){let n=e[k];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Dt(this)?this.data:null}set nodeValue(e){Dt(this)&&(this.data=e)}get textContent(){if(Dt(this))return this.data;let e=\"\";for(let n of gn(this))Er(n)&&(e+=n.data);return e}set textContent(e){if(Dt(this))this.data=e;else if(wo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return fn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function hi(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(St,\"xmlns\");if(r!=null&&r.prefix==null)return Se(r.value);e=n.parentElement;break}case ze:e=e.documentElement;break;case no:case Me:return null;case nt:e=e.ownerElement;break;default:e=e.parentElement}return null}var he=Symbol(\"insertNode\"),xr=Symbol(\"preflightInsertions\"),yn=Symbol(\"replaceNode\"),He=class extends pe{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Be(e),r=this.parentNode;if(r)return wr(o=>{ke(r,n);let s=this[k];for(;s&&n.includes(s);)s=s[k];let i=Nr(r,n,o);this.parentNode===r?r[yn](i,this,o):r[he](i,s,o)})}before(...e){let n=Be(e),r=this.parentNode;if(r)return wr(o=>{ke(r,n);let s=this[B];for(;s&&n.includes(s);)s=s[B];let i=Nr(r,n,o);r[he](i,s?s[k]:r.firstChild,o)})}after(...e){let n=Be(e),r=this.parentNode;if(r)return wr(o=>{ke(r,n);let s=this[k];for(;s&&n.includes(s);)s=s[k];let i=Nr(r,n,o);r[he](i,s,o)})}};function wr(t){return Q(()=>{let e=[];try{t(e)}catch(n){try{Fe(e)}catch{}throw n}Fe(e)})}function Be(t){return t.map(e=>e instanceof pe?e:String(e))}function Ht(t,e){return e instanceof pe?e:t.ownerDocument.createTextNode(String(e))}function ke(t,e){for(let n of e){if(!(n instanceof pe))continue;let r=t;for(;r;){if(r===n)throw j(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ie]??r[De]}}}function Nr(t,e,n){let r=[];for(let s of e)r.push(Ht(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[xr](r);for(let s of r)o[he](s,null,n);return o}var bn,Tr=0,No=0,xo=0,To=0,st=!1,Sr=!1,$t=!1,En=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=gi(n),o=bn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Tr++:vr(i,-1),s.set(this,r),vr(r,1),this.#e.add(e)}disconnect(){let e=bn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Tr--,vr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Tr===0&&(bn=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function ge(t){let e=bn;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let a=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;a=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new me,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new me,target:t.target,type:t.type})}function wn(...t){let e=new me;return e.push(...t),e}function gi(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function vr(t,e){t.attributes&&(No+=e),t.characterData&&(xo+=e),t.childList&&(To+=e),st=No>0,Sr=xo>0,$t=To>0}var we=class extends He{childNodes=new me;children=new me;appendChild(e){return Q(()=>this[he](e,null))}insertBefore(e,n){return Q(()=>this[he](e,n||null))}append(...e){return Q(()=>{let n=Be(e.filter(r=>r!=null));n.length>1&&ke(this,n);for(let r of n)this[he](Ht(this,r),null)})}prepend(...e){return Q(()=>{let n=Be(e.filter(o=>o!=null));n.length>1&&ke(this,n);let r=this.firstChild;for(let o of n)this[he](Ht(this,o),r)})}replaceChildren(...e){return Q(()=>{let n=Be(e.filter(o=>o!=null));ke(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[he](Ht(this,o),null)})}removeChild(e){return Q(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw j(\"The node is not a child of this node\",\"NotFoundError\");let n=this[Z]?Lt(e):void 0,r=e[B],o=e[k],s=Nn(this,e);if(n)for(let i of n)i[Z]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Fe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return Q(()=>this[yn](e,n))}[yn](e,n,r){if(ke(this,[e]),n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[B],s=n[k],i=this.prepareInsertion(e),a=this[Z]?Lt(n):void 0,l=new Set(i.map(({node:d})=>d)),c=s;for(;c&&l.has(c);)c=c[k];let u=Nn(this,n);if(a){for(let p of a)p[Z]=!1;let d=new Set(a);for(let p of i)d.has(p.node)&&(p.shouldDisconnect=!1)}this.commitInsertion(i,c);let w=this[Z];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,w),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,u),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return dn(this,e)}querySelector(e){return cn(this,e)}[he](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[xr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ke(this,[e]),n&&n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[k]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[Z];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Fe(e)}prepareInsertion(e){let n=[];if(e.nodeType===Me){let i=e[L];for(;i;)n.push(i),i=i[k]}else n.push(e);let r=this[Z],o=this[F],s=[];for(let i of n){let a=i[Z],l=a||r,c,u;if(i[F]===o)l&&(c=Lt(i));else{let w=un(i);u=w.nodes,l&&(c=w.treeNodes)}s.push({node:i,nodes:c,adoption:u,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[B],l=s.node[k];s.source={parent:i,index:Nn(i,s.node),previousSibling:a,nextSibling:l}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[F];for(let{adoption:s}of e)s&&Mt(s,r);let o=this[Z];for(let{nodes:s}of e)if(s)for(let i of s)i[Z]=o}attachChild(e,n){if(n){let s=n[B];e[k]=n,e[B]=s,s?s[k]=e:this[L]=e,n[B]=e}else{e[k]=null;let s=this[L];if(s){let i;for(;i=s[k];)s=i;s[k]=e,e[B]=s}else this[L]=e,e[B]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[k];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[B],nextSibling:e[k]}}queueRemovalMutationRecord(e,n,r,o){$t&&ge({type:\"childList\",target:e,removedNodes:wn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if($t)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ge({type:\"childList\",target:this,addedNodes:wn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||At(this)?[]:[[()=>this[Y].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!At(s.parent)&&n.push([()=>s.parent[Y].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!At(this)&&n.push([()=>this[Y].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){So(e,n)}};function vo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[Z]?n.treeNodes:void 0,s=e[B],i=e[k],a=Nn(t,e);if(o)for(let c of o)c[Z]=!1;Mt(n.nodes,r),$t&&ge({type:\"childList\",target:t,removedNodes:wn(e),previousSibling:s,nextSibling:i}),o&&So(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!At(t)&&l.push([()=>t[Y].removeChild?.(t,e,a)]),Fe(l)}function Nn(t,e){let n=e[B],r=e[k];n?n[k]=r:t[L]=r,r&&(r[B]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[k]=null,e[B]=null,o}function So(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&tn(n,()=>r.call(n))}}function Ut(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||tn(t,()=>i.call(t,e,n,r,o))}var xn=class{[L]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][M]===U?X(n):n,o=this[L];for(;o;){if(o.name===r)return o;o=o[k]}return null}getNamedItemNS(e,n){let r=Se(e),o=String(n),s=this[L];for(;s;){if(s.localName===o&&s[M]===r)return s;s=s[k]}return null}item(e){let n=this[L],r=0;for(;n;){if(r++===e)return n;n=n[k]}return null}get length(){let e=0,n=this[L];for(;n;)e++,n=n[k];return e}removeNamedItem(e){let n=String(e),r=this[se][M]===U?X(n):n;return Q(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=Se(e),o=String(n);return Q(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[M]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[L],o=null;for(;r!=null;){if(e(r)){o&&(o[k]=r[k]),this[L]===r&&(this[L]=r[k]);let s=r.value;return r[k]=null,r[se]=null,st&&ge({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[M],oldValue:s}),n[Y].removeAttribute?.(n,r.name,r[M]),Ut(n,r.localName,s,null,r[M]),r}o=r,r=r[k]}return null}setNamedItem(e){return Q(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw j(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[L],i=null;for(;s;){if(s.localName===e.localName&&s[M]===e[M]){if(s===e)return s;i?i[k]=e:this[L]=e,e[k]=s[k],s[k]=null,o=s;break}i=s,s=s[k]}o==null&&(i?i[k]=e:this[L]=e),e[se]=n,e[F]=n[F],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&st&&ge({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[M],oldValue:o?.value??null}),l&&n[Y].removeAttribute?.(n,o.name,o[M]),(a||l)&&n[Y].setAttribute?.(n,e.name,e.value,e[M]),a&&Ut(n,e.localName,o?.value??null,e.value,e[M]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[L];for(;e;)yield e,e=e[k]}};var Ye=class extends pe{nodeType=nt;[M]=null;[k]=null;[se]=null;constructor(e,n,r){super(),this[D]=e,this[Ie]=n,r&&(this[M]=r)}get nodeName(){return this[D]}set nodeName(e){}get name(){return this[D]}set name(e){}get localName(){if(this[M]==null)return this[D];let e=this[D].indexOf(\":\");return e<0?this[D]:this[D].slice(e+1)}get prefix(){if(this[M]==null)return null;let e=this[D].indexOf(\":\");return e<0?null:this[D].slice(0,e)}get value(){return this[Ie]}set value(e){let n=String(e),r=this[se];if(!r){this[Ie]=n;return}Q(()=>{let o=this[Ie];this[Ie]=n,st&&o!==n&&ge({type:\"attributes\",target:r,attributeName:this[D],attributeNamespace:this[M],oldValue:o}),this[Y].setAttribute?.(r,this[D],n,this[M]),Ut(r,this.localName,o,n,this[M])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[M]}get specified(){return!0}};var yi={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},bi=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Ei=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Ao=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,wi=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",Ni=/^(?:color|face|size)$/i;function ko(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return yi[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Ro(t){return t.namespaceURI===U&&bi.has(t.localName)}function Oo(t){let e=t.localName;return t[M]===fe&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function xi(t,e){if(wi.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(Ao))if(Ni.test(n[1]))return!0;return!1}function Tn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Ei)){let a=i[1];if(a){let l=i[2],c=X(a),u=o[o.length-1]?.element??e,w=u[M]===fe?fe:U;if(c===\"svg\")w=fe;else if(w===fe){if(Oo(u))w=U;else if(xi(c,l)){for(;o.length>0;){let N=o[o.length-1];if(N.element[M]!==fe||Oo(N.element))break;o.pop(),s=N.target}w=U}}let d=w===U?c:a,p=n[tt](d,w,null,d);for(let N of l.matchAll(Ao))p.setAttribute(N[1],ko(N[3]||N[4]||\"\"));if(s.append(p),Ro(p)||w!==U&&i[4])continue;o.push({element:p,target:s}),s=w===U&&c===\"template\"?p.content:p}else if(i[5]){let l=X(i[5]);for(let c=o.length-1;c>=0;c--){let u=o[c],w=X(u.element[D]);if(w===l){s=u.target,o.length=c;break}if(u.element[M]===U&&w===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(ko(i[7]))}return r}function vn(t){return Po([{type:\"content\",child:t[L]}])}function Co(t){return Po([{type:\"opening\",node:t}])}function Po(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case le:{let o=r;e.push(`<${o[D]}`);let s=o[Ee]?.[L];for(;s;){e.push(` ${s[D]}`);let a=s[Ie];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[k]}if(e.push(\">\"),Ro(o))break;let i=o.namespaceURI===U&&o.localName===\"template\"?o[ve]:o;t.push({type:\"closing\",name:o[D]}),t.push({type:\"content\",child:i?.[L]??null});break}case rt:{let o=r;e.push(o[ue].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case ot:{let o=r;e.push(`<!--${o[ue]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[k]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var K=class extends we{nodeType=le;[M]=U;[_e]=null;get namespaceURI(){return this[M]}get prefix(){return this[_e]}get localName(){let e=this[_e];return e==null?this[D]:this[D].slice(e.length+1)}get nodeName(){return this[M]===U?oo(this[D]):this[D]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ye(\"slot\",n))}get attributes(){let e=this[Ee];return e||(e=new xn(this),this[Ee]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return hn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return pn(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);ar(r);let s=this[M]===U?X(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ye(s,o))}setAttributeNS(e,n,r){let o=Se(e),s=String(n),i=String(r),a=Zt(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new Ye(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);ar(r);let o=this[M]===U?X(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Ye(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[M]===U?X(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Co(this)}get innerHTML(){return vn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Tn(String(e),this);this.replaceChildren(n)}}};var it=class t extends K{[M]=fe;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var $e=class extends He{[ue]=\"\";constructor(e){super(),this[ue]=e==null?\"\":String(e)}setData(e){let n=Sr,r=n?this[ue]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[ue]=o,n&&r!==o&&ge({type:\"characterData\",target:this,oldValue:r}),this[Y].setText?.(this,o)}get data(){return this[ue]}set data(e){this.setData(e)}};var at=class extends $e{nodeType=rt;[D]=\"#text\"};var lt=class extends $e{nodeType=ot;[D]=\"#comment\"};var ct=class extends we{nodeType=Me;[D]=\"#document-fragment\";[F]=typeof window<\"u\"?window.document:null;getElementById(e){return mn(this,e)}};var dt=class extends K{get content(){let e=this[ve];return e||(e=this.ownerDocument.createDocumentFragment(),e[De]=this,this[ve]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Tn(String(e),this))}get innerHTML(){let e=this[ve];return e?vn(e):\"\"}};var Sn=class extends K{};var kn=class extends K{};var On=class extends K{};var Gt=class extends we{nodeType=ze;[D]=\"#document\";[Z]=!0;constructor(e){super(),this.defaultView=e,this[F]=this,this.documentElement=Rn(new On,this,\"html\"),this.body=Rn(new Sn,this,\"body\"),this.head=Rn(new kn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return pn(this,e)}createElement(e){let n=String(e);return ao(n),kr(this,X(n))}createElementNS(e,n){let r=Zt(e,n,\"element\");return kr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[tt](e,n,r,o){return kr(this,e,n,r,o)}createTextNode(e){let n=An(new at(e),this);return this[Y].createText?.(n,n.data),n}createComment(e){return An(new lt(e),this)}createDocumentFragment(){return An(new ct,this)}createEvent(){return new J(\"\")}getElementById(e){return mn(this,e)}getElementsByTagName(e){return hn(this,e)}importNode(e,n){if(e.nodeType===ze)throw j(\"Cannot import a document node\",\"NotSupportedError\");return fn(e,n,this)}adoptNode(e){if(e[F]===this)return e;let n=un(e);return Q(()=>{let r=e.parentNode;return r?vo(r,e,n,this):Mt(n.nodes,this),e})}};function An(t,e){return Object.defineProperty(t,F,{value:e,writable:!0,enumerable:!1}),t}function kr(t,e,n=U,r=null,o=e){let s;if(n===fe)s=new it;else if(n===U&&o===\"template\")s=new dt;else if(n===U){let i=t.defaultView.customElements.get(o);s=i?new i:new K}else s=new K;return Rn(s,t,e,n,r)}function Rn(t,e,n,r=U,o=null){return An(t,e),Object.defineProperties(t,{[D]:{value:n},[M]:{value:r},[_e]:{value:o}}),e[Y].createElement?.(t,r),t}var Cn=class extends J{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Pn=class extends J{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var _n=class extends J{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var In=class extends J{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Dn=class extends J{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Mn=class extends J{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Ln=class extends K{};var Ti=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,vi=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function _o(t){return Ti.test(t)&&!vi.has(t)}function Io(t){return j(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Hn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!_o(e))throw Io(e);if(this.registry.has(e))throw j(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw j(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!_o(e))return Promise.reject(Io(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var Si=[\"onerror\",\"onunhandledrejection\"],Mo=Symbol.for(\"@remote-dom/polyfill/global-property\");function Lo(t){return Object.getOwnPropertyDescriptors(t)}function Ho(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Le.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Or(r.value.bind(t)),e[n]=r);return e}function $o(t){let e={};for(let n of Si)e[n]={configurable:!0,enumerable:!0,get:Or(()=>t[n]),set:Or(r=>{t[n]=r})};return e}function ki(t){return Object.assign(Lo(t),Ho(t),$o(t))}function Or(t){return Object.defineProperty(t,Mo,{value:!0}),t}function Do(t,e){for(let n of Reflect.ownKeys(e)){let r=Oi(t,n);(r==null||Ai(r))&&Object.defineProperty(t,n,e[n])}}function Oi(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ai(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Mo]===!0)}var We=class extends Le{[Y]={};[Xt]=[];[Ve]=Ci(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Gt(this);customElements=new Hn;location=globalThis.location;navigator=globalThis.navigator;Event=J;ErrorEvent=Pn;PromiseRejectionEvent=_n;ToggleEvent=In;FocusEvent=Dn;ClipboardEvent=Mn;EventTarget=Le;CustomEvent=Cn;Node=pe;ParentNode=we;ChildNode=He;DocumentFragment=ct;Document=Gt;CharacterData=$e;Comment=lt;Text=at;Element=K;HTMLElement=Ln;SVGElement=it;HTMLTemplateElement=dt;MutationObserver=En;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Ri(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Lo(e),s=Object.assign(Ho(e),$o(e));delete o.self,Object.defineProperties(globalThis,o),Do(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Do(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,ki(e))}};function Ri(t,e){t[Xt].push(e(t)??{})}function Ci(t){return{createElement:Oe.bind(null,t,\"createElement\"),setAttribute:Oe.bind(null,t,\"setAttribute\"),removeAttribute:Oe.bind(null,t,\"removeAttribute\"),createText:Oe.bind(null,t,\"createText\"),setText:Oe.bind(null,t,\"setText\"),insertChild:Oe.bind(null,t,\"insertChild\"),removeChild:Oe.bind(null,t,\"removeChild\"),addEventListener:Oe.bind(null,t,\"addEventListener\"),removeEventListener:Oe.bind(null,t,\"removeEventListener\")}}function Oe(t,e,...n){for(let s of t[Xt])s[e]?.apply(s,n);let r=t[Y];r[e]?.apply(r,n)}var $n=new We;var Ar=\"~\";var Ue=new WeakMap;function ut(t){return Ue.get(t)}var _r=new WeakMap,_i=0;function ce(t){let e=_r.get(t);return e==null&&(e=String(_i++),Un(t,e)),e}function Un(t,e){_r.set(t,e)}var Cr=new WeakMap;function Ii(t){return Cr.get(t)}var Pr=new WeakMap;function Di(t){let e=Pr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Mi=new WeakMap;function Li(t){return Mi.get(t)}function Ir(t,e,n){let r=Cr.get(t);if(r==null&&(r={},Cr.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=Pr.get(t);if(r==null&&(r={},Pr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function ft(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ft(t.childNodes[r],e)}function Gn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Gn(t.childNodes[n])}function mt(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Rr(Ii(t)),attributes:Rr(Di(t)),eventListeners:Rr(Li(t)),children:Array.from(t.childNodes).map(mt)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Rr(t){return t?{...t}:void 0}function Dr(t,e,...n){let r=_r.get(t),o=Ue.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var pt=$n[Y];pt.insertChild=(t,e,n)=>{let r=ut(t);r!=null&&(ft(e,r),r.mutate([[0,ce(t),mt(e),n]]))};pt.removeChild=(t,e,n)=>{let r=ut(t);r!=null&&(Gn(e),r.mutate([[1,ce(t),n]]))};pt.setText=(t,e)=>{let n=ut(t);n?.mutate([[2,ce(t),e]])};pt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ge(t,e,n)};pt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ge(t,e)};We.setGlobal($n);var jo=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],Vo=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],zo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Fo=[\"TEMPORARY\",\"PERSISTENT\"],nu=Object.freeze([...jo,...Vo,...zo,...Fo]),ru=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Go=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Bo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...jo,...Vo,...zo,...e,\"constructor\",Symbol.toStringTag]),i=(y,E)=>{let H=Reflect.getOwnPropertyDescriptor(y,E);return H===void 0||!(\"value\"in H)||H.writable||H.configurable?!1:n.primitivesStay&&typeof E==\"symbol\"&&(typeof H.value!=\"object\"||H.value===null)&&typeof H.value!=\"function\"?!0:Fo.includes(E)&&typeof H.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,u=a.crypto,w=(y,E)=>function(H,h,...I){if(typeof H!=\"function\")throw new TypeError(`${E} takes a function: a guest view cannot run code from text`);return y.call(t,H,h,...I)},d=u?Object.freeze({getRandomValues:y=>u.getRandomValues(y)}):void 0,p=a.document?.defaultView;if(p&&p!==a)for(let y of Reflect.ownKeys(p))typeof y==\"symbol\"||s.has(y)||Reflect.deleteProperty(p,y)||o.push(`window.${y}`);let N=[];for(let y=t;y&&y!==Object.prototype;y=Object.getPrototypeOf(y))N.push(y);for(let y of N)for(let E of Reflect.ownKeys(y))s.has(E)||(Reflect.deleteProperty(y,E)?r.push(Go(E)):i(y,E)||o.push(Go(E)));let v=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},m=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let y of m){let E=v();Object.defineProperty(E,\"prototype\",{value:y,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(y,\"constructor\",{value:E,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),y===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:E,writable:!0,enumerable:!1,configurable:!0})}let f=(y,E)=>{Reflect.defineProperty(t,y,{value:E,writable:!0,enumerable:!0,configurable:!0})||o.push(y)};f(\"setTimeout\",w(l,\"setTimeout\")),f(\"setInterval\",w(c,\"setInterval\")),d&&f(\"crypto\",d);for(let y of N.slice(1))Object.freeze(y);for(let y of Reflect.ownKeys(t)){let E=Reflect.getOwnPropertyDescriptor(t,y);Reflect.defineProperty(t,y,\"value\"in E?{...E,writable:!1,configurable:!1}:{...E,configurable:!1})}let b;try{b=Reflect.preventExtensions(t)}catch{b=!1}return{removed:r,stuck:o,sealed:b}}var jt=class extends HTMLElement{constructor(){super(),Un(this,Ar)}connect(e){if(ut(this)===e||(ft(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,Ar,mt(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Ir(this,e,n)}callRemoteMethod(e,...n){return Dr(this,e,...n)}};var x={},jn={empty:!0},Hi={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},ht={div:x,section:x,article:x,aside:x,header:x,footer:x,nav:x,hgroup:x,search:x,address:x,figure:x,figcaption:x,blockquote:x,p:x,pre:x,hr:jn,br:jn,wbr:jn,h1:x,h2:x,h3:x,h4:x,h5:x,h6:x,span:x,strong:x,em:x,b:x,i:x,u:x,s:x,small:x,mark:x,abbr:x,cite:x,q:x,code:x,kbd:x,samp:x,var:x,sub:x,sup:x,dfn:x,bdi:x,bdo:x,ruby:x,rt:x,rp:x,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:x,menu:x,dl:x,dt:x,dd:x,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:x,caption:x,thead:x,tbody:x,tfoot:x,tr:x,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:x,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:x,output:x,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":jn},$i=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Ui={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries($i.map(t=>[t,\"css\"]))},Ae={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Vn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Yo={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Wo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},ye={...Ae,in:\"text\",result:\"text\"},qo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},zn={svg:{attributes:{...Ae,...Vn}},g:x,defs:x,symbol:{attributes:{...Ae,...Vn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Ae,href:\"fragment\"}},title:x,desc:x,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Ae,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...qo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...qo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Ae,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Ae,...Vn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Vn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:x,filter:{attributes:{...Ae,filterUnits:Yo,primitiveUnits:Yo}},feBlend:{attributes:{...ye,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...ye,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:ye},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...ye,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...ye,in2:\"text\",scale:\"number\",xChannelSelector:Wo,yChannelSelector:Wo}},feDropShadow:{attributes:{...ye,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:ye},feGaussianBlur:{attributes:{...ye,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:ye},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...ye,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...ye,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Ae,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var Xo=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],Ko=[\"region\"],Vt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Fn={section:[\"aria-label\",\"title\"]},Zo=[\"aria-labelledby\",\"aria-describedby\"];function Gi(t){return/^aria-[a-z]+$/.test(t)}function ji(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Jo=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"mask-origin\",\"mask-clip\",\"mask-composite\",\"mask-mode\",\"mask-type\",\"-webkit-mask\",\"-webkit-mask-image\",\"-webkit-mask-size\",\"-webkit-mask-position\",\"-webkit-mask-repeat\",\"-webkit-mask-origin\",\"-webkit-mask-clip\",\"-webkit-mask-composite\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"-webkit-text-stroke\",\"-webkit-text-stroke-width\",\"-webkit-text-stroke-color\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"animation-timeline\",\"animation-range\",\"animation-range-start\",\"animation-range-end\",\"scroll-timeline\",\"scroll-timeline-name\",\"scroll-timeline-axis\",\"view-timeline\",\"view-timeline-name\",\"view-timeline-axis\",\"view-timeline-inset\",\"timeline-scope\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Qo=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\",\"scroll\",\"view\"],es=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],ts=[\"media\",\"supports\",\"container\",\"keyframes\"],ns={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},rs=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],os=[\"-webkit-details-marker\"],Bn=64e3,Mr=4e3,ss=1e5,zt=512e3,Lr=1e4,is=\"http://www.w3.org/1999/xhtml\",as=\"http://www.w3.org/2000/svg\",Vi=new Map(Object.keys(zn).map(t=>[t.toLowerCase(),t]));function Yn(t){return Vi.get(t.toLowerCase())}function Wn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[ht[e]?.attributes,Hi]:[zn[e]?.attributes,Ui],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(Gi(r)||ji(r))return{name:r,kind:\"text\"}}function ls(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var cs=[\"wheel\",\"drag\",\"pinch\"];var ds=\"~\",qn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ne=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>Ne(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Ne(r,e+1)]))};function us(){let t=new Map,e=new Map,n=new Map([[ds,{children:[],listeners:new Map}]]),r=0,o=c=>{let u=e.get(c);return u===void 0&&(u=r+=1,e.set(c,u),t.set(u,{listener:c,count:0})),t.get(u).count+=1,u},s=c=>{let u=t.get(c);u&&(u.count-=1,!(u.count>0)&&(t.delete(c),e.delete(u.listener)))},i=c=>{let u=n.get(c);if(u){n.delete(c);for(let w of u.listeners.values())s(w);for(let w of u.children)i(w)}},a=(c,u,w=0)=>{if(!qn(c)||w>64)return Ne(c);let d=typeof c.id==\"string\"?c.id:void 0,p=u&&d!==void 0&&d!==ds;p&&i(d);let N={children:[],listeners:new Map};p&&n.set(d,N);let v={};for(let[m,f]of Object.entries(c))m===\"children\"&&Array.isArray(f)?v[m]=f.map(b=>{let y=a(b,p,w+1);return p&&qn(b)&&typeof b.id==\"string\"&&N.children.push(b.id),y}):m===\"eventListeners\"&&qn(f)?v[m]=Object.fromEntries(Object.entries(f).map(([b,y])=>{if(typeof y!=\"function\"||!p)return[b,void 0];let E=o(y);return N.listeners.set(b,E),[b,{listener:E}]})):v[m]=Ne(f,w+1);return v},l=c=>{if(!Array.isArray(c))return Ne(c);let[u,w]=c,d=typeof w==\"string\"?n.get(w):void 0;if(u===0){let p=a(c[2],d!==void 0),N=qn(c[2])?c[2].id:void 0;if(d&&typeof N==\"string\"&&n.has(N)){let v=Number(c[3]);d.children.splice(Number.isInteger(v)&&v>=0&&v<=d.children.length?v:d.children.length,0,N)}return[u,Ne(w),p,Ne(c[3])]}if(u===1){let p=Number(c[2]);return d&&Number.isInteger(p)&&p>=0&&p<d.children.length&&i(d.children.splice(p,1)[0]),Ne(c)}if(u===3&&c[4]===3){let p=String(c[2]),N=c[3],v=d&&typeof N==\"function\"?o(N):void 0,m=d?.listeners.get(p);return m!==void 0&&s(m),v===void 0?d?.listeners.delete(p):d.listeners.set(p,v),[u,Ne(w),p,v===void 0?void 0:{listener:v},3]}return Ne(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Hr=\"graview-view-root\",zi=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Fi=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),Bi=t=>Object.freeze({html:t,toString:()=>t}),fs=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),ms=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(ms).join(\"\"):fs(t)?t.html:Fi(String(t));function ps(t){customElements.get(Hr)||customElements.define(Hr,jt);let e=Event,n=us(),r=new Set,o=new Set,s,i=[],a=new Set;for(let g of[\"closest\",\"matches\",\"dataset\"]){let S=()=>{throw new TypeError(`A view's element has no ${g}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};g in Element.prototype||Object.defineProperty(Element.prototype,g,g===\"dataset\"?{get:S}:{value:S})}let l=document.createElement(Hr),c=g=>{let S=A=>{for(let _ of Array.from(A.childNodes)){if(_.nodeType!==1)continue;if(ce(_)===g)return _;let P=S(_);if(P)return P}};return S(l)},u=g=>{let S=c(g.target);if(!S)return;let A=new e(g.event,{bubbles:!0}),_={};for(let P of zi)g[P]!==void 0&&(_[P]=g[P]);for(let P of Object.keys(_))Object.defineProperty(A,P,{value:_[P],enumerable:!0});S.dispatchEvent(A);for(let P of o){if(P.type!==g.event)continue;let G;try{G=new Set(Array.from(l.querySelectorAll(P.selector)))}catch{continue}for(let re=S;re&&re!==l;re=re.parentNode)if(G.has(re)){P.listener(Object.freeze({type:g.event,target:S,element:re,..._}));break}}},w=g=>{if(g.type===\"dom-event\"&&typeof g.target==\"string\")return u(g);if(g.type===\"notice\")return t.warn(g.text);if(g.type!==\"props\")return;s=g.props;let S=t.now();for(let P of r)try{P(g.props)}catch(G){t.threw(G)}let A=t.now()-S,_=g.push;typeof _==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:_,ms:A})))},d;l.connect({mutate(g){d||(d=[],t.microtask(()=>{let S=d??[];d=void 0,t.send({type:\"render\",records:n.encode(S)})})),d.push(...g)},call:()=>{}});let p=g=>g.nodeType===1?g.getAttribute(\"data-key\")??g.getAttribute(\"id\"):null,N=(g,S)=>g.nodeType===S.nodeType&&(g.nodeType!==1||g.localName===S.localName&&g.namespaceURI===S.namespaceURI&&p(g)===p(S));function v(g,S){let A=Array.from(S.childNodes),_=0;for(let P of A){let G=g.childNodes[_]??null;if(G&&N(G,P)){m(G,P),_+=1;continue}if(p(P)!==null){let Pe=Array.from(g.childNodes).slice(_+1).find(vt=>N(vt,P));if(Pe){g.insertBefore(Pe,G),m(Pe,P),_+=1;continue}}g.insertBefore(P,G),_+=1}for(;g.childNodes.length>_;)g.removeChild(g.lastChild)}function m(g,S){if(g.nodeType!==1){g.data!==S.data&&(g.data=S.data);return}let A=g,_=S,P=f(A);for(let G of A.getAttributeNames())_.hasAttribute(G)||(A.removeAttribute(G),P&&Ge(A,G,void 0));for(let G of _.getAttributeNames()){let re=_.getAttribute(G);A.getAttribute(G)!==re&&A.setAttribute(G,re),P&&Ge(A,G,re)}v(A,_)}let f=g=>g.localName.includes(\"-\");function b(g){for(let S of Array.from(g.childNodes)){if(S.nodeType!==1)continue;let A=S;if(f(A))for(let _ of A.getAttributeNames())Ge(A,_,A.getAttribute(_)??void 0);b(A)}}function y(g,S,A){for(let _ of Array.from(g.childNodes)){if(_.nodeType!==1)continue;let P=_,G=P.localName,re=S||G.toLowerCase()===\"svg\",Pe=re?Yn(G):Object.prototype.hasOwnProperty.call(ht,G.toLowerCase())?G.toLowerCase():void 0;if(!Pe){A.add(`<${G}>`);continue}for(let vt of P.getAttributeNames())(!Wn(re?\"svg\":\"html\",Pe,vt)||!re&&Fn[Pe]?.includes(vt.toLowerCase()))&&A.add(`${Pe} ${vt}`);y(P,re,A)}}function E(g){let S=document.createElement(\"div\"),A=Array.isArray(g)?g:[g];for(let P of A)if(P!=null)if(typeof P==\"string\"||fs(P)){let G=document.createElement(\"div\");G.innerHTML=typeof P==\"string\"?P:P.html,S.append(...Array.from(G.childNodes))}else S.append(P);let _=new Set;y(S,!1,_),i=[..._],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),b(S),v(l,S)}let H=[],h=new Set(cs),I=\"[]\",R=!1,C=()=>{R||(R=!0,t.microtask(()=>{R=!1;let g=[...new Map([...o].filter(A=>h.has(A.type)).map(A=>[`${A.type} ${A.selector}`,{event:A.type,selector:A.selector}])).entries()].sort(([A],[_])=>A<_?-1:A>_?1:0).map(([,A])=>A),S=JSON.stringify(g);S!==I&&(I=S,t.send({type:\"gestures\",bound:g}))}))},O=\"[]\",T=!1,V=()=>{T||(T=!0,t.microtask(()=>{T=!1;let g=[...new Set([...o].filter(A=>A.type===\"click\"&&typeof A.selector==\"string\").map(A=>A.selector))].sort().slice(0,200),S=JSON.stringify(g);S!==O&&(O=S,t.send({type:\"clicks\",selectors:g}))}))};return{view:Object.freeze({get props(){return s},onProps(g){return r.add(g),s&&g(s),()=>void r.delete(g)},render:E,style(g){typeof g!=\"string\"||H.includes(g)||(H.push(g),t.send({type:\"style\",sheets:[...H]}))},on(g,S,A){let _={type:g,selector:S,listener:A};return o.add(_),typeof g==\"string\"&&!a.has(g)&&(a.add(g),t.send({type:\"hears\",events:[g]})),h.has(g)&&C(),g===\"click\"&&V(),()=>{o.delete(_),h.has(g)&&C(),g===\"click\"&&V()}},act:(g,S={})=>t.act(g,S),navigate(g){if(typeof g==\"string\")return t.navigate(g);let S=ls(g);S&&t.send(S)},html(g,...S){return Bi(g.reduce((A,_,P)=>A+_+(P<S.length?ms(S[P]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:w,find:g=>{try{let S=l.querySelectorAll(g)[0];return S?ce(S):void 0}catch{return}},listened:g=>{let S=new Set;for(let A of o)if(A.type===g)try{for(let _ of Array.from(l.querySelectorAll(A.selector))){let P=ce(_);P&&S.add(P)}}catch{}return[...S]}}}var hs=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Ft(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=hs(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&hs(s.title)===o):void 0)}var xe=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,gt=\" This run was not handed the views the host keeps, so a titled view's place is not among these: if it names one, the link goes there.\",Bt=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var gs=[\"https:\",\"mailto:\",\"tel:\"];function ys(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!gs.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function bs(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=ys(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function Es(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function ws(t,e){let n=ys(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&Es(e.origins).includes(new URL(n).origin)))return n}function Ns(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!gs.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=Es(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}var ee=t=>t>=48&&t<=57,xs=t=>ee(t)||t>=65&&t<=70||t>=97&&t<=102,zr=t=>t>=65&&t<=90||t>=97&&t<=122,Fr=t=>t>=128,Xn=t=>zr(t)||Fr(t)||t===95,Ts=t=>Xn(t)||ee(t)||t===45,vs=t=>t===10,Re=t=>t===10||t===9||t===32,Yi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,be=-1;function Wi(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function qi(t){let e=Wi(t),n=0,r=(m=0)=>n+m<e.length?e[n+m]:be,o=[],s=(m,f)=>m===92&&f!==10&&f!==be,i=(m,f,b)=>m===45?Xn(f)||f===45||s(f,b):Xn(m)?!0:s(m,f),a=(m,f,b)=>m===43||m===45?ee(f)||f===46&&ee(b):ee(m===46?f:m),l=()=>{let m=r();if(n+=1,m===be)return 65533;if(xs(m)){let f=String.fromCodePoint(m);for(;f.length<6&&xs(r());)f+=String.fromCodePoint(r()),n+=1;Re(r())&&(n+=1);let b=parseInt(f,16);return b===0||b>=55296&&b<=57343||b>1114111?65533:b}return m},c=()=>{let m=\"\";for(;;){let f=r();if(Ts(f))m+=String.fromCodePoint(f),n+=1;else if(s(f,r(1)))n+=1,m+=String.fromCodePoint(l());else return m}},u=()=>{let m=\"\";for((r()===43||r()===45)&&(m+=String.fromCodePoint(e[n++]));ee(r());)m+=String.fromCodePoint(e[n++]);if(r()===46&&ee(r(1)))for(m+=String.fromCodePoint(e[n++],e[n++]);ee(r());)m+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ee(r(1))||(r(1)===43||r(1)===45)&&ee(r(2))))for(m+=String.fromCodePoint(e[n++]),ee(r())||(m+=String.fromCodePoint(e[n++]));ee(r());)m+=String.fromCodePoint(e[n++]);return m},w=()=>{let m=u();return i(r(),r(1),r(2))?{type:\"dimension\",repr:m,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:m}):{type:\"number\",repr:m}},d=()=>{for(;;){let m=r();if(n+=1,m===41||m===be)return;s(m,r())&&l()}},p=()=>{let m=\"\";for(;Re(r());)n+=1;for(;;){let f=r();if(n+=1,f===41)return{type:\"url\",value:m};if(f===be)return{type:\"url\",value:m};if(Re(f)){for(;Re(r());)n+=1;return r()===41||r()===be?(r()===41&&(n+=1),{type:\"url\",value:m}):(d(),{type:\"bad-url\"})}if(f===34||f===39||f===40||Yi(f))return d(),{type:\"bad-url\"};if(f===92){if(s(f,r()))m+=String.fromCodePoint(l());else return d(),{type:\"bad-url\"};continue}m+=String.fromCodePoint(f)}},N=()=>{let m=c();if(m.toLowerCase()===\"url\"&&r()===40){for(n+=1;Re(r())&&Re(r(1));)n+=1;let f=Re(r())?r(1):r();return f===34||f===39?{type:\"function\",value:m}:p()}return r()===40?(n+=1,{type:\"function\",value:m}):{type:\"ident\",value:m}},v=m=>{let f=\"\";for(;;){let b=r();if(n+=1,b===m||b===be)return{type:\"string\",value:f};if(vs(b))return n-=1,{type:\"bad-string\"};if(b===92){if(r()===be)continue;if(vs(r())){n+=1;continue}f+=String.fromCodePoint(l());continue}f+=String.fromCodePoint(b)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==be&&!(r()===42&&r(1)===47);)n+=1;r()!==be&&(n+=2)}let m=r();if(m===be)return o;if(Re(m)){for(;Re(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,m){case 34:case 39:o.push(v(m));continue;case 35:if(Ts(r())||s(r(),r(1))){let f=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:f})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(m,r(),r(1))?(n-=1,o.push(w())):o.push({type:\"delim\",value:String.fromCodePoint(m)});continue;case 44:o.push({type:\",\"});continue;case 45:a(m,r(),r(1))?(n-=1,o.push(w())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(m,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(m,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:ee(m)?(n-=1,o.push(w())):Xn(m)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(m)})}}}var Rs={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Cs=32,Ur=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Ps(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Ss(t,Rs[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Ss(t,\")\",e+1)}:n}function Ss(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Cs){t.next(),r.push({type:\"bad-string\"});continue}r.push(Ps(t,n))}}function yt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){l=c.value;break}a.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function Br(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let a=t[i];if(a.type===\";\"||a.type===\"block\"&&a.open===\"{\")return i+1}return t.length})();e.push(...yt(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let a=_s(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((c,u)=>u>n&&c.type===\"block\"&&c.open===\"{\");e.push(...yt(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...yt(t.slice(n,o+1),!1)),n=o+1}return e}function _s(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Yr(t){let e=new Ur(qi(t)),n=[];for(;e.peek();)n.push(Ps(e,0));return n}function Kn(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&ee(r)||o===1&&ee(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Fr(r)||r===45||r===95||ee(r)||zr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Zn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Fr(r)||r===45||r===95||ee(r)||zr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Gr(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function Xi(t){let e=Zn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Zn(t.slice(1))}`:e}var ks=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function Ki(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function Zi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Kn(t.value);case\"at-keyword\":return`@${Kn(t.value)}`;case\"hash\":return`#${Zn(t.value)}`;case\"string\":return Gr(t.value);case\"url\":return`url(${Gr(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${Xi(t.unit)}`;case\"func\":return`${Kn(t.name)}(${bt(t.value)})`;case\"block\":return`${t.open}${bt(t.value)}${Rs[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function bt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Ki(ks(n),ks(r))&&(e+=\"/**/\"),e+=Zi(r),n=r);return e}var Ji=new Set(Jo),Is=new Set(Qo),Os=new Set(es),Qi=new Set(ts),ea=new Set(rs),ta=new Set(os),As=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ce=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),na=t=>Ce(t);function jr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&Os.has(t)&&As.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=Ce(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(c=>c.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&Os.has(t)&&As.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!Is.has(s)){n({reason:\"function\",name:s});return}let i=jr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=jr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}var ra=/^(animation|transition|scroll-behavior)/;function Qn(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:na(t.name);if(!r&&!Ji.has(o)){e({reason:\"property\",name:o});return}let s=ns[o];if(s){let l=t.value.filter(w=>w.type!==\"whitespace\"),c=l[0],u=l.length===1&&c?.type===\"ident\"?Ce(c.value):void 0;if(!u||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(u)){e({reason:\"value\",name:o});return}return`${o}: ${u}${t.important?\" !important\":\"\"}`}let i=jr(r?void 0:o,t.value,e);if(!i)return;let a=bt(i).trim();return`${r?`--${Zn(t.name.slice(2))}`:o}: ${a}${t.important&&!(n&&ra.test(o))?\" !important\":\"\"}`}function Ds(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let a=Ce(s.type===\"ident\"?s.value:s.name);if(ea.has(a)||(a.startsWith(\"-webkit-\")||a.startsWith(\"-moz-\"))&&!ta.has(a))return e({reason:\"selector\",name:a}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function $r(t,e,n){let r=[];for(let o of Br(t))if(o.type===\"declaration\"){let s=Qn(o,e);s&&r.push(`${s};`)}else{let s=Jn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function oa(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=Ce(s.name);return e===\"supports\"&&i===\"selector\"?Ds(s.value,n):Is.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Br(s.value);if(i.length===1&&i[0].type===\"declaration\")return Qn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?bt(t).trim():void 0}function Vr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(Vt,Ce(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:Ce(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Vr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Vr(e.value)}:e})}function Jn(t,e,n,r){if(n>Cs){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(u=>u.type===\"whitespace\"||u.type===\",\"||u.type===\"percentage\"||u.type===\"ident\"&&[\"from\",\"to\"].includes(Ce(u.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${bt(t.prelude).trim()} { ${$r(t.block,e,n)} }`}if(!Ds(t.prelude,e))return;let l=bt(Vr(t.prelude)).trim();if(l===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${l} { ${$r(t.block,e,n)} }`}let o=Ce(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!Qi.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let l=t.prelude.filter(d=>d.type!==\"whitespace\"),c=l[0];if(l.length!==1||!c||c.type!==\"ident\"&&c.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let u=yt(t.block,!1).map(d=>Jn(d,e,n+1,\"keyframes\")).filter(d=>d!==void 0);return`@keyframes ${c.type===\"ident\"?Kn(c.value):Gr(c.value)} { ${u.join(\" \")} }`}let i=oa(t.prelude,s,e);if(i===void 0)return;let a=r===\"style\"?$r(t.block,e,n):yt(t.block,!1).map(l=>Jn(l,e,n+1,\"sheet\")).filter(l=>l!==void 0).join(\" \");return`@${s} ${i} { ${a} }`}function sa(t,e=Bn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:yt(Yr(t),!0).map(s=>Jn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function Ms(t,e=Bn){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:\"size\"});continue}o+=s.length;let i=sa(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function Ls(t,e=Bn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Br(Yr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Qn(s,r,!0);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function Hs(t,e){let n,r=Qn(_s(t,Yr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function $s(t,e){if(e===\"svg\"){let r=Yn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(ht,n)?Object.prototype.hasOwnProperty.call(Vt,n)?{namespace:\"html\",name:Vt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function er(t,e){return(t===\"html\"?ht[e]:zn[e])?.empty===!0}var ia=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,aa=/^[0-9A-Za-z\\s.,+\\-%()]*$/,la=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,ca=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,da=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Us=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ua=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function fa(t,e){if(da.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(ua.test(n))return Us.exec(n)?.[0]}function Gs(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=js(e.origins),s=Us.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>zt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${zt.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${s}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",a=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${a.slice(0,-1).join(\", \")} or ${a[a.length-1]}.`}function js(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function ma(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:js(e).includes(n.origin)?n.href:void 0}catch{return}}function Wr(t,e,n,r,o){let s=Wn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Fn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=pa(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200),...r.length>zt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>Xo.includes(a.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(a=>({reason:a.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:a}))}:{}}}function pa(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>ss||!aa.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>zt)return o(\"url\");if(ca.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?fa(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=ma(n,r.imageOrigins);return a?{value:a}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>Mr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return ia.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return la.test(n)?{value:n}:o(\"url\");case\"style\":{let s=Ls(n,Mr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=Hs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var ha=\"http://www.w3.org/1999/xhtml\",ga=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var tr=(t,...e)=>t.namespaceURI===ha&&e.includes(t.localName),ya=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),ba=t=>tr(t,\"textarea\",\"select\")||tr(t,\"input\")&&!ga.has(ya(t));function Vs(t){if(tr(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(tr(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(ba(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var Ea=\"http://www.w3.org/1999/xhtml\",Et=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Xe?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},qe=class extends Et{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},qr=class extends Et{nodeType=8;get textContent(){return\"\"}},Xe=class extends Et{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},Xr=class extends Et{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Xe(this,e,n)}createElement(e){return new Xe(this,Ea,e)}createTextNode(e){return new qe(this,e)}createComment(e){return new qr(this)}};function zs(){let t=new Xr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Kr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Fs=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),Bs=new Set([\"style\",\"template\",\"datalist\",\"option\"]),q=t=>t.replace(/\\s+/g,\" \").trim();function wa(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var de=t=>t instanceof Xe,Yt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function te(t){return t instanceof qe?t.data:!de(t)||Yt(t)||Bs.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(te).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Ke(t){for(let e of t.childNodes)de(e)&&(yield e,yield*Ke(e))}function Na(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute(\"data-record\")!==null&&(i=!0),a!==t&&(a.localName===\"fieldset\"||a.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function xa(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let c=l.indexOf(\":\"),u=c>0?l.slice(c+1):\"\";c<=0||u===\"\"||n.has(l)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${l}\"${n.has(l)?\", which names a record and no relation\":\"\"}.`}):n.has(u)||s.push({at:o,says:`data-drop-connect names \"${u}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Ys(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let d of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(d.id,d);let i=d=>Ft(e.places,d)!==void 0;for(let d of Ke(t)){let p=d.getAttribute(\"data-act\");p!==null&&r.add(p);let N=p!==null&&d.getAttribute(\"data-debounce\")===null?Vs(d):void 0;N&&n.push({at:`drawing <${d.localName} data-act=\"${p}\">`,says:N});let v=d.getAttribute(\"data-record\");v!==null&&(o.add(v),!s.has(v)&&!i(v)&&n.push({at:`drawing <${d.localName} data-record=\"${v}\">`,says:e.placesUnsure?`It names \"${v}\", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(e.places)}${gt}`:`It names \"${v}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${xe(e.places)}`}));let m=d.getAttribute(\"data-place\");m!==null&&!i(m)&&n.push({at:`drawing <${d.localName} data-place=\"${m}\">`,says:e.placesUnsure?`It names the place \"${m}\", which is none of the places this run was told of.${xe(e.places)}${gt}`:`It names the place \"${m}\", which this app does not have.${xe(e.places)}`}),n.push(...Na(d)),n.push(...xa(d,e,s))}let a=d=>{if(d.localName===\"graview-video\")return;let p=d.getAttribute(\"data-record\");if(p!==null)return p;let N=d.getAttribute(\"data-key\")??d.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let v=new Set;for(let m of Ke(d)){let f=m.getAttribute(\"data-record\");f!==null&&m.localName!==\"graview-video\"&&v.add(f)}return v.size===1?[...v][0]:void 0},l=(d,p)=>{let N=s.get(p),v=N?.kind??(p.includes(\":\")?p.slice(0,p.indexOf(\":\")):\"\"),m=[...Ke(d)],f=m.find(E=>E.localName in Kr)??m.find(E=>E.localName===\"a\"&&E.getAttribute(\"data-record\")===p)??m.find(E=>E.localName===\"strong\"||E.localName===\"b\"),b=q(f?te(f):\"\")||N?.label||p,y=u(d,f);return!f&&y[0]?.t===\"text\"&&q(y[0].text)===b&&y.shift(),{id:p,kind:v,title:b,parts:y}},c=d=>{let p=[...Ke(d)].filter(f=>f.localName===\"tr\"&&!Yt(f)),N=p.find(f=>f.parentElement?.localName===\"thead\"||f.childNodes.every(b=>!de(b)||b.localName===\"th\")),v=N?N.childNodes.filter(de).map(f=>q(te(f))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:p.filter(f=>f!==N).map(f=>{let b=f.childNodes.filter(de),y=a(f),E=y?s.get(y):void 0;return{id:y??\"\",kind:E?.kind??\"\",title:q(te(b[0]??f)),parts:b.slice(1).map((H,h)=>({t:\"field\",label:v[h+1]??\"\",text:q(te(H))}))}})}]}};function u(d,p){let N=[],v=\"\",m=()=>{let b=q(v);v=\"\",b&&N.push({t:\"text\",text:b})},f=d.childNodes;for(let b=0;b<f.length;b+=1){let y=f[b];if(y===p)continue;if(y instanceof qe){v+=y.data;continue}if(!de(y)||Yt(y)||Bs.has(y.localName))continue;if(p&&[...Ke(y)].includes(p)){m(),N.push(...u(y,p));continue}let E=[];for(let H=b;H<f.length;H+=1){let h=f[H];if(h instanceof qe&&q(h.data)===\"\")continue;if(!de(h)||Yt(h)||Fs.has(h.localName)||h.localName in Kr)break;let I=a(h);if(!I)break;E.push({element:h,id:I}),b=H}if(E.length>0){m();let H=E.every(h=>h.element.localName===\"li\"||h.element.localName===\"tr\");N.push({t:\"list\",as:H?\"row\":\"card\",columns:1,groups:[{items:E.map(h=>l(h.element,h.id))}]});continue}N.push(...w(y,H=>v+=H,m))}return m(),N}function w(d,p,N){let v=d.localName;if(Fs.has(v)&&v!==\"label\")return p(te(d)),[];if(v===\"mark\"){N();let f=q(te(d));return f?[{t:\"badge\",text:f}]:[]}N();let m=Kr[v]??(d.getAttribute(\"role\")===\"heading\"?Number(d.getAttribute(\"aria-level\")??2):void 0);if(m!==void 0){let f=q(te(d));return f?[{t:\"heading\",level:m,text:f}]:[]}switch(v){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:d.childNodes.filter(b=>de(b)&&b.localName===\"li\"&&!Yt(b)).map(b=>{let y=a(b);if(y)return l(b,y);let E=u(b),H=E[0],h=H&&(H.t===\"text\"||H.t===\"heading\")?H.text:\"\";return{id:\"\",kind:\"\",title:h,parts:h?E.slice(1):E}})}]}];case\"table\":return[c(d)];case\"dl\":{let f=[],b=\"\";for(let y of d.childNodes.filter(de))if(y.localName===\"dt\")b=q(te(y));else if(y.localName===\"dd\")f.push({t:\"field\",label:b,text:q(te(y))});else if(y.localName===\"div\")for(let E of y.childNodes.filter(de))E.localName===\"dt\"?b=q(te(E)):E.localName===\"dd\"&&f.push({t:\"field\",label:b,text:q(te(E))});return f}case\"figure\":{let f=d.childNodes.find(E=>de(E)&&E.localName===\"figcaption\"),b=q(d.childNodes.filter(E=>E!==f).map(te).join(\" \")),y=f?q(te(f)):\"\";return b?[{t:\"figure\",text:b,...y?{label:y}:{}}]:y?[{t:\"text\",text:y}]:[]}case\"meter\":case\"progress\":{let f=Number(d.getAttribute(\"value\")??0),b=Number(d.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:d.getAttribute(\"aria-label\")??d.getAttribute(\"title\")??\"\",text:`${Math.round(f/b*100)}%`}]}case\"svg\":{let f=d.childNodes.find(E=>de(E)&&E.localName===\"title\"),b=q(d.getAttribute(\"aria-label\")??(f?te(f):\"\"));if(b)return[{t:\"text\",text:b,tone:\"picture\"}];let y=[...Ke(d)].filter(E=>E.localName===\"text\").map(E=>q(te(E))).filter(Boolean);return y.length>0?[{t:\"text\",text:y.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let f=q(d.getAttribute(\"alt\")??\"\");return f?[{t:\"text\",text:f,tone:\"picture\"}]:[]}case\"graview-video\":{let f=d.getAttribute(\"data-field\")??\"\",b=s.get(d.getAttribute(\"data-record\")??\"\"),y=b&&f&&Object.hasOwn(b,f)?b[f]:void 0,E=(Array.isArray(y)?y:[y])[Number(d.getAttribute(\"data-index\")??\"0\")];return!E||typeof E.name!=\"string\"||typeof E.type!=\"string\"||!E.type.startsWith(\"video/\")?(n.push({at:`drawing <graview-video data-field=\"${f}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[]):[{t:\"text\",text:`${typeof E.caption==\"string\"&&E.caption.trim()?E.caption.trim():E.name}, ${wa(typeof E.duration==\"number\"?{duration:E.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let f=q(te(d));return f?[{t:\"text\",text:f,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let f=q(d.getAttribute(\"aria-label\")??d.getAttribute(\"placeholder\")??d.getAttribute(\"name\")??\"\"),b=v===\"select\"?q(te(d.childNodes.find(y=>de(y)&&y.localName===\"option\"&&y.selected)??d)):d.value;return[{t:\"field\",label:f,text:b}]}case\"label\":return u(d);default:return u(d)}}return{parts:u(t),problems:n,acts:[...r],records:[...o]}}var Ta=0,va=1,Sa=2,ka=3,Ws=1,Oa=2,qs=3,Aa=1,Ra=3,Ca=8,Xs=\"~\",Wt=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ks=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Pa=new Set([\"value\",\"checked\",\"selected\"]),Zs=[\"aria-label\",\"aria-labelledby\",\"title\"],_a=t=>Zs.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function Js(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:\"div\",namespace:\"html\",children:[],id:Xs};s.set(Xs,a);let l=0,c=!1,u=new WeakMap,w=new Map,d=new Map,p=h=>{o.push(h),o.length>200&&o.shift(),e.onRefused?.(h)},N=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),v=(h,I)=>{if(h.namespace===\"html\"&&h.name&&Ks.has(h.name))return h.dom;if(I?.namespace===\"html\"&&I.name===\"textarea\")return I.dom},m=(h,I)=>{let R=h.dom,C=u.get(R)??R.getAttribute(\"role\");if(C===null||!C.split(/\\s+/).some(O=>Ko.includes(O.toLowerCase())))return void u.delete(R);if(_a(R)){u.delete(R),R.getAttribute(\"role\")!==C&&R.setAttribute(\"role\",C);return}u.set(R,C),R.removeAttribute(\"role\"),I&&p({reason:\"value\",element:h.name,name:\"role\"})},f=()=>{if(d.size===0)return;let h=new Set,I=R=>{for(let C of R.children){if(C.refused||C.text)continue;let O=C.dom.getAttribute(\"id\");O&&h.add(O),I(C)}};I(a);for(let[R,C]of d){if(R.id===void 0||s.get(R.id)!==R){d.delete(R);continue}let O=R.dom;for(let[T,V]of C){let $=V.value.split(/\\s+/).filter(ne=>ne!==\"\"),W=$.filter(ne=>!h.has(ne));if($.length>0&&W.length===0){if(V.drawn)continue;V.drawn=!0,O.setAttribute(T,V.value),m(R,!1)}else V.drawn&&(V.drawn=!1,O.removeAttribute(T),p({reason:\"reference\",element:R.name,name:T,ids:W.length>0?W:$}),m(R,!0))}}},b=(h,I,R,C=!0)=>{let O=h.dom;if(R!=null&&typeof R!=\"string\")return p({reason:\"value\",element:h.name,name:I});let T=Wr(h.namespace,h.name,I,R??null,e);if(\"refused\"in T){let ne=Wr(h.namespace,h.name,I,null,e);return\"refused\"in ne||O.removeAttribute(ne.name),!(\"refused\"in ne)&&ne.name===\"role\"&&u.delete(O),p(T.refused)}for(let ne of T.dropped??[])p(ne);let V=h.namespace===\"html\"&&Pa.has(T.name)&&Ks.has(h.name),$=O,W=V?T.name===\"value\"?$.value:T.name===\"checked\"?$.checked:$.selected:void 0;if(T.name===\"role\"&&u.delete(O),Zo.includes(T.name)){let ne=d.get(h)??new Map;T.value===null?ne.delete(T.name):ne.set(T.name,{value:T.value,drawn:!0}),ne.size>0?d.set(h,ne):d.delete(h)}T.value===null?O.removeAttribute(T.name):O.setAttribute(T.name,T.value),C&&(T.name===\"role\"||Zs.includes(T.name))&&m(h,T.name===\"role\"),e.onAttribute?.(O,T.name),V&&(T.name===\"value\"&&\"value\"in $?($.value=T.value??\"\",W!==$.value&&e.onFieldSet?.(O)):T.name===\"checked\"&&\"checked\"in $?($.checked=T.value!==null,W!==$.checked&&e.onFieldSet?.(O)):T.name===\"selected\"&&\"selected\"in $&&($.selected=T.value!==null,W!==$.selected&&e.onFieldSet?.(O.parentElement?.closest(\"select\")??O)))},y=h=>{if(!h.refused){l-=1,h.id!==void 0&&s.delete(h.id);for(let I of h.children)y(I)}},E=(h,I)=>{if(!Wt(h)||typeof h.id!=\"string\"||s.has(h.id))return p({reason:\"record\"}),N();if(l>=r)return p({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),N();let R=h.id;if(h.type===Ca)return N();if(h.type===Ra){if(er(I.namespace,I.name))return p({reason:\"child\",element:I.name}),N();let $=n.createTextNode(String(h.data??\"\").slice(0,Lr)),W={dom:$,children:[],text:!0,id:R,parent:I};return s.set(R,W),i.set($,R),l+=1,W}if(h.type!==Aa)return p({reason:\"record\"}),N();let C=String(h.element);if(er(I.namespace,I.name))return p({reason:\"child\",element:C}),N();let O=$s(C,I.namespace);if(\"refused\"in O)return p(O.refused),N();let T=n.createElementNS(O.namespace===\"svg\"?as:is,O.name);O.as&&T.setAttribute(\"data-graview-as\",O.as),O.namespace===\"html\"&&O.name===\"img\"&&T.setAttribute(\"referrerpolicy\",\"no-referrer\"),O.namespace===\"html\"&&O.name===\"a\"&&(T.setAttribute(\"target\",\"_blank\"),T.setAttribute(\"rel\",\"noopener noreferrer\"),T.setAttribute(\"referrerpolicy\",\"no-referrer\"));let V={dom:T,name:O.name,namespace:O.namespace,children:[],id:R,parent:I};if(s.set(R,V),i.set(T,R),l+=1,Wt(h.attributes)){for(let[$,W]of Object.entries(h.attributes))b(V,$,W,!1);m(V,!0)}if(e.decorate?.(T,O.name,O.namespace),Wt(h.properties))for(let $ of Object.keys(h.properties))p({reason:\"attribute\",element:O.name,name:$});if(Wt(h.eventListeners))for(let $ of Object.keys(h.eventListeners))h.eventListeners[$]!=null&&p({reason:\"attribute\",element:O.name,name:`on${$}`});if(Array.isArray(h.children))for(let $ of h.children){let W=E($,V);V.children.push(W),T.appendChild(W.dom)}return V},H=h=>{if(!Array.isArray(h))return p({reason:\"record\"});let[I,R]=h,C=typeof R==\"string\"?s.get(R):void 0;if(!C)return p({reason:\"record\"});switch(I){case Ta:{if(C.text)return p({reason:\"record\"});let O=Number(h[3]),T=Number.isInteger(O)&&O>=0&&O<=C.children.length?O:C.children.length,V=h[2],$=Wt(V)&&typeof V.id==\"string\"?w.get(V.id):void 0,W;$&&$.parent?.namespace===C.namespace&&!er(C.namespace,C.name)?(w.delete(V.id),$.parent=C,W=$):W=E(V,C),C.dom.insertBefore(W.dom,C.children[T]?.dom??null),C.children.splice(T,0,W),C.namespace===\"html\"&&C.name===\"textarea\"&&e.onFieldSet?.(C.dom);return}case va:{let O=Number(h[2]),T=C.children[O];if(!T)return p({reason:\"record\"});C.children.splice(O,1),T.dom.parentNode?.removeChild(T.dom),T.id!==void 0&&!T.refused?w.set(T.id,T):y(T);return}case Sa:{if(!C.text)return p({reason:\"record\"});C.dom.data=String(h[2]??\"\").slice(0,Lr);let O=v(C,C.parent);O&&e.onFieldSet?.(O);return}case ka:{if(C===a||C.text)return p({reason:\"record\"});let O=String(h[2]),T=h[4]??Ws;return T===Oa?b(C,O,h[3]):p(T===Ws||T===qs?{reason:\"attribute\",element:C.name,name:T===qs?`on${O}`:O}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(h,I){if(!Array.isArray(h))return p({reason:\"record\"}),!0;try{for(let R=0;R<h.length;R+=1){if(I&&R%32===0&&I())return!1;H(h[R])}return!0}finally{for(let R of w.values())y(R);w.clear(),f()}},get refused(){return o},get size(){return l},idOf:h=>i.get(h),elementOf(h){let I=s.get(h);return I&&!I.text&&I!==a?I.dom:void 0},dispose(){for(let h of a.children)y(h);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Qs(t,e,n){let{root:r}=zs(),o=!1,s=Js(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let l of t)s.apply(l);let i=[...s.refused],a=\"\";if(e){let l=Ms(e);a=l.css;for(let c of l.refused)i.push({reason:\"css\",name:\"stylesheet\",css:c})}return{root:r,refused:i,size:s.size,over:o,css:a,elementOf:l=>s.elementOf(l)}}var nr=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",ei={animate:nr,animateTransform:nr,animateMotion:nr,set:nr,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",role:` A role of the app's chrome or notices is the app's; role=\"region\" is drawn while it has a name (aria-label).`};function Ia(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(ei,s)?ei[s]:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o(\"element\"in t?t.element:void 0)}`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.${o(`${\"element\"in t?t.element:\"\"}${r}`)}`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${Ns(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Gs(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.${o(t.css?.name)}`}}}function ti(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let u of t.asked)if(!r.has(u.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${u.name}\", which its manifest does not name.`};let o=bs(e.props),s=Qs(t.renders,t.sheets,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:u=>u}:{},link:u=>ws(u,{handed:o,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(s.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let i=[...e.places,...(e.lists??[]).filter(u=>!e.places.some(w=>w.as===u)).map(u=>({as:u}))],a=e.placesUnsure===!0,l=Ys(s.root,{props:e.props,places:i,...a?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let u of l.acts)if(!r.has(u))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${u}\" (data-act), which its manifest does not name.`};let c=[...s.refused.map(u=>Ia(u,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...l.problems];for(let u of t.went)\"record\"in u&&!(e.props.node?.id===u.record||(e.props.nodes??[]).some(w=>w.id===u.record)||Ft(i,u.record))&&c.push({at:\"navigate\",says:a?`It goes to ${Bt(u.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(i)}${gt}`:`It goes to ${Bt(u.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${xe(i)}`}),\"place\"in u&&!Ft(i,u.place)&&c.push({at:\"navigate\",says:a?`It goes to the place ${Bt(u.place)}, which is none of the places this run was told of.${xe(i)}${gt}`:`It goes to the place ${Bt(u.place)}, which this app does not have.${xe(i)}`});return{ok:!0,parts:l.parts,problems:c,drawn:s}}var Zr=\"graviewHeadless\",Jr=\"graviewHeadlessView\";var oi=globalThis,Da=Promise.prototype.then,Ma=Promise.resolve(),or=t=>void Da.call(Ma,t),rr=oi.performance,qt=rr&&typeof rr.now==\"function\"?rr.now.bind(rr):Date.now,Ze=JSON.stringify,si=JSON.parse,La=Object.defineProperty,eo=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),wt=t=>{try{return si(Ze(t??null))}catch{return null}},z={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Te,sr=(t,e)=>{Te??={reason:t,detail:e}},Nt=t=>{z.logs.length<50&&z.logs.push(t.slice(0,500))},Tt={removed:[],stuck:[],sealed:!1},xt=ps({send(t){z.messages+=1,t.type===\"render\"?z.renders.push(wt(t.records)):t.type===\"style\"?z.sheets=(wt(t.sheets)??[]).map(String):t.type===\"gestures\"?z.gestures=wt(t.bound):t.type===\"navigate\"&&\"place\"in t?z.went.push({place:String(t.place),...t.where!==void 0?{where:wt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&z.went.push({record:String(t.to),...t.where!==void 0?{where:wt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return z.messages+=1,z.asked.push({name:String(t),args:wt(e)}),Promise.resolve({type:\"answer\",id:z.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){z.messages+=1,z.went.push({record:String(t)})},microtask:or,now:qt,threw:t=>sr(\"error\",`It threw: ${eo(t)}`),warn:Nt,hardening:()=>Tt}),ni=!1,Qr=!1;function Ha(t){if(Qr||typeof t!=\"function\"||(Qr=!0,Te))return;let e=qt();try{t.call(void 0,xt.view)}catch(n){sr(\"error\",`It threw: ${eo(n)}`)}z.ms+=qt()-e}async function $a(t){if(ni)return Ze({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});ni=!0;let e;try{e=si(String(t))}catch{return Ze({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Qr&&!Te)return Ze({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=qt();Te||xt.hear({type:\"props\",props:e.props,push:1}),z.ms+=qt()-n,z.ms>=e.limits.pushMs&&sr(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Te;o+=1)await new Promise(s=>or(s));if(Te||(z.clicks=xt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!Te){let o=xt.find(e.press.selector);if(z.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:z.asked.length,went:z.went.length,renders:z.renders.length},o!==void 0){xt.hear({type:\"dom-event\",target:o,event:\"click\"});for(let s=0;s<64&&!Te;s+=1)await new Promise(i=>or(i))}}if(Te)return Ze({ok:!1,...Te,transcript:z});let r=ti(z,e);return r.ok?Ze({ok:!0,transcript:z,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:Tt.removed.length,sealed:Tt.sealed}}):Ze({ok:!1,reason:r.reason,detail:r.detail,transcript:z})}var Ua=Object.freeze({log:(...t)=>Nt(t.map(String).join(\" \")),info:(...t)=>Nt(t.map(String).join(\" \")),debug:(...t)=>Nt(t.map(String).join(\" \")),warn:(...t)=>Nt(t.map(String).join(\" \")),error:(...t)=>Nt(t.map(eo).join(\" \"))}),Ga=0,ri=()=>Ga+=1,ja=[[\"console\",Ua],[\"setTimeout\",ri],[\"setInterval\",ri],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",or],[\"graview\",xt.view],[Jr,Ha],[Zr,t=>$a(t)]];for(let[t,e]of ja)La(oi,t,{value:e,writable:!0,enumerable:!1,configurable:!0});Tt=Bo(globalThis,[\"graview\",Jr,Zr],{primitivesStay:!0});Tt.stuck.length>0&&sr(\"refused\",`This isolate could not be hardened: ${Tt.stuck.join(\", \")} would not go.`);})();\n";
8
8
  //# sourceMappingURL=runtime.generated.js.map