@graview/guest 0.1.51 → 0.1.53

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 (44) hide show
  1. package/dist/audit/index.d.ts.map +1 -1
  2. package/dist/audit/index.js +12 -5
  3. package/dist/audit/index.js.map +1 -1
  4. package/dist/audit/page.generated.d.ts.map +1 -1
  5. package/dist/audit/page.generated.js +1 -1
  6. package/dist/audit/page.generated.js.map +1 -1
  7. package/dist/headless/judge.d.ts.map +1 -1
  8. package/dist/headless/judge.js +18 -4
  9. package/dist/headless/judge.js.map +1 -1
  10. package/dist/headless/runtime.generated.d.ts.map +1 -1
  11. package/dist/headless/runtime.generated.js +1 -1
  12. package/dist/headless/runtime.generated.js.map +1 -1
  13. package/dist/host/css.d.ts.map +1 -1
  14. package/dist/host/css.js +6 -4
  15. package/dist/host/css.js.map +1 -1
  16. package/dist/host/links.d.ts.map +1 -1
  17. package/dist/host/links.js +10 -2
  18. package/dist/host/links.js.map +1 -1
  19. package/dist/host/manifest.d.ts +10 -1
  20. package/dist/host/manifest.d.ts.map +1 -1
  21. package/dist/host/manifest.js +2 -0
  22. package/dist/host/manifest.js.map +1 -1
  23. package/dist/host/open-draw.d.ts +6 -1
  24. package/dist/host/open-draw.d.ts.map +1 -1
  25. package/dist/host/open-draw.js +6 -0
  26. package/dist/host/open-draw.js.map +1 -1
  27. package/dist/host/open-render.d.ts.map +1 -1
  28. package/dist/host/open-render.js +39 -4
  29. package/dist/host/open-render.js.map +1 -1
  30. package/dist/host/pressable.d.ts +6 -0
  31. package/dist/host/pressable.d.ts.map +1 -1
  32. package/dist/host/pressable.js +24 -1
  33. package/dist/host/pressable.js.map +1 -1
  34. package/dist/host/view-runtime.generated.d.ts.map +1 -1
  35. package/dist/host/view-runtime.generated.js +1 -1
  36. package/dist/host/view-runtime.generated.js.map +1 -1
  37. package/dist/host/worker-react.d.ts.map +1 -1
  38. package/dist/host/worker-react.js +38 -9
  39. package/dist/host/worker-react.js.map +1 -1
  40. package/dist/open-kit.d.ts +21 -7
  41. package/dist/open-kit.d.ts.map +1 -1
  42. package/dist/open-kit.js +62 -10
  43. package/dist/open-kit.js.map +1 -1
  44. 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 C=Symbol(\"name\"),Se=Symbol(\"prefix\"),Oe=Symbol(\"value\"),P=Symbol(\"ns\"),ee=Symbol(\"owner\"),U=Symbol(\"owner_document\"),pe=Symbol(\"attributes\"),G=Symbol(\"prev\"),O=Symbol(\"next\"),I=Symbol(\"child\"),te=Symbol(\"parent\"),ke=Symbol(\"host\"),ie=Symbol(\"data\"),De=Symbol(\"listeners\"),er=Symbol(\"isTrusted\"),Be=Symbol(\"path\"),Ye=Symbol(\"stop_immediate_propagation\"),We=Symbol(\"dispatching\"),be=Symbol(\"content\"),j=Symbol(\"hooks\"),zt=Symbol(\"extensions\"),Me=Symbol(\"hooks_dispatch\"),W=Symbol(\"is_connected\"),qe=Symbol(\"create_element\"),Kr=0,re=1,Xe=2,Ke=3,Ze=8,Le=9,Zr=10,Ae=11,D=\"http://www.w3.org/1999/xhtml\",ae=\"http://www.w3.org/2000/svg\",Jr=\"http://www.w3.org/XML/1998/namespace\",Et=\"http://www.w3.org/2000/xmlns/\";function Ft(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function B(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Qr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function H(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 eo=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,to=/[\\0\\t\\n\\f\\r />=]/u,qs=/[\\0\\t\\n\\f\\r />]/u;function Ee(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function no(t){eo.test(t)||nr(t)}function tr(t){(t===\"\"||to.test(t))&&nr(t)}function Bt(t,e,n){let r=Ee(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===\"\"||qs.test(i))||(n===\"element\"?!eo.test(a):a===\"\"||to.test(a)))&&nr(o),i!=null&&r==null)throw H(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Jr)throw H(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Et)throw H(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Et&&o!==\"xmlns\"&&i!==\"xmlns\")throw H(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function nr(t){throw H(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Yt=0,Wt=1,ro=2,rr=3,Xs=typeof performance>\"u\"?Date.now:performance.now.bind(performance),q=class{static NONE=Yt;static CAPTURING_PHASE=Wt;static AT_TARGET=ro;static BUBBLING_PHASE=rr;timeStamp=Xs();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Yt;[Be]=[];[Ye]=!1;[We]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,er,{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[er]}composedPath(){return[...this[Be]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Ye]=!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 or(t,e,n){if(t.cancelBubble)return;let o=e[De]?.get(t.type)?.[n===Wt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?ro:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(Ks,0,a)}if(t[Ye])break}}function Ks(t){throw t}var wt=[],qt=new WeakMap;function Xt(t,e){let n=qt.get(t);n?n.push(e):qt.set(t,[e]),wt[wt.length-1].push(t)}function X(t){let e=[];wt.push(e);let n;try{n=t()}catch(r){wt.pop();try{oo(e)}catch{}throw r}return wt.pop(),oo(e),n}function oo(t){let e,n=!1;for(let r of t){let o=qt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}qt.delete(r)}}if(n)throw e}var Kt=[],Nt=[],sr=!1;function He(t){for(let e of t)Kt.push(e),e[1]&&Nt.push(e[1]);if(!sr){sr=!0;try{let e,n=!1;for(let r=0;r<Kt.length;r++){let[o,s]=Kt[r];s&&Nt.splice(Nt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Kt.length=0,Nt.length=0,sr=!1}}}function Tt(t){let e=t;for(;e;){if(Nt.includes(e))return!0;e=e[te]??e[ke]}return!1}var xt=Symbol(\"listenerRegistrations\"),Re=class{[De]=void 0;[xt]=void 0;[U]=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=ir(o),l=this[xt];l||(l=new Map,this[xt]=l);let d=l.get(e);d||(d={},l.set(e,d));let p=d[a];if(p||(p=new Map,d[a]=p),p.has(n))return;let b=this,u={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(u.normalizedListener=function(...f){if(u.signal?.aborted){Zt(b,u);return}return u.once&&Zt(b,u),typeof u.listener==\"object\"?u.listener.handleEvent(...f):u.listener.call(this,...f)});let E=this[De];E||(E=new Map,this[De]=E);let T=E.get(e);T||(T={},E.set(e,T));let v=T[a];if(v||(v=new Set,T[a]=v),p.set(n,u),v.add(u),i){let h=()=>{Zt(b,u)};u.abortListener=h,i.addEventListener(\"abort\",h,{once:!0})}this[U]?.defaultView[Me].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Zs.call(this,e,n,r)}dispatchEvent(e){if(e[We])throw H(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[We]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Be]=n;for(let s=n.length;s--;)if(or(e,n[s],Wt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(or(e,o[s],rr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[We]=!1,e.cancelBubble=!1,e[Ye]=!1,e.eventPhase=Yt,e.currentTarget=null,e[Be]=[]}}};function Zs(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=ir(!!r),s=this[xt]?.get(t)?.[o]?.get(e);s&&Zt(this,s)}function ir(t){return t?\"capture\":\"bubble\"}function Zt(t,e){let n=ir(e.capture),r=t[xt],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[De],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[U]?.defaultView[Me].removeEventListener?.(t,e.type,e.listener,e.capture))}var le=class extends Array{item(e){return this[e]??null}};var St=0,so=1,cr=2,dr=3,Ot=4,io=0,ao=1,en=2,tn=3,lo=4,lr=5,co=6,uo=7,Jt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Js(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 ne(t){throw H(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function nn(t,e){let n=typeof e==\"string\"?kt(e):[{combinator:Ot,matchers:e}],r=null,o=t[I];return o&&n[0].matchers.length&&ur(o,n,s=>(r=s,!1)),r}function rn(t,e){let n=typeof e==\"string\"?kt(e):[{combinator:Ot,matchers:e}],r=new le,o=t[I];return o&&n[0].matchers.length&&ur(o,n,s=>{r.push(s)}),r}function kt(t,e=!1,n=!1){let r={combinator:Ot,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===\"\"&&ne(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ne(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ne(t),l[1]===\">\"?r.combinator=so:l[1]===\"+\"?r.combinator=dr:l[1]===\"~\"?r.combinator=cr:r.combinator=St,r={combinator:Ot,matchers:[]},o.push(r));let d=l[8]?B(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ne(t);let b,u=l[4]??l[5]??l[7];if(l[2]){Jt.test(d)||ne(t);let E=l[5],T=E?.[0];if(l[3]==null&&(T==='\"'||T===\"'\")){let v=l[0].lastIndexOf(E);u=i.slice(l.index+v+1),s.lastIndex=i.length}else E!=null&&!Jt.test(E)&&ne(t);b=lo}else l[6]?(Jt.test(d)||ne(t),b=l[6]===\"#\"?en:tn):l[8]?b=l[9]==null?lr:co:l[7]===\"*\"?b=io:l[7]&&Jt.test(l[7])?b=ao:ne(t);l[9]?([u,s.lastIndex]=Js(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&ne(t),d===\"has\"&&e&&ne(t),kt(u,e||d===\"has\",d===\"has\")):b===lr&&ne(t),r.matchers.push({type:b,name:d,value:u}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ne(t),o}function Qs(t,e){let n=kt(e);return n[0]?.matchers.length?vt(t,n):!1}function ei(t,e){let n=kt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=St,s={type:uo,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:St,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===dr||o===cr?t[O]:t[I];if(!i)return!1;let a=!1;return ur(i,n,()=>(a=!0,!1),t),a}function ur(t,e,n,r){let o=[],s=t;for(;s;){if(Q(s)){if(vt(s,e,r)&&n(s)===!1)return!1;let i=s[I];if(i){let a=s[O];a&&o.push(a),s=i;continue}}s=s[O]??o.pop()??null}return!0}function vt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Ot){if(!Qt(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||vt(t,a,n)}let s=r===so||r===St?te:G,i=t[s];if(!i)return!1;if(r===St||r===cr){for(;i;){if(Q(i)&&Qt(i,o,n)){let a=e.slice(0,-1);if(a.length===0||vt(i,a,n))return!0}i=i[s]}return!1}else{if(r===dr&&!Q(i)){for(;i&&!Q(i);)i=i[s];if(!i)return!1}if(!Q(i)||!Qt(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||vt(i,a,n)}}function ar(t,e){return t.getAttributeNS(null,t.namespaceURI===D?B(e):e)}function Qt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Qt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case io:return o===\"*\";case ao:return t.namespaceURI===D?t.localName===B(o):t.localName===o;case en:return ar(t,\"id\")===o;case tn:let i=ar(t,\"class\");return i?Ft(i).includes(o):!1;case lo:let a=ar(t,o);return s==null?a!=null:a===s;case uo:return t===n;case lr:ne(`:${o}`);case co:switch(o){case\"has\":return ei(t,s||\"\");case\"not\":return!Qs(t,s||\"\");default:ne(`:${o}(${s})`)}}return!1}function ti(t){return t.nodeType===Xe}function At(t){return ie in t}function pr(t){return t.nodeType===Ke}function ni(t){return t.nodeType===Ze}function Q(t){return t.nodeType===re}function fr(t){return t.nodeType===Ae}function ho(t){return\"appendChild\"in t}function on(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 Ct(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!Q(l)))continue;let d=l[pe];if(d)for(let b of d)o.has(b)||(o.add(b),e.push(b));let p=l[be];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=a}return{nodes:e,treeNodes:s}}function Rt(t,e){for(let n of t)n[U]=e}function fo(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[U]=e,r}function po(t,e){if(pr(t))return e.createTextNode(t.data);if(ni(t))return e.createComment(t.data);if(ti(t))return fo(t,e);if(Q(t)){let n=e[qe](t[C],t.namespaceURI,t[Se],t.localName);if(t[pe])for(let r=0;r<t[pe].length;r++){let o=t[pe].item(r);n.attributes.setNamedItem(fo(o,e))}return n}else{if(fr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[U]=e,n}}}function sn(t,e,n=t.ownerDocument){if(t.nodeType===Le)throw H(\"Cannot clone a document node\",\"NotSupportedError\");let r=po(t,n);if(!e||!Q(t)&&!fr(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,Q(i.source)&&i.source.namespaceURI===D&&i.source.localName===\"template\"){let p=i.source[be];p&&(o.has(p)&&mo(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&mo(),o.add(a);let d=po(a,n);Q(a)||fr(a)?s.push({source:a,destination:d,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(d)}return r}function mo(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function an(t,e){let n=String(e);return n===\"\"?null:nn(t,[{type:en,name:n}])}function ln(t,e){let n=[...new Set(Ft(String(e)))];return rn(t,n.map(r=>({type:tn,name:r})))}function cn(t,e){let n=String(e),r=B(n),o=[];for(let s of dn(t))Q(s)&&(n===\"*\"||(s.namespaceURI===D?s[C]===r:s[C]===n))&&o.push(s);return o}function dn(t){let e=[],n=[],r=t[I];for(;r;){e.push(r);let o=r[I],s=r[O];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Ct(t){let e=dn(t);return e.unshift(t),e}var ce=class extends Re{nodeType=Kr;[C]=\"\";[te]=null;[ke]=null;[I]=null;[G]=null;[O]=null;[W]=!1;get[j](){return this[U].defaultView[Me]}get localName(){return this[C]}get nodeName(){return this[C]}get ownerDocument(){return this[U]}get isConnected(){return this[W]}isDefaultNamespace(e){let n=Ee(e);return ri(this)===n}get parentNode(){return this[te]}set parentNode(e){}get parentElement(){let e=this[te];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[G]}set previousSibling(e){}get nextSibling(){return this[O]}set nextSibling(e){}get previousElementSibling(){let e=this[G];for(;e&&e.nodeType!==1;)e=e[G];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[O];for(;e&&e.nodeType!==1;)e=e[O];return e}set nextElementSibling(e){}get firstChild(){return this[I]}set firstChild(e){}get lastChild(){let e=this[I];for(;e;){let n=e[O];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return At(this)?this.data:null}set nodeValue(e){At(this)&&(this.data=e)}get textContent(){if(At(this))return this.data;let e=\"\";for(let n of dn(this))pr(n)&&(e+=n.data);return e}set textContent(e){if(At(this))this.data=e;else if(ho(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return sn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function ri(t){let e=t;for(;e;)switch(e.nodeType){case re:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Et,\"xmlns\");if(r!=null&&r.prefix==null)return Ee(r.value);e=n.parentElement;break}case Le:e=e.documentElement;break;case Zr:case Ae:return null;case Xe:e=e.ownerElement;break;default:e=e.parentElement}return null}var de=Symbol(\"insertNode\"),gr=Symbol(\"preflightInsertions\"),un=Symbol(\"replaceNode\"),Ce=class extends ce{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=$e(e),r=this.parentNode;if(r)return mr(o=>{we(r,n);let s=this[O];for(;s&&n.includes(s);)s=s[O];let i=hr(r,n,o);this.parentNode===r?r[un](i,this,o):r[de](i,s,o)})}before(...e){let n=$e(e),r=this.parentNode;if(r)return mr(o=>{we(r,n);let s=this[G];for(;s&&n.includes(s);)s=s[G];let i=hr(r,n,o);r[de](i,s?s[O]:r.firstChild,o)})}after(...e){let n=$e(e),r=this.parentNode;if(r)return mr(o=>{we(r,n);let s=this[O];for(;s&&n.includes(s);)s=s[O];let i=hr(r,n,o);r[de](i,s,o)})}};function mr(t){return X(()=>{let e=[];try{t(e)}catch(n){try{He(e)}catch{}throw n}He(e)})}function $e(t){return t.map(e=>e instanceof ce?e:String(e))}function Pt(t,e){return e instanceof ce?e:t.ownerDocument.createTextNode(String(e))}function we(t,e){for(let n of e){if(!(n instanceof ce))continue;let r=t;for(;r;){if(r===n)throw H(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[te]??r[ke]}}}function hr(t,e,n){let r=[];for(let s of e)r.push(Pt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[gr](r);for(let s of r)o[de](s,null,n);return o}var fn,yr=0,go=0,yo=0,bo=0,Je=!1,Er=!1,_t=!1,pn=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=oi(n),o=fn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?yr++:br(i,-1),s.set(this,r),br(r,1),this.#e.add(e)}disconnect(){let e=fn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),yr--,br(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,yr===0&&(fn=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 ue(t){let e=fn;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 le,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 le,target:t.target,type:t.type})}function mn(...t){let e=new le;return e.push(...t),e}function oi(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 br(t,e){t.attributes&&(go+=e),t.characterData&&(yo+=e),t.childList&&(bo+=e),Je=go>0,Er=yo>0,_t=bo>0}var me=class extends Ce{childNodes=new le;children=new le;appendChild(e){return X(()=>this[de](e,null))}insertBefore(e,n){return X(()=>this[de](e,n||null))}append(...e){return X(()=>{let n=$e(e.filter(r=>r!=null));n.length>1&&we(this,n);for(let r of n)this[de](Pt(this,r),null)})}prepend(...e){return X(()=>{let n=$e(e.filter(o=>o!=null));n.length>1&&we(this,n);let r=this.firstChild;for(let o of n)this[de](Pt(this,o),r)})}replaceChildren(...e){return X(()=>{let n=$e(e.filter(o=>o!=null));we(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[de](Pt(this,o),null)})}removeChild(e){return X(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw H(\"The node is not a child of this node\",\"NotFoundError\");let n=this[W]?Ct(e):void 0,r=e[G],o=e[O],s=hn(this,e);if(n)for(let i of n)i[W]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),He(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return X(()=>this[un](e,n))}[un](e,n,r){if(we(this,[e]),n.parentNode!==this)throw H(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[G],s=n[O],i=this.prepareInsertion(e),a=this[W]?Ct(n):void 0,l=new Set(i.map(({node:u})=>u)),d=s;for(;d&&l.has(d);)d=d[O];let p=hn(this,n);if(a){for(let E of a)E[W]=!1;let u=new Set(a);for(let E of i)u.has(E.node)&&(E.shouldDisconnect=!1)}this.commitInsertion(i,d);let b=this[W];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,b),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return rn(this,e)}querySelector(e){return nn(this,e)}[de](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[gr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(we(this,[e]),n&&n.parentNode!==this)throw H(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[O]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[W];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):He(e)}prepareInsertion(e){let n=[];if(e.nodeType===Ae){let i=e[I];for(;i;)n.push(i),i=i[O]}else n.push(e);let r=this[W],o=this[U],s=[];for(let i of n){let a=i[W],l=a||r,d,p;if(i[U]===o)l&&(d=Ct(i));else{let b=on(i);p=b.nodes,l&&(d=b.treeNodes)}s.push({node:i,nodes:d,adoption:p,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[te];if(i){let a=s.node[G],l=s.node[O];s.source={parent:i,index:hn(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[U];for(let{adoption:s}of e)s&&Rt(s,r);let o=this[W];for(let{nodes:s}of e)if(s)for(let i of s)i[W]=o}attachChild(e,n){if(n){let s=n[G];e[O]=n,e[G]=s,s?s[O]=e:this[I]=e,n[G]=e}else{e[O]=null;let s=this[I];if(s){let i;for(;i=s[O];)s=i;s[O]=e,e[G]=s}else this[I]=e,e[G]=null}let r=Q(e);e[te]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!Q(s);)s=s[O];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[G],nextSibling:e[O]}}queueRemovalMutationRecord(e,n,r,o){_t&&ue({type:\"childList\",target:e,removedNodes:mn(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),ue({type:\"childList\",target:this,addedNodes:mn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==re||Tt(this)?[]:[[()=>this[j].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===re&&!Tt(s.parent)&&n.push([()=>s.parent[j].removeChild?.(s.parent,o,s.index)]),this.nodeType===re&&!Tt(this)&&n.push([()=>this[j].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){wo(e,n)}};function Eo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[W]?n.treeNodes:void 0,s=e[G],i=e[O],a=hn(t,e);if(o)for(let d of o)d[W]=!1;Rt(n.nodes,r),_t&&ue({type:\"childList\",target:t,removedNodes:mn(e),previousSibling:s,nextSibling:i}),o&&wo(o,\"disconnectedCallback\");let l=[];t.nodeType===re&&!Tt(t)&&l.push([()=>t[j].removeChild?.(t,e,a)]),He(l)}function hn(t,e){let n=e[G],r=e[O];n?n[O]=r:t[I]=r,r&&(r[G]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),Q(e)&&t.children.splice(t.children.indexOf(e),1),e[te]=null,e[O]=null,e[G]=null,o}function wo(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Xt(n,()=>r.call(n))}}function It(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Xt(t,()=>i.call(t,e,n,r,o))}var gn=class{[I]=null;constructor(e){this[ee]=e}getNamedItem(e){let n=String(e),r=this[ee][P]===D?B(n):n,o=this[I];for(;o;){if(o.name===r)return o;o=o[O]}return null}getNamedItemNS(e,n){let r=Ee(e),o=String(n),s=this[I];for(;s;){if(s.localName===o&&s[P]===r)return s;s=s[O]}return null}item(e){let n=this[I],r=0;for(;n;){if(r++===e)return n;n=n[O]}return null}get length(){let e=0,n=this[I];for(;n;)e++,n=n[O];return e}removeNamedItem(e){let n=String(e),r=this[ee][P]===D?B(n):n;return X(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=Ee(e),o=String(n);return X(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[P]===r))}removeNamedItemImmediately(e){let n=this[ee],r=this[I],o=null;for(;r!=null;){if(e(r)){o&&(o[O]=r[O]),this[I]===r&&(this[I]=r[O]);let s=r.value;return r[O]=null,r[ee]=null,Je&&ue({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[P],oldValue:s}),n[j].removeAttribute?.(n,r.name,r[P]),It(n,r.localName,s,null,r[P]),r}o=r,r=r[O]}return null}setNamedItem(e){return X(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[ee],r=e[ee];if(r!=null&&r!==n)throw H(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[I],i=null;for(;s;){if(s.localName===e.localName&&s[P]===e[P]){if(s===e)return s;i?i[O]=e:this[I]=e,e[O]=s[O],s[O]=null,o=s;break}i=s,s=s[O]}o==null&&(i?i[O]=e:this[I]=e),e[ee]=n,e[U]=n[U],o&&(o[ee]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&Je&&ue({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[P],oldValue:o?.value??null}),l&&n[j].removeAttribute?.(n,o.name,o[P]),(a||l)&&n[j].setAttribute?.(n,e.name,e.value,e[P]),a&&It(n,e.localName,o?.value??null,e.value,e[P]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[I];for(;e;)yield e,e=e[O]}};var Ue=class extends ce{nodeType=Xe;[P]=null;[O]=null;[ee]=null;constructor(e,n,r){super(),this[C]=e,this[Oe]=n,r&&(this[P]=r)}get nodeName(){return this[C]}set nodeName(e){}get name(){return this[C]}set name(e){}get localName(){if(this[P]==null)return this[C];let e=this[C].indexOf(\":\");return e<0?this[C]:this[C].slice(e+1)}get prefix(){if(this[P]==null)return null;let e=this[C].indexOf(\":\");return e<0?null:this[C].slice(0,e)}get value(){return this[Oe]}set value(e){let n=String(e),r=this[ee];if(!r){this[Oe]=n;return}X(()=>{let o=this[Oe];this[Oe]=n,Je&&o!==n&&ue({type:\"attributes\",target:r,attributeName:this[C],attributeNamespace:this[P],oldValue:o}),this[j].setAttribute?.(r,this[C],n,this[P]),It(r,this.localName,o,n,this[P])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[ee]}get namespaceURI(){return this[P]}get specified(){return!0}};var si={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},ii=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),ai=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,xo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,li=\"|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|\",ci=/^(?:color|face|size)$/i;function No(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 si[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function vo(t){return t.namespaceURI===D&&ii.has(t.localName)}function To(t){let e=t.localName;return t[P]===ae&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function di(t,e){if(li.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(xo))if(ci.test(n[1]))return!0;return!1}function yn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ai)){let a=i[1];if(a){let l=i[2],d=B(a),p=o[o.length-1]?.element??e,b=p[P]===ae?ae:D;if(d===\"svg\")b=ae;else if(b===ae){if(To(p))b=D;else if(di(d,l)){for(;o.length>0;){let T=o[o.length-1];if(T.element[P]!==ae||To(T.element))break;o.pop(),s=T.target}b=D}}let u=b===D?d:a,E=n[qe](u,b,null,u);for(let T of l.matchAll(xo))E.setAttribute(T[1],No(T[3]||T[4]||\"\"));if(s.append(E),vo(E)||b!==D&&i[4])continue;o.push({element:E,target:s}),s=b===D&&d===\"template\"?E.content:E}else if(i[5]){let l=B(i[5]);for(let d=o.length-1;d>=0;d--){let p=o[d],b=B(p.element[C]);if(b===l){s=p.target,o.length=d;break}if(p.element[P]===D&&b===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(No(i[7]))}return r}function bn(t){return Oo([{type:\"content\",child:t[I]}])}function So(t){return Oo([{type:\"opening\",node:t}])}function Oo(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case re:{let o=r;e.push(`<${o[C]}`);let s=o[pe]?.[I];for(;s;){e.push(` ${s[C]}`);let a=s[Oe];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[O]}if(e.push(\">\"),vo(o))break;let i=o.namespaceURI===D&&o.localName===\"template\"?o[be]:o;t.push({type:\"closing\",name:o[C]}),t.push({type:\"content\",child:i?.[I]??null});break}case Ke:{let o=r;e.push(o[ie].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case Ze:{let o=r;e.push(`<!--${o[ie]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[O]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var Y=class extends me{nodeType=re;[P]=D;[Se]=null;get namespaceURI(){return this[P]}get prefix(){return this[Se]}get localName(){let e=this[Se];return e==null?this[C]:this[C].slice(e.length+1)}get nodeName(){return this[P]===D?Qr(this[C]):this[C]}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 Ue(\"slot\",n))}get attributes(){let e=this[pe];return e||(e=new gn(this),this[pe]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return cn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return ln(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);tr(r);let s=this[P]===D?B(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ue(s,o))}setAttributeNS(e,n,r){let o=Ee(e),s=String(n),i=String(r),a=Bt(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new Ue(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);tr(r);let o=this[P]===D?B(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 Ue(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[P]===D?B(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return So(this)}get innerHTML(){return bn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=yn(String(e),this);this.replaceChildren(n)}}};var Qe=class t extends Y{[P]=ae;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Pe=class extends Ce{[ie]=\"\";constructor(e){super(),this[ie]=e==null?\"\":String(e)}setData(e){let n=Er,r=n?this[ie]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[ie]=o,n&&r!==o&&ue({type:\"characterData\",target:this,oldValue:r}),this[j].setText?.(this,o)}get data(){return this[ie]}set data(e){this.setData(e)}};var et=class extends Pe{nodeType=Ke;[C]=\"#text\"};var tt=class extends Pe{nodeType=Ze;[C]=\"#comment\"};var nt=class extends me{nodeType=Ae;[C]=\"#document-fragment\";[U]=typeof window<\"u\"?window.document:null;getElementById(e){return an(this,e)}};var rt=class extends Y{get content(){let e=this[be];return e||(e=this.ownerDocument.createDocumentFragment(),e[ke]=this,this[be]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(yn(String(e),this))}get innerHTML(){let e=this[be];return e?bn(e):\"\"}};var En=class extends Y{};var wn=class extends Y{};var Nn=class extends Y{};var Dt=class extends me{nodeType=Le;[C]=\"#document\";[W]=!0;constructor(e){super(),this.defaultView=e,this[U]=this,this.documentElement=xn(new Nn,this,\"html\"),this.body=xn(new En,this,\"body\"),this.head=xn(new wn,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 ln(this,e)}createElement(e){let n=String(e);return no(n),wr(this,B(n))}createElementNS(e,n){let r=Bt(e,n,\"element\");return wr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[qe](e,n,r,o){return wr(this,e,n,r,o)}createTextNode(e){let n=Tn(new et(e),this);return this[j].createText?.(n,n.data),n}createComment(e){return Tn(new tt(e),this)}createDocumentFragment(){return Tn(new nt,this)}createEvent(){return new q(\"\")}getElementById(e){return an(this,e)}getElementsByTagName(e){return cn(this,e)}importNode(e,n){if(e.nodeType===Le)throw H(\"Cannot import a document node\",\"NotSupportedError\");return sn(e,n,this)}adoptNode(e){if(e[U]===this)return e;let n=on(e);return X(()=>{let r=e.parentNode;return r?Eo(r,e,n,this):Rt(n.nodes,this),e})}};function Tn(t,e){return Object.defineProperty(t,U,{value:e,writable:!0,enumerable:!1}),t}function wr(t,e,n=D,r=null,o=e){let s;if(n===ae)s=new Qe;else if(n===D&&o===\"template\")s=new rt;else if(n===D){let i=t.defaultView.customElements.get(o);s=i?new i:new Y}else s=new Y;return xn(s,t,e,n,r)}function xn(t,e,n,r=D,o=null){return Tn(t,e),Object.defineProperties(t,{[C]:{value:n},[P]:{value:r},[Se]:{value:o}}),e[j].createElement?.(t,r),t}var vn=class extends q{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 Sn=class extends q{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 On=class extends q{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var kn=class extends q{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var An=class extends q{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Rn=class extends q{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Cn=class extends Y{};var ui=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,fi=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function ko(t){return ui.test(t)&&!fi.has(t)}function Ao(t){return H(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Pn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!ko(e))throw Ao(e);if(this.registry.has(e))throw H(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw H(\"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(!ko(e))return Promise.reject(Ao(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 pi=[\"onerror\",\"onunhandledrejection\"],Co=Symbol.for(\"@remote-dom/polyfill/global-property\");function Po(t){return Object.getOwnPropertyDescriptors(t)}function _o(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Re.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Nr(r.value.bind(t)),e[n]=r);return e}function Io(t){let e={};for(let n of pi)e[n]={configurable:!0,enumerable:!0,get:Nr(()=>t[n]),set:Nr(r=>{t[n]=r})};return e}function mi(t){return Object.assign(Po(t),_o(t),Io(t))}function Nr(t){return Object.defineProperty(t,Co,{value:!0}),t}function Ro(t,e){for(let n of Reflect.ownKeys(e)){let r=hi(t,n);(r==null||gi(r))&&Object.defineProperty(t,n,e[n])}}function hi(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function gi(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Co]===!0)}var Ge=class extends Re{[j]={};[zt]=[];[Me]=bi(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Dt(this);customElements=new Pn;location=globalThis.location;navigator=globalThis.navigator;Event=q;ErrorEvent=Sn;PromiseRejectionEvent=On;ToggleEvent=kn;FocusEvent=An;ClipboardEvent=Rn;EventTarget=Re;CustomEvent=vn;Node=ce;ParentNode=me;ChildNode=Ce;DocumentFragment=nt;Document=Dt;CharacterData=Pe;Comment=tt;Text=et;Element=Y;HTMLElement=Cn;SVGElement=Qe;HTMLTemplateElement=rt;MutationObserver=pn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)yi(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=Po(e),s=Object.assign(_o(e),Io(e));delete o.self,Object.defineProperties(globalThis,o),Ro(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),Ro(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,mi(e))}};function yi(t,e){t[zt].push(e(t)??{})}function bi(t){return{createElement:Ne.bind(null,t,\"createElement\"),setAttribute:Ne.bind(null,t,\"setAttribute\"),removeAttribute:Ne.bind(null,t,\"removeAttribute\"),createText:Ne.bind(null,t,\"createText\"),setText:Ne.bind(null,t,\"setText\"),insertChild:Ne.bind(null,t,\"insertChild\"),removeChild:Ne.bind(null,t,\"removeChild\"),addEventListener:Ne.bind(null,t,\"addEventListener\"),removeEventListener:Ne.bind(null,t,\"removeEventListener\")}}function Ne(t,e,...n){for(let s of t[zt])s[e]?.apply(s,n);let r=t[j];r[e]?.apply(r,n)}var _n=new Ge;var Tr=\"~\";var _e=new WeakMap;function ot(t){return _e.get(t)}var Or=new WeakMap,wi=0;function oe(t){let e=Or.get(t);return e==null&&(e=String(wi++),In(t,e)),e}function In(t,e){Or.set(t,e)}var vr=new WeakMap;function Ni(t){return vr.get(t)}var Sr=new WeakMap;function Ti(t){let e=Sr.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 xi=new WeakMap;function vi(t){return xi.get(t)}function kr(t,e,n){let r=vr.get(t);if(r==null&&(r={},vr.set(t,r)),r[e]===n)return;r[e]=n;let o=_e.get(t);o?.mutate([[3,oe(t),e,n,1]])}function Ie(t,e,n){let r=Sr.get(t);if(r==null&&(r={},Sr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=_e.get(t);o?.mutate([[3,oe(t),e,n,2]])}function st(t,e){if(_e.get(t)!==e&&(_e.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)st(t.childNodes[r],e)}function Dn(t){if(_e.get(t)!=null&&(_e.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Dn(t.childNodes[n])}function it(t){let{nodeType:e}=t;switch(e){case 1:return{id:oe(t),type:e,element:t.localName,properties:xr(Ni(t)),attributes:xr(Ti(t)),eventListeners:xr(vi(t)),children:Array.from(t.childNodes).map(it)};case 3:case 8:return{id:oe(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function xr(t){return t?{...t}:void 0}function Ar(t,e,...n){let r=Or.get(t),o=_e.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 at=_n[j];at.insertChild=(t,e,n)=>{let r=ot(t);r!=null&&(st(e,r),r.mutate([[0,oe(t),it(e),n]]))};at.removeChild=(t,e,n)=>{let r=ot(t);r!=null&&(Dn(e),r.mutate([[1,oe(t),n]]))};at.setText=(t,e)=>{let n=ot(t);n?.mutate([[2,oe(t),e]])};at.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ie(t,e,n)};at.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ie(t,e)};Ge.setGlobal(_n);var Lo=[\"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\"],Ho=[\"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\"],$o=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Uo=[\"TEMPORARY\",\"PERSISTENT\"],Fd=Object.freeze([...Lo,...Ho,...$o,...Uo]),Bd=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Mo=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Go(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Lo,...Ho,...$o,...e,\"constructor\",Symbol.toStringTag]),i=(m,g)=>{let N=Reflect.getOwnPropertyDescriptor(m,g);return N===void 0||!(\"value\"in N)||N.writable||N.configurable?!1:n.primitivesStay&&typeof g==\"symbol\"&&(typeof N.value!=\"object\"||N.value===null)&&typeof N.value!=\"function\"?!0:Uo.includes(g)&&typeof N.value==\"number\"},a=t,l=a.setTimeout,d=a.setInterval,p=a.crypto,b=(m,g)=>function(N,w,..._){if(typeof N!=\"function\")throw new TypeError(`${g} takes a function: a guest view cannot run code from text`);return m.call(t,N,w,..._)},u=p?Object.freeze({getRandomValues:m=>p.getRandomValues(m)}):void 0,E=a.document?.defaultView;if(E&&E!==a)for(let m of Reflect.ownKeys(E))typeof m==\"symbol\"||s.has(m)||Reflect.deleteProperty(E,m)||o.push(`window.${m}`);let T=[];for(let m=t;m&&m!==Object.prototype;m=Object.getPrototypeOf(m))T.push(m);for(let m of T)for(let g of Reflect.ownKeys(m))s.has(g)||(Reflect.deleteProperty(m,g)?r.push(Mo(g)):i(m,g)||o.push(Mo(g)));let v=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},h=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let m of h){let g=v();Object.defineProperty(g,\"prototype\",{value:m,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(m,\"constructor\",{value:g,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),m===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:g,writable:!0,enumerable:!1,configurable:!0})}let f=(m,g)=>{Reflect.defineProperty(t,m,{value:g,writable:!0,enumerable:!0,configurable:!0})||o.push(m)};f(\"setTimeout\",b(l,\"setTimeout\")),f(\"setInterval\",b(d,\"setInterval\")),u&&f(\"crypto\",u);for(let m of T.slice(1))Object.freeze(m);for(let m of Reflect.ownKeys(t)){let g=Reflect.getOwnPropertyDescriptor(t,m);Reflect.defineProperty(t,m,\"value\"in g?{...g,writable:!1,configurable:!1}:{...g,configurable:!1})}let c;try{c=Reflect.preventExtensions(t)}catch{c=!1}return{removed:r,stuck:o,sealed:c}}var Mt=class extends HTMLElement{constructor(){super(),In(this,Tr)}connect(e){if(ot(this)===e||(st(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,Tr,it(o),r])}e.mutate(n)}updateRemoteProperty(e,n){kr(this,e,n)}callRemoteMethod(e,...n){return Ar(this,e,...n)}};var x={},Mn={empty:!0},Si={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\"},ct={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:Mn,br:Mn,wbr:Mn,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\":Mn},Oi=[\"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\"],ki={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Oi.map(t=>[t,\"css\"]))},lt={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Ln={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},jo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Hn={svg:{attributes:{...lt,...Ln}},g:x,defs:x,symbol:{attributes:{...lt,...Ln,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...lt,href:\"fragment\"}},title:x,desc:x,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...lt,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\",...jo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...jo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...lt,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...lt,...Ln,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Ln,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Vo=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],Lt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},$n={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function Ai(t){return/^aria-[a-z]+$/.test(t)}function Ri(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var zo=[\"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\",\"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\",\"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\",\"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\"],Fo=[\"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\"],Bo=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],Yo=[\"media\",\"supports\",\"container\",\"keyframes\"],Wo={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},qo=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],Un=64e3,Rr=4e3,Xo=1e5,Ht=512e3,Cr=1e4,Ko=\"http://www.w3.org/1999/xhtml\",Zo=\"http://www.w3.org/2000/svg\",Ci=new Map(Object.keys(Hn).map(t=>[t.toLowerCase(),t]));function Gn(t){return Ci.get(t.toLowerCase())}function jn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[ct[e]?.attributes,Si]:[Hn[e]?.attributes,ki],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(Ai(r)||Ri(r))return{name:r,kind:\"text\"}}function Jo(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 Qo=[\"wheel\",\"drag\",\"pinch\"];var es=\"~\",Vn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),he=(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=>he(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,he(r,e+1)]))};function ts(){let t=new Map,e=new Map,n=new Map([[es,{children:[],listeners:new Map}]]),r=0,o=d=>{let p=e.get(d);return p===void 0&&(p=r+=1,e.set(d,p),t.set(p,{listener:d,count:0})),t.get(p).count+=1,p},s=d=>{let p=t.get(d);p&&(p.count-=1,!(p.count>0)&&(t.delete(d),e.delete(p.listener)))},i=d=>{let p=n.get(d);if(p){n.delete(d);for(let b of p.listeners.values())s(b);for(let b of p.children)i(b)}},a=(d,p,b=0)=>{if(!Vn(d)||b>64)return he(d);let u=typeof d.id==\"string\"?d.id:void 0,E=p&&u!==void 0&&u!==es;E&&i(u);let T={children:[],listeners:new Map};E&&n.set(u,T);let v={};for(let[h,f]of Object.entries(d))h===\"children\"&&Array.isArray(f)?v[h]=f.map(c=>{let m=a(c,E,b+1);return E&&Vn(c)&&typeof c.id==\"string\"&&T.children.push(c.id),m}):h===\"eventListeners\"&&Vn(f)?v[h]=Object.fromEntries(Object.entries(f).map(([c,m])=>{if(typeof m!=\"function\"||!E)return[c,void 0];let g=o(m);return T.listeners.set(c,g),[c,{listener:g}]})):v[h]=he(f,b+1);return v},l=d=>{if(!Array.isArray(d))return he(d);let[p,b]=d,u=typeof b==\"string\"?n.get(b):void 0;if(p===0){let E=a(d[2],u!==void 0),T=Vn(d[2])?d[2].id:void 0;if(u&&typeof T==\"string\"&&n.has(T)){let v=Number(d[3]);u.children.splice(Number.isInteger(v)&&v>=0&&v<=u.children.length?v:u.children.length,0,T)}return[p,he(b),E,he(d[3])]}if(p===1){let E=Number(d[2]);return u&&Number.isInteger(E)&&E>=0&&E<u.children.length&&i(u.children.splice(E,1)[0]),he(d)}if(p===3&&d[4]===3){let E=String(d[2]),T=d[3],v=u&&typeof T==\"function\"?o(T):void 0,h=u?.listeners.get(E);return h!==void 0&&s(h),v===void 0?u?.listeners.delete(E):u.listeners.set(E,v),[p,he(b),E,v===void 0?void 0:{listener:v},3]}return he(d)};return{encode:d=>d.map(l),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Pr=\"graview-view-root\",Pi=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],_i=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),Ii=t=>Object.freeze({html:t,toString:()=>t}),ns=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),rs=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(rs).join(\"\"):ns(t)?t.html:_i(String(t));function os(t){customElements.get(Pr)||customElements.define(Pr,Mt);let e=Event,n=ts(),r=new Set,o=new Set,s,i=[],a=new Set;for(let y of[\"closest\",\"matches\",\"dataset\"]){let S=()=>{throw new TypeError(`A view's element has no ${y}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};y in Element.prototype||Object.defineProperty(Element.prototype,y,y===\"dataset\"?{get:S}:{value:S})}let l=document.createElement(Pr),d=y=>{let S=k=>{for(let R of Array.from(k.childNodes)){if(R.nodeType!==1)continue;if(oe(R)===y)return R;let A=S(R);if(A)return A}};return S(l)},p=y=>{let S=d(y.target);if(!S)return;let k=new e(y.event,{bubbles:!0}),R={};for(let A of Pi)y[A]!==void 0&&(R[A]=y[A]);for(let A of Object.keys(R))Object.defineProperty(k,A,{value:R[A],enumerable:!0});S.dispatchEvent(k);for(let A of o){if(A.type!==y.event)continue;let L;try{L=new Set(Array.from(l.querySelectorAll(A.selector)))}catch{continue}for(let J=S;J&&J!==l;J=J.parentNode)if(L.has(J)){A.listener(Object.freeze({type:y.event,target:S,element:J,...R}));break}}},b=y=>{if(y.type===\"dom-event\"&&typeof y.target==\"string\")return p(y);if(y.type===\"notice\")return t.warn(y.text);if(y.type!==\"props\")return;s=y.props;let S=t.now();for(let A of r)try{A(y.props)}catch(L){t.threw(L)}let k=t.now()-S,R=y.push;typeof R==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:R,ms:k})))},u;l.connect({mutate(y){u||(u=[],t.microtask(()=>{let S=u??[];u=void 0,t.send({type:\"render\",records:n.encode(S)})})),u.push(...y)},call:()=>{}});let E=y=>y.nodeType===1?y.getAttribute(\"data-key\")??y.getAttribute(\"id\"):null,T=(y,S)=>y.nodeType===S.nodeType&&(y.nodeType!==1||y.localName===S.localName&&y.namespaceURI===S.namespaceURI&&E(y)===E(S));function v(y,S){let k=Array.from(S.childNodes),R=0;for(let A of k){let L=y.childNodes[R]??null;if(L&&T(L,A)){h(L,A),R+=1;continue}if(E(A)!==null){let ve=Array.from(y.childNodes).slice(R+1).find(bt=>T(bt,A));if(ve){y.insertBefore(ve,L),h(ve,A),R+=1;continue}}y.insertBefore(A,L),R+=1}for(;y.childNodes.length>R;)y.removeChild(y.lastChild)}function h(y,S){if(y.nodeType!==1){y.data!==S.data&&(y.data=S.data);return}let k=y,R=S,A=f(k);for(let L of k.getAttributeNames())R.hasAttribute(L)||(k.removeAttribute(L),A&&Ie(k,L,void 0));for(let L of R.getAttributeNames()){let J=R.getAttribute(L);k.getAttribute(L)!==J&&k.setAttribute(L,J),A&&Ie(k,L,J)}v(k,R)}let f=y=>y.localName.includes(\"-\");function c(y){for(let S of Array.from(y.childNodes)){if(S.nodeType!==1)continue;let k=S;if(f(k))for(let R of k.getAttributeNames())Ie(k,R,k.getAttribute(R)??void 0);c(k)}}function m(y,S,k){for(let R of Array.from(y.childNodes)){if(R.nodeType!==1)continue;let A=R,L=A.localName,J=S||L.toLowerCase()===\"svg\",ve=J?Gn(L):Object.prototype.hasOwnProperty.call(ct,L.toLowerCase())?L.toLowerCase():void 0;if(!ve){k.add(`<${L}>`);continue}for(let bt of A.getAttributeNames())(!jn(J?\"svg\":\"html\",ve,bt)||!J&&$n[ve]?.includes(bt.toLowerCase()))&&k.add(`${ve} ${bt}`);m(A,J,k)}}function g(y){let S=document.createElement(\"div\"),k=Array.isArray(y)?y:[y];for(let A of k)if(A!=null)if(typeof A==\"string\"||ns(A)){let L=document.createElement(\"div\");L.innerHTML=typeof A==\"string\"?A:A.html,S.append(...Array.from(L.childNodes))}else S.append(A);let R=new Set;m(S,!1,R),i=[...R],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),c(S),v(l,S)}let N=[],w=new Set(Qo),_=\"[]\",M=!1,V=()=>{M||(M=!0,t.microtask(()=>{M=!1;let y=[...new Map([...o].filter(k=>w.has(k.type)).map(k=>[`${k.type} ${k.selector}`,{event:k.type,selector:k.selector}])).entries()].sort(([k],[R])=>k<R?-1:k>R?1:0).map(([,k])=>k),S=JSON.stringify(y);S!==_&&(_=S,t.send({type:\"gestures\",bound:y}))}))},F=\"[]\",Qn=!1,Xr=()=>{Qn||(Qn=!0,t.microtask(()=>{Qn=!1;let y=[...new Set([...o].filter(k=>k.type===\"click\"&&typeof k.selector==\"string\").map(k=>k.selector))].sort().slice(0,200),S=JSON.stringify(y);S!==F&&(F=S,t.send({type:\"clicks\",selectors:y}))}))};return{view:Object.freeze({get props(){return s},onProps(y){return r.add(y),s&&y(s),()=>void r.delete(y)},render:g,style(y){typeof y!=\"string\"||N.includes(y)||(N.push(y),t.send({type:\"style\",sheets:[...N]}))},on(y,S,k){let R={type:y,selector:S,listener:k};return o.add(R),typeof y==\"string\"&&!a.has(y)&&(a.add(y),t.send({type:\"hears\",events:[y]})),w.has(y)&&V(),y===\"click\"&&Xr(),()=>{o.delete(R),w.has(y)&&V(),y===\"click\"&&Xr()}},act:(y,S={})=>t.act(y,S),navigate(y){if(typeof y==\"string\")return t.navigate(y);let S=Jo(y);S&&t.send(S)},html(y,...S){return Ii(y.reduce((k,R,A)=>k+R+(A<S.length?rs(S[A]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:b,find:y=>{try{let S=l.querySelectorAll(y)[0];return S?oe(S):void 0}catch{return}},listened:y=>{let S=new Set;for(let k of o)if(k.type===y)try{for(let R of Array.from(l.querySelectorAll(k.selector))){let A=oe(R);A&&S.add(A)}}catch{}return[...S]}}}var ss=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function $t(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=ss(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&&ss(s.title)===o):void 0)}var ge=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,dt=\" 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.\",Ut=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var is=[\"https:\",\"mailto:\",\"tel:\"];function as(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!is.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function ls(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=as(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 cs(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 ds(t,e){let n=as(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&cs(e.origins).includes(new URL(n).origin)))return n}function us(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!is.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=cs(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 K=t=>t>=48&&t<=57,fs=t=>K(t)||t>=65&&t<=70||t>=97&&t<=102,Hr=t=>t>=65&&t<=90||t>=97&&t<=122,$r=t=>t>=128,zn=t=>Hr(t)||$r(t)||t===95,ps=t=>zn(t)||K(t)||t===45,ms=t=>t===10,Te=t=>t===10||t===9||t===32,Di=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,fe=-1;function Mi(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 Li(t){let e=Mi(t),n=0,r=(h=0)=>n+h<e.length?e[n+h]:fe,o=[],s=(h,f)=>h===92&&f!==10&&f!==fe,i=(h,f,c)=>h===45?zn(f)||f===45||s(f,c):zn(h)?!0:s(h,f),a=(h,f,c)=>h===43||h===45?K(f)||f===46&&K(c):K(h===46?f:h),l=()=>{let h=r();if(n+=1,h===fe)return 65533;if(fs(h)){let f=String.fromCodePoint(h);for(;f.length<6&&fs(r());)f+=String.fromCodePoint(r()),n+=1;Te(r())&&(n+=1);let c=parseInt(f,16);return c===0||c>=55296&&c<=57343||c>1114111?65533:c}return h},d=()=>{let h=\"\";for(;;){let f=r();if(ps(f))h+=String.fromCodePoint(f),n+=1;else if(s(f,r(1)))n+=1,h+=String.fromCodePoint(l());else return h}},p=()=>{let h=\"\";for((r()===43||r()===45)&&(h+=String.fromCodePoint(e[n++]));K(r());)h+=String.fromCodePoint(e[n++]);if(r()===46&&K(r(1)))for(h+=String.fromCodePoint(e[n++],e[n++]);K(r());)h+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(K(r(1))||(r(1)===43||r(1)===45)&&K(r(2))))for(h+=String.fromCodePoint(e[n++]),K(r())||(h+=String.fromCodePoint(e[n++]));K(r());)h+=String.fromCodePoint(e[n++]);return h},b=()=>{let h=p();return i(r(),r(1),r(2))?{type:\"dimension\",repr:h,unit:d()}:r()===37?(n+=1,{type:\"percentage\",repr:h}):{type:\"number\",repr:h}},u=()=>{for(;;){let h=r();if(n+=1,h===41||h===fe)return;s(h,r())&&l()}},E=()=>{let h=\"\";for(;Te(r());)n+=1;for(;;){let f=r();if(n+=1,f===41)return{type:\"url\",value:h};if(f===fe)return{type:\"url\",value:h};if(Te(f)){for(;Te(r());)n+=1;return r()===41||r()===fe?(r()===41&&(n+=1),{type:\"url\",value:h}):(u(),{type:\"bad-url\"})}if(f===34||f===39||f===40||Di(f))return u(),{type:\"bad-url\"};if(f===92){if(s(f,r()))h+=String.fromCodePoint(l());else return u(),{type:\"bad-url\"};continue}h+=String.fromCodePoint(f)}},T=()=>{let h=d();if(h.toLowerCase()===\"url\"&&r()===40){for(n+=1;Te(r())&&Te(r(1));)n+=1;let f=Te(r())?r(1):r();return f===34||f===39?{type:\"function\",value:h}:E()}return r()===40?(n+=1,{type:\"function\",value:h}):{type:\"ident\",value:h}},v=h=>{let f=\"\";for(;;){let c=r();if(n+=1,c===h||c===fe)return{type:\"string\",value:f};if(ms(c))return n-=1,{type:\"bad-string\"};if(c===92){if(r()===fe)continue;if(ms(r())){n+=1;continue}f+=String.fromCodePoint(l());continue}f+=String.fromCodePoint(c)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==fe&&!(r()===42&&r(1)===47);)n+=1;r()!==fe&&(n+=2)}let h=r();if(h===fe)return o;if(Te(h)){for(;Te(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,h){case 34:case 39:o.push(v(h));continue;case 35:if(ps(r())||s(r(),r(1))){let f=i(r(),r(1),r(2));o.push({type:\"hash\",value:d(),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(h,r(),r(1))?(n-=1,o.push(b())):o.push({type:\"delim\",value:String.fromCodePoint(h)});continue;case 44:o.push({type:\",\"});continue;case 45:a(h,r(),r(1))?(n-=1,o.push(b())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(h,r(),r(1))?(n-=1,o.push(T())):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:d()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(h,r())?(n-=1,o.push(T())):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:K(h)?(n-=1,o.push(b())):zn(h)?(n-=1,o.push(T())):o.push({type:\"delim\",value:String.fromCodePoint(h)})}}}var Es={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},ws=32,Ir=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Ns(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:hs(t,Es[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:hs(t,\")\",e+1)}:n}function hs(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>ws){t.next(),r.push({type:\"bad-string\"});continue}r.push(Ns(t,n))}}function ut(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 d=t[r];if(r+=1,d.type===\";\")break;if(d.type===\"block\"&&d.open===\"{\"){l=d.value;break}a.push(d)}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 Ur(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(...ut(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=Ts(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((d,p)=>p>n&&d.type===\"block\"&&d.open===\"{\");e.push(...ut(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(...ut(t.slice(n,o+1),!1)),n=o+1}return e}function Ts(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 Gr(t){let e=new Ir(Li(t)),n=[];for(;e.peek();)n.push(Ns(e,0));return n}function Fn(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&&K(r)||o===1&&K(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":$r(r)||r===45||r===95||K(r)||Hr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Bn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);$r(r)||r===45||r===95||K(r)||Hr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Dr(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 Hi(t){let e=Bn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Bn(t.slice(1))}`:e}var gs=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 $i(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 Ui(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Fn(t.value);case\"at-keyword\":return`@${Fn(t.value)}`;case\"hash\":return`#${Bn(t.value)}`;case\"string\":return Dr(t.value);case\"url\":return`url(${Dr(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}${Hi(t.unit)}`;case\"func\":return`${Fn(t.name)}(${ft(t.value)})`;case\"block\":return`${t.open}${ft(t.value)}${Es[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function ft(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&$i(gs(n),gs(r))&&(e+=\"/**/\"),e+=Ui(r),n=r);return e}var Gi=new Set(zo),xs=new Set(Fo),ys=new Set(Bo),ji=new Set(Yo),Vi=new Set(qo),bs=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,xe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),zi=t=>xe(t);function Mr(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&&ys.has(t)&&bs.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=xe(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(d=>d.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&ys.has(t)&&bs.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!xs.has(s)){n({reason:\"function\",name:s});return}let i=Mr(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=Mr(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}function Wn(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:zi(t.name);if(!n&&!Gi.has(r)){e({reason:\"property\",name:r});return}let o=Wo[r];if(o){let a=t.value.filter(p=>p.type!==\"whitespace\"),l=a[0],d=a.length===1&&l?.type===\"ident\"?xe(l.value):void 0;if(!d||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(d)){e({reason:\"value\",name:r});return}return`${r}: ${d}${t.important?\" !important\":\"\"}`}let s=Mr(n?void 0:r,t.value,e);if(!s)return;let i=ft(s).trim();return`${n?`--${Bn(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function vs(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=xe(s.type===\"ident\"?s.value:s.name);if(Vi.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 _r(t,e,n){let r=[];for(let o of Ur(t))if(o.type===\"declaration\"){let s=Wn(o,e);s&&r.push(`${s};`)}else{let s=Yn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Fi(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=xe(s.name);return e===\"supports\"&&i===\"selector\"?vs(s.value,n):xs.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Ur(s.value);if(i.length===1&&i[0].type===\"declaration\")return Wn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?ft(t).trim():void 0}function Lr(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(Lt,xe(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:xe(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Lr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Lr(e.value)}:e})}function Yn(t,e,n,r){if(n>ws){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(p=>p.type===\"whitespace\"||p.type===\",\"||p.type===\"percentage\"||p.type===\"ident\"&&[\"from\",\"to\"].includes(xe(p.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${ft(t.prelude).trim()} { ${_r(t.block,e,n)} }`}if(!vs(t.prelude,e))return;let l=ft(Lr(t.prelude)).trim();if(l===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${l} { ${_r(t.block,e,n)} }`}let o=xe(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!ji.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(u=>u.type!==\"whitespace\"),d=l[0];if(l.length!==1||!d||d.type!==\"ident\"&&d.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let p=ut(t.block,!1).map(u=>Yn(u,e,n+1,\"keyframes\")).filter(u=>u!==void 0);return`@keyframes ${d.type===\"ident\"?Fn(d.value):Dr(d.value)} { ${p.join(\" \")} }`}let i=Fi(t.prelude,s,e);if(i===void 0)return;let a=r===\"style\"?_r(t.block,e,n):ut(t.block,!1).map(l=>Yn(l,e,n+1,\"sheet\")).filter(l=>l!==void 0).join(\" \");return`@${s} ${i} { ${a} }`}function Bi(t,e=Un){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:ut(Gr(t),!0).map(s=>Yn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function Ss(t,e=Un){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=Bi(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function Os(t,e=Un){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Ur(Gr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Wn(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function ks(t,e){let n,r=Wn(Ts(t,Gr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function As(t,e){if(e===\"svg\"){let r=Gn(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(ct,n)?Object.prototype.hasOwnProperty.call(Lt,n)?{namespace:\"html\",name:Lt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function qn(t,e){return(t===\"html\"?ct[e]:Hn[e])?.empty===!0}var Yi=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Wi=/^[0-9A-Za-z\\s.,+\\-%()]*$/,qi=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Xi=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Ki=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Rs=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Zi=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Ji(t,e){if(Ki.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(Zi.test(n))return Rs.exec(n)?.[0]}function Cs(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Ps(e.origins),s=Rs.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Ht?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Ht.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 Ps(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 Qi(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:Ps(e).includes(n.origin)?n.href:void 0}catch{return}}function jr(t,e,n,r,o){let s=jn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&$n[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=ea(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>Ht?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>Vo.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 ea(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Xo||!Wi.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>Ht)return o(\"url\");if(Xi.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?Ji(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=Qi(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>Rr)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 Yi.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return qi.test(n)?{value:n}:o(\"url\");case\"style\":{let s=Os(n,Rr);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=ks(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var ta=\"http://www.w3.org/1999/xhtml\",na=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var Xn=(t,...e)=>t.namespaceURI===ta&&e.includes(t.localName),ra=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),oa=t=>Xn(t,\"textarea\",\"select\")||Xn(t,\"input\")&&!na.has(ra(t));function _s(t){if(Xn(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(Xn(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(oa(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 sa=\"http://www.w3.org/1999/xhtml\",pt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Ve?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}},je=class extends pt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Vr=class extends pt{nodeType=8;get textContent(){return\"\"}},Ve=class extends pt{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}},zr=class extends pt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Ve(this,e,n)}createElement(e){return new Ve(this,sa,e)}createTextNode(e){return new je(this,e)}createComment(e){return new Vr(this)}};function Is(){let t=new zr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Fr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Ds=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\"]),Ms=new Set([\"style\",\"template\",\"datalist\",\"option\"]),z=t=>t.replace(/\\s+/g,\" \").trim();function ia(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 se=t=>t instanceof Ve,Gt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function Z(t){return t instanceof je?t.data:!se(t)||Gt(t)||Ms.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(Z).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*ze(t){for(let e of t.childNodes)se(e)&&(yield e,yield*ze(e))}function aa(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 la(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(d=>d.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(d=>d.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(d=>`\"${d.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let d=l.indexOf(\":\"),p=d>0?l.slice(d+1):\"\";d<=0||p===\"\"||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(p)||s.push({at:o,says:`data-drop-connect names \"${p}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Ls(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let u of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(u.id,u);let i=u=>$t(e.places,u)!==void 0;for(let u of ze(t)){let E=u.getAttribute(\"data-act\");E!==null&&r.add(E);let T=E!==null&&u.getAttribute(\"data-debounce\")===null?_s(u):void 0;T&&n.push({at:`drawing <${u.localName} data-act=\"${E}\">`,says:T});let v=u.getAttribute(\"data-record\");v!==null&&(o.add(v),!s.has(v)&&!i(v)&&n.push({at:`drawing <${u.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.${ge(e.places)}${dt}`:`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.${ge(e.places)}`}));let h=u.getAttribute(\"data-place\");h!==null&&!i(h)&&n.push({at:`drawing <${u.localName} data-place=\"${h}\">`,says:e.placesUnsure?`It names the place \"${h}\", which is none of the places this run was told of.${ge(e.places)}${dt}`:`It names the place \"${h}\", which this app does not have.${ge(e.places)}`}),n.push(...aa(u)),n.push(...la(u,e,s))}let a=u=>{if(u.localName===\"graview-video\")return;let E=u.getAttribute(\"data-record\");if(E!==null)return E;let T=u.getAttribute(\"data-key\")??u.getAttribute(\"id\");if(T!==null&&s.has(T))return T;let v=new Set;for(let h of ze(u)){let f=h.getAttribute(\"data-record\");f!==null&&h.localName!==\"graview-video\"&&v.add(f)}return v.size===1?[...v][0]:void 0},l=(u,E)=>{let T=s.get(E),v=T?.kind??(E.includes(\":\")?E.slice(0,E.indexOf(\":\")):\"\"),h=[...ze(u)],f=h.find(g=>g.localName in Fr)??h.find(g=>g.localName===\"a\"&&g.getAttribute(\"data-record\")===E)??h.find(g=>g.localName===\"strong\"||g.localName===\"b\"),c=z(f?Z(f):\"\")||T?.label||E,m=p(u,f);return!f&&m[0]?.t===\"text\"&&z(m[0].text)===c&&m.shift(),{id:E,kind:v,title:c,parts:m}},d=u=>{let E=[...ze(u)].filter(f=>f.localName===\"tr\"&&!Gt(f)),T=E.find(f=>f.parentElement?.localName===\"thead\"||f.childNodes.every(c=>!se(c)||c.localName===\"th\")),v=T?T.childNodes.filter(se).map(f=>z(Z(f))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:E.filter(f=>f!==T).map(f=>{let c=f.childNodes.filter(se),m=a(f),g=m?s.get(m):void 0;return{id:m??\"\",kind:g?.kind??\"\",title:z(Z(c[0]??f)),parts:c.slice(1).map((N,w)=>({t:\"field\",label:v[w+1]??\"\",text:z(Z(N))}))}})}]}};function p(u,E){let T=[],v=\"\",h=()=>{let c=z(v);v=\"\",c&&T.push({t:\"text\",text:c})},f=u.childNodes;for(let c=0;c<f.length;c+=1){let m=f[c];if(m===E)continue;if(m instanceof je){v+=m.data;continue}if(!se(m)||Gt(m)||Ms.has(m.localName))continue;if(E&&[...ze(m)].includes(E)){h(),T.push(...p(m,E));continue}let g=[];for(let N=c;N<f.length;N+=1){let w=f[N];if(w instanceof je&&z(w.data)===\"\")continue;if(!se(w)||Gt(w)||Ds.has(w.localName)||w.localName in Fr)break;let _=a(w);if(!_)break;g.push({element:w,id:_}),c=N}if(g.length>0){h();let N=g.every(w=>w.element.localName===\"li\"||w.element.localName===\"tr\");T.push({t:\"list\",as:N?\"row\":\"card\",columns:1,groups:[{items:g.map(w=>l(w.element,w.id))}]});continue}T.push(...b(m,N=>v+=N,h))}return h(),T}function b(u,E,T){let v=u.localName;if(Ds.has(v)&&v!==\"label\")return E(Z(u)),[];if(v===\"mark\"){T();let f=z(Z(u));return f?[{t:\"badge\",text:f}]:[]}T();let h=Fr[v]??(u.getAttribute(\"role\")===\"heading\"?Number(u.getAttribute(\"aria-level\")??2):void 0);if(h!==void 0){let f=z(Z(u));return f?[{t:\"heading\",level:h,text:f}]:[]}switch(v){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:u.childNodes.filter(c=>se(c)&&c.localName===\"li\"&&!Gt(c)).map(c=>{let m=a(c);if(m)return l(c,m);let g=p(c),N=g[0],w=N&&(N.t===\"text\"||N.t===\"heading\")?N.text:\"\";return{id:\"\",kind:\"\",title:w,parts:w?g.slice(1):g}})}]}];case\"table\":return[d(u)];case\"dl\":{let f=[],c=\"\";for(let m of u.childNodes.filter(se))if(m.localName===\"dt\")c=z(Z(m));else if(m.localName===\"dd\")f.push({t:\"field\",label:c,text:z(Z(m))});else if(m.localName===\"div\")for(let g of m.childNodes.filter(se))g.localName===\"dt\"?c=z(Z(g)):g.localName===\"dd\"&&f.push({t:\"field\",label:c,text:z(Z(g))});return f}case\"figure\":{let f=u.childNodes.find(g=>se(g)&&g.localName===\"figcaption\"),c=z(u.childNodes.filter(g=>g!==f).map(Z).join(\" \")),m=f?z(Z(f)):\"\";return c?[{t:\"figure\",text:c,...m?{label:m}:{}}]:m?[{t:\"text\",text:m}]:[]}case\"meter\":case\"progress\":{let f=Number(u.getAttribute(\"value\")??0),c=Number(u.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:u.getAttribute(\"aria-label\")??u.getAttribute(\"title\")??\"\",text:`${Math.round(f/c*100)}%`}]}case\"svg\":{let f=u.childNodes.find(g=>se(g)&&g.localName===\"title\"),c=z(u.getAttribute(\"aria-label\")??(f?Z(f):\"\"));if(c)return[{t:\"text\",text:c,tone:\"picture\"}];let m=[...ze(u)].filter(g=>g.localName===\"text\").map(g=>z(Z(g))).filter(Boolean);return m.length>0?[{t:\"text\",text:m.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let f=z(u.getAttribute(\"alt\")??\"\");return f?[{t:\"text\",text:f,tone:\"picture\"}]:[]}case\"graview-video\":{let f=u.getAttribute(\"data-field\")??\"\",c=s.get(u.getAttribute(\"data-record\")??\"\"),m=c&&f&&Object.hasOwn(c,f)?c[f]:void 0,g=(Array.isArray(m)?m:[m])[Number(u.getAttribute(\"data-index\")??\"0\")];return!g||typeof g.name!=\"string\"||typeof g.type!=\"string\"||!g.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 g.caption==\"string\"&&g.caption.trim()?g.caption.trim():g.name}, ${ia(typeof g.duration==\"number\"?{duration:g.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let f=z(Z(u));return f?[{t:\"text\",text:f,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let f=z(u.getAttribute(\"aria-label\")??u.getAttribute(\"placeholder\")??u.getAttribute(\"name\")??\"\"),c=v===\"select\"?z(Z(u.childNodes.find(m=>se(m)&&m.localName===\"option\"&&m.selected)??u)):u.value;return[{t:\"field\",label:f,text:c}]}case\"label\":return p(u);default:return p(u)}}return{parts:p(t),problems:n,acts:[...r],records:[...o]}}var ca=0,da=1,ua=2,fa=3,Hs=1,pa=2,$s=3,ma=1,ha=3,ga=8,Us=\"~\",jt=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Gs=new Set([\"input\",\"select\",\"textarea\",\"option\"]),ya=new Set([\"value\",\"checked\",\"selected\"]);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:Us};s.set(Us,a);let l=0,d=!1,p=new Map,b=c=>{o.push(c),o.length>200&&o.shift(),e.onRefused?.(c)},u=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),E=(c,m)=>{if(c.namespace===\"html\"&&c.name&&Gs.has(c.name))return c.dom;if(m?.namespace===\"html\"&&m.name===\"textarea\")return m.dom},T=(c,m,g)=>{let N=c.dom;if(g!=null&&typeof g!=\"string\")return b({reason:\"value\",element:c.name,name:m});let w=jr(c.namespace,c.name,m,g??null,e);if(\"refused\"in w){let F=jr(c.namespace,c.name,m,null,e);return\"refused\"in F||N.removeAttribute(F.name),b(w.refused)}for(let F of w.dropped??[])b(F);let _=c.namespace===\"html\"&&ya.has(w.name)&&Gs.has(c.name),M=N,V=_?w.name===\"value\"?M.value:w.name===\"checked\"?M.checked:M.selected:void 0;w.value===null?N.removeAttribute(w.name):N.setAttribute(w.name,w.value),e.onAttribute?.(N,w.name),_&&(w.name===\"value\"&&\"value\"in M?(M.value=w.value??\"\",V!==M.value&&e.onFieldSet?.(N)):w.name===\"checked\"&&\"checked\"in M?(M.checked=w.value!==null,V!==M.checked&&e.onFieldSet?.(N)):w.name===\"selected\"&&\"selected\"in M&&(M.selected=w.value!==null,V!==M.selected&&e.onFieldSet?.(N.parentElement?.closest(\"select\")??N)))},v=c=>{if(!c.refused){l-=1,c.id!==void 0&&s.delete(c.id);for(let m of c.children)v(m)}},h=(c,m)=>{if(!jt(c)||typeof c.id!=\"string\"||s.has(c.id))return b({reason:\"record\"}),u();if(l>=r)return b({reason:\"budget\"}),d||(d=!0,e.onOverBudget?.()),u();let g=c.id;if(c.type===ga)return u();if(c.type===ha){if(qn(m.namespace,m.name))return b({reason:\"child\",element:m.name}),u();let V=n.createTextNode(String(c.data??\"\").slice(0,Cr)),F={dom:V,children:[],text:!0,id:g,parent:m};return s.set(g,F),i.set(V,g),l+=1,F}if(c.type!==ma)return b({reason:\"record\"}),u();let N=String(c.element);if(qn(m.namespace,m.name))return b({reason:\"child\",element:N}),u();let w=As(N,m.namespace);if(\"refused\"in w)return b(w.refused),u();let _=n.createElementNS(w.namespace===\"svg\"?Zo:Ko,w.name);w.as&&_.setAttribute(\"data-graview-as\",w.as),w.namespace===\"html\"&&w.name===\"img\"&&_.setAttribute(\"referrerpolicy\",\"no-referrer\"),w.namespace===\"html\"&&w.name===\"a\"&&(_.setAttribute(\"target\",\"_blank\"),_.setAttribute(\"rel\",\"noopener noreferrer\"),_.setAttribute(\"referrerpolicy\",\"no-referrer\"));let M={dom:_,name:w.name,namespace:w.namespace,children:[],id:g,parent:m};if(s.set(g,M),i.set(_,g),l+=1,jt(c.attributes))for(let[V,F]of Object.entries(c.attributes))T(M,V,F);if(e.decorate?.(_,w.name,w.namespace),jt(c.properties))for(let V of Object.keys(c.properties))b({reason:\"attribute\",element:w.name,name:V});if(jt(c.eventListeners))for(let V of Object.keys(c.eventListeners))c.eventListeners[V]!=null&&b({reason:\"attribute\",element:w.name,name:`on${V}`});if(Array.isArray(c.children))for(let V of c.children){let F=h(V,M);M.children.push(F),_.appendChild(F.dom)}return M},f=c=>{if(!Array.isArray(c))return b({reason:\"record\"});let[m,g]=c,N=typeof g==\"string\"?s.get(g):void 0;if(!N)return b({reason:\"record\"});switch(m){case ca:{if(N.text)return b({reason:\"record\"});let w=Number(c[3]),_=Number.isInteger(w)&&w>=0&&w<=N.children.length?w:N.children.length,M=c[2],V=jt(M)&&typeof M.id==\"string\"?p.get(M.id):void 0,F;V&&V.parent?.namespace===N.namespace&&!qn(N.namespace,N.name)?(p.delete(M.id),V.parent=N,F=V):F=h(M,N),N.dom.insertBefore(F.dom,N.children[_]?.dom??null),N.children.splice(_,0,F),N.namespace===\"html\"&&N.name===\"textarea\"&&e.onFieldSet?.(N.dom);return}case da:{let w=Number(c[2]),_=N.children[w];if(!_)return b({reason:\"record\"});N.children.splice(w,1),_.dom.parentNode?.removeChild(_.dom),_.id!==void 0&&!_.refused?p.set(_.id,_):v(_);return}case ua:{if(!N.text)return b({reason:\"record\"});N.dom.data=String(c[2]??\"\").slice(0,Cr);let w=E(N,N.parent);w&&e.onFieldSet?.(w);return}case fa:{if(N===a||N.text)return b({reason:\"record\"});let w=String(c[2]),_=c[4]??Hs;return _===pa?T(N,w,c[3]):b(_===Hs||_===$s?{reason:\"attribute\",element:N.name,name:_===$s?`on${w}`:w}:{reason:\"record\"})}default:return b({reason:\"record\"})}};return{apply(c,m){if(!Array.isArray(c))return b({reason:\"record\"}),!0;try{for(let g=0;g<c.length;g+=1){if(m&&g%32===0&&m())return!1;f(c[g])}return!0}finally{for(let g of p.values())v(g);p.clear()}},get refused(){return o},get size(){return l},idOf:c=>i.get(c),elementOf(c){let m=s.get(c);return m&&!m.text&&m!==a?m.dom:void 0},dispose(){for(let c of a.children)v(c);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Vs(t,e,n){let{root:r}=Is(),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=Ss(e);a=l.css;for(let d of l.refused)i.push({reason:\"css\",name:\"stylesheet\",css:d})}return{root:r,refused:i,size:s.size,over:o,css:a,elementOf:l=>s.elementOf(l)}}function ba(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${us(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Cs(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}`:\"\"})`:\"\"}.`}}}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 p of t.asked)if(!r.has(p.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${p.name}\", which its manifest does not name.`};let o=ls(e.props),s=Vs(t.renders,t.sheets,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:p=>p}:{},link:p=>ds(p,{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(p=>!e.places.some(b=>b.as===p)).map(p=>({as:p}))],a=e.placesUnsure===!0,l=Ls(s.root,{props:e.props,places:i,...a?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let p of l.acts)if(!r.has(p))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${p}\" (data-act), which its manifest does not name.`};let d=[...s.refused.map(p=>ba(p,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...l.problems];for(let p of t.went)\"record\"in p&&!(e.props.node?.id===p.record||(e.props.nodes??[]).some(b=>b.id===p.record)||$t(i,p.record))&&d.push({at:\"navigate\",says:a?`It goes to ${Ut(p.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.${ge(i)}${dt}`:`It goes to ${Ut(p.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.${ge(i)}`}),\"place\"in p&&!$t(i,p.place)&&d.push({at:\"navigate\",says:a?`It goes to the place ${Ut(p.place)}, which is none of the places this run was told of.${ge(i)}${dt}`:`It goes to the place ${Ut(p.place)}, which this app does not have.${ge(i)}`});return{ok:!0,parts:l.parts,problems:d,drawn:s}}var Br=\"graviewHeadless\",Yr=\"graviewHeadlessView\";var Ys=globalThis,Ea=Promise.prototype.then,wa=Promise.resolve(),Zn=t=>void Ea.call(wa,t),Kn=Ys.performance,Vt=Kn&&typeof Kn.now==\"function\"?Kn.now.bind(Kn):Date.now,Fe=JSON.stringify,Ws=JSON.parse,Na=Object.defineProperty,qr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),mt=t=>{try{return Ws(Fe(t??null))}catch{return null}},$={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},ye,Jn=(t,e)=>{ye??={reason:t,detail:e}},ht=t=>{$.logs.length<50&&$.logs.push(t.slice(0,500))},yt={removed:[],stuck:[],sealed:!1},gt=os({send(t){$.messages+=1,t.type===\"render\"?$.renders.push(mt(t.records)):t.type===\"style\"?$.sheets=(mt(t.sheets)??[]).map(String):t.type===\"gestures\"?$.gestures=mt(t.bound):t.type===\"navigate\"&&\"place\"in t?$.went.push({place:String(t.place),...t.where!==void 0?{where:mt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&$.went.push({record:String(t.to),...t.where!==void 0?{where:mt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return $.messages+=1,$.asked.push({name:String(t),args:mt(e)}),Promise.resolve({type:\"answer\",id:$.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){$.messages+=1,$.went.push({record:String(t)})},microtask:Zn,now:Vt,threw:t=>Jn(\"error\",`It threw: ${qr(t)}`),warn:ht,hardening:()=>yt}),Fs=!1,Wr=!1;function Ta(t){if(Wr||typeof t!=\"function\"||(Wr=!0,ye))return;let e=Vt();try{t.call(void 0,gt.view)}catch(n){Jn(\"error\",`It threw: ${qr(n)}`)}$.ms+=Vt()-e}async function xa(t){if(Fs)return Fe({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Fs=!0;let e;try{e=Ws(String(t))}catch{return Fe({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Wr&&!ye)return Fe({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=Vt();ye||gt.hear({type:\"props\",props:e.props,push:1}),$.ms+=Vt()-n,$.ms>=e.limits.pushMs&&Jn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!ye;o+=1)await new Promise(s=>Zn(s));if(ye||($.clicks=gt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!ye){let o=gt.find(e.press.selector);if($.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:$.asked.length,went:$.went.length,renders:$.renders.length},o!==void 0){gt.hear({type:\"dom-event\",target:o,event:\"click\"});for(let s=0;s<64&&!ye;s+=1)await new Promise(i=>Zn(i))}}if(ye)return Fe({ok:!1,...ye,transcript:$});let r=zs($,e);return r.ok?Fe({ok:!0,transcript:$,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:yt.removed.length,sealed:yt.sealed}}):Fe({ok:!1,reason:r.reason,detail:r.detail,transcript:$})}var va=Object.freeze({log:(...t)=>ht(t.map(String).join(\" \")),info:(...t)=>ht(t.map(String).join(\" \")),debug:(...t)=>ht(t.map(String).join(\" \")),warn:(...t)=>ht(t.map(String).join(\" \")),error:(...t)=>ht(t.map(qr).join(\" \"))}),Sa=0,Bs=()=>Sa+=1,Oa=[[\"console\",va],[\"setTimeout\",Bs],[\"setInterval\",Bs],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Zn],[\"graview\",gt.view],[Yr,Ta],[Br,t=>xa(t)]];for(let[t,e]of Oa)Na(Ys,t,{value:e,writable:!0,enumerable:!1,configurable:!0});yt=Go(globalThis,[\"graview\",Yr,Br],{primitivesStay:!0});yt.stuck.length>0&&Jn(\"refused\",`This isolate could not be hardened: ${yt.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 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";
8
8
  //# sourceMappingURL=runtime.generated.js.map