nadesiko3 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/batch/command.txt +472 -469
  2. package/batch/pickup_command.nako3 +1 -1
  3. package/core/.eslintrc.cjs +10 -3
  4. package/core/package-lock.json +1184 -645
  5. package/core/package.json +4 -5
  6. package/core/src/nako3.mjs +8 -6
  7. package/core/src/nako3.mts +19 -16
  8. package/core/src/nako_ast.mts +2 -3
  9. package/core/src/nako_core_version.mjs +2 -2
  10. package/core/src/nako_core_version.mts +2 -2
  11. package/core/src/nako_csv.mjs +1 -0
  12. package/core/src/nako_csv.mts +3 -2
  13. package/core/src/nako_from_dncl.mjs +1 -1
  14. package/core/src/nako_from_dncl.mts +1 -1
  15. package/core/src/nako_from_dncl2.mjs +1 -1
  16. package/core/src/nako_from_dncl2.mts +2 -2
  17. package/core/src/nako_gen.mjs +37 -35
  18. package/core/src/nako_gen.mts +70 -67
  19. package/core/src/nako_global.mjs +3 -2
  20. package/core/src/nako_global.mts +3 -2
  21. package/core/src/nako_lexer.mjs +3 -3
  22. package/core/src/nako_lexer.mts +3 -3
  23. package/core/src/nako_logger.mjs +1 -1
  24. package/core/src/nako_logger.mts +2 -2
  25. package/core/src/nako_parser3.mjs +67 -59
  26. package/core/src/nako_parser3.mts +96 -90
  27. package/core/src/nako_parser_base.mts +3 -3
  28. package/core/src/nako_prepare.mjs +1 -1
  29. package/core/src/nako_prepare.mts +1 -1
  30. package/core/src/nako_source_mapping.mts +0 -1
  31. package/core/src/nako_token.mts +8 -8
  32. package/core/src/nako_types.mts +1 -1
  33. package/core/src/plugin_api.mts +1 -1
  34. package/core/src/plugin_csv.mjs +1 -0
  35. package/core/src/plugin_csv.mts +2 -1
  36. package/core/src/plugin_math.mjs +2 -2
  37. package/core/src/plugin_math.mts +3 -3
  38. package/core/src/plugin_promise.mjs +1 -1
  39. package/core/src/plugin_promise.mts +1 -1
  40. package/core/src/plugin_system.mjs +117 -40
  41. package/core/src/plugin_system.mts +132 -58
  42. package/core/src/plugin_test.mjs +3 -1
  43. package/core/src/plugin_test.mts +3 -1
  44. package/core/test/basic_test.mjs +16 -0
  45. package/core/test/calc_test.mjs +7 -0
  46. package/core/test/plugin_system_test.mjs +33 -0
  47. package/doc/files.md +4 -4
  48. package/doc/plugins.md +1 -1
  49. package/package.json +9 -9
  50. package/release/_hash.txt +36 -121
  51. package/release/_script-tags.txt +16 -33
  52. package/release/command.json +1 -1
  53. package/release/command.json.js +1 -1
  54. package/release/command_cnako3.json +1 -1
  55. package/release/command_list.json +1 -1
  56. package/release/edit_main.js +3 -3
  57. package/release/edit_main.js.map +2 -2
  58. package/release/editor.js +3 -3
  59. package/release/plugin_markup.js +53 -53
  60. package/release/plugin_markup.js.map +3 -3
  61. package/release/plugin_weykturtle3d.js +1 -1
  62. package/release/plugin_weykturtle3d.js.map +4 -4
  63. package/release/version.js +3 -3
  64. package/release/version_main.js +3 -3
  65. package/release/version_main.js.map +2 -2
  66. package/release/wnako3.js +66 -66
  67. package/release/wnako3.js.map +3 -3
  68. package/release/wnako3webworker.js +58 -58
  69. package/release/wnako3webworker.js.map +3 -3
  70. package/src/browsers.txt +30 -20
  71. package/src/cnako3mod.mjs +19 -18
  72. package/src/cnako3mod.mts +17 -16
  73. package/src/deno_wrapper.mjs +6 -6
  74. package/src/deno_wrapper.mts +11 -11
  75. package/src/nako_version.mjs +2 -2
  76. package/src/nako_version.mts +2 -2
  77. package/src/plugin_browser.mjs +2 -2
  78. package/src/plugin_browser.mts +5 -5
  79. package/src/plugin_browser_ajax.mjs +2 -2
  80. package/src/plugin_browser_ajax.mts +2 -2
  81. package/src/plugin_browser_api.mts +0 -1
  82. package/src/plugin_browser_crypto.mjs +8 -8
  83. package/src/plugin_browser_crypto.mts +13 -13
  84. package/src/plugin_browser_dom_basic.mjs +3 -3
  85. package/src/plugin_browser_dom_basic.mts +5 -7
  86. package/src/plugin_browser_dom_event.mjs +1 -1
  87. package/src/plugin_browser_dom_event.mts +2 -1
  88. package/src/plugin_browser_dom_parts.mjs +33 -18
  89. package/src/plugin_browser_dom_parts.mts +60 -59
  90. package/src/plugin_browser_speech.mjs +1 -1
  91. package/src/plugin_browser_speech.mts +1 -1
  92. package/src/plugin_node.mjs +5 -3
  93. package/src/plugin_node.mts +6 -4
  94. package/src/plugin_weykturtle3d.mjs +38 -15
  95. package/src/plugin_weykturtle3d.mts +279 -240
  96. package/src/plugin_weykturtle3d_three.mjs +3 -0
  97. package/src/plugin_weykturtle3d_three.mts +214 -0
  98. package/src/plugin_weykturtle3d_threeutil.mjs +28 -0
  99. package/src/plugin_weykturtle3d_threeutil.mts +31 -0
  100. package/src/wnako3.mjs +1 -0
  101. package/src/wnako3.mts +1 -0
  102. package/src/wnako3mod.mjs +5 -2
  103. package/src/wnako3mod.mts +6 -3
  104. package/batch/command_nakopad.txt +0 -1177
  105. package/core/__report.txt +0 -617
  106. package/core/command/plugin_snako.mjs +0 -112
  107. package/core/command/snako.mjs +0 -108
  108. package/release/core_src_nako_josi_list_mjs.js +0 -3
  109. package/release/core_src_nako_josi_list_mjs.js.LICENSE.txt +0 -3
  110. package/release/core_src_nako_josi_list_mjs.js.map +0 -1
  111. package/release/core_src_nako_reserved_words_mjs.js +0 -3
  112. package/release/core_src_nako_reserved_words_mjs.js.LICENSE.txt +0 -3
  113. package/release/core_src_nako_reserved_words_mjs.js.map +0 -1
  114. package/release/editor/edit_main.js +0 -48
  115. package/release/editor/edit_main.js.map +0 -7
  116. package/release/editor/version_main.js +0 -44
  117. package/release/editor/version_main.js.map +0 -7
  118. package/release/editor.js.LICENSE.txt +0 -91
  119. package/release/editor.js.map +0 -1
  120. package/release/nako_gen_async.js +0 -2
  121. package/release/nako_gen_async.js.LICENSE.txt +0 -21
  122. package/release/nako_gen_async.js.map +0 -1
  123. package/release/plugin_caniuse.js.LICENSE.txt +0 -15
  124. package/release/plugin_datetime.js.LICENSE.txt +0 -21
  125. package/release/plugin_kansuji.js.LICENSE.txt +0 -3
  126. package/release/plugin_markup.js.LICENSE.txt +0 -15
  127. package/release/plugin_toml.js +0 -295
  128. package/release/plugin_toml.js.map +0 -7
  129. package/release/plugin_turtle.js.LICENSE.txt +0 -9
  130. package/release/plugin_webworker.js.LICENSE.txt +0 -3
  131. package/release/plugin_weykturtle3d.js.LICENSE.txt +0 -3
  132. package/release/src/plugin_caniuse.js +0 -2
  133. package/release/src/plugin_caniuse.js.map +0 -7
  134. package/release/src/plugin_datetime.js +0 -2
  135. package/release/src/plugin_datetime.js.map +0 -7
  136. package/release/src/plugin_kansuji.js +0 -2
  137. package/release/src/plugin_kansuji.js.map +0 -7
  138. package/release/src/plugin_keigo.js +0 -2
  139. package/release/src/plugin_keigo.js.map +0 -7
  140. package/release/src/plugin_markup.js +0 -64
  141. package/release/src/plugin_markup.js.map +0 -7
  142. package/release/src/plugin_three.js +0 -2
  143. package/release/src/plugin_three.js.map +0 -7
  144. package/release/src/plugin_turtle.js +0 -2
  145. package/release/src/plugin_turtle.js.map +0 -7
  146. package/release/src/plugin_webworker.js +0 -4
  147. package/release/src/plugin_webworker.js.map +0 -7
  148. package/release/src/plugin_weykturtle3d.js +0 -2
  149. package/release/src/plugin_weykturtle3d.js.map +0 -7
  150. package/release/src/wnako3.js +0 -482
  151. package/release/src/wnako3.js.map +0 -7
  152. package/release/src/wnako3webworker.js +0 -428
  153. package/release/src/wnako3webworker.js.map +0 -7
  154. package/release/stats.json +0 -1
  155. package/release/version.js.LICENSE.txt +0 -65
  156. package/release/version.js.map +0 -1
  157. package/release/wnako3.js.LICENSE.txt +0 -341
  158. package/release/wnako3webworker.js.LICENSE.txt +0 -209
  159. package/src/plugin_three.mts +0 -240
@@ -1,482 +0,0 @@
1
- "use strict";(()=>{var W={and:1,or:1,eq:2,noteq:2,"===":2,"!==":2,gt:2,gteq:2,lt:2,lteq:2,"&":3,"+":4,"-":4,shift_l:4,shift_r:4,shift_r0:4,"*":5,"/":5,"\xF7":5,"\xF7\xF7":5,"%":5,"^":6,"**":6},se=["\u3044\u3066","\u3048\u3066","\u304D\u3066","\u3051\u3066","\u3057\u3066","\u3063\u3066","\u306B\u3066","\u307F\u3066","\u3081\u3066","\u306D\u3066","\u306B\u306F","\u3093\u3067"],Me=[];for(let t in W)Me.push(t);function E(t="?",e="",n=-1,r=0,i="main.nako3"){return{type:t,value:e,indent:n,line:r,column:0,file:i,josi:""}}var Ee=class{constructor(e){this.logger=e,this.stackList=[],this.tokens=[],this.usedFuncs=new Set,this.stack=[],this.index=0,this.y=[],this.modName="inline",this.namespaceStack=[],this.modList=[],this.funclist=new Map,this.funcLevel=0,this.usedAsyncFn=!1,this.localvars=new Map([["\u305D\u308C",{type:"var",value:""}]]),this.genMode="sync",this.arrayIndexFrom=0,this.flagReverseArrayIndex=!1,this.flagCheckArrayInit=!1,this.recentlyCalledFunc=[],this.isReadingCalc=!1,this.isExportDefault=!0,this.isExportStack=[],this.moduleExport=new Map,this.init()}init(){this.funclist=new Map,this.moduleExport=new Map,this.reset()}reset(){this.tokens=[],this.index=0,this.stack=[],this.y=[],this.genMode="sync"}setFuncList(e){this.funclist=e}setModuleExport(e){this.moduleExport=e}popStack(e=void 0){if(!e){let n=this.stack.pop();return n||null}for(let n=this.stack.length-1;n>=0;n--){let r=this.stack[n];if(e.length===0||e.indexOf(r.josi)>=0)return this.stack.splice(n,1),this.logger.trace("POP :"+JSON.stringify(r)),r}return null}saveStack(){this.stackList.push(this.stack),this.stack=[]}loadStack(){this.stack=this.stackList.pop()}findVar(e){if(this.localvars.get(e))return{name:e,scope:"local",info:this.localvars.get(e)};if(e.indexOf("__")>=0)return this.funclist.get(e)?{name:e,scope:"global",info:this.funclist.get(e)}:void 0;let n=`${this.modName}__${e}`;if(this.funclist.get(n))return{name:n,scope:"global",info:this.funclist.get(n)};for(let r of this.modList){let i=`${r}__${e}`,o=this.moduleExport.get(r),s=this.funclist.get(i);if(s&&(s.isExport===!0||s.isExport!==!1&&o!==!1))return{name:i,scope:"global",info:this.funclist.get(i)}}if(this.funclist.get(e))return{name:e,scope:"system",info:this.funclist.get(e)}}pushStack(e){this.logger.trace("PUSH:"+JSON.stringify(e)),this.stack.push(e)}isEOF(){return this.index>=this.tokens.length}getIndex(){return this.index}check(e){return this.tokens[this.index].type===e}check2(e){for(let n=0;n<e.length;n++){let r=n+this.index;if(this.tokens.length<=r)return!1;if(e[n]==="*")continue;let i=this.tokens[r];if(e[n]instanceof Array){if(e[n].indexOf(i.type)<0)return!1;continue}if(i.type!==e[n])return!1}return!0}checkTypes(e){let n=this.tokens[this.index].type;return e.indexOf(n)>=0}accept(e){let n=[],r=this.index,i=()=>(this.index=r,!1);for(let o=0;o<e.length;o++){if(this.isEOF())return i();let s=e[o];if(s==null)return i();if(typeof s=="string"){let u=this.get();if(u&&u.type!==s)return i();n[o]=u;continue}if(typeof s=="function"){let c=s.bind(this)(n);if(c===null)return i();n[o]=c;continue}if(s instanceof Array){if(!this.checkTypes(s))return i();n[o]=this.get();continue}throw new Error("System Error : accept broken : "+typeof s)}return this.y=n,!0}get(){return this.isEOF()?null:this.tokens[this.index++]}getCur(){if(this.isEOF())throw new Error("\u30C8\u30FC\u30AF\u30F3\u304C\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3002");let e=this.tokens[this.index++];if(!e)throw new Error("\u30C8\u30FC\u30AF\u30F3\u304C\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3002");return e}unget(){this.index>0&&this.index--}peek(e=0){return this.isEOF()?null:this.tokens[this.index+e]}peekDef(e=null){return this.isEOF()?(e||(e=E()),e):this.tokens[this.index]}peekSourceMap(){let e=this.peek();return e===null?{startOffset:void 0,endOffset:void 0,file:void 0,line:0,column:0}:{startOffset:e.startOffset,endOffset:e.endOffset,file:e.file,line:e.line,column:e.column}}nodeToStr(e,n,r){let i=n.depth-1,o=u=>n.typeName!==void 0?n.typeName:u,s=r?" debug: "+JSON.stringify(e,null,2):"";if(!e)return"(NULL)";switch(e.type){case"not":if(i>=0){let u=e.value;return`${o("")}\u300E${this.nodeToStr(u,{depth:i},r)}\u306B\u6F14\u7B97\u5B50\u300Enot\u300F\u3092\u9069\u7528\u3057\u305F\u5F0F${s}\u300F`}else return`${o("\u6F14\u7B97\u5B50")}\u300Enot\u300F`;case"op":{let u=e,c=u.operator||"",a={eq:"\uFF1D",not:"!",gt:">",lt:"<",and:"\u304B\u3064",or:"\u307E\u305F\u306F"};if(c in a&&(c=a[c]),i>=0){let f=this.nodeToStr(u.left,{depth:i},r),l=this.nodeToStr(u.right,{depth:i},r);return u.operator==="eq"?`${o("")}\u300E${f}\u3068${l}\u304C\u7B49\u3057\u3044\u304B\u3069\u3046\u304B\u306E\u6BD4\u8F03${s}\u300F`:`${o("")}\u300E${f}\u3068${l}\u306B\u6F14\u7B97\u5B50\u300E${c}\u300F\u3092\u9069\u7528\u3057\u305F\u5F0F${s}\u300F`}else return`${o("\u6F14\u7B97\u5B50")}\u300E${c}${s}\u300F`}case"number":return`${o("\u6570\u5024")}${e.value}`;case"bigint":return`${o("\u5DE8\u5927\u6574\u6570")}${e.value}`;case"string":return`${o("\u6587\u5B57\u5217")}\u300E${e.value}${s}\u300F`;case"word":return`${o("\u5358\u8A9E")}\u300E${e.value}${s}\u300F`;case"func":return`${o("\u95A2\u6570")}\u300E${e.name||e.value}${s}\u300F`;case"eol":return"\u884C\u306E\u672B\u5C3E";case"eof":return"\u30D5\u30A1\u30A4\u30EB\u306E\u672B\u5C3E";default:{let u=e.name;return u&&(u=e.value),typeof u!="string"&&(u=e.type),`${o("")}\u300E${u}${s}\u300F`}}}};var I=class extends Error{constructor(e,n,r=void 0,i=void 0){let o=`${r||""}${i===void 0?"":`(${i+1}\u884C\u76EE): `}`;n=n.replace(/『main__(.+?)』/g,"\u300E$1\u300F"),super(`[${e}]${o}${n}`),this.name="NakoError",this.type="NakoError",this.tag="["+e+"]",this.positionJa=o,this.msg=n}},ue=class extends I{constructor(e,n,r){super("\u30A4\u30F3\u30C7\u30F3\u30C8\u30A8\u30E9\u30FC",e,r,n),this.type="NakoIndentError",this.line=n,this.file=r}},z=class extends I{constructor(e,n,r,i,o){super("\u5B57\u53E5\u89E3\u6790\u30A8\u30E9\u30FC\uFF08\u5185\u90E8\u30A8\u30E9\u30FC\uFF09",e,o,i),this.type="InternalLexerError",this.preprocessedCodeStartOffset=n,this.preprocessedCodeEndOffset=r,this.line=i,this.file=o}},ne=class extends I{constructor(e,n,r,i,o){super("\u5B57\u53E5\u89E3\u6790\u30A8\u30E9\u30FC",e,o,i),this.type="NakoLexerError",this.startOffset=n,this.endOffset=r,this.line=i,this.file=o}},_=class t extends I{static fromNode(e,n,r=void 0){if(!n)return new t(e,void 0,void 0,void 0,void 0);let i=typeof n.startOffset=="number"?n.startOffset:void 0,o=r&&typeof r.endOffset=="number"?r.endOffset:typeof n.endOffset=="number"?n.endOffset:void 0;return new t(e,n.line,i,o,n.file)}constructor(e,n,r,i,o){super("\u6587\u6CD5\u30A8\u30E9\u30FC",e,o,n),this.type="NakoSyntaxError",this.file=o,this.line=n,this.startOffset=r,this.endOffset=i}},re=class t extends I{constructor(e,n){let r="unknown";typeof e=="string"?r=e:e instanceof t||e instanceof I?r=e.msg:e instanceof Error&&(e.name==="Error"?r=e.message:r=`${e.name}: ${e.message}`);let i,o,s;n===void 0?(i=void 0,o=void 0):(s=/^l(-?\d+):(.*)$/.exec(n))?(i=parseInt(s[1]),o=s[2]):(s=/^l(-?\d+)$/.exec(n))?(i=parseInt(s[1]),o="main.nako3"):(i=0,o=n),super("\u5B9F\u884C\u6642\u30A8\u30E9\u30FC",r,o,i),this.type="NakoRuntimeError",this.lineNo=n,this.line=i,this.file=o}},B=class extends I{constructor(e,n,r){super("\u53D6\u308A\u8FBC\u307F\u30A8\u30E9\u30FC",e,n,r),this.file=n,this.line=r}};var An=new Map([["\u56DE","\u56DE"],["\u56DE\u7E70\u8FD4","\u56DE"],["\u9593","\u9593"],["\u9593\u7E70\u8FD4","\u9593"],["\u7E70\u8FD4","\u7E70\u8FD4"],["\u5897\u7E70\u8FD4","\u5897\u7E70\u8FD4"],["\u6E1B\u7E70\u8FD4","\u6E1B\u7E70\u8FD4"],["\u5F8C\u5224\u5B9A","\u5F8C\u5224\u5B9A"],["\u53CD\u5FA9","\u53CD\u5FA9"],["\u629C","\u629C\u3051\u308B"],["\u7D9A","\u7D9A\u3051\u308B"],["\u623B","\u623B\u308B"],["\u5148","\u5148\u306B"],["\u6B21","\u6B21\u306B"],["\u4EE3\u5165","\u4EE3\u5165"],["\u5B9F\u884C\u901F\u5EA6\u512A\u5148","\u5B9F\u884C\u901F\u5EA6\u512A\u5148"],["\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u30E2\u30CB\u30BF\u9069\u7528","\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u30E2\u30CB\u30BF\u9069\u7528"],["\u5B9A","\u5B9A\u3081\u308B"],["\u9010\u6B21\u5B9F\u884C","\u9010\u6B21\u5B9F\u884C"],["\u6761\u4EF6\u5206\u5C90","\u6761\u4EF6\u5206\u5C90"],["\u5897","\u5897"],["\u6E1B","\u6E1B"],["\u5909\u6570","\u5909\u6570"],["\u5B9A\u6570","\u5B9A\u6570"],["\u30A8\u30E9\u30FC\u76E3\u8996","\u30A8\u30E9\u30FC\u76E3\u8996"],["\u30A8\u30E9\u30FC","\u30A8\u30E9\u30FC"],["\u305D\u308C","word"],["\u305D\u3046","word"],["\u95A2\u6570","def_func"],["\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587","\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587"],["\u975E\u540C\u671F\u30E2\u30FC\u30C9","\u975E\u540C\u671F\u30E2\u30FC\u30C9"],["DNCL\u30E2\u30FC\u30C9","DNCL\u30E2\u30FC\u30C9"],["\u30E2\u30FC\u30C9\u8A2D\u5B9A","\u30E2\u30FC\u30C9\u8A2D\u5B9A"],["\u53D6\u8FBC","\u53D6\u8FBC"],["\u30E2\u30B8\u30E5\u30FC\u30EB\u516C\u958B\u65E2\u5B9A\u5024","\u30E2\u30B8\u30E5\u30FC\u30EB\u516C\u958B\u65E2\u5B9A\u5024"],["\u53B3\u30C1\u30A7\u30C3\u30AF","\u53B3\u30C1\u30A7\u30C3\u30AF"]]),Xe=An;function St(t){let e=t.charCodeAt(0);return t===" "?4:t===" "||t==="|"?1:t==="\u30FB"||t==="\u3000"||t==="\u23CB"||t==="\u23CC"||e>=9472&&e<=9599||e>=9120&&e<=9135||e>=9144&&e<=9151?2:0}var Ne=["\u306B\u3064\u3044\u3066","\u304F\u3089\u3044","\u306A\u306E\u304B","\u307E\u3067\u3092","\u307E\u3067\u306E","\u306B\u3088\u308B","\u3068\u306F","\u304B\u3089","\u307E\u3067","\u3060\u3051","\u3088\u308A","\u307B\u3069","\u306A\u3069","\u3044\u3066","\u3048\u3066","\u304D\u3066","\u3051\u3066","\u3057\u3066","\u3063\u3066","\u306B\u3066","\u307F\u3066","\u3081\u3066","\u306D\u3066","\u3067\u306F","\u306B\u306F","\u306F~","\u3093\u3067","\u305A\u3064","\u306F","\u3092","\u306B","\u3078","\u3067","\u3068","\u304C","\u306E"],Nn=["\u3067\u306A\u3051\u308C\u3070","\u306A\u3051\u308C\u3070","\u306A\u3089\u3070","\u306A\u3089","\u305F\u3089","\u308C\u3070"],Fn=["\u3053\u3068","\u3067\u3042\u308B","\u3067\u3059","\u3057\u307E\u3059","\u3067\u3057\u305F"],Ye={};Nn.forEach(t=>{Ne.push(t),Ye[t]=!0});var ce={};Fn.forEach(t=>{Ne.push(t),ce[t]=!0});var Ae=[];for(let t of Ne)Ae.push("\u3082\u306E"+t),Ae.push(t);Ae.sort((t,e)=>e.length-t.length);var Cn="^[\\t ]*("+Ae.join("|")+")",de=new RegExp(Cn),jt=Ne;var Tn=/^[\u3005\u4E00-\u9FCF_a-zA-Z0-9ァ-ヶー\u2460-\u24FF\u2776-\u277F\u3251-\u32BF]+/,Ot=/^[ぁ-ん]/,Ln=/^[ぁ-ん]+$/,Dn=/^.+(以上|以下|超|未満)$/,Vn=/^(かつ|または)/,xt=t=>function(){throw new Error("\u7A81\u7136\u306E\u300E"+t+"\u300F\u304C\u3042\u308A\u307E\u3059\u3002")},$t=/^(円|ドル|元|歩|㎡|坪|度|℃|°|個|つ|本|冊|才|歳|匹|枚|皿|セット|羽|人|件|行|列|機|品|m|mm|cm|km|g|kg|t|px|dot|pt|em|b|mb|kb|gb)/,Mt=[{name:"\u3053\u3053\u307E\u3067",pattern:/^;;;/},{name:"eol",pattern:/^\n/},{name:"eol",pattern:/^;/},{name:"space",pattern:/^(\x20|\x09|・|⎿ |└||)+/},{name:"comma",pattern:/^,/},{name:"line_comment",pattern:/^#[^\n]*/},{name:"line_comment",pattern:/^\/\/[^\n]*/},{name:"range_comment",pattern:/^\/\*/,cbParser:Pn},{name:"def_test",pattern:/^●テスト:/},{name:"def_func",pattern:/^●/},{name:"\u2026",pattern:/^…/},{name:"\u2026",pattern:/^\.{2,3}/},{name:"bigint",pattern:/^0[xX][0-9a-fA-F]+(_[0-9a-fA-F]+)*n/,readJosi:!0},{name:"bigint",pattern:/^0[oO][0-7]+(_[0-7]+)*n/,readJosi:!0},{name:"bigint",pattern:/^0[bB][0-1]+(_[0-1]+)*n/,readJosi:!0},{name:"bigint",pattern:/^\d+(_\d+)*?n/,readJosi:!0},{name:"number",pattern:/^0[xX][0-9a-fA-F]+(_[0-9a-fA-F]+)*/,readJosi:!0,cb:ae},{name:"number",pattern:/^0[oO][0-7]+(_[0-7]+)*/,readJosi:!0,cb:ae},{name:"number",pattern:/^0[bB][0-1]+(_[0-1]+)*/,readJosi:!0,cb:ae},{name:"number",pattern:/^\d+(_\d+)*\.(\d+(_\d+)*)?([eE][+|-]?\d+(_\d+)*)?/,readJosi:!0,cb:ae},{name:"number",pattern:/^\.\d+(_\d+)*([eE][+|-]?\d+(_\d+)*)?/,readJosi:!0,cb:ae},{name:"number",pattern:/^\d+(_\d+)*([eE][+|-]?\d+(_\d+)*)?/,readJosi:!0,cb:ae},{name:"\u3053\u3053\u304B\u3089",pattern:/^(ここから),?/},{name:"\u3053\u3053\u307E\u3067",pattern:/^(ここまで|💧)/},{name:"\u3082\u3057",pattern:/^もしも?/},{name:"\u9055\u3048\u3070",pattern:/^違(えば)?/},{name:"shift_r0",pattern:/^>>>/},{name:"shift_r",pattern:/^>>/},{name:"shift_l",pattern:/^<</},{name:"===",pattern:/^===/},{name:"!==",pattern:/^!==/},{name:"gteq",pattern:/^(≧|>=|=>)/},{name:"lteq",pattern:/^(≦|<=|=<)/},{name:"noteq",pattern:/^(≠|<>|!=)/},{name:"\u2190",pattern:/^(←|<--)/},{name:"eq",pattern:/^(==|🟰🟰)/},{name:"eq",pattern:/^(=|🟰)/},{name:"line_comment",pattern:/^(!|💡)(インデント構文|ここまでだるい|DNCLモード|DNCL2モード|DNCL2)[^\n]*/},{name:"not",pattern:/^(!|💡)/},{name:"gt",pattern:/^>/},{name:"lt",pattern:/^</},{name:"and",pattern:/^(かつ|&&|and\s)/},{name:"or",pattern:/^(または|或いは|あるいは|or\s|\|\|)/},{name:"@",pattern:/^@/},{name:"+",pattern:/^\+/},{name:"-",pattern:/^-/},{name:"**",pattern:/^(××|\*\*)/},{name:"*",pattern:/^(×|\*)/},{name:"\xF7\xF7",pattern:/^÷÷/},{name:"\xF7",pattern:/^(÷|\/)/},{name:"%",pattern:/^%/},{name:"^",pattern:/^\^/},{name:"&",pattern:/^&/},{name:"[",pattern:/^\[/},{name:"]",pattern:/^]/,readJosi:!0},{name:"(",pattern:/^\(/},{name:")",pattern:/^\)/,readJosi:!0},{name:"|",pattern:/^\|/},{name:"string",pattern:/^🌿/,cbParser:t=>ie("\u{1F33F}","\u{1F33F}",t)},{name:"string_ex",pattern:/^🌴/,cbParser:t=>ie("\u{1F334}","\u{1F334}",t)},{name:"string_ex",pattern:/^「/,cbParser:t=>ie("\u300C","\u300D",t)},{name:"string",pattern:/^『/,cbParser:t=>ie("\u300E","\u300F",t)},{name:"string_ex",pattern:/^“/,cbParser:t=>ie("\u201C","\u201D",t)},{name:"string_ex",pattern:/^"/,cbParser:t=>ie('"','"',t)},{name:"string",pattern:/^'/,cbParser:t=>ie("'","'",t)},{name:"\u300D",pattern:/^」/,cbParser:xt("\u300D")},{name:"\u300F",pattern:/^』/,cbParser:xt("\u300F")},{name:"func",pattern:/^\{関数\},?/},{name:"{",pattern:/^\{/},{name:"}",pattern:/^\}/,readJosi:!0},{name:":",pattern:/^:/},{name:"_eol",pattern:/^_\s*\n/},{name:"dec_lineno",pattern:/^‰/},{name:"word",pattern:/^[\uD800-\uDBFF][\uDC00-\uDFFF][_a-zA-Z0-9]*/,readJosi:!0},{name:"word",pattern:/^[\u1F60-\u1F6F][_a-zA-Z0-9]*/,readJosi:!0},{name:"word",pattern:/^《.+?》/,readJosi:!0},{name:"word",pattern:/^[_a-zA-Z\u3005\u4E00-\u9FCFぁ-んァ-ヶ\u2460-\u24FF\u2776-\u277F\u3251-\u32BF]/,cbParser:Rn}];function In(t){return Ot.test(t)?Ln.test(t)?t:t.replace(/[ぁ-ん]+$/g,""):t.replace(/[ぁ-ん]+/g,"")}function Pn(t){let e="",n="",r=0;t=t.substring(2);let i=t.indexOf("*/");i<0?(e=t,t=""):(e=t.substring(0,i),t=t.substring(i+2));for(let o=0;o<e.length;o++)e.charAt(o)===`
2
- `&&r++;return e=e.replace(/(^\s+|\s+$)/,""),{src:t,res:e,josi:n,numEOL:r}}function Rn(t,e=!0){let n="",r="";for(;t!=="";){if(n.length>0){if(Vn.exec(t))break;let c=de.exec(t);if(c){r=c[0].replace(/^\s+/,""),t=t.substring(c[0].length),t.charAt(0)===","&&(t=t.substring(1));break}}let o=Tn.exec(t);if(o){n+=o[0],t=t.substring(o[0].length);continue}if(Ot.test(t)){n+=t.charAt(0),t=t.substring(1);continue}break}/[ぁ-ん]間$/.test(n)&&(t=n.charAt(n.length-1)+t,n=n.slice(0,-1));let i=Dn.exec(n);return i&&(t=i[1]+r+t,r="",n=n.substring(0,n.length-i[1].length)),r.substring(0,2)==="\u3082\u306E"&&(r=r.substring(2)),ce[r]&&(r=""),e&&(n=In(n)),n===""&&r!==""&&(n=r,r=""),{src:t,res:n,josi:r,numEOL:0}}function ie(t,e,n){let r="",i="",o=0;n=n.substring(t.length);let s=n.indexOf(e);if(s<0)r=n,n="";else if(r=n.substring(0,s),n=n.substring(s+e.length),r.indexOf(t)>=0)throw t==="\u300E"?new Error("\u300C\u300E\u300D\u3067\u59CB\u3081\u305F\u6587\u5B57\u5217\u306E\u4E2D\u306B\u300C\u300E\u300D\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002"):new Error(`\u300E${t}\u300F\u3067\u59CB\u3081\u305F\u6587\u5B57\u5217\u306E\u4E2D\u306B\u300E${t}\u300F\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002`);let u=de.exec(n);u&&(i=u[0].replace(/^\s+/,""),n=n.substring(u[0].length),n.charAt(0)===","&&(n=n.substring(1))),ce[i]&&(i=""),i.substring(0,2)==="\u3082\u306E"&&(i=i.substring(2));for(let c=0;c<r.length;c++)r.charAt(c)===`
3
- `&&o++;return{src:n,res:r,josi:i,numEOL:o}}function ae(t){return Number(t.replace(/_/g,""))}var q=class t{constructor(e){this.logger=e,this.funclist=new Map,this.modList=[],this.result=[],this.modName="main.nako3",this.moduleExport=new Map,this.reservedWords=Array.from(Xe.keys()),this.josiList=jt}setFuncList(e){this.funclist=e}setModuleExport(e){this.moduleExport=e}replaceTokens(e,n,r){if(this.result=e,this.modName=t.filenameToModName(r),t.preDefineFunc(e,this.logger,this.funclist,this.moduleExport),this._replaceWord(this.result),n)if(this.result.length>0){let i=this.result[this.result.length-1];this.result.push({type:"eol",line:i.line,column:0,indent:-1,file:i.file,josi:"",value:"---",startOffset:i.startOffset,endOffset:i.endOffset,rawJosi:""}),this.result.push({type:"eof",line:i.line,indent:-1,column:0,file:i.file,josi:"",value:"",startOffset:i.startOffset,endOffset:i.endOffset,rawJosi:""})}else this.result.push({type:"eol",line:0,column:0,indent:-1,file:"",josi:"",value:"---",startOffset:0,endOffset:0,rawJosi:""}),this.result.push({type:"eof",line:0,column:0,indent:-1,file:"",josi:"",value:"",startOffset:0,endOffset:0,rawJosi:""});return this.result}static preDefineFunc(e,n,r,i){let o=0,s=!1,u=()=>{let c=[],a={};if(e[o].type!=="(")return[];for(o++;e[o];){let d=e[o];if(o++,d.type===")")break;d.type==="func"?s=!0:d.type!=="|"&&d.type!=="comma"&&(s&&(d.funcPointer=!0,s=!1),c.push(d),a[d.value]||(a[d.value]=[]),a[d.value].push(d.josi))}let f=[],l=[],p=[],h={};for(let d of c)if(!h[d.value]){let g=a[d.value];p.push(g),f.push(d.value),d.funcPointer?l.push(d.value):l.push(null),h[d.value]=!0}return[p,f,l]};for(;o<e.length;){let c=e[o];if(c.type==="not"&&e.length-o>3){let v={type:"eol"};if(o>=1&&(v=e[o-1]),v.type==="eol"){let k=e[o+1];if(k.type==="word"&&k.value==="\u30E2\u30B8\u30E5\u30FC\u30EB\u516C\u958B\u65E2\u5B9A\u5024"){if(k.type="\u30E2\u30B8\u30E5\u30FC\u30EB\u516C\u958B\u65E2\u5B9A\u5024",k=e[o+2],k.type==="string"&&k.value==="\u975E\u516C\u958B"){let $=t.filenameToModName(c.file);i.set($,!1),o+=3;continue}else if(k.type==="string"&&k.value==="\u516C\u958B"){let $=t.filenameToModName(c.file);i.set($,!0),o+=3;continue}}}}if(c.type==="word"&&c.josi==="\u306B\u306F"||c.type==="word"&&c.josi==="\u306F~"){c.josi="\u306B\u306F",e.splice(o+1,0,{type:"def_func",value:"\u95A2\u6570",indent:c.indent,line:c.line,column:c.column,file:c.file,josi:"",startOffset:c.endOffset,endOffset:c.endOffset,rawJosi:"",tag:"\u7121\u540D\u95A2\u6570"}),o++;continue}if(c.type==="word"&&c.value==="\u6C38\u9060"&&c.josi==="\u306B"){let v=e[o+1];v.value==="\u7E70\u8FD4"&&(v.value="\u9593",v.josi="\u306E"),o++;continue}if(c.type==="word"&&c.josi===""&&c.value.length>=2&&c.value.match(/回$/)){c.value=c.value.substring(0,c.value.length-1),c.endOffset||(c.endOffset=1);let v={type:"\u56DE",value:"\u56DE",indent:c.indent,line:c.line,column:c.column,file:c.file,josi:"",startOffset:c.endOffset-1,endOffset:c.endOffset,rawJosi:""};e.splice(o+1,0,v),c.endOffset--,o++}if(c.type==="word"){let v=Xe.get(c.value);v&&(c.type=v),c.value==="\u305D\u3046"&&(c.value="\u305D\u308C")}if(c.type!=="def_test"&&c.type!=="def_func"){o++;continue}let a=!0,f={type:"eol"};o>=1&&(f=e[o-1]),f.type==="eol"&&(a=!1);let l=c;o++;let p=[],h=[],d=[],g="",b=null,m=null;if(e[o]&&e[o].type==="{"){o++;let v=e[o]&&e[o].type==="word"?e[o].value:"";v==="\u516C\u958B"?m=!0:v==="\u975E\u516C\u958B"?m=!1:v==="\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8"?m=!0:n.warn(`\u4E0D\u660E\u306A\u95A2\u6570\u5C5E\u6027\u300E${v}\u300F\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),o++,e[o]&&e[o].type==="}"&&o++}if(e[o]&&e[o].type==="("&&([p,h,d]=u()),!a&&e[o]&&e[o].type==="word"&&(b=e[o++],g=b.value),p.length===0&&e[o]&&e[o].type==="("&&([p,h,d]=u()),g!==""&&b){if(g=t.filenameToModName(c.file)+"__"+g,r.has(g)){let k=g.replace(/^main__/,"");n.warn(`\u95A2\u6570\u300E${k}\u300F\u306F\u65E2\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059\u3002`,l)}b.value=g,r.set(g,{type:"func",josi:p,fn:null,asyncFn:!1,isExport:m,varnames:h,funcPointers:d})}let y={type:"func",josi:p,varnames:h,funcPointers:d};l.meta=y}}splitStringEx(e){let n=[],r=e.split(/[{{]/);n.push(r[0]);for(let i of r.slice(1)){let o=i.replace("\uFF5D","}").indexOf("}");if(o===-1)return null;n.push(i.slice(0,o),i.slice(o+1))}return n}_replaceWord(e){let n=[],r=0,i=!1,o=[],s=()=>r<=0?"eol":e[r-1].type,u=e.length>0?t.filenameToModName(e[0].file):"main";for(;r<e.length;){let c=e[r];if((c.type==="word"||c.type==="func")&&c.value==="\u540D\u524D\u7A7A\u9593\u8A2D\u5B9A"){if(i)throw new z("\u540D\u524D\u7A7A\u9593\u8A2D\u5B9A\u306E\u95A2\u6570\u53C2\u7167\u3092\u53D6\u5F97\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002",c.startOffset===void 0?0:c.startOffset,c.endOffset===void 0?0:c.endOffset,c.line,c.file);o.push(u),u=e[r-1].value}if((c.type==="word"||c.type==="func")&&c.value==="\u540D\u524D\u7A7A\u9593\u30DD\u30C3\u30D7"){if(i)throw new z("\u540D\u524D\u7A7A\u9593\u30DD\u30C3\u30D7\u306E\u95A2\u6570\u53C2\u7167\u3092\u53D6\u5F97\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002",c.startOffset===void 0?0:c.startOffset,c.endOffset===void 0?0:c.endOffset,c.line,c.file);let a=o.pop();a&&(u=a)}if(c.type==="word"&&c.value!=="\u305D\u308C"){let a=c.value;if(a.indexOf("__")<0){let l=`${u}__${a}`,p=this.funclist.get(l);if(p&&p.type==="func"){c.type=i?"func_pointer":"func",c.meta=p,c.value=l,i&&(i=!1,e.splice(r-1,1));continue}for(let h of this.modList){let d=`${h}__${a}`,g=this.funclist.get(d),b=this.moduleExport.get(h);if(g&&g.type==="func"&&(g.isExport===!0||g.isExport!==!1&&b!==!1)){c.type=i?"func_pointer":"func",c.meta=g,c.value=d,i&&(i=!1,e.splice(r-1,1));break}}if(c.type==="func"||c.type==="func_pointer")continue}let f=this.funclist.get(a);if(f&&f.type==="func"&&(c.type=i?"func_pointer":"func",c.meta=f,i)){i=!1,e.splice(r-1,1);continue}}if(i=!1,c.type==="func"&&c.value==="{\u95A2\u6570}"){r++,i=!0;continue}if(c.type==="-"&&e[r+1]){let a=e[r+1].type;if(a==="number"||a==="bigint"){let f=s();(f==="eol"||W[f]||e[r-1].josi!=="")&&(e.splice(r,1),a==="number"?e[r].value*=-1:e[r].value="-"+e[r].value)}}if(c.josi===void 0&&(c.josi=""),c.josi==="\u306F"){c.rawJosi||(c.rawJosi=c.josi);let a=c.endOffset===void 0?void 0:c.endOffset-c.rawJosi.length;e.splice(r+1,0,{type:"eq",indent:c.indent,line:c.line,column:c.column,file:c.file,startOffset:a,endOffset:c.endOffset,josi:"",rawJosi:"",value:void 0}),r+=2,c.josi=c.rawJosi="",c.endOffset=a;continue}if(c.josi==="\u3068\u306F"){c.rawJosi||(c.rawJosi=c.josi);let a=c.endOffset===void 0?void 0:c.endOffset-c.rawJosi.length;e.splice(r+1,0,{type:c.josi,indent:c.indent,line:c.line,column:c.column,file:c.file,startOffset:a,endOffset:c.endOffset,josi:"",rawJosi:"",value:void 0}),c.josi=c.rawJosi="",c.endOffset=a,r+=2;continue}if(Ye[c.josi]){let a=c.josi==="\u3067\u306A\u3051\u308C\u3070"||c.josi==="\u306A\u3051\u308C\u3070"?"\u3067\u306A\u3051\u308C\u3070":"\u306A\u3089\u3070";c.rawJosi||(c.rawJosi=a);let f=c.endOffset===void 0?void 0:c.endOffset-c.rawJosi.length;e.splice(r+1,0,{type:"\u306A\u3089\u3070",value:a,indent:c.indent,line:c.line,column:c.column,file:c.file,startOffset:f,endOffset:c.endOffset,josi:"",rawJosi:""}),c.josi=c.rawJosi="",c.endOffset=f,r+=2;continue}if(c.type==="_eol"){e.splice(r,1);continue}if(c.type==="line_comment"||c.type==="range_comment"){n.push(c.value),e.splice(r,1);continue}c.type==="eol"&&(c.value=n.join("/"),n=[]),r++}}countIndent(e){let n=0;for(let r=0;r<e.length;r++){let i=e.charAt(r),o=St(i);if(o===0)return[n,r];n+=o}return[n,e.length]}tokenize(e,n,r){let i=e.length,o=[],s,u,c=1,a=!1,f=0,l=this.countIndent(e);for(f=l[0],e=e.substring(l[1]),c+=l[1];e!=="";){let p=!1;for(let h of Mt){let d=h.pattern.exec(e);if(!d)continue;if(p=!0,h.name==="space"){c+=d[0].length,e=e.substring(d[0].length);continue}if(h.cbParser){let y;if(a&&h.name==="word")y=h.cbParser(e,!1);else try{y=h.cbParser(e)}catch(v){throw new ne(v.message,i-e.length,i-e.length+1,n,r)}if(h.name==="string_ex"){let v=this.splitStringEx(y.res);if(v===null)throw new z("\u5C55\u958B\u3042\u308A\u6587\u5B57\u5217\u3067\u5024\u306E\u57CB\u3081\u8FBC\u307F{...}\u304C\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",i-e.length,i-y.src.length,n,r);let k=0;for(let $=0;$<v.length;$++){let V=$===v.length-1?y.josi:"";$%2===0?(o.push({type:"string",value:v[$],file:r,josi:V,indent:f,line:n,column:c,preprocessedCodeOffset:i-e.length+k,preprocessedCodeLength:v[$].length+2+V.length}),k+=v[$].length+2):(o.push({type:"&",value:"&",josi:"",indent:f,file:r,line:n,column:c,preprocessedCodeOffset:i-e.length+k,preprocessedCodeLength:0}),o.push({type:"(",value:"(",josi:"",indent:f,file:r,line:n,column:c,preprocessedCodeOffset:i-e.length+k,preprocessedCodeLength:0}),o.push({type:"code",value:v[$],josi:"",indent:f,file:r,line:n,column:c,preprocessedCodeOffset:i-e.length+k,preprocessedCodeLength:v[$].length}),o.push({type:")",value:")",josi:"",indent:f,file:r,line:n,column:c,preprocessedCodeOffset:i-e.length+k+v[$].length,preprocessedCodeLength:0}),o.push({type:"&",value:"&",josi:"",indent:f,file:r,line:n,column:c,preprocessedCodeOffset:i-e.length+k+v[$].length,preprocessedCodeLength:0}),k+=v[$].length)}n+=y.numEOL,c+=e.length-y.src.length,e=y.src,y.numEOL>0&&(c=1);break}s=c,c+=e.length-y.src.length,o.push({type:h.name,value:y.res,josi:y.josi,indent:f,line:n,column:s,file:r,preprocessedCodeOffset:i-e.length,preprocessedCodeLength:e.length-y.src.length}),e=y.src,n+=y.numEOL,y.numEOL>0&&(c=1);break}let g=i-e.length,b=d[0];if(h.cb&&(b=h.cb(b)),s=c,u=n,c+=d[0].length,e=e.substring(d[0].length),(h.name==="eol"&&b===`
4
- `||h.name==="_eol")&&(b=n++,c=1),h.name==="number"){let y=$t.exec(e);y&&(e=e.substring(y[0].length),c+=d[0].length)}let m="";if(h.readJosi){let y=de.exec(e);y&&(c+=y[0].length,m=y[0].replace(/^\s+/,""),e=e.substring(y[0].length),e.charAt(0)===","&&(e=e.substring(1)),ce[m]&&(m=""),m.substring(0,2)==="\u3082\u306E"&&(m=m.substring(2)))}switch(h.name){case"def_test":{a=!0;break}case"eol":{a=!1;break}default:break}if(h.name==="dec_lineno"){n--;continue}if(o.push({type:h.name,value:b,indent:f,line:u,column:s,file:r,josi:m,preprocessedCodeOffset:g,preprocessedCodeLength:i-e.length-g}),h.name==="eol"&&c===1){let y=this.countIndent(e);f=y[0],c+=y[1],e=e.substring(y[1])}break}if(!p)throw new z("\u672A\u77E5\u306E\u8A9E\u53E5: "+e.substring(0,3)+"...",i-e.length,i-i+3,n,r)}return o}static tokensToTypeStr(e,n){return e.map(i=>i.type).join(n)}static filenameToModName(e){if(!e)return"main";if(e=e.replace(/[\\:]/g,"/"),e.indexOf("/")>=0){let n=e.split("/");e=n[n.length-1]}return e=e.replace(/\.nako3?$/,""),e}};var Fe=class extends Ee{parse(e,n){return this.reset(),this.tokens=e,this.modName=q.filenameToModName(n),this.modList.push(this.modName),this.startParser()}startParser(){let e=this.ySentenceList(),n=this.get();if(n&&n.type!=="eof")throw this.logger.debug(`\u69CB\u6587\u89E3\u6790\u3067\u30A8\u30E9\u30FC\u3002${this.nodeToStr(n,{depth:1},!0)}\u306E\u4F7F\u3044\u65B9\u304C\u9593\u9055\u3063\u3066\u3044\u307E\u3059\u3002`,n),_.fromNode(`\u69CB\u6587\u89E3\u6790\u3067\u30A8\u30E9\u30FC\u3002${this.nodeToStr(n,{depth:1},!1)}\u306E\u4F7F\u3044\u65B9\u304C\u9593\u9055\u3063\u3066\u3044\u307E\u3059\u3002`,n);return e}ySentenceList(){let e=[],n=-1,r=this.peekSourceMap();for(;!this.isEOF();){let i=this.ySentence();if(!i)break;e.push(i),n<0&&(n=i.line)}if(e.length===0){let i=this.peek()||this.tokens[0];throw this.logger.debug("\u69CB\u6587\u89E3\u6790\u306B\u5931\u6557:"+this.nodeToStr(this.peek(),{depth:1},!0),i),_.fromNode("\u69CB\u6587\u89E3\u6790\u306B\u5931\u6557:"+this.nodeToStr(this.peek(),{depth:1},!1),i)}return{type:"block",block:e,...r,end:this.peekSourceMap(),genMode:this.genMode}}makeStackBalanceReport(){let e=[];this.stack.forEach(o=>{let s=this.nodeToStr(o,{depth:1},!1);o.josi&&(s+=o.josi),e.push(s)});let n=e.join(","),r="",i=65;for(let o of this.recentlyCalledFunc){r+=" - ";let s=0,u=o.josi;if(u)for(let c of u){let a=String.fromCharCode(i+s);r+=a,c.length===1?r+=c[0]:r+=`(${c.join("|")})`,s++}r+=o.name+`
5
- `}return this.recentlyCalledFunc=[],`\u672A\u89E3\u6C7A\u306E\u5358\u8A9E\u304C\u3042\u308A\u307E\u3059: [${n}]
6
- \u6B21\u306E\u547D\u4EE4\u306E\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059:
7
- ${r}`}yEOL(){let e=this.get();if(!e)return null;if(this.stack.length>0){let n=this.makeStackBalanceReport();throw _.fromNode(n,e)}return this.recentlyCalledFunc=[],e}ySentence(){let e=this.peekSourceMap();if(this.check("eol"))return this.yEOL();if(this.check("\u3082\u3057"))return this.yIF();if(this.check("\u5F8C\u5224\u5B9A"))return this.yAtohantei();if(this.check("\u30A8\u30E9\u30FC\u76E3\u8996"))return this.yTryExcept();if(this.accept(["\u629C\u3051\u308B"]))return{type:"break",josi:"",...e,end:this.peekSourceMap()};if(this.accept(["\u7D9A\u3051\u308B"]))return{type:"continue",josi:"",...e,end:this.peekSourceMap()};if(this.accept(["DNCL\u30E2\u30FC\u30C9"]))return this.yDNCLMode(1);if(this.accept(["DNCL2\u30E2\u30FC\u30C9"]))return this.yDNCLMode(2);if(this.accept(["not","string","\u30E2\u30FC\u30C9\u8A2D\u5B9A"]))return this.ySetGenMode(this.y[1].value);if(this.accept(["not","\u30E2\u30B8\u30E5\u30FC\u30EB\u516C\u958B\u65E2\u5B9A\u5024","eq","string"]))return this.yExportDefault(this.y[3].value);if(this.accept(["not","\u53B3\u30C1\u30A7\u30C3\u30AF"]))return this.ySetMode("\u53B3\u3057\u304F\u30C1\u30A7\u30C3\u30AF");if(this.check("\u9010\u6B21\u5B9F\u884C"))return this.yTikuji();if(this.accept(["not","\u975E\u540C\u671F\u30E2\u30FC\u30C9"]))return this.yASyncMode();if(this.check2(["func","eq"])){let n=this.get()||E();throw _.fromNode(`\u95A2\u6570\u300E${n.value}\u300F\u306B\u4EE3\u5165\u3067\u304D\u307E\u305B\u3093\u3002`,n)}if(this.accept([this.ySpeedMode]))return this.y[0];if(this.accept([this.yPerformanceMonitor]))return this.y[0];if(this.accept([this.yLet]))return this.y[0];if(this.accept([this.yDefTest]))return this.y[0];if(this.accept([this.yDefFunc]))return this.y[0];if(this.accept([this.yCall])){let n=this.y[0],r=this.peek();if(r&&r.type==="\u306A\u3089\u3070"){let i=this.peekSourceMap(),o=n;return this.get(),this.yIfThen(i,o)}else if(se.indexOf(n.josi||"")>=0){if(this.stack.length>=1){let o=this.makeStackBalanceReport();throw _.fromNode(o,n)}let i=this.ySentence();if(i!==null)return{type:"block",block:[n,i],josi:i.josi,...e,end:this.peekSourceMap()}}return n}return null}yASyncMode(){return this.logger.error("\u300E\u975E\u540C\u671F\u30E2\u30FC\u30C9\u300F\u69CB\u6587\u306F\u5EC3\u6B62\u3055\u308C\u307E\u3057\u305F(https://nadesi.com/v3/doc/go.php?1028)\u3002",this.peek()),{type:"eol",...this.peekSourceMap(),end:this.peekSourceMap()}}yDNCLMode(e){let n=this.peekSourceMap();return e===1&&(this.arrayIndexFrom=1,this.flagReverseArrayIndex=!0),this.flagCheckArrayInit=!0,{type:"eol",...n,end:this.peekSourceMap()}}ySetGenMode(e){let n=this.peekSourceMap();return this.genMode=e,{type:"eol",...n,end:this.peekSourceMap()}}yExportDefault(e){let n=this.peekSourceMap();return this.isExportDefault=e==="\u516C\u958B",this.moduleExport.set(this.modName,this.isExportDefault),{type:"eol",...n,end:this.peekSourceMap()}}ySetMode(e){let n=this.peekSourceMap();return{type:"run_mode",value:e,...n,end:this.peekSourceMap()}}yBlock(){let e=this.peekSourceMap(),n=[];for(this.check("\u3053\u3053\u304B\u3089")&&this.get();!this.isEOF()&&!(this.checkTypes(["\u9055\u3048\u3070","\u3053\u3053\u307E\u3067","\u30A8\u30E9\u30FC"])||!this.accept([this.ySentence]));)n.push(this.y[0]);return{type:"block",block:n,...e,end:this.peekSourceMap()}}yDefFuncReadArgs(){if(!this.check("("))return null;let e=[];for(this.get();!this.isEOF();){if(this.check(")")){this.get();break}let n=this.get();n&&e.push(n),this.check("comma")&&this.get()}return e}yDefTest(){return this.yDef("def_test")}yDefFunc(){return this.yDef("def_func")}yDef(e){if(!this.check(e))return null;let n=this.peekSourceMap(),r=this.get();if(!r)return null;let i=this.isExportDefault;if(this.check("{")){this.get();let f=this.get();if(this.check("}"))this.get();else throw _.fromNode("\u95A2\u6570\u306E\u5C5E\u6027\u306E\u6307\u5B9A\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002\u300E{\u300F\u3068\u300E}\u300F\u3067\u56F2\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",r);f!=null&&(f.value==="\u516C\u958B"&&(i=!0),f.value==="\u975E\u516C\u958B"&&(i=!1),f.value==="\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8"&&(i=!0))}let o=[];this.check("(")&&(o=this.yDefFuncReadArgs()||[]);let s=this.get();if(!s||s.type!=="func")throw this.logger.debug(this.nodeToStr(s,{depth:0,typeName:"\u95A2\u6570"},!0)+"\u306E\u5BA3\u8A00\u3067\u30A8\u30E9\u30FC\u3002",s),_.fromNode(this.nodeToStr(s,{depth:0,typeName:"\u95A2\u6570"},!1)+"\u306E\u5BA3\u8A00\u3067\u30A8\u30E9\u30FC\u3002",r);if(this.check("(")){if(o.length>0)throw this.logger.debug(this.nodeToStr(s,{depth:0,typeName:"\u95A2\u6570"},!0)+"\u306E\u5BA3\u8A00\u3067\u3001\u5F15\u6570\u5B9A\u7FA9\u306F\u540D\u524D\u306E\u524D\u304B\u5F8C\u306B\u4E00\u5EA6\u3060\u3051\u53EF\u80FD\u3067\u3059\u3002",s),_.fromNode(this.nodeToStr(s,{depth:0,typeName:"\u95A2\u6570"},!1)+"\u306E\u5BA3\u8A00\u3067\u3001\u5F15\u6570\u5B9A\u7FA9\u306F\u540D\u524D\u306E\u524D\u304B\u5F8C\u306B\u4E00\u5EA6\u3060\u3051\u53EF\u80FD\u3067\u3059\u3002",s);o=this.yDefFuncReadArgs()||[]}this.check("\u3068\u306F")&&this.get();let u=null,c=!1,a=!1;this.check("\u3053\u3053\u304B\u3089")&&(c=!0),this.check("eol")&&(c=!0);try{this.funcLevel++,this.usedAsyncFn=!1;let f=this.localvars;if(this.localvars=new Map([["\u305D\u308C",{type:"var",value:""}]]),c){this.saveStack();for(let l of o){let p=l.value?l.value+"":"";this.localvars.set(p,{type:"var",value:""})}if(u=this.yBlock(),this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u95A2\u6570\u5B9A\u7FA9\u306E\u672B\u5C3E\u306B\u5FC5\u8981\u3067\u3059\u3002",r);this.loadStack()}else this.saveStack(),u=this.ySentence(),this.loadStack();this.funcLevel--,a=this.usedAsyncFn,this.localvars=f}catch(f){throw this.logger.debug(this.nodeToStr(s,{depth:0,typeName:"\u95A2\u6570"},!0)+`\u306E\u5B9A\u7FA9\u3067\u4EE5\u4E0B\u306E\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3057\u305F\u3002
8
- `+f.message,r),_.fromNode(this.nodeToStr(s,{depth:0,typeName:"\u95A2\u6570"},!1)+`\u306E\u5B9A\u7FA9\u3067\u4EE5\u4E0B\u306E\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3057\u305F\u3002
9
- `+f.message,r)}return{type:e,name:s,args:o,block:u||[],asyncFn:a,isExport:i,josi:"",...n,end:this.peekSourceMap()}}yIFCond(){let e=this.peekSourceMap(),n=this.yGetArg();if(!n)return null;if(n.josi==="\u306A\u3089\u3070")return n;if(n.josi==="\u3067\u306A\u3051\u308C\u3070")return n={type:"not",value:n,josi:"",...e,end:this.peekSourceMap()},n;if(n.josi!==""&&this.check("func"))this.stack.push(n),n=this.yCall();else if(n.josi==="\u304C"){let i=this.index,o=this.yGetArg();if(!o)throw _.fromNode("\u3082\u3057\u6587\u306E\u6761\u4EF6\u300CA\u304CB\u306A\u3089\u3070\u300D\u3067B\u304C\u306A\u3044\u304B\u6761\u4EF6\u304C\u8907\u96D1\u904E\u304E\u307E\u3059\u3002"+this.nodeToStr(this.peek(),{depth:1},!1),e);if(this.check("\u306A\u3089\u3070")){let s=this.get()||{value:"\u306A\u3089\u3070"};o.josi=s.value}if(o&&(o.josi==="\u306A\u3089\u3070"||o.josi==="\u3067\u306A\u3051\u308C\u3070"))return{type:"op",operator:o.josi==="\u3067\u306A\u3051\u308C\u3070"?"noteq":"eq",left:n,right:o,josi:"",...e,end:this.peekSourceMap()};this.index=i}if(this.check("\u306A\u3089\u3070")||(this.stack.push(n),n=this.yCall()),!this.check("\u306A\u3089\u3070")){let i=n||{type:"?",...e};throw this.logger.debug("\u3082\u3057\u6587\u3067\u300E\u306A\u3089\u3070\u300F\u304C\u306A\u3044\u304B\u3001\u6761\u4EF6\u304C\u8907\u96D1\u904E\u304E\u307E\u3059\u3002"+this.nodeToStr(this.peek(),{depth:1},!1)+"\u306E\u76F4\u524D\u306B\u300E\u306A\u3089\u3070\u300F\u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002",i),_.fromNode("\u3082\u3057\u6587\u3067\u300E\u306A\u3089\u3070\u300F\u304C\u306A\u3044\u304B\u3001\u6761\u4EF6\u304C\u8907\u96D1\u904E\u304E\u307E\u3059\u3002"+this.nodeToStr(this.peek(),{depth:1},!1)+"\u306E\u76F4\u524D\u306B\u300E\u306A\u3089\u3070\u300F\u3092\u66F8\u3044\u3066\u304F\u3060\u3055\u3044\u3002",i)}let r=this.get();return r&&r.value==="\u3067\u306A\u3051\u308C\u3070"&&(n={type:"not",value:n,josi:"",...e,end:this.peekSourceMap()}),n}yIF(){let e=this.peekSourceMap();if(!this.check("\u3082\u3057"))return null;let n=this.get();if(n==null)return null;for(;this.check("comma");)this.get();let r=null;try{r=this.yIFCond()}catch(i){throw _.fromNode(`\u300E\u3082\u3057\u300F\u6587\u306E\u6761\u4EF6\u3067\u6B21\u306E\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059\u3002
10
- `+i.message,n)}if(r===null)throw _.fromNode("\u300E\u3082\u3057\u300F\u6587\u3067\u6761\u4EF6\u306E\u6307\u5B9A\u304C\u7A7A\u3067\u3059\u3002",n);return this.yIfThen(e,r)}yIfThen(e,n){let r=null,i=null,o=!1;for(this.check("eol")?r=this.yBlock():(r=this.ySentence(),o=!0);this.check("eol");)this.get();if(this.check("\u9055\u3048\u3070")){for(this.get();this.check("comma");)this.get();this.check("eol")?i=this.yBlock():(i=this.ySentence(),o=!0)}if(o===!1)if(this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3082\u3057\u300F\u6587\u3067\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002",e);return{type:"if",expr:n||[],block:r||[],false_block:i||[],josi:"",...e,end:this.peekSourceMap()}}ySpeedMode(){let e=this.peekSourceMap();if(!this.check2(["string","\u5B9F\u884C\u901F\u5EA6\u512A\u5148"]))return null;let n=this.get();this.get();let r="";if(n&&n.value)r=n.value;else return null;let i={\u884C\u756A\u53F7\u7121\u3057:!1,\u6697\u9ED9\u306E\u578B\u5909\u63DB\u7121\u3057:!1,\u5F37\u5236\u30D4\u30E5\u30A2:!1,\u305D\u308C\u7121\u52B9:!1};for(let u of r.split("/")){if(u==="\u5168\u3066"){for(let c of Object.keys(i))i[c]=!0;break}Object.keys(i).includes(u)?i[u]=!0:this.logger.warn(`\u5B9F\u884C\u901F\u5EA6\u512A\u5148\u6587\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u300E${u}\u300F\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002`,n)}let o=!1;this.check("\u3053\u3053\u304B\u3089")?(this.get(),o=!0):this.check("eol")&&(o=!0);let s=null;return o?(s=this.yBlock(),this.check("\u3053\u3053\u307E\u3067")&&this.get()):s=this.ySentence(),{type:"speed_mode",options:i,block:s||[],josi:"",...e}}yPerformanceMonitor(){let e=this.peekSourceMap();if(!this.check2(["string","\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u30E2\u30CB\u30BF\u9069\u7528"]))return null;let n=this.get();if(!n)return null;this.get();let r={\u30E6\u30FC\u30B6\u95A2\u6570:!1,\u30B7\u30B9\u30C6\u30E0\u95A2\u6570\u672C\u4F53:!1,\u30B7\u30B9\u30C6\u30E0\u95A2\u6570:!1};for(let s of n.value.split("/")){if(s==="\u5168\u3066"){for(let u of Object.keys(r))r[u]=!0;break}Object.keys(r).includes(s)?r[s]=!0:this.logger.warn(`\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u30E2\u30CB\u30BF\u9069\u7528\u6587\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u300E${s}\u300F\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002`,n)}let i=!1;this.check("\u3053\u3053\u304B\u3089")?(this.get(),i=!0):this.check("eol")&&(i=!0);let o=null;return i?(o=this.yBlock(),this.check("\u3053\u3053\u307E\u3067")&&this.get()):o=this.ySentence(),{type:"performance_monitor",options:r,block:o||[],josi:"",...e}}yTikuji(){if(!this.check("\u9010\u6B21\u5B9F\u884C"))return null;let e=this.getCur();return this.logger.error("\u300E\u9010\u6B21\u5B9F\u884C\u300F\u69CB\u6587\u306F\u5EC3\u6B62\u3055\u308C\u307E\u3057\u305F(https://nadesi.com/v3/doc/go.php?944)\u3002",e),{type:"eol",...this.peekSourceMap(),end:this.peekSourceMap()}}yGetArgOperator(e){let n=[e];for(;!this.isEOF();){let r=this.peek();if(r&&W[r.type]){r=this.getCur(),n.push(r);let i=this.yValue();if(i===null)throw _.fromNode(`\u8A08\u7B97\u5F0F\u3067\u6F14\u7B97\u5B50\u300E${r.value}\u300F\u5F8C\u306B\u5024\u304C\u3042\u308A\u307E\u305B\u3093`,e);n.push(i);continue}break}return n.length===0?null:n.length===1?n[0]:this.infixToAST(n)}yRange(e){if(!this.check("\u2026"))return null;let n=this.peekSourceMap();this.get();let r=this.yValue();if(!e||!r)throw _.fromNode("\u7BC4\u56F2\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u6307\u5B9A\u30A8\u30E9\u30FC\u3002\u300EA\u2026B\u300F\u306E\u66F8\u5F0F\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);return{type:"func",name:"\u7BC4\u56F2",args:[e,r],josi:r.josi,...n,end:this.peekSourceMap()}}yGetArg(){let e=this.yValue();return e===null?null:this.check("\u2026")?this.yRange(e):this.yGetArgOperator(e)}infixToPolish(e){let n=o=>W[o.type]?W[o.type]:10,r=[],i=[];for(;e.length>0;){let o=e.shift();if(!o)break;for(;r.length>0;){let s=r[r.length-1];if(n(o)>n(s))break;let u=r.pop();if(!u){this.logger.error("\u8A08\u7B97\u5F0F\u306B\u9593\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002",o);break}i.push(u)}r.push(o)}for(;r.length>0;){let o=r.pop();o&&i.push(o)}return i}infixToAST(e){if(e.length===0)return null;let n=e[e.length-1].josi,r=e[e.length-1],i=this.infixToPolish(e),o=[];for(let u of i){if(!W[u.type]){o.push(u);continue}let c=o.pop(),a=o.pop();if(a===void 0||c===void 0)throw this.logger.debug(`--- \u8A08\u7B97\u5F0F(\u9006\u30DD\u30FC\u30E9\u30F3\u30C9) ---
11
- `+JSON.stringify(i)),_.fromNode("\u8A08\u7B97\u5F0F\u3067\u30A8\u30E9\u30FC",r);let f={type:"op",operator:u.type,left:a,right:c,josi:n,startOffset:a.startOffset,endOffset:a.endOffset,line:a.line,column:a.column,file:a.file};o.push(f)}let s=o.pop();return s||null}yGetArgParen(e){let n=!1,r=this.stack.length;for(;!this.isEOF();){if(this.check(")")){n=!0;break}let o=this.yGetArg();if(o){this.pushStack(o),this.check("comma")&&this.get();continue}break}if(!n)throw _.fromNode(`C\u98A8\u95A2\u6570\u300E${e[0].value}\u300F\u3067\u30AB\u30C3\u30B3\u304C\u9589\u3058\u3066\u3044\u307E\u305B\u3093`,e[0]);let i=[];for(;r<this.stack.length;){let o=this.popStack();o&&i.unshift(o)}return i}yRepeatTime(){let e=this.peekSourceMap();if(!this.check("\u56DE"))return null;this.get(),this.check("comma")&&this.get(),this.check("\u7E70\u8FD4")&&this.get();let n=this.popStack([]),r=!1,i=null;if(n===null&&(n={type:"word",value:"\u305D\u308C",josi:"",...e,end:this.peekSourceMap()}),this.check("comma")&&this.get(),this.check("\u3053\u3053\u304B\u3089")?(this.get(),r=!0):this.check("eol")&&(r=!0),r)if(i=this.yBlock(),this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u56DE\u300F...\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u5BFE\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002",e);else i=this.ySentence();return{type:"repeat_times",value:n,block:i||[],josi:"",...e,end:this.peekSourceMap()}}yWhile(){let e=this.peekSourceMap();if(!this.check("\u9593"))return null;for(this.get();this.check("comma");)this.get();this.check("\u7E70\u8FD4")&&this.get();let n=this.popStack();if(n===null)throw _.fromNode("\u300E\u9593\u300F\u3067\u6761\u4EF6\u304C\u3042\u308A\u307E\u305B\u3093\u3002",e);if(this.check("comma")&&this.get(),!this.checkTypes(["\u3053\u3053\u304B\u3089","eol"]))throw _.fromNode("\u300E\u9593\u300F\u306E\u76F4\u5F8C\u306F\u6539\u884C\u304C\u5FC5\u8981\u3067\u3059",e);let r=this.yBlock();if(this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u9593\u300F...\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u5BFE\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002",e);return{type:"while",cond:n,block:r,josi:"",...e,end:this.peekSourceMap()}}yAtohantei(){let e=this.peekSourceMap();this.check("\u5F8C\u5224\u5B9A")&&this.get(),this.check("\u7E70\u8FD4")&&this.get(),this.check("\u3053\u3053\u304B\u3089")&&this.get();let n=this.yBlock();this.check("\u3053\u3053\u307E\u3067")&&this.get(),this.check("comma")&&this.get();let r=this.yGetArg(),i=!1,o=this.peek();return o&&o.value==="\u306A\u308B"&&(o.josi==="\u307E\u3067"||o.josi==="\u307E\u3067\u306E")&&(this.get(),i=!0),this.check("\u9593")&&this.get(),i&&(r={type:"not",value:r,josi:"",...e,end:this.peekSourceMap()}),{type:"atohantei",cond:r||[],block:n,josi:"",...e,end:this.peekSourceMap()}}yFor(){let e="\u300E\u7E70\u308A\u8FD4\u3059\u300F\u6587\u3067A\u304B\u3089B\u307E\u3067\u306E\u6307\u5B9A\u304C\u3042\u308A\u307E\u305B\u3093\u3002",n=!0,r=null,i=this.peekSourceMap();if(!(this.check("\u7E70\u8FD4")||this.check("\u5897\u7E70\u8FD4")||this.check("\u6E1B\u7E70\u8FD4")))return null;let o=this.getCur(),s=this.stack.pop();s&&(s.type==="word"&&(s.value==="\u5897"||s.value==="\u6E1B")?(s.value==="\u5897"&&(n=!1),o.type=s.value+o.type):this.stack.push(s));let u=null;(o.type==="\u5897\u7E70\u8FD4"||o.type==="\u6E1B\u7E70\u8FD4")&&(u=this.popStack(["\u305A\u3064"]),o.type==="\u5897\u7E70\u8FD4"&&(n=!1),r=o.type==="\u5897\u7E70\u8FD4"?"up":"down");let c=this.popStack(["\u307E\u3067","\u3092"]),a=this.popStack(["\u304B\u3089"]),f=this.popStack(["\u3092","\u3067"]);if((a===null||c===null)&&!(a==null&&c&&c.type==="func"&&c.name==="\u7BC4\u56F2"))throw _.fromNode(e,o);this.check("comma")&&this.get();let l=!1;this.check("\u3053\u3053\u304B\u3089")?(l=!0,this.get()):this.check("eol")&&(l=!0,this.get());let p=null;if(l)if(p=this.yBlock(),this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u7E70\u308A\u8FD4\u3059\u300F...\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u5BFE\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002",i);else p=this.ySentence();return{type:"for",from:a,to:c,inc:u,flagDown:n,loopDirection:r,word:f,block:p||[],josi:"",...i,end:this.peekSourceMap()}}yReturn(){let e=this.peekSourceMap();if(!this.check("\u623B\u308B"))return null;this.get();let n=this.popStack(["\u3067","\u3092"]);if(this.stack.length>0)throw _.fromNode("\u300E\u623B\u300F\u6587\u306E\u76F4\u524D\u306B\u672A\u89E3\u6C7A\u306E\u5F15\u6570\u304C\u3042\u308A\u307E\u3059\u3002\u300E(\u5F0F)\u3092\u623B\u3059\u300F\u306E\u3088\u3046\u306B\u5F0F\u3092\u30AB\u30C3\u30B3\u3067\u62EC\u3063\u3066\u304F\u3060\u3055\u3044\u3002",e);return{type:"return",value:n,josi:"",...e,end:this.peekSourceMap()}}yForEach(){let e=this.peekSourceMap();if(!this.check("\u53CD\u5FA9"))return null;for(this.get();this.check("comma");)this.get();let n=this.popStack(["\u3092"]),r=this.popStack(["\u3067"]),i=null,o=!1;if(this.check("\u3053\u3053\u304B\u3089")?(o=!0,this.get()):this.check("eol")&&(o=!0),o)if(i=this.yBlock(),this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u53CD\u5FA9\u300F...\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u5BFE\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002",e);else i=this.ySentence();return{type:"foreach",name:r,target:n,block:i||[],josi:"",...e,end:this.peekSourceMap()}}ySwitch(){let e=this.peekSourceMap();if(!this.check("\u6761\u4EF6\u5206\u5C90"))return null;let n=this.get();if(!n)return null;let r=this.get();if(!r)return null;let i=this.popStack(["\u3067"]);if(!i)throw _.fromNode("\u300E(\u5024)\u3067\u6761\u4EF6\u5206\u5C90\u300F\u306E\u3088\u3046\u306B\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);if(r.type!=="eol")throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u306E\u76F4\u5F8C\u306F\u6539\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);let o=!1,s=!1,u=[];for(;!this.isEOF();){if(this.check("\u3053\u3053\u307E\u3067")){if(s)throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u306F\u300E(\u6761\u4EF6)\u306A\u3089\u3070\u301C\u3053\u3053\u307E\u3067\u300F\u3068\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);this.get();break}if(this.check("eol")){this.get();continue}if(o)throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u3067\u300E\u9055\u3048\u3070\u301C\u3053\u3053\u307E\u3067\u300F\u306E\u5F8C\u306B\u51E6\u7406\u3092\u7D9A\u3051\u308B\u3053\u3068\u306F\u51FA\u6765\u307E\u305B\u3093\u3002",n);let c=null,a=this.peek();if(a&&a.type==="\u9055\u3048\u3070")s=!1,o=!0,c=this.get(),this.check("comma")&&this.get();else{if(s)throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u306F\u300E(\u6761\u4EF6)\u306A\u3089\u3070\u301C\u3053\u3053\u307E\u3067\u300F\u3068\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);if(c=this.yValue(),!c)throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u306F\u300E(\u6761\u4EF6)\u306A\u3089\u3070\u301C\u3053\u3053\u307E\u3067\u300F\u3068\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);let p=this.get();if(!p||p.type!=="\u306A\u3089\u3070")throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u3067\u6761\u4EF6\u306F\uFF0A\uFF0A\u306A\u3089\u3070\u3068\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);this.check("comma")&&this.get()}let f=this.yBlock(),l=this.peek();if(l&&l.type==="\u3053\u3053\u307E\u3067")this.get();else{if(o)throw _.fromNode("\u300E\u6761\u4EF6\u5206\u5C90\u300F\u306F\u300E\u9055\u3048\u3070\u301C\u3053\u3053\u307E\u3067\u300F\u3068\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",n);s=!0}u.push([c,f])}return{type:"switch",value:i,cases:u||[],josi:"",...e,end:this.peekSourceMap()}}yMumeiFunc(){let e=this.peekSourceMap();if(!this.check("def_func"))return null;let n=this.get();if(!n)return null;let r=[];this.check("comma")&&this.get(),this.check("(")&&(r=this.yDefFuncReadArgs()||[]),this.check("comma")&&this.get(),this.funcLevel++,this.saveStack();let i=this.yBlock();if(!this.check("\u3053\u3053\u307E\u3067"))throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u306B\u306F\u300F\u69CB\u6587\u304B\u7121\u540D\u95A2\u6570\u306E\u672B\u5C3E\u306B\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u5FC5\u8981\u3067\u3059\u3002",e);return this.get(),this.loadStack(),this.funcLevel--,{type:"func_obj",args:r,block:i,meta:n.meta,josi:"",...e,end:this.peekSourceMap()}}yDainyu(){let e=this.peekSourceMap(),n=this.get();if(n===null)return null;let r=this.popStack(["\u3092"]),i=this.popStack(["\u3078","\u306B"]);if(!i||i.type!=="word"&&i.type!=="func"&&i.type!=="\u914D\u5217\u53C2\u7167")throw _.fromNode("\u4EE3\u5165\u6587\u3067\u4EE3\u5165\u5148\u306E\u5909\u6570\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002\u300E(\u5909\u6570\u540D)\u306B(\u5024)\u3092\u4EE3\u5165\u300F\u306E\u3088\u3046\u306B\u4F7F\u3044\u307E\u3059\u3002",n);return i.type==="\u914D\u5217\u53C2\u7167"?{type:"let_array",name:i.name,index:i.index,value:r,josi:"",checkInit:this.flagCheckArrayInit,...e,end:this.peekSourceMap()}:{type:"let",name:this.getVarName(i),value:r,josi:"",...e,end:this.peekSourceMap()}}ySadameru(){let e=this.peekSourceMap(),n=this.get();if(n===null)return null;let r=this.popStack(["\u3092"]),i=this.popStack(["\u3078","\u306B","\u3068"]);if(!r||r.type!=="word"&&r.type!=="func"&&r.type!=="\u914D\u5217\u53C2\u7167")throw _.fromNode("\u300E\u5B9A\u3081\u308B\u300F\u6587\u3067\u5B9A\u6570\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002\u300E(\u5B9A\u6570\u540D)\u3092(\u5024)\u306B\u5B9A\u3081\u308B\u300F\u306E\u3088\u3046\u306B\u4F7F\u3044\u307E\u3059\u3002",n);let o=this.isExportDefault;if(this.check2(["{","word","}"])){this.get();let u=this.get();if(u===null)throw _.fromNode("\u5B9A\u3081\u308B\u300E"+r.value+"\u300F\u306E\u5B9A\u7FA9\u30A8\u30E9\u30FC",r);let c=u.value;c==="\u516C\u958B"?o=!0:c==="\u975E\u516C\u958B"?o=!1:c==="\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8"?o=!0:this.logger.warn(`\u4E0D\u660E\u306A\u5909\u6570\u5C5E\u6027\u300E${c}\u300F\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),this.get()}return{type:"def_local_var",name:this.createVar(r,!0,o),vartype:"\u5B9A\u6570",isExport:o,value:i,josi:"",...e,end:this.peekSourceMap()}}yIncDec(){let e=this.peekSourceMap(),n=this.get();if(n===null)return null;if(this.check("\u7E70\u8FD4"))return this.pushStack({type:"word",value:n.value,josi:n.josi,...e,end:this.peekSourceMap()}),this.yFor();let r=this.popStack(["\u3060\u3051",""]);r||(r={type:"number",value:1,josi:"\u3060\u3051",...e,end:this.peekSourceMap()});let i=this.popStack(["\u3092"]);if(!i||i.type!=="word"&&i.type!=="\u914D\u5217\u53C2\u7167")throw _.fromNode(`\u300E${n.type}\u300F\u6587\u3067\u5B9A\u6570\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002\u300E(\u5909\u6570\u540D)\u3092(\u5024)\u3060\u3051${n.type}\u300F\u306E\u3088\u3046\u306B\u4F7F\u3044\u307E\u3059\u3002`,n);return n.value==="\u6E1B"&&(r={type:"op",operator:"*",left:r,right:{type:"number",value:-1,line:n.line},josi:"",...e}),{type:"inc",name:i,value:r,josi:n.josi,...e,end:this.peekSourceMap()}}yCall(){if(this.isEOF())return null;for(;!this.isEOF();){if(this.check("\u3053\u3053\u304B\u3089")&&this.get(),this.check("\u4EE3\u5165"))return this.yDainyu();if(this.check("\u5B9A\u3081\u308B"))return this.ySadameru();if(this.check("\u56DE"))return this.yRepeatTime();if(this.check("\u9593"))return this.yWhile();if(this.check("\u7E70\u8FD4")||this.check("\u5897\u7E70\u8FD4")||this.check("\u6E1B\u7E70\u8FD4"))return this.yFor();if(this.check("\u53CD\u5FA9"))return this.yForEach();if(this.check("\u6761\u4EF6\u5206\u5C90"))return this.ySwitch();if(this.check("\u623B\u308B"))return this.yReturn();if(this.check("\u5897")||this.check("\u6E1B"))return this.yIncDec();if(this.check2([["func","word"],"("])){let n=this.peek();if(n&&n.josi===""){let r=this.yValue();if(r){let i=r.josi||"";if(r.type==="func"&&(r.josi===""||se.indexOf(i)>=0))return r.josi="",r;this.pushStack(r)}this.check("comma")&&this.get();continue}}if(this.check("func")){let n=this.yCallFunc();if(n===null)continue;if(this.check("\u9593")){this.pushStack(n);continue}if(!this.checkTypes(Me))return n;let r=this.yGetArgOperator(n);this.pushStack(r);continue}let e=this.yGetArg();if(e){this.pushStack(e);continue}break}if(this.stack.length>0){if(this.isReadingCalc)return this.popStack();this.logger.debug(`--- stack dump ---
12
- `+JSON.stringify(this.stack,null,2)+`
13
- peek: `+JSON.stringify(this.peek(),null,2));let e=`\u4E0D\u5B8C\u5168\u306A\u6587\u3067\u3059\u3002${this.stack.map(o=>this.nodeToStr(o,{depth:0},!0)).join("\u3001")}\u304C\u89E3\u6C7A\u3057\u3066\u3044\u307E\u305B\u3093\u3002`,n=`\u4E0D\u5B8C\u5168\u306A\u6587\u3067\u3059\u3002${this.stack.map(o=>this.nodeToStr(o,{depth:0},!1)).join("\u3001")}\u304C\u89E3\u6C7A\u3057\u3066\u3044\u307E\u305B\u3093\u3002`;for(let o of this.stack){let s=this.nodeToStr(o,{depth:0},!1),u=this.nodeToStr(o,{depth:1},!1);s!==u&&(e+=`${this.nodeToStr(o,{depth:0},!0)}\u306F${this.nodeToStr(o,{depth:1},!0)}\u3068\u3057\u3066\u4F7F\u308F\u308C\u3066\u3044\u307E\u3059\u3002`,n+=`${s}\u306F${u}\u3068\u3057\u3066\u4F7F\u308F\u308C\u3066\u3044\u307E\u3059\u3002`)}let r=this.stack[0],i=this.stack[this.stack.length-1];throw this.logger.debug(e,r),_.fromNode(n,r,i)}return this.popStack([])}yCallFunc(){let e=this.peekSourceMap(),n=this.get();if(!n)return null;let r=n.meta,i=n.value,o=null;if(n.josi==="\u306B\u306F"){try{o=this.yMumeiFunc()}catch(f){throw _.fromNode(`\u300E${n.value}\u306B\u306F...\u300F\u3067\u7121\u540D\u95A2\u6570\u306E\u5B9A\u7FA9\u3067\u4EE5\u4E0B\u306E\u9593\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002
14
- ${f.message}`,n)}if(o===null)throw _.fromNode("\u300EF\u306B\u306F\u300F\u69CB\u6587\u304C\u3042\u308A\u307E\u3057\u305F\u304C\u3001\u95A2\u6570\u5B9A\u7FA9\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002",n)}if(!r||typeof r.josi>"u")throw _.fromNode("\u95A2\u6570\u306E\u5B9A\u7FA9\u3067\u30A8\u30E9\u30FC\u3002",n);this.recentlyCalledFunc.push({name:i,...r}),r&&r.asyncFn&&(this.usedAsyncFn=!0);let s=[],u=0,c=0;for(let f=r.josi.length-1;f>=0;f--)for(;;){let l=this.popStack(r.josi[f]);if(l!==null)c++;else if(f<r.josi.length-1||!r.isVariableJosi)u++,l=o;else break;if(l!==null&&r.funcPointers!==void 0&&r.funcPointers[f]!==null)if(l.type==="func")l.type="func_pointer";else{let p=r.varnames?r.varnames[f]:`${f+1}\u756A\u76EE\u306E\u5F15\u6570`;throw _.fromNode(`\u95A2\u6570\u300E${n.value}\u300F\u306E\u5F15\u6570\u300E${p}\u300F\u306B\u306F\u95A2\u6570\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002`,n)}if(s.unshift(l),f<r.josi.length-1||!r.isVariableJosi)break}if(u>=2&&(c>0||n.josi===""||se.indexOf(n.josi)>=0))throw _.fromNode(`\u95A2\u6570\u300E${n.value}\u300F\u306E\u5F15\u6570\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059\u3002`,n);this.usedFuncs.add(n.value);let a={type:"func",name:n.value,args:s,josi:n.josi,...e,end:this.peekSourceMap()};if(a.name==="\u30D7\u30E9\u30B0\u30A4\u30F3\u540D\u8A2D\u5B9A"){if(s.length>0&&s[0]){let f=""+s[0].value;f==="\u30E1\u30A4\u30F3"&&(f=""+s[0].file),this.namespaceStack.push(this.modName),this.isExportStack.push(this.isExportDefault),this.modName=q.filenameToModName(f),this.modList.push(this.modName)}}else if(a.name==="\u540D\u524D\u7A7A\u9593\u30DD\u30C3\u30D7"){let f=this.namespaceStack.pop();f&&(this.modName=f);let l=this.isExportStack.pop();l!=null&&(this.isExportDefault=l)}return n.josi===""?a:se.indexOf(n.josi)>=0?(a.josi="\u3057\u3066",a):(a.meta=r,this.pushStack(a),null)}yLet(){let e=this.peekSourceMap();if(this.check2(["word","eq"])){let n=this.peek(),r=!1;try{if(this.accept(["word","eq",this.yCalc])||this.accept(["word","eq",this.ySentence])){if(this.y[2].type==="eol")throw new Error("\u5024\u304C\u7A7A\u3067\u3059\u3002");this.check("comma")&&this.get();let i=this.getVarName(this.y[0]),o=this.y[2];return{type:"let",name:i,value:o,...e,end:this.peekSourceMap()}}else throw r=!0,this.logger.debug(`${this.nodeToStr(n,{depth:1},!0)}\u3078\u306E\u4EE3\u5165\u6587\u3067\u8A08\u7B97\u5F0F\u306B\u66F8\u304D\u9593\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002`,n),_.fromNode(`${this.nodeToStr(n,{depth:1},!1)}\u3078\u306E\u4EE3\u5165\u6587\u3067\u8A08\u7B97\u5F0F\u306B\u66F8\u304D\u9593\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002`,e)}catch(i){throw r?i:(this.logger.debug(`${this.nodeToStr(n,{depth:1},!0)}\u3078\u306E\u4EE3\u5165\u6587\u3067\u8A08\u7B97\u5F0F\u306B\u4EE5\u4E0B\u306E\u66F8\u304D\u9593\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002
15
- ${i.message}`,n),_.fromNode(`${this.nodeToStr(n,{depth:1},!1)}\u3078\u306E\u4EE3\u5165\u6587\u3067\u8A08\u7B97\u5F0F\u306B\u4EE5\u4E0B\u306E\u66F8\u304D\u9593\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002
16
- ${i.message}`,e))}}if(this.check2(["word","@"])){let n=this.yLetArrayAt(e);if(this.check("comma")&&this.get(),n)return n.checkInit=this.flagCheckArrayInit,n}if(this.check2(["word","["])){let n=this.yLetArrayBracket(e);if(this.check("comma")&&this.get(),n)return n.checkInit=this.flagCheckArrayInit,n}if(this.accept(["word","\u3068\u306F"])){let n=this.y[0];if(!this.checkTypes(["\u5909\u6570","\u5B9A\u6570"]))throw _.fromNode("\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u300E"+n.value+"\u300F\u306E\u5B9A\u7FA9\u30A8\u30E9\u30FC",n);let r=this.getCur(),i=this.isExportDefault;if(this.check2(["{","word","}"])){this.get();let u=this.get();if(u===null)throw _.fromNode("\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u300E"+n.value+"\u300F\u306E\u5B9A\u7FA9\u30A8\u30E9\u30FC",n);let c=u.value;c==="\u516C\u958B"?i=!0:c==="\u975E\u516C\u958B"?i=!1:c==="\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8"?i=!0:this.logger.warn(`\u4E0D\u660E\u306A\u5909\u6570\u5C5E\u6027\u300E${c}\u300F\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),this.get()}let o=this.createVar(n,r.type==="\u5B9A\u6570",i),s=null;return this.check("eq")&&(this.get(),s=this.yCalc()),this.check("comma")&&this.get(),{type:"def_local_var",name:o,vartype:r.type,isExport:i,value:s,...e,end:this.peekSourceMap()}}if(this.accept(["\u5909\u6570","word"])){let n=this.y[1];if(this.index-=2,this.accept(["\u5909\u6570","word","eq",this.yCalc]))return{type:"def_local_var",name:this.createVar(this.y[1],!1,this.isExportDefault),vartype:"\u5909\u6570",value:this.y[3],...e,end:this.peekSourceMap()};if(this.accept(["\u5909\u6570","word","{","word","}","eq",this.yCalc])){let r=this.isExportDefault,i=this.y[3].value;return i==="\u516C\u958B"?r=!0:i==="\u975E\u516C\u958B"?r=!1:i==="\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8"?r=!0:this.logger.warn(`\u4E0D\u660E\u306A\u5909\u6570\u5C5E\u6027\u300E${i}\u300F\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),{type:"def_local_var",name:this.createVar(this.y[1],!1,r),vartype:"\u5909\u6570",isExport:r,value:this.y[6],...e,end:this.peekSourceMap()}}return this.index+=2,{type:"def_local_var",name:this.createVar(n,!1,this.isExportDefault),vartype:"\u5909\u6570",value:null,...e,end:this.peekSourceMap()}}if(this.accept(["\u5B9A\u6570","word","eq",this.yCalc]))return{type:"def_local_var",name:this.createVar(this.y[1],!0,this.isExportDefault),vartype:"\u5B9A\u6570",value:this.y[3],...e,end:this.peekSourceMap()};if(this.accept(["\u5B9A\u6570","word","{","word","}","eq",this.yCalc])){let n=this.isExportDefault,r=this.y[3].value;return r==="\u516C\u958B"?n=!0:r==="\u975E\u516C\u958B"?n=!1:r==="\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8"?n=!0:this.logger.warn(`\u4E0D\u660E\u306A\u5B9A\u6570\u5C5E\u6027\u300E${r}\u300F\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002`),{type:"def_local_var",name:this.createVar(this.y[1],!0,n),vartype:"\u5B9A\u6570",isExport:n,value:this.y[6],...e,end:this.peekSourceMap()}}if(this.accept(["\u5B9A\u6570",this.yJSONArray,"eq",this.yCalc])){let n=this.y[1];if(n&&n.value instanceof Array){for(let r in n.value)if(n.value[r].type!=="word")throw _.fromNode(`\u8907\u6570\u5B9A\u6570\u306E\u4EE3\u5165\u6587${r+1}\u756A\u76EE\u3067\u30A8\u30E9\u30FC\u3002\u300E\u5B9A\u6570[A,B,C]=[1,2,3]\u300F\u306E\u66F8\u5F0F\u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,this.y[0])}else throw _.fromNode("\u8907\u6570\u5B9A\u6570\u306E\u4EE3\u5165\u6587\u3067\u30A8\u30E9\u30FC\u3002\u300E\u5B9A\u6570[A,B,C]=[1,2,3]\u300F\u306E\u66F8\u5F0F\u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",this.y[0]);return n.value=this.createVarList(n.value,!0,this.isExportDefault),{type:"def_local_varlist",names:n.value,vartype:"\u5B9A\u6570",value:this.y[3],...e,end:this.peekSourceMap()}}if(this.accept(["\u5909\u6570",this.yJSONArray,"eq",this.yCalc])){let n=this.y[1];if(n&&n.value instanceof Array){for(let r in n.value)if(n.value[r].type!=="word")throw _.fromNode(`\u8907\u6570\u5909\u6570\u306E\u4EE3\u5165\u6587${r+1}\u756A\u76EE\u3067\u30A8\u30E9\u30FC\u3002\u300E\u5909\u6570[A,B,C]=[1,2,3]\u300F\u306E\u66F8\u5F0F\u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,this.y[0])}else throw _.fromNode("\u8907\u6570\u5909\u6570\u306E\u4EE3\u5165\u6587\u3067\u30A8\u30E9\u30FC\u3002\u300E\u5909\u6570[A,B,C]=[1,2,3]\u300F\u306E\u66F8\u5F0F\u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002",this.y[0]);return n.value=this.createVarList(n.value,!1,this.isExportDefault),{type:"def_local_varlist",names:n.value,vartype:"\u5909\u6570",value:this.y[3],...e,end:this.peekSourceMap()}}if(this.check2(["word","comma","word"])){if(this.accept(["word","comma","word","eq",this.yCalc])){let n=[this.y[0],this.y[2]];return n=this.createVarList(n,!1,this.isExportDefault),{type:"def_local_varlist",names:n,vartype:"\u5909\u6570",value:this.y[4],...e,end:this.peekSourceMap()}}if(this.accept(["word","comma","word","comma","word","eq",this.yCalc])){let n=[this.y[0],this.y[2],this.y[4]];return n=this.createVarList(n,!1,this.isExportDefault),{type:"def_local_varlist",names:n,vartype:"\u5909\u6570",value:this.y[6],...e,end:this.peekSourceMap()}}if(this.accept(["word","comma","word","comma","word","comma","word","eq",this.yCalc])){let n=[this.y[0],this.y[2],this.y[4],this.y[6]];return n=this.createVarList(n,!1,this.isExportDefault),{type:"def_local_varlist",names:n,vartype:"\u5909\u6570",value:this.y[8],...e,end:this.peekSourceMap()}}if(this.accept(["word","comma","word","comma","word","comma","word","comma","word","eq",this.yCalc])){let n=[this.y[0],this.y[2],this.y[4],this.y[6],this.y[8]];return n=this.createVarList(n,!1,this.isExportDefault),{type:"def_local_varlist",names:n,vartype:"\u5909\u6570",value:this.y[10],...e,end:this.peekSourceMap()}}}return null}checkArrayIndex(e){return this.arrayIndexFrom===0?e:{...e,type:"op",operator:"-",left:e,right:{...e,type:"number",value:this.arrayIndexFrom}}}checkArrayReverse(e){return e?!this.flagReverseArrayIndex||e.length<=1?e:e.reverse():[]}yLetArrayAt(e){return this.accept(["word","@",this.yValue,"eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:[this.checkArrayIndex(this.y[2])],value:this.y[4],...e,end:this.peekSourceMap()}:this.accept(["word","@",this.yValue,"@",this.yValue,"eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[4])]),value:this.y[6],...e,end:this.peekSourceMap()}:this.accept(["word","@",this.yValue,"@",this.yValue,"@",this.yValue,"eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[4]),this.checkArrayIndex(this.y[6])]),value:this.y[8],...e,end:this.peekSourceMap()}:this.accept(["word","@",this.yValue,"comma",this.yValue,"eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[4])]),value:this.y[6],...e,end:this.peekSourceMap()}:this.accept(["word","@",this.yValue,"comma",this.yValue,"comma",this.yValue,"eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[4]),this.checkArrayIndex(this.y[6])]),value:this.y[8],...e,end:this.peekSourceMap()}:null}yLetArrayBracket(e){return this.accept(["word","[",this.yCalc,"]","eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:[this.checkArrayIndex(this.y[2])],value:this.y[5],...e,end:this.peekSourceMap()}:this.accept(["word","[",this.yCalc,"]","[",this.yCalc,"]","eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[5])]),value:this.y[8],tag:"2",...e,end:this.peekSourceMap()}:this.accept(["word","[",this.yCalc,"comma",this.yCalc,"]","eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[4])]),value:this.y[7],tag:"2",...e,end:this.peekSourceMap()}:this.accept(["word","[",this.yCalc,"]","[",this.yCalc,"]","[",this.yCalc,"]","eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[5]),this.checkArrayIndex(this.y[8])]),value:this.y[11],...e,end:this.peekSourceMap()}:this.accept(["word","[",this.yCalc,"comma",this.yCalc,"comma",this.yCalc,"]","eq",this.yCalc])?{type:"let_array",name:this.getVarName(this.y[0]),index:this.checkArrayReverse([this.checkArrayIndex(this.y[2]),this.checkArrayIndex(this.y[4]),this.checkArrayIndex(this.y[6])]),value:this.y[9],...e,end:this.peekSourceMap()}:null}yCalc(){let e=this.peekSourceMap();if(this.check("eol"))return null;let n=this.yGetArg();if(!n)return null;if(n.josi==="")return n;let r=this.isReadingCalc;this.isReadingCalc=!0,this.pushStack(n);let i=this.yCall();if(this.isReadingCalc=r,!i)return this.popStack();let o=i;if(se.indexOf(i.josi||"")>=0){let u=this.yCalc();u&&(o={type:"renbun",left:i,right:u,josi:u.josi,...e,end:this.peekSourceMap()})}let s=this.peek();return s&&W[s.type]?this.yGetArgOperator(o):o}yValueKakko(){if(!this.check("("))return null;let e=this.get();if(!e)throw new Error("[System Error] check \u3057\u305F\u306E\u306B get \u3067\u304D\u306A\u3044");this.saveStack();let n=this.yCalc()||this.ySentence();if(n===null){let i=this.get();throw this.logger.debug("(...)\u306E\u89E3\u6790\u30A8\u30E9\u30FC\u3002"+this.nodeToStr(i,{depth:1},!0)+"\u306E\u8FD1\u304F",e),_.fromNode("(...)\u306E\u89E3\u6790\u30A8\u30E9\u30FC\u3002"+this.nodeToStr(i,{depth:1},!1)+"\u306E\u8FD1\u304F",e)}if(!this.check(")"))throw this.logger.debug("(...)\u306E\u89E3\u6790\u30A8\u30E9\u30FC\u3002"+this.nodeToStr(n,{depth:1},!0)+"\u306E\u8FD1\u304F",e),_.fromNode("(...)\u306E\u89E3\u6790\u30A8\u30E9\u30FC\u3002"+this.nodeToStr(n,{depth:1},!1)+"\u306E\u8FD1\u304F",e);let r=this.get();return this.loadStack(),r&&(n.josi=r.josi),n}yValue(){let e=this.peekSourceMap();if(this.check("comma")&&this.get(),this.checkTypes(["number","bigint","string"]))return this.getCur();if(this.check("("))return this.yValueKakko();if(this.check2(["-","number"])||this.check2(["-","word"])||this.check2(["-","func"])){let u=this.get(),c=this.yValue(),a=c&&c.josi?c.josi:"";return{type:"op",operator:"*",left:{type:"number",value:-1,line:u&&u.line?u.line:0},right:c||[],josi:a,...e,end:this.peekSourceMap()}}if(this.check("not")){this.get();let u=this.yValue(),c=u&&u.josi?u.josi:"";return{type:"not",value:u,josi:c,...e,end:this.peekSourceMap()}}let n=this.yJSONArray();if(n)return n;let r=this.yJSONObject();if(r)return r;let i=Me.concat(["eol",")","]","\u306A\u3089\u3070","\u56DE","\u9593","\u53CD\u5FA9","\u6761\u4EF6\u5206\u5C90"]);if(this.check2(["func",i])){let u=this.get();if(!u)throw new Error("[System Error] \u6B63\u3057\u304F\u5024\u304C\u53D6\u308C\u307E\u305B\u3093\u3067\u3057\u305F\u3002");let c=this.getVarNameRef(u);this.usedFuncs.add(c.value);let a=c.meta,f=[];if(!a)throw _.fromNode(`\u4E00\u8A9E\u95A2\u6570\u300E${c.value}\u300F\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002`,u);if(a.josi&&a.josi.length===1)f.push({type:"word",value:"\u305D\u308C"});else if(a.josi&&a.josi.length>=2)throw _.fromNode(`\u95A2\u6570\u300E${c.value}\u300F\u3067\u5F15\u6570\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002${a.josi.length}\u500B\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,u);return{type:"func",name:c.value,args:f,josi:c.josi,...e,end:this.peekSourceMap()}}if(this.check2([["func","word"],"("])&&this.peekDef().josi===""){let u=this.peek();if(this.accept([["func","word"],"(",this.yGetArgParen,")"])){let c=this.getVarNameRef(this.y[0]),a=this.y[2],f=c.value;this.usedFuncs.add(f);let l=c.meta;if(l&&l.josi&&l.josi.length!==a.length){if(!l.isVariableJosi)throw _.fromNode(`\u95A2\u6570\u300E${c.value}\u300F\u3067\u5F15\u6570${a.length}\u500B\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l.josi.length}\u500B\u306E\u5F15\u6570\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,c)}return{type:"func",name:f,args:a,josi:this.y[3].josi,...e,end:this.peekSourceMap()}}throw _.fromNode("C\u98A8\u95A2\u6570\u547C\u3073\u51FA\u3057\u306E\u30A8\u30E9\u30FC",u||E())}if(this.check("def_func"))return this.yMumeiFunc();let o=this.yValueWord();if(o)return o;let s=this.yValueFuncPointer();return s||null}yValueWordGetIndex(e){if(e.index||(e.index=[]),this.check("@")){if(this.accept(["@",this.yValue,"comma",this.yValue,"comma",this.yValue]))return e.index.push(this.checkArrayIndex(this.y[1])),e.index.push(this.checkArrayIndex(this.y[3])),e.index.push(this.checkArrayIndex(this.y[5])),e.index=this.checkArrayReverse(e.index),e.josi=this.y[5].josi,!0;if(this.accept(["@",this.yValue,"comma",this.yValue]))return e.index.push(this.checkArrayIndex(this.y[1])),e.index.push(this.checkArrayIndex(this.y[3])),e.index=this.checkArrayReverse(e.index),e.josi=this.y[3].josi,!0;if(this.accept(["@",this.yValue]))return e.index.push(this.checkArrayIndex(this.y[1])),e.josi=this.y[1].josi,!0;throw _.fromNode("\u5909\u6570\u306E\u5F8C\u308D\u306E\u300E@\u8981\u7D20\u300F\u306E\u6307\u5B9A\u304C\u4E0D\u6B63\u3067\u3059\u3002",e)}if(this.check("[")&&this.accept(["[",this.yCalc,"]"]))return e.index.push(this.checkArrayIndex(this.y[1])),e.josi=this.y[2].josi,this.y[2].josi==="";if(this.check("[")&&this.accept(["[",this.yCalc,"comma",this.yCalc,"]"])){let n=[this.checkArrayIndex(this.y[1]),this.checkArrayIndex(this.y[3])];return e.index=this.checkArrayReverse(n),e.josi=this.y[4].josi,this.y[4].josi===""}if(this.check("[")&&this.accept(["[",this.yCalc,"comma",this.yCalc,"comma",this.yCalc,"]"])){let n=[this.checkArrayIndex(this.y[1]),this.checkArrayIndex(this.y[3]),this.checkArrayIndex(this.y[5])];return e.index=this.checkArrayReverse(n),e.josi=this.y[6].josi,this.y[6].josi===""}return!1}yValueFuncPointer(){let e=this.peekSourceMap();if(this.check("func_pointer")){let n=this.getCur();return{type:"func_pointer",name:n.value,josi:n.josi,...e,end:this.peekSourceMap()}}return null}yValueWord(){let e=this.peekSourceMap();if(this.check("word")){let n=this.getCur(),r=this.getVarNameRef(n);if(r.josi===""&&this.checkTypes(["[","@"])){let i={type:"\u914D\u5217\u53C2\u7167",name:r,index:[],josi:"",...e,end:this.peekSourceMap()};for(;!this.isEOF()&&this.yValueWordGetIndex(i););if(i.index&&i.index.length===0)throw _.fromNode(`\u914D\u5217\u300E${r.value}\u300F\u30A2\u30AF\u30BB\u30B9\u3067\u6307\u5B9A\u30DF\u30B9`,r);return i}return r}return null}createVar(e,n,r){let i=e.value,o=n?"const":"var";return this.funcLevel===0?(i.indexOf("__")<0&&(i=this.modName+"__"+i),this.funclist.set(i,{type:o,value:"",isExport:r}),e.value=i,e):(this.localvars.set(i,{type:o,value:""}),e)}getVarName(e){let n=this.findVar(e.value);return n?(n&&n.scope==="global"&&(e.value=n.name),e):(this.createVar(e,!1,this.isExportDefault),e)}getVarNameRef(e){let n=this.findVar(e.value);return n?n&&n.scope==="global"&&(e.value=n.name):this.funcLevel===0&&e.value.indexOf("__")<0&&(e.value=this.modName+"__"+e.value),e}createVarList(e,n,r){for(let i=0;i<e.length;i++)e[i]=this.createVar(e[i],n,r);return e}yJSONObjectValue(){let e=[],n=this.peek();if(!n)return null;for(;!this.isEOF();){for(;this.check("eol");)this.get();if(this.check("}"))break;if(this.accept(["word",":",this.yCalc]))this.y[0].type="string",e.push({key:this.y[0],value:this.y[2]});else if(this.accept(["string",":",this.yCalc]))e.push({key:this.y[0],value:this.y[2]});else if(this.check("word")){let r=this.getCur();r.type="string",e.push({key:r,value:r})}else if(this.checkTypes(["string","number"])){let r=this.getCur();e.push({key:r,value:r})}else throw _.fromNode("\u8F9E\u66F8\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u5BA3\u8A00\u3067\u672B\u5C3E\u306E\u300E}\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002",n);this.check("comma")&&this.get()}return e}yJSONObject(){let e=this.peekSourceMap();if(this.accept(["{","}"]))return{type:"json_obj",value:[],josi:this.y[1].josi,...e,end:this.peekSourceMap()};if(this.accept(["{",this.yJSONObjectValue,"}"]))return{type:"json_obj",value:this.y[1],josi:this.y[2].josi,...e,end:this.peekSourceMap()};if(this.accept(["{",this.yJSONObjectValue]))throw _.fromNode("\u8F9E\u66F8\u578B\u5909\u6570\u306E\u521D\u671F\u5316\u304C\u300E}\u300F\u3067\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002",this.y[1]);return null}yJSONArrayValue(){this.check("eol")&&this.get();let e=this.yCalc();if(e===null)return null;this.check("comma")&&this.get();let n=[e];for(;!this.isEOF()&&(this.check("eol")&&this.get(),!this.check("]"));){let r=this.yCalc();if(r===null)break;this.check("comma")&&this.get(),n.push(r)}return n}yJSONArray(){let e=this.peekSourceMap();if(this.accept(["[","]"]))return{type:"json_array",value:[],josi:this.y[1].josi,...e,end:this.peekSourceMap()};if(this.accept(["[",this.yJSONArrayValue,"]"]))return{type:"json_array",value:this.y[1],josi:this.y[2].josi,...e,end:this.peekSourceMap()};if(this.accept(["[",this.yJSONArrayValue]))throw _.fromNode("\u914D\u5217\u5909\u6570\u306E\u521D\u671F\u5316\u304C\u300E]\u300F\u3067\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093\u3002",this.y[1]);return null}yTryExcept(){let e=this.peekSourceMap();if(!this.check("\u30A8\u30E9\u30FC\u76E3\u8996"))return null;let n=this.getCur(),r=this.yBlock();if(!this.check2(["\u30A8\u30E9\u30FC","\u306A\u3089\u3070"]))throw _.fromNode("\u30A8\u30E9\u30FC\u69CB\u6587\u3067\u300E\u30A8\u30E9\u30FC\u306A\u3089\u3070\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u30A8\u30E9\u30FC\u76E3\u8996..\u30A8\u30E9\u30FC\u306A\u3089\u3070..\u3053\u3053\u307E\u3067\u300F\u3092\u5BFE\u3067\u8A18\u8FF0\u3057\u307E\u3059\u3002",n);this.get(),this.get();let i=this.yBlock();if(this.check("\u3053\u3053\u307E\u3067"))this.get();else throw _.fromNode("\u300E\u3053\u3053\u307E\u3067\u300F\u304C\u3042\u308A\u307E\u305B\u3093\u3002\u300E\u30A8\u30E9\u30FC\u76E3\u8996\u300F...\u300E\u30A8\u30E9\u30FC\u306A\u3089\u3070\u300F...\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u5BFE\u5FDC\u3055\u305B\u3066\u304F\u3060\u3055\u3044\u3002",e);return{type:"try_except",block:r,errBlock:i||[],josi:"",...e,end:this.peekSourceMap()}}};var Ze=class{constructor(e,n,r){this.from=e,this.to=n,this.index=r}},D=class{constructor(e,n){this.text=e,this.sourcePosition=n}},Qe=class{constructor(e){this.history=[],this.code=e}getText(){return this.code}replaceAll(e,n){for(;;){let r=this.getText().indexOf(e);if(r===-1)break;e.length!==n.length&&this.history.unshift(new Ze(e.length,n.length,r)),this.code=this.code.replace(e,n)}}getSourcePosition(e){for(let n of this.history)e>=n.index+n.to?e+=n.from-n.to:n.index<=e&&e<n.index+n.to&&(n.to>=2&&e===n.index+n.to-1?e=n.index+n.from-1:e=n.index);return e}},K=class t{static getInstance(){return t._instance||(t._instance=new t),t._instance}constructor(){this.convertTable=new Map([[8208,"-"],[8209,"-"],[8211,"-"],[8212,"-"],[8213,"-"],[8722,"-"],[732,"~"],[759,"~"],[8275,"~"],[8764,"~"],[12316,"~"],[65374,"~"],[8192," "],[8194," "],[8195," "],[8196," "],[8197," "],[8198," "],[8199," "],[8201," "],[8202," "],[8203," "],[8239," "],[8287," "],[12288," "],[12644," "],[8251,"#"],[12290,";"],[12304,"["],[12305,"]"],[12289,","],[65292,","],[10006,"*"],[10133,"+"],[10134,"-"],[10135,"\xF7"]])}convert1ch(e){if(!e)return"";let n=e.codePointAt(0)||0,r=this.convertTable.get(n)||"";if(r)return r;if(n<127)return e;if(n>=65281&&n<=65374){let i=n-65248;return String.fromCodePoint(i)}return e}convert(e){if(!e)return[];let n=new Qe(e);n.replaceAll(`\r
17
- `,`
18
- `),n.replaceAll("\r",`
19
- `);let r=!1,i=!1,o="",s=[],u=0,c="",a=0;for(;a<n.getText().length;){let f=n.getText().charAt(a),l=n.getText().substr(a,2);if(r){if(f===o){r=!1,s.push(new D(c+o,n.getSourcePosition(u))),a++,u=a;continue}c+=f,a++;continue}if(i){if(l===o){i=!1,o==="\uFF0A\uFF0F"&&(o="*/"),s.push(new D(c+o,n.getSourcePosition(u))),a+=2,u=a;continue}c+=f,a++;continue}if(f==="\u300C"){s.push(new D(f,n.getSourcePosition(u))),a++,u=a,r=!0,o="\u300D",c="";continue}if(f==="\u300E"){s.push(new D(f,n.getSourcePosition(u))),a++,u=a,r=!0,o="\u300F",c="";continue}if(f==="\u201C"){s.push(new D(f,n.getSourcePosition(u))),a++,u=a,r=!0,o="\u201D",c="";continue}if(l==="\u{1F334}"||l==="\u{1F33F}"){s.push(new D(l,n.getSourcePosition(u))),a+=2,u=a,i=!0,o=l,c="";continue}let p=this.convert1ch(f);if(p==='"'||p==="'"){s.push(new D(p,n.getSourcePosition(u))),a++,u=a,r=!0,o=f,c="";continue}if(p==="#"){s.push(new D(p,n.getSourcePosition(u))),a++,u=a,r=!0,o=`
20
- `,c="";continue}if(l==="//"||l==="\uFF0F\uFF0F"){s.push(new D("//",n.getSourcePosition(u))),a+=2,u=a,r=!0,o=`
21
- `,c="";continue}if(l==="\uFF0F\uFF0A"){s.push(new D("/*",n.getSourcePosition(u))),a+=2,u=a,i=!0,o="\uFF0A\uFF0F",c="";continue}if(l==="/*"){s.push(new D(l,n.getSourcePosition(u))),a+=2,u=a,i=!0,o="*/",c="";continue}s.push(new D(p,n.getSourcePosition(u))),a++,u=a}return(r||i)&&s.push(new D(c+o,n.getSourcePosition(u))),s}};function et(t,e){t=t.substring(0,256),t=t.replace(/(!|💡)/,"!"),t=t.replace(/\/\*.*?\*\//g,"");let n=t.split(/[;。\n]/,30);for(let r of n)if(r=r.replace(/^\s+/,"").replace(/\s+$/,""),e.indexOf(r)>=0)return!0;return!1}var Jn=`(function(){
22
- `,Bn="})",qn=`(async function(){
23
- `,_e=class{constructor(e=!1,n=[],r="",i=""){this.isTest=e,this.codeStandalone=r,this.codeEnv=i,this.importFiles=["plugin_system.mjs","plugin_math.mjs","plugin_csv.mjs","plugin_promise.mjs","plugin_test.mjs"];for(let o of n)this.importFiles.push(o)}},tt=class t{constructor(e){this.nakoFuncList=new Map(e.getNakoFuncList()),this.nakoTestFuncs=new Map,this.usedFuncSet=new Set,this.loopId=1,this.numAsyncFn=0,this.usedAsyncFn=!1,this.flagLoop=!1,this.__self=e,this.genMode="sync",this.lastLineNo=null,this.varslistSet=this.setVarslistSet(e.__varslist),this.varsSet={isFunction:!1,names:new Set,readonly:new Set},this.varslistSet[2]=this.varsSet,this.defFuncName="",this.speedMode={lineNumbers:0,implicitTypeCasting:0,invalidSore:0,forcePure:0},this.performanceMonitor={userFunction:0,systemFunction:0,systemFunctionBody:0,mumeiId:0},this.constPools=[],this.constPoolsTemplate=[],this.warnUndefinedVar=!1,this.warnUndefinedReturnUserFunc=!1,this.warnUndefinedCallingUserFunc=!1,this.warnUndefinedCallingSystemFunc=!1,this.warnUndefinedCalledUserFuncArgs=!1,this.debugOption=e.debugOption}static isValidIdentifier(e){return/^(?!(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$)[$A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(e)}setVarslistSet(e){let n=[];for(let r=0;r<=1;r++){let i=e[r],o=new Set(i.keys());o.delete("meta"),n[r]={isFunction:!1,names:o,readonly:new Set}}return n}convLineno(e,n=!1,r=0){if(this.speedMode.lineNumbers>0)return"";let i=e.line+r,o;if(typeof e.line!="number"?o="unknown":typeof e.file!="string"?o=`l${i}`:o=`l${i}:${e.file}`,!n){if(o===this.lastLineNo)return"";this.lastLineNo=o}let s=JSON.stringify(o),u="";return this.debugOption.useDebug&&(this.debugOption.messageAction&&(u+=`window.postMessage({action:'${this.debugOption.messageAction}',line: ${s}});`),i>=1&&(this.debugOption.waitTime>0&&(u+=`await __v0.get('\u79D2\u5F85')(${this.debugOption.waitTime},__self);`),this.numAsyncFn+=1,this.usedAsyncFn=!0,u+=`await __v0.get('__DEBUG_BP_WAIT')(${i}, __self);`),u+="if (__v0.get('__forceClose')) { return -1 };"),`__line(${s});`+u}varname_get(e){return this.varslistSet.length===3?`__self.__varslist[2].get(${JSON.stringify(e)})`:`__self.__vars.get(${JSON.stringify(e)})`}varname_set(e,n){return this.varslistSet.length===3?`__self.__varslist[2].set(${JSON.stringify(e)}, (${n}))`:`__self.__vars.set(${JSON.stringify(e)}, (${n}))`}varname_set_sys(e,n){return`__self.__setSysVar(${JSON.stringify(e)}, (${n}))`}static getFuncName(e){if(e.indexOf("__")>=0){let r=e.split("__"),i=r[0],o=t.getFuncName(r[1]);return`${i}__${o}`}let n=e.replace(/[ぁ-ん]+$/,"");return n===""&&(n=e),n}static convPrint(e){return`__print(${e});`}convRequire(e){let n=e.value;return this.convLineno(e,!1)+`__module['${n}'] = require('${n}');
24
- `}getDefFuncCode(e,n){let r="";r+=`const nakoVersion = { version: ${JSON.stringify(e.version)} }
25
- `,r+=`const __self = self;
26
- `,r+=`__self.__self = __self;
27
- `,r+=`const __varslist = __self.__varslist;
28
- `,r+=`const __module = __self.__module;
29
- `,r+=`const __v0 = __self.__v0 = __self.__varslist[0];
30
- `,r+=`const __v1 = __self.__v1 = __self.__varslist[1];
31
- `,r+=`const __vars = __self.__vars = __self.__varslist[2];
32
- `,r+=`const __modList = __self.__modList = ${JSON.stringify(e.getModList())}
33
- `,r+=`const __line = (lineno) => { __self.__v0.set('__line', lineno); }
34
- `,r+=`__v0.set('__line', 'l0:__getDefFuncCode');
35
- `,r+=`__v0.set('__forceClose', false);
36
- `,r+=`__v0.set('__useDebug', ${this.debugOption.useDebug});
37
- `,r+="__self.constPools = "+JSON.stringify(this.constPools)+`;
38
- `,r+="__self.constPoolsTemplate = "+JSON.stringify(this.constPoolsTemplate)+`;
39
- `;let i="";if(this.nakoFuncList.forEach((o,s)=>{let u=Q(Z(String(o.fn),1)),c=o.asyncFn?"true":"false";i+=`//[DEF_FUNC name='${s}' asyncFn=${c}]
40
- __self.__varslist[1].set("${s}", ${u});
41
- //[/DEF_FUNC name='${s}']
42
- `}),i!==""&&(r+=`__v0.set('__line', '\u95A2\u6570\u306E\u5B9A\u7FA9');
43
- `+i),n.isTest){let o=`const __tests = [];
44
- `;this.nakoTestFuncs.forEach(s=>{let u=s.fn;o+=`${u};
45
- `}),o!==""&&(r+=`__v0.set('__line', '\u30C6\u30B9\u30C8\u306E\u5B9A\u7FA9');
46
- `,r+=o+`
47
- `)}return r}addPlugin(e){return this.__self.addPlugin(e)}addPluginObject(e,n){this.__self.addPluginObject(e,n)}addPluginFile(e,n,r){this.__self.addPluginFile(e,n,r)}addFunc(e,n,r){this.__self.addFunc(e,n,r)}getFunc(e){return this.__self.getFunc(e)}registerFunction(e){if(e.type!=="block")throw _.fromNode("\u69CB\u6587\u89E3\u6790\u306B\u5931\u6557\u3057\u3066\u3044\u307E\u3059\u3002\u69CB\u6587\u306F\u5FC5\u305Ablock\u304C\u5148\u982D\u306B\u306A\u308A\u307E\u3059",e);let n=[],r=o=>{if(!o.block)return;let s=o.block instanceof Array?o.block:[o.block];for(let u=0;u<s.length;u++){let c=s[u];if(c.type==="def_func"){if(!c.name)throw new Error("[System Error] \u95A2\u6570\u306E\u5B9A\u7FA9\u3067\u95A2\u6570\u540D\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044");let a=c.name.value;this.usedFuncSet.add(a),this.__self.__varslist[1].set(a,()=>{}),this.varslistSet[1].names.add(a);let f=c.name.meta;this.nakoFuncList.set(a,{josi:f.josi,fn:()=>{},type:"func",asyncFn:c.asyncFn,isExport:c.isExport}),n.push({name:a,node:c})}else if(c.type==="speed_mode"){if(!c.block)continue;c.block.type==="block"?r(c.block):r(c)}else if(c.type==="performance_monitor"){if(!c.block)continue;c.block.type==="block"?r(c.block):r(c)}}};r(e);let i=new Set;this.speedMode.invalidSore===0&&i.add("\u305D\u308C"),this.varsSet={isFunction:!1,names:i,readonly:new Set},this.varslistSet=this.setVarslistSet(this.__self.__varslist),this.varslistSet[2]=this.varsSet}convGen(e,n){let r=this.convLineno(e,!1)+this._convGen(e,!0);return n.isTest?"":r}_convGen(e,n){if(!e)return"";let r="";if(e instanceof Array){for(let i=0;i<e.length;i++){let o=e[i];r+=this._convGen(o,n)}return r}if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return""+e;switch(e.type){case"nop":break;case"block":r+=this.convBlock(e);break;case"comment":case"eol":r+=this.convComment(e);break;case"run_mode":r+=this.convRunMode(e);break;case"break":r+=this.convCheckLoop(e,"break");break;case"continue":r+=this.convCheckLoop(e,"continue");break;case"end":r+="__v0.get('\u7D42')(__self);";break;case"number":r+=e.value;break;case"bigint":r+=e.value;break;case"string":r+=this.convString(e);break;case"def_local_var":r+=this.convDefLocalVar(e);break;case"def_local_varlist":r+=this.convDefLocalVarlist(e);break;case"let":r+=this.convLet(e);break;case"inc":r+=this.convInc(e);break;case"word":case"variable":r+=this.convGetVar(e);break;case"op":case"calc":r+=this.convOp(e);break;case"renbun":r+=this.convRenbun(e);break;case"not":r+="(("+this._convGen(e.value,!0)+")?false:true)";break;case"func":case"func_pointer":case"calc_func":r+=this.convCallFunc(e,n);break;case"if":r+=this.convIf(e);break;case"for":r+=this.convFor(e);break;case"foreach":r+=this.convForeach(e);break;case"repeat_times":r+=this.convRepeatTimes(e);break;case"speed_mode":r+=this.convSpeedMode(e,n);break;case"performance_monitor":r+=this.convPerformanceMonitor(e,n);break;case"while":r+=this.convWhile(e);break;case"atohantei":r+=this.convAtohantei(e);break;case"switch":r+=this.convSwitch(e);break;case"let_array":r+=this.convLetArray(e);break;case"\u914D\u5217\u53C2\u7167":r+=this.convRefArray(e);break;case"json_array":r+=this.convJsonArray(e);break;case"json_obj":r+=this.convJsonObj(e);break;case"func_obj":r+=this.convFuncObj(e);break;case"bool":r+=e.value?"true":"false";break;case"null":r+="null";break;case"def_test":r+=this.convDefTest(e);break;case"def_func":r+=this.convDefFunc(e);break;case"return":r+=this.convReturn(e);break;case"try_except":r+=this.convTryExcept(e);break;case"require":r+=this.convRequire(e);break;default:throw new Error("System Error: unknown_type="+e.type)}return r}findVar(e,n=null){if(this.varslistSet.length>3&&this.varsSet.names.has(e))return{i:this.varslistSet.length-1,name:e,isTop:!0,js:this.varname_get(e),js_set:this.varname_set(e,String(n))};for(let r=2;r>=0;r--)if(this.varslistSet[r].names.has(e))return{i:r,name:e,isTop:!1,js:`__self.__varslist[${r}].get(${JSON.stringify(e)})`,js_set:`__self.__varslist[${r}].set(${JSON.stringify(e)}, ${n})`};return null}genVar(e,n){let r=this.findVar(e),i=n.line;if(r===null){if(!(e==="\u5F15\u6570"||e==="\u305D\u308C"||e==="\u5BFE\u8C61"||e==="\u5BFE\u8C61\u30AD\u30FC")){if(this.warnUndefinedVar){let s=e.replace(/^main__(.+)$/,"$1");this.__self.getLogger().warn(`\u5909\u6570\u300E${s}\u300F\u306F\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002`,n)}}return this.varsSet.names.add(e),this.varname_get(e)}if(r.i===0){let s=this.__self.getNakoFunc(e);if(!s)return`${r.js}/*[link_error]l${i}:${n.file}*/`;if(s.type==="const"||s.type==="var")return r.js;if(s.type==="func"){if(!s.josi||s.josi.length===0)return`(${r.js}())`;throw _.fromNode(`\u300E${e}\u300F\u304C\u8907\u6587\u3067\u4F7F\u308F\u308C\u307E\u3057\u305F\u3002\u5358\u6587\u3067\u8A18\u8FF0\u3057\u3066\u304F\u3060\u3055\u3044\u3002(v1\u975E\u4E92\u63DB)`,n)}throw _.fromNode(`\u300E${e}\u300F\u306F\u95A2\u6570\u3067\u3042\u308A\u53C2\u7167\u3067\u304D\u307E\u305B\u3093\u3002`,n)}return r.js}convGetVar(e){let n=e.value;return this.genVar(n,e)}convBlock(e){if(!e.block)return"";let n="",r=e.block instanceof Array?e.block:[e.block];for(let i=0;i<r.length;i++){let o=r[i];n+=this._convGen(o,!1)}return n}convComment(e){let n=String(e.value);n=n.replace(/\n/g,"\xB6");let r=this.convLineno(e,!1);return n===""&&r===""?";":n===""?";"+r+`
48
- `:";"+r+"//"+n+`
49
- `}convRunMode(e){let n=e.value,r=!1;return n==="\u53B3\u3057\u304F\u30C1\u30A7\u30C3\u30AF"&&(r=!0),this.warnUndefinedVar=r,this.warnUndefinedReturnUserFunc=r,this.warnUndefinedCallingUserFunc=r,this.warnUndefinedCallingSystemFunc=r,this.warnUndefinedCalledUserFuncArgs=r,`/* \u5B9F\u884C\u30E2\u30FC\u30C9: ${n} */`}convReturn(e){if(this.varsSet.names.has("!\u95A2\u6570"))throw _.fromNode("\u300E\u623B\u308B\u300F\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u95A2\u6570\u5B9A\u7FA9\u5185\u306E\u307F\u3067\u4F7F\u7528\u53EF\u80FD\u3067\u3059\u3002",e);let n=this.convLineno(e,!1),r;if(e.value)r=this._convGen(e.value,!0);else if(this.speedMode.invalidSore===0)r=this.varname_get("\u305D\u308C");else return n+"return;";if(this.warnUndefinedReturnUserFunc){let i=this.defFuncName?this.defFuncName:"\u7121\u540D\u95A2\u6570",o=this.addConstPool(`\u30E6\u30FC\u30B6\u95A2\u6570\u300E${i}\u300F\u304B\u3089undefined\u304C\u8FD4\u3055\u308C\u3066\u3044\u307E\u3059`,[],e.file,e.line);return n+`return (__self.chk(${r}, ${o}));`}else return n+`return ${r};`}getConstPoolsTemplateId(e){let n=this.constPoolsTemplate.indexOf(e);return n<0&&(n=this.constPoolsTemplate.length,this.constPoolsTemplate[n]=e),n}addConstPool(e,n,r,i){r=""+r;let o=this.getConstPoolsTemplateId(r),s=this.getConstPoolsTemplateId(e),u=[];for(let a in n){let f=""+n[a],l=this.getConstPoolsTemplateId(f);u.push(l)}let c=this.constPools.length;return this.constPools.push([s,u,o,i]),c}convCheckLoop(e,n){if(!this.flagLoop){let r=n==="continue"?"\u7D9A\u3051\u308B":"\u629C\u3051\u308B";throw _.fromNode(`\u300E${r}\u300F\u6587\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u305D\u308C\u306F\u7E70\u308A\u8FD4\u3057\u306E\u4E2D\u3067\u5229\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002`,e)}return this.convLineno(e)+n+";"}convDefFuncCommon(e,n){this.defFuncName=n;let r="",i="";if(this.performanceMonitor.userFunction!==0){let m=n;m||(typeof this.performanceMonitor.mumeiId>"u"&&(this.performanceMonitor.mumeiId=0),this.performanceMonitor.mumeiId++,m=`anous_${this.performanceMonitor.mumeiId}`),r=`const performanceMonitorEnd = (function (key, type) {
50
- const uf_start = performance.now() * 1000;
51
- return function () {
52
- const el_time = performance.now() * 1000 - uf_start;
53
- if (!__self.__performance_monitor) {
54
- __self.__performance_monitor={};
55
- __self.__performance_monitor[key] = { called:1, totel_usec: el_time, min_usec: el_time, max_usec: el_time, type: type };
56
- } else if (!__self.__performance_monitor[key]) {
57
- __self.__performance_monitor[key] = { called:1, totel_usec: el_time, min_usec: el_time, max_usec: el_time, type: type };
58
- } else {
59
- __self.__performance_monitor[key].called++;
60
- __self.__performance_monitor[key].totel_usec+=el_time;
61
- if(__self.__performance_monitor[key].min_usec>el_time){__self.__performance_monitor[key].min_usec=el_time;}
62
- if(__self.__performance_monitor[key].max_usec<el_time){__self.__performance_monitor[key].max_usec=el_time;}
63
- }};})('${m}', 'user');try {
64
- `,i=`} finally { performanceMonitorEnd(); }
65
- `}let o="",s=" ",u="",c="",a=new Set;this.speedMode.invalidSore===0&&a.add("\u305D\u308C"),this.varsSet={isFunction:!0,names:a,readonly:new Set},this.varslistSet.push(this.varsSet),o+=s+`const \u5F15\u6570 = arguments;
66
- `,u+=`
67
- // PUSH STACK
68
- `,u+=`const __localvars = __self.__vars;
69
- `,u+=`__self.__vars = new Map();
70
- `,u+=`try {
71
- `,c+=`} finally {
72
- `,c+=s+`// POP STACK
73
- `,c+=s+`self.__vars = __localvars;
74
- `,c+=`}
75
- `;let f=Array.from(this.varsSet.names.values()),l="",p=n?e.name.meta:e.meta;for(let m=0;m<p.varnames.length;m++){let y=p.varnames[m];if(!this.warnUndefinedCalledUserFuncArgs)l+=s+this.varname_set(y,`arguments[${m}]`)+`;
76
- `;else{let v=`\u533F\u540D\u95A2\u6570\u306E\u5F15\u6570\u300E${y}\u300F\u306Bundefined\u304C\u6E21\u3055\u308C\u307E\u3057\u305F`;n&&(v=`\u30E6\u30FC\u30B6\u95A2\u6570\u300E${n}\u300F\u306E\u5F15\u6570\u300E${y}\u300F\u306Bundefined\u304C\u6E21\u3055\u308C\u307E\u3057\u305F`);let V=`${`((a) => { if (a === undefined) { ${`__self.logger.warn('${v}', {line: ${e.line}, file: ${JSON.stringify(e.file)}});`} }; return a; })`}(arguments[${m}])`;l+=s+this.varname_set(y,V)+`;
77
- `}this.varsSet.names.add(y)}n&&(this.usedFuncSet.add(n),this.varslistSet[1].names.add(n),this.nakoFuncList.get(n)===void 0&&(this.nakoFuncList.set(n,{josi:e.name.meta.josi,fn:()=>{},type:"func",asyncFn:!1,isExport:null}),this.__self.getLogger().warn(`generate\u3067\u672A\u5B9A\u7FA9\u306E\u72B6\u614B\u306E\u95A2\u6570\u300E${n}\u300F\u304C\u52D5\u7684\u306B\u767B\u9332\u3055\u308C\u3066\u3044\u307E\u3059\u3002`)));let h=this.usedAsyncFn;this.usedAsyncFn=this.debugOption.useDebug;let d=this._convGen(e.block,!1);if(l+=d.split(`
78
- `).map(m=>" "+m).join(`
79
- `)+`
80
- `,this.speedMode.invalidSore===0&&(l+=` return (${this.varname_get("\u305D\u308C")});
81
- `),l+=i,n&&this.usedAsyncFn){let m=this.nakoFuncList.get(n);m&&(m.asyncFn=!0)}for(let m of Array.from(this.varsSet.names.values()))f.includes(m)||t.isValidIdentifier(m)&&(o+=` var ${m};
82
- `);this.speedMode.invalidSore===0&&(t.isValidIdentifier("\u305D\u308C")?o+=` var \u305D\u308C = '';
83
- `:o+=` ${this.varname_get("\u305D\u308C")} = '';`);let g=this.usedAsyncFn?qn:Jn,b=" "+this.convLineno(e,!0,1)+`
84
- `;if(l=g+r+u+o+b+l+c,l+=Bn,n){let m=this.nakoFuncList.get(n);m&&(m.fn=l,m.asyncFn=this.usedAsyncFn,p.asyncFn=this.usedAsyncFn)}return this.usedAsyncFn=h,this.varslistSet.pop(),this.varsSet=this.varslistSet[this.varslistSet.length-1],n&&this.__self.__varslist[1].set(n,l),this.defFuncName="",l}convDefTest(e){let n=e.name.value,r=`__tests.push({ name: '${n}', f: () => {
85
- `,i=this._convGen(e.block,!1);return r+=` ${i}
86
- }});`,this.nakoTestFuncs.set(n,{josi:e.name.meta.josi,fn:r,type:"test_func"}),""}convDefFunc(e){if(!e.name)return"";let n=t.getFuncName(e.name.value);return this.convDefFuncCommon(e,n),""}convFuncObj(e){return"/*convFuncObj*/"+this.convDefFuncCommon(e,"")}convJsonObj(e){return"{"+e.value.map(i=>{let o=this._convGen(i.key,!0),s=this._convGen(i.value,!0);return`${o}:${s}`}).join(",")+"}"}convJsonArray(e){return"["+e.value.map(i=>this._convGen(i,!0)).join(",")+"]"}convRefArray(e){let n=this._convGen(e.name,!0),r=e.index,i=n;if(!r)return i;for(let o=0;o<r.length;o++){let s=this._convGen(r[o],!0);i+="["+s+"]"}return i}convLetArray(e){let n=this.loopId++,r=this._convGen(e.name,!0),i=e.index||[],o="",s=r,u="";if(e.checkInit){let f="[0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0]",l=e.name;if(l&&l.type==="word"){let p=l.value,h=`$nako_tmp_a${n}`,d=this.varname_set(p,f);o+=`
87
- /*\u914D\u5217\u521D\u671F\u5316*/if (!(${r} instanceof Array)) { ${d} };
88
- `,o+=`${h} = ${r};
89
- `;for(let g=0;g<i.length-1;g++){let b=this._convGen(i[g],!0);u+=`[${b}]`,o+=`
90
- /*\u914D\u5217\u521D\u671F\u5316${g}*/if (!(${h}${u} instanceof Array)) { ${h}${u} = ${f}; };`}o+=`
91
- `}}for(let f=0;f<i.length;f++){let l=this._convGen(i[f],!0);s+="["+l+"]"}let c=null;if(this.speedMode.invalidSore===0&&(c=this.varname_get("\u305D\u308C")),e.value&&(c=this._convGen(e.value,!0)),c==null)throw _.fromNode("\u4EE3\u5165\u3059\u308B\u5148\u306E\u5909\u6570\u540D\u304C\u3042\u308A\u307E\u305B\u3093\u3002",e);return s+=" = "+c+`;
92
- `,this.convLineno(e,!1)+o+s}convGenLoop(e){let n=this.flagLoop;this.flagLoop=!0;try{return this._convGen(e,!1)}finally{this.flagLoop=n}}convFor(e){let n=this.loopId++,r=`$nako_i${n}`,i="";if(e.word!==null){let b=e.word.value;this.varsSet.names.add(b),i=this.varname_set(b,r)}let o=`$nako_from${n}`,s=`$nako_to${n}`,u=`$nako_temp${n}`,c="";this.speedMode.invalidSore===0&&(c=this.varname_set("\u305D\u308C",r));let a="0",f="0",l="0";e.to&&e.to.type==="func"&&e.to.name==="\u7BC4\u56F2"?(l=this._convGen(e.to,!0),a=`${u}['\u5148\u982D'] || 0`,f=`${u}['\u672B\u5C3E'] || 0`):(a=this._convGen(e.from,!0),f=this._convGen(e.to,!0));let p=e.flagDown,h="1";e.inc&&e.inc!=="null"&&(h=this._convGen(e.inc,!0));let d=this.convGenLoop(e.block);return this.convLineno(e,!1)+`
93
- /*[convFor id=${n}]*/
94
- const ${u} = ${l};
95
- const ${o} = ${a};
96
- const ${s} = ${f};
97
- if (${o} <= ${s}) { // up
98
- for (let ${r} = ${o}; ${r} <= ${s}; ${r}+= ${h}) {
99
- ${c};${i}
100
- // for block begin
101
- ${d}
102
- // for block end
103
- };
104
- } else { // down
105
- if (${p}) { for (let ${r} = ${o}; ${r} >= ${s}; ${r}-= ${h}) {
106
- ${c};${i}
107
- // for block begin
108
- ${d}
109
- // for block end
110
- }
111
- };
112
- };
113
- //[/convFor id=${n}]
114
- `}convForeach(e){let n=this.loopId++,r=`$nako_i${n}`,i=`$nako_foreach_value${n}`,o=`$nako_foreach_data${n}`,s=this.varname_set_sys("\u5BFE\u8C61",i);if(e.name){let h=""+e.name.value;this.varsSet.names.add(h),s=this.varname_set(h,i)}let c=this.varname_set_sys("\u5BFE\u8C61\u30AD\u30FC",r),a="";this.speedMode.invalidSore===0&&(a=this.varname_set("\u305D\u308C",i));let f="";if(e.target===null)if(this.speedMode.invalidSore===0)f=this.varname_get("\u305D\u308C");else throw _.fromNode("\u300E\u53CD\u5FA9\u300F\u306E\u5BFE\u8C61\u304C\u3042\u308A\u307E\u305B\u3093\u3002",e);else f=this._convGen(e.target,!0);let l=Q(Z(this.convGenLoop(e.block),1));return this.convLineno(e,!1)+`
115
- // [convForeach id=${n}]
116
- let ${o} = ${f};
117
- // foreach Map?
118
- if (${o} instanceof Map) { // Object\u306B\u5F37\u5236\u5909\u63DB
119
- let tmp = {}; for (let tmpKey of ${o}.keys()) { tmp[tmpKey] = ${o}.get(tmpKey); };
120
- ${o} = tmp;
121
- }
122
- for (let ${r} in ${o}) {
123
- if (!${o}.hasOwnProperty(${r})) { continue }
124
- // \u5BFE\u8C61\u30AD\u30FC\u306E\u8A2D\u5B9A
125
- ${c}
126
- // \u5BFE\u8C61\u306E\u8A2D\u5B9A
127
- let ${i} = $nako_foreach_data${n}[${r}]
128
- ${a};
129
- ${s};
130
- // [convForeach::block]
131
- ${l}
132
- // [/convForeach::block]
133
- }
134
- // [/convForeach id=${n}]
135
- `}convRepeatTimes(e){let n=this.loopId++,r=`$nako_i${n}`,i=`$nako_times_data${n}`,o=this._convGen(e.value,!0);this.varsSet.names.add("\u56DE\u6570");let s=this.varname_set("\u56DE\u6570",r),u=Q(Z(this.convGenLoop(e.block),1)),c="";return this.speedMode.invalidSore===0&&(c=this.varname_set("\u305D\u308C",r)),this.convLineno(e,!1)+`
136
- // [convRepeatTimes id=${n}] // \u300En\u56DE\u300F\u69CB\u6587
137
- let ${i} = ${o};
138
- for (let ${r} = 1; ${r} <= ${i}; ${r}++) {
139
- ${c};${s}
140
- ${u}
141
- }
142
- // [/convRepeatTimes id=${n}]
143
- `}convSpeedMode(e,n){if(!e.options)return"";let r={...this.speedMode};e.options.\u884C\u756A\u53F7\u7121\u3057&&this.speedMode.lineNumbers++,e.options.\u6697\u9ED9\u306E\u578B\u5909\u63DB\u7121\u3057&&this.speedMode.implicitTypeCasting++,e.options.\u5F37\u5236\u30D4\u30E5\u30A2&&this.speedMode.forcePure++,e.options.\u305D\u308C\u7121\u52B9&&this.speedMode.invalidSore++;try{return this._convGen(e.block,n)}finally{this.speedMode=r}}convPerformanceMonitor(e,n){let r={...this.performanceMonitor};if(!e.options)return"";e.options.\u30E6\u30FC\u30B6\u95A2\u6570&&this.performanceMonitor.userFunction++,e.options.\u30B7\u30B9\u30C6\u30E0\u95A2\u6570\u672C\u4F53&&this.performanceMonitor.systemFunctionBody++,e.options.\u30B7\u30B9\u30C6\u30E0\u95A2\u6570&&this.performanceMonitor.systemFunction++;try{return this._convGen(e.block,n)}finally{this.performanceMonitor=r}}convWhile(e){let n=this._convGen(e.cond,!0),r=Q(Z(this.convGenLoop(e.block),1));return`// [convWhile]
144
- `+this.convLineno(e,!1)+`
145
- while (${n}){
146
- ${r}
147
- }
148
- // [convWhile]
149
- `}convAtohantei(e){let r=`$nako_i${this.loopId++}`,i=this._convGen(e.cond,!0),s=`while (true) {
150
- ${this.convGenLoop(e.block)}
151
- let ${r} = ${i};
152
- if (${r}) { continue } else { break }
153
- }
154
-
155
- `;return this.convLineno(e,!1)+s}convSwitch(e){let n=this._convGen(e.value,!0),r=e.cases||[],i="";for(let s=0;s<r.length;s++){let u=r[s][0],c=this.convGenLoop(r[s][1]);if(u.type==="\u9055\u3048\u3070")i+=` default:
156
- `;else{let a=this._convGen(u,!0);i+=` case ${a}:
157
- `}i+=` ${c}
158
- break
159
- `}let o=`switch (${n}){
160
- ${i}
161
- }
162
- `;return this.convLineno(e,!1)+o}convIf(e){let n=this._convGen(e.expr,!0),r=Q(Z(this._convGen(e.block,!1),1)),i="";e.false_block&&(i=Q(Z(this.convGenLoop(e.false_block),1)));let o=`// [convIf]
163
- `+this.convLineno(e,!1)+`
164
- if (${n}) {
165
- ${r}
166
- }`;return i!==""&&(o+=` else {
167
- ${i}
168
- }
169
- `),o+=`
170
- // [/convIf]
171
- `,o}convFuncGetArgsCalcType(e,n,r){let i=[],o={},s=r.args?r.args:[];for(let u=0;u<s.length;u++){let c=s[u];if(u===0&&c===null&&this.speedMode.invalidSore===0)i.push(this.varname_get("\u305D\u308C")),o.sore=!0;else{let a=this._convGen(c,!0);a===""&&(a="undefined"),typeof a!="string"&&(a="undefined"),i.push(`/*arg${u}*/${a}`)}}return[i,o]}getPluginList(){let e=[];for(let n in this.__self.__module)e.push(n);return e}convCallFunc(e,n){let r=t.getFuncName(e.name),i=this.findVar(r);if(i===null)throw _.fromNode(`\u95A2\u6570\u300E${r}\u300F\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002\u6709\u52B9\u30D7\u30E9\u30B0\u30A4\u30F3=[`+this.getPluginList().join(", ")+"]",e);let o;if(i.i===0){if(o=this.__self.getFunc(r),!o)throw new Error(`[System Error] \u95A2\u6570\u300C${r}\u300DNakoCompiler.nakoFuncList \u306E\u4E0D\u6574\u5408\u304C\u3042\u308A\u307E\u3059\u3002`);if(o.type!=="func")throw _.fromNode(`\u300E${r}\u300F\u306F\u95A2\u6570\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002`,e)}else o=this.nakoFuncList.get(r),o===void 0&&(o={return_none:!1});if(e.type==="func_pointer")return i.js;let s=this.convFuncGetArgsCalcType(r,o,e),u=s[0],c=s[1];if(this.usedFuncSet.add(r),r==="\u540D\u524D\u7A7A\u9593\u8A2D\u5B9A")return`
172
- // --- \u540D\u524D\u7A7A\u9593(${u[0]}) ---
173
- __self.__varslist[0].get('\u540D\u524D\u7A7A\u9593\u8A2D\u5B9A')(${u[0]}, __self);__self.__modName=${u[0]};
174
- `;if(r==="\u30D7\u30E9\u30B0\u30A4\u30F3\u540D\u8A2D\u5B9A")return`
175
- __self.__varslist[0].get('\u30D7\u30E9\u30B0\u30A4\u30F3\u540D\u8A2D\u5B9A')(${u[0]}, __self);
176
- `;u.push("__self");let a="function",f="",l="";if(e.setter&&(f+=`;__self.isSetter = true;
177
- `,l+=`;__self.isSetter = false;
178
- `),i.i===0&&this.varslistSet.length>3&&o.pure!==!0&&this.speedMode.forcePure===0){let m=[];for(let y of Array.from(this.varsSet.names.values()))t.isValidIdentifier(y)&&m.push({str:JSON.stringify(y),js:this.varname_get(y)});if(f+=`__self.__locals = __vars;
179
- `,m.length>0){f+=`/* \u5168\u3066\u306E\u5C55\u958B\u3055\u308C\u305F\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u3092 __self.__locals \u306B\u4FDD\u5B58 */
180
- `;for(let y of m)f+=`__self.__locals.set(${y.str}, ${y.js});
181
- `}if(m.length>0){l+=`/* \u5168\u3066\u306E\u5C55\u958B\u3055\u308C\u305F\u30ED\u30FC\u30AB\u30EB\u5909\u6570\u3092 __self.__locals \u304B\u3089\u53D7\u3051\u53D6\u308B */
182
- `;for(let y of m)y.js!=="\u305D\u308C"&&(l+=`__self.__varslist[2].set(${y.str}, __self.__locals[${y.str}]);
183
- `)}}c.sore&&(f+="/*[sore]*/");let p=(m,y)=>{let v="";for(let k of m.split(`
184
- `))k!==""&&(v+=" ".repeat(y)+k+`
185
- `);return v},h={TYPEOF:!0,\u5909\u6570\u578B\u78BA\u8A8D:!0},d;if(!this.warnUndefinedCallingUserFunc&&i.i!==0||!this.warnUndefinedCallingSystemFunc&&i.i===0)d=u.join(",");else{let m=[];u.forEach(y=>{if(y==="__self"||h[r]===!0)m.push(`${y}`);else{let v=i.i===0?"\u547D\u4EE4\u300E$0\u300F\u306E\u5F15\u6570\u306Bundefined\u3092\u6E21\u3057\u3066\u3044\u307E\u3059\u3002":"\u30E6\u30FC\u30B6\u547D\u4EE4\u300E$0\u300F\u306E\u5F15\u6570\u306Bundefined\u3092\u6E21\u3057\u3066\u3044\u307E\u3059\u3002",k=this.addConstPool(v,[r],e.file,e.line),$=y===""?'""':y;m.push(`(__self.chk(${$}, ${k}))`)}}),d=m.join(", ")}let g=`${i.js}(${d})`;if(o.asyncFn&&(a=`async ${a}`,g=`await ${g}`,this.numAsyncFn++,this.usedAsyncFn=!0),i.i===0&&this.performanceMonitor.systemFunctionBody!==0){let m=r;m||(typeof this.performanceMonitor.mumeiId>"u"&&(this.performanceMonitor.mumeiId=0),this.performanceMonitor.mumeiId++,m=`anous_${this.performanceMonitor.mumeiId}`),g=`(${a} (key, type) {
186
- const sbf_start = performance.now() * 1000;
187
- try {
188
- return `+g+`;
189
- } finally {
190
- const sbl_time = performance.now() * 1000 - sbf_start;
191
- if (!__self.__performance_monitor) {
192
- __self.__performance_monitor={};
193
- __self.__performance_monitor[key] = { called:1, totel_usec: sbl_time, min_usec: sbl_time, max_usec: sbl_time, type: type };
194
- } else if (!__self.__performance_monitor[key]) {
195
- __self.__performance_monitor[key] = { called:1, totel_usec: sbl_time, min_usec: sbl_time, max_usec: sbl_time, type: type };
196
- } else {
197
- __self.__performance_monitor[key].called++;
198
- __self.__performance_monitor[key].totel_usec+=sbl_time;
199
- if(__self.__performance_monitor[key].min_usec>sbl_time){__self.__performance_monitor[key].min_usec=sbl_time;}
200
- if(__self.__performance_monitor[key].max_usec<sbl_time){__self.__performance_monitor[key].max_usec=sbl_time;}
201
- }}})('${r}_body', 'sysbody')
202
- `}let b="";if(o.return_none)l===""?b=`/*\u623B\u5024\u306E\u306A\u3044\u95A2\u6570\u547C\u51FA1*/${f}${g};
203
- `:b=`/*\u623B\u5024\u306E\u306A\u3044\u95A2\u6570\u547C\u51FA2*/${f}try {
204
- ${p(g,1)};
205
- } finally {
206
- ${p(l,1)}}
207
- `;else{let m="",y="";if(this.speedMode.invalidSore===0&&(m="__self.__setSore(",y=")"),f===""&&l==="")b=`${m}${g}${y}`;else if(l===""){let v=`${m}${g}${y}`;b=`/* funcCallThis1 */${`(${`${a}(){ return ${v} }`}).call(this)`}`}else b=`/* funcCallThis2 */(${a}(){
208
- ${p(`${f}try {
209
- ${p(`return ${m}${g}${y};`,1)}
210
- } finally {
211
- ${p(l,1)}}`,1)}}).call(this)`;(e.josi==="\u3057\u3066"||e.josi===""&&!n)&&(b+=`;
212
- `)}return i.i===0&&this.performanceMonitor.systemFunction!==0&&(b=`(function (key, type) {
213
- const sf_start = performance.now() * 1000;
214
- try {
215
- return `+b+`;
216
- } finally {
217
- const sl_time = performance.now() * 1000 - sf_start;
218
- if (!__self.__performance_monitor) {
219
- __self.__performance_monitor={};
220
- __self.__performance_monitor[key] = { called:1, totel_usec: sl_time, min_usec: sl_time, max_usec: sl_time, type: type };
221
- } else if (!__self.__performance_monitor[key]) {
222
- __self.__performance_monitor[key] = { called:1, totel_usec: sl_time, min_usec: sl_time, max_usec: sl_time, type: type };
223
- } else {
224
- __self.__performance_monitor[key].called++;
225
- __self.__performance_monitor[key].totel_usec+=sl_time;
226
- if(__self.__performance_monitor[key].min_usec>sl_time){__self.__performance_monitor[key].min_usec=sl_time;}
227
- if(__self.__performance_monitor[key].max_usec<sl_time){__self.__performance_monitor[key].max_usec=sl_time;}
228
- }}})('${r}_sys', 'system')
229
- `),b}convRenbun(e){let n=this._convGen(e.right,!0),r=this._convGen(e.left,!1);return this.numAsyncFn++,this.usedAsyncFn=!0,`/*\u9023\u6587*/await (async function(){ ${r}; return ${n} }).call(this)`}convOp(e){let n={"&":'+""+',eq:"==",noteq:"!=","===":"===","!==":"!==",gt:">",lt:"<",gteq:">=",lteq:"<=",and:"&&",or:"||",shift_l:"<<",shift_r:">>",shift_r0:">>>","\xF7":"/"},r=e.operator||"",i=this._convGen(e.right,!0),o=this._convGen(e.left,!0);return r==="+"&&this.speedMode.implicitTypeCasting===0&&(e.left&&e.left.type!=="number"&&e.left.type!=="bigint"&&(o=`self.__parseFloatOrBigint(${o})`),e.right&&e.right.type!=="number"&&e.right.type!=="bigint"&&(i=`self.__parseFloatOrBigint(${i})`)),r==="^"||r==="**"?`((${o}) ** (${i}))`:r==="\xF7\xF7"?`(Math.floor(${o} / ${i}))`:(n[r]&&(r=n[r]),`(${o} ${r} ${i})`)}convInc(e){let r=`$nako_v${this.loopId++}`,i=null;if(this.speedMode.invalidSore===0&&(i=this.varname_get("\u305D\u308C")),e.value&&(i=this._convGen(e.value,!0)),i==null)throw _.fromNode("\u52A0\u7B97\u3059\u308B\u5148\u306E\u5909\u6570\u540D\u304C\u3042\u308A\u307E\u305B\u3093\u3002",e);let o="",s="",u="",c="",a=e.name;if(a.type==="\u914D\u5217\u53C2\u7167")s=this.convRefArray(a),u=`${s} = ${r}`,c=`${s} = 0`;else{let f=a.value,l=this.findVar(f,r);if(l===null&&(this.varsSet.names.add(f),l=this.findVar(f,r),!l))throw new Error("\u300E\u5897\u300F\u307E\u305F\u306F\u300E\u6E1B\u300F\u3067\u5909\u6570\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002");s=l.js,u=l.js_set,l=this.findVar(f,"0"),l!==null&&(c=l.js_set)}return o+=`
230
- /*[convInc]*/
231
- `,o+=this.convLineno(e,!1)+`
232
- `,o+=`let ${r} = ${s}
233
- `,o+=`if (typeof ${r} === 'undefined') { ${c}; }
234
- `,o+=`${r} = ${s} + ${i};
235
- `,o+=`${u}
236
- `,o+=`/*[/convInc]*/
237
- `,o}convLet(e){let n=null;if(this.speedMode.invalidSore===0&&(n=this.varname_get("\u305D\u308C")),e.value){let s=e.value;if(s.type==="func"&&s.name!==void 0){let u=this.__self.getFunc(s.name);if(u&&u.return_none)throw _.fromNode(`\u95A2\u6570\u300E${s.name}\u300F\u306F\u623B\u308A\u5024\u304C\u306A\u3044\u306E\u3067\u7D50\u679C\u3092\u4EE3\u5165\u3067\u304D\u307E\u305B\u3093\u3002`,e)}n=this._convGen(e.value,!0)}if(n==null)throw _.fromNode("\u4EE3\u5165\u3059\u308B\u5148\u306E\u5909\u6570\u540D\u304C\u3042\u308A\u307E\u305B\u3093\u3002",e);let r=e.name.value,i=this.findVar(r,n),o="";if(i===null)this.varsSet.names.add(r),o=`${this.varname_set(r,n)};`;else{if(this.varslistSet[i.i].readonly.has(r))throw _.fromNode(`\u5B9A\u6570\u300E${r}\u300F\u306F\u65E2\u306B\u5B9A\u7FA9\u6E08\u307F\u306A\u306E\u3067\u3001\u5024\u3092\u4EE3\u5165\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002`,e);o=`${i.js_set};`}return";"+this.convLineno(e,!1)+o+`
238
- `}convDefLocalVar(e){let n=e.value===null?"null":this._convGen(e.value,!0),r=e.name.value,i=e.vartype;if(this.varsSet.names.has(r))throw _.fromNode(`${i}\u300E${r}\u300F\u306E\u4E8C\u91CD\u5B9A\u7FA9\u306F\u3067\u304D\u307E\u305B\u3093\u3002`,e);this.varsSet.names.add(r),i==="\u5B9A\u6570"&&this.varsSet.readonly.add(r);let o=`${this.varname_set(r,n)};
239
- `;return this.convLineno(e,!1)+o}convDefLocalVarlist(e){let n="",r=e.vartype,i=e.value===null?"null":this._convGen(e.value,!0),s=`$nako_i${this.loopId++}`;n+=`let ${s} = ${i}
240
- `,n+=`if (!(${s} instanceof Array)) { ${s}=[${s}] }
241
- `;let u=e.names?e.names:[];for(let c=0;c<u.length;c++){let f=u[c].value;this.varsSet.names.has(f),this.varsSet.names.add(f),r==="\u5B9A\u6570"&&this.varsSet.readonly.add(f),n+=this.varname_set(f,`${s}[${c}]`)+`;
242
- `}return this.convLineno(e,!1)+`/*[convDefLocalVarlist]*/
243
- `+n+`/*[/convDefLocalVarlist]*/
244
- `}convString(e){let n=""+e.value,r=e.mode;if(n=n.replace(/\\/g,"\\\\"),n=n.replace(/"/g,'\\"'),n=n.replace(/\r/g,"\\r"),n=n.replace(/\n/g,"\\n"),r==="ex"){let i=(o,s)=>'"+'+this.genVar(s,e)+'+"';n=n.replace(/\{(.+?)\}/g,i),n=n.replace(/{(.+?)}/g,i)}return'"'+n+'"'}convTryExcept(e){let n=this._convGen(e.block,!1),r=this._convGen(e.errBlock,!1);return this.convLineno(e,!1)+`try {
245
- ${n}
246
- } catch (e) {
247
- __self.__setSysVar("\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8", e.message);
248
- ;
249
- ${r}}
250
- `}getUsedFuncSet(){return this.usedFuncSet}getPluginInitCode(){let e="",n="";for(let r in this.__self.__module){let i=`!${r}:\u521D\u671F\u5316`;this.varslistSet[0].names.has(i)&&(this.usedFuncSet.add(`!${r}:\u521D\u671F\u5316`),n+=`__v0.get('!${r}:\u521D\u671F\u5316')(__self);
251
- `)}return n!==""&&(e+=`__v0.set('__line', 'l0:\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u521D\u671F\u5316');
252
- `+n),e}},Gn=`
253
- // === generated by nadesiko3 v__version__(core:__coreVersion__) ===
254
- // -----------------------------------------------------------------
255
- // <nadesiko3standalone>
256
- // -----------------------------------------------------------------
257
- // --- import
258
- import path from 'path'
259
- import { NakoRuntimeError } from './nako3runtime/nako_errors.mjs'
260
- __codeImportFiles__
261
- // --- init global self
262
- const self = {
263
- newVariables: () => {
264
- const map = new Map()
265
- return map
266
- }
267
- }
268
- self.coreVersion = '__coreVersion__'
269
- self.version = '__version__'
270
- self.logger = {
271
- error: (message) => { console.error(message) },
272
- warn: (message) => { console.warn(message) },
273
- send: (level, message) => { console.log(message) },
274
- runtimeError: (message, lineInfo) => { console.error(message, lineInfo) }
275
- };
276
- self.__varslist = [self.newVariables(), self.newVariables(), self.newVariables()]
277
- self.__v0 = self.__varslist[0]
278
- self.initFuncList = []
279
- self.clearFuncList = []
280
- // --- jsInit ---
281
- __jsInit__
282
- // --- Copy module functions ---
283
- for (const mod of __importNames__) {
284
- for (const funcName in mod) {
285
- // \u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u521D\u671F\u5316\u3068\u30AF\u30EA\u30A2\u95A2\u6570\u3092\u767B\u9332
286
- if (funcName === '\u521D\u671F\u5316') {
287
- __self.initFuncList.push(mod[funcName].fn)
288
- continue
289
- }
290
- if (funcName === '!\u30AF\u30EA\u30A2') {
291
- __self.clearFuncList.push(mod[funcName].fn)
292
- continue
293
- }
294
- // \u95A2\u6570\u3084\u5B9A\u6570\u3092\u767B\u9332
295
- const f = mod[funcName]
296
- if (f.type === 'func') { // \u95A2\u6570
297
- __self.__varslist[0].set(funcName, f.fn)
298
- } else { // \u5B9A\u6570
299
- __self.__varslist[0].set(funcName, f.value)
300
- }
301
- }
302
- }
303
- __self.__vars = __self.__varslist[2];
304
- __self.__module = {};
305
- __self.__locals = __self.newVariables();
306
- __self.__genMode = 'sync';
307
- // \u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u521D\u671F\u5316\u30B3\u30FC\u30C9\u3092\u5B9F\u884C
308
- __self.initFuncList.map(f => f(self))
309
- // standalone
310
- __self.__v0.set('__standalone', true)
311
- // -----------------------------------------------------------------
312
- try {
313
- try {
314
- // -----------------------------------------------------------------
315
- // <prepareMainCode>
316
- __codeStandalone__
317
- // </prepareMainCode>
318
- // -----------------------------------------------------------------
319
- // <mainCode>
320
- // -----------------------------------------------------------------
321
- __codeJS__
322
- // -----------------------------------------------------------------
323
- // </mainCode>
324
- // -----------------------------------------------------------------
325
- } catch (err) {
326
- __self.logger.error(err);
327
- throw err;
328
- }
329
- } finally {
330
- // standaloneCode\u3067\u306F\u3001\u5373\u6642\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u30AF\u30EA\u30A2\u30B3\u30FC\u30C9\u3092\u5B9F\u884C
331
- __self.clearFuncList.map(f => f(__self))
332
- }
333
- // -----------------------------------------------------------------
334
- // </nadesiko3standalone>
335
- // -----------------------------------------------------------------
336
- `;function Et(t,e,n){let r=new tt(t);r.registerFunction(e);let i=Q(Z(r.convGen(e,n),1)),o=r.getDefFuncCode(t,n),s=""+new Date().getTime()+"_"+Math.floor(4294967295*Math.random());if(i&&n.isTest&&(i+=`
337
- __self._runTests(__tests);
338
- `),r.numAsyncFn>0||r.debugOption.useDebug){let l="__eval_nako3async_"+s+"__";i=`
339
- // ------------------------------------------------------------------
340
- // <nadesiko3::gen::async id="${s}" times="${r.numAsyncFn}">
341
- // ------------------------------------------------------------------
342
- async function ${l}(__self) {
343
- // --- code_begin ---
344
- ${i}
345
- // --- code_end ---
346
- // __\u51E6\u7406\u672B\u5C3E__ // \u2190 \u30C6\u30B9\u30C8\u306A\u3069\u3067\u5FC5\u8981\u306A\u306E\u3067\u6D88\u3055\u306A\u3044
347
- } // end of ${l}
348
- // ------------------------------------------------------------------
349
- // call ${l}
350
- (async () => {
351
- if (__self.__v0.get('__standalone')) {
352
- await ${l}(self);
353
- } else {
354
- ${l}.call(self, self)
355
- .then(() => { /* __async_ok__ */ })
356
- .catch(err => {
357
- if (err.message === '__\u7D42\u308F\u308B__') { return }
358
- __self.numFailures++
359
- // send errors to logger
360
- let rterr = __self.logger.runtimeError(err, __self.__v0.get('__line'))
361
- __self.logger.error(rterr)
362
- })
363
- }
364
- })();
365
- // ------------------------------------------------------------------
366
- // </nadesiko3::gen::async id="${s}">
367
- // ------------------------------------------------------------------
368
- `}else{let l="__eval_nako3sync_"+s+"__";i=`
369
- // ------------------------------------------------------------------
370
- // <nadesiko3::gen::syncMode>
371
- // ------------------------------------------------------------------
372
- function ${l}(__self) {
373
- try {
374
- ${i}
375
- // __\u51E6\u7406\u672B\u5C3E__ // \u2190 \u30C6\u30B9\u30C8\u306A\u3069\u3067\u5FC5\u8981\u306A\u306E\u3067\u6D88\u3055\u306A\u3044
376
- } catch (err) {
377
- if (err.message === '__\u7D42\u308F\u308B__') { return }
378
- __self.numFailures++
379
- throw __self.logger.runtimeError(err, __self.__v0.get('__line'))
380
- }
381
- } // end of ${l}
382
- ${l}(__self)
383
- // ------------------------------------------------------------------
384
- // </nadesiko3::gen::syncMode>
385
- // ------------------------------------------------------------------
386
- `}i=Z(i),t.getLogger().trace(`--- generate ---
387
- `+i);let u="",c=[];for(let l of n.importFiles){if(l==="nako_errors.mjs")continue;let p="nako3runtime_"+l.replace(/\.(js|mjs)$/,"").replace(/[^a-zA-Z0-9_]/g,"_");c.push(p),u+=`import ${p} from './nako3runtime/${l}'
388
- `}let a=r.getPluginInitCode();return{runtimeEnv:`
389
- // <runtimeEnvCode>
390
- const self = this
391
- ${n.codeEnv}
392
- ${o}
393
- ${a}
394
- ${i}
395
- // </runtimeEnvCode>
396
- `,standalone:Un(Gn,{codeImportFiles:u,coreVersion:t.coreVersion,version:t.version,importNames:"["+c.join(", ")+"]",codeStandalone:n.codeStandalone,codeJS:i,jsInit:o}),gen:r}}function Un(t,e){for(let n in e){let r=`__${n}__`,i=e[n];t=t.split(r).join(i)}return t}function Z(t,e=0){t=t.replace(/;{2,}/g,";"),t=t.replace(/\n{2,}/g,`
397
- `);let n="";for(let o=0;o<e;o++)n+=" ";let r=[],i=t.split(`
398
- `);for(let o=0;o<i.length;o++){let s=i[o];s=s.replace(/^(\s*);/,"$1"),Q(s)!==""&&r.push(n+s)}return t=r.join(`
399
- `),t}function Q(t){return t=String(t),t.replace(/^\s+|\s+$/g,"")}function Te(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n],i=r.type,o=r.value,s=`[${i}:${o}]`;i===o&&(s=i),i==="comma"&&(s=","),i==="string"&&(s=`"${o}"`),i==="number"&&(s=`(${o})`),i==="word"&&(s=`[word:${o}]`),e[r.line]||(e[r.line]=Hn(r.indent)),e[r.line]+=s+r.josi+"|"}return e.join(`
400
- `)}function Hn(t){let e="";for(let n=0;n<t;n++)e+=" ";return e}var Ce=E();function S(t,e,n=void 0){return n&&(Ce=n),E(t,e,Ce.indent,Ce.line,Ce.file)}var Wn=!1;function At(t){return t.type==="\u9055\u3048\u3070"||t.type==="word"&&t.value==="\u30A8\u30E9\u30FC"&&t.josi==="\u306A\u3089\u3070"}function Nt(t){let e=le(t,"eol"),n=[],r=-1,i=0,o=0,s=c=>{c.forEach(a=>{a.type==="{"&&i++,a.type==="}"&&i--,a.type==="["&&o++,a.type==="]"&&o--})};for(let c=0;c<e.length;c++){let a=e[c];if(Ft(a))continue;let f=Ct(a);if(i>0||o>0){s(a);continue}if(r>=0){let p=f.indent;for(;r>=p;){let h=f;if(At(h)&&r===p||(e[c-1].push(S("\u3053\u3053\u307E\u3067","\u3053\u3053\u307E\u3067",h)),e[c-1].push(S("eol",`
401
- `,h))),n.pop(),n.length>0)r=n[n.length-1];else{r=-1;break}}}if(s(a),i>0||o>0)continue;let l=zn(a);l.type===":"&&(e[c]=e[c].filter(p=>p!==l),r=l.indent,n.push(r))}if(e.length>0&&n.length>0){let c=t[0];for(let a=e.length-1;a>=0;a--){let f=e[a];if(f.length>0){c=f[f.length-1];break}}for(let a=0;a<n.length;a++)e[e.length-1].push(S("\u3053\u3053\u307E\u3067","\u3053\u3053\u307E\u3067",c)),e[e.length-1].push(S("eol",`
402
- `,c))}let u=fe(e);return Wn&&console.log("###",Te(u)),u}function fe(t){let e=[];for(let n of t)for(let r of n)e.push(r);return e}function zn(t){let e=t.length;if(e===0)return E("?");let n=t[e-1];return n.type==="eol"&&e>=2&&(n=t[e-2]),n}function le(t,e){let n=[],r=[],i=0;for(let o of t)r.push(o),o.type==="{"?i++:o.type==="}"?i--:i===0&&o.type===e&&(n.push(r),r=[]);return r.length>0&&n.push(r),n}function Ft(t){if(t.length===0)return!0;for(let e=0;e<t.length;e++){let n=t[e].type;if(!(n==="eol"||n==="line_comment"||n==="range_comment"))return!1}return!0}function Ct(t){for(let e=0;e<t.length;e++){let n=t[e].type;if(!(n==="eol"||n==="line_comment"||n==="range_comment"))return t[e]}return t[0]}var Kn=["!\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587","!\u3053\u3053\u307E\u3067\u3060\u308B\u3044","\u{1F4A1}\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587","\u{1F4A1}\u3053\u3053\u307E\u3067\u3060\u308B\u3044"];function Tt(t){if(!Xn(t))return t;for(let c of t)if(c.type==="\u3053\u3053\u307E\u3067")throw new ue("\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587\u304C\u6709\u52B9\u5316\u3055\u308C\u3066\u3044\u308B\u3068\u304D\u306B\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u4F7F\u3046\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002",c.line,c.file);let e=0,n=0,r=c=>{c.forEach(a=>{a.type==="{"&&e++,a.type==="}"&&e--,a.type==="["&&n++,a.type==="]"&&n--})},i=[],o=le(t,"eol"),s=0;for(let c=0;c<o.length;c++){let a=o[c];if(Ft(a))continue;if(n>0||e>0){r(a);continue}let f=Ct(a),l=f.indent;if(l!==s){if(s>=0)for(;s>l;){let p=i[i.length-1][1];if(!(At(f)&&p===l)){let h=o[c-1][0];o[c-1].push(S("\u3053\u3053\u307E\u3067","\u3053\u3053\u307E\u3067",h)),o[c-1].push(S("eol",`
403
- `,h))}if(i.pop(),i.length>0)s=i[i.length-1][0];else{s=0;break}}if(!(n>0||e>0)&&(r(a),l>s)){i.push([l,s]),s=l;continue}}}for(let c=0;c<i.length;c++){let a=t[0];for(let f=o.length-1;f>=0;f--){let l=o[f];if(l.length>0){a=l[l.length-1];break}}o[o.length-1].push(S("\u3053\u3053\u307E\u3067","\u3053\u3053\u307E\u3067",a)),o[o.length-1].push(S("eol",`
404
- `,a))}return fe(o)}function Xn(t){for(let e=0;e<t.length&&!(e>100);e++){let n=t[e];if(n.type==="line_comment"&&Kn.indexOf(n.value)>=0)return!0}return!1}var Yn=["!DNCL\u30E2\u30FC\u30C9","\u{1F4A1}DNCL\u30E2\u30FC\u30C9"],Zn={"\u2190:\u2190":["eq","="],"\xF7:\xF7":["\xF7\xF7","\xF7\xF7"],"{:{":["[","["],"}:}":["]","]"],"word:\u3092\u5B9F\u884C":["\u3053\u3053\u307E\u3067","\u3053\u3053\u307E\u3067"],"word:\u4E71\u6570":["word","\u4E71\u6570\u7BC4\u56F2"],"word:\u8868\u793A":["word","\u9023\u7D9A\u8868\u793A"]};function Vt(t){if(!Qn(t))return t;let e=le(t,"eol");for(let n=0;n<e.length;n++){let r=e[n];if(r.length<=1)continue;for(let a=0;a<r.length;a++){if(r[a].type==="|"){r[a].type="range_comment";continue}break}let i=r[0];i.type==="word"&&i.value==="\u7E70\u8FD4"&&r.splice(0,r.length,E("word","\u5F8C\u5224\u5B9A",i.indent,i.line,i.file),E("word","\u7E70\u8FD4",i.indent,i.line,i.file));let o=R(r,["word:\u306A\u308B","word:\u7E70\u8FD4"]);o>0&&Dt(r,o);let s=R(r,["word:\u306A\u308B","word:\u5B9F\u884C"]);s>0&&Dt(r,s);let u=R(r,["word:\u306A\u3044"]);for(u>=1&&r[u].josi==="\u306A\u3089\u3070"&&(r[u-1].josi="\u3067\u306A\u3051\u308C\u3070",r.splice(u,1));;){let a=R(r,["word:\u4E8C\u9032","word:\u8868\u793A"]);if(a<0)break;r[a].value="\u4E8C\u9032\u8868\u793A",r[a].josi="",r.splice(a+1,1)}for(;;){let a=R(r,["word:\u6539\u884C","word:\u8868\u793A"]);if(a<0)break;let f=r[a];f.value="\u9023\u7D9A\u7121\u6539\u884C\u8868\u793A",f.josi="",r.splice(a+1,1)}for(;;){let a=R(r,["word:\u3092\u5B9F\u884C","comma:,","word:\u305D\u3046"]);if(a<0)break;let f=r[a+2];if(f.josi==="\u3067\u306A\u3051\u308C\u3070"){f.type="\u9055\u3048\u3070",f.value="\u9055\u3048\u3070",f.josi="",r.splice(a,3,f);continue}else if(f.josi==="\u3067"){let l=r[a+3];if(l.value.substring(0,4)==="\u306A\u304F\u3082\u3057"){if(f.type="\u9055\u3048\u3070",f.value="\u9055\u3048\u3070",f.josi="",r.splice(a,3,f),l.value.length>4){let p=l.value.substring(4),h=E("word",p,l.indent,l.line,l.file);p.match(/^\d/)&&(h.type="number"),r.splice(a+2,0,h),l.value=l.value.substring(0,4)}l.type="\u3082\u3057",l.value="\u3082\u3057",l.josi="";continue}}break}for(;;){let a=R(r,["word:\u5897","word:\u3089"]);if(a<0)break;let f=r[a];f.type="word",f.value="\u5897\u7E70\u8FD4",f.josi="",r.splice(a,2,f)}for(;;){let a=R(r,["word:\u6E1B","word:\u3089"]);if(a<0)break;let f=r[a];f.type="word",f.value="\u6E1B\u7E70\u8FD4",f.josi="",r.splice(a,2,f)}for(;;){let a=R(r,["word:\u3092\u7E70\u308A\u8FD4"]);if(a<0)break;let f=r[a];f.type="\u3053\u3053\u307E\u3067",f.value="\u3053\u3053\u307E\u3067",f.josi=""}for(;;){let a=R(r,["word:\u3059\u3079\u3066","word:\u8981\u7D20"]);if(a>=1)Lt(r,a);else break}for(;;){let a=R(r,["word:\u3059\u3079\u3066","word:\u5024"]);if(a>=1)Lt(r,a);else break}let c=0;for(;c<r.length;){let a=r[c];if(a.type==="word"&&a.value.length>=2){let f=a.value.charAt(a.value.length-1);(f==="\u6E1B"||f==="\u5897")&&(a.value=a.value.substring(0,a.value.length-1),a.josi="\u3060\u3051",r.splice(c+1,0,E("word",f,a.indent,a.line,a.file))),c++;continue}c++}}for(let n=0;n<t.length;n++){let r=t[n],i=Zn[r.type+":"+r.value];i!==void 0&&(r.type=i[0],r.value=i[1])}return t=fe(e),t}function Lt(t,e){let n=t[e];t[e-1].josi="";let r=E("eq","=",n.indent,n.line,n.file),i=E("[","[",n.indent,n.line,n.file),o=E("]","]",n.indent,n.line,n.file);o.josi="\u306B";let s=t[e+2];s.josi="";let u=E("number",100,n.indent,n.line,n.file);u.josi="\u3092";let c=E("word","\u639B",n.indent,n.line,n.file);t.splice(e,4,r,i,s,o,u,c)}function Dt(t,e){let n=R(t,["word:\u3092"]);n>=0&&(t[n].type="\u3053\u3053\u307E\u3067",t[n].value="\u3053\u3053\u307E\u3067");let r=R(t,["word:\u304C"]);r>=0&&(t[r].type="\u3053\u3053\u307E\u3067",t[r].value="\u3053\u3053\u307E\u3067"),t[e+1].value="\u9593"}function R(t,e){let n=e.map(r=>r.split(":"));for(let r=0;r<t.length;r++){let i=!0;for(let o=0;o<n.length;o++){let s=n[o],u=r+o;if(u>=t.length)return-1;if(!(t[u].type===s[0]&&t[u].value===s[1])){i=!1;break}}if(i)return r}return-1}function Qn(t){for(let e=0;e<t.length&&!(e>100);e++){let n=t[e];if(n.type==="line_comment"&&Yn.indexOf(n.value)>=0)return n.type="DNCL\u30E2\u30FC\u30C9",!0}return!1}var er=!1,nt=30,tr=["!DNCL2\u30E2\u30FC\u30C9","\u{1F4A1}DNCL2\u30E2\u30FC\u30C9","!DNCL2","\u{1F4A1}DNCL2"],nr={"\u2190:\u2190":["eq","="],"\xF7:\xF7":["\xF7\xF7","\xF7\xF7"],"{:{":["[","["],"}:}":["]","]"],"word:not":["not","!"],"word:\u4E71\u6570":["word","\u4E71\u6570\u7BC4\u56F2"],"word:\u8868\u793A":["word","\u9023\u7D9A\u8868\u793A"],"word:\u3068\u5B9A\u7FA9":["\u3053\u3053\u307E\u3067","\u3053\u3053\u307E\u3067"]};function It(t){if(!rr(t))return t;let e=le(t,"eol");for(let n=0;n<e.length;n++){let r=e[n];if(r.length<=1)continue;let i=U(r,["word:\u306A\u3044"]);i>=1&&r[i].josi==="\u306A\u3089\u3070"&&(r[i-1].josi="\u3067\u306A\u3051\u308C\u3070",r.splice(i,1));for(let s=0;s<r.length;s++){let u=r[s];(u.value==="\u305D\u3046"||u.value==="\u305D\u308C")&&(u.josi==="\u3067\u306A\u3051\u308C\u3070"||u.josi==="\u3067\u306A\u304F")&&(u.type="\u9055\u3048\u3070",u.value="\u9055\u3048\u3070",u.josi="")}for(;;){let s=U(r,["word:\u3092\u5B9F\u884C","comma:,","word:\u305D\u3046"]);if(s<0)break;let u=r[s+2];if(u.josi==="\u3067\u306A\u3051\u308C\u3070"){u.type="\u9055\u3048\u3070",u.value="\u9055\u3048\u3070",u.josi="",r.splice(s,3,u);continue}else if(u.josi==="\u3067"){let c=r[s+3];if(c.value.substring(0,4)==="\u306A\u304F\u3082\u3057"){if(u.type="\u9055\u3048\u3070",u.value="\u9055\u3048\u3070",u.josi="",r.splice(s,3,u),c.value.length>4){let a=c.value.substring(4),f=E("word",a,c.indent,c.line,c.file);a.match(/^\d/)&&(f.type="number"),r.splice(s+2,0,f),c.value=c.value.substring(0,4)}c.type="\u3082\u3057",c.value="\u3082\u3057",c.josi="";continue}}break}for(;;){let s=U(r,["word:\u305D\u3046","word:\u306A\u304F"]);if(s<0)break;let u=r[s];if(u.josi==="\u3067"){u.type="\u9055\u3048\u3070",u.value="\u9055\u3048\u3070",u.josi="",r.splice(s+1,1);continue}break}for(;;){let s=U(r,["word:\u305D\u3046","word:\u306A\u304F\u3082\u3057"]);if(s<0)break;let u=r[s],c=r[s+1];u.type="\u9055\u3048\u3070",u.value="\u9055\u3048\u3070",u.josi="",c.type="\u3082\u3057",c.value="\u3082\u3057",c.josi=""}for(;;){let s=U(r,["word:\u5897","word:\u3089"]);if(s<0)break;let u=r[s];u.type="word",u.value="\u5897\u7E70\u8FD4",u.josi="",r.splice(s,2,u)}for(;;){let s=U(r,["word:\u6E1B","word:\u3089"]);if(s<0)break;let u=r[s];u.type="word",u.value="\u6E1B\u7E70\u8FD4",u.josi="",r.splice(s,2,u)}for(;;){let s=U(r,["word:\u5897","word:\u3089\u7E70\u308A\u8FD4"]);if(s<0)break;let u=r[s];u.type="word",u.value="\u5897\u7E70\u8FD4",u.josi="",r.splice(s,2,u)}for(;;){let s=U(r,["word:\u6E1B","word:\u3089\u7E70\u308A\u8FD4"]);if(s<0)break;let u=r[s];u.type="word",u.value="\u6E1B\u7E70\u8FD4",u.josi="",r.splice(s,2,u)}for(let s=0;s<r.length;s++){if(rt([["word:\u914D\u5217","word:\u914D\u5217\u5909\u6570"],"word","word:\u3059\u3079\u3066",["word:\u8981\u7D20","word:\u5024"],"*","word:\u4EE3\u5165"],r,s)){let u=r[s+1];u.josi="";let c=r[s+4];c.josi="",r.splice(s,6,u,S("eq","=",u),S("word","\u639B"),S("(","("),S("[","["),c,S("]","]"),S("comma",","),S("number",nt),S(")",")")),s+=6}if(rt(["word","word:\u3059\u3079\u3066",["word:\u8981\u7D20","word:\u5024"],["number","string","word"],"word:\u3059\u308B"],r,s)){let u=r[s];u.josi="";let c=r[s+3];c.josi="",r.splice(s,5,u,S("eq","=",u),S("word","\u639B"),S("(","("),S("[","["),c,S("]","]"),S("comma",","),S("number",nt),S(")",")"))}if(rt([["word:\u914D\u5217\u5909\u6570","word:\u914D\u5217"],"word","word:\u521D\u671F\u5316"],r,s)){let u=r[s+1];u.josi="",r.splice(s,3,u,S("eq","=",u),S("word","\u639B"),S("(","("),S("[","["),S("number",0),S("]","]"),S("comma",","),S("number",nt),S(")",")"))}}for(;;){let s=U(r,["word:\u4E8C\u9032","word:\u8868\u793A"]);if(s<0)break;r[s].value="\u4E8C\u9032\u8868\u793A",r[s].josi="",r.splice(s+1,1)}for(;;){let s=U(r,["word:\u6539\u884C","word:\u8868\u793A"]);if(s<0)break;let u=r[s];u.value="\u9023\u7D9A\u7121\u6539\u884C\u8868\u793A",u.josi="",r.splice(s+1,1)}let o=0;for(;o<r.length;){let s=r[o];if(s.type==="word"&&s.value.length>=2){let u=s.value.charAt(s.value.length-1);(u==="\u6E1B"||u==="\u5897")&&(s.value=s.value.substring(0,s.value.length-1),s.josi="\u3060\u3051",r.splice(o+1,0,E("word",u,s.indent,s.line,s.file))),o++;continue}o++}}for(let n=0;n<t.length;n++){let r=t[n],i=nr[r.type+":"+r.value];i!==void 0&&(r.type=i[0],r.value=i[1])}return t=fe(e),er&&(console.log("// DEBUG---DNCL:tokens---BEGIN"),console.log(Te(t)),console.log("// DEBUG---DNCL:tokens---END")),t}function rt(t,e,n){let r=(i,o)=>{if(i instanceof Array){for(let u=0;u<i.length;u++)if(r(i[u],o))return!0;return!1}if(i==="*")return!0;if(i.indexOf(":")<0)return i===o.type;let s=`${o.type}:${o.value}`;return i===s};for(let i=0;i<t.length;i++){let o=i+n;if(o>=e.length)return!1;let s=t[i],u=e[o];if(!r(s,u))return!1}return!0}function U(t,e){let n=e.map(r=>r.split(":"));for(let r=0;r<t.length;r++){let i=!0;for(let o=0;o<n.length;o++){let s=n[o],u=r+o;if(u>=t.length)return-1;if(!(t[u].type===s[0]&&t[u].value===s[1])){i=!1;break}}if(i)return r}return-1}function rr(t){for(let e=0;e<t.length&&!(e>100);e++){let n=t[e];if(n.type==="line_comment"&&tr.indexOf(n.value)>=0)return n.type="DNCL2\u30E2\u30FC\u30C9",!0}return!1}var Le=class{constructor(e,n){this.sourceCodeLength=e,this.preprocessed=n;let r=0;this.cumulativeSum=[];for(let i of n)this.cumulativeSum.push(r),r+=i.text.length;this.lastIndex=0,this.lastPreprocessedCodePosition=0}map(e){let n=this.findIndex(e);return Math.min(this.preprocessed[n].sourcePosition+(e-this.cumulativeSum[n]),n===this.preprocessed.length-1?this.sourceCodeLength:this.preprocessed[n+1].sourcePosition-1)}findIndex(e){e<this.lastPreprocessedCodePosition&&(this.lastIndex=0),this.lastPreprocessedCodePosition=e;for(let n=this.lastIndex;n<this.preprocessed.length-1;n++)if(e<this.cumulativeSum[n+1])return this.lastIndex=n,n;return this.lastIndex=this.preprocessed.length-1,this.preprocessed.length-1}},De=class{constructor(e,n,r){this.lines=[],this.linesInsertedByIndentationSyntax=n,this.linesDeletedByIndentationSyntax=r;let i=0;for(let o of e.split(`
405
- `))this.lines.push({offset:i,len:o.length}),i+=o.length+1;this.lastLineNumber=0,this.lastOffset=0}map(e,n){if(e===null)return{startOffset:e,endOffset:n};let r=this.getLineNumber(e);for(let i of this.linesInsertedByIndentationSyntax){if(r===i){e=null,n=null;break}r>i&&(e-=this.lines[i].len+1,n!==null&&(n-=this.lines[i].len+1))}for(let i of this.linesDeletedByIndentationSyntax)r>=i.lineNumber&&(e!==null&&(e+=i.len+1),n!==null&&(n+=i.len+1));return{startOffset:e,endOffset:n}}getLineNumber(e){e<this.lastOffset&&(this.lastLineNumber=0),this.lastOffset=e;for(let n=this.lastLineNumber;n<this.lines.length-1;n++)if(e<this.lines[n+1].offset)return this.lastLineNumber=n,n;return this.lastLineNumber=this.lines.length-1,this.lines.length-1}},pe=class{constructor(e){this.lineOffsets=[];let n=0;for(let r of e.split(`
406
- `))this.lineOffsets.push(n),n+=r.length+1;this.lastLineNumber=0,this.lastOffset=0}map(e,n){e<this.lastOffset&&(this.lastLineNumber=0),this.lastOffset=e;for(let r=this.lastLineNumber;r<this.lineOffsets.length-1;r++)if(e<this.lineOffsets[r+1])return this.lastLineNumber=r,{line:r+(n?1:0),column:e-this.lineOffsets[r]};return this.lastLineNumber=this.lineOffsets.length-1,{line:this.lineOffsets.length-1+(n?1:0),column:e-this.lineOffsets[this.lineOffsets.length-1]}}};function it(t,e){if(typeof t.startOffset=="number"&&(t.startOffset-=e.length),typeof t.endOffset=="number"&&(t.endOffset-=e.length),e!==""){let n=e.split(`
407
- `);typeof t.line=="number"&&(t.line-=n.length-1),t.line===0&&typeof t.column=="number"&&(t.column-=n[n.length-1].length)}return t}var ir={reset:"\x1B[0m",bold:"\x1B[1m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m"},ot=["black","red","green","yellow","blue","magenta","cyan","white"],or=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),sr=t=>{let e=t.replace(/\x1b\[\d+m/g,""),n=[],r="inherit",i="inherit",o=t===e?e:t.replace(/\x1b\[(\d+)m/g,(a,f)=>{let l=+f;return l===0&&(r="inherit",i="inherit"),l===1&&(i="bold"),l>=30&&l<=37&&(r=ot[l-30]),n.push(`color: ${r}; font-weight: ${i};`),"%c"}),s="inherit",u="inherit",c=t===e?e:"<span>"+or(t).replace(/\x1b\[(\d+)m/g,(a,f)=>{let l=+f;return l===0&&(s="inherit",u="inherit"),l===1&&(u="bold"),l>=30&&l<=37&&(s=ot[l-30]),`</span><span style="color: ${s}; font-weight: ${u};">`})+"</span>";return{noColor:e,nodeConsole:t===e?e:t+"\x1B[0m",html:c,browserConsole:[o,...n]}},M={convertColorTextFormat:sr,colorNames:ot,color:ir};var F=class t{static fromS(e){let n=t.trace;switch(e){case"all":n=t.all;break;case"trace":n=t.trace;break;case"debug":n=t.debug;break;case"info":n=t.info;break;case"warn":n=t.warn;break;case"error":n=t.error;break;case"stdout":n=t.stdout;break;default:throw new Error("[NakoLogger] unknown logger level:"+e)}return n}static toString(e){return["all","trace","debug","info","warn","error","stdout"][e]}};F.all=0;F.trace=1;F.debug=2;F.info=3;F.warn=4;F.error=5;F.stdout=6;function ge(t){return t?`${t.file||""}${t.line===void 0?"":`(${t.line+1}\u884C\u76EE): `}`:""}var me=class{constructor(){this.listeners=[],this.logs="",this.position=""}getErrorLogs(){return[this.logs.replace(/\s+$/,""),this.position]}clear(){this.logs="",this.position=""}addListener(e,n){let r=F.fromS(e);this.listeners.push({level:r,callback:n})}removeListener(e){this.listeners=this.listeners.filter(n=>n.callback!==e)}trace(e,n=null){this.sendI(F.trace,`${M.color.bold}[\u30C7\u30D0\u30C3\u30B0\u60C5\u5831\uFF08\u8A73\u7D30\uFF09]${M.color.reset}${ge(n)}${e}`,n)}debug(e,n=null){this.sendI(F.debug,`${M.color.bold}[\u30C7\u30D0\u30C3\u30B0\u60C5\u5831]${M.color.reset}${ge(n)}${e}`,n)}info(e,n=null){this.sendI(F.info,`${M.color.bold}${M.color.blue}[\u60C5\u5831]${M.color.reset}${ge(n)}${e}`,n)}warn(e,n=null){this.sendI(F.warn,`${M.color.bold}${M.color.green}[\u8B66\u544A]${M.color.reset}${ge(n)}${e}`,n)}error(e,n=null){if(e instanceof Error&&typeof e.type=="string")switch(e.type){case"NakoRuntimeError":case"NakoError":if(e instanceof I){let i=e,o=n;o==null&&(o={file:i.file,line:i.line||0,startOffset:0,endOffset:0}),this.sendI(F.error,i.message,o);return}}e instanceof Error&&(e=e.message),this.sendI(F.error,`${M.color.bold}${M.color.red}[\u30A8\u30E9\u30FC]${M.color.reset}${ge(n)}${e}`,n)}runtimeError(e,n){return new re(e,n)}stdout(e,n=null){this.sendI(F.stdout,`${e}`,n)}send(e,n,r,i=null,o=null){let s=F.fromS(e);this.sendI(s,n,r,i,o)}sendI(e,n,r,i=null,o=null){let s=()=>{let u=M.convertColorTextFormat(n),c="";return n.includes(`
408
- `)&&(c+="border-top: 1px solid #8080806b; border-bottom: 1px solid #8080806b;"),{noColor:u.noColor,nodeConsole:u.nodeConsole,browserConsole:o||u.browserConsole,html:`<div style="${c}">`+(i||u.html)+"</div>",level:F.toString(e),position:r}};if(e===F.error){let u=s();this.logs+=u.noColor+`
409
- `,r&&this.position!==null&&(this.position=`l${r.line}:${r.file}`)}for(let u of this.listeners)if(u.level<=e){let c=s();u.callback(c)}}};var Ve=class{constructor(e,n,r=0){this.guid=r,this.lastJSCode="",this.__locals=new Map,this.__varslist=[e.newVaiables(e.__varslist[0]),e.newVaiables(e.__varslist[1]),e.newVaiables(e.__varslist[2])],this.numFailures=0,this.index=0,this.nextIndex=-1,this.__code=[],this.__callstack=[],this.__stack=[],this.__labels=[],this.__genMode=n.genMode,this.version=e.version,this.coreVersion=e.coreVersion,this.__module={...e.__module},this.pluginfiles={...e.getPluginfiles()},this.gen=n,this.logger=e.getLogger(),this.compiler=e,this.josiList=e.josiList,this.reservedWords=e.reservedWords}clearLog(){this.__varslist[0].set("\u8868\u793A\u30ED\u30B0","")}get log(){let e=this.__varslist[0].get("\u8868\u793A\u30ED\u30B0");return e=e.replace(/\s+$/,""),e}__setSysVar(e,n){this.__varslist[0].set(e,n)}__getSysVar(e){return this.__varslist[0].get(e)}runEx(e,n,r,i=""){return r.preCode=i,r.nakoGlobal=this,this.compiler.runSync(e,n,r)}async runAsync(e,n,r,i=""){return r.preCode=i,r.nakoGlobal=this,await this.compiler.runAsync(e,n,r)}_runTests(e){let n=`${M.color.bold}\u30C6\u30B9\u30C8\u306E\u5B9F\u884C\u7D50\u679C${M.color.reset}
410
- `,r=0,i=0;for(let o of e)try{o.f(),n+=`${M.color.green}\u2714${M.color.reset} ${o.name}
411
- `,r++}catch(s){n+=`${M.color.red}\u2613${M.color.reset} ${o.name}: ${s.message}
412
- `,i++}i>0?n+=`${M.color.green}\u6210\u529F ${r}\u4EF6 ${M.color.red}\u5931\u6557 ${i}\u4EF6`:n+=`${M.color.green}\u6210\u529F ${r}\u4EF6`,this.numFailures=i,this.logger.stdout(n)}clearPlugins(){let e="!\u30AF\u30EA\u30A2";for(let n in this.pluginfiles){let r=this.__module[n];r[e]&&r[e].fn&&r[e].fn(this)}}reset(){this.clearPlugins()}destroy(){this.reset()}};var ur={version:"3.6.14",major:3,minor:6,patch:14},st=ur;var Pt={meta:{type:"const",value:{pluginName:"plugin_system",description:"\u30B7\u30B9\u30C6\u30E0\u95A2\u9023\u306E\u547D\u4EE4\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako","phpnako"],nakoVersion:"3.6.0"}},\u521D\u671F\u5316:{type:"func",josi:[],pure:!1,fn:function(sys){let system=sys;sys.isDebug=!1,sys.__setSysVar=(t,e)=>system.__v0.set(t,e),sys.__getSysVar=(t,e=void 0)=>{let n=system.__v0.get(t);return n===void 0?e:n},sys.__setSore=t=>(sys.__vars.set("\u305D\u308C",t),t),sys.__getSore=()=>sys.__vars.get("\u305D\u308C"),sys.tags={},sys.__setSysVar("\u30CA\u30C7\u30B7\u30B3\u30D0\u30FC\u30B8\u30E7\u30F3",sys.version),sys.__setSysVar("\u30CA\u30C7\u30B7\u30B3\u8A00\u8A9E\u30D0\u30FC\u30B8\u30E7\u30F3",sys.coreVersion),system.__namespaceList||(system.__namespaceList=[]),sys.__findVar=function(t,e){if(typeof t=="function")return t;let n=system.__locals.get(t);if(n)return n;if(t.indexOf("__")>=0){for(let i=2;i>=0;i--){let s=system.__varslist[i].get(t);if(s)return s}return e}let r=system.__modList?system.__modList:[system.__modName];for(let i of r){let o=i+"__"+t;for(let s=2;s>=0;s--){let c=system.__varslist[s].get(o);if(c)return c}}return e},sys.__findFunc=function(t,e){let n=sys.__findVar(t);if(typeof n=="function")return n;throw new Error(`\u300E${e}\u300F\u306B\u5B9F\u884C\u3067\u304D\u306A\u3044\u95A2\u6570\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002`)},sys.__exec=function(t,e){let n=sys.__getSysVar(t);if(n)return n.apply(this,e);let r=sys.__findVar(t);if(!r)throw new Error("\u30B7\u30B9\u30C6\u30E0\u95A2\u6570\u3067\u30A8\u30A4\u30EA\u30A2\u30B9\u306E\u6307\u5B9A\u30DF\u30B9:"+t);return r.apply(this,e)},sys.__timeout=[],sys.__interval=[];let z2=sys.__zero2=t=>(t="00"+t,t.substring(t.length-2));sys.__zero=(t,e)=>{let n="";for(let r=0;r<e;r++)n+="0";return t=n+t,t.substring(t.length-e)},sys.__formatDate=t=>t.getFullYear()+"/"+z2(t.getMonth()+1)+"/"+z2(t.getDate()),sys.__formatTime=t=>z2(t.getHours())+":"+z2(t.getSeconds())+":"+z2(t.getMinutes()),sys.__formatDateTime=(t,e)=>{let n=t.getFullYear()+"/"+z2(t.getMonth()+1)+"/"+z2(t.getDate()),r=z2(t.getHours())+":"+z2(t.getMinutes())+":"+z2(t.getSeconds());return e.match(/^\d+\/\d+\/\d+\s+\d+:\d+:\d+$/)?n+" "+r:e.match(/^\d+\/\d+\/\d+$/)?n:e.match(/^\d+:\d+:\d+$/)?r:n+" "+r},sys.__str2date=t=>{if(t=(""+t).replace(/(^\s+|\s+$)/,""),t.match(/^(\d+|\d+\.\d+)$/))return new Date(parseFloat(t)*1e3);if(t.match(/^\d+:\d+(:\d+)?$/)){let n=new Date,r=(t+":0").split(":");return new Date(n.getFullYear(),n.getMonth(),n.getDate(),parseInt(r[0]),parseInt(r[1]),parseInt(r[2]))}t=t.replace(/[\s:\-T]/g,"/"),t+="/0/0/0";let e=t.split("/");return new Date(parseInt(e[0]),parseInt(e[1])-1,parseInt(e[2]),parseInt(e[3]),parseInt(e[4]),parseInt(e[5]))},sys.__printPool="",sys.__parseFloatOrBigint=t=>typeof t=="bigint"?t:parseFloat(t),system.chk=(t,e)=>{if(typeof t>"u"){let n=system.constPools[e],[r,i,o,s]=n,u=system.constPoolsTemplate[r];for(let a in i){let f=system.constPoolsTemplate[i[a]];u=u.split(`$${a}`).join(f)}let c=system.constPoolsTemplate[o];sys.logger.warn(u,{file:c,line:s})}return t},sys.__evalJS=src=>{try{return eval(src)}catch(t){return console.error("[eval]",t),null}}}},"!\u30AF\u30EA\u30A2":{type:"func",josi:[],pure:!1,fn:function(t){t.__exec&&t.__exec("\u5168\u30BF\u30A4\u30DE\u30FC\u505C\u6B62",[t]),t.__setSysVar("\u8868\u793A\u30ED\u30B0","")}},\u30CA\u30C7\u30B7\u30B3\u30D0\u30FC\u30B8\u30E7\u30F3:{type:"const",value:"?"},\u30CA\u30C7\u30B7\u30B3\u8A00\u8A9E\u30D0\u30FC\u30B8\u30E7\u30F3:{type:"const",value:"?"},\u30CA\u30C7\u30B7\u30B3\u30A8\u30F3\u30B8\u30F3:{type:"const",value:"nadesi.com/v3"},\u30CA\u30C7\u30B7\u30B3\u7A2E\u985E:{type:"const",value:"?"},\u306F\u3044:{type:"const",value:1},\u3044\u3044\u3048:{type:"const",value:0},\u771F:{type:"const",value:1},\u507D:{type:"const",value:0},\u6C38\u9060:{type:"const",value:1},\u30AA\u30F3:{type:"const",value:1},\u30AA\u30D5:{type:"const",value:0},\u6539\u884C:{type:"const",value:`
413
- `},\u30BF\u30D6:{type:"const",value:" "},\u30AB\u30C3\u30B3:{type:"const",value:"\u300C"},\u30AB\u30C3\u30B3\u9589:{type:"const",value:"\u300D"},\u6CE2\u30AB\u30C3\u30B3:{type:"const",value:"{"},\u6CE2\u30AB\u30C3\u30B3\u9589:{type:"const",value:"}"},OK:{type:"const",value:!0},NG:{type:"const",value:!1},\u30AD\u30E3\u30F3\u30BB\u30EB:{type:"const",value:0},TRUE:{type:"const",value:!0},FALSE:{type:"const",value:!1},true:{type:"const",value:!0},false:{type:"const",value:!1},PI:{type:"const",value:Math.PI},\u7A7A:{type:"const",value:""},NULL:{type:"const",value:null},undefined:{type:"const",value:void 0},\u672A\u5B9A\u7FA9:{type:"const",value:void 0},\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8:{type:"const",value:""},\u5BFE\u8C61:{type:"const",value:""},\u5BFE\u8C61\u30AD\u30FC:{type:"const",value:""},\u56DE\u6570:{type:"const",value:""},CR:{type:"const",value:"\r"},LF:{type:"const",value:`
414
- `},\u975E\u6570:{type:"const",value:NaN},\u7121\u9650\u5927:{type:"const",value:1/0},\u623B\u5024\u7121:{type:"const",value:0},\u623B\u5024\u6709:{type:"const",value:1},\u7A7A\u914D\u5217:{type:"func",josi:[],pure:!0,fn:function(){return[]}},\u7A7A\u8F9E\u66F8:{type:"func",josi:[],pure:!0,fn:function(){return{}}},\u7A7A\u30CF\u30C3\u30B7\u30E5:{type:"func",josi:[],pure:!0,fn:function(){return{}}},\u7A7A\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8:{type:"func",josi:[],pure:!1,fn:function(t){return t.__exec("\u7A7A\u30CF\u30C3\u30B7\u30E5",[t])}},\u8868\u793A:{type:"func",josi:[["\u3092","\u3068"]],pure:!0,fn:function(t,e){t=e.__printPool+t,e.__printPool="",e.__setSysVar("\u8868\u793A\u30ED\u30B0",e.__getSysVar("\u8868\u793A\u30ED\u30B0")+t+`
415
- `),e.logger.send("stdout",t+"")},return_none:!0},\u7D99\u7D9A\u8868\u793A:{type:"func",josi:[["\u3092","\u3068"]],pure:!0,fn:function(t,e){e.__printPool+=t},return_none:!0},\u9023\u7D9A\u8868\u793A:{type:"func",josi:[["\u3068","\u3092"]],isVariableJosi:!0,pure:!0,fn:function(...t){let e=t.pop(),n=t.join("");e.__exec("\u8868\u793A",[n,e])},return_none:!0},\u9023\u7D9A\u7121\u6539\u884C\u8868\u793A:{type:"func",josi:[["\u3068","\u3092"]],isVariableJosi:!0,pure:!0,fn:function(...t){let e=t.pop(),n=t.join("");e.__exec("\u7D99\u7D9A\u8868\u793A",[n,e])},return_none:!0},\u8868\u793A\u30ED\u30B0:{type:"const",value:""},\u8868\u793A\u30ED\u30B0\u30AF\u30EA\u30A2:{type:"func",josi:[],pure:!0,fn:function(t){t.__setSysVar("\u8868\u793A\u30ED\u30B0","")},return_none:!0},\u8A00:{type:"func",josi:[["\u3092","\u3068"]],pure:!0,fn:function(t,e){e.logger.send("stdout",t+"")},return_none:!0},\u30B3\u30F3\u30BD\u30FC\u30EB\u8868\u793A:{type:"func",josi:[["\u3092","\u3068"]],pure:!0,fn:function(t){console.log(t)},return_none:!0},\u8DB3:{type:"func",josi:[["\u306B","\u3068"],["\u3092"]],isVariableJosi:!1,pure:!0,fn:function(t,e){return t+e}},\u5F15:{type:"func",josi:[["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e){return t-e}},\u639B:{type:"func",josi:[["\u306B","\u3068"],["\u3092"]],pure:!0,fn:function(t,e){if(typeof t=="number")return t*e;if(typeof t=="string"){let n="";for(let r=0;r<parseInt(e);r++)n+=t;return n}if(t instanceof Array){let n=[];for(let r=0;r<parseInt(e);r++)n.push(...t);return n}return t*e}},\u500D:{type:"func",josi:[["\u306E","\u3092"],[""]],pure:!0,fn:function(t,e){return t*e}},\u5272:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return t/e}},\u5272\u4F59:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return t%e}},\u5076\u6570:{type:"func",josi:[["\u304C"]],pure:!0,fn:function(t){return parseInt(t)%2===0}},\u5947\u6570:{type:"func",josi:[["\u304C"]],pure:!0,fn:function(t){return parseInt(t)%2===1}},\u4E8C\u4E57:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return t*t}},\u3079\u304D\u4E57:{type:"func",josi:[["\u306E"],["\u306E"]],pure:!0,fn:function(t,e){return Math.pow(t,e)}},\u4EE5\u4E0A:{type:"func",josi:[["\u304C"],[""]],pure:!0,fn:function(t,e){return t>=e}},\u4EE5\u4E0B:{type:"func",josi:[["\u304C"],[""]],pure:!0,fn:function(t,e){return t<=e}},\u672A\u6E80:{type:"func",josi:[["\u304C"],[""]],pure:!0,fn:function(t,e){return t<e}},\u8D85:{type:"func",josi:[["\u304C"],[""]],pure:!0,fn:function(t,e){return t>e}},\u7B49:{type:"func",josi:[["\u304C"],["\u3068"]],pure:!0,fn:function(t,e){return t===e}},\u7B49\u7121:{type:"func",josi:[["\u304C"],["\u3068"]],pure:!0,fn:function(t,e){return t!==e}},\u4E00\u81F4:{type:"func",josi:[["\u304C"],["\u3068"]],pure:!0,fn:function(t,e){if(typeof t=="object"){let n=JSON.stringify(t),r=JSON.stringify(e);return n===r}return t===e}},\u4E0D\u4E00\u81F4:{type:"func",josi:[["\u304C"],["\u3068"]],pure:!0,fn:function(t,e){if(typeof t=="object"){let n=JSON.stringify(t),r=JSON.stringify(e);return n!==r}return t!==e}},\u7BC4\u56F2\u5185:{type:"func",josi:[["\u304C"],["\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){return e<=t&&t<=n}},\u7BC4\u56F2:{type:"func",josi:[["\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e){return{\u5148\u982D:t,\u672B\u5C3E:e}}},\u9023\u7D9A\u52A0\u7B97:{type:"func",josi:[["\u3092"],["\u306B","\u3068"]],isVariableJosi:!0,pure:!0,fn:function(t,...e){return e.pop(),e.push(t),e.reduce((n,r)=>n+r)}},\u304F\u3060\u3055\u3044:{type:"func",josi:[],pure:!0,fn:function(t){t.__reisetu||(t.__reisetu=0),t.__reisetu++},return_none:!0},\u304A\u9858:{type:"func",josi:[],pure:!0,fn:function(t){t.__reisetu||(t.__reisetu=0),t.__reisetu++},return_none:!0},\u3067\u3059:{type:"func",josi:[],pure:!0,fn:function(t){t.__reisetu||(t.__reisetu=0),t.__reisetu++},return_none:!0},\u62DD\u5553:{type:"func",josi:[],pure:!0,fn:function(t){t.__reisetu=0},return_none:!0},\u656C\u5177:{type:"func",josi:[],pure:!0,fn:function(t){t.__reisetu+=100},return_none:!0},\u793C\u7BC0\u30EC\u30D9\u30EB\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(t){return t.__reisetu||(t.__reisetu=0),t.__reisetu}},JS\u5B9F\u884C:{type:"func",josi:[["\u3092","\u3067"]],pure:!0,fn:function(t,e){return e.__evalJS(t)}},JS\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u53D6\u5F97:{type:"func",josi:[["\u306E"]],pure:!1,fn:function(t,e){return e.__findVar(t,null)}},JS\u95A2\u6570\u5B9F\u884C:{type:"func",josi:[["\u3092"],["\u3067"]],fn:function(t,e,n){if(typeof t=="string"&&(t=n.__evalJS(t)),typeof t!="function")throw new Error("JS\u95A2\u6570\u53D6\u5F97\u3067\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3002");return e instanceof Array||(e=[e]),t.apply(null,e)}},ASYNC:{type:"func",josi:[],asyncFn:!0,pure:!0,fn:async function(){},return_none:!0},AWAIT\u5B9F\u884C:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,asyncFn:!0,fn:async function(t,e,n){if(typeof t=="string"&&(t=n.__findFunc(t,"AWAIT\u5B9F\u884C")),!(t instanceof Function))throw new Error("\u300EAWAIT\u5B9F\u884C\u300F\u306E\u7B2C\u4E00\u5F15\u6570\u306F\u306A\u3067\u3057\u3053\u95A2\u6570\u540D\u304BFunction\u578B\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002");return await t(...e)}},JS\u30E1\u30BD\u30C3\u30C9\u5B9F\u884C:{type:"func",josi:[["\u306E"],["\u3092"],["\u3067"]],fn:function(t,e,n,r){if(typeof t=="string"&&(t=r.__evalJS(t)),typeof t!="object")throw new Error("JS\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002");return typeof e!="function"&&(e=t[e]),n instanceof Array||(n=[n]),e.apply(t,n)}},\u30CA\u30C7\u30B7\u30B3:{type:"func",josi:[["\u3092","\u3067"]],pure:!1,fn:function(t,e){e.__setSysVar("\u8868\u793A\u30ED\u30B0",""),e.__self.runEx(t,e.__modName,{resetEnv:!1,resetLog:!0});let n=e.__getSysVar("\u8868\u793A\u30ED\u30B0")+"";return n&&e.logger.trace(n),n}},\u30CA\u30C7\u30B7\u30B3\u7D9A:{type:"func",josi:[["\u3092","\u3067"]],fn:function(t,e){e.__self.runEx(t,e.__modName,{resetEnv:!1,resetAll:!1});let n=e.__getSysVar("\u8868\u793A\u30ED\u30B0")+"";return n&&e.logger.trace(n),n}},\u5B9F\u884C:{type:"func",josi:[["\u3092","\u306B","\u3067"]],pure:!1,fn:function(t,e){if(typeof t=="function")return t(e);if(typeof t=="string"){let n=e.__findFunc(t,"\u5B9F\u884C");if(typeof n=="function")return n(e)}return t}},\u5B9F\u884C\u6642\u9593\u8A08\u6E2C:{type:"func",josi:[["\u306E"]],pure:!1,fn:function(t,e){if(typeof t=="string"&&(t=e.__findFunc(t,"\u5B9F\u884C\u6642\u9593\u8A08\u6E2C")),performance&&performance.now){let n=performance.now();return t(e),performance.now()-n}else{let n=Date.now();return t(e),Date.now()-n}}},\u7D42:{type:"func",josi:[],pure:!0,fn:function(t){if(t.__setSysVar("__forceClose",!0),!t.__getSysVar("__useDebug"))throw new Error("__\u7D42\u308F\u308B__")}},\u5909\u6570\u578B\u78BA\u8A8D:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return typeof t}},TYPEOF:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return typeof t}},\u6587\u5B57\u5217\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return String(t)}},TOSTR:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return String(t)}},\u6574\u6570\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return parseInt(t)}},TOINT:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return parseInt(t)}},\u5B9F\u6570\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return parseFloat(t)}},TOFLOAT:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return parseFloat(t)}},INT:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return parseInt(t)}},FLOAT:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return parseFloat(t)}},NAN\u5224\u5B9A:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return isNaN(t)}},\u975E\u6570\u5224\u5B9A:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return Number.isNaN(t)}},HEX:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return parseInt(t).toString(16)}},\u9032\u6570\u5909\u63DB:{type:"func",josi:[["\u3092","\u306E"],[""]],pure:!0,fn:function(t,e){return parseInt(t).toString(e)}},\u4E8C\u9032:{type:"func",josi:[["\u3092","\u306E","\u304B\u3089"]],pure:!0,fn:function(t){return parseInt(t).toString(2)}},\u4E8C\u9032\u8868\u793A:{type:"func",josi:[["\u3092","\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){let n=parseInt(t).toString(2);e.__exec("\u8868\u793A",[n,e])}},RGB:{type:"func",josi:[["\u3068"],["\u306E"],["\u3067"]],pure:!0,fn:function(t,e,n){let r=i=>{let o="00"+parseInt(""+i).toString(16);return o.substring(o.length-2,o.length)};return"#"+r(t)+r(e)+r(n)}},\u8AD6\u7406OR:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return t||e}},\u8AD6\u7406AND:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return t&&e}},\u8AD6\u7406NOT:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return t?0:1}},OR:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return t|e}},AND:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return t&e}},XOR:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return t^e}},NOT:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return~t}},SHIFT_L:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return t<<e}},SHIFT_R:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return t>>e}},SHIFT_UR:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return t>>>e}},\u6587\u5B57\u6570:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Array.from?Array.from(t).length:String(t).length}},\u4F55\u6587\u5B57\u76EE:{type:"func",josi:[["\u3067","\u306E"],["\u304C"]],pure:!0,fn:function(t,e){return String(t).indexOf(e)+1}},CHR:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return String.fromCodePoint?String.fromCodePoint(t):String.fromCharCode(t)}},ASC:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return String.prototype.codePointAt?String(t).codePointAt(0):String(t).charCodeAt(0)}},\u6587\u5B57\u633F\u5165:{type:"func",josi:[["\u3067","\u306E"],["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){e<=0&&(e=1);let r=String(t),i=r.substring(0,e-1),o=r.substring(e-1);return i+n+o}},\u6587\u5B57\u691C\u7D22:{type:"func",josi:[["\u3067","\u306E"],["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=String(t);r=r.substring(e);let i=r.indexOf(n);return i===-1?0:i+1+e}},\u8FFD\u52A0:{type:"func",josi:[["\u3067","\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e){return t instanceof Array?(t.push(e),t):String(t)+String(e)}},\u4E00\u884C\u8FFD\u52A0:{type:"func",josi:[["\u3067","\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e){return t instanceof Array?(t.push(e),t):String(t)+String(e)+`
416
- `}},\u6587\u5B57\u5217\u5206\u89E3:{type:"func",josi:[["\u3092","\u306E","\u3067"]],pure:!0,fn:function(t){return Array.from?Array.from(t):String(t).split("")}},\u30EA\u30D5\u30EC\u30A4\u30F3:{type:"func",josi:[["\u3092","\u306E"],["\u3067"]],pure:!0,fn:function(t,e){let n="";for(let r=0;r<e;r++)n+=String(t);return n}},\u51FA\u73FE\u56DE\u6570:{type:"func",josi:[["\u3067"],["\u306E"]],pure:!0,fn:function(t,e){return t=""+t,e=""+e,t.split(e).length-1}},MID:{type:"func",josi:[["\u3067","\u306E"],["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){return n=n||1,String(t).substring(e-1,e+n-1)}},\u6587\u5B57\u629C\u51FA:{type:"func",josi:[["\u3067","\u306E"],["\u304B\u3089"],["\u3092",""]],pure:!0,fn:function(t,e,n){return n=n||1,String(t).substring(e-1,e+n-1)}},LEFT:{type:"func",josi:[["\u306E","\u3067"],["\u3060\u3051"]],pure:!0,fn:function(t,e){return String(t).substring(0,e)}},\u6587\u5B57\u5DE6\u90E8\u5206:{type:"func",josi:[["\u306E","\u3067"],["\u3060\u3051",""]],pure:!0,fn:function(t,e){return String(t).substring(0,e)}},RIGHT:{type:"func",josi:[["\u306E","\u3067"],["\u3060\u3051"]],pure:!0,fn:function(t,e){return t=""+t,t.substring(t.length-e,t.length)}},\u6587\u5B57\u53F3\u90E8\u5206:{type:"func",josi:[["\u306E","\u3067"],["\u3060\u3051",""]],pure:!0,fn:function(t,e){return t=""+t,t.substring(t.length-e,t.length)}},\u533A\u5207:{type:"func",josi:[["\u306E","\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return(""+t).split(""+e)}},\u6587\u5B57\u5217\u5206\u5272:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){t=""+t,e=""+e;let n=t.indexOf(e);return n<0?[t]:[t.substring(0,n),t.substring(n+e.length)]}},\u5207\u53D6:{type:"func",josi:[["\u304B\u3089","\u306E"],["\u307E\u3067","\u3092"]],pure:!0,fn:function(t,e,n){t=String(t);let r=t.indexOf(e);return r<0?(n.__setSysVar("\u5BFE\u8C61",""),t):(n.__setSysVar("\u5BFE\u8C61",t.substring(r+e.length)),t.substring(0,r))}},\u7BC4\u56F2\u5207\u53D6:{type:"func",josi:[["\u3067","\u306E"],["\u304B\u3089"],["\u307E\u3067","\u3092"]],pure:!0,fn:function(t,e,n,r){t=String(t);let i="",o="",s=t.indexOf(e);if(s<0)return r.__setSysVar("\u5BFE\u8C61",t),"";i=t.substring(0,s);let u=t.substring(s+e.length),c=u.indexOf(n);if(c<0)return r.__setSysVar("\u5BFE\u8C61",i),u;let a=u.substring(0,c);return o=u.substring(c+n.length),r.__setSysVar("\u5BFE\u8C61",i+o),a}},\u6587\u5B57\u524A\u9664:{type:"func",josi:[["\u306E"],["\u304B\u3089"],["\u3060\u3051","\u3092",""]],pure:!0,fn:function(t,e,n){t=""+t;let r=t.substring(0,e-1),i=t.substring(e-1+n);return r+i}},\u7F6E\u63DB:{type:"func",josi:[["\u306E","\u3067"],["\u3092","\u304B\u3089"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n){return String(t).split(e).join(n)}},\u5358\u7F6E\u63DB:{type:"func",josi:[["\u306E","\u3067"],["\u3092"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n){return String(t).replace(e,n)}},\u30C8\u30EA\u30E0:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return t=String(t).replace(/^\s+/,"").replace(/\s+$/,""),t}},\u7A7A\u767D\u9664\u53BB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return t=String(t).replace(/^\s+/,"").replace(/\s+$/,""),t}},\u5927\u6587\u5B57\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return String(t).toUpperCase()}},\u5C0F\u6587\u5B57\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return String(t).toLowerCase()}},\u5E73\u4EEE\u540D\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return(n=>String(n).replace(/[\u30a1-\u30f6]/g,function(r){let i=r.charCodeAt(0)-96;return String.fromCharCode(i)}))(""+t)}},\u30AB\u30BF\u30AB\u30CA\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return(n=>String(n).replace(/[\u3041-\u3096]/g,function(r){let i=r.charCodeAt(0)+96;return String.fromCharCode(i)}))(""+t)}},\u82F1\u6570\u5168\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return String(t).replace(/[A-Za-z0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65248)})}},\u82F1\u6570\u534A\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return String(t).replace(/[A-Za-z0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)-65248)})}},\u82F1\u6570\u8A18\u53F7\u5168\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return String(t).replace(/[\x20-\x7F]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65248)})}},\u82F1\u6570\u8A18\u53F7\u534A\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return String(t).replace(/[\uFF00-\uFF5F]/g,function(e){return String.fromCharCode(e.charCodeAt(0)-65248)})}},\u30AB\u30BF\u30AB\u30CA\u5168\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){let n=e.__getSysVar("\u5168\u89D2\u30AB\u30CA\u4E00\u89A7"),r=e.__getSysVar("\u534A\u89D2\u30AB\u30CA\u4E00\u89A7"),i=e.__getSysVar("\u5168\u89D2\u30AB\u30CA\u6FC1\u97F3\u4E00\u89A7"),o=e.__getSysVar("\u534A\u89D2\u30AB\u30CA\u6FC1\u97F3\u4E00\u89A7"),s="",u=0;for(;u<t.length;){let c=t.substring(u,u+2),a=o.indexOf(c);if(a>=0){s+=i.charAt(a/2),u+=2;continue}let f=t.charAt(u),l=r.indexOf(f);if(l>=0){s+=n.charAt(l),u++;continue}s+=f,u++}return s}},\u30AB\u30BF\u30AB\u30CA\u534A\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){let n=e.__getSysVar("\u5168\u89D2\u30AB\u30CA\u4E00\u89A7"),r=e.__getSysVar("\u534A\u89D2\u30AB\u30CA\u4E00\u89A7"),i=e.__getSysVar("\u5168\u89D2\u30AB\u30CA\u6FC1\u97F3\u4E00\u89A7"),o=e.__getSysVar("\u534A\u89D2\u30AB\u30CA\u6FC1\u97F3\u4E00\u89A7");return t.split("").map(s=>{let u=n.indexOf(s);if(u>=0)return r.charAt(u);let c=i.indexOf(s);return c>=0?o.substring(c*2,c*2+2):s}).join("")}},\u5168\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!1,fn:function(t,e){let n=t;return n=e.__exec("\u30AB\u30BF\u30AB\u30CA\u5168\u89D2\u5909\u63DB",[n,e]),n=e.__exec("\u82F1\u6570\u8A18\u53F7\u5168\u89D2\u5909\u63DB",[n,e]),n}},\u534A\u89D2\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!1,fn:function(t,e){let n=t;return n=e.__exec("\u30AB\u30BF\u30AB\u30CA\u534A\u89D2\u5909\u63DB",[n,e]),n=e.__exec("\u82F1\u6570\u8A18\u53F7\u534A\u89D2\u5909\u63DB",[n,e]),n}},\u5168\u89D2\u30AB\u30CA\u4E00\u89A7:{type:"const",value:"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F2\u30F3\u30A1\u30A3\u30A5\u30A7\u30A9\u30E3\u30E5\u30E7\u30C3\u3001\u3002\u30FC\u300C\u300D"},\u5168\u89D2\u30AB\u30CA\u6FC1\u97F3\u4E00\u89A7:{type:"const",value:"\u30AC\u30AE\u30B0\u30B2\u30B4\u30B6\u30B8\u30BA\u30BC\u30BE\u30C0\u30C2\u30C5\u30C7\u30C9\u30D0\u30D3\u30D6\u30D9\u30DC\u30D1\u30D4\u30D7\u30DA\u30DD"},\u534A\u89D2\u30AB\u30CA\u4E00\u89A7:{type:"const",value:"\uFF71\uFF72\uFF73\uFF74\uFF75\uFF76\uFF77\uFF78\uFF79\uFF7A\uFF7B\uFF7C\uFF7D\uFF7E\uFF7F\uFF80\uFF81\uFF82\uFF83\uFF84\uFF85\uFF86\uFF87\uFF88\uFF89\uFF8A\uFF8B\uFF8C\uFF8D\uFF8E\uFF8F\uFF90\uFF91\uFF92\uFF93\uFF94\uFF95\uFF96\uFF97\uFF98\uFF99\uFF9A\uFF9B\uFF9C\uFF66\uFF9D\uFF67\uFF68\uFF69\uFF6A\uFF6B\uFF6C\uFF6D\uFF6E\uFF6F\uFF64\uFF61\uFF70\uFF62\uFF63\uFF9E\uFF9F"},\u534A\u89D2\u30AB\u30CA\u6FC1\u97F3\u4E00\u89A7:{type:"const",value:"\uFF76\uFF9E\uFF77\uFF9E\uFF78\uFF9E\uFF79\uFF9E\uFF7A\uFF9E\uFF7B\uFF9E\uFF7C\uFF9E\uFF7D\uFF9E\uFF7E\uFF9E\uFF7F\uFF9E\uFF80\uFF9E\uFF81\uFF9E\uFF82\uFF9E\uFF83\uFF9E\uFF84\uFF9E\uFF8A\uFF9E\uFF8B\uFF9E\uFF8C\uFF9E\uFF8D\uFF9E\uFF8E\uFF9E\uFF8A\uFF9F\uFF8B\uFF9F\uFF8C\uFF9F\uFF8D\uFF9F\uFF8E\uFF9F"},JSON\u30A8\u30F3\u30B3\u30FC\u30C9:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t){return JSON.stringify(t)}},JSON\u30A8\u30F3\u30B3\u30FC\u30C9\u6574\u5F62:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t){return JSON.stringify(t,null,2)}},JSON\u30C7\u30B3\u30FC\u30C9:{type:"func",josi:[["\u3092","\u306E","\u304B\u3089"]],pure:!0,fn:function(t){return JSON.parse(t)}},\u6B63\u898F\u8868\u73FE\u30DE\u30C3\u30C1:{type:"func",josi:[["\u3092","\u304C"],["\u3067","\u306B"]],pure:!0,fn:function(t,e,n){let r,i=(""+e).match(/^\/(.+)\/([a-zA-Z]*)$/);i===null?r=new RegExp(e,"g"):r=new RegExp(i[1],i[2]);let o=n.__getSysVar("\u62BD\u51FA\u6587\u5B57\u5217");o.splice(0,o.length);let s=String(t).match(r),u=s;if(!r.global){if(s&&s.length>0){u=s[0];for(let c=1;c<s.length;c++)o[c-1]=s[c]}}return u}},\u62BD\u51FA\u6587\u5B57\u5217:{type:"const",value:[]},\u6B63\u898F\u8868\u73FE\u7F6E\u63DB:{type:"func",josi:[["\u306E"],["\u3092","\u304B\u3089"],["\u3067","\u306B","\u3078"]],pure:!0,fn:function(t,e,n){let r,i=e.match(/^\/(.+)\/([a-zA-Z]*)/);return i===null?r=new RegExp(e,"g"):r=new RegExp(i[1],i[2]),String(t).replace(r,n)}},\u6B63\u898F\u8868\u73FE\u533A\u5207:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){let n,r=e.match(/^\/(.+)\/([a-zA-Z]*)/);return r===null?n=new RegExp(e,"g"):n=new RegExp(r[1],r[2]),String(t).split(n)}},\u901A\u8CA8\u5F62\u5F0F:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t){return String(t).replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1,")}},\u30BC\u30ED\u57CB:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){t=String(t);let n="0";for(let i=0;i<e;i++)n+="0";e=parseInt(e),e<t.length&&(e=t.length);let r=n+String(t);return r.substring(r.length-e,r.length)}},\u7A7A\u767D\u57CB:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){t=String(t);let n=" ";for(let i=0;i<e;i++)n+=" ";e=parseInt(e),e<t.length&&(e=t.length);let r=n+String(t);return r.substring(r.length-e,r.length)}},\u304B\u306A\u304B\u5224\u5B9A:{type:"func",josi:[["\u3092","\u306E","\u304C"]],pure:!0,fn:function(t){let e=String(t).charCodeAt(0);return e>=12353&&e<=12447}},\u30AB\u30BF\u30AB\u30CA\u5224\u5B9A:{type:"func",josi:[["\u3092","\u306E","\u304C"]],pure:!0,fn:function(t){let e=String(t).charCodeAt(0);return e>=12449&&e<=12538}},\u6570\u5B57\u5224\u5B9A:{type:"func",josi:[["\u3092","\u304C"]],pure:!0,fn:function(t){let e=String(t).charAt(0);return e>="0"&&e<="9"||e>="\uFF10"&&e<="\uFF19"}},\u6570\u5217\u5224\u5B9A:{type:"func",josi:[["\u3092","\u304C"]],pure:!0,fn:function(t){let e=/^[+\-+-]?([0-90-9]*)(([..][0-90-9]+)?|([..][0-90-9]+[eEeE][+\-+-]?[0-90-9]+)?)$/;return String(t).match(e)!==null}},\u914D\u5217\u7D50\u5408:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){return t instanceof Array?t.join(""+e):String(t).split(`
417
- `).join(""+e)}},\u914D\u5217\u691C\u7D22:{type:"func",josi:[["\u306E","\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e){return t instanceof Array?t.indexOf(e):-1}},\u914D\u5217\u8981\u7D20\u6570:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return t instanceof Array?t.length:t instanceof Object?Object.keys(t).length:typeof t=="string"?String(t).length:1}},\u8981\u7D20\u6570:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){return e.__exec("\u914D\u5217\u8981\u7D20\u6570",[t])}},LEN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){return e.__exec("\u914D\u5217\u8981\u7D20\u6570",[t])}},\u914D\u5217\u633F\u5165:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){if(t instanceof Array)return t.splice(e,0,n);throw new Error("\u300E\u914D\u5217\u633F\u5165\u300F\u3067\u914D\u5217\u4EE5\u5916\u306E\u8981\u7D20\u3078\u306E\u633F\u5165\u3002")}},\u914D\u5217\u4E00\u62EC\u633F\u5165:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){if(t instanceof Array&&n instanceof Array){for(let r=0;r<n.length;r++)t.splice(e+r,0,n[r]);return t}throw new Error("\u300E\u914D\u5217\u4E00\u62EC\u633F\u5165\u300F\u3067\u914D\u5217\u4EE5\u5916\u306E\u8981\u7D20\u3078\u306E\u633F\u5165\u3002")}},\u914D\u5217\u30BD\u30FC\u30C8:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){if(t instanceof Array)return t.sort();throw new Error("\u300E\u914D\u5217\u30BD\u30FC\u30C8\u300F\u3067\u914D\u5217\u4EE5\u5916\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u6570\u5024\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){if(t instanceof Array){for(let e=0;e<t.length;e++)t[e]=parseFloat(t[e]);return t}throw new Error("\u300E\u914D\u5217\u6570\u5024\u5909\u63DB\u300F\u3067\u914D\u5217\u4EE5\u5916\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u6570\u5024\u30BD\u30FC\u30C8:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){if(t instanceof Array)return t.sort((e,n)=>parseFloat(e)-parseFloat(n));throw new Error("\u300E\u914D\u5217\u6570\u5024\u30BD\u30FC\u30C8\u300F\u3067\u914D\u5217\u4EE5\u5916\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u30AB\u30B9\u30BF\u30E0\u30BD\u30FC\u30C8:{type:"func",josi:[["\u3067"],["\u306E","\u3092"]],pure:!1,fn:function(t,e,n){let r=t;if(typeof t=="string"&&(r=n.__findFunc(t,"\u914D\u5217\u30AB\u30B9\u30BF\u30E0\u30BD\u30FC\u30C8")),e instanceof Array)return e.sort(r);throw new Error("\u300E\u914D\u5217\u30AB\u30B9\u30BF\u30E0\u30BD\u30FC\u30C8\u300F\u3067\u914D\u5217\u4EE5\u5916\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u9006\u9806:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){if(t instanceof Array)return t.reverse();throw new Error("\u300E\u914D\u5217\u30BD\u30FC\u30C8\u300F\u3067\u914D\u5217\u4EE5\u5916\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u30B7\u30E3\u30C3\u30D5\u30EB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){if(t instanceof Array){for(let e=t.length-1;e>0;e--){let n=Math.floor(Math.random()*(e+1)),r=t[e];t[e]=t[n],t[n]=r}return t}throw new Error("\u300E\u914D\u5217\u30B7\u30E3\u30C3\u30D5\u30EB\u300F\u3067\u914D\u5217\u4EE5\u5916\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u524A\u9664:{type:"func",josi:[["\u306E","\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){return n.__exec("\u914D\u5217\u5207\u53D6",[t,e,n])}},\u914D\u5217\u5207\u53D6:{type:"func",josi:[["\u306E","\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e){if(t instanceof Array){if(typeof e=="number"){let n=t.splice(e,1);if(n instanceof Array)return n[0]}if(typeof e=="object"&&typeof e.\u5148\u982D=="number"){let n=e.\u5148\u982D,r=e.\u672B\u5C3E-e.\u5148\u982D+1;return t.splice(n,r)}return null}if(t instanceof Object&&typeof e=="string"){if(t[e]){let n=t[e];return delete t[e],n}return}throw new Error("\u300E\u914D\u5217\u5207\u53D6\u300F\u3067\u914D\u5217\u4EE5\u5916\u3092\u6307\u5B9A\u3002")}},\u914D\u5217\u53D6\u51FA:{type:"func",josi:[["\u306E"],["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){if(t instanceof Array)return t.splice(e,n);throw new Error("\u300E\u914D\u5217\u53D6\u51FA\u300F\u3067\u914D\u5217\u4EE5\u5916\u3092\u6307\u5B9A\u3002")}},\u914D\u5217\u30DD\u30C3\u30D7:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t){if(t instanceof Array)return t.pop();throw new Error("\u300E\u914D\u5217\u30DD\u30C3\u30D7\u300F\u3067\u914D\u5217\u4EE5\u5916\u306E\u51E6\u7406\u3002")}},\u914D\u5217\u30D7\u30C3\u30B7\u30E5:{type:"func",josi:[["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){return n.__exec("\u914D\u5217\u8FFD\u52A0",[t,e,n])}},\u914D\u5217\u8FFD\u52A0:{type:"func",josi:[["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e){if(t instanceof Array)return t.push(e),t;throw new Error("\u300E\u914D\u5217\u8FFD\u52A0\u300F\u3067\u914D\u5217\u4EE5\u5916\u306E\u51E6\u7406\u3002")}},\u914D\u5217\u8907\u88FD:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return JSON.parse(JSON.stringify(t))}},\u914D\u5217\u7BC4\u56F2\u30B3\u30D4\u30FC:{type:"func",josi:[["\u306E","\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e){if(!Array.isArray(t))throw new Error("\u300E\u914D\u5217\u7BC4\u56F2\u30B3\u30D4\u30FC\u300F\u3067\u914D\u5217\u4EE5\u5916\u306E\u5024\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002");if(typeof e=="number")return typeof t[e]=="object"?JSON.parse(JSON.stringify(t[e])):t[e];if(typeof e=="object"&&typeof e.\u5148\u982D=="number"){let n=e.\u5148\u982D,r=e.\u672B\u5C3E+1;return JSON.parse(JSON.stringify(t.slice(n,r)))}}},\u53C2\u7167:{type:"func",josi:[["\u304B\u3089","\u306E"],["\u3092"]],pure:!0,fn:function(t,e,n){if(typeof t=="string"){if(typeof e=="number")return t.charAt(e);if(typeof e=="object"&&typeof e.\u5148\u982D=="number"){let r=e.\u5148\u982D,i=e.\u672B\u5C3E+1;return t.substring(r,i)}throw new Error(`\u300E\u53C2\u7167\u300F\u3067\u6587\u5B57\u5217\u578B\u306E\u7BC4\u56F2\u6307\u5B9A(${JSON.stringify(e)})\u304C\u4E0D\u6B63\u3067\u3059\u3002`)}if(Array.isArray(t)){if(typeof e=="number")return t[e];if(typeof e=="object"&&typeof e.\u5148\u982D=="number"){let r=e.\u5148\u982D,i=e.\u672B\u5C3E+1;return t.slice(r,i)}}if(typeof t=="object")return t[e];throw new Error("\u300E\u53C2\u7167\u300F\u3067\u6587\u5B57\u5217/\u914D\u5217/\u8F9E\u66F8\u578B\u4EE5\u5916\u306E\u5024\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u53C2\u7167:{type:"func",josi:[["\u306E","\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){return n.__exec("\u53C2\u7167",[t,e,n])}},\u914D\u5217\u8DB3:{type:"func",josi:[["\u306B","\u3078","\u3068"],["\u3092"]],pure:!0,fn:function(t,e){return t instanceof Array?t.concat(e):JSON.parse(JSON.stringify(t))}},\u914D\u5217\u6700\u5927\u5024:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return t.reduce((e,n)=>Math.max(e,n))}},\u914D\u5217\u6700\u5C0F\u5024:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return t.reduce((e,n)=>Math.min(e,n))}},\u914D\u5217\u5408\u8A08:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){if(t instanceof Array){let e=0;return t.forEach(n=>{let r=parseFloat(n);isNaN(r)||(e+=r)}),e}throw new Error("\u300E\u914D\u5217\u5408\u8A08\u300F\u3067\u914D\u5217\u5909\u6570\u4EE5\u5916\u306E\u5024\u304C\u6307\u5B9A\u3055\u308C\u307E\u3057\u305F\u3002")}},\u914D\u5217\u5165\u66FF:{type:"func",josi:[["\u306E"],["\u3068"],["\u3092"]],pure:!0,fn:function(t,e,n){if(!(t instanceof Array))throw new Error("\u300E\u914D\u5217\u5165\u66FF\u300F\u306E\u7B2C1\u5F15\u6570\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002");let r=t[e];return t[e]=t[n],t[n]=r,t}},\u914D\u5217\u9023\u756A\u4F5C\u6210:{type:"func",josi:[["\u304B\u3089"],["\u307E\u3067\u306E","\u307E\u3067","\u306E"]],pure:!0,fn:function(t,e){let n=[];for(let r=t;r<=e;r++)n.push(r);return n}},\u914D\u5217\u8981\u7D20\u4F5C\u6210:{type:"func",josi:[["\u3092"],["\u3060\u3051"]],pure:!0,fn:function(t,e){let n=[];for(let r=0;r<e;r++)n.push(t);return n}},\u914D\u5217\u95A2\u6570\u9069\u7528:{type:"func",josi:[["\u3092"],["\u3078","\u306B"]],pure:!0,fn:function(t,e,n){let r=t;typeof t=="string"&&(r=n.__findFunc(t,"\u914D\u5217\u95A2\u6570\u9069\u7528"));let i=[];for(let o of e)i.push(r(o));return i}},\u914D\u5217\u30DE\u30C3\u30D7:{type:"func",josi:[["\u3092"],["\u3078","\u306B"]],pure:!0,fn:function(t,e,n){return n.__exec("\u914D\u5217\u95A2\u6570\u9069\u7528",[t,e,n])}},\u914D\u5217\u30D5\u30A3\u30EB\u30BF:{type:"func",josi:[["\u3067","\u306E"],["\u3092","\u306B\u3064\u3044\u3066"]],pure:!0,fn:function(t,e,n){let r=t;typeof t=="string"&&(r=n.__findFunc(t,"\u914D\u5217\u30D5\u30A3\u30EB\u30BF"));let i=[];for(let o of e)r(o)&&i.push(o);return i}},\u8868\u30BD\u30FC\u30C8:{type:"func",josi:[["\u306E"],["\u3092"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u30BD\u30FC\u30C8\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");return t.sort((n,r)=>{let i=n[e],o=r[e];return i===o?0:i<o?-1:1}),t}},\u8868\u6570\u5024\u30BD\u30FC\u30C8:{type:"func",josi:[["\u306E"],["\u3092"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u6570\u5024\u30BD\u30FC\u30C8\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");return t.sort((n,r)=>{let i=n[e],o=r[e];return i-o}),t}},\u8868\u30D4\u30C3\u30AF\u30A2\u30C3\u30D7:{type:"func",josi:[["\u306E"],["\u304B\u3089"],["\u3092","\u3067"]],pure:!0,fn:function(t,e,n){if(!(t instanceof Array))throw new Error("\u300E\u8868\u30D4\u30C3\u30AF\u30A2\u30C3\u30D7\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");return t.filter(r=>String(r[e]).indexOf(n)>=0)}},\u8868\u5B8C\u5168\u4E00\u81F4\u30D4\u30C3\u30AF\u30A2\u30C3\u30D7:{type:"func",josi:[["\u306E"],["\u304B\u3089"],["\u3092","\u3067"]],pure:!0,fn:function(t,e,n){if(!(t instanceof Array))throw new Error("\u300E\u8868\u5B8C\u5168\u30D4\u30C3\u30AF\u30A2\u30C3\u30D7\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");return t.filter(r=>r[e]===n)}},\u8868\u691C\u7D22:{type:"func",josi:[["\u306E"],["\u3067","\u306B"],["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n,r){if(!(t instanceof Array))throw new Error("\u300E\u8868\u691C\u7D22\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");for(let i=n;i<t.length;i++)if(t[i][e]===r)return i;return-1}},\u8868\u5217\u6570:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){if(!(t instanceof Array))throw new Error("\u300E\u8868\u5217\u6570\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let e=1;for(let n=0;n<t.length;n++)t[n].length>e&&(e=t[n].length);return e}},\u8868\u884C\u6570:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){if(!(t instanceof Array))throw new Error("\u300E\u8868\u884C\u6570\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");return t.length}},\u8868\u884C\u5217\u4EA4\u63DB:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u884C\u5217\u4EA4\u63DB\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let n=e.__exec("\u8868\u5217\u6570",[t]),r=t.length,i=[];for(let o=0;o<n;o++){let s=[];i.push(s);for(let u=0;u<r;u++)s[u]=t[u][o]!==void 0?t[u][o]:""}return i}},\u8868\u53F3\u56DE\u8EE2:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u53F3\u56DE\u8EE2\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let n=e.__exec("\u8868\u5217\u6570",[t]),r=t.length,i=[];for(let o=0;o<n;o++){let s=[];i.push(s);for(let u=0;u<r;u++)s[u]=t[r-u-1][o]}return i}},\u8868\u91CD\u8907\u524A\u9664:{type:"func",josi:[["\u306E"],["\u3092","\u3067"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u91CD\u8907\u524A\u9664\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let n=[],r={};for(let i=0;i<t.length;i++){let o=t[i][e];r[o]===void 0&&(r[o]=!0,n.push(t[i]))}return n}},\u8868\u5217\u53D6\u5F97:{type:"func",josi:[["\u306E"],["\u3092"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u5217\u53D6\u5F97\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");return t.map(r=>r[e])}},\u8868\u5217\u633F\u5165:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){if(!(t instanceof Array))throw new Error("\u300E\u8868\u5217\u633F\u5165\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let r=[];return t.forEach((i,o)=>{let s=[];e>0&&(s=s.concat(i.slice(0,e))),s.push(n[o]),s=s.concat(i.slice(e)),r.push(s)}),r}},\u8868\u5217\u524A\u9664:{type:"func",josi:[["\u306E"],["\u3092"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u5217\u524A\u9664\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let n=[];return t.forEach(r=>{let i=r.slice(0);i.splice(e,1),n.push(i)}),n}},\u8868\u5217\u5408\u8A08:{type:"func",josi:[["\u306E"],["\u3092","\u3067"]],pure:!0,fn:function(t,e){if(!(t instanceof Array))throw new Error("\u300E\u8868\u5217\u5408\u8A08\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let n=0;return t.forEach(r=>{n+=r[e]}),n}},\u8868\u66D6\u6627\u691C\u7D22:{type:"func",josi:[["\u306E"],["\u304B\u3089"],["\u3067"],["\u3092"]],pure:!0,fn:function(t,e,n,r){if(!(t instanceof Array))throw new Error("\u300E\u8868\u66D6\u6627\u691C\u7D22\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let i=new RegExp(r);for(let o=e;o<t.length;o++){let s=t[o];if(i.test(s[n]))return o}return-1}},\u8868\u6B63\u898F\u8868\u73FE\u30D4\u30C3\u30AF\u30A2\u30C3\u30D7:{type:"func",josi:[["\u306E","\u3067"],["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){if(!(t instanceof Array))throw new Error("\u300E\u8868\u6B63\u898F\u8868\u73FE\u30D4\u30C3\u30AF\u30A2\u30C3\u30D7\u300F\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let r=new RegExp(n),i=[];for(let o=0;o<t.length;o++){let s=t[o];r.test(s[e])&&i.push(s.slice(0))}return i}},\u8F9E\u66F8\u30AD\u30FC\u5217\u6319:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){let e=[];if(t instanceof Object){for(let n in t)e.push(n);return e}if(t instanceof Array){for(let n=0;n<t.length;n++)e.push(n);return e}throw new Error("\u300E\u8F9E\u66F8\u30AD\u30FC\u5217\u6319\u300F\u3067\u30CF\u30C3\u30B7\u30E5\u4EE5\u5916\u304C\u4E0E\u3048\u3089\u308C\u307E\u3057\u305F\u3002")}},\u8F9E\u66F8\u30AD\u30FC\u524A\u9664:{type:"func",josi:[["\u304B\u3089","\u306E"],["\u3092"]],pure:!0,fn:function(t,e){if(t instanceof Object)return e in t&&delete t[e],t;throw new Error("\u300E\u8F9E\u66F8\u30AD\u30FC\u524A\u9664\u300F\u3067\u30CF\u30C3\u30B7\u30E5\u4EE5\u5916\u304C\u4E0E\u3048\u3089\u308C\u307E\u3057\u305F\u3002")}},\u8F9E\u66F8\u30AD\u30FC\u5B58\u5728:{type:"func",josi:[["\u306E","\u306B"],["\u304C"]],pure:!0,fn:function(t,e){return e in t}},\u30CF\u30C3\u30B7\u30E5\u30AD\u30FC\u5217\u6319:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){return e.__exec("\u8F9E\u66F8\u30AD\u30FC\u5217\u6319",[t,e])}},\u30CF\u30C3\u30B7\u30E5\u5185\u5BB9\u5217\u6319:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){let e=[];if(t instanceof Object){for(let n in t)e.push(t[n]);return e}throw new Error("\u300E\u30CF\u30C3\u30B7\u30E5\u5185\u5BB9\u5217\u6319\u300F\u3067\u30CF\u30C3\u30B7\u30E5\u4EE5\u5916\u304C\u4E0E\u3048\u3089\u308C\u307E\u3057\u305F\u3002")}},\u30CF\u30C3\u30B7\u30E5\u30AD\u30FC\u524A\u9664:{type:"func",josi:[["\u304B\u3089","\u306E"],["\u3092"]],pure:!0,fn:function(t,e,n){return n.__exec("\u8F9E\u66F8\u30AD\u30FC\u524A\u9664",[t,e,n])}},\u30CF\u30C3\u30B7\u30E5\u30AD\u30FC\u5B58\u5728:{type:"func",josi:[["\u306E","\u306B"],["\u304C"]],pure:!0,fn:function(t,e){return e in t}},\u79D2\u5F85:{type:"func",josi:[[""]],pure:!0,asyncFn:!0,fn:function(t,e){return new Promise((n,r)=>{try{let i=setTimeout(()=>{let o=e.__timeout.indexOf(i);o>=0&&e.__timeout.splice(o,1),n()},parseFloat(t)*1e3);e.__timeout.push(i)}catch(i){r(i)}})},return_none:!0},\u79D2\u5F85\u6A5F:{type:"func",josi:[[""]],pure:!0,asyncFn:!0,fn:async function(t,e){return await e.__exec("\u79D2\u5F85",[t,e])},return_none:!0},\u79D2\u9010\u6B21\u5F85\u6A5F:{type:"func",josi:[[""]],pure:!0,asyncFn:!0,fn:async function(t,e){return await e.__exec("\u79D2\u5F85",[t,e])},return_none:!0},\u79D2\u5F8C:{type:"func",josi:[["\u3092"],[""]],pure:!0,fn:function(t,e,n){typeof t=="string"&&(t=n.__findFunc(t,"\u79D2\u5F8C"));let r=setTimeout(()=>{let i=n.__timeout.indexOf(r);i>=0&&n.__timeout.splice(i,1);try{t(r,n)}catch(o){let s=o;o instanceof re||(s=new re(o,n.__getSysVar("__line"))),n.logger.error(s)}},parseFloat(e)*1e3);return n.__timeout.unshift(r),n.__setSysVar("\u5BFE\u8C61",r),r}},\u79D2\u6BCE:{type:"func",josi:[["\u3092"],[""]],pure:!1,fn:function(t,e,n){typeof t=="string"&&(t=n.__findFunc(t,"\u79D2\u6BCE"));let r=setInterval(()=>{t(r,n)},parseFloat(e)*1e3);return n.__interval.unshift(r),n.__setSysVar("\u5BFE\u8C61",r),r}},\u79D2\u30BF\u30A4\u30DE\u30FC\u958B\u59CB\u6642:{type:"func",josi:[["\u3092"],[""]],pure:!1,fn:function(t,e,n){return n.__exec("\u79D2\u6BCE",[t,e,n])}},\u30BF\u30A4\u30DE\u30FC\u505C\u6B62:{type:"func",josi:[["\u306E","\u3067"]],pure:!0,fn:function(t,e){let n=e.__interval.indexOf(t);if(n>=0)return e.__interval.splice(n,1),clearInterval(t),!0;let r=e.__timeout.indexOf(t);return r>=0?(e.__timeout.splice(r,1),clearTimeout(t),!0):!1},return_none:!1},\u5168\u30BF\u30A4\u30DE\u30FC\u505C\u6B62:{type:"func",josi:[],pure:!0,fn:function(t){for(let e=0;e<t.__interval.length;e++){let n=t.__interval[e];clearInterval(n)}t.__interval=[];for(let e=0;e<t.__timeout.length;e++){let n=t.__timeout[e];clearTimeout(n)}t.__timeout=[]},return_none:!0},\u5143\u53F7\u30C7\u30FC\u30BF:{type:"const",value:[{\u5143\u53F7:"\u4EE4\u548C",\u6539\u5143\u65E5:"2019/05/01"},{\u5143\u53F7:"\u5E73\u6210",\u6539\u5143\u65E5:"1989/01/08"},{\u5143\u53F7:"\u662D\u548C",\u6539\u5143\u65E5:"1926/12/25"},{\u5143\u53F7:"\u5927\u6B63",\u6539\u5143\u65E5:"1912/07/30"},{\u5143\u53F7:"\u660E\u6CBB",\u6539\u5143\u65E5:"1868/10/23"}]},\u4ECA:{type:"func",josi:[],pure:!0,fn:function(){let t=n=>(n="00"+n,n.substring(n.length-2,n.length)),e=new Date;return t(e.getHours())+":"+t(e.getMinutes())+":"+t(e.getSeconds())}},\u30B7\u30B9\u30C6\u30E0\u6642\u9593:{type:"func",josi:[],pure:!0,fn:function(){return Math.floor(new Date().getTime()/1e3)}},\u30B7\u30B9\u30C6\u30E0\u6642\u9593\u30DF\u30EA\u79D2:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getTime()}},\u4ECA\u65E5:{type:"func",josi:[],pure:!0,fn:function(t){return t.__formatDate(new Date)}},\u660E\u65E5:{type:"func",josi:[],pure:!0,fn:function(t){let e=Date.now()+864e5;return t.__formatDate(new Date(e))}},\u6628\u65E5:{type:"func",josi:[],pure:!0,fn:function(t){let e=Date.now()-864e5;return t.__formatDate(new Date(e))}},\u4ECA\u5E74:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getFullYear()}},\u6765\u5E74:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getFullYear()+1}},\u53BB\u5E74:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getFullYear()-1}},\u4ECA\u6708:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getMonth()+1}},\u6765\u6708:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getMonth()+2}},\u5148\u6708:{type:"func",josi:[],pure:!0,fn:function(){return new Date().getMonth()}},\u66DC\u65E5:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__str2date(t);return"\u65E5\u6708\u706B\u6C34\u6728\u91D1\u571F".charAt(n.getDay()%7)}},\u66DC\u65E5\u756A\u53F7\u53D6\u5F97:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){let e=t.split("/");return new Date(e[0],e[1]-1,e[2]).getDay()}},UNIXTIME\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092","\u304B\u3089"]],pure:!0,fn:function(t,e){return e.__str2date(t).getTime()/1e3}},UNIX\u6642\u9593\u5909\u63DB:{type:"func",josi:[["\u306E","\u3092","\u304B\u3089"]],pure:!0,fn:function(t,e){return e.__str2date(t).getTime()/1e3}},\u65E5\u6642\u5909\u63DB:{type:"func",josi:[["\u3092","\u304B\u3089"]],pure:!0,fn:function(t,e){let n=t*1e3;return e.__formatDateTime(new Date(n),"2022/01/01 00:00:00")}},\u65E5\u6642\u66F8\u5F0F\u5909\u63DB:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e,n){let r=n.__str2date(t);return e=e.replace(/(YYYY|ccc|WWW|MMM|YY|MM|DD|HH|mm|ss|[MDHmsW])/g,i=>{switch(i){case"YYYY":return r.getFullYear();case"YY":return(""+r.getFullYear()).substring(2);case"MM":return n.__zero2(r.getMonth()+1);case"DD":return n.__zero2(r.getDate());case"M":return r.getMonth()+1;case"D":return r.getDate();case"HH":return n.__zero2(r.getHours());case"mm":return n.__zero2(r.getMinutes());case"ss":return n.__zero2(r.getSeconds());case"ccc":return n.__zero(r.getMilliseconds(),3);case"H":return r.getHours();case"m":return r.getMinutes();case"s":return r.getSeconds();case"W":return"\u65E5\u6708\u706B\u6C34\u6728\u91D1\u571F".charAt(r.getDay()%7);case"WWW":return["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][r.getDay()%7];case"MMM":return["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][r.getMonth()]}return i}),e}},\u548C\u66A6\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){let n=e.__str2date(t),r=n.getTime();for(let i of e.__getSysVar("\u5143\u53F7\u30C7\u30FC\u30BF")){let o=i.\u5143\u53F7,s=e.__str2date(i.\u6539\u5143\u65E5);if(s.getTime()<=r){let c=n.getFullYear()-s.getFullYear()+1;return c===1&&(c="\u5143"),o+c+"\u5E74"+e.__zero2(n.getMonth()+1)+"\u6708"+e.__zero2(n.getDate())+"\u65E5"}}throw new Error("\u300E\u548C\u66A6\u5909\u63DB\u300F\u306F\u660E\u793A\u4EE5\u524D\u306E\u65E5\u4ED8\u306B\u306F\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002")}},\u5E74\u6570\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){let r=n.__str2date(t);return n.__str2date(e).getFullYear()-r.getFullYear()}},\u6708\u6570\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){let r=n.__str2date(t),i=n.__str2date(e);return i.getFullYear()*12+i.getMonth()-(r.getFullYear()*12+r.getMonth())}},\u65E5\u6570\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){let r=Math.ceil(n.__str2date(t).getTime()/1e3),i=Math.ceil(n.__str2date(e).getTime()/1e3);return Math.ceil((i-r)/(60*60*24))}},\u6642\u9593\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){let r=Math.ceil(n.__str2date(t).getTime()/1e3),i=Math.ceil(n.__str2date(e).getTime()/1e3);return Math.ceil((i-r)/(60*60))}},\u5206\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){let r=Math.ceil(n.__str2date(t).getTime()/1e3),i=Math.ceil(n.__str2date(e).getTime()/1e3);return Math.ceil((i-r)/60)}},\u79D2\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"]],pure:!0,fn:function(t,e,n){let r=Math.ceil(n.__str2date(t).getTime()/1e3),i=Math.ceil(n.__str2date(e).getTime()/1e3);return Math.ceil(i-r)}},\u65E5\u6642\u5DEE:{type:"func",josi:[["\u3068","\u304B\u3089"],["\u306E","\u307E\u3067\u306E"],["\u306B\u3088\u308B"]],pure:!0,fn:function(t,e,n,r){switch(n){case"\u5E74":return r.__exec("\u5E74\u6570\u5DEE",[t,e,r]);case"\u6708":return r.__exec("\u6708\u6570\u5DEE",[t,e,r]);case"\u65E5":return r.__exec("\u65E5\u6570\u5DEE",[t,e,r]);case"\u6642\u9593":return r.__exec("\u6642\u9593\u5DEE",[t,e,r]);case"\u5206":return r.__exec("\u5206\u5DEE",[t,e,r]);case"\u79D2":return r.__exec("\u79D2\u5DEE",[t,e,r])}throw new Error("\u300E\u65E5\u6642\u5DEE\u300F\u3067\u4E0D\u660E\u306A\u5358\u4F4D\u3067\u3059\u3002")}},\u6642\u9593\u52A0\u7B97:{type:"func",josi:[["\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=e.charAt(0);(r==="-"||r==="+")&&(e=e.substring(1));let i=n.__str2date(t),o=(e+":0:0").split(":"),s=parseInt(o[0])*60*60+parseInt(o[1])*60+parseInt(o[2]);r==="-"&&(s*=-1);let u=new Date(i.getTime()+s*1e3);return n.__formatDateTime(u,t)}},\u65E5\u4ED8\u52A0\u7B97:{type:"func",josi:[["\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=1,i=e.charAt(0);(i==="-"||i==="+")&&(e=e.substring(1),i==="-"&&(r*=-1));let o=n.__str2date(t),s=(e+"/0/0").split("/"),u=parseInt(s[0])*r,c=parseInt(s[1])*r,a=parseInt(s[2])*r;return o.setFullYear(o.getFullYear()+u),o.setMonth(o.getMonth()+c),o.setDate(o.getDate()+a),n.__formatDateTime(o,t)}},\u65E5\u6642\u52A0\u7B97:{type:"func",josi:[["\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=(""+e).match(/([+|-]?)(\d+)(年|ヶ月|日|週間|時間|分|秒)$/);if(!r)throw new Error("\u300E\u65E5\u4ED8\u52A0\u7B97\u300F\u306F\u300E(+\uFF5C-)1(\u5E74|\u30F6\u6708|\u65E5|\u6642\u9593|\u5206|\u79D2)\u300F\u306E\u66F8\u5F0F\u3067\u6307\u5B9A\u3057\u307E\u3059\u3002");switch(r[3]){case"\u5E74":return n.__exec("\u65E5\u4ED8\u52A0\u7B97",[t,`${r[1]}${r[2]}/0/0`,n]);case"\u30F6\u6708":return n.__exec("\u65E5\u4ED8\u52A0\u7B97",[t,`${r[1]}0/${r[2]}/0`,n]);case"\u9031\u9593":return n.__exec("\u65E5\u4ED8\u52A0\u7B97",[t,`${r[1]}0/0/${parseInt(r[2])*7}`,n]);case"\u65E5":return n.__exec("\u65E5\u4ED8\u52A0\u7B97",[t,`${r[1]}0/0/${r[2]}`,n]);case"\u6642\u9593":return n.__exec("\u6642\u9593\u52A0\u7B97",[t,`${r[1]}${r[2]}:0:0`,n]);case"\u5206":return n.__exec("\u6642\u9593\u52A0\u7B97",[t,`${r[1]}0:${r[2]}:0`,n]);case"\u79D2":return n.__exec("\u6642\u9593\u52A0\u7B97",[t,`${r[1]}0:0:${r[2]}`,n])}}},\u6642\u9593\u30DF\u30EA\u79D2\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(){return performance&&performance.now?performance.now():Date.now?Date.now():new Date().getTime()}},\u30A8\u30E9\u30FC\u767A\u751F:{type:"func",josi:[["\u306E","\u3067"]],pure:!0,fn:function(t){throw new Error(t)},return_none:!0},__DEBUG:{type:"func",josi:[],pure:!0,fn:function(t){t.isDebug=!0,console.log(t)}},__DEBUG\u5F37\u5236\u5F85\u6A5F:{type:"const",value:0},__DEBUG\u30D6\u30EC\u30A4\u30AF\u30DD\u30A4\u30F3\u30C8\u4E00\u89A7:{type:"const",value:[]},__DEBUG\u5F85\u6A5F\u30D5\u30E9\u30B0:{type:"const",value:0},__DEBUG_BP_WAIT:{type:"func",josi:[["\u3067"]],pure:!0,asyncFn:!0,fn:function(t,e){return new Promise(n=>{let r=e.__getSysVar("__DEBUG\u30D6\u30EC\u30A4\u30AF\u30DD\u30A4\u30F3\u30C8\u4E00\u89A7"),i=e.__getSysVar("__DEBUG\u5F37\u5236\u5F85\u6A5F");if(e.__setSysVar("__DEBUG\u5F37\u5236\u5F85\u6A5F",0),r.indexOf(t)>=0||i){if(e.__getSysVar("\u30D7\u30E9\u30B0\u30A4\u30F3\u540D")!=="\u30E1\u30A4\u30F3")return;console.log(`@__DEBUG_BP_WAIT(${t})`);let o=setInterval(()=>{e.__getSysVar("__DEBUG\u5F85\u6A5F\u30D5\u30E9\u30B0")===1&&(e.__setSysVar("__DEBUG\u5F85\u6A5F\u30D5\u30E9\u30B0",0),clearInterval(o),n(t))},500)}else n(t)})}},\u30B0\u30ED\u30FC\u30D0\u30EB\u95A2\u6570\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(t){let e=t.__varslist[1],n=[];for(let r of e.keys())n.push(r);return n}},\u30B7\u30B9\u30C6\u30E0\u95A2\u6570\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(t){let e=t.__v0,n=[];for(let r of e.keys())r.startsWith("__")||r.startsWith("!")||r==="meta"||n.push(r);return n}},\u30B7\u30B9\u30C6\u30E0\u95A2\u6570\u5B58\u5728:{type:"func",josi:[["\u304C","\u306E"]],pure:!0,fn:function(t,e){return typeof e.__getSysVar(t)<"u"}},\u30D7\u30E9\u30B0\u30A4\u30F3\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(t){let e=[];for(let n in t.pluginfiles)e.push(n);return e}},\u30E2\u30B8\u30E5\u30FC\u30EB\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(t){let e=[];for(let n in t.__module)e.push(n);return e}},\u52A9\u8A5E\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,asyncFn:!0,fn:function(t){return t.josiList}},\u4E88\u7D04\u8A9E\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,asyncFn:!0,fn:function(t){return t.reservedWords}},\u30D7\u30E9\u30B0\u30A4\u30F3\u540D:{type:"const",value:"\u30E1\u30A4\u30F3"},\u30D7\u30E9\u30B0\u30A4\u30F3\u540D\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){e.__setSysVar("\u30D7\u30E9\u30B0\u30A4\u30F3\u540D",t)},return_none:!0},\u540D\u524D\u7A7A\u9593:{type:"const",value:""},\u540D\u524D\u7A7A\u9593\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){e.__namespaceList.push([e.__getSysVar("\u540D\u524D\u7A7A\u9593"),e.__getSysVar("\u30D7\u30E9\u30B0\u30A4\u30F3\u540D")]),e.__setSysVar("\u540D\u524D\u7A7A\u9593",t)},return_none:!0},\u540D\u524D\u7A7A\u9593\u30DD\u30C3\u30D7:{type:"func",josi:[],pure:!0,fn:function(t){let e=t.__namespaceList.pop();e&&(t.__setSysVar("\u540D\u524D\u7A7A\u9593",e[0]),t.__setSysVar("\u30D7\u30E9\u30B0\u30A4\u30F3\u540D",e[1]))},return_none:!0},URL\u30A8\u30F3\u30B3\u30FC\u30C9:{type:"func",josi:[["\u3092","\u304B\u3089"]],pure:!0,fn:function(t){return encodeURIComponent(t)}},URL\u30C7\u30B3\u30FC\u30C9:{type:"func",josi:[["\u3092","\u3078","\u306B"]],pure:!0,fn:function(t){return decodeURIComponent(t)}},URL\u30D1\u30E9\u30E1\u30FC\u30BF\u89E3\u6790:{type:"func",josi:[["\u3092","\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){let n={};if(typeof t!="string")return n;let r=t.split("?");if(r.length<=1)return n;let i=r[1].split("&");for(let o of i){let u=(o+"=").split("="),c=e.__exec("URL\u30C7\u30B3\u30FC\u30C9",[u[0]]);n[c]=e.__exec("URL\u30C7\u30B3\u30FC\u30C9",[u[1]])}return n}},BASE64\u30A8\u30F3\u30B3\u30FC\u30C9:{type:"func",josi:[["\u3092","\u304B\u3089"]],pure:!0,fn:function(t){if(typeof window<"u"&&window.btoa){let e=new TextEncoder().encode(t),n=String.fromCharCode.apply(null,e);return btoa(n)}if(typeof Buffer<"u")return Buffer.from(t).toString("base64");throw new Error("\u300EBASE64\u30A8\u30F3\u30B3\u30FC\u30C9\u300F\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002")}},BASE64\u30C7\u30B3\u30FC\u30C9:{type:"func",josi:[["\u3092","\u3078","\u306B"]],pure:!0,fn:function(t){if(typeof window<"u"&&window.atob){let e=atob(t),n=Array.prototype.map.call(e,i=>i.charCodeAt()),r=new Uint8Array(n);return new TextDecoder("UTF-8").decode(r)}if(typeof Buffer<"u")return Buffer.from(t,"base64").toString();throw new Error("\u300EBASE64\u30C7\u30B3\u30FC\u30C9\u300F\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002")}}};var Rt={meta:{type:"const",value:{pluginName:"plugin_math",description:"\u6570\u5B66\u95A2\u6570\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako","phpnako"],nakoVersion:"^3.6.0"}},\u521D\u671F\u5316:{type:"func",josi:[],pure:!0,fn:function(){}},SIN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.sin(t)}},COS:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.cos(t)}},TAN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.tan(t)}},ARCSIN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.asin(t)}},ARCCOS:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.acos(t)}},ARCTAN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.atan(t)}},ATAN2:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return Math.atan2(t,e)}},\u5EA7\u6A19\u89D2\u5EA6\u8A08\u7B97:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.atan2(t[1],t[0])*180/Math.PI}},RAD2DEG:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return t/Math.PI*180}},DEG2RAD:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return t/180*Math.PI}},\u5EA6\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return t/Math.PI*180}},\u30E9\u30B8\u30A2\u30F3\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return t/180*Math.PI}},SIGN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return parseFloat(t)===0?0:t>0?1:-1}},\u7B26\u53F7:{type:"func",josi:[["\u306E"]],pure:!1,fn:function(t,e){return e.__exec("SIGN",[t])}},ABS:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.abs(t)}},\u7D76\u5BFE\u5024:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.abs(t)}},EXP:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.exp(t)}},HYPOT:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return Math.hypot(t,e)}},\u659C\u8FBA:{type:"func",josi:[["\u3068"],["\u306E"]],pure:!0,fn:function(t,e){return Math.hypot(t,e)}},LN:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.log(t)}},LOG:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.log(t)}},LOGN:{type:"func",josi:[["\u3067"],["\u306E"]],pure:!0,fn:function(t,e){return t===2?Math.LOG2E*Math.log(e):t===10?Math.LOG10E*Math.log(e):Math.log(e)/Math.log(t)}},FRAC:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return t%1}},\u5C0F\u6570\u90E8\u5206:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return t%1}},\u6574\u6570\u90E8\u5206:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.trunc(t)}},\u4E71\u6570:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){if(typeof t=="number")return Math.floor(Math.random()*t);if(typeof t=="object"&&t.\u5148\u982D!==void 0){let e=t.\u5148\u982D,n=t.\u672B\u5C3E;return Math.floor(Math.random()*(n-e+1))+e}if(Array.isArray(t)){let e=t[0],n=t[1];return Math.floor(Math.random()*(n-e+1))+e}}},\u4E71\u6570\u7BC4\u56F2:{type:"func",josi:[["\u304B\u3089"],["\u307E\u3067\u306E","\u306E"]],pure:!0,fn:function(t,e){return Math.floor(Math.random()*(e-t+1))+t}},SQRT:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.sqrt(t)}},\u5E73\u65B9\u6839:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){return Math.sqrt(t)}},ROUND:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return Math.round(t)}},\u56DB\u6368\u4E94\u5165:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t){return Math.round(t)}},\u5C0F\u6570\u70B9\u5207\u4E0A:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){let n=Math.pow(10,e);return Math.ceil(t*n)/n}},\u5C0F\u6570\u70B9\u5207\u4E0B:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){let n=Math.pow(10,e);return Math.floor(t*n)/n}},\u5C0F\u6570\u70B9\u56DB\u6368\u4E94\u5165:{type:"func",josi:[["\u3092"],["\u3067"]],pure:!0,fn:function(t,e){let n=Math.pow(10,e);return Math.round(t*n)/n}},CEIL:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return Math.ceil(t)}},\u5207\u4E0A:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return Math.ceil(t)}},FLOOR:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return Math.floor(t)}},\u5207\u6368:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return Math.floor(t)}}};var ee={delimiter:",",eol:`\r
418
- `};function ut(t,e=void 0){e===void 0&&(e=ee.delimiter),t=""+t+`
419
- `,t=t.replace(/(\r\n|\r)/g,`
420
- `),t=t.replace(/\s+$/,"")+`
421
- `;let n="^(.*?)([\\"+e+"\\n])",r=new RegExp(n),i=function(c){return typeof c=="string"&&c.search(/^[0-9.]+$/)>=0&&(c=parseFloat(c)),c},o=[],s=[],u="";for(;t!=="";){if(u=t.charAt(0),u===e){t=t.substring(1),s.push("");continue}if(u===`
422
- `){s.push(""),o.push(s),s=[],t=t.substring(1);continue}if(t=t.replace(/^\s+/,""),u=t.charAt(0),u===e){console.log("delimiter"),s.push(""),t=t.substring(e.length);continue}if(u==="="&&t.charAt(1)==='"'){t=t.substring(1);continue}if(u!=='"'){let f=r.exec(t);if(!f){s.push(i(t)),o.push(s),s=[];break}f[2]===`
423
- `?(s.push(i(f[1])),o.push(s),s=[]):f[2]===e&&s.push(i(f[1])),t=t.substring(f[0].length);continue}if(t.substring(0,2)==='""'){s.push(""),t=t.substring(2);continue}let c=1,a="";for(;c<t.length;){let f=t.charAt(c),l=t.charAt(c+1);if(f==='"'&&l==='"'){c+=2,a+='"';continue}if(f==='"'){if(c++,l===e){c++,s.push(i(a)),a="";break}if(l===`
424
- `){c++,s.push(i(a)),o.push(s),s=[];break}c++;continue}a+=f,c++}t=t.substr(c)}return s.length>0&&o.push(s),o}function ct(t,e=void 0,n=void 0){e===void 0&&(e=ee.delimiter),n===void 0&&(n=ee.eol);let r=cr(e);if(t===void 0)return"";let i="";for(let o=0;o<t.length;o++){let s=t[o];if(s===void 0){i+=n;continue}for(let u=0;u<s.length;u++)s[u]=r(s[u]);i+=s.join(e)+n}return i=i.replace(/(\r\n|\r|\n)/g,n),i}function cr(t){return function(e){e=""+e;let n=!1;return(e.indexOf(`
425
- `)>=0||e.indexOf("\r")>=0)&&(n=!0),e.indexOf(t)>=0&&(n=!0),e.indexOf('"')>=0&&(n=!0,e=e.replace(/"/g,'""')),n&&(e='"'+e+'"'),e}}var ar={meta:{type:"const",value:{pluginName:"plugin_csv",description:"CSV\u95A2\u9023\u306E\u547D\u4EE4\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako","phpnako"],nakoVersion:"3.6.0"}},\u521D\u671F\u5316:{type:"func",josi:[],pure:!0,fn:function(){}},CSV\u53D6\u5F97:{type:"func",josi:[["\u3092","\u306E","\u3067"]],pure:!0,fn:function(t){return ee.delimiter=",",ut(t)}},TSV\u53D6\u5F97:{type:"func",josi:[["\u3092","\u306E","\u3067"]],pure:!0,fn:function(t){return ee.delimiter=" ",ut(t)}},\u8868CSV\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return ee.delimiter=",",ct(t)}},\u8868TSV\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return ee.delimiter=" ",ct(t)}}},Jt=ar;var Bt={meta:{type:"const",value:{pluginName:"plugin_promise",description:"promise\u95A2\u9023\u306E\u547D\u4EE4\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako"],nakoVersion:"^3.6.0"}},\u521D\u671F\u5316:{type:"func",josi:[],pure:!0,fn:function(t){t.__promise==null&&(t.__promise={setLastPromise:function(e){return t.__setSysVar("\u305D",e),e}})}},\u305D:{type:"const",value:""},\u52D5\u6642:{type:"func",josi:[["\u3092","\u3067"]],pure:!0,fn:function(t,e){return e.__promise.setLastPromise(new Promise((n,r)=>t(n,r)))},return_none:!1},\u6210\u529F\u6642:{type:"func",josi:[["\u3092"],["\u306E","\u304C","\u306B"]],pure:!0,fn:function(t,e,n){return n.__promise.setLastPromise(e.then(r=>(n.__setSysVar("\u5BFE\u8C61",r),t(r))))},return_none:!1},\u51E6\u7406\u6642:{type:"func",josi:[["\u3092"],["\u306E","\u304C","\u306B"]],pure:!0,fn:function(t,e,n){return n.__promise.setLastPromise(e.then(r=>(n.__setSysVar("\u5BFE\u8C61",r),t(!0,r,n)),r=>(n.__setSysVar("\u5BFE\u8C61",r),t(!1,r,n))))},return_none:!1},\u5931\u6557\u6642:{type:"func",josi:[["\u3092"],["\u306E","\u304C","\u306B"]],pure:!0,fn:function(t,e,n){return n.__promise.setLastPromise(e.catch(r=>(n.__setSysVar("\u5BFE\u8C61",r),t(r))))},return_none:!1},\u7D42\u4E86\u6642:{type:"func",josi:[["\u3092"],["\u306E","\u304C","\u306B"]],pure:!0,fn:function(t,e,n){return n.__promise.setLastPromise(e.finally(()=>t()))},return_none:!1},\u675F:{type:"func",josi:[["\u3068","\u3092"]],pure:!0,fn:function(...t){return t.pop().__promise.setLastPromise(Promise.all(t))},return_none:!1}};var qt={meta:{type:"const",value:{pluginName:"plugin_test",description:"\u30C6\u30B9\u30C8\u3092\u63D0\u4F9B\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako","cnako","phpnako"],nakoVersion:"^3.6.0"}},\u521D\u671F\u5316:{type:"func",josi:[],pure:!0,fn:function(){}},ASSERT\u7B49:{type:"func",josi:[["\u3068"],["\u304C"]],pure:!0,fn:function(t,e){if(t!==e)throw new Error(`\u4E0D\u4E00\u81F4 [\u5B9F\u969B]${t} [\u671F\u5F85]${e}`);return!0}},\u30C6\u30B9\u30C8\u5B9F\u884C:{type:"func",josi:[["\u3068"],["\u3067"]],pure:!1,fn:function(t,e,n){n.__exec("ASSERT\u7B49",[t,e,n])}},\u30C6\u30B9\u30C8\u7B49:{type:"func",josi:[["\u3068"],["\u304C"]],pure:!1,fn:function(t,e,n){n.__exec("ASSERT\u7B49",[t,e,n])}}};var at=t=>JSON.parse(JSON.stringify(t)),Gt=600;function te(t={}){return typeof t!="object"&&(t={}),t.testOnly=t.testOnly||!1,t.resetEnv=t.resetEnv||!1,t.resetAll=t.resetAll||!1,t.preCode=t.preCode||"",t.nakoGlobal=t.nakoGlobal||null,t}var Ie=class t{constructor(e=void 0){e===void 0&&(e={useBasicPlugin:!0}),this.__varslist=[this.newVaiables(),this.newVaiables(),this.newVaiables()],this.__locals=this.newVaiables(),this.__self=this,this.__vars=this.__varslist[2],this.__v1=this.__varslist[1],this.__v0=this.__varslist[0],this.version=st.version,this.coreVersion=st.version,this.__globals=[],this.__globalObj=null,this.__module={},this.pluginFunclist={},this.funclist=this.newVaiables(),this.moduleExport=this.newVaiables(),this.pluginfiles={},this.commandlist=new Set,this.nakoFuncList=this.newVaiables(),this.eventList=[],this.codeGenerateor={},this.debugOption={useDebug:!1,waitTime:0},this.logger=new me,this.filename="main.nako3",this.dependencies={},this.usedFuncs=new Set,this.numFailures=0,e.useBasicPlugin&&this.addBasicPlugins(),this.prepare=K.getInstance(),this.parser=new Fe(this.logger),this.lexer=new q(this.logger),this.lexer.setFuncList(this.funclist),this.lexer.setModuleExport(this.moduleExport),this.reservedWords=JSON.parse(JSON.stringify(this.lexer.reservedWords)),this.josiList=JSON.parse(JSON.stringify(this.lexer.josiList))}getModList(){return this.lexer.modList}getLogger(){return this.logger}getNakoFuncList(){return this.nakoFuncList}getNakoFunc(e){return this.nakoFuncList.get(e)}getPluginfiles(){return this.pluginfiles}addBasicPlugins(){this.addPlugin(Pt),this.addPlugin(Rt),this.addPlugin(Bt),this.addPlugin(qt),this.addPlugin(Jt)}replaceLogger(){return this.lexer.logger=this.parser.logger=this.logger=new me}static listRequireStatements(e){let n=[];for(let r=0;r+2<e.length;r++){if(!(e[r].type==="not"&&(e[r+1].type==="string"||e[r+1].type==="string_ex")&&e[r+2].value==="\u53D6\u8FBC"))continue;let i=e[r+1].value+"";if(i.startsWith("\u8CAF\u8535\u5EAB:")&&(i=`https://n3s.nadesi.com/plain/${i.substring(4)}`),i.startsWith("\u62E1\u5F35\u30D7\u30E9\u30B0\u30A4\u30F3:")){let s=i.split(":")[1].match(/^([a-zA-Z0-9_-]+)\.(js|mjs|nako3)(@[0-9.]+)?$/);if(s){let u=s[1],c=s[2],a=s[3]||"@latest";c==="js"||c==="mjs"?(u.startsWith("nadesiko3-")||(u=`nadesiko3-${u}`),i=`https://cdn.jsdelivr.net/npm/${u}${a}/${u}.${c}`):i=`https://n3s.nadesi.com/plain/${u}.${c}`}else throw new B("\u300E\u53D6\u8FBC\u300F\u306E\u6307\u5B9A\u30A8\u30E9\u30FC\u3002\u300E\u62E1\u5F35\u30D7\u30E9\u30B0\u30A4\u30F3:(\u30D5\u30A1\u30A4\u30EB\u540D).(js|nako3)(@ver)\u300F\u306E\u66F8\u5F0F\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002",e[r].file,e[r].line)}n.push({...e[r],start:r,end:r+3,value:i,firstToken:e[r],lastToken:e[r+2]}),r+=2}return n}_loadDependencies(e,n,r,i){let o={},s=new t({useBasicPlugin:!0}),u=(f,l)=>{let p=i.readJs(f.filePath,f.firstToken);l.push(p.task.then(h=>{let d=h();this.addPluginFile(f.value,f.filePath,d,!1),o[f.filePath].funclist=d,o[f.filePath].moduleExport={},o[f.filePath].addPluginFile=()=>{this.addPluginFile(f.value,f.filePath,d,!1)}}))},c=(f,l)=>{let p=i.readNako3(f.filePath,f.firstToken),h=d=>{let g=q.filenameToModName(f.filePath);d=`\u300E${g}\u300F\u306B\u540D\u524D\u7A7A\u9593\u8A2D\u5B9A;\u300E${g}\u300F\u306B\u30D7\u30E9\u30B0\u30A4\u30F3\u540D\u8A2D\u5B9A;`+d+";\u540D\u524D\u7A7A\u9593\u30DD\u30C3\u30D7;";let b=this.rawtokenize(d,0,f.filePath);o[f.filePath].tokens=b;let m=new Map,y=new Map;return q.preDefineFunc(at(b),this.logger,m,y),o[f.filePath].funclist=m,o[f.filePath].moduleExport=y,a(d,f.filePath,"")};l.push(p.task.then(d=>h(d)))},a=(f,l,p)=>{let h=[],g=t.listRequireStatements(s.rawtokenize(f,0,l,p)).map(b=>({...b,...i.resolvePath(b.value,b.firstToken,l)}));for(let b of g){if(o.hasOwnProperty(b.filePath)){o[b.filePath].alias.add(b.value);continue}if(o[b.filePath]={tokens:[],alias:new Set([b.value]),addPluginFile:()=>{},funclist:{},moduleExport:{}},b.type==="js"||b.type==="mjs")u(b,h);else if(b.type==="nako3")c(b,h);else throw new B(`\u30D5\u30A1\u30A4\u30EB\u300E${b.value}\u300F\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3002\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u306A\u3044\u304B\u672A\u5BFE\u5FDC\u306E\u62E1\u5F35\u5B50\u3067\u3059\u3002`,b.firstToken.file,b.firstToken.line)}if(h.length>0)return Promise.all(h)};try{let f=a(e,n,r);return f!==void 0&&f.catch(l=>{this.logger.error(l.msg),this.numFailures++}),this.dependencies=o,f}catch(f){throw this.logger.error(""+f),f}}rawtokenize(e,n,r,i=""){if(!e.startsWith(i))throw new Error("code\u306E\u5148\u982D\u306B\u306FpreCode\u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");let o=q.filenameToModName(r),s=this.getModList();s.indexOf(o)<0&&s.unshift(o);let u=this.prepare.convert(e),c=new Le(e.length,u),a=new De(e,[],[]),f=new pe(e),l;try{l=this.lexer.tokenize(u.map(p=>p.text).join(""),n,r)}catch(p){if(!(p instanceof z))throw p;let h=a.map(c.map(p.preprocessedCodeStartOffset),c.map(p.preprocessedCodeEndOffset)),d=h.startOffset===null?p.line:f.map(h.startOffset,!1).line,g=it({...h,line:d},i);throw new ne(p.msg,g.startOffset,g.endOffset,g.line,r)}return l=It(l),l=Vt(l),l=Tt(l),l=Nt(l),l=l.map(p=>{let h=a.map(c.map(p.preprocessedCodeOffset||0),c.map((p.preprocessedCodeOffset||0)+(p.preprocessedCodeLength||0))),d=p.line,g=0;if(p.type==="eol"&&h.endOffset!==null){let b=f.map(h.endOffset,!1);d=b.line,g=b.column}else if(h.startOffset!==null){let b=f.map(h.startOffset,!1);d=b.line,g=b.column}return{...p,...it({line:d,column:g,startOffset:h.startOffset,endOffset:h.endOffset},i),rawJosi:p.josi}}),l}converttoken(e,n,r){return this.lexer.replaceTokens(e,n,r)}reset(e=void 0){(!e||e.needToClearPlugin)&&this.clearPlugins(),this.__varslist=[this.__varslist[0],this.newVaiables(),this.newVaiables()],this.__v0=this.__varslist[0],this.__v1=this.__varslist[1],this.__vars=this.__varslist[2],this.__locals=this.newVaiables(),this.funclist=new Map;for(let n of this.__v0.keys()){let r=this.pluginFunclist[n];r&&this.funclist.set(n,JSON.parse(JSON.stringify(r)))}this.lexer.setFuncList(this.funclist),this.moduleExport=new Map,this.lexer.setModuleExport(this.moduleExport),this.logger.clear()}lexCodeToken(e,n,r,i){let o=this.rawtokenize(e,n,r,"");if(i===null)for(let u of o)u.startOffset=void 0,u.endOffset=void 0;else for(let u of o)u.startOffset!==void 0&&(u.startOffset+=i),u.endOffset!==void 0&&(u.endOffset+=i);let s=o.filter(u=>u.type==="line_comment"||u.type==="range_comment").map(u=>({...u}));return o=this.converttoken(o,!1,r),{tokens:o,commentTokens:s}}replaceRequireStatements(e,n=new Set){let r=[];for(let i of t.listRequireStatements(e).reverse()){if(n.has(i.value)){r.push(...e.splice(i.start||0,(i.end||0)-(i.start||0)));continue}let o=Object.keys(this.dependencies).find(u=>this.dependencies[u].alias.has(i.value));if(o===void 0)throw i.firstToken?new ne(`\u30D5\u30A1\u30A4\u30EB\u300E${i.value}\u300F\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002`,i.firstToken.startOffset||0,i.firstToken.endOffset||0,i.firstToken.line,i.firstToken.file):new Error(`\u30D5\u30A1\u30A4\u30EB\u300E${i.value}\u300F\u304C\u8AAD\u307F\u8FBC\u307E\u308C\u3066\u3044\u307E\u305B\u3093\u3002`);this.dependencies[o].addPluginFile();let s=at(this.dependencies[o].tokens);n.add(i.value),r.push(...this.replaceRequireStatements(s,n)),r.push(...e.splice(i.start||0,(i.end||0)-(i.start||0),...s))}return r}removeRequireStatements(e){let n=[];for(let r of t.listRequireStatements(e).reverse()){let i=Object.keys(this.dependencies).find(o=>this.dependencies[o].alias.has(r.value));i!==void 0&&this.dependencies[i].addPluginFile(),n.push(...e.splice(r.start||0,(r.end||0)-(r.start||0)))}return n}lex(e,n="main.nako3",r="",i=!1){let o=this.rawtokenize(e,0,n,r),s=i?this.removeRequireStatements(o):this.replaceRequireStatements(o,void 0);for(let c of s)(c.type==="word"||c.type==="not")&&(c.type="require");if(s.length>=3)for(let c=0;c<s.length;c+=3){let a=s[c+1].value;a=q.filenameToModName(a),this.lexer.modList.indexOf(a)<0&&this.lexer.modList.push(a)}let u=o.filter(c=>c.type==="line_comment"||c.type==="range_comment").map(c=>({...c}));o=this.converttoken(o,!0,n);for(let c=0;c<o.length;c++)if(o[c]&&o[c].type==="code"){let a=this.lexCodeToken(o[c].value,o[c].line,n,o[c].startOffset||0);u.push(...a.commentTokens),o.splice(c,1,...a.tokens),c--}return this.logger.trace(`--- lex ---
426
- `+JSON.stringify(o,null,2)),{commentTokens:u,tokens:o,requireTokens:s}}parse(e,n,r=""){this.lexer.setFuncList(this.funclist),this.parser.setFuncList(this.funclist),this.lexer.setModuleExport(this.moduleExport),this.parser.setModuleExport(this.moduleExport);let i=this.lex(e,n,r),o;try{this.parser.genMode="sync",o=this.parser.parse(i.tokens,n)}catch(s){throw typeof s.startOffset!="number"?_.fromNode(s.message,i.tokens[this.parser.getIndex()]):s}return this.usedFuncs=this.parser.usedFuncs,this.deleteUnNakoFuncs(),this.logger.trace(`--- ast ---
427
- `+JSON.stringify(o,null,2)),o}getUsedFuncs(e){let n=[e];for(this.usedFuncs=new Set;n.length>0;){let r=n.pop();r!=null&&r.block!==null&&r.block!==void 0&&this.getUsedAndDefFuncs(n,JSON.parse(JSON.stringify(r.block)))}return this.deleteUnNakoFuncs()}getUsedAndDefFuncs(e,n){for(;n.length>0;){let r=n.pop();r!=null&&this.getUsedAndDefFunc(r,e,n)}}getUsedAndDefFunc(e,n,r){["func","func_pointer"].includes(e.type)&&e.name!==null&&e.name!==void 0&&this.usedFuncs.add(e.name),n.push([e,e.block]),r.push.apply(r,[e.value].concat(e.args))}deleteUnNakoFuncs(){for(let e of this.usedFuncs)this.commandlist.has(e)||this.usedFuncs.delete(e);return this.usedFuncs}compile(e,n,r=!1,i=""){let o=te();return o.testOnly=r,o.preCode=i,this.compileFromCode(e,n,o).runtimeEnv}compileFromCode(e,n,r=void 0){n===""&&(n="main.nako3"),r===void 0&&(r=te());try{r.resetEnv&&this.reset(),r.resetAll&&this.clearPlugins(),this.eventList.filter(s=>s.eventName==="beforeParse").map(s=>s.callback(e));let i=this.parse(e,n,r.preCode);this.eventList.filter(s=>s.eventName==="beforeGenerate").map(s=>s.callback(i));let o=this.generateCode(i,new _e(r.testOnly));return this.eventList.filter(s=>s.eventName==="afterGenerate").map(s=>s.callback(o)),o}catch(i){throw this.logger.error(i),i}}generateCode(e,n){let r=e.genMode||"";if(r==="sync")return Et(this,e,n);r==="\u975E\u540C\u671F\u30E2\u30FC\u30C9"&&this.logger.error("\u300E!\u975E\u540C\u671F\u30E2\u30FC\u30C9\u300F\u306F\u5EC3\u6B62\u3055\u308C\u307E\u3057\u305F\u3002[\u8A73\u7D30](https://github.com/kujirahand/nadesiko3/issues/1164)");let i=this.codeGenerateor[r];if(!i)throw new Error(`\u30B3\u30FC\u30C9\u30B8\u30A7\u30CD\u30EC\u30FC\u30BF\u306E\u300C${r}\u300D\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002`);return i.generate(this,e,n.isTest)}addCodeGenerator(e,n){this.codeGenerateor[e]=n}async _run(e,n,r,i,o=""){let s=te({resetEnv:r,resetAll:r,testOnly:i,preCode:o});return this._runEx(e,n,s)}clearPlugins(){this.__globals.forEach(e=>{e.__setSysVar("__forceClose",!0),e.reset()}),this.__globals=[]}evalJS(e,n){this.__globalObj=n,this.__globalObj.lastJSCode=e,this.eventList.filter(r=>r.eventName==="beforeRun").map(r=>r.callback(n));try{new Function(n.lastJSCode).apply(n)}catch(r){throw n.numFailures++,this.getLogger().error(r),r}this.eventList.filter(r=>r.eventName==="finish").map(r=>r.callback(n))}runSync(e,n,r=void 0){r=te(r);let i=this.compileFromCode(e,n,r),o=this.getNakoGlobal(r,i.gen,n);return this.evalJS(i.runtimeEnv,o),o}async runAsync(e,n,r=void 0){r=te(r);let i=this.compileFromCode(e,n,r),o=this.getNakoGlobal(r,i.gen,n);return this.evalJS(i.runtimeEnv,o),o}getNakoGlobal(e,n,r){let i=e.nakoGlobal;return i||(this.__globals.length>0&&e.resetAll===!1&&e.resetEnv===!1?i=this.__globals[this.__globals.length-1]:i=new Ve(this,n,this.__globals.length+1),i.__varslist[0].set("\u540D\u524D\u7A7A\u9593",q.filenameToModName(r))),this.__globals.indexOf(i)<0&&this.__globals.push(i),i}addListener(e,n){this.eventList.push({eventName:e,callback:n})}test(e,n,r="",i=!1){let o=te();return o.preCode=r,o.testOnly=i,this.runSync(e,n,o)}run(e,n="main.nako3",r=""){let i=te();return i.preCode=r,this.runSync(e,n,i)}compileStandalone(e,n,r){r===void 0&&(r=new _e);let i=this.parse(e,n);return this.generateCode(i,r).standalone}addPlugin(e,n=!0,r=""){let i=this.__varslist[0],o=i.get("__pluginInfo");o||(o={},i.set("__pluginInfo",o));let s=0,u="unknown",c={pluginName:"unknown",nakoVersionResult:!0,nakoVersion:"0.0.0",path:""};if(e.meta&&e.meta.value&&typeof e.meta=="object"){c=e.meta.value||{pluginName:"unknown",nakoVersion:"0.0.0"},u=c.pluginName||"unknown";let p=((c.nakoVersion||"0.0.0")+".0.0").split(".").map(h=>parseInt(h));s=p[1]*100+p[2],c.path=r}if(u==="unknown"&&(u=Object.keys(e).join("-")),o[u]!==void 0)return;if(u=(f=>f.replace(/[^a-zA-z0-9\-_\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FAF\u3400-\u4DBF\uF900-\uFAFF]/g,"_"))(u),o[u]=c,Gt>s){let f=Object.keys(e).join(",");if(u==="unknown"&&(u=f.substring(0,30)+"..."),u!==""){let l=`\u306A\u3067\u3057\u3053\u30D7\u30E9\u30B0\u30A4\u30F3\u300E${u}\u300F\u306F\u53E4\u3044\u5F62\u5F0F\u306A\u306E\u3067\u6B63\u3057\u304F\u52D5\u4F5C\u3057\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002(\u30E9\u30F3\u30BF\u30A4\u30E0\u306E\u8981\u6C42: ${Gt}/\u30D7\u30E9\u30B0\u30A4\u30F3: ${s})`;console.warn(l,"see","https://github.com/kujirahand/nadesiko3/issues/1647"),this.logger.warn(l),c.nakoVersionResult=!1}}if(this.__module[u]=e,this.pluginfiles[u]="*",typeof e.\u521D\u671F\u5316=="object"){let f=e.\u521D\u671F\u5316;delete e.\u521D\u671F\u5316;let l=`!${u}:\u521D\u671F\u5316`;e[l]=f}for(let f in e){let l=e[f];if(this.funclist.set(f,l),n&&(this.pluginFunclist[f]=JSON.parse(JSON.stringify(l))),l.type==="func")i.set(f,l.fn),l.asyncFn&&(l.pure=!0);else if(l.type==="const"||l.type==="var")i.set(f,l.value);else throw console.error("[\u30D7\u30E9\u30B0\u30A4\u30F3\u8FFD\u52A0\u30A8\u30E9\u30FC]",l),new Error("\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u8FFD\u52A0\u3067\u30A8\u30E9\u30FC\u3002");f==="\u521D\u671F\u5316"||f.substring(0,1)==="!"||this.commandlist.add(f)}}addPluginObject(e,n,r=!0){n.meta===void 0&&(n.meta={type:"const",value:{pluginName:e,nakoVersion:"0.0.0"}}),this.addPlugin(n,r)}addPluginFile(e,n,r,i=!0){this.addPluginFromFile(n,r,i)}addPluginFromFile(e,n,r=!0){this.addPlugin(n,r,e)}addFunc(e,n,r,i=!0,o=!1){let s={josi:n,fn:r,type:"func",return_none:i,asyncFn:o,pure:!0};this.funclist.set(e,s),this.pluginFunclist[e]=at(s),this.__varslist[0].set(e,r)}setFunc(e,n,r,i=!0,o=!1){this.addFunc(e,n,r,i,o)}getFunc(e){return this.funclist.get(e)}_runEx(e,n,r,i="",o=void 0){return r.preCode=i,o&&(r.nakoGlobal=o),this.runSync(e,n,r)}runEx(e,n,r,i=""){return this._runEx(e,n,r,i)}async runReset(e,n="main.nako3",r=""){let i=te({resetAll:!0,resetEnv:!0});return this._runEx(e,n,i,r)}newVaiables(e){return new Map(e)}};var Ut=["!\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587","!\u3053\u3053\u307E\u3067\u3060\u308B\u3044"];function fr(t,e="main.nako3"){return et(t,Ut)?hr(t,e):{code:t,insertedLines:[],deletedLines:[]}}function lr(t){return et(t,Ut)}var Ht="\u{1F377}\u{1F377}\u6539\u884C\u{1F379}\u9ED0\u9ED1\u9F18\u9F36\u9F48\u25A8\u{1F37A}\u{1F37A}\u{1F376}\u{1F376}",X=Ht;function pr(t){for(X=Ht;t.indexOf(X)>=0;){let e=String.fromCodePoint(Math.floor(Math.random()*40952)+19968);X+=e+e}return X}function lt(t){let e=K.getInstance(),n=t.length,r="",i="",o=0,s=!1;for(;o<n;){let u=t.charAt(o),c=t.substring(o,2),a=e.convert1ch(u),f=c.split("").map(l=>e.convert1ch(l)).join("");if(i!==""){i===(i.length===1?a:f)?(s||(r+=t.substr(o,i.length)),o+=i.length,s=!1,i=""):(s||(r+=u),o++);continue}switch(a){case'"':case"'":i=u,r+=u,o++;continue;case"\u300C":i="\u300D",r+=u,o++;continue;case"\u300E":i="\u300F",r+=u,o++;continue;case"\u201C":i="\u201D",r+=u,o++;continue;case"{":i="}",r+=u,o++;continue;case"[":i="]",r+=u,o++;continue}switch(c){case"\u{1F334}":i="\u{1F334}",r+=c,o+=2;continue;case"\u{1F33F}":i="\u{1F33F}",r+=c,o+=2;continue}if(a==="#"){i=`
428
- `,s=!0,o++;continue}if(f==="//"){i=`
429
- `,s=!0,o+=2;continue}if(f==="/*"){i="*/",s=!0,o+=2;continue}r+=u,o++}return r}function hr(t,e){let n=[],r=[],i="\u3053\u3053\u307E\u3067\u2030",s=zt(t).split(`
430
- `),u=[],c=[],a=0;pr(t);let f=-1;for(s.forEach(p=>{if(f+=p.split(X).length,/^[  ・\t]*$/.test(p)){r.push({lineNumber:u.length,len:p.length});return}let h=lt(p).replace(/^[  ・\t]+/,"").replace(/\s+$/,"");if(h===""){u.push(p);return}if(h==="\u3053\u3053\u307E\u3067")throw new ue("\u30A4\u30F3\u30C7\u30F3\u30C8\u69CB\u6587\u304C\u6709\u52B9\u5316\u3055\u308C\u3066\u3044\u308B\u3068\u304D\u306B\u300E\u3053\u3053\u307E\u3067\u300F\u3092\u4F7F\u3046\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002",f,e);let d=Pe(p);if(a===d){u.push(p);return}if(a<d){c.push(a),a=d,u.push(p);return}if(a>d)for(a=d;c.length>0;){let g=c.pop()||0;if(g===d){h.substring(0,3)!=="\u9055\u3048\u3070"&&(n.push(u.length),u.push(ft(g)+i)),u.push(p);return}if(d<g){n.push(u.length),u.push(ft(g)+i);continue}}});c.length>0;){let p=c.pop()||0;n.push(u.length),u.push(ft(p)+i)}let l=[];for(let p=0;p<u.length;p++)if(u[p].includes(X)){let h=u[p].split(X);for(let d=0;d<n.length;d++)l.length<n[d]&&(n[d]+=h.length-1);for(let d=0;d<r.length;d++)l.length<r[d].lineNumber&&(r[d].lineNumber+=h.length-1);l.push(...h)}else l.push(u[p]);return{code:l.join(`
431
- `),insertedLines:n,deletedLines:r}}function ft(t){let e="";for(let n=0;n<t;n++)e+=" ";return e}function Wt(t){let e=/^([  ・\t]*)/.exec(lt(t));return e?e[1]:""}function Pe(t){let e=0;for(let n=0;n<t.length;n++){let r=t.charAt(n);if(r===" "){e++;continue}if(r==="\u3000"){e+=2;continue}if(r==="\u30FB"){e+=2;continue}if(r===" "){e+=4;continue}break}return e}function zt(t){let e=K.getInstance(),n=t.length,r="",i="",o=0;for(;o<n;){let s=t.charAt(o),u=t.substr(o,2),c=e.convert1ch(s),a=u.split("").map(f=>e.convert1ch(f)).join("");if(i!==""){i===(i.length===1?c:a)?(r+=t.substr(o,i.length),o+=i.length,i=""):(s===`
432
- `?r+=X:r+=s,o++);continue}switch(c){case'"':case"'":i=s,r+=s,o++;continue;case"\u300C":i="\u300D",r+=s,o++;continue;case"\u300E":i="\u300F",r+=s,o++;continue;case"\u201C":i="\u201D",r+=s,o++;continue;case"{":i="}",r+=s,o++;continue;case"[":i="]",r+=s,o++;continue}switch(u){case"\u{1F334}":i="\u{1F334}",r+=u,o+=2;continue;case"\u{1F33F}":i="\u{1F33F}",r+=u,o+=2;continue}if(c==="#"){i=`
433
- `,r+=s,o++;continue}if(a==="//"){i=`
434
- `,r+=u,o+=2;continue}if(a==="/*"){i="*/",r+=u,o+=2;continue}r+=s,o++}return r}function dr(t){let e={lines:[],pairs:[],parents:[],spaces:[]},n=zt(t).split(`
435
- `),r=[],i=0,o=Pe(n[0]);for(let s of n){let u=s.split(X).length,c=lt(s),a=c.replace(/^[  ・\t]+/,"")===""?o:Pe(c);if(e.lines.push(...Array(u).fill(a)),e.spaces.push(...Array(u).fill(Wt(c))),o<a)r.push(i-1);else if(o>a){let l=r.pop();l!==void 0&&e.pairs.push([l,i])}let f=r[r.length-1]!==void 0?r[r.length-1]:null;e.parents.push(...Array(u).fill(f)),o=a,i+=u}for(let s of r)e.pairs.push([s,i]);return e}var ye={convert:fr,getBlockStructure:dr,getIndent:Wt,countIndent:Pe,isIndentSyntaxEnabled:lr};var _r=ye.getBlockStructure,be=ye.getIndent,Kt=ye.countIndent,gr=ye.isIndentSyntaxEnabled;function mr(t){switch(t.type){case"line_comment":return"comment.line";case"range_comment":return"comment.block";case"def_test":return"keyword.control";case"def_func":return"keyword.control";case"func":return"entity.name.function";case"number":return"constant.numeric";case"\u3068\u306F":case"\u306A\u3089\u3070":case"\u3067\u306A\u3051\u308C\u3070":return"keyword.control";case"\u3053\u3053\u304B\u3089":case"\u3053\u3053\u307E\u3067":case"\u3082\u3057":case"\u9055\u3048\u3070":case"require":return"keyword.control";case"\u56DE":case"\u9593":case"\u7E70\u308A\u8FD4\u3059":case"\u53CD\u5FA9":case"\u629C\u3051\u308B":case"\u7D9A\u3051\u308B":case"\u623B\u308B":case"\u5148\u306B":case"\u6B21\u306B":case"\u4EE3\u5165":case"\u9010\u6B21\u5B9F\u884C":case"\u6761\u4EF6\u5206\u5C90":case"\u53D6\u8FBC":case"\u30A8\u30E9\u30FC\u76E3\u8996":case"\u30A8\u30E9\u30FC":case"\u5909\u6570":case"\u5B9F\u884C\u901F\u5EA6\u512A\u5148":return"keyword.control";case"\u5B9A\u3081\u308B":case"\u5B9A\u6570":return"support.constant";case"shift_r0":case"shift_r":case"shift_l":case"gteq":case"lteq":case"noteq":case"eq":case"not":case"gt":case"lt":case"and":case"or":case"@":case"+":case"-":case"**":case"*":case"\xF7\xF7":case"/":case"%":case"^":case"&":return"keyword.operator";case"string":case"string_ex":return"string.other";case"word":return["\u305D\u3046","\u305D\u308C","\u56DE\u6570","\u5BFE\u8C61\u30AD\u30FC","\u5BFE\u8C61"].includes(t.value)?"variable.language":"variable.other";default:return"markup.other"}}function Re(t,e,n,r,i){let o=mr(t),s=br(t,e);return t.rawJosi&&n.length>=t.rawJosi.length&&r&&i?[{type:o,docHTML:s,value:n.slice(0,-t.rawJosi.length)},{type:o+".markup.underline",docHTML:s,value:n.slice(-t.josi.length)}]:[{type:o,docHTML:s,value:n}]}function pt(t,e){for(let n of Object.keys(e.__module))if(Object.keys(e.__module[n]).includes(t))return n;return null}function yr(t){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");return t.toString(26).split("").map(n=>e[parseInt(n,26)]).join("")}function qe(t){let e=t.map((n,r)=>n.map(i=>`${yr(r)}${i}`).join("|")).join("\u3001");return e!==""?`\uFF08${e}\uFF09`:""}function Je(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function br(t,e){let n=r=>`<span class="tooltip-plugin-name">${Je(r)}</span>`;if(t.type==="func"){let r=pt(t.value+"",e)||(t.meta&&t.meta.file?t.meta.file:null),i=t.meta&&t.meta.josi?qe(t.meta.josi):"";return r?Je(i+t.value)+n(r):Je(i+t.value)}else if(t.type==="word"){let r=pt(t.value+"",e)||(t.meta&&t.meta.file?t.meta.file:null);if(r)return Je(t.value+"")+n(r)}return null}var Be=(t,e)=>[{type:"markup.other",value:e.getLine(t),docHTML:null}],Zt=(t,e)=>{let n=t.logger;try{return t.replaceLogger(),e()}finally{t.logger=n}};function Xt(t,e,n){let r=t.join(`
436
- `);e.reset({needToClearPlugin:!1});let i=Zt(e,()=>e.lex(r,"main.nako3",void 0,!0));i.commentTokens=i.commentTokens.filter(a=>a.file==="main.nako3"),i.requireTokens=i.requireTokens.filter(a=>a.file==="main.nako3"),i.tokens=i.tokens.filter(a=>a.file==="main.nako3");for(let[a,{funclist:f}]of Object.entries(e.dependencies))for(let l of i.tokens)l.type==="word"&&l.value!=="\u305D\u308C"&&f[l.value]&&(l.type="func",l.meta={...f[l.value+""],file:a});let o=[...i.tokens,...i.commentTokens,...i.requireTokens].filter(a=>a.type!=="eol"&&a.type!=="eof"&&typeof a.startOffset=="number"&&typeof a.endOffset=="number"&&a.startOffset<a.endOffset);o.sort((a,f)=>(a.startOffset||0)-(f.startOffset||0));let s=0,u=0,c=[];for(let a=0;a<t.length;a++){c.push([]);let f=s+t[a].length,l=s;for(;u<o.length&&o[u].endOffset<=s;)u++;if(u<o.length&&o[u].startOffset<=s&&o[u].endOffset>=f)c[a].push(...Re(o[u],e,t[a],o[u].endOffset<=f,n));else{for(u<o.length&&o[u].startOffset<=s&&(c[a].push(...Re(o[u],e,r.slice(l,o[u].endOffset),!0,n)),l=o[u].endOffset,u++);u<o.length&&o[u].endOffset<f;)l<o[u].startOffset&&(c[a].push({type:"markup.other",docHTML:null,value:r.slice(l,o[u].startOffset)}),l=o[u].startOffset),c[a].push(...Re(o[u],e,r.slice(l,o[u].endOffset),!0,n)),l=o[u].endOffset,u++;u<o.length&&o[u].startOffset<f?(l<o[u].startOffset&&(c[a].push({type:"markup.other",docHTML:null,value:r.slice(l,o[u].startOffset)}),l=o[u].startOffset),c[a].push(...Re(o[u],e,r.slice(o[u].startOffset,f),o[u].endOffset<=f,n))):c[a].push({type:"markup.other",docHTML:null,value:r.slice(l,f)})}s+=t[a].length+1}return{editorTokens:c,lexerOutput:i}}var ht=class t{constructor(e,n,r,i){this.session=e,this.doc=n,this.AceRange=r,this.markers=[],this.hasAnnotations=!1,this.disable=i}static fromNullable(e,n,r,i,o){return n===null&&(n=0),r===null&&(r=e),i===null&&(i=o(r).length),e===r&&n===i&&i++,[e,n,r,i]}static fromOffset(e,n,r){let i=new pe(e),o=i.map(n,!1),s=i.map(r,!1);return[o.line,o.column,s.line,s.column]}static fromError(e,n,r){return typeof n.startOffset=="number"&&typeof n.endOffset=="number"?this.fromOffset(e,n.startOffset,n.endOffset):typeof n.line=="number"?this.fromNullable(n.line,null,null,null,r):this.fromNullable(0,null,null,null,r)}add(e,n,r,i,o,s){if(this.disable)return;let u=new this.AceRange(...t.fromNullable(e,n,r,i,c=>this.doc.getLine(c)));this.markers.push(this.session.addMarker(u,"marker-"+(s==="warn"?"yellow":"red"),"text",!1)),this.session.setAnnotations([{row:e,column:n,text:o,type:s==="warn"?"warning":"error"}]),this.hasAnnotations=!0}addByError(e,n,r){this.add(...t.fromError(e,n,i=>this.doc.getLine(i)),n.message,r)}clear(){for(let e of this.markers)this.session.removeMarker(e);this.markers.length=0,this.hasAnnotations&&(this.session.clearAnnotations(),this.hasAnnotations=!1)}},dt=class{constructor(e,n,r,i,o){this.onUpdate=r,this.doc=e,this.dirty=!0,this.nako3=n,this.onCompileError=i,this.underlineJosi=o,this.lastLexerOutput=null,this.lines=this.doc.getAllLines().map(u=>[{type:"markup.other",value:u,docHTML:null}]),this.cache=null,this.deleted=!1,this.enabled=!0;let s=()=>{if(!this.deleted)if(this.dirty&&this.enabled){let u=Date.now();this.dirty=!1;let c=this.doc.getAllLines().join(`
437
- `);try{let a=Date.now(),f=Xt(this.doc.getAllLines(),n,this.underlineJosi);this.lastLexerOutput=f.lexerOutput,this.lines=f.editorTokens,this.cache={code:c,lines:JSON.stringify(this.lines)},r(0,this.doc.getLength()-1,Date.now()-a)}catch(a){i(c,a)}setTimeout(s,Math.max(100,Math.min(5e3,(Date.now()-u)*5)))}else setTimeout(s,100)};setTimeout(()=>{s()},0)}dispose(){this.deleted=!0}$updateOnChange(e){this.dirty=!0;let n=e.start.row,r=e.end.row;if(n===r)if(e.action==="insert"&&this.lines[n]){let i=e.start.column,o=this.lines[n].filter(a=>a.type!=="composition_placeholder"),s=[],u=0,c=0;for(;u<o.length&&c+o[u].value.length<=i;)s.push(o[u]),c+=o[u].value.length,u++;for(u<o.length&&c<i?(s.push({type:o[u].type,value:o[u].value.slice(0,i-c),docHTML:null}),s.push({type:"markup.other",value:e.lines[0],docHTML:null}),s.push({type:o[u].type,value:o[u].value.slice(i-c),docHTML:null}),u++):s.push({type:"markup.other",value:e.lines[0],docHTML:null});u<o.length;)s.push(o[u]),u++;this.lines[n]=s}else this.lines[n]=Be(n,this.doc);else e.action==="remove"?this.lines.splice(n,r-n+1,Be(n,this.doc)):this.lines.splice(n,1,...Array(r-n+1).fill(null).map((i,o)=>Be(o+n,this.doc)))}getTokens(e){if(!this.lines[e]){let n=!1;if(this.enabled){let r=this.doc.getAllLines().join(`
438
- `);if(this.cache!==null&&this.cache.code===r)n=!0;else try{let i=Xt(this.doc.getAllLines(),this.nako3,this.underlineJosi);this.cache={code:r,lines:JSON.stringify(i.editorTokens)},n=!0}catch(i){i instanceof I||console.error(i)}}n&&this.cache!==null?this.lines[e]=JSON.parse(this.cache.lines)[e]:this.lines[e]=Be(e,this.doc)}return this.lines[e]}start(e){}fireUpdateEvent(e,n){}setDocument(e){}scheduleStart(){}setTokenizer(e){}stop(){}getState(e){return"start"}},J=class t{constructor(e,n){this.AceRange=e,this.nako3=n}static toggleCommentLines(e,{doc:n},r,i){let o=K.getInstance(),s=c=>{let a=be(c);if(a===c)return{type:"blank"};c=c.substring(a.length);let f=c.substring(0,2).split("").map(l=>o.convert1ch(l)).join("");return f.substring(0,1)==="#"?{type:"comment",start:a.length,len:1+(c.charAt(1)===" "?1:0)}:f==="//"?{type:"comment",start:a.length,len:2+(c.charAt(2)===" "?1:0)}:{type:"code"}},u=[];for(let c=r;c<=i;c++)u.push(c);if(!u.every(c=>s(n.getLine(c)).type==="blank")&&u.every(c=>s(n.getLine(c)).type!=="code"))for(let c of u){let a=s(n.getLine(c));a.type==="comment"&&n.removeInLine(c,a.start,a.start+a.len)}else{let c=Math.min(...u.map(a=>Kt(n.getLine(a))));for(let a of u){let f=n.getLine(a),l=f.length;for(let p=0;p<f.length;p++)if(Kt(f.slice(0,p))>=c){l=p;break}n.insertInLine({row:a,column:l},"// ")}}}static checkOutdent(e,n,r){return/^[  ・\t]*ここまで$/.test(n+r)}autoOutdent(e,{doc:n},r){if(r===0)return;let i=n.getLine(r-1),o;if(t.isBlockStart(i))o=be(i);else{let u=this.getBlockStructure(n.getAllLines().join(`
439
- `)),c=u.parents[r];o=c!==null?u.spaces[c]:""}let s=be(n.getLine(r));n.replace(new this.AceRange(r,0,r,s.length),o)}static getNextLineIndent(e,n,r){return this.isBlockStart(n)?be(n)+r:be(n)}static isBlockStart(e){return/^[  ・\t]*●|(ならば|なければ|ここから|条件分岐|違えば|回|繰り返(す|し)|の間|反復|とは|には|エラー監視|エラーならば|実行速度優先)、?\s*$/.test(e)}static getCompletionItems(e,n,r,i){let o=new Map,s=new Set,u=(c,a,f)=>{let l=o.get(c);if(l)l.meta.add(f);else{let p=n.split("").filter(h=>a.includes(h)).length;o.set(c,{value:a,meta:new Set([f]),score:p}),s.add(a)}};for(let c of Object.keys(r.__varslist[0])){if(c.startsWith("!"))continue;let a=r.funclist[c];if(typeof a!="object"||a===null)continue;let f=pt(c,r)||"\u30D7\u30E9\u30B0\u30A4\u30F3";a.type==="func"?u(qe(a.josi)+c,c,f):u(c,c,f)}for(let[c,{funclist:a}]of Object.entries(r.dependencies))for(let[f,l]of Object.entries(a)){let p=l&&l.type==="func"?qe(l.josi):"";u(p+f,f,c)}if(i.lastLexerOutput!==null)for(let c of i.lastLexerOutput.tokens){let a=c.value+"";if(!(c.line===e||s.has(a))){if(c.type==="word")u(a,a,"\u5909\u6570");else if(c.type==="func"){let f=r.funclist[a],l=f&&f.type==="func"?qe(f.josi):"";u(l+a,a,"\u95A2\u6570")}}}return Array.from(o.entries()).map(([c,a])=>({caption:c,...a,meta:Array.from(a.meta).join(", ")}))}static getSnippets(e){let n=gr(e),r=(i,o,s)=>n?{caption:i,meta:`\u21E5 ${o}`,score:1,snippet:s.replace(/\t*ここまで(\n|$)/g,"").replace(/\t/g," ")}:{caption:i,meta:`\u21E5 ${o}`,score:1,snippet:s.replace(/\t/g," ")};return[r("if","\u3082\u3057\u301C\u306A\u3089\u3070",`\u3082\u3057\${1:1=1}\u306A\u3089\u3070
440
- \${2:1\u3092\u8868\u793A}
441
- \u9055\u3048\u3070
442
- \${3:2\u3092\u8868\u793A}
443
- \u3053\u3053\u307E\u3067
444
- `),r("times","\u301C\u56DE",`\${1:3}\u56DE
445
- \${2:1\u3092\u8868\u793A}
446
- \u3053\u3053\u307E\u3067
447
- `),r("for","\u7E70\u308A\u8FD4\u3059","${1:N}\u3067${2:1}\u304B\u3089${3:3}\u307E\u3067\u7E70\u308A\u8FD4\u3059\n ${4:N\u3092\u8868\u793A}\n\u3053\u3053\u307E\u3067\n"),r("while","\u301C\u306E\u9593",`\${1:N<2\u306E\u9593}
448
- N=N+1
449
- \u3053\u3053\u307E\u3067
450
- `),r("foreach","\u301C\u3092\u53CD\u5FA9",`\${1:[1,2,3]}\u3092\u53CD\u5FA9
451
- \${2:\u5BFE\u8C61\u3092\u8868\u793A}
452
- \u3053\u3053\u307E\u3067
453
- `),r("switch","\u301C\u3067\u6761\u4EF6\u5206\u5C90",`\${1:N}\u3067\u6761\u4EF6\u5206\u5C90
454
- \${2:1}\u306A\u3089\u3070
455
- \${3:1\u3092\u8868\u793A}
456
- \u3053\u3053\u307E\u3067
457
- \${4:2}\u306A\u3089\u3070
458
- \${5:2\u3092\u8868\u793A}
459
- \u3053\u3053\u307E\u3067
460
- \u9055\u3048\u3070
461
- \${6:3\u3092\u8868\u793A}
462
- \u3053\u3053\u307E\u3067
463
- \u3053\u3053\u307E\u3067
464
- `),r("function","\u25CF\u301C\u3068\u306F","\u25CF\uFF08${1:A\u3068B\u3092}\uFF09${2:\u8DB3\u3059}\u3068\u306F\n ${3:A+B\u3092\u623B\u3059}\n\u3053\u3053\u307E\u3067\n"),r("test","\u25CF\u30C6\u30B9\u30C8:\u301C\u3068\u306F",`\u25CF\u30C6\u30B9\u30C8:\${2:\u8DB3\u3059}\u3068\u306F
465
- 1\u30682\u3092\u8DB3\u3059
466
- \u305D\u308C\u30683\u304CASSERT\u7B49\u3057\u3044
467
- \u3053\u3053\u307E\u3067
468
- `),r("try","\u30A8\u30E9\u30FC\u76E3\u8996",`\u30A8\u30E9\u30FC\u76E3\u8996
469
- \${1:1\u306E\u30A8\u30E9\u30FC\u767A\u751F}
470
- \u30A8\u30E9\u30FC\u306A\u3089\u3070
471
- \${2:2\u3092\u8868\u793A}
472
- \u3053\u3053\u307E\u3067
473
- `)]}static getCompletionPrefix(e,n){let r=null;if(e.length===0||!/[ぁ-んa-zA-Zァ-ヶー\u3005\u4E00-\u9FCF]/.test(e[e.length-1]))return"";try{n.reset(),r=Zt(n,()=>n.lex(e,"completion.nako3",void 0,!0)).tokens.filter(o=>o.type!=="eol"&&o.type!=="eof")}catch(o){o instanceof I||console.error(o)}if(r===null||r.length===0||!r[r.length-1].value)return"";let i=r[r.length-1].value+"";return/[ぁ-ん]/.test(i[i.length-1])&&!/[ぁ-ん]/.test(i[0])?"":i}getFoldWidget({doc:e},n,r){return t.isBlockStart(e.getLine(r))?"start":""}getFoldWidgetRange({doc:e},n,r){let i=this.getBlockStructure(e.getAllLines().join(`
474
- `)).pairs.find(o=>o[0]===r);return i!==void 0?new this.AceRange(i[0],e.getLine(i[0]).length,i[1]-1,e.getLine(i[1]-1).length):null}static getCodeLens(e){let n=[];for(let[r,i]of Array.from(e.getAllLines().entries())){let o=/^[  ・\t]*●テスト:(.+?)(?:とは|$)/.exec(i);o!==null&&n.push({start:{row:r},command:{title:"\u30C6\u30B9\u30C8\u3092\u5B9F\u884C",id:"runTest",arguments:[o[1]]}})}return n}getBlockStructure(e){return(!this.blockStructure||this.blockStructure.code!==e)&&(this.blockStructure={code:e,data:_r(e)}),this.blockStructure.data}},_t=class{constructor(e,n,r){this.editor=e,this.AceRange=n,this.UndoManager=r}newTab(e){return{content:e,cursor:{range:new this.AceRange(0,0,0,0),reversed:!1},scroll:{left:0,top:0},undoManger:new this.UndoManager}}getTab(){return{content:this.editor.getValue(),cursor:{range:this.editor.session.selection.getRange(),reversed:this.editor.session.selection.isBackwards()},scroll:{left:this.editor.session.getScrollLeft(),top:this.editor.session.getScrollTop()},undoManger:this.editor.session.getUndoManager()}}setTab(e){this.editor.setValue(e.content),this.editor.session.selection.setRange(e.cursor.range,e.cursor.reversed),this.editor.session.setScrollLeft(e.scroll.left),this.editor.session.setScrollTop(e.scroll.top),this.editor.session.setUndoManager(e.undoManger)}},Ge=class t{static save(e){try{let n={};for(let r of["syntaxHighlighting","keyboardHandler","theme","fontSize","wrap","useSoftTabs","tabSize","showInvisibles","enableLiveAutocompletion","indentedSoftWrap","underlineJosi"])n[r]=e.getOption(r);localStorage.setItem("nako3EditorOptions",JSON.stringify(n))}catch(n){return console.error(n),null}}static load(e){try{if(!window.localStorage)return null;let n=window.localStorage.getItem("nako3EditorOptions");if(n===null)return null;let r=JSON.parse(n);["ace/keyboard/vscode","ace/keyboard/emacs","ace/keyboard/sublime","ace/keyboard/vim"].includes(r.keyboardHandler)&&e.setOption("keyboardHandler",r.keyboardHandler),["ace/theme/xcode","ace/theme/monokai"].includes(r.theme)&&e.setOption("theme",r.theme),typeof r.fontSize=="number"&&e.setOption("fontSize",Math.min(48,Math.max(6,r.fontSize)));for(let i of["syntaxHighlighting","wrap","useSoftTabs","showInvisibles","enableLiveAutocompletion","indentedSoftWrap","underlineJosi"])typeof r[i]=="boolean"&&e.setOption(i,r[i]);typeof r.tabSize=="number"&&e.setOption("tabSize",Math.min(16,Math.max(0,r.tabSize)))}catch(n){return console.error(n),null}}static initPanel(e,n){let r=new e(n);if(this.done)return;this.done=!0;let i=!0;r.renderOptionGroup=s=>{if(i){for(let u of Object.keys(s))delete s[u];s.\u30B7\u30F3\u30BF\u30C3\u30AF\u30B9\u30CF\u30A4\u30E9\u30A4\u30C8={path:"syntaxHighlighting"},s.\u30AD\u30FC\u30D0\u30A4\u30F3\u30C9={path:"keyboardHandler",type:"select",items:[{caption:"VSCode",value:"ace/keyboard/vscode"},{caption:"Emacs",value:"ace/keyboard/emacs"},{caption:"Sublime",value:"ace/keyboard/sublime"},{caption:"Vim",value:"ace/keyboard/vim"}]},s.\u30AB\u30E9\u30FC\u30C6\u30FC\u30DE={path:"theme",type:"select",items:[{caption:"\u30E9\u30A4\u30C8",value:"ace/theme/xcode"},{caption:"\u30C0\u30FC\u30AF",value:"ace/theme/monokai"}]},s.\u6587\u5B57\u30B5\u30A4\u30BA={path:"fontSize",type:"number",defaultValue:16},s.\u884C\u306E\u6298\u308A\u8FD4\u3057={path:"wrap",type:"select",items:[{caption:"\u306A\u3057",value:"off"},{caption:"\u3042\u308A",value:"free"}]},s.\u30BD\u30D5\u30C8\u30BF\u30D6=[{path:"useSoftTabs"},{ariaLabel:"Tab Size",path:"tabSize",type:"number",values:[2,3,4,8,16]}],s.\u7A7A\u767D\u6587\u5B57\u3092\u8868\u793A={path:"showInvisibles"},s.\u5E38\u306B\u81EA\u52D5\u88DC\u5B8C={path:"enableLiveAutocompletion"},s.\u6298\u308A\u8FD4\u3057\u305F\u884C\u3092\u30A4\u30F3\u30C7\u30F3\u30C8={path:"indentedSoftWrap"},s.\u52A9\u8A5E\u306B\u4E0B\u7DDA\u3092\u5F15\u304F={path:"underlineJosi"},i=!1}else for(let u of Object.keys(s))delete s[u]},r.render();let o=e.prototype.render;e.prototype.render=function(...s){o.apply(this,...s),this.on("setOption",()=>{console.log("\u8A2D\u5B9A\u3092\u4FDD\u5B58\u3057\u307E\u3057\u305F\u3002"),t.save(this.editor)})}}},Yt=[],wr=0;function Qt(t,e,n){let r=n.edit(t),i=typeof t=="string"?document.getElementById(t):t;if(i===null)throw new Error(`[wnako3_editor] id\u304C ${t} \u306EHTML\u8981\u7D20\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002`);let o=n.require("ace/range").Range,s=new ht(r.session,r.session.bgTokenizer.doc,o,!!i.dataset.nako3DisableMarker);if(i.classList.contains("nako3_ace_mounted"))throw new Error("\u306A\u3067\u3057\u3053\u8A00\u8A9E\u306E\u30A8\u30C7\u30A3\u30BF\u306E\u521D\u671F\u5316\u51E6\u7406\u3092\u540C\u4E00\u306EHTML\u8981\u7D20\u306B\u5BFE\u3057\u3066\u8907\u6570\u56DE\u9069\u7528\u3057\u307E\u3057\u305F\u3002");i.setAttribute("lang","en"),i.classList.add("nako3_ace_mounted"),i.classList.add("nako3_editor");let u=i.dataset.nako3Readonly;u&&(i.classList.add("readonly"),r.setReadOnly(!0)),r.setFontSize(16);let c=w=>{let j=w.doc,x=j.getAllLines(),C=w.selection.getRange();j.removeFullLines(0,j.getLength()),j.insert({row:0,column:0},x.join(`
475
- `)),w.selection.setRange(C,!1)};n.require("ace/config").defineOptions(r.constructor.prototype,"editor",{syntaxHighlighting:{set:function(w){this.session.bgTokenizer.enabled=w,c(this.session)},initialValue:!0},underlineJosi:{set:function(w){this.session.bgTokenizer.underlineJosi=w,c(this.session)},initialValue:!0}}),r.setOptions({wrap:"free",indentedSoftWrap:!1,showPrintMargin:!1}),n.require("ace/keybindings/vscode"),r.setKeyboardHandler("ace/keyboard/vscode");let a=n.require("ace/tooltip").Tooltip,f=new a(r.container);n.require("ace/lib/event").addListener(r.renderer.content,"mouseout",()=>{f.hide()}),r.on("mousemove",w=>{let j=w.getDocumentPosition();if(j.column>=w.editor.session.getLine(j.row).length){f.hide();return}let x=w.editor.session.getTokenAt(j.row,j.column+1);if(x===null||!x.docHTML){f.hide();return}f.setHtml(x.docHTML),f.show(null,w.clientX,w.clientY)}),r.session.on("change",()=>{f.hide(),s.clear()}),r.on("guttermousedown",w=>{let j=w.domEvent.target;if(j.className.indexOf("ace_gutter-cell")===-1||!r.isFocused())return;let x=w.getDocumentPosition().row,C=w.editor.editorId||0;j.className.indexOf("ace_breakpoint")===-1?(w.editor.session.setBreakpoint(x),window.postMessage({action:"breakpoint:on",row:x,editorId:C})):(w.editor.session.clearBreakpoint(x),window.postMessage({action:"breakpoint:off",row:x,editorId:C})),w.stop()});let p=!!i.dataset.nako3ForceSyntaxHighlighting,h=!0,d=r.session.bgTokenizer,g=new dt(r.session.bgTokenizer.doc,e,(w,j,x)=>{d._signal("update",{data:{first:w,last:j}}),x>220&&r.getOption("syntaxHighlighting")&&!u&&!p&&h&&(h=!1,he.classList.add("visible"),r.setOption("syntaxHighlighting",!1),setTimeout(()=>{he.classList.remove("visible")},13e3))},(w,j)=>{s.addByError(w,j,"error")},r.getOption("underlineJosi"));r.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0});let b=wr++;r.wnako3EditorId=b,Yt.push({getCompletions(w,j,x,C,P){if(w.wnako3EditorId!==b)P(null,[]);else{let ze=J.getCompletionItems(x.row,C,e,g);if(ze.some(T=>T.value===C)){P(null,[]);return}P(null,ze)}}},{getCompletions(w,j,x,C,P){P(null,w.wnako3EditorId!==b?[]:J.getSnippets(w.session.doc.getAllLines().join(`
476
- `)))}}),n.require("ace/ext/language_tools").setCompleters(Yt),n.require("ace/autocomplete/util").getCompletionPrefix=w=>{let j=w.getCursorPosition();return J.getCompletionPrefix(w.session.doc.getLine(j.row).slice(0,j.column),e)};let m=new J(o,e),y=n.require("ace/lib/oop"),v=n.require("ace/mode/text").Mode,k=function(){this.HighlightRules=new v().HighlightRules,this.foldingRules={getFoldWidget:m.getFoldWidget.bind(m),getFoldWidgetRange:m.getFoldWidgetRange.bind(m)}};y.inherits(k,v),k.prototype.toggleCommentLines=J.toggleCommentLines.bind(J),k.prototype.getNextLineIndent=J.getNextLineIndent.bind(J),k.prototype.checkOutdent=J.checkOutdent.bind(J),k.prototype.autoOutdent=m.autoOutdent.bind(m),r.session.setMode(new k),r.session.bgTokenizer.stop(),r.session.bgTokenizer=g,r.setTheme("ace/theme/xcode"),Ge.load(r);let $=n.require("ace/ext/options").OptionPanel;Ge.initPanel($,r);let V=document.createElement("div");V.classList.add("button-container"),r.container.appendChild(V);let he=document.createElement("span");he.classList.add("slow-speed-message"),he.innerHTML="<span>\u30A8\u30C7\u30A3\u30BF\u306E|\u5FDC\u7B54\u901F\u5EA6\u304C|\u4F4E\u4E0B\u3057\u305F\u305F\u3081|\u30B7\u30F3\u30BF\u30C3\u30AF\u30B9|\u30CF\u30A4\u30E9\u30A4\u30C8\u3092|\u7121\u52B9\u5316|\u3057\u307E\u3057\u305F\u3002</span>".replace(/\|/g,"</span><span>"),V.appendChild(he);let We=[];try{let w=n.require("ace/ext/code_lens");r.setOption("enableCodeLens",!0),r.commands.addCommand({name:"runTest",exec:(j,x)=>{We.filter(C=>C.name==="test").forEach(C=>C.callback(x[0]))}}),w.registerCodeLensProvider(r,{provideCodeLenses:(j,x)=>{x(null,We.some(C=>C.name==="test")?J.getCodeLens(j.doc):[])}})}catch(w){console.error(w)}let vt=()=>{r.container.classList.remove("fullscreen"),r.renderer.setScrollMargin(0,0,0,0)},Oe=document.createElement("span");Oe.classList.add("editor-button"),Oe.innerText="\u5168\u753B\u9762",Oe.addEventListener("click",w=>{r.container.classList.contains("fullscreen")?vt():(r.container.classList.add("fullscreen"),r.renderer.setScrollMargin(20,20,0,0)),w.preventDefault()}),V.appendChild(Oe);let $e=document.createElement("span");$e.classList.add("editor-button"),$e.innerText="\u8A2D\u5B9A",$e.addEventListener("click",w=>{vt(),r.execCommand("showSettingsMenu"),w.preventDefault()}),V.appendChild($e);let Mn=n.require("ace/undomanager").UndoManager,En=new _t(r,o,Mn);i.dataset.nako3Resizable&&(new MutationObserver(()=>{r.resize()}).observe(r.container,{attributes:!0}),r.renderer.setScrollMargin(4,0,4,0),r.container.classList.add("resizable"));let kt=()=>{g.dirty=!0};return{editor:r,editorMarkers:s,editorTabs:En,retokenize:kt,run:w=>{let j=r.getValue(),x=w.preCode||"",C=e.replaceLogger();if(w.outputContainer){let T=w.outputContainer;C.addListener("info",({html:oe})=>{T||console.log(oe),T.style.display="block",T.innerHTML+=oe}),w.outputContainer.classList.add("nako3-output-container")}let P=w.file||"main.nako3";return C.addListener("info",({position:T,noColor:oe,level:Ke})=>{T&&T.file===P&&(Ke==="warn"||Ke==="error")&&s.addByError(j,{...T,message:oe},Ke)}),{promise:e.loadDependencies(x+j,P,x,w.localFiles||{}).then(async()=>{if(P||(P="main.nako3"),w.method==="test")return e.test(x+j,P,x,w.testName);if(w.method==="compile")return e.compile(x+j,P,!1,x);{let T={resetEnv:!0,resetAll:!0,preCode:x};return await e.runAsync(x+j,P,T)}}).catch(T=>{console.error("[wnako3_editor]",T,e.__globalObj)}).then(async T=>{for(kt();g.dirty;)await new Promise(oe=>setTimeout(oe,0));return T}).catch(T=>{console.error("[wnako3_editor::run::promise::catch]",T)}),logger:C,code:j}},codeLensListeners:We}}var vr={version:"3.6.14",major:3,minor:6,patch:14},we=vr;var en={\u6C34\u8272:{type:"const",value:"aqua"},\u7D2B\u8272:{type:"const",value:"fuchsia"},\u7DD1\u8272:{type:"const",value:"lime"},\u9752\u8272:{type:"const",value:"blue"},\u8D64\u8272:{type:"const",value:"red"},\u9EC4\u8272:{type:"const",value:"yellow"},\u9ED2\u8272:{type:"const",value:"black"},\u767D\u8272:{type:"const",value:"white"},\u8336\u8272:{type:"const",value:"maroon"},\u7070\u8272:{type:"const",value:"gray"},\u91D1\u8272:{type:"const",value:"gold"},\u9EC4\u91D1\u8272:{type:"const",value:"gold"},\u9280\u8272:{type:"const",value:"silver"},\u767D\u91D1\u8272:{type:"const",value:"silver"},\u30AA\u30EA\u30FC\u30D6\u8272:{type:"const",value:"olive"},\u30D9\u30FC\u30B8\u30E5\u8272:{type:"const",value:"beige"},\u30A2\u30EA\u30B9\u30D6\u30EB\u30FC\u8272:{type:"const",value:"aliceblue"},RGB:{type:"func",josi:[["\u3068"],["\u3068"],["\u3067","\u306E"]],pure:!0,fn:function(t,e,n){let r=i=>{let o="00"+i.toString(16);return o.substr(o.length-2,2)};return"#"+r(t)+r(e)+r(n)},return_none:!1},\u8272\u6DF7:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t){let e=n=>{let r="00"+n.toString(16);return r.substr(r.length-2,2)};if(!t)throw new Error("\u300E\u8272\u6DF7\u305C\u308B\u300F\u306E\u5F15\u6570\u306B\u306F\u914D\u5217\u3092\u6307\u5B9A\u3057\u307E\u3059");if(t.length<3)throw new Error("\u300E\u8272\u6DF7\u305C\u308B\u300F\u306E\u5F15\u6570\u306B\u306F[RR,GG,BB]\u5F62\u5F0F\u306E\u914D\u5217\u3092\u6307\u5B9A\u3057\u307E\u3059");return"#"+e(t[0])+e(t[1])+e(t[2])},return_none:!1}};var tn={WNAKO\u30D0\u30FC\u30B8\u30E7\u30F3:{type:"const",value:"?"},\u7D42:{type:"func",josi:[],pure:!0,fn:function(t){if(t&&t.__v0){if(t.__setSysVar("__forceClose",!0),!t.__getSysVar("__useDebug"))throw new Error("__\u7D42\u308F\u308B__")}else throw new Error("__\u7D42\u308F\u308B__")},return_none:!0},OS\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(){let t=window.navigator.userAgent.toLowerCase();return t.indexOf("windows")!==-1?"windows":t.indexOf("android")!==-1?"android":t.indexOf("iphone")!==-1?"iphone":t.indexOf("ipad")!==-1?"ipad":t.indexOf("mac os x")!==-1||t.indexOf("macintosh")!==-1?"darwin":t.indexOf("cros")!==-1?"chromeos":t.indexOf("ubuntu")!==-1?"ubuntu":t.indexOf("linux")!==-1?"linux":"unknown"}}};var nn={\u8A00:{type:"func",josi:[["\u3068","\u3092"]],pure:!0,fn:function(t){window.alert(t)},return_none:!0},\u30C0\u30A4\u30A2\u30ED\u30B0\u30AD\u30E3\u30F3\u30BB\u30EB\u5024:{type:"var",value:""},\u5C0B:{type:"func",josi:[["\u3068","\u3092"]],pure:!0,fn:function(t,e){let n=window.prompt(t);return n===null?e.__getSysVar("\u30C0\u30A4\u30A2\u30ED\u30B0\u30AD\u30E3\u30F3\u30BB\u30EB\u5024"):/^[-+]?[0-9]+(\.[0-9]+)?$/.test(n)?parseFloat(n):/^[-+-+]?[0-90-9]+([..][0-90-9]+)?$/.test(n)?parseFloat(n.replace(/[-+0-9.]/g,r=>String.fromCharCode(r.charCodeAt(0)-65248))):n}},\u6587\u5B57\u5C0B:{type:"func",josi:[["\u3068","\u3092"]],pure:!0,fn:function(t,e){let n=window.prompt(t);return n===null?e.__getSysVar("\u30C0\u30A4\u30A2\u30ED\u30B0\u30AD\u30E3\u30F3\u30BB\u30EB\u5024"):n}},\u4E8C\u629E:{type:"func",josi:[["\u3067","\u306E","\u3068","\u3092"]],pure:!0,fn:function(t){return window.confirm(t)}}};var rn={\u30D6\u30E9\u30A6\u30B6\u79FB\u52D5:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){window.location.href=t}},\u30D6\u30E9\u30A6\u30B6\u623B:{type:"func",josi:[],pure:!0,fn:function(){window.history.back(-1)}},\u30D6\u30E9\u30A6\u30B6URL:{type:"const",value:""}};var on={HTTP\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089","\u3092"]],pure:!0,asyncFn:!0,fn:async function(t,e){return e.__exec("AJAX\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97",[t,e])}},AJAX\u53D7\u4FE1:{type:"func",josi:[["\u304B\u3089","\u3092"]],pure:!0,asyncFn:!0,fn:async function(t,e){return e.__exec("AJAX\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97",[t,e])}},AJAX\u53D7\u4FE1\u6642:{type:"func",josi:[["\u3067"],["\u304B\u3089","\u3092"]],pure:!0,fn:function(t,e,n){n.__exec("AJAX\u9001\u4FE1\u6642",[t,e,n])},return_none:!0},AJAX\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"]],pure:!0,asyncFn:!0,fn:async function(t,e){return e.__exec("AJAX\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97",[t,e])}},AJAX\u9001\u4FE1\u6642:{type:"func",josi:[["\u306E"],["\u307E\u3067","\u3078","\u306B"]],pure:!0,fn:function(t,e,n){let r=n.__getSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3");r===""&&(r={method:"GET"}),fetch(e,r).then(i=>i.status!==200?n.__getSysVar("AJAX:ONERROR")(i.status):i.text()).then(i=>{n.__setSysVar("\u5BFE\u8C61",i),t(i,n)}).catch(i=>{n.__getSysVar("AJAX:ONERROR")(i)})},return_none:!0},AJAX\u30AA\u30D7\u30B7\u30E7\u30F3:{type:"const",value:""},AJAX\u30AA\u30D7\u30B7\u30E7\u30F3\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078","\u3068"]],pure:!0,fn:function(t,e){e.__setSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3",t)},return_none:!0},AJAX\u30AA\u30D7\u30B7\u30E7\u30F3POST\u8A2D\u5B9A:{type:"func",josi:[["\u3092","\u3067"]],pure:!0,fn:function(t,e){let n=e.__exec("POST\u30C7\u30FC\u30BF\u751F\u6210",[t,e]),r={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:n};e.__setSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3",r)},return_none:!0},AJAX\u5931\u6557\u6642:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){e.__setSysVar("AJAX:ONERROR",t)}},AJAX\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97:{type:"func",josi:[["\u304B\u3089","\u3092"]],pure:!0,asyncFn:!0,fn:async function(t,e){let n=e.__getSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3");return n===""&&(n={method:"GET"}),await(await fetch(t,n)).text()},return_none:!1},AJAX_JSON\u53D6\u5F97:{type:"func",josi:[["\u304B\u3089"]],pure:!0,asyncFn:!0,fn:async function(t,e){let n=e.__getSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3");return n===""&&(n={method:"GET"}),await(await fetch(t,n)).json()},return_none:!1},AJAX\u30D0\u30A4\u30CA\u30EA\u53D6\u5F97:{type:"func",josi:[["\u304B\u3089"]],pure:!0,asyncFn:!0,fn:async function(t,e){let n=e.__getSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3");return n===""&&(n={method:"GET"}),await(await fetch(t,n)).blob()},return_none:!1},GET\u9001\u4FE1\u6642:{type:"func",josi:[["\u306E"],["\u307E\u3067","\u3078","\u306B"]],pure:!0,fn:function(t,e,n){n.__exec("AJAX\u9001\u4FE1\u6642",[t,e,n])},return_none:!0},POST\u9001\u4FE1\u6642:{type:"func",josi:[["\u306E"],["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n,r){let i=r.__exec("POST\u30C7\u30FC\u30BF\u751F\u6210",[n,r]);fetch(e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:i}).then(s=>s.text()).then(s=>{r.__setSysVar("\u5BFE\u8C61",s),t(s)}).catch(s=>{r.__getSysVar("AJAX:ONERROR")(s)})}},POST\u30D5\u30A9\u30FC\u30E0\u9001\u4FE1\u6642:{type:"func",josi:[["\u306E"],["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n,r){let i=new FormData;for(let s in n)i.set(s,n[s]);fetch(e,{method:"POST",body:i}).then(s=>s.text()).then(s=>{r.__setSysVar("\u5BFE\u8C61",s),t(s)}).catch(s=>{r.__getSysVar("AJAX:ONERROR")(s)})}},POST\u30C7\u30FC\u30BF\u751F\u6210:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){let n=[];for(let r in t){let i=t[r],o=encodeURIComponent(r)+"="+encodeURIComponent(i);n.push(o)}return n.join("&")}},POST\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,asyncFn:!0,fn:function(t,e,n){return new Promise((r,i)=>{let o=n.__exec("POST\u30C7\u30FC\u30BF\u751F\u6210",[e,n]);fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o}).then(u=>u.text()).then(u=>{r(u)}).catch(u=>{i(u.message)})})}},POST\u30D5\u30A9\u30FC\u30E0\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,asyncFn:!0,fn:function(t,e,n){return new Promise((r,i)=>{let o=new FormData;for(let u in e)o.set(u,e[u]);fetch(t,{method:"POST",body:o}).then(u=>u.text()).then(u=>{r(u)}).catch(u=>{i(u.message)})})}},AJAX\u4FDD\u969C\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"]],pure:!0,fn:function(t,e){let n=e.__getSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3");return n===""&&(n={method:"GET"}),fetch(t,n)},return_none:!1},HTTP\u4FDD\u969C\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089","\u3092"]],pure:!0,fn:function(t,e){return e.__exec("AJAX\u4FDD\u969C\u9001\u4FE1",[t,e])},return_none:!1},POST\u4FDD\u969C\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=n.__exec("POST\u30C7\u30FC\u30BF\u751F\u6210",[e,n]);return fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:r})},return_none:!1},POST\u30D5\u30A9\u30FC\u30E0\u4FDD\u969C\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=new FormData;for(let o in e)r.set(o,e[o]);return fetch(t,{method:"POST",body:r})},return_none:!1},AJAX\u5185\u5BB9\u53D6\u5F97:{type:"func",josi:[["\u304B\u3089"],["\u3067"]],pure:!0,fn:function(t,e,n){return e=e.toString().toUpperCase(),e==="TEXT"||e==="\u30C6\u30AD\u30B9\u30C8"?t.text():e==="JSON"?t.json():e==="BLOB"?t.blob():e==="ARRAY"||e==="\u914D\u5217"?t.arrayBuffer():e==="BODY"||e==="\u672C\u4F53"?t.body:t.body()},return_none:!1},BLOB\u4F5C\u6210:{type:"func",josi:[["\u3092","\u304B\u3089"],["\u3067"]],pure:!0,fn:function(t,e){return t instanceof Array||(t=[t]),new Blob(t,e)}},AJAX\u9010\u6B21\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"]],pure:!0,fn:function(t,e){if(!e.resolve)throw new Error("\u300EAJAX\u9010\u6B21\u9001\u4FE1\u300F\u306F\u300E\u9010\u6B21\u5B9F\u884C\u300F\u69CB\u6587\u5185\u3067\u5229\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");e.resolveCount++;let n=e.resolve,r=e.reject,i=e.__getSysVar("AJAX\u30AA\u30D7\u30B7\u30E7\u30F3");i===""&&(i={method:"GET"}),fetch(t,i).then(o=>o.text()).then(o=>{e.__setSysVar("\u5BFE\u8C61",o),n()}).catch(o=>{r(o.message)})},return_none:!0},HTTP\u9010\u6B21\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089","\u3092"]],pure:!0,fn:function(t,e){if(!e.resolve)throw new Error("\u300EHTTP\u9010\u6B21\u53D6\u5F97\u300F\u306F\u300E\u9010\u6B21\u5B9F\u884C\u300F\u69CB\u6587\u5185\u3067\u5229\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");e.__exec("AJAX\u9010\u6B21\u9001\u4FE1",[t,e])},return_none:!0},POST\u9010\u6B21\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){if(!n.resolve)throw new Error("\u300EPOST\u9001\u4FE1\u300F\u306F\u300E\u9010\u6B21\u5B9F\u884C\u300F\u69CB\u6587\u5185\u3067\u5229\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");n.resolveCount++;let r=n.resolve,i=n.reject,o=n.__exec("POST\u30C7\u30FC\u30BF\u751F\u6210",[e,n]);fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:o}).then(u=>u.text()).then(u=>{n.__setSysVar("\u5BFE\u8C61",u),r(u)}).catch(u=>{i(u.message)})},return_none:!0},POST\u30D5\u30A9\u30FC\u30E0\u9010\u6B21\u9001\u4FE1:{type:"func",josi:[["\u307E\u3067","\u3078","\u306B"],["\u3092"]],pure:!0,fn:function(t,e,n){if(!n.resolve)throw new Error("\u300EPOST\u30D5\u30A9\u30FC\u30E0\u9010\u6B21\u9001\u4FE1\u300F\u306F\u300E\u9010\u6B21\u5B9F\u884C\u300F\u69CB\u6587\u5185\u3067\u5229\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002");n.resolveCount++;let r=n.resolve,i=n.reject,o=new FormData;for(let u in e)o.set(u,e[u]);fetch(t,{method:"POST",body:o}).then(u=>u.text()).then(u=>{n.__setSysVar("\u5BFE\u8C61",u),r(u)}).catch(u=>{i(u.message)})},return_none:!0}};var sn={DOCUMENT:{type:"const",value:""},WINDOW:{type:"const",value:""},NAVIGATOR:{type:"const",value:""},DOM\u8981\u7D20ID\u53D6\u5F97:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return document.getElementById(t)}},DOM\u8981\u7D20\u53D6\u5F97:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return typeof t=="string"?document.querySelector(t):t}},DOM\u8981\u7D20\u5168\u53D6\u5F97:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return Array.from(document.querySelectorAll(t))}},\u30BF\u30B0\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return Array.from(document.getElementsByTagName(t))}},DOM\u5B50\u8981\u7D20\u53D6\u5F97:{type:"func",josi:[["\u306E"],["\u3092"]],pure:!0,fn:function(t,e,n){if(t=n.__query(t,"DOM\u5B50\u8981\u7D20\u53D6\u5F97",!0),!t.querySelector)throw new Error("\u300EDOM\u5B50\u8981\u7D20\u53D6\u5F97\u300F\u3067\u89AA\u8981\u7D20\u304CDOM\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002");return t.querySelector(e)}},DOM\u5B50\u8981\u7D20\u5168\u53D6\u5F97:{type:"func",josi:[["\u306E"],["\u3092"]],pure:!0,fn:function(t,e,n){if(t=n.__query(t,"DOM\u5B50\u8981\u7D20\u5168\u53D6\u5F97",!0),!t.querySelectorAll)throw new Error("\u300EDOM\u5B50\u8981\u7D20\u5168\u53D6\u5F97\u300F\u3067\u89AA\u8981\u7D20\u304CDOM\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002");return Array.from(t.querySelectorAll(e))}},DOM\u30A4\u30D9\u30F3\u30C8\u8A2D\u5B9A:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n,r){t=r.__query(t,"DOM\u30A4\u30D9\u30F3\u30C8\u8A2D\u5B9A",!1),t[e]=r.__findVar(n,null)},return_none:!0},DOM\u30C6\u30AD\u30B9\u30C8\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u306E","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){t=n.__query(t,"DOM\u30C6\u30AD\u30B9\u30C8\u8A2D\u5B9A",!1);let r=t.tagName.toUpperCase();if(r==="INPUT"||r==="TEXTAREA")t.value=e;else if(r==="SELECT")for(let i=0;i<t.options.length;i++){let o=t.options[i].value;if(String(o)===e){t.selectedIndex=i;break}}else t.innerHTML=e},return_none:!0},DOM\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){if(t=e.__query(t,"DOM\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97",!0),!t)return"";let n=t.tagName.toUpperCase();if(n==="INPUT"||n==="TEXTAREA")return t.value;if(n==="SELECT"){let r=t.selectedIndex;return r<0?null:t.options[r].value}return t.innerHTML}},DOM_HTML\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u306E","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){t=n.__query(t,"DOM_HTML\u8A2D\u5B9A",!1),t.innerHTML=e},return_none:!0},DOM_HTML\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){return t=e.__query(t,"DOM_HTML\u53D6\u5F97",!0),t?t.innerHTML:""}},\u30C6\u30AD\u30B9\u30C8\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u306E","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){return n.__exec("DOM\u30C6\u30AD\u30B9\u30C8\u8A2D\u5B9A",[t,e,n])}},\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){return e.__exec("DOM\u30C6\u30AD\u30B9\u30C8\u53D6\u5F97",[t,e])}},HTML\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u306E","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){return n.__exec("DOM_HTML\u8A2D\u5B9A",[t,e,n])}},HTML\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){return e.__exec("DOM_HTML\u53D6\u5F97",[t,e])}},DOM\u5C5E\u6027\u8A2D\u5B9A:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],uses:["DOM\u548C\u5C5E\u6027"],pure:!0,fn:function(t,e,n,r){t=r.__query(t,"DOM\u5C5E\u6027\u8A2D\u5B9A",!1);let i=r.__getSysVar("DOM\u548C\u5C5E\u6027");i[e]&&(e=i[e]),e in t?t[e]=n:t.setAttribute(e,n)},return_none:!0},DOM\u5C5E\u6027\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"],["\u3092"]],uses:["DOM\u548C\u5C5E\u6027"],pure:!0,fn:function(t,e,n){if(t=n.__query(t,"DOM\u5C5E\u6027\u53D6\u5F97",!0),!t)return"";let r=n.__getSysVar("DOM\u548C\u5C5E\u6027");return r[e]&&(e=r[e]),e in t?t[e]:t.getAttribute(e)}},DOM\u548C\u5C5E\u6027:{type:"const",value:{\u5E45:"width",\u9AD8\u3055:"height",\u9AD8:"height",\u30BF\u30A4\u30D7:"type",\u30C7\u30FC\u30BF:"data",\u540D\u524D:"name",ID:"id",\u8AAD\u53D6\u5C02\u7528:"readOnly",\u8AAD\u307F\u53D6\u308A\u5C02\u7528:"readOnly",\u7121\u52B9\u5316:"disabled"}},DOM\u548C\u30B9\u30BF\u30A4\u30EB:{type:"const",value:{\u5E45:"width",\u9AD8\u3055:"height",\u9AD8:"height",\u80CC\u666F\u8272:"background-color",\u8272:"color",\u30DE\u30FC\u30B8\u30F3:"margin",\u4F59\u767D:"padding",\u6587\u5B57\u30B5\u30A4\u30BA:"font-size",\u884C\u63C3\u3048:"text-align",\u5DE6:"left",\u53F3:"right",\u4E2D\u592E:"center",\u30DC\u30FC\u30C0\u30FC:"border",\u30DC\u30C3\u30AF\u30B9\u8868\u793A:"display",\u306A\u3057:"none",\u30D6\u30ED\u30C3\u30AF:"block",\u8868\u793A\u4F4D\u7F6E:"float",\u91CD\u306A\u308A:"z-index",\u8AAD\u53D6\u5C02\u7528:"readOnly",\u8AAD\u307F\u53D6\u308A\u5C02\u7528:"readOnly",readonly:"readOnly"}},DOM\u30B9\u30BF\u30A4\u30EB\u8A2D\u5B9A:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],uses:["DOM\u548C\u30B9\u30BF\u30A4\u30EB"],pure:!0,fn:function(t,e,n,r){t=r.__query(t,"DOM\u30B9\u30BF\u30A4\u30EB\u8A2D\u5B9A",!1);let i=r.__getSysVar("DOM\u548C\u30B9\u30BF\u30A4\u30EB");i[e]!==void 0&&(e=i[e]),i[n]!==void 0&&(n=i[n]),t.style[e]=n},return_none:!0},DOM\u30B9\u30BF\u30A4\u30EB\u4E00\u62EC\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"],["\u3092"]],uses:["DOM\u548C\u30B9\u30BF\u30A4\u30EB"],pure:!0,fn:function(t,e,n){t=n.__query(t,"DOM\u30B9\u30BF\u30A4\u30EB\u4E00\u62EC\u8A2D\u5B9A",!1),t instanceof window.HTMLElement&&(t=[t]);let r=n.__getSysVar("DOM\u548C\u30B9\u30BF\u30A4\u30EB");for(let i=0;i<t.length;i++){let o=t[i];for(let s in e){let u=s,c=e[s];r[u]!==void 0&&(u=r[u]),r[c]!==void 0&&(c=r[c]),o.style[u]=c}}},return_none:!0},DOM\u30B9\u30BF\u30A4\u30EB\u53D6\u5F97:{type:"func",josi:[["\u306E"],["\u3092"]],uses:["DOM\u548C\u30B9\u30BF\u30A4\u30EB"],pure:!0,fn:function(t,e,n){if(t=n.__query(t,"DOM\u30B9\u30BF\u30A4\u30EB\u53D6\u5F97",!0),!t)return"";let r=n.__getSysVar("DOM\u548C\u30B9\u30BF\u30A4\u30EB");return r[e]&&(e=r[e]),t.style[e]}},DOM\u30B9\u30BF\u30A4\u30EB\u4E00\u62EC\u53D6\u5F97:{type:"func",josi:[["\u306E"],["\u3092"]],uses:["DOM\u548C\u30B9\u30BF\u30A4\u30EB"],pure:!0,fn:function(t,e,n){let r={};if(t=n.__query(t,"DOM\u30B9\u30BF\u30A4\u30EB\u4E00\u62EC\u53D6\u5F97",!0),!t)return r;e instanceof String&&(e=[e]);let i=n.__getSysVar("DOM\u548C\u30B9\u30BF\u30A4\u30EB");if(e instanceof Array)return e.forEach(o=>{i[o]&&(o=i[o]),r[o]=t.style[o]}),r;if(e instanceof Object){for(let o in e)i[o]&&(o=i[o]),r[o]=t.style[o];return r}return t.style[e]}},DOM\u8981\u7D20\u4F5C\u6210:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t){return document.createElement(t)}},DOM\u5B50\u8981\u7D20\u8FFD\u52A0:{type:"func",josi:[["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n){t=n.__query(t,"DOM\u5B50\u8981\u7D20\u8FFD\u52A0",!1),e=n.__query(e,"DOM\u5B50\u8981\u7D20\u8FFD\u52A0",!1),t.appendChild(e)}},DOM\u5B50\u8981\u7D20\u524A\u9664:{type:"func",josi:[["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n){t=n.__query(t,"DOM\u5B50\u8981\u7D20\u524A\u9664",!1),e=n.__query(e,"DOM\u5B50\u8981\u7D20\u524A\u9664",!1),t.removeChild(e)}},\u6CE8\u76EE:{type:"func",josi:[["\u3092","\u3078","\u306B"]],pure:!0,fn:function(t,e){t=e.__query(t,"\u6CE8\u76EE",!0),t&&t.focus&&t.focus()},return_none:!0}};var un={\u5BFE\u8C61\u30A4\u30D9\u30F3\u30C8:{type:"const",value:""},DOM\u30A4\u30D9\u30F3\u30C8\u8FFD\u52A0:{type:"func",josi:[["\u306E"],["\u306B","\u3078"],["\u3092"]],pure:!0,fn:function(t,e,n,r){r.__addEvent(t,e,n,null)},return_none:!0},DOM\u30A4\u30D9\u30F3\u30C8\u524A\u9664:{type:"func",josi:[["\u306E"],["\u304B\u3089"],["\u3092"]],pure:!0,fn:function(t,e,n,r){r.__removeEvent(t,e,n)},return_none:!0},DOM\u30A4\u30D9\u30F3\u30C8\u767A\u706B\u6642:{type:"func",josi:[["\u3067"],["\u306E"],["\u304C"]],pure:!0,fn:function(t,e,n,r){r.__addEvent(e,n,t,null)},return_none:!0},DOM\u30A4\u30D9\u30F3\u30C8\u51E6\u7406\u505C\u6B62:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t,e){t.preventDefault()},return_none:!0},\u30AF\u30EA\u30C3\u30AF\u6642:{type:"func",josi:[["\u3067"],["\u3092"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"click",t,null)},return_none:!0},\u8AAD\u8FBC\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"load",t,null)},return_none:!0},\u30D5\u30A9\u30FC\u30E0\u9001\u4FE1\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"submit",t,null)},return_none:!0},\u62BC\u30AD\u30FC:{type:"const",value:""},\u30AD\u30FC\u62BC\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"keydown",t,n.__keyHandler)},return_none:!0},\u30AD\u30FC\u96E2\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"keyup",t,n.__keyHandler)},return_none:!0},\u30AD\u30FC\u30BF\u30A4\u30D4\u30F3\u30B0\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"keypress",t,n.__keyHandler)},return_none:!0},\u30DE\u30A6\u30B9X:{type:"const",value:0},\u30DE\u30A6\u30B9Y:{type:"const",value:0},\u30DE\u30A6\u30B9\u62BC\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"mousedown",t,n.__mouseHandler)},return_none:!0},\u30DE\u30A6\u30B9\u79FB\u52D5\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"mousemove",t,n.__mouseHandler)},return_none:!0},\u30DE\u30A6\u30B9\u96E2\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"mouseup",t,n.__mouseHandler)},return_none:!0},\u30BF\u30C3\u30C1X:{type:"const",value:0},\u30BF\u30C3\u30C1Y:{type:"const",value:0},\u30BF\u30C3\u30C1\u914D\u5217:{type:"const",value:[]},\u30BF\u30C3\u30C1\u30A4\u30D9\u30F3\u30C8\u8A08\u7B97:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){return e.__touchHandler(t,e)}},\u30BF\u30C3\u30C1\u958B\u59CB\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"touchstart",t,n.__touchHandler)},return_none:!0},\u30BF\u30C3\u30C1\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"touchmove",t,n.__touchHandler)},return_none:!0},\u30BF\u30C3\u30C1\u7D42\u4E86\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"touchend",t,n.__touchHandler)},return_none:!0},\u30BF\u30C3\u30C1\u30AD\u30E3\u30F3\u30BB\u30EB\u6642:{type:"func",josi:[["\u3067"],["\u3092","\u306E"]],pure:!0,fn:function(t,e,n){n.__addEvent(e,"touchcancel",t,n.__touchHandler)},return_none:!0},\u753B\u9762\u66F4\u65B0\u6642\u5B9F\u884C:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){if(t=e.__findVar(t,null),!t)throw new Error("\u300E\u753B\u9762\u66F4\u65B0\u6642\u5B9F\u884C\u300F\u3067\u95A2\u6570\u306E\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002");return e.__requestAnimationFrameLastId=window.requestAnimationFrame(t),e.__requestAnimationFrameLastId}},\u753B\u9762\u66F4\u65B0\u51E6\u7406\u53D6\u6D88:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){window.cancelAnimationFrame(t),e.__requestAnimationFrameLastId===t&&(e.__requestAnimationFrameLastId=0)},return_none:!0}};var cn={DOM\u89AA\u8981\u7D20:{type:"const",value:""},DOM\u90E8\u54C1\u500B\u6570:{type:"const",value:0},DOM\u90E8\u54C1\u30AA\u30D7\u30B7\u30E7\u30F3:{type:"const",value:{\u81EA\u52D5\u6539\u884C:!1,\u30C6\u30FC\u30D6\u30EB\u30D8\u30C3\u30C0:!0,\u30C6\u30FC\u30D6\u30EB\u80CC\u666F\u8272:["#AA4040","#ffffff","#fff0f0"]}},DOM\u89AA\u8981\u7D20\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){return typeof t=="string"&&(t=document.querySelector(t)||document.getElementById(t)),e.__setSysVar("DOM\u89AA\u8981\u7D20",t),t}},DOM\u89AA\u90E8\u54C1\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){return e.__exec("DOM\u89AA\u8981\u7D20\u8A2D\u5B9A",[t,e])}},DOM\u30B9\u30AD\u30F3:{type:"const",value:""},DOM\u30B9\u30AD\u30F3\u8F9E\u66F8:{type:"const",value:{}},DOM\u30B9\u30AD\u30F3\u8A2D\u5B9A:{type:"func",josi:[["\u3092","\u306B","\u306E"]],pure:!0,fn:function(t,e){e.__setSysVar("DOM\u30B9\u30AD\u30F3",t)},return_none:!0},DOM\u90E8\u54C1\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__getSysVar("DOM\u89AA\u8981\u7D20"),r=typeof t=="string"?document.createElement(t):t;r.id="nadesi-dom-"+e.__getSysVar("DOM\u90E8\u54C1\u500B\u6570");let i=e.__getSysVar("DOM\u30B9\u30AD\u30F3\u8F9E\u66F8")[e.__getSysVar("DOM\u30B9\u30AD\u30F3")];return typeof i=="function"&&i(t,r,e),n.appendChild(r),e.__setSysVar("DOM\u90E8\u54C1\u500B\u6570",e.__getSysVar("DOM\u90E8\u54C1\u500B\u6570",0)+1),e.__getSysVar("DOM\u90E8\u54C1\u30AA\u30D7\u30B7\u30E7\u30F3").\u81EA\u52D5\u6539\u884C&&n.appendChild(document.createElement("br")),r}},\u30DC\u30BF\u30F3\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["button",e]);return n.innerHTML=t,n}},\u30A8\u30C7\u30A3\u30BF\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["input",e]);return n.type="text",n.value=t,n}},\u30C6\u30AD\u30B9\u30C8\u30A8\u30EA\u30A2\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["textarea",e]);return n.value=t,n}},\u30E9\u30D9\u30EB\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["span",e]);return n.innerHTML=t,n}},\u30AD\u30E3\u30F3\u30D0\u30B9\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["canvas",e]);return n.width=t[0],n.height=t[1],n.style.width=t[0],n.style.height=t[1],e.__exec("\u63CF\u753B\u958B\u59CB",[n,e]),n}},\u753B\u50CF\u4F5C\u6210:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["img",e]);return n.src=t,n}},\u6539\u884C\u4F5C\u6210:{type:"func",josi:[],pure:!0,fn:function(t){return t.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["br",t])}},\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=document.createElement("span"),r=document.createElement("input");r.type="checkbox",r.id="nadesi-dom-"+e.__getSysVar("DOM\u90E8\u54C1\u500B\u6570",0),e.__setSysVar("DOM\u90E8\u54C1\u500B\u6570",e.__getSysVar("DOM\u90E8\u54C1\u500B\u6570",0)+1);let i=document.createElement("label");return i.innerHTML=t,i.htmlFor=r.id,n.appendChild(r),n.appendChild(i),e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",[n,e]),r}},\u30BB\u30EC\u30AF\u30C8\u30DC\u30C3\u30AF\u30B9\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=document.createElement("select");for(let r=0;r<t.length;r++){let i=document.createElement("option");i.value=t[r],i.appendChild(document.createTextNode(t[r])),n.appendChild(i)}return e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",[n,e]),n}},\u30BB\u30EC\u30AF\u30C8\u30DC\u30C3\u30AF\u30B9\u30A2\u30A4\u30C6\u30E0\u8A2D\u5B9A:{type:"func",josi:[["\u3092"],["\u3078","\u306B"]],pure:!0,fn:function(t,e,n){typeof e=="string"&&(e=document.querySelector(e)),e.options.length=0;for(let r=0;r<t.length;r++){let i=document.createElement("option");i.value=t[r],i.appendChild(document.createTextNode(t[r])),e.appendChild(i)}},return_none:!0},\u8272\u9078\u629E\u30DC\u30C3\u30AF\u30B9\u4F5C\u6210:{type:"func",josi:[],pure:!0,fn:function(t){let e=t.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["input",t]);return e.type="color",e}},\u65E5\u4ED8\u9078\u629E\u30DC\u30C3\u30AF\u30B9\u4F5C\u6210:{type:"func",josi:[],pure:!0,fn:function(t){let e=t.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["input",t]);return e.type="date",e}},\u30D1\u30B9\u30EF\u30FC\u30C9\u5165\u529B\u30A8\u30C7\u30A3\u30BF\u4F5C\u6210:{type:"func",josi:[["\u306E","\u3067"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["input",e]);return n.type="password",n.value=t,n}},\u5024\u6307\u5B9A\u30D0\u30FC\u4F5C\u6210:{type:"func",josi:[["\u306E","\u3067"]],pure:!0,fn:function(t,e){(!(t instanceof Array)||t.length<2)&&(t=[0,100,50]),t.length<=2&&t.push(Math.floor((t[1]-t[0])/2));let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["input",e]);return n.type="range",n.min=t[0],n.max=t[1],n.value=t[2],n}},\u9001\u4FE1\u30DC\u30BF\u30F3\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["input",e]);return n.type="submit",n.value=t,n}},\u30D5\u30A9\u30FC\u30E0\u4F5C\u6210:{type:"func",josi:[["\u3067","\u306E"],["\u3092"]],pure:!0,fn:function(t,e,n){let r=n.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["form",n]);if(t instanceof Object)for(let s in t)r[s]&&(r[s]=t[s]);let i=e.split(`
477
- `),o=document.createElement("table");for(let s in i){let u=""+i[s];if(u==="")continue;u.indexOf("=")<0&&(u+="=");let c=u.split("="),a=c[0],f=c[1],l=document.createElement("th");l.innerHTML=n.__tohtmlQ(a);let p=document.createElement("td");if(f.substring(0,2)==="?("){let g=(f.substring(2)+")").split(")"),b=g[0],m=g[1],y=b.split("|"),v=document.createElement("select");v.name=a;for(let $ of y){let V=document.createElement("option");V.value=$,V.text=$,v.appendChild(V)}let k=y.indexOf(m);k>=0&&(v.selectedIndex=k),p.appendChild(v)}else{let d=document.createElement("input");p.appendChild(d),d.id="nako3form_"+a,f==="?\u9001\u4FE1"||f==="?submit"?(d.type="submit",d.value=f.substring(1),a!==""&&(d.name=a)):f.substring(0,2)==="?c"?(d.type="color",d.value=f.substring(2),d.name=a):(d.type="text",d.value=f,d.name=a)}let h=document.createElement("tr");h.appendChild(l),h.appendChild(p),o.appendChild(h)}return r.appendChild(o),r}},\u30D5\u30A9\u30FC\u30E0\u5165\u529B\u4E00\u62EC\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t){typeof t=="string"&&(t=document.querySelector(t));let e={},n=r=>{if(!(!r||!r.childNodes))for(let i=0;i<r.childNodes.length;i++){let o=r.childNodes[i];if(!o.tagName)return;let s=o.tagName.toLowerCase();if(s==="input"){if(o.type==="checkbox"){e[o.name]=o.checked?o.value:"";continue}e[o.name]=o.value;continue}else s==="textarea"?e[o.name]=o.value:s==="select"&&(o.selectedIndex>=0?e[o.name]=o.options[o.selectedIndex].value:e[o.name]="");n(o)}};return n(t),e}},\u30C6\u30FC\u30D6\u30EB\u4F5C\u6210:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){if(typeof t=="string"){let u=[],c=t.split(`
478
- `);for(let a of c)u.push(a.split(","));t=u}let n=e.__getSysVar("DOM\u90E8\u54C1\u30AA\u30D7\u30B7\u30E7\u30F3"),r=JSON.parse(JSON.stringify(n.\u30C6\u30FC\u30D6\u30EB\u80CC\u666F\u8272)),i=n.\u30C6\u30FC\u30D6\u30EB\u30D8\u30C3\u30C0;for(let u=0;u<3;u++)r.push("");let o=r.shift(),s=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["table",e]);for(let u=0;u<t.length;u++){let c=u,a=t[c],f=document.createElement("tr");for(let l of a){l=""+l;let p=document.createElement(c===0&&i?"th":"td");if(p.innerHTML=e.__tohtml(l),o!==""){let h=i?c:c+1;p.style.backgroundColor=h===0?o:r[h%2],p.style.color=h===0?"white":"black"}l.match(/^(\+|-)?\d+(\.\d+)?$/)&&(p.style.textAlign="right"),f.appendChild(p)}s.appendChild(f)}return s}},\u30D8\u30C3\u30C0\u7121\u30C6\u30FC\u30D6\u30EB\u4F5C\u6210:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){let n=e.__getSysVar("DOM\u90E8\u54C1\u30AA\u30D7\u30B7\u30E7\u30F3");return n.\u30C6\u30FC\u30D6\u30EB\u30D8\u30C3\u30C0=!1,e.__exec("\u30C6\u30FC\u30D6\u30EB\u4F5C\u6210",[t,e])}},\u30C6\u30FC\u30D6\u30EB\u30BB\u30EB\u5909\u66F4:{type:"func",josi:[["\u306E"],["\u3092"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n,r){if(typeof t=="string"&&(t=document.querySelector(t)),typeof e=="string"&&(e=e.split(",")),e.length!==2)throw new Error("\u300E\u30C6\u30FC\u30D6\u30EB\u30BB\u30EB\u5909\u66F4\u300F\u306E\u5F15\u6570\u300C\u3092\u300D\u306F[\u884C,\u5217]\u306E\u5F62\u5F0F\u3067\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002");let i=e[0],o=e[1],s=t.childNodes;console.log("@@@v1:",s);let u=s[i]?s[i]:null;if(!u)return;let c=u[o];c&&(c.innerHTML=n)},return_none:!0},\u30DE\u30FC\u30E1\u30A4\u30C9\u4F5C\u6210:{type:"func",josi:[["\u306E"]],pure:!0,asyncFn:!0,fn:async function(t,e){console.log("aaa");let n=e.__exec("DOM\u90E8\u54C1\u4F5C\u6210",["div",e]);return n.classList.add("mermaid"),n.innerHTML=t,typeof e.__v0.WINDOW.mermaid>"u"&&(console.log("try to load mermaid"),await e.__loadScript("https://cdn.jsdelivr.net/npm/mermaid@10.5.0/dist/mermaid.min.js"),console.log("loaded mermaid")),await e.__v0.WINDOW.mermaid.run(),n}}};var an={HTML\u5909\u63DB:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t){return String(t).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;")}},\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u8A2D\u5B9A:{type:"func",josi:[["\u3092"]],pure:!0,asyncFn:!0,fn:async function(t){if(navigator.clipboard){await navigator.clipboard.writeText(t);return}let e=document.createElement("div"),n=document.createElement("pre");n.style.webkitUserSelect="auto",n.style.userSelect="auto",e.appendChild(n).textContent=t,e.style.position="fixed",e.right="200%",document.body.appendChild(e),document.getSelection().selectAllChildren(e),document.execCommand("copy"),document.body.removeChild(e)},return_none:!0},\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u53D6\u5F97\u6642:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){if(navigator.clipboard)typeof t=="string"&&(t=e.__findFunc(t,"\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u53D6\u5F97\u6642")),navigator.clipboard.readText().then(r=>{e.__setSysVar("\u5BFE\u8C61",r),t(e)});else throw new Error("Clipbard API\u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002")}},\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u53D6\u5F97:{type:"func",josi:[],pure:!0,asyncFn:!0,fn:async function(t){if(navigator.clipboard)return await navigator.clipboard.readText();throw new Error("Clipbard API\u304C\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002")}}};var fn={\u4FDD\u5B58:{type:"func",josi:[["\u3092"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n){n.__exec("\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u4FDD\u5B58",[t,e,n])},return_none:!0},\u958B:{type:"func",josi:[["\u3092","\u304B\u3089","\u306E"]],pure:!0,fn:function(t,e){return e.__exec("\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u8AAD",[t,e])},return_none:!1},\u8AAD:{type:"func",josi:[["\u3092","\u304B\u3089","\u306E"]],pure:!0,fn:function(t,e){return e.__exec("\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u8AAD",[t,e])},return_none:!1},\u5B58\u5728:{type:"func",josi:[["\u304C"]],pure:!0,fn:function(t){return window.localStorage.getItem(t)!==null},return_none:!1},\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u4FDD\u5B58:{type:"func",josi:[["\u3092"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n){let r=t;n.__getSysVar("\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3")&&(n.__getSysVar("\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3").indexOf("json")>=0?r=JSON.stringify(r):n.__getSysVar("\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3")),window.localStorage[e]=r},return_none:!0},\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u8AAD:{type:"func",josi:[["\u3092","\u304B\u3089","\u306E"]],pure:!0,fn:function(t,e){let n=window.localStorage[t];if(e.__getSysVar("\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3")&&e.__getSysVar("\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3").indexOf("json")>=0)try{return JSON.parse(n)}catch{console.log("\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u300E"+t+"\u300F\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557")}return n},return_none:!1},\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u30AD\u30FC\u5217\u6319:{type:"func",josi:[],pure:!0,fn:function(t){let e=[];for(let n in window.localStorage)e.push(n);return e},return_none:!1},\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u30AD\u30FC\u524A\u9664:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t){window.localStorage.removeItem(t)},return_none:!0},\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u5168\u524A\u9664:{type:"func",josi:[],pure:!0,fn:function(){window.localStorage.clear()},return_none:!0},\u30ED\u30FC\u30AB\u30EB\u30B9\u30C8\u30EC\u30FC\u30B8\u6709\u52B9\u78BA\u8A8D:{type:"func",josi:[],pure:!0,fn:function(){return typeof window.localStorage<"u"},return_none:!1},\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3:{type:"const",value:"json"},\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){t=t.toUpperCase(t),e.__setSysVar("\u4FDD\u5B58\u30AA\u30D7\u30B7\u30E7\u30F3",t)},return_none:!0}};var N="\u63CF\u753B\u3092\u884C\u3046\u305F\u3081\u306B\u306F\u3001HTML\u5185\u306Bcanvas\u3092\u914D\u7F6E\u3057\u3001id\u3092\u632F\u3063\u3066\u300E\u63CF\u753B\u958B\u59CB\u300F\u547D\u4EE4\u306B\u6307\u5B9A\u3057\u307E\u3059\u3002",ln={\u63CF\u753B\u958B\u59CB:{type:"func",josi:[["\u306E","\u3078","\u3067"]],pure:!0,fn:function(t,e){if(typeof t=="string"&&(t=document.querySelector(t)||document.getElementById(t)),!t)throw new Error("\u300E\u63CF\u753B\u958B\u59CB\u300F\u3067Canvas\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002");e.__canvas=t,e.__ctx=t.getContext("2d"),e.__fillStyle="black",e.__strokeStyle="black",e.__setSysVar("\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9",t),e.__setSysVar("\u63CF\u753B\u4E2D\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8",e.__ctx)},return_none:!0},\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9:{type:"const",value:null},\u63CF\u753B\u4E2D\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8:{type:"const",value:null},\u30AD\u30E3\u30F3\u30D0\u30B9\u72B6\u614B\u4FDD\u5B58:{type:"func",josi:[],pure:!0,fn:function(t){if(!t.__ctx)throw new Error(N);t.__ctx.save()},return_none:!0},\u30AD\u30E3\u30F3\u30D0\u30B9\u72B6\u614B\u5FA9\u5143:{type:"func",josi:[],pure:!0,fn:function(t){if(!t.__ctx)throw new Error(N);t.__ctx.restore()},return_none:!0},\u7DDA\u8272\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__strokeStyle=t,t!==""&&(e.__ctx.strokeStyle=t)},return_none:!0},\u5857\u8272\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__fillStyle=t,t!==""&&(e.__ctx.fillStyle=t)},return_none:!0},\u7DDA\u63CF\u753B:{type:"func",josi:[["\u304B\u3089"],["\u3078","\u307E\u3067"]],pure:!0,fn:function(t,e,n){if(!n.__ctx)throw new Error(N);n.__ctx.beginPath(),n.__ctx.moveTo(t[0],t[1]),n.__ctx.lineTo(e[0],e[1]),n.__ctx.stroke()},return_none:!0},\u7DDA\u592A\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__ctx.lineWidth=t},return_none:!0},\u56DB\u89D2\u63CF\u753B:{type:"func",josi:[["\u306E","\u3078","\u306B"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__fillStyle===""&&e.__strokeStyle===""||(e.__ctx.beginPath(),e.__ctx.rect(t[0],t[1],t[2],t[3]),e.__fillStyle!==""&&e.__ctx.fill(),e.__strokeStyle!==""&&e.__ctx.stroke())},return_none:!0},\u5168\u63CF\u753B\u30AF\u30EA\u30A2:{type:"func",josi:[],pure:!0,fn:function(t){if(!t.__ctx)throw new Error(N);t.__ctx.clearRect(0,0,t.__canvas.width,t.__canvas.height)},return_none:!0},\u63CF\u753B\u30AF\u30EA\u30A2:{type:"func",josi:[["\u306E","\u3078","\u306B"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);t instanceof Array||(t=[]),t.length===0?t=[0,0,e.__canvas.width,e.__canvas.height]:t.length<=2&&(t.unshift(0),t.unshift(0)),e.__ctx.clearRect(t[0],t[1],t[2],t[3])},return_none:!0},\u5186\u63CF\u753B:{type:"func",josi:[["\u3078","\u306B"],["\u306E"]],pure:!0,fn:function(t,e,n){if(!n.__ctx)throw new Error(N);n.__fillStyle===""&&n.__strokeStyle===""||(n.__ctx.beginPath(),n.__ctx.arc(t[0],t[1],e,0,2*Math.PI,!1),n.__fillStyle!==""&&n.__ctx.fill(),n.__strokeStyle!==""&&n.__ctx.stroke())},return_none:!0},\u6955\u5186\u63CF\u753B:{type:"func",josi:[["\u3078","\u306B","\u306E"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);if(!t)throw new Error("\u6955\u5186\u63CF\u753B\u306E\u5F15\u6570\u914D\u5217\u304C\u7121\u52B9\u3067\u3059");if(t.length<4)throw new Error("\u6955\u5186\u63CF\u753B\u306E\u5F15\u6570\u914D\u5217\u304C\u4E0D\u8DB3\u3057\u3066\u3044\u307E\u3059");t.length<7&&(t[4]||(t[4]=0),t[5]||(t[5]=0),t[6]||(t[6]=Math.PI*2),t[7]||(t[7]=!0)),!(e.__fillStyle===""&&e.__strokeStyle==="")&&(e.__ctx.beginPath(),e.__ctx.ellipse(...t),e.__fillStyle!==""&&e.__ctx.fill(),e.__strokeStyle!==""&&e.__ctx.stroke())},return_none:!0},\u591A\u89D2\u5F62\u63CF\u753B:{type:"func",josi:[["\u3067","\u306E","\u3092"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);if(e.__fillStyle===""&&e.__strokeStyle==="")return;e.__ctx.beginPath();let n=t[0];e.__ctx.moveTo(n[0],n[1]);for(let r=1;r<t.length;r++){let i=t[r];e.__ctx.lineTo(i[0],i[1])}e.__ctx.lineTo(n[0],n[1]),e.__fillStyle!==""&&e.__ctx.fill(),e.__strokeStyle!==""&&e.__ctx.stroke()},return_none:!0},\u753B\u50CF\u8AAD:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){let n=new window.Image;return n.src=t,n.crossOrigin="Anonymous",n}},\u753B\u50CF\u8AAD\u5F85:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,asyncFn:!0,fn:function(t){return new Promise((e,n)=>{let r=new window.Image;r.src=t,r.crossOrigin="Anonymous",r.onload=()=>{e(r)},r.onerror=()=>{n(new Error(`\u300E\u753B\u50CF\u8AAD\u5F85\u300F\u3067\u8AAD\u8FBC\u307F\u30A8\u30E9\u30FC\u3002URL=\u300E${t}\u300F`))}})}},\u753B\u50CF\u9010\u6B21\u8AAD:{type:"func",josi:[["\u306E","\u3092"]],pure:!0,fn:function(t,e){if(e.resolve===void 0)throw new Error("\u300E\u753B\u50CF\u9010\u6B21\u8AAD\u300F\u306F\u300E\u9010\u6B21\u5B9F\u884C\u300F\u69CB\u6587\u3067\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002");e.resolveCount++;let n=new window.Image;return n.src=t,n.crossOrigin="Anonymous",n.onload=()=>{e.__setSysVar("\u5BFE\u8C61",n),e.resolve()},n.onerror=()=>{e.__setSysVar("\u5BFE\u8C61",""),e.reject()},n}},\u753B\u50CF\u8AAD\u6642:{type:"func",josi:[["\u3067"],["\u306E","\u3092"]],pure:!0,fn:function(t,e,n){let r=n.__findVar(t,null),i=new window.Image;i.src=e,i.crossOrigin="Anonymous",i.onload=()=>{n.__setSysVar("\u5BFE\u8C61",i),r(n)},i.onerror=()=>{n.__setSysVar("\u5BFE\u8C61",""),r(n)}},return_none:!0},\u753B\u50CF\u63CF\u753B:{type:"func",josi:[["\u306E","\u3092"],["\u3078","\u306B"]],pure:!0,fn:function(t,e,n){if(!n.__ctx)throw new Error(N);let r=(i,o)=>{if(e.length===2)o.drawImage(i,e[0],e[1]);else if(e.length===4)o.drawImage(i,e[0],e[1],e[2],e[3]);else if(e.length===8)o.drawImage(i,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]);else throw new Error("\u300E\u753B\u50CF\u63CF\u753B\u300F\u306E\u7B2C\u4E8C\u5F15\u6570\u306E\u914D\u5217\u8981\u7D20\u306F2,4,8\u500B\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002")};if(typeof t=="string"){let i=new window.Image;return i.src=t,i.crossOrigin="Anonymous",i.onload=()=>{r(i,n.__ctx)},i}else return r(t,n.__ctx),t},return_none:!1},\u753B\u50CF\u90E8\u5206\u63CF\u753B:{type:"func",josi:[["\u306E"],["\u3092","\u304B\u3089"],["\u3078","\u306B"]],pure:!0,fn:function(t,e,n,r){let i="\u300E\u753B\u50CF\u90E8\u5206\u63CF\u753B\u300F\u306B\u4F7F\u3048\u308B\u5F15\u6570\u306F\u753B\u50CF\u3068\u3001\u63CF\u753B\u3059\u308B\u5EA7\u6A19\u30782\u3064\u304B\u3001\u63CF\u753B\u3059\u308B\u5EA7\u6A19\u3068\u305D\u306E\u4F4D\u7F6E\u306E4\u3064\u304B\u3001\u4F7F\u7528\u3059\u308B\u5EA7\u6A19\u3068\u4F7F\u7528\u3059\u308B\u4F4D\u7F6E\u3068\u63CF\u753B\u3059\u308B\u5EA7\u6A19\u3068\u5927\u304D\u3055\u306E8\u3064\u3060\u3051\u3067\u3059\u3002";if(t&&e&&!Array.isArray(e)&&Array.isArray(t)&&(typeof e=="string"||String(e.__proto__)==="[object HTMLImageElement]")){let s=t;t=e,e=s}if(!r.__ctx)throw new Error(N);let o=(s,u)=>{if(n||(e?e.length>=2&&(n=e,e=void 0):u.drawImage(s)),n.length===2)u.drawImage(s,n[0],n[1]);else if(n.length===4)if(!e)u.drawImage(s,n[0],n[1],n[2],n[3]);else if(e.length===4)u.drawImage(s,e[0],e[1],e[2],e[3],n[0],n[1],n[2],n[3]);else throw new Error(i);else throw new Error(i)};if(typeof t=="string"){let s=new window.Image;return s.src=t,s.crossOrigin="Anonymous",s.onload=()=>{o(s,r.__ctx)},s}else return o(t,r.__ctx),t},return_none:!1},\u63CF\u753B\u30D5\u30A9\u30F3\u30C8\u8A2D\u5B9A:{type:"func",josi:[["\u3092","\u306E","\u3067","\u306B"]],pure:!0,fn:function(t,e){typeof t=="number"&&(t=t+"px sans-serif"),/^[0-9]+(px|em)$/.test(t)&&(t=t+" sans-serif"),e.__ctx.font=t},return_none:!0},\u6587\u5B57\u63CF\u753B:{type:"func",josi:[["\u3078","\u306B"],["\u306E","\u3092"]],pure:!0,fn:function(t,e,n){if(!n.__ctx)throw new Error(N);n.__ctx.fillText(e,t[0],t[1])},return_none:!0},\u6587\u5B57\u63CF\u753B\u5E45\u53D6\u5F97:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);return e.__ctx.measureText(t)},return_none:!1},\u63CF\u753B\u8D77\u70B9\u8A2D\u5B9A:{type:"func",josi:[["\u3078","\u306B"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__ctx.translate(t[0],t[1])},return_none:!0},\u63CF\u753B\u56DE\u8EE2:{type:"func",josi:[["\u3060\u3051","\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__ctx.rotate(t*Math.PI/180)},return_none:!0},\u63CF\u753B\u62E1\u5927:{type:"func",josi:[["\u3060\u3051","\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__ctx.scale(t[0],t[1])},return_none:!0},\u63CF\u753B\u5909\u63DB\u30DE\u30C8\u30EA\u30AF\u30B9\u8A2D\u5B9A:{type:"func",josi:[["\u3060\u3051","\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__ctx.setTransform(t[0],t[1],t[2],t[3],t[4],t[5],t[6])},return_none:!0},\u63CF\u753B\u5909\u63DB\u30DE\u30C8\u30EA\u30AF\u30B9\u8FFD\u52A0:{type:"func",josi:[["\u3060\u3051","\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!e.__ctx)throw new Error(N);e.__ctx.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6])},return_none:!0},\u63CF\u753B\u30C7\u30FC\u30BFURL\u5909\u63DB:{type:"func",josi:[],pure:!0,fn:function(t){return t.__getSysVar("\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9").toDataURL("image/png")}},\u63CF\u753B\u30C7\u30FC\u30BFBLOB\u5909\u63DB:{type:"func",josi:[],pure:!0,asyncFn:!0,fn:function(t){return new Promise((e,n)=>{t.__getSysVar("\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9").toBlob(i=>{e(i)},"image/png")})}},\u63CF\u753B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u30AF\u4F5C\u6210:{type:"func",josi:[["\u3078","\u306B"]],pure:!0,fn:function(t,e){if(typeof t=="string"&&(t=document.querySelector(t)),!t)throw new Error("\u300E\u63CF\u753B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u30AF\u4F5C\u6210\u300F\u3067DOM\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002");let n=e.__getSysVar("\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9");if(!n)throw new Error("\u300E\u63CF\u753B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u300F\u3067\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");t.href=n.toDataURL("image/png"),t.download="canvas.png"},return_none:!0},\u63CF\u753B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9:{type:"func",josi:[],pure:!0,fn:function(t){let e=t.__getSysVar("\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9");if(!e)throw new Error("\u300E\u63CF\u753B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u300F\u3067\u63CF\u753B\u4E2D\u30AD\u30E3\u30F3\u30D0\u30B9\u304C\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002");let n=document.createElement("a");return n.href=e.toDataURL("image/png"),n.download="canvas.png",n.click(),!0}}};var pn={\u4F4D\u7F6E\u60C5\u5831\u53D6\u5F97\u6642:{type:"func",josi:[["\u306E","\u306B","\u3078"]],pure:!0,fn:function(t,e){let n=t;if(typeof n=="string"&&(n=e.__findVar(n)),!("geolocation"in navigator))throw new Error("\u95A2\u6570\u300E\u4F4D\u7F6E\u60C5\u5831\u53D6\u5F97\u6642\u300F\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002");navigator.geolocation.getCurrentPosition(r=>{e.__setSysVar("\u5BFE\u8C61",[r.coords.latitude,r.coords.longitude]),n(r)})},return_none:!0},\u4F4D\u7F6E\u60C5\u5831\u76E3\u8996\u6642:{type:"func",josi:[["\u306E","\u306B","\u3078"]],pure:!0,fn:function(t,e){let n=t;if(typeof n=="string"&&(n=e.__findVar(n)),!("geolocation"in navigator))throw new Error("\u95A2\u6570\u300E\u4F4D\u7F6E\u60C5\u5831\u76E3\u8996\u6642\u300F\u306F\u4F7F\u3048\u307E\u305B\u3093\u3002");return navigator.geolocation.watchPosition(r=>{e.__setSysVar("\u5BFE\u8C61",[r.coords.latitude,r.coords.longitude]),n(r)})},return_none:!1},\u4F4D\u7F6E\u60C5\u5831\u76E3\u8996\u505C\u6B62:{type:"func",josi:[["\u306E"]],pure:!0,fn:function(t,e){navigator.geolocation.clearWatch(t)},return_none:!0}};var hn={\u8A71:{type:"func",josi:[["\u3068","\u3092","\u306E"]],pure:!0,fn:function(t,e){let n=e.__exec("\u97F3\u58F0\u5408\u6210\u767A\u8A71\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u53D6\u5F97",[t,e]);return window.speechSynthesis.speak(n),console.log("#\u8A71\u3059:",t),t}},\u8A71\u7D42:{type:"func",josi:[["\u3068","\u3092","\u306E"]],pure:!0,asyncFn:!0,fn:function(t,e){return new Promise((n,r)=>{try{let i=e.__exec("\u97F3\u58F0\u5408\u6210\u767A\u8A71\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u53D6\u5F97",[t,e]);i.onend=()=>{n()},window.speechSynthesis.speak(i),console.log("#\u8A71\u3059:",t)}catch(i){r(i)}})}},\u8A71\u7D42\u6642:{type:"func",josi:[["\u3067"],["\u3068","\u3092","\u306E"]],pure:!0,fn:function(t,e,n){let r=n.__exec("\u97F3\u58F0\u5408\u6210\u767A\u8A71\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u53D6\u5F97",[e,n]);return r.onend=i=>{console.log("#\u8A71\u7D42\u6642"),n.__setSysVar("\u5BFE\u8C61\u30A4\u30D9\u30F3\u30C8",i),t(n)},window.speechSynthesis.speak(r),console.log("#\u8A71\u3059:",e),e}},\u97F3\u58F0\u5408\u6210\u767A\u8A71\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u53D6\u5F97:{type:"func",josi:[["\u306E","\u3067"]],pure:!0,fn:function(t,e){let n=e.__getSysVar("\u8A71:\u8A71\u8005");n||(n=e.__exec("\u8A71\u8005\u8A2D\u5B9A",["ja",e]));let r=new SpeechSynthesisUtterance(t);return r.voice=n,n&&(r.lang=n.lang),r.rate=e.__getSysVar("\u8A71\u8005\u901F\u5EA6"),r.pitch=e.__getSysVar("\u8A71\u8005\u58F0\u9AD8"),r.volume=e.__getSysVar("\u8A71\u8005\u97F3\u91CF"),r}},\u8A71\u8005\u4E00\u89A7\u53D6\u5F97:{type:"func",josi:[],pure:!0,fn:function(t){if(!("SpeechSynthesisUtterance"in window))throw new Error("\u97F3\u58F0\u5408\u6210API\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093");return window.speechSynthesis.getVoices()}},\u8A71\u8005\u8A2D\u5B9A:{type:"func",josi:[["\u306B","\u3078"]],pure:!0,fn:function(t,e){if(!("SpeechSynthesisUtterance"in window))throw new Error("\u97F3\u58F0\u5408\u6210API\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093");if(typeof t=="string"){let n=window.speechSynthesis.getVoices();for(let r of n)if(r.lang.indexOf(t)>=0||r.name===t){let i=new SpeechSynthesisUtterance;return i.voice=r,i.lang=r.lang,e.__setSysVar("\u8A71:\u8A71\u8005",r),console.log("#\u8A71\u8005:",r.name),r}}if(typeof t=="object")return e.__setSysVar("\u8A71:\u8A71\u8005",t),t}},\u8A71\u8005\u901F\u5EA6:{type:"const",value:1},\u8A71\u8005\u58F0\u9AD8:{type:"const",value:1},\u8A71\u8005\u97F3\u91CF:{type:"const",value:1},\u8A71\u8005\u8A73\u7D30\u8A2D\u5B9A:{type:"func",josi:[["\u3067","\u306B","\u3078"]],pure:!0,fn:function(t,e){let n=(r,i)=>{r==="\u901F\u5EA6"&&e.__setSysVar("\u8A71\u8005\u901F\u5EA6",i),(r==="\u58F0\u9AD8"||r==="\u30D4\u30C3\u30C1")&&e.__setSysVar("\u8A71\u8005\u58F0\u9AD8",i),r==="\u97F3\u91CF"&&e.__setSysVar("\u8A71\u8005\u97F3\u91CF",i)};for(let r in t){let i=t[r];n(r,i)}}}};var dn={WS\u63A5\u7D9A\u5B8C\u4E86\u6642:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){e.__setSysVar("WS:ONOPEN",t)},return_none:!0},WS\u53D7\u4FE1\u6642:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){e.__setSysVar("WS:ONMESSAGE",t)},return_none:!0},WS\u30A8\u30E9\u30FC\u767A\u751F\u6642:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){e.__setSysVar("WS:ONERROR",t)},return_none:!0},WS\u63A5\u7D9A:{type:"func",josi:[["\u306B","\u3078","\u306E"]],pure:!0,fn:function(t,e){let n=new WebSocket(t);return n.onopen=()=>{let r=e.__getSysVar("WS:ONOPEN");r&&r(e)},n.onerror=r=>{let i=e.__getSysVar("WS:ONERROR");i&&i(r,e),console.log("WS\u30A8\u30E9\u30FC",r)},n.onmessage=r=>{e.__setSysVar("\u5BFE\u8C61",r.data);let i=e.__getSysVar("WS:ONMESSAGE");i&&i(e)},e.__setSysVar("WS:SOCKET",n),n}},WS\u9001\u4FE1:{type:"func",josi:[["\u3092","\u3068"]],pure:!0,fn:function(t,e){e.__getSysVar("WS:SOCKET").send(t)}},WS\u5207\u65AD:{type:"func",josi:[],pure:!0,fn:function(t){t.__getSysVar("WS:SOCKET").close()}}};var _n={\u30AA\u30FC\u30C7\u30A3\u30AA\u958B:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t,e){let n=new Audio;return n.src=t,n},return_none:!1},\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");t.loop=!1,t.play()},return_none:!0},\u30AA\u30FC\u30C7\u30A3\u30AA\u30EB\u30FC\u30D7\u518D\u751F:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");t.loop=!0,t.play()},return_none:!0},\u30AA\u30FC\u30C7\u30A3\u30AA\u505C\u6B62:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u505C\u6B62\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");t.pause(),t.currentTime=0,setTimeout(()=>{t.currentTime=0},10)},return_none:!0},\u30AA\u30FC\u30C7\u30A3\u30AA\u4E00\u6642\u505C\u6B62:{type:"func",josi:[["\u3092"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u4E00\u6642\u505C\u6B62\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");t.pause()},return_none:!0},\u30AA\u30FC\u30C7\u30A3\u30AA\u97F3\u91CF\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u9577\u53D6\u5F97\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");return t.volume}},\u30AA\u30FC\u30C7\u30A3\u30AA\u97F3\u91CF\u8A2D\u5B9A:{type:"func",josi:[["\u3092"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u9577\u53D6\u5F97\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");t.volume=e},return_none:!0},\u30AA\u30FC\u30C7\u30A3\u30AA\u9577\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u9577\u53D6\u5F97\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");return t.duration}},\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u4F4D\u7F6E\u53D6\u5F97:{type:"func",josi:[["\u306E","\u304B\u3089"]],pure:!0,fn:function(t,e){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u4F4D\u7F6E\u53D6\u5F97\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");return t.currentTime}},\u30AA\u30FC\u30C7\u30A3\u30AA\u518D\u751F\u4F4D\u7F6E\u8A2D\u5B9A:{type:"func",josi:[["\u3092"],["\u306B","\u3078"]],pure:!0,fn:function(t,e,n){if(!t)throw new Error("\u30AA\u30FC\u30C7\u30A3\u30AA\u505C\u6B62\u3059\u308B\u524D\u306B\u3001\u30AA\u30FC\u30C7\u30A3\u30AA\u958B\u304F\u3067\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u307F\u8FBC\u3093\u3067\u304F\u3060\u3055\u3044");t.currentTime=e},return_none:!0}};var gt=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function mt(t,e,n,r){t.addEventListener?t.addEventListener(e,n,r):t.attachEvent&&t.attachEvent("on".concat(e),n)}function ve(t,e,n,r){t.removeEventListener?t.removeEventListener(e,n,r):t.detachEvent&&t.detachEvent("on".concat(e),n)}function yn(t,e){let n=e.slice(0,e.length-1);for(let r=0;r<n.length;r++)n[r]=t[n[r].toLowerCase()];return n}function bn(t){typeof t!="string"&&(t=""),t=t.replace(/\s/g,"");let e=t.split(","),n=e.lastIndexOf("");for(;n>=0;)e[n-1]+=",",e.splice(n,1),n=e.lastIndexOf("");return e}function kr(t,e){let n=t.length>=e.length?t:e,r=t.length>=e.length?e:t,i=!0;for(let o=0;o<n.length;o++)r.indexOf(n[o])===-1&&(i=!1);return i}var Se={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":gt?173:189,"=":gt?61:187,";":gt?59:186,"'":222,"[":219,"]":221,"\\":220},H={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},bt={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},L={16:!1,18:!1,17:!1,91:!1},A={};for(let t=1;t<20;t++)Se["f".concat(t)]=111+t;var O=[],ke=null,wn="all",Y=new Map,xe=t=>Se[t.toLowerCase()]||H[t.toLowerCase()]||t.toUpperCase().charCodeAt(0),Sr=t=>Object.keys(Se).find(e=>Se[e]===t),jr=t=>Object.keys(H).find(e=>H[e]===t);function vn(t){wn=t||"all"}function je(){return wn||"all"}function xr(){return O.slice(0)}function Or(){return O.map(t=>Sr(t)||jr(t)||String.fromCharCode(t))}function $r(){let t=[];return Object.keys(A).forEach(e=>{A[e].forEach(n=>{let{key:r,scope:i,mods:o,shortcut:s}=n;t.push({scope:i,shortcut:s,mods:o,keys:r.split("+").map(u=>xe(u))})})}),t}function Mr(t){let e=t.target||t.srcElement,{tagName:n}=e,r=!0,i=n==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||n==="TEXTAREA"||n==="SELECT")&&!e.readOnly)&&(r=!1),r}function Er(t){return typeof t=="string"&&(t=xe(t)),O.indexOf(t)!==-1}function Ar(t,e){let n,r;t||(t=je());for(let i in A)if(Object.prototype.hasOwnProperty.call(A,i))for(n=A[i],r=0;r<n.length;)n[r].scope===t?n.splice(r,1).forEach(s=>{let{element:u}=s;return wt(u)}):r++;je()===t&&vn(e||"all")}function Nr(t){let e=t.keyCode||t.which||t.charCode,n=O.indexOf(e);if(n>=0&&O.splice(n,1),t.key&&t.key.toLowerCase()==="meta"&&O.splice(0,O.length),(e===93||e===224)&&(e=91),e in L){L[e]=!1;for(let r in H)H[r]===e&&(G[r]=!1)}}function kn(t){if(typeof t>"u")Object.keys(A).forEach(i=>{Array.isArray(A[i])&&A[i].forEach(o=>Ue(o)),delete A[i]}),wt(null);else if(Array.isArray(t))t.forEach(i=>{i.key&&Ue(i)});else if(typeof t=="object")t.key&&Ue(t);else if(typeof t=="string"){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];let[i,o]=n;typeof i=="function"&&(o=i,i=""),Ue({key:t,scope:i,method:o,splitKey:"+"})}}var Ue=t=>{let{key:e,scope:n,method:r,splitKey:i="+"}=t;bn(e).forEach(s=>{let u=s.split(i),c=u.length,a=u[c-1],f=a==="*"?"*":xe(a);if(!A[f])return;n||(n=je());let l=c>1?yn(H,u):[],p=[];A[f]=A[f].filter(h=>{let g=(r?h.method===r:!0)&&h.scope===n&&kr(h.mods,l);return g&&p.push(h.element),!g}),p.forEach(h=>wt(h))})};function gn(t,e,n,r){if(e.element!==r)return;let i;if(e.scope===n||e.scope==="all"){i=e.mods.length>0;for(let o in L)Object.prototype.hasOwnProperty.call(L,o)&&(!L[o]&&e.mods.indexOf(+o)>-1||L[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!L[16]&&!L[18]&&!L[17]&&!L[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(O),e.method(t,e)===!1&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0)))}}function mn(t,e){let n=A["*"],r=t.keyCode||t.which||t.charCode;if(!G.filter.call(this,t))return;if((r===93||r===224)&&(r=91),O.indexOf(r)===-1&&r!==229&&O.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(u=>{let c=bt[u];t[u]&&O.indexOf(c)===-1?O.push(c):!t[u]&&O.indexOf(c)>-1?O.splice(O.indexOf(c),1):u==="metaKey"&&t[u]&&O.length===3&&(t.ctrlKey||t.shiftKey||t.altKey||(O=O.slice(O.indexOf(c))))}),r in L){L[r]=!0;for(let u in H)H[u]===r&&(G[u]=!0);if(!n)return}for(let u in L)Object.prototype.hasOwnProperty.call(L,u)&&(L[u]=t[bt[u]]);t.getModifierState&&!(t.altKey&&!t.ctrlKey)&&t.getModifierState("AltGraph")&&(O.indexOf(17)===-1&&O.push(17),O.indexOf(18)===-1&&O.push(18),L[17]=!0,L[18]=!0);let i=je();if(n)for(let u=0;u<n.length;u++)n[u].scope===i&&(t.type==="keydown"&&n[u].keydown||t.type==="keyup"&&n[u].keyup)&&gn(t,n[u],i,e);if(!(r in A))return;let o=A[r],s=o.length;for(let u=0;u<s;u++)if((t.type==="keydown"&&o[u].keydown||t.type==="keyup"&&o[u].keyup)&&o[u].key){let c=o[u],{splitKey:a}=c,f=c.key.split(a),l=[];for(let p=0;p<f.length;p++)l.push(xe(f[p]));l.sort().join("")===O.sort().join("")&&gn(t,c,i,e)}}function G(t,e,n){O=[];let r=bn(t),i=[],o="all",s=document,u=0,c=!1,a=!0,f="+",l=!1,p=!1;for(n===void 0&&typeof e=="function"&&(n=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(s=e.element),e.keyup&&(c=e.keyup),e.keydown!==void 0&&(a=e.keydown),e.capture!==void 0&&(l=e.capture),typeof e.splitKey=="string"&&(f=e.splitKey),e.single===!0&&(p=!0)),typeof e=="string"&&(o=e),p&&kn(t,o);u<r.length;u++)t=r[u].split(f),i=[],t.length>1&&(i=yn(H,t)),t=t[t.length-1],t=t==="*"?"*":xe(t),t in A||(A[t]=[]),A[t].push({keyup:c,keydown:a,scope:o,mods:i,shortcut:r[u],method:n,key:r[u],splitKey:f,element:s});if(typeof s<"u"&&window){if(!Y.has(s)){let h=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return mn(g,s)},d=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;mn(g,s),Nr(g)};Y.set(s,{keydownListener:h,keyupListenr:d,capture:l}),mt(s,"keydown",h,l),mt(s,"keyup",d,l)}if(!ke){let h=()=>{O=[]};ke={listener:h,capture:l},mt(window,"focus",h,l)}}}function Fr(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(A).forEach(n=>{A[n].filter(i=>i.scope===e&&i.shortcut===t).forEach(i=>{i&&i.method&&i.method()})})}function wt(t){let e=Object.values(A).flat();if(e.findIndex(r=>{let{element:i}=r;return i===t})<0){let{keydownListener:r,keyupListenr:i,capture:o}=Y.get(t)||{};r&&i&&(ve(t,"keyup",i,o),ve(t,"keydown",r,o),Y.delete(t))}if((e.length<=0||Y.size<=0)&&(Object.keys(Y).forEach(i=>{let{keydownListener:o,keyupListenr:s,capture:u}=Y.get(i)||{};o&&s&&(ve(i,"keyup",s,u),ve(i,"keydown",o,u),Y.delete(i))}),Y.clear(),Object.keys(A).forEach(i=>delete A[i]),ke)){let{listener:i,capture:o}=ke;ve(window,"focus",i,o),ke=null}}var yt={getPressedKeyString:Or,setScope:vn,getScope:je,deleteScope:Ar,getPressedKeyCodes:xr,getAllKeyCodes:$r,isPressed:Er,filter:Mr,trigger:Fr,unbind:kn,keyMap:Se,modifier:H,modifierMap:bt};for(let t in yt)Object.prototype.hasOwnProperty.call(yt,t)&&(G[t]=yt[t]);if(typeof window<"u"){let t=window.hotkeys;G.noConflict=e=>(e&&window.hotkeys===G&&(window.hotkeys=t),G),window.hotkeys=G}var Sn={\u30DB\u30C3\u30C8\u30AD\u30FC\u767B\u9332:{type:"func",josi:[["\u306B","\u3067"],["\u3092"]],pure:!0,fn:function(t,e,n){G(t,function(r,i){r.preventDefault(),n.__findFunc(e)(n)})}},\u30DB\u30C3\u30C8\u30AD\u30FC\u89E3\u9664:{type:"func",josi:[["\u3092","\u306E"]],pure:!0,fn:function(t){G.unbind(t)}}};var jn={\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){let n=e.__getSysVar("WINDOW");if(typeof n>"u")throw new Error("\u300E\u30B0\u30E9\u30D5\u63CF\u753B\u300F\u306E\u30A8\u30E9\u30FC\u3002\u30D6\u30E9\u30A6\u30B6\u3067\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002");if(typeof n.Chart>"u"&&(console.log("try to load chart.js"),await e.__loadScript("https://cdn.jsdelivr.net/npm/chart.js@4.4.0"),console.log("loaded chart.js")),typeof n.Chart>"u")throw new Error("\u300E\u30B0\u30E9\u30D5\u63CF\u753B\u300F\u306E\u30A8\u30E9\u30FC\u3002Chart.js\u3092\u53D6\u308A\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002");let r=n.Chart;if(!e.__canvas)throw new Error("\u300E\u30B0\u30E9\u30D5\u63CF\u753B\u300F\u306E\u30A8\u30E9\u30FC\u3002\u300E\u63CF\u753B\u958B\u59CB\u300F\u547D\u4EE4\u3067\u63CF\u753B\u5148\u306ECanvas\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002 ");t.\u30BF\u30A4\u30D7&&(t.type=t.\u30BF\u30A4\u30D7),t.\u30C7\u30FC\u30BF&&(t.data=t.\u30C7\u30FC\u30BF),t.\u30AA\u30D7\u30B7\u30E7\u30F3&&(t.options=t.\u30AA\u30D7\u30B7\u30E7\u30F3),e.__chartjs&&e.__chartjs.destroy();let i=new r(e.__canvas,t);return e.__chartjs=i,i}},\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3:{type:"const",value:{}},\u7DDA\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["line",t,e]);let n={type:"line",data:t,options:e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3")};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[n,e])}},\u68D2\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){let n=Object.assign({},e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3"),{indexAxis:"x"});t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["bar",t,e]);let r={type:"bar",data:t,options:n};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[r,e])}},\u6A2A\u68D2\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],pure:!0,asyncFn:!0,fn:async function(t,e){let n=Object.assign({},e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3"),{indexAxis:"y"});t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["bar",t,e]);let r={type:"bar",data:t,options:n};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[r,e])}},\u7A4D\u4E0A\u68D2\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){let n=Object.assign({},e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3"),{indexAxis:"x",scales:{x:{stacked:!0},y:{stacked:!0}}});t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["bar",t,e]);let r={type:"bar",data:t,options:n};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[r,e])}},\u7A4D\u4E0A\u6A2A\u68D2\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){let n=Object.assign({},e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3"),{indexAxis:"y",scales:{x:{stacked:!0},y:{stacked:!0}}});t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["bar",t,e]);let r={type:"bar",data:t,options:n};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[r,e])}},\u6563\u5E03\u56F3\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){let n=Object.assign({},e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3"),{});t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["scatter",t,e]);let r={type:"scatter",data:t,options:n};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[r,e])}},\u5186\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["pie",t,e]);let n={type:"pie",data:t,options:e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3")};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[n,e])}},\u30C9\u30FC\u30CA\u30C4\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["pie",t,e]);let n={type:"doughnut",data:t,options:e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3")};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[n,e])}},\u30DD\u30FC\u30E9\u30FC\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["pie",t,e]);let n={type:"polarArea",data:t,options:e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3")};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[n,e])}},\u30EC\u30FC\u30C0\u30FC\u30B0\u30E9\u30D5\u63CF\u753B:{type:"func",josi:[["\u3092","\u3067","\u306E"]],asyncFn:!0,fn:async function(t,e){t=e.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",["bar",t,e]);let n={type:"radar",data:t,options:e.__getSysVar("\u30B0\u30E9\u30D5\u30AA\u30D7\u30B7\u30E7\u30F3")};return e.__exec("\u30B0\u30E9\u30D5\u63CF\u753B",[n,e])}},\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62:{type:"func",josi:[["\u306E"],["\u3092"]],fn:function(t,e,n){let r=JSON.parse(JSON.stringify(e)),i=["rgba(255, 99, 132, 0.2)","rgba(54, 162, 235, 0.2)","rgba(255, 206, 86, 0.2)","rgba(75, 192, 192, 0.2)","rgba(153, 102, 255, 0.2)","rgba(255, 159, 64, 0.2)"],o=["rgba(255, 99, 132, 1)","rgba(54, 162, 235, 1)","rgba(255, 206, 86, 1)","rgba(75, 192, 192, 1)","rgba(153, 102, 255, 1)","rgba(255, 159, 64, 1)"],s={},u=[],c=[];if(s.labels=[],r instanceof Array){if(r[0]instanceof Array){if(t==="pie"){let f={};f.data=[],s.datasets=[f];for(let l=0;l<r.length;l++)s.labels.push(r[l][0]),f.data.push(r[l][1]),u.push(i[l%6]),c.push(o[l%6]);return f.backgroundColor=u,f.borderColor=c,s}if(typeof r[1][0]=="string"){for(let f=1;f<r.length;f++)s.labels.push(r[f][0]),r[f]=r[f].slice(1);r[0]=r[0].slice(1)}else for(let f=1;f<r.length;f++)s.labels.push(f);s.datasets=[];for(let f=0;f<r[0].length;f++){let l={};s.datasets.push(l),l.label=r[0][f],l.backgroundColor=i[f%6],l.borderColor=o[f%6],l.data=[];for(let p=1;p<r.length;p++)l.data.push(r[p][f])}return s}for(let f=0;f<r.length;f++)s.labels.push(f+1),u.push(i[f%6]),c.push(o[f%6]);let a={};return s.datasets=[a],a.label="\u30C7\u30FC\u30BF",a.data=r,a.backgroundColor=u,a.borderColor=c,s}return r instanceof Object?r:n.__exec("\u4E8C\u6B21\u5143\u30B0\u30E9\u30D5\u30C7\u30FC\u30BF\u5909\u5F62",[[r],n])}}};var xn={\u30CF\u30C3\u30B7\u30E5\u5024\u8A08\u7B97\u6642:{type:"func",josi:[["\u3078"],["\u3092"],["\u3067"]],pure:!0,fn:function(t,e,n,r){t=r.__findVar(t,null);let i=new TextEncoder().encode(e);crypto.subtle.digest(n,i).then(function(o){let s=[],u=new DataView(o);for(let a=0;a<u.byteLength;a+=4){let p="00"+u.getUint32(a).toString(16);s.push(p.substr(p.length-2,2))}let c=r.__setSysVar("\u5BFE\u8C61",s.join(""));t(c)})},return_none:!0}};var Cr=[en,tn,nn,rn,on,sn,un,cn,an,fn,ln,pn,hn,dn,_n,Sn,jn,xn],On={meta:{type:"const",value:{pluginName:"plugin_browser",description:"\u30D6\u30E9\u30A6\u30B6\u7528\u306E\u30D7\u30E9\u30B0\u30A4\u30F3",pluginVersion:"3.6.0",nakoRuntime:["wnako"],nakoVersion:"3.6.0"}},\u521D\u671F\u5316:{type:"func",josi:[],pure:!0,fn:function(t){let e=typeof document>"u"?{body:{}}:document,n=typeof window>"u"?{location:{href:"http://localhost/"}}:window,r=typeof navigator>"u"?{}:navigator,i=typeof n.location>"u"?{href:"http://localhost/"}:n.location;t.__setSysVar("AJAX:ONERROR",o=>{console.log(o)}),t.__setSysVar("DOCUMENT",e),t.__setSysVar("WINDOW",n),t.__setSysVar("NAVIGATOR",r),t.__setSysVar("DOM\u89AA\u8981\u7D20",e.body),t.__setSysVar("\u30D6\u30E9\u30A6\u30B6URL",i.href),t.__tohtml=o=>(""+o).replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;"),t.__tohtmlQ=o=>t.__tohtml(o).replace(/"/g,"&#34;").replace(/'/g,"&#39;"),t.__dom_events=[],t.__addEvent=(o,s,u,c)=>{if(typeof o=="string"&&(o=e.querySelector(o),!o))throw new Error("DOM\u30A4\u30D9\u30F3\u30C8\u304C\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002\u8981\u7D20\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002");if(typeof u=="string"&&(u=t.__findVar(u,null),!u))throw new Error("DOM\u30A4\u30D9\u30F3\u30C8\u304C\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002\u95A2\u6570\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002");let a=f=>(t.__setSysVar("\u5BFE\u8C61",f.target),t.__setSysVar("\u5BFE\u8C61\u30A4\u30D9\u30F3\u30C8",f),c&&c(f,t),t.__genMode==="\u975E\u540C\u671F\u30E2\u30FC\u30C9"&&(t.newenv=!0),u(f,t));t.__dom_events.push({dom:o,event:s,func:a,rawFunc:u}),o.addEventListener(s,a)},t.__keyHandler=(o,s)=>{s.__setSysVar("\u62BC\u30AD\u30FC",o.key)},t.__mouseHandler=(o,s)=>{let u=o.target.getBoundingClientRect();s.__setSysVar("\u30DE\u30A6\u30B9X",o.clientX-u.left),s.__setSysVar("\u30DE\u30A6\u30B9Y",o.clientY-u.top)},t.__touchHandler=(o,s)=>{let u=o.target.getBoundingClientRect(),c=o.changedTouches;if(c.length<=0)return;let a=[];for(let f=0;f<c.length;f++){let l=c[f],p=l.clientX-u.left,h=l.clientY-u.top;f===0&&(s.__setSysVar("\u30BF\u30C3\u30C1X",p),s.__setSysVar("\u30BF\u30C3\u30C1Y",h)),a.push([p,h])}return s.__setSysVar("\u30BF\u30C3\u30C1\u914D\u5217",a),a},t.__removeEvent=(o,s,u)=>{if(typeof o=="string"&&(o=e.querySelector(o),!o))throw new Error("DOM\u30A4\u30D9\u30F3\u30C8\u304C\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3002\u8981\u7D20\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002");if(typeof u=="string"&&(u=t.__findVar(u,null),!u))throw new Error("DOM\u30A4\u30D9\u30F3\u30C8\u304C\u524A\u9664\u3067\u304D\u307E\u305B\u3093\u3002\u95A2\u6570\u304C\u898B\u5F53\u305F\u308A\u307E\u305B\u3093\u3002");for(let c=0;c<t.__dom_events.length;c++){let a=t.__dom_events[c];if(a.dom===o&&a.event===s&&a.rawFunc===u){a.dom.removeEventListener(a.event,a.func),t.__dom_events.splice(c,1);break}}},t.__requestAnimationFrameLastId=0,t.__removeAllDomEvent=()=>{t.__dom_events.forEach(o=>{o.dom.removeEventListener(o.event,o.func)}),t.__dom_events=[],t.__requestAnimationFrameLastId>0&&(n.cancelAnimationFrame(t.__requestAnimationFrameLastId),t.__requestAnimationFrameLastId=0)},t.__query=(o,s,u)=>{let c=typeof o=="string"?document.querySelector(o):o;if(!c)if(u)console.warn(`[\u30D2\u30F3\u30C8](${t.__getSysVar("__line")})\u300E${s}\u300F\u3067DOM\u53D6\u5F97\u306B\u5931\u6557\u3057\u3066\u3044\u307E\u3059\u3002DOM=`,o);else{let a=typeof o=="string"?o:String(o);throw new Error(`\u300E${s}\u300F\u3067\u30AF\u30A8\u30EA\u300E${a}\u300F\u3067DOM\u53D6\u5F97\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002`)}return c},t.__loadScript=o=>new Promise((s,u)=>{let c=document.createElement("script");c.type="text/javascript",c.src=o,c.onload=s,c.onerror=()=>{u(new Error(`Failed to load script at url: ${o}`))},document.getElementsByTagName("head")[0].appendChild(c)})}},"!\u30AF\u30EA\u30A2":{type:"func",josi:[],pure:!0,fn:function(t){t.__chartjs&&t.__chartjs.destroy(),t.__removeAllDomEvent()}}};Cr.forEach(t=>{let e={};Object.assign(e,t),typeof e.\u521D\u671F\u5316<"u"&&delete e.\u521D\u671F\u5316,Object.assign(On,e)});var $n=On;var Tr=/^(なでしこ|nako|nadesiko)3?$/,He=class extends Ie{constructor(){super({useBasicPlugin:!0}),this.version=we.version,this.wnakoVersion=we,this.localFiles={},this.addPluginObject("PluginBrowser",$n),this.addListener("beforeRun",e=>{e.__varslist[0].set("\u30CA\u30C7\u30B7\u30B3\u7A2E\u985E","wnako3"),e.__varslist[0].set("\u30CA\u30C7\u30B7\u30B3\u30D0\u30FC\u30B8\u30E7\u30F3",we.version),e.__varslist[0].set("WNAKO\u30D0\u30FC\u30B8\u30E7\u30F3",we.version)})}async runNakoScript(){let e=0,n=document.querySelectorAll("script");for(let r=0;r<n.length;r++){let i=n[r];if(i.type.match(Tr)){e++;let s=`${typeof window.location=="object"?window.location.href:"url_unknown"}#script${e}.nako3`,u=i.text;await this.loadDependencies(u,s),await this.runAsync(i.text,s)}}e>1&&console.log("\u5B9F\u884C\u3057\u305F\u306A\u3067\u3057\u3053\u306E\u500B\u6570=",e)}async loadDependencies(e,n,r="",i={}){return this.localFiles=i||{},this._loadDependencies(e,n,r,this.getLoaderTool())}checkScriptTagParam(){let e=document.querySelectorAll("script");for(let n=0;n<e.length;n++){let i=e[n].src||"";if(i.indexOf("wnako3.js?run")>=0||i.indexOf("wnako3.js&run")>=0)return!0}return!1}setupEditor(e){return Qt(e,this,window.ace)}getLoaderTool(){return{readJs:this.readJs,readNako3:this.readNako3,resolvePath:this.resolvePath}}readJs(e,n){return this.localFiles&&this.localFiles[e]?{task:(async()=>()=>(Function(this.localFiles[e])(),{}))()}:{task:(async()=>{let r=("/"+e).split("/").pop()||"?",i=await fetch(e);if(!i.ok)throw new B(`\u30D5\u30A1\u30A4\u30EB\u300E${e}\u300F\u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${i.status} ${i.statusText}`,n.file,n.line);let o=await i.text(),u=`exportObject${Math.floor(Math.random()*1e6)}`;if(o.includes("default export")&&(o=o.replace("default export",`;let ${u} = `),o+=`
479
- ;navigator.nako3.addPluginObject('${r}', ${u});
480
- `),!o.includes("navigator.nako3.addPluginObject"))throw new B(`\u30D5\u30A1\u30A4\u30EB ${e} \u306E\u4E2D\u306B\u6587\u5B57\u5217 "navigator.nako3.addPluginObject" \u304C\u5B58\u5728\u3057\u307E\u305B\u3093\u3002\u73FE\u5728\u3001\u30D6\u30E9\u30A6\u30B6\u7248\u306E\u306A\u3067\u3057\u3053\u8A00\u8A9Ev3\u306F\u81EA\u52D5\u767B\u9332\u3059\u308B\u30D7\u30E9\u30B0\u30A4\u30F3\u306E\u307F\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059\u3002`,n.file,n.line);let c=navigator,a=c.nako3;return()=>{let f=c,l=f.nako3;f.nako3=a;try{Function(o).apply(a.__globalObj)}catch(p){throw new B(`\u30D7\u30E9\u30B0\u30A4\u30F3 ${e} \u306E\u53D6\u308A\u8FBC\u307F\u306B\u5931\u6557: ${p instanceof Error?p.message:p+""}`,n.file,n.line)}finally{f.nako3=l}return{}}})()}}readNako3(e,n){return this.localFiles&&this.localFiles[e]?{task:new Promise((r,i)=>{let o=this.localFiles[e];r(o)})}:{task:(async()=>{let r=await fetch(e);if(!r.ok)throw new B(`\u30D5\u30A1\u30A4\u30EB ${e} \u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${r.status} ${r.statusText}`,n.file,n.line);return await r.text()})()}}resolvePath(e,n,r){let i=e;if(!i.match(/^https?:\/\//))if(this.localFiles&&this.localFiles[e])i=this.localFiles[e];else try{i=new URL(e).pathname}catch{try{let c=Lr(r);if(c===""){let a=window.location.href.split("/");c="/"+a.slice(3,a.length-1).join("/")}i=Dr(c,e)}catch(c){throw new B(`\u53D6\u308A\u8FBC\u307F\u6587\u306E\u5F15\u6570\u3067\u30D1\u30B9\u304C\u89E3\u6C7A\u3067\u304D\u307E\u305B\u3093\u3002https:// \u304B http:// \u3067\u59CB\u307E\u308B\u30A2\u30C9\u30EC\u30B9\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
481
- ${c}`,n.file,n.line)}}let o=(u,c)=>{for(let a of c)if(u.endsWith(a)||u.endsWith(a+".txt"))return!0;return!1},s=(i+"?").split("?")[0];if(o(s,[".js",".mjs"]))return{filePath:i,type:"js"};if(o(s,[".nako3",".nako"]))return{filePath:i,type:"nako3"};if(o(i,[".js",".mjs"]))return{filePath:i,type:"js"};if(o(i,[".nako3",".nako"]))return{filePath:i,type:"nako3"};throw new B(`\u30D5\u30A1\u30A4\u30EB\u300E${e}\u300F\u306F\u62E1\u5F35\u5B50\u304C(.nako3|.js|.js.txt|.mjs|.mjs.txt)\u4EE5\u5916\u306A\u306E\u3067\u53D6\u308A\u8FBC\u3081\u307E\u305B\u3093\u3002`,n.file,n.line)}};function Lr(t){let e=t.split("/");return e&&e.length>1?e.slice(0,e.length-1).join("/"):""}function Dr(t,e){let n=t.split("/"),r=e.split("/");for(let i of r)if(i!==""&&i!=="."){if(i===".."){n.pop();continue}n.push(i)}return n.join("/")}if(typeof navigator=="object"&&!navigator.exportWNako3){let t=navigator.nako3=new He;window.addEventListener("DOMContentLoaded",e=>{t.checkScriptTagParam()&&t.runNakoScript()},!1)}})();
482
- //# sourceMappingURL=wnako3.js.map