@hyperdreamer/pi-webui 1.24.1 → 1.26.0
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.
- package/README.md +1 -1
- package/dist/client/assets/CodeViewer-BbtvtABF.js +4 -0
- package/dist/client/assets/{UnifiedDiffViewer-BFBQjlJd.js → UnifiedDiffViewer-B7xq-ET5.js} +1 -1
- package/dist/client/assets/{index-Bsp7hXcN.js → index-sujNbkL3.js} +475 -468
- package/dist/client/assets/{mathjaxEngine-CVXA3FNR.js → mathjaxEngine-CBUWmGvi.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/sessions/piSessionService.js +141 -29
- package/dist/server/sessions/piSessionService.js.map +1 -1
- package/dist/server/sessions/sessionModelPolicy.js +14 -2
- package/dist/server/sessions/sessionModelPolicy.js.map +1 -1
- package/dist/server/sessions/sessionRuntimeRestore.js +107 -0
- package/dist/server/sessions/sessionRuntimeRestore.js.map +1 -0
- package/dist/shared/apiTypes.d.ts +6 -1
- package/dist/shared/apiTypes.js.map +1 -1
- package/docs/config.md +2 -1
- package/package.json +7 -7
- package/dist/client/assets/CodeViewer-DgVx_yzp.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{l as e,n as t}from"./index-Bsp7hXcN.js";var n=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},i=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteElement=void 0,e.LiteElement=function(){function e(e,a,o){var s,c;a===void 0&&(a={}),o===void 0&&(o=[]),this.kind=e,this.attributes=t({},a),this.children=r([],n(o),!1);try{for(var l=i(this.children),u=l.next();!u.done;u=l.next()){var d=u.value;d.parent=this}}catch(e){s={error:e}}finally{try{u&&!u.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}this.styles=null}return e}()})),r=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDOMAdaptor=void 0,e.AbstractDOMAdaptor=function(){function e(e){e===void 0&&(e=null),this.document=e}return e.prototype.node=function(e,n,r,i){var a,o;n===void 0&&(n={}),r===void 0&&(r=[]);var s=this.create(e,i);this.setAttributes(s,n);try{for(var c=t(r),l=c.next();!l.done;l=c.next()){var u=l.value;this.append(s,u)}}catch(e){a={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}return s},e.prototype.setAttributes=function(e,n){var r,i,a,o,s,c;if(n.style&&typeof n.style!=`string`)try{for(var l=t(Object.keys(n.style)),u=l.next();!u.done;u=l.next()){var d=u.value;this.setStyle(e,d.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}),n.style[d])}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}if(n.properties)try{for(var f=t(Object.keys(n.properties)),p=f.next();!p.done;p=f.next()){var d=p.value;e[d]=n.properties[d]}}catch(e){a={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}try{for(var m=t(Object.keys(n)),h=m.next();!h.done;h=m.next()){var d=h.value;(d!==`style`||typeof n.style==`string`)&&d!==`properties`&&this.setAttribute(e,d,n[d])}}catch(e){s={error:e}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},e.prototype.replace=function(e,t){return this.insert(e,t),this.remove(t),t},e.prototype.childNode=function(e,t){return this.childNodes(e)[t]},e.prototype.allClasses=function(e){var t=this.getAttribute(e,`class`);return t?t.replace(/ +/g,` `).replace(/^ /,``).replace(/ $/,``).split(/ /):[]},e}()})),i=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.lookup=e.separateOptions=e.selectOptionsFromKeys=e.selectOptions=e.userOptions=e.defaultOptions=e.insert=e.copy=e.keys=e.makeArray=e.expandable=e.Expandable=e.OPTIONS=e.REMOVE=e.APPEND=e.isObject=void 0;var i={}.constructor;function a(e){return typeof e==`object`&&!!e&&(e.constructor===i||e.constructor===o)}e.isObject=a,e.APPEND=`[+]`,e.REMOVE=`[-]`,e.OPTIONS={invalidOption:`warn`,optionError:function(t,n){if(e.OPTIONS.invalidOption===`fatal`)throw Error(t);console.warn(`MathJax: `+t)}};var o=function(){function e(){}return e}();e.Expandable=o;function s(e){return Object.assign(Object.create(o.prototype),e)}e.expandable=s;function c(e){return Array.isArray(e)?e:[e]}e.makeArray=c;function l(e){return e?Object.keys(e).concat(Object.getOwnPropertySymbols(e)):[]}e.keys=l;function u(e){var n,r,i={};try{for(var c=t(l(e)),f=c.next();!f.done;f=c.next()){var p=f.value,m=Object.getOwnPropertyDescriptor(e,p),h=m.value;Array.isArray(h)?m.value=d([],h,!1):a(h)&&(m.value=u(h)),m.enumerable&&(i[p]=m)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object.defineProperties(e.constructor===o?s({}):{},i)}e.copy=u;function d(i,s,c){var f,p;c===void 0&&(c=!0);var m=function(t){if(c&&i[t]===void 0&&i.constructor!==o)return typeof t==`symbol`&&(t=t.toString()),e.OPTIONS.optionError(`Invalid option "${t}" (no default value).`,t),`continue`;var f=s[t],p=i[t];if(a(f)&&p!==null&&(typeof p==`object`||typeof p==`function`)){var m=l(f);Array.isArray(p)&&(m.length===1&&(m[0]===e.APPEND||m[0]===e.REMOVE)&&Array.isArray(f[m[0]])||m.length===2&&m.sort().join(`,`)===e.APPEND+`,`+e.REMOVE&&Array.isArray(f[e.APPEND])&&Array.isArray(f[e.REMOVE]))?(f[e.REMOVE]&&(p=i[t]=p.filter(function(t){return f[e.REMOVE].indexOf(t)<0})),f[e.APPEND]&&(i[t]=r(r([],n(p),!1),n(f[e.APPEND]),!1))):d(p,f,c)}else Array.isArray(f)?(i[t]=[],d(i[t],f,!1)):a(f)?i[t]=u(f):i[t]=f};try{for(var h=t(l(s)),g=h.next();!g.done;g=h.next()){var _=g.value;m(_)}}catch(e){f={error:e}}finally{try{g&&!g.done&&(p=h.return)&&p.call(h)}finally{if(f)throw f.error}}return i}e.insert=d;function f(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!1)}),e}e.defaultOptions=f;function p(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!0)}),e}e.userOptions=p;function m(e){for(var n,r,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var o={};try{for(var s=t(i),c=s.next();!c.done;c=s.next()){var l=c.value;e.hasOwnProperty(l)&&(o[l]=e[l])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}e.selectOptions=m;function h(e,t){return m.apply(void 0,r([e],n(Object.keys(t)),!1))}e.selectOptionsFromKeys=h;function g(e){for(var n,r,i,a,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var c=[];try{for(var l=t(o),u=l.next();!u.done;u=l.next()){var d=u.value,f={},p={};try{for(var m=(i=void 0,t(Object.keys(e||{}))),h=m.next();!h.done;h=m.next()){var g=h.value;(d[g]===void 0?p:f)[g]=e[g]}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}c.push(f),e=p}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c.unshift(e),c}e.separateOptions=g;function _(e,t,n){return n===void 0&&(n=null),t.hasOwnProperty(e)?t[e]:n}e.lookup=_})),a=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.NodeMixin=e.NodeMixinOptions=void 0;var r=i();e.NodeMixinOptions={badCSS:!0,badSizes:!0};function a(i,a){var o;return a===void 0&&(a={}),a=(0,r.userOptions)((0,r.defaultOptions)({},e.NodeMixinOptions),a),o=function(e){t(n,e);function n(){var t=[...arguments],n=e.call(this,t[0])||this,i=n.constructor;return n.options=(0,r.userOptions)((0,r.defaultOptions)({},i.OPTIONS),t[1]),n}return n.prototype.fontSize=function(t){return a.badCSS?this.options.fontSize:e.prototype.fontSize.call(this,t)},n.prototype.fontFamily=function(t){return a.badCSS?this.options.fontFamily:e.prototype.fontFamily.call(this,t)},n.prototype.nodeSize=function(t,r,i){if(r===void 0&&(r=1),i===void 0&&(i=null),!a.badSizes)return e.prototype.nodeSize.call(this,t,r,i);var o=this.textContent(t),s=Array.from(o.replace(n.cjkPattern,``)).length;return[(Array.from(o).length-s)*this.options.cjkCharWidth+s*this.options.unknownCharWidth,this.options.unknownCharHeight]},n.prototype.nodeBBox=function(t){return a.badSizes?{left:0,right:0,top:0,bottom:0}:e.prototype.nodeBBox.call(this,t)},n}(i),o.OPTIONS=n(n({},a.badCSS?{fontSize:16,fontFamily:`Times`}:{}),a.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),o.cjkPattern=new RegExp([`[`,`ᄀ-ᅟ`,`〈〉`,`⺀-〾`,`-㉇`,`㉐-䶿`,`一-꓆`,`ꥠ-ꥼ`,`가-힣`,`豈-`,`︐-︙`,`︰-﹫`,`!-⦆¢-₩`,`𛀀-𛀁`,`🈀-🉑`,`𠀀-`,`]`].join(``),`gu`),o}e.NodeMixin=a})),o=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteDocument=void 0;var t=n();e.LiteDocument=function(){function e(){this.root=new t.LiteElement(`html`,{},[this.head=new t.LiteElement(`head`),this.body=new t.LiteElement(`body`)]),this.type=``}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#document`},enumerable:!1,configurable:!0}),e}()})),s=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.LiteComment=e.LiteText=void 0;var n=function(){function e(e){e===void 0&&(e=``),this.value=e}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#text`},enumerable:!1,configurable:!0}),e}();e.LiteText=n,e.LiteComment=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"kind",{get:function(){return`#comment`},enumerable:!1,configurable:!0}),n}(n)})),c=e((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteList=void 0,e.LiteList=function(){function e(e){this.nodes=[],this.nodes=n([],t(e),!1)}return e.prototype.append=function(e){this.nodes.push(e)},e.prototype[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.nodes.length?{value:null,done:!0}:{value:this.nodes[e++],done:!1}}}},e}()})),l=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retryAfter=e.handleRetriesFor=void 0;function t(e){return new Promise(function t(n,r){try{n(e())}catch(e){e.retry&&e.retry instanceof Promise?e.retry.then(function(){return t(n,r)}).catch(function(e){return r(e)}):e.restart&&e.restart.isCallback?MathJax.Callback.After(function(){return t(n,r)},e.restart):r(e)}})}e.handleRetriesFor=t;function n(e){var t=Error(`MathJax retry`);throw t.retry=e,t}e.retryAfter=n})),u=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION=`3.2.2`})),d=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PrioritizedList=void 0,e.PrioritizedList=function(){function e(){this.items=[],this.items=[]}return e.prototype[Symbol.iterator]=function(){var e=0,t=this.items;return{next:function(){return{value:t[e++],done:e>t.length}}}},e.prototype.add=function(t,n){n===void 0&&(n=e.DEFAULTPRIORITY);var r=this.items.length;do r--;while(r>=0&&n<this.items[r].priority);return this.items.splice(r+1,0,{item:t,priority:n}),t},e.prototype.remove=function(e){var t=this.items.length;do t--;while(t>=0&&this.items[t].item!==e);t>=0&&this.items.splice(t,1)},e.DEFAULTPRIORITY=5,e}()})),f=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.HandlerList=void 0,e.HandlerList=function(e){t(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.register=function(e){return this.add(e,e.priority)},r.prototype.unregister=function(e){this.remove(e)},r.prototype.handlesDocument=function(e){var t,r;try{for(var i=n(this),a=i.next();!a.done;a=i.next()){var o=a.value.item;if(o.handlesDocument(e))return o}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw Error(`Can't find handler for document`)},r.prototype.document=function(e,t){return t===void 0&&(t=null),this.handlesDocument(e).create(e,t)},r}(d().PrioritizedList)})),p=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mathjax=void 0;var t=u(),n=f(),r=l();e.mathjax={version:t.VERSION,handlers:new n.HandlerList,document:function(t,n){return e.mathjax.handlers.document(t,n)},handleRetriesFor:r.handleRetriesFor,retryAfter:r.retryAfter,asyncLoad:null}})),m=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asyncLoad=void 0;var t=p();function n(e){return t.mathjax.asyncLoad?new Promise(function(n,r){var i=t.mathjax.asyncLoad(e);i instanceof Promise?i.then(function(e){return n(e)}).catch(function(e){return r(e)}):n(i)}):Promise.reject(`Can't load '${e}': No asyncLoad method specified`)}e.asyncLoad=n})),h=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.numeric=e.translate=e.remove=e.add=e.entities=e.options=void 0;var t=l(),n=m();e.options={loadMissingEntities:!0},e.entities={ApplyFunction:``,Backslash:`∖`,Because:`∵`,Breve:`˘`,Cap:`⋒`,CenterDot:`·`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,Congruent:`≡`,ContourIntegral:`∮`,Coproduct:`∐`,Cross:`⨯`,Cup:`⋓`,CupCap:`≍`,Dagger:`‡`,Del:`∇`,Delta:`Δ`,Diamond:`⋄`,DifferentialD:`ⅆ`,DotEqual:`≐`,DoubleDot:`¨`,DoubleRightTee:`⊨`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownLeftVector:`↽`,DownRightVector:`⇁`,DownTee:`⊤`,Downarrow:`⇓`,Element:`∈`,EqualTilde:`≂`,Equilibrium:`⇌`,Exists:`∃`,ExponentialE:`ⅇ`,FilledVerySmallSquare:`▪`,ForAll:`∀`,Gamma:`Γ`,Gg:`⋙`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Hacek:`ˇ`,Hat:`^`,HumpDownHump:`≎`,HumpEqual:`≏`,Im:`ℑ`,ImaginaryI:`ⅈ`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:``,InvisibleTimes:``,Lambda:`Λ`,Larr:`↞`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDownVector:`⇃`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftTee:`⊣`,LeftTriangle:`⊲`,LeftTriangleEqual:`⊴`,LeftUpVector:`↿`,LeftVector:`↼`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessSlantEqual:`⩽`,LessTilde:`≲`,Ll:`⋘`,Lleftarrow:`⇚`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lsh:`↰`,MinusPlus:`∓`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotLeftTriangle:`⋪`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotPrecedes:`⊀`,NotPrecedesSlantEqual:`⋠`,NotRightTriangle:`⋫`,NotRightTriangleEqual:`⋭`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsSlantEqual:`⋡`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotVerticalBar:`∤`,Omega:`Ω`,OverBar:`‾`,OverBrace:`⏞`,PartialD:`∂`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Product:`∏`,Proportional:`∝`,Psi:`Ψ`,Rarr:`↠`,Re:`ℜ`,ReverseEquilibrium:`⇋`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDownVector:`⇂`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTriangle:`⊳`,RightTriangleEqual:`⊵`,RightUpVector:`↾`,RightVector:`⇀`,Rightarrow:`⇒`,Rrightarrow:`⇛`,Rsh:`↱`,Sigma:`Σ`,SmallCircle:`∘`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Star:`⋆`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,Therefore:`∴`,Theta:`Θ`,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,UnderBar:`_`,UnderBrace:`⏟`,Union:`⋃`,UnionPlus:`⊎`,UpArrow:`↑`,UpDownArrow:`↕`,UpTee:`⊥`,Uparrow:`⇑`,Updownarrow:`⇕`,Upsilon:`Υ`,Vdash:`⊩`,Vee:`⋁`,VerticalBar:`∣`,VerticalTilde:`≀`,Vvdash:`⊪`,Wedge:`⋀`,Xi:`Ξ`,amp:`&`,acute:`´`,aleph:`ℵ`,alpha:`α`,amalg:`⨿`,and:`∧`,ang:`∠`,angmsd:`∡`,angsph:`∢`,ape:`≊`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,beta:`β`,beth:`ℶ`,between:`≬`,bigcirc:`◯`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,blacklozenge:`⧫`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,bowtie:`⋈`,boxdl:`┐`,boxdr:`┌`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxul:`┘`,boxur:`└`,bsol:`\\`,bull:`•`,cap:`∩`,check:`✓`,chi:`χ`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,clubs:`♣`,colon:`:`,comp:`∁`,ctdot:`⋯`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cup:`∪`,curarr:`↷`,curlyvee:`⋎`,curlywedge:`⋏`,dagger:`†`,daleth:`ℸ`,ddarr:`⇊`,deg:`°`,delta:`δ`,digamma:`ϝ`,div:`÷`,divideontimes:`⋇`,dot:`˙`,doteqdot:`≑`,dotplus:`∔`,dotsquare:`⊡`,dtdot:`⋱`,ecir:`≖`,efDot:`≒`,egs:`⪖`,ell:`ℓ`,els:`⪕`,empty:`∅`,epsi:`ε`,epsiv:`ϵ`,erDot:`≓`,eta:`η`,eth:`ð`,flat:`♭`,fork:`⋔`,frown:`⌢`,gEl:`⪌`,gamma:`γ`,gap:`⪆`,gimel:`ℷ`,gnE:`≩`,gnap:`⪊`,gne:`⪈`,gnsim:`⋧`,gt:`>`,gtdot:`⋗`,harrw:`↭`,hbar:`ℏ`,hellip:`…`,hookleftarrow:`↩`,hookrightarrow:`↪`,imath:`ı`,infin:`∞`,intcal:`⊺`,iota:`ι`,jmath:`ȷ`,kappa:`κ`,kappav:`ϰ`,lEg:`⪋`,lambda:`λ`,lap:`⪅`,larrlp:`↫`,larrtl:`↢`,lbrace:`{`,lbrack:`[`,le:`≤`,leftleftarrows:`⇇`,leftthreetimes:`⋋`,lessdot:`⋖`,lmoust:`⎰`,lnE:`≨`,lnap:`⪉`,lne:`⪇`,lnsim:`⋦`,longmapsto:`⟼`,looparrowright:`↬`,lowast:`∗`,loz:`◊`,lt:`<`,ltimes:`⋉`,ltri:`◃`,macr:`¯`,malt:`✠`,mho:`℧`,mu:`μ`,multimap:`⊸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,natur:`♮`,nearr:`↗`,nharr:`↮`,nlarr:`↚`,not:`¬`,nrarr:`↛`,nu:`ν`,nvDash:`⊭`,nvdash:`⊬`,nwarr:`↖`,omega:`ω`,omicron:`ο`,or:`∨`,osol:`⊘`,period:`.`,phi:`φ`,phiv:`ϕ`,pi:`π`,piv:`ϖ`,prap:`⪷`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,prime:`′`,psi:`ψ`,quot:`"`,rarrtl:`↣`,rbrace:`}`,rbrack:`]`,rho:`ρ`,rhov:`ϱ`,rightrightarrows:`⇉`,rightthreetimes:`⋌`,ring:`˚`,rmoust:`⎱`,rtimes:`⋊`,rtri:`▹`,scap:`⪸`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,sdot:`⋅`,searr:`↘`,sect:`§`,sharp:`♯`,sigma:`σ`,sigmav:`ς`,simne:`≆`,smile:`⌣`,spades:`♠`,sub:`⊂`,subE:`⫅`,subnE:`⫋`,subne:`⊊`,supE:`⫆`,supnE:`⫌`,supne:`⊋`,swarr:`↙`,tau:`τ`,theta:`θ`,thetav:`ϑ`,tilde:`˜`,times:`×`,triangle:`▵`,triangleq:`≜`,upsi:`υ`,upuparrows:`⇈`,veebar:`⊻`,vellip:`⋮`,weierp:`℘`,xi:`ξ`,yen:`¥`,zeta:`ζ`,zigrarr:`⇝`,nbsp:`\xA0`,rsquo:`’`,lsquo:`‘`};var r={};function i(t,n){Object.assign(e.entities,t),r[n]=!0}e.add=i;function a(t){delete e.entities[t]}e.remove=a;function o(e){return e.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,s)}e.translate=o;function s(i,a){if(a.charAt(0)===`#`)return c(a.slice(1));if(e.entities[a])return e.entities[a];if(e.options.loadMissingEntities){var o=a.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:a.charAt(0).toLowerCase();r[o]||(r[o]=!0,(0,t.retryAfter)((0,n.asyncLoad)(`./util/entities/`+o+`.js`)))}return i}function c(e){var t=e.charAt(0)===`x`?parseInt(e.slice(1),16):parseInt(e);return String.fromCodePoint(t)}e.numeric=c})),g=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},o=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteParser=e.PATTERNS=void 0;var c=i(h()),l=n(),u=s(),d;(function(e){e.TAGNAME=`[a-z][^\\s\\n>]*`,e.ATTNAME=`[a-z][^\\s\\n>=]*`,e.VALUE=`(?:'[^']*'|"[^"]*"|[^\\s\\n]+)`,e.VALUESPLIT=`(?:'([^']*)'|"([^"]*)"|([^\\s\\n]+))`,e.SPACE=`(?:\\s|\\n)+`,e.OPTIONALSPACE=`(?:\\s|\\n)*`,e.ATTRIBUTE=e.ATTNAME+`(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUE+`)?`,e.ATTRIBUTESPLIT=`(`+e.ATTNAME+`)(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUESPLIT+`)?`,e.TAG=`(<(?:`+e.TAGNAME+`(?:`+e.SPACE+e.ATTRIBUTE+`)*`+e.OPTIONALSPACE+`/?|/`+e.TAGNAME+`|!--[^]*?--|![^]*?)(?:>|$))`,e.tag=new RegExp(e.TAG,`i`),e.attr=new RegExp(e.ATTRIBUTE,`i`),e.attrsplit=new RegExp(e.ATTRIBUTESPLIT,`i`)})(d=e.PATTERNS||={}),e.LiteParser=function(){function e(){}return e.prototype.parseFromString=function(e,t,n){t===void 0&&(t=`text/html`),n===void 0&&(n=null);for(var r=n.createDocument(),i=n.body(r),a=e.replace(/<\?.*?\?>/g,``).split(d.tag);a.length;){var o=a.shift(),s=a.shift();o&&this.addText(n,i,o),s&&s.charAt(s.length-1)===`>`&&(s.charAt(1)===`!`?this.addComment(n,i,s):i=s.charAt(1)===`/`?this.closeTag(n,i,s):this.openTag(n,i,s,a))}return this.checkDocument(n,r),r},e.prototype.addText=function(e,t,n){return n=c.translate(n),e.append(t,e.text(n))},e.prototype.addComment=function(e,t,n){return e.append(t,new u.LiteComment(n))},e.prototype.closeTag=function(e,t,n){for(var r=n.slice(2,n.length-1).toLowerCase();e.parent(t)&&e.kind(t)!==r;)t=e.parent(t);return e.parent(t)},e.prototype.openTag=function(e,t,n,r){var i=this.constructor.PCDATA,a=this.constructor.SELF_CLOSING,o=n.match(/<(.*?)[\s\n>\/]/)[1].toLowerCase(),s=e.node(o),c=n.replace(/^<.*?[\s\n>]/,``).split(d.attrsplit);return(c.pop().match(/>$/)||c.length<5)&&(this.addAttributes(e,s,c),e.append(t,s),!a[o]&&!n.match(/\/>$/)&&(i[o]?this.handlePCDATA(e,s,o,r):t=s)),t},e.prototype.addAttributes=function(e,t,n){for(var r=this.constructor.CDATA_ATTR;n.length;){var i=a(n.splice(0,5),5),o=i[1],s=i[2],l=i[3],u=i[4],d=s||l||u||``;r[o]||(d=c.translate(d)),e.setAttribute(t,o,d)}},e.prototype.handlePCDATA=function(e,t,n,r){for(var i=[],a=`</`+n+`>`,o=``;r.length&&o!==a;)i.push(o),i.push(r.shift()),o=r.shift();e.append(t,e.text(i.join(``)))},e.prototype.checkDocument=function(e,t){var n,r,i,a,s=this.getOnlyChild(e,e.body(t));if(s){try{for(var c=o(e.childNodes(e.body(t))),l=c.next();!l.done;l=c.next()){var d=l.value;if(d===s)break;d instanceof u.LiteComment&&d.value.match(/^<!DOCTYPE/)&&(t.type=d.value)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}switch(e.kind(s)){case`html`:try{for(var f=o(s.children),p=f.next();!p.done;p=f.next()){var d=p.value;switch(e.kind(d)){case`head`:t.head=d;break;case`body`:t.body=d;break}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}t.root=s,e.remove(s),e.parent(t.body)!==s&&e.append(s,t.body),e.parent(t.head)!==s&&e.insert(t.head,t.body);break;case`head`:t.head=e.replace(s,t.head);break;case`body`:t.body=e.replace(s,t.body);break}}},e.prototype.getOnlyChild=function(e,t){var n,r,i=null;try{for(var a=o(e.childNodes(t)),s=a.next();!s.done;s=a.next()){var c=s.value;if(c instanceof l.LiteElement){if(i)return null;i=c}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.serialize=function(e,t,n){var r=this;n===void 0&&(n=!1);var i=this.constructor.SELF_CLOSING,a=this.constructor.CDATA_ATTR,o=e.kind(t),s=e.allAttributes(t).map(function(e){return e.name+`="`+(a[e.name]?e.value:r.protectAttribute(e.value))+`"`}).join(` `),c=this.serializeInner(e,t,n);return`<`+o+(s?` `+s:``)+((!n||c)&&!i[o]?`>${c}</${o}>`:n?`/>`:`>`)},e.prototype.serializeInner=function(e,t,n){var r=this;return n===void 0&&(n=!1),this.constructor.PCDATA.hasOwnProperty(t.kind)?e.childNodes(t).map(function(t){return e.value(t)}).join(``):e.childNodes(t).map(function(t){var i=e.kind(t);return i===`#text`?r.protectHTML(e.value(t)):i===`#comment`?t.value:r.serialize(e,t,n)}).join(``)},e.prototype.protectAttribute=function(e){return typeof e!=`string`&&(e=String(e)),e.replace(/"/g,`"`)},e.prototype.protectHTML=function(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)},e.SELF_CLOSING={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},e.PCDATA={option:!0,textarea:!0,fieldset:!0,title:!0,style:!0,script:!0},e.CDATA_ATTR={style:!0,datafld:!0,datasrc:!0,href:!0,src:!0,longdesc:!0,usemap:!0,cite:!0,datetime:!0,action:!0,axis:!0,profile:!0,content:!0,scheme:!0},e}()})),_=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteWindow=void 0;var t=n(),r=o(),i=c(),a=g();e.LiteWindow=function(){function e(){this.DOMParser=a.LiteParser,this.NodeList=i.LiteList,this.HTMLCollection=i.LiteList,this.HTMLElement=t.LiteElement,this.DocumentFragment=i.LiteList,this.Document=r.LiteDocument,this.document=new r.LiteDocument}return e}()})),v=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.Styles=void 0;var i=[`top`,`right`,`bottom`,`left`],a=[`width`,`style`,`color`];function o(e){for(var t=e.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),n=[];t.length>1;)t.shift(),n.push(t.shift());return n}function s(e){var n,r,i=o(this.styles[e]);i.length===0&&i.push(``),i.length===1&&i.push(i[0]),i.length===2&&i.push(i[0]),i.length===3&&i.push(i[1]);try{for(var a=t(v.connect[e].children),s=a.next();!s.done;s=a.next()){var c=s.value;this.setStyle(this.childName(e,c),i.shift())}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function c(e){var n,r,i=v.connect[e].children,a=[];try{for(var o=t(i),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.styles[e+`-`+c];if(!l){delete this.styles[e];return}a.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}a[3]===a[1]&&(a.pop(),a[2]===a[0]&&(a.pop(),a[1]===a[0]&&a.pop())),this.styles[e]=a.join(` `)}function l(e){var n,r;try{for(var i=t(v.connect[e].children),a=i.next();!a.done;a=i.next()){var o=a.value;this.setStyle(this.childName(e,o),this.styles[e])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function u(e){var i,a,o=r([],n(v.connect[e].children),!1),s=this.styles[this.childName(e,o.shift())];try{for(var c=t(o),l=c.next();!l.done;l=c.next()){var u=l.value;if(this.styles[this.childName(e,u)]!==s){delete this.styles[e];return}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}this.styles[e]=s}var d={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function f(e){var n,r,i,a,s={width:``,style:``,color:``};try{for(var c=t(o(this.styles[e])),l=c.next();!l.done;l=c.next()){var u=l.value;u.match(d.width)&&s.width===``?s.width=u:u.match(d.style)&&s.style===``?s.style=u:s.color=u}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var f=t(v.connect[e].children),p=f.next();!p.done;p=f.next()){var m=p.value;this.setStyle(this.childName(e,m),s[m])}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}function p(e){var n,r,i=[];try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.styles[this.childName(e,s)];c&&i.push(c)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}i.length?this.styles[e]=i.join(` `):delete this.styles[e]}var m={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:RegExp(`^(?:`+[`normal|none`,`inherit|initial|unset`,`common-ligatures|no-common-ligatures`,`discretionary-ligatures|no-discretionary-ligatures`,`historical-ligatures|no-historical-ligatures`,`contextual|no-contextual`,`(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)`,`small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps`,`lining-nums|oldstyle-nums|proportional-nums|tabular-nums`,`diagonal-fractions|stacked-fractions`,`ordinal|slashed-zero`,`jis78|jis83|jis90|jis04|simplified|traditional`,`full-width|proportional-width`,`ruby`].join(`|`)+`)$`),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:RegExp(`^(?:`+[`normal`,`(?:(?:ultra|extra|semi)-)?condensed`,`(?:(?:semi|extra|ulta)-)?expanded`,`inherit|initial|unset`].join(`|`)+`)$`),size:RegExp(`^(?:`+[`xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller`,`[d.]+%|[d.]+[a-z]+`,`inherit|initial|unset`].join(`|`)+`)(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$`)};function h(e){var r,i,a,s,c=o(this.styles[e]),l={style:``,variant:[],weight:``,stretch:``,size:``,family:``,"line-height":``};try{for(var u=t(c),d=u.next();!d.done;d=u.next()){var f=d.value;l.family=f;try{for(var p=(a=void 0,t(Object.keys(m))),h=p.next();!h.done;h=p.next()){var _=h.value;if((Array.isArray(l[_])||l[_]===``)&&f.match(m[_]))if(_===`size`){var v=n(f.split(/\//),2),y=v[0],b=v[1];l[_]=y,b&&(l[`line-height`]=b)}else l.size===``&&(Array.isArray(l[_])?l[_].push(f):l[_]=f)}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}g(e,l),delete this.styles[e]}function g(e,n){var r,i;try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.childName(e,s);if(Array.isArray(n[s])){var l=n[s];l.length&&(this.styles[c]=l.join(` `))}else n[s]!==``&&(this.styles[c]=n[s])}}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function _(e){}var v=function(){function e(e){e===void 0&&(e=``),this.parse(e)}return Object.defineProperty(e.prototype,"cssText",{get:function(){var e,n,r=[];try{for(var i=t(Object.keys(this.styles)),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.parentName(o);this.styles[s]||r.push(o+`: `+this.styles[o]+`;`)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.join(` `)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,n){for(t=this.normalizeName(t),this.setStyle(t,n),e.connect[t]&&!e.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/)&&(t=this.parentName(t),e.connect[t]);)e.connect[t].combine.call(this,t)},e.prototype.get=function(e){return e=this.normalizeName(e),this.styles.hasOwnProperty(e)?this.styles[e]:``},e.prototype.setStyle=function(t,n){this.styles[t]=n,e.connect[t]&&e.connect[t].children&&e.connect[t].split.call(this,t),n===``&&delete this.styles[t]},e.prototype.combineChildren=function(n){var r,i,a=this.parentName(n);try{for(var o=t(e.connect[n].children),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.childName(a,c);e.connect[l].combine.call(this,l)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.parentName=function(e){var t=e.replace(/-[^-]*$/,``);return e===t?``:t},e.prototype.childName=function(t,n){return n.match(/-/)?n:(e.connect[t]&&!e.connect[t].combine&&(n+=t.replace(/.*-/,`-`),t=this.parentName(t)),t+`-`+n)},e.prototype.normalizeName=function(e){return e.replace(/[A-Z]/g,function(e){return`-`+e.toLowerCase()})},e.prototype.parse=function(e){e===void 0&&(e=``);var t=this.constructor.pattern;this.styles={};for(var r=e.replace(t.comment,``).split(t.style);r.length>1;){var i=n(r.splice(0,3),3),a=i[0],o=i[1],s=i[2];if(a.match(/[^\s\n]/))return;this.set(o,s)}},e.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},e.connect={padding:{children:i,split:s,combine:c},border:{children:i,split:l,combine:u},"border-top":{children:a,split:f,combine:p},"border-right":{children:a,split:f,combine:p},"border-bottom":{children:a,split:f,combine:p},"border-left":{children:a,split:f,combine:p},"border-width":{children:i,split:s,combine:null},"border-style":{children:i,split:s,combine:null},"border-color":{children:i,split:s,combine:null},font:{children:[`style`,`variant`,`weight`,`stretch`,`line-height`,`size`,`family`],split:h,combine:_}},e}();e.Styles=v})),y=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},c=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},l=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},u=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.liteAdaptor=e.LiteAdaptor=e.LiteBase=void 0;var d=r(),f=a(),p=o(),m=n(),h=s(),y=_(),b=g(),x=v(),S=function(e){t(n,e);function n(){var t=e.call(this)||this;return t.parser=new b.LiteParser,t.window=new y.LiteWindow,t}return n.prototype.parse=function(e,t){return this.parser.parseFromString(e,t,this)},n.prototype.create=function(e,t){return t===void 0&&(t=null),new m.LiteElement(e)},n.prototype.text=function(e){return new h.LiteText(e)},n.prototype.comment=function(e){return new h.LiteComment(e)},n.prototype.createDocument=function(){return new p.LiteDocument},n.prototype.head=function(e){return e.head},n.prototype.body=function(e){return e.body},n.prototype.root=function(e){return e.root},n.prototype.doctype=function(e){return e.type},n.prototype.tags=function(e,t,n){n===void 0&&(n=null);var r=[],i=[];if(n)return i;for(var a=e;a;){var o=a.kind;o!==`#text`&&o!==`#comment`&&(a=a,o===t&&i.push(a),a.children.length&&(r=a.children.concat(r))),a=r.shift()}return i},n.prototype.elementById=function(e,t){for(var n=[],r=e;r;){if(r.kind!==`#text`&&r.kind!==`#comment`){if(r=r,r.attributes.id===t)return r;r.children.length&&(n=r.children.concat(n))}r=n.shift()}return null},n.prototype.elementsByClass=function(e,t){for(var n=[],r=[],i=e;i;)i.kind!==`#text`&&i.kind!==`#comment`&&(i=i,(i.attributes.class||``).trim().split(/ +/).includes(t)&&r.push(i),i.children.length&&(n=i.children.concat(n))),i=n.shift();return r},n.prototype.getElements=function(e,t){var n,r,i=[],a=this.body(t);try{for(var o=c(e),s=o.next();!s.done;s=o.next()){var l=s.value;if(typeof l==`string`)if(l.charAt(0)===`#`){var u=this.elementById(a,l.slice(1));u&&i.push(u)}else l.charAt(0)===`.`?i=i.concat(this.elementsByClass(a,l.slice(1))):l.match(/^[-a-z][-a-z0-9]*$/i)&&(i=i.concat(this.tags(a,l)));else Array.isArray(l)?i=i.concat(l):l instanceof this.window.NodeList||l instanceof this.window.HTMLCollection?i=i.concat(l.nodes):i.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},n.prototype.contains=function(e,t){for(;t&&t!==e;)t=this.parent(t);return!!t},n.prototype.parent=function(e){return e.parent},n.prototype.childIndex=function(e){return e.parent?e.parent.children.findIndex(function(t){return t===e}):-1},n.prototype.append=function(e,t){return t.parent&&this.remove(t),e.children.push(t),t.parent=e,t},n.prototype.insert=function(e,t){if(e.parent&&this.remove(e),t&&t.parent){var n=this.childIndex(t);t.parent.children.splice(n,0,e),e.parent=t.parent}},n.prototype.remove=function(e){var t=this.childIndex(e);return t>=0&&e.parent.children.splice(t,1),e.parent=null,e},n.prototype.replace=function(e,t){var n=this.childIndex(t);return n>=0&&(t.parent.children[n]=e,e.parent=t.parent,t.parent=null),t},n.prototype.clone=function(e){var t=this,n=new m.LiteElement(e.kind);return n.attributes=i({},e.attributes),n.children=e.children.map(function(e){if(e.kind===`#text`)return new h.LiteText(e.value);if(e.kind===`#comment`)return new h.LiteComment(e.value);var r=t.clone(e);return r.parent=n,r}),n},n.prototype.split=function(e,t){var n=new h.LiteText(e.value.slice(t));return e.value=e.value.slice(0,t),e.parent.children.splice(this.childIndex(e)+1,0,n),n.parent=e.parent,n},n.prototype.next=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)+1;return n>=0&&n<t.children.length?t.children[n]:null},n.prototype.previous=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)-1;return n>=0?t.children[n]:null},n.prototype.firstChild=function(e){return e.children[0]},n.prototype.lastChild=function(e){return e.children[e.children.length-1]},n.prototype.childNodes=function(e){return u([],l(e.children),!1)},n.prototype.childNode=function(e,t){return e.children[t]},n.prototype.kind=function(e){return e.kind},n.prototype.value=function(e){return e.kind===`#text`?e.value:e.kind===`#comment`?e.value.replace(/^<!(--)?((?:.|\n)*)\1>$/,`$2`):``},n.prototype.textContent=function(e){var t=this;return e.children.reduce(function(e,n){return e+(n.kind===`#text`?n.value:n.kind===`#comment`?``:t.textContent(n))},``)},n.prototype.innerHTML=function(e){return this.parser.serializeInner(this,e)},n.prototype.outerHTML=function(e){return this.parser.serialize(this,e)},n.prototype.serializeXML=function(e){return this.parser.serialize(this,e,!0)},n.prototype.setAttribute=function(e,t,n,r){r===void 0&&(r=null),typeof n!=`string`&&(n=String(n)),r&&(t=r.replace(/.*\//,``)+`:`+t.replace(/^.*:/,``)),e.attributes[t]=n,t===`style`&&(e.styles=null)},n.prototype.getAttribute=function(e,t){return e.attributes[t]},n.prototype.removeAttribute=function(e,t){delete e.attributes[t]},n.prototype.hasAttribute=function(e,t){return e.attributes.hasOwnProperty(t)},n.prototype.allAttributes=function(e){var t,n,r=e.attributes,i=[];try{for(var a=c(Object.keys(r)),o=a.next();!o.done;o=a.next()){var s=o.value;i.push({name:s,value:r[s]})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},n.prototype.addClass=function(e,t){var n=(e.attributes.class||``).split(/ /);n.find(function(e){return e===t})||(n.push(t),e.attributes.class=n.join(` `))},n.prototype.removeClass=function(e,t){var n=(e.attributes.class||``).split(/ /),r=n.findIndex(function(e){return e===t});r>=0&&(n.splice(r,1),e.attributes.class=n.join(` `))},n.prototype.hasClass=function(e,t){return!!(e.attributes.class||``).split(/ /).find(function(e){return e===t})},n.prototype.setStyle=function(e,t,n){e.styles||=new x.Styles(this.getAttribute(e,`style`)),e.styles.set(t,n),e.attributes.style=e.styles.cssText},n.prototype.getStyle=function(e,t){if(!e.styles){var n=this.getAttribute(e,`style`);if(!n)return``;e.styles=new x.Styles(n)}return e.styles.get(t)},n.prototype.allStyles=function(e){return this.getAttribute(e,`style`)},n.prototype.insertRules=function(e,t){e.children=[this.text(t.join(`
|
|
1
|
+
import{l as e,n as t}from"./index-sujNbkL3.js";var n=e((e=>{var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))},i=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteElement=void 0,e.LiteElement=function(){function e(e,a,o){var s,c;a===void 0&&(a={}),o===void 0&&(o=[]),this.kind=e,this.attributes=t({},a),this.children=r([],n(o),!1);try{for(var l=i(this.children),u=l.next();!u.done;u=l.next()){var d=u.value;d.parent=this}}catch(e){s={error:e}}finally{try{u&&!u.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}this.styles=null}return e}()})),r=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDOMAdaptor=void 0,e.AbstractDOMAdaptor=function(){function e(e){e===void 0&&(e=null),this.document=e}return e.prototype.node=function(e,n,r,i){var a,o;n===void 0&&(n={}),r===void 0&&(r=[]);var s=this.create(e,i);this.setAttributes(s,n);try{for(var c=t(r),l=c.next();!l.done;l=c.next()){var u=l.value;this.append(s,u)}}catch(e){a={error:e}}finally{try{l&&!l.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}return s},e.prototype.setAttributes=function(e,n){var r,i,a,o,s,c;if(n.style&&typeof n.style!=`string`)try{for(var l=t(Object.keys(n.style)),u=l.next();!u.done;u=l.next()){var d=u.value;this.setStyle(e,d.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}),n.style[d])}}catch(e){r={error:e}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}if(n.properties)try{for(var f=t(Object.keys(n.properties)),p=f.next();!p.done;p=f.next()){var d=p.value;e[d]=n.properties[d]}}catch(e){a={error:e}}finally{try{p&&!p.done&&(o=f.return)&&o.call(f)}finally{if(a)throw a.error}}try{for(var m=t(Object.keys(n)),h=m.next();!h.done;h=m.next()){var d=h.value;(d!==`style`||typeof n.style==`string`)&&d!==`properties`&&this.setAttribute(e,d,n[d])}}catch(e){s={error:e}}finally{try{h&&!h.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}},e.prototype.replace=function(e,t){return this.insert(e,t),this.remove(t),t},e.prototype.childNode=function(e,t){return this.childNodes(e)[t]},e.prototype.allClasses=function(e){var t=this.getAttribute(e,`class`);return t?t.replace(/ +/g,` `).replace(/^ /,``).replace(/ $/,``).split(/ /):[]},e}()})),i=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.lookup=e.separateOptions=e.selectOptionsFromKeys=e.selectOptions=e.userOptions=e.defaultOptions=e.insert=e.copy=e.keys=e.makeArray=e.expandable=e.Expandable=e.OPTIONS=e.REMOVE=e.APPEND=e.isObject=void 0;var i={}.constructor;function a(e){return typeof e==`object`&&!!e&&(e.constructor===i||e.constructor===o)}e.isObject=a,e.APPEND=`[+]`,e.REMOVE=`[-]`,e.OPTIONS={invalidOption:`warn`,optionError:function(t,n){if(e.OPTIONS.invalidOption===`fatal`)throw Error(t);console.warn(`MathJax: `+t)}};var o=function(){function e(){}return e}();e.Expandable=o;function s(e){return Object.assign(Object.create(o.prototype),e)}e.expandable=s;function c(e){return Array.isArray(e)?e:[e]}e.makeArray=c;function l(e){return e?Object.keys(e).concat(Object.getOwnPropertySymbols(e)):[]}e.keys=l;function u(e){var n,r,i={};try{for(var c=t(l(e)),f=c.next();!f.done;f=c.next()){var p=f.value,m=Object.getOwnPropertyDescriptor(e,p),h=m.value;Array.isArray(h)?m.value=d([],h,!1):a(h)&&(m.value=u(h)),m.enumerable&&(i[p]=m)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return Object.defineProperties(e.constructor===o?s({}):{},i)}e.copy=u;function d(i,s,c){var f,p;c===void 0&&(c=!0);var m=function(t){if(c&&i[t]===void 0&&i.constructor!==o)return typeof t==`symbol`&&(t=t.toString()),e.OPTIONS.optionError(`Invalid option "${t}" (no default value).`,t),`continue`;var f=s[t],p=i[t];if(a(f)&&p!==null&&(typeof p==`object`||typeof p==`function`)){var m=l(f);Array.isArray(p)&&(m.length===1&&(m[0]===e.APPEND||m[0]===e.REMOVE)&&Array.isArray(f[m[0]])||m.length===2&&m.sort().join(`,`)===e.APPEND+`,`+e.REMOVE&&Array.isArray(f[e.APPEND])&&Array.isArray(f[e.REMOVE]))?(f[e.REMOVE]&&(p=i[t]=p.filter(function(t){return f[e.REMOVE].indexOf(t)<0})),f[e.APPEND]&&(i[t]=r(r([],n(p),!1),n(f[e.APPEND]),!1))):d(p,f,c)}else Array.isArray(f)?(i[t]=[],d(i[t],f,!1)):a(f)?i[t]=u(f):i[t]=f};try{for(var h=t(l(s)),g=h.next();!g.done;g=h.next()){var _=g.value;m(_)}}catch(e){f={error:e}}finally{try{g&&!g.done&&(p=h.return)&&p.call(h)}finally{if(f)throw f.error}}return i}e.insert=d;function f(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!1)}),e}e.defaultOptions=f;function p(e){return[...arguments].slice(1).forEach(function(t){return d(e,t,!0)}),e}e.userOptions=p;function m(e){for(var n,r,i=[],a=1;a<arguments.length;a++)i[a-1]=arguments[a];var o={};try{for(var s=t(i),c=s.next();!c.done;c=s.next()){var l=c.value;e.hasOwnProperty(l)&&(o[l]=e[l])}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}e.selectOptions=m;function h(e,t){return m.apply(void 0,r([e],n(Object.keys(t)),!1))}e.selectOptionsFromKeys=h;function g(e){for(var n,r,i,a,o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];var c=[];try{for(var l=t(o),u=l.next();!u.done;u=l.next()){var d=u.value,f={},p={};try{for(var m=(i=void 0,t(Object.keys(e||{}))),h=m.next();!h.done;h=m.next()){var g=h.value;(d[g]===void 0?p:f)[g]=e[g]}}catch(e){i={error:e}}finally{try{h&&!h.done&&(a=m.return)&&a.call(m)}finally{if(i)throw i.error}}c.push(f),e=p}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return c.unshift(e),c}e.separateOptions=g;function _(e,t,n){return n===void 0&&(n=null),t.hasOwnProperty(e)?t[e]:n}e.lookup=_})),a=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.NodeMixin=e.NodeMixinOptions=void 0;var r=i();e.NodeMixinOptions={badCSS:!0,badSizes:!0};function a(i,a){var o;return a===void 0&&(a={}),a=(0,r.userOptions)((0,r.defaultOptions)({},e.NodeMixinOptions),a),o=function(e){t(n,e);function n(){var t=[...arguments],n=e.call(this,t[0])||this,i=n.constructor;return n.options=(0,r.userOptions)((0,r.defaultOptions)({},i.OPTIONS),t[1]),n}return n.prototype.fontSize=function(t){return a.badCSS?this.options.fontSize:e.prototype.fontSize.call(this,t)},n.prototype.fontFamily=function(t){return a.badCSS?this.options.fontFamily:e.prototype.fontFamily.call(this,t)},n.prototype.nodeSize=function(t,r,i){if(r===void 0&&(r=1),i===void 0&&(i=null),!a.badSizes)return e.prototype.nodeSize.call(this,t,r,i);var o=this.textContent(t),s=Array.from(o.replace(n.cjkPattern,``)).length;return[(Array.from(o).length-s)*this.options.cjkCharWidth+s*this.options.unknownCharWidth,this.options.unknownCharHeight]},n.prototype.nodeBBox=function(t){return a.badSizes?{left:0,right:0,top:0,bottom:0}:e.prototype.nodeBBox.call(this,t)},n}(i),o.OPTIONS=n(n({},a.badCSS?{fontSize:16,fontFamily:`Times`}:{}),a.badSizes?{cjkCharWidth:1,unknownCharWidth:.6,unknownCharHeight:.8}:{}),o.cjkPattern=new RegExp([`[`,`ᄀ-ᅟ`,`〈〉`,`⺀-〾`,`-㉇`,`㉐-䶿`,`一-꓆`,`ꥠ-ꥼ`,`가-힣`,`豈-`,`︐-︙`,`︰-﹫`,`!-⦆¢-₩`,`𛀀-𛀁`,`🈀-🉑`,`𠀀-`,`]`].join(``),`gu`),o}e.NodeMixin=a})),o=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteDocument=void 0;var t=n();e.LiteDocument=function(){function e(){this.root=new t.LiteElement(`html`,{},[this.head=new t.LiteElement(`head`),this.body=new t.LiteElement(`body`)]),this.type=``}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#document`},enumerable:!1,configurable:!0}),e}()})),s=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.LiteComment=e.LiteText=void 0;var n=function(){function e(e){e===void 0&&(e=``),this.value=e}return Object.defineProperty(e.prototype,"kind",{get:function(){return`#text`},enumerable:!1,configurable:!0}),e}();e.LiteText=n,e.LiteComment=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"kind",{get:function(){return`#comment`},enumerable:!1,configurable:!0}),n}(n)})),c=e((e=>{var t=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},n=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteList=void 0,e.LiteList=function(){function e(e){this.nodes=[],this.nodes=n([],t(e),!1)}return e.prototype.append=function(e){this.nodes.push(e)},e.prototype[Symbol.iterator]=function(){var e=0;return{next:function(){return e===this.nodes.length?{value:null,done:!0}:{value:this.nodes[e++],done:!1}}}},e}()})),l=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.retryAfter=e.handleRetriesFor=void 0;function t(e){return new Promise(function t(n,r){try{n(e())}catch(e){e.retry&&e.retry instanceof Promise?e.retry.then(function(){return t(n,r)}).catch(function(e){return r(e)}):e.restart&&e.restart.isCallback?MathJax.Callback.After(function(){return t(n,r)},e.restart):r(e)}})}e.handleRetriesFor=t;function n(e){var t=Error(`MathJax retry`);throw t.retry=e,t}e.retryAfter=n})),u=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION=`3.2.2`})),d=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PrioritizedList=void 0,e.PrioritizedList=function(){function e(){this.items=[],this.items=[]}return e.prototype[Symbol.iterator]=function(){var e=0,t=this.items;return{next:function(){return{value:t[e++],done:e>t.length}}}},e.prototype.add=function(t,n){n===void 0&&(n=e.DEFAULTPRIORITY);var r=this.items.length;do r--;while(r>=0&&n<this.items[r].priority);return this.items.splice(r+1,0,{item:t,priority:n}),t},e.prototype.remove=function(e){var t=this.items.length;do t--;while(t>=0&&this.items[t].item!==e);t>=0&&this.items.splice(t,1)},e.DEFAULTPRIORITY=5,e}()})),f=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),n=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.HandlerList=void 0,e.HandlerList=function(e){t(r,e);function r(){return e!==null&&e.apply(this,arguments)||this}return r.prototype.register=function(e){return this.add(e,e.priority)},r.prototype.unregister=function(e){this.remove(e)},r.prototype.handlesDocument=function(e){var t,r;try{for(var i=n(this),a=i.next();!a.done;a=i.next()){var o=a.value.item;if(o.handlesDocument(e))return o}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}throw Error(`Can't find handler for document`)},r.prototype.document=function(e,t){return t===void 0&&(t=null),this.handlesDocument(e).create(e,t)},r}(d().PrioritizedList)})),p=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.mathjax=void 0;var t=u(),n=f(),r=l();e.mathjax={version:t.VERSION,handlers:new n.HandlerList,document:function(t,n){return e.mathjax.handlers.document(t,n)},handleRetriesFor:r.handleRetriesFor,retryAfter:r.retryAfter,asyncLoad:null}})),m=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.asyncLoad=void 0;var t=p();function n(e){return t.mathjax.asyncLoad?new Promise(function(n,r){var i=t.mathjax.asyncLoad(e);i instanceof Promise?i.then(function(e){return n(e)}).catch(function(e){return r(e)}):n(i)}):Promise.reject(`Can't load '${e}': No asyncLoad method specified`)}e.asyncLoad=n})),h=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.numeric=e.translate=e.remove=e.add=e.entities=e.options=void 0;var t=l(),n=m();e.options={loadMissingEntities:!0},e.entities={ApplyFunction:``,Backslash:`∖`,Because:`∵`,Breve:`˘`,Cap:`⋒`,CenterDot:`·`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,Congruent:`≡`,ContourIntegral:`∮`,Coproduct:`∐`,Cross:`⨯`,Cup:`⋓`,CupCap:`≍`,Dagger:`‡`,Del:`∇`,Delta:`Δ`,Diamond:`⋄`,DifferentialD:`ⅆ`,DotEqual:`≐`,DoubleDot:`¨`,DoubleRightTee:`⊨`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownLeftVector:`↽`,DownRightVector:`⇁`,DownTee:`⊤`,Downarrow:`⇓`,Element:`∈`,EqualTilde:`≂`,Equilibrium:`⇌`,Exists:`∃`,ExponentialE:`ⅇ`,FilledVerySmallSquare:`▪`,ForAll:`∀`,Gamma:`Γ`,Gg:`⋙`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Hacek:`ˇ`,Hat:`^`,HumpDownHump:`≎`,HumpEqual:`≏`,Im:`ℑ`,ImaginaryI:`ⅈ`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:``,InvisibleTimes:``,Lambda:`Λ`,Larr:`↞`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDownVector:`⇃`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftTee:`⊣`,LeftTriangle:`⊲`,LeftTriangleEqual:`⊴`,LeftUpVector:`↿`,LeftVector:`↼`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessSlantEqual:`⩽`,LessTilde:`≲`,Ll:`⋘`,Lleftarrow:`⇚`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lsh:`↰`,MinusPlus:`∓`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotLeftTriangle:`⋪`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotPrecedes:`⊀`,NotPrecedesSlantEqual:`⋠`,NotRightTriangle:`⋫`,NotRightTriangleEqual:`⋭`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsSlantEqual:`⋡`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotVerticalBar:`∤`,Omega:`Ω`,OverBar:`‾`,OverBrace:`⏞`,PartialD:`∂`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Product:`∏`,Proportional:`∝`,Psi:`Ψ`,Rarr:`↠`,Re:`ℜ`,ReverseEquilibrium:`⇋`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDownVector:`⇂`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTriangle:`⊳`,RightTriangleEqual:`⊵`,RightUpVector:`↾`,RightVector:`⇀`,Rightarrow:`⇒`,Rrightarrow:`⇛`,Rsh:`↱`,Sigma:`Σ`,SmallCircle:`∘`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Star:`⋆`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,Therefore:`∴`,Theta:`Θ`,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,UnderBar:`_`,UnderBrace:`⏟`,Union:`⋃`,UnionPlus:`⊎`,UpArrow:`↑`,UpDownArrow:`↕`,UpTee:`⊥`,Uparrow:`⇑`,Updownarrow:`⇕`,Upsilon:`Υ`,Vdash:`⊩`,Vee:`⋁`,VerticalBar:`∣`,VerticalTilde:`≀`,Vvdash:`⊪`,Wedge:`⋀`,Xi:`Ξ`,amp:`&`,acute:`´`,aleph:`ℵ`,alpha:`α`,amalg:`⨿`,and:`∧`,ang:`∠`,angmsd:`∡`,angsph:`∢`,ape:`≊`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,beta:`β`,beth:`ℶ`,between:`≬`,bigcirc:`◯`,bigodot:`⨀`,bigoplus:`⨁`,bigotimes:`⨂`,bigsqcup:`⨆`,bigstar:`★`,bigtriangledown:`▽`,bigtriangleup:`△`,biguplus:`⨄`,blacklozenge:`⧫`,blacktriangle:`▴`,blacktriangledown:`▾`,blacktriangleleft:`◂`,bowtie:`⋈`,boxdl:`┐`,boxdr:`┌`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxul:`┘`,boxur:`└`,bsol:`\\`,bull:`•`,cap:`∩`,check:`✓`,chi:`χ`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,clubs:`♣`,colon:`:`,comp:`∁`,ctdot:`⋯`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cup:`∪`,curarr:`↷`,curlyvee:`⋎`,curlywedge:`⋏`,dagger:`†`,daleth:`ℸ`,ddarr:`⇊`,deg:`°`,delta:`δ`,digamma:`ϝ`,div:`÷`,divideontimes:`⋇`,dot:`˙`,doteqdot:`≑`,dotplus:`∔`,dotsquare:`⊡`,dtdot:`⋱`,ecir:`≖`,efDot:`≒`,egs:`⪖`,ell:`ℓ`,els:`⪕`,empty:`∅`,epsi:`ε`,epsiv:`ϵ`,erDot:`≓`,eta:`η`,eth:`ð`,flat:`♭`,fork:`⋔`,frown:`⌢`,gEl:`⪌`,gamma:`γ`,gap:`⪆`,gimel:`ℷ`,gnE:`≩`,gnap:`⪊`,gne:`⪈`,gnsim:`⋧`,gt:`>`,gtdot:`⋗`,harrw:`↭`,hbar:`ℏ`,hellip:`…`,hookleftarrow:`↩`,hookrightarrow:`↪`,imath:`ı`,infin:`∞`,intcal:`⊺`,iota:`ι`,jmath:`ȷ`,kappa:`κ`,kappav:`ϰ`,lEg:`⪋`,lambda:`λ`,lap:`⪅`,larrlp:`↫`,larrtl:`↢`,lbrace:`{`,lbrack:`[`,le:`≤`,leftleftarrows:`⇇`,leftthreetimes:`⋋`,lessdot:`⋖`,lmoust:`⎰`,lnE:`≨`,lnap:`⪉`,lne:`⪇`,lnsim:`⋦`,longmapsto:`⟼`,looparrowright:`↬`,lowast:`∗`,loz:`◊`,lt:`<`,ltimes:`⋉`,ltri:`◃`,macr:`¯`,malt:`✠`,mho:`℧`,mu:`μ`,multimap:`⊸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,natur:`♮`,nearr:`↗`,nharr:`↮`,nlarr:`↚`,not:`¬`,nrarr:`↛`,nu:`ν`,nvDash:`⊭`,nvdash:`⊬`,nwarr:`↖`,omega:`ω`,omicron:`ο`,or:`∨`,osol:`⊘`,period:`.`,phi:`φ`,phiv:`ϕ`,pi:`π`,piv:`ϖ`,prap:`⪷`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,prime:`′`,psi:`ψ`,quot:`"`,rarrtl:`↣`,rbrace:`}`,rbrack:`]`,rho:`ρ`,rhov:`ϱ`,rightrightarrows:`⇉`,rightthreetimes:`⋌`,ring:`˚`,rmoust:`⎱`,rtimes:`⋊`,rtri:`▹`,scap:`⪸`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,sdot:`⋅`,searr:`↘`,sect:`§`,sharp:`♯`,sigma:`σ`,sigmav:`ς`,simne:`≆`,smile:`⌣`,spades:`♠`,sub:`⊂`,subE:`⫅`,subnE:`⫋`,subne:`⊊`,supE:`⫆`,supnE:`⫌`,supne:`⊋`,swarr:`↙`,tau:`τ`,theta:`θ`,thetav:`ϑ`,tilde:`˜`,times:`×`,triangle:`▵`,triangleq:`≜`,upsi:`υ`,upuparrows:`⇈`,veebar:`⊻`,vellip:`⋮`,weierp:`℘`,xi:`ξ`,yen:`¥`,zeta:`ζ`,zigrarr:`⇝`,nbsp:`\xA0`,rsquo:`’`,lsquo:`‘`};var r={};function i(t,n){Object.assign(e.entities,t),r[n]=!0}e.add=i;function a(t){delete e.entities[t]}e.remove=a;function o(e){return e.replace(/&([a-z][a-z0-9]*|#(?:[0-9]+|x[0-9a-f]+));/gi,s)}e.translate=o;function s(i,a){if(a.charAt(0)===`#`)return c(a.slice(1));if(e.entities[a])return e.entities[a];if(e.options.loadMissingEntities){var o=a.match(/^[a-zA-Z](fr|scr|opf)$/)?RegExp.$1:a.charAt(0).toLowerCase();r[o]||(r[o]=!0,(0,t.retryAfter)((0,n.asyncLoad)(`./util/entities/`+o+`.js`)))}return i}function c(e){var t=e.charAt(0)===`x`?parseInt(e.slice(1),16):parseInt(e);return String.fromCodePoint(t)}e.numeric=c})),g=e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},o=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)};Object.defineProperty(e,"__esModule",{value:!0}),e.LiteParser=e.PATTERNS=void 0;var c=i(h()),l=n(),u=s(),d;(function(e){e.TAGNAME=`[a-z][^\\s\\n>]*`,e.ATTNAME=`[a-z][^\\s\\n>=]*`,e.VALUE=`(?:'[^']*'|"[^"]*"|[^\\s\\n]+)`,e.VALUESPLIT=`(?:'([^']*)'|"([^"]*)"|([^\\s\\n]+))`,e.SPACE=`(?:\\s|\\n)+`,e.OPTIONALSPACE=`(?:\\s|\\n)*`,e.ATTRIBUTE=e.ATTNAME+`(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUE+`)?`,e.ATTRIBUTESPLIT=`(`+e.ATTNAME+`)(?:`+e.OPTIONALSPACE+`=`+e.OPTIONALSPACE+e.VALUESPLIT+`)?`,e.TAG=`(<(?:`+e.TAGNAME+`(?:`+e.SPACE+e.ATTRIBUTE+`)*`+e.OPTIONALSPACE+`/?|/`+e.TAGNAME+`|!--[^]*?--|![^]*?)(?:>|$))`,e.tag=new RegExp(e.TAG,`i`),e.attr=new RegExp(e.ATTRIBUTE,`i`),e.attrsplit=new RegExp(e.ATTRIBUTESPLIT,`i`)})(d=e.PATTERNS||={}),e.LiteParser=function(){function e(){}return e.prototype.parseFromString=function(e,t,n){t===void 0&&(t=`text/html`),n===void 0&&(n=null);for(var r=n.createDocument(),i=n.body(r),a=e.replace(/<\?.*?\?>/g,``).split(d.tag);a.length;){var o=a.shift(),s=a.shift();o&&this.addText(n,i,o),s&&s.charAt(s.length-1)===`>`&&(s.charAt(1)===`!`?this.addComment(n,i,s):i=s.charAt(1)===`/`?this.closeTag(n,i,s):this.openTag(n,i,s,a))}return this.checkDocument(n,r),r},e.prototype.addText=function(e,t,n){return n=c.translate(n),e.append(t,e.text(n))},e.prototype.addComment=function(e,t,n){return e.append(t,new u.LiteComment(n))},e.prototype.closeTag=function(e,t,n){for(var r=n.slice(2,n.length-1).toLowerCase();e.parent(t)&&e.kind(t)!==r;)t=e.parent(t);return e.parent(t)},e.prototype.openTag=function(e,t,n,r){var i=this.constructor.PCDATA,a=this.constructor.SELF_CLOSING,o=n.match(/<(.*?)[\s\n>\/]/)[1].toLowerCase(),s=e.node(o),c=n.replace(/^<.*?[\s\n>]/,``).split(d.attrsplit);return(c.pop().match(/>$/)||c.length<5)&&(this.addAttributes(e,s,c),e.append(t,s),!a[o]&&!n.match(/\/>$/)&&(i[o]?this.handlePCDATA(e,s,o,r):t=s)),t},e.prototype.addAttributes=function(e,t,n){for(var r=this.constructor.CDATA_ATTR;n.length;){var i=a(n.splice(0,5),5),o=i[1],s=i[2],l=i[3],u=i[4],d=s||l||u||``;r[o]||(d=c.translate(d)),e.setAttribute(t,o,d)}},e.prototype.handlePCDATA=function(e,t,n,r){for(var i=[],a=`</`+n+`>`,o=``;r.length&&o!==a;)i.push(o),i.push(r.shift()),o=r.shift();e.append(t,e.text(i.join(``)))},e.prototype.checkDocument=function(e,t){var n,r,i,a,s=this.getOnlyChild(e,e.body(t));if(s){try{for(var c=o(e.childNodes(e.body(t))),l=c.next();!l.done;l=c.next()){var d=l.value;if(d===s)break;d instanceof u.LiteComment&&d.value.match(/^<!DOCTYPE/)&&(t.type=d.value)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}switch(e.kind(s)){case`html`:try{for(var f=o(s.children),p=f.next();!p.done;p=f.next()){var d=p.value;switch(e.kind(d)){case`head`:t.head=d;break;case`body`:t.body=d;break}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}t.root=s,e.remove(s),e.parent(t.body)!==s&&e.append(s,t.body),e.parent(t.head)!==s&&e.insert(t.head,t.body);break;case`head`:t.head=e.replace(s,t.head);break;case`body`:t.body=e.replace(s,t.body);break}}},e.prototype.getOnlyChild=function(e,t){var n,r,i=null;try{for(var a=o(e.childNodes(t)),s=a.next();!s.done;s=a.next()){var c=s.value;if(c instanceof l.LiteElement){if(i)return null;i=c}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},e.prototype.serialize=function(e,t,n){var r=this;n===void 0&&(n=!1);var i=this.constructor.SELF_CLOSING,a=this.constructor.CDATA_ATTR,o=e.kind(t),s=e.allAttributes(t).map(function(e){return e.name+`="`+(a[e.name]?e.value:r.protectAttribute(e.value))+`"`}).join(` `),c=this.serializeInner(e,t,n);return`<`+o+(s?` `+s:``)+((!n||c)&&!i[o]?`>${c}</${o}>`:n?`/>`:`>`)},e.prototype.serializeInner=function(e,t,n){var r=this;return n===void 0&&(n=!1),this.constructor.PCDATA.hasOwnProperty(t.kind)?e.childNodes(t).map(function(t){return e.value(t)}).join(``):e.childNodes(t).map(function(t){var i=e.kind(t);return i===`#text`?r.protectHTML(e.value(t)):i===`#comment`?t.value:r.serialize(e,t,n)}).join(``)},e.prototype.protectAttribute=function(e){return typeof e!=`string`&&(e=String(e)),e.replace(/"/g,`"`)},e.prototype.protectHTML=function(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)},e.SELF_CLOSING={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},e.PCDATA={option:!0,textarea:!0,fieldset:!0,title:!0,style:!0,script:!0},e.CDATA_ATTR={style:!0,datafld:!0,datasrc:!0,href:!0,src:!0,longdesc:!0,usemap:!0,cite:!0,datetime:!0,action:!0,axis:!0,profile:!0,content:!0,scheme:!0},e}()})),_=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LiteWindow=void 0;var t=n(),r=o(),i=c(),a=g();e.LiteWindow=function(){function e(){this.DOMParser=a.LiteParser,this.NodeList=i.LiteList,this.HTMLCollection=i.LiteList,this.HTMLElement=t.LiteElement,this.DocumentFragment=i.LiteList,this.Document=r.LiteDocument,this.document=new r.LiteDocument}return e}()})),v=e((e=>{var t=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},n=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},r=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.Styles=void 0;var i=[`top`,`right`,`bottom`,`left`],a=[`width`,`style`,`color`];function o(e){for(var t=e.split(/((?:'[^']*'|"[^"]*"|,[\s\n]|[^\s\n])*)/g),n=[];t.length>1;)t.shift(),n.push(t.shift());return n}function s(e){var n,r,i=o(this.styles[e]);i.length===0&&i.push(``),i.length===1&&i.push(i[0]),i.length===2&&i.push(i[0]),i.length===3&&i.push(i[1]);try{for(var a=t(v.connect[e].children),s=a.next();!s.done;s=a.next()){var c=s.value;this.setStyle(this.childName(e,c),i.shift())}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}function c(e){var n,r,i=v.connect[e].children,a=[];try{for(var o=t(i),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.styles[e+`-`+c];if(!l){delete this.styles[e];return}a.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}a[3]===a[1]&&(a.pop(),a[2]===a[0]&&(a.pop(),a[1]===a[0]&&a.pop())),this.styles[e]=a.join(` `)}function l(e){var n,r;try{for(var i=t(v.connect[e].children),a=i.next();!a.done;a=i.next()){var o=a.value;this.setStyle(this.childName(e,o),this.styles[e])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function u(e){var i,a,o=r([],n(v.connect[e].children),!1),s=this.styles[this.childName(e,o.shift())];try{for(var c=t(o),l=c.next();!l.done;l=c.next()){var u=l.value;if(this.styles[this.childName(e,u)]!==s){delete this.styles[e];return}}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}this.styles[e]=s}var d={width:/^(?:[\d.]+(?:[a-z]+)|thin|medium|thick|inherit|initial|unset)$/,style:/^(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|unset)$/};function f(e){var n,r,i,a,s={width:``,style:``,color:``};try{for(var c=t(o(this.styles[e])),l=c.next();!l.done;l=c.next()){var u=l.value;u.match(d.width)&&s.width===``?s.width=u:u.match(d.style)&&s.style===``?s.style=u:s.color=u}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var f=t(v.connect[e].children),p=f.next();!p.done;p=f.next()){var m=p.value;this.setStyle(this.childName(e,m),s[m])}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}function p(e){var n,r,i=[];try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.styles[this.childName(e,s)];c&&i.push(c)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}i.length?this.styles[e]=i.join(` `):delete this.styles[e]}var m={style:/^(?:normal|italic|oblique|inherit|initial|unset)$/,variant:RegExp(`^(?:`+[`normal|none`,`inherit|initial|unset`,`common-ligatures|no-common-ligatures`,`discretionary-ligatures|no-discretionary-ligatures`,`historical-ligatures|no-historical-ligatures`,`contextual|no-contextual`,`(?:stylistic|character-variant|swash|ornaments|annotation)\\([^)]*\\)`,`small-caps|all-small-caps|petite-caps|all-petite-caps|unicase|titling-caps`,`lining-nums|oldstyle-nums|proportional-nums|tabular-nums`,`diagonal-fractions|stacked-fractions`,`ordinal|slashed-zero`,`jis78|jis83|jis90|jis04|simplified|traditional`,`full-width|proportional-width`,`ruby`].join(`|`)+`)$`),weight:/^(?:normal|bold|bolder|lighter|[1-9]00|inherit|initial|unset)$/,stretch:RegExp(`^(?:`+[`normal`,`(?:(?:ultra|extra|semi)-)?condensed`,`(?:(?:semi|extra|ulta)-)?expanded`,`inherit|initial|unset`].join(`|`)+`)$`),size:RegExp(`^(?:`+[`xx-small|x-small|small|medium|large|x-large|xx-large|larger|smaller`,`[d.]+%|[d.]+[a-z]+`,`inherit|initial|unset`].join(`|`)+`)(?:/(?:normal|[d.+](?:%|[a-z]+)?))?$`)};function h(e){var r,i,a,s,c=o(this.styles[e]),l={style:``,variant:[],weight:``,stretch:``,size:``,family:``,"line-height":``};try{for(var u=t(c),d=u.next();!d.done;d=u.next()){var f=d.value;l.family=f;try{for(var p=(a=void 0,t(Object.keys(m))),h=p.next();!h.done;h=p.next()){var _=h.value;if((Array.isArray(l[_])||l[_]===``)&&f.match(m[_]))if(_===`size`){var v=n(f.split(/\//),2),y=v[0],b=v[1];l[_]=y,b&&(l[`line-height`]=b)}else l.size===``&&(Array.isArray(l[_])?l[_].push(f):l[_]=f)}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}g(e,l),delete this.styles[e]}function g(e,n){var r,i;try{for(var a=t(v.connect[e].children),o=a.next();!o.done;o=a.next()){var s=o.value,c=this.childName(e,s);if(Array.isArray(n[s])){var l=n[s];l.length&&(this.styles[c]=l.join(` `))}else n[s]!==``&&(this.styles[c]=n[s])}}catch(e){r={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}}function _(e){}var v=function(){function e(e){e===void 0&&(e=``),this.parse(e)}return Object.defineProperty(e.prototype,"cssText",{get:function(){var e,n,r=[];try{for(var i=t(Object.keys(this.styles)),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.parentName(o);this.styles[s]||r.push(o+`: `+this.styles[o]+`;`)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r.join(` `)},enumerable:!1,configurable:!0}),e.prototype.set=function(t,n){for(t=this.normalizeName(t),this.setStyle(t,n),e.connect[t]&&!e.connect[t].combine&&(this.combineChildren(t),delete this.styles[t]);t.match(/-/)&&(t=this.parentName(t),e.connect[t]);)e.connect[t].combine.call(this,t)},e.prototype.get=function(e){return e=this.normalizeName(e),this.styles.hasOwnProperty(e)?this.styles[e]:``},e.prototype.setStyle=function(t,n){this.styles[t]=n,e.connect[t]&&e.connect[t].children&&e.connect[t].split.call(this,t),n===``&&delete this.styles[t]},e.prototype.combineChildren=function(n){var r,i,a=this.parentName(n);try{for(var o=t(e.connect[n].children),s=o.next();!s.done;s=o.next()){var c=s.value,l=this.childName(a,c);e.connect[l].combine.call(this,l)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}},e.prototype.parentName=function(e){var t=e.replace(/-[^-]*$/,``);return e===t?``:t},e.prototype.childName=function(t,n){return n.match(/-/)?n:(e.connect[t]&&!e.connect[t].combine&&(n+=t.replace(/.*-/,`-`),t=this.parentName(t)),t+`-`+n)},e.prototype.normalizeName=function(e){return e.replace(/[A-Z]/g,function(e){return`-`+e.toLowerCase()})},e.prototype.parse=function(e){e===void 0&&(e=``);var t=this.constructor.pattern;this.styles={};for(var r=e.replace(t.comment,``).split(t.style);r.length>1;){var i=n(r.splice(0,3),3),a=i[0],o=i[1],s=i[2];if(a.match(/[^\s\n]/))return;this.set(o,s)}},e.pattern={style:/([-a-z]+)[\s\n]*:[\s\n]*((?:'[^']*'|"[^"]*"|\n|.)*?)[\s\n]*(?:;|$)/g,comment:/\/\*[^]*?\*\//g},e.connect={padding:{children:i,split:s,combine:c},border:{children:i,split:l,combine:u},"border-top":{children:a,split:f,combine:p},"border-right":{children:a,split:f,combine:p},"border-bottom":{children:a,split:f,combine:p},"border-left":{children:a,split:f,combine:p},"border-width":{children:i,split:s,combine:null},"border-style":{children:i,split:s,combine:null},"border-color":{children:i,split:s,combine:null},font:{children:[`style`,`variant`,`weight`,`stretch`,`line-height`,`size`,`family`],split:h,combine:_}},e}();e.Styles=v})),y=e((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)},c=e&&e.__values||function(e){var t=typeof Symbol==`function`&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length==`number`)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)},l=e&&e.__read||function(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a},u=e&&e.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))};Object.defineProperty(e,"__esModule",{value:!0}),e.liteAdaptor=e.LiteAdaptor=e.LiteBase=void 0;var d=r(),f=a(),p=o(),m=n(),h=s(),y=_(),b=g(),x=v(),S=function(e){t(n,e);function n(){var t=e.call(this)||this;return t.parser=new b.LiteParser,t.window=new y.LiteWindow,t}return n.prototype.parse=function(e,t){return this.parser.parseFromString(e,t,this)},n.prototype.create=function(e,t){return t===void 0&&(t=null),new m.LiteElement(e)},n.prototype.text=function(e){return new h.LiteText(e)},n.prototype.comment=function(e){return new h.LiteComment(e)},n.prototype.createDocument=function(){return new p.LiteDocument},n.prototype.head=function(e){return e.head},n.prototype.body=function(e){return e.body},n.prototype.root=function(e){return e.root},n.prototype.doctype=function(e){return e.type},n.prototype.tags=function(e,t,n){n===void 0&&(n=null);var r=[],i=[];if(n)return i;for(var a=e;a;){var o=a.kind;o!==`#text`&&o!==`#comment`&&(a=a,o===t&&i.push(a),a.children.length&&(r=a.children.concat(r))),a=r.shift()}return i},n.prototype.elementById=function(e,t){for(var n=[],r=e;r;){if(r.kind!==`#text`&&r.kind!==`#comment`){if(r=r,r.attributes.id===t)return r;r.children.length&&(n=r.children.concat(n))}r=n.shift()}return null},n.prototype.elementsByClass=function(e,t){for(var n=[],r=[],i=e;i;)i.kind!==`#text`&&i.kind!==`#comment`&&(i=i,(i.attributes.class||``).trim().split(/ +/).includes(t)&&r.push(i),i.children.length&&(n=i.children.concat(n))),i=n.shift();return r},n.prototype.getElements=function(e,t){var n,r,i=[],a=this.body(t);try{for(var o=c(e),s=o.next();!s.done;s=o.next()){var l=s.value;if(typeof l==`string`)if(l.charAt(0)===`#`){var u=this.elementById(a,l.slice(1));u&&i.push(u)}else l.charAt(0)===`.`?i=i.concat(this.elementsByClass(a,l.slice(1))):l.match(/^[-a-z][-a-z0-9]*$/i)&&(i=i.concat(this.tags(a,l)));else Array.isArray(l)?i=i.concat(l):l instanceof this.window.NodeList||l instanceof this.window.HTMLCollection?i=i.concat(l.nodes):i.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},n.prototype.contains=function(e,t){for(;t&&t!==e;)t=this.parent(t);return!!t},n.prototype.parent=function(e){return e.parent},n.prototype.childIndex=function(e){return e.parent?e.parent.children.findIndex(function(t){return t===e}):-1},n.prototype.append=function(e,t){return t.parent&&this.remove(t),e.children.push(t),t.parent=e,t},n.prototype.insert=function(e,t){if(e.parent&&this.remove(e),t&&t.parent){var n=this.childIndex(t);t.parent.children.splice(n,0,e),e.parent=t.parent}},n.prototype.remove=function(e){var t=this.childIndex(e);return t>=0&&e.parent.children.splice(t,1),e.parent=null,e},n.prototype.replace=function(e,t){var n=this.childIndex(t);return n>=0&&(t.parent.children[n]=e,e.parent=t.parent,t.parent=null),t},n.prototype.clone=function(e){var t=this,n=new m.LiteElement(e.kind);return n.attributes=i({},e.attributes),n.children=e.children.map(function(e){if(e.kind===`#text`)return new h.LiteText(e.value);if(e.kind===`#comment`)return new h.LiteComment(e.value);var r=t.clone(e);return r.parent=n,r}),n},n.prototype.split=function(e,t){var n=new h.LiteText(e.value.slice(t));return e.value=e.value.slice(0,t),e.parent.children.splice(this.childIndex(e)+1,0,n),n.parent=e.parent,n},n.prototype.next=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)+1;return n>=0&&n<t.children.length?t.children[n]:null},n.prototype.previous=function(e){var t=e.parent;if(!t)return null;var n=this.childIndex(e)-1;return n>=0?t.children[n]:null},n.prototype.firstChild=function(e){return e.children[0]},n.prototype.lastChild=function(e){return e.children[e.children.length-1]},n.prototype.childNodes=function(e){return u([],l(e.children),!1)},n.prototype.childNode=function(e,t){return e.children[t]},n.prototype.kind=function(e){return e.kind},n.prototype.value=function(e){return e.kind===`#text`?e.value:e.kind===`#comment`?e.value.replace(/^<!(--)?((?:.|\n)*)\1>$/,`$2`):``},n.prototype.textContent=function(e){var t=this;return e.children.reduce(function(e,n){return e+(n.kind===`#text`?n.value:n.kind===`#comment`?``:t.textContent(n))},``)},n.prototype.innerHTML=function(e){return this.parser.serializeInner(this,e)},n.prototype.outerHTML=function(e){return this.parser.serialize(this,e)},n.prototype.serializeXML=function(e){return this.parser.serialize(this,e,!0)},n.prototype.setAttribute=function(e,t,n,r){r===void 0&&(r=null),typeof n!=`string`&&(n=String(n)),r&&(t=r.replace(/.*\//,``)+`:`+t.replace(/^.*:/,``)),e.attributes[t]=n,t===`style`&&(e.styles=null)},n.prototype.getAttribute=function(e,t){return e.attributes[t]},n.prototype.removeAttribute=function(e,t){delete e.attributes[t]},n.prototype.hasAttribute=function(e,t){return e.attributes.hasOwnProperty(t)},n.prototype.allAttributes=function(e){var t,n,r=e.attributes,i=[];try{for(var a=c(Object.keys(r)),o=a.next();!o.done;o=a.next()){var s=o.value;i.push({name:s,value:r[s]})}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},n.prototype.addClass=function(e,t){var n=(e.attributes.class||``).split(/ /);n.find(function(e){return e===t})||(n.push(t),e.attributes.class=n.join(` `))},n.prototype.removeClass=function(e,t){var n=(e.attributes.class||``).split(/ /),r=n.findIndex(function(e){return e===t});r>=0&&(n.splice(r,1),e.attributes.class=n.join(` `))},n.prototype.hasClass=function(e,t){return!!(e.attributes.class||``).split(/ /).find(function(e){return e===t})},n.prototype.setStyle=function(e,t,n){e.styles||=new x.Styles(this.getAttribute(e,`style`)),e.styles.set(t,n),e.attributes.style=e.styles.cssText},n.prototype.getStyle=function(e,t){if(!e.styles){var n=this.getAttribute(e,`style`);if(!n)return``;e.styles=new x.Styles(n)}return e.styles.get(t)},n.prototype.allStyles=function(e){return this.getAttribute(e,`style`)},n.prototype.insertRules=function(e,t){e.children=[this.text(t.join(`
|
|
2
2
|
|
|
3
3
|
`)+`
|
|
4
4
|
|
package/dist/client/index.html
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--pi-bg); color: var(--pi-text); }
|
|
55
55
|
body { min-height: 100dvh; }
|
|
56
56
|
</style>
|
|
57
|
-
<script type="module" crossorigin src="./assets/index-
|
|
57
|
+
<script type="module" crossorigin src="./assets/index-sujNbkL3.js"></script>
|
|
58
58
|
<link rel="modulepreload" crossorigin href="./assets/vendor-editor-core-vyMPzMNA.js">
|
|
59
59
|
<link rel="modulepreload" crossorigin href="./assets/vendor-editor-languages-DlEQaRIv.js">
|
|
60
60
|
<link rel="modulepreload" crossorigin href="./assets/vendor-terminal-D8k4UKM2.js">
|
|
@@ -33,8 +33,9 @@ import { SessionUnreadStore, } from "./sessionUnreadStore.js";
|
|
|
33
33
|
import { createModelTierRegistry, isModelTier, runtimeThinkingLevels, TierResolutionError, } from "./modelTierRegistry.js";
|
|
34
34
|
import { createUtilityModelExtension, } from "./utilityModelExtension.js";
|
|
35
35
|
import { createUtilityModelResolver, runWithUtilityModelFallback, } from "./utilityModelResolver.js";
|
|
36
|
-
import { inspectSessionModelPolicy, planSessionModelPolicyInitialization, planSessionModelPolicyUpdate, serializeSessionModelPolicy, SessionModelPolicyResolutionError, SESSION_MODEL_POLICY_CUSTOM_TYPE, } from "./sessionModelPolicy.js";
|
|
36
|
+
import { inspectSessionModelPolicy, planSessionModelPolicyInitialization, planSessionModelPolicyUpdate, readPersistedSessionModelPolicy, serializeSessionModelPolicy, SessionModelPolicyResolutionError, SESSION_MODEL_POLICY_CUSTOM_TYPE, } from "./sessionModelPolicy.js";
|
|
37
37
|
import { fallbackSessionModelPolicy, initialPolicyUnavailableError, } from "./sessionModelPolicyFallback.js";
|
|
38
|
+
import { inspectSessionRuntimeSelection, planSessionRuntimeRestore, } from "./sessionRuntimeRestore.js";
|
|
38
39
|
import { inspectSessionCreationRootEligibility, inspectSessionCreationSource, serializeSessionCreationSource, SESSION_CREATION_SOURCE_CUSTOM_TYPE, } from "./sessionCreationSource.js";
|
|
39
40
|
import { RememberCurrentModelPolicyCommand, } from "./rememberCurrentModelPolicy.js";
|
|
40
41
|
import { StarterModelPolicyPreferenceStore } from "./starterModelPolicyPreferenceStore.js";
|
|
@@ -321,7 +322,7 @@ export function createPiWebUiCustomToolDefinitions(cwd, delegationEnabled, spawn
|
|
|
321
322
|
: []),
|
|
322
323
|
];
|
|
323
324
|
}
|
|
324
|
-
export function createDefaultRuntimeFactory(modelRuntime, sessionManagers, utilityModelResolver, logger, spawn, subsessions, modelPolicy, modelRateLimitOwner, sdk = {
|
|
325
|
+
export function createDefaultRuntimeFactory(modelRuntime, sessionManagers, utilityModelResolver, logger, spawn, subsessions, modelPolicy, modelRateLimitOwner, restore, sdk = {
|
|
325
326
|
createServices: createAgentSessionServices,
|
|
326
327
|
createFromServices: createAgentSessionFromServices,
|
|
327
328
|
}) {
|
|
@@ -348,15 +349,26 @@ export function createDefaultRuntimeFactory(modelRuntime, sessionManagers, utili
|
|
|
348
349
|
const resolvedDelegationToolsEnabled = delegationToolsEnabled ??
|
|
349
350
|
(await sessionAllowsDelegationTools(sessionManager, sessionManagers));
|
|
350
351
|
const customTools = createPiWebUiCustomToolDefinitions(cwd, resolvedDelegationToolsEnabled, spawn, subsessions, modelPolicy);
|
|
352
|
+
const derived = restore === undefined
|
|
353
|
+
? undefined
|
|
354
|
+
: await restore.prepare({
|
|
355
|
+
sessionId: sessionManager.getSessionId(),
|
|
356
|
+
sessionManager,
|
|
357
|
+
modelRuntime,
|
|
358
|
+
...(initialModel === undefined ? {} : { explicitModel: initialModel }),
|
|
359
|
+
...(initialThinkingLevel === undefined
|
|
360
|
+
? {}
|
|
361
|
+
: { explicitThinkingLevel: initialThinkingLevel }),
|
|
362
|
+
});
|
|
363
|
+
const model = initialModel ?? derived?.model;
|
|
364
|
+
const thinkingLevel = initialThinkingLevel ?? derived?.thinkingLevel;
|
|
351
365
|
const result = await sdk.createFromServices({
|
|
352
366
|
services,
|
|
353
367
|
sessionManager,
|
|
354
368
|
customTools,
|
|
355
369
|
...(sessionStartEvent === undefined ? {} : { sessionStartEvent }),
|
|
356
|
-
...(
|
|
357
|
-
...(
|
|
358
|
-
? {}
|
|
359
|
-
: { thinkingLevel: initialThinkingLevel }),
|
|
370
|
+
...(model === undefined ? {} : { model }),
|
|
371
|
+
...(thinkingLevel === undefined ? {} : { thinkingLevel }),
|
|
360
372
|
});
|
|
361
373
|
const delegateStreamFunction = result.session.agent.streamFunction;
|
|
362
374
|
const limitedStreamFunction = modelRateLimitOwner === undefined
|
|
@@ -542,7 +554,7 @@ export class PiSessionService {
|
|
|
542
554
|
? undefined
|
|
543
555
|
: {
|
|
544
556
|
inspect: (sessionId) => this.modelPolicyCapability(sessionId),
|
|
545
|
-
}, deps.modelRateLimitOwner);
|
|
557
|
+
}, deps.modelRateLimitOwner, { prepare: (input) => this.prepareSessionRuntimeRestore(input) });
|
|
546
558
|
this.createAgentRuntime =
|
|
547
559
|
deps.createAgentRuntime ?? defaultCreateAgentRuntime;
|
|
548
560
|
this.modelTierRegistry =
|
|
@@ -1351,12 +1363,16 @@ export class PiSessionService {
|
|
|
1351
1363
|
}
|
|
1352
1364
|
}
|
|
1353
1365
|
async deliverSubsessionNotification(session, notification) {
|
|
1354
|
-
await this.runSessionEntryMutation(session, "deliver a subsession notification", () =>
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1366
|
+
await this.runSessionEntryMutation(session, "deliver a subsession notification", () => {
|
|
1367
|
+
const blocked = this.modelPolicyBlockedReason(session) !== undefined ||
|
|
1368
|
+
this.isModelPolicyMutationActive(session);
|
|
1369
|
+
return session.sendCustomMessage({
|
|
1370
|
+
customType: SUBSESSION_NOTIFICATION_CUSTOM_TYPE,
|
|
1371
|
+
content: notification.text,
|
|
1372
|
+
display: true,
|
|
1373
|
+
details: { sessionId: notification.childId },
|
|
1374
|
+
}, { triggerTurn: !blocked, deliverAs: "followUp" });
|
|
1375
|
+
});
|
|
1360
1376
|
this.publishStatus(session);
|
|
1361
1377
|
}
|
|
1362
1378
|
logSubsessionNotificationFailure(parentId, childId, error) {
|
|
@@ -3508,8 +3524,8 @@ export class PiSessionService {
|
|
|
3508
3524
|
thinkingLevel: session.thinkingLevel,
|
|
3509
3525
|
};
|
|
3510
3526
|
}
|
|
3511
|
-
|
|
3512
|
-
return session.sessionManager.getBranch();
|
|
3527
|
+
sessionTranscriptEntries(session) {
|
|
3528
|
+
return session.sessionManager.getEntries?.() ?? session.sessionManager.getBranch();
|
|
3513
3529
|
}
|
|
3514
3530
|
async confirmedPolicySnapshot(ref) {
|
|
3515
3531
|
const session = await this.getOrOpen(ref);
|
|
@@ -3518,17 +3534,16 @@ export class PiSessionService {
|
|
|
3518
3534
|
const manager = persisted
|
|
3519
3535
|
? this.sessionManager.open(sessionFile)
|
|
3520
3536
|
: session.sessionManager;
|
|
3521
|
-
|
|
3522
|
-
//
|
|
3523
|
-
|
|
3524
|
-
const
|
|
3525
|
-
const creationSource = inspectSessionCreationSource(creationSourceEntries);
|
|
3537
|
+
// Creation provenance belongs to the durable root file, even when its original entry is not on the
|
|
3538
|
+
// currently selected conversation branch. The model policy now reads the same session-level list.
|
|
3539
|
+
const entries = manager.getEntries?.() ?? manager.getBranch();
|
|
3540
|
+
const creationSource = inspectSessionCreationSource(entries);
|
|
3526
3541
|
return {
|
|
3527
3542
|
cwd: canonicalizeStoredCwd(manager.getCwd()),
|
|
3528
3543
|
creationSource,
|
|
3529
3544
|
persisted,
|
|
3530
3545
|
rootEligibility: this.sessionCreationRootEligibility(manager, creationSource),
|
|
3531
|
-
modelPolicy: inspectSessionModelPolicy(
|
|
3546
|
+
modelPolicy: inspectSessionModelPolicy(entries, this.exactSelectionFromSession(session)),
|
|
3532
3547
|
transitionInFlight: this.isModelPolicyMutationActive(session),
|
|
3533
3548
|
};
|
|
3534
3549
|
}
|
|
@@ -3562,7 +3577,7 @@ export class PiSessionService {
|
|
|
3562
3577
|
});
|
|
3563
3578
|
}
|
|
3564
3579
|
inspectAndCacheSessionModelPolicy(session) {
|
|
3565
|
-
const inspection = inspectSessionModelPolicy(this.
|
|
3580
|
+
const inspection = inspectSessionModelPolicy(this.sessionTranscriptEntries(session), this.exactSelectionFromSession(session));
|
|
3566
3581
|
const ladderValidation = this.modelTierRegistry.validate();
|
|
3567
3582
|
this.modelPolicyInspections.set(session, inspection);
|
|
3568
3583
|
this.modelPolicyLadderValidations.set(session, ladderValidation);
|
|
@@ -3574,8 +3589,99 @@ export class PiSessionService {
|
|
|
3574
3589
|
}
|
|
3575
3590
|
/** Effective block: an unproven runtime restoration outranks an entry defect. */
|
|
3576
3591
|
modelPolicyBlockedReason(session) {
|
|
3577
|
-
|
|
3578
|
-
|
|
3592
|
+
const block = this.modelPolicyRuntimeBlocks.get(session.sessionId);
|
|
3593
|
+
if (block !== undefined)
|
|
3594
|
+
return `MODEL_POLICY_BLOCKED: ${block.reason}`;
|
|
3595
|
+
return this.modelPolicyEntryReasons.get(session);
|
|
3596
|
+
}
|
|
3597
|
+
/**
|
|
3598
|
+
* Restore the session-level recorded model selection into a fresh runtime.
|
|
3599
|
+
* Runs after `createServices` has registered extension providers/models and
|
|
3600
|
+
* before `createFromServices`, so a virtual or extension model is resolvable.
|
|
3601
|
+
*/
|
|
3602
|
+
async prepareSessionRuntimeRestore(input) {
|
|
3603
|
+
if (input.explicitModel !== undefined ||
|
|
3604
|
+
input.explicitThinkingLevel !== undefined) {
|
|
3605
|
+
return {};
|
|
3606
|
+
}
|
|
3607
|
+
const entries = input.sessionManager.getEntries?.() ?? input.sessionManager.getBranch();
|
|
3608
|
+
const selection = inspectSessionRuntimeSelection(entries);
|
|
3609
|
+
if (selection.kind === "none")
|
|
3610
|
+
return {};
|
|
3611
|
+
const persistedPolicy = readPersistedSessionModelPolicy(entries);
|
|
3612
|
+
let boundModel;
|
|
3613
|
+
let resolvedModel;
|
|
3614
|
+
if (selection.kind === "selection") {
|
|
3615
|
+
const bound = await this.resolveSessionRuntimeRestoreModel(input.modelRuntime, input.sessionId, selection.model);
|
|
3616
|
+
boundModel = bound?.model;
|
|
3617
|
+
resolvedModel =
|
|
3618
|
+
bound === undefined
|
|
3619
|
+
? undefined
|
|
3620
|
+
: {
|
|
3621
|
+
provider: bound.model.provider,
|
|
3622
|
+
id: bound.model.id,
|
|
3623
|
+
thinkingLevels: bound.thinkingLevels,
|
|
3624
|
+
};
|
|
3625
|
+
}
|
|
3626
|
+
const existingBlock = this.modelPolicyRuntimeBlocks.get(input.sessionId);
|
|
3627
|
+
const plan = planSessionRuntimeRestore({
|
|
3628
|
+
selection,
|
|
3629
|
+
persistedPolicy,
|
|
3630
|
+
...(resolvedModel === undefined ? {} : { resolvedModel }),
|
|
3631
|
+
...(existingBlock === undefined ? {} : { existingBlock }),
|
|
3632
|
+
});
|
|
3633
|
+
// A message-less blocked transcript takes Pi's new-session branch and gains
|
|
3634
|
+
// its fallback model/thinking pair, so a later credentials-return open reads
|
|
3635
|
+
// a disagreement and recovers only through an explicit policy update.
|
|
3636
|
+
if (plan.kind === "none")
|
|
3637
|
+
return {};
|
|
3638
|
+
if (plan.kind === "block") {
|
|
3639
|
+
this.modelPolicyRuntimeBlocks.set(input.sessionId, {
|
|
3640
|
+
cause: plan.cause,
|
|
3641
|
+
reason: plan.reason,
|
|
3642
|
+
});
|
|
3643
|
+
return {};
|
|
3644
|
+
}
|
|
3645
|
+
if (boundModel === undefined)
|
|
3646
|
+
throw new Error("session runtime restore produced an apply plan without a bound model");
|
|
3647
|
+
if (plan.clearSelectionUnavailable) {
|
|
3648
|
+
this.modelPolicyRuntimeBlocks.delete(input.sessionId);
|
|
3649
|
+
}
|
|
3650
|
+
const thinkingLevel = plan.thinkingLevel !== undefined && isKnownThinkingLevel(plan.thinkingLevel)
|
|
3651
|
+
? plan.thinkingLevel
|
|
3652
|
+
: undefined;
|
|
3653
|
+
return {
|
|
3654
|
+
model: boundModel,
|
|
3655
|
+
...(thinkingLevel === undefined ? {} : { thinkingLevel }),
|
|
3656
|
+
};
|
|
3657
|
+
}
|
|
3658
|
+
/**
|
|
3659
|
+
* Bind the recorded selection to the runtime catalog. Resolves first, then
|
|
3660
|
+
* makes one `allowNetwork: false` refresh on a miss or a missing auth answer;
|
|
3661
|
+
* a refresh rejection is logged and treated as unbindable.
|
|
3662
|
+
*/
|
|
3663
|
+
async resolveSessionRuntimeRestoreModel(modelRuntime, sessionId, selection) {
|
|
3664
|
+
const bound = this.boundSessionRuntimeRestoreModel(modelRuntime, selection);
|
|
3665
|
+
if (bound !== undefined)
|
|
3666
|
+
return bound;
|
|
3667
|
+
try {
|
|
3668
|
+
await modelRuntime.refresh({ allowNetwork: false });
|
|
3669
|
+
}
|
|
3670
|
+
catch (error) {
|
|
3671
|
+
this.logger.info({
|
|
3672
|
+
sessionId,
|
|
3673
|
+
model: `${selection.provider}/${selection.id}`,
|
|
3674
|
+
error: error instanceof Error ? error.message : String(error),
|
|
3675
|
+
}, "session runtime restore model refresh failed");
|
|
3676
|
+
return undefined;
|
|
3677
|
+
}
|
|
3678
|
+
return this.boundSessionRuntimeRestoreModel(modelRuntime, selection);
|
|
3679
|
+
}
|
|
3680
|
+
boundSessionRuntimeRestoreModel(modelRuntime, selection) {
|
|
3681
|
+
const model = modelRuntime.getModel(selection.provider, selection.id);
|
|
3682
|
+
if (model === undefined || !modelRuntime.hasConfiguredAuth(model.provider))
|
|
3683
|
+
return undefined;
|
|
3684
|
+
return { model, thinkingLevels: runtimeThinkingLevels(model) };
|
|
3579
3685
|
}
|
|
3580
3686
|
/** Root-session policy initialization, completed before the root is visible. */
|
|
3581
3687
|
async initializeSessionModelPolicy(session, initializer) {
|
|
@@ -3773,7 +3879,10 @@ export class PiSessionService {
|
|
|
3773
3879
|
catch (error) {
|
|
3774
3880
|
const reason = error instanceof Error ? error.message : String(error);
|
|
3775
3881
|
if (!(await this.restoreExactSelection(session, previous))) {
|
|
3776
|
-
this.modelPolicyRuntimeBlocks.set(session.sessionId,
|
|
3882
|
+
this.modelPolicyRuntimeBlocks.set(session.sessionId, {
|
|
3883
|
+
cause: "runtime-tuple-unproven",
|
|
3884
|
+
reason: `${reason}; the previous model and thinking pair could not be restored`,
|
|
3885
|
+
});
|
|
3777
3886
|
}
|
|
3778
3887
|
this.inspectAndCacheSessionModelPolicy(session);
|
|
3779
3888
|
options.onTransitionFailure?.(reason);
|
|
@@ -3855,7 +3964,7 @@ export class PiSessionService {
|
|
|
3855
3964
|
const inspection = this.inspectAndCacheSessionModelPolicy(session);
|
|
3856
3965
|
const runtimeBlock = this.modelPolicyRuntimeBlocks.get(session.sessionId);
|
|
3857
3966
|
if (runtimeBlock !== undefined)
|
|
3858
|
-
throw new Error(`Cannot ${action}: ${runtimeBlock}`);
|
|
3967
|
+
throw new Error(`Cannot ${action}: MODEL_POLICY_BLOCKED: ${runtimeBlock.reason}`);
|
|
3859
3968
|
if (inspection.kind === "invalid") {
|
|
3860
3969
|
throw new Error(`Cannot ${action}: the session model policy entry is invalid (${inspection.reason}). Repair the policy first.`);
|
|
3861
3970
|
}
|
|
@@ -3889,7 +3998,10 @@ export class PiSessionService {
|
|
|
3889
3998
|
catch (error) {
|
|
3890
3999
|
const reason = error instanceof Error ? error.message : String(error);
|
|
3891
4000
|
if (!(await this.restoreExactSelection(session, previous))) {
|
|
3892
|
-
this.modelPolicyRuntimeBlocks.set(session.sessionId,
|
|
4001
|
+
this.modelPolicyRuntimeBlocks.set(session.sessionId, {
|
|
4002
|
+
cause: "runtime-tuple-unproven",
|
|
4003
|
+
reason: `${reason}; the previous model and thinking pair could not be restored`,
|
|
4004
|
+
});
|
|
3893
4005
|
}
|
|
3894
4006
|
this.inspectAndCacheSessionModelPolicy(session);
|
|
3895
4007
|
// Only a failure that already moved the runtime tuple is announced; an
|
|
@@ -3919,7 +4031,7 @@ export class PiSessionService {
|
|
|
3919
4031
|
const inspection = this.inspectAndCacheSessionModelPolicy(session);
|
|
3920
4032
|
const runtimeBlock = this.modelPolicyRuntimeBlocks.get(session.sessionId);
|
|
3921
4033
|
if (runtimeBlock !== undefined)
|
|
3922
|
-
throw new Error(`Cannot send a prompt: ${runtimeBlock}`);
|
|
4034
|
+
throw new Error(`Cannot send a prompt: MODEL_POLICY_BLOCKED: ${runtimeBlock.reason}`);
|
|
3923
4035
|
if (inspection.kind === "invalid") {
|
|
3924
4036
|
throw new Error(`Cannot send a prompt: the session model policy entry is invalid (${inspection.reason}). Repair the policy first.`);
|
|
3925
4037
|
}
|
|
@@ -4022,7 +4134,7 @@ export class PiSessionService {
|
|
|
4022
4134
|
sessionId: session.sessionId,
|
|
4023
4135
|
sessionFile,
|
|
4024
4136
|
}));
|
|
4025
|
-
const inspection = inspectSessionCreationSource(this.
|
|
4137
|
+
const inspection = inspectSessionCreationSource(this.sessionTranscriptEntries(session));
|
|
4026
4138
|
const rootEligibility = this.sessionCreationRootEligibility(session.sessionManager, inspection);
|
|
4027
4139
|
if (inspection.kind !== "valid" ||
|
|
4028
4140
|
rootEligibility.kind !== "eligible") {
|