nv-basic-bw 1.0.11 → 1.0.12
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 +19 -9
- package/index.js +2 -0
- package/limit.js +93 -0
- package/package.json +1 -1
package/DIST/nv-basci-bw.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var nvbasicbw=(()=>{var Ll=(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 u=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Dt=u((mf,Xs)=>{var Ms=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),Rl=async e=>{for(let t=0;t<e;++t)await Ms()},jl=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),nt=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])}},Gs=()=>new nt,Hs=Gs(),Bl=(e,t,r=300)=>{Hs.run(e,t,r)},Yl=e=>{Hs.cancel(e)};Xs.exports={wait_for_layout_ready:Ms,wait_for_n_raf:Rl,wait:jl,SimpleDebounce:nt,creat_simple_debounce:Gs,simple_debounce:Bl,cancel_simple_debounce:Yl}});var x=u((bf,ir)=>{var Fl=Symbol("empty"),Me=Symbol("unknown"),Us=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Vs=/^[\-\+]?[0-9]+$/,Qs=/^\+?[0-9]+$/,Ml=/^[\-\+]?0[bB][0-1]+$/,Gl=/^[\-\+]?0[oO][0-7]+$/,Ks=/^[\-\+]?0[xX][0-9a-fA-F]+$/,Hl=e=>Vs.test(e)||Ks.test(e),zs={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},Xl=/^[\-\+]?[0-9]+n$/,zl=/^[\-\+]?0[bB][0-1]+n$/,Wl=/^[\-\+]?0[oO][0-7]+n$/,Jl=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,Zs=e=>Xl.test(e)||zl.test(e)||Wl.test(e)||Jl.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"},er=(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},Ul=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=zs[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=zs[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},tr=e=>{let t=Array.from(e);if(Vs.test(e))return parseInt(e);if(Ml.test(e)||Gl.test(e)||Ks.test(e))return Ul(t)},Vl=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}},Ql=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Kl=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),Ws=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Zl=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(Qs.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},Js=(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(Qs.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]},sr=e=>{let t=Kl(),r=Array.from(e);if(Ql(r,e))return;let n=0,i=!1;if([r,n]=Ws(r,t,n,"be"),[i,n]=Zl(r,t,n,"be"),!i&&([i,n]=Js(r,t,n,"be"),!i&&([r,n]=Ws(r,t,n,"ae"),[i,n]=Js(r,t,n,"ae"),!i)))return Vl(t)},rr=(e,t=!1)=>{let r={value:void 0,type:void 0};if(Zs(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=ue.BigInt;else{let n=tr(e);n!==void 0?(r.value=n,r.type=ue.Integer):(n=sr(e),n!==void 0?(r.value=n,r.type=ue.Float):(n=er(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},e_=(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(Us()&&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)}}},Fe={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},t_={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function nr(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(t_));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:_}=r,c={value:Me,type:Me};if(e==="undefined")c.value=void 0,c.type=Fe.UndefinedLiteral;else if(e==="null")c.value=null,c.type=Fe.NullLiteral;else if(e==="false")c.value=!1,c.type=Fe.FalseLiteral;else if(e==="true")c.value=!0,c.type=Fe.TrueLiteral;else{let o=rr(e,!0);o.type===void 0?_?(c.value=e,c.type=Fe.StringLiteral):(c.value=e,c.type=Me):(c.value=o.value,c.type=o.type)}return n?c.value:(l||delete c.type,i||delete c.value,c)}nr.unknown=Me;var s_={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}};ir.exports={TYPE_DICT:s_,isNode:Us,empty:Fl,unknown:Me,is_bigint_str:Zs,is_jsint_str:Hl,NUM_TYPE_DICT:ue,parse_abnormal_num:er,parse_int:tr,parse_float:sr,parse_num:rr,parse0:nr,to_str:e_}});var or=u((yf,cr)=>{var Ge={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 r_(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Nt=r_(Ge);function n_(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var i_=n_(Ge),lr=e=>55296<=e&&e<=56319,l_=e=>56320<=e&&e<=57343,__=(e,t)=>(e-55296)*1024+(t-56320)+65536,_r=e=>e<=65535,c_=e=>!_r(e),o_=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}},a_=(e,t)=>lr(e)?t+2:t+1;cr.exports={CODE_DICT:Ge,CH_DICT:i_,CODE_NAME_MP:Nt,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Nt.get(e),n2cd:e=>String.fromCharCode(Ge[e]),n2ch:e=>Ge[e],ch2n:e=>Nt.get(e.codePointAt(0)),is_high_code:lr,is_low_code:l_,get_code_point_from_high_low:__,get_high_low_from_code_point:o_,is_length1_code_point:_r,is_length2_code_point:c_,_next_code_index:a_}});var xe=u(($f,T)=>{var{CODE_DICT:f,CH_DICT:b}=or(),ar=/\r\n?|[\n\u2028\u2029]/;T.exports.line_break_regexp=ar;T.exports.line_break_regexp_g=new RegExp(ar.source,"g");function ur(e){switch(e){case f.lineFeed:case f.carriageReturn:case f.lineSeparator:case f.paragraphSeparator:return!0;default:return!1}}function fr(e){switch(e){case b.lineFeed:case b.carriageReturn:case b.lineSeparator:case b.paragraphSeparator:return!0;default:return!1}}var Ot=[f.lineFeed,f.carriageReturn,f.lineSeparator,f.paragraphSeparator],hr=Ot.map(e=>String.fromCharCode(e));T.exports.NL_CODE_ARR=Ot;T.exports.NL_CH_ARR=hr;T.exports.is_nl_code=ur;T.exports.is_nl=fr;T.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function dr(e){switch(e){case 9:case 11:case 12:case f.space:case f.nonBreakingSpace:case f.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}}T.exports.is_non_nl_ws_code=dr;function pr(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}}T.exports.is_non_nl_ws=pr;var Pt=[f.tab,f.lineTab,f.formFeed,f.space,f.nonBreakingSpace,f.oghamSpaceMark,f.enQuad,f.emQuad,f.enSpace,f.emSpace,f.threePerEmSpace,f.fourPerEmSpace,f.sixPerEmSpace,f.figureSpace,f.punctuationSpace,f.thinSpace,f.hairSpace,f.narrowNoBreakSpace,f.mediumMathematicalSpace,f.ideographicSpace,f.zeroWidthNoBreakSpace];T.exports.NON_NL_WS_CODE_ARR=Pt;var gr=Pt.map(e=>String.fromCharCode(e));T.exports.NON_NL_WS_CH_ARR=gr;function u_(e){return dr(e)||ur(e)}function we(e){return pr(e)||fr(e)}T.exports.is_ws_code=u_;T.exports.is_ws=we;T.exports.WS_CHCODE_ARR=Ot.concat(Pt);T.exports.WS_CH_ARR=hr.concat(gr);var ee={init:0,executing:1,succ:2,eof:3};T.exports.STATE_DICT=ee;function f_(e,t=new Set){let r={g:e,rslt:"",state:ee.init},n=r.g.next().value;if(n===void 0)return r.state=ee.eof,r;for(;n!==void 0&&(we(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!we(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=ee.eof:(we(n)||t.has(n))&&(r.state=ee.succ),r}function h_(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:ee.init};for(let l=n.pos;l<e.length;l++){let _=e[l];if(we(_)||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(!we(_)&&!r.has(_))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=ee.eof:n.state=ee.succ,n.rslt=e.slice(i,n.pos).join(""),n}T.exports.from_generator=f_;T.exports.from_charr=h_});var te=u((vf,kr)=>{var{WS_CH_ARR:mr,NON_NL_WS_CH_ARR:d_,NL_CH_ARR:p_}=xe();function g_(e){return Array.from(e).length}var m_="\u200C",br="\u200D",b_=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Lt(e,t,...r){let n=function(){return t(this,...r)};b_()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var Y={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")},it=Symbol("get_pair_lmp"),y_=Symbol("add_pair_reserved"),He=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[it](){return this.#e}get size(){return this.#e.size}[y_](t,r){if(t===r)throw Y.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 Y.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw Y.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw Y.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 $_(e){return new Map(e[it])}Lt(He,$_);var yr=Symbol("get_single_set"),$r=Symbol("add_single_reserved"),Te=class{#t;#e=new Set;constructor(t){this.#t=t}get[yr](){return this.#e}[$r](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw Y.cant_be_empty;if(t==="`")throw Y.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function v_(e){return new Set(e[yr])}Lt(Te,v_);var lt=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new He(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new He(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new Te(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[$r]("`"),this.#r=new Te(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 Te(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(mr)}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[it])t.add(r);for(let r of this.#e[it])t.add(r)}return t}validate(t){if(typeof t!="string"||g_(t)!==1)throw Y.char;if(this.reserved.includes(t))throw Y.reserved;if(Array.from(this.inuse).flat().includes(t))throw Y.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 p_}get non_nl_ws(){return d_}get ws(){return mr}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]}},_t=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(_t,"name",{value:br});var ct=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(ct,"name",{value:br});var ot=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(ot,"name",{value:m_});function k_(e){return[new ct(e),new ot(e),new _t(e)]}Lt(lt,k_);var vr=new lt;vr.ERROR_DICT=Y;kr.exports=vr});var Sr=u((kf,N)=>{var wr=Ll("fs");function*xr(e){for(let t of e)yield t;e=null}function w_(e,t){let r=e.codePointAt(t);if(r!==void 0)return r<65536?t=t+1:t=t+2,t}function*x_(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*T_(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 S_(e){let t=[];for await(let r of e)t.push(r);return t}async function*E_(e){for(let t of e)yield t;e=null}async function*C_(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*q_(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*A_(e,t="utf8"){let r=wr.readFileSync(e,{encoding:t});yield*xr(r)}async function*Tr(e,t="utf8",r=4096){let n=wr.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*I_(e,t="utf8"){yield*Tr(e,t,1)}N.exports.sync_gen_from_file=A_;N.exports.async_gen_from_file=I_;N.exports.async_gen_chunk_from_file=Tr;N.exports.async_iter_to_array=S_;N.exports.sync_gen_from_str=xr;N.exports.async_gen_from_str=E_;N.exports.get_next_pos=w_;N.exports.sync_gen_pos_from_str=T_;N.exports.sync_gen_code_point_from_str=x_;N.exports.async_gen_pos_from_str=q_;N.exports.async_gen_code_point_from_str=C_});var I=u((wf,qr)=>{var Er={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 D_(e){return e+1}function N_(e){return e+2}function O_(e){return e+3}function P_(e){return e+6}function L_(e){return e+5}function R_(e){return e+9}function j_(e){return e+8}function Cr(e){return e%10!==0}var B_={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},Y_={handling:0,handled:1};function F_(e,t,r){let n=Er;return e.$has_yield_sign()||Cr(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)}qr.exports={STATE_DICT:Er,gtv:q,get_main_eofv_with_code:D_,get_lcmt_eofv_with_code:N_,get_blkcmt_eofv_with_code:O_,get_hash_quote_eofv_with_code:P_,get_hash_naked_eofv_with_code:L_,get_ref_quote_eofv_with_code:R_,get_ref_naked_eofv_with_code:j_,LEFTED_TYPE:B_,AVND_CACHE_STATE_DICT:Y_,is_eofv:Cr,is_should_yield:F_}});var Ht=u((xf,Yr)=>{var{is_nl:Dr}=xe(),Nr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},at=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Nr(l,r,n,i)},M_=/^[0-7]$/,G_=/^[0-9a-fA-F]$/,fe=e=>M_.test(e),U=e=>G_.test(e),ut={b:"\b",f:"\f",n:`
|
|
2
|
-
`,r:"\r",t:" ",v:"\v"},Or={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function H_(e){return Or[e]}function Pr(e){return ut[e]}function X_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+at(t,16,2)}function z_(e){e=Array.from(e);let t=e[0],r=e[1];if(U(t)&&U(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function W_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+at(t,16,4)}function J_(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(U(t)&&U(r)&&U(n)&&U(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function U_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+at(t,8,3)}function V_(e){let t="";e=Array.from(e);let r=e[0];if(fe(r)){t=t+r;let n=e[1];if(fe(n)){t=t+n;let l=e[2];fe(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*Q_(e){let t=Array.from(e);for(let r of t)yield r}function*Ar(e,t){yield*t,yield*e}function Lr(e,t,r,n,i=!1){if(typeof t=="string"){let _=t;t=c=>c===_}if(typeof(r==="string")&&r.length>0){let _=Q_(r);e=Ar(e,_)}else e=Ar(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 Rt(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 jt(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 Ir(e,t,r,n,i,l,_){return _===!0?n===Rr?(e.state=d.x,e.ch="\\x"+t.join(""),e):n===jr?(e.state=d.u,e.ch="\\u"+t.join(""),e):(n===Br&&(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 K_(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 ft(e,t,r,n,i=!0,l=!1,_=void 0,c=!1){let o;if(_!==void 0?o=_:(o=e.g.next().value,o!==void 0&&(e.offset=e.offset+1)),o===void 0)return e;let a=0,h=[],m;if(l?m=!0:m=r(o),m)a=a+1,h.push(o);else return e.state=d.executing,e.ch=o,e;for(;a<t;){if(o=e.g.next().value,o===void 0)return Ir(e,h,o,n,i,c,tail=!0);if(e.offset=e.offset+1,m=r(o),m)a=a+1,h.push(o);else return Ir(e,h,o,n,i,c,tail=!1)}return K_(e,h,o,n,c)}function Rr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function jr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Br(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Bt(e,t=!1){return e.curr=Pr(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 Yt(e,t=!1){return ft(e,2,U,Rr,!0,!1,void 0,t)}function Ft(e,t=!1){return ft(e,4,U,jr,!0,!1,void 0,t)}function Mt(e,t=!1){return ft(e,3,fe,Br,!1,!0,e.ch,t)}function Gt(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 Z_(e,t=i=>i==='"',r="",n="\\"){let i=Lr(e,t,r,n,!0);for(i.state=d.executing;!Rt(i);)i.state===d.executing?jt(i,!0):i.state===d.backslash&&(Dr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=d.executing):i.ch in ut?Bt(i,!0):i.ch==="x"?Yt(i,!0):i.ch==="u"?Ft(i,!0):fe(i.ch)?Mt(i,!0):Gt(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*ec(e){let t=e;for(t.state=d.executing;!Rt(t);)t.state===d.executing?(jt(t,!1),t.curr!==""&&(yield t.curr)):t.state===d.backslash&&(Dr(t.ch)?(t.state=d.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ut?(Bt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Yt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Ft(t,!1),t.curr!==""&&(yield t.curr)):fe(t.ch)?(Mt(t,!1),t.curr!==""&&(yield t.curr)):(Gt(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}Yr.exports={CHAR_UNESC_DICT:ut,CHAR_ESC_DICT:Or,escc:H_,unescc:Pr,escx:X_,unescx:z_,escu:W_,unescu:J_,esco:U_,unesco:V_,STATE_DICT:d,from_generator:Z_,init:Lr,handle_executing:jt,is_terminated:Rt,handle_escc:Bt,esc_handle_engine:ft,handle_escx:Yt,handle_escu:Ft,handle_esco:Mt,handle_esc_other:Gt,gen:ec,prepend:Nr,prepend_num:at,is_odigit_ch:fe,is_hdigit_ch:U}});var Ur=u((Tf,Jr)=>{var{is_nl:tc}=xe(),Se=Ht(),Fr={line_comment:0,blk_comment:1},se={init:0,executing:1,succ:2,eof:3,asterisk:4};function Mr(e){return{state:se.init,g:e,rslt:"",ch:"",offset:0}}function Gr(e,t){return e.state=se.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Hr(e,t){return e.state=se.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function Xr(e,t){return e.state=se.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function zr(e,t=""){let r=Mr(e);r.state=se.executing;let n=Se.from_generator(r.g,tc,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===Se.STATE_DICT.eof?Gr(r,n):n.state===Se.STATE_DICT.succ?Hr(r,n):Xr(r,n)}function Wr(e,t=""){let r=Mr(e);r.state=se.executing;let n;for(;;){if(n=Se.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===Se.STATE_DICT.eof)return Gr(r,n);if(n.state===Se.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Hr(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=se.asterisk,r}else return Xr(r,n)}return r}function sc(e,t,r=""){return t===Fr.line_comment?zr(e,r):Wr(e,r)}Jr.exports={TYPE_DICT:Fr,STATE_DICT:se,lc_from_generator:zr,blk_from_generator:Wr,from_generator:sc}});var Xt=u((Sf,Vr)=>{function rc(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function nc(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function ic(e){return parseInt(e).toString()===e}Vr.exports={rjson:rc,wjson:nc,is_int_str:ic}});var zt=u((Ef,Qr)=>{var lc=()=>Math.random()*9007199254740992;function _c(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function cc(e,t){return t.filter((r,n)=>e.includes(n))}function oc(e){return Object.entries(e).length===0}function ac(e){return Object.entries(e).map(n=>n[1])}function uc(e){return Object.entries(e).map(n=>n[0])}function fc(e){return Object.entries(e).length}function hc(e,t){for(let r in e)t(r,e[r]);return e}function dc(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function pc(e,t){for(let r in t)e[r]=t[r];return e}function gc(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function mc(e,t,r){return r=r.filter(n=>n[e]!==t),r}function bc(e,t,r){return r.findIndex(i=>i[e]===t)}function yc(e){return JSON.parse(JSON.stringify(e))}function $c(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 vc(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}Qr.exports={gen_guid:lc,range:_c,seqs_slct:cc,dict_length:fc,is_empty_dict:oc,dict_values:ac,dict_keys:uc,dict_map:dc,dict_foreach:hc,dict_plus:pc,dict_update:gc,dtb_kv_rm:mc,dtb_kv_get_seq:bc,dcp:yc,mat_map:$c,is_cu_property:vc}});var is=u((Cf,xn)=>{var k=zt();function Ut(e){if(k.is_empty_dict(e))return 0;{let t=k.dict_keys(e);return Math.max(...t)+1}}function Xe(e){return e!=null}function Zr(e,t){return e._id=e._id+t,e._tree=e._tree+t,Xe(e._fstch)&&(e._fstch=e._fstch+t),Xe(e._lsib)&&(e._lsib=e._lsib+t),Xe(e._rsib)&&(e._rsib=e._rsib+t),Xe(e._parent)&&(e._parent=e._parent+t),e}function he(e,t){let r=Ut(e);for(let n in t){let i=Zr(t[n],r);t[i._id]=i,delete t[n]}return t}function kc(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function wc(e,t=0){return{_id:Ut(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function en(e){return e._tree!==void 0}function re(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Vt(e){return e._lsib===null}function Qt(e){return e._rsib===null}function F(e){return e._fstch===null}function tn(e,t){if(re(e))return!0;{let n=w(e,t);return G(n,t).length===1}}function Ue(e){return re(e)||!en(e)}function ht(e,t,r){if(!Ue(t))return console.log("only root or uninited could be prepend"),e;let n=F(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 Kt(e,t,r){if(!Ue(t))return console.log("only root or uninited could be append"),e;let n=F(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=pe(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(!Ue(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addrsib to root"),e;let n=Qt(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 sn(e,t,r){if(!Ue(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addlsib to root"),e;let n=Vt(e);if(t._tree=e._tree,n){let i=w(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=M(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 rn(e,t,r,n){let i=G(t,n),l=i.length;if(l===0)return ht(t,r,n);if(e<=l&&e>=0){if(e===0)return ht(t,r,n);if(e===l)return Kt(t,r,n);{let c=i[e-1];return Zt(c,r,n)}}else return console.log("not in range!!"),t}function Ee(e,t){for(let r in t)t[r]._tree=e._tree}function xc(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=ht(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Tc(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=Kt(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Sc(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=Zt(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Ec(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=sn(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Cc(e,t,r,n){n=he(r,n);let i=k.dict_keys(n)[0],l=ie(n[i],n);return t=rn(e,t,l,r),Ee(t,n),k.dict_plus(r,n),t}function ze(e,t){let r=H(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function We(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function nn(e){return e._fstch=null,e}function Je(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Ce(e,t){if(re(e))return[e,t];if(tn(e,t)){let n=t[e._parent];nn(n);let i=ze(e,t),l=We(i,t);return Je(e),[e,l]}else if(Vt(e)){let n=R(e,t);n._lsib=null;let i=w(e,t);i._fstch=e._rsib;let l=ze(e,t),_=We(l,t);return Je(e),[e,_]}else if(Qt(e)){let n=M(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=ze(e,t),l=We(i,t);return Je(e),[e,l]}else{let n=M(e,t);n._rsib=e._rsib;let i=ze(e,t),l=We(i,t);return Je(e),[e,l]}}function qc(e,t){let r=de(e,t);return r===null?[e,t]:Ce(r,t)}function Ac(e,t){let r=pe(e,t);return r===null?[e,t]:Ce(r,t)}function Ic(e,t,r){let n=ln(e,t,r);return n===null?[t,r]:Ce(n,r)}function Dc(e,t,...r){let n=_n(e,t,...whiches);for(let i=0;i<n.length;i++)Ce(n[i],t);return[e,t]}function Nc(e,t){let r=G(e,t);for(let n=0;n<r.length;n++)Ce(r[n],t);return t}function de(e,t){return e._fstch===null?null:t[e._fstch]}function G(e,t){let r=[],n=de(e,t);for(;n!==null;)r.push(n),n=R(n,t);return r}function pe(e,t){let r=G(e,t);return r.length===0?null:r[r.length-1]}function ln(e,t,r){let n=G(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function _n(e,t,...r){let n=G(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 cn(e,t,r=!1){let n=e,i=R(e,t);for(;i!==null;)n=i,i=R(i,t);return r||n._id!==e._id?n:null}function Oc(e,t){let r=ne(e,t,!0),n=k.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 Pc(e,t){let r=ne(e,t,!0),n=k.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 ne(e,t,r=!1){let n=w(e,t),i;return n!==null?i=G(n,t):i=[e],r||(i=k.dtb_kv_rm("_id",e._id,i)),i}function Lc(e,t,r=!1){let n=ne(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function Rc(e,t,r){let n=ne(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function jc(e,t,...r){let n=ne(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 Bc(e,t){let r=ne(e,t,!0);return k.dtb_kv_get_seq("_id",e._id,r)}function M(e,t){let r=ne(e,t,!0),n=k.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function R(e,t){return e._rsib===null?null:t[e._rsib]}function E(e,t){return dt(e,t,!0).length-1}function on(e,t){let r=E(e,t),i=H(e,t).map(_=>E(_,t));return Math.max(...i)-r+1}function Yc(e,t){return F(e)?null:E(e,t)+1}function Fc(e,t){if(F(e))return null;{let n=E(e,t),l=H(e,t).map(c=>E(c,t));return Math.max(...l)}}function Mc(e,t,r){let n=E(t,r);return on(t,r)<=e?null:n+e}function an(e,t){let r=ie(e,t),n=H(r,t),i=E(e,t);return n.filter(_=>E(_,t)===i)}function Wt(e,t){let r=an(e,t);return k.dtb_kv_get_seq("_id",e._id,r)}function Gc(e,t){return H(e,t).length}function ie(e,t){let r=e,n=w(e,t);for(;n!==null;)r=n,n=w(n,t);return r}function w(e,t){let r;if(re(e))r=null;else{let n=cn(e,t,!0);r=t[n._parent]}return r}function dt(e,t,r=!1){let n=[],i=w(e,t);for(;i!==null;)n.push(i),i=w(i,t);return r&&n.unshift(e),n}function Hc(e,t,r){let n=dt(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function Xc(e,t,...r){let n=dt(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 un(e,t){let r=w(e,t);for(;r!==null;){let n=R(r,t);if(n!==null)return n;r=w(r,t)}return null}function fn(e,t){let r=de(e,t);if(r!==null)return r;{let n=R(e,t);return n!==null?n:un(e,t)}}function hn(e,t){let r=e,n=pe(e,t);for(;n!==null;)r=n,n=pe(n,t);return r}function zc(e,t){if(re(e))return null;if(F(e)){let n=M(e,t);return n!==null?n:w(e,t)}else{let n=M(e,t);return n!==null?F(n)?n:hn(n,t):w(e,t)}}function H(e,t){let r=E(e,t),n=[];for(;e!==null&&(n.push(e),e=fn(e,t),!(e!==null&&E(e,t)<=r)););return n}function es(e,t){let r=e,n=de(e,t);for(;n!==null;)r=n,n=de(n,t);return r}function dn(e,t){let r=R(e,t);return r===null?w(e,t):es(r,t)}function pn(e,t){let r=w(e,t);for(;r!==null;){let n=M(r,t);if(n!==null)return n;r=w(r,t)}return null}function Wc(e,t){if(F(e)){let n=M(e,t);return n===null?pn(e,t):n}else return pe(e,t)}function gn(e,t){let r=[],n=es(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=dn(n,t);return r}function Jt(e){k.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function mn(e,t){let r=e._$visited;if(F(e))if(r){let i=R(e,t);return i===null?w(e,t):i}else return e._$visited=!0,e;else if(r){let i=R(e,t);return i===null?w(e,t):i}else return e._$visited=!0,de(e,t)}function Jc(e,t,r){if(F(t)){if(e)return t;{let i=M(t,r);return i===null?w(t,r):i}}else{if(e)return pe(t,r);{let i=M(t,r);return i===null?w(t,r):i}}}function bn(e,t){return t._$visited&&e===t._id}function yn(e,t,r=!1,n=!0){let i=[];Jt(t);let l=e._id;for(;!bn(l,e);)r?i.push(k.dcp(e)):i.push(e),e=mn(e,t);return r?i.push(k.dcp(e)):i.push(e),n&&Jt(t),i}function Uc(e,t){let r={};r._depth=E(e,t),r._breadth=Wt(e,t);let n=w(e,t);return r._pbreadth=n===null?null:Wt(n,t),r._id=e._id,r}function Kr(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function ts(e,t){let r=[],n=e[0],i=[Kr(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 o=G(i[c].nd,t);o=o.map(a=>Kr(a)),o.forEach((a,h)=>{a.ele._pbreadth=i[c].ele._breadth,i[c].ele._children.push([r.length+1,l.length+h])}),l=l.concat(o)}let _=i.map(c=>c.ele);r.push(_),i=l}return r}function $n(e,t){return gn(e[0],t)}function vn(e,t,r=!1,n=!0){return yn(e[0],t,r,n)}function Vc(e,t){let r=ss(e,t);return ts(r,t)}function ss(e,t){let r=e[e.length-1];return H(r,t)}function Qc(e,t,r=!1,n=!0){let i=ss(e,t);return vn(i,t,r,n)}function Kc(e,t){let r=rs(e,t);return ts(r,t)}function rs(e,t){let r=e[0];return H(r,t)}function Zc(e,t){let r=rs(e,t);return $n(r,t)}function ns(e,t,r=!1){let n=H(e,t);return r||n.splice(0,1),n}function eo(e,t){return G(e,t)}function to(e,t){let r=ns(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 kn(e,t,r){let n=E(t,r),i=ns(t,r,!1),l=sdfs.map(_=>E(_,r));return i=i.filter(_=>E(_,r)===n+e),i}function so(e,t,...r){let n=r.map(i=>kn(i,e,t));return n=Array.prototype.concat(...n),n}function wn(e){let t=k.dict_keys(e)[0],r=e[t];return ie(r,e)}function ro(e){let t=wn(e);return H(t,e)}xn.exports={calc_next_id:Ut,update_nodes_ids:he,creat_root:kc,creat_nd:wc,is_inited:en,is_root:re,is_fstch:Vt,is_lstch:Qt,is_leaf:F,is_lonely:tn,is_id:Xe,is_connectable:Ue,prepend_child:ht,append_child:Kt,insert_child:rn,add_rsib:Zt,add_lsib:sn,get_fstch:de,get_rsib:R,get_children:G,get_lstch:pe,get_which_child:ln,get_some_children:_n,get_fstsib:Lc,get_lstsib:cn,get_preceding_sibs:Oc,get_following_sibs:Pc,get_sibs:ne,get_which_sib:Rc,get_some_sibs:jc,get_sibseq:Bc,get_lsib:M,get_rsib:R,get_lyr:an,get_breadth:Wt,get_count:Gc,get_depth:E,get_height:on,get_fst_lyr_des_depth:Yc,get_lst_lyr_des_depth:Fc,get_which_lyr_des_depth:Mc,get_root:ie,get_parent:w,get_ances:dt,get_which_ance:Hc,get_some_ances:Xc,get_rsib_of_fst_ance_having_rsib:un,get_sdfs_next:fn,get_drmost_des:hn,get_sdfs_prev:zc,get_sdfs:H,get_lsib_of_fst_ance_having_lsib:pn,get_dlmost_des:es,get_edfs_next:dn,get_edfs_prev:Wc,get_edfs:gn,clear_$visited:Jt,get_sedfs_next:mn,is_sedfs_traverse_finished:bn,get_sedfs_prev:Jc,get_sedfs:yn,get_deses:ns,get_fst_lyr_deses:eo,get_lst_lyr_deses:to,get_which_lyr_deses:kn,get_some_lyrs_deses:so,nd2ele:Uc,sdfs2mat:ts,sdfs2edfs:$n,sdfs2sedfs:vn,edfs2mat:Vc,edfs2sdfs:ss,edfs2sedfs:Qc,sedfs2mat:Kc,sedfs2sdfs:rs,sedfs2edfs:Zc,update_disconnected_nodes:ze,update_orig_nodes:We,leafize:nn,rootize:Je,disconnect:Ce,rm_fstch:qc,rm_lstch:Ac,rm_which:Ic,rm_some:Dc,rm_all:Nc,update_treeid:Ee,update_one_nodeid:Zr,update_nodes_ids:he,prepend_child_tree:xc,append_child_tree:Tc,add_rsib_tree:Sc,add_lsib_tree:Ec,insert_child_tree:Cc,get_root_via_tree:wn,tree2sdfs:ro}});var qn=u((qf,Cn)=>{function Tn(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 Sn=Tn();function En(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 Sn(n,i);return this.dispatchEvent(l),l}}return t}var no=En();Cn.exports={creat_event_cls:Tn,E:Sn,creat_event_target_cls:En,ET:no}});var li=u((Af,ii)=>{var Gn=Xt(),Qe=zt(),ge=is(),{ET:An}=qn(),io=["_fstch","_lsib","_rsib","_parent","_tree"];function Hn(e){return e._tree!==void 0}function ls(e){return e._tree===e}function lo(e){return e._lsib===null}function _o(e){return e._rsib===null}function co(e){return e._fstch===null}function oo(e){return e.$sibs(!0).length===1}function vt(e){return ls(e)||!Hn(e)}function In(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function Dn(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 Nn(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 _s(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function ao(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function Xn(e,t=!1){let r=e._rsib,n=e;for(;r!==null;)n=r,r=r._rsib;return t||n!==e?n:null}function kt(e,t=!1){let r=cs(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function uo(e){let t=kt(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function us(e){let t=[],n=kt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function zn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function Wn(e,t=!1){let r=us(e),n=zn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function fo(e,t){let r=kt(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function ho(e,...t){return Wn(e,!0).filter((i,l)=>t.includes(l))}function On(e){return us(e).length}function po(e,t=!1){return e.$sibs(t).length}function cs(e){return Xn(e,!0)._parent}function go(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function mo(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function yt(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 bo(e,...t){return yt(e,!0).filter((i,l)=>t.includes(l))}function yo(e,t=!1){return yt(e,t).length}function $o(e){let t=e.$parent();return t===null?null:t.$lsib()}function vo(e){let t=e.$parent();return t===null?null:t.$rsib()}function ko(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function wo(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function xo(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function To(e){let t=e.$parent();return t===null?null:t.$breadth()}function So(e){return e.$lyr().indexOf(e)}function Eo(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function Co(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 Pn(e,t=!1){let r=Un(e),n=be(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function qo(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 Ao(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 Io(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 os(e,t){if(!vt(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 as(e,t){if(!vt(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 Jn(e,t){if(!vt(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 Do(e,t){if(!vt(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 Ln(e,t,r){let n=_s(t),i=n.length;if(i===0)r=os(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=os(t,r);else if(e===i)r=as(t,r);else{let _=n[e-1];r=Jn(_,r)}return r}function No(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function Oo(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 Un(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function Po(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 be(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 Lo(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function Ro(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function jo(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function Bo(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 Yo(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function Vn(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 Fo(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 Mo(e){e.$sdfs().forEach(r=>{delete r.$visited})}function Go(e,t){return t.$visited&&e===t}function Rn(e){Mo(e);let t=[],r=new Set,n=e;for(;!Go(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=Vn(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function Ho(e){return e._fstch=null,e}function pt(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function gt(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function me(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();Ho(r);let n=gt(e);return pt(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=gt(e);return pt(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=gt(e);return pt(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=gt(e);return pt(e),e}}function jn(e){let t={};return t._nd=e,t._children=[],t}function Bn(e){let t=[],r=e[0],n=[jn(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(o=>jn(o)),c.forEach((o,a)=>{o._pbreadth=n[_]._breadth,n[_]._children.push([t.length+1,i.length+a])}),i=i.concat(c)}let l=n;t.push(l),n=i}return t}function Yn(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Qe.is_cu_property(i)&&(n[i]=r[i]);return n}function Xo(e,t="_children"){let r=e[0][0],n=Yn(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let _=0;_<i.length;_++){let c=i[_],o=c.d,a=c.ele,m=c.ele._children.map(v=>e[v[0]][v[1]]);for(let v=0;v<m.length;v++){let A=m[v],B=Yn(A,t);o[t].push(B);let Pl={d:B,ele:A};l.push(Pl)}}i=l}return n}function Fn(e,t="_children"){let r=new V;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Qe.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function zo(e,t="_children"){let r=Fn(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,o=_[t]===void 0?[]:_[t];for(let a=0;a<o.length;a++){let h=o[a],m=Fn(h,t);c.$append_child(m);let v={d:h,nd:m};i.push(v)}}n=i}return r}function Wo(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 Jo(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function Uo(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 Vo=["$fstch","$rsib","$parent"];function Qo(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 Ko(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var Qn={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function Zo(e,t){for(let r=0;r<t.length;r++){let n=Qn[t[r]];e=e[n]()}return e}function ea(e){let t=new V,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=Zo(r,i)}return t}function ta(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 O=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){Wo(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Qe.gen_guid()),r&&(this.#t=new An)}get opt(){return this.#e}enable_et(){this.#t=new An}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 Hn(this)}$is_root(){return ls(this)}$is_fstch(){return lo(this)}$is_lstch(){return _o(this)}$is_leaf(){return co(this)}$is_lonely(){return oo(this)}$fstch(){return this._fstch}$lstch(){return In(this)}$which_child(t){return Dn(t,this)}$some_children(...t){return Nn(this,...t)}$children(){return _s(this)}$children_count(){return ao(this)}$rsib(){return this._rsib}$lsib(){return uo(this)}$fstsib(t=!1){return kt(this,t)}$lstsib(t=!1){return Xn(this,t)}$psibs(){return us(this)}$fsibs(){return zn(this)}$which_sib(t){return fo(t,this)}$some_sibs(...t){return ho(this,...t)}$sibseq(){return On(this)}$sibs(t=!1){return Wn(this,t)}$sibs_count(t=!1){return po(this,t)}$parent(){return cs(this)}$root(){return go(this)}$ances(t=!1){return yt(this,t)}$which_ance(t){return mo(t,this)}$some_ances(...t){return bo(this,...t)}$ances_count(t=!1){return yo(this,t)}$prepend_child(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,os(this,t)}$insert_child(t,r){return r=r===void 0?new O(this.#e.with_id,this.#e.with_et):r,Ln(t,this,r)}$append_child(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,as(this,t)}$clone(){if(ls(this)){let t=bt(this);return $t(t)}else{let t=On(this),r=cs(this);me(this);let n=bt(this),i=$t(n);return Ln(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new O(this.#e.with_id,this.#e.with_et):r.$clone();l=as(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,Jn(this,t)}$add_lsib(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,Do(this,t)}$rsib_of_fst_ance_having_rsib(){return No(this)}$sdfs_next(){return Oo(this)}$drmost_des(){return Un(this)}$sdfs_prev(){return Po(this)}$sdfs(){return be(this)}$dlmost_des(){return Lo(this)}$edfs_next(){return Ro(this)}$lsib_of_fst_ance_having_lsib(){return jo(this)}$edfs_prev(){return Bo(this)}$edfs(){return Yo(this)}$offset(){return Co(this)}$sedfs_next(){return Vn(this)}$sedfs_prev(t){return Fo(this)}$sedfs(){return Rn(this)}$deses(t=!1){return Pn(this,t)}$lst_lyr_deses(){return qo(this)}$which_lyr_deses(t){return Ao(t,this)}$some_lyrs_deses(...t){return Io(this,...t)}$count(t=!0){return Pn(this,t).length}$depth(t=!1){return yt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return To(this)}$breadth(){return So(this)}$width(){return Eo(this)}$lyr(){return xo(this)}$lcin(){return ko(this)}$rcin(){return wo(this)}$luncle(){return $o(this)}$runcle(){return vo(this)}$sdfs_repr(t=Jo,r=!1){let n=this.$root(),i=be(n),c=be(this).map((o,a)=>t(o,a,i)).join(`
|
|
3
|
-
`);if(console.log(c),r)return c}$sedfs_repr(t=
|
|
4
|
-
`);if(console.log(_),r)return _}$disconn(){return me(this)}$rm_fstch(){let t=this._fstch;return me(t)}$rm_lstch(){let t=
|
|
5
|
-
`){return"//"+Ke(this.value)+t}},ws=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Ke(this.value)+"*/"}};oi.exports={UndefinedLiteral:ps,NullLiteral:gs,BooleanLiteral:ms,NumericLiteral:bs,StringLiteral:ys,ArrayExpression:$s,ObjectExpression:vs,_Ref:ks,CommentLine:wt,CommentBlock:ws,_ndtree:ua}});var gi=u((Ff,pi)=>{var{empty:Ss}=x(),{UndefinedLiteral:ai,NullLiteral:ui,BooleanLiteral:fi,NumericLiteral:hi,StringLiteral:xs,ArrayExpression:ga,ObjectExpression:ma,CommentLine:ba,CommentBlock:ya,_Ref:Ts}=Tt();function $a(e,t){let r=Ss,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:Ss}function di(e,t){return e instanceof ai?new ai("undefined",t):e instanceof ui?new ui("null",t):e instanceof fi?new fi(e.vto_rawstr(),t):e instanceof hi?new hi(e.vto_rawstr(),t):e instanceof xs?new xs(e.value,t):e instanceof ba||e instanceof ya?new xs(e.value,t):e instanceof ga?new Ts(e,t):e instanceof ma?new Ts(e,t):e instanceof Ts?(e=e.value,di(e,t)):Ss}pi.exports={find_refnd_with_hash:$a,clone:di}});var Ci=u((Mf,ye)=>{var va=Array,ka=x(),{empty:$,parse0:wa}=x(),et=class extends va{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*xa(e){for(let t of e)yield t;e=null}function*Ta(e,t){yield*t,yield*e}var tt=Ht(),Es=xe(),Ae=Ur(),{UndefinedLiteral:Sa,NullLiteral:Ea,BooleanLiteral:mi,NumericLiteral:Ca,StringLiteral:bi,CommentLine:Ze,CommentBlock:qa,ArrayExpression:Cs,ObjectExpression:Aa}=Tt(),z=I(),yi=z.gtv,le=z.STATE_DICT,qs=z.LEFTED_TYPE,qe=z.AVND_CACHE_STATE_DICT,X=x(),y=te(),$i=gi();function*Si(e){for(;e.length>0;)yield e.pop()}function vi(e){let t;return e.__is_sync_mode()?t=tt.from_generator(e.g,e.ch_cache.curr):t=tt.from_generator(Si(e.unshift_cache),e.ch_cache.curr),t}function ki(e,t,r){e.lefted.type=qs.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=z.get_main_eofv_with_code(e.state)}function Ei(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function Ia(e,t,r){return Ei(e,t,r),e.state=z.get_lcmt_eofv_with_code(e.state),e}function Da(e,t,r){return Ei(e,t,r),e.state=z.get_blkcmt_eofv_with_code(e.state),e}function Na(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(Si(e.unshift_cache),e.ch_cache.curr),r}function wi(e,t,r,n){let i=Na(e,r);return i.state!==Ae.STATE_DICT.succ?((t===Ze?Ia:Da)(e,i,n),$):new t(i.rslt)}function xi(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===Cs?e.state=le.bv:e.state=le.bk,e}var As=Symbol("root_lblk_ch"),Ti=Symbol("root_rblk_ch"),Ie=class{#t=yi(le.bv);#e=new et;constructor(t,r=" "){if(r!==$){let i=xa(r);t=Ta(t,i)}this.g=t,this.lefted={type:$,data:$},this.ch_cache={tmp:$,curr:$},this.str_cache={k:$,v:$,maybe_vquote:$},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new Cs;this.stack.push(n),n.open=As,this.avnd_cache={state:qe.handling,data:n},this.unshift_cache=new et,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===qe.handled}$set_yield_sign(){this.avnd_cache.state=qe.handled}$clear_yield_sign(){this.avnd_cache.state=qe.handling}get state(){return this.#t}set state(t){this.#t=yi(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=z.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return y.commas.has(this.ch_cache.curr)}$is_currch_colon(){return y.colons.has(this.ch_cache.curr)}$is_currch_ws(){return Es.is_ws(this.ch_cache.curr)}$is_currch_quote(){return y.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===y.slash}$is_currch_asterisk(){return this.ch_cache.curr===y.asterisk}$is_currch_ary_lblk(){return y.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return y.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 y.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return y.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 y.hash===this.ch_cache.curr}$is_currch_ref(){return y.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=$,r=$){return this.stack.lst.is_ary()?t===$?this.state=le.bv:(this.state=le.v,this.str_cache.v=t,r===$||(this.str_cache.maybe_vquote=r)):t===$?this.state=le.bk:(this.state=le.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===$){let n=wa(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===X.TYPE_DICT.UndefinedLiteral?r=new Sa(this.str_cache.k):n.type===X.TYPE_DICT.NullLiteral?r=new Ea(this.str_cache.k):n.type===X.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new mi("true",this.str_cache.k):n.type===X.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new mi("false",this.str_cache.k):n.type===X.TYPE_DICT.StringLiteral?r=new bi(n.value,this.str_cache.k):r=new Ca(n,this.str_cache.k)}else r=new bi(t,this.str_cache.k);return this.str_cache.v=$,this.str_cache.maybe_vquote=$,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=$,t.key}$set_avnd_cache(t,r=qe.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,qe.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=vi(this);return r.state!==tt.STATE_DICT.succ?(ki(this,r,t),$):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=$}$refresh_key(t=$){t===$?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return wi(this,Ze,Ae.lc_from_generator,qs.lcmt)}$handle_blkcmt(){return wi(this,qa,Ae.blk_from_generator,qs.blkcmt)}$push_kcmt(t){t.type=Ae instanceof Ze?X.TYPE_DICT.CommentLine.k:X.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Ze?"CommentLine":"CommentBlock";t.type=X.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ae instanceof Ze?X.TYPE_DICT.CommentLine.k:X.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(y.array_blks.lhas(this.ch_cache.curr))return xi(this,Cs);if(y.obj_blks.lhas(this.ch_cache.curr))return xi(this,Aa)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return y[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=le.av}$get_hash_or_ref(t="#"){let r=$,n=this.$next_ch(),i="";for(;!Es.is_ws(n)&&!y.commas.has(n)&&!y.colons.has(n)&&!y.array_blks.has(n)&&!y.obj_blks.has(n)&&n!==y.hash&&n!==y.ref&&n!==y.slash;)if(y.quotes.has(n)){let l=vi(this);if(l.state!==tt.STATE_DICT.succ)return ki(this,l,this.ch_cache.curr),t===y.hash?this.state=z.get_hash_quote_eofv_with_code(this.state):this.state=z.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),$i.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=$i.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)}};Ie[As]=As;Ie[Ti]=Ti;Ie.MODES=["sync","async"];ye.exports=Ie;ye.exports.Stack=et;ye.exports._type_util=ka;ye.exports._esc=tt;ye.exports._cmt=Ae;ye.exports._ws=Es});var Di=u((Gf,Ii)=>{var{empty:qi}=x(),Ai=I(),De=Ai.gtv,W=Ai.STATE_DICT;function Oa(e){let t=e.state;return t===De(W.bk)||(t===De(W.k)||t===De(W.ak)?(e.str_cache.k=qi,e.state=W.bk):t===De(W.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=W.bv:e.state=W.bk):t===De(W.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===De(W.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}Ii.exports=Oa});var Pi=u((Xf,Oi)=>{var{empty:Hf}=x(),Ni=I(),Ne=Ni.gtv,_e=Ni.STATE_DICT;function Pa(e){let t=e.state;return t===Ne(_e.bk)||(t===Ne(_e.k)||t===Ne(_e.ak)?e.state=_e.bv:t===Ne(_e.bv)||(t===Ne(_e.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ne(_e.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Oi.exports=Pa});var Is=u((Wf,Ri)=>{var{empty:zf}=x(),Li=I(),Oe=Li.gtv,ce=Li.STATE_DICT;function La(e){let t=e.state;return t===Oe(ce.bk)||(t===Oe(ce.k)?e.state=ce.ak:t===Oe(ce.ak)||t===Oe(ce.bv)||(t===Oe(ce.v)?(e.$setup_leafnd(),e.state=ce.av):Oe(ce.av))),e}Ri.exports=La});var Fi=u((Jf,Yi)=>{var{empty:ji}=x(),Bi=I(),Pe=Bi.gtv,Q=Bi.STATE_DICT;function Ra(e,t){let r=e.state,n=e.$handle_quote(t);return n===ji||(r===Pe(Q.bk)?(e.str_cache.k=n,e.state=Q.k):r===Pe(Q.k)?e.str_cache.k=e.str_cache.k+n:r===Pe(Q.ak)?(e.$refresh_key(n),e.state=Q.k):r===Pe(Q.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=Q.v):r===Pe(Q.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=ji):r===Pe(Q.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Yi.exports=Ra});var Xi=u((Uf,Hi)=>{var{empty:Mi}=x(),Ds=I(),L=Ds.gtv,S=Ds.STATE_DICT,ja=Ds.LEFTED_TYPE,$e=te();function Gi(e,t){let r=e.state,n=e[t]();if(n!==Mi){let i=e.stack.lst;if(r===L(S.bk))i.append_ttcmt(n);else if(r===L(S.k))e.$push_kcmt(n),e.state=S.ak;else if(r===L(S.ak))e.$push_kcmt(n);else if(r===L(S.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===L(S.v))e.$setup_leafnd(),e.state=S.av;else if(r===L(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 Ba(e){return Gi(e,"$handle_lcmt")}function Ya(e){return Gi(e,"$handle_blkcmt")}function Fa(e){let t=e.state;t===L(S.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=$e.slash,e.state=S.k):t===L(S.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+$e.slash):t===L(S.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key($e.slash),e.state=S.k):t===L(S.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=$e.slash,e.state=S.v):t===L(S.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+$e.slash,e.str_cache.maybe_vquote=Mi):t===L(S.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av($e.slash))}function Ma(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=$e.slash,e.lefted.type=ja.backslash,e.$handle_main_eof()):e.$is_currch_slash()?Ba(e):e.$is_currch_asterisk()?Ya(e):Fa(e),e}Hi.exports=Ma});var Ji=u((Qf,Wi)=>{var{empty:Vf}=x(),zi=I(),Le=zi.gtv,oe=zi.STATE_DICT;function Ga(e){let t=e.state;return t===Le(oe.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=oe.k):t===Le(oe.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Le(oe.ak)?(e.$refresh_key(),e.state=oe.k):t===Le(oe.bv)?e.$open_nonleaf_nd():t===Le(oe.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Le(oe.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Wi.exports=Ga});var Ki=u((Kf,Qi)=>{var{empty:Ui}=x(),Vi=I(),Re=Vi.gtv,ve=Vi.STATE_DICT,Ha=Is();function Xa(e){let t=e.state;return t===Re(ve.bk)?e.$close_nonleaf_nd():t===Re(ve.k)?(e.str_cache.k=Ui,e.$close_nonleaf_nd()):t===Re(ve.ak)?(e.$refresh_key(),e.str_cache.k=Ui,e.$close_nonleaf_nd()):t===Re(ve.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Re(ve.v)?(e.$setup_leafnd(),e.state=ve.av,e.__unshift_g(e.ch_cache.curr)):t===Re(ve.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 za(e){return e.$is_rblk_match()?Xa(e):Ha(e),e}Qi.exports=za});var sl=u((Zf,tl)=>{var{empty:Wa}=x(),el=I(),je=el.gtv,ae=el.STATE_DICT,Ja=te(),{CommentLine:Zi}=Tt();function Ua(e){let t=e.state,r=e.$get_hash_or_ref(Ja.hash);if(r!==Wa){let n=e.stack.lst;if(t===je(ae.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===je(ae.k)){let i=new Zi(r);e.$push_kcmt(i),e.state=ae.ak}else if(t===je(ae.ak)){let i=new Zi(r);e.$push_kcmt(i)}else t===je(ae.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===je(ae.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ae.av):t===je(ae.av)&&e.avnd_cache.data.hashes.add(r)}return e}tl.exports=Ua});var il=u((eh,nl)=>{var{empty:Ns}=x(),rl=I(),Be=rl.gtv,D=rl.STATE_DICT,Va=te();function Qa(e){let t=e.state,r=e.$get_hash_or_ref(Va.ref);if(r!==Ns){let n=e.$find_ref(r);if(n!==Ns){let i=e.stack.lst;t===Be(D.bk)||t===Be(D.k)||t===Be(D.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=D.ak):t===Be(D.bv)?(e.$add_ref_to_parent(n),e.state=D.av):t===Be(D.v)?(e.str_cache.maybe_vquote=Ns,e.$setup_leafnd(),e.state=D.av):t===Be(D.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=D.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=D.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}nl.exports=Qa});var cl=u((th,_l)=>{var{empty:Ka}=x(),ll=I(),Ye=ll.gtv,K=ll.STATE_DICT;function Za(e){let t=e.state;return t===Ye(K.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=K.k):t===Ye(K.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Ye(K.ak)?(e.$refresh_key(),e.state=K.k):t===Ye(K.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=K.v):t===Ye(K.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=Ka):t===Ye(K.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}_l.exports=Za});var hl=u((sh,fl)=>{var{empty:eu}=x(),tu=Ci(),su=Di(),ru=Pi(),nu=Is(),iu=Fi(),lu=Xi(),_u=Ji(),cu=Ki(),ou=sl(),au=il(),uu=cl(),ul=I(),ol=ul.gtv,al=ul.STATE_DICT,fu=te();function*hu(e,t=eu){let r=new tu(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(su(r),yield r):r.$is_currch_colon()?(ru(r),yield r):r.$is_currch_ws()?(nu(r),yield r):r.$is_currch_quote()?(iu(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(lu(r),yield r):r.$is_currch_lblk()?(_u(r),yield r):r.$is_currch_rblk()?(cu(r),yield r):r.$is_currch_hash()?(ou(r),yield r):r.$is_currch_ref()?r.state===ol(al.av)||r.state===ol(al.v)?r.__unshift_g(fu.fst_comma+r.ch_cache.curr):(au(r),yield r):(uu(r),yield r)}fl.exports=hu});var bl=u((rh,ml)=>{var{sync_gen_from_str:Os,sync_gen_from_file:pl,async_gen_chunk_from_file:du}=Sr(),{is_should_yield:Ps}=I(),j=te(),{is_nl:pu,is_ws:dl}=xe(),Ls=hl(),gu={enable_ref:!1,encoding:"utf8"};function Rs(e,t={enable_ref:!1}){let r=Ls(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let _ of r){let c=_.state;if(Ps(n,l,c)&&!t.enable_ref){let o=n.avnd_cache.data;o.$disconn(),o=null}l=c}return i}function mu(e,t={enable_ref:!1}){let r=Os(e);return Rs(r,t)}function bu(e,t={enable_ref:!1,encoding:"utf8"}){let r=pl(e,t.encoding);return Rs(r,t)}function*js(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ls(e),n=r.next().value,i=n.state;for(let l of r){let _=l.state;if(Ps(n,i,_)&&!t.enable_ref){let c=n.avnd_cache.data;yield c,c.$disconn(),c=null}i=_}}function*yu(e,t={enable_ref:!1,encoding:"utf8"}){let r=Os(e);yield*js(r,t)}function*$u(e,t={enable_ref:!1,encoding:"utf8"}){let r=pl(e,t.encoding);yield*js(r,t)}function vu(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function ku(e){let t=Os(""),r=Ls(t," "),n=r.next().value;n.__use_async_mode();let i=vu();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function wu(e,t){return e.data=e.data+t,e.state==="init"?t===j.slash?e.state="slash":j.quotes.has(t)?(e.label=t,e.state="quote"):t===j.hash?e.state="hash":t===j.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===j.slash?e.state="lcmt":t===j.asterisk?e.state="blkcmt":j.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):pu(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===j.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===j.slash&&(e.can_send=!0):e.state==="hash"?dl(t)?e.can_send=!0:j.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?dl(t)?e.can_send=!0:j.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*xu(e,t){for(let r of e)wu(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*Tu(e){let t=ku(e);for await(let r of e)yield*xu(r,t);yield t}function Su(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*Eu(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,Ps(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*gl(e,t={enable_ref:!1,encoding:"utf8"}){e=Tu(e);let r;for await(r of e)Su(r),yield*Eu(r,t);yield r.rt}async function*Cu(e,t={enable_ref:!1,encoding:"utf8"}){let r=du(e,t.encoding,1024);yield*gl(r,t)}ml.exports={OPT_DICT:gu,parse_from_generator:Rs,parse_from_str:mu,parse_from_file:bu,gen_from_generator:js,gen_from_str:yu,gen_from_file:$u,agen_from_generator:gl,agen_from_file:Cu}});var St=u((nh,rt)=>{var{empty:qu}=x(),Au=te(),st=bl();function Bs(e){return e.length===1?e[0]:e}function Iu(){for(let e in st){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for(let l of i)l=Bs(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for await(let l of i)l=Bs(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n).value;return Bs(i)},Object.defineProperty(t,"name",{value:e}),rt.exports[e]=t}rt.exports.OPT_DICT=st.OPT_DICT}Iu();rt.exports.CFG=Au;rt.exports.empty=qu});var Et=u((ih,yl)=>{var Du=St(),Nu=(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("")},Ou=e=>e.replace(/-/g,"_"),Pu=(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,Lu=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},Ru=e=>Du.parse_from_str(e+" ");yl.exports={dash_to_camel:Nu,dash_to_snake:Ou,attr_value_to_bool:Pu,css_str_to_num:Lu,parse_json_input:Ru}});var kl=u((lh,vl)=>{var{dash_to_camel:Ct}=Et(),$l=(e,t,r=!1)=>{let n=Ct(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}})},ju=(e,t)=>{for(let r of t)$l(e,r,!1)},Bu=e=>{for(let t in DYN_CLSES){{let n="all"+Ct(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=Ct(n,!0),l="get"+Ct(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})}}};vl.exports={add_one_fixed_element_getter:$l,add_fixed_element_getters:ju,add_dyn_element_getters:Bu}});var xl=u((_h,wl)=>{var Yu=St(),{dash_to_snake:Fu,css_str_to_num:Mu}=Et(),Gu=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=Fu(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 Mu(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?Yu.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)}}))}};wl.exports={add_attr_accessors_to_cls:Gu}});var ql=u((ch,Cl)=>{var Tl={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},Hu=e=>`
|
|
1
|
+
var nvbasicbw=(()=>{var Yl=(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 u=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Nt=u((Tf,Js)=>{var Hs=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),Fl=async e=>{for(let t=0;t<e;++t)await Hs()},Ml=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),nt=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])}},zs=()=>new nt,Xs=zs(),Gl=(e,t,r=300)=>{Xs.run(e,t,r)},Hl=e=>{Xs.cancel(e)};Js.exports={wait_for_layout_ready:Hs,wait_for_n_raf:Fl,wait:Ml,SimpleDebounce:nt,creat_simple_debounce:zs,simple_debounce:Gl,cancel_simple_debounce:Hl}});var x=u((Sf,_r)=>{var zl=Symbol("empty"),Me=Symbol("unknown"),Qs=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Ks=/^[\-\+]?[0-9]+$/,Zs=/^\+?[0-9]+$/,Xl=/^[\-\+]?0[bB][0-1]+$/,Jl=/^[\-\+]?0[oO][0-7]+$/,er=/^[\-\+]?0[xX][0-9a-fA-F]+$/,Wl=e=>Ks.test(e)||er.test(e),Ws={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},Ul=/^[\-\+]?[0-9]+n$/,Vl=/^[\-\+]?0[bB][0-1]+n$/,Ql=/^[\-\+]?0[oO][0-7]+n$/,Kl=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,tr=e=>Ul.test(e)||Vl.test(e)||Ql.test(e)||Kl.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"},sr=(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},Zl=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=Ws[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=Ws[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},rr=e=>{let t=Array.from(e);if(Ks.test(e))return parseInt(e);if(Xl.test(e)||Jl.test(e)||er.test(e))return Zl(t)},e_=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}},t_=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",s_=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),Us=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),r_=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(Zs.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},Vs=(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(Zs.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]},nr=e=>{let t=s_(),r=Array.from(e);if(t_(r,e))return;let n=0,i=!1;if([r,n]=Us(r,t,n,"be"),[i,n]=r_(r,t,n,"be"),!i&&([i,n]=Vs(r,t,n,"be"),!i&&([r,n]=Us(r,t,n,"ae"),[i,n]=Vs(r,t,n,"ae"),!i)))return e_(t)},ir=(e,t=!1)=>{let r={value:void 0,type:void 0};if(tr(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=ue.BigInt;else{let n=rr(e);n!==void 0?(r.value=n,r.type=ue.Integer):(n=nr(e),n!==void 0?(r.value=n,r.type=ue.Float):(n=sr(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},n_=(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(Qs()&&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)}}},Fe={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},i_={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function lr(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(i_));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:_}=r,c={value:Me,type:Me};if(e==="undefined")c.value=void 0,c.type=Fe.UndefinedLiteral;else if(e==="null")c.value=null,c.type=Fe.NullLiteral;else if(e==="false")c.value=!1,c.type=Fe.FalseLiteral;else if(e==="true")c.value=!0,c.type=Fe.TrueLiteral;else{let o=ir(e,!0);o.type===void 0?_?(c.value=e,c.type=Fe.StringLiteral):(c.value=e,c.type=Me):(c.value=o.value,c.type=o.type)}return n?c.value:(l||delete c.type,i||delete c.value,c)}lr.unknown=Me;var l_={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}};_r.exports={TYPE_DICT:l_,isNode:Qs,empty:zl,unknown:Me,is_bigint_str:tr,is_jsint_str:Wl,NUM_TYPE_DICT:ue,parse_abnormal_num:sr,parse_int:rr,parse_float:nr,parse_num:ir,parse0:lr,to_str:n_}});var ur=u((Ef,ar)=>{var Ge={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 __(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Ot=__(Ge);function c_(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var o_=c_(Ge),cr=e=>55296<=e&&e<=56319,a_=e=>56320<=e&&e<=57343,u_=(e,t)=>(e-55296)*1024+(t-56320)+65536,or=e=>e<=65535,f_=e=>!or(e),h_=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}},d_=(e,t)=>cr(e)?t+2:t+1;ar.exports={CODE_DICT:Ge,CH_DICT:o_,CODE_NAME_MP:Ot,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Ot.get(e),n2cd:e=>String.fromCharCode(Ge[e]),n2ch:e=>Ge[e],ch2n:e=>Ot.get(e.codePointAt(0)),is_high_code:cr,is_low_code:a_,get_code_point_from_high_low:u_,get_high_low_from_code_point:h_,is_length1_code_point:or,is_length2_code_point:f_,_next_code_index:d_}});var xe=u((Cf,T)=>{var{CODE_DICT:f,CH_DICT:b}=ur(),fr=/\r\n?|[\n\u2028\u2029]/;T.exports.line_break_regexp=fr;T.exports.line_break_regexp_g=new RegExp(fr.source,"g");function hr(e){switch(e){case f.lineFeed:case f.carriageReturn:case f.lineSeparator:case f.paragraphSeparator:return!0;default:return!1}}function dr(e){switch(e){case b.lineFeed:case b.carriageReturn:case b.lineSeparator:case b.paragraphSeparator:return!0;default:return!1}}var Pt=[f.lineFeed,f.carriageReturn,f.lineSeparator,f.paragraphSeparator],pr=Pt.map(e=>String.fromCharCode(e));T.exports.NL_CODE_ARR=Pt;T.exports.NL_CH_ARR=pr;T.exports.is_nl_code=hr;T.exports.is_nl=dr;T.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function gr(e){switch(e){case 9:case 11:case 12:case f.space:case f.nonBreakingSpace:case f.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}}T.exports.is_non_nl_ws_code=gr;function mr(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}}T.exports.is_non_nl_ws=mr;var Lt=[f.tab,f.lineTab,f.formFeed,f.space,f.nonBreakingSpace,f.oghamSpaceMark,f.enQuad,f.emQuad,f.enSpace,f.emSpace,f.threePerEmSpace,f.fourPerEmSpace,f.sixPerEmSpace,f.figureSpace,f.punctuationSpace,f.thinSpace,f.hairSpace,f.narrowNoBreakSpace,f.mediumMathematicalSpace,f.ideographicSpace,f.zeroWidthNoBreakSpace];T.exports.NON_NL_WS_CODE_ARR=Lt;var br=Lt.map(e=>String.fromCharCode(e));T.exports.NON_NL_WS_CH_ARR=br;function p_(e){return gr(e)||hr(e)}function we(e){return mr(e)||dr(e)}T.exports.is_ws_code=p_;T.exports.is_ws=we;T.exports.WS_CHCODE_ARR=Pt.concat(Lt);T.exports.WS_CH_ARR=pr.concat(br);var ee={init:0,executing:1,succ:2,eof:3};T.exports.STATE_DICT=ee;function g_(e,t=new Set){let r={g:e,rslt:"",state:ee.init},n=r.g.next().value;if(n===void 0)return r.state=ee.eof,r;for(;n!==void 0&&(we(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!we(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=ee.eof:(we(n)||t.has(n))&&(r.state=ee.succ),r}function m_(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:ee.init};for(let l=n.pos;l<e.length;l++){let _=e[l];if(we(_)||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(!we(_)&&!r.has(_))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=ee.eof:n.state=ee.succ,n.rslt=e.slice(i,n.pos).join(""),n}T.exports.from_generator=g_;T.exports.from_charr=m_});var te=u((qf,xr)=>{var{WS_CH_ARR:yr,NON_NL_WS_CH_ARR:b_,NL_CH_ARR:y_}=xe();function $_(e){return Array.from(e).length}var v_="\u200C",$r="\u200D",k_=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Rt(e,t,...r){let n=function(){return t(this,...r)};k_()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var Y={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")},it=Symbol("get_pair_lmp"),w_=Symbol("add_pair_reserved"),He=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[it](){return this.#e}get size(){return this.#e.size}[w_](t,r){if(t===r)throw Y.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 Y.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw Y.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw Y.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 x_(e){return new Map(e[it])}Rt(He,x_);var vr=Symbol("get_single_set"),kr=Symbol("add_single_reserved"),Te=class{#t;#e=new Set;constructor(t){this.#t=t}get[vr](){return this.#e}[kr](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw Y.cant_be_empty;if(t==="`")throw Y.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function T_(e){return new Set(e[vr])}Rt(Te,T_);var lt=class{#t;#e;#s;#r;#n;#i=!1;constructor(){this.#t=new He(this),this.#t.add("[","]"),this.#t.add("(",")"),this.#t.add("<",">"),this.#t.add("\uFF08","\uFF09"),this.#t.add("\u2018","\u2019"),this.#e=new He(this),this.#e.add("{","}"),this.#e.add("\u3010","\u3011"),this.#e.add("\u300A","\u300B"),this.#e.add("\u201C","\u201D"),this.#s=new Te(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[kr]("`"),this.#r=new Te(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 Te(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(yr)}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[it])t.add(r);for(let r of this.#e[it])t.add(r)}return t}validate(t){if(typeof t!="string"||$_(t)!==1)throw Y.char;if(this.reserved.includes(t))throw Y.reserved;if(Array.from(this.inuse).flat().includes(t))throw Y.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 y_}get non_nl_ws(){return b_}get ws(){return yr}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]}},_t=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(_t,"name",{value:$r});var ct=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(ct,"name",{value:$r});var ot=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(ot,"name",{value:v_});function S_(e){return[new ct(e),new ot(e),new _t(e)]}Rt(lt,S_);var wr=new lt;wr.ERROR_DICT=Y;xr.exports=wr});var Cr=u((Af,N)=>{var Tr=Yl("fs");function*Sr(e){for(let t of e)yield t;e=null}function E_(e,t){let r=e.codePointAt(t);if(r!==void 0)return r<65536?t=t+1:t=t+2,t}function*C_(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*q_(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 A_(e){let t=[];for await(let r of e)t.push(r);return t}async function*I_(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*N_(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*O_(e,t="utf8"){let r=Tr.readFileSync(e,{encoding:t});yield*Sr(r)}async function*Er(e,t="utf8",r=4096){let n=Tr.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*P_(e,t="utf8"){yield*Er(e,t,1)}N.exports.sync_gen_from_file=O_;N.exports.async_gen_from_file=P_;N.exports.async_gen_chunk_from_file=Er;N.exports.async_iter_to_array=A_;N.exports.sync_gen_from_str=Sr;N.exports.async_gen_from_str=I_;N.exports.get_next_pos=E_;N.exports.sync_gen_pos_from_str=q_;N.exports.sync_gen_code_point_from_str=C_;N.exports.async_gen_pos_from_str=N_;N.exports.async_gen_code_point_from_str=D_});var I=u((If,Ir)=>{var qr={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 L_(e){return e+1}function R_(e){return e+2}function j_(e){return e+3}function B_(e){return e+6}function Y_(e){return e+5}function F_(e){return e+9}function M_(e){return e+8}function Ar(e){return e%10!==0}var G_={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},H_={handling:0,handled:1};function z_(e,t,r){let n=qr;return e.$has_yield_sign()||Ar(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)}Ir.exports={STATE_DICT:qr,gtv:q,get_main_eofv_with_code:L_,get_lcmt_eofv_with_code:R_,get_blkcmt_eofv_with_code:j_,get_hash_quote_eofv_with_code:B_,get_hash_naked_eofv_with_code:Y_,get_ref_quote_eofv_with_code:F_,get_ref_naked_eofv_with_code:M_,LEFTED_TYPE:G_,AVND_CACHE_STATE_DICT:H_,is_eofv:Ar,is_should_yield:z_}});var zt=u((Df,Mr)=>{var{is_nl:Or}=xe(),Pr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},at=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Pr(l,r,n,i)},X_=/^[0-7]$/,J_=/^[0-9a-fA-F]$/,fe=e=>X_.test(e),U=e=>J_.test(e),ut={b:"\b",f:"\f",n:`
|
|
2
|
+
`,r:"\r",t:" ",v:"\v"},Lr={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function W_(e){return Lr[e]}function Rr(e){return ut[e]}function U_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+at(t,16,2)}function V_(e){e=Array.from(e);let t=e[0],r=e[1];if(U(t)&&U(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function Q_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+at(t,16,4)}function K_(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(U(t)&&U(r)&&U(n)&&U(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function Z_(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+at(t,8,3)}function ec(e){let t="";e=Array.from(e);let r=e[0];if(fe(r)){t=t+r;let n=e[1];if(fe(n)){t=t+n;let l=e[2];fe(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*tc(e){let t=Array.from(e);for(let r of t)yield r}function*Dr(e,t){yield*t,yield*e}function jr(e,t,r,n,i=!1){if(typeof t=="string"){let _=t;t=c=>c===_}if(typeof(r==="string")&&r.length>0){let _=tc(r);e=Dr(e,_)}else e=Dr(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 jt(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 Bt(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 Nr(e,t,r,n,i,l,_){return _===!0?n===Br?(e.state=d.x,e.ch="\\x"+t.join(""),e):n===Yr?(e.state=d.u,e.ch="\\u"+t.join(""),e):(n===Fr&&(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 sc(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 ft(e,t,r,n,i=!0,l=!1,_=void 0,c=!1){let o;if(_!==void 0?o=_:(o=e.g.next().value,o!==void 0&&(e.offset=e.offset+1)),o===void 0)return e;let a=0,h=[],m;if(l?m=!0:m=r(o),m)a=a+1,h.push(o);else return e.state=d.executing,e.ch=o,e;for(;a<t;){if(o=e.g.next().value,o===void 0)return Nr(e,h,o,n,i,c,tail=!0);if(e.offset=e.offset+1,m=r(o),m)a=a+1,h.push(o);else return Nr(e,h,o,n,i,c,tail=!1)}return sc(e,h,o,n,c)}function Br(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function Yr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Fr(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Yt(e,t=!1){return e.curr=Rr(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 Ft(e,t=!1){return ft(e,2,U,Br,!0,!1,void 0,t)}function Mt(e,t=!1){return ft(e,4,U,Yr,!0,!1,void 0,t)}function Gt(e,t=!1){return ft(e,3,fe,Fr,!1,!0,e.ch,t)}function Ht(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 rc(e,t=i=>i==='"',r="",n="\\"){let i=jr(e,t,r,n,!0);for(i.state=d.executing;!jt(i);)i.state===d.executing?Bt(i,!0):i.state===d.backslash&&(Or(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=d.executing):i.ch in ut?Yt(i,!0):i.ch==="x"?Ft(i,!0):i.ch==="u"?Mt(i,!0):fe(i.ch)?Gt(i,!0):Ht(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*nc(e){let t=e;for(t.state=d.executing;!jt(t);)t.state===d.executing?(Bt(t,!1),t.curr!==""&&(yield t.curr)):t.state===d.backslash&&(Or(t.ch)?(t.state=d.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ut?(Yt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Ft(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Mt(t,!1),t.curr!==""&&(yield t.curr)):fe(t.ch)?(Gt(t,!1),t.curr!==""&&(yield t.curr)):(Ht(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}Mr.exports={CHAR_UNESC_DICT:ut,CHAR_ESC_DICT:Lr,escc:W_,unescc:Rr,escx:U_,unescx:V_,escu:Q_,unescu:K_,esco:Z_,unesco:ec,STATE_DICT:d,from_generator:rc,init:jr,handle_executing:Bt,is_terminated:jt,handle_escc:Yt,esc_handle_engine:ft,handle_escx:Ft,handle_escu:Mt,handle_esco:Gt,handle_esc_other:Ht,gen:nc,prepend:Pr,prepend_num:at,is_odigit_ch:fe,is_hdigit_ch:U}});var Qr=u((Nf,Vr)=>{var{is_nl:ic}=xe(),Se=zt(),Gr={line_comment:0,blk_comment:1},se={init:0,executing:1,succ:2,eof:3,asterisk:4};function Hr(e){return{state:se.init,g:e,rslt:"",ch:"",offset:0}}function zr(e,t){return e.state=se.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Xr(e,t){return e.state=se.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function Jr(e,t){return e.state=se.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function Wr(e,t=""){let r=Hr(e);r.state=se.executing;let n=Se.from_generator(r.g,ic,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===Se.STATE_DICT.eof?zr(r,n):n.state===Se.STATE_DICT.succ?Xr(r,n):Jr(r,n)}function Ur(e,t=""){let r=Hr(e);r.state=se.executing;let n;for(;;){if(n=Se.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===Se.STATE_DICT.eof)return zr(r,n);if(n.state===Se.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Xr(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=se.asterisk,r}else return Jr(r,n)}return r}function lc(e,t,r=""){return t===Gr.line_comment?Wr(e,r):Ur(e,r)}Vr.exports={TYPE_DICT:Gr,STATE_DICT:se,lc_from_generator:Wr,blk_from_generator:Ur,from_generator:lc}});var Xt=u((Of,Kr)=>{function _c(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function cc(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function oc(e){return parseInt(e).toString()===e}Kr.exports={rjson:_c,wjson:cc,is_int_str:oc}});var Jt=u((Pf,Zr)=>{var ac=()=>Math.random()*9007199254740992;function uc(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function fc(e,t){return t.filter((r,n)=>e.includes(n))}function hc(e){return Object.entries(e).length===0}function dc(e){return Object.entries(e).map(n=>n[1])}function pc(e){return Object.entries(e).map(n=>n[0])}function gc(e){return Object.entries(e).length}function mc(e,t){for(let r in e)t(r,e[r]);return e}function bc(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function yc(e,t){for(let r in t)e[r]=t[r];return e}function $c(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function vc(e,t,r){return r=r.filter(n=>n[e]!==t),r}function kc(e,t,r){return r.findIndex(i=>i[e]===t)}function wc(e){return JSON.parse(JSON.stringify(e))}function xc(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 Tc(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}Zr.exports={gen_guid:ac,range:uc,seqs_slct:fc,dict_length:gc,is_empty_dict:hc,dict_values:dc,dict_keys:pc,dict_map:bc,dict_foreach:mc,dict_plus:yc,dict_update:$c,dtb_kv_rm:vc,dtb_kv_get_seq:kc,dcp:wc,mat_map:xc,is_cu_property:Tc}});var ls=u((Lf,Sn)=>{var k=Jt();function Vt(e){if(k.is_empty_dict(e))return 0;{let t=k.dict_keys(e);return Math.max(...t)+1}}function ze(e){return e!=null}function tn(e,t){return e._id=e._id+t,e._tree=e._tree+t,ze(e._fstch)&&(e._fstch=e._fstch+t),ze(e._lsib)&&(e._lsib=e._lsib+t),ze(e._rsib)&&(e._rsib=e._rsib+t),ze(e._parent)&&(e._parent=e._parent+t),e}function he(e,t){let r=Vt(e);for(let n in t){let i=tn(t[n],r);t[i._id]=i,delete t[n]}return t}function Sc(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function Ec(e,t=0){return{_id:Vt(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function sn(e){return e._tree!==void 0}function re(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Qt(e){return e._lsib===null}function Kt(e){return e._rsib===null}function F(e){return e._fstch===null}function rn(e,t){if(re(e))return!0;{let n=w(e,t);return G(n,t).length===1}}function Ue(e){return re(e)||!sn(e)}function ht(e,t,r){if(!Ue(t))return console.log("only root or uninited could be prepend"),e;let n=F(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 Zt(e,t,r){if(!Ue(t))return console.log("only root or uninited could be append"),e;let n=F(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=pe(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 es(e,t,r){if(!Ue(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addrsib to root"),e;let n=Kt(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 nn(e,t,r){if(!Ue(t))return console.log("only root or uninited could be add"),e;if(re(e))return console.log("cant addlsib to root"),e;let n=Qt(e);if(t._tree=e._tree,n){let i=w(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=M(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 ln(e,t,r,n){let i=G(t,n),l=i.length;if(l===0)return ht(t,r,n);if(e<=l&&e>=0){if(e===0)return ht(t,r,n);if(e===l)return Zt(t,r,n);{let c=i[e-1];return es(c,r,n)}}else return console.log("not in range!!"),t}function Ee(e,t){for(let r in t)t[r]._tree=e._tree}function Cc(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=ht(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function qc(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=Zt(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Ac(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=es(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Ic(e,t,r){r=he(t,r);let n=k.dict_keys(r)[0],i=ie(r[n],r);return e=nn(e,i,t),Ee(e,r),k.dict_plus(t,r),e}function Dc(e,t,r,n){n=he(r,n);let i=k.dict_keys(n)[0],l=ie(n[i],n);return t=ln(e,t,l,r),Ee(t,n),k.dict_plus(r,n),t}function Xe(e,t){let r=H(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function Je(e,t){let r={};return e.map(n=>{let i=n._id;r[i]=n,delete t[i]}),r}function _n(e){return e._fstch=null,e}function We(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Ce(e,t){if(re(e))return[e,t];if(rn(e,t)){let n=t[e._parent];_n(n);let i=Xe(e,t),l=Je(i,t);return We(e),[e,l]}else if(Qt(e)){let n=R(e,t);n._lsib=null;let i=w(e,t);i._fstch=e._rsib;let l=Xe(e,t),_=Je(l,t);return We(e),[e,_]}else if(Kt(e)){let n=M(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=Xe(e,t),l=Je(i,t);return We(e),[e,l]}else{let n=M(e,t);n._rsib=e._rsib;let i=Xe(e,t),l=Je(i,t);return We(e),[e,l]}}function Nc(e,t){let r=de(e,t);return r===null?[e,t]:Ce(r,t)}function Oc(e,t){let r=pe(e,t);return r===null?[e,t]:Ce(r,t)}function Pc(e,t,r){let n=cn(e,t,r);return n===null?[t,r]:Ce(n,r)}function Lc(e,t,...r){let n=on(e,t,...whiches);for(let i=0;i<n.length;i++)Ce(n[i],t);return[e,t]}function Rc(e,t){let r=G(e,t);for(let n=0;n<r.length;n++)Ce(r[n],t);return t}function de(e,t){return e._fstch===null?null:t[e._fstch]}function G(e,t){let r=[],n=de(e,t);for(;n!==null;)r.push(n),n=R(n,t);return r}function pe(e,t){let r=G(e,t);return r.length===0?null:r[r.length-1]}function cn(e,t,r){let n=G(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function on(e,t,...r){let n=G(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 an(e,t,r=!1){let n=e,i=R(e,t);for(;i!==null;)n=i,i=R(i,t);return r||n._id!==e._id?n:null}function jc(e,t){let r=ne(e,t,!0),n=k.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 Bc(e,t){let r=ne(e,t,!0),n=k.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 ne(e,t,r=!1){let n=w(e,t),i;return n!==null?i=G(n,t):i=[e],r||(i=k.dtb_kv_rm("_id",e._id,i)),i}function Yc(e,t,r=!1){let n=ne(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function Fc(e,t,r){let n=ne(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function Mc(e,t,...r){let n=ne(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 Gc(e,t){let r=ne(e,t,!0);return k.dtb_kv_get_seq("_id",e._id,r)}function M(e,t){let r=ne(e,t,!0),n=k.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function R(e,t){return e._rsib===null?null:t[e._rsib]}function E(e,t){return dt(e,t,!0).length-1}function un(e,t){let r=E(e,t),i=H(e,t).map(_=>E(_,t));return Math.max(...i)-r+1}function Hc(e,t){return F(e)?null:E(e,t)+1}function zc(e,t){if(F(e))return null;{let n=E(e,t),l=H(e,t).map(c=>E(c,t));return Math.max(...l)}}function Xc(e,t,r){let n=E(t,r);return un(t,r)<=e?null:n+e}function fn(e,t){let r=ie(e,t),n=H(r,t),i=E(e,t);return n.filter(_=>E(_,t)===i)}function Wt(e,t){let r=fn(e,t);return k.dtb_kv_get_seq("_id",e._id,r)}function Jc(e,t){return H(e,t).length}function ie(e,t){let r=e,n=w(e,t);for(;n!==null;)r=n,n=w(n,t);return r}function w(e,t){let r;if(re(e))r=null;else{let n=an(e,t,!0);r=t[n._parent]}return r}function dt(e,t,r=!1){let n=[],i=w(e,t);for(;i!==null;)n.push(i),i=w(i,t);return r&&n.unshift(e),n}function Wc(e,t,r){let n=dt(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function Uc(e,t,...r){let n=dt(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 hn(e,t){let r=w(e,t);for(;r!==null;){let n=R(r,t);if(n!==null)return n;r=w(r,t)}return null}function dn(e,t){let r=de(e,t);if(r!==null)return r;{let n=R(e,t);return n!==null?n:hn(e,t)}}function pn(e,t){let r=e,n=pe(e,t);for(;n!==null;)r=n,n=pe(n,t);return r}function Vc(e,t){if(re(e))return null;if(F(e)){let n=M(e,t);return n!==null?n:w(e,t)}else{let n=M(e,t);return n!==null?F(n)?n:pn(n,t):w(e,t)}}function H(e,t){let r=E(e,t),n=[];for(;e!==null&&(n.push(e),e=dn(e,t),!(e!==null&&E(e,t)<=r)););return n}function ts(e,t){let r=e,n=de(e,t);for(;n!==null;)r=n,n=de(n,t);return r}function gn(e,t){let r=R(e,t);return r===null?w(e,t):ts(r,t)}function mn(e,t){let r=w(e,t);for(;r!==null;){let n=M(r,t);if(n!==null)return n;r=w(r,t)}return null}function Qc(e,t){if(F(e)){let n=M(e,t);return n===null?mn(e,t):n}else return pe(e,t)}function bn(e,t){let r=[],n=ts(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=gn(n,t);return r}function Ut(e){k.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function yn(e,t){let r=e._$visited;if(F(e))if(r){let i=R(e,t);return i===null?w(e,t):i}else return e._$visited=!0,e;else if(r){let i=R(e,t);return i===null?w(e,t):i}else return e._$visited=!0,de(e,t)}function Kc(e,t,r){if(F(t)){if(e)return t;{let i=M(t,r);return i===null?w(t,r):i}}else{if(e)return pe(t,r);{let i=M(t,r);return i===null?w(t,r):i}}}function $n(e,t){return t._$visited&&e===t._id}function vn(e,t,r=!1,n=!0){let i=[];Ut(t);let l=e._id;for(;!$n(l,e);)r?i.push(k.dcp(e)):i.push(e),e=yn(e,t);return r?i.push(k.dcp(e)):i.push(e),n&&Ut(t),i}function Zc(e,t){let r={};r._depth=E(e,t),r._breadth=Wt(e,t);let n=w(e,t);return r._pbreadth=n===null?null:Wt(n,t),r._id=e._id,r}function en(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function ss(e,t){let r=[],n=e[0],i=[en(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 o=G(i[c].nd,t);o=o.map(a=>en(a)),o.forEach((a,h)=>{a.ele._pbreadth=i[c].ele._breadth,i[c].ele._children.push([r.length+1,l.length+h])}),l=l.concat(o)}let _=i.map(c=>c.ele);r.push(_),i=l}return r}function kn(e,t){return bn(e[0],t)}function wn(e,t,r=!1,n=!0){return vn(e[0],t,r,n)}function eo(e,t){let r=rs(e,t);return ss(r,t)}function rs(e,t){let r=e[e.length-1];return H(r,t)}function to(e,t,r=!1,n=!0){let i=rs(e,t);return wn(i,t,r,n)}function so(e,t){let r=ns(e,t);return ss(r,t)}function ns(e,t){let r=e[0];return H(r,t)}function ro(e,t){let r=ns(e,t);return kn(r,t)}function is(e,t,r=!1){let n=H(e,t);return r||n.splice(0,1),n}function no(e,t){return G(e,t)}function io(e,t){let r=is(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 xn(e,t,r){let n=E(t,r),i=is(t,r,!1),l=sdfs.map(_=>E(_,r));return i=i.filter(_=>E(_,r)===n+e),i}function lo(e,t,...r){let n=r.map(i=>xn(i,e,t));return n=Array.prototype.concat(...n),n}function Tn(e){let t=k.dict_keys(e)[0],r=e[t];return ie(r,e)}function _o(e){let t=Tn(e);return H(t,e)}Sn.exports={calc_next_id:Vt,update_nodes_ids:he,creat_root:Sc,creat_nd:Ec,is_inited:sn,is_root:re,is_fstch:Qt,is_lstch:Kt,is_leaf:F,is_lonely:rn,is_id:ze,is_connectable:Ue,prepend_child:ht,append_child:Zt,insert_child:ln,add_rsib:es,add_lsib:nn,get_fstch:de,get_rsib:R,get_children:G,get_lstch:pe,get_which_child:cn,get_some_children:on,get_fstsib:Yc,get_lstsib:an,get_preceding_sibs:jc,get_following_sibs:Bc,get_sibs:ne,get_which_sib:Fc,get_some_sibs:Mc,get_sibseq:Gc,get_lsib:M,get_rsib:R,get_lyr:fn,get_breadth:Wt,get_count:Jc,get_depth:E,get_height:un,get_fst_lyr_des_depth:Hc,get_lst_lyr_des_depth:zc,get_which_lyr_des_depth:Xc,get_root:ie,get_parent:w,get_ances:dt,get_which_ance:Wc,get_some_ances:Uc,get_rsib_of_fst_ance_having_rsib:hn,get_sdfs_next:dn,get_drmost_des:pn,get_sdfs_prev:Vc,get_sdfs:H,get_lsib_of_fst_ance_having_lsib:mn,get_dlmost_des:ts,get_edfs_next:gn,get_edfs_prev:Qc,get_edfs:bn,clear_$visited:Ut,get_sedfs_next:yn,is_sedfs_traverse_finished:$n,get_sedfs_prev:Kc,get_sedfs:vn,get_deses:is,get_fst_lyr_deses:no,get_lst_lyr_deses:io,get_which_lyr_deses:xn,get_some_lyrs_deses:lo,nd2ele:Zc,sdfs2mat:ss,sdfs2edfs:kn,sdfs2sedfs:wn,edfs2mat:eo,edfs2sdfs:rs,edfs2sedfs:to,sedfs2mat:so,sedfs2sdfs:ns,sedfs2edfs:ro,update_disconnected_nodes:Xe,update_orig_nodes:Je,leafize:_n,rootize:We,disconnect:Ce,rm_fstch:Nc,rm_lstch:Oc,rm_which:Pc,rm_some:Lc,rm_all:Rc,update_treeid:Ee,update_one_nodeid:tn,update_nodes_ids:he,prepend_child_tree:Cc,append_child_tree:qc,add_rsib_tree:Ac,add_lsib_tree:Ic,insert_child_tree:Dc,get_root_via_tree:Tn,tree2sdfs:_o}});var In=u((Rf,An)=>{function En(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 Cn=En();function qn(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 Cn(n,i);return this.dispatchEvent(l),l}}return t}var co=qn();An.exports={creat_event_cls:En,E:Cn,creat_event_target_cls:qn,ET:co}});var ci=u((jf,_i)=>{var zn=Xt(),Qe=Jt(),ge=ls(),{ET:Dn}=In(),oo=["_fstch","_lsib","_rsib","_parent","_tree"];function Xn(e){return e._tree!==void 0}function _s(e){return e._tree===e}function ao(e){return e._lsib===null}function uo(e){return e._rsib===null}function fo(e){return e._fstch===null}function ho(e){return e.$sibs(!0).length===1}function vt(e){return _s(e)||!Xn(e)}function Nn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function On(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 Pn(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 cs(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function po(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 kt(e,t=!1){let r=os(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function go(e){let t=kt(e,!1);if(t===null)return null;{let r=t;for(;;){if(r._rsib===e)return r;r=r._rsib}}}function fs(e){let t=[],n=kt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function Wn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function Un(e,t=!1){let r=fs(e),n=Wn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function mo(e,t){let r=kt(t,!0),n=0;for(;;){if(r===null)return null;if(n==e)return r;r=r._rsib,n=n+1}}function bo(e,...t){return Un(e,!0).filter((i,l)=>t.includes(l))}function Ln(e){return fs(e).length}function yo(e,t=!1){return e.$sibs(t).length}function os(e){return Jn(e,!0)._parent}function $o(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function vo(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function yt(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 ko(e,...t){return yt(e,!0).filter((i,l)=>t.includes(l))}function wo(e,t=!1){return yt(e,t).length}function xo(e){let t=e.$parent();return t===null?null:t.$lsib()}function To(e){let t=e.$parent();return t===null?null:t.$rsib()}function So(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function Eo(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function Co(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function qo(e){let t=e.$parent();return t===null?null:t.$breadth()}function Ao(e){return e.$lyr().indexOf(e)}function Io(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function Do(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 Rn(e,t=!1){let r=Qn(e),n=be(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function No(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 Oo(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 Po(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 as(e,t){if(!vt(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 us(e,t){if(!vt(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 Vn(e,t){if(!vt(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 Lo(e,t){if(!vt(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 jn(e,t,r){let n=cs(t),i=n.length;if(i===0)r=as(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=as(t,r);else if(e===i)r=us(t,r);else{let _=n[e-1];r=Vn(_,r)}return r}function Ro(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function jo(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 Qn(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function Bo(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 be(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 Yo(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function Fo(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function Mo(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function Go(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 Ho(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function Kn(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 zo(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 Xo(e){e.$sdfs().forEach(r=>{delete r.$visited})}function Jo(e,t){return t.$visited&&e===t}function Bn(e){Xo(e);let t=[],r=new Set,n=e;for(;!Jo(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=Kn(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function Wo(e){return e._fstch=null,e}function pt(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function gt(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function me(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();Wo(r);let n=gt(e);return pt(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=gt(e);return pt(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=gt(e);return pt(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=gt(e);return pt(e),e}}function Yn(e){let t={};return t._nd=e,t._children=[],t}function Fn(e){let t=[],r=e[0],n=[Yn(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(o=>Yn(o)),c.forEach((o,a)=>{o._pbreadth=n[_]._breadth,n[_]._children.push([t.length+1,i.length+a])}),i=i.concat(c)}let l=n;t.push(l),n=i}return t}function Mn(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Qe.is_cu_property(i)&&(n[i]=r[i]);return n}function Uo(e,t="_children"){let r=e[0][0],n=Mn(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let _=0;_<i.length;_++){let c=i[_],o=c.d,a=c.ele,m=c.ele._children.map(v=>e[v[0]][v[1]]);for(let v=0;v<m.length;v++){let A=m[v],B=Mn(A,t);o[t].push(B);let Bl={d:B,ele:A};l.push(Bl)}}i=l}return n}function Gn(e,t="_children"){let r=new V;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Qe.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function Vo(e,t="_children"){let r=Gn(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,o=_[t]===void 0?[]:_[t];for(let a=0;a<o.length;a++){let h=o[a],m=Gn(h,t);c.$append_child(m);let v={d:h,nd:m};i.push(v)}}n=i}return r}function Qo(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 Ko(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function Zo(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 ea=["$fstch","$rsib","$parent"];function ta(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 sa(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var Zn={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function ra(e,t){for(let r=0;r<t.length;r++){let n=Zn[t[r]];e=e[n]()}return e}function na(e){let t=new V,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=ra(r,i)}return t}function ia(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 O=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){Qo(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Qe.gen_guid()),r&&(this.#t=new Dn)}get opt(){return this.#e}enable_et(){this.#t=new Dn}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 Xn(this)}$is_root(){return _s(this)}$is_fstch(){return ao(this)}$is_lstch(){return uo(this)}$is_leaf(){return fo(this)}$is_lonely(){return ho(this)}$fstch(){return this._fstch}$lstch(){return Nn(this)}$which_child(t){return On(t,this)}$some_children(...t){return Pn(this,...t)}$children(){return cs(this)}$children_count(){return po(this)}$rsib(){return this._rsib}$lsib(){return go(this)}$fstsib(t=!1){return kt(this,t)}$lstsib(t=!1){return Jn(this,t)}$psibs(){return fs(this)}$fsibs(){return Wn(this)}$which_sib(t){return mo(t,this)}$some_sibs(...t){return bo(this,...t)}$sibseq(){return Ln(this)}$sibs(t=!1){return Un(this,t)}$sibs_count(t=!1){return yo(this,t)}$parent(){return os(this)}$root(){return $o(this)}$ances(t=!1){return yt(this,t)}$which_ance(t){return vo(t,this)}$some_ances(...t){return ko(this,...t)}$ances_count(t=!1){return wo(this,t)}$prepend_child(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,as(this,t)}$insert_child(t,r){return r=r===void 0?new O(this.#e.with_id,this.#e.with_et):r,jn(t,this,r)}$append_child(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,us(this,t)}$clone(){if(_s(this)){let t=bt(this);return $t(t)}else{let t=Ln(this),r=os(this);me(this);let n=bt(this),i=$t(n);return jn(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new O(this.#e.with_id,this.#e.with_et):r.$clone();l=us(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,Vn(this,t)}$add_lsib(t){return t=t===void 0?new O(this.#e.with_id,this.#e.with_et):t,Lo(this,t)}$rsib_of_fst_ance_having_rsib(){return Ro(this)}$sdfs_next(){return jo(this)}$drmost_des(){return Qn(this)}$sdfs_prev(){return Bo(this)}$sdfs(){return be(this)}$dlmost_des(){return Yo(this)}$edfs_next(){return Fo(this)}$lsib_of_fst_ance_having_lsib(){return Mo(this)}$edfs_prev(){return Go(this)}$edfs(){return Ho(this)}$offset(){return Do(this)}$sedfs_next(){return Kn(this)}$sedfs_prev(t){return zo(this)}$sedfs(){return Bn(this)}$deses(t=!1){return Rn(this,t)}$lst_lyr_deses(){return No(this)}$which_lyr_deses(t){return Oo(t,this)}$some_lyrs_deses(...t){return Po(this,...t)}$count(t=!0){return Rn(this,t).length}$depth(t=!1){return yt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return qo(this)}$breadth(){return Ao(this)}$width(){return Io(this)}$lyr(){return Co(this)}$lcin(){return So(this)}$rcin(){return Eo(this)}$luncle(){return xo(this)}$runcle(){return To(this)}$sdfs_repr(t=Ko,r=!1){let n=this.$root(),i=be(n),c=be(this).map((o,a)=>t(o,a,i)).join(`
|
|
3
|
+
`);if(console.log(c),r)return c}$sedfs_repr(t=Zo,r=!1){let n=this.$root();ei(n);let _=Bn(this).map((c,o)=>t(c,o)).join(`
|
|
4
|
+
`);if(console.log(_),r)return _}$disconn(){return me(this)}$rm_fstch(){let t=this._fstch;return me(t)}$rm_lstch(){let t=Nn(this);return me(t)}$rm_which(t){let r=On(t,this);return me(r)}$rm_some_children(...t){return Pn(this,...t).map(n=>me(n))}$rm_all_children(){return cs(this).map(r=>me(r))}$dump(){if(this.$is_root())return bt(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=bt(this);zn.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return Fn(be(this))}$nest_dict(t="_children"){let r=Fn(be(this));return Uo(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 ta(this)}$sdfs_srch_action_list(){return sa(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 ia(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(O,"name",{value:"\u200D"});function ei(e){let t=be(e);return t.forEach((r,n)=>{r._id=n}),t}function la(e){let t=new V;return t._id=e._id,t.$guid=e._guid,t}function Hn(e,t){for(;t._id!==e;)t=t._parent;return t}function Ve(e,t){let r=ti(t);for(let n of r)e[n]=t[n];return e}function $t(e){let t=Qe.dict_keys(e)[0],r=ge.get_root(e[t],e),n=la(r);n=Ve(n,r);let i=n,l=r,_=ge.get_sdfs_next(l,e),c;for(;_!==null;)if(l._fstch===_._id)c=i.$prepend_child(),c._id=_._id,c.$guid=_._guid,c=Ve(c,_),i=c,l=_,_=ge.get_sdfs_next(l,e);else if(l._rsib===_._id)c=i.$add_rsib(),c._id=_._id,c.$guid=_._guid,c=Ve(c,_),i=c,l=_,_=ge.get_sdfs_next(l,e);else if(_._parent!==null&&_._parent!==void 0){let o=_._parent;i=Hn(o,i),c=i.$append_child(),c._id=_._id,c.$guid=_._guid,c=Ve(c,_),i=c,l=_,_=ge.get_sdfs_next(l,e)}else if(_._parent===void 0){let a=ge.get_parent(_,e)._id;i=Hn(a,i),c=i.$append_child(),c._id=_._id,c.$guid=_._guid,c=Ve(c,_),i=c,l=_,_=ge.get_sdfs_next(l,e)}else console.log("Impossible",i,l,_);return n}function mt(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function ti(e){return Qe.dict_keys(e).filter(n=>!oo.includes(n))}function _a(e,t){let r=ti(e);for(let n of r)t[n]=e[n];return t}function bt(e){let t=ei(e),r=e._id,n={};return t.forEach((i,l)=>{let _={};_._tree=r,_._fstch=mt(i,"_fstch"),_._lsib=mt(i,"_lsib"),_._rsib=mt(i,"_rsib"),_._parent=mt(i,"_parent"),_._id=i._id,_._guid=i.$guid,_=_a(i,_),n[i._id]=_}),n}var V=class extends O{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(V,"name",{value:"\u200D"});function si(e){if(typeof e=="string"){let t=zn.rjson(e);return $t(t)}else return typeof e=="object"?$t(e):new V}function ca(e,t="_children"){return Vo(e,t)}function oa(e){let t=e.$dump();return si(ndict)}function hs(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function ri(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function ni(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function ii(e,t,...r){let n=ri(e);return t&&(out=hs(e,t,...r),n=n+"@"+out),n}function li(e,t,...r){let n=ni(e);return t&&(out=hs(e,t,...r),n=n+"@"+out),n}function ds(e,t,r,n,i,...l){let _=r.$sdfs(),c=n.$sdfs();if(_.length!==c.length)return!1;{let o=_.map(h=>t(h,i,...l)),a=c.map(h=>t(h,i,...l));e&&(o.sort(),a.sort());for(let h=0;h<o.length;h++){let m=o[h],v=a[h];if(m!==v)return!1}}return!0}function aa(e,t,r,...n){return ds(!1,li,e,t,r,...n)}function ua(e,t,r,...n){return ds(!0,ii,e,t,r,...n)}_i.exports={SDFS_NEXT_BUILD_ACTION_DICT:Zn,build_from_srch_action_list:na,SDFS_NEXT_SRCH_ACTIONS:ea,RESERVED_EVENT_TYPES:["$msg__"],Node:O,Tree:V,Root:V,load:si,load_from_nest_dict:ca,clone:oa,get_cu_sign:hs,get_internal_sign_ignore_order:ri,get_internal_sign_keep_order:ni,get_sign_keep_order:li,struct_eq:ds,struct_eq_keep_order:aa,get_sign_ignore_order:ii,struct_eq_ignore_order:ua}});var ps=u((Bf,oi)=>{var fa=ci(),ha=ls(),da=Xt();oi.exports={ndfunc:ha,ndcls:fa,ndutil:da}});var Tt=u((Wf,ui)=>{var C=x(),pa=ps(),{Root:ga}=ps().ndcls,{TYPE_DICT:Yf,isNode:Ff,empty:p,is_bigint_str:Mf,is_jsint_str:Gf,NUM_TYPE_DICT:Hf,parse_abnormal_num:zf,parse_int:Xf,parse_float:Jf,parse_num:ma,to_str:xt}=x(),P=class extends ga{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()}},gs=class extends P{constructor(t=p){super(t),this.value=void 0,this.type=C.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return xt(this.value)}},ms=class extends P{constructor(t=p){super(t),this.value=null,this.type=C.TYPE_DICT.NullLiteral}vto_rawstr(){return xt(this.value)}},bs=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 xt(this.value)}},ys=class extends P{constructor(t,r=p){if(super(r),typeof t=="string"){let n=ma(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=xt(this.value);return this.type===C.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Ke(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var $s=class extends P{constructor(t,r=p){super(r),this.value=t,this.type=C.TYPE_DICT.StringLiteral}vto_rawstr(){return Ke(this.value)}};function ba(e){e instanceof wt?e.type=C.TYPE_DICT.CommentLine.tt:e.type=C.TYPE_DICT.CommentBlock.tt}function ya(e,t){return{lsib:e.$lsib(),data:t}}function ai(e,t){ba(t);let r=ya(e,t);return e.ttcmt.push(r),r}var vs=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 ai(this,t)}},ks=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 ai(this,t)}},ws=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'&"'+Ke(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Ke(t)+'"'}},wt=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
|
|
5
|
+
`){return"//"+Ke(this.value)+t}},xs=class extends P{constructor(t){super(),this.value=t,this.type=C.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Ke(this.value)+"*/"}};ui.exports={UndefinedLiteral:gs,NullLiteral:ms,BooleanLiteral:bs,NumericLiteral:ys,StringLiteral:$s,ArrayExpression:vs,ObjectExpression:ks,_Ref:ws,CommentLine:wt,CommentBlock:xs,_ndtree:pa}});var bi=u((Uf,mi)=>{var{empty:Es}=x(),{UndefinedLiteral:fi,NullLiteral:hi,BooleanLiteral:di,NumericLiteral:pi,StringLiteral:Ts,ArrayExpression:$a,ObjectExpression:va,CommentLine:ka,CommentBlock:wa,_Ref:Ss}=Tt();function xa(e,t){let r=Es,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:Es}function gi(e,t){return e instanceof fi?new fi("undefined",t):e instanceof hi?new hi("null",t):e instanceof di?new di(e.vto_rawstr(),t):e instanceof pi?new pi(e.vto_rawstr(),t):e instanceof Ts?new Ts(e.value,t):e instanceof ka||e instanceof wa?new Ts(e.value,t):e instanceof $a?new Ss(e,t):e instanceof va?new Ss(e,t):e instanceof Ss?(e=e.value,gi(e,t)):Es}mi.exports={find_refnd_with_hash:xa,clone:gi}});var Ai=u((Vf,ye)=>{var Ta=Array,Sa=x(),{empty:$,parse0:Ea}=x(),et=class extends Ta{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*Ca(e){for(let t of e)yield t;e=null}function*qa(e,t){yield*t,yield*e}var tt=zt(),Cs=xe(),Ae=Qr(),{UndefinedLiteral:Aa,NullLiteral:Ia,BooleanLiteral:yi,NumericLiteral:Da,StringLiteral:$i,CommentLine:Ze,CommentBlock:Na,ArrayExpression:qs,ObjectExpression:Oa}=Tt(),X=I(),vi=X.gtv,le=X.STATE_DICT,As=X.LEFTED_TYPE,qe=X.AVND_CACHE_STATE_DICT,z=x(),y=te(),ki=bi();function*Ci(e){for(;e.length>0;)yield e.pop()}function wi(e){let t;return e.__is_sync_mode()?t=tt.from_generator(e.g,e.ch_cache.curr):t=tt.from_generator(Ci(e.unshift_cache),e.ch_cache.curr),t}function xi(e,t,r){e.lefted.type=As.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=X.get_main_eofv_with_code(e.state)}function qi(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function Pa(e,t,r){return qi(e,t,r),e.state=X.get_lcmt_eofv_with_code(e.state),e}function La(e,t,r){return qi(e,t,r),e.state=X.get_blkcmt_eofv_with_code(e.state),e}function Ra(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(Ci(e.unshift_cache),e.ch_cache.curr),r}function Ti(e,t,r,n){let i=Ra(e,r);return i.state!==Ae.STATE_DICT.succ?((t===Ze?Pa:La)(e,i,n),$):new t(i.rslt)}function Si(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===qs?e.state=le.bv:e.state=le.bk,e}var Is=Symbol("root_lblk_ch"),Ei=Symbol("root_rblk_ch"),Ie=class{#t=vi(le.bv);#e=new et;constructor(t,r=" "){if(r!==$){let i=Ca(r);t=qa(t,i)}this.g=t,this.lefted={type:$,data:$},this.ch_cache={tmp:$,curr:$},this.str_cache={k:$,v:$,maybe_vquote:$},this.cmt_cache={kcmt:[],bvcmt:[],avcmt:[]};let n=new qs;this.stack.push(n),n.open=Is,this.avnd_cache={state:qe.handling,data:n},this.unshift_cache=new et,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===qe.handled}$set_yield_sign(){this.avnd_cache.state=qe.handled}$clear_yield_sign(){this.avnd_cache.state=qe.handling}get state(){return this.#t}set state(t){this.#t=vi(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=X.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return y.commas.has(this.ch_cache.curr)}$is_currch_colon(){return y.colons.has(this.ch_cache.curr)}$is_currch_ws(){return Cs.is_ws(this.ch_cache.curr)}$is_currch_quote(){return y.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===y.slash}$is_currch_asterisk(){return this.ch_cache.curr===y.asterisk}$is_currch_ary_lblk(){return y.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return y.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 y.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return y.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 y.hash===this.ch_cache.curr}$is_currch_ref(){return y.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=$,r=$){return this.stack.lst.is_ary()?t===$?this.state=le.bv:(this.state=le.v,this.str_cache.v=t,r===$||(this.str_cache.maybe_vquote=r)):t===$?this.state=le.bk:(this.state=le.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===$){let n=Ea(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===z.TYPE_DICT.UndefinedLiteral?r=new Aa(this.str_cache.k):n.type===z.TYPE_DICT.NullLiteral?r=new Ia(this.str_cache.k):n.type===z.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new yi("true",this.str_cache.k):n.type===z.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new yi("false",this.str_cache.k):n.type===z.TYPE_DICT.StringLiteral?r=new $i(n.value,this.str_cache.k):r=new Da(n,this.str_cache.k)}else r=new $i(t,this.str_cache.k);return this.str_cache.v=$,this.str_cache.maybe_vquote=$,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=$,t.key}$set_avnd_cache(t,r=qe.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,qe.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=wi(this);return r.state!==tt.STATE_DICT.succ?(xi(this,r,t),$):r.rslt}$abandon_key_when_end_bv(){this.cmt_cache.kcmt=[],this.cmt_cache.bvcmt=[],this.str_cache.k=$}$refresh_key(t=$){t===$?this.str_cache.k=this.ch_cache.curr:this.str_cache.k=t,this.cmt_cache.kcmt=[]}$handle_lcmt(){return Ti(this,Ze,Ae.lc_from_generator,As.lcmt)}$handle_blkcmt(){return Ti(this,Na,Ae.blk_from_generator,As.blkcmt)}$push_kcmt(t){t.type=Ae instanceof Ze?z.TYPE_DICT.CommentLine.k:z.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Ze?"CommentLine":"CommentBlock";t.type=z.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ae instanceof Ze?z.TYPE_DICT.CommentLine.k:z.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(y.array_blks.lhas(this.ch_cache.curr))return Si(this,qs);if(y.obj_blks.lhas(this.ch_cache.curr))return Si(this,Oa)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return y[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=le.av}$get_hash_or_ref(t="#"){let r=$,n=this.$next_ch(),i="";for(;!Cs.is_ws(n)&&!y.commas.has(n)&&!y.colons.has(n)&&!y.array_blks.has(n)&&!y.obj_blks.has(n)&&n!==y.hash&&n!==y.ref&&n!==y.slash;)if(y.quotes.has(n)){let l=wi(this);if(l.state!==tt.STATE_DICT.succ)return xi(this,l,this.ch_cache.curr),t===y.hash?this.state=X.get_hash_quote_eofv_with_code(this.state):this.state=X.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),ki.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=ki.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)}};Ie[Is]=Is;Ie[Ei]=Ei;Ie.MODES=["sync","async"];ye.exports=Ie;ye.exports.Stack=et;ye.exports._type_util=Sa;ye.exports._esc=tt;ye.exports._cmt=Ae;ye.exports._ws=Cs});var Oi=u((Qf,Ni)=>{var{empty:Ii}=x(),Di=I(),De=Di.gtv,J=Di.STATE_DICT;function ja(e){let t=e.state;return t===De(J.bk)||(t===De(J.k)||t===De(J.ak)?(e.str_cache.k=Ii,e.state=J.bk):t===De(J.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=J.bv:e.state=J.bk):t===De(J.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===De(J.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}Ni.exports=ja});var Ri=u((Zf,Li)=>{var{empty:Kf}=x(),Pi=I(),Ne=Pi.gtv,_e=Pi.STATE_DICT;function Ba(e){let t=e.state;return t===Ne(_e.bk)||(t===Ne(_e.k)||t===Ne(_e.ak)?e.state=_e.bv:t===Ne(_e.bv)||(t===Ne(_e.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ne(_e.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Li.exports=Ba});var Ds=u((th,Bi)=>{var{empty:eh}=x(),ji=I(),Oe=ji.gtv,ce=ji.STATE_DICT;function Ya(e){let t=e.state;return t===Oe(ce.bk)||(t===Oe(ce.k)?e.state=ce.ak:t===Oe(ce.ak)||t===Oe(ce.bv)||(t===Oe(ce.v)?(e.$setup_leafnd(),e.state=ce.av):Oe(ce.av))),e}Bi.exports=Ya});var Gi=u((sh,Mi)=>{var{empty:Yi}=x(),Fi=I(),Pe=Fi.gtv,Q=Fi.STATE_DICT;function Fa(e,t){let r=e.state,n=e.$handle_quote(t);return n===Yi||(r===Pe(Q.bk)?(e.str_cache.k=n,e.state=Q.k):r===Pe(Q.k)?e.str_cache.k=e.str_cache.k+n:r===Pe(Q.ak)?(e.$refresh_key(n),e.state=Q.k):r===Pe(Q.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=Q.v):r===Pe(Q.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=Yi):r===Pe(Q.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Mi.exports=Fa});var Ji=u((rh,Xi)=>{var{empty:Hi}=x(),Ns=I(),L=Ns.gtv,S=Ns.STATE_DICT,Ma=Ns.LEFTED_TYPE,$e=te();function zi(e,t){let r=e.state,n=e[t]();if(n!==Hi){let i=e.stack.lst;if(r===L(S.bk))i.append_ttcmt(n);else if(r===L(S.k))e.$push_kcmt(n),e.state=S.ak;else if(r===L(S.ak))e.$push_kcmt(n);else if(r===L(S.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===L(S.v))e.$setup_leafnd(),e.state=S.av;else if(r===L(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 Ga(e){return zi(e,"$handle_lcmt")}function Ha(e){return zi(e,"$handle_blkcmt")}function za(e){let t=e.state;t===L(S.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=$e.slash,e.state=S.k):t===L(S.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+$e.slash):t===L(S.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key($e.slash),e.state=S.k):t===L(S.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=$e.slash,e.state=S.v):t===L(S.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+$e.slash,e.str_cache.maybe_vquote=Hi):t===L(S.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av($e.slash))}function Xa(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=$e.slash,e.lefted.type=Ma.backslash,e.$handle_main_eof()):e.$is_currch_slash()?Ga(e):e.$is_currch_asterisk()?Ha(e):za(e),e}Xi.exports=Xa});var Vi=u((ih,Ui)=>{var{empty:nh}=x(),Wi=I(),Le=Wi.gtv,oe=Wi.STATE_DICT;function Ja(e){let t=e.state;return t===Le(oe.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=oe.k):t===Le(oe.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Le(oe.ak)?(e.$refresh_key(),e.state=oe.k):t===Le(oe.bv)?e.$open_nonleaf_nd():t===Le(oe.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Le(oe.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Ui.exports=Ja});var el=u((lh,Zi)=>{var{empty:Qi}=x(),Ki=I(),Re=Ki.gtv,ve=Ki.STATE_DICT,Wa=Ds();function Ua(e){let t=e.state;return t===Re(ve.bk)?e.$close_nonleaf_nd():t===Re(ve.k)?(e.str_cache.k=Qi,e.$close_nonleaf_nd()):t===Re(ve.ak)?(e.$refresh_key(),e.str_cache.k=Qi,e.$close_nonleaf_nd()):t===Re(ve.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Re(ve.v)?(e.$setup_leafnd(),e.state=ve.av,e.__unshift_g(e.ch_cache.curr)):t===Re(ve.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 Va(e){return e.$is_rblk_match()?Ua(e):Wa(e),e}Zi.exports=Va});var nl=u((_h,rl)=>{var{empty:Qa}=x(),sl=I(),je=sl.gtv,ae=sl.STATE_DICT,Ka=te(),{CommentLine:tl}=Tt();function Za(e){let t=e.state,r=e.$get_hash_or_ref(Ka.hash);if(r!==Qa){let n=e.stack.lst;if(t===je(ae.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===je(ae.k)){let i=new tl(r);e.$push_kcmt(i),e.state=ae.ak}else if(t===je(ae.ak)){let i=new tl(r);e.$push_kcmt(i)}else t===je(ae.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===je(ae.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ae.av):t===je(ae.av)&&e.avnd_cache.data.hashes.add(r)}return e}rl.exports=Za});var _l=u((ch,ll)=>{var{empty:Os}=x(),il=I(),Be=il.gtv,D=il.STATE_DICT,eu=te();function tu(e){let t=e.state,r=e.$get_hash_or_ref(eu.ref);if(r!==Os){let n=e.$find_ref(r);if(n!==Os){let i=e.stack.lst;t===Be(D.bk)||t===Be(D.k)||t===Be(D.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=D.ak):t===Be(D.bv)?(e.$add_ref_to_parent(n),e.state=D.av):t===Be(D.v)?(e.str_cache.maybe_vquote=Os,e.$setup_leafnd(),e.state=D.av):t===Be(D.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=D.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=D.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}ll.exports=tu});var al=u((oh,ol)=>{var{empty:su}=x(),cl=I(),Ye=cl.gtv,K=cl.STATE_DICT;function ru(e){let t=e.state;return t===Ye(K.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=K.k):t===Ye(K.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Ye(K.ak)?(e.$refresh_key(),e.state=K.k):t===Ye(K.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=K.v):t===Ye(K.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=su):t===Ye(K.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}ol.exports=ru});var pl=u((ah,dl)=>{var{empty:nu}=x(),iu=Ai(),lu=Oi(),_u=Ri(),cu=Ds(),ou=Gi(),au=Ji(),uu=Vi(),fu=el(),hu=nl(),du=_l(),pu=al(),hl=I(),ul=hl.gtv,fl=hl.STATE_DICT,gu=te();function*mu(e,t=nu){let r=new iu(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(lu(r),yield r):r.$is_currch_colon()?(_u(r),yield r):r.$is_currch_ws()?(cu(r),yield r):r.$is_currch_quote()?(ou(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(au(r),yield r):r.$is_currch_lblk()?(uu(r),yield r):r.$is_currch_rblk()?(fu(r),yield r):r.$is_currch_hash()?(hu(r),yield r):r.$is_currch_ref()?r.state===ul(fl.av)||r.state===ul(fl.v)?r.__unshift_g(gu.fst_comma+r.ch_cache.curr):(du(r),yield r):(pu(r),yield r)}dl.exports=mu});var $l=u((uh,yl)=>{var{sync_gen_from_str:Ps,sync_gen_from_file:ml,async_gen_chunk_from_file:bu}=Cr(),{is_should_yield:Ls}=I(),j=te(),{is_nl:yu,is_ws:gl}=xe(),Rs=pl(),$u={enable_ref:!1,encoding:"utf8"};function js(e,t={enable_ref:!1}){let r=Rs(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let _ of r){let c=_.state;if(Ls(n,l,c)&&!t.enable_ref){let o=n.avnd_cache.data;o.$disconn(),o=null}l=c}return i}function vu(e,t={enable_ref:!1}){let r=Ps(e);return js(r,t)}function ku(e,t={enable_ref:!1,encoding:"utf8"}){let r=ml(e,t.encoding);return js(r,t)}function*Bs(e,t={enable_ref:!1,encoding:"utf8"}){let r=Rs(e),n=r.next().value,i=n.state;for(let l of r){let _=l.state;if(Ls(n,i,_)&&!t.enable_ref){let c=n.avnd_cache.data;yield c,c.$disconn(),c=null}i=_}}function*wu(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ps(e);yield*Bs(r,t)}function*xu(e,t={enable_ref:!1,encoding:"utf8"}){let r=ml(e,t.encoding);yield*Bs(r,t)}function Tu(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function Su(e){let t=Ps(""),r=Rs(t," "),n=r.next().value;n.__use_async_mode();let i=Tu();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function Eu(e,t){return e.data=e.data+t,e.state==="init"?t===j.slash?e.state="slash":j.quotes.has(t)?(e.label=t,e.state="quote"):t===j.hash?e.state="hash":t===j.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===j.slash?e.state="lcmt":t===j.asterisk?e.state="blkcmt":j.quotes.has(t)?(e.label=t,e.state="quote"):e.can_send=!0:e.state==="lcmt"?t==="\\"?(e.state="esc",e.pstate="lcmt"):yu(t)&&(e.can_send=!0):e.state==="blkcmt"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===j.asterisk&&(e.state="asterisk"):e.state==="asterisk"?t==="\\"?(e.state="esc",e.pstate="blkcmt"):t===j.slash&&(e.can_send=!0):e.state==="hash"?gl(t)?e.can_send=!0:j.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?gl(t)?e.can_send=!0:j.quotes.has(t)&&(e.state="quote",e.pstate="ref"):e.state==="esc"?(e.state=e.pstate,e.pstate=""):console.log("impossible"),e}async function*Cu(e,t){for(let r of e)Eu(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*qu(e){let t=Su(e);for await(let r of e)yield*Cu(r,t);yield t}function Au(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*Iu(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,Ls(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*bl(e,t={enable_ref:!1,encoding:"utf8"}){e=qu(e);let r;for await(r of e)Au(r),yield*Iu(r,t);yield r.rt}async function*Du(e,t={enable_ref:!1,encoding:"utf8"}){let r=bu(e,t.encoding,1024);yield*bl(r,t)}yl.exports={OPT_DICT:$u,parse_from_generator:js,parse_from_str:vu,parse_from_file:ku,gen_from_generator:Bs,gen_from_str:wu,gen_from_file:xu,agen_from_generator:bl,agen_from_file:Du}});var St=u((fh,rt)=>{var{empty:Nu}=x(),Ou=te(),st=$l();function Ys(e){return e.length===1?e[0]:e}function Pu(){for(let e in st){let t;e.startsWith("gen_")?t=function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for(let l of i)l=Ys(l),yield[l.key,l.value]}:e.startsWith("agen_")?t=async function*(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n);for await(let l of i)l=Ys(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n).value;return Ys(i)},Object.defineProperty(t,"name",{value:e}),rt.exports[e]=t}rt.exports.OPT_DICT=st.OPT_DICT}Pu();rt.exports.CFG=Ou;rt.exports.empty=Nu});var Et=u((hh,vl)=>{var Lu=St(),Ru=(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("")},ju=e=>e.replace(/-/g,"_"),Bu=(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,Yu=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},Fu=e=>Lu.parse_from_str(e+" ");vl.exports={dash_to_camel:Ru,dash_to_snake:ju,attr_value_to_bool:Bu,css_str_to_num:Yu,parse_json_input:Fu}});var xl=u((dh,wl)=>{var{dash_to_camel:Ct}=Et(),kl=(e,t,r=!1)=>{let n=Ct(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}})},Mu=(e,t)=>{for(let r of t)kl(e,r,!1)},Gu=e=>{for(let t in DYN_CLSES){{let n="all"+Ct(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=Ct(n,!0),l="get"+Ct(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})}}};wl.exports={add_one_fixed_element_getter:kl,add_fixed_element_getters:Mu,add_dyn_element_getters:Gu}});var Sl=u((ph,Tl)=>{var Hu=St(),{dash_to_snake:zu,css_str_to_num:Xu}=Et(),Ju=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=zu(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 Xu(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?Hu.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)}}))}};Tl.exports={add_attr_accessors_to_cls:Ju}});var Il=u((gh,Al)=>{var El={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},Wu=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: ${El[e]||El.info};
|
|
12
12
|
color: white;
|
|
13
13
|
padding: 12px 20px;
|
|
14
14
|
border-radius: 8px;
|
|
@@ -20,10 +20,20 @@ var nvbasicbw=(()=>{var Ll=(e=>typeof require<"u"?require:typeof Proxy<"u"?new P
|
|
|
20
20
|
align-items: center;
|
|
21
21
|
justify-content: center;
|
|
22
22
|
font-size: 16px; /* \u5B57\u4F53\u53D8\u5927 */
|
|
23
|
-
`,
|
|
23
|
+
`,Uu=(e,t)=>{let r=document.createElement("div");return r.style.cssText=Wu(e),r.textContent=t,document.body.appendChild(r),r},qt=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=Uu(n,r),_.duration_timer=setTimeout(()=>{this.del(t)},i)},l)}},Cl=()=>new qt,ql=Cl(),Vu=(e,t,r="error",n=1e3,i=100)=>{ql.add(e,t,r,n,i)},Qu=e=>{ql.del(e)},Ku=async(e,t=async(n,i)=>{console.log(n)},r=99999)=>{let n=`${Date.now()}_${Math.floor(Math.random()*1e4)}`,i=`confirm-overlay-${n}`,l=`confirm-dialog-${n}`,_=document.createElement("div");_.className=i,Object.assign(_.style,{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:String(r)});let c=document.createElement("div");c.className=l,Object.assign(c.style,{backgroundColor:"white",borderRadius:"8px",padding:"20px",width:"300px",boxShadow:"0 5px 15px rgba(0, 0, 0, 0.3)",fontFamily:"Arial, sans-serif"});let o=document.createElement("h3");o.textContent=e,o.style.margin="0 0 20px 0",o.style.color="#333",o.style.fontSize="18px";let a=document.createElement("div");a.style.display="flex",a.style.justifyContent="flex-end",a.style.gap="10px";let h=document.createElement("button");h.textContent="\u53D6\u6D88",Object.assign(h.style,{padding:"8px 16px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let m=document.createElement("button");m.textContent="\u786E\u8BA4",Object.assign(m.style,{padding:"8px 16px",backgroundColor:"#3498db",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let v=async A=>{try{await t(A,c)}catch(B){console.error("Dialog callback error:",B)}finally{c.remove(),_.remove()}};return h.addEventListener("click",()=>v(!1)),m.addEventListener("click",()=>v(!0)),_.addEventListener("click",A=>{A.target===_&&v(!1)}),a.appendChild(h),a.appendChild(m),c.appendChild(o),c.appendChild(a),_.appendChild(c),document.body.appendChild(_),c};Al.exports={SimpleAlert:qt,creat_simple_alert:Cl,simple_alert:Vu,cancel_simple_alert:Qu,simple_confirm_cancel:Ku}});var Nl=u((mh,Dl)=>{var Fs=class{css=`
|
|
24
|
+
position: fixed;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
visibility: hidden;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
border: none;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
`;is_ok(t,r,n){return t.style[r]=`${n}px`,t.getBoundingClientRect()[r]===n}find_upbound(t,r){let n=1;for(;this.is_ok(t,r,n);)n*=2;return n}mx(t,r){t.style.cssText=this.css,document.body.appendChild(t);let n=this.find_upbound(t,r),i=Math.floor(n/2);for(;i+1<n;){let l=Math.floor((i+n)/2);this.is_ok(t,r,l)?i=l:n=l}return document.body.removeChild(t),i}},At=()=>{let e=document.createElement("div"),t=new Fs,r=t.mx(e,"width"),n=t.mx(e,"height");return[r,n]},Zu=(e,t)=>{let[r,n]=At(),i=document.createElement(e);return i.style.width=`${r}px`,i.style.height=`${t}px`,i},ef=(e,t)=>{let[r,n]=At(),i=document.createElement(e);return i.style.width=`${t}px`,i.style.height=`${n}px`,i},tf=e=>{let[t,r]=At(),n=document.createElement(e);return n.style.width=`${t}px`,n.style.height=`${r}px`,n};Dl.exports={find_mx_wh:At,creat_mxw_ele:Zu,creat_mxh_ele:ef,creat_mxwh_ele:tf}});var wf=u((yh,jl)=>{var Z=e=>e.constructor.name==="AsyncFunction",sf=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},rf=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},nf=e=>{for(;e.parentNode;)e=e.parentNode;return e},W=e=>e.firstChild!==null&&e.firstChild!==void 0,It=(e,t=W)=>{let r=0;for(;!t(e);)e=e.lastChild,++r;return[e,r]},Dt=(e,t=W)=>{let r=0;for(;!t(e);)e=e.firstChild,++r;return[e,r]},Ol=(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]},ke=async(e,t=(n,i)=>{},r=W)=>{let[n,i]=It(e,r),l=e,_=Z(t),c=0;for(;;){let o=!1;if(_?o=await t(l,c):o=t(l,c),o||l===n)return;if(!r(l))++c,l=l.firstChild;else{let a=Ol(l,c);if(l=a[0],l)c=a[1];else break}}},Pl=(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]},lf=async(e,t=(n,i)=>{},r=W)=>{let[n,i]=Dt(e,r),l=e,_=Z(t),c=0;for(;;){let o=!1;if(_?o=await t(l,c):o=t(l,c),o||l===n)return;if(!r(l))++c,l=l.lastChild;else{let a=Pl(l,c);if(l=a[0],l)c=a[1];else break}}},_f=async(e,t=(n,i)=>{},r=W)=>{let[n,i]=Dt(e,r),l=Z(t);for(;;){let _=!1;if(l?_=await t(n,i):_=t(n,i),_||n===e)return;{let c=n.nextSibling;if(c){let o=Dt(c,r);i+=o[1],n=o[0]}else{let o=n.parentNode;if(o)--i,n=o;else break}}}},cf=async(e,t=(n,i)=>{},r=W)=>{let[n,i]=It(e,r),l=Z(t);for(;;){let _=!1;if(l?_=await t(n,i):_=t(n,i),_||n===e)return;{let c=n.prevSibling;if(c){let o=It(c,r);i+=o[1],n=o[0]}else{let o=n.parentNode;if(o)--i,n=o;else break}}}},g=async(e,t=(i,l)=>{},r=(i,l)=>{},n=W)=>{let i=e,l="open",_={open:[r,Z(r)],clos:[t,Z(t)]},c=0;for(;;){let o=!1,[a,h]=_[l];if(l==="open"){if(h?o=await a(i,c):o=a(i,c),o)return;n(i)?l="clos":(i=i.firstChild,++c)}else{let m,v,A,B=i.nextSibling;if(B?(A="open",m=B,v=c):(A="clos",m=i.parentNode,v=c-1),h?o=await a(i,c):o=a(i,c),o)return;if(i!==e)l=A,i=m,c=v;else break}}},of=async(e,t=(i,l)=>{},r=(i,l)=>{},n=W)=>{let i=e,l="open",_={open:[r,Z(r)],clos:[t,Z(t)]},c=0;for(;;){let o=!1,[a,h]=_[l];if(l==="open"){if(h?o=await a(i,c):o=a(i,c),o)return;n(i)?l="clos":(i=i.lastChild,++c)}else{let m,v,A,B=i.prevSibling;if(B?(A="open",m=B,v=c):(A="clos",m=i.parentNode,v=c-1),h?o=await a(i,c):o=a(i,c),o)return;if(i!==e)l=A,i=m,c=v;else break}}},af=async(e,t,r=W)=>{if(typeof t=="string"){let n=[];return await ke(e,async(i,l)=>{(i.tagName?i.tagName.toLowerCase()===t.toLowerCase():!1)&&n.push(i)},r),n}else{let n=[];return Z(t)?await ke(e,async(i,l)=>{await t(i,l)&&n.push(i)},r):await ke(e,async(i,l)=>{t(i,l)&&n.push(i)},r),n}},uf=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
34
|
${(await Promise.all(t)).filter(i=>i).join(`
|
|
25
35
|
|
|
26
36
|
`)}
|
|
27
|
-
<\/script>`},
|
|
37
|
+
<\/script>`},ff=async()=>{let e="";for(let t of document.querySelectorAll('link[rel="stylesheet"]'))if(t.href)try{e+=await(await fetch(t.href)).text()+`
|
|
28
38
|
`}catch{}for(let t of document.querySelectorAll("style"))e+=t.outerHtml+`
|
|
29
|
-
`;return e};g.rvisit=
|
|
39
|
+
`;return e};g.rvisit=of;g.get_depth=sf;g.get_ance=rf;g.get_rt=nf;g.is_topo_leaf=W;g.get_dlmost=Dt;g.get_drmost=It;g.find_rb_of_fst_ance_has_rb=Ol;g.find_lb_of_fst_ance_has_lb=Pl;g.editonly_sdfs_for_each=ke;g.editonly_rsdfs_for_each=lf;g.editonly_edfs_for_each=_f;g.editonly_redfs_for_each=cf;g.filter=af;g.get_all_csses=ff;g.get_all_scripts=uf;var{wait_for_layout_ready:Ms}=Nt(),Ll=()=>({x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0}),Gs=async e=>{let t=Ll(),r=e.style.transform;e.style.transform="none",await Ms();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},hf=async(e,t=r=>!0)=>{let r=[];return await ke(e,async n=>{if(t(n)){let i=await Gs(n);r.push({el:n,rect:i})}}),r},df=async(e,t=r=>!0)=>{let r=[];return await ke(e,async n=>{if(t(n)){await Ms();let i=n.getBoundingClientRect();r.push({el:n,rect:i})}}),r},pf=async(e,t=r=>!0)=>{let r=[];return await ke(e,async n=>{if(t(n)){let i=await Gs(n);await Ms();let 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=Ll;g.get_rect_desc_bfr_transfrom=Gs;g.get_all_positions_bfr_transform=hf;g.get_all_positions_aft_transform=df;g.get_all_positions_transform_diff=pf;var Rl=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),gf=(e,t)=>{let r=!1;for(let n of t){let i=n.getBoundingClientRect();if(Rl(i,e.getBoundingClientRect())){r=!0;break}}return r};g.is_rect_overlapping=Rl;g.is_ele_overlapping_with_eles=gf;var mf=Et(),bf=Nt(),yf=xl(),$f=Sl(),vf=Il(),kf=Nl();g._attr=mf;g._wait=bf;g._ele_getter=yf;g._cls_accessor=$f;g._ui=vf;g._limit=kf;var bh=St();jl.exports=g});return wf();})();
|
package/index.js
CHANGED
|
@@ -556,12 +556,14 @@ const _wait = require("./wait");
|
|
|
556
556
|
const _ele_getter = require("./ele-getter");
|
|
557
557
|
const _cls_accessor = require("./cls-accessor");
|
|
558
558
|
const _ui = require("./ui");
|
|
559
|
+
const _limit = require("./limit");
|
|
559
560
|
|
|
560
561
|
visit._attr = _attr;
|
|
561
562
|
visit._wait = _wait;
|
|
562
563
|
visit._ele_getter = _ele_getter;
|
|
563
564
|
visit._cls_accessor = _cls_accessor;
|
|
564
565
|
visit._ui = _ui;
|
|
566
|
+
visit._limit = _limit;
|
|
565
567
|
|
|
566
568
|
const _nvison = require("nvison");
|
|
567
569
|
|
package/limit.js
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
class MxWhCtx {
|
|
2
|
+
css = `
|
|
3
|
+
position: fixed;
|
|
4
|
+
top: 0;
|
|
5
|
+
left: 0;
|
|
6
|
+
visibility: hidden;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
border: none;
|
|
10
|
+
margin: 0;
|
|
11
|
+
padding: 0;
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
is_ok(ele, dimension, val) {
|
|
15
|
+
ele.style[dimension] = `${val}px`;
|
|
16
|
+
const rect = ele.getBoundingClientRect();
|
|
17
|
+
return rect[dimension] === val;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
find_upbound(ele, dimension) {
|
|
21
|
+
let upper = 1;
|
|
22
|
+
while(true) {
|
|
23
|
+
if(this.is_ok(ele, dimension, upper)) {
|
|
24
|
+
upper *= 2;
|
|
25
|
+
} else {
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return upper;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
mx(ele, dimension) {
|
|
33
|
+
ele.style.cssText = this.css;
|
|
34
|
+
document.body.appendChild(ele);
|
|
35
|
+
|
|
36
|
+
// 找到上界
|
|
37
|
+
let upper = this.find_upbound(ele, dimension);
|
|
38
|
+
let lower = Math.floor(upper / 2);
|
|
39
|
+
|
|
40
|
+
// 二分法查找精确的最大值
|
|
41
|
+
while (lower + 1 < upper) {
|
|
42
|
+
const mid = Math.floor((lower + upper) / 2);
|
|
43
|
+
if (this.is_ok(ele, dimension, mid)) {
|
|
44
|
+
lower = mid; // 成功,向右搜索
|
|
45
|
+
} else {
|
|
46
|
+
upper = mid; // 失败,向左搜索
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
document.body.removeChild(ele);
|
|
51
|
+
return lower;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// 主函数
|
|
56
|
+
const find_mx_wh = () => {
|
|
57
|
+
let ele = document.createElement('div');
|
|
58
|
+
let ctx = new MxWhCtx();
|
|
59
|
+
let w = ctx.mx(ele, "width");
|
|
60
|
+
let h = ctx.mx(ele, "height");
|
|
61
|
+
return [w, h];
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
const creat_mxw_ele = (tag,height)=>{
|
|
66
|
+
let [w,h] = find_mx_wh();
|
|
67
|
+
let ele = document.createElement(tag);
|
|
68
|
+
ele.style.width = `${w}px`;
|
|
69
|
+
ele.style.height = `${height}px`;
|
|
70
|
+
return ele;
|
|
71
|
+
}
|
|
72
|
+
const creat_mxh_ele = (tag,width)=>{
|
|
73
|
+
let [w,h] = find_mx_wh();
|
|
74
|
+
let ele = document.createElement(tag);
|
|
75
|
+
ele.style.width = `${width}px`;
|
|
76
|
+
ele.style.height = `${h}px`;
|
|
77
|
+
return ele;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
const creat_mxwh_ele = (tag)=>{
|
|
81
|
+
let [w,h] = find_mx_wh();
|
|
82
|
+
let ele = document.createElement(tag);
|
|
83
|
+
ele.style.width = `${w}px`;
|
|
84
|
+
ele.style.height = `${h}px`;
|
|
85
|
+
return ele;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
module.exports = {
|
|
89
|
+
find_mx_wh,
|
|
90
|
+
creat_mxw_ele,
|
|
91
|
+
creat_mxh_ele,
|
|
92
|
+
creat_mxwh_ele
|
|
93
|
+
}
|