@graview/guest 0.2.15 → 0.2.17

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 (103) hide show
  1. package/README.md +110 -11
  2. package/client.js +1 -1
  3. package/dist/channel.d.ts +9 -0
  4. package/dist/channel.d.ts.map +1 -1
  5. package/dist/channel.js +24 -0
  6. package/dist/channel.js.map +1 -1
  7. package/dist/client.generated.d.ts.map +1 -1
  8. package/dist/client.generated.js +2 -2
  9. package/dist/client.generated.js.map +1 -1
  10. package/dist/guest.d.ts.map +1 -1
  11. package/dist/guest.js +35 -0
  12. package/dist/guest.js.map +1 -1
  13. package/dist/headless/describe.d.ts +3 -0
  14. package/dist/headless/describe.d.ts.map +1 -1
  15. package/dist/headless/describe.js +15 -0
  16. package/dist/headless/describe.js.map +1 -1
  17. package/dist/headless/index.d.ts +3 -0
  18. package/dist/headless/index.d.ts.map +1 -1
  19. package/dist/headless/index.js +1 -0
  20. package/dist/headless/index.js.map +1 -1
  21. package/dist/headless/judge.js +2 -2
  22. package/dist/headless/judge.js.map +1 -1
  23. package/dist/headless/protocol.d.ts +3 -0
  24. package/dist/headless/protocol.d.ts.map +1 -1
  25. package/dist/headless/protocol.js.map +1 -1
  26. package/dist/headless/runtime.generated.d.ts.map +1 -1
  27. package/dist/headless/runtime.generated.js +1 -1
  28. package/dist/headless/runtime.generated.js.map +1 -1
  29. package/dist/host/embed-player.d.ts +16 -0
  30. package/dist/host/embed-player.d.ts.map +1 -0
  31. package/dist/host/embed-player.js +248 -0
  32. package/dist/host/embed-player.js.map +1 -0
  33. package/dist/host/embeds.d.ts +48 -0
  34. package/dist/host/embeds.d.ts.map +1 -0
  35. package/dist/host/embeds.js +153 -0
  36. package/dist/host/embeds.js.map +1 -0
  37. package/dist/host/frame.d.ts +12 -0
  38. package/dist/host/frame.d.ts.map +1 -1
  39. package/dist/host/frame.js +136 -5
  40. package/dist/host/frame.js.map +1 -1
  41. package/dist/host/media.d.ts +3 -0
  42. package/dist/host/media.d.ts.map +1 -1
  43. package/dist/host/media.js +23 -0
  44. package/dist/host/media.js.map +1 -1
  45. package/dist/host/mine.d.ts +11 -1
  46. package/dist/host/mine.d.ts.map +1 -1
  47. package/dist/host/mine.js +111 -15
  48. package/dist/host/mine.js.map +1 -1
  49. package/dist/host/open-draw.d.ts +1 -1
  50. package/dist/host/open-draw.d.ts.map +1 -1
  51. package/dist/host/open-draw.js +2 -0
  52. package/dist/host/open-draw.js.map +1 -1
  53. package/dist/host/problems.d.ts +1 -1
  54. package/dist/host/problems.d.ts.map +1 -1
  55. package/dist/host/problems.js +6 -0
  56. package/dist/host/problems.js.map +1 -1
  57. package/dist/host/react.d.ts +17 -0
  58. package/dist/host/react.d.ts.map +1 -1
  59. package/dist/host/react.js +77 -11
  60. package/dist/host/react.js.map +1 -1
  61. package/dist/host/session.d.ts +18 -0
  62. package/dist/host/session.d.ts.map +1 -1
  63. package/dist/host/session.js +38 -4
  64. package/dist/host/session.js.map +1 -1
  65. package/dist/host/view-ahead.d.ts +21 -0
  66. package/dist/host/view-ahead.d.ts.map +1 -0
  67. package/dist/host/view-ahead.js +29 -0
  68. package/dist/host/view-ahead.js.map +1 -0
  69. package/dist/host/view-runtime.generated.d.ts.map +1 -1
  70. package/dist/host/view-runtime.generated.js +1 -1
  71. package/dist/host/view-runtime.generated.js.map +1 -1
  72. package/dist/host/view-script.d.ts +1 -0
  73. package/dist/host/view-script.d.ts.map +1 -1
  74. package/dist/host/view-script.js +1 -1
  75. package/dist/host/view-script.js.map +1 -1
  76. package/dist/host/view.d.ts +30 -0
  77. package/dist/host/view.d.ts.map +1 -1
  78. package/dist/host/view.js +203 -22
  79. package/dist/host/view.js.map +1 -1
  80. package/dist/host/views.d.ts +2 -0
  81. package/dist/host/views.d.ts.map +1 -1
  82. package/dist/host/views.js +1 -0
  83. package/dist/host/views.js.map +1 -1
  84. package/dist/host/worker-react.d.ts +3 -0
  85. package/dist/host/worker-react.d.ts.map +1 -1
  86. package/dist/host/worker-react.js +114 -24
  87. package/dist/host/worker-react.js.map +1 -1
  88. package/dist/host/worker.d.ts +4 -0
  89. package/dist/host/worker.d.ts.map +1 -1
  90. package/dist/host/worker.js +4 -0
  91. package/dist/host/worker.js.map +1 -1
  92. package/dist/open-kit.d.ts +1 -1
  93. package/dist/open-kit.d.ts.map +1 -1
  94. package/dist/open-kit.js +8 -2
  95. package/dist/open-kit.js.map +1 -1
  96. package/dist/protocol.d.ts +13 -0
  97. package/dist/protocol.d.ts.map +1 -1
  98. package/dist/protocol.js +8 -0
  99. package/dist/protocol.js.map +1 -1
  100. package/dist/worker/view-global.d.ts.map +1 -1
  101. package/dist/worker/view-global.js +64 -17
  102. package/dist/worker/view-global.js.map +1 -1
  103. 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 $=Symbol(\"name\"),Ie=Symbol(\"prefix\"),De=Symbol(\"value\"),H=Symbol(\"ns\"),se=Symbol(\"owner\"),W=Symbol(\"owner_document\"),Te=Symbol(\"attributes\"),Y=Symbol(\"prev\"),C=Symbol(\"next\"),U=Symbol(\"child\"),ie=Symbol(\"parent\"),Me=Symbol(\"host\"),me=Symbol(\"data\"),Ve=Symbol(\"listeners\"),_r=Symbol(\"isTrusted\"),ot=Symbol(\"path\"),st=Symbol(\"stop_immediate_propagation\"),it=Symbol(\"dispatching\"),Ae=Symbol(\"content\"),X=Symbol(\"hooks\"),cn=Symbol(\"extensions\"),Be=Symbol(\"hooks_dispatch\"),Q=Symbol(\"is_connected\"),at=Symbol(\"create_element\"),Wo=0,le=1,lt=2,ct=3,dt=8,We=9,Yo=10,Le=11,G=\"http://www.w3.org/1999/xhtml\",he=\"http://www.w3.org/2000/svg\",Xo=\"http://www.w3.org/XML/1998/namespace\",Rt=\"http://www.w3.org/2000/xmlns/\";function dn(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function Z(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function qo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function j(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Ko=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Zo=/[\\0\\t\\n\\f\\r />=]/u,pa=/[\\0\\t\\n\\f\\r />]/u;function Oe(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Jo(t){Ko.test(t)||Cr(t)}function Pr(t){(t===\"\"||Zo.test(t))&&Cr(t)}function un(t,e,n){let r=Oe(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===\"\"||pa.test(i))||(n===\"element\"?!Ko.test(a):a===\"\"||Zo.test(a)))&&Cr(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Xo)throw j(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Rt)throw j(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Rt&&o!==\"xmlns\"&&i!==\"xmlns\")throw j(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function Cr(t){throw j(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var fn=0,pn=1,Qo=2,Ir=3,ma=typeof performance>\"u\"?Date.now:performance.now.bind(performance),ee=class{static NONE=fn;static CAPTURING_PHASE=pn;static AT_TARGET=Qo;static BUBBLING_PHASE=Ir;timeStamp=ma();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=fn;[ot]=[];[st]=!1;[it]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,_r,{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[_r]}composedPath(){return[...this[ot]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[st]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function Dr(t,e,n){if(t.cancelBubble)return;let o=e[Ve]?.get(t.type)?.[n===pn?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Qo:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(ha,0,a)}if(t[st])break}}function ha(t){throw t}var _t=[],mn=new WeakMap;function hn(t,e){let n=mn.get(t);n?n.push(e):mn.set(t,[e]),_t[_t.length-1].push(t)}function te(t){let e=[];_t.push(e);let n;try{n=t()}catch(r){_t.pop();try{es(e)}catch{}throw r}return _t.pop(),es(e),n}function es(t){let e,n=!1;for(let r of t){let o=mn.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}mn.delete(r)}}if(n)throw e}var gn=[],Pt=[],Mr=!1;function Ye(t){for(let e of t)gn.push(e),e[1]&&Pt.push(e[1]);if(!Mr){Mr=!0;try{let e,n=!1;for(let r=0;r<gn.length;r++){let[o,s]=gn[r];s&&Pt.splice(Pt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{gn.length=0,Pt.length=0,Mr=!1}}}function Ct(t){let e=t;for(;e;){if(Pt.includes(e))return!0;e=e[ie]??e[Me]}return!1}var It=Symbol(\"listenerRegistrations\"),$e=class{[Ve]=void 0;[It]=void 0;[W]=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=Lr(o),l=this[It];l||(l=new Map,this[It]=l);let d=l.get(e);d||(d={},l.set(e,d));let g=d[a];if(g||(g=new Map,d[a]=g),g.has(n))return;let m=this,b={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(b.normalizedListener=function(...E){if(b.signal?.aborted){yn(m,b);return}return b.once&&yn(m,b),typeof b.listener==\"object\"?b.listener.handleEvent(...E):b.listener.call(this,...E)});let p=this[Ve];p||(p=new Map,this[Ve]=p);let f=p.get(e);f||(f={},p.set(e,f));let A=f[a];if(A||(A=new Set,f[a]=A),g.set(n,b),A.add(b),i){let u=()=>{yn(m,b)};b.abortListener=u,i.addEventListener(\"abort\",u,{once:!0})}this[W]?.defaultView[Be].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return ga.call(this,e,n,r)}dispatchEvent(e){if(e[it])throw j(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[it]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[ot]=n;for(let s=n.length;s--;)if(Dr(e,n[s],pn),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Dr(e,o[s],Ir),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[it]=!1,e.cancelBubble=!1,e[st]=!1,e.eventPhase=fn,e.currentTarget=null,e[ot]=[]}}};function ga(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Lr(!!r),s=this[It]?.get(t)?.[o]?.get(e);s&&yn(this,s)}function Lr(t){return t?\"capture\":\"bubble\"}function yn(t,e){let n=Lr(e.capture),r=t[It],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[Ve],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[W]?.defaultView[Be].removeEventListener?.(t,e.type,e.listener,e.capture))}var ge=class extends Array{item(e){return this[e]??null}};var Mt=0,ts=1,Fr=2,Ur=3,Lt=4,ns=0,rs=1,wn=2,Nn=3,os=4,Hr=5,ss=6,is=7,bn=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function ya(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function ae(t){throw j(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Tn(t,e){let n=typeof e==\"string\"?$t(e):[{combinator:Lt,matchers:e}],r=null,o=t[U];return o&&n[0].matchers.length&&Gr(o,n,s=>(r=s,!1)),r}function xn(t,e){let n=typeof e==\"string\"?$t(e):[{combinator:Lt,matchers:e}],r=new ge,o=t[U];return o&&n[0].matchers.length&&Gr(o,n,s=>{r.push(s)}),r}function $t(t,e=!1,n=!1){let r={combinator:Lt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===\">\"?r.combinator=ts:l[1]===\"+\"?r.combinator=Ur:l[1]===\"~\"?r.combinator=Fr:r.combinator=Mt,r={combinator:Lt,matchers:[]},o.push(r));let d=l[8]?Z(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let m,b=l[4]??l[5]??l[7];if(l[2]){bn.test(d)||ae(t);let p=l[5],f=p?.[0];if(l[3]==null&&(f==='\"'||f===\"'\")){let A=l[0].lastIndexOf(p);b=i.slice(l.index+A+1),s.lastIndex=i.length}else p!=null&&!bn.test(p)&&ae(t);m=os}else l[6]?(bn.test(d)||ae(t),m=l[6]===\"#\"?wn:Nn):l[8]?m=l[9]==null?Hr:ss:l[7]===\"*\"?m=ns:l[7]&&bn.test(l[7])?m=rs:ae(t);l[9]?([b,s.lastIndex]=ya(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&ae(t),d===\"has\"&&e&&ae(t),$t(b,e||d===\"has\",d===\"has\")):m===Hr&&ae(t),r.matchers.push({type:m,name:d,value:b}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function ba(t,e){let n=$t(e);return n[0]?.matchers.length?Dt(t,n):!1}function Ea(t,e){let n=$t(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Mt,s={type:is,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Mt,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===Ur||o===Fr?t[C]:t[U];if(!i)return!1;let a=!1;return Gr(i,n,()=>(a=!0,!1),t),a}function Gr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(Dt(s,e,r)&&n(s)===!1)return!1;let i=s[U];if(i){let a=s[C];a&&o.push(a),s=i;continue}}s=s[C]??o.pop()??null}return!0}function Dt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Lt){if(!En(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Dt(t,a,n)}let s=r===ts||r===Mt?ie:Y,i=t[s];if(!i)return!1;if(r===Mt||r===Fr){for(;i;){if(oe(i)&&En(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Dt(i,a,n))return!0}i=i[s]}return!1}else{if(r===Ur&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!En(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Dt(i,a,n)}}function $r(t,e){return t.getAttributeNS(null,t.namespaceURI===G?Z(e):e)}function En(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(En(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case ns:return o===\"*\";case rs:return t.namespaceURI===G?t.localName===Z(o):t.localName===o;case wn:return $r(t,\"id\")===o;case Nn:let i=$r(t,\"class\");return i?dn(i).includes(o):!1;case os:let a=$r(t,o);return s==null?a!=null:a===s;case is:return t===n;case Hr:ae(`:${o}`);case ss:switch(o){case\"has\":return Ea(t,s||\"\");case\"not\":return!ba(t,s||\"\");default:ae(`:${o}(${s})`)}}return!1}function wa(t){return t.nodeType===lt}function Ht(t){return me in t}function zr(t){return t.nodeType===ct}function Na(t){return t.nodeType===dt}function oe(t){return t.nodeType===le}function jr(t){return t.nodeType===Le}function ds(t){return\"appendChild\"in t}function Sn(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 Ut(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let d=l[Te];if(d)for(let m of d)o.has(m)||(o.add(m),e.push(m));let g=l[Ae];g&&!o.has(g)&&!r.has(g)&&(r.add(g),n.push(g))}s??=a}return{nodes:e,treeNodes:s}}function Ft(t,e){for(let n of t)n[W]=e}function as(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[W]=e,r}function ls(t,e){if(zr(t))return e.createTextNode(t.data);if(Na(t))return e.createComment(t.data);if(wa(t))return as(t,e);if(oe(t)){let n=e[at](t[$],t.namespaceURI,t[Ie],t.localName);if(t[Te])for(let r=0;r<t[Te].length;r++){let o=t[Te].item(r);n.attributes.setNamedItem(as(o,e))}return n}else{if(jr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[W]=e,n}}}function vn(t,e,n=t.ownerDocument){if(t.nodeType===We)throw j(\"Cannot clone a document node\",\"NotSupportedError\");let r=ls(t,n);if(!e||!oe(t)&&!jr(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,oe(i.source)&&i.source.namespaceURI===G&&i.source.localName===\"template\"){let g=i.source[Ae];g&&(o.has(g)&&cs(),o.add(g),i.contentSource=g,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&cs(),o.add(a);let d=ls(a,n);oe(a)||jr(a)?s.push({source:a,destination:d,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(d)}return r}function cs(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function kn(t,e){let n=String(e);return n===\"\"?null:Tn(t,[{type:wn,name:n}])}function An(t,e){let n=[...new Set(dn(String(e)))];return xn(t,n.map(r=>({type:Nn,name:r})))}function On(t,e){let n=String(e),r=Z(n),o=[];for(let s of Rn(t))oe(s)&&(n===\"*\"||(s.namespaceURI===G?s[$]===r:s[$]===n))&&o.push(s);return o}function Rn(t){let e=[],n=[],r=t[U];for(;r;){e.push(r);let o=r[U],s=r[C];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Ut(t){let e=Rn(t);return e.unshift(t),e}var ye=class extends $e{nodeType=Wo;[$]=\"\";[ie]=null;[Me]=null;[U]=null;[Y]=null;[C]=null;[Q]=!1;get[X](){return this[W].defaultView[Be]}get localName(){return this[$]}get nodeName(){return this[$]}get ownerDocument(){return this[W]}get isConnected(){return this[Q]}isDefaultNamespace(e){let n=Oe(e);return Ta(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[Y]}set previousSibling(e){}get nextSibling(){return this[C]}set nextSibling(e){}get previousElementSibling(){let e=this[Y];for(;e&&e.nodeType!==1;)e=e[Y];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[C];for(;e&&e.nodeType!==1;)e=e[C];return e}set nextElementSibling(e){}get firstChild(){return this[U]}set firstChild(e){}get lastChild(){let e=this[U];for(;e;){let n=e[C];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Ht(this)?this.data:null}set nodeValue(e){Ht(this)&&(this.data=e)}get textContent(){if(Ht(this))return this.data;let e=\"\";for(let n of Rn(this))zr(n)&&(e+=n.data);return e}set textContent(e){if(Ht(this))this.data=e;else if(ds(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return vn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Ta(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Rt,\"xmlns\");if(r!=null&&r.prefix==null)return Oe(r.value);e=n.parentElement;break}case We:e=e.documentElement;break;case Yo:case Le:return null;case lt:e=e.ownerElement;break;default:e=e.parentElement}return null}var be=Symbol(\"insertNode\"),Wr=Symbol(\"preflightInsertions\"),_n=Symbol(\"replaceNode\"),He=class extends ye{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Xe(e),r=this.parentNode;if(r)return Vr(o=>{Re(r,n);let s=this[C];for(;s&&n.includes(s);)s=s[C];let i=Br(r,n,o);this.parentNode===r?r[_n](i,this,o):r[be](i,s,o)})}before(...e){let n=Xe(e),r=this.parentNode;if(r)return Vr(o=>{Re(r,n);let s=this[Y];for(;s&&n.includes(s);)s=s[Y];let i=Br(r,n,o);r[be](i,s?s[C]:r.firstChild,o)})}after(...e){let n=Xe(e),r=this.parentNode;if(r)return Vr(o=>{Re(r,n);let s=this[C];for(;s&&n.includes(s);)s=s[C];let i=Br(r,n,o);r[be](i,s,o)})}};function Vr(t){return te(()=>{let e=[];try{t(e)}catch(n){try{Ye(e)}catch{}throw n}Ye(e)})}function Xe(t){return t.map(e=>e instanceof ye?e:String(e))}function Gt(t,e){return e instanceof ye?e:t.ownerDocument.createTextNode(String(e))}function Re(t,e){for(let n of e){if(!(n instanceof ye))continue;let r=t;for(;r;){if(r===n)throw j(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ie]??r[Me]}}}function Br(t,e,n){let r=[];for(let s of e)r.push(Gt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Wr](r);for(let s of r)o[be](s,null,n);return o}var Pn,Yr=0,us=0,fs=0,ps=0,ut=!1,qr=!1,jt=!1,Cn=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=xa(n),o=Pn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Yr++:Xr(i,-1),s.set(this,r),Xr(r,1),this.#e.add(e)}disconnect(){let e=Pn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Yr--,Xr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Yr===0&&(Pn=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 Ee(t){let e=Pn;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 ge,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 ge,target:t.target,type:t.type})}function In(...t){let e=new ge;return e.push(...t),e}function xa(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&&(us+=e),t.characterData&&(fs+=e),t.childList&&(ps+=e),ut=us>0,qr=fs>0,jt=ps>0}var xe=class extends He{childNodes=new ge;children=new ge;appendChild(e){return te(()=>this[be](e,null))}insertBefore(e,n){return te(()=>this[be](e,n||null))}append(...e){return te(()=>{let n=Xe(e.filter(r=>r!=null));n.length>1&&Re(this,n);for(let r of n)this[be](Gt(this,r),null)})}prepend(...e){return te(()=>{let n=Xe(e.filter(o=>o!=null));n.length>1&&Re(this,n);let r=this.firstChild;for(let o of n)this[be](Gt(this,o),r)})}replaceChildren(...e){return te(()=>{let n=Xe(e.filter(o=>o!=null));Re(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[be](Gt(this,o),null)})}removeChild(e){return te(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw j(\"The node is not a child of this node\",\"NotFoundError\");let n=this[Q]?Ut(e):void 0,r=e[Y],o=e[C],s=Dn(this,e);if(n)for(let i of n)i[Q]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ye(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return te(()=>this[_n](e,n))}[_n](e,n,r){if(Re(this,[e]),n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[Y],s=n[C],i=this.prepareInsertion(e),a=this[Q]?Ut(n):void 0,l=new Set(i.map(({node:b})=>b)),d=s;for(;d&&l.has(d);)d=d[C];let g=Dn(this,n);if(a){for(let p of a)p[Q]=!1;let b=new Set(a);for(let p of i)b.has(p.node)&&(p.shouldDisconnect=!1)}this.commitInsertion(i,d);let m=this[Q];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,m),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,g),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return xn(this,e)}querySelector(e){return Tn(this,e)}[be](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(Re(this,[e]),n&&n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[C]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[Q];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ye(e)}prepareInsertion(e){let n=[];if(e.nodeType===Le){let i=e[U];for(;i;)n.push(i),i=i[C]}else n.push(e);let r=this[Q],o=this[W],s=[];for(let i of n){let a=i[Q],l=a||r,d,g;if(i[W]===o)l&&(d=Ut(i));else{let m=Sn(i);g=m.nodes,l&&(d=m.treeNodes)}s.push({node:i,nodes:d,adoption:g,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[Y],l=s.node[C];s.source={parent:i,index:Dn(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[W];for(let{adoption:s}of e)s&&Ft(s,r);let o=this[Q];for(let{nodes:s}of e)if(s)for(let i of s)i[Q]=o}attachChild(e,n){if(n){let s=n[Y];e[C]=n,e[Y]=s,s?s[C]=e:this[U]=e,n[Y]=e}else{e[C]=null;let s=this[U];if(s){let i;for(;i=s[C];)s=i;s[C]=e,e[Y]=s}else this[U]=e,e[Y]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[C];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[Y],nextSibling:e[C]}}queueRemovalMutationRecord(e,n,r,o){jt&&Ee({type:\"childList\",target:e,removedNodes:In(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(jt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),Ee({type:\"childList\",target:this,addedNodes:In(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||Ct(this)?[]:[[()=>this[X].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!Ct(s.parent)&&n.push([()=>s.parent[X].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!Ct(this)&&n.push([()=>this[X].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){hs(e,n)}};function ms(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[Q]?n.treeNodes:void 0,s=e[Y],i=e[C],a=Dn(t,e);if(o)for(let d of o)d[Q]=!1;Ft(n.nodes,r),jt&&Ee({type:\"childList\",target:t,removedNodes:In(e),previousSibling:s,nextSibling:i}),o&&hs(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!Ct(t)&&l.push([()=>t[X].removeChild?.(t,e,a)]),Ye(l)}function Dn(t,e){let n=e[Y],r=e[C];n?n[C]=r:t[U]=r,r&&(r[Y]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[C]=null,e[Y]=null,o}function hs(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&hn(n,()=>r.call(n))}}function zt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||hn(t,()=>i.call(t,e,n,r,o))}var Mn=class{[U]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][H]===G?Z(n):n,o=this[U];for(;o;){if(o.name===r)return o;o=o[C]}return null}getNamedItemNS(e,n){let r=Oe(e),o=String(n),s=this[U];for(;s;){if(s.localName===o&&s[H]===r)return s;s=s[C]}return null}item(e){let n=this[U],r=0;for(;n;){if(r++===e)return n;n=n[C]}return null}get length(){let e=0,n=this[U];for(;n;)e++,n=n[C];return e}removeNamedItem(e){let n=String(e),r=this[se][H]===G?Z(n):n;return te(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=Oe(e),o=String(n);return te(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[H]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[U],o=null;for(;r!=null;){if(e(r)){o&&(o[C]=r[C]),this[U]===r&&(this[U]=r[C]);let s=r.value;return r[C]=null,r[se]=null,ut&&Ee({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[H],oldValue:s}),n[X].removeAttribute?.(n,r.name,r[H]),zt(n,r.localName,s,null,r[H]),r}o=r,r=r[C]}return null}setNamedItem(e){return te(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw j(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[U],i=null;for(;s;){if(s.localName===e.localName&&s[H]===e[H]){if(s===e)return s;i?i[C]=e:this[U]=e,e[C]=s[C],s[C]=null,o=s;break}i=s,s=s[C]}o==null&&(i?i[C]=e:this[U]=e),e[se]=n,e[W]=n[W],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&ut&&Ee({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[H],oldValue:o?.value??null}),l&&n[X].removeAttribute?.(n,o.name,o[H]),(a||l)&&n[X].setAttribute?.(n,e.name,e.value,e[H]),a&&zt(n,e.localName,o?.value??null,e.value,e[H]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[U];for(;e;)yield e,e=e[C]}};var qe=class extends ye{nodeType=lt;[H]=null;[C]=null;[se]=null;constructor(e,n,r){super(),this[$]=e,this[De]=n,r&&(this[H]=r)}get nodeName(){return this[$]}set nodeName(e){}get name(){return this[$]}set name(e){}get localName(){if(this[H]==null)return this[$];let e=this[$].indexOf(\":\");return e<0?this[$]:this[$].slice(e+1)}get prefix(){if(this[H]==null)return null;let e=this[$].indexOf(\":\");return e<0?null:this[$].slice(0,e)}get value(){return this[De]}set value(e){let n=String(e),r=this[se];if(!r){this[De]=n;return}te(()=>{let o=this[De];this[De]=n,ut&&o!==n&&Ee({type:\"attributes\",target:r,attributeName:this[$],attributeNamespace:this[H],oldValue:o}),this[X].setAttribute?.(r,this[$],n,this[H]),zt(r,this.localName,o,n,this[H])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[H]}get specified(){return!0}};var Sa={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},va=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),ka=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,bs=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Aa=\"|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|\",Oa=/^(?:color|face|size)$/i;function gs(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 Sa[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Es(t){return t.namespaceURI===G&&va.has(t.localName)}function ys(t){let e=t.localName;return t[H]===he&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Ra(t,e){if(Aa.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(bs))if(Oa.test(n[1]))return!0;return!1}function Ln(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(ka)){let a=i[1];if(a){let l=i[2],d=Z(a),g=o[o.length-1]?.element??e,m=g[H]===he?he:G;if(d===\"svg\")m=he;else if(m===he){if(ys(g))m=G;else if(Ra(d,l)){for(;o.length>0;){let f=o[o.length-1];if(f.element[H]!==he||ys(f.element))break;o.pop(),s=f.target}m=G}}let b=m===G?d:a,p=n[at](b,m,null,b);for(let f of l.matchAll(bs))p.setAttribute(f[1],gs(f[3]||f[4]||\"\"));if(s.append(p),Es(p)||m!==G&&i[4])continue;o.push({element:p,target:s}),s=m===G&&d===\"template\"?p.content:p}else if(i[5]){let l=Z(i[5]);for(let d=o.length-1;d>=0;d--){let g=o[d],m=Z(g.element[$]);if(m===l){s=g.target,o.length=d;break}if(g.element[H]===G&&m===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(gs(i[7]))}return r}function $n(t){return Ns([{type:\"content\",child:t[U]}])}function ws(t){return Ns([{type:\"opening\",node:t}])}function Ns(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case le:{let o=r;e.push(`<${o[$]}`);let s=o[Te]?.[U];for(;s;){e.push(` ${s[$]}`);let a=s[De];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[C]}if(e.push(\">\"),Es(o))break;let i=o.namespaceURI===G&&o.localName===\"template\"?o[Ae]:o;t.push({type:\"closing\",name:o[$]}),t.push({type:\"content\",child:i?.[U]??null});break}case ct:{let o=r;e.push(o[me].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case dt:{let o=r;e.push(`<!--${o[me]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[C]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var J=class extends xe{nodeType=le;[H]=G;[Ie]=null;get namespaceURI(){return this[H]}get prefix(){return this[Ie]}get localName(){let e=this[Ie];return e==null?this[$]:this[$].slice(e.length+1)}get nodeName(){return this[H]===G?qo(this[$]):this[$]}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 qe(\"slot\",n))}get attributes(){let e=this[Te];return e||(e=new Mn(this),this[Te]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return On(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return An(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);Pr(r);let s=this[H]===G?Z(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new qe(s,o))}setAttributeNS(e,n,r){let o=Oe(e),s=String(n),i=String(r),a=un(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new qe(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);Pr(r);let o=this[H]===G?Z(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 qe(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[H]===G?Z(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return ws(this)}get innerHTML(){return $n(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Ln(String(e),this);this.replaceChildren(n)}}};var ft=class t extends J{[H]=he;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Fe=class extends He{[me]=\"\";constructor(e){super(),this[me]=e==null?\"\":String(e)}setData(e){let n=qr,r=n?this[me]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[me]=o,n&&r!==o&&Ee({type:\"characterData\",target:this,oldValue:r}),this[X].setText?.(this,o)}get data(){return this[me]}set data(e){this.setData(e)}};var pt=class extends Fe{nodeType=ct;[$]=\"#text\"};var mt=class extends Fe{nodeType=dt;[$]=\"#comment\"};var ht=class extends xe{nodeType=Le;[$]=\"#document-fragment\";[W]=typeof window<\"u\"?window.document:null;getElementById(e){return kn(this,e)}};var gt=class extends J{get content(){let e=this[Ae];return e||(e=this.ownerDocument.createDocumentFragment(),e[Me]=this,this[Ae]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Ln(String(e),this))}get innerHTML(){let e=this[Ae];return e?$n(e):\"\"}};var Hn=class extends J{};var Fn=class extends J{};var Un=class extends J{};var Vt=class extends xe{nodeType=We;[$]=\"#document\";[Q]=!0;constructor(e){super(),this.defaultView=e,this[W]=this,this.documentElement=jn(new Un,this,\"html\"),this.body=jn(new Hn,this,\"body\"),this.head=jn(new Fn,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 An(this,e)}createElement(e){let n=String(e);return Jo(n),Kr(this,Z(n))}createElementNS(e,n){let r=un(e,n,\"element\");return Kr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[at](e,n,r,o){return Kr(this,e,n,r,o)}createTextNode(e){let n=Gn(new pt(e),this);return this[X].createText?.(n,n.data),n}createComment(e){return Gn(new mt(e),this)}createDocumentFragment(){return Gn(new ht,this)}createEvent(){return new ee(\"\")}getElementById(e){return kn(this,e)}getElementsByTagName(e){return On(this,e)}importNode(e,n){if(e.nodeType===We)throw j(\"Cannot import a document node\",\"NotSupportedError\");return vn(e,n,this)}adoptNode(e){if(e[W]===this)return e;let n=Sn(e);return te(()=>{let r=e.parentNode;return r?ms(r,e,n,this):Ft(n.nodes,this),e})}};function Gn(t,e){return Object.defineProperty(t,W,{value:e,writable:!0,enumerable:!1}),t}function Kr(t,e,n=G,r=null,o=e){let s;if(n===he)s=new ft;else if(n===G&&o===\"template\")s=new gt;else if(n===G){let i=t.defaultView.customElements.get(o);s=i?new i:new J}else s=new J;return jn(s,t,e,n,r)}function jn(t,e,n,r=G,o=null){return Gn(t,e),Object.defineProperties(t,{[$]:{value:n},[H]:{value:r},[Ie]:{value:o}}),e[X].createElement?.(t,r),t}var zn=class extends ee{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 Vn=class extends ee{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 Bn=class extends ee{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Wn=class extends ee{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Yn=class extends ee{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Xn=class extends ee{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var qn=class extends J{};var _a=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Pa=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Ts(t){return _a.test(t)&&!Pa.has(t)}function xs(t){return j(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Kn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Ts(e))throw xs(e);if(this.registry.has(e))throw j(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw j(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!Ts(e))return Promise.reject(xs(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 Ca=[\"onerror\",\"onunhandledrejection\"],vs=Symbol.for(\"@remote-dom/polyfill/global-property\");function ks(t){return Object.getOwnPropertyDescriptors(t)}function As(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors($e.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Zr(r.value.bind(t)),e[n]=r);return e}function Os(t){let e={};for(let n of Ca)e[n]={configurable:!0,enumerable:!0,get:Zr(()=>t[n]),set:Zr(r=>{t[n]=r})};return e}function Ia(t){return Object.assign(ks(t),As(t),Os(t))}function Zr(t){return Object.defineProperty(t,vs,{value:!0}),t}function Ss(t,e){for(let n of Reflect.ownKeys(e)){let r=Da(t,n);(r==null||Ma(r))&&Object.defineProperty(t,n,e[n])}}function Da(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ma(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[vs]===!0)}var Ke=class extends $e{[X]={};[cn]=[];[Be]=$a(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Vt(this);customElements=new Kn;location=globalThis.location;navigator=globalThis.navigator;Event=ee;ErrorEvent=Vn;PromiseRejectionEvent=Bn;ToggleEvent=Wn;FocusEvent=Yn;ClipboardEvent=Xn;EventTarget=$e;CustomEvent=zn;Node=ye;ParentNode=xe;ChildNode=He;DocumentFragment=ht;Document=Vt;CharacterData=Fe;Comment=mt;Text=pt;Element=J;HTMLElement=qn;SVGElement=ft;HTMLTemplateElement=gt;MutationObserver=Cn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)La(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=ks(e),s=Object.assign(As(e),Os(e));delete o.self,Object.defineProperties(globalThis,o),Ss(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),Ss(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Ia(e))}};function La(t,e){t[cn].push(e(t)??{})}function $a(t){return{createElement:_e.bind(null,t,\"createElement\"),setAttribute:_e.bind(null,t,\"setAttribute\"),removeAttribute:_e.bind(null,t,\"removeAttribute\"),createText:_e.bind(null,t,\"createText\"),setText:_e.bind(null,t,\"setText\"),insertChild:_e.bind(null,t,\"insertChild\"),removeChild:_e.bind(null,t,\"removeChild\"),addEventListener:_e.bind(null,t,\"addEventListener\"),removeEventListener:_e.bind(null,t,\"removeEventListener\")}}function _e(t,e,...n){for(let s of t[cn])s[e]?.apply(s,n);let r=t[X];r[e]?.apply(r,n)}var Zn=new Ke;var Jr=\"~\";var Ue=new WeakMap;function yt(t){return Ue.get(t)}var no=new WeakMap,Fa=0;function ce(t){let e=no.get(t);return e==null&&(e=String(Fa++),Jn(t,e)),e}function Jn(t,e){no.set(t,e)}var eo=new WeakMap;function Ua(t){return eo.get(t)}var to=new WeakMap;function Ga(t){let e=to.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 ja=new WeakMap;function za(t){return ja.get(t)}function ro(t,e,n){let r=eo.get(t);if(r==null&&(r={},eo.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=to.get(t);if(r==null&&(r={},to.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function bt(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)bt(t.childNodes[r],e)}function Qn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Qn(t.childNodes[n])}function Et(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Qr(Ua(t)),attributes:Qr(Ga(t)),eventListeners:Qr(za(t)),children:Array.from(t.childNodes).map(Et)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Qr(t){return t?{...t}:void 0}function oo(t,e,...n){let r=no.get(t),o=Ue.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var wt=Zn[X];wt.insertChild=(t,e,n)=>{let r=yt(t);r!=null&&(bt(e,r),r.mutate([[0,ce(t),Et(e),n]]))};wt.removeChild=(t,e,n)=>{let r=yt(t);r!=null&&(Qn(e),r.mutate([[1,ce(t),n]]))};wt.setText=(t,e)=>{let n=yt(t);n?.mutate([[2,ce(t),e]])};wt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ge(t,e,n)};wt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ge(t,e)};Ke.setGlobal(Zn);function _s(t,e){if(typeof t!=\"string\"||t.length===0||t.length>200)return\"A kept value's key is a string of 1 to 200 characters, so this one was not kept.\";if(e!==null){if(typeof e!=\"string\")return\"A view keeps a string or null; JSON.stringify anything else, so this one was not kept.\";if(e.length>4096||new TextEncoder().encode(e).length>4096)return\"A kept value is at most 4 KB, and this one is longer, so it was not kept.\"}}function Ps(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var Cs=[\"wheel\",\"drag\",\"pinch\"];var er=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var Ds=[\"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\"],Ms=[\"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\"],Ls=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],$s=[\"TEMPORARY\",\"PERSISTENT\"],$f=Object.freeze([...Ds,...Ms,...Ls,...$s]),Hf=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Is=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Hs(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Ds,...Ms,...Ls,...e,\"constructor\",Symbol.toStringTag]),i=(h,T)=>{let O=Reflect.getOwnPropertyDescriptor(h,T);return O===void 0||!(\"value\"in O)||O.writable||O.configurable?!1:n.primitivesStay&&typeof T==\"symbol\"&&(typeof O.value!=\"object\"||O.value===null)&&typeof O.value!=\"function\"?!0:$s.includes(T)&&typeof O.value==\"number\"},a=t,l=a.setTimeout,d=a.setInterval,g=a.crypto,m=(h,T)=>function(O,y,...N){if(typeof O!=\"function\")throw new TypeError(`${T} takes a function: a guest view cannot run code from text`);return h.call(t,O,y,...N)},b=g?Object.freeze({getRandomValues:h=>g.getRandomValues(h)}):void 0,p=a.document?.defaultView;if(p&&p!==a)for(let h of Reflect.ownKeys(p))typeof h==\"symbol\"||s.has(h)||Reflect.deleteProperty(p,h)||o.push(`window.${h}`);let f=[];for(let h=t;h&&h!==Object.prototype;h=Object.getPrototypeOf(h))f.push(h);for(let h of f)for(let T of Reflect.ownKeys(h))s.has(T)||(Reflect.deleteProperty(h,T)?r.push(Is(T)):i(h,T)||o.push(Is(T)));let A=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},u=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let h of u){let T=A();Object.defineProperty(T,\"prototype\",{value:h,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(h,\"constructor\",{value:T,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),h===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:T,writable:!0,enumerable:!1,configurable:!0})}let E=(h,T)=>{Reflect.defineProperty(t,h,{value:T,writable:!0,enumerable:!0,configurable:!0})||o.push(h)};E(\"setTimeout\",m(l,\"setTimeout\")),E(\"setInterval\",m(d,\"setInterval\")),b&&E(\"crypto\",b);for(let h of f.slice(1))Object.freeze(h);for(let h of Reflect.ownKeys(t)){let T=Reflect.getOwnPropertyDescriptor(t,h);Reflect.defineProperty(t,h,\"value\"in T?{...T,writable:!1,configurable:!1}:{...T,configurable:!1})}let v;try{v=Reflect.preventExtensions(t)}catch{v=!1}return{removed:r,stuck:o,sealed:v}}var Bt=class extends HTMLElement{constructor(){super(),Jn(this,Jr)}connect(e){if(yt(this)===e||(bt(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,Jr,Et(o),r])}e.mutate(n)}updateRemoteProperty(e,n){ro(this,e,n)}callRemoteMethod(e,...n){return oo(this,e,...n)}};var _={},so={empty:!0},Va={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\"},Nt={div:_,section:_,article:_,aside:_,header:_,footer:_,nav:_,hgroup:_,search:_,address:_,figure:_,figcaption:_,blockquote:_,p:_,pre:_,hr:so,br:so,wbr:so,h1:_,h2:_,h3:_,h4:_,h5:_,h6:_,span:_,strong:_,em:_,b:_,i:_,u:_,s:_,small:_,mark:_,abbr:_,cite:_,q:_,code:_,kbd:_,samp:_,var:_,sub:_,sup:_,dfn:_,bdi:_,bdo:_,ruby:_,rt:_,rp:_,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:_,menu:_,dl:_,dt:_,dd:_,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:_,caption:_,thead:_,tbody:_,tfoot:_,tr:_,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:_,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:_,output:_,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\"]},loading:{oneOf:[\"lazy\",\"eager\"]},fetchpriority:{oneOf:[\"high\",\"low\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\"}}},Ba=[\"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\"],Wa={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(Ba.map(t=>[t,\"css\"]))},Pe={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},tr={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Fs={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Us={oneOf:[\"R\",\"G\",\"B\",\"A\"]},we={...Pe,in:\"text\",result:\"text\"},Gs={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},nr={svg:{attributes:{...Pe,...tr}},g:_,defs:_,symbol:{attributes:{...Pe,...tr,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Pe,href:\"fragment\"}},title:_,desc:_,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Pe,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\",...Gs}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Gs}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Pe,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Pe,...tr,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...tr,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:_,filter:{attributes:{...Pe,filterUnits:Fs,primitiveUnits:Fs}},feBlend:{attributes:{...we,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...we,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:we},...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:{...we,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...we,in2:\"text\",scale:\"number\",xChannelSelector:Us,yChannelSelector:Us}},feDropShadow:{attributes:{...we,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:we},feGaussianBlur:{attributes:{...we,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:we},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...we,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...we,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Pe,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var js=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],zs=[\"region\"],io={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},rr={section:[\"aria-label\",\"title\"]},Vs=[\"aria-labelledby\",\"aria-describedby\"];function Ya(t){return/^aria-[a-z]+$/.test(t)}function Xa(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var ao=4e3,Bs=1e5,Wt=512e3,lo=1e4,Ws=\"http://www.w3.org/1999/xhtml\",Ys=\"http://www.w3.org/2000/svg\",qa=new Map(Object.keys(nr).map(t=>[t.toLowerCase(),t]));function or(t){return qa.get(t.toLowerCase())}function sr(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Nt[e]?.attributes,Va]:[nr[e]?.attributes,Wa],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(Ya(r)||Xa(r))return{name:r,kind:\"text\"}}var ir=/^\\d{4}-\\d{2}-\\d{2}$/;function Ka(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!ir.test(t)||!ir.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function Xs(t,e,n={}){let r=Ka(t,e);if(r===void 0)return\"\";if(r===0)return\"today\";if(r===1)return\"tomorrow\";if(r<0&&n.due===!0)return\"overdue\";if(r===-1)return\"yesterday\";let o=Math.abs(r),[s,i]=o<14?[o,\"day\"]:o<60?[Math.round(o/7),\"week\"]:o<730?[Math.round(o/30.44),\"month\"]:[Math.round(o/365.25),\"year\"],a=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${a}`:`${a} ago`}function qs(t,e){if(typeof t!=\"string\")return;if(ir.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return ir.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat(\"en-CA\",{timeZone:e||\"UTC\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??\"\";return`${o(\"year\")}-${o(\"month\")}-${o(\"day\")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var Ks=\"~\",ar=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Se=(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=>Se(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Se(r,e+1)]))};function Zs(){let t=new Map,e=new Map,n=new Map([[Ks,{children:[],listeners:new Map}]]),r=0,o=d=>{let g=e.get(d);return g===void 0&&(g=r+=1,e.set(d,g),t.set(g,{listener:d,count:0})),t.get(g).count+=1,g},s=d=>{let g=t.get(d);g&&(g.count-=1,!(g.count>0)&&(t.delete(d),e.delete(g.listener)))},i=d=>{let g=n.get(d);if(g){n.delete(d);for(let m of g.listeners.values())s(m);for(let m of g.children)i(m)}},a=(d,g,m=0)=>{if(!ar(d)||m>64)return Se(d);let b=typeof d.id==\"string\"?d.id:void 0,p=g&&b!==void 0&&b!==Ks;p&&i(b);let f={children:[],listeners:new Map};p&&n.set(b,f);let A={};for(let[u,E]of Object.entries(d))u===\"children\"&&Array.isArray(E)?A[u]=E.map(v=>{let h=a(v,p,m+1);return p&&ar(v)&&typeof v.id==\"string\"&&f.children.push(v.id),h}):u===\"eventListeners\"&&ar(E)?A[u]=Object.fromEntries(Object.entries(E).map(([v,h])=>{if(typeof h!=\"function\"||!p)return[v,void 0];let T=o(h);return f.listeners.set(v,T),[v,{listener:T}]})):A[u]=Se(E,m+1);return A},l=d=>{if(!Array.isArray(d))return Se(d);let[g,m]=d,b=typeof m==\"string\"?n.get(m):void 0;if(g===0){let p=a(d[2],b!==void 0),f=ar(d[2])?d[2].id:void 0;if(b&&typeof f==\"string\"&&n.has(f)){let A=Number(d[3]);b.children.splice(Number.isInteger(A)&&A>=0&&A<=b.children.length?A:b.children.length,0,f)}return[g,Se(m),p,Se(d[3])]}if(g===1){let p=Number(d[2]);return b&&Number.isInteger(p)&&p>=0&&p<b.children.length&&i(b.children.splice(p,1)[0]),Se(d)}if(g===3&&d[4]===3){let p=String(d[2]),f=d[3],A=b&&typeof f==\"function\"?o(f):void 0,u=b?.listeners.get(p);return u!==void 0&&s(u),A===void 0?b?.listeners.delete(p):b.listeners.set(p,A),[g,Se(m),p,A===void 0?void 0:{listener:A},3]}return Se(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 co=\"graview-view-root\",Za=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Ja=new Set([\"div\",\"li\",\"article\"]),fo=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),uo=t=>Object.freeze({html:t,toString:()=>t}),po=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),ei=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(ei).join(\"\"):po(t)?t.html:fo(String(t));function ti(t){customElements.get(co)||customElements.define(co,Bt);let e=Event,n=Zs(),r=new Set,o=new Set,s,i=[],a=new Set;for(let c of[\"closest\",\"matches\",\"dataset\"]){let x=()=>{throw new TypeError(`A view's element has no ${c}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};c in Element.prototype||Object.defineProperty(Element.prototype,c,c===\"dataset\"?{get:x}:{value:x})}let l=document.createElement(co),d=c=>{let x=k=>{for(let I of Array.from(k.childNodes)){if(I.nodeType!==1)continue;if(ce(I)===c)return I;let D=x(I);if(D)return D}};return x(l)},g=c=>{let x=d(c.target);if(!x)return;let k=new e(c.event,{bubbles:!0}),I={};for(let D of Za)c[D]!==void 0&&(I[D]=c[D]);for(let D of Object.keys(I))Object.defineProperty(k,D,{value:I[D],enumerable:!0});x.dispatchEvent(k);for(let D of o){if(D.type!==c.event)continue;let M;try{M=new Set(Array.from(l.querySelectorAll(D.selector)))}catch{continue}for(let B=x;B&&B!==l;B=B.parentNode)if(M.has(B)){D.listener(Object.freeze({type:c.event,target:x,element:B,...I}));break}}},m=Error,b=new Map,p=0,f=(c,x,k)=>new Promise((I,D)=>{let M=++p;b.set(M,B=>B.ok?I(B):D(new m(B.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:M,op:c,key:x,...c===\"set\"?{value:k}:{}})}),A=c=>(c.catch(()=>{}),c),u=Object.freeze({get(c){return A(f(\"get\",c).then(x=>typeof x.value==\"string\"?x.value:null))},set(c,x){return A(f(\"set\",c,x).then(()=>{}))}}),E=c=>{if(c.type===\"mine-answer\"){let D=b.get(c.id);return b.delete(c.id),D?.(c)}if(c.type===\"dom-event\"&&typeof c.target==\"string\")return g(c);if(c.type===\"notice\")return t.warn(c.text);if(c.type!==\"props\")return;s=c.props,typeof c.partMs==\"number\"&&c.partMs>0&&(S=c.partMs),typeof c.partMark==\"string\"&&(F=c.partMark),L+=1,K.clear(),Ot=0;let x=t.now();for(let D of r)try{D(c.props)}catch(M){t.threw(M)}let k=t.now()-x,I=c.push;typeof I==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:I,ms:k})))},v;l.connect({mutate(c){v||(v=[],t.microtask(()=>{let x=v??[];v=void 0,t.send({type:\"render\",records:n.encode(x)})})),v.push(...c)},call:()=>{}});let h=c=>c.nodeType===1?c.getAttribute(\"data-key\")??c.getAttribute(\"id\"):null,T=(c,x)=>c.nodeType===x.nodeType&&(c.nodeType!==1||c.localName===x.localName&&c.namespaceURI===x.namespaceURI&&h(c)===h(x));function O(c,x){let k=Array.from(x.childNodes),I=0;for(let D of k){let M=c.childNodes[I]??null;if(M&&T(M,D)){y(M,D),I+=1;continue}if(h(D)!==null){let ue=Array.from(c.childNodes).slice(I+1).find(ze=>T(ze,D));if(ue){c.insertBefore(ue,M),y(ue,D),I+=1;continue}}c.insertBefore(D,M),I+=1}for(;c.childNodes.length>I;)c.removeChild(c.lastChild)}function y(c,x){if(c.nodeType!==1){c.data!==x.data&&(c.data=x.data);return}let k=c,I=x,D=N(k);for(let M of k.getAttributeNames())I.hasAttribute(M)||(k.removeAttribute(M),D&&Ge(k,M,void 0));for(let M of I.getAttributeNames()){let B=I.getAttribute(M);k.getAttribute(M)!==B&&k.setAttribute(M,B),D&&Ge(k,M,B)}O(k,I)}let N=c=>c.localName.includes(\"-\");function w(c){for(let x of Array.from(c.childNodes)){if(x.nodeType!==1)continue;let k=x;if(N(k))for(let I of k.getAttributeNames())Ge(k,I,k.getAttribute(I)??void 0);w(k)}}function P(c,x,k){for(let I of Array.from(c.childNodes)){if(I.nodeType!==1)continue;let D=I,M=D.localName,B=x||M.toLowerCase()===\"svg\",ue=B?or(M):Object.prototype.hasOwnProperty.call(Nt,M.toLowerCase())?M.toLowerCase():void 0;if(!ue){k.add(`<${M}>`);continue}for(let ze of D.getAttributeNames())(!sr(B?\"svg\":\"html\",ue,ze)||!B&&rr[ue]?.includes(ze.toLowerCase()))&&k.add(`${ue} ${ze}`);P(D,B,k)}}function R(c){let x=document.createElement(\"div\"),k=Array.isArray(c)?c:[c];for(let D of k)if(D!=null)if(typeof D==\"string\"||po(D)){let M=document.createElement(\"div\");M.innerHTML=typeof D==\"string\"?D:D.html,x.append(...Array.from(M.childNodes))}else x.append(D);let I=new Set;P(x,!1,I),i=[...I],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),w(x),O(l,x),K.clear()}let S=1e3/4,F=\"\",L=0,V=new Map,K=new Map,Ot=0,Sr=new Set,ca=c=>{try{return c instanceof Error?`${c.name}: ${c.message}`:String(c)}catch{return\"an error\"}},Ho=c=>{if(c==null||c===!1)return\"\";if(typeof c==\"string\")return c;if(po(c))return c.html;if(Array.isArray(c))return c.map(x=>Ho(x)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function da(c,x,k){if(typeof c!=\"string\"||!er.test(c))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof x!=\"function\")throw new TypeError(`graview.part(\"${c}\", draw) is handed a function that returns the part's markup.`);let I=typeof k?.as==\"string\"&&Ja.has(k.as)?k.as:\"div\",D=K.get(c)??0;K.set(c,D+1);let M=`${c}#${D}`,B=(fe,Bo)=>{let fa=`The part \"${c}\" ${fe===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${Bo}`;return!Sr.has(`${c} ${fe}`)&&Sr.size<100&&(Sr.add(`${c} ${fe}`),t.warn(fa)),uo(`<${I} data-part=\"${c}\" data-part-failed=\"${fe}\" data-part-why=\"${fo(Bo.slice(0,300))}\"${F?` data-part-mark=\"${fo(F)}\"`:\"\"}></${I}>`)},ue=V.get(M);if(ue!==void 0&&L<=ue.until)return B(\"slow\",ue.why);V.delete(M);let ze=Ot;Ot=0;let ua=t.now(),Vo,Rr=0;try{Vo=Ho(x())}catch(fe){return B(\"threw\",ca(fe))}finally{let fe=t.now()-ua;Rr=fe-Ot,Ot=ze+fe}if(Rr>S){let fe=`it took ${Math.round(Rr).toLocaleString(\"en-US\")} ms, past the ${Math.round(S).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return V.set(M,{why:fe,until:L+3}),B(\"slow\",fe)}return uo(`<${I} data-part=\"${c}\">${Vo}</${I}>`)}let vr=[],kr=new Set(Cs),Fo=\"[]\",Ar=!1,Uo=()=>{Ar||(Ar=!0,t.microtask(()=>{Ar=!1;let c=[...new Map([...o].filter(k=>kr.has(k.type)).map(k=>[`${k.type} ${k.selector}`,{event:k.type,selector:k.selector}])).entries()].sort(([k],[I])=>k<I?-1:k>I?1:0).map(([,k])=>k),x=JSON.stringify(c);x!==Fo&&(Fo=x,t.send({type:\"gestures\",bound:c}))}))},Go=\"[[],[]]\",Or=!1,jo=()=>{Or||(Or=!0,t.microtask(()=>{Or=!1;let c=D=>[...new Set([...o].filter(M=>M.type===D&&typeof M.selector==\"string\").map(M=>M.selector))].sort().slice(0,200),x=c(\"click\"),k=c(\"acted\"),I=JSON.stringify([x,k]);I!==Go&&(Go=I,t.send({type:\"clicks\",selectors:x,...k.length>0?{acted:k}:{}}))}))},zo=Object.freeze({get props(){return s},onProps(c){return r.add(c),s&&c(s),()=>void r.delete(c)},render:R,style(c){typeof c!=\"string\"||vr.includes(c)||(vr.push(c),t.send({type:\"style\",sheets:[...vr]}))},on(c,x,k){let I={type:c,selector:x,listener:k};return o.add(I),typeof c==\"string\"&&!a.has(c)&&(a.add(c),t.send({type:\"hears\",events:[c]})),kr.has(c)&&Uo(),(c===\"click\"||c===\"acted\")&&jo(),()=>{o.delete(I),kr.has(c)&&Uo(),(c===\"click\"||c===\"acted\")&&jo()}},act:(c,x={})=>t.act(c,x),mine:u,navigate(c){if(typeof c==\"string\")return t.navigate(c);let x=Ps(c);x&&t.send(x)},part:da,html(c,...x){return uo(c.reduce((k,I,D)=>k+I+(D<x.length?ei(x[D]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(c,x){let k=qs(c,s?.timeZone);return k===void 0?\"\":Xs(k,zo.today,x)},cite(c,x){let k=c?s?.cites?.[c.kind]?.[x]:void 0;if(!c||!k)return;let I=!(s?.uncited?.[c.id]??[]).includes(x);if(!k.relation)return{by:k.by,relation:!1,cited:I,...c[k.by]!==void 0?{source:c[k.by]}:{}};let D=new Set((s?.edges??[]).filter(M=>M.from===c.id&&M.kind===k.by).map(M=>M.to));return{by:k.by,relation:!0,cited:I,sources:(s?.nodes??[]).filter(M=>D.has(M.id))}},uncited(c){return c?s?.uncited?.[c.id]??[]:[]},get refused(){return i},get hardening(){return t.hardening()}});return{view:zo,hear:E,find:c=>{try{let x=l.querySelectorAll(c)[0];return x?ce(x):void 0}catch{return}},listened:c=>{let x=new Set;for(let k of o)if(k.type===c)try{for(let I of Array.from(l.querySelectorAll(k.selector))){let D=ce(I);D&&x.add(D)}}catch{}return[...x]}}}var mo={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},ni=[\"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\",\"break-inside\",\"break-before\",\"break-after\",\"page-break-inside\",\"page-break-before\",\"page-break-after\",\"orphans\",\"widows\",\"box-decoration-break\",\"-webkit-box-decoration-break\",\"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\",\"scroll-margin-top\",\"scroll-margin-right\",\"scroll-margin-bottom\",\"scroll-margin-left\",\"scroll-margin-block\",\"scroll-margin-block-start\",\"scroll-margin-block-end\",\"scroll-margin-inline\",\"scroll-margin-inline-start\",\"scroll-margin-inline-end\",\"scroll-padding-top\",\"scroll-padding-right\",\"scroll-padding-bottom\",\"scroll-padding-left\",\"scroll-padding-block\",\"scroll-padding-block-start\",\"scroll-padding-block-end\",\"scroll-padding-inline\",\"scroll-padding-inline-start\",\"scroll-padding-inline-end\",\"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\"],ri=[\"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\"],oi=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],si=[\"media\",\"supports\",\"container\",\"keyframes\"],ii={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},ai=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],li=[\"-webkit-details-marker\"],Yt=64e3;var Qa=new Set([\"serif\",\"sans-serif\",\"monospace\",\"cursive\",\"fantasy\",\"system-ui\",\"math\",\"emoji\",\"fangsong\",\"inherit\",\"initial\",\"unset\",\"revert\",\"default\"]);function ho(t){return typeof t!=\"string\"||t.length>60||!/^[A-Za-z0-9][A-Za-z0-9-]*(?: [A-Za-z0-9-]+)*$/.test(t)?\"its family is words of letters, digits and hyphens with single spaces between them, at most 60 characters\":Qa.has(t.toLowerCase())?`\"${t}\" is a name CSS keeps for itself`:null}var lr=5e4,cr=2e5,go=16,dr=[\"font-family\",\"src\",\"font-weight\",\"font-style\",\"font-display\",\"unicode-range\",\"font-stretch\"],ci=2*Math.ceil(cr/3)*4,yo=64;function el(t,e){return`${t} ${e}`}function bo(t,e){return new Map(t.map(n=>[n.family.toLowerCase(),el(e,n.family)]))}function di(t,e){let n=[],r=[],o=()=>{let s=r.length;for(;s>0&&r[s-1].type===\"whitespace\";)s-=1;let i=s,a,l=r[s-1];if(l?.type===\"string\")i=s-1,a=l.value;else{for(;i>0&&(r[i-1].type===\"ident\"||r[i-1].type===\"whitespace\");)i-=1;for(;i<s&&r[i].type===\"whitespace\";)i+=1;let g=r.slice(i,s).filter(m=>m.type===\"ident\");a=g.length>0?g.map(m=>m.value).join(\" \"):void 0}let d=a===void 0?void 0:e.get(a.toLowerCase());n.push(...d===void 0?r:[...r.slice(0,i),{type:\"string\",value:d},...r.slice(s)]),r=[]};for(let s of t)s.type===\",\"?(o(),n.push(s)):r.push(s);return o(),n}function tl(t){return[\"font/woff2\",\"font/woff\",\"font/ttf\",\"font/otf\"].includes(t)||/^application\\/(?:x-)?font-[a-z0-9.+-]+$/.test(t)||t===\"application/octet-stream\"}function nl(t){if(t.length<12)return!1;let e=String.fromCharCode(t[0],t[1],t[2],t[3]);return e===\"wOF2\"||e===\"wOFF\"||e===\"OTTO\"||e===\"true\"||t[0]===0&&t[1]===1&&t[2]===0&&t[3]===0}var rl=/^[A-Za-z0-9+/]*={0,2}$/;function ol(t,e){let n=t.indexOf(\",\"),r=n<0?t.slice(5):t.slice(5,n),[o=\"\",...s]=r.split(\";\"),i=o.trim().toLowerCase();if(!tl(i))return{problem:\"type\",type:i||\"no type\"};if(n<0||!s.some(b=>b.trim().toLowerCase()===\"base64\"))return{problem:\"encoding\"};let a=t.slice(n+1);if(!rl.test(a)||a.length%4===1)return{problem:\"encoding\"};let l=a.endsWith(\"==\")?2:a.endsWith(\"=\")?1:0;if(l>0&&a.length%4!==0)return{problem:\"encoding\"};let d=Math.floor((a.length-l)*3/4);if(d>e)return{problem:\"size\",bytes:d};let g;try{g=atob(a)}catch{return{problem:\"encoding\"}}let m=new Uint8Array(g.length);for(let b=0;b<g.length;b+=1)m[b]=g.charCodeAt(b);return m.byteLength>e?{problem:\"size\",bytes:m.byteLength}:nl(m)?{type:i,bytes:m}:{problem:\"bytes\"}}var Xt=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Ze=t=>t.filter(e=>e.type!==\"whitespace\");function sl(t){let e=[[]];for(let n of t)n.type===\",\"?e.push([]):e.at(-1).push(n);return e.map(Ze)}function il(t){let e=\"\";for(let n of t)if(n.type===\"whitespace\")e+=\" \";else if(n.type===\"ident\")e+=n.value;else if(n.type===\"number\"||n.type===\"percentage\")e+=n.type===\"percentage\"?`${n.repr}%`:n.repr;else if(n.type===\"dimension\")e+=`${n.repr}${n.unit}`;else if(n.type===\"delim\"&&(n.value===\"?\"||n.value===\"+\"||n.value===\"-\"))e+=n.value;else if(n.type===\",\")e+=\",\";else return;return e.trim().replace(/\\s*,\\s*/g,\", \").replace(/\\s+/g,\" \")}var al=/^(?:normal|bold|(?:[1-9]\\d{0,2}|1000)(?: (?:[1-9]\\d{0,2}|1000))?)$/,ll=/^(?:normal|italic|oblique)$/,cl=/^(?:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|\\d{1,3}(?:\\.\\d+)?%(?: \\d{1,3}(?:\\.\\d+)?%)?)$/,dl=/^(?:auto|block|swap|fallback|optional)$/,ul=/^u\\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?(?:, u\\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?)*$/i;function fl(t){let e=Ze(t);if(e.length===1&&e[0].type===\"string\")return e[0].value;if(e.length>0&&e.every(n=>n.type===\"ident\"))return e.map(n=>n.value).join(\" \")}function Eo(t,e,n,r,o=[]){let s=new Map,i=[],a=0;for(let N of e){if(N.type!==\"declaration\"){i.push(\"a rule\");continue}let w=N.name.startsWith(\"--\")?N.name:Xt(N.name);if(w===\"src\")for(let P of N.value)a+=ui(P);if(!dr.includes(w)){i.push(w);continue}s.set(w,N)}let l=s.get(\"font-family\"),d=l&&!l.important?fl(l.value):void 0,g=ho(d),m=d!==void 0&&g!==ho(void 0)?d:void 0;for(let N of i)r({reason:\"font-face\",name:\"descriptor\",...m!==void 0?{family:m}:{},descriptor:N});let b=(N,w={})=>(r({reason:\"font-face\",name:N,...m!==void 0?{family:m}:{},...w}),{data:a});if(Ze(t).length>0)return b(\"unreadable\");if(d===void 0||g)return b(\"family\",{said:g??\"its family is one name\"});let p=d;if(o.some(N=>N.toLowerCase()===p.toLowerCase()))return b(\"lent\");let f=s.get(\"src\");if(!f)return b(\"src\",{said:\"no src\"});let A=[];for(let N of sl(f.value)){let[w,...P]=N,R=w?.type===\"url\"?w.value:w?.type===\"func\"&&Xt(w.name)===\"url\"&&Ze(w.value).length===1&&Ze(w.value)[0].type===\"string\"?Ze(w.value)[0].value:void 0;if(w?.type===\"func\"&&Xt(w.name)===\"local\")return b(\"local\");if(R===void 0)return b(\"src\");if(!/^data:/i.test(R))return b(\"address\",{said:R.slice(0,80)});if(P.length>1||P[0]&&!(P[0].type===\"func\"&&Xt(P[0].name)===\"format\"&&Ze(P[0].value).every(F=>F.type===\"string\"||F.type===\"ident\"||F.type===\",\")))return b(\"src\");let S=ol(R,lr);if(\"problem\"in S)return S.problem===\"size\"?b(\"size\",{bytes:S.bytes}):b(S.problem,\"type\"in S&&S.type?{said:S.type}:{});A.push(S)}if(A.length===0)return b(\"src\");let u=A.reduce((N,w)=>N+w.bytes.byteLength,0);if(u>lr)return b(\"size\",{bytes:u});if(n.count+1>go)return b(\"count\");if(n.bytes+u>cr)return b(\"total\",{bytes:n.bytes+u});let E=(N,w)=>{let P=s.get(N);if(!P)return;let R=P.important?void 0:il(P.value);if(R===void 0||!w.test(R)){r({reason:\"font-face\",name:\"value\",family:p,descriptor:N});return}return N===\"unicode-range\"?R.toUpperCase():Xt(R)},v=E(\"font-weight\",al),h=E(\"font-style\",ll),T=E(\"font-stretch\",cl),O=E(\"font-display\",dl),y=E(\"unicode-range\",ul);return n.bytes+=u,n.count+=1,{face:{family:p,sources:A,size:u,...v?{weight:v}:{},...h?{style:h}:{},...T?{stretch:T}:{},...O?{display:O}:{},...y?{unicodeRange:y}:{}},data:a}}function ui(t){return t.type===\"url\"?/^data:/i.test(t.value)?t.value.length:0:t.type===\"func\"?t.value.reduce((e,n)=>e+(n.type===\"string\"&&/^data:/i.test(n.value)?n.value.length:ui(n)),0):0}var ur=t=>`${(t/1e3).toLocaleString(\"en-US\",{maximumFractionDigits:1})} KB`,qt=\"a view's face is a data: URL of a WOFF2, WOFF, TTF or OTF font (src: url(data:font/woff2;base64,\\u2026))\",fi=\"or a face the app lends its views (brand.views.fonts)\";function wo(t){let e=t.family!==void 0?`the @font-face \"${t.family}\"`:\"an @font-face\";switch(t.name){case\"where\":return\"Not drawn: an @font-face inside @media, @supports, @container or a rule. A view's face is declared at the top of its stylesheet (view-font-face).\";case\"unreadable\":return`Not drawn: ${e}, which has something before its block. A face is @font-face { font-family: \\u2026; src: \\u2026 } (view-font-face).`;case\"family\":return`Not drawn: ${e}: ${t.said??\"its font-family is one name, in quotes or as plain words\"}. It is called by a name of its own, which the view's rules then name (view-font-face-family).`;case\"src\":return`Not drawn: ${e} has ${t.said===\"no src\"?\"no src\":\"a src that is no url()\"}: ${qt} (view-font-face-src).`;case\"address\":return`Not loaded: ${e} names url(${JSON.stringify(t.said??\"\")}). A view loads nothing from the network: ${qt}, ${fi} (view-font-face-src).`;case\"local\":return`Not loaded: ${e} names local(), a face installed on the reader's own machine, which differs from one reader to the next and tells the page what is installed: ${qt} (view-font-face-src).`;case\"type\":return`Not loaded: ${e} is a data: URL of ${t.said??\"no type\"}, not a font: ${qt} (view-font-face-type).`;case\"encoding\":return`Not loaded: ${e} is a data: URL that is not base64, or not base64 throughout: ${qt} (view-font-face-type).`;case\"bytes\":return`Not loaded: ${e} holds bytes that are not a WOFF2, WOFF, TrueType or OpenType file, whatever its data: URL says (view-font-face-type).`;case\"size\":return`Not loaded: ${e} is ${ur(t.bytes??0)} decoded, more than the ${ur(lr)} one face a view declares may be: subset it to the letters the view draws, ${fi}, which may be larger (view-font-face-size).`;case\"total\":return`Not loaded: ${e} would take the view's faces to ${ur(t.bytes??0)}, more than the ${ur(cr)} a view's faces may be together: the faces before it are drawn, and the app may lend the rest (brand.views.fonts) (view-font-faces-size).`;case\"count\":return`Not loaded: ${e} is more than the ${go} faces a view's stylesheets may declare (view-font-faces-size).`;case\"descriptor\":return`Not kept: ${t.descriptor??\"a descriptor\"} in ${e}. A view's face takes ${dr.slice(0,-1).join(\", \")} and ${dr.at(-1)}, and is drawn without the rest (view-font-face-descriptor).`;case\"value\":return`Not kept: the ${t.descriptor??\"descriptor\"} of ${e}, a value a face does not take, so the face is drawn as if it said none (view-font-face-descriptor).`;case\"lent\":return`Not loaded: ${e}, since the app lends its views a face by that name (brand.views.fonts), and the app's face is the one drawn: call the view's own something else (view-font-face-lent).`;case\"host\":return`Not loaded: ${e}. This host draws no face a view's own stylesheet declares: a view is drawn in the faces the app lends its views (brand.views.fonts), or in a system stack (view-font-face-host).`;default:return`Not drawn: ${e} (view-font-face).`}}var ne=t=>t>=48&&t<=57,pi=t=>ne(t)||t>=65&&t<=70||t>=97&&t<=102,vo=t=>t>=65&&t<=90||t>=97&&t<=122,ko=t=>t>=128,fr=t=>vo(t)||ko(t)||t===95,mi=t=>fr(t)||ne(t)||t===45,hi=t=>t===10,Ce=t=>t===10||t===9||t===32,pl=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,Ne=-1;function ml(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 Qt(t){let e=ml(t),n=0,r=(u=0)=>n+u<e.length?e[n+u]:Ne,o=[],s=(u,E)=>u===92&&E!==10&&E!==Ne,i=(u,E,v)=>u===45?fr(E)||E===45||s(E,v):fr(u)?!0:s(u,E),a=(u,E,v)=>u===43||u===45?ne(E)||E===46&&ne(v):ne(u===46?E:u),l=()=>{let u=r();if(n+=1,u===Ne)return 65533;if(pi(u)){let E=String.fromCodePoint(u);for(;E.length<6&&pi(r());)E+=String.fromCodePoint(r()),n+=1;Ce(r())&&(n+=1);let v=parseInt(E,16);return v===0||v>=55296&&v<=57343||v>1114111?65533:v}return u},d=()=>{let u=\"\";for(;;){let E=r();if(mi(E))u+=String.fromCodePoint(E),n+=1;else if(s(E,r(1)))n+=1,u+=String.fromCodePoint(l());else return u}},g=()=>{let u=\"\";for((r()===43||r()===45)&&(u+=String.fromCodePoint(e[n++]));ne(r());)u+=String.fromCodePoint(e[n++]);if(r()===46&&ne(r(1)))for(u+=String.fromCodePoint(e[n++],e[n++]);ne(r());)u+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ne(r(1))||(r(1)===43||r(1)===45)&&ne(r(2))))for(u+=String.fromCodePoint(e[n++]),ne(r())||(u+=String.fromCodePoint(e[n++]));ne(r());)u+=String.fromCodePoint(e[n++]);return u},m=()=>{let u=g();return i(r(),r(1),r(2))?{type:\"dimension\",repr:u,unit:d()}:r()===37?(n+=1,{type:\"percentage\",repr:u}):{type:\"number\",repr:u}},b=()=>{for(;;){let u=r();if(n+=1,u===41||u===Ne)return;s(u,r())&&l()}},p=()=>{let u=\"\";for(;Ce(r());)n+=1;for(;;){let E=r();if(n+=1,E===41)return{type:\"url\",value:u};if(E===Ne)return{type:\"url\",value:u};if(Ce(E)){for(;Ce(r());)n+=1;return r()===41||r()===Ne?(r()===41&&(n+=1),{type:\"url\",value:u}):(b(),{type:\"bad-url\"})}if(E===34||E===39||E===40||pl(E))return b(),{type:\"bad-url\"};if(E===92){if(s(E,r()))u+=String.fromCodePoint(l());else return b(),{type:\"bad-url\"};continue}u+=String.fromCodePoint(E)}},f=()=>{let u=d();if(u.toLowerCase()===\"url\"&&r()===40){for(n+=1;Ce(r())&&Ce(r(1));)n+=1;let E=Ce(r())?r(1):r();return E===34||E===39?{type:\"function\",value:u}:p()}return r()===40?(n+=1,{type:\"function\",value:u}):{type:\"ident\",value:u}},A=u=>{let E=\"\";for(;;){let v=r();if(n+=1,v===u||v===Ne)return{type:\"string\",value:E};if(hi(v))return n-=1,{type:\"bad-string\"};if(v===92){if(r()===Ne)continue;if(hi(r())){n+=1;continue}E+=String.fromCodePoint(l());continue}E+=String.fromCodePoint(v)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==Ne&&!(r()===42&&r(1)===47);)n+=1;r()!==Ne&&(n+=2)}let u=r();if(u===Ne)return o;if(Ce(u)){for(;Ce(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,u){case 34:case 39:o.push(A(u));continue;case 35:if(mi(r())||s(r(),r(1))){let E=i(r(),r(1),r(2));o.push({type:\"hash\",value:d(),id:E})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(u,r(),r(1))?(n-=1,o.push(m())):o.push({type:\"delim\",value:String.fromCodePoint(u)});continue;case 44:o.push({type:\",\"});continue;case 45:a(u,r(),r(1))?(n-=1,o.push(m())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(u,r(),r(1))?(n-=1,o.push(f())):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(u,r())?(n-=1,o.push(f())):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:ne(u)?(n-=1,o.push(m())):fr(u)?(n-=1,o.push(f())):o.push({type:\"delim\",value:String.fromCodePoint(u)})}}}var Ni={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Ti=32,To=class{tokens;i=0;constructor(e){this.tokens=e}peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function xi(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:gi(t,Ni[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:gi(t,\")\",e+1)}:n}function gi(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Ti){t.next(),r.push({type:\"bad-string\"});continue}r.push(xi(t,n))}}function Tt(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 Zt(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(...Tt(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=Si(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((d,g)=>g>n&&d.type===\"block\"&&d.open===\"{\");e.push(...Tt(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(...Tt(t.slice(n,o+1),!1)),n=o+1}return e}function Si(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 Ao(t){let e=new To(Qt(t)),n=[];for(;e.peek();)n.push(xi(e,0));return n}function xt(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&&ne(r)||o===1&&ne(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":ko(r)||r===45||r===95||ne(r)||vo(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function pr(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);ko(r)||r===45||r===95||ne(r)||vo(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Jt(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 hl(t){let e=pr(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${pr(t.slice(1))}`:e}var yi=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 gl(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 yl(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return xt(t.value);case\"at-keyword\":return`@${xt(t.value)}`;case\"hash\":return`#${pr(t.value)}`;case\"string\":return Jt(t.value);case\"url\":return`url(${Jt(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}${hl(t.unit)}`;case\"func\":return`${xt(t.name)}(${je(t.value)})`;case\"block\":return`${t.open}${je(t.value)}${Ni[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function je(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&gl(yi(n),yi(r))&&(e+=\"/**/\"),e+=yl(r),n=r);return e}var bl=new Set(ni),vi=new Set(ri),bi=new Set(oi),El=new Set(si),wl=new Set(ai),Nl=new Set(li),Ei=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,pe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Tl=t=>pe(t);function xo(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&&bi.has(t)&&Ei.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=pe(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&&bi.has(t)&&Ei.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!vi.has(s)){n({reason:\"function\",name:s});return}let i=xo(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=xo(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===\")\"||o.type===\"]\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}var xl=/^(animation|transition|scroll-behavior|outline)/,Sl=\"--graview-ring-color\",vl=\"--graview-focus-color\",kl=t=>{let e=t.filter(r=>r.type!==\"whitespace\"),n=e[0];return e.length!==1||!n?!1:n.type===\"hash\"?/^(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.value):n.type===\"ident\"&&![\"transparent\",\"currentcolor\"].includes(pe(n.value))},Al=new Set([\"url\",\"src\",\"image-set\",\"-webkit-image-set\"]),ki=t=>{for(let e of t){if(e.type===\"func\"&&Al.has(pe(e.name)))return pe(e.name);if(e.type===\"func\"||e.type===\"block\"){let n=ki(e.value);if(n)return n}}};function hr(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:Tl(t.name);if(o===Sl||!r&&!bl.has(o)){e({reason:\"property\",name:o});return}if(o===vl&&!kl(t.value)){e({reason:\"value\",name:o});return}let s=ii[o];if(s){let d=t.value.filter(b=>b.type!==\"whitespace\"),g=d[0],m=d.length===1&&g?.type===\"ident\"?pe(g.value):void 0;if(!m||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(m)){e({reason:\"value\",name:o});return}return`${o}: ${m}${t.important&&!(n&&o===\"all\")?\" !important\":\"\"}`}let i=xo(r?void 0:o,t.value,e);if(!i)return;let a=Kt&&(o===\"font-family\"||o===\"font\")?di(i,Kt):i,l=je(a).trim();return`${r?`--${pr(t.name.slice(2))}`:o}: ${l}${t.important&&!(n&&xl.test(o))?\" !important\":\"\"}`}var Oo=t=>t.some(e=>e.type===\"}\"||e.type===\";\"||e.type===\")\"||e.type===\"]\"||e.type===\"at-keyword\"||e.type===\"CDO\"||e.type===\"CDC\"||e.type===\"delim\"&&e.value===\"\\\\\"||(e.type===\"func\"||e.type===\"block\")&&Oo(e.value));function Ai(t,e){if(Oo(t))return e({reason:\"unreadable\",name:\"selector\"}),!1;let n=ki(t);if(n)return e({reason:\"url\",name:n}),!1;let r=o=>{for(let s=0;s<o.length;s+=1){let i=o[s];if(s>0&&o[s-1].type===\":\"&&(i.type===\"ident\"||i.type===\"func\")){let l=pe(i.type===\"ident\"?i.value:i.name);if(wl.has(l)||(l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))&&!Nl.has(l))return e({reason:\"selector\",name:l}),!1}if(i.type===\"url\"||i.type===\"bad-url\"||i.type===\"bad-string\"||i.type===\"at-keyword\"||i.type===\"CDO\"||i.type===\"CDC\"||i.type===\"block\"&&i.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(i.type===\"func\"&&!r(i.value)||i.type===\"block\"&&!r(i.value))return!1}return!0};return r(t)}function No(t,e,n,r){let o=[];for(let s of Zt(t))if(s.type===\"declaration\"){let i=hr(s,e);i&&o.push(`${i};`)}else{let i=mr(s,e,n+1,\"style\",r);i&&o.push(i)}return o.join(\" \")}function Ol(t,e,n){if(Oo(t)){n({reason:\"unreadable\",name:`@${e}`});return}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=pe(s.name);return e===\"supports\"&&i===\"selector\"?Ai(s.value,n):vi.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Zt(s.value);if(i.length===1&&i[0].type===\"declaration\")return hr(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?je(t).trim():void 0}function So(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(mo,pe(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:pe(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:So(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:So(e.value)}:e})}function mr(t,e,n,r,o){if(n>Ti){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(pe(m.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${je(t.prelude).trim()} { ${No(t.block,e,n)} }`}if(!Ai(t.prelude,e))return;let d=je(So(t.prelude)).trim();if(d===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${d} { ${No(t.block,e,n,o)} }`}let s=pe(t.name),i=s===\"-webkit-keyframes\"?\"keyframes\":s;if(s===\"font-face\"&&o){if(o.skip)return;if(n>0||r!==\"sheet\"){e({reason:\"font-face\",name:\"where\"});return}if(!t.block){e({reason:\"font-face\",name:\"unreadable\"});return}if(o.refused){let g,m=Eo(t.prelude,Zt(t.block),{...o.budget},p=>void(g??=p.family),o.lent);m.face&&(o.data+=m.data);let b=m.face?.family??g;e({reason:\"font-face\",name:\"host\",...b!==void 0?{family:b}:{}});return}let d=Eo(t.prelude,Zt(t.block),o.budget,e,o.lent);d.face&&(o.data+=d.data,o.kept.push(d.face));return}if(!El.has(i)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${s}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${s}`});return}if(i===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let d=t.prelude.filter(p=>p.type!==\"whitespace\"),g=d[0];if(d.length!==1||!g||g.type!==\"ident\"&&g.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let m=Tt(t.block,!1).map(p=>mr(p,e,n+1,\"keyframes\")).filter(p=>p!==void 0);return`@keyframes ${g.type===\"ident\"?xt(g.value):Jt(g.value)} { ${m.join(\" \")} }`}let a=Ol(t.prelude,i,e);if(a===void 0)return;let l=r===\"style\"?No(t.block,e,n,o):Tt(t.block,!1).map(d=>mr(d,e,n+1,\"sheet\",o)).filter(d=>d!==void 0).join(\" \");return`@${i} ${a} { ${l} }`}var Kt,Ro=(t,e)=>{let n=Kt;Kt=t&&t.size>0?t:void 0;try{return e()}finally{Kt=n}};function wi(t,e){let n=[],r=s=>void n.push(s);return{css:Tt(Ao(t),!0).map(s=>mr(s,r,0,\"sheet\",e)).filter(s=>s!==void 0).join(`\n`),refused:n,faces:e?.kept??[],counted:t.length-(e?.data??0)}}function gr(t,e=Yt,n={}){return en([t],e,n)}function en(t,e=Yt,n={}){let r=n.faces?n.faces===!0?{}:n.faces:void 0,o=[],s=[],i=[],a=[],l={bytes:0,count:0},d=r?ci:0,g=r&&t.length>yo?t.slice(0,yo):t;g.length<t.length&&i.push({reason:\"size\",name:\"sheets\"});let m=0,b=0;for(let u of g){if(r&&b+u.length>e+d){i.push({reason:\"size\"});continue}if(!r&&m+u.length>e){i.push({reason:\"size\"});continue}b+=u.length;let E=r?{budget:{...l},kept:[],data:0,...r.lent?{lent:r.lent}:{},...r.refused?{refused:!0}:{}}:void 0,v=wi(u,E);if(m+v.counted>e){i.push({reason:\"size\"},...v.refused.filter(h=>h.reason===\"font-face\"));continue}E&&Object.assign(l,E.budget),m+=v.counted,s.push(u),v.css&&o.push(v.css),i.push(...v.refused),a.push(...v.faces)}let p=r?.scope?bo(a,r.scope):void 0;if(!p||p.size===0)return{css:o.join(`\n`),refused:i,faces:a};let f={budget:{bytes:0,count:0},kept:[],data:0,skip:!0};return{css:Ro(p,()=>s.map(u=>wi(u,f).css).filter(u=>u!==\"\")).join(`\n`),refused:i,faces:a}}function yr(t,e=Yt,n={}){let r=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}],faces:[]};let o=i=>void r.push(i),s=[];return Ro(n.rename,()=>{for(let i of Zt(Ao(t))){if(i.type!==\"declaration\"){o({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let a=hr(i,o,!0);a&&s.push(a)}}),{css:s.join(\"; \"),refused:r,faces:[]}}function br(t,e,n={}){let r,o=Ro(n.rename,()=>hr(Si(t,Ao(e)),s=>r??=s));return o===void 0||r?{refused:r??{reason:\"unreadable\",name:t}}:{value:o.slice(o.indexOf(\":\")+1).trim()}}var Oi=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function tn(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=Oi(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&&Oi(s.title)===o):void 0)}var ve=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,St=\" 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.\",nn=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var Rl=t=>typeof t==\"string\"&&/^#[A-Za-z_][A-Za-z0-9_.:-]{0,199}$/.test(t),Ri=[\"https:\",\"mailto:\",\"tel:\"];function _i(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!Ri.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function Pi(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=_i(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 Ci(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 Ii(t,e){if(Rl(t))return t;let n=_i(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&Ci(e.origins).includes(new URL(n).origin)))return n}function Di(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!Ri.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=Ci(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>.`}function Mi(t,e){if(e===\"svg\"){let r=or(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(Nt,n)?Object.prototype.hasOwnProperty.call(io,n)?{namespace:\"html\",name:io[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Er(t,e){return(t===\"html\"?Nt[e]:nr[e])?.empty===!0}var _l=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Pl=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Cl=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Il=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Dl=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Li=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Ml=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Ll(t,e){if(Dl.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(Ml.test(n))return Li.exec(n)?.[0]}function $i(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Hi(e.origins),s=Li.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Wt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Wt.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 Hi(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 $l(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:Hi(e).includes(n.origin)?n.href:void 0}catch{return}}function _o(t,e,n,r,o){let s=sr(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&rr[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Hl(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>Wt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>js.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 Hl(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Bs||!Pl.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>Wt)return o(\"url\");if(Il.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?Ll(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=$l(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>ao)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 _l.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Cl.test(n)?{value:n}:o(\"url\");case\"style\":{let s=r.faceNames?.(),i=yr(n,ao,s?{rename:s}:{});return i.refused.length>0&&i.css===\"\"?o(i.refused[0].reason===\"url\"?\"url\":\"css\",i.refused[0]):{value:i.css,...i.refused.length>0?{dropped:i.refused}:{}}}case\"css\":{let s=r.faceNames?.(),i=br(t,n,s?{rename:s}:{});return\"refused\"in i?o(i.refused.reason===\"url\"?\"url\":\"css\",i.refused):{value:i.value}}}}var Fl=\"http://www.w3.org/1999/xhtml\",Ul=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var wr=(t,...e)=>t.namespaceURI===Fl&&e.includes(t.localName),Gl=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),jl=t=>wr(t,\"textarea\",\"select\")||wr(t,\"input\")&&!Ul.has(Gl(t));function Fi(t){if(wr(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(wr(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(jl(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 zl=\"http://www.w3.org/1999/xhtml\",vt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Qe?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 vt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Po=class extends vt{nodeType=8;get textContent(){return\"\"}},Qe=class extends vt{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}},Co=class extends vt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Qe(this,e,n)}createElement(e){return new Qe(this,zl,e)}createTextNode(e){return new Je(this,e)}createComment(e){return new Po(this)}};function Ui(){let t=new Co,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Vl=new Set([\"video/mp4\",\"video/webm\",\"video/ogg\"]);function Gi(t,e){let n=t.poster===!0||typeof t.poster==\"string\"&&t.poster.length>0,r=Vl.has(t.type.toLowerCase()),o=r&&n,s=\"app\"in e&&typeof t.playable==\"boolean\"?t.playable:o,i=s?void 0:!r&&!n?`its source is ${t.type}, which not every browser plays, and it has no poster`:r?n?\"its host says it does not play in every browser\":\"it has no poster, so nothing stands before it plays or where a person asked for less motion\":`its source is ${t.type}, which not every browser plays`;return{...\"app\"in e?{app:e.app}:{record:e.record,field:e.field},text:typeof t.caption==\"string\"&&t.caption.trim()?t.caption.trim():t.name,name:t.name,source:t.type,...typeof t.duration==\"number\"?{duration:t.duration}:{},poster:n,autoplay:e.autoplay,cover:e.cover,playable:s,...i?{why:i}:{}}}var Io={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},ji=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\"]),Vi=new Set([\"style\",\"template\",\"datalist\",\"option\"]),q=t=>t.replace(/\\s+/g,\" \").trim();function zi(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var de=t=>t instanceof Qe,rn=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function re(t){return t instanceof Je?t.data:!de(t)||rn(t)||Vi.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(re).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}var Bl=/(\\s+[·•|—–-]\\s+)/;function Wl(t,e){if(!e||!t.includes(e))return t;let n=s=>s.length>0&&s.split(\" \").length<=3,r=q(t).split(Bl),o=[];for(let s=0;s<r.length;s+=2){let i=r[s],a=i.startsWith(`${e} `)?i.slice(e.length+1):void 0,l=i.endsWith(` ${e}`)?i.slice(0,-e.length-1):void 0,d=i===e?\"\":a!==void 0&&n(a)?a:l!==void 0&&n(l)?l:i;d&&o.push(...o.length>0?[r[s-1]]:[],d)}return o.join(\"\")}function Bi(t,e,n){let r=[];for(let o of t){if(o.t===\"list\"&&o.groups.every(s=>s.items.every(i=>i.id===e&&i.title===n))){r.push(...Bi(o.groups.flatMap(s=>s.items.flatMap(i=>i.parts)),e,n));continue}if(o.t===\"text\"){let s=Wl(o.text,n);s&&r.push(s===o.text?o:{...o,text:s});continue}r.push(o)}return r}function*et(t){for(let e of t.childNodes)de(e)&&(yield e,yield*et(e))}function Yl(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 Xl(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(\":\"),g=d>0?l.slice(d+1):\"\";d<=0||g===\"\"||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(g)||s.push({at:o,says:`data-drop-connect names \"${g}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Wi(t,e){let n=[],r=new Set,o=new Set,s=[],i=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])i.set(f.id,f);let a=f=>tn(e.places,f)!==void 0;for(let f of et(t)){let A=f.getAttribute(\"data-act\");A!==null&&r.add(A);let u=A!==null&&f.getAttribute(\"data-debounce\")===null?Fi(f):void 0;u&&n.push({at:`drawing <${f.localName} data-act=\"${A}\">`,says:u});let E=f.getAttribute(\"data-record\");E!==null&&(o.add(E),!i.has(E)&&!a(E)&&n.push({at:`drawing <${f.localName} data-record=\"${E}\">`,says:e.placesUnsure?`It names \"${E}\", 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.${ve(e.places)}${St}`:`It names \"${E}\", 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.${ve(e.places)}`}));let v=f.getAttribute(\"data-place\");v!==null&&!a(v)&&n.push({at:`drawing <${f.localName} data-place=\"${v}\">`,says:e.placesUnsure?`It names the place \"${v}\", which is none of the places this run was told of.${ve(e.places)}${St}`:`It names the place \"${v}\", which this app does not have.${ve(e.places)}`}),n.push(...Yl(f)),n.push(...Xl(f,e,i))}let l=f=>{if(f.localName===\"graview-video\")return;let A=f.getAttribute(\"data-record\");if(A!==null)return A;let u=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(u!==null&&i.has(u))return u;let E=new Set;for(let v of et(f)){let h=v.getAttribute(\"data-record\");h!==null&&v.localName!==\"graview-video\"&&E.add(h)}return E.size===1?[...E][0]:void 0},d=(f,A)=>{let u=i.get(A),E=u?.kind??(A.includes(\":\")?A.slice(0,A.indexOf(\":\")):\"\"),v=[...et(f)],h=v.find(O=>O.localName in Io)??v.find(O=>O.localName===\"a\"&&O.getAttribute(\"data-record\")===A)??v.find(O=>O.localName===\"strong\"||O.localName===\"b\"),T=q(h?re(h):\"\")||u?.label||A;return{id:A,kind:E,title:T,parts:Bi(m(f,h),A,T)}},g=f=>{let A=[...et(f)].filter(h=>h.localName===\"tr\"&&!rn(h)),u=A.find(h=>h.parentElement?.localName===\"thead\"||h.childNodes.every(T=>!de(T)||T.localName===\"th\")),E=u?u.childNodes.filter(de).map(h=>q(re(h))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:A.filter(h=>h!==u).map(h=>{let T=h.childNodes.filter(de),O=l(h),y=O?i.get(O):void 0;return{id:O??\"\",kind:y?.kind??\"\",title:q(re(T[0]??h)),parts:T.slice(1).map((N,w)=>({t:\"field\",label:E[w+1]??\"\",text:q(re(N))}))}})}]}};function m(f,A){let u=[],E=\"\",v=()=>{let T=q(E);E=\"\",T&&u.push({t:\"text\",text:T})},h=f.childNodes;for(let T=0;T<h.length;T+=1){let O=h[T];if(O===A)continue;if(O instanceof Je){E+=O.data;continue}if(!de(O)||rn(O)||Vi.has(O.localName))continue;if(A&&[...et(O)].includes(A)){v(),u.push(...m(O,A));continue}let y=[];for(let N=T;N<h.length;N+=1){let w=h[N];if(w instanceof Je&&q(w.data)===\"\")continue;if(!de(w)||rn(w)||ji.has(w.localName)||w.localName in Io)break;let P=l(w);if(!P)break;y.push({element:w,id:P}),T=N}if(y.length>0){v();let N=y.every(w=>w.element.localName===\"li\"||w.element.localName===\"tr\");u.push({t:\"list\",as:N?\"row\":\"card\",columns:1,groups:[{items:y.map(w=>d(w.element,w.id))}]});continue}u.push(...b(O,N=>E+=N,v))}return v(),u}function b(f,A,u){let E=f.localName;if(ji.has(E)&&E!==\"label\")return A(re(f)),[];if(E===\"mark\"){u();let h=q(re(f));return h?[{t:\"badge\",text:h}]:[]}u();let v=Io[E]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(v!==void 0){let h=q(re(f));return h?[{t:\"heading\",level:v,text:h}]:[]}switch(E){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(T=>de(T)&&T.localName===\"li\"&&!rn(T)).map(T=>{let O=l(T);if(O)return d(T,O);let y=m(T),N=y[0],w=N&&(N.t===\"text\"||N.t===\"heading\")?N.text:\"\";return{id:\"\",kind:\"\",title:w,parts:w?y.slice(1):y}})}]}];case\"table\":return[g(f)];case\"dl\":{let h=[],T=\"\";for(let O of f.childNodes.filter(de))if(O.localName===\"dt\")T=q(re(O));else if(O.localName===\"dd\")h.push({t:\"field\",label:T,text:q(re(O))});else if(O.localName===\"div\")for(let y of O.childNodes.filter(de))y.localName===\"dt\"?T=q(re(y)):y.localName===\"dd\"&&h.push({t:\"field\",label:T,text:q(re(y))});return h}case\"figure\":{let h=f.childNodes.find(y=>de(y)&&y.localName===\"figcaption\"),T=q(f.childNodes.filter(y=>y!==h).map(re).join(\" \")),O=h?q(re(h)):\"\";return T?[{t:\"figure\",text:T,...O?{label:O}:{}}]:O?[{t:\"text\",text:O}]:[]}case\"meter\":case\"progress\":{let h=Number(f.getAttribute(\"value\")??0),T=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(h/T*100)}%`}]}case\"svg\":{let h=f.childNodes.find(y=>de(y)&&y.localName===\"title\"),T=q(f.getAttribute(\"aria-label\")??(h?re(h):\"\"));if(T)return[{t:\"text\",text:T,tone:\"picture\"}];let O=[...et(f)].filter(y=>y.localName===\"text\").map(y=>q(re(y))).filter(Boolean);return O.length>0?[{t:\"text\",text:O.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let h=q(f.getAttribute(\"alt\")??\"\");return h?[{t:\"text\",text:h,tone:\"picture\"}]:[]}case\"graview-video\":{if(f.getAttribute(\"data-app\")!==null){let R=f.getAttribute(\"data-app\")??\"\",S=e.props.theme?.reel;if(R!==\"reel\"||!S)return n.push({at:`drawing <graview-video data-app=\"${R.slice(0,80)}\">`,says:R!==\"reel\"?`It names \"${R.slice(0,80)}\", which is no video of the app: the host draws no player there. The app's own video is data-app=\"reel\".`:\"It names the app's reel, which this host did not hand: the host draws no player there. A host hands the app's reel as reel.\"}),[];let F=Gi(S,{app:\"reel\",autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push(F);let L=F.autoplay?`, playing as a background, muted and looping${F.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${F.text}, ${zi(F.duration!==void 0?{duration:F.duration}:{})}${L}`,tone:\"picture\"}]}let h=f.getAttribute(\"data-field\")??\"\",T=f.getAttribute(\"data-record\")??\"\",O=i.get(T),y=O&&h&&Object.hasOwn(O,h)?O[h]:void 0,N=(Array.isArray(y)?y:[y])[Number(f.getAttribute(\"data-index\")??\"0\")];if(!N||typeof N.name!=\"string\"||typeof N.type!=\"string\"||!N.type.startsWith(\"video/\"))return n.push({at:`drawing <graview-video data-field=\"${h}\">`,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).\"}),[];let w=Gi(N,{record:T,field:h,autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push(w);let P=w.autoplay?`, playing as a background, muted and looping${w.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${w.text}, ${zi(w.duration!==void 0?{duration:w.duration}:{})}${P}`,tone:\"picture\"}]}case\"button\":{let h=q(re(f));return h?[{t:\"text\",text:h,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let h=q(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),T=E===\"select\"?q(re(f.childNodes.find(O=>de(O)&&O.localName===\"option\"&&O.selected)??f)):f.value;return[{t:\"field\",label:h,text:T}]}case\"label\":return m(f);default:return m(f)}}return{parts:m(t),problems:n,acts:[...r],records:[...o],videos:s}}var ql=0,Kl=1,Zl=2,Jl=3,Yi=1,Ql=2,Xi=3,ec=1,tc=3,nc=8,qi=\"~\",on=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ki=new Set([\"input\",\"select\",\"textarea\",\"option\"]),rc=new Set([\"value\",\"checked\",\"selected\"]),Zi=[\"aria-label\",\"aria-labelledby\",\"title\"],oc=t=>Zi.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function Ji(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:qi};s.set(qi,a);let l=0,d=!1,g=new WeakMap,m=new Map,b=new Map,p=y=>{o.push(y),o.length>200&&o.shift(),e.onRefused?.(y)},f=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),A=(y,N)=>{if(y.namespace===\"html\"&&y.name&&Ki.has(y.name))return y.dom;if(N?.namespace===\"html\"&&N.name===\"textarea\")return N.dom},u=(y,N)=>{let w=y.dom,P=g.get(w)??w.getAttribute(\"role\");if(P===null||!P.split(/\\s+/).some(R=>zs.includes(R.toLowerCase())))return void g.delete(w);if(oc(w)){g.delete(w),w.getAttribute(\"role\")!==P&&w.setAttribute(\"role\",P);return}g.set(w,P),w.removeAttribute(\"role\"),N&&p({reason:\"value\",element:y.name,name:\"role\"})},E=()=>{if(b.size===0)return;let y=new Set,N=w=>{for(let P of w.children){if(P.refused||P.text)continue;let R=P.dom.getAttribute(\"id\");R&&y.add(R),N(P)}};N(a);for(let[w,P]of b){if(w.id===void 0||s.get(w.id)!==w){b.delete(w);continue}let R=w.dom;for(let[S,F]of P){let L=F.value.split(/\\s+/).filter(K=>K!==\"\"),V=L.filter(K=>!y.has(K));if(L.length>0&&V.length===0){if(F.drawn)continue;F.drawn=!0,R.setAttribute(S,F.value),u(w,!1)}else F.drawn&&(F.drawn=!1,R.removeAttribute(S),p({reason:\"reference\",element:w.name,name:S,ids:V.length>0?V:L}),u(w,!0))}}},v=(y,N,w,P=!0)=>{let R=y.dom;if(w!=null&&typeof w!=\"string\")return p({reason:\"value\",element:y.name,name:N});let S=_o(y.namespace,y.name,N,w??null,e);if(\"refused\"in S){let K=_o(y.namespace,y.name,N,null,e);return\"refused\"in K||R.removeAttribute(K.name),!(\"refused\"in K)&&K.name===\"role\"&&g.delete(R),p(S.refused)}for(let K of S.dropped??[])p(K);let F=y.namespace===\"html\"&&rc.has(S.name)&&Ki.has(y.name),L=R,V=F?S.name===\"value\"?L.value:S.name===\"checked\"?L.checked:L.selected:void 0;if(S.name===\"role\"&&g.delete(R),Vs.includes(S.name)){let K=b.get(y)??new Map;S.value===null?K.delete(S.name):K.set(S.name,{value:S.value,drawn:!0}),K.size>0?b.set(y,K):b.delete(y)}S.value===null?R.removeAttribute(S.name):R.setAttribute(S.name,S.value),P&&(S.name===\"role\"||Zi.includes(S.name))&&u(y,S.name===\"role\"),e.onAttribute?.(R,S.name),F&&(S.name===\"value\"&&\"value\"in L?(L.value=S.value??\"\",V!==L.value&&e.onFieldSet?.(R)):S.name===\"checked\"&&\"checked\"in L?(L.checked=S.value!==null,V!==L.checked&&e.onFieldSet?.(R)):S.name===\"selected\"&&\"selected\"in L&&(L.selected=S.value!==null,V!==L.selected&&e.onFieldSet?.(R.parentElement?.closest(\"select\")??R)))},h=y=>{if(!y.refused){l-=1,y.id!==void 0&&s.delete(y.id);for(let N of y.children)h(N)}},T=(y,N)=>{if(!on(y)||typeof y.id!=\"string\"||s.has(y.id))return p({reason:\"record\"}),f();if(l>=r)return p({reason:\"budget\"}),d||(d=!0,e.onOverBudget?.()),f();let w=y.id;if(y.type===nc)return f();if(y.type===tc){if(Er(N.namespace,N.name))return p({reason:\"child\",element:N.name}),f();let L=n.createTextNode(String(y.data??\"\").slice(0,lo)),V={dom:L,children:[],text:!0,id:w,parent:N};return s.set(w,V),i.set(L,w),l+=1,V}if(y.type!==ec)return p({reason:\"record\"}),f();let P=String(y.element);if(Er(N.namespace,N.name))return p({reason:\"child\",element:P}),f();let R=Mi(P,N.namespace);if(\"refused\"in R)return p(R.refused),f();let S=n.createElementNS(R.namespace===\"svg\"?Ys:Ws,R.name);R.as&&S.setAttribute(\"data-graview-as\",R.as),R.namespace===\"html\"&&R.name===\"img\"&&S.setAttribute(\"referrerpolicy\",\"no-referrer\"),R.namespace===\"html\"&&R.name===\"a\"&&(S.setAttribute(\"target\",\"_blank\"),S.setAttribute(\"rel\",\"noopener noreferrer\"),S.setAttribute(\"referrerpolicy\",\"no-referrer\"));let F={dom:S,name:R.name,namespace:R.namespace,children:[],id:w,parent:N};if(s.set(w,F),i.set(S,w),l+=1,on(y.attributes)){for(let[L,V]of Object.entries(y.attributes))v(F,L,V,!1);u(F,!0)}if(e.decorate?.(S,R.name,R.namespace),on(y.properties))for(let L of Object.keys(y.properties))p({reason:\"attribute\",element:R.name,name:L});if(on(y.eventListeners))for(let L of Object.keys(y.eventListeners))y.eventListeners[L]!=null&&p({reason:\"attribute\",element:R.name,name:`on${L}`});if(Array.isArray(y.children))for(let L of y.children){let V=T(L,F);F.children.push(V),S.appendChild(V.dom)}return F},O=y=>{if(!Array.isArray(y))return p({reason:\"record\"});let[N,w]=y,P=typeof w==\"string\"?s.get(w):void 0;if(!P)return p({reason:\"record\"});switch(N){case ql:{if(P.text)return p({reason:\"record\"});let R=Number(y[3]),S=Number.isInteger(R)&&R>=0&&R<=P.children.length?R:P.children.length,F=y[2],L=on(F)&&typeof F.id==\"string\"?m.get(F.id):void 0,V;L&&L.parent?.namespace===P.namespace&&!Er(P.namespace,P.name)?(m.delete(F.id),L.parent=P,V=L):V=T(F,P),P.dom.insertBefore(V.dom,P.children[S]?.dom??null),P.children.splice(S,0,V),P.namespace===\"html\"&&P.name===\"textarea\"&&e.onFieldSet?.(P.dom);return}case Kl:{let R=Number(y[2]),S=P.children[R];if(!S)return p({reason:\"record\"});P.children.splice(R,1),S.dom.parentNode?.removeChild(S.dom),S.id!==void 0&&!S.refused?m.set(S.id,S):h(S);return}case Zl:{if(!P.text)return p({reason:\"record\"});P.dom.data=String(y[2]??\"\").slice(0,lo);let R=A(P,P.parent);R&&e.onFieldSet?.(R);return}case Jl:{if(P===a||P.text)return p({reason:\"record\"});let R=String(y[2]),S=y[4]??Yi;return S===Ql?v(P,R,y[3]):p(S===Yi||S===Xi?{reason:\"attribute\",element:P.name,name:S===Xi?`on${R}`:R}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(y,N){if(!Array.isArray(y))return p({reason:\"record\"}),!0;try{for(let w=0;w<y.length;w+=1){if(N&&w%32===0&&N())return!1;O(y[w])}return!0}finally{for(let w of m.values())h(w);m.clear(),E()}},get refused(){return o},get size(){return l},idOf:y=>i.get(y),elementOf(y){let N=s.get(y);return N&&!N.text&&N!==a?N.dom:void 0},dispose(){for(let y of a.children)h(y);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}var sc=\"@layer graview-motion, graview-region, graview-view, graview-theme;\",ic=new Set([\"media\",\"supports\",\"container\",\"keyframes\",\"-webkit-keyframes\"]),ac=new Set([\"src\",\"image-set\",\"-webkit-image-set\"]),lc={\"}\":\"{\",\")\":\"(\",\"]\":\"[\"};function ea(t){let e=[],n=Qt(t);for(let[r,o]of n.entries())switch(o.type){case\"bad-string\":case\"bad-url\":case\"url\":case\"CDO\":case\"CDC\":return!1;case\"delim\":if(o.value===\"\\\\\")return!1;break;case\"at-keyword\":if(!ic.has(o.value.toLowerCase()))return!1;break;case\";\":if(e.length===0)return!1;break;case\"function\":{let s=o.value.toLowerCase();if(ac.has(s))return!1;if(s===\"url\"){let i=n[r+1];if(i?.type!==\"string\"||!i.value.startsWith(\"#\"))return!1}e.push(\"(\");break}case\"{\":case\"(\":case\"[\":e.push(o.type);break;case\"}\":case\")\":case\"]\":if(e.pop()!==lc[o.type])return!1;break;default:}return e.length===0}function Qi(t,e){return e.trim()===\"\"||!ea(e)?\"\":`@layer ${t} {\n${e}\n}`}function ta(t,e){return t.trim()===\"\"?ea(e)?e:\"\":[sc,Qi(\"graview-theme\",t),Qi(\"graview-view\",e)].filter(n=>n!==\"\").join(`\n`)}function na(t,e,n){let{root:r}=Ui(),o=!1,s=Ji(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 m of t)s.apply(m);let i=[...s.refused],a=\"\",l=[];if(e){let m=en(e,void 0,{faces:{scope:\"graview-view\",...n.lent?{lent:n.lent}:{},...n.ownFaces===!1?{refused:!0}:{}}});a=m.css,l=m.faces;for(let b of m.refused)i.push({reason:\"css\",name:\"stylesheet\",css:b})}let d=n.theme?gr(n.theme).css:\"\",g=ta(d,a);return{root:r,refused:i,size:s.size,over:o,css:g,faces:l,elementOf:m=>s.elementOf(m),idOf:m=>s.idOf(m)}}var Nr=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",ra={animate:Nr,animateTransform:Nr,animateMotion:Nr,set:Nr,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",loading:' An <img> loads \"lazy\" or \"eager\".',fetchpriority:' An <img> fetches at \"high\", \"low\" or \"auto\".',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 cc(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(ra,s)?ra[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: ${Di(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${$i(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}case\"css\":return t.css?.reason===\"font-face\"?{at:\"stylesheet @font-face\",says:wo(t.css)}:{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 oa(t,e,n={}){let{limits:r}=e;if(t.messages>r.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${r.messages} a view may send in a second.`};let o=new Set(e.acts);for(let p of t.asked)if(!o.has(p.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${p.name}\", which its manifest does not name.`};let s=Pi(e.props),i=na(t.renders,t.sheets,{maxNodes:r.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:p=>p}:{},...n.theme?{theme:n.theme}:{},...n.lent?{lent:n.lent}:{},...n.ownFaces===!1?{ownFaces:!1}:{},link:p=>Ii(p,{handed:s,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(i.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${r.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let a=[...e.places,...(e.lists??[]).filter(p=>!e.places.some(f=>f.as===p)).map(p=>({as:p}))],l=e.placesUnsure===!0,d=Wi(i.root,{props:e.props,places:a,...l?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let p of d.acts)if(!o.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 g=[...i.refused.map(p=>cc(p,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...d.problems],m=new Set,b=p=>{for(let f of p.childNodes){if(f.nodeType!==1)continue;let A=f.getAttribute(\"data-part-failed\"),u=f.getAttribute(\"data-part\")??\"\";if(A!==null&&er.test(u)&&!m.has(`${u} ${A}`)&&m.size<10){m.add(`${u} ${A}`);let E=JSON.stringify((f.getAttribute(\"data-part-why\")??\"\").replace(/[\\u0000-\\u001f\\u007f\\u2028\\u2029]+/g,\" \").slice(0,300));g.push({at:`part \"${u}\"`,says:`The part \"${u}\" ${A===\"slow\"?\"took too long\":\"threw\"}: ${E}. The page draws a note in its place and the rest of the view.`})}b(f)}};b(i.root);for(let p of t.went)\"record\"in p&&!(e.props.node?.id===p.record||(e.props.nodes??[]).some(f=>f.id===p.record)||tn(a,p.record))&&g.push({at:\"navigate\",says:l?`It goes to ${nn(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.${ve(a)}${St}`:`It goes to ${nn(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.${ve(a)}`}),\"place\"in p&&!tn(a,p.place)&&g.push({at:\"navigate\",says:l?`It goes to the place ${nn(p.place)}, which is none of the places this run was told of.${ve(a)}${St}`:`It goes to the place ${nn(p.place)}, which this app does not have.${ve(a)}`});return{ok:!0,parts:d.parts,problems:g,drawn:i,videos:d.videos}}var Do=\"graviewHeadless\",Mo=\"graviewHeadlessView\";var aa=globalThis,dc=Promise.prototype.then,uc=Promise.resolve(),sn=t=>void dc.call(uc,t),Tr=aa.performance,an=Tr&&typeof Tr.now==\"function\"?Tr.now.bind(Tr):Date.now,tt=JSON.stringify,la=JSON.parse,fc=Object.defineProperty,xr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),kt=t=>{try{return la(tt(t??null))}catch{return null}},z={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},ke,ln=(t,e)=>{ke??={reason:t,detail:e}},nt=t=>{z.logs.length<50&&z.logs.push(t.slice(0,500))},At={removed:[],stuck:[],sealed:!1},Lo=new Map,rt=ti({send(t){if(z.messages+=1,t.type===\"mine\"){let e=t.id,n=t.op===\"set\"?_s(t.key,t.value):void 0;n?nt(n):t.op===\"set\"&&t.value===null?Lo.delete(t.key):t.op===\"set\"&&Lo.set(t.key,t.value),sn(()=>rt.hear(n?{type:\"mine-answer\",id:e,ok:!1,sentence:n}:{type:\"mine-answer\",id:e,ok:!0,...t.op===\"get\"?{value:Lo.get(t.key)??null}:{}}))}else t.type===\"render\"?z.renders.push(kt(t.records)):t.type===\"style\"?z.sheets=(kt(t.sheets)??[]).map(String):t.type===\"gestures\"?z.gestures=kt(t.bound):t.type===\"navigate\"&&\"place\"in t?z.went.push({place:String(t.place),...t.where!==void 0?{where:kt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&z.went.push({record:String(t.to),...t.where!==void 0?{where:kt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return z.messages+=1,z.asked.push({name:String(t),args:kt(e)}),Promise.resolve({type:\"answer\",id:z.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){z.messages+=1,z.went.push({record:String(t)})},microtask:sn,now:an,threw:t=>ln(\"error\",`It threw: ${xr(t)}`),warn:nt,hardening:()=>At}),sa=!1,$o=!1;function pc(t){if($o||typeof t!=\"function\"||($o=!0,ke))return;let e=an();try{t.call(void 0,rt.view)}catch(n){ln(\"error\",`It threw: ${xr(n)}`)}z.ms+=an()-e}async function mc(t){if(sa)return tt({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});sa=!0;let e;try{e=la(String(t))}catch{return tt({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!$o&&!ke)return tt({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=an();ke||rt.hear({type:\"props\",props:e.props,push:1,partMs:e.limits.pushMs/4}),z.ms+=an()-n,z.ms>=e.limits.pushMs&&ln(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!ke;o+=1)await new Promise(s=>sn(s));if(ke||(z.clicks=rt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!ke){let o=typeof e.press.target==\"string\"?e.press.target:rt.find(e.press.selector);if(z.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:z.asked.length,went:z.went.length,renders:z.renders.length},o!==void 0){try{rt.hear({type:\"dom-event\",target:o,event:\"click\"})}catch(s){ln(\"error\",`It threw: ${xr(s)}`)}for(let s=0;s<64&&!ke;s+=1)await new Promise(i=>sn(i))}}if(ke)return tt({ok:!1,...ke,transcript:z});let r=oa(z,e);return r.ok?tt({ok:!0,transcript:z,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:At.removed.length,sealed:At.sealed}}):tt({ok:!1,reason:r.reason,detail:r.detail,transcript:z})}var hc=Object.freeze({log:(...t)=>nt(t.map(String).join(\" \")),info:(...t)=>nt(t.map(String).join(\" \")),debug:(...t)=>nt(t.map(String).join(\" \")),warn:(...t)=>nt(t.map(String).join(\" \")),error:(...t)=>nt(t.map(xr).join(\" \"))}),gc=0,ia=()=>gc+=1,yc=[[\"console\",hc],[\"setTimeout\",ia],[\"setInterval\",ia],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",sn],[\"graview\",rt.view],[Mo,pc],[Do,t=>mc(t)]];for(let[t,e]of yc)fc(aa,t,{value:e,writable:!0,enumerable:!1,configurable:!0});At=Hs(globalThis,[\"graview\",Mo,Do],{primitivesStay:!0});At.stuck.length>0&&ln(\"refused\",`This isolate could not be hardened: ${At.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 L=Symbol(\"name\"),Me=Symbol(\"prefix\"),$e=Symbol(\"value\"),H=Symbol(\"ns\"),ae=Symbol(\"owner\"),W=Symbol(\"owner_document\"),xe=Symbol(\"attributes\"),Y=Symbol(\"prev\"),D=Symbol(\"next\"),U=Symbol(\"child\"),le=Symbol(\"parent\"),Le=Symbol(\"host\"),he=Symbol(\"data\"),We=Symbol(\"listeners\"),Fr=Symbol(\"isTrusted\"),at=Symbol(\"path\"),lt=Symbol(\"stop_immediate_propagation\"),dt=Symbol(\"dispatching\"),Re=Symbol(\"content\"),X=Symbol(\"hooks\"),mn=Symbol(\"extensions\"),Ye=Symbol(\"hooks_dispatch\"),ee=Symbol(\"is_connected\"),ct=Symbol(\"create_element\"),ns=0,ce=1,ut=2,ft=3,pt=8,Xe=9,rs=10,He=11,j=\"http://www.w3.org/1999/xhtml\",ge=\"http://www.w3.org/2000/svg\",os=\"http://www.w3.org/XML/1998/namespace\",Ct=\"http://www.w3.org/2000/xmlns/\";function hn(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function J(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function ss(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function V(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 is=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,as=/[\\0\\t\\n\\f\\r />=]/u,Ca=/[\\0\\t\\n\\f\\r />]/u;function _e(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function ls(t){is.test(t)||Gr(t)}function Ur(t){(t===\"\"||as.test(t))&&Gr(t)}function gn(t,e,n){let r=_e(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===\"\"||Ca.test(i))||(n===\"element\"?!is.test(a):a===\"\"||as.test(a)))&&Gr(o),i!=null&&r==null)throw V(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==os)throw V(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Ct)throw V(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Ct&&o!==\"xmlns\"&&i!==\"xmlns\")throw V(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function Gr(t){throw V(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var yn=0,bn=1,ds=2,jr=3,Ia=typeof performance>\"u\"?Date.now:performance.now.bind(performance),te=class{static NONE=yn;static CAPTURING_PHASE=bn;static AT_TARGET=ds;static BUBBLING_PHASE=jr;timeStamp=Ia();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=yn;[at]=[];[lt]=!1;[dt]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Fr,{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[Fr]}composedPath(){return[...this[at]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[lt]=!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 zr(t,e,n){if(t.cancelBubble)return;let o=e[We]?.get(t.type)?.[n===bn?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?ds:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(Da,0,a)}if(t[lt])break}}function Da(t){throw t}var It=[],En=new WeakMap;function wn(t,e){let n=En.get(t);n?n.push(e):En.set(t,[e]),It[It.length-1].push(t)}function ne(t){let e=[];It.push(e);let n;try{n=t()}catch(r){It.pop();try{cs(e)}catch{}throw r}return It.pop(),cs(e),n}function cs(t){let e,n=!1;for(let r of t){let o=En.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}En.delete(r)}}if(n)throw e}var Nn=[],Dt=[],Vr=!1;function qe(t){for(let e of t)Nn.push(e),e[1]&&Dt.push(e[1]);if(!Vr){Vr=!0;try{let e,n=!1;for(let r=0;r<Nn.length;r++){let[o,s]=Nn[r];s&&Dt.splice(Dt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Nn.length=0,Dt.length=0,Vr=!1}}}function Mt(t){let e=t;for(;e;){if(Dt.includes(e))return!0;e=e[le]??e[Le]}return!1}var $t=Symbol(\"listenerRegistrations\"),Fe=class{[We]=void 0;[$t]=void 0;[W]=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=Br(o),l=this[$t];l||(l=new Map,this[$t]=l);let c=l.get(e);c||(c={},l.set(e,c));let p=c[a];if(p||(p=new Map,c[a]=p),p.has(n))return;let h=this,b={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(b.normalizedListener=function(...E){if(b.signal?.aborted){Tn(h,b);return}return b.once&&Tn(h,b),typeof b.listener==\"object\"?b.listener.handleEvent(...E):b.listener.call(this,...E)});let m=this[We];m||(m=new Map,this[We]=m);let f=m.get(e);f||(f={},m.set(e,f));let O=f[a];if(O||(O=new Set,f[a]=O),p.set(n,b),O.add(b),i){let u=()=>{Tn(h,b)};b.abortListener=u,i.addEventListener(\"abort\",u,{once:!0})}this[W]?.defaultView[Ye].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Ma.call(this,e,n,r)}dispatchEvent(e){if(e[dt])throw V(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[dt]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[at]=n;for(let s=n.length;s--;)if(zr(e,n[s],bn),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(zr(e,o[s],jr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[dt]=!1,e.cancelBubble=!1,e[lt]=!1,e.eventPhase=yn,e.currentTarget=null,e[at]=[]}}};function Ma(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Br(!!r),s=this[$t]?.get(t)?.[o]?.get(e);s&&Tn(this,s)}function Br(t){return t?\"capture\":\"bubble\"}function Tn(t,e){let n=Br(e.capture),r=t[$t],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[We],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[W]?.defaultView[Ye].removeEventListener?.(t,e.type,e.listener,e.capture))}var ye=class extends Array{item(e){return this[e]??null}};var Ht=0,us=1,Xr=2,qr=3,Ft=4,fs=0,ps=1,Sn=2,kn=3,ms=4,Yr=5,hs=6,gs=7,xn=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function $a(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 de(t){throw V(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function An(t,e){let n=typeof e==\"string\"?Ut(e):[{combinator:Ft,matchers:e}],r=null,o=t[U];return o&&n[0].matchers.length&&Kr(o,n,s=>(r=s,!1)),r}function On(t,e){let n=typeof e==\"string\"?Ut(e):[{combinator:Ft,matchers:e}],r=new ye,o=t[U];return o&&n[0].matchers.length&&Kr(o,n,s=>{r.push(s)}),r}function Ut(t,e=!1,n=!1){let r={combinator:Ft,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===\"\"&&de(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&de(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&de(t),l[1]===\">\"?r.combinator=us:l[1]===\"+\"?r.combinator=qr:l[1]===\"~\"?r.combinator=Xr:r.combinator=Ht,r={combinator:Ft,matchers:[]},o.push(r));let c=l[8]?J(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&de(t);let h,b=l[4]??l[5]??l[7];if(l[2]){xn.test(c)||de(t);let m=l[5],f=m?.[0];if(l[3]==null&&(f==='\"'||f===\"'\")){let O=l[0].lastIndexOf(m);b=i.slice(l.index+O+1),s.lastIndex=i.length}else m!=null&&!xn.test(m)&&de(t);h=ms}else l[6]?(xn.test(c)||de(t),h=l[6]===\"#\"?Sn:kn):l[8]?h=l[9]==null?Yr:hs:l[7]===\"*\"?h=fs:l[7]&&xn.test(l[7])?h=ps:de(t);l[9]?([b,s.lastIndex]=$a(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&de(t),c===\"has\"&&e&&de(t),Ut(b,e||c===\"has\",c===\"has\")):h===Yr&&de(t),r.matchers.push({type:h,name:c,value:b}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&de(t),o}function La(t,e){let n=Ut(e);return n[0]?.matchers.length?Lt(t,n):!1}function Ha(t,e){let n=Ut(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Ht,s={type:gs,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Ht,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===qr||o===Xr?t[D]:t[U];if(!i)return!1;let a=!1;return Kr(i,n,()=>(a=!0,!1),t),a}function Kr(t,e,n,r){let o=[],s=t;for(;s;){if(ie(s)){if(Lt(s,e,r)&&n(s)===!1)return!1;let i=s[U];if(i){let a=s[D];a&&o.push(a),s=i;continue}}s=s[D]??o.pop()??null}return!0}function Lt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===Ft){if(!vn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Lt(t,a,n)}let s=r===us||r===Ht?le:Y,i=t[s];if(!i)return!1;if(r===Ht||r===Xr){for(;i;){if(ie(i)&&vn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Lt(i,a,n))return!0}i=i[s]}return!1}else{if(r===qr&&!ie(i)){for(;i&&!ie(i);)i=i[s];if(!i)return!1}if(!ie(i)||!vn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Lt(i,a,n)}}function Wr(t,e){return t.getAttributeNS(null,t.namespaceURI===j?J(e):e)}function vn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(vn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case fs:return o===\"*\";case ps:return t.namespaceURI===j?t.localName===J(o):t.localName===o;case Sn:return Wr(t,\"id\")===o;case kn:let i=Wr(t,\"class\");return i?hn(i).includes(o):!1;case ms:let a=Wr(t,o);return s==null?a!=null:a===s;case gs:return t===n;case Yr:de(`:${o}`);case hs:switch(o){case\"has\":return Ha(t,s||\"\");case\"not\":return!La(t,s||\"\");default:de(`:${o}(${s})`)}}return!1}function Fa(t){return t.nodeType===ut}function Gt(t){return he in t}function Jr(t){return t.nodeType===ft}function Ua(t){return t.nodeType===pt}function ie(t){return t.nodeType===ce}function Zr(t){return t.nodeType===He}function ws(t){return\"appendChild\"in t}function Rn(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 zt(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!ie(l)))continue;let c=l[xe];if(c)for(let h of c)o.has(h)||(o.add(h),e.push(h));let p=l[Re];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=a}return{nodes:e,treeNodes:s}}function jt(t,e){for(let n of t)n[W]=e}function ys(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[W]=e,r}function bs(t,e){if(Jr(t))return e.createTextNode(t.data);if(Ua(t))return e.createComment(t.data);if(Fa(t))return ys(t,e);if(ie(t)){let n=e[ct](t[L],t.namespaceURI,t[Me],t.localName);if(t[xe])for(let r=0;r<t[xe].length;r++){let o=t[xe].item(r);n.attributes.setNamedItem(ys(o,e))}return n}else{if(Zr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[W]=e,n}}}function _n(t,e,n=t.ownerDocument){if(t.nodeType===Xe)throw V(\"Cannot clone a document node\",\"NotSupportedError\");let r=bs(t,n);if(!e||!ie(t)&&!Zr(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,ie(i.source)&&i.source.namespaceURI===j&&i.source.localName===\"template\"){let p=i.source[Re];p&&(o.has(p)&&Es(),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)&&Es(),o.add(a);let c=bs(a,n);ie(a)||Zr(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function Es(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Pn(t,e){let n=String(e);return n===\"\"?null:An(t,[{type:Sn,name:n}])}function Cn(t,e){let n=[...new Set(hn(String(e)))];return On(t,n.map(r=>({type:kn,name:r})))}function In(t,e){let n=String(e),r=J(n),o=[];for(let s of Dn(t))ie(s)&&(n===\"*\"||(s.namespaceURI===j?s[L]===r:s[L]===n))&&o.push(s);return o}function Dn(t){let e=[],n=[],r=t[U];for(;r;){e.push(r);let o=r[U],s=r[D];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function zt(t){let e=Dn(t);return e.unshift(t),e}var be=class extends Fe{nodeType=ns;[L]=\"\";[le]=null;[Le]=null;[U]=null;[Y]=null;[D]=null;[ee]=!1;get[X](){return this[W].defaultView[Ye]}get localName(){return this[L]}get nodeName(){return this[L]}get ownerDocument(){return this[W]}get isConnected(){return this[ee]}isDefaultNamespace(e){let n=_e(e);return Ga(this)===n}get parentNode(){return this[le]}set parentNode(e){}get parentElement(){let e=this[le];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[Y]}set previousSibling(e){}get nextSibling(){return this[D]}set nextSibling(e){}get previousElementSibling(){let e=this[Y];for(;e&&e.nodeType!==1;)e=e[Y];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[D];for(;e&&e.nodeType!==1;)e=e[D];return e}set nextElementSibling(e){}get firstChild(){return this[U]}set firstChild(e){}get lastChild(){let e=this[U];for(;e;){let n=e[D];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Gt(this)?this.data:null}set nodeValue(e){Gt(this)&&(this.data=e)}get textContent(){if(Gt(this))return this.data;let e=\"\";for(let n of Dn(this))Jr(n)&&(e+=n.data);return e}set textContent(e){if(Gt(this))this.data=e;else if(ws(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return _n(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Ga(t){let e=t;for(;e;)switch(e.nodeType){case ce:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Ct,\"xmlns\");if(r!=null&&r.prefix==null)return _e(r.value);e=n.parentElement;break}case Xe:e=e.documentElement;break;case rs:case He:return null;case ut:e=e.ownerElement;break;default:e=e.parentElement}return null}var Ee=Symbol(\"insertNode\"),to=Symbol(\"preflightInsertions\"),Mn=Symbol(\"replaceNode\"),Ue=class extends be{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Ke(e),r=this.parentNode;if(r)return Qr(o=>{Pe(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=eo(r,n,o);this.parentNode===r?r[Mn](i,this,o):r[Ee](i,s,o)})}before(...e){let n=Ke(e),r=this.parentNode;if(r)return Qr(o=>{Pe(r,n);let s=this[Y];for(;s&&n.includes(s);)s=s[Y];let i=eo(r,n,o);r[Ee](i,s?s[D]:r.firstChild,o)})}after(...e){let n=Ke(e),r=this.parentNode;if(r)return Qr(o=>{Pe(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=eo(r,n,o);r[Ee](i,s,o)})}};function Qr(t){return ne(()=>{let e=[];try{t(e)}catch(n){try{qe(e)}catch{}throw n}qe(e)})}function Ke(t){return t.map(e=>e instanceof be?e:String(e))}function Vt(t,e){return e instanceof be?e:t.ownerDocument.createTextNode(String(e))}function Pe(t,e){for(let n of e){if(!(n instanceof be))continue;let r=t;for(;r;){if(r===n)throw V(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[le]??r[Le]}}}function eo(t,e,n){let r=[];for(let s of e)r.push(Vt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[to](r);for(let s of r)o[Ee](s,null,n);return o}var $n,no=0,Ns=0,Ts=0,xs=0,mt=!1,oo=!1,Bt=!1,Ln=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=ja(n),o=$n??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?no++:ro(i,-1),s.set(this,r),ro(r,1),this.#e.add(e)}disconnect(){let e=$n;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),no--,ro(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,no===0&&($n=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 we(t){let e=$n;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 ye,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 ye,target:t.target,type:t.type})}function Hn(...t){let e=new ye;return e.push(...t),e}function ja(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 ro(t,e){t.attributes&&(Ns+=e),t.characterData&&(Ts+=e),t.childList&&(xs+=e),mt=Ns>0,oo=Ts>0,Bt=xs>0}var ve=class extends Ue{childNodes=new ye;children=new ye;appendChild(e){return ne(()=>this[Ee](e,null))}insertBefore(e,n){return ne(()=>this[Ee](e,n||null))}append(...e){return ne(()=>{let n=Ke(e.filter(r=>r!=null));n.length>1&&Pe(this,n);for(let r of n)this[Ee](Vt(this,r),null)})}prepend(...e){return ne(()=>{let n=Ke(e.filter(o=>o!=null));n.length>1&&Pe(this,n);let r=this.firstChild;for(let o of n)this[Ee](Vt(this,o),r)})}replaceChildren(...e){return ne(()=>{let n=Ke(e.filter(o=>o!=null));Pe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[Ee](Vt(this,o),null)})}removeChild(e){return ne(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw V(\"The node is not a child of this node\",\"NotFoundError\");let n=this[ee]?zt(e):void 0,r=e[Y],o=e[D],s=Fn(this,e);if(n)for(let i of n)i[ee]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),qe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return ne(()=>this[Mn](e,n))}[Mn](e,n,r){if(Pe(this,[e]),n.parentNode!==this)throw V(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[Y],s=n[D],i=this.prepareInsertion(e),a=this[ee]?zt(n):void 0,l=new Set(i.map(({node:b})=>b)),c=s;for(;c&&l.has(c);)c=c[D];let p=Fn(this,n);if(a){for(let m of a)m[ee]=!1;let b=new Set(a);for(let m of i)b.has(m.node)&&(m.shouldDisconnect=!1)}this.commitInsertion(i,c);let h=this[ee];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,h),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return On(this,e)}querySelector(e){return An(this,e)}[Ee](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[to](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(Pe(this,[e]),n&&n.parentNode!==this)throw V(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[D]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[ee];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):qe(e)}prepareInsertion(e){let n=[];if(e.nodeType===He){let i=e[U];for(;i;)n.push(i),i=i[D]}else n.push(e);let r=this[ee],o=this[W],s=[];for(let i of n){let a=i[ee],l=a||r,c,p;if(i[W]===o)l&&(c=zt(i));else{let h=Rn(i);p=h.nodes,l&&(c=h.treeNodes)}s.push({node:i,nodes:c,adoption:p,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[le];if(i){let a=s.node[Y],l=s.node[D];s.source={parent:i,index:Fn(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[W];for(let{adoption:s}of e)s&&jt(s,r);let o=this[ee];for(let{nodes:s}of e)if(s)for(let i of s)i[ee]=o}attachChild(e,n){if(n){let s=n[Y];e[D]=n,e[Y]=s,s?s[D]=e:this[U]=e,n[Y]=e}else{e[D]=null;let s=this[U];if(s){let i;for(;i=s[D];)s=i;s[D]=e,e[Y]=s}else this[U]=e,e[Y]=null}let r=ie(e);e[le]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!ie(s);)s=s[D];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[Y],nextSibling:e[D]}}queueRemovalMutationRecord(e,n,r,o){Bt&&we({type:\"childList\",target:e,removedNodes:Hn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Bt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),we({type:\"childList\",target:this,addedNodes:Hn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==ce||Mt(this)?[]:[[()=>this[X].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===ce&&!Mt(s.parent)&&n.push([()=>s.parent[X].removeChild?.(s.parent,o,s.index)]),this.nodeType===ce&&!Mt(this)&&n.push([()=>this[X].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){Ss(e,n)}};function vs(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[ee]?n.treeNodes:void 0,s=e[Y],i=e[D],a=Fn(t,e);if(o)for(let c of o)c[ee]=!1;jt(n.nodes,r),Bt&&we({type:\"childList\",target:t,removedNodes:Hn(e),previousSibling:s,nextSibling:i}),o&&Ss(o,\"disconnectedCallback\");let l=[];t.nodeType===ce&&!Mt(t)&&l.push([()=>t[X].removeChild?.(t,e,a)]),qe(l)}function Fn(t,e){let n=e[Y],r=e[D];n?n[D]=r:t[U]=r,r&&(r[Y]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),ie(e)&&t.children.splice(t.children.indexOf(e),1),e[le]=null,e[D]=null,e[Y]=null,o}function Ss(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&wn(n,()=>r.call(n))}}function Wt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||wn(t,()=>i.call(t,e,n,r,o))}var Un=class{[U]=null;constructor(e){this[ae]=e}getNamedItem(e){let n=String(e),r=this[ae][H]===j?J(n):n,o=this[U];for(;o;){if(o.name===r)return o;o=o[D]}return null}getNamedItemNS(e,n){let r=_e(e),o=String(n),s=this[U];for(;s;){if(s.localName===o&&s[H]===r)return s;s=s[D]}return null}item(e){let n=this[U],r=0;for(;n;){if(r++===e)return n;n=n[D]}return null}get length(){let e=0,n=this[U];for(;n;)e++,n=n[D];return e}removeNamedItem(e){let n=String(e),r=this[ae][H]===j?J(n):n;return ne(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=_e(e),o=String(n);return ne(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[H]===r))}removeNamedItemImmediately(e){let n=this[ae],r=this[U],o=null;for(;r!=null;){if(e(r)){o&&(o[D]=r[D]),this[U]===r&&(this[U]=r[D]);let s=r.value;return r[D]=null,r[ae]=null,mt&&we({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[H],oldValue:s}),n[X].removeAttribute?.(n,r.name,r[H]),Wt(n,r.localName,s,null,r[H]),r}o=r,r=r[D]}return null}setNamedItem(e){return ne(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[ae],r=e[ae];if(r!=null&&r!==n)throw V(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[U],i=null;for(;s;){if(s.localName===e.localName&&s[H]===e[H]){if(s===e)return s;i?i[D]=e:this[U]=e,e[D]=s[D],s[D]=null,o=s;break}i=s,s=s[D]}o==null&&(i?i[D]=e:this[U]=e),e[ae]=n,e[W]=n[W],o&&(o[ae]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&mt&&we({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[H],oldValue:o?.value??null}),l&&n[X].removeAttribute?.(n,o.name,o[H]),(a||l)&&n[X].setAttribute?.(n,e.name,e.value,e[H]),a&&Wt(n,e.localName,o?.value??null,e.value,e[H]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[U];for(;e;)yield e,e=e[D]}};var Ze=class extends be{nodeType=ut;[H]=null;[D]=null;[ae]=null;constructor(e,n,r){super(),this[L]=e,this[$e]=n,r&&(this[H]=r)}get nodeName(){return this[L]}set nodeName(e){}get name(){return this[L]}set name(e){}get localName(){if(this[H]==null)return this[L];let e=this[L].indexOf(\":\");return e<0?this[L]:this[L].slice(e+1)}get prefix(){if(this[H]==null)return null;let e=this[L].indexOf(\":\");return e<0?null:this[L].slice(0,e)}get value(){return this[$e]}set value(e){let n=String(e),r=this[ae];if(!r){this[$e]=n;return}ne(()=>{let o=this[$e];this[$e]=n,mt&&o!==n&&we({type:\"attributes\",target:r,attributeName:this[L],attributeNamespace:this[H],oldValue:o}),this[X].setAttribute?.(r,this[L],n,this[H]),Wt(r,this.localName,o,n,this[H])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[ae]}get namespaceURI(){return this[H]}get specified(){return!0}};var za={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Va=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Ba=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Os=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Wa=\"|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|\",Ya=/^(?:color|face|size)$/i;function ks(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 za[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Rs(t){return t.namespaceURI===j&&Va.has(t.localName)}function As(t){let e=t.localName;return t[H]===ge&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Xa(t,e){if(Wa.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(Os))if(Ya.test(n[1]))return!0;return!1}function Gn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Ba)){let a=i[1];if(a){let l=i[2],c=J(a),p=o[o.length-1]?.element??e,h=p[H]===ge?ge:j;if(c===\"svg\")h=ge;else if(h===ge){if(As(p))h=j;else if(Xa(c,l)){for(;o.length>0;){let f=o[o.length-1];if(f.element[H]!==ge||As(f.element))break;o.pop(),s=f.target}h=j}}let b=h===j?c:a,m=n[ct](b,h,null,b);for(let f of l.matchAll(Os))m.setAttribute(f[1],ks(f[3]||f[4]||\"\"));if(s.append(m),Rs(m)||h!==j&&i[4])continue;o.push({element:m,target:s}),s=h===j&&c===\"template\"?m.content:m}else if(i[5]){let l=J(i[5]);for(let c=o.length-1;c>=0;c--){let p=o[c],h=J(p.element[L]);if(h===l){s=p.target,o.length=c;break}if(p.element[H]===j&&h===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(ks(i[7]))}return r}function jn(t){return Ps([{type:\"content\",child:t[U]}])}function _s(t){return Ps([{type:\"opening\",node:t}])}function Ps(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case ce:{let o=r;e.push(`<${o[L]}`);let s=o[xe]?.[U];for(;s;){e.push(` ${s[L]}`);let a=s[$e];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[D]}if(e.push(\">\"),Rs(o))break;let i=o.namespaceURI===j&&o.localName===\"template\"?o[Re]:o;t.push({type:\"closing\",name:o[L]}),t.push({type:\"content\",child:i?.[U]??null});break}case ft:{let o=r;e.push(o[he].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case pt:{let o=r;e.push(`<!--${o[he]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[D]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var Q=class extends ve{nodeType=ce;[H]=j;[Me]=null;get namespaceURI(){return this[H]}get prefix(){return this[Me]}get localName(){let e=this[Me];return e==null?this[L]:this[L].slice(e.length+1)}get nodeName(){return this[H]===j?ss(this[L]):this[L]}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 Ze(\"slot\",n))}get attributes(){let e=this[xe];return e||(e=new Un(this),this[xe]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return In(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Cn(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);Ur(r);let s=this[H]===j?J(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ze(s,o))}setAttributeNS(e,n,r){let o=_e(e),s=String(n),i=String(r),a=gn(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new Ze(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);Ur(r);let o=this[H]===j?J(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 Ze(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[H]===j?J(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return _s(this)}get innerHTML(){return jn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Gn(String(e),this);this.replaceChildren(n)}}};var ht=class t extends Q{[H]=ge;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Ge=class extends Ue{[he]=\"\";constructor(e){super(),this[he]=e==null?\"\":String(e)}setData(e){let n=oo,r=n?this[he]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[he]=o,n&&r!==o&&we({type:\"characterData\",target:this,oldValue:r}),this[X].setText?.(this,o)}get data(){return this[he]}set data(e){this.setData(e)}};var gt=class extends Ge{nodeType=ft;[L]=\"#text\"};var yt=class extends Ge{nodeType=pt;[L]=\"#comment\"};var bt=class extends ve{nodeType=He;[L]=\"#document-fragment\";[W]=typeof window<\"u\"?window.document:null;getElementById(e){return Pn(this,e)}};var Et=class extends Q{get content(){let e=this[Re];return e||(e=this.ownerDocument.createDocumentFragment(),e[Le]=this,this[Re]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Gn(String(e),this))}get innerHTML(){let e=this[Re];return e?jn(e):\"\"}};var zn=class extends Q{};var Vn=class extends Q{};var Bn=class extends Q{};var Yt=class extends ve{nodeType=Xe;[L]=\"#document\";[ee]=!0;constructor(e){super(),this.defaultView=e,this[W]=this,this.documentElement=Yn(new Bn,this,\"html\"),this.body=Yn(new zn,this,\"body\"),this.head=Yn(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 Cn(this,e)}createElement(e){let n=String(e);return ls(n),so(this,J(n))}createElementNS(e,n){let r=gn(e,n,\"element\");return so(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[ct](e,n,r,o){return so(this,e,n,r,o)}createTextNode(e){let n=Wn(new gt(e),this);return this[X].createText?.(n,n.data),n}createComment(e){return Wn(new yt(e),this)}createDocumentFragment(){return Wn(new bt,this)}createEvent(){return new te(\"\")}getElementById(e){return Pn(this,e)}getElementsByTagName(e){return In(this,e)}importNode(e,n){if(e.nodeType===Xe)throw V(\"Cannot import a document node\",\"NotSupportedError\");return _n(e,n,this)}adoptNode(e){if(e[W]===this)return e;let n=Rn(e);return ne(()=>{let r=e.parentNode;return r?vs(r,e,n,this):jt(n.nodes,this),e})}};function Wn(t,e){return Object.defineProperty(t,W,{value:e,writable:!0,enumerable:!1}),t}function so(t,e,n=j,r=null,o=e){let s;if(n===ge)s=new ht;else if(n===j&&o===\"template\")s=new Et;else if(n===j){let i=t.defaultView.customElements.get(o);s=i?new i:new Q}else s=new Q;return Yn(s,t,e,n,r)}function Yn(t,e,n,r=j,o=null){return Wn(t,e),Object.defineProperties(t,{[L]:{value:n},[H]:{value:r},[Me]:{value:o}}),e[X].createElement?.(t,r),t}var Xn=class extends te{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 qn=class extends te{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 Kn=class extends te{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Zn=class extends te{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Jn=class extends te{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Qn=class extends te{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var er=class extends Q{};var qa=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Ka=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function Cs(t){return qa.test(t)&&!Ka.has(t)}function Is(t){return V(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var tr=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Cs(e))throw Is(e);if(this.registry.has(e))throw V(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw V(\"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(!Cs(e))return Promise.reject(Is(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 Za=[\"onerror\",\"onunhandledrejection\"],Ms=Symbol.for(\"@remote-dom/polyfill/global-property\");function $s(t){return Object.getOwnPropertyDescriptors(t)}function Ls(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Fe.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=io(r.value.bind(t)),e[n]=r);return e}function Hs(t){let e={};for(let n of Za)e[n]={configurable:!0,enumerable:!0,get:io(()=>t[n]),set:io(r=>{t[n]=r})};return e}function Ja(t){return Object.assign($s(t),Ls(t),Hs(t))}function io(t){return Object.defineProperty(t,Ms,{value:!0}),t}function Ds(t,e){for(let n of Reflect.ownKeys(e)){let r=Qa(t,n);(r==null||el(r))&&Object.defineProperty(t,n,e[n])}}function Qa(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function el(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Ms]===!0)}var Je=class extends Fe{[X]={};[mn]=[];[Ye]=nl(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Yt(this);customElements=new tr;location=globalThis.location;navigator=globalThis.navigator;Event=te;ErrorEvent=qn;PromiseRejectionEvent=Kn;ToggleEvent=Zn;FocusEvent=Jn;ClipboardEvent=Qn;EventTarget=Fe;CustomEvent=Xn;Node=be;ParentNode=ve;ChildNode=Ue;DocumentFragment=bt;Document=Yt;CharacterData=Ge;Comment=yt;Text=gt;Element=Q;HTMLElement=er;SVGElement=ht;HTMLTemplateElement=Et;MutationObserver=Ln;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)tl(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=$s(e),s=Object.assign(Ls(e),Hs(e));delete o.self,Object.defineProperties(globalThis,o),Ds(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),Ds(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Ja(e))}};function tl(t,e){t[mn].push(e(t)??{})}function nl(t){return{createElement:Ce.bind(null,t,\"createElement\"),setAttribute:Ce.bind(null,t,\"setAttribute\"),removeAttribute:Ce.bind(null,t,\"removeAttribute\"),createText:Ce.bind(null,t,\"createText\"),setText:Ce.bind(null,t,\"setText\"),insertChild:Ce.bind(null,t,\"insertChild\"),removeChild:Ce.bind(null,t,\"removeChild\"),addEventListener:Ce.bind(null,t,\"addEventListener\"),removeEventListener:Ce.bind(null,t,\"removeEventListener\")}}function Ce(t,e,...n){for(let s of t[mn])s[e]?.apply(s,n);let r=t[X];r[e]?.apply(r,n)}var nr=new Je;var ao=\"~\";var je=new WeakMap;function wt(t){return je.get(t)}var fo=new WeakMap,ol=0;function ue(t){let e=fo.get(t);return e==null&&(e=String(ol++),rr(t,e)),e}function rr(t,e){fo.set(t,e)}var co=new WeakMap;function sl(t){return co.get(t)}var uo=new WeakMap;function il(t){let e=uo.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 al=new WeakMap;function ll(t){return al.get(t)}function po(t,e,n){let r=co.get(t);if(r==null&&(r={},co.set(t,r)),r[e]===n)return;r[e]=n;let o=je.get(t);o?.mutate([[3,ue(t),e,n,1]])}function ze(t,e,n){let r=uo.get(t);if(r==null&&(r={},uo.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=je.get(t);o?.mutate([[3,ue(t),e,n,2]])}function Nt(t,e){if(je.get(t)!==e&&(je.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Nt(t.childNodes[r],e)}function or(t){if(je.get(t)!=null&&(je.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)or(t.childNodes[n])}function Tt(t){let{nodeType:e}=t;switch(e){case 1:return{id:ue(t),type:e,element:t.localName,properties:lo(sl(t)),attributes:lo(il(t)),eventListeners:lo(ll(t)),children:Array.from(t.childNodes).map(Tt)};case 3:case 8:return{id:ue(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function lo(t){return t?{...t}:void 0}function mo(t,e,...n){let r=fo.get(t),o=je.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 xt=nr[X];xt.insertChild=(t,e,n)=>{let r=wt(t);r!=null&&(Nt(e,r),r.mutate([[0,ue(t),Tt(e),n]]))};xt.removeChild=(t,e,n)=>{let r=wt(t);r!=null&&(or(e),r.mutate([[1,ue(t),n]]))};xt.setText=(t,e)=>{let n=wt(t);n?.mutate([[2,ue(t),e]])};xt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||ze(t,e,n)};xt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||ze(t,e)};Je.setGlobal(nr);function Us(t,e){if(typeof t!=\"string\"||t.length===0||t.length>200)return\"A kept value's key is a string of 1 to 200 characters, so this one was not kept.\";if(e!==null){if(typeof e!=\"string\")return\"A view keeps a string or null; JSON.stringify anything else, so this one was not kept.\";if(e.length>4096||new TextEncoder().encode(e).length>4096)return\"A kept value is at most 4 KB, and this one is longer, so it was not kept.\"}}function Gs(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 js=[\"wheel\",\"drag\",\"pinch\"];var sr=/^[a-z0-9][a-z0-9_-]{0,63}$/i;var Vs=[\"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\"],Bs=[\"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\"],Ws=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Ys=[\"TEMPORARY\",\"PERSISTENT\"],dp=Object.freeze([...Vs,...Bs,...Ws,...Ys]),cp=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),zs=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Xs(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Vs,...Bs,...Ws,...e,\"constructor\",Symbol.toStringTag]),i=(y,x)=>{let k=Reflect.getOwnPropertyDescriptor(y,x);return k===void 0||!(\"value\"in k)||k.writable||k.configurable?!1:n.primitivesStay&&typeof x==\"symbol\"&&(typeof k.value!=\"object\"||k.value===null)&&typeof k.value!=\"function\"?!0:Ys.includes(x)&&typeof k.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,p=a.crypto,h=(y,x)=>function(k,g,...S){if(typeof k!=\"function\")throw new TypeError(`${x} takes a function: a guest view cannot run code from text`);return y.call(t,k,g,...S)},b=p?Object.freeze({getRandomValues:y=>p.getRandomValues(y)}):void 0,m=a.document?.defaultView;if(m&&m!==a)for(let y of Reflect.ownKeys(m))typeof y==\"symbol\"||s.has(y)||Reflect.deleteProperty(m,y)||o.push(`window.${y}`);let f=[];for(let y=t;y&&y!==Object.prototype;y=Object.getPrototypeOf(y))f.push(y);for(let y of f)for(let x of Reflect.ownKeys(y))s.has(x)||(Reflect.deleteProperty(y,x)?r.push(zs(x)):i(y,x)||o.push(zs(x)));let O=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},u=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let y of u){let x=O();Object.defineProperty(x,\"prototype\",{value:y,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(y,\"constructor\",{value:x,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),y===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:x,writable:!0,enumerable:!1,configurable:!0})}let E=(y,x)=>{Reflect.defineProperty(t,y,{value:x,writable:!0,enumerable:!0,configurable:!0})||o.push(y)};E(\"setTimeout\",h(l,\"setTimeout\")),E(\"setInterval\",h(c,\"setInterval\")),b&&E(\"crypto\",b);for(let y of f.slice(1))Object.freeze(y);for(let y of Reflect.ownKeys(t)){let x=Reflect.getOwnPropertyDescriptor(t,y);Reflect.defineProperty(t,y,\"value\"in x?{...x,writable:!1,configurable:!1}:{...x,configurable:!1})}let A;try{A=Reflect.preventExtensions(t)}catch{A=!1}return{removed:r,stuck:o,sealed:A}}var Xt=class extends HTMLElement{constructor(){super(),rr(this,ao)}connect(e){if(wt(this)===e||(Nt(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,ao,Tt(o),r])}e.mutate(n)}updateRemoteProperty(e,n){po(this,e,n)}callRemoteMethod(e,...n){return mo(this,e,...n)}};var P={},ho={empty:!0},dl={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\"},vt={div:P,section:P,article:P,aside:P,header:P,footer:P,nav:P,hgroup:P,search:P,address:P,figure:P,figcaption:P,blockquote:P,p:P,pre:P,hr:ho,br:ho,wbr:ho,h1:P,h2:P,h3:P,h4:P,h5:P,h6:P,span:P,strong:P,em:P,b:P,i:P,u:P,s:P,small:P,mark:P,abbr:P,cite:P,q:P,code:P,kbd:P,samp:P,var:P,sub:P,sup:P,dfn:P,bdi:P,bdo:P,ruby:P,rt:P,rp:P,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:{attributes:{href:\"link\"}},ul:P,menu:P,dl:P,dt:P,dd:P,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:P,caption:P,thead:P,tbody:P,tfoot:P,tr:P,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:P,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:P,output:P,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\"]},loading:{oneOf:[\"lazy\",\"eager\"]},fetchpriority:{oneOf:[\"high\",\"low\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\",poster:\"image\"}}},cl=[\"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\"],ul={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(cl.map(t=>[t,\"css\"]))},Ie={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},ir={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},qs={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Ks={oneOf:[\"R\",\"G\",\"B\",\"A\"]},Ne={...Ie,in:\"text\",result:\"text\"},Zs={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},ar={svg:{attributes:{...Ie,...ir}},g:P,defs:P,symbol:{attributes:{...Ie,...ir,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Ie,href:\"fragment\"}},title:P,desc:P,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Ie,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\",...Zs}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Zs}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Ie,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Ie,...ir,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...ir,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:P,filter:{attributes:{...Ie,filterUnits:qs,primitiveUnits:qs}},feBlend:{attributes:{...Ne,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...Ne,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:Ne},...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:{...Ne,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...Ne,in2:\"text\",scale:\"number\",xChannelSelector:Ks,yChannelSelector:Ks}},feDropShadow:{attributes:{...Ne,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:Ne},feGaussianBlur:{attributes:{...Ne,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:Ne},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...Ne,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...Ne,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Ie,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var Js=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],Qs=[\"region\"],go={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},lr={section:[\"aria-label\",\"title\"]},ei=[\"aria-labelledby\",\"aria-describedby\"];function fl(t){return/^aria-[a-z]+$/.test(t)}function pl(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var yo=4e3,ti=1e5,qt=512e3,bo=1e4,ni=\"http://www.w3.org/1999/xhtml\",ri=\"http://www.w3.org/2000/svg\",ml=new Map(Object.keys(ar).map(t=>[t.toLowerCase(),t]));function dr(t){return ml.get(t.toLowerCase())}function cr(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[vt[e]?.attributes,dl]:[ar[e]?.attributes,ul],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(fl(r)||pl(r))return{name:r,kind:\"text\"}}var ur=/^\\d{4}-\\d{2}-\\d{2}$/;function hl(t,e){if(typeof t!=\"string\"||typeof e!=\"string\"||!ur.test(t)||!ur.test(e))return;let n=Math.round((Date.parse(`${t}T00:00:00Z`)-Date.parse(`${e}T00:00:00Z`))/864e5);return Number.isFinite(n)?n:void 0}function oi(t,e,n={}){let r=hl(t,e);if(r===void 0)return\"\";if(r===0)return\"today\";if(r===1)return\"tomorrow\";if(r<0&&n.due===!0)return\"overdue\";if(r===-1)return\"yesterday\";let o=Math.abs(r),[s,i]=o<14?[o,\"day\"]:o<60?[Math.round(o/7),\"week\"]:o<730?[Math.round(o/30.44),\"month\"]:[Math.round(o/365.25),\"year\"],a=`${s} ${i}${s===1?\"\":\"s\"}`;return r>0?`in ${a}`:`${a} ago`}function si(t,e){if(typeof t!=\"string\")return;if(ur.test(t))return t;let n=Date.parse(t);if(Number.isFinite(n)){if(!/(Z|[+-]\\d\\d:?\\d\\d)$/.test(t))return ur.test(t.slice(0,10))?t.slice(0,10):void 0;try{let r=new Intl.DateTimeFormat(\"en-CA\",{timeZone:e||\"UTC\",year:\"numeric\",month:\"2-digit\",day:\"2-digit\"}).formatToParts(n),o=s=>r.find(i=>i.type===s)?.value??\"\";return`${o(\"year\")}-${o(\"month\")}-${o(\"day\")}`}catch{return new Date(n).toISOString().slice(0,10)}}}var ii=\"~\",fr=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Se=(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=>Se(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Se(r,e+1)]))};function ai(){let t=new Map,e=new Map,n=new Map([[ii,{children:[],listeners:new Map}]]),r=0,o=c=>{let p=e.get(c);return p===void 0&&(p=r+=1,e.set(c,p),t.set(p,{listener:c,count:0})),t.get(p).count+=1,p},s=c=>{let p=t.get(c);p&&(p.count-=1,!(p.count>0)&&(t.delete(c),e.delete(p.listener)))},i=c=>{let p=n.get(c);if(p){n.delete(c);for(let h of p.listeners.values())s(h);for(let h of p.children)i(h)}},a=(c,p,h=0)=>{if(!fr(c)||h>64)return Se(c);let b=typeof c.id==\"string\"?c.id:void 0,m=p&&b!==void 0&&b!==ii;m&&i(b);let f={children:[],listeners:new Map};m&&n.set(b,f);let O={};for(let[u,E]of Object.entries(c))u===\"children\"&&Array.isArray(E)?O[u]=E.map(A=>{let y=a(A,m,h+1);return m&&fr(A)&&typeof A.id==\"string\"&&f.children.push(A.id),y}):u===\"eventListeners\"&&fr(E)?O[u]=Object.fromEntries(Object.entries(E).map(([A,y])=>{if(typeof y!=\"function\"||!m)return[A,void 0];let x=o(y);return f.listeners.set(A,x),[A,{listener:x}]})):O[u]=Se(E,h+1);return O},l=c=>{if(!Array.isArray(c))return Se(c);let[p,h]=c,b=typeof h==\"string\"?n.get(h):void 0;if(p===0){let m=a(c[2],b!==void 0),f=fr(c[2])?c[2].id:void 0;if(b&&typeof f==\"string\"&&n.has(f)){let O=Number(c[3]);b.children.splice(Number.isInteger(O)&&O>=0&&O<=b.children.length?O:b.children.length,0,f)}return[p,Se(h),m,Se(c[3])]}if(p===1){let m=Number(c[2]);return b&&Number.isInteger(m)&&m>=0&&m<b.children.length&&i(b.children.splice(m,1)[0]),Se(c)}if(p===3&&c[4]===3){let m=String(c[2]),f=c[3],O=b&&typeof f==\"function\"?o(f):void 0,u=b?.listeners.get(m);return u!==void 0&&s(u),O===void 0?b?.listeners.delete(m):b.listeners.set(m,O),[p,Se(h),m,O===void 0?void 0:{listener:O},3]}return Se(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Eo=\"graview-view-root\",gl=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],yl=new Set([\"div\",\"li\",\"article\"]),No=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),wo=t=>Object.freeze({html:t,toString:()=>t}),To=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),ci=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(ci).join(\"\"):To(t)?t.html:No(String(t));function ui(t){customElements.get(Eo)||customElements.define(Eo,Xt);let e=Event,n=ai(),r=new Set,o=new Set,s,i=[],a=new Set;for(let d of[\"closest\",\"matches\",\"dataset\"]){let N=()=>{throw new TypeError(`A view's element has no ${d}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};d in Element.prototype||Object.defineProperty(Element.prototype,d,d===\"dataset\"?{get:N}:{value:N})}let l=document.createElement(Eo),c=d=>{let N=v=>{for(let C of Array.from(v.childNodes)){if(C.nodeType!==1)continue;if(ue(C)===d)return C;let I=N(C);if(I)return I}};return N(l)},p=d=>{let N=c(d.target);if(!N)return;let v=new e(d.event,{bubbles:!0}),C={};for(let I of gl)d[I]!==void 0&&(C[I]=d[I]);for(let I of Object.keys(C))Object.defineProperty(v,I,{value:C[I],enumerable:!0});N.dispatchEvent(v);for(let I of o){if(I.type!==d.event)continue;let M;try{M=new Set(Array.from(l.querySelectorAll(I.selector)))}catch{continue}for(let G=N;G&&G!==l;G=G.parentNode)if(M.has(G)){I.listener(Object.freeze({type:d.event,target:N,element:G,...C}));break}}},h=Error,b=new Map,m=0,f=(d,N,v)=>new Promise((C,I)=>{let M=++m;b.set(M,G=>G.ok?C(G):I(new h(G.sentence??\"This value was not kept.\"))),t.send({type:\"mine\",id:M,op:d,key:N,...d===\"set\"?{value:v}:{}})}),O=d=>(d.catch(()=>{}),d),u=Object.freeze({get(d){return O(f(\"get\",d).then(N=>typeof N.value==\"string\"?N.value:null))},set(d,N){return O(f(\"set\",d,N).then(()=>{}))}}),E=d=>{if(d.type===\"mine-answer\"){let I=b.get(d.id);return b.delete(d.id),I?.(d)}if(d.type===\"dom-event\"&&typeof d.target==\"string\")return p(d);if(d.type===\"notice\")return t.warn(d.text);if(d.type!==\"props\")return;s=d.props,typeof d.partMs==\"number\"&&d.partMs>0&&(Rr=d.partMs),typeof d.partMark==\"string\"&&(_r=d.partMark),Pr+=1,pn.clear(),Pt=0;let N=t.now();for(let I of r)try{I(d.props)}catch(M){t.threw(M)}let v=t.now()-N,C=d.push;typeof C==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:C,ms:v})))},A;l.connect({mutate(d){A||(A=[],t.microtask(()=>{let N=A??[];A=void 0,t.send({type:\"render\",records:n.encode(N)})})),A.push(...d)},call:()=>{}});let y=d=>d.localName===\"graview-video\"&&(d.hasAttribute(\"data-video\")||d.hasAttribute(\"data-watch\")),x=d=>{if(d.nodeType!==1)return null;let N=d;return N.getAttribute(\"data-key\")??N.getAttribute(\"id\")??(y(N)?`${N.getAttribute(\"data-provider\")} ${N.getAttribute(\"data-video\")} ${(N.getAttribute(\"data-watch\")??\"\").split(/[?&#]/).filter(C=>!/^(t|start)=/.test(C)).join(\"&\")}`:null)},k=new Map;function g(d){if(d.nodeType!==1)return[];let N=y(d)?[x(d)??\"\"]:Array.from(d.childNodes).flatMap(g);return N.length>0&&k.set(d,N),N}let S=(d,N)=>{let v=k.get(d);return v!==void 0&&(k.get(N)?.some(C=>v.includes(C))??!1)},w=(d,N)=>d.nodeType===N.nodeType&&(d.nodeType!==1||d.localName===N.localName&&d.namespaceURI===N.namespaceURI&&x(d)===x(N));function R(d,N,v,C){let I=d.childNodes[N],M=()=>Array.from(d.childNodes).slice(N),G=k.has(v)?M().find(K=>w(K,v)&&S(K,v)):void 0;if(G)return G;let Z=K=>k.has(K)&&C.some(Oe=>w(K,Oe)&&S(K,Oe));return I&&w(I,v)&&!Z(I)?I:x(v)===null?void 0:M().slice(1).find(K=>w(K,v)&&!Z(K))}function _(d,N){let v=Array.from(N.childNodes),C=v.filter(M=>k.has(M)),I=0;for(let M of v){C[0]===M&&C.shift();let G=d.childNodes[I]??null,Z=R(d,I,M,C);if(!Z)d.insertBefore(M,G);else{if(Z!==G){let K=Array.from(d.childNodes).slice(I);if(K.length=K.indexOf(Z),k.has(Z)&&!K.some(Oe=>C.some(Be=>w(Oe,Be)&&S(Oe,Be)))){let Oe=Z.nextSibling;for(let Be of K)d.insertBefore(Be,Oe)}else d.insertBefore(Z,G)}T(Z,M)}I+=1}for(;d.childNodes.length>I;)d.removeChild(d.lastChild)}function T(d,N){if(d.nodeType!==1){d.data!==N.data&&(d.data=N.data);return}let v=d,C=N,I=F(v);for(let M of v.getAttributeNames())C.hasAttribute(M)||(v.removeAttribute(M),I&&ze(v,M,void 0));for(let M of C.getAttributeNames()){let G=C.getAttribute(M);v.getAttribute(M)!==G&&v.setAttribute(M,G),I&&ze(v,M,G)}_(v,C)}let F=d=>d.localName.includes(\"-\");function $(d){for(let N of Array.from(d.childNodes)){if(N.nodeType!==1)continue;let v=N;if(F(v))for(let C of v.getAttributeNames())ze(v,C,v.getAttribute(C)??void 0);$(v)}}function z(d,N,v){for(let C of Array.from(d.childNodes)){if(C.nodeType!==1)continue;let I=C,M=I.localName,G=N||M.toLowerCase()===\"svg\",Z=G?dr(M):Object.prototype.hasOwnProperty.call(vt,M.toLowerCase())?M.toLowerCase():void 0;if(!Z){v.add(`<${M}>`);continue}for(let K of I.getAttributeNames())(!cr(G?\"svg\":\"html\",Z,K)||!G&&lr[Z]?.includes(K.toLowerCase()))&&v.add(`${Z} ${K}`);z(I,G,v)}}function se(d){let N=document.createElement(\"div\"),v=Array.isArray(d)?d:[d];for(let I of v)if(I!=null)if(typeof I==\"string\"||To(I)){let M=document.createElement(\"div\");M.innerHTML=typeof I==\"string\"?I:I.html,N.append(...Array.from(M.childNodes))}else N.append(I);let C=new Set;z(N,!1,C),i=[...C],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),$(N),k.clear(),g(N).length>0&&g(l),_(l,N),pn.clear()}let Rr=1e3/4,_r=\"\",Pr=0,Cr=new Map,pn=new Map,Pt=0,Ir=new Set,Ra=d=>{try{return d instanceof Error?`${d.name}: ${d.message}`:String(d)}catch{return\"an error\"}},qo=d=>{if(d==null||d===!1)return\"\";if(typeof d==\"string\")return d;if(To(d))return d.html;if(Array.isArray(d))return d.map(N=>qo(N)).join(\"\");throw new TypeError(\"a part's draw returns markup: a string, graview.html`\\u2026` or a list of them\")};function _a(d,N,v){if(typeof d!=\"string\"||!sr.test(d))throw new TypeError('graview.part names its part in letters, digits, - and _ (\"vendors\", \"budget-2026\"), at most 64 of them.');if(typeof N!=\"function\")throw new TypeError(`graview.part(\"${d}\", draw) is handed a function that returns the part's markup.`);let C=typeof v?.as==\"string\"&&yl.has(v.as)?v.as:\"div\",I=pn.get(d)??0;pn.set(d,I+1);let M=`${d}#${I}`,G=(pe,ts)=>{let Pa=`The part \"${d}\" ${pe===\"threw\"?\"threw\":\"took too long\"}, so a note is drawn in its place and the rest of the view is drawn: ${ts}`;return!Ir.has(`${d} ${pe}`)&&Ir.size<100&&(Ir.add(`${d} ${pe}`),t.warn(Pa)),wo(`<${C} data-part=\"${d}\" data-part-failed=\"${pe}\" data-part-why=\"${No(ts.slice(0,300))}\"${_r?` data-part-mark=\"${No(_r)}\"`:\"\"}></${C}>`)},Z=Cr.get(M);if(Z!==void 0&&Pr<=Z.until)return G(\"slow\",Z.why);Cr.delete(M);let K=Pt;Pt=0;let Oe=t.now(),Be,Hr=0;try{Be=qo(N())}catch(pe){return G(\"threw\",Ra(pe))}finally{let pe=t.now()-Oe;Hr=pe-Pt,Pt=K+pe}if(Hr>Rr){let pe=`it took ${Math.round(Hr).toLocaleString(\"en-US\")} ms, past the ${Math.round(Rr).toLocaleString(\"en-US\")} ms a part may take of a push, and is left as a note for the next ${3} pushes.`;return Cr.set(M,{why:pe,until:Pr+3}),G(\"slow\",pe)}return wo(`<${C} data-part=\"${d}\">${Be}</${C}>`)}let Dr=[],Mr=new Set(js),Ko=\"[]\",$r=!1,Zo=()=>{$r||($r=!0,t.microtask(()=>{$r=!1;let d=[...new Map([...o].filter(v=>Mr.has(v.type)).map(v=>[`${v.type} ${v.selector}`,{event:v.type,selector:v.selector}])).entries()].sort(([v],[C])=>v<C?-1:v>C?1:0).map(([,v])=>v),N=JSON.stringify(d);N!==Ko&&(Ko=N,t.send({type:\"gestures\",bound:d}))}))},Jo=\"[[],[]]\",Lr=!1,Qo=()=>{Lr||(Lr=!0,t.microtask(()=>{Lr=!1;let d=I=>[...new Set([...o].filter(M=>M.type===I&&typeof M.selector==\"string\").map(M=>M.selector))].sort().slice(0,200),N=d(\"click\"),v=d(\"acted\"),C=JSON.stringify([N,v]);C!==Jo&&(Jo=C,t.send({type:\"clicks\",selectors:N,...v.length>0?{acted:v}:{}}))}))},es=Object.freeze({get props(){return s},onProps(d){return r.add(d),s&&d(s),()=>void r.delete(d)},render:se,style(d){typeof d!=\"string\"||Dr.includes(d)||(Dr.push(d),t.send({type:\"style\",sheets:[...Dr]}))},on(d,N,v){let C={type:d,selector:N,listener:v};return o.add(C),typeof d==\"string\"&&!a.has(d)&&(a.add(d),t.send({type:\"hears\",events:[d]})),Mr.has(d)&&Zo(),(d===\"click\"||d===\"acted\")&&Qo(),()=>{o.delete(C),Mr.has(d)&&Zo(),(d===\"click\"||d===\"acted\")&&Qo()}},act:(d,N={})=>t.act(d,N),mine:u,navigate(d){if(typeof d==\"string\")return t.navigate(d);let N=Gs(d);N&&t.send(N)},part:_a,html(d,...N){return wo(d.reduce((v,C,I)=>v+C+(I<N.length?ci(N[I]):\"\"),\"\"))},get today(){return s?.today??new Date().toISOString().slice(0,10)},fromToday(d,N){let v=si(d,s?.timeZone);return v===void 0?\"\":oi(v,es.today,N)},cite(d,N){let v=d?s?.cites?.[d.kind]?.[N]:void 0;if(!d||!v)return;let C=!(s?.uncited?.[d.id]??[]).includes(N);if(!v.relation)return{by:v.by,relation:!1,cited:C,...d[v.by]!==void 0?{source:d[v.by]}:{}};let I=new Set((s?.edges??[]).filter(M=>M.from===d.id&&M.kind===v.by).map(M=>M.to));return{by:v.by,relation:!0,cited:C,sources:(s?.nodes??[]).filter(M=>I.has(M.id))}},uncited(d){return d?s?.uncited?.[d.id]??[]:[]},get refused(){return i},get hardening(){return t.hardening()}});return{view:es,hear:E,find:d=>{try{let N=l.querySelectorAll(d)[0];return N?ue(N):void 0}catch{return}},listened:d=>{let N=new Set;for(let v of o)if(v.type===d)try{for(let C of Array.from(l.querySelectorAll(v.selector))){let I=ue(C);I&&N.add(I)}}catch{}return[...N]}}}var xo={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},fi=[\"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\",\"break-inside\",\"break-before\",\"break-after\",\"page-break-inside\",\"page-break-before\",\"page-break-after\",\"orphans\",\"widows\",\"box-decoration-break\",\"-webkit-box-decoration-break\",\"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\",\"scroll-margin-top\",\"scroll-margin-right\",\"scroll-margin-bottom\",\"scroll-margin-left\",\"scroll-margin-block\",\"scroll-margin-block-start\",\"scroll-margin-block-end\",\"scroll-margin-inline\",\"scroll-margin-inline-start\",\"scroll-margin-inline-end\",\"scroll-padding-top\",\"scroll-padding-right\",\"scroll-padding-bottom\",\"scroll-padding-left\",\"scroll-padding-block\",\"scroll-padding-block-start\",\"scroll-padding-block-end\",\"scroll-padding-inline\",\"scroll-padding-inline-start\",\"scroll-padding-inline-end\",\"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\"],pi=[\"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\"],mi=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],hi=[\"media\",\"supports\",\"container\",\"keyframes\"],gi={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},yi=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],bi=[\"-webkit-details-marker\"],Kt=64e3;var bl=new Set([\"serif\",\"sans-serif\",\"monospace\",\"cursive\",\"fantasy\",\"system-ui\",\"math\",\"emoji\",\"fangsong\",\"inherit\",\"initial\",\"unset\",\"revert\",\"default\"]);function vo(t){return typeof t!=\"string\"||t.length>60||!/^[A-Za-z0-9][A-Za-z0-9-]*(?: [A-Za-z0-9-]+)*$/.test(t)?\"its family is words of letters, digits and hyphens with single spaces between them, at most 60 characters\":bl.has(t.toLowerCase())?`\"${t}\" is a name CSS keeps for itself`:null}var pr=5e4,mr=2e5,So=16,hr=[\"font-family\",\"src\",\"font-weight\",\"font-style\",\"font-display\",\"unicode-range\",\"font-stretch\"],Ei=2*Math.ceil(mr/3)*4,ko=64;function El(t,e){return`${t} ${e}`}function Ao(t,e){return new Map(t.map(n=>[n.family.toLowerCase(),El(e,n.family)]))}function wi(t,e){let n=[],r=[],o=()=>{let s=r.length;for(;s>0&&r[s-1].type===\"whitespace\";)s-=1;let i=s,a,l=r[s-1];if(l?.type===\"string\")i=s-1,a=l.value;else{for(;i>0&&(r[i-1].type===\"ident\"||r[i-1].type===\"whitespace\");)i-=1;for(;i<s&&r[i].type===\"whitespace\";)i+=1;let p=r.slice(i,s).filter(h=>h.type===\"ident\");a=p.length>0?p.map(h=>h.value).join(\" \"):void 0}let c=a===void 0?void 0:e.get(a.toLowerCase());n.push(...c===void 0?r:[...r.slice(0,i),{type:\"string\",value:c},...r.slice(s)]),r=[]};for(let s of t)s.type===\",\"?(o(),n.push(s)):r.push(s);return o(),n}function wl(t){return[\"font/woff2\",\"font/woff\",\"font/ttf\",\"font/otf\"].includes(t)||/^application\\/(?:x-)?font-[a-z0-9.+-]+$/.test(t)||t===\"application/octet-stream\"}function Nl(t){if(t.length<12)return!1;let e=String.fromCharCode(t[0],t[1],t[2],t[3]);return e===\"wOF2\"||e===\"wOFF\"||e===\"OTTO\"||e===\"true\"||t[0]===0&&t[1]===1&&t[2]===0&&t[3]===0}var Tl=/^[A-Za-z0-9+/]*={0,2}$/;function xl(t,e){let n=t.indexOf(\",\"),r=n<0?t.slice(5):t.slice(5,n),[o=\"\",...s]=r.split(\";\"),i=o.trim().toLowerCase();if(!wl(i))return{problem:\"type\",type:i||\"no type\"};if(n<0||!s.some(b=>b.trim().toLowerCase()===\"base64\"))return{problem:\"encoding\"};let a=t.slice(n+1);if(!Tl.test(a)||a.length%4===1)return{problem:\"encoding\"};let l=a.endsWith(\"==\")?2:a.endsWith(\"=\")?1:0;if(l>0&&a.length%4!==0)return{problem:\"encoding\"};let c=Math.floor((a.length-l)*3/4);if(c>e)return{problem:\"size\",bytes:c};let p;try{p=atob(a)}catch{return{problem:\"encoding\"}}let h=new Uint8Array(p.length);for(let b=0;b<p.length;b+=1)h[b]=p.charCodeAt(b);return h.byteLength>e?{problem:\"size\",bytes:h.byteLength}:Nl(h)?{type:i,bytes:h}:{problem:\"bytes\"}}var Zt=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Qe=t=>t.filter(e=>e.type!==\"whitespace\");function vl(t){let e=[[]];for(let n of t)n.type===\",\"?e.push([]):e.at(-1).push(n);return e.map(Qe)}function Sl(t){let e=\"\";for(let n of t)if(n.type===\"whitespace\")e+=\" \";else if(n.type===\"ident\")e+=n.value;else if(n.type===\"number\"||n.type===\"percentage\")e+=n.type===\"percentage\"?`${n.repr}%`:n.repr;else if(n.type===\"dimension\")e+=`${n.repr}${n.unit}`;else if(n.type===\"delim\"&&(n.value===\"?\"||n.value===\"+\"||n.value===\"-\"))e+=n.value;else if(n.type===\",\")e+=\",\";else return;return e.trim().replace(/\\s*,\\s*/g,\", \").replace(/\\s+/g,\" \")}var kl=/^(?:normal|bold|(?:[1-9]\\d{0,2}|1000)(?: (?:[1-9]\\d{0,2}|1000))?)$/,Al=/^(?:normal|italic|oblique)$/,Ol=/^(?:normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|\\d{1,3}(?:\\.\\d+)?%(?: \\d{1,3}(?:\\.\\d+)?%)?)$/,Rl=/^(?:auto|block|swap|fallback|optional)$/,_l=/^u\\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?(?:, u\\+[0-9a-f?]{1,6}(?:-[0-9a-f]{1,6})?)*$/i;function Pl(t){let e=Qe(t);if(e.length===1&&e[0].type===\"string\")return e[0].value;if(e.length>0&&e.every(n=>n.type===\"ident\"))return e.map(n=>n.value).join(\" \")}function Oo(t,e,n,r,o=[]){let s=new Map,i=[],a=0;for(let S of e){if(S.type!==\"declaration\"){i.push(\"a rule\");continue}let w=S.name.startsWith(\"--\")?S.name:Zt(S.name);if(w===\"src\")for(let R of S.value)a+=Ni(R);if(!hr.includes(w)){i.push(w);continue}s.set(w,S)}let l=s.get(\"font-family\"),c=l&&!l.important?Pl(l.value):void 0,p=vo(c),h=c!==void 0&&p!==vo(void 0)?c:void 0;for(let S of i)r({reason:\"font-face\",name:\"descriptor\",...h!==void 0?{family:h}:{},descriptor:S});let b=(S,w={})=>(r({reason:\"font-face\",name:S,...h!==void 0?{family:h}:{},...w}),{data:a});if(Qe(t).length>0)return b(\"unreadable\");if(c===void 0||p)return b(\"family\",{said:p??\"its family is one name\"});let m=c;if(o.some(S=>S.toLowerCase()===m.toLowerCase()))return b(\"lent\");let f=s.get(\"src\");if(!f)return b(\"src\",{said:\"no src\"});let O=[];for(let S of vl(f.value)){let[w,...R]=S,_=w?.type===\"url\"?w.value:w?.type===\"func\"&&Zt(w.name)===\"url\"&&Qe(w.value).length===1&&Qe(w.value)[0].type===\"string\"?Qe(w.value)[0].value:void 0;if(w?.type===\"func\"&&Zt(w.name)===\"local\")return b(\"local\");if(_===void 0)return b(\"src\");if(!/^data:/i.test(_))return b(\"address\",{said:_.slice(0,80)});if(R.length>1||R[0]&&!(R[0].type===\"func\"&&Zt(R[0].name)===\"format\"&&Qe(R[0].value).every(F=>F.type===\"string\"||F.type===\"ident\"||F.type===\",\")))return b(\"src\");let T=xl(_,pr);if(\"problem\"in T)return T.problem===\"size\"?b(\"size\",{bytes:T.bytes}):b(T.problem,\"type\"in T&&T.type?{said:T.type}:{});O.push(T)}if(O.length===0)return b(\"src\");let u=O.reduce((S,w)=>S+w.bytes.byteLength,0);if(u>pr)return b(\"size\",{bytes:u});if(n.count+1>So)return b(\"count\");if(n.bytes+u>mr)return b(\"total\",{bytes:n.bytes+u});let E=(S,w)=>{let R=s.get(S);if(!R)return;let _=R.important?void 0:Sl(R.value);if(_===void 0||!w.test(_)){r({reason:\"font-face\",name:\"value\",family:m,descriptor:S});return}return S===\"unicode-range\"?_.toUpperCase():Zt(_)},A=E(\"font-weight\",kl),y=E(\"font-style\",Al),x=E(\"font-stretch\",Ol),k=E(\"font-display\",Rl),g=E(\"unicode-range\",_l);return n.bytes+=u,n.count+=1,{face:{family:m,sources:O,size:u,...A?{weight:A}:{},...y?{style:y}:{},...x?{stretch:x}:{},...k?{display:k}:{},...g?{unicodeRange:g}:{}},data:a}}function Ni(t){return t.type===\"url\"?/^data:/i.test(t.value)?t.value.length:0:t.type===\"func\"?t.value.reduce((e,n)=>e+(n.type===\"string\"&&/^data:/i.test(n.value)?n.value.length:Ni(n)),0):0}var gr=t=>`${(t/1e3).toLocaleString(\"en-US\",{maximumFractionDigits:1})} KB`,Jt=\"a view's face is a data: URL of a WOFF2, WOFF, TTF or OTF font (src: url(data:font/woff2;base64,\\u2026))\",Ti=\"or a face the app lends its views (brand.views.fonts)\";function Ro(t){let e=t.family!==void 0?`the @font-face \"${t.family}\"`:\"an @font-face\";switch(t.name){case\"where\":return\"Not drawn: an @font-face inside @media, @supports, @container or a rule. A view's face is declared at the top of its stylesheet (view-font-face).\";case\"unreadable\":return`Not drawn: ${e}, which has something before its block. A face is @font-face { font-family: \\u2026; src: \\u2026 } (view-font-face).`;case\"family\":return`Not drawn: ${e}: ${t.said??\"its font-family is one name, in quotes or as plain words\"}. It is called by a name of its own, which the view's rules then name (view-font-face-family).`;case\"src\":return`Not drawn: ${e} has ${t.said===\"no src\"?\"no src\":\"a src that is no url()\"}: ${Jt} (view-font-face-src).`;case\"address\":return`Not loaded: ${e} names url(${JSON.stringify(t.said??\"\")}). A view loads nothing from the network: ${Jt}, ${Ti} (view-font-face-src).`;case\"local\":return`Not loaded: ${e} names local(), a face installed on the reader's own machine, which differs from one reader to the next and tells the page what is installed: ${Jt} (view-font-face-src).`;case\"type\":return`Not loaded: ${e} is a data: URL of ${t.said??\"no type\"}, not a font: ${Jt} (view-font-face-type).`;case\"encoding\":return`Not loaded: ${e} is a data: URL that is not base64, or not base64 throughout: ${Jt} (view-font-face-type).`;case\"bytes\":return`Not loaded: ${e} holds bytes that are not a WOFF2, WOFF, TrueType or OpenType file, whatever its data: URL says (view-font-face-type).`;case\"size\":return`Not loaded: ${e} is ${gr(t.bytes??0)} decoded, more than the ${gr(pr)} one face a view declares may be: subset it to the letters the view draws, ${Ti}, which may be larger (view-font-face-size).`;case\"total\":return`Not loaded: ${e} would take the view's faces to ${gr(t.bytes??0)}, more than the ${gr(mr)} a view's faces may be together: the faces before it are drawn, and the app may lend the rest (brand.views.fonts) (view-font-faces-size).`;case\"count\":return`Not loaded: ${e} is more than the ${So} faces a view's stylesheets may declare (view-font-faces-size).`;case\"descriptor\":return`Not kept: ${t.descriptor??\"a descriptor\"} in ${e}. A view's face takes ${hr.slice(0,-1).join(\", \")} and ${hr.at(-1)}, and is drawn without the rest (view-font-face-descriptor).`;case\"value\":return`Not kept: the ${t.descriptor??\"descriptor\"} of ${e}, a value a face does not take, so the face is drawn as if it said none (view-font-face-descriptor).`;case\"lent\":return`Not loaded: ${e}, since the app lends its views a face by that name (brand.views.fonts), and the app's face is the one drawn: call the view's own something else (view-font-face-lent).`;case\"host\":return`Not loaded: ${e}. This host draws no face a view's own stylesheet declares: a view is drawn in the faces the app lends its views (brand.views.fonts), or in a system stack (view-font-face-host).`;default:return`Not drawn: ${e} (view-font-face).`}}var re=t=>t>=48&&t<=57,xi=t=>re(t)||t>=65&&t<=70||t>=97&&t<=102,Do=t=>t>=65&&t<=90||t>=97&&t<=122,Mo=t=>t>=128,yr=t=>Do(t)||Mo(t)||t===95,vi=t=>yr(t)||re(t)||t===45,Si=t=>t===10,De=t=>t===10||t===9||t===32,Cl=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,Te=-1;function Il(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 nn(t){let e=Il(t),n=0,r=(u=0)=>n+u<e.length?e[n+u]:Te,o=[],s=(u,E)=>u===92&&E!==10&&E!==Te,i=(u,E,A)=>u===45?yr(E)||E===45||s(E,A):yr(u)?!0:s(u,E),a=(u,E,A)=>u===43||u===45?re(E)||E===46&&re(A):re(u===46?E:u),l=()=>{let u=r();if(n+=1,u===Te)return 65533;if(xi(u)){let E=String.fromCodePoint(u);for(;E.length<6&&xi(r());)E+=String.fromCodePoint(r()),n+=1;De(r())&&(n+=1);let A=parseInt(E,16);return A===0||A>=55296&&A<=57343||A>1114111?65533:A}return u},c=()=>{let u=\"\";for(;;){let E=r();if(vi(E))u+=String.fromCodePoint(E),n+=1;else if(s(E,r(1)))n+=1,u+=String.fromCodePoint(l());else return u}},p=()=>{let u=\"\";for((r()===43||r()===45)&&(u+=String.fromCodePoint(e[n++]));re(r());)u+=String.fromCodePoint(e[n++]);if(r()===46&&re(r(1)))for(u+=String.fromCodePoint(e[n++],e[n++]);re(r());)u+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(re(r(1))||(r(1)===43||r(1)===45)&&re(r(2))))for(u+=String.fromCodePoint(e[n++]),re(r())||(u+=String.fromCodePoint(e[n++]));re(r());)u+=String.fromCodePoint(e[n++]);return u},h=()=>{let u=p();return i(r(),r(1),r(2))?{type:\"dimension\",repr:u,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:u}):{type:\"number\",repr:u}},b=()=>{for(;;){let u=r();if(n+=1,u===41||u===Te)return;s(u,r())&&l()}},m=()=>{let u=\"\";for(;De(r());)n+=1;for(;;){let E=r();if(n+=1,E===41)return{type:\"url\",value:u};if(E===Te)return{type:\"url\",value:u};if(De(E)){for(;De(r());)n+=1;return r()===41||r()===Te?(r()===41&&(n+=1),{type:\"url\",value:u}):(b(),{type:\"bad-url\"})}if(E===34||E===39||E===40||Cl(E))return b(),{type:\"bad-url\"};if(E===92){if(s(E,r()))u+=String.fromCodePoint(l());else return b(),{type:\"bad-url\"};continue}u+=String.fromCodePoint(E)}},f=()=>{let u=c();if(u.toLowerCase()===\"url\"&&r()===40){for(n+=1;De(r())&&De(r(1));)n+=1;let E=De(r())?r(1):r();return E===34||E===39?{type:\"function\",value:u}:m()}return r()===40?(n+=1,{type:\"function\",value:u}):{type:\"ident\",value:u}},O=u=>{let E=\"\";for(;;){let A=r();if(n+=1,A===u||A===Te)return{type:\"string\",value:E};if(Si(A))return n-=1,{type:\"bad-string\"};if(A===92){if(r()===Te)continue;if(Si(r())){n+=1;continue}E+=String.fromCodePoint(l());continue}E+=String.fromCodePoint(A)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==Te&&!(r()===42&&r(1)===47);)n+=1;r()!==Te&&(n+=2)}let u=r();if(u===Te)return o;if(De(u)){for(;De(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,u){case 34:case 39:o.push(O(u));continue;case 35:if(vi(r())||s(r(),r(1))){let E=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:E})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(u,r(),r(1))?(n-=1,o.push(h())):o.push({type:\"delim\",value:String.fromCodePoint(u)});continue;case 44:o.push({type:\",\"});continue;case 45:a(u,r(),r(1))?(n-=1,o.push(h())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(u,r(),r(1))?(n-=1,o.push(f())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(u,r())?(n-=1,o.push(f())):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:re(u)?(n-=1,o.push(h())):yr(u)?(n-=1,o.push(f())):o.push({type:\"delim\",value:String.fromCodePoint(u)})}}}var Pi={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Ci=32,Po=class{tokens;i=0;constructor(e){this.tokens=e}peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Ii(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:ki(t,Pi[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:ki(t,\")\",e+1)}:n}function ki(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Ci){t.next(),r.push({type:\"bad-string\"});continue}r.push(Ii(t,n))}}function St(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){l=c.value;break}a.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function en(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(...St(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=Di(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((c,p)=>p>n&&c.type===\"block\"&&c.open===\"{\");e.push(...St(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(...St(t.slice(n,o+1),!1)),n=o+1}return e}function Di(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 $o(t){let e=new Po(nn(t)),n=[];for(;e.peek();)n.push(Ii(e,0));return n}function kt(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&&re(r)||o===1&&re(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Mo(r)||r===45||r===95||re(r)||Do(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function br(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Mo(r)||r===45||r===95||re(r)||Do(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function tn(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 Dl(t){let e=br(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${br(t.slice(1))}`:e}var Ai=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 Ml(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 $l(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return kt(t.value);case\"at-keyword\":return`@${kt(t.value)}`;case\"hash\":return`#${br(t.value)}`;case\"string\":return tn(t.value);case\"url\":return`url(${tn(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}${Dl(t.unit)}`;case\"func\":return`${kt(t.name)}(${Ve(t.value)})`;case\"block\":return`${t.open}${Ve(t.value)}${Pi[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function Ve(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Ml(Ai(n),Ai(r))&&(e+=\"/**/\"),e+=$l(r),n=r);return e}var Ll=new Set(fi),Mi=new Set(pi),Oi=new Set(mi),Hl=new Set(hi),Fl=new Set(yi),Ul=new Set(bi),Ri=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,me=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Gl=t=>me(t);function Co(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&&Oi.has(t)&&Ri.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=me(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(c=>c.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&Oi.has(t)&&Ri.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!Mi.has(s)){n({reason:\"function\",name:s});return}let i=Co(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=Co(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===\")\"||o.type===\"]\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}var jl=/^(animation|transition|scroll-behavior|outline)/,zl=\"--graview-ring-color\",Vl=\"--graview-focus-color\",Bl=t=>{let e=t.filter(r=>r.type!==\"whitespace\"),n=e[0];return e.length!==1||!n?!1:n.type===\"hash\"?/^(?:[0-9a-f]{3}|[0-9a-f]{6})$/i.test(n.value):n.type===\"ident\"&&![\"transparent\",\"currentcolor\"].includes(me(n.value))},Wl=new Set([\"url\",\"src\",\"image-set\",\"-webkit-image-set\"]),$i=t=>{for(let e of t){if(e.type===\"func\"&&Wl.has(me(e.name)))return me(e.name);if(e.type===\"func\"||e.type===\"block\"){let n=$i(e.value);if(n)return n}}};function wr(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:Gl(t.name);if(o===zl||!r&&!Ll.has(o)){e({reason:\"property\",name:o});return}if(o===Vl&&!Bl(t.value)){e({reason:\"value\",name:o});return}let s=gi[o];if(s){let c=t.value.filter(b=>b.type!==\"whitespace\"),p=c[0],h=c.length===1&&p?.type===\"ident\"?me(p.value):void 0;if(!h||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(h)){e({reason:\"value\",name:o});return}return`${o}: ${h}${t.important&&!(n&&o===\"all\")?\" !important\":\"\"}`}let i=Co(r?void 0:o,t.value,e);if(!i)return;let a=Qt&&(o===\"font-family\"||o===\"font\")?wi(i,Qt):i,l=Ve(a).trim();return`${r?`--${br(t.name.slice(2))}`:o}: ${l}${t.important&&!(n&&jl.test(o))?\" !important\":\"\"}`}var Lo=t=>t.some(e=>e.type===\"}\"||e.type===\";\"||e.type===\")\"||e.type===\"]\"||e.type===\"at-keyword\"||e.type===\"CDO\"||e.type===\"CDC\"||e.type===\"delim\"&&e.value===\"\\\\\"||(e.type===\"func\"||e.type===\"block\")&&Lo(e.value));function Li(t,e){if(Lo(t))return e({reason:\"unreadable\",name:\"selector\"}),!1;let n=$i(t);if(n)return e({reason:\"url\",name:n}),!1;let r=o=>{for(let s=0;s<o.length;s+=1){let i=o[s];if(s>0&&o[s-1].type===\":\"&&(i.type===\"ident\"||i.type===\"func\")){let l=me(i.type===\"ident\"?i.value:i.name);if(Fl.has(l)||(l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))&&!Ul.has(l))return e({reason:\"selector\",name:l}),!1}if(i.type===\"url\"||i.type===\"bad-url\"||i.type===\"bad-string\"||i.type===\"at-keyword\"||i.type===\"CDO\"||i.type===\"CDC\"||i.type===\"block\"&&i.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(i.type===\"func\"&&!r(i.value)||i.type===\"block\"&&!r(i.value))return!1}return!0};return r(t)}function _o(t,e,n,r){let o=[];for(let s of en(t))if(s.type===\"declaration\"){let i=wr(s,e);i&&o.push(`${i};`)}else{let i=Er(s,e,n+1,\"style\",r);i&&o.push(i)}return o.join(\" \")}function Yl(t,e,n){if(Lo(t)){n({reason:\"unreadable\",name:`@${e}`});return}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=me(s.name);return e===\"supports\"&&i===\"selector\"?Li(s.value,n):Mi.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=en(s.value);if(i.length===1&&i[0].type===\"declaration\")return wr(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?Ve(t).trim():void 0}function Io(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(xo,me(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:me(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Io(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Io(e.value)}:e})}function Er(t,e,n,r,o){if(n>Ci){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(h=>h.type===\"whitespace\"||h.type===\",\"||h.type===\"percentage\"||h.type===\"ident\"&&[\"from\",\"to\"].includes(me(h.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${Ve(t.prelude).trim()} { ${_o(t.block,e,n)} }`}if(!Li(t.prelude,e))return;let c=Ve(Io(t.prelude)).trim();if(c===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${c} { ${_o(t.block,e,n,o)} }`}let s=me(t.name),i=s===\"-webkit-keyframes\"?\"keyframes\":s;if(s===\"font-face\"&&o){if(o.skip)return;if(n>0||r!==\"sheet\"){e({reason:\"font-face\",name:\"where\"});return}if(!t.block){e({reason:\"font-face\",name:\"unreadable\"});return}if(o.refused){let p,h=Oo(t.prelude,en(t.block),{...o.budget},m=>void(p??=m.family),o.lent);h.face&&(o.data+=h.data);let b=h.face?.family??p;e({reason:\"font-face\",name:\"host\",...b!==void 0?{family:b}:{}});return}let c=Oo(t.prelude,en(t.block),o.budget,e,o.lent);c.face&&(o.data+=c.data,o.kept.push(c.face));return}if(!Hl.has(i)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${s}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${s}`});return}if(i===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let c=t.prelude.filter(m=>m.type!==\"whitespace\"),p=c[0];if(c.length!==1||!p||p.type!==\"ident\"&&p.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let h=St(t.block,!1).map(m=>Er(m,e,n+1,\"keyframes\")).filter(m=>m!==void 0);return`@keyframes ${p.type===\"ident\"?kt(p.value):tn(p.value)} { ${h.join(\" \")} }`}let a=Yl(t.prelude,i,e);if(a===void 0)return;let l=r===\"style\"?_o(t.block,e,n,o):St(t.block,!1).map(c=>Er(c,e,n+1,\"sheet\",o)).filter(c=>c!==void 0).join(\" \");return`@${i} ${a} { ${l} }`}var Qt,Ho=(t,e)=>{let n=Qt;Qt=t&&t.size>0?t:void 0;try{return e()}finally{Qt=n}};function _i(t,e){let n=[],r=s=>void n.push(s);return{css:St($o(t),!0).map(s=>Er(s,r,0,\"sheet\",e)).filter(s=>s!==void 0).join(`\n`),refused:n,faces:e?.kept??[],counted:t.length-(e?.data??0)}}function Nr(t,e=Kt,n={}){return rn([t],e,n)}function rn(t,e=Kt,n={}){let r=n.faces?n.faces===!0?{}:n.faces:void 0,o=[],s=[],i=[],a=[],l={bytes:0,count:0},c=r?Ei:0,p=r&&t.length>ko?t.slice(0,ko):t;p.length<t.length&&i.push({reason:\"size\",name:\"sheets\"});let h=0,b=0;for(let u of p){if(r&&b+u.length>e+c){i.push({reason:\"size\"});continue}if(!r&&h+u.length>e){i.push({reason:\"size\"});continue}b+=u.length;let E=r?{budget:{...l},kept:[],data:0,...r.lent?{lent:r.lent}:{},...r.refused?{refused:!0}:{}}:void 0,A=_i(u,E);if(h+A.counted>e){i.push({reason:\"size\"},...A.refused.filter(y=>y.reason===\"font-face\"));continue}E&&Object.assign(l,E.budget),h+=A.counted,s.push(u),A.css&&o.push(A.css),i.push(...A.refused),a.push(...A.faces)}let m=r?.scope?Ao(a,r.scope):void 0;if(!m||m.size===0)return{css:o.join(`\n`),refused:i,faces:a};let f={budget:{bytes:0,count:0},kept:[],data:0,skip:!0};return{css:Ho(m,()=>s.map(u=>_i(u,f).css).filter(u=>u!==\"\")).join(`\n`),refused:i,faces:a}}function Tr(t,e=Kt,n={}){let r=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}],faces:[]};let o=i=>void r.push(i),s=[];return Ho(n.rename,()=>{for(let i of en($o(t))){if(i.type!==\"declaration\"){o({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let a=wr(i,o,!0);a&&s.push(a)}}),{css:s.join(\"; \"),refused:r,faces:[]}}function xr(t,e,n={}){let r,o=Ho(n.rename,()=>wr(Di(t,$o(e)),s=>r??=s));return o===void 0||r?{refused:r??{reason:\"unreadable\",name:t}}:{value:o.slice(o.indexOf(\":\")+1).trim()}}var Hi=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function on(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=Hi(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&&Hi(s.title)===o):void 0)}var ke=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,At=\" 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.\",sn=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var Xl=t=>typeof t==\"string\"&&/^#[A-Za-z_][A-Za-z0-9_.:-]{0,199}$/.test(t),Fi=[\"https:\",\"mailto:\",\"tel:\"];function Ui(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!Fi.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function Gi(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=Ui(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 ji(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 zi(t,e){if(Xl(t))return t;let n=Ui(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&ji(e.origins).includes(new URL(n).origin)))return n}function Vi(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!Fi.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=ji(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>.`}function Bi(t,e){if(e===\"svg\"){let r=dr(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(vt,n)?Object.prototype.hasOwnProperty.call(go,n)?{namespace:\"html\",name:go[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function vr(t,e){return(t===\"html\"?vt[e]:ar[e])?.empty===!0}var ql=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Kl=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Zl=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Jl=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Ql=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Wi=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ed=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function td(t,e){if(Ql.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(ed.test(n))return Wi.exec(n)?.[0]}function Yi(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Xi(e.origins),s=Wi.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>qt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${qt.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 Xi(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 nd(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:Xi(e).includes(n.origin)?n.href:void 0}catch{return}}function Fo(t,e,n,r,o){let s=cr(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&lr[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=rd(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>qt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>Js.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 rd(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>ti||!Kl.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>qt)return o(\"url\");if(Jl.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?td(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=nd(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>yo)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 ql.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Zl.test(n)?{value:n}:o(\"url\");case\"style\":{let s=r.faceNames?.(),i=Tr(n,yo,s?{rename:s}:{});return i.refused.length>0&&i.css===\"\"?o(i.refused[0].reason===\"url\"?\"url\":\"css\",i.refused[0]):{value:i.css,...i.refused.length>0?{dropped:i.refused}:{}}}case\"css\":{let s=r.faceNames?.(),i=xr(t,n,s?{rename:s}:{});return\"refused\"in i?o(i.refused.reason===\"url\"?\"url\":\"css\",i.refused):{value:i.value}}}}var od=[\"youtube\",\"vimeo\"],Go={youtube:\"YouTube\",vimeo:\"Vimeo\"};var sd=[\"16:9\",\"4:3\",\"1:1\",\"9:16\"],qi=/^[A-Za-z0-9_-]{11}$/,Ki=new Set([\"videoseries\",\"live_stream\"]),Zi=/^[1-9][0-9]{0,11}$/,Ji=/^[0-9a-f]{6,20}$/,id=86400,ad=new Set([\"youtube.com\",\"www.youtube.com\",\"m.youtube.com\",\"music.youtube.com\",\"www.youtube-nocookie.com\",\"youtube-nocookie.com\"]),ld=new Set([\"vimeo.com\",\"www.vimeo.com\"]);function Qi(t){if(typeof t!=\"string\"||t===\"\"||t.length>12)return;let e=/^([0-9]{1,6})s?$/.exec(t),n=e?void 0:/^(?:([0-9]{1,2})h)?(?:([0-9]{1,4})m)?(?:([0-9]{1,6})s)?$/.exec(t);if(!e&&!n)return;let r=e?Number(e[1]):Number(n[1]??0)*3600+Number(n[2]??0)*60+Number(n[3]??0);return r<=id?r:void 0}function an(t,e){let n=t.split(\"&\").flatMap(r=>r.startsWith(`${e}=`)?[r.slice(e.length+1)]:[]);return n.length===1?n[0]:void 0}var dd=/^https?:\\/\\/([a-z.-]{1,40})(\\/[A-Za-z0-9_\\-/]{0,120})?(?:\\?([A-Za-z0-9_\\-.=&~+%:/,]{0,300}))?(?:#([A-Za-z0-9_\\-.=&]{0,60}))?$/;function cd(t){if(t.length>500)return;let e=dd.exec(t);if(!e)return;let n=e[1],r=(e[2]??\"/\").replace(/(.)\\/$/,\"$1\"),o=e[3]??\"\",s=e[4]??\"\",i=Qi(an(o,\"t\")??an(o,\"start\")??an(s,\"t\")),a=i?{start:i}:{};if(n===\"youtu.be\"||ad.has(n)){let l=/^\\/([A-Za-z0-9_-]+)$/.exec(r),c=/^\\/(embed|shorts|live|v)\\/([A-Za-z0-9_-]+)$/.exec(r),p=n===\"youtu.be\"?l?.[1]:r===\"/watch\"?an(o,\"v\"):c?.[2];return p===void 0||!qi.test(p)||Ki.has(p)?void 0:{provider:\"youtube\",id:p,...a,...n!==\"youtu.be\"&&c?.[1]===\"shorts\"?{tall:!0}:{}}}if(ld.has(n)||n===\"player.vimeo.com\"){let l=n===\"player.vimeo.com\"?/^\\/video\\/([0-9]+)$/.exec(r):/^\\/(?:channels\\/[A-Za-z0-9_-]+\\/)?([0-9]+)(?:\\/([0-9a-f]+))?$/.exec(r),c=l?.[1];if(c===void 0||!Zi.test(c))return;let p=l?.[2]??an(o,\"h\");return p!==void 0&&!Ji.test(p)?void 0:{provider:\"vimeo\",id:c,...p?{hash:p}:{},...a}}}var ea=t=>t(\"data-provider\")!==null||t(\"data-video\")!==null||t(\"data-watch\")!==null,et=t=>JSON.stringify(t.length>80?`${t.slice(0,79)}\\u2026`:t),Uo='YouTube (data-provider=\"youtube\") and Vimeo (data-provider=\"vimeo\")';function ta(t){let e=t(\"data-provider\"),n=t(\"data-video\"),r=t(\"data-watch\"),o;if(r!==null){if(e!==null||n!==null)return{why:\"names a video twice: by its watch address (data-watch), or by its provider and id (data-provider, data-video), and not both\"};if(o=cd(r.trim()),!o)return{why:`names the address ${et(r)}, which is no watch address of a provider a view plays: ${Uo}, as https://www.youtube.com/watch?v=<id>, https://youtu.be/<id> or https://vimeo.com/<id>`}}else{if(e===null)return{why:`names the video ${et(n??\"\")} and no provider: a view plays from ${Uo}`};if(!od.includes(e))return{why:`names the provider ${et(e)}, which is none a view plays from: ${Uo}`};let l=n??\"\";if(e===\"youtube\"){if(!qi.test(l)||Ki.has(l))return{why:`names the YouTube video ${et(l)}, which is no id of a video: one is 11 letters, digits, - and _ (the v= of its address)`};o={provider:e,id:l}}else{let c=/^([0-9]+)(?:\\/([0-9a-f]+))?$/.exec(l);if(!c||!Zi.test(c[1])||c[2]!==void 0&&!Ji.test(c[2]))return{why:`names the Vimeo video ${et(l)}, which is no id of a video: one is digits, with an unlisted video's key after a slash (\"76979871/8272103f6e\")`};o={provider:\"vimeo\",id:c[1],...c[2]?{hash:c[2]}:{}}}}let s=t(\"data-start\"),i=s===null?o.start:Qi(s.trim());if(s!==null&&i===void 0)return{why:`starts at ${et(s)}, which is no time in it: data-start is whole seconds (\"90\") or \"1m30s\", within a day`};let a=t(\"data-shape\");return a!==null&&!sd.includes(a)?{why:`asks for the shape ${et(a)}: a player is 16:9, 4:3, 1:1 or 9:16 (data-shape)`}:{embed:{provider:o.provider,id:o.id,...o.hash?{hash:o.hash}:{},...i?{start:i}:{},shape:a!==null?a:o.tall?\"9:16\":\"16:9\"}}}function na(t){return t.provider===\"youtube\"?`https://www.youtube.com/watch?v=${t.id}${t.start?`&t=${t.start}s`:\"\"}`:`https://vimeo.com/${t.id}${t.hash?`/${t.hash}`:\"\"}${t.start?`#t=${t.start}s`:\"\"}`}var ra=(t,e)=>e===void 0||e.providers.includes(t),oa=(t,e)=>(t(\"aria-label\")??t(\"title\")??\"\").replace(/\\s+/g,\" \").trim().slice(0,200)||`A ${Go[e.provider]} video`;var ud=\"http://www.w3.org/1999/xhtml\",fd=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var Sr=(t,...e)=>t.namespaceURI===ud&&e.includes(t.localName),pd=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),md=t=>Sr(t,\"textarea\",\"select\")||Sr(t,\"input\")&&!fd.has(pd(t));function sa(t){if(Sr(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(Sr(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(md(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 hd=\"http://www.w3.org/1999/xhtml\",Ot=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof nt?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}},tt=class extends Ot{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},jo=class extends Ot{nodeType=8;get textContent(){return\"\"}},nt=class extends Ot{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}},zo=class extends Ot{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new nt(this,e,n)}createElement(e){return new nt(this,hd,e)}createTextNode(e){return new tt(this,e)}createComment(e){return new jo(this)}};function ia(){let t=new zo,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var gd=new Set([\"video/mp4\",\"video/webm\",\"video/ogg\"]);function aa(t,e){let n=t.poster===!0||typeof t.poster==\"string\"&&t.poster.length>0,r=gd.has(t.type.toLowerCase()),o=r&&n,s=\"app\"in e&&typeof t.playable==\"boolean\"?t.playable:o,i=s?void 0:!r&&!n?`its source is ${t.type}, which not every browser plays, and it has no poster`:r?n?\"its host says it does not play in every browser\":\"it has no poster, so nothing stands before it plays or where a person asked for less motion\":`its source is ${t.type}, which not every browser plays`;return{...\"app\"in e?{app:e.app}:{record:e.record,field:e.field},text:typeof t.caption==\"string\"&&t.caption.trim()?t.caption.trim():t.name,name:t.name,source:t.type,...typeof t.duration==\"number\"?{duration:t.duration}:{},poster:n,autoplay:e.autoplay,cover:e.cover,playable:s,...i?{why:i}:{}}}var Vo={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},la=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\"]),ca=new Set([\"style\",\"template\",\"datalist\",\"option\"]),q=t=>t.replace(/\\s+/g,\" \").trim();function da(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 fe=t=>t instanceof nt,ln=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function oe(t){return t instanceof tt?t.data:!fe(t)||ln(t)||ca.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(oe).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}var yd=/(\\s+[·•|—–-]\\s+)/;function bd(t,e){if(!e||!t.includes(e))return t;let n=s=>s.length>0&&s.split(\" \").length<=3,r=q(t).split(yd),o=[];for(let s=0;s<r.length;s+=2){let i=r[s],a=i.startsWith(`${e} `)?i.slice(e.length+1):void 0,l=i.endsWith(` ${e}`)?i.slice(0,-e.length-1):void 0,c=i===e?\"\":a!==void 0&&n(a)?a:l!==void 0&&n(l)?l:i;c&&o.push(...o.length>0?[r[s-1]]:[],c)}return o.join(\"\")}function ua(t,e,n){let r=[];for(let o of t){if(o.t===\"list\"&&o.groups.every(s=>s.items.every(i=>i.id===e&&i.title===n))){r.push(...ua(o.groups.flatMap(s=>s.items.flatMap(i=>i.parts)),e,n));continue}if(o.t===\"text\"){let s=bd(o.text,n);s&&r.push(s===o.text?o:{...o,text:s});continue}r.push(o)}return r}function*rt(t){for(let e of t.childNodes)fe(e)&&(yield e,yield*rt(e))}function Ed(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 wd(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let c=l.indexOf(\":\"),p=c>0?l.slice(c+1):\"\";c<=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 fa(t,e){let n=[],r=new Set,o=new Set,s=[],i=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])i.set(f.id,f);let a=f=>on(e.places,f)!==void 0;for(let f of rt(t)){let O=f.getAttribute(\"data-act\");O!==null&&r.add(O);let u=O!==null&&f.getAttribute(\"data-debounce\")===null?sa(f):void 0;u&&n.push({at:`drawing <${f.localName} data-act=\"${O}\">`,says:u});let E=f.getAttribute(\"data-record\");E!==null&&(o.add(E),!i.has(E)&&!a(E)&&n.push({at:`drawing <${f.localName} data-record=\"${E}\">`,says:e.placesUnsure?`It names \"${E}\", 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.${ke(e.places)}${At}`:`It names \"${E}\", 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.${ke(e.places)}`}));let A=f.getAttribute(\"data-place\");A!==null&&!a(A)&&n.push({at:`drawing <${f.localName} data-place=\"${A}\">`,says:e.placesUnsure?`It names the place \"${A}\", which is none of the places this run was told of.${ke(e.places)}${At}`:`It names the place \"${A}\", which this app does not have.${ke(e.places)}`}),n.push(...Ed(f)),n.push(...wd(f,e,i))}let l=f=>{if(f.localName===\"graview-video\")return;let O=f.getAttribute(\"data-record\");if(O!==null)return O;let u=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(u!==null&&i.has(u))return u;let E=new Set;for(let A of rt(f)){let y=A.getAttribute(\"data-record\");y!==null&&A.localName!==\"graview-video\"&&E.add(y)}return E.size===1?[...E][0]:void 0},c=(f,O)=>{let u=i.get(O),E=u?.kind??(O.includes(\":\")?O.slice(0,O.indexOf(\":\")):\"\"),A=[...rt(f)],y=A.find(k=>k.localName in Vo)??A.find(k=>k.localName===\"a\"&&k.getAttribute(\"data-record\")===O)??A.find(k=>k.localName===\"strong\"||k.localName===\"b\"),x=q(y?oe(y):\"\")||u?.label||O;return{id:O,kind:E,title:x,parts:ua(h(f,y),O,x)}},p=f=>{let O=[...rt(f)].filter(y=>y.localName===\"tr\"&&!ln(y)),u=O.find(y=>y.parentElement?.localName===\"thead\"||y.childNodes.every(x=>!fe(x)||x.localName===\"th\")),E=u?u.childNodes.filter(fe).map(y=>q(oe(y))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:O.filter(y=>y!==u).map(y=>{let x=y.childNodes.filter(fe),k=l(y),g=k?i.get(k):void 0;return{id:k??\"\",kind:g?.kind??\"\",title:q(oe(x[0]??y)),parts:x.slice(1).map((S,w)=>({t:\"field\",label:E[w+1]??\"\",text:q(oe(S))}))}})}]}};function h(f,O){let u=[],E=\"\",A=()=>{let x=q(E);E=\"\",x&&u.push({t:\"text\",text:x})},y=f.childNodes;for(let x=0;x<y.length;x+=1){let k=y[x];if(k===O)continue;if(k instanceof tt){E+=k.data;continue}if(!fe(k)||ln(k)||ca.has(k.localName))continue;if(O&&[...rt(k)].includes(O)){A(),u.push(...h(k,O));continue}let g=[];for(let S=x;S<y.length;S+=1){let w=y[S];if(w instanceof tt&&q(w.data)===\"\")continue;if(!fe(w)||ln(w)||la.has(w.localName)||w.localName in Vo)break;let R=l(w);if(!R)break;g.push({element:w,id:R}),x=S}if(g.length>0){A();let S=g.every(w=>w.element.localName===\"li\"||w.element.localName===\"tr\");u.push({t:\"list\",as:S?\"row\":\"card\",columns:1,groups:[{items:g.map(w=>c(w.element,w.id))}]});continue}u.push(...b(k,S=>E+=S,A))}return A(),u}function b(f,O,u){let E=f.localName;if(la.has(E)&&E!==\"label\")return O(oe(f)),[];if(E===\"mark\"){u();let y=q(oe(f));return y?[{t:\"badge\",text:y}]:[]}u();let A=Vo[E]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(A!==void 0){let y=q(oe(f));return y?[{t:\"heading\",level:A,text:y}]:[]}switch(E){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(x=>fe(x)&&x.localName===\"li\"&&!ln(x)).map(x=>{let k=l(x);if(k)return c(x,k);let g=h(x),S=g[0],w=S&&(S.t===\"text\"||S.t===\"heading\")?S.text:\"\";return{id:\"\",kind:\"\",title:w,parts:w?g.slice(1):g}})}]}];case\"table\":return[p(f)];case\"dl\":{let y=[],x=\"\";for(let k of f.childNodes.filter(fe))if(k.localName===\"dt\")x=q(oe(k));else if(k.localName===\"dd\")y.push({t:\"field\",label:x,text:q(oe(k))});else if(k.localName===\"div\")for(let g of k.childNodes.filter(fe))g.localName===\"dt\"?x=q(oe(g)):g.localName===\"dd\"&&y.push({t:\"field\",label:x,text:q(oe(g))});return y}case\"figure\":{let y=f.childNodes.find(g=>fe(g)&&g.localName===\"figcaption\"),x=q(f.childNodes.filter(g=>g!==y).map(oe).join(\" \")),k=y?q(oe(y)):\"\";return x?[{t:\"figure\",text:x,...k?{label:k}:{}}]:k?[{t:\"text\",text:k}]:[]}case\"meter\":case\"progress\":{let y=Number(f.getAttribute(\"value\")??0),x=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(y/x*100)}%`}]}case\"svg\":{let y=f.childNodes.find(g=>fe(g)&&g.localName===\"title\"),x=q(f.getAttribute(\"aria-label\")??(y?oe(y):\"\"));if(x)return[{t:\"text\",text:x,tone:\"picture\"}];let k=[...rt(f)].filter(g=>g.localName===\"text\").map(g=>q(oe(g))).filter(Boolean);return k.length>0?[{t:\"text\",text:k.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let y=q(f.getAttribute(\"alt\")??\"\");return y?[{t:\"text\",text:y,tone:\"picture\"}]:[]}case\"graview-video\":{let y=T=>f.getAttribute(T);if(ea(y)){let T=ta(y);if(\"why\"in T)return n.push({at:\"drawing <graview-video>\",says:`Not drawn: it ${T.why}.`,code:\"embed-refused\"}),[];let F=oa(y,T.embed),$=Go[T.embed.provider],z=ra(T.embed.provider,e.embeds);return s.push({provider:T.embed.provider,link:na(T.embed),text:F,name:T.embed.id,source:$,poster:f.getAttribute(\"poster\")!==null,autoplay:!1,cover:!1,playable:z,...z?{}:{why:`this host plays no ${$} video in a view: its link is drawn alone`}}),[{t:\"text\",text:z?`${F}, a ${$} video, played where it stands once pressed`:`${F}: watch on ${$}`,tone:\"picture\"}]}if(f.getAttribute(\"data-app\")!==null){let T=f.getAttribute(\"data-app\")??\"\",F=e.props.theme?.reel;if(T!==\"reel\"||!F)return n.push({at:`drawing <graview-video data-app=\"${T.slice(0,80)}\">`,says:T!==\"reel\"?`It names \"${T.slice(0,80)}\", which is no video of the app: the host draws no player there. The app's own video is data-app=\"reel\".`:\"It names the app's reel, which this host did not hand: the host draws no player there. A host hands the app's reel as reel.\"}),[];let $=aa(F,{app:\"reel\",autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push($);let z=$.autoplay?`, playing as a background, muted and looping${$.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${$.text}, ${da($.duration!==void 0?{duration:$.duration}:{})}${z}`,tone:\"picture\"}]}let x=f.getAttribute(\"data-field\")??\"\",k=f.getAttribute(\"data-record\")??\"\",g=i.get(k),S=g&&x&&Object.hasOwn(g,x)?g[x]:void 0,w=(Array.isArray(S)?S:[S])[Number(f.getAttribute(\"data-index\")??\"0\")];if(!w||typeof w.name!=\"string\"||typeof w.type!=\"string\"||!w.type.startsWith(\"video/\"))return n.push({at:`drawing <graview-video data-field=\"${x}\">`,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).\"}),[];let R=aa(w,{record:k,field:x,autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push(R);let _=R.autoplay?`, playing as a background, muted and looping${R.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${R.text}, ${da(R.duration!==void 0?{duration:R.duration}:{})}${_}`,tone:\"picture\"}]}case\"button\":{let y=q(oe(f));return y?[{t:\"text\",text:y,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let y=q(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),x=E===\"select\"?q(oe(f.childNodes.find(k=>fe(k)&&k.localName===\"option\"&&k.selected)??f)):f.value;return[{t:\"field\",label:y,text:x}]}case\"label\":return h(f);default:return h(f)}}return{parts:h(t),problems:n,acts:[...r],records:[...o],videos:s}}var Nd=0,Td=1,xd=2,vd=3,pa=1,Sd=2,ma=3,kd=1,Ad=3,Od=8,ha=\"~\",dn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ga=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Rd=new Set([\"value\",\"checked\",\"selected\"]),ya=[\"aria-label\",\"aria-labelledby\",\"title\"],_d=t=>ya.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function ba(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:ha};s.set(ha,a);let l=0,c=!1,p=new WeakMap,h=new Map,b=new Map,m=g=>{o.push(g),o.length>200&&o.shift(),e.onRefused?.(g)},f=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),O=(g,S)=>{if(g.namespace===\"html\"&&g.name&&ga.has(g.name))return g.dom;if(S?.namespace===\"html\"&&S.name===\"textarea\")return S.dom},u=(g,S)=>{let w=g.dom,R=p.get(w)??w.getAttribute(\"role\");if(R===null||!R.split(/\\s+/).some(_=>Qs.includes(_.toLowerCase())))return void p.delete(w);if(_d(w)){p.delete(w),w.getAttribute(\"role\")!==R&&w.setAttribute(\"role\",R);return}p.set(w,R),w.removeAttribute(\"role\"),S&&m({reason:\"value\",element:g.name,name:\"role\"})},E=()=>{if(b.size===0)return;let g=new Set,S=w=>{for(let R of w.children){if(R.refused||R.text)continue;let _=R.dom.getAttribute(\"id\");_&&g.add(_),S(R)}};S(a);for(let[w,R]of b){if(w.id===void 0||s.get(w.id)!==w){b.delete(w);continue}let _=w.dom;for(let[T,F]of R){let $=F.value.split(/\\s+/).filter(se=>se!==\"\"),z=$.filter(se=>!g.has(se));if($.length>0&&z.length===0){if(F.drawn)continue;F.drawn=!0,_.setAttribute(T,F.value),u(w,!1)}else F.drawn&&(F.drawn=!1,_.removeAttribute(T),m({reason:\"reference\",element:w.name,name:T,ids:z.length>0?z:$}),u(w,!0))}}},A=(g,S,w,R=!0)=>{let _=g.dom;if(w!=null&&typeof w!=\"string\")return m({reason:\"value\",element:g.name,name:S});let T=Fo(g.namespace,g.name,S,w??null,e);if(\"refused\"in T){let se=Fo(g.namespace,g.name,S,null,e);return\"refused\"in se||_.removeAttribute(se.name),!(\"refused\"in se)&&se.name===\"role\"&&p.delete(_),m(T.refused)}for(let se of T.dropped??[])m(se);let F=g.namespace===\"html\"&&Rd.has(T.name)&&ga.has(g.name),$=_,z=F?T.name===\"value\"?$.value:T.name===\"checked\"?$.checked:$.selected:void 0;if(T.name===\"role\"&&p.delete(_),ei.includes(T.name)){let se=b.get(g)??new Map;T.value===null?se.delete(T.name):se.set(T.name,{value:T.value,drawn:!0}),se.size>0?b.set(g,se):b.delete(g)}T.value===null?_.removeAttribute(T.name):_.setAttribute(T.name,T.value),R&&(T.name===\"role\"||ya.includes(T.name))&&u(g,T.name===\"role\"),e.onAttribute?.(_,T.name),F&&(T.name===\"value\"&&\"value\"in $?($.value=T.value??\"\",z!==$.value&&e.onFieldSet?.(_)):T.name===\"checked\"&&\"checked\"in $?($.checked=T.value!==null,z!==$.checked&&e.onFieldSet?.(_)):T.name===\"selected\"&&\"selected\"in $&&($.selected=T.value!==null,z!==$.selected&&e.onFieldSet?.(_.parentElement?.closest(\"select\")??_)))},y=g=>{if(!g.refused){l-=1,g.id!==void 0&&s.delete(g.id);for(let S of g.children)y(S)}},x=(g,S)=>{if(!dn(g)||typeof g.id!=\"string\"||s.has(g.id))return m({reason:\"record\"}),f();if(l>=r)return m({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),f();let w=g.id;if(g.type===Od)return f();if(g.type===Ad){if(vr(S.namespace,S.name))return m({reason:\"child\",element:S.name}),f();let $=n.createTextNode(String(g.data??\"\").slice(0,bo)),z={dom:$,children:[],text:!0,id:w,parent:S};return s.set(w,z),i.set($,w),l+=1,z}if(g.type!==kd)return m({reason:\"record\"}),f();let R=String(g.element);if(vr(S.namespace,S.name))return m({reason:\"child\",element:R}),f();let _=Bi(R,S.namespace);if(\"refused\"in _)return m(_.refused),f();let T=n.createElementNS(_.namespace===\"svg\"?ri:ni,_.name);_.as&&T.setAttribute(\"data-graview-as\",_.as),_.namespace===\"html\"&&_.name===\"img\"&&T.setAttribute(\"referrerpolicy\",\"no-referrer\"),_.namespace===\"html\"&&_.name===\"a\"&&(T.setAttribute(\"target\",\"_blank\"),T.setAttribute(\"rel\",\"noopener noreferrer\"),T.setAttribute(\"referrerpolicy\",\"no-referrer\"));let F={dom:T,name:_.name,namespace:_.namespace,children:[],id:w,parent:S};if(s.set(w,F),i.set(T,w),l+=1,dn(g.attributes)){for(let[$,z]of Object.entries(g.attributes))A(F,$,z,!1);u(F,!0)}if(e.decorate?.(T,_.name,_.namespace),dn(g.properties))for(let $ of Object.keys(g.properties))m({reason:\"attribute\",element:_.name,name:$});if(dn(g.eventListeners))for(let $ of Object.keys(g.eventListeners))g.eventListeners[$]!=null&&m({reason:\"attribute\",element:_.name,name:`on${$}`});if(Array.isArray(g.children))for(let $ of g.children){let z=x($,F);F.children.push(z),T.appendChild(z.dom)}return F},k=g=>{if(!Array.isArray(g))return m({reason:\"record\"});let[S,w]=g,R=typeof w==\"string\"?s.get(w):void 0;if(!R)return m({reason:\"record\"});switch(S){case Nd:{if(R.text)return m({reason:\"record\"});let _=Number(g[3]),T=Number.isInteger(_)&&_>=0&&_<=R.children.length?_:R.children.length,F=g[2],$=dn(F)&&typeof F.id==\"string\"?h.get(F.id):void 0,z;$&&$.parent?.namespace===R.namespace&&!vr(R.namespace,R.name)?(h.delete(F.id),$.parent=R,z=$):z=x(F,R),R.dom.insertBefore(z.dom,R.children[T]?.dom??null),R.children.splice(T,0,z),R.namespace===\"html\"&&R.name===\"textarea\"&&e.onFieldSet?.(R.dom);return}case Td:{let _=Number(g[2]),T=R.children[_];if(!T)return m({reason:\"record\"});R.children.splice(_,1),T.dom.parentNode?.removeChild(T.dom),T.id!==void 0&&!T.refused?h.set(T.id,T):y(T);return}case xd:{if(!R.text)return m({reason:\"record\"});R.dom.data=String(g[2]??\"\").slice(0,bo);let _=O(R,R.parent);_&&e.onFieldSet?.(_);return}case vd:{if(R===a||R.text)return m({reason:\"record\"});let _=String(g[2]),T=g[4]??pa;return T===Sd?A(R,_,g[3]):m(T===pa||T===ma?{reason:\"attribute\",element:R.name,name:T===ma?`on${_}`:_}:{reason:\"record\"})}default:return m({reason:\"record\"})}};return{apply(g,S){if(!Array.isArray(g))return m({reason:\"record\"}),!0;try{for(let w=0;w<g.length;w+=1){if(S&&w%32===0&&S())return!1;k(g[w])}return!0}finally{for(let w of h.values())y(w);h.clear(),E()}},get refused(){return o},get size(){return l},idOf:g=>i.get(g),elementOf(g){let S=s.get(g);return S&&!S.text&&S!==a?S.dom:void 0},dispose(){for(let g of a.children)y(g);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}var Pd=\"@layer graview-motion, graview-region, graview-view, graview-theme;\",Cd=new Set([\"media\",\"supports\",\"container\",\"keyframes\",\"-webkit-keyframes\"]),Id=new Set([\"src\",\"image-set\",\"-webkit-image-set\"]),Dd={\"}\":\"{\",\")\":\"(\",\"]\":\"[\"};function wa(t){let e=[],n=nn(t);for(let[r,o]of n.entries())switch(o.type){case\"bad-string\":case\"bad-url\":case\"url\":case\"CDO\":case\"CDC\":return!1;case\"delim\":if(o.value===\"\\\\\")return!1;break;case\"at-keyword\":if(!Cd.has(o.value.toLowerCase()))return!1;break;case\";\":if(e.length===0)return!1;break;case\"function\":{let s=o.value.toLowerCase();if(Id.has(s))return!1;if(s===\"url\"){let i=n[r+1];if(i?.type!==\"string\"||!i.value.startsWith(\"#\"))return!1}e.push(\"(\");break}case\"{\":case\"(\":case\"[\":e.push(o.type);break;case\"}\":case\")\":case\"]\":if(e.pop()!==Dd[o.type])return!1;break;default:}return e.length===0}function Ea(t,e){return e.trim()===\"\"||!wa(e)?\"\":`@layer ${t} {\n${e}\n}`}function Na(t,e){return t.trim()===\"\"?wa(e)?e:\"\":[Pd,Ea(\"graview-theme\",t),Ea(\"graview-view\",e)].filter(n=>n!==\"\").join(`\n`)}function Ta(t,e,n){let{root:r}=ia(),o=!1,s=ba(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 h of t)s.apply(h);let i=[...s.refused],a=\"\",l=[];if(e){let h=rn(e,void 0,{faces:{scope:\"graview-view\",...n.lent?{lent:n.lent}:{},...n.ownFaces===!1?{refused:!0}:{}}});a=h.css,l=h.faces;for(let b of h.refused)i.push({reason:\"css\",name:\"stylesheet\",css:b})}let c=n.theme?Nr(n.theme).css:\"\",p=Na(c,a);return{root:r,refused:i,size:s.size,over:o,css:p,faces:l,elementOf:h=>s.elementOf(h),idOf:h=>s.idOf(h)}}var kr=\" 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.\",xa={animate:kr,animateTransform:kr,animateMotion:kr,set:kr,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>.\",loading:' An <img> loads \"lazy\" or \"eager\".',fetchpriority:' An <img> fetches at \"high\", \"low\" or \"auto\".',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 Md(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(xa,s)?xa[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: ${Vi(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&(t.element===\"img\"||t.element===\"graview-video\")?`Not drawn: ${Yi(t.address,e,\"length\"in t?t.length:void 0)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}case\"css\":return t.css?.reason===\"font-face\"?{at:\"stylesheet @font-face\",says:Ro(t.css)}:{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 va(t,e,n={}){let{limits:r}=e;if(t.messages>r.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${r.messages} a view may send in a second.`};let o=new Set(e.acts);for(let m of t.asked)if(!o.has(m.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${m.name}\", which its manifest does not name.`};let s=Gi(e.props),i=Ta(t.renders,t.sheets,{maxNodes:r.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:m=>m}:{},...n.theme?{theme:n.theme}:{},...n.lent?{lent:n.lent}:{},...n.ownFaces===!1?{ownFaces:!1}:{},link:m=>zi(m,{handed:s,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(i.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${r.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let a=[...e.places,...(e.lists??[]).filter(m=>!e.places.some(f=>f.as===m)).map(m=>({as:m}))],l=e.placesUnsure===!0,c=fa(i.root,{props:e.props,places:a,...l?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{},...e.embeds?{embeds:{providers:e.embeds}}:{}});for(let m of c.acts)if(!o.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 p=[...i.refused.map(m=>Md(m,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...c.problems],h=new Set,b=m=>{for(let f of m.childNodes){if(f.nodeType!==1)continue;let O=f.getAttribute(\"data-part-failed\"),u=f.getAttribute(\"data-part\")??\"\";if(O!==null&&sr.test(u)&&!h.has(`${u} ${O}`)&&h.size<10){h.add(`${u} ${O}`);let E=JSON.stringify((f.getAttribute(\"data-part-why\")??\"\").replace(/[\\u0000-\\u001f\\u007f\\u2028\\u2029]+/g,\" \").slice(0,300));p.push({at:`part \"${u}\"`,says:`The part \"${u}\" ${O===\"slow\"?\"took too long\":\"threw\"}: ${E}. The page draws a note in its place and the rest of the view.`})}b(f)}};b(i.root);for(let m of t.went)\"record\"in m&&!(e.props.node?.id===m.record||(e.props.nodes??[]).some(f=>f.id===m.record)||on(a,m.record))&&p.push({at:\"navigate\",says:l?`It goes to ${sn(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.${ke(a)}${At}`:`It goes to ${sn(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.${ke(a)}`}),\"place\"in m&&!on(a,m.place)&&p.push({at:\"navigate\",says:l?`It goes to the place ${sn(m.place)}, which is none of the places this run was told of.${ke(a)}${At}`:`It goes to the place ${sn(m.place)}, which this app does not have.${ke(a)}`});return{ok:!0,parts:c.parts,problems:p,drawn:i,videos:c.videos}}var Bo=\"graviewHeadless\",Wo=\"graviewHeadlessView\";var Aa=globalThis,$d=Promise.prototype.then,Ld=Promise.resolve(),cn=t=>void $d.call(Ld,t),Ar=Aa.performance,un=Ar&&typeof Ar.now==\"function\"?Ar.now.bind(Ar):Date.now,ot=JSON.stringify,Oa=JSON.parse,Hd=Object.defineProperty,Or=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Rt=t=>{try{return Oa(ot(t??null))}catch{return null}},B={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Ae,fn=(t,e)=>{Ae??={reason:t,detail:e}},st=t=>{B.logs.length<50&&B.logs.push(t.slice(0,500))},_t={removed:[],stuck:[],sealed:!1},Yo=new Map,it=ui({send(t){if(B.messages+=1,t.type===\"mine\"){let e=t.id,n=t.op===\"set\"?Us(t.key,t.value):void 0;n?st(n):t.op===\"set\"&&t.value===null?Yo.delete(t.key):t.op===\"set\"&&Yo.set(t.key,t.value),cn(()=>it.hear(n?{type:\"mine-answer\",id:e,ok:!1,sentence:n}:{type:\"mine-answer\",id:e,ok:!0,...t.op===\"get\"?{value:Yo.get(t.key)??null}:{}}))}else t.type===\"render\"?B.renders.push(Rt(t.records)):t.type===\"style\"?B.sheets=(Rt(t.sheets)??[]).map(String):t.type===\"gestures\"?B.gestures=Rt(t.bound):t.type===\"navigate\"&&\"place\"in t?B.went.push({place:String(t.place),...t.where!==void 0?{where:Rt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&B.went.push({record:String(t.to),...t.where!==void 0?{where:Rt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return B.messages+=1,B.asked.push({name:String(t),args:Rt(e)}),Promise.resolve({type:\"answer\",id:B.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){B.messages+=1,B.went.push({record:String(t)})},microtask:cn,now:un,threw:t=>fn(\"error\",`It threw: ${Or(t)}`),warn:st,hardening:()=>_t}),Sa=!1,Xo=!1;function Fd(t){if(Xo||typeof t!=\"function\"||(Xo=!0,Ae))return;let e=un();try{t.call(void 0,it.view)}catch(n){fn(\"error\",`It threw: ${Or(n)}`)}B.ms+=un()-e}async function Ud(t){if(Sa)return ot({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Sa=!0;let e;try{e=Oa(String(t))}catch{return ot({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Xo&&!Ae)return ot({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=un();Ae||it.hear({type:\"props\",props:e.props,push:1,partMs:e.limits.pushMs/4}),B.ms+=un()-n,B.ms>=e.limits.pushMs&&fn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Ae;o+=1)await new Promise(s=>cn(s));if(Ae||(B.clicks=it.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!Ae){let o=typeof e.press.target==\"string\"?e.press.target:it.find(e.press.selector);if(B.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:B.asked.length,went:B.went.length,renders:B.renders.length},o!==void 0){try{it.hear({type:\"dom-event\",target:o,event:\"click\"})}catch(s){fn(\"error\",`It threw: ${Or(s)}`)}for(let s=0;s<64&&!Ae;s+=1)await new Promise(i=>cn(i))}}if(Ae)return ot({ok:!1,...Ae,transcript:B});let r=va(B,e);return r.ok?ot({ok:!0,transcript:B,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:_t.removed.length,sealed:_t.sealed}}):ot({ok:!1,reason:r.reason,detail:r.detail,transcript:B})}var Gd=Object.freeze({log:(...t)=>st(t.map(String).join(\" \")),info:(...t)=>st(t.map(String).join(\" \")),debug:(...t)=>st(t.map(String).join(\" \")),warn:(...t)=>st(t.map(String).join(\" \")),error:(...t)=>st(t.map(Or).join(\" \"))}),jd=0,ka=()=>jd+=1,zd=[[\"console\",Gd],[\"setTimeout\",ka],[\"setInterval\",ka],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",cn],[\"graview\",it.view],[Wo,Fd],[Bo,t=>Ud(t)]];for(let[t,e]of zd)Hd(Aa,t,{value:e,writable:!0,enumerable:!1,configurable:!0});_t=Xs(globalThis,[\"graview\",Wo,Bo],{primitivesStay:!0});_t.stuck.length>0&&fn(\"refused\",`This isolate could not be hardened: ${_t.stuck.join(\", \")} would not go.`);})();\n";
8
8
  //# sourceMappingURL=runtime.generated.js.map