nv-basic-bw 1.0.6 → 1.0.8
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/DIST/nv-basci-bw.js +10 -10
- package/index.js +1 -1
- package/package.json +1 -1
- package/ui.js +1 -1
- package/wait.js +33 -1
package/DIST/nv-basci-bw.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var nvbasicbw=(()=>{var Sl=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var a=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var w=a((Zo,Vs)=>{var El=Symbol("empty"),Ye=Symbol("unknown"),Ys=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Fs=/^[\-\+]?[0-9]+$/,Ms=/^\+?[0-9]+$/,Cl=/^[\-\+]?0[bB][0-1]+$/,ql=/^[\-\+]?0[oO][0-7]+$/,Gs=/^[\-\+]?0[xX][0-9a-fA-F]+$/,Al=e=>Fs.test(e)||Gs.test(e),Rs={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},Il=/^[\-\+]?[0-9]+n$/,Dl=/^[\-\+]?0[bB][0-1]+n$/,Nl=/^[\-\+]?0[oO][0-7]+n$/,Pl=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,Hs=e=>Il.test(e)||Dl.test(e)||Nl.test(e)||Pl.test(e),ue={Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11,6:"Integer",7:"Float",8:"BigInt",9:"PosInfinity",10:"NegInfinity",11:"NaN"},Xs=(e,t=!1)=>{let r={value:void 0,type:void 0};return e==="+Infinity"||e==="Infinity"?(r.value=1/0,r.type=ue.PosInfinity):e==="-Infinity"?(r.value=-1/0,r.type=ue.NegInfinity):(e==="NaN"||e==="+NaN"||e==="-NaN")&&(r.value=NaN,r.type=ue.NaN),t?r:r.value},Ol=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=Rs[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=Rs[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},Ws=e=>{let t=Array.from(e);if(Fs.test(e))return parseInt(e);if(Cl.test(e)||ql.test(e)||Gs.test(e))return Ol(t)},Ll=e=>{let t=e.be.sign+e.be.bd+e.be.dot+e.be.ad,r=e.ae.sign+e.ae.bd+e.ae.dot+e.ae.ad,n;if(!(t==="+"||t==="-"||r==="+"||r==="-")){if(r!=="")if(e.ae.dot==="."){let i=parseFloat(t),l=parseFloat(r);n=i*10**l}else n=parseFloat(t+"e"+r);else n=parseFloat(t);return n}},Rl=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",jl=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),js=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Bl=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(Ms.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},Bs=(e,t,r,n)=>{let i;for(i=r;i<e.length;i++)if(e[i]==="."){if(t[n].dot===".")return[!0,i];t[n].dot=".",t.state=n+"ad"}else{if(e[i]==="e"||e[i]==="E")return n==="ae"?[!0,i]:(t.state="aebd",[!1,i+1]);if(Ms.test(e[i]))t.state===n+"bd"?t[n].bd=t[n].bd+e[i]:t[n].ad=t[n].ad+e[i];else return[!0,i]}return[!1,i+1]},Js=e=>{let t=jl(),r=Array.from(e);if(Rl(r,e))return;let n=0,i=!1;if([r,n]=js(r,t,n,"be"),[i,n]=Bl(r,t,n,"be"),!i&&([i,n]=Bs(r,t,n,"be"),!i&&([r,n]=js(r,t,n,"ae"),[i,n]=Bs(r,t,n,"ae"),!i)))return Ll(t)},zs=(e,t=!1)=>{let r={value:void 0,type:void 0};if(Hs(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=ue.BigInt;else{let n=Ws(e);n!==void 0?(r.value=n,r.type=ue.Integer):(n=Js(e),n!==void 0?(r.value=n,r.type=ue.Float):(n=Xs(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},Yl=(e,t=!0)=>{if(typeof e=="string")return e;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="number")return e.toString();if(typeof e=="bigint")return e.toString()+"n";if(typeof e=="symbol")return e.description;if(Ys()&&e[Symbol.for("nodejs.util.inspect.custom")])return e[Symbol.for("nodejs.util.inspect.custom")]();{let r=function(n){if(typeof n.toString=="function")return n.toString()};try{return t?s=JSON.stringify(e):s=JSON.stringify(e,null,4),typeof s=="string"?s:r(e)}catch{return r(e)}}},Be={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},Fl={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function Us(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(Fl));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:_}=r,c={value:Ye,type:Ye};if(e==="undefined")c.value=void 0,c.type=Be.UndefinedLiteral;else if(e==="null")c.value=null,c.type=Be.NullLiteral;else if(e==="false")c.value=!1,c.type=Be.FalseLiteral;else if(e==="true")c.value=!0,c.type=Be.TrueLiteral;else{let u=zs(e,!0);u.type===void 0?_?(c.value=e,c.type=Be.StringLiteral):(c.value=e,c.type=Ye):(c.value=u.value,c.type=u.type)}return n?c.value:(l||delete c.type,i||delete c.value,c)}Us.unknown=Ye;var Ml={UndefinedLiteral:0,NullLiteral:1,BooleanLiteral:{_self:2,FalseLiteral:3,TrueLiteral:4},NumericLiteral:{_self:5,Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11},StringLiteral:12,ArrayExpression:{_self:13,element:14},ObjectExpression:{_self:15,property:16},_Ref:17,CommentLine:{_self:18,tt:19,k:20,bv:21,av:22},CommentBlock:{_self:23,tt:24,k:25,bv:26,av:27}};Vs.exports={TYPE_DICT:Ml,isNode:Ys,empty:El,unknown:Ye,is_bigint_str:Hs,is_jsint_str:Al,NUM_TYPE_DICT:ue,parse_abnormal_num:Xs,parse_int:Ws,parse_float:Js,parse_num:zs,parse0:Us,to_str:Yl}});var er=a((ef,Zs)=>{var Fe={backSpace:8,tab:9,lineFeed:10,lineTab:11,formFeed:12,carriageReturn:13,shiftOut:14,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,nonBreakingSpace:160,oghamSpaceMark:5760,enQuad:8192,emQuad:8193,enSpace:8194,emSpace:8195,threePerEmSpace:8196,fourPerEmSpace:8197,sixPerEmSpace:8198,figureSpace:8199,punctuationSpace:8200,thinSpace:8201,hairSpace:8202,lineSeparator:8232,paragraphSeparator:8233,narrowNoBreakSpace:8239,mediumMathematicalSpace:8287,ideographicSpace:12288,zeroWidthNoBreakSpace:65279};function Gl(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Ct=Gl(Fe);function Hl(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Xl=Hl(Fe),Qs=e=>55296<=e&&e<=56319,Wl=e=>56320<=e&&e<=57343,Jl=(e,t)=>(e-55296)*1024+(t-56320)+65536,Ks=e=>e<=65535,zl=e=>!Ks(e),Ul=e=>{if(e<=65535)return[e,null];{e=e-65536;let t=[null,null];return t[0]=(e>>10)+55296,t[1]=e%1024+56320,t}},Vl=(e,t)=>Qs(e)?t+2:t+1;Zs.exports={CODE_DICT:Fe,CH_DICT:Xl,CODE_NAME_MP:Ct,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Ct.get(e),n2cd:e=>String.fromCharCode(Fe[e]),n2ch:e=>Fe[e],ch2n:e=>Ct.get(e.codePointAt(0)),is_high_code:Qs,is_low_code:Wl,get_code_point_from_high_low:Jl,get_high_low_from_code_point:Ul,is_length1_code_point:Ks,is_length2_code_point:zl,_next_code_index:Vl}});var ke=a((tf,x)=>{var{CODE_DICT:h,CH_DICT:b}=er(),tr=/\r\n?|[\n\u2028\u2029]/;x.exports.line_break_regexp=tr;x.exports.line_break_regexp_g=new RegExp(tr.source,"g");function sr(e){switch(e){case h.lineFeed:case h.carriageReturn:case h.lineSeparator:case h.paragraphSeparator:return!0;default:return!1}}function rr(e){switch(e){case b.lineFeed:case b.carriageReturn:case b.lineSeparator:case b.paragraphSeparator:return!0;default:return!1}}var qt=[h.lineFeed,h.carriageReturn,h.lineSeparator,h.paragraphSeparator],nr=qt.map(e=>String.fromCharCode(e));x.exports.NL_CODE_ARR=qt;x.exports.NL_CH_ARR=nr;x.exports.is_nl_code=sr;x.exports.is_nl=rr;x.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function ir(e){switch(e){case 9:case 11:case 12:case h.space:case h.nonBreakingSpace:case h.oghamSpaceMark:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}x.exports.is_non_nl_ws_code=ir;function lr(e){switch(e){case b.tab:case b.lineTab:case b.formFeed:case b.space:case b.nonBreakingSpace:case b.oghamSpaceMark:case b.enQuad:case b.emQuad:case b.enSpace:case b.emSpace:case b.threePerEmSpace:case b.fourPerEmSpace:case b.sixPerEmSpace:case b.figureSpace:case b.punctuationSpace:case b.thinSpace:case b.hairSpace:case b.narrowNoBreakSpace:case b.mediumMathematicalSpace:case b.ideographicSpace:case b.zeroWidthNoBreakSpace:return!0;default:return!1}}x.exports.is_non_nl_ws=lr;var At=[h.tab,h.lineTab,h.formFeed,h.space,h.nonBreakingSpace,h.oghamSpaceMark,h.enQuad,h.emQuad,h.enSpace,h.emSpace,h.threePerEmSpace,h.fourPerEmSpace,h.sixPerEmSpace,h.figureSpace,h.punctuationSpace,h.thinSpace,h.hairSpace,h.narrowNoBreakSpace,h.mediumMathematicalSpace,h.ideographicSpace,h.zeroWidthNoBreakSpace];x.exports.NON_NL_WS_CODE_ARR=At;var _r=At.map(e=>String.fromCharCode(e));x.exports.NON_NL_WS_CH_ARR=_r;function Ql(e){return ir(e)||sr(e)}function ve(e){return lr(e)||rr(e)}x.exports.is_ws_code=Ql;x.exports.is_ws=ve;x.exports.WS_CHCODE_ARR=qt.concat(At);x.exports.WS_CH_ARR=nr.concat(_r);var K={init:0,executing:1,succ:2,eof:3};x.exports.STATE_DICT=K;function Kl(e,t=new Set){let r={g:e,rslt:"",state:K.init},n=r.g.next().value;if(n===void 0)return r.state=K.eof,r;for(;n!==void 0&&(ve(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!ve(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=K.eof:(ve(n)||t.has(n))&&(r.state=K.succ),r}function Zl(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:K.init};for(let l=n.pos;l<e.length;l++){let _=e[l];if(ve(_)||r.has(_))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let _=e[l];if(!ve(_)&&!r.has(_))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=K.eof:n.state=K.succ,n.rslt=e.slice(i,n.pos).join(""),n}x.exports.from_generator=Kl;x.exports.from_charr=Zl});var Z=a((sf,hr)=>{var{WS_CH_ARR:cr,NON_NL_WS_CH_ARR:e_,NL_CH_ARR:t_}=ke();function s_(e){return Array.from(e).length}var r_="\u200C",ur="\u200D",n_=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function It(e,t,...r){let n=function(){return t(this,...r)};n_()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var j={tmpl_quote:new Error("tmpl_quote: ` cant be deleted"),reserved:new Error(" [/,*,#,&,`,\\,] and whitespaces are reserved"),inuse:new Error("in using"),char:new Error("must be a char"),pair:new Error("left block must be different with right"),cant_be_empty:new Error("can NOT be empty")},st=Symbol("get_pair_lmp"),i_=Symbol("add_pair_reserved"),Me=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[st](){return this.#e}get size(){return this.#e.size}[i_](t,r){if(t===r)throw j.pair;this.#e.set(t,r),this.#s.set(r,t)}add(t,r){if(this.#t.validate(t),this.#t.validate(r),t===r)throw j.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw j.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw j.cant_be_empty;{let r=this.#s.get(t);this.#s.delete(t),this.#e.delete(r)}}lhas(t){return this.#e.has(t)}rhas(t){return this.#s.has(t)}has(t){return this.lhas(t)||this.rhas(t)}getl(t){return this.#s.get(t)}getr(t){return this.#e.get(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function l_(e){return new Map(e[st])}It(Me,l_);var ar=Symbol("get_single_set"),or=Symbol("add_single_reserved"),we=class{#t;#e=new Set;constructor(t){this.#t=t}get[ar](){return this.#e}[or](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw j.cant_be_empty;if(t==="`")throw j.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function __(e){return new Set(e[ar])}It(we,__);var rt=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new Me(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new Me(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new we(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[or]("`"),this.#r=new we(this),this.#r.add(","),this.#r.add("\uFF0C"),this.#r.add(";"),this.#r.add("\uFF1B"),this.#r.add("\u3002"),this.#r.add("\u3001"),this.#n=new we(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(cr)}get inuse(){let t=new Set;if(this.#i){for(let r of this.#s)t.add(r);for(let r of this.#r)t.add(r);for(let r of this.#n)t.add(r);for(let r of this.#t[st])t.add(r);for(let r of this.#e[st])t.add(r)}return t}validate(t){if(typeof t!="string"||s_(t)!==1)throw j.char;if(this.reserved.includes(t))throw j.reserved;if(Array.from(this.inuse).flat().includes(t))throw j.inuse;return t}get esc(){return"\\"}get slash(){return"/"}get line_comment(){return"//"}get asterisk(){return"*"}get blk_comments(){return["/*","*/"]}get hash(){return"#"}get ref(){return"&"}get tmpl_quote(){return"`"}get nl(){return t_}get non_nl_ws(){return e_}get ws(){return cr}get array_blks(){return this.#t}get fst_ary_blks(){return Array.from(this.#t)[0]}get obj_blks(){return this.#e}get fst_obj_blks(){return Array.from(this.#e)[0]}get quotes(){return this.#s}get fst_quote(){return Array.from(this.#s)[0]}get commas(){return this.#r}get fst_comma(){return Array.from(this.#r)[0]}get colons(){return this.#n}get fst_colon(){return Array.from(this.#n)[0]}},nt=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(nt,"name",{value:ur});var it=class{constructor(t){this.esc=t.esc,this.hash=t.hash,this.ref=t.ref,this.tmpl_quote=t.tmpl_quote,this.slash=t.slash,this.asterisk=t.asterisk,this.line_comment=t.line_comment,this.blk_comments=t.blk_comments,this.nl=t.nl,this.non_nl_ws=t.non_nl_ws}get[Symbol.toStringTag](){return"fixed"}};Object.defineProperty(it,"name",{value:ur});var lt=class{constructor(t){this.obj_blks=t.obj_blks,this.array_blks=t.array_blks,this.quotes=t.quotes,this.commas=t.commas,this.colons=t.colons}get[Symbol.toStringTag](){return"configurable-if-not-reserved"}};Object.defineProperty(lt,"name",{value:r_});function c_(e){return[new it(e),new lt(e),new nt(e)]}It(rt,c_);var fr=new rt;fr.ERROR_DICT=j;hr.exports=fr});var br=a((rf,D)=>{var dr=Sl("fs");function*pr(e){for(let t of e)yield t;e=null}function u_(e,t){let r=e.codePointAt(t);if(r!==void 0)return r<65536?t=t+1:t=t+2,t}function*a_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield r,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}function*o_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield t,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}async function f_(e){let t=[];for await(let r of e)t.push(r);return t}async function*h_(e){for(let t of e)yield t;e=null}async function*d_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield r,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}async function*p_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield t,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}function*g_(e,t="utf8"){let r=dr.readFileSync(e,{encoding:t});yield*pr(r)}async function*gr(e,t="utf8",r=4096){let n=dr.createReadStream(e,{encoding:t,highWaterMark:r});for await(let i of n)yield i,i=null;await n.close(),await n.destroy(),n=null}async function*b_(e,t="utf8"){yield*gr(e,t,1)}D.exports.sync_gen_from_file=g_;D.exports.async_gen_from_file=b_;D.exports.async_gen_chunk_from_file=gr;D.exports.async_iter_to_array=f_;D.exports.sync_gen_from_str=pr;D.exports.async_gen_from_str=h_;D.exports.get_next_pos=u_;D.exports.sync_gen_pos_from_str=o_;D.exports.sync_gen_code_point_from_str=a_;D.exports.async_gen_pos_from_str=p_;D.exports.async_gen_code_point_from_str=d_});var A=a((nf,$r)=>{var mr={bk:{_self:0,eof:{_self:1,lc:2,blkc:3,hash:{_self:4,naked:5,quote:6},ref:{_self:7,naked:8,quote:9}}},k:{_self:10,eof:{_self:11,lc:12,blkc:13,hash:{_self:14,naked:15,quote:16},ref:{_self:17,naked:18,quote:19}}},ak:{_self:20,eof:{_self:21,lc:22,blkc:23,hash:{_self:24,naked:25,quote:26},ref:{_self:27,naked:28,quote:29}}},bv:{_self:30,eof:{_self:31,lc:32,blkc:33,hash:{_self:34,naked:35,quote:36},ref:{_self:37,naked:38,quote:39}}},v:{_self:40,eof:{_self:41,lc:42,blkc:43,hash:{_self:44,naked:45,quote:46},ref:{_self:47,naked:48,quote:49}}},av:{_self:50,eof:{_self:51,lc:52,blkc:53,hash:{_self:54,naked:55,quote:56},ref:{_self:57,naked:58,quote:59}}}};function q(e){return e instanceof Object?e._self:e}function m_(e){return e+1}function y_(e){return e+2}function $_(e){return e+3}function v_(e){return e+6}function k_(e){return e+5}function w_(e){return e+9}function x_(e){return e+8}function yr(e){return e%10!==0}var T_={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},S_={handling:0,handled:1};function E_(e,t,r){let n=mr;return e.$has_yield_sign()||yr(r)||t===q(n.av)&&r===q(n.bv)||t===q(n.av)&&r===q(n.bk)||t===q(n.av)&&r===q(n.k)||t===q(n.av)&&r===q(n.v)||t===q(n.av)&&r===q(n.ak)||t===q(n.v)&&r===q(n.bv)||t===q(n.v)&&r===q(n.bk)}$r.exports={STATE_DICT:mr,gtv:q,get_main_eofv_with_code:m_,get_lcmt_eofv_with_code:y_,get_blkcmt_eofv_with_code:$_,get_hash_quote_eofv_with_code:v_,get_hash_naked_eofv_with_code:k_,get_ref_quote_eofv_with_code:w_,get_ref_naked_eofv_with_code:x_,LEFTED_TYPE:T_,AVND_CACHE_STATE_DICT:S_,is_eofv:yr,is_should_yield:E_}});var Bt=a((lf,Ir)=>{var{is_nl:wr}=ke(),xr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},_t=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return xr(l,r,n,i)},C_=/^[0-7]$/,q_=/^[0-9a-fA-F]$/,ae=e=>C_.test(e),W=e=>q_.test(e),ct={b:"\b",f:"\f",n:`
|
|
2
|
-
`,r:"\r",t:" ",v:"\v"},Tr={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function A_(e){return Tr[e]}function Sr(e){return ct[e]}function I_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+_t(t,16,2)}function D_(e){e=Array.from(e);let t=e[0],r=e[1];if(W(t)&&W(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function N_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+_t(t,16,4)}function P_(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(W(t)&&W(r)&&W(n)&&W(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function O_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+_t(t,8,3)}function L_(e){let t="";e=Array.from(e);let r=e[0];if(ae(r)){t=t+r;let n=e[1];if(ae(n)){t=t+n;let l=e[2];ae(l)&&(t=t+l)}let i=parseInt(t,8);return String.fromCharCode(i)}}var d={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*R_(e){let t=Array.from(e);for(let r of t)yield r}function*vr(e,t){yield*t,yield*e}function Er(e,t,r,n,i=!1){if(typeof t=="string"){let _=t;t=c=>c===_}if(typeof(r==="string")&&r.length>0){let _=R_(r);e=vr(e,_)}else e=vr(e,r);let l={state:d.init,end:t,esc:n,g:e,curr:"",ch:e.next().value,offset:0};return l.ch!==void 0&&(l.offset=l.offset+1),i&&(l.rslt=""),l}function Dt(e){return e.ch===void 0||e.end(e.ch)&&e.state!==d.backslash||e.state===d.x||e.state===d.u||e.state===d.o}function Nt(e,t=!1){return e.ch===e.esc?(e.state=d.backslash,e.curr=""):(e.state=d.executing,t&&(e.rslt=e.rslt+e.ch),e.curr=e.ch),e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function kr(e,t,r,n,i,l,_){return _===!0?n===Cr?(e.state=d.x,e.ch="\\x"+t.join(""),e):n===qr?(e.state=d.u,e.ch="\\u"+t.join(""),e):(n===Ar&&(e.state=d.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=r,e)}function j_(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function ut(e,t,r,n,i=!0,l=!1,_=void 0,c=!1){let u;if(_!==void 0?u=_:(u=e.g.next().value,u!==void 0&&(e.offset=e.offset+1)),u===void 0)return e;let o=0,f=[],v;if(l?v=!0:v=r(u),v)o=o+1,f.push(u);else return e.state=d.executing,e.ch=u,e;for(;o<t;){if(u=e.g.next().value,u===void 0)return kr(e,f,u,n,i,c,tail=!0);if(e.offset=e.offset+1,v=r(u),v)o=o+1,f.push(u);else return kr(e,f,u,n,i,c,tail=!1)}return j_(e,f,u,n,c)}function Cr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function qr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Ar(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Pt(e,t=!1){return e.curr=Sr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Ot(e,t=!1){return ut(e,2,W,Cr,!0,!1,void 0,t)}function Lt(e,t=!1){return ut(e,4,W,qr,!0,!1,void 0,t)}function Rt(e,t=!1){return ut(e,3,ae,Ar,!1,!0,e.ch,t)}function jt(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function B_(e,t=i=>i==='"',r="",n="\\"){let i=Er(e,t,r,n,!0);for(i.state=d.executing;!Dt(i);)i.state===d.executing?Nt(i,!0):i.state===d.backslash&&(wr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=d.executing):i.ch in ct?Pt(i,!0):i.ch==="x"?Ot(i,!0):i.ch==="u"?Lt(i,!0):ae(i.ch)?Rt(i,!0):jt(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=d.succ,i.ch=""):i.state===d.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=d.eof,i.ch=""),i}function*Y_(e){let t=e;for(t.state=d.executing;!Dt(t);)t.state===d.executing?(Nt(t,!1),t.curr!==""&&(yield t.curr)):t.state===d.backslash&&(wr(t.ch)?(t.state=d.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ct?(Pt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Ot(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Lt(t,!1),t.curr!==""&&(yield t.curr)):ae(t.ch)?(Rt(t,!1),t.curr!==""&&(yield t.curr)):(jt(t,!1),t.curr!==""&&(yield t.curr)));return typeof t.ch=="string"&&t.end(t.ch)?(t.state=d.succ,t.ch=""):t.state===d.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=d.eof,t.ch=""),t}Ir.exports={CHAR_UNESC_DICT:ct,CHAR_ESC_DICT:Tr,escc:A_,unescc:Sr,escx:I_,unescx:D_,escu:N_,unescu:P_,esco:O_,unesco:L_,STATE_DICT:d,from_generator:B_,init:Er,handle_executing:Nt,is_terminated:Dt,handle_escc:Pt,esc_handle_engine:ut,handle_escx:Ot,handle_escu:Lt,handle_esco:Rt,handle_esc_other:jt,gen:Y_,prepend:xr,prepend_num:_t,is_odigit_ch:ae,is_hdigit_ch:W}});var Yr=a((_f,Br)=>{var{is_nl:F_}=ke(),xe=Bt(),Dr={line_comment:0,blk_comment:1},ee={init:0,executing:1,succ:2,eof:3,asterisk:4};function Nr(e){return{state:ee.init,g:e,rslt:"",ch:"",offset:0}}function Pr(e,t){return e.state=ee.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Or(e,t){return e.state=ee.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function Lr(e,t){return e.state=ee.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function Rr(e,t=""){let r=Nr(e);r.state=ee.executing;let n=xe.from_generator(r.g,F_,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===xe.STATE_DICT.eof?Pr(r,n):n.state===xe.STATE_DICT.succ?Or(r,n):Lr(r,n)}function jr(e,t=""){let r=Nr(e);r.state=ee.executing;let n;for(;;){if(n=xe.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===xe.STATE_DICT.eof)return Pr(r,n);if(n.state===xe.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Or(r,n);if(i!==void 0)r.rslt=r.rslt+n.rslt+"*",t=i,r.offset=r.offset-1;else return r.rslt=r.rslt+n.rslt,r.ch="*",r.state=ee.asterisk,r}else return Lr(r,n)}return r}function M_(e,t,r=""){return t===Dr.line_comment?Rr(e,r):jr(e,r)}Br.exports={TYPE_DICT:Dr,STATE_DICT:ee,lc_from_generator:Rr,blk_from_generator:jr,from_generator:M_}});var Yt=a((cf,Fr)=>{function G_(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function H_(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function X_(e){return parseInt(e).toString()===e}Fr.exports={rjson:G_,wjson:H_,is_int_str:X_}});var Ft=a((uf,Mr)=>{var W_=()=>Math.random()*9007199254740992;function J_(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function z_(e,t){return t.filter((r,n)=>e.includes(n))}function U_(e){return Object.entries(e).length===0}function V_(e){return Object.entries(e).map(n=>n[1])}function Q_(e){return Object.entries(e).map(n=>n[0])}function K_(e){return Object.entries(e).length}function Z_(e,t){for(let r in e)t(r,e[r]);return e}function ec(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function tc(e,t){for(let r in t)e[r]=t[r];return e}function sc(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function rc(e,t,r){return r=r.filter(n=>n[e]!==t),r}function nc(e,t,r){return r.findIndex(i=>i[e]===t)}function ic(e){return JSON.parse(JSON.stringify(e))}function lc(e,t){for(let r=0;r<e.length;r++){lyr=e[r];for(let n=0;n<lyr.length;n++)e[r][n]=t(e[r][n],r,n)}return e}function _c(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}Mr.exports={gen_guid:W_,range:J_,seqs_slct:z_,dict_length:K_,is_empty_dict:U_,dict_values:V_,dict_keys:Q_,dict_map:ec,dict_foreach:Z_,dict_plus:tc,dict_update:sc,dtb_kv_rm:rc,dtb_kv_get_seq:nc,dcp:ic,mat_map:lc,is_cu_property:_c}});var es=a((af,pn)=>{var $=Ft();function Ht(e){if($.is_empty_dict(e))return 0;{let t=$.dict_keys(e);return Math.max(...t)+1}}function Ge(e){return e!=null}function Hr(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ge(e._fstch)&&(e._fstch=e._fstch+t),Ge(e._lsib)&&(e._lsib=e._lsib+t),Ge(e._rsib)&&(e._rsib=e._rsib+t),Ge(e._parent)&&(e._parent=e._parent+t),e}function oe(e,t){let r=Ht(e);for(let n in t){let i=Hr(t[n],r);t[i._id]=i,delete t[n]}return t}function cc(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function uc(e,t=0){return{_id:Ht(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function Xr(e){return e._tree!==void 0}function te(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Xt(e){return e._lsib===null}function Wt(e){return e._rsib===null}function B(e){return e._fstch===null}function Wr(e,t){if(te(e))return!0;{let n=k(e,t);return F(n,t).length===1}}function Je(e){return te(e)||!Xr(e)}function at(e,t,r){if(!Je(t))return console.log("only root or uninited could be prepend"),e;let n=B(e);if(t._tree=e._tree,t._lsib=null,n)t._rsib=null,t._parent=e._id;else{let i=r[e._fstch];i._lsib=void 0,t._rsib=i._id,t._parent=void 0}return e._fstch=t._id,r[t._id]=t,e}function Jt(e,t,r){if(!Je(t))return console.log("only root or uninited could be append"),e;let n=B(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=he(e,r);i._parent=void 0,i._rsib=t._id,t._lsib=void 0}return t._parent=e._id,r[t._id]=t,e}function zt(e,t,r){if(!Je(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addrsib to root"),e;let n=Wt(e);return t._tree=e._tree,n?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t._id,t._lsib=void 0,r[t._id]=t,e}function Jr(e,t,r){if(!Je(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addlsib to root"),e;let n=Xt(e);if(t._tree=e._tree,n){let i=k(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=Y(e,r);i._rsib=t._id,t._lsib=void 0}return t._rsib=e._id,t._parent=void 0,r[t._id]=t,e}function zr(e,t,r,n){let i=F(t,n),l=i.length;if(l===0)return at(t,r,n);if(e<=l&&e>=0){if(e===0)return at(t,r,n);if(e===l)return Jt(t,r,n);{let c=i[e-1];return zt(c,r,n)}}else return console.log("not in range!!"),t}function Te(e,t){for(let r in t)t[r]._tree=e._tree}function ac(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=at(e,i,t),Te(e,r),$.dict_plus(t,r),e}function oc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Jt(e,i,t),Te(e,r),$.dict_plus(t,r),e}function fc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=zt(e,i,t),Te(e,r),$.dict_plus(t,r),e}function hc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Jr(e,i,t),Te(e,r),$.dict_plus(t,r),e}function dc(e,t,r,n){n=oe(r,n);let i=$.dict_keys(n)[0],l=re(n[i],n);return t=zr(e,t,l,r),Te(t,n),$.dict_plus(r,n),t}function He(e,t){let r=M(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function Xe(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function Ur(e){return e._fstch=null,e}function We(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Se(e,t){if(te(e))return[e,t];if(Wr(e,t)){let n=t[e._parent];Ur(n);let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}else if(Xt(e)){let n=L(e,t);n._lsib=null;let i=k(e,t);i._fstch=e._rsib;let l=He(e,t),_=Xe(l,t);return We(e),[e,_]}else if(Wt(e)){let n=Y(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}else{let n=Y(e,t);n._rsib=e._rsib;let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}}function pc(e,t){let r=fe(e,t);return r===null?[e,t]:Se(r,t)}function gc(e,t){let r=he(e,t);return r===null?[e,t]:Se(r,t)}function bc(e,t,r){let n=Vr(e,t,r);return n===null?[t,r]:Se(n,r)}function mc(e,t,...r){let n=Qr(e,t,...whiches);for(let i=0;i<n.length;i++)Se(n[i],t);return[e,t]}function yc(e,t){let r=F(e,t);for(let n=0;n<r.length;n++)Se(r[n],t);return t}function fe(e,t){return e._fstch===null?null:t[e._fstch]}function F(e,t){let r=[],n=fe(e,t);for(;n!==null;)r.push(n),n=L(n,t);return r}function he(e,t){let r=F(e,t);return r.length===0?null:r[r.length-1]}function Vr(e,t,r){let n=F(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function Qr(e,t,...r){let n=F(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function Kr(e,t,r=!1){let n=e,i=L(e,t);for(;i!==null;)n=i,i=L(i,t);return r||n._id!==e._id?n:null}function $c(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l<n&&i.push(r[l]);return i}function vc(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l>n&&i.push(r[l]);return i}function se(e,t,r=!1){let n=k(e,t),i;return n!==null?i=F(n,t):i=[e],r||(i=$.dtb_kv_rm("_id",e._id,i)),i}function kc(e,t,r=!1){let n=se(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function wc(e,t,r){let n=se(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function xc(e,t,...r){let n=se(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function Tc(e,t){let r=se(e,t,!0);return $.dtb_kv_get_seq("_id",e._id,r)}function Y(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function L(e,t){return e._rsib===null?null:t[e._rsib]}function E(e,t){return ot(e,t,!0).length-1}function Zr(e,t){let r=E(e,t),i=M(e,t).map(_=>E(_,t));return Math.max(...i)-r+1}function Sc(e,t){return B(e)?null:E(e,t)+1}function Ec(e,t){if(B(e))return null;{let n=E(e,t),l=M(e,t).map(c=>E(c,t));return Math.max(...l)}}function Cc(e,t,r){let n=E(t,r);return Zr(t,r)<=e?null:n+e}function en(e,t){let r=re(e,t),n=M(r,t),i=E(e,t);return n.filter(_=>E(_,t)===i)}function Mt(e,t){let r=en(e,t);return $.dtb_kv_get_seq("_id",e._id,r)}function qc(e,t){return M(e,t).length}function re(e,t){let r=e,n=k(e,t);for(;n!==null;)r=n,n=k(n,t);return r}function k(e,t){let r;if(te(e))r=null;else{let n=Kr(e,t,!0);r=t[n._parent]}return r}function ot(e,t,r=!1){let n=[],i=k(e,t);for(;i!==null;)n.push(i),i=k(i,t);return r&&n.unshift(e),n}function Ac(e,t,r){let n=ot(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function Ic(e,t,...r){let n=ot(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function tn(e,t){let r=k(e,t);for(;r!==null;){let n=L(r,t);if(n!==null)return n;r=k(r,t)}return null}function sn(e,t){let r=fe(e,t);if(r!==null)return r;{let n=L(e,t);return n!==null?n:tn(e,t)}}function rn(e,t){let r=e,n=he(e,t);for(;n!==null;)r=n,n=he(n,t);return r}function Dc(e,t){if(te(e))return null;if(B(e)){let n=Y(e,t);return n!==null?n:k(e,t)}else{let n=Y(e,t);return n!==null?B(n)?n:rn(n,t):k(e,t)}}function M(e,t){let r=E(e,t),n=[];for(;e!==null&&(n.push(e),e=sn(e,t),!(e!==null&&E(e,t)<=r)););return n}function Ut(e,t){let r=e,n=fe(e,t);for(;n!==null;)r=n,n=fe(n,t);return r}function nn(e,t){let r=L(e,t);return r===null?k(e,t):Ut(r,t)}function ln(e,t){let r=k(e,t);for(;r!==null;){let n=Y(r,t);if(n!==null)return n;r=k(r,t)}return null}function Nc(e,t){if(B(e)){let n=Y(e,t);return n===null?ln(e,t):n}else return he(e,t)}function _n(e,t){let r=[],n=Ut(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=nn(n,t);return r}function Gt(e){$.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function cn(e,t){let r=e._$visited;if(B(e))if(r){let i=L(e,t);return i===null?k(e,t):i}else return e._$visited=!0,e;else if(r){let i=L(e,t);return i===null?k(e,t):i}else return e._$visited=!0,fe(e,t)}function Pc(e,t,r){if(B(t)){if(e)return t;{let i=Y(t,r);return i===null?k(t,r):i}}else{if(e)return he(t,r);{let i=Y(t,r);return i===null?k(t,r):i}}}function un(e,t){return t._$visited&&e===t._id}function an(e,t,r=!1,n=!0){let i=[];Gt(t);let l=e._id;for(;!un(l,e);)r?i.push($.dcp(e)):i.push(e),e=cn(e,t);return r?i.push($.dcp(e)):i.push(e),n&&Gt(t),i}function Oc(e,t){let r={};r._depth=E(e,t),r._breadth=Mt(e,t);let n=k(e,t);return r._pbreadth=n===null?null:Mt(n,t),r._id=e._id,r}function Gr(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function Vt(e,t){let r=[],n=e[0],i=[Gr(n)];for(i[0].ele._pbreadth=null;i.length>0;){let l=[];for(let c=0;c<i.length;c++){i[c].ele._breadth=c,i[c].ele._depth=r.length;let u=F(i[c].nd,t);u=u.map(o=>Gr(o)),u.forEach((o,f)=>{o.ele._pbreadth=i[c].ele._breadth,i[c].ele._children.push([r.length+1,l.length+f])}),l=l.concat(u)}let _=i.map(c=>c.ele);r.push(_),i=l}return r}function on(e,t){return _n(e[0],t)}function fn(e,t,r=!1,n=!0){return an(e[0],t,r,n)}function Lc(e,t){let r=Qt(e,t);return Vt(r,t)}function Qt(e,t){let r=e[e.length-1];return M(r,t)}function Rc(e,t,r=!1,n=!0){let i=Qt(e,t);return fn(i,t,r,n)}function jc(e,t){let r=Kt(e,t);return Vt(r,t)}function Kt(e,t){let r=e[0];return M(r,t)}function Bc(e,t){let r=Kt(e,t);return on(r,t)}function Zt(e,t,r=!1){let n=M(e,t);return r||n.splice(0,1),n}function Yc(e,t){return F(e,t)}function Fc(e,t){let r=Zt(e,t,!1),n=sdfs.map(l=>E(l,t)),i=Math.max(...n);return r=r.filter(l=>E(l,t)===i),r}function hn(e,t,r){let n=E(t,r),i=Zt(t,r,!1),l=sdfs.map(_=>E(_,r));return i=i.filter(_=>E(_,r)===n+e),i}function Mc(e,t,...r){let n=r.map(i=>hn(i,e,t));return n=Array.prototype.concat(...n),n}function dn(e){let t=$.dict_keys(e)[0],r=e[t];return re(r,e)}function Gc(e){let t=dn(e);return M(t,e)}pn.exports={calc_next_id:Ht,update_nodes_ids:oe,creat_root:cc,creat_nd:uc,is_inited:Xr,is_root:te,is_fstch:Xt,is_lstch:Wt,is_leaf:B,is_lonely:Wr,is_id:Ge,is_connectable:Je,prepend_child:at,append_child:Jt,insert_child:zr,add_rsib:zt,add_lsib:Jr,get_fstch:fe,get_rsib:L,get_children:F,get_lstch:he,get_which_child:Vr,get_some_children:Qr,get_fstsib:kc,get_lstsib:Kr,get_preceding_sibs:$c,get_following_sibs:vc,get_sibs:se,get_which_sib:wc,get_some_sibs:xc,get_sibseq:Tc,get_lsib:Y,get_rsib:L,get_lyr:en,get_breadth:Mt,get_count:qc,get_depth:E,get_height:Zr,get_fst_lyr_des_depth:Sc,get_lst_lyr_des_depth:Ec,get_which_lyr_des_depth:Cc,get_root:re,get_parent:k,get_ances:ot,get_which_ance:Ac,get_some_ances:Ic,get_rsib_of_fst_ance_having_rsib:tn,get_sdfs_next:sn,get_drmost_des:rn,get_sdfs_prev:Dc,get_sdfs:M,get_lsib_of_fst_ance_having_lsib:ln,get_dlmost_des:Ut,get_edfs_next:nn,get_edfs_prev:Nc,get_edfs:_n,clear_$visited:Gt,get_sedfs_next:cn,is_sedfs_traverse_finished:un,get_sedfs_prev:Pc,get_sedfs:an,get_deses:Zt,get_fst_lyr_deses:Yc,get_lst_lyr_deses:Fc,get_which_lyr_deses:hn,get_some_lyrs_deses:Mc,nd2ele:Oc,sdfs2mat:Vt,sdfs2edfs:on,sdfs2sedfs:fn,edfs2mat:Lc,edfs2sdfs:Qt,edfs2sedfs:Rc,sedfs2mat:jc,sedfs2sdfs:Kt,sedfs2edfs:Bc,update_disconnected_nodes:He,update_orig_nodes:Xe,leafize:Ur,rootize:We,disconnect:Se,rm_fstch:pc,rm_lstch:gc,rm_which:bc,rm_some:mc,rm_all:yc,update_treeid:Te,update_one_nodeid:Hr,update_nodes_ids:oe,prepend_child_tree:ac,append_child_tree:oc,add_rsib_tree:fc,add_lsib_tree:hc,insert_child_tree:dc,get_root_via_tree:dn,tree2sdfs:Gc}});var $n=a((of,yn)=>{function gn(e="E"){class t extends Event{#t;constructor(n,i){super(n),this.#t=i}get data(){return this.#t}set data(n){this.#t=n}}return t}var bn=gn();function mn(e="ET"){class t extends EventTarget{#t=new Map;addEventListener(n,i){super.addEventListener(n,i),this.#t.set(n,i)}ls(){return this.#t}removeEventListener(n){super.removeEventListener(n),this.#t.delete(n)}dispatch(n,i){let l=new bn(n,i);return this.dispatchEvent(l),l}}return t}var Hc=mn();yn.exports={creat_event_cls:gn,E:bn,creat_event_target_cls:mn,ET:Hc}});var Qn=a((ff,Vn)=>{var Pn=Yt(),Ue=Ft(),de=es(),{ET:vn}=$n(),Xc=["_fstch","_lsib","_rsib","_parent","_tree"];function On(e){return e._tree!==void 0}function ts(e){return e._tree===e}function Wc(e){return e._lsib===null}function Jc(e){return e._rsib===null}function zc(e){return e._fstch===null}function Uc(e){return e.$sibs(!0).length===1}function mt(e){return ts(e)||!On(e)}function kn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function wn(e,t){let r=0,n=t._fstch;for(;;){if(r===e)return n;if(n===null)return n;n=n._rsib,r=r+1}}function xn(e,...t){let r=[],n=0,i=e._fstch;for(;;){if(t.includes(n))r.push(i);else if(i===null)return r;i=i._rsib,n=n+1}}function ss(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function Vc(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function Ln(e,t=!1){let r=e._rsib,n=e;for(;r!==null;)n=r,r=r._rsib;return t||n!==e?n:null}function yt(e,t=!1){let r=rs(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function Qc(e){let t=yt(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function ls(e){let t=[],n=yt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function Rn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function jn(e,t=!1){let r=ls(e),n=Rn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function Kc(e,t){let r=yt(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function Zc(e,...t){return jn(e,!0).filter((i,l)=>t.includes(l))}function Tn(e){return ls(e).length}function eu(e,t=!1){return e.$sibs(t).length}function rs(e){return Ln(e,!0)._parent}function tu(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function su(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function gt(e,t=!1){let r=[],n=e;for(t&&r.push(n),n=n.$parent();n!==null;)r.push(n),n=n.$parent();return r}function ru(e,...t){return gt(e,!0).filter((i,l)=>t.includes(l))}function nu(e,t=!1){return gt(e,t).length}function iu(e){let t=e.$parent();return t===null?null:t.$lsib()}function lu(e){let t=e.$parent();return t===null?null:t.$rsib()}function _u(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function cu(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function uu(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function au(e){let t=e.$parent();return t===null?null:t.$breadth()}function ou(e){return e.$lyr().indexOf(e)}function fu(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function hu(e){let r=e.$root().$edfs(),n;if(e.$is_leaf())n=r.indexOf(e);else{let i=e.$dlmost_des();n=r.indexOf(i)}return r=r.slice(0,n+1),offset=r.filter(i=>i.$is_leaf()).length-1,offset}function Sn(e,t=!1){let r=Yn(e),n=ge(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function du(e){let t=e.$deses(!1),r=t.map(i=>i.$depth()),n=Math.max(...r);return t=t.filter(i=>i.$depth()===n),t}function pu(e,t){let r=t.$depth(),n=t.$deses(!1),i=n.map(l=>l.$depth());return n=n.filter(l=>l.$depth()===r+e),n}function gu(e,...t){let r=e.$depth(),n=t.map(_=>_+r),i=e.$deses(!1),l=i.map(_=>_.$depth());return i=i.filter(_=>n.includes(_.$depth())),i}function ns(e,t){if(!mt(t))return console.log("only root or uninited could be prepend"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._lsib=null,r)t._rsib=null,t._parent=e;else{let n=e._fstch;n._lsib=void 0,t._rsib=n,t._parent=void 0}return e._fstch=t,t}function is(e,t){if(!mt(t))return console.log("only root or uninited could be append"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._rsib=null,r)e._fstch=t,t._lsib=null;else{let n=e.$lstch();n._parent=void 0,n._rsib=t,t._lsib=void 0}return t._parent=e,t}function Bn(e,t){if(!mt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addrsib to root"),e;let r=e.$is_lstch();return t._tree=e._tree,r?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t,t._lsib=void 0,t}function bu(e,t){if(!mt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addlsib to root"),e;let r=e.$is_fstch();if(t._tree=e._tree,r){let n=e.$parent();e._lsib=void 0,t._lsib=null,n._fstch=t}else{let n=e.$lsib();n._rsib=t,t._lsib=void 0}return t._rsib=e,t._parent=void 0,t}function En(e,t,r){let n=ss(t),i=n.length;if(i===0)r=ns(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=ns(t,r);else if(e===i)r=is(t,r);else{let _=n[e-1];r=Bn(_,r)}return r}function mu(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function yu(e){let t=e.$fstch();if(t!==null)return t;{let r=e.$rsib();return r!==null?r:e.$rsib_of_fst_ance_having_rsib()}}function Yn(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function $u(e){if(e.$is_root())return null;if(e.$is_leaf()){let r=e.$lsib();return r!==null?r:e.$parent()}else{let r=e.$lsib();return r!==null?r.$is_leaf()?r:r.$drmost_des():e.$parent()}}function ge(e){let t=e.$depth();if(e===null)return[];{let r=[e];for(e=e.$sdfs_next();e!==null&&e.$depth()>t;)r.push(e),e=e.$sdfs_next();return r}}function vu(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function ku(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function wu(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function xu(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function Tu(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function Fn(e){let t=e.$visited;if(e.$is_leaf())if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e;else if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e.$fstch()}function Su(e,t){if(t.$is_leaf()){if(e)return t;{let n=t.$lsib();return n===null?t.$parent():n}}else{if(e)return t.$lstch();{let n=t.$lsib();return n===null?t.$parent():n}}}function Eu(e){e.$sdfs().forEach(r=>{delete r.$visited})}function Cu(e,t){return t.$visited&&e===t}function Cn(e){Eu(e);let t=[],r=new Set,n=e;for(;!Cu(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=Fn(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function qu(e){return e._fstch=null,e}function ft(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function ht(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function pe(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();qu(r);let n=ht(e);return ft(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=ht(e);return ft(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=ht(e);return ft(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=ht(e);return ft(e),e}}function qn(e){let t={};return t._nd=e,t._children=[],t}function An(e){let t=[],r=e[0],n=[qn(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let _=0;_<n.length;_++){n[_]._breadth=_,n[_]._depth=t.length;let c=n[_]._nd.$children();c=c.map(u=>qn(u)),c.forEach((u,o)=>{u._pbreadth=n[_]._breadth,n[_]._children.push([t.length+1,i.length+o])}),i=i.concat(c)}let l=n;t.push(l),n=i}return t}function In(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ue.is_cu_property(i)&&(n[i]=r[i]);return n}function Au(e,t="_children"){let r=e[0][0],n=In(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let _=0;_<i.length;_++){let c=i[_],u=c.d,o=c.ele,v=c.ele._children.map(T=>e[T[0]][T[1]]);for(let T=0;T<v.length;T++){let Q=v[T],Ls=In(Q,t);u[t].push(Ls);let Tl={d:Ls,ele:Q};l.push(Tl)}}i=l}return n}function Dn(e,t="_children"){let r=new J;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ue.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function Iu(e,t="_children"){let r=Dn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let _=n[l].d,c=n[l].nd,u=_[t]===void 0?[]:_[t];for(let o=0;o<u.length;o++){let f=u[o],v=Dn(f,t);c.$append_child(v);let T={d:f,nd:v};i.push(T)}}n=i}return r}function Du(e){let t=["_fstch","_lsib","_rsib","_parent","_tree","$guid","_guid","_id","$open_at","$close_at"];e._fstch=void 0,e._lsib=void 0,e._rsib=void 0,e._parent=void 0,e._tree=void 0,e.$guid=void 0,e._guid=void 0,e._id=void 0,e.$open_at=void 0,e.$close_at=void 0;for(let r of t)Object.defineProperty(e,r,{enumerable:!1})}function Nu(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function Pu(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var Ou=["$fstch","$rsib","$parent"];function Lu(e){if(e.$fstch()!==null)return["$fstch"];if(e.$rsib()!==null)return["$rsib"];{let n=[],i=e.$parent();for(;i!==null;)if(n.push("$parent"),i.$rsib()!==null){n.push("$rsib");break}else i=i.$parent();return n}}function Ru(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var Mn={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function ju(e,t){for(let r=0;r<t.length;r++){let n=Mn[t[r]];e=e[n]()}return e}function Bu(e){let t=new J,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=ju(r,i)}return t}function Yu(e,t,r){if(r&&(t=t.$clone()),!e.$is_root())if(e.$is_lonely()){let n=e.$parent();e.$disconn(),n.$append_child(t)}else if(e.$is_lstch()){let n=e.$lsib();e.$disconn(),n.$add_rsib(t)}else{let n=e.$rsib();e.$disconn(),n.$add_lsib(t)}return t}var N=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){Du(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ue.gen_guid()),r&&(this.#t=new vn)}get opt(){return this.#e}enable_et(){this.#t=new vn}disable_et(){this.#t=null}get et(){return this.#t}regis_recv_from_handler(t){let r=function(n){t(n.data.src,n.data.msg)};this.et.addEventListener("$msg__",r)}send_to(t,r){t.et.dispatch("$msg__",{src:this,msg:r})}$is_inited(){return On(this)}$is_root(){return ts(this)}$is_fstch(){return Wc(this)}$is_lstch(){return Jc(this)}$is_leaf(){return zc(this)}$is_lonely(){return Uc(this)}$fstch(){return this._fstch}$lstch(){return kn(this)}$which_child(t){return wn(t,this)}$some_children(...t){return xn(this,...t)}$children(){return ss(this)}$children_count(){return Vc(this)}$rsib(){return this._rsib}$lsib(){return Qc(this)}$fstsib(t=!1){return yt(this,t)}$lstsib(t=!1){return Ln(this,t)}$psibs(){return ls(this)}$fsibs(){return Rn(this)}$which_sib(t){return Kc(t,this)}$some_sibs(...t){return Zc(this,...t)}$sibseq(){return Tn(this)}$sibs(t=!1){return jn(this,t)}$sibs_count(t=!1){return eu(this,t)}$parent(){return rs(this)}$root(){return tu(this)}$ances(t=!1){return gt(this,t)}$which_ance(t){return su(t,this)}$some_ances(...t){return ru(this,...t)}$ances_count(t=!1){return nu(this,t)}$prepend_child(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,ns(this,t)}$insert_child(t,r){return r=r===void 0?new N(this.#e.with_id,this.#e.with_et):r,En(t,this,r)}$append_child(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,is(this,t)}$clone(){if(ts(this)){let t=pt(this);return bt(t)}else{let t=Tn(this),r=rs(this);pe(this);let n=pt(this),i=bt(n);return En(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new N(this.#e.with_id,this.#e.with_et):r.$clone();l=is(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,Bn(this,t)}$add_lsib(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,bu(this,t)}$rsib_of_fst_ance_having_rsib(){return mu(this)}$sdfs_next(){return yu(this)}$drmost_des(){return Yn(this)}$sdfs_prev(){return $u(this)}$sdfs(){return ge(this)}$dlmost_des(){return vu(this)}$edfs_next(){return ku(this)}$lsib_of_fst_ance_having_lsib(){return wu(this)}$edfs_prev(){return xu(this)}$edfs(){return Tu(this)}$offset(){return hu(this)}$sedfs_next(){return Fn(this)}$sedfs_prev(t){return Su(this)}$sedfs(){return Cn(this)}$deses(t=!1){return Sn(this,t)}$lst_lyr_deses(){return du(this)}$which_lyr_deses(t){return pu(t,this)}$some_lyrs_deses(...t){return gu(this,...t)}$count(t=!0){return Sn(this,t).length}$depth(t=!1){return gt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return au(this)}$breadth(){return ou(this)}$width(){return fu(this)}$lyr(){return uu(this)}$lcin(){return _u(this)}$rcin(){return cu(this)}$luncle(){return iu(this)}$runcle(){return lu(this)}$sdfs_repr(t=Nu,r=!1){let n=this.$root(),i=ge(n),c=ge(this).map((u,o)=>t(u,o,i)).join(`
|
|
3
|
-
`);if(console.log(c),r)return c}$sedfs_repr(t=
|
|
4
|
-
`);if(console.log(_),r)return _}$disconn(){return pe(this)}$rm_fstch(){let t=this._fstch;return pe(t)}$rm_lstch(){let t=
|
|
5
|
-
`){return"//"+Ve(this.value)+t}},ms=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Ve(this.value)+"*/"}};ei.exports={UndefinedLiteral:as,NullLiteral:os,BooleanLiteral:fs,NumericLiteral:hs,StringLiteral:ds,ArrayExpression:ps,ObjectExpression:gs,_Ref:bs,CommentLine:$t,CommentBlock:ms,_ndtree:Vu}});var _i=a((wf,li)=>{var{empty:vs}=w(),{UndefinedLiteral:ti,NullLiteral:si,BooleanLiteral:ri,NumericLiteral:ni,StringLiteral:ys,ArrayExpression:ta,ObjectExpression:sa,CommentLine:ra,CommentBlock:na,_Ref:$s}=kt();function ia(e,t){let r=vs,n=e;for(;n!==null;){if(n.key===t){r=n;break}else if(n.hashes.has(t)){r=n;break}else if(n.$sibseq().toString()===t){r=n;break}n=n.$sdfs_prev()}return r!==null?r:vs}function ii(e,t){return e instanceof ti?new ti("undefined",t):e instanceof si?new si("null",t):e instanceof ri?new ri(e.vto_rawstr(),t):e instanceof ni?new ni(e.vto_rawstr(),t):e instanceof ys?new ys(e.value,t):e instanceof ra||e instanceof na?new ys(e.value,t):e instanceof ta?new $s(e,t):e instanceof sa?new $s(e,t):e instanceof $s?(e=e.value,ii(e,t)):vs}li.exports={find_refnd_with_hash:ia,clone:ii}});var yi=a((xf,be)=>{var la=Array,_a=w(),{empty:y,parse0:ca}=w(),Ke=class extends la{get lst(){return this[this.length-1]}set lst(t){this[this.length-1]=t}get top(){return this[this.length-1]}set top(t){this[this.length-1]=t}get fst(){return this[0]}set fst(t){this[0]=t}get bot(){return this[0]}set bot(t){this[0]=t}*gen_from_lst(){for(let t=this.length-1;t>-1;t--)yield this[t]}};function*ua(e){for(let t of e)yield t;e=null}function*aa(e,t){yield*t,yield*e}var Ze=Bt(),ks=ke(),Ce=Yr(),{UndefinedLiteral:oa,NullLiteral:fa,BooleanLiteral:ci,NumericLiteral:ha,StringLiteral:ui,CommentLine:Qe,CommentBlock:da,ArrayExpression:ws,ObjectExpression:pa}=kt(),H=A(),ai=H.gtv,ne=H.STATE_DICT,xs=H.LEFTED_TYPE,Ee=H.AVND_CACHE_STATE_DICT,G=w(),m=Z(),oi=_i();function*bi(e){for(;e.length>0;)yield e.pop()}function fi(e){let t;return e.__is_sync_mode()?t=Ze.from_generator(e.g,e.ch_cache.curr):t=Ze.from_generator(bi(e.unshift_cache),e.ch_cache.curr),t}function hi(e,t,r){e.lefted.type=xs.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=H.get_main_eofv_with_code(e.state)}function mi(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function ga(e,t,r){return mi(e,t,r),e.state=H.get_lcmt_eofv_with_code(e.state),e}function ba(e,t,r){return mi(e,t,r),e.state=H.get_blkcmt_eofv_with_code(e.state),e}function ma(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(bi(e.unshift_cache),e.ch_cache.curr),r}function di(e,t,r,n){let i=ma(e,r);return i.state!==Ce.STATE_DICT.succ?((t===Qe?ga:ba)(e,i,n),y):new t(i.rslt)}function pi(e,t){let r=new t(e.str_cache.k);return e.$set_avnd_cache(r),e.$mv_key_to_nd(r),e.$mv_kcmt_to_kcmt(),e.$mv_bvcmt_to_bvcmt(),r.open=e.ch_cache.curr,e.stack.lst.append_child(r),e.stack.push(r),t===ws?e.state=ne.bv:e.state=ne.bk,e}var Ts=Symbol("root_lblk_ch"),gi=Symbol("root_rblk_ch"),qe=class{#t=ai(ne.bv);#e=new Ke;constructor(t,r=" "){if(r!==y){let i=ua(r);t=aa(t,i)}this.g=t,this.lefted={type:y,data:y},this.ch_cache={tmp:y,curr:y},this.str_cache={k:y,v:y,maybe_vquote:y},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new ws;this.stack.push(n),n.open=Ts,this.avnd_cache={state:Ee.handling,data:n},this.unshift_cache=new Ke,this.mode="sync"}__use_sync_mode(){this.mode="sync"}__use_async_mode(){this.mode="async"}__is_sync_mode(){return this.mode==="sync"}__is_async_mode(){return this.mode==="async"}__unshift_g(t){t=t??this.ch_cache.curr;for(let r of t)this.unshift_cache.unshift(r)}$has_yield_sign(){return this.avnd_cache.state===Ee.handled}$set_yield_sign(){this.avnd_cache.state=Ee.handled}$clear_yield_sign(){this.avnd_cache.state=Ee.handling}get state(){return this.#t}set state(t){this.#t=ai(t)}get stack(){return this.#e}$next_ch(){return this.unshift_cache.length>0?this.ch_cache.curr=this.unshift_cache.pop():this.ch_cache.curr=this.g.next().value,this.ch_cache.curr}$is_currch_eof(){return this.ch_cache.curr===void 0}$handle_main_eof(){return this.state=H.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return m.commas.has(this.ch_cache.curr)}$is_currch_colon(){return m.colons.has(this.ch_cache.curr)}$is_currch_ws(){return ks.is_ws(this.ch_cache.curr)}$is_currch_quote(){return m.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===m.slash}$is_currch_asterisk(){return this.ch_cache.curr===m.asterisk}$is_currch_ary_lblk(){return m.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return m.obj_blks.lhas(this.ch_cache.curr)}$is_currch_lblk(){return this.$is_currch_ary_lblk()||this.$is_currch_obj_lblk()}$is_currch_ary_rblk(){return m.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return m.obj_blks.rhas(this.ch_cache.curr)}$is_currch_rblk(){return this.$is_currch_ary_rblk()||this.$is_currch_obj_rblk()}$is_currch_hash(){return m.hash===this.ch_cache.curr}$is_currch_ref(){return m.ref===this.ch_cache.curr}$mv_avcmt_to_avcmt(){let t=this.avnd_cache.data;t.avcmt=this.cmt_cache.avcmt,this.cmt_cache.avcmt=[]}$change_state_when_end_av(t=y,r=y){return this.stack.lst.is_ary()?t===y?this.state=ne.bv:(this.state=ne.v,this.str_cache.v=t,r===y||(this.str_cache.maybe_vquote=r)):t===y?this.state=ne.bk:(this.state=ne.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===y){let n=ca(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===G.TYPE_DICT.UndefinedLiteral?r=new oa(this.str_cache.k):n.type===G.TYPE_DICT.NullLiteral?r=new fa(this.str_cache.k):n.type===G.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new ci("true",this.str_cache.k):n.type===G.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new ci("false",this.str_cache.k):n.type===G.TYPE_DICT.StringLiteral?r=new ui(n.value,this.str_cache.k):r=new ha(n,this.str_cache.k)}else r=new ui(t,this.str_cache.k);return this.str_cache.v=y,this.str_cache.maybe_vquote=y,r}$mv_kcmt_to_kcmt(){let t=this.avnd_cache.data;t.kcmt=this.cmt_cache.kcmt,this.cmt_cache.kcmt=[]}$mv_bvcmt_to_bvcmt(){let t=this.avnd_cache.data;t.bvcmt=this.cmt_cache.bvcmt,this.cmt_cache.bvcmt=[]}$mv_key_to_nd(){let t=this.avnd_cache.data;return t.key=this.str_cache.k,this.str_cache.k=y,t.key}$set_avnd_cache(t,r=Ee.handling){return this.avnd_cache.data=t,this.avnd_cache.state=r,this.avnd_cache}$setup_leafnd(){let t=this.$vcache_to_nd();this.$set_avnd_cache(t,Ee.handling),this.$mv_key_to_nd(),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),this.$mv_avcmt_to_avcmt(),this.stack.lst.append_child(t)}$handle_quote(t){let r=fi(this);return r.state!==Ze.STATE_DICT.succ?(hi(this,r,t),y):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=y}$refresh_key(t=y){t===y?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return di(this,Qe,Ce.lc_from_generator,xs.lcmt)}$handle_blkcmt(){return di(this,da,Ce.blk_from_generator,xs.blkcmt)}$push_kcmt(t){t.type=Ce instanceof Qe?G.TYPE_DICT.CommentLine.k:G.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Qe?"CommentLine":"CommentBlock";t.type=G.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ce instanceof Qe?G.TYPE_DICT.CommentLine.k:G.TYPE_DICT.CommentBlock.k,this.cmt_cache.avcmt.push(t)}$mv_avcmt_to_ttcmt(t){t=t??this.avnd_cache.data.$parent();for(let r of this.cmt_cache.avcmt)t.$append_child(r);this.cmt_cache.avcmt=[]}$open_nonleaf_nd(){if(m.array_blks.lhas(this.ch_cache.curr))return pi(this,ws);if(m.obj_blks.lhas(this.ch_cache.curr))return pi(this,pa)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return m[r].getl(this.ch_cache.curr)===t.open}$close_nonleaf_nd(){let t=this.stack.lst;t.close=this.ch_cache.curr,this.$set_avnd_cache(t),this.stack.pop(),this.state=ne.av}$get_hash_or_ref(t="#"){let r=y,n=this.$next_ch(),i="";for(;!ks.is_ws(n)&&!m.commas.has(n)&&!m.colons.has(n)&&!m.array_blks.has(n)&&!m.obj_blks.has(n)&&n!==m.hash&&n!==m.ref&&n!==m.slash;)if(m.quotes.has(n)){let l=fi(this);if(l.state!==Ze.STATE_DICT.succ)return hi(this,l,this.ch_cache.curr),t===m.hash?this.state=H.get_hash_quote_eofv_with_code(this.state):this.state=H.get_ref_quote_eofv_with_code(this.state),r;i=i+l.rslt,n=this.$next_ch()}else{if(n===void 0)return $handle_main_eof(),r;i=i+n,n=this.$next_ch()}return this.__unshift_g(n),r=i,r}$is_hash_of_pnd(){return this.stack.lst.$children().length===0}$find_ref(t){let r=this.stack.lst,n=r.$lstch();return n===null&&(n=r),oi.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=oi.clone(t,this.str_cache.k);this.$set_avnd_cache(n),this.$mv_key_to_nd(n),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),r.append_child(n)}};qe[Ts]=Ts;qe[gi]=gi;qe.MODES=["sync","async"];be.exports=qe;be.exports.Stack=Ke;be.exports._type_util=_a;be.exports._esc=Ze;be.exports._cmt=Ce;be.exports._ws=ks});var wi=a((Tf,ki)=>{var{empty:$i}=w(),vi=A(),Ae=vi.gtv,X=vi.STATE_DICT;function ya(e){let t=e.state;return t===Ae(X.bk)||(t===Ae(X.k)||t===Ae(X.ak)?(e.str_cache.k=$i,e.state=X.bk):t===Ae(X.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=X.bv:e.state=X.bk):t===Ae(X.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ae(X.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}ki.exports=ya});var Si=a((Ef,Ti)=>{var{empty:Sf}=w(),xi=A(),Ie=xi.gtv,ie=xi.STATE_DICT;function $a(e){let t=e.state;return t===Ie(ie.bk)||(t===Ie(ie.k)||t===Ie(ie.ak)?e.state=ie.bv:t===Ie(ie.bv)||(t===Ie(ie.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ie(ie.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Ti.exports=$a});var Ss=a((qf,Ci)=>{var{empty:Cf}=w(),Ei=A(),De=Ei.gtv,le=Ei.STATE_DICT;function va(e){let t=e.state;return t===De(le.bk)||(t===De(le.k)?e.state=le.ak:t===De(le.ak)||t===De(le.bv)||(t===De(le.v)?(e.$setup_leafnd(),e.state=le.av):De(le.av))),e}Ci.exports=va});var Di=a((Af,Ii)=>{var{empty:qi}=w(),Ai=A(),Ne=Ai.gtv,z=Ai.STATE_DICT;function ka(e,t){let r=e.state,n=e.$handle_quote(t);return n===qi||(r===Ne(z.bk)?(e.str_cache.k=n,e.state=z.k):r===Ne(z.k)?e.str_cache.k=e.str_cache.k+n:r===Ne(z.ak)?(e.$refresh_key(n),e.state=z.k):r===Ne(z.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=z.v):r===Ne(z.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=qi):r===Ne(z.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Ii.exports=ka});var Li=a((If,Oi)=>{var{empty:Ni}=w(),Es=A(),O=Es.gtv,S=Es.STATE_DICT,wa=Es.LEFTED_TYPE,me=Z();function Pi(e,t){let r=e.state,n=e[t]();if(n!==Ni){let i=e.stack.lst;if(r===O(S.bk))i.append_ttcmt(n);else if(r===O(S.k))e.$push_kcmt(n),e.state=S.ak;else if(r===O(S.ak))e.$push_kcmt(n);else if(r===O(S.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===O(S.v))e.$setup_leafnd(),e.state=S.av;else if(r===O(S.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=S.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function xa(e){return Pi(e,"$handle_lcmt")}function Ta(e){return Pi(e,"$handle_blkcmt")}function Sa(e){let t=e.state;t===O(S.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=me.slash,e.state=S.k):t===O(S.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+me.slash):t===O(S.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key(me.slash),e.state=S.k):t===O(S.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=me.slash,e.state=S.v):t===O(S.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+me.slash,e.str_cache.maybe_vquote=Ni):t===O(S.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(me.slash))}function Ea(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=me.slash,e.lefted.type=wa.backslash,e.$handle_main_eof()):e.$is_currch_slash()?xa(e):e.$is_currch_asterisk()?Ta(e):Sa(e),e}Oi.exports=Ea});var Bi=a((Nf,ji)=>{var{empty:Df}=w(),Ri=A(),Pe=Ri.gtv,_e=Ri.STATE_DICT;function Ca(e){let t=e.state;return t===Pe(_e.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=_e.k):t===Pe(_e.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Pe(_e.ak)?(e.$refresh_key(),e.state=_e.k):t===Pe(_e.bv)?e.$open_nonleaf_nd():t===Pe(_e.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Pe(_e.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}ji.exports=Ca});var Gi=a((Pf,Mi)=>{var{empty:Yi}=w(),Fi=A(),Oe=Fi.gtv,ye=Fi.STATE_DICT,qa=Ss();function Aa(e){let t=e.state;return t===Oe(ye.bk)?e.$close_nonleaf_nd():t===Oe(ye.k)?(e.str_cache.k=Yi,e.$close_nonleaf_nd()):t===Oe(ye.ak)?(e.$refresh_key(),e.str_cache.k=Yi,e.$close_nonleaf_nd()):t===Oe(ye.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Oe(ye.v)?(e.$setup_leafnd(),e.state=ye.av,e.__unshift_g(e.ch_cache.curr)):t===Oe(ye.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),e.$close_nonleaf_nd()):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign(),e.__unshift_g(e.ch_cache.curr))),e}function Ia(e){return e.$is_rblk_match()?Aa(e):qa(e),e}Mi.exports=Ia});var Ji=a((Of,Wi)=>{var{empty:Da}=w(),Xi=A(),Le=Xi.gtv,ce=Xi.STATE_DICT,Na=Z(),{CommentLine:Hi}=kt();function Pa(e){let t=e.state,r=e.$get_hash_or_ref(Na.hash);if(r!==Da){let n=e.stack.lst;if(t===Le(ce.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Le(ce.k)){let i=new Hi(r);e.$push_kcmt(i),e.state=ce.ak}else if(t===Le(ce.ak)){let i=new Hi(r);e.$push_kcmt(i)}else t===Le(ce.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Le(ce.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ce.av):t===Le(ce.av)&&e.avnd_cache.data.hashes.add(r)}return e}Wi.exports=Pa});var Vi=a((Lf,Ui)=>{var{empty:Cs}=w(),zi=A(),Re=zi.gtv,I=zi.STATE_DICT,Oa=Z();function La(e){let t=e.state,r=e.$get_hash_or_ref(Oa.ref);if(r!==Cs){let n=e.$find_ref(r);if(n!==Cs){let i=e.stack.lst;t===Re(I.bk)||t===Re(I.k)||t===Re(I.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=I.ak):t===Re(I.bv)?(e.$add_ref_to_parent(n),e.state=I.av):t===Re(I.v)?(e.str_cache.maybe_vquote=Cs,e.$setup_leafnd(),e.state=I.av):t===Re(I.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=I.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=I.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}Ui.exports=La});var Zi=a((Rf,Ki)=>{var{empty:Ra}=w(),Qi=A(),je=Qi.gtv,U=Qi.STATE_DICT;function ja(e){let t=e.state;return t===je(U.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=U.k):t===je(U.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===je(U.ak)?(e.$refresh_key(),e.state=U.k):t===je(U.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=U.v):t===je(U.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=Ra):t===je(U.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Ki.exports=ja});var nl=a((jf,rl)=>{var{empty:Ba}=w(),Ya=yi(),Fa=wi(),Ma=Si(),Ga=Ss(),Ha=Di(),Xa=Li(),Wa=Bi(),Ja=Gi(),za=Ji(),Ua=Vi(),Va=Zi(),sl=A(),el=sl.gtv,tl=sl.STATE_DICT,Qa=Z();function*Ka(e,t=Ba){let r=new Ya(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(Fa(r),yield r):r.$is_currch_colon()?(Ma(r),yield r):r.$is_currch_ws()?(Ga(r),yield r):r.$is_currch_quote()?(Ha(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(Xa(r),yield r):r.$is_currch_lblk()?(Wa(r),yield r):r.$is_currch_rblk()?(Ja(r),yield r):r.$is_currch_hash()?(za(r),yield r):r.$is_currch_ref()?r.state===el(tl.av)||r.state===el(tl.v)?r.__unshift_g(Qa.fst_comma+r.ch_cache.curr):(Ua(r),yield r):(Va(r),yield r)}rl.exports=Ka});var ul=a((Bf,cl)=>{var{sync_gen_from_str:qs,sync_gen_from_file:ll,async_gen_chunk_from_file:Za}=br(),{is_should_yield:As}=A(),R=Z(),{is_nl:eo,is_ws:il}=ke(),Is=nl(),to={enable_ref:!1,encoding:"utf8"};function Ds(e,t={enable_ref:!1}){let r=Is(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let _ of r){let c=_.state;if(As(n,l,c)&&!t.enable_ref){let u=n.avnd_cache.data;u.$disconn(),u=null}l=c}return i}function so(e,t={enable_ref:!1}){let r=qs(e);return Ds(r,t)}function ro(e,t={enable_ref:!1,encoding:"utf8"}){let r=ll(e,t.encoding);return Ds(r,t)}function*Ns(e,t={enable_ref:!1,encoding:"utf8"}){let r=Is(e),n=r.next().value,i=n.state;for(let l of r){let _=l.state;if(As(n,i,_)&&!t.enable_ref){let c=n.avnd_cache.data;yield c,c.$disconn(),c=null}i=_}}function*no(e,t={enable_ref:!1,encoding:"utf8"}){let r=qs(e);yield*Ns(r,t)}function*io(e,t={enable_ref:!1,encoding:"utf8"}){let r=ll(e,t.encoding);yield*Ns(r,t)}function lo(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function _o(e){let t=qs(""),r=Is(t," "),n=r.next().value;n.__use_async_mode();let i=lo();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function co(e,t){return e.data=e.data+t,e.state==="init"?t===R.slash?e.state="slash":R.quotes.has(t)?(e.label=t,e.state="quote"):t===R.hash?e.state="hash":t===R.ref?e.state="ref":e.can_send=!0:e.state==="quote"?t==="\\"?(e.state="esc",e.pstate="quote"):t===e.label&&(e.pstate!==""?(e.state=e.pstate,e.pstate=""):e.can_send=!0):e.state==="slash"?t===R.slash?e.state="lcmt":t===R.asterisk?e.state="blkcmt":R.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):eo(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===R.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===R.slash&&(e.can_send=!0):e.state==="hash"?il(t)?e.can_send=!0:R.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?il(t)?e.can_send=!0:R.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*uo(e,t){for(let r of e)co(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*ao(e){let t=_o(e);for await(let r of e)yield*uo(r,t);yield t}function oo(e){let t=e.d.unshift_cache;t.forEach(r=>{e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state}),t=null}async function*fo(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,As(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*_l(e,t={enable_ref:!1,encoding:"utf8"}){e=ao(e);let r;for await(r of e)oo(r),yield*fo(r,t);yield r.rt}async function*ho(e,t={enable_ref:!1,encoding:"utf8"}){let r=Za(e,t.encoding,1024);yield*_l(r,t)}cl.exports={OPT_DICT:to,parse_from_generator:Ds,parse_from_str:so,parse_from_file:ro,gen_from_generator:Ns,gen_from_str:no,gen_from_file:io,agen_from_generator:_l,agen_from_file:ho}});var wt=a((Yf,tt)=>{var{empty:po}=w(),go=Z(),et=ul();function Ps(e){return e.length===1?e[0]:e}function bo(){for(let e in et){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n);for(let l of i)l=Ps(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n);for await(let l of i)l=Ps(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n).value;return Ps(i)},Object.defineProperty(t,"name",{value:e}),tt.exports[e]=t}tt.exports.OPT_DICT=et.OPT_DICT}bo();tt.exports.CFG=go;tt.exports.empty=po});var xt=a((Ff,al)=>{var mo=wt(),yo=(e,t=!1)=>{let r=e.split("-");for(let n=1;n<r.length;++n)r[n]=r[n].charAt(0).toUpperCase()+r[n].slice(1);return t&&(r[0]=r[0].charAt(0).toUpperCase()+r[0].slice(1)),r.join("")},$o=e=>e.replace(/-/g,"_"),vo=(e,t)=>typeof e=="string"?(e=e.trim().toLowerCase(),e==="false"||e==="0"||e==="no"||e==="off"||e==="fls"||e==="f"||e==="null"||e==="nul"||e==="none"||e==="nu"||e==="n"?!1:e==="true"||e==="1"||e==="yes"||e==="on"||e==="tru"||e==="t"||e==="y"?!0:e===""||e==="undefined"||e==="un"||e==="default"||e==="dflt"?!!t:!!e):e===void 0?!!t:!!e,ko=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},wo=e=>mo.parse_from_str(e+" ");al.exports={dash_to_camel:yo,dash_to_snake:$o,attr_value_to_bool:vo,css_str_to_num:ko,parse_json_input:wo}});var hl=a((Mf,fl)=>{var ol=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),xo=async e=>{for(let t=0;t<e;++t)await ol()},To=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)});fl.exports={wait_for_layout_ready:ol,wait_for_n_raf:xo,wait:To}});var gl=a((Gf,pl)=>{var{dash_to_camel:Tt}=xt(),dl=(e,t,r=!1)=>{let n=Tt(t,r)+"Element";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelector(`.${t}`):null}})},So=(e,t)=>{for(let r of t)dl(e,r,!1)},Eo=e=>{for(let t in DYN_CLSES){{let n="all"+Tt(t,!0)+"Elements";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelectorAll(`.${t}`):null}})}let r=DYN_CLSES[t];for(let n of r){let i=Tt(n,!0),l="get"+Tt(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(_){let c=this.shadowRoot;return c?c.querySelector(`.${t}[${n}="${_}"]`):null})}}};pl.exports={add_one_fixed_element_getter:dl,add_fixed_element_getters:So,add_dyn_element_getters:Eo}});var ml=a((Hf,bl)=>{var Co=wt(),{dash_to_snake:qo,css_str_to_num:Ao}=xt(),Io=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=qo(n),l=t[n],_=l.type;e.prototype.hasOwnProperty(i)||(_==="boolean"?Object.defineProperty(e.prototype,i,{get:function(){return attr_value_to_bool(this.getAttribute(n),l.default)},set:function(c){this.setAttribute(n,c?"true":"false")}}):_==="number"?Object.defineProperty(e.prototype,i,{get:function(){let c=this.getAttribute(n);return c?Number(c):l.default},set:function(c){this.setAttribute(n,String(c))}}):Array.isArray(_)&&_.includes("cssnum")&&_.includes("number")?Object.defineProperty(e.prototype,i,{get:function(){return Ao(this.getAttribute(n))},set:function(c){isNaN(Number(c))?this.setAttribute(n,c):this.setAttribute(n,String(c)+"px")}}):_==="json"?Object.defineProperty(e.prototype,i,{get:function(){let c=this.getAttribute(n);return c?Co.parse_from_str(c):l.default},set:function(c){this.setAttribute(n,JSON.stringify(c))}}):Object.defineProperty(e.prototype,i,{get:function(){return this.getAttribute(n)||l.default},set:function(c){this.setAttribute(n,c)}}))}};bl.exports={add_attr_accessors_to_cls:Io}});var $l=a((Xf,yl)=>{var Do=(e,t="error",r=1e3)=>{let n={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},i=_=>`
|
|
1
|
+
var nvbasicbw=(()=>{var Nl=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var a=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var w=a((ff,Ks)=>{var Pl=Symbol("empty"),Ye=Symbol("unknown"),Ms=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Gs=/^[\-\+]?[0-9]+$/,Hs=/^\+?[0-9]+$/,Ol=/^[\-\+]?0[bB][0-1]+$/,Ll=/^[\-\+]?0[oO][0-7]+$/,Xs=/^[\-\+]?0[xX][0-9a-fA-F]+$/,Rl=e=>Gs.test(e)||Xs.test(e),Bs={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},jl=/^[\-\+]?[0-9]+n$/,Bl=/^[\-\+]?0[bB][0-1]+n$/,Yl=/^[\-\+]?0[oO][0-7]+n$/,Fl=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,Ws=e=>jl.test(e)||Bl.test(e)||Yl.test(e)||Fl.test(e),ue={Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11,6:"Integer",7:"Float",8:"BigInt",9:"PosInfinity",10:"NegInfinity",11:"NaN"},Js=(e,t=!1)=>{let r={value:void 0,type:void 0};return e==="+Infinity"||e==="Infinity"?(r.value=1/0,r.type=ue.PosInfinity):e==="-Infinity"?(r.value=-1/0,r.type=ue.NegInfinity):(e==="NaN"||e==="+NaN"||e==="-NaN")&&(r.value=NaN,r.type=ue.NaN),t?r:r.value},Ml=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=Bs[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=Bs[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},zs=e=>{let t=Array.from(e);if(Gs.test(e))return parseInt(e);if(Ol.test(e)||Ll.test(e)||Xs.test(e))return Ml(t)},Gl=e=>{let t=e.be.sign+e.be.bd+e.be.dot+e.be.ad,r=e.ae.sign+e.ae.bd+e.ae.dot+e.ae.ad,n;if(!(t==="+"||t==="-"||r==="+"||r==="-")){if(r!=="")if(e.ae.dot==="."){let i=parseFloat(t),l=parseFloat(r);n=i*10**l}else n=parseFloat(t+"e"+r);else n=parseFloat(t);return n}},Hl=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Xl=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),Ys=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Wl=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(Hs.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},Fs=(e,t,r,n)=>{let i;for(i=r;i<e.length;i++)if(e[i]==="."){if(t[n].dot===".")return[!0,i];t[n].dot=".",t.state=n+"ad"}else{if(e[i]==="e"||e[i]==="E")return n==="ae"?[!0,i]:(t.state="aebd",[!1,i+1]);if(Hs.test(e[i]))t.state===n+"bd"?t[n].bd=t[n].bd+e[i]:t[n].ad=t[n].ad+e[i];else return[!0,i]}return[!1,i+1]},Us=e=>{let t=Xl(),r=Array.from(e);if(Hl(r,e))return;let n=0,i=!1;if([r,n]=Ys(r,t,n,"be"),[i,n]=Wl(r,t,n,"be"),!i&&([i,n]=Fs(r,t,n,"be"),!i&&([r,n]=Ys(r,t,n,"ae"),[i,n]=Fs(r,t,n,"ae"),!i)))return Gl(t)},Vs=(e,t=!1)=>{let r={value:void 0,type:void 0};if(Ws(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=ue.BigInt;else{let n=zs(e);n!==void 0?(r.value=n,r.type=ue.Integer):(n=Us(e),n!==void 0?(r.value=n,r.type=ue.Float):(n=Js(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},Jl=(e,t=!0)=>{if(typeof e=="string")return e;if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="number")return e.toString();if(typeof e=="bigint")return e.toString()+"n";if(typeof e=="symbol")return e.description;if(Ms()&&e[Symbol.for("nodejs.util.inspect.custom")])return e[Symbol.for("nodejs.util.inspect.custom")]();{let r=function(n){if(typeof n.toString=="function")return n.toString()};try{return t?s=JSON.stringify(e):s=JSON.stringify(e,null,4),typeof s=="string"?s:r(e)}catch{return r(e)}}},Be={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},zl={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function Qs(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(zl));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:_}=r,c={value:Ye,type:Ye};if(e==="undefined")c.value=void 0,c.type=Be.UndefinedLiteral;else if(e==="null")c.value=null,c.type=Be.NullLiteral;else if(e==="false")c.value=!1,c.type=Be.FalseLiteral;else if(e==="true")c.value=!0,c.type=Be.TrueLiteral;else{let u=Vs(e,!0);u.type===void 0?_?(c.value=e,c.type=Be.StringLiteral):(c.value=e,c.type=Ye):(c.value=u.value,c.type=u.type)}return n?c.value:(l||delete c.type,i||delete c.value,c)}Qs.unknown=Ye;var Ul={UndefinedLiteral:0,NullLiteral:1,BooleanLiteral:{_self:2,FalseLiteral:3,TrueLiteral:4},NumericLiteral:{_self:5,Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11},StringLiteral:12,ArrayExpression:{_self:13,element:14},ObjectExpression:{_self:15,property:16},_Ref:17,CommentLine:{_self:18,tt:19,k:20,bv:21,av:22},CommentBlock:{_self:23,tt:24,k:25,bv:26,av:27}};Ks.exports={TYPE_DICT:Ul,isNode:Ms,empty:Pl,unknown:Ye,is_bigint_str:Ws,is_jsint_str:Rl,NUM_TYPE_DICT:ue,parse_abnormal_num:Js,parse_int:zs,parse_float:Us,parse_num:Vs,parse0:Qs,to_str:Jl}});var sr=a((hf,tr)=>{var Fe={backSpace:8,tab:9,lineFeed:10,lineTab:11,formFeed:12,carriageReturn:13,shiftOut:14,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseB:66,uppercaseC:67,uppercaseD:68,uppercaseE:69,uppercaseF:70,uppercaseG:71,uppercaseH:72,uppercaseI:73,uppercaseJ:74,uppercaseK:75,uppercaseL:76,uppercaseM:77,uppercaseN:78,uppercaseO:79,uppercaseP:80,uppercaseQ:81,uppercaseR:82,uppercaseS:83,uppercaseT:84,uppercaseU:85,uppercaseV:86,uppercaseW:87,uppercaseX:88,uppercaseY:89,uppercaseZ:90,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseB:98,lowercaseC:99,lowercaseD:100,lowercaseE:101,lowercaseF:102,lowercaseG:103,lowercaseH:104,lowercaseI:105,lowercaseJ:106,lowercaseK:107,lowercaseL:108,lowercaseM:109,lowercaseN:110,lowercaseO:111,lowercaseP:112,lowercaseQ:113,lowercaseR:114,lowercaseS:115,lowercaseT:116,lowercaseU:117,lowercaseV:118,lowercaseW:119,lowercaseX:120,lowercaseY:121,lowercaseZ:122,leftCurlyBrace:123,verticalBar:124,rightCurlyBrace:125,tilde:126,nonBreakingSpace:160,oghamSpaceMark:5760,enQuad:8192,emQuad:8193,enSpace:8194,emSpace:8195,threePerEmSpace:8196,fourPerEmSpace:8197,sixPerEmSpace:8198,figureSpace:8199,punctuationSpace:8200,thinSpace:8201,hairSpace:8202,lineSeparator:8232,paragraphSeparator:8233,narrowNoBreakSpace:8239,mediumMathematicalSpace:8287,ideographicSpace:12288,zeroWidthNoBreakSpace:65279};function Vl(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var At=Vl(Fe);function Ql(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Kl=Ql(Fe),Zs=e=>55296<=e&&e<=56319,Zl=e=>56320<=e&&e<=57343,e_=(e,t)=>(e-55296)*1024+(t-56320)+65536,er=e=>e<=65535,t_=e=>!er(e),s_=e=>{if(e<=65535)return[e,null];{e=e-65536;let t=[null,null];return t[0]=(e>>10)+55296,t[1]=e%1024+56320,t}},r_=(e,t)=>Zs(e)?t+2:t+1;tr.exports={CODE_DICT:Fe,CH_DICT:Kl,CODE_NAME_MP:At,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>At.get(e),n2cd:e=>String.fromCharCode(Fe[e]),n2ch:e=>Fe[e],ch2n:e=>At.get(e.codePointAt(0)),is_high_code:Zs,is_low_code:Zl,get_code_point_from_high_low:e_,get_high_low_from_code_point:s_,is_length1_code_point:er,is_length2_code_point:t_,_next_code_index:r_}});var ke=a((df,x)=>{var{CODE_DICT:h,CH_DICT:m}=sr(),rr=/\r\n?|[\n\u2028\u2029]/;x.exports.line_break_regexp=rr;x.exports.line_break_regexp_g=new RegExp(rr.source,"g");function nr(e){switch(e){case h.lineFeed:case h.carriageReturn:case h.lineSeparator:case h.paragraphSeparator:return!0;default:return!1}}function ir(e){switch(e){case m.lineFeed:case m.carriageReturn:case m.lineSeparator:case m.paragraphSeparator:return!0;default:return!1}}var It=[h.lineFeed,h.carriageReturn,h.lineSeparator,h.paragraphSeparator],lr=It.map(e=>String.fromCharCode(e));x.exports.NL_CODE_ARR=It;x.exports.NL_CH_ARR=lr;x.exports.is_nl_code=nr;x.exports.is_nl=ir;x.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function _r(e){switch(e){case 9:case 11:case 12:case h.space:case h.nonBreakingSpace:case h.oghamSpaceMark:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}x.exports.is_non_nl_ws_code=_r;function cr(e){switch(e){case m.tab:case m.lineTab:case m.formFeed:case m.space:case m.nonBreakingSpace:case m.oghamSpaceMark:case m.enQuad:case m.emQuad:case m.enSpace:case m.emSpace:case m.threePerEmSpace:case m.fourPerEmSpace:case m.sixPerEmSpace:case m.figureSpace:case m.punctuationSpace:case m.thinSpace:case m.hairSpace:case m.narrowNoBreakSpace:case m.mediumMathematicalSpace:case m.ideographicSpace:case m.zeroWidthNoBreakSpace:return!0;default:return!1}}x.exports.is_non_nl_ws=cr;var Dt=[h.tab,h.lineTab,h.formFeed,h.space,h.nonBreakingSpace,h.oghamSpaceMark,h.enQuad,h.emQuad,h.enSpace,h.emSpace,h.threePerEmSpace,h.fourPerEmSpace,h.sixPerEmSpace,h.figureSpace,h.punctuationSpace,h.thinSpace,h.hairSpace,h.narrowNoBreakSpace,h.mediumMathematicalSpace,h.ideographicSpace,h.zeroWidthNoBreakSpace];x.exports.NON_NL_WS_CODE_ARR=Dt;var ur=Dt.map(e=>String.fromCharCode(e));x.exports.NON_NL_WS_CH_ARR=ur;function n_(e){return _r(e)||nr(e)}function ve(e){return cr(e)||ir(e)}x.exports.is_ws_code=n_;x.exports.is_ws=ve;x.exports.WS_CHCODE_ARR=It.concat(Dt);x.exports.WS_CH_ARR=lr.concat(ur);var K={init:0,executing:1,succ:2,eof:3};x.exports.STATE_DICT=K;function i_(e,t=new Set){let r={g:e,rslt:"",state:K.init},n=r.g.next().value;if(n===void 0)return r.state=K.eof,r;for(;n!==void 0&&(ve(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!ve(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=K.eof:(ve(n)||t.has(n))&&(r.state=K.succ),r}function l_(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:K.init};for(let l=n.pos;l<e.length;l++){let _=e[l];if(ve(_)||r.has(_))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let _=e[l];if(!ve(_)&&!r.has(_))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=K.eof:n.state=K.succ,n.rslt=e.slice(i,n.pos).join(""),n}x.exports.from_generator=i_;x.exports.from_charr=l_});var Z=a((pf,pr)=>{var{WS_CH_ARR:ar,NON_NL_WS_CH_ARR:__,NL_CH_ARR:c_}=ke();function u_(e){return Array.from(e).length}var a_="\u200C",or="\u200D",o_=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Nt(e,t,...r){let n=function(){return t(this,...r)};o_()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var j={tmpl_quote:new Error("tmpl_quote: ` cant be deleted"),reserved:new Error(" [/,*,#,&,`,\\,] and whitespaces are reserved"),inuse:new Error("in using"),char:new Error("must be a char"),pair:new Error("left block must be different with right"),cant_be_empty:new Error("can NOT be empty")},st=Symbol("get_pair_lmp"),f_=Symbol("add_pair_reserved"),Me=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[st](){return this.#e}get size(){return this.#e.size}[f_](t,r){if(t===r)throw j.pair;this.#e.set(t,r),this.#s.set(r,t)}add(t,r){if(this.#t.validate(t),this.#t.validate(r),t===r)throw j.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw j.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw j.cant_be_empty;{let r=this.#s.get(t);this.#s.delete(t),this.#e.delete(r)}}lhas(t){return this.#e.has(t)}rhas(t){return this.#s.has(t)}has(t){return this.lhas(t)||this.rhas(t)}getl(t){return this.#s.get(t)}getr(t){return this.#e.get(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function h_(e){return new Map(e[st])}Nt(Me,h_);var fr=Symbol("get_single_set"),hr=Symbol("add_single_reserved"),we=class{#t;#e=new Set;constructor(t){this.#t=t}get[fr](){return this.#e}[hr](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw j.cant_be_empty;if(t==="`")throw j.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function d_(e){return new Set(e[fr])}Nt(we,d_);var rt=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new Me(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new Me(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new we(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[hr]("`"),this.#r=new we(this),this.#r.add(","),this.#r.add("\uFF0C"),this.#r.add(";"),this.#r.add("\uFF1B"),this.#r.add("\u3002"),this.#r.add("\u3001"),this.#n=new we(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(ar)}get inuse(){let t=new Set;if(this.#i){for(let r of this.#s)t.add(r);for(let r of this.#r)t.add(r);for(let r of this.#n)t.add(r);for(let r of this.#t[st])t.add(r);for(let r of this.#e[st])t.add(r)}return t}validate(t){if(typeof t!="string"||u_(t)!==1)throw j.char;if(this.reserved.includes(t))throw j.reserved;if(Array.from(this.inuse).flat().includes(t))throw j.inuse;return t}get esc(){return"\\"}get slash(){return"/"}get line_comment(){return"//"}get asterisk(){return"*"}get blk_comments(){return["/*","*/"]}get hash(){return"#"}get ref(){return"&"}get tmpl_quote(){return"`"}get nl(){return c_}get non_nl_ws(){return __}get ws(){return ar}get array_blks(){return this.#t}get fst_ary_blks(){return Array.from(this.#t)[0]}get obj_blks(){return this.#e}get fst_obj_blks(){return Array.from(this.#e)[0]}get quotes(){return this.#s}get fst_quote(){return Array.from(this.#s)[0]}get commas(){return this.#r}get fst_comma(){return Array.from(this.#r)[0]}get colons(){return this.#n}get fst_colon(){return Array.from(this.#n)[0]}},nt=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(nt,"name",{value:or});var it=class{constructor(t){this.esc=t.esc,this.hash=t.hash,this.ref=t.ref,this.tmpl_quote=t.tmpl_quote,this.slash=t.slash,this.asterisk=t.asterisk,this.line_comment=t.line_comment,this.blk_comments=t.blk_comments,this.nl=t.nl,this.non_nl_ws=t.non_nl_ws}get[Symbol.toStringTag](){return"fixed"}};Object.defineProperty(it,"name",{value:or});var lt=class{constructor(t){this.obj_blks=t.obj_blks,this.array_blks=t.array_blks,this.quotes=t.quotes,this.commas=t.commas,this.colons=t.colons}get[Symbol.toStringTag](){return"configurable-if-not-reserved"}};Object.defineProperty(lt,"name",{value:a_});function p_(e){return[new it(e),new lt(e),new nt(e)]}Nt(rt,p_);var dr=new rt;dr.ERROR_DICT=j;pr.exports=dr});var yr=a((gf,D)=>{var gr=Nl("fs");function*mr(e){for(let t of e)yield t;e=null}function g_(e,t){let r=e.codePointAt(t);if(r!==void 0)return r<65536?t=t+1:t=t+2,t}function*m_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield r,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}function*b_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield t,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}async function y_(e){let t=[];for await(let r of e)t.push(r);return t}async function*$_(e){for(let t of e)yield t;e=null}async function*v_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield r,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}async function*k_(e){let t=0,r=e.codePointAt(t);for(;r!==void 0;)yield t,r<65536?t=t+1:t=t+2,r=e.codePointAt(t)}function*w_(e,t="utf8"){let r=gr.readFileSync(e,{encoding:t});yield*mr(r)}async function*br(e,t="utf8",r=4096){let n=gr.createReadStream(e,{encoding:t,highWaterMark:r});for await(let i of n)yield i,i=null;await n.close(),await n.destroy(),n=null}async function*x_(e,t="utf8"){yield*br(e,t,1)}D.exports.sync_gen_from_file=w_;D.exports.async_gen_from_file=x_;D.exports.async_gen_chunk_from_file=br;D.exports.async_iter_to_array=y_;D.exports.sync_gen_from_str=mr;D.exports.async_gen_from_str=$_;D.exports.get_next_pos=g_;D.exports.sync_gen_pos_from_str=b_;D.exports.sync_gen_code_point_from_str=m_;D.exports.async_gen_pos_from_str=k_;D.exports.async_gen_code_point_from_str=v_});var A=a((mf,kr)=>{var $r={bk:{_self:0,eof:{_self:1,lc:2,blkc:3,hash:{_self:4,naked:5,quote:6},ref:{_self:7,naked:8,quote:9}}},k:{_self:10,eof:{_self:11,lc:12,blkc:13,hash:{_self:14,naked:15,quote:16},ref:{_self:17,naked:18,quote:19}}},ak:{_self:20,eof:{_self:21,lc:22,blkc:23,hash:{_self:24,naked:25,quote:26},ref:{_self:27,naked:28,quote:29}}},bv:{_self:30,eof:{_self:31,lc:32,blkc:33,hash:{_self:34,naked:35,quote:36},ref:{_self:37,naked:38,quote:39}}},v:{_self:40,eof:{_self:41,lc:42,blkc:43,hash:{_self:44,naked:45,quote:46},ref:{_self:47,naked:48,quote:49}}},av:{_self:50,eof:{_self:51,lc:52,blkc:53,hash:{_self:54,naked:55,quote:56},ref:{_self:57,naked:58,quote:59}}}};function q(e){return e instanceof Object?e._self:e}function T_(e){return e+1}function S_(e){return e+2}function E_(e){return e+3}function C_(e){return e+6}function q_(e){return e+5}function A_(e){return e+9}function I_(e){return e+8}function vr(e){return e%10!==0}var D_={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},N_={handling:0,handled:1};function P_(e,t,r){let n=$r;return e.$has_yield_sign()||vr(r)||t===q(n.av)&&r===q(n.bv)||t===q(n.av)&&r===q(n.bk)||t===q(n.av)&&r===q(n.k)||t===q(n.av)&&r===q(n.v)||t===q(n.av)&&r===q(n.ak)||t===q(n.v)&&r===q(n.bv)||t===q(n.v)&&r===q(n.bk)}kr.exports={STATE_DICT:$r,gtv:q,get_main_eofv_with_code:T_,get_lcmt_eofv_with_code:S_,get_blkcmt_eofv_with_code:E_,get_hash_quote_eofv_with_code:C_,get_hash_naked_eofv_with_code:q_,get_ref_quote_eofv_with_code:A_,get_ref_naked_eofv_with_code:I_,LEFTED_TYPE:D_,AVND_CACHE_STATE_DICT:N_,is_eofv:vr,is_should_yield:P_}});var Ft=a((bf,Nr)=>{var{is_nl:Tr}=ke(),Sr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},_t=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Sr(l,r,n,i)},O_=/^[0-7]$/,L_=/^[0-9a-fA-F]$/,ae=e=>O_.test(e),W=e=>L_.test(e),ct={b:"\b",f:"\f",n:`
|
|
2
|
+
`,r:"\r",t:" ",v:"\v"},Er={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function R_(e){return Er[e]}function Cr(e){return ct[e]}function j_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+_t(t,16,2)}function B_(e){e=Array.from(e);let t=e[0],r=e[1];if(W(t)&&W(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function Y_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+_t(t,16,4)}function F_(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(W(t)&&W(r)&&W(n)&&W(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function M_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+_t(t,8,3)}function G_(e){let t="";e=Array.from(e);let r=e[0];if(ae(r)){t=t+r;let n=e[1];if(ae(n)){t=t+n;let l=e[2];ae(l)&&(t=t+l)}let i=parseInt(t,8);return String.fromCharCode(i)}}var d={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*H_(e){let t=Array.from(e);for(let r of t)yield r}function*wr(e,t){yield*t,yield*e}function qr(e,t,r,n,i=!1){if(typeof t=="string"){let _=t;t=c=>c===_}if(typeof(r==="string")&&r.length>0){let _=H_(r);e=wr(e,_)}else e=wr(e,r);let l={state:d.init,end:t,esc:n,g:e,curr:"",ch:e.next().value,offset:0};return l.ch!==void 0&&(l.offset=l.offset+1),i&&(l.rslt=""),l}function Pt(e){return e.ch===void 0||e.end(e.ch)&&e.state!==d.backslash||e.state===d.x||e.state===d.u||e.state===d.o}function Ot(e,t=!1){return e.ch===e.esc?(e.state=d.backslash,e.curr=""):(e.state=d.executing,t&&(e.rslt=e.rslt+e.ch),e.curr=e.ch),e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function xr(e,t,r,n,i,l,_){return _===!0?n===Ar?(e.state=d.x,e.ch="\\x"+t.join(""),e):n===Ir?(e.state=d.u,e.ch="\\u"+t.join(""),e):(n===Dr&&(e.state=d.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=r,e)}function X_(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function ut(e,t,r,n,i=!0,l=!1,_=void 0,c=!1){let u;if(_!==void 0?u=_:(u=e.g.next().value,u!==void 0&&(e.offset=e.offset+1)),u===void 0)return e;let o=0,f=[],v;if(l?v=!0:v=r(u),v)o=o+1,f.push(u);else return e.state=d.executing,e.ch=u,e;for(;o<t;){if(u=e.g.next().value,u===void 0)return xr(e,f,u,n,i,c,tail=!0);if(e.offset=e.offset+1,v=r(u),v)o=o+1,f.push(u);else return xr(e,f,u,n,i,c,tail=!1)}return X_(e,f,u,n,c)}function Ar(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function Ir(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Dr(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Lt(e,t=!1){return e.curr=Cr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Rt(e,t=!1){return ut(e,2,W,Ar,!0,!1,void 0,t)}function jt(e,t=!1){return ut(e,4,W,Ir,!0,!1,void 0,t)}function Bt(e,t=!1){return ut(e,3,ae,Dr,!1,!0,e.ch,t)}function Yt(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=d.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function W_(e,t=i=>i==='"',r="",n="\\"){let i=qr(e,t,r,n,!0);for(i.state=d.executing;!Pt(i);)i.state===d.executing?Ot(i,!0):i.state===d.backslash&&(Tr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=d.executing):i.ch in ct?Lt(i,!0):i.ch==="x"?Rt(i,!0):i.ch==="u"?jt(i,!0):ae(i.ch)?Bt(i,!0):Yt(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=d.succ,i.ch=""):i.state===d.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=d.eof,i.ch=""),i}function*J_(e){let t=e;for(t.state=d.executing;!Pt(t);)t.state===d.executing?(Ot(t,!1),t.curr!==""&&(yield t.curr)):t.state===d.backslash&&(Tr(t.ch)?(t.state=d.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ct?(Lt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Rt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(jt(t,!1),t.curr!==""&&(yield t.curr)):ae(t.ch)?(Bt(t,!1),t.curr!==""&&(yield t.curr)):(Yt(t,!1),t.curr!==""&&(yield t.curr)));return typeof t.ch=="string"&&t.end(t.ch)?(t.state=d.succ,t.ch=""):t.state===d.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=d.eof,t.ch=""),t}Nr.exports={CHAR_UNESC_DICT:ct,CHAR_ESC_DICT:Er,escc:R_,unescc:Cr,escx:j_,unescx:B_,escu:Y_,unescu:F_,esco:M_,unesco:G_,STATE_DICT:d,from_generator:W_,init:qr,handle_executing:Ot,is_terminated:Pt,handle_escc:Lt,esc_handle_engine:ut,handle_escx:Rt,handle_escu:jt,handle_esco:Bt,handle_esc_other:Yt,gen:J_,prepend:Sr,prepend_num:_t,is_odigit_ch:ae,is_hdigit_ch:W}});var Mr=a((yf,Fr)=>{var{is_nl:z_}=ke(),xe=Ft(),Pr={line_comment:0,blk_comment:1},ee={init:0,executing:1,succ:2,eof:3,asterisk:4};function Or(e){return{state:ee.init,g:e,rslt:"",ch:"",offset:0}}function Lr(e,t){return e.state=ee.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Rr(e,t){return e.state=ee.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function jr(e,t){return e.state=ee.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function Br(e,t=""){let r=Or(e);r.state=ee.executing;let n=xe.from_generator(r.g,z_,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===xe.STATE_DICT.eof?Lr(r,n):n.state===xe.STATE_DICT.succ?Rr(r,n):jr(r,n)}function Yr(e,t=""){let r=Or(e);r.state=ee.executing;let n;for(;;){if(n=xe.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===xe.STATE_DICT.eof)return Lr(r,n);if(n.state===xe.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Rr(r,n);if(i!==void 0)r.rslt=r.rslt+n.rslt+"*",t=i,r.offset=r.offset-1;else return r.rslt=r.rslt+n.rslt,r.ch="*",r.state=ee.asterisk,r}else return jr(r,n)}return r}function U_(e,t,r=""){return t===Pr.line_comment?Br(e,r):Yr(e,r)}Fr.exports={TYPE_DICT:Pr,STATE_DICT:ee,lc_from_generator:Br,blk_from_generator:Yr,from_generator:U_}});var Mt=a(($f,Gr)=>{function V_(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function Q_(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function K_(e){return parseInt(e).toString()===e}Gr.exports={rjson:V_,wjson:Q_,is_int_str:K_}});var Gt=a((vf,Hr)=>{var Z_=()=>Math.random()*9007199254740992;function ec(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function tc(e,t){return t.filter((r,n)=>e.includes(n))}function sc(e){return Object.entries(e).length===0}function rc(e){return Object.entries(e).map(n=>n[1])}function nc(e){return Object.entries(e).map(n=>n[0])}function ic(e){return Object.entries(e).length}function lc(e,t){for(let r in e)t(r,e[r]);return e}function _c(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function cc(e,t){for(let r in t)e[r]=t[r];return e}function uc(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function ac(e,t,r){return r=r.filter(n=>n[e]!==t),r}function oc(e,t,r){return r.findIndex(i=>i[e]===t)}function fc(e){return JSON.parse(JSON.stringify(e))}function hc(e,t){for(let r=0;r<e.length;r++){lyr=e[r];for(let n=0;n<lyr.length;n++)e[r][n]=t(e[r][n],r,n)}return e}function dc(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}Hr.exports={gen_guid:Z_,range:ec,seqs_slct:tc,dict_length:ic,is_empty_dict:sc,dict_values:rc,dict_keys:nc,dict_map:_c,dict_foreach:lc,dict_plus:cc,dict_update:uc,dtb_kv_rm:ac,dtb_kv_get_seq:oc,dcp:fc,mat_map:hc,is_cu_property:dc}});var ss=a((kf,mn)=>{var $=Gt();function Wt(e){if($.is_empty_dict(e))return 0;{let t=$.dict_keys(e);return Math.max(...t)+1}}function Ge(e){return e!=null}function Wr(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ge(e._fstch)&&(e._fstch=e._fstch+t),Ge(e._lsib)&&(e._lsib=e._lsib+t),Ge(e._rsib)&&(e._rsib=e._rsib+t),Ge(e._parent)&&(e._parent=e._parent+t),e}function oe(e,t){let r=Wt(e);for(let n in t){let i=Wr(t[n],r);t[i._id]=i,delete t[n]}return t}function pc(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function gc(e,t=0){return{_id:Wt(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function Jr(e){return e._tree!==void 0}function te(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Jt(e){return e._lsib===null}function zt(e){return e._rsib===null}function B(e){return e._fstch===null}function zr(e,t){if(te(e))return!0;{let n=k(e,t);return F(n,t).length===1}}function Je(e){return te(e)||!Jr(e)}function at(e,t,r){if(!Je(t))return console.log("only root or uninited could be prepend"),e;let n=B(e);if(t._tree=e._tree,t._lsib=null,n)t._rsib=null,t._parent=e._id;else{let i=r[e._fstch];i._lsib=void 0,t._rsib=i._id,t._parent=void 0}return e._fstch=t._id,r[t._id]=t,e}function Ut(e,t,r){if(!Je(t))return console.log("only root or uninited could be append"),e;let n=B(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=he(e,r);i._parent=void 0,i._rsib=t._id,t._lsib=void 0}return t._parent=e._id,r[t._id]=t,e}function Vt(e,t,r){if(!Je(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addrsib to root"),e;let n=zt(e);return t._tree=e._tree,n?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t._id,t._lsib=void 0,r[t._id]=t,e}function Ur(e,t,r){if(!Je(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addlsib to root"),e;let n=Jt(e);if(t._tree=e._tree,n){let i=k(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=Y(e,r);i._rsib=t._id,t._lsib=void 0}return t._rsib=e._id,t._parent=void 0,r[t._id]=t,e}function Vr(e,t,r,n){let i=F(t,n),l=i.length;if(l===0)return at(t,r,n);if(e<=l&&e>=0){if(e===0)return at(t,r,n);if(e===l)return Ut(t,r,n);{let c=i[e-1];return Vt(c,r,n)}}else return console.log("not in range!!"),t}function Te(e,t){for(let r in t)t[r]._tree=e._tree}function mc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=at(e,i,t),Te(e,r),$.dict_plus(t,r),e}function bc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Ut(e,i,t),Te(e,r),$.dict_plus(t,r),e}function yc(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Vt(e,i,t),Te(e,r),$.dict_plus(t,r),e}function $c(e,t,r){r=oe(t,r);let n=$.dict_keys(r)[0],i=re(r[n],r);return e=Ur(e,i,t),Te(e,r),$.dict_plus(t,r),e}function vc(e,t,r,n){n=oe(r,n);let i=$.dict_keys(n)[0],l=re(n[i],n);return t=Vr(e,t,l,r),Te(t,n),$.dict_plus(r,n),t}function He(e,t){let r=M(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function Xe(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function Qr(e){return e._fstch=null,e}function We(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Se(e,t){if(te(e))return[e,t];if(zr(e,t)){let n=t[e._parent];Qr(n);let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}else if(Jt(e)){let n=L(e,t);n._lsib=null;let i=k(e,t);i._fstch=e._rsib;let l=He(e,t),_=Xe(l,t);return We(e),[e,_]}else if(zt(e)){let n=Y(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}else{let n=Y(e,t);n._rsib=e._rsib;let i=He(e,t),l=Xe(i,t);return We(e),[e,l]}}function kc(e,t){let r=fe(e,t);return r===null?[e,t]:Se(r,t)}function wc(e,t){let r=he(e,t);return r===null?[e,t]:Se(r,t)}function xc(e,t,r){let n=Kr(e,t,r);return n===null?[t,r]:Se(n,r)}function Tc(e,t,...r){let n=Zr(e,t,...whiches);for(let i=0;i<n.length;i++)Se(n[i],t);return[e,t]}function Sc(e,t){let r=F(e,t);for(let n=0;n<r.length;n++)Se(r[n],t);return t}function fe(e,t){return e._fstch===null?null:t[e._fstch]}function F(e,t){let r=[],n=fe(e,t);for(;n!==null;)r.push(n),n=L(n,t);return r}function he(e,t){let r=F(e,t);return r.length===0?null:r[r.length-1]}function Kr(e,t,r){let n=F(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function Zr(e,t,...r){let n=F(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function en(e,t,r=!1){let n=e,i=L(e,t);for(;i!==null;)n=i,i=L(i,t);return r||n._id!==e._id?n:null}function Ec(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l<n&&i.push(r[l]);return i}function Cc(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l>n&&i.push(r[l]);return i}function se(e,t,r=!1){let n=k(e,t),i;return n!==null?i=F(n,t):i=[e],r||(i=$.dtb_kv_rm("_id",e._id,i)),i}function qc(e,t,r=!1){let n=se(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function Ac(e,t,r){let n=se(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function Ic(e,t,...r){let n=se(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function Dc(e,t){let r=se(e,t,!0);return $.dtb_kv_get_seq("_id",e._id,r)}function Y(e,t){let r=se(e,t,!0),n=$.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function L(e,t){return e._rsib===null?null:t[e._rsib]}function E(e,t){return ot(e,t,!0).length-1}function tn(e,t){let r=E(e,t),i=M(e,t).map(_=>E(_,t));return Math.max(...i)-r+1}function Nc(e,t){return B(e)?null:E(e,t)+1}function Pc(e,t){if(B(e))return null;{let n=E(e,t),l=M(e,t).map(c=>E(c,t));return Math.max(...l)}}function Oc(e,t,r){let n=E(t,r);return tn(t,r)<=e?null:n+e}function sn(e,t){let r=re(e,t),n=M(r,t),i=E(e,t);return n.filter(_=>E(_,t)===i)}function Ht(e,t){let r=sn(e,t);return $.dtb_kv_get_seq("_id",e._id,r)}function Lc(e,t){return M(e,t).length}function re(e,t){let r=e,n=k(e,t);for(;n!==null;)r=n,n=k(n,t);return r}function k(e,t){let r;if(te(e))r=null;else{let n=en(e,t,!0);r=t[n._parent]}return r}function ot(e,t,r=!1){let n=[],i=k(e,t);for(;i!==null;)n.push(i),i=k(i,t);return r&&n.unshift(e),n}function Rc(e,t,r){let n=ot(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function jc(e,t,...r){let n=ot(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let _=r[l];_>n.length-1||_<0||i.push(n[_])}return i}function rn(e,t){let r=k(e,t);for(;r!==null;){let n=L(r,t);if(n!==null)return n;r=k(r,t)}return null}function nn(e,t){let r=fe(e,t);if(r!==null)return r;{let n=L(e,t);return n!==null?n:rn(e,t)}}function ln(e,t){let r=e,n=he(e,t);for(;n!==null;)r=n,n=he(n,t);return r}function Bc(e,t){if(te(e))return null;if(B(e)){let n=Y(e,t);return n!==null?n:k(e,t)}else{let n=Y(e,t);return n!==null?B(n)?n:ln(n,t):k(e,t)}}function M(e,t){let r=E(e,t),n=[];for(;e!==null&&(n.push(e),e=nn(e,t),!(e!==null&&E(e,t)<=r)););return n}function Qt(e,t){let r=e,n=fe(e,t);for(;n!==null;)r=n,n=fe(n,t);return r}function _n(e,t){let r=L(e,t);return r===null?k(e,t):Qt(r,t)}function cn(e,t){let r=k(e,t);for(;r!==null;){let n=Y(r,t);if(n!==null)return n;r=k(r,t)}return null}function Yc(e,t){if(B(e)){let n=Y(e,t);return n===null?cn(e,t):n}else return he(e,t)}function un(e,t){let r=[],n=Qt(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=_n(n,t);return r}function Xt(e){$.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function an(e,t){let r=e._$visited;if(B(e))if(r){let i=L(e,t);return i===null?k(e,t):i}else return e._$visited=!0,e;else if(r){let i=L(e,t);return i===null?k(e,t):i}else return e._$visited=!0,fe(e,t)}function Fc(e,t,r){if(B(t)){if(e)return t;{let i=Y(t,r);return i===null?k(t,r):i}}else{if(e)return he(t,r);{let i=Y(t,r);return i===null?k(t,r):i}}}function on(e,t){return t._$visited&&e===t._id}function fn(e,t,r=!1,n=!0){let i=[];Xt(t);let l=e._id;for(;!on(l,e);)r?i.push($.dcp(e)):i.push(e),e=an(e,t);return r?i.push($.dcp(e)):i.push(e),n&&Xt(t),i}function Mc(e,t){let r={};r._depth=E(e,t),r._breadth=Ht(e,t);let n=k(e,t);return r._pbreadth=n===null?null:Ht(n,t),r._id=e._id,r}function Xr(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function Kt(e,t){let r=[],n=e[0],i=[Xr(n)];for(i[0].ele._pbreadth=null;i.length>0;){let l=[];for(let c=0;c<i.length;c++){i[c].ele._breadth=c,i[c].ele._depth=r.length;let u=F(i[c].nd,t);u=u.map(o=>Xr(o)),u.forEach((o,f)=>{o.ele._pbreadth=i[c].ele._breadth,i[c].ele._children.push([r.length+1,l.length+f])}),l=l.concat(u)}let _=i.map(c=>c.ele);r.push(_),i=l}return r}function hn(e,t){return un(e[0],t)}function dn(e,t,r=!1,n=!0){return fn(e[0],t,r,n)}function Gc(e,t){let r=Zt(e,t);return Kt(r,t)}function Zt(e,t){let r=e[e.length-1];return M(r,t)}function Hc(e,t,r=!1,n=!0){let i=Zt(e,t);return dn(i,t,r,n)}function Xc(e,t){let r=es(e,t);return Kt(r,t)}function es(e,t){let r=e[0];return M(r,t)}function Wc(e,t){let r=es(e,t);return hn(r,t)}function ts(e,t,r=!1){let n=M(e,t);return r||n.splice(0,1),n}function Jc(e,t){return F(e,t)}function zc(e,t){let r=ts(e,t,!1),n=sdfs.map(l=>E(l,t)),i=Math.max(...n);return r=r.filter(l=>E(l,t)===i),r}function pn(e,t,r){let n=E(t,r),i=ts(t,r,!1),l=sdfs.map(_=>E(_,r));return i=i.filter(_=>E(_,r)===n+e),i}function Uc(e,t,...r){let n=r.map(i=>pn(i,e,t));return n=Array.prototype.concat(...n),n}function gn(e){let t=$.dict_keys(e)[0],r=e[t];return re(r,e)}function Vc(e){let t=gn(e);return M(t,e)}mn.exports={calc_next_id:Wt,update_nodes_ids:oe,creat_root:pc,creat_nd:gc,is_inited:Jr,is_root:te,is_fstch:Jt,is_lstch:zt,is_leaf:B,is_lonely:zr,is_id:Ge,is_connectable:Je,prepend_child:at,append_child:Ut,insert_child:Vr,add_rsib:Vt,add_lsib:Ur,get_fstch:fe,get_rsib:L,get_children:F,get_lstch:he,get_which_child:Kr,get_some_children:Zr,get_fstsib:qc,get_lstsib:en,get_preceding_sibs:Ec,get_following_sibs:Cc,get_sibs:se,get_which_sib:Ac,get_some_sibs:Ic,get_sibseq:Dc,get_lsib:Y,get_rsib:L,get_lyr:sn,get_breadth:Ht,get_count:Lc,get_depth:E,get_height:tn,get_fst_lyr_des_depth:Nc,get_lst_lyr_des_depth:Pc,get_which_lyr_des_depth:Oc,get_root:re,get_parent:k,get_ances:ot,get_which_ance:Rc,get_some_ances:jc,get_rsib_of_fst_ance_having_rsib:rn,get_sdfs_next:nn,get_drmost_des:ln,get_sdfs_prev:Bc,get_sdfs:M,get_lsib_of_fst_ance_having_lsib:cn,get_dlmost_des:Qt,get_edfs_next:_n,get_edfs_prev:Yc,get_edfs:un,clear_$visited:Xt,get_sedfs_next:an,is_sedfs_traverse_finished:on,get_sedfs_prev:Fc,get_sedfs:fn,get_deses:ts,get_fst_lyr_deses:Jc,get_lst_lyr_deses:zc,get_which_lyr_deses:pn,get_some_lyrs_deses:Uc,nd2ele:Mc,sdfs2mat:Kt,sdfs2edfs:hn,sdfs2sedfs:dn,edfs2mat:Gc,edfs2sdfs:Zt,edfs2sedfs:Hc,sedfs2mat:Xc,sedfs2sdfs:es,sedfs2edfs:Wc,update_disconnected_nodes:He,update_orig_nodes:Xe,leafize:Qr,rootize:We,disconnect:Se,rm_fstch:kc,rm_lstch:wc,rm_which:xc,rm_some:Tc,rm_all:Sc,update_treeid:Te,update_one_nodeid:Wr,update_nodes_ids:oe,prepend_child_tree:mc,append_child_tree:bc,add_rsib_tree:yc,add_lsib_tree:$c,insert_child_tree:vc,get_root_via_tree:gn,tree2sdfs:Vc}});var kn=a((wf,vn)=>{function bn(e="E"){class t extends Event{#t;constructor(n,i){super(n),this.#t=i}get data(){return this.#t}set data(n){this.#t=n}}return t}var yn=bn();function $n(e="ET"){class t extends EventTarget{#t=new Map;addEventListener(n,i){super.addEventListener(n,i),this.#t.set(n,i)}ls(){return this.#t}removeEventListener(n){super.removeEventListener(n),this.#t.delete(n)}dispatch(n,i){let l=new yn(n,i);return this.dispatchEvent(l),l}}return t}var Qc=$n();vn.exports={creat_event_cls:bn,E:yn,creat_event_target_cls:$n,ET:Qc}});var Zn=a((xf,Kn)=>{var Ln=Mt(),Ue=Gt(),de=ss(),{ET:wn}=kn(),Kc=["_fstch","_lsib","_rsib","_parent","_tree"];function Rn(e){return e._tree!==void 0}function rs(e){return e._tree===e}function Zc(e){return e._lsib===null}function eu(e){return e._rsib===null}function tu(e){return e._fstch===null}function su(e){return e.$sibs(!0).length===1}function bt(e){return rs(e)||!Rn(e)}function xn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function Tn(e,t){let r=0,n=t._fstch;for(;;){if(r===e)return n;if(n===null)return n;n=n._rsib,r=r+1}}function Sn(e,...t){let r=[],n=0,i=e._fstch;for(;;){if(t.includes(n))r.push(i);else if(i===null)return r;i=i._rsib,n=n+1}}function ns(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function ru(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function jn(e,t=!1){let r=e._rsib,n=e;for(;r!==null;)n=r,r=r._rsib;return t||n!==e?n:null}function yt(e,t=!1){let r=is(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function nu(e){let t=yt(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function cs(e){let t=[],n=yt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function Bn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function Yn(e,t=!1){let r=cs(e),n=Bn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function iu(e,t){let r=yt(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function lu(e,...t){return Yn(e,!0).filter((i,l)=>t.includes(l))}function En(e){return cs(e).length}function _u(e,t=!1){return e.$sibs(t).length}function is(e){return jn(e,!0)._parent}function cu(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function uu(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function gt(e,t=!1){let r=[],n=e;for(t&&r.push(n),n=n.$parent();n!==null;)r.push(n),n=n.$parent();return r}function au(e,...t){return gt(e,!0).filter((i,l)=>t.includes(l))}function ou(e,t=!1){return gt(e,t).length}function fu(e){let t=e.$parent();return t===null?null:t.$lsib()}function hu(e){let t=e.$parent();return t===null?null:t.$rsib()}function du(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function pu(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function gu(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function mu(e){let t=e.$parent();return t===null?null:t.$breadth()}function bu(e){return e.$lyr().indexOf(e)}function yu(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function $u(e){let r=e.$root().$edfs(),n;if(e.$is_leaf())n=r.indexOf(e);else{let i=e.$dlmost_des();n=r.indexOf(i)}return r=r.slice(0,n+1),offset=r.filter(i=>i.$is_leaf()).length-1,offset}function Cn(e,t=!1){let r=Mn(e),n=ge(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function vu(e){let t=e.$deses(!1),r=t.map(i=>i.$depth()),n=Math.max(...r);return t=t.filter(i=>i.$depth()===n),t}function ku(e,t){let r=t.$depth(),n=t.$deses(!1),i=n.map(l=>l.$depth());return n=n.filter(l=>l.$depth()===r+e),n}function wu(e,...t){let r=e.$depth(),n=t.map(_=>_+r),i=e.$deses(!1),l=i.map(_=>_.$depth());return i=i.filter(_=>n.includes(_.$depth())),i}function ls(e,t){if(!bt(t))return console.log("only root or uninited could be prepend"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._lsib=null,r)t._rsib=null,t._parent=e;else{let n=e._fstch;n._lsib=void 0,t._rsib=n,t._parent=void 0}return e._fstch=t,t}function _s(e,t){if(!bt(t))return console.log("only root or uninited could be append"),t;let r=e.$is_leaf();if(t._tree=e._tree,t._rsib=null,r)e._fstch=t,t._lsib=null;else{let n=e.$lstch();n._parent=void 0,n._rsib=t,t._lsib=void 0}return t._parent=e,t}function Fn(e,t){if(!bt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addrsib to root"),e;let r=e.$is_lstch();return t._tree=e._tree,r?(t._parent=e._parent,e._parent=void 0,t._rsib=null):(t._rsib=e._rsib,t._parent=void 0),e._rsib=t,t._lsib=void 0,t}function xu(e,t){if(!bt(t))return console.log("only root or uninited could be add"),t;if(e.$is_root())return console.log("cant addlsib to root"),e;let r=e.$is_fstch();if(t._tree=e._tree,r){let n=e.$parent();e._lsib=void 0,t._lsib=null,n._fstch=t}else{let n=e.$lsib();n._rsib=t,t._lsib=void 0}return t._rsib=e,t._parent=void 0,t}function qn(e,t,r){let n=ns(t),i=n.length;if(i===0)r=ls(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=ls(t,r);else if(e===i)r=_s(t,r);else{let _=n[e-1];r=Fn(_,r)}return r}function Tu(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function Su(e){let t=e.$fstch();if(t!==null)return t;{let r=e.$rsib();return r!==null?r:e.$rsib_of_fst_ance_having_rsib()}}function Mn(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function Eu(e){if(e.$is_root())return null;if(e.$is_leaf()){let r=e.$lsib();return r!==null?r:e.$parent()}else{let r=e.$lsib();return r!==null?r.$is_leaf()?r:r.$drmost_des():e.$parent()}}function ge(e){let t=e.$depth();if(e===null)return[];{let r=[e];for(e=e.$sdfs_next();e!==null&&e.$depth()>t;)r.push(e),e=e.$sdfs_next();return r}}function Cu(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function qu(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function Au(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function Iu(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function Du(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function Gn(e){let t=e.$visited;if(e.$is_leaf())if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e;else if(t){let n=e.$rsib();return n===null?e.$parent():n}else return e.$visited=!0,e.$fstch()}function Nu(e,t){if(t.$is_leaf()){if(e)return t;{let n=t.$lsib();return n===null?t.$parent():n}}else{if(e)return t.$lstch();{let n=t.$lsib();return n===null?t.$parent():n}}}function Pu(e){e.$sdfs().forEach(r=>{delete r.$visited})}function Ou(e,t){return t.$visited&&e===t}function An(e){Pu(e);let t=[],r=new Set,n=e;for(;!Ou(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=Gn(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function Lu(e){return e._fstch=null,e}function ft(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function ht(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function pe(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();Lu(r);let n=ht(e);return ft(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=ht(e);return ft(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=ht(e);return ft(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=ht(e);return ft(e),e}}function In(e){let t={};return t._nd=e,t._children=[],t}function Dn(e){let t=[],r=e[0],n=[In(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let _=0;_<n.length;_++){n[_]._breadth=_,n[_]._depth=t.length;let c=n[_]._nd.$children();c=c.map(u=>In(u)),c.forEach((u,o)=>{u._pbreadth=n[_]._breadth,n[_]._children.push([t.length+1,i.length+o])}),i=i.concat(c)}let l=n;t.push(l),n=i}return t}function Nn(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ue.is_cu_property(i)&&(n[i]=r[i]);return n}function Ru(e,t="_children"){let r=e[0][0],n=Nn(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let _=0;_<i.length;_++){let c=i[_],u=c.d,o=c.ele,v=c.ele._children.map(T=>e[T[0]][T[1]]);for(let T=0;T<v.length;T++){let Q=v[T],js=Nn(Q,t);u[t].push(js);let Dl={d:js,ele:Q};l.push(Dl)}}i=l}return n}function Pn(e,t="_children"){let r=new J;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ue.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function ju(e,t="_children"){let r=Pn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let _=n[l].d,c=n[l].nd,u=_[t]===void 0?[]:_[t];for(let o=0;o<u.length;o++){let f=u[o],v=Pn(f,t);c.$append_child(v);let T={d:f,nd:v};i.push(T)}}n=i}return r}function Bu(e){let t=["_fstch","_lsib","_rsib","_parent","_tree","$guid","_guid","_id","$open_at","$close_at"];e._fstch=void 0,e._lsib=void 0,e._rsib=void 0,e._parent=void 0,e._tree=void 0,e.$guid=void 0,e._guid=void 0,e._id=void 0,e.$open_at=void 0,e.$close_at=void 0;for(let r of t)Object.defineProperty(e,r,{enumerable:!1})}function Yu(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function Fu(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var Mu=["$fstch","$rsib","$parent"];function Gu(e){if(e.$fstch()!==null)return["$fstch"];if(e.$rsib()!==null)return["$rsib"];{let n=[],i=e.$parent();for(;i!==null;)if(n.push("$parent"),i.$rsib()!==null){n.push("$rsib");break}else i=i.$parent();return n}}function Hu(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var Hn={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function Xu(e,t){for(let r=0;r<t.length;r++){let n=Hn[t[r]];e=e[n]()}return e}function Wu(e){let t=new J,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=Xu(r,i)}return t}function Ju(e,t,r){if(r&&(t=t.$clone()),!e.$is_root())if(e.$is_lonely()){let n=e.$parent();e.$disconn(),n.$append_child(t)}else if(e.$is_lstch()){let n=e.$lsib();e.$disconn(),n.$add_rsib(t)}else{let n=e.$rsib();e.$disconn(),n.$add_lsib(t)}return t}var N=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){Bu(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ue.gen_guid()),r&&(this.#t=new wn)}get opt(){return this.#e}enable_et(){this.#t=new wn}disable_et(){this.#t=null}get et(){return this.#t}regis_recv_from_handler(t){let r=function(n){t(n.data.src,n.data.msg)};this.et.addEventListener("$msg__",r)}send_to(t,r){t.et.dispatch("$msg__",{src:this,msg:r})}$is_inited(){return Rn(this)}$is_root(){return rs(this)}$is_fstch(){return Zc(this)}$is_lstch(){return eu(this)}$is_leaf(){return tu(this)}$is_lonely(){return su(this)}$fstch(){return this._fstch}$lstch(){return xn(this)}$which_child(t){return Tn(t,this)}$some_children(...t){return Sn(this,...t)}$children(){return ns(this)}$children_count(){return ru(this)}$rsib(){return this._rsib}$lsib(){return nu(this)}$fstsib(t=!1){return yt(this,t)}$lstsib(t=!1){return jn(this,t)}$psibs(){return cs(this)}$fsibs(){return Bn(this)}$which_sib(t){return iu(t,this)}$some_sibs(...t){return lu(this,...t)}$sibseq(){return En(this)}$sibs(t=!1){return Yn(this,t)}$sibs_count(t=!1){return _u(this,t)}$parent(){return is(this)}$root(){return cu(this)}$ances(t=!1){return gt(this,t)}$which_ance(t){return uu(t,this)}$some_ances(...t){return au(this,...t)}$ances_count(t=!1){return ou(this,t)}$prepend_child(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,ls(this,t)}$insert_child(t,r){return r=r===void 0?new N(this.#e.with_id,this.#e.with_et):r,qn(t,this,r)}$append_child(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,_s(this,t)}$clone(){if(rs(this)){let t=pt(this);return mt(t)}else{let t=En(this),r=is(this);pe(this);let n=pt(this),i=mt(n);return qn(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new N(this.#e.with_id,this.#e.with_et):r.$clone();l=_s(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,Fn(this,t)}$add_lsib(t){return t=t===void 0?new N(this.#e.with_id,this.#e.with_et):t,xu(this,t)}$rsib_of_fst_ance_having_rsib(){return Tu(this)}$sdfs_next(){return Su(this)}$drmost_des(){return Mn(this)}$sdfs_prev(){return Eu(this)}$sdfs(){return ge(this)}$dlmost_des(){return Cu(this)}$edfs_next(){return qu(this)}$lsib_of_fst_ance_having_lsib(){return Au(this)}$edfs_prev(){return Iu(this)}$edfs(){return Du(this)}$offset(){return $u(this)}$sedfs_next(){return Gn(this)}$sedfs_prev(t){return Nu(this)}$sedfs(){return An(this)}$deses(t=!1){return Cn(this,t)}$lst_lyr_deses(){return vu(this)}$which_lyr_deses(t){return ku(t,this)}$some_lyrs_deses(...t){return wu(this,...t)}$count(t=!0){return Cn(this,t).length}$depth(t=!1){return gt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return mu(this)}$breadth(){return bu(this)}$width(){return yu(this)}$lyr(){return gu(this)}$lcin(){return du(this)}$rcin(){return pu(this)}$luncle(){return fu(this)}$runcle(){return hu(this)}$sdfs_repr(t=Yu,r=!1){let n=this.$root(),i=ge(n),c=ge(this).map((u,o)=>t(u,o,i)).join(`
|
|
3
|
+
`);if(console.log(c),r)return c}$sedfs_repr(t=Fu,r=!1){let n=this.$root();Xn(n);let _=An(this).map((c,u)=>t(c,u)).join(`
|
|
4
|
+
`);if(console.log(_),r)return _}$disconn(){return pe(this)}$rm_fstch(){let t=this._fstch;return pe(t)}$rm_lstch(){let t=xn(this);return pe(t)}$rm_which(t){let r=Tn(t,this);return pe(r)}$rm_some_children(...t){return Sn(this,...t).map(n=>pe(n))}$rm_all_children(){return ns(this).map(r=>pe(r))}$dump(){if(this.$is_root())return pt(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=pt(this);Ln.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return Dn(ge(this))}$nest_dict(t="_children"){let r=Dn(ge(this));return Ru(r,t)}$index(){return this.$sibseq()}$sdfs_index(){return this.$root().$sdfs().indexOf(this)}$sdfs_leafs(){return this.$root().$sdfs().filter(i=>i.$is_leaf())}$sdfs_nonleafs(){return this.$root().$sdfs().filter(i=>!i.$is_leaf())}$sdfs_leaf_index(){return this.$sdfs_leafs().indexOf(this)}$sdfs_nonleaf_index(){return this.$sdfs_nonleafs().indexOf(this)}$sdfs_next_action_for_srch(){return Gu(this)}$sdfs_srch_action_list(){return Hu(this)}$get_node_with_action(t){let r=this;for(let n=0;n<t.length;n++)r=r[t[n]]();return r}$replace_with(t,r=!0){return Ju(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(N,"name",{value:"\u200D"});function Xn(e){let t=ge(e);return t.forEach((r,n)=>{r._id=n}),t}function zu(e){let t=new J;return t._id=e._id,t.$guid=e._guid,t}function On(e,t){for(;t._id!==e;)t=t._parent;return t}function ze(e,t){let r=Wn(t);for(let n of r)e[n]=t[n];return e}function mt(e){let t=Ue.dict_keys(e)[0],r=de.get_root(e[t],e),n=zu(r);n=ze(n,r);let i=n,l=r,_=de.get_sdfs_next(l,e),c;for(;_!==null;)if(l._fstch===_._id)c=i.$prepend_child(),c._id=_._id,c.$guid=_._guid,c=ze(c,_),i=c,l=_,_=de.get_sdfs_next(l,e);else if(l._rsib===_._id)c=i.$add_rsib(),c._id=_._id,c.$guid=_._guid,c=ze(c,_),i=c,l=_,_=de.get_sdfs_next(l,e);else if(_._parent!==null&&_._parent!==void 0){let u=_._parent;i=On(u,i),c=i.$append_child(),c._id=_._id,c.$guid=_._guid,c=ze(c,_),i=c,l=_,_=de.get_sdfs_next(l,e)}else if(_._parent===void 0){let o=de.get_parent(_,e)._id;i=On(o,i),c=i.$append_child(),c._id=_._id,c.$guid=_._guid,c=ze(c,_),i=c,l=_,_=de.get_sdfs_next(l,e)}else console.log("Impossible",i,l,_);return n}function dt(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function Wn(e){return Ue.dict_keys(e).filter(n=>!Kc.includes(n))}function Uu(e,t){let r=Wn(e);for(let n of r)t[n]=e[n];return t}function pt(e){let t=Xn(e),r=e._id,n={};return t.forEach((i,l)=>{let _={};_._tree=r,_._fstch=dt(i,"_fstch"),_._lsib=dt(i,"_lsib"),_._rsib=dt(i,"_rsib"),_._parent=dt(i,"_parent"),_._id=i._id,_._guid=i.$guid,_=Uu(i,_),n[i._id]=_}),n}var J=class extends N{constructor(t=!0,r=!0){super(t,r),this._fstch=null,this._lsib=null,this._rsib=null,this._parent=null,this._tree=this}$is_parent_of(t){return t.$parent()===this}$is_root_of(t){return t.$root()===this}$is_descendant_of(t){return t.$deses(!1).indexOf(this)>=0}$is_inclusive_descendant_of(t){return t.$deses(!0).indexOf(this)>=0}$is_ancestor_of(t){return t.$ances(!1).indexOf(this)>=0}$is_inclusive_ancestor_of(t){return t.$ances(!0).indexOf(this)>=0}$is_sibling_of(t){return t.$sibs(!1).indexOf(this)>=0}$is_inclusive_siblings_of(t){return t.$sibs(!0).indexOf(this)>=0}$is_preceding_of(t){let r=t.$sdfs(),n=r.indexOf(t),i=r.indexof(this);return i>=0&&i<n}$is_following_of(t){let r=t.$sdfs(),n=r.indexOf(t);return r.indexof(this)>n}$is_first_child_of(t){return this===t.$fstch()}$is_child_of(t){return t.$children().indexOf(this)>=0}$is_last_child_of(t){return this===t.$lstch()}$is_previous_sibling_of(t){return this===t.$lsib()}$is_next_sibling_of(t){return this===t.$rsib()}};Object.defineProperty(J,"name",{value:"\u200D"});function Jn(e){if(typeof e=="string"){let t=Ln.rjson(e);return mt(t)}else return typeof e=="object"?mt(e):new J}function Vu(e,t="_children"){return ju(e,t)}function Qu(e){let t=e.$dump();return Jn(ndict)}function us(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function zn(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function Un(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function Vn(e,t,...r){let n=zn(e);return t&&(out=us(e,t,...r),n=n+"@"+out),n}function Qn(e,t,...r){let n=Un(e);return t&&(out=us(e,t,...r),n=n+"@"+out),n}function as(e,t,r,n,i,...l){let _=r.$sdfs(),c=n.$sdfs();if(_.length!==c.length)return!1;{let u=_.map(f=>t(f,i,...l)),o=c.map(f=>t(f,i,...l));e&&(u.sort(),o.sort());for(let f=0;f<u.length;f++){let v=u[f],T=o[f];if(v!==T)return!1}}return!0}function Ku(e,t,r,...n){return as(!1,Qn,e,t,r,...n)}function Zu(e,t,r,...n){return as(!0,Vn,e,t,r,...n)}Kn.exports={SDFS_NEXT_BUILD_ACTION_DICT:Hn,build_from_srch_action_list:Wu,SDFS_NEXT_SRCH_ACTIONS:Mu,RESERVED_EVENT_TYPES:["$msg__"],Node:N,Tree:J,Root:J,load:Jn,load_from_nest_dict:Vu,clone:Qu,get_cu_sign:us,get_internal_sign_ignore_order:zn,get_internal_sign_keep_order:Un,get_sign_keep_order:Qn,struct_eq:as,struct_eq_keep_order:Ku,get_sign_ignore_order:Vn,struct_eq_ignore_order:Zu}});var os=a((Tf,ei)=>{var ea=Zn(),ta=ss(),sa=Mt();ei.exports={ndfunc:ta,ndcls:ea,ndutil:sa}});var kt=a((Pf,si)=>{var C=w(),ra=os(),{Root:na}=os().ndcls,{TYPE_DICT:Sf,isNode:Ef,empty:p,is_bigint_str:Cf,is_jsint_str:qf,NUM_TYPE_DICT:Af,parse_abnormal_num:If,parse_int:Df,parse_float:Nf,parse_num:ia,to_str:vt}=w(),P=class extends na{constructor(t=p){super(!1,!1),this.key=t,this.value=p,this.type=p,this.chtype=p,this.hashes=new Set,this.kcmt=[],this.bvcmt=[],this.avcmt=[]}kto_str(){return this.key===p?p:JSON.stringify(this.key)}is_undefined(){return this.type===C.TYPE_DICT.UndefinedLiteral}is_null(){return this.type===C.TYPE_DICT.NullLiteral}is_boolean(){return this.type>=2&&this.type<=4}is_false(){return this.type===3}is_true(){return this.type===4}is_numerical(){return nd.type>=5&&nd.type<=11}is_int(){return this.type===6}is_float(){return this.type===7}is_bigint(){return this.type===8}is_infi(){return this.type===9||this.type===10}is_pos_infi(){return this.type===9}is_neg_infi(){return this.type===10}is_nan(){return this.type===11}is_str(){return this.type===12}is_ary(){return this.type===13}is_ele(){return this.chtype===14}is_dict(){return this.type===15}is_prop(){return this.chtype===16}is_ref(){return this.type===17}is_leaf(){return!this.is_ary()&&!this.is_dict()}is_cmt(){return this.is_lcmt()||this.is_blcmt()}is_lcmt(){return this.type>=18&&this.type<=22}is_blcmt(){return this.type>=23&&this.type<=27}is_ttcmt(){return this.type===19||this.type===24}is_kcmt(){return this.type===20||this.type===25}is_bvcmt(){return this.type===21||this.type===26}is_avcmt(){return this.type===22||this.type===27}is_prim(){return this.is_leaf()&&!is_cmt()}},fs=class extends P{constructor(t=p){super(t),this.value=void 0,this.type=C.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return vt(this.value)}},hs=class extends P{constructor(t=p){super(t),this.value=null,this.type=C.TYPE_DICT.NullLiteral}vto_rawstr(){return vt(this.value)}},ds=class extends P{constructor(t,r=p){super(r),t==="true"&&(this.value=!0,this.type=C.TYPE_DICT.BooleanLiteral.TrueLiteral),t==="false"&&(this.value=!1,this.type=C.TYPE_DICT.BooleanLiteral.FalseLiteral)}vto_rawstr(){return vt(this.value)}},ps=class extends P{constructor(t,r=p){if(super(r),typeof t=="string"){let n=ia(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=vt(this.value);return this.type===C.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Ve(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var gs=class extends P{constructor(t,r=p){super(r),this.value=t,this.type=C.TYPE_DICT.StringLiteral}vto_rawstr(){return Ve(this.value)}};function la(e){e instanceof $t?e.type=C.TYPE_DICT.CommentLine.tt:e.type=C.TYPE_DICT.CommentBlock.tt}function _a(e,t){return{lsib:e.$lsib(),data:t}}function ti(e,t){la(t);let r=_a(e,t);return e.ttcmt.push(r),r}var ms=class extends P{constructor(t=p){super(t),this.value=[],this.type=C.TYPE_DICT.ArrayExpression._self,this.open=p,this.close=p,this.ttcmt=[]}is_inited(){return this.open===p&&this.close===p}is_opened(){return this.open!==p&&this.close===p}is_closed(){return this.open!==p&&this.close!==p}append_child(t){return t.chtype=C.TYPE_DICT.ArrayExpression.element,t.is_ref()?this.value.push(t.value.value):this.value.push(t.value),this.$append_child(t)}append_ttcmt(t){return ti(this,t)}},bs=class extends P{constructor(t=p){super(t),this.value={},this.type=C.TYPE_DICT.ObjectExpression._self,this.open=p,this.close=p,this.ttcmt=[]}is_inited(){return this.open===p&&this.close===p}is_opened(){return this.open!==p&&this.close===p}is_closed(){return this.open!==p&&this.close!==p}append_child(t){return t.chtype=C.TYPE_DICT.ObjectExpression.property,t.is_ref()?this.value[t.key]=t.value.value:this.value[t.key]=t.value,this.$append_child(t)}append_ttcmt(t){return ti(this,t)}},ys=class extends P{constructor(t,r=p){super(r),this.value=t,this.type=C.TYPE_DICT._Ref}vto_rawstr(){if(this.value.is_leaf())return this.value.vto_rawstr();if(this.value.key!==p)return'&"'+Ve(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Ve(t)+'"'}},$t=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
|
|
5
|
+
`){return"//"+Ve(this.value)+t}},$s=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Ve(this.value)+"*/"}};si.exports={UndefinedLiteral:fs,NullLiteral:hs,BooleanLiteral:ds,NumericLiteral:ps,StringLiteral:gs,ArrayExpression:ms,ObjectExpression:bs,_Ref:ys,CommentLine:$t,CommentBlock:$s,_ndtree:ra}});var ui=a((Of,ci)=>{var{empty:ws}=w(),{UndefinedLiteral:ri,NullLiteral:ni,BooleanLiteral:ii,NumericLiteral:li,StringLiteral:vs,ArrayExpression:ca,ObjectExpression:ua,CommentLine:aa,CommentBlock:oa,_Ref:ks}=kt();function fa(e,t){let r=ws,n=e;for(;n!==null;){if(n.key===t){r=n;break}else if(n.hashes.has(t)){r=n;break}else if(n.$sibseq().toString()===t){r=n;break}n=n.$sdfs_prev()}return r!==null?r:ws}function _i(e,t){return e instanceof ri?new ri("undefined",t):e instanceof ni?new ni("null",t):e instanceof ii?new ii(e.vto_rawstr(),t):e instanceof li?new li(e.vto_rawstr(),t):e instanceof vs?new vs(e.value,t):e instanceof aa||e instanceof oa?new vs(e.value,t):e instanceof ca?new ks(e,t):e instanceof ua?new ks(e,t):e instanceof ks?(e=e.value,_i(e,t)):ws}ci.exports={find_refnd_with_hash:fa,clone:_i}});var vi=a((Lf,me)=>{var ha=Array,da=w(),{empty:y,parse0:pa}=w(),Ke=class extends ha{get lst(){return this[this.length-1]}set lst(t){this[this.length-1]=t}get top(){return this[this.length-1]}set top(t){this[this.length-1]=t}get fst(){return this[0]}set fst(t){this[0]=t}get bot(){return this[0]}set bot(t){this[0]=t}*gen_from_lst(){for(let t=this.length-1;t>-1;t--)yield this[t]}};function*ga(e){for(let t of e)yield t;e=null}function*ma(e,t){yield*t,yield*e}var Ze=Ft(),xs=ke(),Ce=Mr(),{UndefinedLiteral:ba,NullLiteral:ya,BooleanLiteral:ai,NumericLiteral:$a,StringLiteral:oi,CommentLine:Qe,CommentBlock:va,ArrayExpression:Ts,ObjectExpression:ka}=kt(),H=A(),fi=H.gtv,ne=H.STATE_DICT,Ss=H.LEFTED_TYPE,Ee=H.AVND_CACHE_STATE_DICT,G=w(),b=Z(),hi=ui();function*yi(e){for(;e.length>0;)yield e.pop()}function di(e){let t;return e.__is_sync_mode()?t=Ze.from_generator(e.g,e.ch_cache.curr):t=Ze.from_generator(yi(e.unshift_cache),e.ch_cache.curr),t}function pi(e,t,r){e.lefted.type=Ss.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=H.get_main_eofv_with_code(e.state)}function $i(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function wa(e,t,r){return $i(e,t,r),e.state=H.get_lcmt_eofv_with_code(e.state),e}function xa(e,t,r){return $i(e,t,r),e.state=H.get_blkcmt_eofv_with_code(e.state),e}function Ta(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(yi(e.unshift_cache),e.ch_cache.curr),r}function gi(e,t,r,n){let i=Ta(e,r);return i.state!==Ce.STATE_DICT.succ?((t===Qe?wa:xa)(e,i,n),y):new t(i.rslt)}function mi(e,t){let r=new t(e.str_cache.k);return e.$set_avnd_cache(r),e.$mv_key_to_nd(r),e.$mv_kcmt_to_kcmt(),e.$mv_bvcmt_to_bvcmt(),r.open=e.ch_cache.curr,e.stack.lst.append_child(r),e.stack.push(r),t===Ts?e.state=ne.bv:e.state=ne.bk,e}var Es=Symbol("root_lblk_ch"),bi=Symbol("root_rblk_ch"),qe=class{#t=fi(ne.bv);#e=new Ke;constructor(t,r=" "){if(r!==y){let i=ga(r);t=ma(t,i)}this.g=t,this.lefted={type:y,data:y},this.ch_cache={tmp:y,curr:y},this.str_cache={k:y,v:y,maybe_vquote:y},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new Ts;this.stack.push(n),n.open=Es,this.avnd_cache={state:Ee.handling,data:n},this.unshift_cache=new Ke,this.mode="sync"}__use_sync_mode(){this.mode="sync"}__use_async_mode(){this.mode="async"}__is_sync_mode(){return this.mode==="sync"}__is_async_mode(){return this.mode==="async"}__unshift_g(t){t=t??this.ch_cache.curr;for(let r of t)this.unshift_cache.unshift(r)}$has_yield_sign(){return this.avnd_cache.state===Ee.handled}$set_yield_sign(){this.avnd_cache.state=Ee.handled}$clear_yield_sign(){this.avnd_cache.state=Ee.handling}get state(){return this.#t}set state(t){this.#t=fi(t)}get stack(){return this.#e}$next_ch(){return this.unshift_cache.length>0?this.ch_cache.curr=this.unshift_cache.pop():this.ch_cache.curr=this.g.next().value,this.ch_cache.curr}$is_currch_eof(){return this.ch_cache.curr===void 0}$handle_main_eof(){return this.state=H.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return b.commas.has(this.ch_cache.curr)}$is_currch_colon(){return b.colons.has(this.ch_cache.curr)}$is_currch_ws(){return xs.is_ws(this.ch_cache.curr)}$is_currch_quote(){return b.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===b.slash}$is_currch_asterisk(){return this.ch_cache.curr===b.asterisk}$is_currch_ary_lblk(){return b.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return b.obj_blks.lhas(this.ch_cache.curr)}$is_currch_lblk(){return this.$is_currch_ary_lblk()||this.$is_currch_obj_lblk()}$is_currch_ary_rblk(){return b.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return b.obj_blks.rhas(this.ch_cache.curr)}$is_currch_rblk(){return this.$is_currch_ary_rblk()||this.$is_currch_obj_rblk()}$is_currch_hash(){return b.hash===this.ch_cache.curr}$is_currch_ref(){return b.ref===this.ch_cache.curr}$mv_avcmt_to_avcmt(){let t=this.avnd_cache.data;t.avcmt=this.cmt_cache.avcmt,this.cmt_cache.avcmt=[]}$change_state_when_end_av(t=y,r=y){return this.stack.lst.is_ary()?t===y?this.state=ne.bv:(this.state=ne.v,this.str_cache.v=t,r===y||(this.str_cache.maybe_vquote=r)):t===y?this.state=ne.bk:(this.state=ne.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===y){let n=pa(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===G.TYPE_DICT.UndefinedLiteral?r=new ba(this.str_cache.k):n.type===G.TYPE_DICT.NullLiteral?r=new ya(this.str_cache.k):n.type===G.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new ai("true",this.str_cache.k):n.type===G.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new ai("false",this.str_cache.k):n.type===G.TYPE_DICT.StringLiteral?r=new oi(n.value,this.str_cache.k):r=new $a(n,this.str_cache.k)}else r=new oi(t,this.str_cache.k);return this.str_cache.v=y,this.str_cache.maybe_vquote=y,r}$mv_kcmt_to_kcmt(){let t=this.avnd_cache.data;t.kcmt=this.cmt_cache.kcmt,this.cmt_cache.kcmt=[]}$mv_bvcmt_to_bvcmt(){let t=this.avnd_cache.data;t.bvcmt=this.cmt_cache.bvcmt,this.cmt_cache.bvcmt=[]}$mv_key_to_nd(){let t=this.avnd_cache.data;return t.key=this.str_cache.k,this.str_cache.k=y,t.key}$set_avnd_cache(t,r=Ee.handling){return this.avnd_cache.data=t,this.avnd_cache.state=r,this.avnd_cache}$setup_leafnd(){let t=this.$vcache_to_nd();this.$set_avnd_cache(t,Ee.handling),this.$mv_key_to_nd(),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),this.$mv_avcmt_to_avcmt(),this.stack.lst.append_child(t)}$handle_quote(t){let r=di(this);return r.state!==Ze.STATE_DICT.succ?(pi(this,r,t),y):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=y}$refresh_key(t=y){t===y?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return gi(this,Qe,Ce.lc_from_generator,Ss.lcmt)}$handle_blkcmt(){return gi(this,va,Ce.blk_from_generator,Ss.blkcmt)}$push_kcmt(t){t.type=Ce instanceof Qe?G.TYPE_DICT.CommentLine.k:G.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Qe?"CommentLine":"CommentBlock";t.type=G.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ce instanceof Qe?G.TYPE_DICT.CommentLine.k:G.TYPE_DICT.CommentBlock.k,this.cmt_cache.avcmt.push(t)}$mv_avcmt_to_ttcmt(t){t=t??this.avnd_cache.data.$parent();for(let r of this.cmt_cache.avcmt)t.$append_child(r);this.cmt_cache.avcmt=[]}$open_nonleaf_nd(){if(b.array_blks.lhas(this.ch_cache.curr))return mi(this,Ts);if(b.obj_blks.lhas(this.ch_cache.curr))return mi(this,ka)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return b[r].getl(this.ch_cache.curr)===t.open}$close_nonleaf_nd(){let t=this.stack.lst;t.close=this.ch_cache.curr,this.$set_avnd_cache(t),this.stack.pop(),this.state=ne.av}$get_hash_or_ref(t="#"){let r=y,n=this.$next_ch(),i="";for(;!xs.is_ws(n)&&!b.commas.has(n)&&!b.colons.has(n)&&!b.array_blks.has(n)&&!b.obj_blks.has(n)&&n!==b.hash&&n!==b.ref&&n!==b.slash;)if(b.quotes.has(n)){let l=di(this);if(l.state!==Ze.STATE_DICT.succ)return pi(this,l,this.ch_cache.curr),t===b.hash?this.state=H.get_hash_quote_eofv_with_code(this.state):this.state=H.get_ref_quote_eofv_with_code(this.state),r;i=i+l.rslt,n=this.$next_ch()}else{if(n===void 0)return $handle_main_eof(),r;i=i+n,n=this.$next_ch()}return this.__unshift_g(n),r=i,r}$is_hash_of_pnd(){return this.stack.lst.$children().length===0}$find_ref(t){let r=this.stack.lst,n=r.$lstch();return n===null&&(n=r),hi.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=hi.clone(t,this.str_cache.k);this.$set_avnd_cache(n),this.$mv_key_to_nd(n),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),r.append_child(n)}};qe[Es]=Es;qe[bi]=bi;qe.MODES=["sync","async"];me.exports=qe;me.exports.Stack=Ke;me.exports._type_util=da;me.exports._esc=Ze;me.exports._cmt=Ce;me.exports._ws=xs});var Ti=a((Rf,xi)=>{var{empty:ki}=w(),wi=A(),Ae=wi.gtv,X=wi.STATE_DICT;function Sa(e){let t=e.state;return t===Ae(X.bk)||(t===Ae(X.k)||t===Ae(X.ak)?(e.str_cache.k=ki,e.state=X.bk):t===Ae(X.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=X.bv:e.state=X.bk):t===Ae(X.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ae(X.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}xi.exports=Sa});var Ci=a((Bf,Ei)=>{var{empty:jf}=w(),Si=A(),Ie=Si.gtv,ie=Si.STATE_DICT;function Ea(e){let t=e.state;return t===Ie(ie.bk)||(t===Ie(ie.k)||t===Ie(ie.ak)?e.state=ie.bv:t===Ie(ie.bv)||(t===Ie(ie.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ie(ie.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Ei.exports=Ea});var Cs=a((Ff,Ai)=>{var{empty:Yf}=w(),qi=A(),De=qi.gtv,le=qi.STATE_DICT;function Ca(e){let t=e.state;return t===De(le.bk)||(t===De(le.k)?e.state=le.ak:t===De(le.ak)||t===De(le.bv)||(t===De(le.v)?(e.$setup_leafnd(),e.state=le.av):De(le.av))),e}Ai.exports=Ca});var Pi=a((Mf,Ni)=>{var{empty:Ii}=w(),Di=A(),Ne=Di.gtv,z=Di.STATE_DICT;function qa(e,t){let r=e.state,n=e.$handle_quote(t);return n===Ii||(r===Ne(z.bk)?(e.str_cache.k=n,e.state=z.k):r===Ne(z.k)?e.str_cache.k=e.str_cache.k+n:r===Ne(z.ak)?(e.$refresh_key(n),e.state=z.k):r===Ne(z.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=z.v):r===Ne(z.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=Ii):r===Ne(z.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Ni.exports=qa});var ji=a((Gf,Ri)=>{var{empty:Oi}=w(),qs=A(),O=qs.gtv,S=qs.STATE_DICT,Aa=qs.LEFTED_TYPE,be=Z();function Li(e,t){let r=e.state,n=e[t]();if(n!==Oi){let i=e.stack.lst;if(r===O(S.bk))i.append_ttcmt(n);else if(r===O(S.k))e.$push_kcmt(n),e.state=S.ak;else if(r===O(S.ak))e.$push_kcmt(n);else if(r===O(S.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===O(S.v))e.$setup_leafnd(),e.state=S.av;else if(r===O(S.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=S.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function Ia(e){return Li(e,"$handle_lcmt")}function Da(e){return Li(e,"$handle_blkcmt")}function Na(e){let t=e.state;t===O(S.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=be.slash,e.state=S.k):t===O(S.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+be.slash):t===O(S.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key(be.slash),e.state=S.k):t===O(S.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=be.slash,e.state=S.v):t===O(S.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+be.slash,e.str_cache.maybe_vquote=Oi):t===O(S.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(be.slash))}function Pa(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=be.slash,e.lefted.type=Aa.backslash,e.$handle_main_eof()):e.$is_currch_slash()?Ia(e):e.$is_currch_asterisk()?Da(e):Na(e),e}Ri.exports=Pa});var Fi=a((Xf,Yi)=>{var{empty:Hf}=w(),Bi=A(),Pe=Bi.gtv,_e=Bi.STATE_DICT;function Oa(e){let t=e.state;return t===Pe(_e.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=_e.k):t===Pe(_e.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Pe(_e.ak)?(e.$refresh_key(),e.state=_e.k):t===Pe(_e.bv)?e.$open_nonleaf_nd():t===Pe(_e.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Pe(_e.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Yi.exports=Oa});var Xi=a((Wf,Hi)=>{var{empty:Mi}=w(),Gi=A(),Oe=Gi.gtv,ye=Gi.STATE_DICT,La=Cs();function Ra(e){let t=e.state;return t===Oe(ye.bk)?e.$close_nonleaf_nd():t===Oe(ye.k)?(e.str_cache.k=Mi,e.$close_nonleaf_nd()):t===Oe(ye.ak)?(e.$refresh_key(),e.str_cache.k=Mi,e.$close_nonleaf_nd()):t===Oe(ye.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Oe(ye.v)?(e.$setup_leafnd(),e.state=ye.av,e.__unshift_g(e.ch_cache.curr)):t===Oe(ye.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),e.$close_nonleaf_nd()):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign(),e.__unshift_g(e.ch_cache.curr))),e}function ja(e){return e.$is_rblk_match()?Ra(e):La(e),e}Hi.exports=ja});var Ui=a((Jf,zi)=>{var{empty:Ba}=w(),Ji=A(),Le=Ji.gtv,ce=Ji.STATE_DICT,Ya=Z(),{CommentLine:Wi}=kt();function Fa(e){let t=e.state,r=e.$get_hash_or_ref(Ya.hash);if(r!==Ba){let n=e.stack.lst;if(t===Le(ce.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Le(ce.k)){let i=new Wi(r);e.$push_kcmt(i),e.state=ce.ak}else if(t===Le(ce.ak)){let i=new Wi(r);e.$push_kcmt(i)}else t===Le(ce.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Le(ce.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ce.av):t===Le(ce.av)&&e.avnd_cache.data.hashes.add(r)}return e}zi.exports=Fa});var Ki=a((zf,Qi)=>{var{empty:As}=w(),Vi=A(),Re=Vi.gtv,I=Vi.STATE_DICT,Ma=Z();function Ga(e){let t=e.state,r=e.$get_hash_or_ref(Ma.ref);if(r!==As){let n=e.$find_ref(r);if(n!==As){let i=e.stack.lst;t===Re(I.bk)||t===Re(I.k)||t===Re(I.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=I.ak):t===Re(I.bv)?(e.$add_ref_to_parent(n),e.state=I.av):t===Re(I.v)?(e.str_cache.maybe_vquote=As,e.$setup_leafnd(),e.state=I.av):t===Re(I.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=I.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=I.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}Qi.exports=Ga});var tl=a((Uf,el)=>{var{empty:Ha}=w(),Zi=A(),je=Zi.gtv,U=Zi.STATE_DICT;function Xa(e){let t=e.state;return t===je(U.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=U.k):t===je(U.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===je(U.ak)?(e.$refresh_key(),e.state=U.k):t===je(U.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=U.v):t===je(U.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=Ha):t===je(U.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}el.exports=Xa});var ll=a((Vf,il)=>{var{empty:Wa}=w(),Ja=vi(),za=Ti(),Ua=Ci(),Va=Cs(),Qa=Pi(),Ka=ji(),Za=Fi(),eo=Xi(),to=Ui(),so=Ki(),ro=tl(),nl=A(),sl=nl.gtv,rl=nl.STATE_DICT,no=Z();function*io(e,t=Wa){let r=new Ja(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(za(r),yield r):r.$is_currch_colon()?(Ua(r),yield r):r.$is_currch_ws()?(Va(r),yield r):r.$is_currch_quote()?(Qa(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(Ka(r),yield r):r.$is_currch_lblk()?(Za(r),yield r):r.$is_currch_rblk()?(eo(r),yield r):r.$is_currch_hash()?(to(r),yield r):r.$is_currch_ref()?r.state===sl(rl.av)||r.state===sl(rl.v)?r.__unshift_g(no.fst_comma+r.ch_cache.curr):(so(r),yield r):(ro(r),yield r)}il.exports=io});var ol=a((Qf,al)=>{var{sync_gen_from_str:Is,sync_gen_from_file:cl,async_gen_chunk_from_file:lo}=yr(),{is_should_yield:Ds}=A(),R=Z(),{is_nl:_o,is_ws:_l}=ke(),Ns=ll(),co={enable_ref:!1,encoding:"utf8"};function Ps(e,t={enable_ref:!1}){let r=Ns(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let _ of r){let c=_.state;if(Ds(n,l,c)&&!t.enable_ref){let u=n.avnd_cache.data;u.$disconn(),u=null}l=c}return i}function uo(e,t={enable_ref:!1}){let r=Is(e);return Ps(r,t)}function ao(e,t={enable_ref:!1,encoding:"utf8"}){let r=cl(e,t.encoding);return Ps(r,t)}function*Os(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ns(e),n=r.next().value,i=n.state;for(let l of r){let _=l.state;if(Ds(n,i,_)&&!t.enable_ref){let c=n.avnd_cache.data;yield c,c.$disconn(),c=null}i=_}}function*oo(e,t={enable_ref:!1,encoding:"utf8"}){let r=Is(e);yield*Os(r,t)}function*fo(e,t={enable_ref:!1,encoding:"utf8"}){let r=cl(e,t.encoding);yield*Os(r,t)}function ho(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function po(e){let t=Is(""),r=Ns(t," "),n=r.next().value;n.__use_async_mode();let i=ho();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function go(e,t){return e.data=e.data+t,e.state==="init"?t===R.slash?e.state="slash":R.quotes.has(t)?(e.label=t,e.state="quote"):t===R.hash?e.state="hash":t===R.ref?e.state="ref":e.can_send=!0:e.state==="quote"?t==="\\"?(e.state="esc",e.pstate="quote"):t===e.label&&(e.pstate!==""?(e.state=e.pstate,e.pstate=""):e.can_send=!0):e.state==="slash"?t===R.slash?e.state="lcmt":t===R.asterisk?e.state="blkcmt":R.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):_o(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===R.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===R.slash&&(e.can_send=!0):e.state==="hash"?_l(t)?e.can_send=!0:R.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?_l(t)?e.can_send=!0:R.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*mo(e,t){for(let r of e)go(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*bo(e){let t=po(e);for await(let r of e)yield*mo(r,t);yield t}function yo(e){let t=e.d.unshift_cache;t.forEach(r=>{e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state}),t=null}async function*$o(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,Ds(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*ul(e,t={enable_ref:!1,encoding:"utf8"}){e=bo(e);let r;for await(r of e)yo(r),yield*$o(r,t);yield r.rt}async function*vo(e,t={enable_ref:!1,encoding:"utf8"}){let r=lo(e,t.encoding,1024);yield*ul(r,t)}al.exports={OPT_DICT:co,parse_from_generator:Ps,parse_from_str:uo,parse_from_file:ao,gen_from_generator:Os,gen_from_str:oo,gen_from_file:fo,agen_from_generator:ul,agen_from_file:vo}});var wt=a((Kf,tt)=>{var{empty:ko}=w(),wo=Z(),et=ol();function Ls(e){return e.length===1?e[0]:e}function xo(){for(let e in et){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n);for(let l of i)l=Ls(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n);for await(let l of i)l=Ls(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=et[e](r,n).value;return Ls(i)},Object.defineProperty(t,"name",{value:e}),tt.exports[e]=t}tt.exports.OPT_DICT=et.OPT_DICT}xo();tt.exports.CFG=wo;tt.exports.empty=ko});var xt=a((Zf,fl)=>{var To=wt(),So=(e,t=!1)=>{let r=e.split("-");for(let n=1;n<r.length;++n)r[n]=r[n].charAt(0).toUpperCase()+r[n].slice(1);return t&&(r[0]=r[0].charAt(0).toUpperCase()+r[0].slice(1)),r.join("")},Eo=e=>e.replace(/-/g,"_"),Co=(e,t)=>typeof e=="string"?(e=e.trim().toLowerCase(),e==="false"||e==="0"||e==="no"||e==="off"||e==="fls"||e==="f"||e==="null"||e==="nul"||e==="none"||e==="nu"||e==="n"?!1:e==="true"||e==="1"||e==="yes"||e==="on"||e==="tru"||e==="t"||e==="y"?!0:e===""||e==="undefined"||e==="un"||e==="default"||e==="dflt"?!!t:!!e):e===void 0?!!t:!!e,qo=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},Ao=e=>To.parse_from_str(e+" ");fl.exports={dash_to_camel:So,dash_to_snake:Eo,attr_value_to_bool:Co,css_str_to_num:qo,parse_json_input:Ao}});var ml=a((eh,gl)=>{var hl=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),Io=async e=>{for(let t=0;t<e;++t)await hl()},Do=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),Tt=class{timers={};run(t,r,n=300){this.timers[t]&&clearTimeout(this.timers[t]),this.timers[t]=setTimeout(async()=>{await r(),delete this.timers[t]},n)}cancel(t){this.timers[t]&&(clearTimeout(this.timers[t]),delete this.timers[t])}},dl=()=>new Tt,pl=dl(),No=(e,t,r=300)=>{pl.run(e,t,r)},Po=e=>{pl.cancel(e)};gl.exports={wait_for_layout_ready:hl,wait_for_n_raf:Io,wait:Do,SimpleDebounce:Tt,creat_simple_debounce:dl,simple_debounce:No,cancel_simple_debounce:Po}});var $l=a((th,yl)=>{var{dash_to_camel:St}=xt(),bl=(e,t,r=!1)=>{let n=St(t,r)+"Element";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelector(`.${t}`):null}})},Oo=(e,t)=>{for(let r of t)bl(e,r,!1)},Lo=e=>{for(let t in DYN_CLSES){{let n="all"+St(t,!0)+"Elements";e.constructor.prototype.hasOwnProperty(n)||Object.defineProperty(e.constructor.prototype,n,{get:function(){let i=this.shadowRoot;return i?i.querySelectorAll(`.${t}`):null}})}let r=DYN_CLSES[t];for(let n of r){let i=St(n,!0),l="get"+St(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(_){let c=this.shadowRoot;return c?c.querySelector(`.${t}[${n}="${_}"]`):null})}}};yl.exports={add_one_fixed_element_getter:bl,add_fixed_element_getters:Oo,add_dyn_element_getters:Lo}});var kl=a((sh,vl)=>{var Ro=wt(),{dash_to_snake:jo,css_str_to_num:Bo}=xt(),Yo=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=jo(n),l=t[n],_=l.type;e.prototype.hasOwnProperty(i)||(_==="boolean"?Object.defineProperty(e.prototype,i,{get:function(){return attr_value_to_bool(this.getAttribute(n),l.default)},set:function(c){this.setAttribute(n,c?"true":"false")}}):_==="number"?Object.defineProperty(e.prototype,i,{get:function(){let c=this.getAttribute(n);return c?Number(c):l.default},set:function(c){this.setAttribute(n,String(c))}}):Array.isArray(_)&&_.includes("cssnum")&&_.includes("number")?Object.defineProperty(e.prototype,i,{get:function(){return Bo(this.getAttribute(n))},set:function(c){isNaN(Number(c))?this.setAttribute(n,c):this.setAttribute(n,String(c)+"px")}}):_==="json"?Object.defineProperty(e.prototype,i,{get:function(){let c=this.getAttribute(n);return c?Ro.parse_from_str(c):l.default},set:function(c){this.setAttribute(n,JSON.stringify(c))}}):Object.defineProperty(e.prototype,i,{get:function(){return this.getAttribute(n)||l.default},set:function(c){this.setAttribute(n,c)}}))}};vl.exports={add_attr_accessors_to_cls:Yo}});var El=a((rh,Sl)=>{var wl={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},Fo=e=>`
|
|
6
6
|
position: fixed;
|
|
7
7
|
top: 50%;
|
|
8
8
|
left: 50%;
|
|
9
9
|
width: 300px;
|
|
10
10
|
height:80px;
|
|
11
|
-
background: ${
|
|
11
|
+
background: ${wl[e]||wl.info};
|
|
12
12
|
color: white;
|
|
13
13
|
padding: 12px 20px;
|
|
14
14
|
border-radius: 8px;
|
|
@@ -19,11 +19,11 @@ var nvbasicbw=(()=>{var Sl=(e=>typeof require<"u"?require:typeof Proxy<"u"?new P
|
|
|
19
19
|
display: flex;
|
|
20
20
|
align-items: center;
|
|
21
21
|
justify-content: center;
|
|
22
|
-
font-size:
|
|
23
|
-
`,
|
|
22
|
+
font-size: 16px; /* \u5B57\u4F53\u53D8\u5927 */
|
|
23
|
+
`,Mo=(e,t)=>{let r=document.createElement("div");return r.style.cssText=Fo(e),r.textContent=t,document.body.appendChild(r),r},Et=class{tasks={};del(t){let r=this.tasks[t];if(!r)return;let{init_timer:n,duration_timer:i,ele:l}=r;clearTimeout(n),clearTimeout(i),l&&document.body.contains(l)&&document.body.removeChild(l),delete this.tasks[t]}add(t,r,n="error",i=1e3,l=100){this.del(t);let _={};this.tasks[t]=_,_.init_timer=setTimeout(()=>{_.ele=Mo(n,r),_.duration_timer=setTimeout(()=>{this.del(t)},i)},l)}},xl=()=>new Et,Tl=xl(),Go=(e,t,r="error",n=1e3,i=100)=>{Tl.add(e,t,r,n,i)},Ho=e=>{Tl.del(e)};Sl.exports={SimpleAlert:Et,creat_simple_alert:xl,simple_alert:Go,cancel_simple_alert:Ho}});var af=a((ih,Il)=>{var V=e=>e.constructor.name==="AsyncFunction",Xo=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},Wo=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},Jo=e=>{for(;e.parentNode;)e=e.parentNode;return e},Ct=e=>{let t=0;for(;e.lastChild;)e=e.lastChild,++t;return[e,t]},qt=e=>{let t=0;for(;;){let r=e.firstChild;if(r)++t,e=r;else return[e,t]}},Cl=(e,t)=>{if(e.nextSibling)return[e.nextSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.nextSibling)return[r.nextSibling,n];r=r.parentNode}return[null,-1]},$e=async(e,t=(r,n)=>{})=>{let[r,n]=Ct(e),i=e,l=V(t),_=0;for(;;){let c=!1;if(l?c=await t(i,_):c=t(i,_),c||i===r)return;{let u=i.firstChild;if(u)++_,i=u;else{let o=Cl(i,_);if(i=o[0],i)_=o[1];else break}}}},ql=(e,t)=>{if(e.prevSibling)return[e.prevSibling,t];let r=e.parentNode,n=t;for(;r;){if(n-=1,r.prevSibling)return[r.prevSibling,n];r=r.parentNode}return[null,-1]},zo=async(e,t=(r,n)=>{})=>{let[r,n]=qt(e),i=e,l=V(t),_=0;for(;;){let c=!1;if(l?c=await t(i,_):c=t(i,_),c||i===r)return;{let u=i.firstChild;if(u)++_,i=u;else{let o=ql(i,_);if(i=o[0],i)_=o[1];else break}}}},Uo=async(e,t=(r,n)=>{})=>{let[r,n]=qt(e),i=V(t);for(;;){let l=!1;if(i?l=await t(r,n):l=t(r,n),l||r===e)return;{let _=r.nextSibling;if(_){let c=qt(_);n+=c[1],r=c[0]}else{let c=r.parentNode;if(c)--n,r=c;else break}}}},Vo=async(e,t=(r,n)=>{})=>{let[r,n]=Ct(e),i=V(t);for(;;){let l=!1;if(i?l=await t(r,n):l=t(r,n),l||r===e)return;{let _=r.prevSibling;if(_){let c=Ct(_);n+=c[1],r=c[0]}else{let c=r.parentNode;if(c)--n,r=c;else break}}}},g=async(e,t=(n,i)=>{},r=(n,i)=>{})=>{let n=e,i="open",l={open:[r,V(r)],clos:[t,V(t)]},_=0;for(;;){let c=!1,[u,o]=l[i];if(i==="open"){if(o?c=await u(n,_):c=u(n,_),c)return;{let f=n.firstChild;f?(n=f,++_):i="clos"}}else{let f,v,T,Q=n.nextSibling;if(Q?(T="open",f=Q,v=_):(T="clos",f=n.parentNode,v=_-1),o?c=await u(n,_):c=u(n,_),c)return;if(n!==e)i=T,n=f,_=v;else break}}},Qo=async(e,t=(n,i)=>{},r=(n,i)=>{})=>{let n=e,i="open",l={open:[r,V(r)],clos:[t,V(t)]},_=0;for(;;){let c=!1,[u,o]=l[i];if(i==="open"){if(o?c=await u(n,_):c=u(n,_),c)return;{let f=n.lastChild;f?(n=f,++_):i="clos"}}else{let f,v,T,Q=n.prevSibling;if(Q?(T="open",f=Q,v=_):(T="clos",f=n.parentNode,v=_-1),o?c=await u(n,_):c=u(n,_),c)return;if(n!==e)i=T,n=f,_=v;else break}}},Ko=async(e,t)=>{if(typeof t=="string"){let r=[];return await $e(e,async(n,i)=>{(n.tagName?n.tagName.toLowerCase()===t.toLowerCase():!1)&&r.push(n)}),r}else{let r=[];return V(t)?await $e(e,async(n,i)=>{await t(n,i)&&r.push(n)}):await $e(e,async(n,i)=>{t(n,i)&&r.push(n)}),r}},Zo=async()=>{let e=document.querySelectorAll("script"),t=[];for(let i of e)if(i.src)t.push(fetch(i.src).then(l=>l.ok?l.text():"").catch(()=>""));else{let l=i.textContent;l.trim()&&t.push(Promise.resolve(l))}return`<script>
|
|
24
24
|
${(await Promise.all(t)).filter(i=>i).join(`
|
|
25
25
|
|
|
26
26
|
`)}
|
|
27
|
-
<\/script>`},
|
|
27
|
+
<\/script>`},ef=async()=>{let e="";for(let t of document.querySelectorAll('link[rel="stylesheet"]'))if(t.href)try{e+=await(await fetch(t.href)).text()+`
|
|
28
28
|
`}catch{}for(let t of document.querySelectorAll("style"))e+=t.outerHtml+`
|
|
29
|
-
`;return e};g.rvisit=
|
|
29
|
+
`;return e};g.rvisit=Qo;g.get_depth=Xo;g.get_ance=Wo;g.get_rt=Jo;g.get_dlmost=qt;g.get_drmost=Ct;g.find_rb_of_fst_ance_has_rb=Cl;g.find_lb_of_fst_ance_has_lb=ql;g.editonly_sdfs_for_each=$e;g.editonly_rsdfs_for_each=zo;g.editonly_edfs_for_each=Uo;g.editonly_redfs_for_each=Vo;g.filter=Ko;g.get_all_csses=ef;g.get_all_scripts=Zo;var Al=()=>({x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0}),Rs=e=>{let t=Al(),r=e.style.transform;e.style.transform="none";let n=e.getBoundingClientRect();return e.style.transform=r,t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height,t.top=n.top,t.left=n.left,t.right=n.right,t.bottom=n.bottom,t},tf=(e,t=r=>!0)=>{let r=[];return $e(e,n=>{if(t(n)){let i=Rs(n);r.push({el:n,rect:i})}}),r},sf=(e,t=r=>!0)=>{let r=[];return $e(e,n=>{if(t(n)){let i=n.getBoundingClientRect();r.push({el:n,rect:i})}}),r},rf=(e,t=r=>!0)=>{let r=[];return $e(e,n=>{if(t(n)){let i=Rs(n),l=n.getBoundingClientRect(),_={x:l.x-i.x,y:l.y-i.y,width:l.width-i.width,height:l.height-i.height,top:l.top-i.top,right:l.right-i.right,bottom:l.bottom-i.bottom,left:l.left-i.left};_.x===0&&_.y===0&&_.width===0&&_.height===0&&_.top===0&&_.right===0&&_.bottom===0&&_.left===0||r.push({el:n,rect:_})}}),r};g.creat_rect_desc=Al;g.get_rect_desc_bfr_transfrom=Rs;g.get_all_positions_bfr_transform=tf;g.get_all_positions_aft_transform=sf;g.get_all_positions_transform_diff=rf;var nf=xt(),lf=ml(),_f=$l(),cf=kl(),uf=El();g._attr=nf;g._wait=lf;g._ele_getter=_f;g._cls_accessor=cf;g._ui=uf;var nh=wt();Il.exports=g});return af();})();
|
package/index.js
CHANGED
|
@@ -527,7 +527,7 @@ const _attr = require("./attr");
|
|
|
527
527
|
const _wait = require("./wait");
|
|
528
528
|
const _ele_getter = require("./ele-getter");
|
|
529
529
|
const _cls_accessor = require("./cls-accessor");
|
|
530
|
-
const
|
|
530
|
+
const _ui = require("./ui");
|
|
531
531
|
|
|
532
532
|
visit._attr = _attr;
|
|
533
533
|
visit._wait = _wait;
|
package/package.json
CHANGED
package/ui.js
CHANGED
package/wait.js
CHANGED
|
@@ -20,8 +20,40 @@ const wait = async (ms = 0) => {
|
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
class SimpleDebounce {
|
|
24
|
+
timers = {};
|
|
25
|
+
run(src, callback, delay = 300) {
|
|
26
|
+
if (this.timers[src]) {
|
|
27
|
+
clearTimeout(this.timers[src]);
|
|
28
|
+
}
|
|
29
|
+
this.timers[src] = setTimeout(async () => {
|
|
30
|
+
await callback();
|
|
31
|
+
delete this.timers[src];
|
|
32
|
+
}, delay);
|
|
33
|
+
}
|
|
34
|
+
cancel(src) {
|
|
35
|
+
if (this.timers[src]) {
|
|
36
|
+
clearTimeout(this.timers[src]);
|
|
37
|
+
delete this.timers[src];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const creat_simple_debounce = () => new SimpleDebounce();
|
|
43
|
+
const simple_debounce_g = creat_simple_debounce();
|
|
44
|
+
const simple_debounce = (src, callback, delay = 300) => {
|
|
45
|
+
simple_debounce_g.run(src, callback, delay);
|
|
46
|
+
};
|
|
47
|
+
const cancel_simple_debounce = (src) => {
|
|
48
|
+
simple_debounce_g.cancel(src);
|
|
49
|
+
};
|
|
50
|
+
|
|
23
51
|
module.exports = {
|
|
24
52
|
wait_for_layout_ready,
|
|
25
53
|
wait_for_n_raf,
|
|
26
|
-
wait
|
|
54
|
+
wait,
|
|
55
|
+
SimpleDebounce,
|
|
56
|
+
creat_simple_debounce,
|
|
57
|
+
simple_debounce,
|
|
58
|
+
cancel_simple_debounce
|
|
27
59
|
}
|