nv-basic-bw 1.0.21 → 1.0.23

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.
@@ -1,8 +1,8 @@
1
- var nvbasicbw=(()=>{var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var x=h((Nh,hr)=>{var pa=Symbol("empty"),We=Symbol("unknown"),rr=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,nr=/^[\-\+]?[0-9]+$/,ir=/^\+?[0-9]+$/,ga=/^[\-\+]?0[bB][0-1]+$/,ma=/^[\-\+]?0[oO][0-7]+$/,lr=/^[\-\+]?0[xX][0-9a-fA-F]+$/,ba=e=>nr.test(e)||lr.test(e),er={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},ya=/^[\-\+]?[0-9]+n$/,wa=/^[\-\+]?0[bB][0-1]+n$/,$a=/^[\-\+]?0[oO][0-7]+n$/,va=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,ar=e=>ya.test(e)||wa.test(e)||$a.test(e)||va.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"},cr=(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},ka=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=er[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=er[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},or=e=>{let t=Array.from(e);if(nr.test(e))return parseInt(e);if(ga.test(e)||ma.test(e)||lr.test(e))return ka(t)},xa=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}},Sa=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Ta=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),tr=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Ea=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(ir.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},sr=(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(ir.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]},ur=e=>{let t=Ta(),r=Array.from(e);if(Sa(r,e))return;let n=0,i=!1;if([r,n]=tr(r,t,n,"be"),[i,n]=Ea(r,t,n,"be"),!i&&([i,n]=sr(r,t,n,"be"),!i&&([r,n]=tr(r,t,n,"ae"),[i,n]=sr(r,t,n,"ae"),!i)))return xa(t)},_r=(e,t=!1)=>{let r={value:void 0,type:void 0};if(ar(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=ue.BigInt;else{let n=or(e);n!==void 0?(r.value=n,r.type=ue.Integer):(n=ur(e),n!==void 0?(r.value=n,r.type=ue.Float):(n=cr(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},Ca=(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(rr()&&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},qa={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function fr(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(qa));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:a}=r,c={value:We,type:We};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=_r(e,!0);o.type===void 0?a?(c.value=e,c.type=Fe.StringLiteral):(c.value=e,c.type=We):(c.value=o.value,c.type=o.type)}return n?c.value:(l||delete c.type,i||delete c.value,c)}fr.unknown=We;var Na={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}};hr.exports={TYPE_DICT:Na,isNode:rr,empty:pa,unknown:We,is_bigint_str:ar,is_jsint_str:ba,NUM_TYPE_DICT:ue,parse_abnormal_num:cr,parse_int:or,parse_float:ur,parse_num:_r,parse0:fr,to_str:Ca}});var mr=h((Ah,gr)=>{var Ye={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 Aa(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Rt=Aa(Ye);function Ia(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Da=Ia(Ye),dr=e=>55296<=e&&e<=56319,La=e=>56320<=e&&e<=57343,Oa=(e,t)=>(e-55296)*1024+(t-56320)+65536,pr=e=>e<=65535,Ra=e=>!pr(e),Pa=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}},ja=(e,t)=>dr(e)?t+2:t+1;gr.exports={CODE_DICT:Ye,CH_DICT:Da,CODE_NAME_MP:Rt,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Rt.get(e),n2cd:e=>String.fromCharCode(Ye[e]),n2ch:e=>Ye[e],ch2n:e=>Rt.get(e.codePointAt(0)),is_high_code:dr,is_low_code:La,get_code_point_from_high_low:Oa,get_high_low_from_code_point:Pa,is_length1_code_point:pr,is_length2_code_point:Ra,_next_code_index:ja}});var ve=h((Ih,S)=>{var{CODE_DICT:d,CH_DICT:b}=mr(),br=/\r\n?|[\n\u2028\u2029]/;S.exports.line_break_regexp=br;S.exports.line_break_regexp_g=new RegExp(br.source,"g");function yr(e){switch(e){case d.lineFeed:case d.carriageReturn:case d.lineSeparator:case d.paragraphSeparator:return!0;default:return!1}}function wr(e){switch(e){case b.lineFeed:case b.carriageReturn:case b.lineSeparator:case b.paragraphSeparator:return!0;default:return!1}}var Pt=[d.lineFeed,d.carriageReturn,d.lineSeparator,d.paragraphSeparator],$r=Pt.map(e=>String.fromCharCode(e));S.exports.NL_CODE_ARR=Pt;S.exports.NL_CH_ARR=$r;S.exports.is_nl_code=yr;S.exports.is_nl=wr;S.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function vr(e){switch(e){case 9:case 11:case 12:case d.space:case d.nonBreakingSpace:case d.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}}S.exports.is_non_nl_ws_code=vr;function kr(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}}S.exports.is_non_nl_ws=kr;var jt=[d.tab,d.lineTab,d.formFeed,d.space,d.nonBreakingSpace,d.oghamSpaceMark,d.enQuad,d.emQuad,d.enSpace,d.emSpace,d.threePerEmSpace,d.fourPerEmSpace,d.sixPerEmSpace,d.figureSpace,d.punctuationSpace,d.thinSpace,d.hairSpace,d.narrowNoBreakSpace,d.mediumMathematicalSpace,d.ideographicSpace,d.zeroWidthNoBreakSpace];S.exports.NON_NL_WS_CODE_ARR=jt;var xr=jt.map(e=>String.fromCharCode(e));S.exports.NON_NL_WS_CH_ARR=xr;function Ba(e){return vr(e)||yr(e)}function $e(e){return kr(e)||wr(e)}S.exports.is_ws_code=Ba;S.exports.is_ws=$e;S.exports.WS_CHCODE_ARR=Pt.concat(jt);S.exports.WS_CH_ARR=$r.concat(xr);var Q={init:0,executing:1,succ:2,eof:3};S.exports.STATE_DICT=Q;function Ma(e,t=new Set){let r={g:e,rslt:"",state:Q.init},n=r.g.next().value;if(n===void 0)return r.state=Q.eof,r;for(;n!==void 0&&($e(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!$e(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=Q.eof:($e(n)||t.has(n))&&(r.state=Q.succ),r}function Fa(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:Q.init};for(let l=n.pos;l<e.length;l++){let a=e[l];if($e(a)||r.has(a))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let a=e[l];if(!$e(a)&&!r.has(a))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=Q.eof:n.state=Q.succ,n.rslt=e.slice(i,n.pos).join(""),n}S.exports.from_generator=Ma;S.exports.from_charr=Fa});var Z=h((Dh,Nr)=>{var{WS_CH_ARR:Sr,NON_NL_WS_CH_ARR:Wa,NL_CH_ARR:Ya}=ve();function Ha(e){return Array.from(e).length}var Ga="\u200C",Tr="\u200D",Ua=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Bt(e,t,...r){let n=function(){return t(this,...r)};Ua()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var B={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")},lt=Symbol("get_pair_lmp"),za=Symbol("add_pair_reserved"),He=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[lt](){return this.#e}get size(){return this.#e.size}[za](t,r){if(t===r)throw B.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 B.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw B.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw B.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 Va(e){return new Map(e[lt])}Bt(He,Va);var Er=Symbol("get_single_set"),Cr=Symbol("add_single_reserved"),ke=class{#t;#e=new Set;constructor(t){this.#t=t}get[Er](){return this.#e}[Cr](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw B.cant_be_empty;if(t==="`")throw B.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function Xa(e){return new Set(e[Er])}Bt(ke,Xa);var at=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 ke(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[Cr]("`"),this.#r=new ke(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 ke(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(Sr)}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[lt])t.add(r);for(let r of this.#e[lt])t.add(r)}return t}validate(t){if(typeof t!="string"||Ha(t)!==1)throw B.char;if(this.reserved.includes(t))throw B.reserved;if(Array.from(this.inuse).flat().includes(t))throw B.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 Ya}get non_nl_ws(){return Wa}get ws(){return Sr}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]}},ct=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(ct,"name",{value:Tr});var ot=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(ot,"name",{value:Tr});var ut=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(ut,"name",{value:Ga});function Ja(e){return[new ot(e),new ut(e),new ct(e)]}Bt(at,Ja);var qr=new at;qr.ERROR_DICT=B;Nr.exports=qr});var Ir=h((Lh,Ar)=>{function*Ka(e){for(let t of e)yield t;e=null}Ar.exports.sync_gen_from_str=Ka});var I=h((Oh,Or)=>{var Dr={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 A(e){return e instanceof Object?e._self:e}function Qa(e){return e+1}function Za(e){return e+2}function ec(e){return e+3}function tc(e){return e+6}function sc(e){return e+5}function rc(e){return e+9}function nc(e){return e+8}function Lr(e){return e%10!==0}var ic={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},lc={handling:0,handled:1};function ac(e,t,r){let n=Dr;return e.$has_yield_sign()||Lr(r)||t===A(n.av)&&r===A(n.bv)||t===A(n.av)&&r===A(n.bk)||t===A(n.av)&&r===A(n.k)||t===A(n.av)&&r===A(n.v)||t===A(n.av)&&r===A(n.ak)||t===A(n.v)&&r===A(n.bv)||t===A(n.v)&&r===A(n.bk)}Or.exports={STATE_DICT:Dr,gtv:A,get_main_eofv_with_code:Qa,get_lcmt_eofv_with_code:Za,get_blkcmt_eofv_with_code:ec,get_hash_quote_eofv_with_code:tc,get_hash_naked_eofv_with_code:sc,get_ref_quote_eofv_with_code:rc,get_ref_naked_eofv_with_code:nc,LEFTED_TYPE:ic,AVND_CACHE_STATE_DICT:lc,is_eofv:Lr,is_should_yield:ac}});var zt=h((Rh,Ur)=>{var{is_nl:jr}=ve(),Br=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},_t=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Br(l,r,n,i)},cc=/^[0-7]$/,oc=/^[0-9a-fA-F]$/,_e=e=>cc.test(e),z=e=>oc.test(e),ft={b:"\b",f:"\f",n:`
2
- `,r:"\r",t:" ",v:"\v"},Mr={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function uc(e){return Mr[e]}function Fr(e){return ft[e]}function _c(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+_t(t,16,2)}function fc(e){e=Array.from(e);let t=e[0],r=e[1];if(z(t)&&z(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function hc(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+_t(t,16,4)}function dc(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(z(t)&&z(r)&&z(n)&&z(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function pc(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+_t(t,8,3)}function gc(e){let t="";e=Array.from(e);let r=e[0];if(_e(r)){t=t+r;let n=e[1];if(_e(n)){t=t+n;let l=e[2];_e(l)&&(t=t+l)}let i=parseInt(t,8);return String.fromCharCode(i)}}var p={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*mc(e){let t=Array.from(e);for(let r of t)yield r}function*Rr(e,t){yield*t,yield*e}function Wr(e,t,r,n,i=!1){if(typeof t=="string"){let a=t;t=c=>c===a}if(typeof(r==="string")&&r.length>0){let a=mc(r);e=Rr(e,a)}else e=Rr(e,r);let l={state:p.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 Mt(e){return e.ch===void 0||e.end(e.ch)&&e.state!==p.backslash||e.state===p.x||e.state===p.u||e.state===p.o}function Ft(e,t=!1){return e.ch===e.esc?(e.state=p.backslash,e.curr=""):(e.state=p.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 Pr(e,t,r,n,i,l,a){return a===!0?n===Yr?(e.state=p.x,e.ch="\\x"+t.join(""),e):n===Hr?(e.state=p.u,e.ch="\\u"+t.join(""),e):(n===Gr&&(e.state=p.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=r,e)}function bc(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function ht(e,t,r,n,i=!0,l=!1,a=void 0,c=!1){let o;if(a!==void 0?o=a:(o=e.g.next().value,o!==void 0&&(e.offset=e.offset+1)),o===void 0)return e;let u=0,_=[],f;if(l?f=!0:f=r(o),f)u=u+1,_.push(o);else return e.state=p.executing,e.ch=o,e;for(;u<t;){if(o=e.g.next().value,o===void 0)return Pr(e,_,o,n,i,c,tail=!0);if(e.offset=e.offset+1,f=r(o),f)u=u+1,_.push(o);else return Pr(e,_,o,n,i,c,tail=!1)}return bc(e,_,o,n,c)}function Yr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function Hr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Gr(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Wt(e,t=!1){return e.curr=Fr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Yt(e,t=!1){return ht(e,2,z,Yr,!0,!1,void 0,t)}function Ht(e,t=!1){return ht(e,4,z,Hr,!0,!1,void 0,t)}function Gt(e,t=!1){return ht(e,3,_e,Gr,!1,!0,e.ch,t)}function Ut(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=p.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function yc(e,t=i=>i==='"',r="",n="\\"){let i=Wr(e,t,r,n,!0);for(i.state=p.executing;!Mt(i);)i.state===p.executing?Ft(i,!0):i.state===p.backslash&&(jr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=p.executing):i.ch in ft?Wt(i,!0):i.ch==="x"?Yt(i,!0):i.ch==="u"?Ht(i,!0):_e(i.ch)?Gt(i,!0):Ut(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=p.succ,i.ch=""):i.state===p.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=p.eof,i.ch=""),i}function*wc(e){let t=e;for(t.state=p.executing;!Mt(t);)t.state===p.executing?(Ft(t,!1),t.curr!==""&&(yield t.curr)):t.state===p.backslash&&(jr(t.ch)?(t.state=p.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ft?(Wt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Yt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Ht(t,!1),t.curr!==""&&(yield t.curr)):_e(t.ch)?(Gt(t,!1),t.curr!==""&&(yield t.curr)):(Ut(t,!1),t.curr!==""&&(yield t.curr)));return typeof t.ch=="string"&&t.end(t.ch)?(t.state=p.succ,t.ch=""):t.state===p.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=p.eof,t.ch=""),t}Ur.exports={CHAR_UNESC_DICT:ft,CHAR_ESC_DICT:Mr,escc:uc,unescc:Fr,escx:_c,unescx:fc,escu:hc,unescu:dc,esco:pc,unesco:gc,STATE_DICT:p,from_generator:yc,init:Wr,handle_executing:Ft,is_terminated:Mt,handle_escc:Wt,esc_handle_engine:ht,handle_escx:Yt,handle_escu:Ht,handle_esco:Gt,handle_esc_other:Ut,gen:wc,prepend:Br,prepend_num:_t,is_odigit_ch:_e,is_hdigit_ch:z}});var tn=h((Ph,en)=>{var{is_nl:$c}=ve(),xe=zt(),zr={line_comment:0,blk_comment:1},ee={init:0,executing:1,succ:2,eof:3,asterisk:4};function Vr(e){return{state:ee.init,g:e,rslt:"",ch:"",offset:0}}function Xr(e,t){return e.state=ee.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Jr(e,t){return e.state=ee.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function Kr(e,t){return e.state=ee.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function Qr(e,t=""){let r=Vr(e);r.state=ee.executing;let n=xe.from_generator(r.g,$c,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===xe.STATE_DICT.eof?Xr(r,n):n.state===xe.STATE_DICT.succ?Jr(r,n):Kr(r,n)}function Zr(e,t=""){let r=Vr(e);r.state=ee.executing;let n;for(;;){if(n=xe.from_generator(r.g,"*",t),r.offset=r.offset+n.offset,r.g=n.g,n.state===xe.STATE_DICT.eof)return Xr(r,n);if(n.state===xe.STATE_DICT.succ){let i=r.g.next().value;if(i!==void 0&&(r.offset=r.offset+1),i==="/")return Jr(r,n);if(i!==void 0)r.rslt=r.rslt+n.rslt+"*",t=i,r.offset=r.offset-1;else return r.rslt=r.rslt+n.rslt,r.ch="*",r.state=ee.asterisk,r}else return Kr(r,n)}return r}function vc(e,t,r=""){return t===zr.line_comment?Qr(e,r):Zr(e,r)}en.exports={TYPE_DICT:zr,STATE_DICT:ee,lc_from_generator:Qr,blk_from_generator:Zr,from_generator:vc}});var Vt=h((jh,sn)=>{function kc(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function xc(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function Sc(e){return parseInt(e).toString()===e}sn.exports={rjson:kc,wjson:xc,is_int_str:Sc}});var Xt=h((Bh,rn)=>{var Tc=()=>Math.random()*9007199254740992;function Ec(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 qc(e){return Object.entries(e).length===0}function Nc(e){return Object.entries(e).map(n=>n[1])}function Ac(e){return Object.entries(e).map(n=>n[0])}function Ic(e){return Object.entries(e).length}function Dc(e,t){for(let r in e)t(r,e[r]);return e}function Lc(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function Oc(e,t){for(let r in t)e[r]=t[r];return e}function Rc(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function Pc(e,t,r){return r=r.filter(n=>n[e]!==t),r}function jc(e,t,r){return r.findIndex(i=>i[e]===t)}function Bc(e){return JSON.parse(JSON.stringify(e))}function Mc(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 Fc(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}rn.exports={gen_guid:Tc,range:Ec,seqs_slct:Cc,dict_length:Ic,is_empty_dict:qc,dict_values:Nc,dict_keys:Ac,dict_map:Lc,dict_foreach:Dc,dict_plus:Oc,dict_update:Rc,dtb_kv_rm:Pc,dtb_kv_get_seq:jc,dcp:Bc,mat_map:Mc,is_cu_property:Fc}});var cs=h((Mh,Nn)=>{var v=Xt();function Qt(e){if(v.is_empty_dict(e))return 0;{let t=v.dict_keys(e);return Math.max(...t)+1}}function Ge(e){return e!=null}function ln(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ge(e._fstch)&&(e._fstch=e._fstch+t),Ge(e._lsib)&&(e._lsib=e._lsib+t),Ge(e._rsib)&&(e._rsib=e._rsib+t),Ge(e._parent)&&(e._parent=e._parent+t),e}function fe(e,t){let r=Qt(e);for(let n in t){let i=ln(t[n],r);t[i._id]=i,delete t[n]}return t}function Wc(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function Yc(e,t=0){return{_id:Qt(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function an(e){return e._tree!==void 0}function te(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Zt(e){return e._lsib===null}function es(e){return e._rsib===null}function M(e){return e._fstch===null}function cn(e,t){if(te(e))return!0;{let n=k(e,t);return W(n,t).length===1}}function Xe(e){return te(e)||!an(e)}function dt(e,t,r){if(!Xe(t))return console.log("only root or uninited could be prepend"),e;let n=M(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 ts(e,t,r){if(!Xe(t))return console.log("only root or uninited could be append"),e;let n=M(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=de(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 ss(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addrsib to root"),e;let n=es(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 on(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(te(e))return console.log("cant addlsib to root"),e;let n=Zt(e);if(t._tree=e._tree,n){let i=k(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=F(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 un(e,t,r,n){let i=W(t,n),l=i.length;if(l===0)return dt(t,r,n);if(e<=l&&e>=0){if(e===0)return dt(t,r,n);if(e===l)return ts(t,r,n);{let c=i[e-1];return ss(c,r,n)}}else return console.log("not in range!!"),t}function Se(e,t){for(let r in t)t[r]._tree=e._tree}function Hc(e,t,r){r=fe(t,r);let n=v.dict_keys(r)[0],i=re(r[n],r);return e=dt(e,i,t),Se(e,r),v.dict_plus(t,r),e}function Gc(e,t,r){r=fe(t,r);let n=v.dict_keys(r)[0],i=re(r[n],r);return e=ts(e,i,t),Se(e,r),v.dict_plus(t,r),e}function Uc(e,t,r){r=fe(t,r);let n=v.dict_keys(r)[0],i=re(r[n],r);return e=ss(e,i,t),Se(e,r),v.dict_plus(t,r),e}function zc(e,t,r){r=fe(t,r);let n=v.dict_keys(r)[0],i=re(r[n],r);return e=on(e,i,t),Se(e,r),v.dict_plus(t,r),e}function Vc(e,t,r,n){n=fe(r,n);let i=v.dict_keys(n)[0],l=re(n[i],n);return t=un(e,t,l,r),Se(t,n),v.dict_plus(r,n),t}function Ue(e,t){let r=Y(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function ze(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 Ve(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Te(e,t){if(te(e))return[e,t];if(cn(e,t)){let n=t[e._parent];_n(n);let i=Ue(e,t),l=ze(i,t);return Ve(e),[e,l]}else if(Zt(e)){let n=P(e,t);n._lsib=null;let i=k(e,t);i._fstch=e._rsib;let l=Ue(e,t),a=ze(l,t);return Ve(e),[e,a]}else if(es(e)){let n=F(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=Ue(e,t),l=ze(i,t);return Ve(e),[e,l]}else{let n=F(e,t);n._rsib=e._rsib;let i=Ue(e,t),l=ze(i,t);return Ve(e),[e,l]}}function Xc(e,t){let r=he(e,t);return r===null?[e,t]:Te(r,t)}function Jc(e,t){let r=de(e,t);return r===null?[e,t]:Te(r,t)}function Kc(e,t,r){let n=fn(e,t,r);return n===null?[t,r]:Te(n,r)}function Qc(e,t,...r){let n=hn(e,t,...whiches);for(let i=0;i<n.length;i++)Te(n[i],t);return[e,t]}function Zc(e,t){let r=W(e,t);for(let n=0;n<r.length;n++)Te(r[n],t);return t}function he(e,t){return e._fstch===null?null:t[e._fstch]}function W(e,t){let r=[],n=he(e,t);for(;n!==null;)r.push(n),n=P(n,t);return r}function de(e,t){let r=W(e,t);return r.length===0?null:r[r.length-1]}function fn(e,t,r){let n=W(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function hn(e,t,...r){let n=W(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let a=r[l];a>n.length-1||a<0||i.push(n[a])}return i}function dn(e,t,r=!1){let n=e,i=P(e,t);for(;i!==null;)n=i,i=P(i,t);return r||n._id!==e._id?n:null}function eo(e,t){let r=se(e,t,!0),n=v.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 to(e,t){let r=se(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r),i=[];if(r.length!==0)for(let l=0;l<r.length;l++)l>n&&i.push(r[l]);return i}function se(e,t,r=!1){let n=k(e,t),i;return n!==null?i=W(n,t):i=[e],r||(i=v.dtb_kv_rm("_id",e._id,i)),i}function so(e,t,r=!1){let n=se(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function ro(e,t,r){let n=se(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function no(e,t,...r){let n=se(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let a=r[l];a>n.length-1||a<0||i.push(n[a])}return i}function io(e,t){let r=se(e,t,!0);return v.dtb_kv_get_seq("_id",e._id,r)}function F(e,t){let r=se(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function P(e,t){return e._rsib===null?null:t[e._rsib]}function C(e,t){return pt(e,t,!0).length-1}function pn(e,t){let r=C(e,t),i=Y(e,t).map(a=>C(a,t));return Math.max(...i)-r+1}function lo(e,t){return M(e)?null:C(e,t)+1}function ao(e,t){if(M(e))return null;{let n=C(e,t),l=Y(e,t).map(c=>C(c,t));return Math.max(...l)}}function co(e,t,r){let n=C(t,r);return pn(t,r)<=e?null:n+e}function gn(e,t){let r=re(e,t),n=Y(r,t),i=C(e,t);return n.filter(a=>C(a,t)===i)}function Jt(e,t){let r=gn(e,t);return v.dtb_kv_get_seq("_id",e._id,r)}function oo(e,t){return Y(e,t).length}function re(e,t){let r=e,n=k(e,t);for(;n!==null;)r=n,n=k(n,t);return r}function k(e,t){let r;if(te(e))r=null;else{let n=dn(e,t,!0);r=t[n._parent]}return r}function pt(e,t,r=!1){let n=[],i=k(e,t);for(;i!==null;)n.push(i),i=k(i,t);return r&&n.unshift(e),n}function uo(e,t,r){let n=pt(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function _o(e,t,...r){let n=pt(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let a=r[l];a>n.length-1||a<0||i.push(n[a])}return i}function mn(e,t){let r=k(e,t);for(;r!==null;){let n=P(r,t);if(n!==null)return n;r=k(r,t)}return null}function bn(e,t){let r=he(e,t);if(r!==null)return r;{let n=P(e,t);return n!==null?n:mn(e,t)}}function yn(e,t){let r=e,n=de(e,t);for(;n!==null;)r=n,n=de(n,t);return r}function fo(e,t){if(te(e))return null;if(M(e)){let n=F(e,t);return n!==null?n:k(e,t)}else{let n=F(e,t);return n!==null?M(n)?n:yn(n,t):k(e,t)}}function Y(e,t){let r=C(e,t),n=[];for(;e!==null&&(n.push(e),e=bn(e,t),!(e!==null&&C(e,t)<=r)););return n}function rs(e,t){let r=e,n=he(e,t);for(;n!==null;)r=n,n=he(n,t);return r}function wn(e,t){let r=P(e,t);return r===null?k(e,t):rs(r,t)}function $n(e,t){let r=k(e,t);for(;r!==null;){let n=F(r,t);if(n!==null)return n;r=k(r,t)}return null}function ho(e,t){if(M(e)){let n=F(e,t);return n===null?$n(e,t):n}else return de(e,t)}function vn(e,t){let r=[],n=rs(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=wn(n,t);return r}function Kt(e){v.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function kn(e,t){let r=e._$visited;if(M(e))if(r){let i=P(e,t);return i===null?k(e,t):i}else return e._$visited=!0,e;else if(r){let i=P(e,t);return i===null?k(e,t):i}else return e._$visited=!0,he(e,t)}function po(e,t,r){if(M(t)){if(e)return t;{let i=F(t,r);return i===null?k(t,r):i}}else{if(e)return de(t,r);{let i=F(t,r);return i===null?k(t,r):i}}}function xn(e,t){return t._$visited&&e===t._id}function Sn(e,t,r=!1,n=!0){let i=[];Kt(t);let l=e._id;for(;!xn(l,e);)r?i.push(v.dcp(e)):i.push(e),e=kn(e,t);return r?i.push(v.dcp(e)):i.push(e),n&&Kt(t),i}function go(e,t){let r={};r._depth=C(e,t),r._breadth=Jt(e,t);let n=k(e,t);return r._pbreadth=n===null?null:Jt(n,t),r._id=e._id,r}function nn(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function ns(e,t){let r=[],n=e[0],i=[nn(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=W(i[c].nd,t);o=o.map(u=>nn(u)),o.forEach((u,_)=>{u.ele._pbreadth=i[c].ele._breadth,i[c].ele._children.push([r.length+1,l.length+_])}),l=l.concat(o)}let a=i.map(c=>c.ele);r.push(a),i=l}return r}function Tn(e,t){return vn(e[0],t)}function En(e,t,r=!1,n=!0){return Sn(e[0],t,r,n)}function mo(e,t){let r=is(e,t);return ns(r,t)}function is(e,t){let r=e[e.length-1];return Y(r,t)}function bo(e,t,r=!1,n=!0){let i=is(e,t);return En(i,t,r,n)}function yo(e,t){let r=ls(e,t);return ns(r,t)}function ls(e,t){let r=e[0];return Y(r,t)}function wo(e,t){let r=ls(e,t);return Tn(r,t)}function as(e,t,r=!1){let n=Y(e,t);return r||n.splice(0,1),n}function $o(e,t){return W(e,t)}function vo(e,t){let r=as(e,t,!1),n=sdfs.map(l=>C(l,t)),i=Math.max(...n);return r=r.filter(l=>C(l,t)===i),r}function Cn(e,t,r){let n=C(t,r),i=as(t,r,!1),l=sdfs.map(a=>C(a,r));return i=i.filter(a=>C(a,r)===n+e),i}function ko(e,t,...r){let n=r.map(i=>Cn(i,e,t));return n=Array.prototype.concat(...n),n}function qn(e){let t=v.dict_keys(e)[0],r=e[t];return re(r,e)}function xo(e){let t=qn(e);return Y(t,e)}Nn.exports={calc_next_id:Qt,update_nodes_ids:fe,creat_root:Wc,creat_nd:Yc,is_inited:an,is_root:te,is_fstch:Zt,is_lstch:es,is_leaf:M,is_lonely:cn,is_id:Ge,is_connectable:Xe,prepend_child:dt,append_child:ts,insert_child:un,add_rsib:ss,add_lsib:on,get_fstch:he,get_rsib:P,get_children:W,get_lstch:de,get_which_child:fn,get_some_children:hn,get_fstsib:so,get_lstsib:dn,get_preceding_sibs:eo,get_following_sibs:to,get_sibs:se,get_which_sib:ro,get_some_sibs:no,get_sibseq:io,get_lsib:F,get_rsib:P,get_lyr:gn,get_breadth:Jt,get_count:oo,get_depth:C,get_height:pn,get_fst_lyr_des_depth:lo,get_lst_lyr_des_depth:ao,get_which_lyr_des_depth:co,get_root:re,get_parent:k,get_ances:pt,get_which_ance:uo,get_some_ances:_o,get_rsib_of_fst_ance_having_rsib:mn,get_sdfs_next:bn,get_drmost_des:yn,get_sdfs_prev:fo,get_sdfs:Y,get_lsib_of_fst_ance_having_lsib:$n,get_dlmost_des:rs,get_edfs_next:wn,get_edfs_prev:ho,get_edfs:vn,clear_$visited:Kt,get_sedfs_next:kn,is_sedfs_traverse_finished:xn,get_sedfs_prev:po,get_sedfs:Sn,get_deses:as,get_fst_lyr_deses:$o,get_lst_lyr_deses:vo,get_which_lyr_deses:Cn,get_some_lyrs_deses:ko,nd2ele:go,sdfs2mat:ns,sdfs2edfs:Tn,sdfs2sedfs:En,edfs2mat:mo,edfs2sdfs:is,edfs2sedfs:bo,sedfs2mat:yo,sedfs2sdfs:ls,sedfs2edfs:wo,update_disconnected_nodes:Ue,update_orig_nodes:ze,leafize:_n,rootize:Ve,disconnect:Te,rm_fstch:Xc,rm_lstch:Jc,rm_which:Kc,rm_some:Qc,rm_all:Zc,update_treeid:Se,update_one_nodeid:ln,update_nodes_ids:fe,prepend_child_tree:Hc,append_child_tree:Gc,add_rsib_tree:Uc,add_lsib_tree:zc,insert_child_tree:Vc,get_root_via_tree:qn,tree2sdfs:xo}});var On=h((Fh,Ln)=>{function An(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 In=An();function Dn(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 In(n,i);return this.dispatchEvent(l),l}}return t}var So=Dn();Ln.exports={creat_event_cls:An,E:In,creat_event_target_cls:Dn,ET:So}});var fi=h((Wh,_i)=>{var Xn=Vt(),Ke=Xt(),pe=cs(),{ET:Rn}=On(),To=["_fstch","_lsib","_rsib","_parent","_tree"];function Jn(e){return e._tree!==void 0}function os(e){return e._tree===e}function Eo(e){return e._lsib===null}function Co(e){return e._rsib===null}function qo(e){return e._fstch===null}function No(e){return e.$sibs(!0).length===1}function vt(e){return os(e)||!Jn(e)}function Pn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function jn(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 Bn(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 us(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 Kn(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=_s(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function Io(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 ds(e){let t=[],n=kt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function Qn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function Zn(e,t=!1){let r=ds(e),n=Qn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function Do(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 Lo(e,...t){return Zn(e,!0).filter((i,l)=>t.includes(l))}function Mn(e){return ds(e).length}function Oo(e,t=!1){return e.$sibs(t).length}function _s(e){return Kn(e,!0)._parent}function Ro(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function Po(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function wt(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 jo(e,...t){return wt(e,!0).filter((i,l)=>t.includes(l))}function Bo(e,t=!1){return wt(e,t).length}function Mo(e){let t=e.$parent();return t===null?null:t.$lsib()}function Fo(e){let t=e.$parent();return t===null?null:t.$rsib()}function Wo(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function Yo(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function Ho(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function Go(e){let t=e.$parent();return t===null?null:t.$breadth()}function Uo(e){return e.$lyr().indexOf(e)}function zo(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function Vo(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 Fn(e,t=!1){let r=ti(e),n=me(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function Xo(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 Jo(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 Ko(e,...t){let r=e.$depth(),n=t.map(a=>a+r),i=e.$deses(!1),l=i.map(a=>a.$depth());return i=i.filter(a=>n.includes(a.$depth())),i}function fs(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 hs(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 ei(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 Qo(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 Wn(e,t,r){let n=us(t),i=n.length;if(i===0)r=fs(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=fs(t,r);else if(e===i)r=hs(t,r);else{let a=n[e-1];r=ei(a,r)}return r}function Zo(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function eu(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 ti(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function tu(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 me(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 su(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function ru(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function nu(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function iu(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function lu(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function si(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 au(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 cu(e){e.$sdfs().forEach(r=>{delete r.$visited})}function ou(e,t){return t.$visited&&e===t}function Yn(e){cu(e);let t=[],r=new Set,n=e;for(;!ou(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=si(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function uu(e){return e._fstch=null,e}function gt(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function mt(e){let t=e.$sdfs();return t.forEach(r=>{r._tree=t[0]}),t}function ge(e){if(e.$is_root())return e;if(e.$is_lonely()){let r=e.$parent();uu(r);let n=mt(e);return gt(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=mt(e);return gt(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=mt(e);return gt(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=mt(e);return gt(e),e}}function Hn(e){let t={};return t._nd=e,t._children=[],t}function Gn(e){let t=[],r=e[0],n=[Hn(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let a=0;a<n.length;a++){n[a]._breadth=a,n[a]._depth=t.length;let c=n[a]._nd.$children();c=c.map(o=>Hn(o)),c.forEach((o,u)=>{o._pbreadth=n[a]._breadth,n[a]._children.push([t.length+1,i.length+u])}),i=i.concat(c)}let l=n;t.push(l),n=i}return t}function Un(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ke.is_cu_property(i)&&(n[i]=r[i]);return n}function _u(e,t="_children"){let r=e[0][0],n=Un(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let a=0;a<i.length;a++){let c=i[a],o=c.d,u=c.ele,f=c.ele._children.map(m=>e[m[0]][m[1]]);for(let m=0;m<f.length;m++){let y=f[m],E=Un(y,t);o[t].push(E);let Ks={d:E,ele:y};l.push(Ks)}}i=l}return n}function zn(e,t="_children"){let r=new V;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ke.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function fu(e,t="_children"){let r=zn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let a=n[l].d,c=n[l].nd,o=a[t]===void 0?[]:a[t];for(let u=0;u<o.length;u++){let _=o[u],f=zn(_,t);c.$append_child(f);let m={d:_,nd:f};i.push(m)}}n=i}return r}function hu(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 du(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function pu(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var gu=["$fstch","$rsib","$parent"];function mu(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 bu(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var ri={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function yu(e,t){for(let r=0;r<t.length;r++){let n=ri[t[r]];e=e[n]()}return e}function wu(e){let t=new V,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=yu(r,i)}return t}function $u(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 L=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){hu(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ke.gen_guid()),r&&(this.#t=new Rn)}get opt(){return this.#e}enable_et(){this.#t=new Rn}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 Jn(this)}$is_root(){return os(this)}$is_fstch(){return Eo(this)}$is_lstch(){return Co(this)}$is_leaf(){return qo(this)}$is_lonely(){return No(this)}$fstch(){return this._fstch}$lstch(){return Pn(this)}$which_child(t){return jn(t,this)}$some_children(...t){return Bn(this,...t)}$children(){return us(this)}$children_count(){return Ao(this)}$rsib(){return this._rsib}$lsib(){return Io(this)}$fstsib(t=!1){return kt(this,t)}$lstsib(t=!1){return Kn(this,t)}$psibs(){return ds(this)}$fsibs(){return Qn(this)}$which_sib(t){return Do(t,this)}$some_sibs(...t){return Lo(this,...t)}$sibseq(){return Mn(this)}$sibs(t=!1){return Zn(this,t)}$sibs_count(t=!1){return Oo(this,t)}$parent(){return _s(this)}$root(){return Ro(this)}$ances(t=!1){return wt(this,t)}$which_ance(t){return Po(t,this)}$some_ances(...t){return jo(this,...t)}$ances_count(t=!1){return Bo(this,t)}$prepend_child(t){return t=t===void 0?new L(this.#e.with_id,this.#e.with_et):t,fs(this,t)}$insert_child(t,r){return r=r===void 0?new L(this.#e.with_id,this.#e.with_et):r,Wn(t,this,r)}$append_child(t){return t=t===void 0?new L(this.#e.with_id,this.#e.with_et):t,hs(this,t)}$clone(){if(os(this)){let t=yt(this);return $t(t)}else{let t=Mn(this),r=_s(this);ge(this);let n=yt(this),i=$t(n);return Wn(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new L(this.#e.with_id,this.#e.with_et):r.$clone();l=hs(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new L(this.#e.with_id,this.#e.with_et):t,ei(this,t)}$add_lsib(t){return t=t===void 0?new L(this.#e.with_id,this.#e.with_et):t,Qo(this,t)}$rsib_of_fst_ance_having_rsib(){return Zo(this)}$sdfs_next(){return eu(this)}$drmost_des(){return ti(this)}$sdfs_prev(){return tu(this)}$sdfs(){return me(this)}$dlmost_des(){return su(this)}$edfs_next(){return ru(this)}$lsib_of_fst_ance_having_lsib(){return nu(this)}$edfs_prev(){return iu(this)}$edfs(){return lu(this)}$offset(){return Vo(this)}$sedfs_next(){return si(this)}$sedfs_prev(t){return au(this)}$sedfs(){return Yn(this)}$deses(t=!1){return Fn(this,t)}$lst_lyr_deses(){return Xo(this)}$which_lyr_deses(t){return Jo(t,this)}$some_lyrs_deses(...t){return Ko(this,...t)}$count(t=!0){return Fn(this,t).length}$depth(t=!1){return wt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return Go(this)}$breadth(){return Uo(this)}$width(){return zo(this)}$lyr(){return Ho(this)}$lcin(){return Wo(this)}$rcin(){return Yo(this)}$luncle(){return Mo(this)}$runcle(){return Fo(this)}$sdfs_repr(t=du,r=!1){let n=this.$root(),i=me(n),c=me(this).map((o,u)=>t(o,u,i)).join(`
3
- `);if(console.log(c),r)return c}$sedfs_repr(t=pu,r=!1){let n=this.$root();ni(n);let a=Yn(this).map((c,o)=>t(c,o)).join(`
4
- `);if(console.log(a),r)return a}$disconn(){return ge(this)}$rm_fstch(){let t=this._fstch;return ge(t)}$rm_lstch(){let t=Pn(this);return ge(t)}$rm_which(t){let r=jn(t,this);return ge(r)}$rm_some_children(...t){return Bn(this,...t).map(n=>ge(n))}$rm_all_children(){return us(this).map(r=>ge(r))}$dump(){if(this.$is_root())return yt(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=yt(this);Xn.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return Gn(me(this))}$nest_dict(t="_children"){let r=Gn(me(this));return _u(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 mu(this)}$sdfs_srch_action_list(){return bu(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 $u(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(L,"name",{value:"\u200D"});function ni(e){let t=me(e);return t.forEach((r,n)=>{r._id=n}),t}function vu(e){let t=new V;return t._id=e._id,t.$guid=e._guid,t}function Vn(e,t){for(;t._id!==e;)t=t._parent;return t}function Je(e,t){let r=ii(t);for(let n of r)e[n]=t[n];return e}function $t(e){let t=Ke.dict_keys(e)[0],r=pe.get_root(e[t],e),n=vu(r);n=Je(n,r);let i=n,l=r,a=pe.get_sdfs_next(l,e),c;for(;a!==null;)if(l._fstch===a._id)c=i.$prepend_child(),c._id=a._id,c.$guid=a._guid,c=Je(c,a),i=c,l=a,a=pe.get_sdfs_next(l,e);else if(l._rsib===a._id)c=i.$add_rsib(),c._id=a._id,c.$guid=a._guid,c=Je(c,a),i=c,l=a,a=pe.get_sdfs_next(l,e);else if(a._parent!==null&&a._parent!==void 0){let o=a._parent;i=Vn(o,i),c=i.$append_child(),c._id=a._id,c.$guid=a._guid,c=Je(c,a),i=c,l=a,a=pe.get_sdfs_next(l,e)}else if(a._parent===void 0){let u=pe.get_parent(a,e)._id;i=Vn(u,i),c=i.$append_child(),c._id=a._id,c.$guid=a._guid,c=Je(c,a),i=c,l=a,a=pe.get_sdfs_next(l,e)}else console.log("Impossible",i,l,a);return n}function bt(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function ii(e){return Ke.dict_keys(e).filter(n=>!To.includes(n))}function ku(e,t){let r=ii(e);for(let n of r)t[n]=e[n];return t}function yt(e){let t=ni(e),r=e._id,n={};return t.forEach((i,l)=>{let a={};a._tree=r,a._fstch=bt(i,"_fstch"),a._lsib=bt(i,"_lsib"),a._rsib=bt(i,"_rsib"),a._parent=bt(i,"_parent"),a._id=i._id,a._guid=i.$guid,a=ku(i,a),n[i._id]=a}),n}var V=class extends L{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 li(e){if(typeof e=="string"){let t=Xn.rjson(e);return $t(t)}else return typeof e=="object"?$t(e):new V}function xu(e,t="_children"){return fu(e,t)}function Su(e){let t=e.$dump();return li(ndict)}function ps(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function ai(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function ci(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function oi(e,t,...r){let n=ai(e);return t&&(out=ps(e,t,...r),n=n+"@"+out),n}function ui(e,t,...r){let n=ci(e);return t&&(out=ps(e,t,...r),n=n+"@"+out),n}function gs(e,t,r,n,i,...l){let a=r.$sdfs(),c=n.$sdfs();if(a.length!==c.length)return!1;{let o=a.map(_=>t(_,i,...l)),u=c.map(_=>t(_,i,...l));e&&(o.sort(),u.sort());for(let _=0;_<o.length;_++){let f=o[_],m=u[_];if(f!==m)return!1}}return!0}function Tu(e,t,r,...n){return gs(!1,ui,e,t,r,...n)}function Eu(e,t,r,...n){return gs(!0,oi,e,t,r,...n)}_i.exports={SDFS_NEXT_BUILD_ACTION_DICT:ri,build_from_srch_action_list:wu,SDFS_NEXT_SRCH_ACTIONS:gu,RESERVED_EVENT_TYPES:["$msg__"],Node:L,Tree:V,Root:V,load:li,load_from_nest_dict:xu,clone:Su,get_cu_sign:ps,get_internal_sign_ignore_order:ai,get_internal_sign_keep_order:ci,get_sign_keep_order:ui,struct_eq:gs,struct_eq_keep_order:Tu,get_sign_ignore_order:oi,struct_eq_ignore_order:Eu}});var ms=h((Yh,hi)=>{var Cu=fi(),qu=cs(),Nu=Vt();hi.exports={ndfunc:qu,ndcls:Cu,ndutil:Nu}});var Tt=h((Qh,pi)=>{var q=x(),Au=ms(),{Root:Iu}=ms().ndcls,{TYPE_DICT:Hh,isNode:Gh,empty:g,is_bigint_str:Uh,is_jsint_str:zh,NUM_TYPE_DICT:Vh,parse_abnormal_num:Xh,parse_int:Jh,parse_float:Kh,parse_num:Du,to_str:St}=x(),O=class extends Iu{constructor(t=g){super(!1,!1),this.key=t,this.value=g,this.type=g,this.chtype=g,this.hashes=new Set,this.kcmt=[],this.bvcmt=[],this.avcmt=[]}kto_str(){return this.key===g?g:JSON.stringify(this.key)}is_undefined(){return this.type===q.TYPE_DICT.UndefinedLiteral}is_null(){return this.type===q.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()}},bs=class extends O{constructor(t=g){super(t),this.value=void 0,this.type=q.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return St(this.value)}},ys=class extends O{constructor(t=g){super(t),this.value=null,this.type=q.TYPE_DICT.NullLiteral}vto_rawstr(){return St(this.value)}},ws=class extends O{constructor(t,r=g){super(r),t==="true"&&(this.value=!0,this.type=q.TYPE_DICT.BooleanLiteral.TrueLiteral),t==="false"&&(this.value=!1,this.type=q.TYPE_DICT.BooleanLiteral.FalseLiteral)}vto_rawstr(){return St(this.value)}},$s=class extends O{constructor(t,r=g){if(super(r),typeof t=="string"){let n=Du(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=St(this.value);return this.type===q.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Qe(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var vs=class extends O{constructor(t,r=g){super(r),this.value=t,this.type=q.TYPE_DICT.StringLiteral}vto_rawstr(){return Qe(this.value)}};function Lu(e){e instanceof xt?e.type=q.TYPE_DICT.CommentLine.tt:e.type=q.TYPE_DICT.CommentBlock.tt}function Ou(e,t){return{lsib:e.$lsib(),data:t}}function di(e,t){Lu(t);let r=Ou(e,t);return e.ttcmt.push(r),r}var ks=class extends O{constructor(t=g){super(t),this.value=[],this.type=q.TYPE_DICT.ArrayExpression._self,this.open=g,this.close=g,this.ttcmt=[]}is_inited(){return this.open===g&&this.close===g}is_opened(){return this.open!==g&&this.close===g}is_closed(){return this.open!==g&&this.close!==g}append_child(t){return t.chtype=q.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 di(this,t)}},xs=class extends O{constructor(t=g){super(t),this.value={},this.type=q.TYPE_DICT.ObjectExpression._self,this.open=g,this.close=g,this.ttcmt=[]}is_inited(){return this.open===g&&this.close===g}is_opened(){return this.open!==g&&this.close===g}is_closed(){return this.open!==g&&this.close!==g}append_child(t){return t.chtype=q.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 di(this,t)}},Ss=class extends O{constructor(t,r=g){super(r),this.value=t,this.type=q.TYPE_DICT._Ref}vto_rawstr(){if(this.value.is_leaf())return this.value.vto_rawstr();if(this.value.key!==g)return'&"'+Qe(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Qe(t)+'"'}},xt=class extends O{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
5
- `){return"//"+Qe(this.value)+t}},Ts=class extends O{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Qe(this.value)+"*/"}};pi.exports={UndefinedLiteral:bs,NullLiteral:ys,BooleanLiteral:ws,NumericLiteral:$s,StringLiteral:vs,ArrayExpression:ks,ObjectExpression:xs,_Ref:Ss,CommentLine:xt,CommentBlock:Ts,_ndtree:Au}});var vi=h((Zh,$i)=>{var{empty:qs}=x(),{UndefinedLiteral:gi,NullLiteral:mi,BooleanLiteral:bi,NumericLiteral:yi,StringLiteral:Es,ArrayExpression:Ru,ObjectExpression:Pu,CommentLine:ju,CommentBlock:Bu,_Ref:Cs}=Tt();function Mu(e,t){let r=qs,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:qs}function wi(e,t){return e instanceof gi?new gi("undefined",t):e instanceof mi?new mi("null",t):e instanceof bi?new bi(e.vto_rawstr(),t):e instanceof yi?new yi(e.vto_rawstr(),t):e instanceof Es?new Es(e.value,t):e instanceof ju||e instanceof Bu?new Es(e.value,t):e instanceof Ru?new Cs(e,t):e instanceof Pu?new Cs(e,t):e instanceof Cs?(e=e.value,wi(e,t)):qs}$i.exports={find_refnd_with_hash:Mu,clone:wi}});var Li=h((ed,be)=>{var Fu=Array,Wu=x(),{empty:$,parse0:Yu}=x(),et=class extends Fu{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*Hu(e){for(let t of e)yield t;e=null}function*Gu(e,t){yield*t,yield*e}var tt=zt(),Ns=ve(),Ce=tn(),{UndefinedLiteral:Uu,NullLiteral:zu,BooleanLiteral:ki,NumericLiteral:Vu,StringLiteral:xi,CommentLine:Ze,CommentBlock:Xu,ArrayExpression:As,ObjectExpression:Ju}=Tt(),G=I(),Si=G.gtv,ne=G.STATE_DICT,Is=G.LEFTED_TYPE,Ee=G.AVND_CACHE_STATE_DICT,H=x(),w=Z(),Ti=vi();function*Ii(e){for(;e.length>0;)yield e.pop()}function Ei(e){let t;return e.__is_sync_mode()?t=tt.from_generator(e.g,e.ch_cache.curr):t=tt.from_generator(Ii(e.unshift_cache),e.ch_cache.curr),t}function Ci(e,t,r){e.lefted.type=Is.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=G.get_main_eofv_with_code(e.state)}function Di(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function Ku(e,t,r){return Di(e,t,r),e.state=G.get_lcmt_eofv_with_code(e.state),e}function Qu(e,t,r){return Di(e,t,r),e.state=G.get_blkcmt_eofv_with_code(e.state),e}function Zu(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(Ii(e.unshift_cache),e.ch_cache.curr),r}function qi(e,t,r,n){let i=Zu(e,r);return i.state!==Ce.STATE_DICT.succ?((t===Ze?Ku:Qu)(e,i,n),$):new t(i.rslt)}function Ni(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===As?e.state=ne.bv:e.state=ne.bk,e}var Ds=Symbol("root_lblk_ch"),Ai=Symbol("root_rblk_ch"),qe=class{#t=Si(ne.bv);#e=new et;constructor(t,r=" "){if(r!==$){let i=Hu(r);t=Gu(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 As;this.stack.push(n),n.open=Ds,this.avnd_cache={state:Ee.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===Ee.handled}$set_yield_sign(){this.avnd_cache.state=Ee.handled}$clear_yield_sign(){this.avnd_cache.state=Ee.handling}get state(){return this.#t}set state(t){this.#t=Si(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=G.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return w.commas.has(this.ch_cache.curr)}$is_currch_colon(){return w.colons.has(this.ch_cache.curr)}$is_currch_ws(){return Ns.is_ws(this.ch_cache.curr)}$is_currch_quote(){return w.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===w.slash}$is_currch_asterisk(){return this.ch_cache.curr===w.asterisk}$is_currch_ary_lblk(){return w.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return w.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 w.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return w.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 w.hash===this.ch_cache.curr}$is_currch_ref(){return w.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=ne.bv:(this.state=ne.v,this.str_cache.v=t,r===$||(this.str_cache.maybe_vquote=r)):t===$?this.state=ne.bk:(this.state=ne.k,this.str_cache.k=t),this.state}$vcache_to_nd(){let t=this.str_cache.v,r;if(this.str_cache.maybe_vquote===$){let n=Yu(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===H.TYPE_DICT.UndefinedLiteral?r=new Uu(this.str_cache.k):n.type===H.TYPE_DICT.NullLiteral?r=new zu(this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new ki("true",this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new ki("false",this.str_cache.k):n.type===H.TYPE_DICT.StringLiteral?r=new xi(n.value,this.str_cache.k):r=new Vu(n,this.str_cache.k)}else r=new xi(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=Ee.handling){return this.avnd_cache.data=t,this.avnd_cache.state=r,this.avnd_cache}$setup_leafnd(){let t=this.$vcache_to_nd();this.$set_avnd_cache(t,Ee.handling),this.$mv_key_to_nd(),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),this.$mv_avcmt_to_avcmt(),this.stack.lst.append_child(t)}$handle_quote(t){let r=Ei(this);return r.state!==tt.STATE_DICT.succ?(Ci(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 qi(this,Ze,Ce.lc_from_generator,Is.lcmt)}$handle_blkcmt(){return qi(this,Xu,Ce.blk_from_generator,Is.blkcmt)}$push_kcmt(t){t.type=Ce instanceof Ze?H.TYPE_DICT.CommentLine.k:H.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Ze?"CommentLine":"CommentBlock";t.type=H.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=Ce instanceof Ze?H.TYPE_DICT.CommentLine.k:H.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(w.array_blks.lhas(this.ch_cache.curr))return Ni(this,As);if(w.obj_blks.lhas(this.ch_cache.curr))return Ni(this,Ju)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return w[r].getl(this.ch_cache.curr)===t.open}$close_nonleaf_nd(){let t=this.stack.lst;t.close=this.ch_cache.curr,this.$set_avnd_cache(t),this.stack.pop(),this.state=ne.av}$get_hash_or_ref(t="#"){let r=$,n=this.$next_ch(),i="";for(;!Ns.is_ws(n)&&!w.commas.has(n)&&!w.colons.has(n)&&!w.array_blks.has(n)&&!w.obj_blks.has(n)&&n!==w.hash&&n!==w.ref&&n!==w.slash;)if(w.quotes.has(n)){let l=Ei(this);if(l.state!==tt.STATE_DICT.succ)return Ci(this,l,this.ch_cache.curr),t===w.hash?this.state=G.get_hash_quote_eofv_with_code(this.state):this.state=G.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),Ti.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=Ti.clone(t,this.str_cache.k);this.$set_avnd_cache(n),this.$mv_key_to_nd(n),this.$mv_kcmt_to_kcmt(),this.$mv_bvcmt_to_bvcmt(),r.append_child(n)}};qe[Ds]=Ds;qe[Ai]=Ai;qe.MODES=["sync","async"];be.exports=qe;be.exports.Stack=et;be.exports._type_util=Wu;be.exports._esc=tt;be.exports._cmt=Ce;be.exports._ws=Ns});var ji=h((td,Pi)=>{var{empty:Oi}=x(),Ri=I(),Ne=Ri.gtv,U=Ri.STATE_DICT;function e_(e){let t=e.state;return t===Ne(U.bk)||(t===Ne(U.k)||t===Ne(U.ak)?(e.str_cache.k=Oi,e.state=U.bk):t===Ne(U.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=U.bv:e.state=U.bk):t===Ne(U.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ne(U.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}Pi.exports=e_});var Fi=h((rd,Mi)=>{var{empty:sd}=x(),Bi=I(),Ae=Bi.gtv,ie=Bi.STATE_DICT;function t_(e){let t=e.state;return t===Ae(ie.bk)||(t===Ae(ie.k)||t===Ae(ie.ak)?e.state=ie.bv:t===Ae(ie.bv)||(t===Ae(ie.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ae(ie.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Mi.exports=t_});var Ls=h((ld,Yi)=>{var{empty:id}=x(),Wi=I(),Ie=Wi.gtv,le=Wi.STATE_DICT;function s_(e){let t=e.state;return t===Ie(le.bk)||(t===Ie(le.k)?e.state=le.ak:t===Ie(le.ak)||t===Ie(le.bv)||(t===Ie(le.v)?(e.$setup_leafnd(),e.state=le.av):Ie(le.av))),e}Yi.exports=s_});var zi=h((ad,Ui)=>{var{empty:Hi}=x(),Gi=I(),De=Gi.gtv,X=Gi.STATE_DICT;function r_(e,t){let r=e.state,n=e.$handle_quote(t);return n===Hi||(r===De(X.bk)?(e.str_cache.k=n,e.state=X.k):r===De(X.k)?e.str_cache.k=e.str_cache.k+n:r===De(X.ak)?(e.$refresh_key(n),e.state=X.k):r===De(X.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=X.v):r===De(X.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=Hi):r===De(X.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Ui.exports=r_});var Ki=h((cd,Ji)=>{var{empty:Vi}=x(),Os=I(),R=Os.gtv,T=Os.STATE_DICT,n_=Os.LEFTED_TYPE,ye=Z();function Xi(e,t){let r=e.state,n=e[t]();if(n!==Vi){let i=e.stack.lst;if(r===R(T.bk))i.append_ttcmt(n);else if(r===R(T.k))e.$push_kcmt(n),e.state=T.ak;else if(r===R(T.ak))e.$push_kcmt(n);else if(r===R(T.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===R(T.v))e.$setup_leafnd(),e.state=T.av;else if(r===R(T.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=T.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function i_(e){return Xi(e,"$handle_lcmt")}function l_(e){return Xi(e,"$handle_blkcmt")}function a_(e){let t=e.state;t===R(T.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=ye.slash,e.state=T.k):t===R(T.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+ye.slash):t===R(T.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key(ye.slash),e.state=T.k):t===R(T.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=ye.slash,e.state=T.v):t===R(T.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+ye.slash,e.str_cache.maybe_vquote=Vi):t===R(T.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(ye.slash))}function c_(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=ye.slash,e.lefted.type=n_.backslash,e.$handle_main_eof()):e.$is_currch_slash()?i_(e):e.$is_currch_asterisk()?l_(e):a_(e),e}Ji.exports=c_});var el=h((ud,Zi)=>{var{empty:od}=x(),Qi=I(),Le=Qi.gtv,ae=Qi.STATE_DICT;function o_(e){let t=e.state;return t===Le(ae.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=ae.k):t===Le(ae.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Le(ae.ak)?(e.$refresh_key(),e.state=ae.k):t===Le(ae.bv)?e.$open_nonleaf_nd():t===Le(ae.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Le(ae.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Zi.exports=o_});var nl=h((_d,rl)=>{var{empty:tl}=x(),sl=I(),Oe=sl.gtv,we=sl.STATE_DICT,u_=Ls();function __(e){let t=e.state;return t===Oe(we.bk)?e.$close_nonleaf_nd():t===Oe(we.k)?(e.str_cache.k=tl,e.$close_nonleaf_nd()):t===Oe(we.ak)?(e.$refresh_key(),e.str_cache.k=tl,e.$close_nonleaf_nd()):t===Oe(we.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Oe(we.v)?(e.$setup_leafnd(),e.state=we.av,e.__unshift_g(e.ch_cache.curr)):t===Oe(we.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 f_(e){return e.$is_rblk_match()?__(e):u_(e),e}rl.exports=f_});var cl=h((fd,al)=>{var{empty:h_}=x(),ll=I(),Re=ll.gtv,ce=ll.STATE_DICT,d_=Z(),{CommentLine:il}=Tt();function p_(e){let t=e.state,r=e.$get_hash_or_ref(d_.hash);if(r!==h_){let n=e.stack.lst;if(t===Re(ce.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Re(ce.k)){let i=new il(r);e.$push_kcmt(i),e.state=ce.ak}else if(t===Re(ce.ak)){let i=new il(r);e.$push_kcmt(i)}else t===Re(ce.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Re(ce.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ce.av):t===Re(ce.av)&&e.avnd_cache.data.hashes.add(r)}return e}al.exports=p_});var _l=h((hd,ul)=>{var{empty:Rs}=x(),ol=I(),Pe=ol.gtv,D=ol.STATE_DICT,g_=Z();function m_(e){let t=e.state,r=e.$get_hash_or_ref(g_.ref);if(r!==Rs){let n=e.$find_ref(r);if(n!==Rs){let i=e.stack.lst;t===Pe(D.bk)||t===Pe(D.k)||t===Pe(D.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=D.ak):t===Pe(D.bv)?(e.$add_ref_to_parent(n),e.state=D.av):t===Pe(D.v)?(e.str_cache.maybe_vquote=Rs,e.$setup_leafnd(),e.state=D.av):t===Pe(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}ul.exports=m_});var dl=h((dd,hl)=>{var{empty:b_}=x(),fl=I(),je=fl.gtv,J=fl.STATE_DICT;function y_(e){let t=e.state;return t===je(J.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=J.k):t===je(J.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===je(J.ak)?(e.$refresh_key(),e.state=J.k):t===je(J.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=J.v):t===je(J.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=b_):t===je(J.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}hl.exports=y_});var yl=h((pd,bl)=>{var{empty:w_}=x(),$_=Li(),v_=ji(),k_=Fi(),x_=Ls(),S_=zi(),T_=Ki(),E_=el(),C_=nl(),q_=cl(),N_=_l(),A_=dl(),ml=I(),pl=ml.gtv,gl=ml.STATE_DICT,I_=Z();function*D_(e,t=w_){let r=new $_(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(v_(r),yield r):r.$is_currch_colon()?(k_(r),yield r):r.$is_currch_ws()?(x_(r),yield r):r.$is_currch_quote()?(S_(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(T_(r),yield r):r.$is_currch_lblk()?(E_(r),yield r):r.$is_currch_rblk()?(C_(r),yield r):r.$is_currch_hash()?(q_(r),yield r):r.$is_currch_ref()?r.state===pl(gl.av)||r.state===pl(gl.v)?r.__unshift_g(I_.fst_comma+r.ch_cache.curr):(N_(r),yield r):(A_(r),yield r)}bl.exports=D_});var xl=h((gd,kl)=>{var{sync_gen_from_str:Ps}=Ir(),{is_should_yield:js}=I(),j=Z(),{is_nl:L_,is_ws:wl}=ve(),Bs=yl(),O_={enable_ref:!1,encoding:"utf8"};function $l(e,t={enable_ref:!1}){let r=Bs(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let a of r){let c=a.state;if(js(n,l,c)&&!t.enable_ref){let o=n.avnd_cache.data;o.$disconn(),o=null}l=c}return i}function R_(e,t={enable_ref:!1}){let r=Ps(e);return $l(r,t)}function*vl(e,t={enable_ref:!1,encoding:"utf8"}){let r=Bs(e),n=r.next().value,i=n.state;for(let l of r){let a=l.state;if(js(n,i,a)&&!t.enable_ref){let c=n.avnd_cache.data;yield c,c.$disconn(),c=null}i=a}}function*P_(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ps(e);yield*vl(r,t)}function j_(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function B_(e){let t=Ps(""),r=Bs(t," "),n=r.next().value;n.__use_async_mode();let i=j_();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function M_(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"):L_(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"?wl(t)?e.can_send=!0:j.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?wl(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*F_(e,t){for(let r of e)M_(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*W_(e){let t=B_(e);for await(let r of e)yield*F_(r,t);yield t}function Y_(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*H_(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,js(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*G_(e,t={enable_ref:!1,encoding:"utf8"}){e=W_(e);let r;for await(r of e)Y_(r),yield*H_(r,t);yield r.rt}kl.exports={OPT_DICT:O_,parse_from_generator:$l,parse_from_str:R_,gen_from_generator:vl,gen_from_str:P_,agen_from_generator:G_}});var Et=h((md,rt)=>{var{empty:U_}=x(),z_=Z(),st=xl();function Ms(e){return e.length===1?e[0]:e}function V_(){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=Ms(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=Ms(l),yield[l.key,l.value]}:t=function(r,n={enable_ref:!1,encoding:"utf8"}){let i=st[e](r,n).value;return Ms(i)},Object.defineProperty(t,"name",{value:e}),rt.exports[e]=t}rt.exports.OPT_DICT=st.OPT_DICT}V_();rt.exports.CFG=z_;rt.exports.empty=U_});var Be=h((bd,Sl)=>{var X_=e=>e.constructor.name==="AsyncFunction",J_=e=>typeof e!="string"||(e=e.trim(),e==="")?!1:!!(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||/^(data|blob|file|wasm):/i.test(e)),K_=e=>e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||/^(data|blob|file|wasm):/i.test(e)?e:e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")?e.startsWith("//")?window.location.protocol+e:e.startsWith("/")?window.location.origin+e:new URL(e,window.location.href).href:e,Q_=()=>new Date().toISOString().replace(/[:.]/g,"-"),Z_=/^(.*?)=["]?(.*)["]?$/,ef=(e=document.cookie)=>{let t=e.split("; "),r={};for(let n of t){let i=Z_.exec(n);r[i[1]]=i[2]}return r};Sl.exports={is_async:X_,is_url:J_,fullfill_url:K_,creat_dt_prefix:Q_,get_ck:ef}});var nt=h((yd,Cl)=>{var{is_async:oe}=Be(),tf=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},sf=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},rf=e=>{for(;e.parentNode;)e=e.parentNode;return e},K=e=>e.firstChild===null||e.firstChild===void 0,Ct=(e,t=K)=>{let r=0;for(;!t(e);)e=e.lastChild,++r;return[e,r]},qt=(e,t=K)=>{let r=0;for(;!t(e);)e=e.firstChild,++r;return[e,r]},Tl=(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]},nf=async(e,t=(n,i)=>{},r=K)=>{let[n,i]=Ct(e,r),l=e,a=oe(t),c=0;for(;;){let o=!1;if(a?o=await t(l,c):o=t(l,c),o||l===n)return;if(!r(l))++c,l=l.firstChild;else{let u=Tl(l,c);if(l=u[0],l)c=u[1];else break}}},El=(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=K)=>{let[n,i]=qt(e,r),l=e,a=oe(t),c=0;for(;;){let o=!1;if(a?o=await t(l,c):o=t(l,c),o||l===n)return;if(!r(l))++c,l=l.lastChild;else{let u=El(l,c);if(l=u[0],l)c=u[1];else break}}},af=async(e,t=(n,i)=>{},r=K)=>{let[n,i]=qt(e,r),l=oe(t);for(;;){let a=!1;if(l?a=await t(n,i):a=t(n,i),a||n===e)return;{let c=n.nextSibling;if(c){let o=qt(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=K)=>{let[n,i]=Ct(e,r),l=oe(t);for(;;){let a=!1;if(l?a=await t(n,i):a=t(n,i),a||n===e)return;{let c=n.prevSibling;if(c){let o=Ct(c,r);i+=o[1],n=o[0]}else{let o=n.parentNode;if(o)--i,n=o;else break}}}},of=async(e,t=(i,l)=>{},r=(i,l)=>{},n=K)=>{let i=e,l="open",a={open:[r,oe(r)],clos:[t,oe(t)]},c=0;for(;;){let o=!1,[u,_]=a[l];if(l==="open"){if(_?o=await u(i,c):o=u(i,c),o)return;n(i)?l="clos":(i=i.firstChild,++c)}else{let f,m,y,E=i.nextSibling;if(E?(y="open",f=E,m=c):(y="clos",f=i.parentNode,m=c-1),_?o=await u(i,c):o=u(i,c),o)return;if(i!==e)l=y,i=f,c=m;else break}}},uf=async(e,t=(i,l)=>{},r=(i,l)=>{},n=K)=>{let i=e,l="open",a={open:[r,oe(r)],clos:[t,oe(t)]},c=0;for(;;){let o=!1,[u,_]=a[l];if(l==="open"){if(_?o=await u(i,c):o=u(i,c),o)return;n(i)?l="clos":(i=i.lastChild,++c)}else{let f,m,y,E=i.prevSibling;if(E?(y="open",f=E,m=c):(y="clos",f=i.parentNode,m=c-1),_?o=await u(i,c):o=u(i,c),o)return;if(i!==e)l=y,i=f,c=m;else break}}};Cl.exports={get_depth:tf,get_ance:sf,get_rt:rf,is_topo_leaf:K,get_drmost:Ct,get_dlmost:qt,find_rb_of_fst_ance_has_rb:Tl,editonly_sdfs_for_each:nf,find_lb_of_fst_ance_has_lb:El,editonly_rsdfs_for_each:lf,editonly_edfs_for_each:af,editonly_redfs_for_each:cf,visit:of,rvisit:uf}});var Nl=h((wd,ql)=>{var _f=new Set(["html","head","body","title","meta","link","base","style","header","footer","nav","main","section","article","aside","h1","h2","h3","h4","h5","h6","address","p","hr","pre","blockquote","ol","ul","li","dl","dt","dd","figure","figcaption","div","a","em","strong","small","s","cite","q","dfn","abbr","ruby","rt","rp","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr","ins","del","img","iframe","embed","object","param","video","audio","source","track","picture","map","area","canvas","svg","table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","form","label","input","button","select","datalist","optgroup","option","textarea","output","progress","meter","fieldset","legend","details","summary","dialog","script","noscript","template","slot"]),ff=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),hf=new Set(["class","rel","sandbox","allow","headers","aria-describedby","aria-labelledby"]);ql.exports={TAGS:_f,VOID_TAGS:ff,NEED_TO_SP_ATTR_NMS:hf}});var Pl=h(($d,Rl)=>{var{TAGS:df,VOID_TAGS:Al,NEED_TO_SP_ATTR_NMS:pf}=Nl(),{is_url:Il,fullfill_url:gf}=Be(),{editonly_sdfs_for_each:N,is_topo_leaf:Ws}=nt(),Dl=(e,t)=>{let r=[e];for(let n of t){let i=[];for(let l of r){let a=l.children;for(let c=0;c<a.length;c++){let o=a[c];o.tagName.toLowerCase()===n&&i.push(o)}}if(i.length===0)return[];r=i}return r},Ll=(e,t)=>{let r=[],n=t.length;function i(l,a){let c=a;l.nodeType===1&&l.tagName.toLowerCase()===t[a]&&(c=a+1,c===n&&r.push(l));let o=l.children;if(o)for(let u=0;u<o.length;u++)i(o[u],c)}return i(e,0),r},Fs=async(e,t,r=Ws)=>{let n=[];return await N(e,async(i,l)=>{if(i.tagName){if(t.test(i.tagName))n.push(i);else if(i.attributes){for(let a of i.attributes)if(t.test(a.name)){n.push(i);break}}}},r),n},mf=async(e,t=Ws)=>{let r=new Set,n=new Set,i=new Set,l=new Set,a=new Set;return await N(e,async(c,o)=>{if(c.nodeType===Node.ELEMENT_NODE){if(r.add(c.tagName.toLowerCase()),c.attributes)for(let u of c.attributes)if(n.add(u.name.toLowerCase()),pf.has(u.name.toLowerCase())){let _=u.value.split(/[ ]+/g);for(let f of _)i.add(f)}else i.add(u.value)}else c.nodeType===Node.TEXT_NODE?l.add(c.nodeValue):c.nodeType===Node.COMMENT_NODE&&a.add(c.nodeValue)},t),{tags:Array.from(r),keys:Array.from(n),vals:Array.from(i),txts:Array.from(l),cmts:Array.from(a)}},Ol=async(e,t,r=Ws)=>{if(typeof t=="string")if(t[0]==="#"){let n=[];return await N(e,async(i,l)=>{if(i.tagName){let a=t.slice(1),c=i.getAttribute("id");a===c&&n.push(i)}},r),n}else if(t[0]==="."){let n=[];return await N(e,async(i,l)=>{if(i.tagName){let a=t.slice(1);i.getAttribute("class").split(/[ ]+/g).map(o=>o.toLowerCase()).includes(a)&&n.push(i)}},r),n}else if(t[0]==="`"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.TEXT_NODE){let a=t.slice(1);node.nodeValue.includes(a)&&n.push(i)}},r),n}else if(t[0]==="!"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE&&typeof i.click=="function"){let a=i.tagName.toLowerCase();["html","head","meta","link","style","script"].includes(a)||a.includes(t.slice(1).toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="@"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let a of i.attributes){let o=a.value.split(/[ ]+/g),u=t.slice(1);for(let _ of o)if(Il(_)&&_.includes(u)){n.push(i);break}}},r),n}else if(t[0]==="-"){let n={};return await N(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let a of i.attributes)if(a.name.startsWith("data-")){let c=a.name.slice(5);if(c.includes(t.slice(1))){let o=a.value;try{o=JSON.parse(o)}catch{}n[c]?n[c].push(o):n[c]=[o]}}}},r),n}else{if(t[0]==="*")return mf(e,r);if(t[0]==="&"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let a of i.attributes){let o=a.value.split(/[ ]+/g),u=t.slice(1);for(let _ of o)Il(_)&&_.includes(u)&&n.push(gf(_))}},r),n}else if(t.slice(0,2)==="?:"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let a of i.attributes)if(t.slice(2).toLowerCase()===a.name.toLowerCase()){n.push(i);break}}},r),n}else if(t.slice(0,2)===":?"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let a of i.attributes)if(a.value.includes(t.slice(2))){n.push(i);break}}},r),n}else if(t.slice(0,3)==="</>"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let a=node.nodeValue.toLowerCase();if(!Al.has(a)){let c=t.slice(3);a.includes(c.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="<>"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let a=node.nodeValue.toLowerCase();if(Al.has(a)){let c=t.slice(2);a.includes(c.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="//"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.COMMENT_NODE){let a=t.slice(2);node.nodeValue.toLowerCase().includes(a.toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="/"){let n=t.split("/").filter(l=>l!==""),i=Dl(document,n);return i.length===0?await Fs(e,new RegExp(t),r):i}else if(t.includes("/")){let n=t.split("/").filter(i=>i!=="");return Ll(document,n)}else{let n=[];return await N(e,async(i,l)=>{(i.tagName?i.tagName.toLowerCase()===t.toLowerCase():!1)&&n.push(i)},r),n}}else{if(t instanceof RegExp)return await Fs(e,t,r);{let n=[];return is_async(t)?await N(e,async(i,l)=>{await t(i,l)&&n.push(i)},r):await N(e,async(i,l)=>{t(i,l)&&n.push(i)},r),n}}},bf=new Proxy(document,{get(e,t,r){return df.has(t.toLowerCase())||t[0]==="*"||t[0]==="&"||t[0]==="-"||t[0]==="#"||t[0]==="."||t[0]==="?"||t[0]===":"||t[0]==="@"||t[0]==="!"||t[0]==="<"||t.includes("/")?Ol(document,t):Reflect.get(e,t,r)}});Rl.exports={plget:Dl,plinget:Ll,filter_on_tag_or_attr_key_with_rgx:Fs,filter:Ol,$:bf}});var Nt=h((vd,jl)=>{var yf=Et(),wf=(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("")},$f=e=>e.replace(/-/g,"_"),vf=(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,kf=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},xf=e=>yf.parse_from_str(e+" ");jl.exports={dash_to_camel:wf,dash_to_snake:$f,attr_value_to_bool:vf,css_str_to_num:kf,parse_json_input:xf}});var Yl=h((kd,Wl)=>{var Bl=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),Sf=()=>new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})}),Tf=async e=>{for(let t=0;t<e;++t)await Bl()},Ef=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),At=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])}},Ml=()=>new At,Fl=Ml(),Cf=(e,t,r=300)=>{Fl.run(e,t,r)},qf=e=>{Fl.cancel(e)};Wl.exports={wait_for_layout_ready:Bl,wait_for_paint_ready:Sf,wait_for_n_raf:Tf,wait:Ef,SimpleDebounce:At,creat_simple_debounce:Ml,simple_debounce:Cf,cancel_simple_debounce:qf}});var Ul=h((xd,Gl)=>{var{dash_to_camel:It}=Nt(),Hl=(e,t,r=!1)=>{let n=It(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}})},Nf=(e,t)=>{for(let r of t)Hl(e,r,!1)},Af=e=>{for(let t in DYN_CLSES){{let n="all"+It(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=It(n,!0),l="get"+It(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(a){let c=this.shadowRoot;return c?c.querySelector(`.${t}[${n}="${a}"]`):null})}}};Gl.exports={add_one_fixed_element_getter:Hl,add_fixed_element_getters:Nf,add_dyn_element_getters:Af}});var Vl=h((Sd,zl)=>{var If=Et(),{dash_to_snake:Df,css_str_to_num:Lf}=Nt(),Of=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=Df(n),l=t[n],a=l.type;e.prototype.hasOwnProperty(i)||(a==="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")}}):a==="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(a)&&a.includes("cssnum")&&a.includes("number")?Object.defineProperty(e.prototype,i,{get:function(){return Lf(this.getAttribute(n))},set:function(c){isNaN(Number(c))?this.setAttribute(n,c):this.setAttribute(n,String(c)+"px")}}):a==="json"?Object.defineProperty(e.prototype,i,{get:function(){let c=this.getAttribute(n);return c?If.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)}}))}};zl.exports={add_attr_accessors_to_cls:Of}});var Jl=h((Td,Xl)=>{var Ys=class{css=`
1
+ var nvbasicbw=(()=>{var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var x=h((Ih,hr)=>{var pa=Symbol("empty"),Fe=Symbol("unknown"),rr=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null,nr=/^[\-\+]?[0-9]+$/,ir=/^\+?[0-9]+$/,ga=/^[\-\+]?0[bB][0-1]+$/,ma=/^[\-\+]?0[oO][0-7]+$/,lr=/^[\-\+]?0[xX][0-9a-fA-F]+$/,ba=e=>nr.test(e)||lr.test(e),er={"0b":2,"0o":8,"0x":16,2:"0b",8:"0o",16:"0x"},ya=/^[\-\+]?[0-9]+n$/,wa=/^[\-\+]?0[bB][0-1]+n$/,$a=/^[\-\+]?0[oO][0-7]+n$/,va=/^[\-\+]?0[xX][0-9a-fA-F]+n$/,ar=e=>ya.test(e)||wa.test(e)||$a.test(e)||va.test(e),_e={Integer:6,Float:7,BigInt:8,PosInfinity:9,NegInfinity:10,NaN:11,6:"Integer",7:"Float",8:"BigInt",9:"PosInfinity",10:"NegInfinity",11:"NaN"},or=(e,t=!1)=>{let r={value:void 0,type:void 0};return e==="+Infinity"||e==="Infinity"?(r.value=1/0,r.type=_e.PosInfinity):e==="-Infinity"?(r.value=-1/0,r.type=_e.NegInfinity):(e==="NaN"||e==="+NaN"||e==="-NaN")&&(r.value=NaN,r.type=_e.NaN),t?r:r.value},ka=e=>{let t,r,n;e[0]==="+"||e[0]==="-"?(t=e[0],r=er[e.slice(1,3).join("").toLowerCase()],n=e.slice(3).join("").toLowerCase()):(t="+",r=er[e.slice(0,2).join("").toLowerCase()],n=e.slice(2).join("").toLowerCase());let i=parseInt(n,r);return t==="+"?+i:-i},cr=e=>{let t=Array.from(e);if(nr.test(e))return parseInt(e);if(ga.test(e)||ma.test(e)||lr.test(e))return ka(t)},xa=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}},Sa=(e,t)=>e.length===0||t==="."||t==="-."||t==="+."||t==="+"||t==="-",Ta=()=>({be:{sign:"",bd:"",dot:"",ad:""},ae:{sign:"",bd:"",dot:"",ad:""},state:"init"}),tr=(e,t,r,n)=>((e[r]==="-"||e[r]==="+")&&(t[n].sign=e[r],r=r+1),[e,r]),Ea=(e,t,r,n)=>{if(t.state=n+"bd",e[r]===".")t[n].bd="0",t[n].dot=".",t.state=n+"ad";else if(ir.test(e[r]))t[n].bd=e[r];else return[!0,r];return[!1,r+1]},sr=(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(ir.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]},ur=e=>{let t=Ta(),r=Array.from(e);if(Sa(r,e))return;let n=0,i=!1;if([r,n]=tr(r,t,n,"be"),[i,n]=Ea(r,t,n,"be"),!i&&([i,n]=sr(r,t,n,"be"),!i&&([r,n]=tr(r,t,n,"ae"),[i,n]=sr(r,t,n,"ae"),!i)))return xa(t)},_r=(e,t=!1)=>{let r={value:void 0,type:void 0};if(ar(e))r.value=BigInt(e.substr(0,e.length-1)),r.type=_e.BigInt;else{let n=cr(e);n!==void 0?(r.value=n,r.type=_e.Integer):(n=ur(e),n!==void 0?(r.value=n,r.type=_e.Float):(n=or(e,t=!0),n.value!==void 0&&(r=n)))}return t?r:r.value},Ca=(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(rr()&&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)}}},Me={UndefinedLiteral:0,NullLiteral:1,FalseLiteral:3,TrueLiteral:4,StringLiteral:12},qa={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1};function fr(e,t={only_value:!0,with_value:!0,with_type:!1,unknown_as_string:!1}){let r=JSON.parse(JSON.stringify(qa));Object.assign(r,t);let{only_value:n,with_value:i,with_type:l,unknown_as_string:a}=r,o={value:Fe,type:Fe};if(e==="undefined")o.value=void 0,o.type=Me.UndefinedLiteral;else if(e==="null")o.value=null,o.type=Me.NullLiteral;else if(e==="false")o.value=!1,o.type=Me.FalseLiteral;else if(e==="true")o.value=!0,o.type=Me.TrueLiteral;else{let c=_r(e,!0);c.type===void 0?a?(o.value=e,o.type=Me.StringLiteral):(o.value=e,o.type=Fe):(o.value=c.value,o.type=c.type)}return n?o.value:(l||delete o.type,i||delete o.value,o)}fr.unknown=Fe;var Na={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}};hr.exports={TYPE_DICT:Na,isNode:rr,empty:pa,unknown:Fe,is_bigint_str:ar,is_jsint_str:ba,NUM_TYPE_DICT:_e,parse_abnormal_num:or,parse_int:cr,parse_float:ur,parse_num:_r,parse0:fr,to_str:Ca}});var mr=h((Oh,gr)=>{var Ye={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 Aa(e){let t=Object.entries(e),r=new Map;return t.forEach(n=>r.set(n[1],n[0])),r}var Lt=Aa(Ye);function Ia(e){let t=Object.entries(e);return t=t.map(r=>[r[0],String.fromCharCode(r[1])]),Object.fromEntries(t)}var Oa=Ia(Ye),dr=e=>55296<=e&&e<=56319,Da=e=>56320<=e&&e<=57343,Ra=(e,t)=>(e-55296)*1024+(t-56320)+65536,pr=e=>e<=65535,La=e=>!pr(e),Pa=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}},ja=(e,t)=>dr(e)?t+2:t+1;gr.exports={CODE_DICT:Ye,CH_DICT:Oa,CODE_NAME_MP:Lt,cd2ch:e=>String.fromCharCode(e),ch2cd:e=>e.codePointAt(0),cd2n:e=>Lt.get(e),n2cd:e=>String.fromCharCode(Ye[e]),n2ch:e=>Ye[e],ch2n:e=>Lt.get(e.codePointAt(0)),is_high_code:dr,is_low_code:Da,get_code_point_from_high_low:Ra,get_high_low_from_code_point:Pa,is_length1_code_point:pr,is_length2_code_point:La,_next_code_index:ja}});var ke=h((Dh,S)=>{var{CODE_DICT:d,CH_DICT:y}=mr(),br=/\r\n?|[\n\u2028\u2029]/;S.exports.line_break_regexp=br;S.exports.line_break_regexp_g=new RegExp(br.source,"g");function yr(e){switch(e){case d.lineFeed:case d.carriageReturn:case d.lineSeparator:case d.paragraphSeparator:return!0;default:return!1}}function wr(e){switch(e){case y.lineFeed:case y.carriageReturn:case y.lineSeparator:case y.paragraphSeparator:return!0;default:return!1}}var Pt=[d.lineFeed,d.carriageReturn,d.lineSeparator,d.paragraphSeparator],$r=Pt.map(e=>String.fromCharCode(e));S.exports.NL_CODE_ARR=Pt;S.exports.NL_CH_ARR=$r;S.exports.is_nl_code=yr;S.exports.is_nl=wr;S.exports.skip_white_space_regexp=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function vr(e){switch(e){case 9:case 11:case 12:case d.space:case d.nonBreakingSpace:case d.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}}S.exports.is_non_nl_ws_code=vr;function kr(e){switch(e){case y.tab:case y.lineTab:case y.formFeed:case y.space:case y.nonBreakingSpace:case y.oghamSpaceMark:case y.enQuad:case y.emQuad:case y.enSpace:case y.emSpace:case y.threePerEmSpace:case y.fourPerEmSpace:case y.sixPerEmSpace:case y.figureSpace:case y.punctuationSpace:case y.thinSpace:case y.hairSpace:case y.narrowNoBreakSpace:case y.mediumMathematicalSpace:case y.ideographicSpace:case y.zeroWidthNoBreakSpace:return!0;default:return!1}}S.exports.is_non_nl_ws=kr;var jt=[d.tab,d.lineTab,d.formFeed,d.space,d.nonBreakingSpace,d.oghamSpaceMark,d.enQuad,d.emQuad,d.enSpace,d.emSpace,d.threePerEmSpace,d.fourPerEmSpace,d.sixPerEmSpace,d.figureSpace,d.punctuationSpace,d.thinSpace,d.hairSpace,d.narrowNoBreakSpace,d.mediumMathematicalSpace,d.ideographicSpace,d.zeroWidthNoBreakSpace];S.exports.NON_NL_WS_CODE_ARR=jt;var xr=jt.map(e=>String.fromCharCode(e));S.exports.NON_NL_WS_CH_ARR=xr;function Wa(e){return vr(e)||yr(e)}function ve(e){return kr(e)||wr(e)}S.exports.is_ws_code=Wa;S.exports.is_ws=ve;S.exports.WS_CHCODE_ARR=Pt.concat(jt);S.exports.WS_CH_ARR=$r.concat(xr);var Z={init:0,executing:1,succ:2,eof:3};S.exports.STATE_DICT=Z;function Ba(e,t=new Set){let r={g:e,rslt:"",state:Z.init},n=r.g.next().value;if(n===void 0)return r.state=Z.eof,r;for(;n!==void 0&&(ve(n)||t.has(n));)n=r.g.next().value;for(;n!==void 0&&!ve(n)&&!t.has(n);)r.rslt=r.rslt+n,n=r.g.next().value;return n===void 0?r.state=Z.eof:(ve(n)||t.has(n))&&(r.state=Z.succ),r}function Ma(e,t=0,r=new Set){let n={arr:e,pos:t,rslt:"",state:Z.init};for(let l=n.pos;l<e.length;l++){let a=e[l];if(ve(a)||r.has(a))n.pos=n.pos+1;else break}let i=n.pos;for(let l=n.pos;l<e.length;l++){let a=e[l];if(!ve(a)&&!r.has(a))n.pos=n.pos+1;else break}return n.pos===e.length?n.state=Z.eof:n.state=Z.succ,n.rslt=e.slice(i,n.pos).join(""),n}S.exports.from_generator=Ba;S.exports.from_charr=Ma});var ee=h((Rh,Nr)=>{var{WS_CH_ARR:Sr,NON_NL_WS_CH_ARR:Fa,NL_CH_ARR:Ya}=ke();function Ha(e){return Array.from(e).length}var Ua="\u200C",Tr="\u200D",Ga=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null;function Wt(e,t,...r){let n=function(){return t(this,...r)};Ga()?e.prototype[Symbol.for("nodejs.util.inspect.custom")]=n:e.prototype.repr=n}var W={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")},lt=Symbol("get_pair_lmp"),za=Symbol("add_pair_reserved"),He=class{#t;#e=new Map;#s=new Map;constructor(t){this.#t=t}get[lt](){return this.#e}get size(){return this.#e.size}[za](t,r){if(t===r)throw W.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 W.pair;this.#e.set(t,r),this.#s.set(r,t)}ldelete(t){if(this.size<2)throw W.cant_be_empty;{let r=this.#e.get(t);this.#e.delete(t),this.#s.delete(r)}}rdelete(t){if(this.size<2)throw W.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 Va(e){return new Map(e[lt])}Wt(He,Va);var Er=Symbol("get_single_set"),Cr=Symbol("add_single_reserved"),xe=class{#t;#e=new Set;constructor(t){this.#t=t}get[Er](){return this.#e}[Cr](t){this.#e.add(t)}add(t){this.#t.validate(t),this.#e.add(t)}delete(t){if(this.size<2)throw W.cant_be_empty;if(t==="`")throw W.tmpl_quote;this.#e.delete(t)}has(t){return this.#e.has(t)}[Symbol.iterator](){return this.#e[Symbol.iterator]()}};function Xa(e){return new Set(e[Er])}Wt(xe,Xa);var at=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 xe(this),this.#s.add('"'),this.#s.add("'"),this.#s.add("\xB7"),this.#s[Cr]("`"),this.#r=new xe(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 xe(this),this.#n.add(":"),this.#n.add("\uFF1A"),this.#n.add("="),this.#i=!0}get reserved(){return["/","*","#","&","`","\\"].concat(Sr)}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[lt])t.add(r);for(let r of this.#e[lt])t.add(r)}return t}validate(t){if(typeof t!="string"||Ha(t)!==1)throw W.char;if(this.reserved.includes(t))throw W.reserved;if(Array.from(this.inuse).flat().includes(t))throw W.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 Ya}get non_nl_ws(){return Fa}get ws(){return Sr}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]}},ot=class{constructor(t){this.reserved=t.reserved}get[Symbol.toStringTag](){return"reserved"}};Object.defineProperty(ot,"name",{value:Tr});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:Tr});var ut=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(ut,"name",{value:Ua});function Ja(e){return[new ct(e),new ut(e),new ot(e)]}Wt(at,Ja);var qr=new at;qr.ERROR_DICT=W;Nr.exports=qr});var Ir=h((Lh,Ar)=>{function*Ka(e){for(let t of e)yield t;e=null}Ar.exports.sync_gen_from_str=Ka});var I=h((Ph,Rr)=>{var Or={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 A(e){return e instanceof Object?e._self:e}function Qa(e){return e+1}function Za(e){return e+2}function eo(e){return e+3}function to(e){return e+6}function so(e){return e+5}function ro(e){return e+9}function no(e){return e+8}function Dr(e){return e%10!==0}var io={backslash:0,lcmt:1,blkcmt:2,quote:3,naked:4},lo={handling:0,handled:1};function ao(e,t,r){let n=Or;return e.$has_yield_sign()||Dr(r)||t===A(n.av)&&r===A(n.bv)||t===A(n.av)&&r===A(n.bk)||t===A(n.av)&&r===A(n.k)||t===A(n.av)&&r===A(n.v)||t===A(n.av)&&r===A(n.ak)||t===A(n.v)&&r===A(n.bv)||t===A(n.v)&&r===A(n.bk)}Rr.exports={STATE_DICT:Or,gtv:A,get_main_eofv_with_code:Qa,get_lcmt_eofv_with_code:Za,get_blkcmt_eofv_with_code:eo,get_hash_quote_eofv_with_code:to,get_hash_naked_eofv_with_code:so,get_ref_quote_eofv_with_code:ro,get_ref_naked_eofv_with_code:no,LEFTED_TYPE:io,AVND_CACHE_STATE_DICT:lo,is_eofv:Dr,is_should_yield:ao}});var zt=h((jh,Gr)=>{var{is_nl:jr}=ke(),Wr=(e,t,r=" ",n=!1)=>{let i=e.length;return i<=t?r.repeat(t-i)+e:n?e.substr(i-t):e},_t=(e,t,r,n="0",i=!1)=>{let l=e.toString(t);return Wr(l,r,n,i)},oo=/^[0-7]$/,co=/^[0-9a-fA-F]$/,fe=e=>oo.test(e),z=e=>co.test(e),ft={b:"\b",f:"\f",n:`
2
+ `,r:"\r",t:" ",v:"\v"},Br={"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\\":"\\\\"};function uo(e){return Br[e]}function Mr(e){return ft[e]}function _o(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\x"+_t(t,16,2)}function fo(e){e=Array.from(e);let t=e[0],r=e[1];if(z(t)&&z(r)){let n=parseInt("0x"+t+r);return String.fromCharCode(n)}}function ho(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\u"+_t(t,16,4)}function po(e){e=Array.from(e);let t=e[0],r=e[1],n=e[2],i=e[3];if(z(t)&&z(r)&&z(n)&&z(i)){let l=parseInt("0x"+t+r+n+i);return String.fromCharCode(l)}}function go(e){if(e.length>1)return;let t=e.charCodeAt(0);if(t>=0&&t<=255)return"\\"+_t(t,8,3)}function mo(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 p={init:0,executing:1,succ:2,eof:3,backslash:4,x:5,u:6,o:7};function*bo(e){let t=Array.from(e);for(let r of t)yield r}function*Lr(e,t){yield*t,yield*e}function Fr(e,t,r,n,i=!1){if(typeof t=="string"){let a=t;t=o=>o===a}if(typeof(r==="string")&&r.length>0){let a=bo(r);e=Lr(e,a)}else e=Lr(e,r);let l={state:p.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 Bt(e){return e.ch===void 0||e.end(e.ch)&&e.state!==p.backslash||e.state===p.x||e.state===p.u||e.state===p.o}function Mt(e,t=!1){return e.ch===e.esc?(e.state=p.backslash,e.curr=""):(e.state=p.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 Pr(e,t,r,n,i,l,a){return a===!0?n===Yr?(e.state=p.x,e.ch="\\x"+t.join(""),e):n===Hr?(e.state=p.u,e.ch="\\u"+t.join(""),e):(n===Ur&&(e.state=p.o,e.ch="\\"+t.join("")),e):i?(e.curr=t.join(""),l&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=r,e):(e.curr=n(t),l&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=r,e)}function yo(e,t,r,n,i){return e.curr=n(t),i&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function ht(e,t,r,n,i=!0,l=!1,a=void 0,o=!1){let c;if(a!==void 0?c=a:(c=e.g.next().value,c!==void 0&&(e.offset=e.offset+1)),c===void 0)return e;let u=0,_=[],f;if(l?f=!0:f=r(c),f)u=u+1,_.push(c);else return e.state=p.executing,e.ch=c,e;for(;u<t;){if(c=e.g.next().value,c===void 0)return Pr(e,_,c,n,i,o,tail=!0);if(e.offset=e.offset+1,f=r(c),f)u=u+1,_.push(c);else return Pr(e,_,c,n,i,o,tail=!1)}return yo(e,_,c,n,o)}function Yr(e){let t=parseInt("0x"+e[0]+e[1]);return String.fromCharCode(t)}function Hr(e){let t=parseInt("0x"+e[0]+e[1]+e[2]+e[3]);return String.fromCharCode(t)}function Ur(e){let t=parseInt(e.join(""),8);return String.fromCharCode(t)}function Ft(e,t=!1){return e.curr=Mr(e.ch),t&&(e.rslt=e.rslt+e.curr),e.state=p.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function Yt(e,t=!1){return ht(e,2,z,Yr,!0,!1,void 0,t)}function Ht(e,t=!1){return ht(e,4,z,Hr,!0,!1,void 0,t)}function Ut(e,t=!1){return ht(e,3,fe,Ur,!1,!0,e.ch,t)}function Gt(e,t=!1){return e.curr=e.ch,t&&(e.rslt=e.rslt+e.ch),e.state=p.executing,e.ch=e.g.next().value,e.ch!==void 0&&(e.offset=e.offset+1),e}function wo(e,t=i=>i==='"',r="",n="\\"){let i=Fr(e,t,r,n,!0);for(i.state=p.executing;!Bt(i);)i.state===p.executing?Mt(i,!0):i.state===p.backslash&&(jr(i.ch)?(i.ch=i.g.next().value,i.ch!==void 0&&(i.offset=i.offset+1),i.state=p.executing):i.ch in ft?Ft(i,!0):i.ch==="x"?Yt(i,!0):i.ch==="u"?Ht(i,!0):fe(i.ch)?Ut(i,!0):Gt(i,!0));return typeof i.ch=="string"&&i.end(i.ch)?(i.state=p.succ,i.ch=""):i.state===p.backslash?i.ch=i.esc:i.ch===void 0&&(i.state=p.eof,i.ch=""),i}function*$o(e){let t=e;for(t.state=p.executing;!Bt(t);)t.state===p.executing?(Mt(t,!1),t.curr!==""&&(yield t.curr)):t.state===p.backslash&&(jr(t.ch)?(t.state=p.executing,t.ch=t.g.next().value,t.ch!==void 0&&(t.offset=t.offset+1)):t.ch in ft?(Ft(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="x"?(Yt(t,!1),t.curr!==""&&(yield t.curr)):t.ch==="u"?(Ht(t,!1),t.curr!==""&&(yield t.curr)):fe(t.ch)?(Ut(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=p.succ,t.ch=""):t.state===p.backslash?(t.ch=t.esc,yield t.curr):t.ch===void 0&&(t.state=p.eof,t.ch=""),t}Gr.exports={CHAR_UNESC_DICT:ft,CHAR_ESC_DICT:Br,escc:uo,unescc:Mr,escx:_o,unescx:fo,escu:ho,unescu:po,esco:go,unesco:mo,STATE_DICT:p,from_generator:wo,init:Fr,handle_executing:Mt,is_terminated:Bt,handle_escc:Ft,esc_handle_engine:ht,handle_escx:Yt,handle_escu:Ht,handle_esco:Ut,handle_esc_other:Gt,gen:$o,prepend:Wr,prepend_num:_t,is_odigit_ch:fe,is_hdigit_ch:z}});var tn=h((Wh,en)=>{var{is_nl:vo}=ke(),Se=zt(),zr={line_comment:0,blk_comment:1},te={init:0,executing:1,succ:2,eof:3,asterisk:4};function Vr(e){return{state:te.init,g:e,rslt:"",ch:"",offset:0}}function Xr(e,t){return e.state=te.eof,e.rslt=e.rslt+t.rslt,e.ch="",e}function Jr(e,t){return e.state=te.succ,e.rslt=e.rslt+t.rslt,e.ch="",e}function Kr(e,t){return e.state=te.executing,e.rslt=e.rslt+t.rslt,e.ch=t.ch,e}function Qr(e,t=""){let r=Vr(e);r.state=te.executing;let n=Se.from_generator(r.g,vo,t);return r.offset=n.offset+r.offset,r.g=n.g,n.state===Se.STATE_DICT.eof?Xr(r,n):n.state===Se.STATE_DICT.succ?Jr(r,n):Kr(r,n)}function Zr(e,t=""){let r=Vr(e);r.state=te.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 Xr(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 Jr(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=te.asterisk,r}else return Kr(r,n)}return r}function ko(e,t,r=""){return t===zr.line_comment?Qr(e,r):Zr(e,r)}en.exports={TYPE_DICT:zr,STATE_DICT:te,lc_from_generator:Qr,blk_from_generator:Zr,from_generator:ko}});var Vt=h((Bh,sn)=>{function xo(e){if(globalThis.document===void 0){let i=globalThis.require("fs").readFileSync(e).toString();return JSON.parse(i)}else return}function So(e,t){if(globalThis.document===void 0){let n=globalThis.require("fs"),i=JSON.stringify(t);n.writeFileSync(e,i)}else return}function To(e){return parseInt(e).toString()===e}sn.exports={rjson:xo,wjson:So,is_int_str:To}});var Xt=h((Mh,rn)=>{var Eo=()=>Math.random()*9007199254740992;function Co(e,t){return Array.from({length:t-e}).map((r,n)=>n+e)}function qo(e,t){return t.filter((r,n)=>e.includes(n))}function No(e){return Object.entries(e).length===0}function Ao(e){return Object.entries(e).map(n=>n[1])}function Io(e){return Object.entries(e).map(n=>n[0])}function Oo(e){return Object.entries(e).length}function Do(e,t){for(let r in e)t(r,e[r]);return e}function Ro(e,t){for(let r in e)e[r]=t(r,e[r]);return e}function Lo(e,t){for(let r in t)e[r]=t[r];return e}function Po(e,t){for(let r in t)!(r in e)&&(e[r]=t[r]);return e}function jo(e,t,r){return r=r.filter(n=>n[e]!==t),r}function Wo(e,t,r){return r.findIndex(i=>i[e]===t)}function Bo(e){return JSON.parse(JSON.stringify(e))}function Mo(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 Fo(e){let t=e[0]!=="_",r=e[0]!=="$";return t&&r}rn.exports={gen_guid:Eo,range:Co,seqs_slct:qo,dict_length:Oo,is_empty_dict:No,dict_values:Ao,dict_keys:Io,dict_map:Ro,dict_foreach:Do,dict_plus:Lo,dict_update:Po,dtb_kv_rm:jo,dtb_kv_get_seq:Wo,dcp:Bo,mat_map:Mo,is_cu_property:Fo}});var os=h((Fh,Nn)=>{var v=Xt();function Qt(e){if(v.is_empty_dict(e))return 0;{let t=v.dict_keys(e);return Math.max(...t)+1}}function Ue(e){return e!=null}function ln(e,t){return e._id=e._id+t,e._tree=e._tree+t,Ue(e._fstch)&&(e._fstch=e._fstch+t),Ue(e._lsib)&&(e._lsib=e._lsib+t),Ue(e._rsib)&&(e._rsib=e._rsib+t),Ue(e._parent)&&(e._parent=e._parent+t),e}function he(e,t){let r=Qt(e);for(let n in t){let i=ln(t[n],r);t[i._id]=i,delete t[n]}return t}function Yo(e=0){let t=e;return{_id:t,_fstch:null,_lsib:null,_rsib:null,_parent:null,_tree:t}}function Ho(e,t=0){return{_id:Qt(e)+t,_fstch:null,_lsib:void 0,_rsib:void 0,_parent:void 0,_tree:void 0}}function an(e){return e._tree!==void 0}function se(e){let t=e._tree!==void 0,r=e._tree===e._id;return t&&r}function Zt(e){return e._lsib===null}function es(e){return e._rsib===null}function B(e){return e._fstch===null}function on(e,t){if(se(e))return!0;{let n=k(e,t);return F(n,t).length===1}}function Xe(e){return se(e)||!an(e)}function dt(e,t,r){if(!Xe(t))return console.log("only root or uninited could be prepend"),e;let n=B(e);if(t._tree=e._tree,t._lsib=null,n)t._rsib=null,t._parent=e._id;else{let i=r[e._fstch];i._lsib=void 0,t._rsib=i._id,t._parent=void 0}return e._fstch=t._id,r[t._id]=t,e}function ts(e,t,r){if(!Xe(t))return console.log("only root or uninited could be append"),e;let n=B(e);if(t._tree=e._tree,t._rsib=null,n)e._fstch=t._id,t._lsib=null;else{let i=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 ss(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(se(e))return console.log("cant addrsib to root"),e;let n=es(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 cn(e,t,r){if(!Xe(t))return console.log("only root or uninited could be add"),e;if(se(e))return console.log("cant addlsib to root"),e;let n=Zt(e);if(t._tree=e._tree,n){let i=k(e,r);e._lsib=void 0,t._lsib=null,i._fstch=t._id}else{let i=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 un(e,t,r,n){let i=F(t,n),l=i.length;if(l===0)return dt(t,r,n);if(e<=l&&e>=0){if(e===0)return dt(t,r,n);if(e===l)return ts(t,r,n);{let o=i[e-1];return ss(o,r,n)}}else return console.log("not in range!!"),t}function Te(e,t){for(let r in t)t[r]._tree=e._tree}function Uo(e,t,r){r=he(t,r);let n=v.dict_keys(r)[0],i=ne(r[n],r);return e=dt(e,i,t),Te(e,r),v.dict_plus(t,r),e}function Go(e,t,r){r=he(t,r);let n=v.dict_keys(r)[0],i=ne(r[n],r);return e=ts(e,i,t),Te(e,r),v.dict_plus(t,r),e}function zo(e,t,r){r=he(t,r);let n=v.dict_keys(r)[0],i=ne(r[n],r);return e=ss(e,i,t),Te(e,r),v.dict_plus(t,r),e}function Vo(e,t,r){r=he(t,r);let n=v.dict_keys(r)[0],i=ne(r[n],r);return e=cn(e,i,t),Te(e,r),v.dict_plus(t,r),e}function Xo(e,t,r,n){n=he(r,n);let i=v.dict_keys(n)[0],l=ne(n[i],n);return t=un(e,t,l,r),Te(t,n),v.dict_plus(r,n),t}function Ge(e,t){let r=Y(e,t),n=r[0]._id;return r.forEach(i=>{i._tree=n}),r}function ze(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 Ve(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function Ee(e,t){if(se(e))return[e,t];if(on(e,t)){let n=t[e._parent];_n(n);let i=Ge(e,t),l=ze(i,t);return Ve(e),[e,l]}else if(Zt(e)){let n=P(e,t);n._lsib=null;let i=k(e,t);i._fstch=e._rsib;let l=Ge(e,t),a=ze(l,t);return Ve(e),[e,a]}else if(es(e)){let n=M(e,t);n._rsib=e._rsib,n._parent=e._parent;let i=Ge(e,t),l=ze(i,t);return Ve(e),[e,l]}else{let n=M(e,t);n._rsib=e._rsib;let i=Ge(e,t),l=ze(i,t);return Ve(e),[e,l]}}function Jo(e,t){let r=de(e,t);return r===null?[e,t]:Ee(r,t)}function Ko(e,t){let r=pe(e,t);return r===null?[e,t]:Ee(r,t)}function Qo(e,t,r){let n=fn(e,t,r);return n===null?[t,r]:Ee(n,r)}function Zo(e,t,...r){let n=hn(e,t,...whiches);for(let i=0;i<n.length;i++)Ee(n[i],t);return[e,t]}function ec(e,t){let r=F(e,t);for(let n=0;n<r.length;n++)Ee(r[n],t);return t}function de(e,t){return e._fstch===null?null:t[e._fstch]}function F(e,t){let r=[],n=de(e,t);for(;n!==null;)r.push(n),n=P(n,t);return r}function pe(e,t){let r=F(e,t);return r.length===0?null:r[r.length-1]}function fn(e,t,r){let n=F(t,r);return n.length===0||e>n.length-1||e<0?null:n[e]}function hn(e,t,...r){let n=F(e,t),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let a=r[l];a>n.length-1||a<0||i.push(n[a])}return i}function dn(e,t,r=!1){let n=e,i=P(e,t);for(;i!==null;)n=i,i=P(i,t);return r||n._id!==e._id?n:null}function tc(e,t){let r=re(e,t,!0),n=v.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 sc(e,t){let r=re(e,t,!0),n=v.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 re(e,t,r=!1){let n=k(e,t),i;return n!==null?i=F(n,t):i=[e],r||(i=v.dtb_kv_rm("_id",e._id,i)),i}function rc(e,t,r=!1){let n=re(e,t,!0);return r?n[0]:n[0]._id===e._id?null:n[0]}function nc(e,t,r){let n=re(t,r,!0),i=n.length;return e<=i-1&&e>=0?n[e]:null}function ic(e,t,...r){let n=re(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let a=r[l];a>n.length-1||a<0||i.push(n[a])}return i}function lc(e,t){let r=re(e,t,!0);return v.dtb_kv_get_seq("_id",e._id,r)}function M(e,t){let r=re(e,t,!0),n=v.dtb_kv_get_seq("_id",e._id,r);return n===0?null:r[n-1]}function P(e,t){return e._rsib===null?null:t[e._rsib]}function C(e,t){return pt(e,t,!0).length-1}function pn(e,t){let r=C(e,t),i=Y(e,t).map(a=>C(a,t));return Math.max(...i)-r+1}function ac(e,t){return B(e)?null:C(e,t)+1}function oc(e,t){if(B(e))return null;{let n=C(e,t),l=Y(e,t).map(o=>C(o,t));return Math.max(...l)}}function cc(e,t,r){let n=C(t,r);return pn(t,r)<=e?null:n+e}function gn(e,t){let r=ne(e,t),n=Y(r,t),i=C(e,t);return n.filter(a=>C(a,t)===i)}function Jt(e,t){let r=gn(e,t);return v.dtb_kv_get_seq("_id",e._id,r)}function uc(e,t){return Y(e,t).length}function ne(e,t){let r=e,n=k(e,t);for(;n!==null;)r=n,n=k(n,t);return r}function k(e,t){let r;if(se(e))r=null;else{let n=dn(e,t,!0);r=t[n._parent]}return r}function pt(e,t,r=!1){let n=[],i=k(e,t);for(;i!==null;)n.push(i),i=k(i,t);return r&&n.unshift(e),n}function _c(e,t,r){let n=pt(t,r,!0),i=n.length;return e<i&&e>=0?n[e]:null}function fc(e,t,...r){let n=pt(e,t,!0),i=[];if(n.length!==0)for(let l=0;l<r.length;l++){let a=r[l];a>n.length-1||a<0||i.push(n[a])}return i}function mn(e,t){let r=k(e,t);for(;r!==null;){let n=P(r,t);if(n!==null)return n;r=k(r,t)}return null}function bn(e,t){let r=de(e,t);if(r!==null)return r;{let n=P(e,t);return n!==null?n:mn(e,t)}}function yn(e,t){let r=e,n=pe(e,t);for(;n!==null;)r=n,n=pe(n,t);return r}function hc(e,t){if(se(e))return null;if(B(e)){let n=M(e,t);return n!==null?n:k(e,t)}else{let n=M(e,t);return n!==null?B(n)?n:yn(n,t):k(e,t)}}function Y(e,t){let r=C(e,t),n=[];for(;e!==null&&(n.push(e),e=bn(e,t),!(e!==null&&C(e,t)<=r)););return n}function rs(e,t){let r=e,n=de(e,t);for(;n!==null;)r=n,n=de(n,t);return r}function wn(e,t){let r=P(e,t);return r===null?k(e,t):rs(r,t)}function $n(e,t){let r=k(e,t);for(;r!==null;){let n=M(r,t);if(n!==null)return n;r=k(r,t)}return null}function dc(e,t){if(B(e)){let n=M(e,t);return n===null?$n(e,t):n}else return pe(e,t)}function vn(e,t){let r=[],n=rs(e,t);for(;n!==null&&(r.push(n),n._id!==e._id);)n=wn(n,t);return r}function Kt(e){v.dict_foreach(e,(t,r)=>{e[t]._$visited=!1})}function kn(e,t){let r=e._$visited;if(B(e))if(r){let i=P(e,t);return i===null?k(e,t):i}else return e._$visited=!0,e;else if(r){let i=P(e,t);return i===null?k(e,t):i}else return e._$visited=!0,de(e,t)}function pc(e,t,r){if(B(t)){if(e)return t;{let i=M(t,r);return i===null?k(t,r):i}}else{if(e)return pe(t,r);{let i=M(t,r);return i===null?k(t,r):i}}}function xn(e,t){return t._$visited&&e===t._id}function Sn(e,t,r=!1,n=!0){let i=[];Kt(t);let l=e._id;for(;!xn(l,e);)r?i.push(v.dcp(e)):i.push(e),e=kn(e,t);return r?i.push(v.dcp(e)):i.push(e),n&&Kt(t),i}function gc(e,t){let r={};r._depth=C(e,t),r._breadth=Jt(e,t);let n=k(e,t);return r._pbreadth=n===null?null:Jt(n,t),r._id=e._id,r}function nn(e){let t={};return t.ele={},t.nd=e,t.ele._id=e._id,t.ele._children=[],t}function ns(e,t){let r=[],n=e[0],i=[nn(n)];for(i[0].ele._pbreadth=null;i.length>0;){let l=[];for(let o=0;o<i.length;o++){i[o].ele._breadth=o,i[o].ele._depth=r.length;let c=F(i[o].nd,t);c=c.map(u=>nn(u)),c.forEach((u,_)=>{u.ele._pbreadth=i[o].ele._breadth,i[o].ele._children.push([r.length+1,l.length+_])}),l=l.concat(c)}let a=i.map(o=>o.ele);r.push(a),i=l}return r}function Tn(e,t){return vn(e[0],t)}function En(e,t,r=!1,n=!0){return Sn(e[0],t,r,n)}function mc(e,t){let r=is(e,t);return ns(r,t)}function is(e,t){let r=e[e.length-1];return Y(r,t)}function bc(e,t,r=!1,n=!0){let i=is(e,t);return En(i,t,r,n)}function yc(e,t){let r=ls(e,t);return ns(r,t)}function ls(e,t){let r=e[0];return Y(r,t)}function wc(e,t){let r=ls(e,t);return Tn(r,t)}function as(e,t,r=!1){let n=Y(e,t);return r||n.splice(0,1),n}function $c(e,t){return F(e,t)}function vc(e,t){let r=as(e,t,!1),n=sdfs.map(l=>C(l,t)),i=Math.max(...n);return r=r.filter(l=>C(l,t)===i),r}function Cn(e,t,r){let n=C(t,r),i=as(t,r,!1),l=sdfs.map(a=>C(a,r));return i=i.filter(a=>C(a,r)===n+e),i}function kc(e,t,...r){let n=r.map(i=>Cn(i,e,t));return n=Array.prototype.concat(...n),n}function qn(e){let t=v.dict_keys(e)[0],r=e[t];return ne(r,e)}function xc(e){let t=qn(e);return Y(t,e)}Nn.exports={calc_next_id:Qt,update_nodes_ids:he,creat_root:Yo,creat_nd:Ho,is_inited:an,is_root:se,is_fstch:Zt,is_lstch:es,is_leaf:B,is_lonely:on,is_id:Ue,is_connectable:Xe,prepend_child:dt,append_child:ts,insert_child:un,add_rsib:ss,add_lsib:cn,get_fstch:de,get_rsib:P,get_children:F,get_lstch:pe,get_which_child:fn,get_some_children:hn,get_fstsib:rc,get_lstsib:dn,get_preceding_sibs:tc,get_following_sibs:sc,get_sibs:re,get_which_sib:nc,get_some_sibs:ic,get_sibseq:lc,get_lsib:M,get_rsib:P,get_lyr:gn,get_breadth:Jt,get_count:uc,get_depth:C,get_height:pn,get_fst_lyr_des_depth:ac,get_lst_lyr_des_depth:oc,get_which_lyr_des_depth:cc,get_root:ne,get_parent:k,get_ances:pt,get_which_ance:_c,get_some_ances:fc,get_rsib_of_fst_ance_having_rsib:mn,get_sdfs_next:bn,get_drmost_des:yn,get_sdfs_prev:hc,get_sdfs:Y,get_lsib_of_fst_ance_having_lsib:$n,get_dlmost_des:rs,get_edfs_next:wn,get_edfs_prev:dc,get_edfs:vn,clear_$visited:Kt,get_sedfs_next:kn,is_sedfs_traverse_finished:xn,get_sedfs_prev:pc,get_sedfs:Sn,get_deses:as,get_fst_lyr_deses:$c,get_lst_lyr_deses:vc,get_which_lyr_deses:Cn,get_some_lyrs_deses:kc,nd2ele:gc,sdfs2mat:ns,sdfs2edfs:Tn,sdfs2sedfs:En,edfs2mat:mc,edfs2sdfs:is,edfs2sedfs:bc,sedfs2mat:yc,sedfs2sdfs:ls,sedfs2edfs:wc,update_disconnected_nodes:Ge,update_orig_nodes:ze,leafize:_n,rootize:Ve,disconnect:Ee,rm_fstch:Jo,rm_lstch:Ko,rm_which:Qo,rm_some:Zo,rm_all:ec,update_treeid:Te,update_one_nodeid:ln,update_nodes_ids:he,prepend_child_tree:Uo,append_child_tree:Go,add_rsib_tree:zo,add_lsib_tree:Vo,insert_child_tree:Xo,get_root_via_tree:qn,tree2sdfs:xc}});var Rn=h((Yh,Dn)=>{function An(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 In=An();function On(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 In(n,i);return this.dispatchEvent(l),l}}return t}var Sc=On();Dn.exports={creat_event_cls:An,E:In,creat_event_target_cls:On,ET:Sc}});var fi=h((Hh,_i)=>{var Xn=Vt(),Ke=Xt(),ge=os(),{ET:Ln}=Rn(),Tc=["_fstch","_lsib","_rsib","_parent","_tree"];function Jn(e){return e._tree!==void 0}function cs(e){return e._tree===e}function Ec(e){return e._lsib===null}function Cc(e){return e._rsib===null}function qc(e){return e._fstch===null}function Nc(e){return e.$sibs(!0).length===1}function vt(e){return cs(e)||!Jn(e)}function Pn(e){let t=e._fstch,r=t;for(;t!==null;)r=t,t=t._rsib;return r}function jn(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 Wn(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 us(e){let t=[],r=0,n=e._fstch;for(;;){if(n===null)return t;t.push(n),n=n._rsib,r=r+1}}function Ac(e){let t=0,r=e._fstch;for(;;){if(r===null)return t;r=r._rsib,t=t+1}}function Kn(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=_s(e);if(r===null)return t?e:null;{let n=r._fstch;return t||n!==e?n:null}}function Ic(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 ds(e){let t=[],n=kt(e,!0);for(;n!==null;){if(n===e)return t;t.push(n),n=n._rsib}}function Qn(e){let t=[],r=e._rsib;for(;r!==null;)t.push(r),r=r._rsib;return t}function Zn(e,t=!1){let r=ds(e),n=Qn(e),i=[e],l;return t?l=r.concat(i,n):l=r.concat(n),l}function Oc(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 Dc(e,...t){return Zn(e,!0).filter((i,l)=>t.includes(l))}function Bn(e){return ds(e).length}function Rc(e,t=!1){return e.$sibs(t).length}function _s(e){return Kn(e,!0)._parent}function Lc(e){let t=e,r=e;for(;t!==null;)r=t,t=t.$parent();return r}function Pc(e,t){let r=0,n=t;for(;n!==null;){if(r===e)return n;n=n.$parent(),r=r+1}return null}function wt(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 jc(e,...t){return wt(e,!0).filter((i,l)=>t.includes(l))}function Wc(e,t=!1){return wt(e,t).length}function Bc(e){let t=e.$parent();return t===null?null:t.$lsib()}function Mc(e){let t=e.$parent();return t===null?null:t.$rsib()}function Fc(e){let t=e.$luncle();return e.$is_fstch()?t===null?null:t.$lstch():null}function Yc(e){let t=e.$runcle();return e.$is_lstch()?t===null?null:t.$fstch():null}function Hc(e){let r=e.$root().$sdfs(),n=e.$depth();return r.filter(l=>l.$depth()===n)}function Uc(e){let t=e.$parent();return t===null?null:t.$breadth()}function Gc(e){return e.$lyr().indexOf(e)}function zc(e){let t=e.$sdfs();return t=t.filter(r=>r.$is_leaf()),t.length}function Vc(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 Mn(e,t=!1){let r=ti(e),n=be(e),i=n.indexOf(r);return t?n.slice(0,i+1):n.slice(1,i+1)}function Xc(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 Jc(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 Kc(e,...t){let r=e.$depth(),n=t.map(a=>a+r),i=e.$deses(!1),l=i.map(a=>a.$depth());return i=i.filter(a=>n.includes(a.$depth())),i}function fs(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 hs(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 ei(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 Qc(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 Fn(e,t,r){let n=us(t),i=n.length;if(i===0)r=fs(t,r);else if(!(e<=i&&e>=0))console.log("not in range!!");else if(e===0)r=fs(t,r);else if(e===i)r=hs(t,r);else{let a=n[e-1];r=ei(a,r)}return r}function Zc(e){let t=e.$parent();for(;t!==null;){let r=t.$rsib();if(r!==null)return r;t=t.$parent()}return null}function eu(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 ti(e){let t=e,r=e.$lstch();for(;r!==null;)t=r,r=r.$lstch();return t}function tu(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 su(e){let t=e,r=e.$fstch();for(;r!==null;)t=r,r=r.$fstch();return t}function ru(e){let t=e.$rsib();return t===null?e.$parent():t.$dlmost_des()}function nu(e){let t=e.$parent();for(;t!==null;){let r=t.$lsib();if(r!==null)return r;t=t.$parent()}return null}function iu(e){if(e.$is_leaf()){let r=e.$lsib();return r===null?e.$lsib_of_fst_ance_having_lsib():r}else return e.$lstch()}function lu(e){let t=[],r=e.$dlmost_des();for(;r!==null&&(t.push(r),r!==e);)r=r.$edfs_next();return t}function si(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 au(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 ou(e){e.$sdfs().forEach(r=>{delete r.$visited})}function cu(e,t){return t.$visited&&e===t}function Yn(e){ou(e);let t=[],r=new Set,n=e;for(;!cu(n,e);)r.has(e)?e.$close_at=t.length:(e.$open_at=t.length,r.add(e)),t.push(e),e=si(e);return n.$close_at=t.length,t.push(n),t.forEach(i=>{delete i.$visited}),t}function uu(e){return e._fstch=null,e}function gt(e){return e._lsib=null,e._rsib=null,e._parent=null,e}function mt(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();uu(r);let n=mt(e);return gt(e),e}else if(e.$is_fstch()){let r=e.$rsib();r._lsib=null;let n=e.$parent();n._fstch=e._rsib;let i=mt(e);return gt(e),e}else if(e.$is_lstch()){let r=e.$lsib();r._rsib=e._rsib,r._parent=e._parent;let n=mt(e);return gt(e),e}else{let r=e.$lsib();r._rsib=e._rsib;let n=mt(e);return gt(e),e}}function Hn(e){let t={};return t._nd=e,t._children=[],t}function Un(e){let t=[],r=e[0],n=[Hn(r)];for(n[0]._pbreadth=null;n.length>0;){let i=[];for(let a=0;a<n.length;a++){n[a]._breadth=a,n[a]._depth=t.length;let o=n[a]._nd.$children();o=o.map(c=>Hn(c)),o.forEach((c,u)=>{c._pbreadth=n[a]._breadth,n[a]._children.push([t.length+1,i.length+u])}),i=i.concat(o)}let l=n;t.push(l),n=i}return t}function Gn(e,t="_children"){let r=e._nd,n={};n[t]=[],n.$guid=r.$guid;for(let i in r)Ke.is_cu_property(i)&&(n[i]=r[i]);return n}function _u(e,t="_children"){let r=e[0][0],n=Gn(r,t),i=[{d:n,ele:r}];for(;i.length>0;){let l=[];for(let a=0;a<i.length;a++){let o=i[a],c=o.d,u=o.ele,f=o.ele._children.map(m=>e[m[0]][m[1]]);for(let m=0;m<f.length;m++){let b=f[m],E=Gn(b,t);c[t].push(E);let Ks={d:E,ele:b};l.push(Ks)}}i=l}return n}function zn(e,t="_children"){let r=new V;e.$guid!==void 0&&(r.$guid=e.$guid);for(let n in e)Ke.is_cu_property(n)&&t!==n&&(r[n]=e[n]);return r}function fu(e,t="_children"){let r=zn(e,t),n=[{d:e,nd:r}];for(;n.length>0;){let i=[];for(let l=0;l<n.length;l++){let a=n[l].d,o=n[l].nd,c=a[t]===void 0?[]:a[t];for(let u=0;u<c.length;u++){let _=c[u],f=zn(_,t);o.$append_child(f);let m={d:_,nd:f};i.push(m)}}n=i}return r}function hu(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 du(e,t,r){let n=e.$depth();return" ".repeat(n)+"["+r.indexOf(e)+"] : "+e.$guid}function pu(e,t){let r=e.$depth(),n=" ".repeat(r),i="";return t===e.$open_at&&(i=n+"<"+e._id+" : "+e.$guid+">"),t===e.$close_at&&(i=n+"</"+e._id+" : "+e.$guid+">"),i}var gu=["$fstch","$rsib","$parent"];function mu(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 bu(e){return e.$sdfs().map(n=>n.$sdfs_next_action_for_srch())}var ri={$fstch:"$append_child",$rsib:"$add_rsib",$parent:"$parent"};function yu(e,t){for(let r=0;r<t.length;r++){let n=ri[t[r]];e=e[n]()}return e}function wu(e){let t=new V,r=t;for(let n=0;n<e.length;n++){let i=e[n];r=yu(r,i)}return t}function $u(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 D=class{#t=null;#e={with_id:!1,with_et:!1};constructor(t=!1,r=!1){hu(this),this._fstch=null,this.#e.with_id=t,this.#e.with_et=r,t&&(this.$guid=Ke.gen_guid()),r&&(this.#t=new Ln)}get opt(){return this.#e}enable_et(){this.#t=new Ln}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 Jn(this)}$is_root(){return cs(this)}$is_fstch(){return Ec(this)}$is_lstch(){return Cc(this)}$is_leaf(){return qc(this)}$is_lonely(){return Nc(this)}$fstch(){return this._fstch}$lstch(){return Pn(this)}$which_child(t){return jn(t,this)}$some_children(...t){return Wn(this,...t)}$children(){return us(this)}$children_count(){return Ac(this)}$rsib(){return this._rsib}$lsib(){return Ic(this)}$fstsib(t=!1){return kt(this,t)}$lstsib(t=!1){return Kn(this,t)}$psibs(){return ds(this)}$fsibs(){return Qn(this)}$which_sib(t){return Oc(t,this)}$some_sibs(...t){return Dc(this,...t)}$sibseq(){return Bn(this)}$sibs(t=!1){return Zn(this,t)}$sibs_count(t=!1){return Rc(this,t)}$parent(){return _s(this)}$root(){return Lc(this)}$ances(t=!1){return wt(this,t)}$which_ance(t){return Pc(t,this)}$some_ances(...t){return jc(this,...t)}$ances_count(t=!1){return Wc(this,t)}$prepend_child(t){return t=t===void 0?new D(this.#e.with_id,this.#e.with_et):t,fs(this,t)}$insert_child(t,r){return r=r===void 0?new D(this.#e.with_id,this.#e.with_et):r,Fn(t,this,r)}$append_child(t){return t=t===void 0?new D(this.#e.with_id,this.#e.with_et):t,hs(this,t)}$clone(){if(cs(this)){let t=yt(this);return $t(t)}else{let t=Bn(this),r=_s(this);me(this);let n=yt(this),i=$t(n);return Fn(t,r,this),i}}$append_children(t,r){let n=[];for(let i=0;i<t;i++){let l=r===void 0?new D(this.#e.with_id,this.#e.with_et):r.$clone();l=hs(this,l),n.push(l)}return n}$add_rsib(t){return t=t===void 0?new D(this.#e.with_id,this.#e.with_et):t,ei(this,t)}$add_lsib(t){return t=t===void 0?new D(this.#e.with_id,this.#e.with_et):t,Qc(this,t)}$rsib_of_fst_ance_having_rsib(){return Zc(this)}$sdfs_next(){return eu(this)}$drmost_des(){return ti(this)}$sdfs_prev(){return tu(this)}$sdfs(){return be(this)}$dlmost_des(){return su(this)}$edfs_next(){return ru(this)}$lsib_of_fst_ance_having_lsib(){return nu(this)}$edfs_prev(){return iu(this)}$edfs(){return lu(this)}$offset(){return Vc(this)}$sedfs_next(){return si(this)}$sedfs_prev(t){return au(this)}$sedfs(){return Yn(this)}$deses(t=!1){return Mn(this,t)}$lst_lyr_deses(){return Xc(this)}$which_lyr_deses(t){return Jc(t,this)}$some_lyrs_deses(...t){return Kc(this,...t)}$count(t=!0){return Mn(this,t).length}$depth(t=!1){return wt(this,t).length}$height(){let t=this.$depth(),n=this.$sdfs().map(l=>l.$depth());return Math.max(...n)-t+1}$pbreadth(){return Uc(this)}$breadth(){return Gc(this)}$width(){return zc(this)}$lyr(){return Hc(this)}$lcin(){return Fc(this)}$rcin(){return Yc(this)}$luncle(){return Bc(this)}$runcle(){return Mc(this)}$sdfs_repr(t=du,r=!1){let n=this.$root(),i=be(n),o=be(this).map((c,u)=>t(c,u,i)).join(`
3
+ `);if(console.log(o),r)return o}$sedfs_repr(t=pu,r=!1){let n=this.$root();ni(n);let a=Yn(this).map((o,c)=>t(o,c)).join(`
4
+ `);if(console.log(a),r)return a}$disconn(){return me(this)}$rm_fstch(){let t=this._fstch;return me(t)}$rm_lstch(){let t=Pn(this);return me(t)}$rm_which(t){let r=jn(t,this);return me(r)}$rm_some_children(...t){return Wn(this,...t).map(n=>me(n))}$rm_all_children(){return us(this).map(r=>me(r))}$dump(){if(this.$is_root())return yt(this);console.log("only root !!!")}$dump2file(t){if(this.$is_root()){let r=yt(this);Xn.wjson(t,r)}else console.log("only root !!!")}$sdfs2mat(){return Un(be(this))}$nest_dict(t="_children"){let r=Un(be(this));return _u(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 mu(this)}$sdfs_srch_action_list(){return bu(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 $u(this,t,r)}[Symbol.iterator](){return this.$sdfs()[Symbol.iterator]()}get[Symbol.toStringTag](){return this.$guid?this.$guid.substr(0,8):"<empty>"}};Object.defineProperty(D,"name",{value:"\u200D"});function ni(e){let t=be(e);return t.forEach((r,n)=>{r._id=n}),t}function vu(e){let t=new V;return t._id=e._id,t.$guid=e._guid,t}function Vn(e,t){for(;t._id!==e;)t=t._parent;return t}function Je(e,t){let r=ii(t);for(let n of r)e[n]=t[n];return e}function $t(e){let t=Ke.dict_keys(e)[0],r=ge.get_root(e[t],e),n=vu(r);n=Je(n,r);let i=n,l=r,a=ge.get_sdfs_next(l,e),o;for(;a!==null;)if(l._fstch===a._id)o=i.$prepend_child(),o._id=a._id,o.$guid=a._guid,o=Je(o,a),i=o,l=a,a=ge.get_sdfs_next(l,e);else if(l._rsib===a._id)o=i.$add_rsib(),o._id=a._id,o.$guid=a._guid,o=Je(o,a),i=o,l=a,a=ge.get_sdfs_next(l,e);else if(a._parent!==null&&a._parent!==void 0){let c=a._parent;i=Vn(c,i),o=i.$append_child(),o._id=a._id,o.$guid=a._guid,o=Je(o,a),i=o,l=a,a=ge.get_sdfs_next(l,e)}else if(a._parent===void 0){let u=ge.get_parent(a,e)._id;i=Vn(u,i),o=i.$append_child(),o._id=a._id,o.$guid=a._guid,o=Je(o,a),i=o,l=a,a=ge.get_sdfs_next(l,e)}else console.log("Impossible",i,l,a);return n}function bt(e,t){return e[t]===null?null:e[t]===void 0?void 0:e[t]._id}function ii(e){return Ke.dict_keys(e).filter(n=>!Tc.includes(n))}function ku(e,t){let r=ii(e);for(let n of r)t[n]=e[n];return t}function yt(e){let t=ni(e),r=e._id,n={};return t.forEach((i,l)=>{let a={};a._tree=r,a._fstch=bt(i,"_fstch"),a._lsib=bt(i,"_lsib"),a._rsib=bt(i,"_rsib"),a._parent=bt(i,"_parent"),a._id=i._id,a._guid=i.$guid,a=ku(i,a),n[i._id]=a}),n}var V=class extends D{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 li(e){if(typeof e=="string"){let t=Xn.rjson(e);return $t(t)}else return typeof e=="object"?$t(e):new V}function xu(e,t="_children"){return fu(e,t)}function Su(e){let t=e.$dump();return li(ndict)}function ps(e,t,...r){let n=t(e,...r);return n=new Buffer.from(n).toString("base64"),n}function ai(e){let t=e.$ances(!0).map(r=>r.$children().length);return t=t.join("-"),t}function oi(e){return e.$pbreadth()+"-"+e.$breadth()+"-"+e.$depth()}function ci(e,t,...r){let n=ai(e);return t&&(out=ps(e,t,...r),n=n+"@"+out),n}function ui(e,t,...r){let n=oi(e);return t&&(out=ps(e,t,...r),n=n+"@"+out),n}function gs(e,t,r,n,i,...l){let a=r.$sdfs(),o=n.$sdfs();if(a.length!==o.length)return!1;{let c=a.map(_=>t(_,i,...l)),u=o.map(_=>t(_,i,...l));e&&(c.sort(),u.sort());for(let _=0;_<c.length;_++){let f=c[_],m=u[_];if(f!==m)return!1}}return!0}function Tu(e,t,r,...n){return gs(!1,ui,e,t,r,...n)}function Eu(e,t,r,...n){return gs(!0,ci,e,t,r,...n)}_i.exports={SDFS_NEXT_BUILD_ACTION_DICT:ri,build_from_srch_action_list:wu,SDFS_NEXT_SRCH_ACTIONS:gu,RESERVED_EVENT_TYPES:["$msg__"],Node:D,Tree:V,Root:V,load:li,load_from_nest_dict:xu,clone:Su,get_cu_sign:ps,get_internal_sign_ignore_order:ai,get_internal_sign_keep_order:oi,get_sign_keep_order:ui,struct_eq:gs,struct_eq_keep_order:Tu,get_sign_ignore_order:ci,struct_eq_ignore_order:Eu}});var ms=h((Uh,hi)=>{var Cu=fi(),qu=os(),Nu=Vt();hi.exports={ndfunc:qu,ndcls:Cu,ndutil:Nu}});var Tt=h((ed,pi)=>{var q=x(),Au=ms(),{Root:Iu}=ms().ndcls,{TYPE_DICT:Gh,isNode:zh,empty:g,is_bigint_str:Vh,is_jsint_str:Xh,NUM_TYPE_DICT:Jh,parse_abnormal_num:Kh,parse_int:Qh,parse_float:Zh,parse_num:Ou,to_str:St}=x(),R=class extends Iu{constructor(t=g){super(!1,!1),this.key=t,this.value=g,this.type=g,this.chtype=g,this.hashes=new Set,this.kcmt=[],this.bvcmt=[],this.avcmt=[]}kto_str(){return this.key===g?g:JSON.stringify(this.key)}is_undefined(){return this.type===q.TYPE_DICT.UndefinedLiteral}is_null(){return this.type===q.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()}},bs=class extends R{constructor(t=g){super(t),this.value=void 0,this.type=q.TYPE_DICT.UndefinedLiteral}vto_rawstr(){return St(this.value)}},ys=class extends R{constructor(t=g){super(t),this.value=null,this.type=q.TYPE_DICT.NullLiteral}vto_rawstr(){return St(this.value)}},ws=class extends R{constructor(t,r=g){super(r),t==="true"&&(this.value=!0,this.type=q.TYPE_DICT.BooleanLiteral.TrueLiteral),t==="false"&&(this.value=!1,this.type=q.TYPE_DICT.BooleanLiteral.FalseLiteral)}vto_rawstr(){return St(this.value)}},$s=class extends R{constructor(t,r=g){if(super(r),typeof t=="string"){let n=Ou(t,!0);this.value=n.value,this.type=n.type}else this.value=t.value,this.type=t.type}vto_rawstr(){let t=St(this.value);return this.type===q.TYPE_DICT.NumericLiteral.Float&&!t.includes(".")&&(t=t+"."),t}};function Qe(e){return e=JSON.stringify(e),e.substr(1,e.length-2)}var vs=class extends R{constructor(t,r=g){super(r),this.value=t,this.type=q.TYPE_DICT.StringLiteral}vto_rawstr(){return Qe(this.value)}};function Du(e){e instanceof xt?e.type=q.TYPE_DICT.CommentLine.tt:e.type=q.TYPE_DICT.CommentBlock.tt}function Ru(e,t){return{lsib:e.$lsib(),data:t}}function di(e,t){Du(t);let r=Ru(e,t);return e.ttcmt.push(r),r}var ks=class extends R{constructor(t=g){super(t),this.value=[],this.type=q.TYPE_DICT.ArrayExpression._self,this.open=g,this.close=g,this.ttcmt=[]}is_inited(){return this.open===g&&this.close===g}is_opened(){return this.open!==g&&this.close===g}is_closed(){return this.open!==g&&this.close!==g}append_child(t){return t.chtype=q.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 di(this,t)}},xs=class extends R{constructor(t=g){super(t),this.value={},this.type=q.TYPE_DICT.ObjectExpression._self,this.open=g,this.close=g,this.ttcmt=[]}is_inited(){return this.open===g&&this.close===g}is_opened(){return this.open!==g&&this.close===g}is_closed(){return this.open!==g&&this.close!==g}append_child(t){return t.chtype=q.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 di(this,t)}},Ss=class extends R{constructor(t,r=g){super(r),this.value=t,this.type=q.TYPE_DICT._Ref}vto_rawstr(){if(this.value.is_leaf())return this.value.vto_rawstr();if(this.value.key!==g)return'&"'+Qe(this.value.key)+'"';for(let t of this.value.hashes)return'&"'+Qe(t)+'"'}},xt=class extends R{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentLine._self}vto_rawstr(t=`
5
+ `){return"//"+Qe(this.value)+t}},Ts=class extends R{constructor(t){super(),this.value=t,this.type=q.TYPE_DICT.CommentBlock._self}vto_rawstr(){return"/*"+Qe(this.value)+"*/"}};pi.exports={UndefinedLiteral:bs,NullLiteral:ys,BooleanLiteral:ws,NumericLiteral:$s,StringLiteral:vs,ArrayExpression:ks,ObjectExpression:xs,_Ref:Ss,CommentLine:xt,CommentBlock:Ts,_ndtree:Au}});var vi=h((td,$i)=>{var{empty:qs}=x(),{UndefinedLiteral:gi,NullLiteral:mi,BooleanLiteral:bi,NumericLiteral:yi,StringLiteral:Es,ArrayExpression:Lu,ObjectExpression:Pu,CommentLine:ju,CommentBlock:Wu,_Ref:Cs}=Tt();function Bu(e,t){let r=qs,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:qs}function wi(e,t){return e instanceof gi?new gi("undefined",t):e instanceof mi?new mi("null",t):e instanceof bi?new bi(e.vto_rawstr(),t):e instanceof yi?new yi(e.vto_rawstr(),t):e instanceof Es?new Es(e.value,t):e instanceof ju||e instanceof Wu?new Es(e.value,t):e instanceof Lu?new Cs(e,t):e instanceof Pu?new Cs(e,t):e instanceof Cs?(e=e.value,wi(e,t)):qs}$i.exports={find_refnd_with_hash:Bu,clone:wi}});var Di=h((sd,ye)=>{var Mu=Array,Fu=x(),{empty:$,parse0:Yu}=x(),et=class extends Mu{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*Hu(e){for(let t of e)yield t;e=null}function*Uu(e,t){yield*t,yield*e}var tt=zt(),Ns=ke(),qe=tn(),{UndefinedLiteral:Gu,NullLiteral:zu,BooleanLiteral:ki,NumericLiteral:Vu,StringLiteral:xi,CommentLine:Ze,CommentBlock:Xu,ArrayExpression:As,ObjectExpression:Ju}=Tt(),U=I(),Si=U.gtv,ie=U.STATE_DICT,Is=U.LEFTED_TYPE,Ce=U.AVND_CACHE_STATE_DICT,H=x(),w=ee(),Ti=vi();function*Ii(e){for(;e.length>0;)yield e.pop()}function Ei(e){let t;return e.__is_sync_mode()?t=tt.from_generator(e.g,e.ch_cache.curr):t=tt.from_generator(Ii(e.unshift_cache),e.ch_cache.curr),t}function Ci(e,t,r){e.lefted.type=Is.quote,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state,quote:r},e.state=U.get_main_eofv_with_code(e.state)}function Oi(e,t,r){e.lefted.type=r,e.lefted.data={rslt:t.rslt,lefted:t.ch,state:t.state}}function Ku(e,t,r){return Oi(e,t,r),e.state=U.get_lcmt_eofv_with_code(e.state),e}function Qu(e,t,r){return Oi(e,t,r),e.state=U.get_blkcmt_eofv_with_code(e.state),e}function Zu(e,t){let r;return e.__is_sync_mode()?r=t(e.g,e.ch_cache.curr):r=t(Ii(e.unshift_cache),e.ch_cache.curr),r}function qi(e,t,r,n){let i=Zu(e,r);return i.state!==qe.STATE_DICT.succ?((t===Ze?Ku:Qu)(e,i,n),$):new t(i.rslt)}function Ni(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===As?e.state=ie.bv:e.state=ie.bk,e}var Os=Symbol("root_lblk_ch"),Ai=Symbol("root_rblk_ch"),Ne=class{#t=Si(ie.bv);#e=new et;constructor(t,r=" "){if(r!==$){let i=Hu(r);t=Uu(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 As;this.stack.push(n),n.open=Os,this.avnd_cache={state:Ce.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===Ce.handled}$set_yield_sign(){this.avnd_cache.state=Ce.handled}$clear_yield_sign(){this.avnd_cache.state=Ce.handling}get state(){return this.#t}set state(t){this.#t=Si(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=U.get_main_eofv_with_code(this.state),this}$is_currch_comma(){return w.commas.has(this.ch_cache.curr)}$is_currch_colon(){return w.colons.has(this.ch_cache.curr)}$is_currch_ws(){return Ns.is_ws(this.ch_cache.curr)}$is_currch_quote(){return w.quotes.has(this.ch_cache.curr)}$is_currch_slash(){return this.ch_cache.curr===w.slash}$is_currch_asterisk(){return this.ch_cache.curr===w.asterisk}$is_currch_ary_lblk(){return w.array_blks.lhas(this.ch_cache.curr)}$is_currch_obj_lblk(){return w.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 w.array_blks.rhas(this.ch_cache.curr)}$is_currch_obj_rblk(){return w.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 w.hash===this.ch_cache.curr}$is_currch_ref(){return w.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=ie.bv:(this.state=ie.v,this.str_cache.v=t,r===$||(this.str_cache.maybe_vquote=r)):t===$?this.state=ie.bk:(this.state=ie.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=Yu(t,{only_value:!1,with_value:!0,with_type:!0,unknown_as_string:!0});n.type===H.TYPE_DICT.UndefinedLiteral?r=new Gu(this.str_cache.k):n.type===H.TYPE_DICT.NullLiteral?r=new zu(this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.TrueLiteral?r=new ki("true",this.str_cache.k):n.type===H.TYPE_DICT.BooleanLiteral.FalseLiteral?r=new ki("false",this.str_cache.k):n.type===H.TYPE_DICT.StringLiteral?r=new xi(n.value,this.str_cache.k):r=new Vu(n,this.str_cache.k)}else r=new xi(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=Ce.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,Ce.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=Ei(this);return r.state!==tt.STATE_DICT.succ?(Ci(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 qi(this,Ze,qe.lc_from_generator,Is.lcmt)}$handle_blkcmt(){return qi(this,Xu,qe.blk_from_generator,Is.blkcmt)}$push_kcmt(t){t.type=qe instanceof Ze?H.TYPE_DICT.CommentLine.k:H.TYPE_DICT.CommentBlock.k,this.cmt_cache.kcmt.push(t)}$push_bvcmt(t){let r=t instanceof Ze?"CommentLine":"CommentBlock";t.type=H.TYPE_DICT[r].bv,this.cmt_cache.bvcmt.push(t)}$push_avcmt(t){t.type=qe instanceof Ze?H.TYPE_DICT.CommentLine.k:H.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(w.array_blks.lhas(this.ch_cache.curr))return Ni(this,As);if(w.obj_blks.lhas(this.ch_cache.curr))return Ni(this,Ju)}$is_rblk_match(){let t=this.stack.lst,r=t.is_ary()?"array_blks":"obj_blks";return w[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=ie.av}$get_hash_or_ref(t="#"){let r=$,n=this.$next_ch(),i="";for(;!Ns.is_ws(n)&&!w.commas.has(n)&&!w.colons.has(n)&&!w.array_blks.has(n)&&!w.obj_blks.has(n)&&n!==w.hash&&n!==w.ref&&n!==w.slash;)if(w.quotes.has(n)){let l=Ei(this);if(l.state!==tt.STATE_DICT.succ)return Ci(this,l,this.ch_cache.curr),t===w.hash?this.state=U.get_hash_quote_eofv_with_code(this.state):this.state=U.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),Ti.find_refnd_with_hash(n,t)}$add_ref_to_parent(t){let r=this.stack.lst,n=Ti.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)}};Ne[Os]=Os;Ne[Ai]=Ai;Ne.MODES=["sync","async"];ye.exports=Ne;ye.exports.Stack=et;ye.exports._type_util=Fu;ye.exports._esc=tt;ye.exports._cmt=qe;ye.exports._ws=Ns});var ji=h((rd,Pi)=>{var{empty:Ri}=x(),Li=I(),Ae=Li.gtv,G=Li.STATE_DICT;function e_(e){let t=e.state;return t===Ae(G.bk)||(t===Ae(G.k)||t===Ae(G.ak)?(e.str_cache.k=Ri,e.state=G.bk):t===Ae(G.bv)?(e.$abandon_key_when_end_bv(),e.stack.lst.is_ary()?e.state=G.bv:e.state=G.bk):t===Ae(G.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ae(G.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av())),e}Pi.exports=e_});var Mi=h((ld,Bi)=>{var{empty:id}=x(),Wi=I(),Ie=Wi.gtv,le=Wi.STATE_DICT;function t_(e){let t=e.state;return t===Ie(le.bk)||(t===Ie(le.k)||t===Ie(le.ak)?e.state=le.bv:t===Ie(le.bv)||(t===Ie(le.v)?(e.$setup_leafnd(),e.$change_state_when_end_av()):t===Ie(le.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av()))),e}Bi.exports=t_});var Ds=h((od,Yi)=>{var{empty:ad}=x(),Fi=I(),Oe=Fi.gtv,ae=Fi.STATE_DICT;function s_(e){let t=e.state;return t===Oe(ae.bk)||(t===Oe(ae.k)?e.state=ae.ak:t===Oe(ae.ak)||t===Oe(ae.bv)||(t===Oe(ae.v)?(e.$setup_leafnd(),e.state=ae.av):Oe(ae.av))),e}Yi.exports=s_});var zi=h((cd,Gi)=>{var{empty:Hi}=x(),Ui=I(),De=Ui.gtv,X=Ui.STATE_DICT;function r_(e,t){let r=e.state,n=e.$handle_quote(t);return n===Hi||(r===De(X.bk)?(e.str_cache.k=n,e.state=X.k):r===De(X.k)?e.str_cache.k=e.str_cache.k+n:r===De(X.ak)?(e.$refresh_key(n),e.state=X.k):r===De(X.bv)?(e.str_cache.maybe_vquote=t,e.str_cache.v=n,e.state=X.v):r===De(X.v)?(e.str_cache.v=e.str_cache.v+n,e.str_cache.maybe_vquote=Hi):r===De(X.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(n,t))),e}Gi.exports=r_});var Ki=h((ud,Ji)=>{var{empty:Vi}=x(),Rs=I(),L=Rs.gtv,T=Rs.STATE_DICT,n_=Rs.LEFTED_TYPE,we=ee();function Xi(e,t){let r=e.state,n=e[t]();if(n!==Vi){let i=e.stack.lst;if(r===L(T.bk))i.append_ttcmt(n);else if(r===L(T.k))e.$push_kcmt(n),e.state=T.ak;else if(r===L(T.ak))e.$push_kcmt(n);else if(r===L(T.bv))i.is_ary()?i.append_ttcmt(n):i.is_dict()&&e.$push_bvcmt(n);else if(r===L(T.v))e.$setup_leafnd(),e.state=T.av;else if(r===L(T.av)){let l=e.stack.lst;l.is_ary()?(l.append_ttcmt(n),e.state=T.bv):l.is_dict()&&e.$push_avcmt(n)}}return e}function i_(e){return Xi(e,"$handle_lcmt")}function l_(e){return Xi(e,"$handle_blkcmt")}function a_(e){let t=e.state;t===L(T.bk)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=we.slash,e.state=T.k):t===L(T.k)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.k=e.str_cache.k+we.slash):t===L(T.ak)?(e.__unshift_g(e.ch_cache.curr),e.$refresh_key(we.slash),e.state=T.k):t===L(T.bv)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=we.slash,e.state=T.v):t===L(T.v)?(e.__unshift_g(e.ch_cache.curr),e.str_cache.v=e.str_cache.v+we.slash,e.str_cache.maybe_vquote=Vi):t===L(T.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(we.slash))}function o_(e){let t=e.state,r=e.$next_ch();return e.$is_currch_eof()?(e.lefted.data=we.slash,e.lefted.type=n_.backslash,e.$handle_main_eof()):e.$is_currch_slash()?i_(e):e.$is_currch_asterisk()?l_(e):a_(e),e}Ji.exports=o_});var el=h((fd,Zi)=>{var{empty:_d}=x(),Qi=I(),Re=Qi.gtv,oe=Qi.STATE_DICT;function c_(e){let t=e.state;return t===Re(oe.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=oe.k):t===Re(oe.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===Re(oe.ak)?(e.$refresh_key(),e.state=oe.k):t===Re(oe.bv)?e.$open_nonleaf_nd():t===Re(oe.v)?(e.$setup_leafnd(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)):t===Re(oe.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}Zi.exports=c_});var nl=h((hd,rl)=>{var{empty:tl}=x(),sl=I(),Le=sl.gtv,$e=sl.STATE_DICT,u_=Ds();function __(e){let t=e.state;return t===Le($e.bk)?e.$close_nonleaf_nd():t===Le($e.k)?(e.str_cache.k=tl,e.$close_nonleaf_nd()):t===Le($e.ak)?(e.$refresh_key(),e.str_cache.k=tl,e.$close_nonleaf_nd()):t===Le($e.bv)?(e.$abandon_key_when_end_bv(),e.$close_nonleaf_nd()):t===Le($e.v)?(e.$setup_leafnd(),e.state=$e.av,e.__unshift_g(e.ch_cache.curr)):t===Le($e.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 f_(e){return e.$is_rblk_match()?__(e):u_(e),e}rl.exports=f_});var ol=h((dd,al)=>{var{empty:h_}=x(),ll=I(),Pe=ll.gtv,ce=ll.STATE_DICT,d_=ee(),{CommentLine:il}=Tt();function p_(e){let t=e.state,r=e.$get_hash_or_ref(d_.hash);if(r!==h_){let n=e.stack.lst;if(t===Pe(ce.bk))e.$is_hash_of_pnd()&&n.hashes.add(r);else if(t===Pe(ce.k)){let i=new il(r);e.$push_kcmt(i),e.state=ce.ak}else if(t===Pe(ce.ak)){let i=new il(r);e.$push_kcmt(i)}else t===Pe(ce.bv)?e.$is_hash_of_pnd()&&n.is_ary()&&n.hashes.add(r):t===Pe(ce.v)?(e.$setup_leafnd(),e.avnd_cache.data.hashes.add(r),e.state=ce.av):t===Pe(ce.av)&&e.avnd_cache.data.hashes.add(r)}return e}al.exports=p_});var _l=h((pd,ul)=>{var{empty:Ls}=x(),cl=I(),je=cl.gtv,O=cl.STATE_DICT,g_=ee();function m_(e){let t=e.state,r=e.$get_hash_or_ref(g_.ref);if(r!==Ls){let n=e.$find_ref(r);if(n!==Ls){let i=e.stack.lst;t===je(O.bk)||t===je(O.k)||t===je(O.ak)?(e.$refresh_key(n.vto_rawstr()),e.state=O.ak):t===je(O.bv)?(e.$add_ref_to_parent(n),e.state=O.av):t===je(O.v)?(e.str_cache.maybe_vquote=Ls,e.$setup_leafnd(),e.state=O.av):t===je(O.av)&&(e.$has_yield_sign()?(e.$clear_yield_sign(),i.is_ary()?(e.$add_ref_to_parent(n),e.state=O.av):i.is_dict()&&(e.str_cache.k=n.vto_rawstr(),e.state=O.ak)):(e.$mv_avcmt_to_avcmt(),e.$set_yield_sign()))}}return e}ul.exports=m_});var dl=h((gd,hl)=>{var{empty:b_}=x(),fl=I(),We=fl.gtv,J=fl.STATE_DICT;function y_(e){let t=e.state;return t===We(J.bk)?(e.str_cache.k=e.ch_cache.curr,e.state=J.k):t===We(J.k)?e.str_cache.k=e.str_cache.k+e.ch_cache.curr:t===We(J.ak)?(e.$refresh_key(),e.state=J.k):t===We(J.bv)?(e.str_cache.v=e.ch_cache.curr,e.state=J.v):t===We(J.v)?(e.str_cache.v=e.str_cache.v+e.ch_cache.curr,e.str_cache.maybe_vquote=b_):t===We(J.av)&&(e.$mv_avcmt_to_avcmt(),e.$change_state_when_end_av(),e.__unshift_g(e.ch_cache.curr)),e}hl.exports=y_});var yl=h((md,bl)=>{var{empty:w_}=x(),$_=Di(),v_=ji(),k_=Mi(),x_=Ds(),S_=zi(),T_=Ki(),E_=el(),C_=nl(),q_=ol(),N_=_l(),A_=dl(),ml=I(),pl=ml.gtv,gl=ml.STATE_DICT,I_=ee();function*O_(e,t=w_){let r=new $_(e,t);for(;;)if(r.$next_ch(),r.$is_currch_eof()){r.$handle_main_eof(),yield r;break}else r.$is_currch_comma()?(v_(r),yield r):r.$is_currch_colon()?(k_(r),yield r):r.$is_currch_ws()?(x_(r),yield r):r.$is_currch_quote()?(S_(r,r.ch_cache.curr),yield r):r.$is_currch_slash()?(T_(r),yield r):r.$is_currch_lblk()?(E_(r),yield r):r.$is_currch_rblk()?(C_(r),yield r):r.$is_currch_hash()?(q_(r),yield r):r.$is_currch_ref()?r.state===pl(gl.av)||r.state===pl(gl.v)?r.__unshift_g(I_.fst_comma+r.ch_cache.curr):(N_(r),yield r):(A_(r),yield r)}bl.exports=O_});var xl=h((bd,kl)=>{var{sync_gen_from_str:Ps}=Ir(),{is_should_yield:js}=I(),j=ee(),{is_nl:D_,is_ws:wl}=ke(),Ws=yl(),R_={enable_ref:!1,encoding:"utf8"};function $l(e,t={enable_ref:!1}){let r=Ws(e),n=r.next().value,i=n.avnd_cache.data.$root(),l=n.state;for(let a of r){let o=a.state;if(js(n,l,o)&&!t.enable_ref){let c=n.avnd_cache.data;c.$disconn(),c=null}l=o}return i}function L_(e,t={enable_ref:!1}){let r=Ps(e);return $l(r,t)}function*vl(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ws(e),n=r.next().value,i=n.state;for(let l of r){let a=l.state;if(js(n,i,a)&&!t.enable_ref){let o=n.avnd_cache.data;yield o,o.$disconn(),o=null}i=a}}function*P_(e,t={enable_ref:!1,encoding:"utf8"}){let r=Ps(e);yield*vl(r,t)}function j_(){return{d:void 0,ppg:void 0,prev:void 0,curr:void 0,can_send:!1,data:"",state:"init",label:"",pstate:""}}function W_(e){let t=Ps(""),r=Ws(t," "),n=r.next().value;n.__use_async_mode();let i=j_();return i.rt=n.avnd_cache.data,i.prev=n.state,i.ppg=r,i.d=n,i}function B_(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"):D_(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"?wl(t)?e.can_send=!0:j.quotes.has(t)&&(e.state="quote",e.pstate="hash"):e.state==="ref"?wl(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*M_(e,t){for(let r of e)B_(t,r),t.can_send&&(yield t,t.data="",t.state="init",t.label="",t.can_send=!1)}async function*F_(e){let t=W_(e);for await(let r of e)yield*M_(r,t);yield t}function Y_(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*H_(e,t){if(e.d.__unshift_g(e.data),e.prev=e.curr,e.d=e.ppg.next().value,e.curr=e.d.state,js(e.d,e.prev,e.curr)&&!t.enable_ref){let r=e.d.avnd_cache.data;yield r,r.$disconn(),r=null}}async function*U_(e,t={enable_ref:!1,encoding:"utf8"}){e=F_(e);let r;for await(r of e)Y_(r),yield*H_(r,t);yield r.rt}kl.exports={OPT_DICT:R_,parse_from_generator:$l,parse_from_str:L_,gen_from_generator:vl,gen_from_str:P_,agen_from_generator:U_}});var Et=h((yd,rt)=>{var{empty:G_}=x(),z_=ee(),st=xl();function Bs(e){return e.length===1?e[0]:e}function V_(){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}V_();rt.exports.CFG=z_;rt.exports.empty=G_});var Be=h((wd,Sl)=>{var X_=e=>e.constructor.name==="AsyncFunction",J_=e=>typeof e!="string"||(e=e.trim(),e==="")?!1:!!(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")||/^(data|blob|file|wasm):/i.test(e)),K_=e=>e.startsWith("http://")||e.startsWith("https://")||e.startsWith("ws://")||e.startsWith("wss://")||/^(data|blob|file|wasm):/i.test(e)?e:e.startsWith("//")||e.startsWith("/")||e.startsWith("./")||e.startsWith("../")?e.startsWith("//")?window.location.protocol+e:e.startsWith("/")?window.location.origin+e:new URL(e,window.location.href).href:e,Q_=()=>new Date().toISOString().replace(/[:.]/g,"-"),Z_=/^(.*?)=["]?(.*)["]?$/,ef=(e=document.cookie)=>{let t=e.split("; "),r={};for(let n of t){let i=Z_.exec(n);r[i[1]]=i[2]}return r};Sl.exports={is_async:X_,is_url:J_,fullfill_url:K_,creat_dt_prefix:Q_,get_ck:ef}});var nt=h(($d,Cl)=>{var{is_async:ue}=Be(),tf=e=>{let t=0;for(;e&&e.parentNode;)e=e.parentNode,t++;return t},sf=(e,t)=>{if(t>0){let r=1;for(;;){let n=e.parentNode;if(r===t)return n;e=n,++r}}else return e},rf=e=>{for(;e.parentNode;)e=e.parentNode;return e},K=e=>e.firstChild===null||e.firstChild===void 0,Ct=(e,t=K)=>{let r=0;for(;!t(e);)e=e.lastChild,++r;return[e,r]},qt=(e,t=K)=>{let r=0;for(;!t(e);)e=e.firstChild,++r;return[e,r]},Tl=(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]},nf=async(e,t=(n,i)=>{},r=K)=>{let[n,i]=Ct(e,r),l=e,a=ue(t),o=0;for(;;){let c=!1;if(a?c=await t(l,o):c=t(l,o),c||l===n)return;if(!r(l))++o,l=l.firstChild;else{let u=Tl(l,o);if(l=u[0],l)o=u[1];else break}}},El=(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=K)=>{let[n,i]=qt(e,r),l=e,a=ue(t),o=0;for(;;){let c=!1;if(a?c=await t(l,o):c=t(l,o),c||l===n)return;if(!r(l))++o,l=l.lastChild;else{let u=El(l,o);if(l=u[0],l)o=u[1];else break}}},af=async(e,t=(n,i)=>{},r=K)=>{let[n,i]=qt(e,r),l=ue(t);for(;;){let a=!1;if(l?a=await t(n,i):a=t(n,i),a||n===e)return;{let o=n.nextSibling;if(o){let c=qt(o,r);i+=c[1],n=c[0]}else{let c=n.parentNode;if(c)--i,n=c;else break}}}},of=async(e,t=(n,i)=>{},r=K)=>{let[n,i]=Ct(e,r),l=ue(t);for(;;){let a=!1;if(l?a=await t(n,i):a=t(n,i),a||n===e)return;{let o=n.prevSibling;if(o){let c=Ct(o,r);i+=c[1],n=c[0]}else{let c=n.parentNode;if(c)--i,n=c;else break}}}},cf=async(e,t=(i,l)=>{},r=(i,l)=>{},n=K)=>{let i=e,l="open",a={open:[r,ue(r)],clos:[t,ue(t)]},o=0;for(;;){let c=!1,[u,_]=a[l];if(l==="open"){if(_?c=await u(i,o):c=u(i,o),c)return;n(i)?l="clos":(i=i.firstChild,++o)}else{let f,m,b,E=i.nextSibling;if(E?(b="open",f=E,m=o):(b="clos",f=i.parentNode,m=o-1),_?c=await u(i,o):c=u(i,o),c)return;if(i!==e)l=b,i=f,o=m;else break}}},uf=async(e,t=(i,l)=>{},r=(i,l)=>{},n=K)=>{let i=e,l="open",a={open:[r,ue(r)],clos:[t,ue(t)]},o=0;for(;;){let c=!1,[u,_]=a[l];if(l==="open"){if(_?c=await u(i,o):c=u(i,o),c)return;n(i)?l="clos":(i=i.lastChild,++o)}else{let f,m,b,E=i.prevSibling;if(E?(b="open",f=E,m=o):(b="clos",f=i.parentNode,m=o-1),_?c=await u(i,o):c=u(i,o),c)return;if(i!==e)l=b,i=f,o=m;else break}}};Cl.exports={get_depth:tf,get_ance:sf,get_rt:rf,is_topo_leaf:K,get_drmost:Ct,get_dlmost:qt,find_rb_of_fst_ance_has_rb:Tl,editonly_sdfs_for_each:nf,find_lb_of_fst_ance_has_lb:El,editonly_rsdfs_for_each:lf,editonly_edfs_for_each:af,editonly_redfs_for_each:of,visit:cf,rvisit:uf}});var Nl=h((vd,ql)=>{var _f=new Set(["html","head","body","title","meta","link","base","style","header","footer","nav","main","section","article","aside","h1","h2","h3","h4","h5","h6","address","p","hr","pre","blockquote","ol","ul","li","dl","dt","dd","figure","figcaption","div","a","em","strong","small","s","cite","q","dfn","abbr","ruby","rt","rp","data","time","code","var","samp","kbd","sub","sup","i","b","u","mark","bdi","bdo","span","br","wbr","ins","del","img","iframe","embed","object","param","video","audio","source","track","picture","map","area","canvas","svg","table","caption","colgroup","col","thead","tbody","tfoot","tr","th","td","form","label","input","button","select","datalist","optgroup","option","textarea","output","progress","meter","fieldset","legend","details","summary","dialog","script","noscript","template","slot"]),ff=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),hf=new Set(["class","rel","sandbox","allow","headers","aria-describedby","aria-labelledby"]);ql.exports={TAGS:_f,VOID_TAGS:ff,NEED_TO_SP_ATTR_NMS:hf}});var Pl=h((kd,Ll)=>{var{TAGS:df,VOID_TAGS:Al,NEED_TO_SP_ATTR_NMS:pf}=Nl(),{is_url:Il,fullfill_url:gf}=Be(),{editonly_sdfs_for_each:N,is_topo_leaf:Fs}=nt(),Ol=(e,t)=>{let r=[e];for(let n of t){let i=[];for(let l of r){let a=l.children;for(let o=0;o<a.length;o++){let c=a[o];c.tagName.toLowerCase()===n&&i.push(c)}}if(i.length===0)return[];r=i}return r},Dl=(e,t)=>{let r=[],n=t.length;function i(l,a){let o=a;l.nodeType===1&&l.tagName.toLowerCase()===t[a]&&(o=a+1,o===n&&r.push(l));let c=l.children;if(c)for(let u=0;u<c.length;u++)i(c[u],o)}return i(e,0),r},Ms=async(e,t,r=Fs)=>{let n=[];return await N(e,async(i,l)=>{if(i.tagName){if(t.test(i.tagName))n.push(i);else if(i.attributes){for(let a of i.attributes)if(t.test(a.name)){n.push(i);break}}}},r),n},mf=async(e,t=Fs)=>{let r=new Set,n=new Set,i=new Set,l=new Set,a=new Set;return await N(e,async(o,c)=>{if(o.nodeType===Node.ELEMENT_NODE){if(r.add(o.tagName.toLowerCase()),o.attributes)for(let u of o.attributes)if(n.add(u.name.toLowerCase()),pf.has(u.name.toLowerCase())){let _=u.value.split(/[ ]+/g);for(let f of _)i.add(f)}else i.add(u.value)}else o.nodeType===Node.TEXT_NODE?l.add(o.nodeValue):o.nodeType===Node.COMMENT_NODE&&a.add(o.nodeValue)},t),{tags:Array.from(r),keys:Array.from(n),vals:Array.from(i),txts:Array.from(l),cmts:Array.from(a)}},Rl=async(e,t,r=Fs)=>{if(typeof t=="string")if(t[0]==="#"){let n=[];return await N(e,async(i,l)=>{if(i.tagName){let a=t.slice(1),o=i.getAttribute("id");a===o&&n.push(i)}},r),n}else if(t[0]==="."){let n=[];return await N(e,async(i,l)=>{if(i.tagName){let a=t.slice(1);i.getAttribute("class").split(/[ ]+/g).map(c=>c.toLowerCase()).includes(a)&&n.push(i)}},r),n}else if(t[0]==="`"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.TEXT_NODE){let a=t.slice(1);node.nodeValue.includes(a)&&n.push(i)}},r),n}else if(t[0]==="!"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE&&typeof i.click=="function"){let a=i.tagName.toLowerCase();["html","head","meta","link","style","script"].includes(a)||a.includes(t.slice(1).toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="@"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let a of i.attributes){let c=a.value.split(/[ ]+/g),u=t.slice(1);for(let _ of c)if(Il(_)&&_.includes(u)){n.push(i);break}}},r),n}else if(t[0]==="-"){let n={};return await N(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let a of i.attributes)if(a.name.startsWith("data-")){let o=a.name.slice(5);if(o.includes(t.slice(1))){let c=a.value;try{c=JSON.parse(c)}catch{}n[o]?n[o].push(c):n[o]=[c]}}}},r),n}else{if(t[0]==="*")return mf(e,r);if(t[0]==="&"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes)for(let a of i.attributes){let c=a.value.split(/[ ]+/g),u=t.slice(1);for(let _ of c)Il(_)&&_.includes(u)&&n.push(gf(_))}},r),n}else if(t.slice(0,2)==="?:"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let a of i.attributes)if(t.slice(2).toLowerCase()===a.name.toLowerCase()){n.push(i);break}}},r),n}else if(t.slice(0,2)===":?"){let n=[];return await N(e,async(i,l)=>{if(i.tagName&&i.attributes){for(let a of i.attributes)if(a.value.includes(t.slice(2))){n.push(i);break}}},r),n}else if(t.slice(0,3)==="</>"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let a=node.nodeValue.toLowerCase();if(!Al.has(a)){let o=t.slice(3);a.includes(o.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="<>"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.ELEMENT_NODE){let a=node.nodeValue.toLowerCase();if(Al.has(a)){let o=t.slice(2);a.includes(o.toLowerCase())&&n.push(i)}}},r),n}else if(t.slice(0,2)==="//"){let n=[];return await N(e,async(i,l)=>{if(i.nodeType===Node.COMMENT_NODE){let a=t.slice(2);node.nodeValue.toLowerCase().includes(a.toLowerCase())&&n.push(i)}},r),n}else if(t[0]==="/"){let n=t.split("/").filter(l=>l!==""),i=Ol(document,n);return i.length===0?await Ms(e,new RegExp(t),r):i}else if(t.includes("/")){let n=t.split("/").filter(i=>i!=="");return Dl(document,n)}else{let n=[];return await N(e,async(i,l)=>{(i.tagName?i.tagName.toLowerCase()===t.toLowerCase():!1)&&n.push(i)},r),n}}else{if(t instanceof RegExp)return await Ms(e,t,r);{let n=[];return is_async(t)?await N(e,async(i,l)=>{await t(i,l)&&n.push(i)},r):await N(e,async(i,l)=>{t(i,l)&&n.push(i)},r),n}}},bf=new Proxy(document,{get(e,t,r){return df.has(t.toLowerCase())||t[0]==="*"||t[0]==="&"||t[0]==="-"||t[0]==="#"||t[0]==="."||t[0]==="?"||t[0]===":"||t[0]==="@"||t[0]==="!"||t[0]==="<"||t.includes("/")?Rl(document,t):Reflect.get(e,t,r)}});Ll.exports={plget:Ol,plinget:Dl,filter_on_tag_or_attr_key_with_rgx:Ms,filter:Rl,$:bf}});var Nt=h((xd,jl)=>{var yf=Et(),wf=(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("")},$f=e=>e.replace(/-/g,"_"),vf=(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,kf=e=>{let t=e.replace(/[^0-9.-]/g,"");return parseFloat(t)},xf=e=>yf.parse_from_str(e+" ");jl.exports={dash_to_camel:wf,dash_to_snake:$f,attr_value_to_bool:vf,css_str_to_num:kf,parse_json_input:xf}});var Yl=h((Sd,Fl)=>{var Wl=()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}),Sf=()=>new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})}),Tf=async e=>{for(let t=0;t<e;++t)await Wl()},Ef=async(e=0)=>new Promise(t=>{setTimeout(()=>{t()},e)}),At=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])}},Bl=()=>new At,Ml=Bl(),Cf=(e,t,r=300)=>{Ml.run(e,t,r)},qf=e=>{Ml.cancel(e)};Fl.exports={wait_for_layout_ready:Wl,wait_for_paint_ready:Sf,wait_for_n_raf:Tf,wait:Ef,SimpleDebounce:At,creat_simple_debounce:Bl,simple_debounce:Cf,cancel_simple_debounce:qf}});var Gl=h((Td,Ul)=>{var{dash_to_camel:It}=Nt(),Hl=(e,t,r=!1)=>{let n=It(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}})},Nf=(e,t)=>{for(let r of t)Hl(e,r,!1)},Af=e=>{for(let t in DYN_CLSES){{let n="all"+It(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=It(n,!0),l="get"+It(t,!0)+"ElementBy"+i;e.constructor.prototype.hasOwnProperty(l)||(e.constructor.prototype[l]=function(a){let o=this.shadowRoot;return o?o.querySelector(`.${t}[${n}="${a}"]`):null})}}};Ul.exports={add_one_fixed_element_getter:Hl,add_fixed_element_getters:Nf,add_dyn_element_getters:Af}});var Vl=h((Ed,zl)=>{var If=Et(),{dash_to_snake:Of,css_str_to_num:Df}=Nt(),Rf=(e,t)=>{let r=Object.keys(t);for(let n of ATTRS_KEYS){let i=Of(n),l=t[n],a=l.type;e.prototype.hasOwnProperty(i)||(a==="boolean"?Object.defineProperty(e.prototype,i,{get:function(){return attr_value_to_bool(this.getAttribute(n),l.default)},set:function(o){this.setAttribute(n,o?"true":"false")}}):a==="number"?Object.defineProperty(e.prototype,i,{get:function(){let o=this.getAttribute(n);return o?Number(o):l.default},set:function(o){this.setAttribute(n,String(o))}}):Array.isArray(a)&&a.includes("cssnum")&&a.includes("number")?Object.defineProperty(e.prototype,i,{get:function(){return Df(this.getAttribute(n))},set:function(o){isNaN(Number(o))?this.setAttribute(n,o):this.setAttribute(n,String(o)+"px")}}):a==="json"?Object.defineProperty(e.prototype,i,{get:function(){let o=this.getAttribute(n);return o?If.parse_from_str(o):l.default},set:function(o){this.setAttribute(n,JSON.stringify(o))}}):Object.defineProperty(e.prototype,i,{get:function(){return this.getAttribute(n)||l.default},set:function(o){this.setAttribute(n,o)}}))}};zl.exports={add_attr_accessors_to_cls:Rf}});var Jl=h((Cd,Xl)=>{var Ys=class{css=`
6
6
  position: fixed;
7
7
  top: 0;
8
8
  left: 0;
@@ -12,17 +12,17 @@ var nvbasicbw=(()=>{var h=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports
12
12
  border: none;
13
13
  margin: 0;
14
14
  padding: 0;
15
- `;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}},it=()=>{let e=document.createElement("div"),t=new Ys,r=t.mx(e,"width"),n=t.mx(e,"height");return[r,n]},Rf=(e,t)=>{let[r,n]=it(),i=document.createElement(e);return i.style.width=`${r}px`,i.style.height=`${t}px`,i},Pf=(e,t)=>{let[r,n]=it(),i=document.createElement(e);return i.style.width=`${t}px`,i.style.height=`${n}px`,i},jf=e=>{let[t,r]=it(),n=document.createElement(e);return n.style.width=`${t}px`,n.style.height=`${r}px`,n},Bf=(e,t="height")=>{let[r,n]=it();return Math.floor(r/e)},Hs=class{css=`
15
+ `;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}},it=()=>{let e=document.createElement("div"),t=new Ys,r=t.mx(e,"width"),n=t.mx(e,"height");return[r,n]},Lf=(e,t)=>{let[r,n]=it(),i=document.createElement(e);return i.style.width=`${r}px`,i.style.height=`${t}px`,i},Pf=(e,t)=>{let[r,n]=it(),i=document.createElement(e);return i.style.width=`${t}px`,i.style.height=`${n}px`,i},jf=e=>{let[t,r]=it(),n=document.createElement(e);return n.style.width=`${t}px`,n.style.height=`${r}px`,n},Wf=(e,t="height")=>{let[r,n]=it();return Math.floor(r/e)},Hs=class{css=`
16
16
  position: absolute;
17
17
  visibility: hidden;
18
18
  display: none;
19
- `;is_ok(t,r){t.style.zIndex=r;let n=window.getComputedStyle(t).zIndex;return String(n)===String(r)}find_upbound(t){let r=1;for(;this.is_ok(t,r);)r*=2;return r}mx(t){t.style.cssText=this.css,document.body.appendChild(t);let r=this.find_upbound(t),n=Math.floor(r/2);for(;n+1<r;){let i=Math.floor((n+r)/2);this.is_ok(t,i)?n=i:r=i}return document.body.removeChild(t),n}},Mf=()=>{let e=document.createElement("div");return new Hs().mx(e)},Ff=()=>{let e=document.createElement("div"),t=document.createElement("span");t.style.fontSize="1px",t.innerText="A",e.appendChild(t),document.body.appendChild(e);let r=parseFloat(window.getComputedStyle(t).fontSize);return document.body.removeChild(e),r};Xl.exports={find_mx_wh:it,creat_mxw_ele:Rf,creat_mxh_ele:Pf,creat_mxwh_ele:jf,calc_mx_cnt:Bf,find_mx_zindex:Mf,find_min_font:Ff}});var Vs=h((Ed,ea)=>{var{fullfill_url:Kl}=Be(),{editonly_sdfs_for_each:Ql}=nt(),Wf=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>
19
+ `;is_ok(t,r){t.style.zIndex=r;let n=window.getComputedStyle(t).zIndex;return String(n)===String(r)}find_upbound(t){let r=1;for(;this.is_ok(t,r);)r*=2;return r}mx(t){t.style.cssText=this.css,document.body.appendChild(t);let r=this.find_upbound(t),n=Math.floor(r/2);for(;n+1<r;){let i=Math.floor((n+r)/2);this.is_ok(t,i)?n=i:r=i}return document.body.removeChild(t),n}},Bf=()=>{let e=document.createElement("div");return new Hs().mx(e)},Mf=()=>{let e=document.createElement("div"),t=document.createElement("span");t.style.fontSize="1px",t.innerText="A",e.appendChild(t),document.body.appendChild(e);let r=parseFloat(window.getComputedStyle(t).fontSize);return document.body.removeChild(e),r};Xl.exports={find_mx_wh:it,creat_mxw_ele:Lf,creat_mxh_ele:Pf,creat_mxwh_ele:jf,calc_mx_cnt:Wf,find_mx_zindex:Bf,find_min_font:Mf}});var Vs=h((qd,ea)=>{var{fullfill_url:Kl}=Be(),{editonly_sdfs_for_each:Ql}=nt(),Q=e=>{let t=[],r=0;for(;;){let n=e.indexOf("url(",r);if(n===-1)break;let i=e.indexOf("(",n),l=e.indexOf(")",i+1);if(l===-1)break;let a=e.substring(i+1,l).trim();(a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(a=a.slice(1,-1)),a&&t.push(a),r=l+1}return t},Ff=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>
20
20
  ${(await Promise.all(t)).filter(i=>i).join(`
21
21
 
22
22
  `)}
23
23
  <\/script>`},Yf=async()=>{let e="";for(let t of document.querySelectorAll('link[rel="stylesheet"]'))if(t.href)try{e+=await(await fetch(t.href)).text()+`
24
24
  `}catch{}for(let t of document.querySelectorAll("style"))e+=t.outerHtml+`
25
- `;return e},Hf=(e=document,t=r=>!0)=>{let r=new Set;return e.querySelectorAll("img[src]").forEach(n=>{t(n)&&r.add(Kl(n.getAttribute("src")))}),e.querySelectorAll("img[srcset]").forEach(n=>{if(t(n)){let i=n.getAttribute("srcset");if(!i)return;for(let l of i.split(",")){let[a]=l.trim().split(/\s+/);a&&r.add(Kl(a))}}}),e.querySelectorAll("svg").forEach(n=>{if(t(n)){let i=new XMLSerializer().serializeToString(n),l=new Blob([i],{type:"image/svg+xml"}),a=URL.createObjectURL(l);r.add([a,".svg"])}}),e.querySelectorAll("*").forEach(n=>{if(t(n)){let i=getComputedStyle(n).backgroundImage;if(!i||i==="none")return;let l=i.match(/url\(["']?(.*?)["']?\)/);l&&l[1]&&r.add(l[1])}}),Array.from(r).filter(Boolean)},Gs=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}else if(e instanceof CSSMediaRule||e instanceof CSSSupportsRule||e instanceof CSSKeyframesRule){let r=e.cssRules||e.rules;if(r)for(let n=0;n<r.length;n++)Gs(r[n],t)}else if(e instanceof CSSFontFaceRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}},Gf=()=>{let e={},t=document.styleSheets;for(let r=0;r<t.length;r++){let n=t[r],i="";n.href?i=n.href:n.ownerNode?n.ownerNode.tagName==="STYLE"?i="inline-style":n.ownerNode.tagName==="LINK"?i=n.ownerNode.href||"external-stylesheet":i="unknown":i="unknown",e[i]||(e[i]={});try{let l=n.cssRules||n.rules;if(!l)continue;for(let a=0;a<l.length;a++){let c=l[a];Gs(c,e[i])}}catch(l){console.warn(`\u65E0\u6CD5\u8BBF\u95EE\u6837\u5F0F\u8868 ${i} \u7684\u89C4\u5219:`,l)}}return e},Us=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}else if(e.cssRules||e.rules){let r=e.cssRules||e.rules;for(let n=0;n<r.length;n++)Us(r[n],t)}else if(e.style){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}},Dt=()=>{let e=new Set,t=document.styleSheets;for(let r=0;r<t.length;r++)try{let n=t[r],i=n.cssRules||n.rules;if(!i)continue;for(let l=0;l<i.length;l++)Us(i[l],e)}catch{}return Array.from(e)},zs=(e,t)=>{if(!t||!e)return null;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return null;let i=t;for(;i;){let l=i.parentElement;if(!l&&i.parentNode instanceof ShadowRoot&&(l=i.parentNode.host),!l||window.getComputedStyle(l).getPropertyValue(r).trim()!==n)return i;i=l}return i},Uf=(e,t)=>{if(!t||!e)return!1;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return!1;let i=t.parentElement;if(!i&&t.parentNode instanceof ShadowRoot&&(i=t.parentNode.host),!i)return!0;let l=window.getComputedStyle(i).getPropertyValue(r).trim();return n!==l},zf=async(e=document.documentElement)=>{let t=Dt(),r={};t.forEach(i=>r[i]=[]);let n=new Map;return await Ql(e,i=>{let l=window.getComputedStyle(i),a=i.parentElement;!a&&i.parentNode instanceof ShadowRoot&&(a=i.parentNode.host);let c=a?n.get(a):null,o=new Map;for(let u of t){let _=l.getPropertyValue(u).trim();_&&(o.set(u,_),(!c||c.get(u)!==_)&&r[u].push(i))}n.set(i,o)}),r},Vf=async(e=document.documentElement)=>{let t=Dt(),r=new Map,n=new Map;return await Ql(e,i=>{let l=window.getComputedStyle(i),a=i.parentElement||(i.parentNode instanceof ShadowRoot?i.parentNode.host:null),c=a?n.get(a):null,o=new Map,u=[];for(let _ of t){let f=l.getPropertyValue(_).trim();f&&(o.set(_,f),(!c||c.get(_)!==f)&&u.push(_))}u.length>0&&r.set(i,u),n.set(i,o)}),r},Xf=(e,t)=>{if(!e)return!1;let r=e.startsWith("--")?e:`--${e}`;return t?zs(r,t)!==null:Dt().includes(r)},Jf=(e,t,r=document.documentElement)=>{let n=e.startsWith("--")?e:`--${e}`;r.style.setProperty(n,String(t))},Zl=e=>{let t=e.startsWith("--")?e:`--${e}`;for(let r of document.styleSheets)try{let n=r.cssRules||r.rules;if(!n)continue;for(let i=0;i<n.length;i++){let l=n[i];if(window.CSSPropertyRule&&l instanceof CSSPropertyRule&&l.name===t)return{name:l.name,syntax:l.syntax,inherits:l.inherits,initialValue:l.initialValue}}}catch{}return null},Kf=(e,t)=>{let r=Zl(e);return r&&r.inherits===!1?zs(e,t)!==t:!1},Qf=(e,{syntax:t="*",inherits:r=!0,initialValue:n}={})=>{let i=e.startsWith("--")?e:`--${e}`;if(!window.CSS||!window.CSS.registerProperty)return console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 CSS.registerProperty"),!1;try{let l={name:i,syntax:t,inherits:r};return n!==void 0?l.initialValue=String(n):t!=="*"&&console.warn(`\u8B66\u544A: \u5F53 syntax \u4E3A "${t}" \u65F6\uFF0C\u5EFA\u8BAE\u63D0\u4F9B initialValue\u3002`),window.CSS.registerProperty(l),!0}catch(l){return console.error(`CSS \u53D8\u91CF "${i}" \u6CE8\u518C\u5931\u8D25:`,l.message),!1}};ea.exports={get_all_scripts:Wf,get_all_csses:Yf,collect_img_like_urls:Hf,extract_css_varnms_from_rule:Gs,get_all_css_vars:Gf,extract_css_varnms_from_rule_to_set:Us,get_all_uniq_css_varnms:Dt,find_css_var_scope_ele:zs,is_css_var_defined_on_self:Uf,get_css_var_scope_ele_mp:zf,get_scope_ele_css_var_mp:Vf,is_css_var_defined:Xf,def_css_var:Jf,get_css_prop_var:Zl,is_css_var_isolated:Kf,def_css_prop_var:Qf}});var Js=h((Cd,ia)=>{var ta={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},Zf=e=>`
25
+ `;return e},Hf=()=>{let e=new Set;return document.querySelectorAll("script[src]").forEach(t=>{let r=t.src;r&&!r.startsWith("data:")&&!r.startsWith("blob:")&&e.add(r)}),document.querySelectorAll('script[type="module"][src]').forEach(t=>{let r=t.src;r&&!r.startsWith("data:")&&!r.startsWith("blob:")&&e.add(r)}),"performance"in window&&performance.getEntriesByType&&performance.getEntriesByType("resource").forEach(r=>{r.initiatorType==="script"&&r.name&&!r.name.startsWith("data:")&&!r.name.startsWith("blob:")&&e.add(r.name)}),"performance"in window&&performance.getEntriesByType&&performance.getEntriesByType("resource").forEach(r=>{(r.name.endsWith(".json")||r.name.includes("?format=json")||r.initiatorType==="xmlhttprequest"&&r.name.includes("json"))&&r.name&&!r.name.startsWith("data:")&&!r.name.startsWith("blob:")&&e.add(r.name)}),Array.from(e)},Uf=()=>{let e=new Set;document.querySelectorAll('link[rel="stylesheet"]').forEach(n=>{let i=n.href;i&&!i.startsWith("data:")&&e.add(i)});let r=document.styleSheets;for(let n=0;n<r.length;n++){let i=r[n];try{if(!i.cssRules)continue;for(let l=0;l<i.cssRules.length;l++){let a=i.cssRules[l];if(a.type===CSSRule.IMPORT_RULE){a.href&&!a.href.startsWith("data:")&&e.add(a.href);let o=a.cssText;Q(o).forEach(c=>{c.startsWith("data:")||e.add(c)})}}}catch(l){l.name==="SecurityError"?console.warn(`Cannot access CSS rules for stylesheet: ${i.href||"inline style"}. Cross-origin restrictions apply.`):console.warn(`Error accessing stylesheet rules: ${l.message}`);continue}}return Array.from(document.styleSheets).forEach(n=>{try{if(!n.cssRules)return;Array.from(n.cssRules).forEach(i=>{if(i.type===CSSRule.FONT_FACE_RULE){let l=i.style.src;l&&Q(l).forEach(a=>e.add(a))}})}catch(i){i.name!=="SecurityError"&&console.warn("Error accessing stylesheet:",i)}}),root.querySelectorAll("*").forEach(n=>{if(fltr&&!fltr(n))return;let i=getComputedStyle(n);["backgroundImage","background"].forEach(f=>{let m=i[f];m&&m!=="none"&&Q(m).forEach(b=>e.add(b))});let a=i.listStyleImage;a&&a!=="none"&&Q(a).forEach(f=>e.add(f));let o=i.cursor;o&&o.includes("url(")&&Q(o).forEach(f=>e.add(f));let c=i.borderImageSource;c&&c!=="none"&&Q(c).forEach(f=>e.add(f));let u=i.content;u&&u!=="normal"&&u!=="none"&&Q(u).forEach(f=>e.add(f));let _=i.maskImage;_&&_!=="none"&&Q(_).forEach(f=>e.add(f))}),Array.from(e)},Gf=(e=document,t=r=>!0)=>{let r=new Set;return e.querySelectorAll("img[src]").forEach(n=>{t(n)&&r.add(Kl(n.getAttribute("src")))}),e.querySelectorAll("img[srcset]").forEach(n=>{if(t(n)){let i=n.getAttribute("srcset");if(!i)return;for(let l of i.split(",")){let[a]=l.trim().split(/\s+/);a&&r.add(Kl(a))}}}),e.querySelectorAll("svg").forEach(n=>{if(t(n)){let i=new XMLSerializer().serializeToString(n),l=new Blob([i],{type:"image/svg+xml"}),a=URL.createObjectURL(l);r.add([a,".svg"])}}),e.querySelectorAll("*").forEach(n=>{if(t(n)){let i=getComputedStyle(n).backgroundImage;if(!i||i==="none")return;let l=i.indexOf("url(")+4,a=i.indexOf(")",l);if(a===-1)return;let o=i.substring(l,a).trim();(o.startsWith('"')||o.startsWith("'"))&&(o=o.substring(1)),(o.endsWith('"')||o.endsWith("'"))&&(o=o.substring(0,o.length-1)),o&&r.add(o)}}),Array.from(r).filter(Boolean)},Us=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}else if(e instanceof CSSMediaRule||e instanceof CSSSupportsRule||e instanceof CSSKeyframesRule){let r=e.cssRules||e.rules;if(r)for(let n=0;n<r.length;n++)Us(r[n],t)}else if(e instanceof CSSFontFaceRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];if(i.startsWith("--")){let l=r.getPropertyValue(i).trim();l&&(t[i]=l)}}}},zf=()=>{let e={},t=document.styleSheets;for(let r=0;r<t.length;r++){let n=t[r],i="";n.href?i=n.href:n.ownerNode?n.ownerNode.tagName==="STYLE"?i="inline-style":n.ownerNode.tagName==="LINK"?i=n.ownerNode.href||"external-stylesheet":i="unknown":i="unknown",e[i]||(e[i]={});try{let l=n.cssRules||n.rules;if(!l)continue;for(let a=0;a<l.length;a++){let o=l[a];Us(o,e[i])}}catch(l){console.warn(`\u65E0\u6CD5\u8BBF\u95EE\u6837\u5F0F\u8868 ${i} \u7684\u89C4\u5219:`,l)}}return e},Gs=(e,t)=>{if(e instanceof CSSStyleRule){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}else if(e.cssRules||e.rules){let r=e.cssRules||e.rules;for(let n=0;n<r.length;n++)Gs(r[n],t)}else if(e.style){let r=e.style;for(let n=0;n<r.length;n++){let i=r[n];i.startsWith("--")&&t.add(i)}}},Ot=()=>{let e=new Set,t=document.styleSheets;for(let r=0;r<t.length;r++)try{let n=t[r],i=n.cssRules||n.rules;if(!i)continue;for(let l=0;l<i.length;l++)Gs(i[l],e)}catch{}return Array.from(e)},zs=(e,t)=>{if(!t||!e)return null;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return null;let i=t;for(;i;){let l=i.parentElement;if(!l&&i.parentNode instanceof ShadowRoot&&(l=i.parentNode.host),!l||window.getComputedStyle(l).getPropertyValue(r).trim()!==n)return i;i=l}return i},Vf=(e,t)=>{if(!t||!e)return!1;let r=e.startsWith("--")?e:`--${e}`,n=window.getComputedStyle(t).getPropertyValue(r).trim();if(n==="")return!1;let i=t.parentElement;if(!i&&t.parentNode instanceof ShadowRoot&&(i=t.parentNode.host),!i)return!0;let l=window.getComputedStyle(i).getPropertyValue(r).trim();return n!==l},Xf=async(e=document.documentElement)=>{let t=Ot(),r={};t.forEach(i=>r[i]=[]);let n=new Map;return await Ql(e,i=>{let l=window.getComputedStyle(i),a=i.parentElement;!a&&i.parentNode instanceof ShadowRoot&&(a=i.parentNode.host);let o=a?n.get(a):null,c=new Map;for(let u of t){let _=l.getPropertyValue(u).trim();_&&(c.set(u,_),(!o||o.get(u)!==_)&&r[u].push(i))}n.set(i,c)}),r},Jf=async(e=document.documentElement)=>{let t=Ot(),r=new Map,n=new Map;return await Ql(e,i=>{let l=window.getComputedStyle(i),a=i.parentElement||(i.parentNode instanceof ShadowRoot?i.parentNode.host:null),o=a?n.get(a):null,c=new Map,u=[];for(let _ of t){let f=l.getPropertyValue(_).trim();f&&(c.set(_,f),(!o||o.get(_)!==f)&&u.push(_))}u.length>0&&r.set(i,u),n.set(i,c)}),r},Kf=(e,t)=>{if(!e)return!1;let r=e.startsWith("--")?e:`--${e}`;return t?zs(r,t)!==null:Ot().includes(r)},Qf=(e,t,r=document.documentElement)=>{let n=e.startsWith("--")?e:`--${e}`;r.style.setProperty(n,String(t))},Zl=e=>{let t=e.startsWith("--")?e:`--${e}`;for(let r of document.styleSheets)try{let n=r.cssRules||r.rules;if(!n)continue;for(let i=0;i<n.length;i++){let l=n[i];if(window.CSSPropertyRule&&l instanceof CSSPropertyRule&&l.name===t)return{name:l.name,syntax:l.syntax,inherits:l.inherits,initialValue:l.initialValue}}}catch{}return null},Zf=(e,t)=>{let r=Zl(e);return r&&r.inherits===!1?zs(e,t)!==t:!1},eh=(e,{syntax:t="*",inherits:r=!0,initialValue:n}={})=>{let i=e.startsWith("--")?e:`--${e}`;if(!window.CSS||!window.CSS.registerProperty)return console.warn("\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 CSS.registerProperty"),!1;try{let l={name:i,syntax:t,inherits:r};return n!==void 0?l.initialValue=String(n):t!=="*"&&console.warn(`\u8B66\u544A: \u5F53 syntax \u4E3A "${t}" \u65F6\uFF0C\u5EFA\u8BAE\u63D0\u4F9B initialValue\u3002`),window.CSS.registerProperty(l),!0}catch(l){return console.error(`CSS \u53D8\u91CF "${i}" \u6CE8\u518C\u5931\u8D25:`,l.message),!1}};ea.exports={get_all_scripts:Ff,get_all_csses:Yf,extract_urls_from_url_paren:Q,collect_css_remote_urls:Uf,collect_js_remote_urls:Hf,collect_img_like_urls:Gf,extract_css_varnms_from_rule:Us,get_all_css_vars:zf,extract_css_varnms_from_rule_to_set:Gs,get_all_uniq_css_varnms:Ot,find_css_var_scope_ele:zs,is_css_var_defined_on_self:Vf,get_css_var_scope_ele_mp:Xf,get_scope_ele_css_var_mp:Jf,is_css_var_defined:Kf,def_css_var:Qf,get_css_prop_var:Zl,is_css_var_isolated:Zf,def_css_prop_var:eh}});var Js=h((Nd,ia)=>{var ta={success:"#38a169",error:"#e53e3e",warning:"#d69e2e",loading:"#3182ce",info:"#667eea"},th=e=>`
26
26
  position: fixed;
27
27
  top: 50%;
28
28
  left: 50%;
@@ -40,4 +40,4 @@ ${(await Promise.all(t)).filter(i=>i).join(`
40
40
  align-items: center;
41
41
  justify-content: center;
42
42
  font-size: 16px; /* \u5B57\u4F53\u53D8\u5927 */
43
- `,eh=(e,t)=>{let r=document.createElement("div");return r.style.cssText=Zf(e),r.textContent=t,document.body.appendChild(r),r},Lt=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 a={};this.tasks[t]=a,a.init_timer=setTimeout(()=>{a.ele=eh(n,r),a.duration_timer=setTimeout(()=>{this.del(t)},i)},l)}},sa=()=>new Lt,ra=sa(),th=(e,t,r="error",n=1e3,i=100)=>{ra.add(e,t,r,n,i)},sh=e=>{ra.del(e)},rh=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}`,a=document.createElement("div");a.className=i,Object.assign(a.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 u=document.createElement("div");u.style.display="flex",u.style.justifyContent="flex-end",u.style.gap="10px";let _=document.createElement("button");_.textContent="\u53D6\u6D88",Object.assign(_.style,{padding:"8px 16px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let f=document.createElement("button");f.textContent="\u786E\u8BA4",Object.assign(f.style,{padding:"8px 16px",backgroundColor:"#3498db",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let m=async y=>{try{await t(y,c)}catch(E){console.error("Dialog callback error:",E)}finally{c.remove(),a.remove()}};return _.addEventListener("click",()=>m(!1)),f.addEventListener("click",()=>m(!0)),a.addEventListener("click",y=>{y.target===a&&m(!1)}),u.appendChild(_),u.appendChild(f),c.appendChild(o),c.appendChild(u),a.appendChild(c),document.body.appendChild(a),c},na=async e=>{let t=document.createElement("div");Object.assign(t.style,{position:"fixed",inset:"0",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:"100000",backdropFilter:"blur(4px)",overflow:"hidden"});let r=await e,n=r instanceof HTMLElement?r:new Image;typeof r=="string"&&(n.src=r),Object.assign(n.style,{maxWidth:"90%",maxHeight:"90%",objectFit:"contain",border:"1px solid #555",boxShadow:"0 8px 30px rgba(0,0,0,0.5)",backgroundColor:"#fff"});let i=document.createElement("div");Object.assign(i.style,{position:"fixed",top:"30px",right:"30px",display:"flex",height:"40px",background:"#222",borderRadius:"20px",boxShadow:"0 4px 15px rgba(0,0,0,0.8)",zIndex:"100001",overflow:"hidden",border:"1px solid #444"});let l=document.createElement("div");l.innerHTML="\u283F",Object.assign(l.style,{padding:"0 15px",cursor:"move",backgroundColor:"#333",height:"100%",display:"flex",alignItems:"center",color:"#888"});let a=document.createElement("div");a.innerText="\u4FDD\u5B58\u622A\u56FE",Object.assign(a.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#2f54eb",color:"#fff",borderRight:"1px solid #444"}),a.onclick=async()=>{let _=await window.showSaveFilePicker({suggestedName:`screenshot_${new Date().getTime()}.png`,types:[{description:"PNG Image",accept:{"image/png":[".png"]}}]}),m=await(await fetch(n.src)).blob(),y=await _.createWritable();await y.write(m),await y.close()};let c=document.createElement("div");c.innerText="\u5173\u95ED",Object.assign(c.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#ff4d4f",color:"#fff"}),c.onclick=()=>{t.remove(),i.remove(),window.onmousemove=null,window.onmouseup=null};let o=!1,u={x:0,y:0};l.onmousedown=_=>{o=!0,u.x=_.clientX-i.offsetLeft,u.y=_.clientY-i.offsetTop},window.onmousemove=_=>{o&&(i.style.left=_.clientX-u.x+"px",i.style.top=_.clientY-u.y+"px",i.style.right="auto")},window.onmouseup=()=>o=!1,i.append(l,a,c),t.appendChild(n),document.body.append(t,i)},Xs=async(e,t)=>{if(t==="b64")return e.toDataURL("image/png");let r=await new Promise(n=>e.toBlob(n,"image/png"));switch(t){case"url":return URL.createObjectURL(r);case"u8a":return new Uint8Array(await r.arrayBuffer());case"ab":return await r.arrayBuffer();case"img":return new Promise((n,i)=>{let l=new Image,a=URL.createObjectURL(r);l.onload=()=>{URL.revokeObjectURL(a),n(l)},l.onerror=i,l.src=a,l.crossOrigin="anonymous"});default:return r}},nh=async(e,t=void 0)=>{if(!e||!(e instanceof HTMLElement)){console.error("\u65E0\u6548\u7684\u5143\u7D20\u5BF9\u8C61");return}let r=e.style.outline,n=e.style.transition;try{e.style.transition="outline 0.2s ease",e.style.outline="4px solid #2f54eb",e.style.outlineOffset="2px",e.scrollIntoView({block:"center",behavior:"instant"});let i=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),l=document.createElement("video");l.srcObject=i,await l.play();let a=l.videoWidth/window.innerWidth,c=l.videoHeight/window.innerHeight,o=e.getBoundingClientRect(),u=document.createElement("canvas");if(u.width=o.width*a,u.height=o.height*c,u.getContext("2d").drawImage(l,o.left*a,o.top*c,o.width*a,o.height*c,0,0,u.width,u.height),i.getTracks().forEach(f=>f.stop()),e.style.outline=r,e.style.transition=n,t===void 0){let f=await Xs(u,"img");na(f);return}return await Xs(u,t)}catch(i){e.style.outline=r,e.style.transition=n,i.name==="NotAllowedError"?console.warn("\u7528\u6237\u53D6\u6D88\u4E86\u5C4F\u5E55\u5171\u4EAB\u6388\u6743\u6216\u6743\u9650\u88AB\u62D2\u7EDD"):i.name==="NotFoundError"?console.error("\u672A\u627E\u5230\u53EF\u7528\u7684\u5A92\u4F53\u6D41\u6E90"):console.error("\u622A\u56FE\u53D1\u751F\u610F\u5916\u9519\u8BEF:",i)}};ia.exports={SimpleAlert:Lt,creat_simple_alert:sa,simple_alert:th,cancel_simple_alert:sh,simple_confirm_cancel:rh,show_img_modal:na,convert_canvas:Xs,ele2img:nh}});var ua=h((qd,oa)=>{var{creat_dt_prefix:la}=Be(),{simple_alert:ih}=Js(),{collect_img_like_urls:lh}=Vs(),{visit:ah}=nt(),aa=async(e,t,r)=>{if(!r)try{r=await window.showDirectoryPicker()}catch(n){return[!1,String(n.stack)]}try{let i=await(await r.getFileHandle(t,{create:!0})).createWritable();return await i.write(e),await i.close(),[!0,null]}catch(n){return[!1,String(n.stack)]}},ca=async(e,t,r,n)=>{if(r)Array.isArray(e)&&(e=e[0]);else if(Array.isArray(e))r=la()+"_inline"+e[1],e=e[0];else{let l=new URL(e).pathname.split("/");r=la()+"_"+l[l.length-1]}if(!t)try{dir=await window.showDirectoryPicker()}catch(i){n&&n.fails.push([e,String(i.stack)])}try{let l=await(await fetch(e)).blob(),[a,c]=await aa(l,r,t);n&&(a?n.succs.push(e):n.fails.push([e,String(c)]))}catch(i){n&&n.fails.push([e,String(i.stack)])}},ch=async(e=t=>!0)=>{let t=[],r=[],n=await window.showDirectoryPicker(),i=lh(document,e),l=Array.from(new Set(i));for(let a of l)await ca(a,n,void 0,{succs:t,fails:r});return ih("dnld_img_like",JSON.stringify({succs:t,fails:r},null,2),"success"),{succs:t,fails:r}},oh=async(e=document.body,t=100,r=100,n=i=>!0)=>{try{let i=await window.showDirectoryPicker(),l=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),a=document.createElement("video");a.srcObject=l,await a.play();let c=a.videoWidth/window.innerWidth,o=a.videoHeight/window.innerHeight,u=[];await ah(e,(_,f)=>{_.nodeType===1&&_.offsetWidth>=t&&_.offsetHeight>=r&&n(_)&&u.push({el:_,depth:f})},(_,f)=>{}),console.log(`[Scanner] \u5F00\u59CB\u81EA\u52A8\u4FDD\u5B58 ${u.length} \u5F20\u56FE\u7247\u5230\u76EE\u5F55...`);for(let _=0;_<u.length;_++){let{el:f,depth:m}=u[_];f.scrollIntoView({block:"center",behavior:"instant"}),await new Promise(Ot=>setTimeout(Ot,100));let y=f.getBoundingClientRect(),E=document.createElement("canvas");E.width=y.width*c,E.height=y.height*o,E.getContext("2d").drawImage(a,y.left*c,y.top*o,y.width*c,y.height*o,0,0,E.width,E.height);let Qs=`dep${m}_${f.tagName.toLowerCase()}_${_}.png`,da=await new Promise(Ot=>E.toBlob(Ot,"image/png")),Zs=await(await i.getFileHandle(Qs,{create:!0})).createWritable();await Zs.write(da),await Zs.close(),console.log(`\u5DF2\u81EA\u52A8\u5199\u5165: ${Qs}`)}l.getTracks().forEach(_=>_.stop()),console.log("\u6279\u91CF\u4FDD\u5B58\u4EFB\u52A1\u5B8C\u6210\uFF01")}catch(i){if(i.name==="AbortError")return;console.error("\u6279\u91CF\u4FDD\u5B58\u5931\u8D25:",i)}};oa.exports={save_blob:aa,fetch_save:ca,dnld_img_like:ch,take_photo_for_all_eles:oh}});var fa=h((Ad,_a)=>{var uh=(e,t=!1,r="text/javascript")=>new Promise((n,i)=>{try{let l=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(l),c=document.createElement("script");c.src=a,c.type=r,c.async=!t,c.onload=()=>{URL.revokeObjectURL(a),n([!0,c])},c.onerror=o=>{URL.revokeObjectURL(a),c.parentNode&&c.parentNode.removeChild(c),n([!1,o])},document.head.appendChild(c)}catch(l){n([!1,l])}}),Me={LT:"",GT:"",AMP:""},Nd={[Me.LT]:"<",[Me.GT]:">",[Me.AMP]:"&"},_h=(e,t,r="pre")=>{let n=t.replace(/</g,Me.LT).replace(/>/g,Me.GT).replace(/&/g,Me.AMP);return`<${r} id=${JSON.stringify(e)}>${n}</${r}>`},fh=(e,t,r="pre")=>{t=t.trim();let n=/<.*?>(.*)<\/.*?>/s,i=t.match(n);i||returnl;let l=i[1];return l=l.replace(/\u0001/g,"<").replace(/\u0002/g,">").replace(/\u0003/g,"&"),l},hh=(e,t)=>`<script id=${JSON.stringify(e)} src=${JSON.stringify("data:text/javascript,"+t)}><\/script>`;_a.exports={loadjs:uh,code2htxt:_h,htxt2code:fh,code2hscript:hh}});var Eh=h((Id,ha)=>{var dh=Et(),ph=Be(),gh=nt(),mh=Pl(),bh=Nt(),yh=Yl(),wh=Ul(),$h=Vl(),vh=Jl(),kh=Vs(),xh=Js(),Sh=ua(),Th=fa();ha.exports={_ison:dh,_util:ph,_nd:gh,_ele:mh,_attr:bh,_wait:yh,_ele_getter:wh,_cls_accessor:$h,_limit:vh,_code:kh,_ui:xh,_dnld:Sh,_impt:Th}});return Eh();})();
43
+ `,sh=(e,t)=>{let r=document.createElement("div");return r.style.cssText=th(e),r.textContent=t,document.body.appendChild(r),r},Dt=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 a={};this.tasks[t]=a,a.init_timer=setTimeout(()=>{a.ele=sh(n,r),a.duration_timer=setTimeout(()=>{this.del(t)},i)},l)}},sa=()=>new Dt,ra=sa(),rh=(e,t,r="error",n=1e3,i=100)=>{ra.add(e,t,r,n,i)},nh=e=>{ra.del(e)},ih=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}`,a=document.createElement("div");a.className=i,Object.assign(a.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 o=document.createElement("div");o.className=l,Object.assign(o.style,{backgroundColor:"white",borderRadius:"8px",padding:"20px",width:"300px",boxShadow:"0 5px 15px rgba(0, 0, 0, 0.3)",fontFamily:"Arial, sans-serif"});let c=document.createElement("h3");c.textContent=e,c.style.margin="0 0 20px 0",c.style.color="#333",c.style.fontSize="18px";let u=document.createElement("div");u.style.display="flex",u.style.justifyContent="flex-end",u.style.gap="10px";let _=document.createElement("button");_.textContent="\u53D6\u6D88",Object.assign(_.style,{padding:"8px 16px",backgroundColor:"#f5f5f5",border:"1px solid #ddd",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let f=document.createElement("button");f.textContent="\u786E\u8BA4",Object.assign(f.style,{padding:"8px 16px",backgroundColor:"#3498db",color:"white",border:"none",borderRadius:"4px",cursor:"pointer",fontSize:"14px"});let m=async b=>{try{await t(b,o)}catch(E){console.error("Dialog callback error:",E)}finally{o.remove(),a.remove()}};return _.addEventListener("click",()=>m(!1)),f.addEventListener("click",()=>m(!0)),a.addEventListener("click",b=>{b.target===a&&m(!1)}),u.appendChild(_),u.appendChild(f),o.appendChild(c),o.appendChild(u),a.appendChild(o),document.body.appendChild(a),o},na=async e=>{let t=document.createElement("div");Object.assign(t.style,{position:"fixed",inset:"0",backgroundColor:"rgba(0,0,0,0.85)",display:"flex",justifyContent:"center",alignItems:"center",zIndex:"100000",backdropFilter:"blur(4px)",overflow:"hidden"});let r=await e,n=r instanceof HTMLElement?r:new Image;typeof r=="string"&&(n.src=r),Object.assign(n.style,{maxWidth:"90%",maxHeight:"90%",objectFit:"contain",border:"1px solid #555",boxShadow:"0 8px 30px rgba(0,0,0,0.5)",backgroundColor:"#fff"});let i=document.createElement("div");Object.assign(i.style,{position:"fixed",top:"30px",right:"30px",display:"flex",height:"40px",background:"#222",borderRadius:"20px",boxShadow:"0 4px 15px rgba(0,0,0,0.8)",zIndex:"100001",overflow:"hidden",border:"1px solid #444"});let l=document.createElement("div");l.innerHTML="\u283F",Object.assign(l.style,{padding:"0 15px",cursor:"move",backgroundColor:"#333",height:"100%",display:"flex",alignItems:"center",color:"#888"});let a=document.createElement("div");a.innerText="\u4FDD\u5B58\u622A\u56FE",Object.assign(a.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#2f54eb",color:"#fff",borderRight:"1px solid #444"}),a.onclick=async()=>{let _=await window.showSaveFilePicker({suggestedName:`screenshot_${new Date().getTime()}.png`,types:[{description:"PNG Image",accept:{"image/png":[".png"]}}]}),m=await(await fetch(n.src)).blob(),b=await _.createWritable();await b.write(m),await b.close()};let o=document.createElement("div");o.innerText="\u5173\u95ED",Object.assign(o.style,{padding:"0 15px",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",fontSize:"13px",fontWeight:"bold",backgroundColor:"#ff4d4f",color:"#fff"}),o.onclick=()=>{t.remove(),i.remove(),window.onmousemove=null,window.onmouseup=null};let c=!1,u={x:0,y:0};l.onmousedown=_=>{c=!0,u.x=_.clientX-i.offsetLeft,u.y=_.clientY-i.offsetTop},window.onmousemove=_=>{c&&(i.style.left=_.clientX-u.x+"px",i.style.top=_.clientY-u.y+"px",i.style.right="auto")},window.onmouseup=()=>c=!1,i.append(l,a,o),t.appendChild(n),document.body.append(t,i)},Xs=async(e,t)=>{if(t==="b64")return e.toDataURL("image/png");let r=await new Promise(n=>e.toBlob(n,"image/png"));switch(t){case"url":return URL.createObjectURL(r);case"u8a":return new Uint8Array(await r.arrayBuffer());case"ab":return await r.arrayBuffer();case"img":return new Promise((n,i)=>{let l=new Image,a=URL.createObjectURL(r);l.onload=()=>{URL.revokeObjectURL(a),n(l)},l.onerror=i,l.src=a,l.crossOrigin="anonymous"});default:return r}},lh=async(e,t=void 0)=>{if(!e||!(e instanceof HTMLElement)){console.error("\u65E0\u6548\u7684\u5143\u7D20\u5BF9\u8C61");return}let r=e.style.outline,n=e.style.transition;try{e.style.transition="outline 0.2s ease",e.style.outline="4px solid #2f54eb",e.style.outlineOffset="2px",e.scrollIntoView({block:"center",behavior:"instant"});let i=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),l=document.createElement("video");l.srcObject=i,await l.play();let a=l.videoWidth/window.innerWidth,o=l.videoHeight/window.innerHeight,c=e.getBoundingClientRect(),u=document.createElement("canvas");if(u.width=c.width*a,u.height=c.height*o,u.getContext("2d").drawImage(l,c.left*a,c.top*o,c.width*a,c.height*o,0,0,u.width,u.height),i.getTracks().forEach(f=>f.stop()),e.style.outline=r,e.style.transition=n,t===void 0){let f=await Xs(u,"img");na(f);return}return await Xs(u,t)}catch(i){e.style.outline=r,e.style.transition=n,i.name==="NotAllowedError"?console.warn("\u7528\u6237\u53D6\u6D88\u4E86\u5C4F\u5E55\u5171\u4EAB\u6388\u6743\u6216\u6743\u9650\u88AB\u62D2\u7EDD"):i.name==="NotFoundError"?console.error("\u672A\u627E\u5230\u53EF\u7528\u7684\u5A92\u4F53\u6D41\u6E90"):console.error("\u622A\u56FE\u53D1\u751F\u610F\u5916\u9519\u8BEF:",i)}};ia.exports={SimpleAlert:Dt,creat_simple_alert:sa,simple_alert:rh,cancel_simple_alert:nh,simple_confirm_cancel:ih,show_img_modal:na,convert_canvas:Xs,ele2img:lh}});var ua=h((Ad,ca)=>{var{creat_dt_prefix:la}=Be(),{simple_alert:ah}=Js(),{collect_img_like_urls:oh}=Vs(),{visit:ch}=nt(),aa=async(e,t,r)=>{if(!r)try{r=await window.showDirectoryPicker()}catch(n){return[!1,String(n.stack)]}try{let i=await(await r.getFileHandle(t,{create:!0})).createWritable();return await i.write(e),await i.close(),[!0,null]}catch(n){return[!1,String(n.stack)]}},oa=async(e,t,r,n)=>{if(r)Array.isArray(e)&&(e=e[0]);else if(Array.isArray(e))r=la()+"_inline"+e[1],e=e[0];else{let l=new URL(e).pathname.split("/");r=la()+"_"+l[l.length-1]}if(!t)try{dir=await window.showDirectoryPicker()}catch(i){n&&n.fails.push([e,String(i.stack)])}try{let l=await(await fetch(e)).blob(),[a,o]=await aa(l,r,t);n&&(a?n.succs.push(e):n.fails.push([e,String(o)]))}catch(i){n&&n.fails.push([e,String(i.stack)])}},uh=async(e=t=>!0)=>{let t=[],r=[],n=await window.showDirectoryPicker(),i=oh(document,e),l=Array.from(new Set(i));for(let a of l)await oa(a,n,void 0,{succs:t,fails:r});return ah("dnld_img_like",JSON.stringify({succs:t,fails:r},null,2),"success"),{succs:t,fails:r}},_h=async(e=document.body,t=100,r=100,n=i=>!0)=>{try{let i=await window.showDirectoryPicker(),l=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},preferCurrentTab:!0}),a=document.createElement("video");a.srcObject=l,await a.play();let o=a.videoWidth/window.innerWidth,c=a.videoHeight/window.innerHeight,u=[];await ch(e,(_,f)=>{_.nodeType===1&&_.offsetWidth>=t&&_.offsetHeight>=r&&n(_)&&u.push({el:_,depth:f})},(_,f)=>{}),console.log(`[Scanner] \u5F00\u59CB\u81EA\u52A8\u4FDD\u5B58 ${u.length} \u5F20\u56FE\u7247\u5230\u76EE\u5F55...`);for(let _=0;_<u.length;_++){let{el:f,depth:m}=u[_];f.scrollIntoView({block:"center",behavior:"instant"}),await new Promise(Rt=>setTimeout(Rt,100));let b=f.getBoundingClientRect(),E=document.createElement("canvas");E.width=b.width*o,E.height=b.height*c,E.getContext("2d").drawImage(a,b.left*o,b.top*c,b.width*o,b.height*c,0,0,E.width,E.height);let Qs=`dep${m}_${f.tagName.toLowerCase()}_${_}.png`,da=await new Promise(Rt=>E.toBlob(Rt,"image/png")),Zs=await(await i.getFileHandle(Qs,{create:!0})).createWritable();await Zs.write(da),await Zs.close(),console.log(`\u5DF2\u81EA\u52A8\u5199\u5165: ${Qs}`)}l.getTracks().forEach(_=>_.stop()),console.log("\u6279\u91CF\u4FDD\u5B58\u4EFB\u52A1\u5B8C\u6210\uFF01")}catch(i){if(i.name==="AbortError")return;console.error("\u6279\u91CF\u4FDD\u5B58\u5931\u8D25:",i)}};ca.exports={save_blob:aa,fetch_save:oa,dnld_img_like:uh,take_photo_for_all_eles:_h}});var fa=h((Id,_a)=>{var fh=(e,t=!1,r="text/javascript")=>new Promise((n,i)=>{try{let l=new Blob([e],{type:"application/javascript"}),a=URL.createObjectURL(l),o=document.createElement("script");o.src=a,o.type=r,o.async=!t,o.onload=()=>{URL.revokeObjectURL(a),n([!0,o])},o.onerror=c=>{URL.revokeObjectURL(a),o.parentNode&&o.parentNode.removeChild(o),n([!1,c])},document.head.appendChild(o)}catch(l){n([!1,l])}}),hh=(e,t="link")=>{let r=JSON.stringify("data:text/css,"+e);if(t==="style"){let n=`@import ${r}`,i=document.createElement("style");return i.textContent=n,document.head.appendChild(i),i}else{let n=document.createElement("link");return n.rel="stylesheet",n.href=r,document.head.appendChild(n),n}},dh=(e,t)=>`<script id=${JSON.stringify(e)} src=${JSON.stringify("data:text/javascript,"+t)}><\/script>`,ph=(e,t)=>`<link id=${JSON.stringify(e)} ref="stylesheet" href=${JSON.stringify("data:text/css,"+t)}><\/script>`;_a.exports={loadjs:fh,loadcss:hh,code2hscript:dh,css2hlink:ph}});var qh=h((Od,ha)=>{var gh=Et(),mh=Be(),bh=nt(),yh=Pl(),wh=Nt(),$h=Yl(),vh=Gl(),kh=Vl(),xh=Jl(),Sh=Vs(),Th=Js(),Eh=ua(),Ch=fa();ha.exports={_ison:gh,_util:mh,_nd:bh,_ele:yh,_attr:wh,_wait:$h,_ele_getter:vh,_cls_accessor:kh,_limit:xh,_code:Sh,_ui:Th,_dnld:Eh,_impt:Ch}});return qh();})();
package/code.js CHANGED
@@ -1,6 +1,38 @@
1
1
  const {fullfill_url} = require("./util");
2
2
  const {editonly_sdfs_for_each} = require("./nd");
3
3
 
4
+ const extract_urls_from_url_paren = (value)=>{
5
+ const urls = [];
6
+
7
+ // 简化处理:找到所有 url(...) 模式
8
+ let searchIndex = 0;
9
+ while (true) {
10
+ const urlStart = value.indexOf('url(', searchIndex);
11
+ if (urlStart === -1) break;
12
+
13
+ const openParen = value.indexOf('(', urlStart);
14
+ const closeParen = value.indexOf(')', openParen + 1);
15
+ if (closeParen === -1) break;
16
+
17
+ let url = value.substring(openParen + 1, closeParen).trim();
18
+
19
+ // 去除引号
20
+ if ((url.startsWith('"') && url.endsWith('"')) ||
21
+ (url.startsWith("'") && url.endsWith("'"))) {
22
+ url = url.slice(1, -1);
23
+ }
24
+
25
+ if (url) {
26
+ urls.push(url);
27
+ }
28
+
29
+ searchIndex = closeParen + 1;
30
+ }
31
+
32
+ return urls;
33
+ }
34
+
35
+
4
36
  const get_all_scripts = async()=>{
5
37
  const scripts = document.querySelectorAll('script');
6
38
  const codePromises = [];
@@ -41,6 +73,172 @@ const get_all_csses = async()=>{
41
73
  return css;
42
74
  }
43
75
 
76
+ const collect_js_remote_urls = () => {
77
+ const urls = new Set();
78
+
79
+ // 1. 收集所有 script[src] 的远程 URL(包括普通脚本和模块)
80
+ document.querySelectorAll('script[src]').forEach(script => {
81
+ const src = script.src;
82
+ if (src && !src.startsWith('data:') && !src.startsWith('blob:')) {
83
+ urls.add(src);
84
+ }
85
+ });
86
+
87
+ // 2. 收集 ES6 模块脚本
88
+ document.querySelectorAll('script[type="module"][src]').forEach(script => {
89
+ const src = script.src;
90
+ if (src && !src.startsWith('data:') && !src.startsWith('blob:')) {
91
+ urls.add(src);
92
+ }
93
+ });
94
+
95
+ // 3. 收集通过 Performance API 可以追踪到的脚本资源
96
+ if ('performance' in window && performance.getEntriesByType) {
97
+ const resources = performance.getEntriesByType('resource');
98
+ resources.forEach(resource => {
99
+ if (resource.initiatorType === 'script' &&
100
+ resource.name &&
101
+ !resource.name.startsWith('data:') &&
102
+ !resource.name.startsWith('blob:')) {
103
+ urls.add(resource.name);
104
+ }
105
+ });
106
+ }
107
+
108
+ // 4. 收集 JSON 数据的加载(如果有的话)
109
+ // 通过 fetch/XHR 加载的 JSON 无法通过 DOM API 直接获取
110
+ // 但可以通过 Performance API 捕获
111
+ if ('performance' in window && performance.getEntriesByType) {
112
+ const resources = performance.getEntriesByType('resource');
113
+ resources.forEach(resource => {
114
+ // 检查是否是 JSON 文件(通过文件扩展名或 Content-Type)
115
+ const isJsonResource =
116
+ resource.name.endsWith('.json') ||
117
+ resource.name.includes('?format=json') ||
118
+ (resource.initiatorType === 'xmlhttprequest' &&
119
+ resource.name.includes('json'));
120
+
121
+ if (isJsonResource &&
122
+ resource.name &&
123
+ !resource.name.startsWith('data:') &&
124
+ !resource.name.startsWith('blob:')) {
125
+ urls.add(resource.name);
126
+ }
127
+ });
128
+ }
129
+
130
+ return Array.from(urls);
131
+ };
132
+
133
+
134
+ const collect_css_remote_urls = () => {
135
+ const urls = new Set(); // 使用 Set 去重
136
+ // 1. 收集所有 link[rel="stylesheet"] 的远程 href
137
+ const linkSheets = document.querySelectorAll('link[rel="stylesheet"]');
138
+ linkSheets.forEach(link => {
139
+ const href = link.href;
140
+ if (href && !href.startsWith('data:')) {
141
+ urls.add(href);
142
+ }
143
+ });
144
+ // 2. 收集所有样式表中的 @import 规则(排除 data:)
145
+ const allStyleSheets = document.styleSheets;
146
+ for (let i = 0; i < allStyleSheets.length; i++) {
147
+ const sheet = allStyleSheets[i];
148
+ try {
149
+ // 检查样式表是否可访问(跨域样式表可能会抛出 SecurityError)
150
+ if (!sheet.cssRules) continue;
151
+
152
+ for (let j = 0; j < sheet.cssRules.length; j++) {
153
+ const rule = sheet.cssRules[j];
154
+ // 检查是否为 @import 规则
155
+ if (rule.type === CSSRule.IMPORT_RULE) {
156
+ ////rule.href 只会返回第一个 URL! 为了兼容 @import "...." 这种写法 这里先读取一次
157
+ if (rule.href && !rule.href.startsWith('data:')) {
158
+ urls.add(rule.href);
159
+ }
160
+ const importText = rule.cssText;
161
+ extract_urls_from_url_paren(importText).forEach(url => {
162
+ if (!url.startsWith('data:')) {
163
+ urls.add(url);
164
+ }
165
+ });
166
+ }
167
+ }
168
+ } catch (error) {
169
+ // 处理跨域样式表访问限制
170
+ if (error.name === 'SecurityError') {
171
+ console.warn(`Cannot access CSS rules for stylesheet: ${sheet.href || 'inline style'}. Cross-origin restrictions apply.`);
172
+ } else {
173
+ console.warn(`Error accessing stylesheet rules: ${error.message}`);
174
+ }
175
+ continue;
176
+ }
177
+ }
178
+ ////------------------------------------------------------------------------------------------------------
179
+
180
+ ////------------------------------------------------------------------------------------------------------
181
+ // 3. 收集 @font-face 中的 url()
182
+ Array.from(document.styleSheets).forEach(sheet => {
183
+ try {
184
+ if (!sheet.cssRules) return;
185
+
186
+ Array.from(sheet.cssRules).forEach(rule => {
187
+ if (rule.type === CSSRule.FONT_FACE_RULE) {
188
+ const src = rule.style.src;
189
+ if (src) {
190
+ extract_urls_from_url_paren(src).forEach(url => urls.add(url));
191
+ }
192
+ }
193
+ });
194
+ } catch (error) {
195
+ if (error.name !== 'SecurityError') {
196
+ console.warn('Error accessing stylesheet:', error);
197
+ }
198
+ }
199
+ });
200
+ // 4. 收集 CSS 属性中的 url()
201
+ root.querySelectorAll("*").forEach(el => {
202
+ if (fltr && !fltr(el)) return;
203
+ const computedStyle = getComputedStyle(el);
204
+ // 背景相关
205
+ const bgProps = ['backgroundImage', 'background'];
206
+ bgProps.forEach(prop => {
207
+ const value = computedStyle[prop];
208
+ if (value && value !== 'none') {
209
+ extract_urls_from_url_paren(value).forEach(url => urls.add(url));
210
+ }
211
+ });
212
+ // 列表样式
213
+ const listStyle = computedStyle.listStyleImage;
214
+ if (listStyle && listStyle !== 'none') {
215
+ extract_urls_from_url_paren(listStyle).forEach(url => urls.add(url));
216
+ }
217
+ // 光标
218
+ const cursor = computedStyle.cursor;
219
+ if (cursor && cursor.includes('url(')) {
220
+ extract_urls_from_url_paren(cursor).forEach(url => urls.add(url));
221
+ }
222
+ // 边框图像
223
+ const borderImage = computedStyle.borderImageSource;
224
+ if (borderImage && borderImage !== 'none') {
225
+ extract_urls_from_url_paren(borderImage).forEach(url => urls.add(url));
226
+ }
227
+ // 内容
228
+ const content = computedStyle.content;
229
+ if (content && content !== 'normal' && content !== 'none') {
230
+ extract_urls_from_url_paren(content).forEach(url => urls.add(url));
231
+ }
232
+ // 遮罩
233
+ const maskImage = computedStyle.maskImage;
234
+ if (maskImage && maskImage !== 'none') {
235
+ extract_urls_from_url_paren(maskImage).forEach(url => urls.add(url));
236
+ }
237
+ });
238
+ return Array.from(urls);
239
+ };
240
+
241
+
44
242
  const collect_img_like_urls = (root = document,fltr=(el)=>true) => {
45
243
  const urls = new Set();
46
244
 
@@ -75,14 +273,27 @@ const collect_img_like_urls = (root = document,fltr=(el)=>true) => {
75
273
 
76
274
  // CSS background-image (非常保守版)
77
275
  root.querySelectorAll("*").forEach(el => {
78
- if(fltr(el)) {
79
- const bg = getComputedStyle(el).backgroundImage;
80
- if (!bg || bg === "none") return;
81
- const m = bg.match(/url\(["']?(.*?)["']?\)/);
82
- if (m && m[1]) urls.add(m[1]);
83
- } else {
84
-
85
- }
276
+ if(fltr(el)) {
277
+ const bg = getComputedStyle(el).backgroundImage;
278
+ if (!bg || bg === "none") return;
279
+
280
+ // 简单方法:找到 url( ) 之间的内容
281
+ const start = bg.indexOf('url(') + 4; // "url(".length = 4
282
+ const end = bg.indexOf(')', start);
283
+ if (end === -1) return;
284
+
285
+ let url = bg.substring(start, end).trim();
286
+
287
+ // 去掉首尾的引号
288
+ if (url.startsWith('"') || url.startsWith("'")) {
289
+ url = url.substring(1);
290
+ }
291
+ if (url.endsWith('"') || url.endsWith("'")) {
292
+ url = url.substring(0, url.length - 1);
293
+ }
294
+
295
+ if (url) urls.add(url);
296
+ }
86
297
  });
87
298
 
88
299
  return Array.from(urls).filter(Boolean);
@@ -492,7 +703,13 @@ const def_css_prop_var = (name, { syntax = '*', inherits = true, initialValue }
492
703
  module.exports = {
493
704
  get_all_scripts,
494
705
  get_all_csses,
706
+ ////
707
+ extract_urls_from_url_paren,
708
+ collect_css_remote_urls,
709
+ collect_js_remote_urls,
710
+ ////
495
711
  collect_img_like_urls,
712
+ ////
496
713
  extract_css_varnms_from_rule,
497
714
  get_all_css_vars,
498
715
  extract_css_varnms_from_rule_to_set,
package/impt.js CHANGED
@@ -28,44 +28,25 @@ const loadjs = (code_str, block_html =false, T='text/javascript') => {
28
28
  };
29
29
 
30
30
 
31
- // 完整的方案一实现(性能最优)
32
- const PLACEHOLDERS = {
33
- LT: '\u0001', // Start of Heading
34
- GT: '\u0002', // Start of Text
35
- AMP: '\u0003' // End of Text
36
- };
37
-
38
- const REVERSE_PLACEHOLDERS = {
39
- [PLACEHOLDERS.LT]: '<',
40
- [PLACEHOLDERS.GT]: '>',
41
- [PLACEHOLDERS.AMP]: '&'
42
- };
43
-
44
- const code2htxt = (id, code_str,tag="pre") => {
45
- let safe_replaced_str = code_str
46
- .replace(/</g, PLACEHOLDERS.LT)
47
- .replace(/>/g, PLACEHOLDERS.GT)
48
- .replace(/&/g, PLACEHOLDERS.AMP);
31
+ const loadcss = (code_str,T="link")=>{
32
+ let data_url = JSON.stringify("data:text/css,"+code_str);
33
+ if(T==="style") {
34
+ let impt = `@import ${data_url}`;
35
+ const style = document.createElement('style');
36
+ style.textContent = impt;
37
+ document.head.appendChild(style);
38
+ return style;
39
+
40
+ } else {
41
+ const link = document.createElement('link');
42
+ link.rel = 'stylesheet';
43
+ link.href = data_url; // 这里用 href,不是 src
44
+ document.head.appendChild(link);
45
+ return link
46
+ }
49
47
 
50
- return `<${tag} id=${JSON.stringify(id)}>${safe_replaced_str}</${tag}>`;
51
48
  }
52
49
 
53
- const htxt2code = (id, htxt_str,tag="pre") => {
54
- // 根据实际使用的标签调整选择器
55
- htxt_str = htxt_str.trim();
56
- const regex = /<.*?>(.*)<\/.*?>/s;
57
-
58
- const match = htxt_str.match(regex);
59
- if (!match) returnl
60
-
61
- let code_str = match[1];
62
- code_str = code_str
63
- .replace(/\u0001/g, '<')
64
- .replace(/\u0002/g, '>')
65
- .replace(/\u0003/g, '&');
66
-
67
- return code_str;
68
- };
69
50
 
70
51
  /*
71
52
  <!-- 直接嵌入小段代码 -->
@@ -78,10 +59,15 @@ const htxt2code = (id, htxt_str,tag="pre") => {
78
59
  const code2hscript = (id, code_str) => {
79
60
  return `<script id=${JSON.stringify(id)} src=${JSON.stringify("data:text/javascript,"+code_str)}></script>`;
80
61
  }
62
+ const css2hlink = (id, code_str) => {
63
+ return `<link id=${JSON.stringify(id)} ref="stylesheet" href=${JSON.stringify("data:text/css,"+code_str)}></script>`;
64
+ }
81
65
 
82
66
  module.exports = {
83
67
  loadjs,
84
- code2htxt,
85
- htxt2code,
68
+ ////
69
+ loadcss,
70
+ ////
86
71
  code2hscript,
72
+ css2hlink
87
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nv-basic-bw",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"