nadesiko3 3.3.78 → 3.3.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(){"use strict";var e={4228:function(e,s){s.Z={version:"3.3.77",major:3,minor:3,patch:77}},6297:function(e,s,n){n.d(s,{as:function(){return a},ih:function(){return u},k:function(){return t}});class t extends Error{constructor(e,s,n,t){const u=`${n||""}${void 0===t?"":`(${t+1}行目): `}`;super(`[${e}]${u}${s=s.replace(/『main__(.+?)』/g,"『$1』")}`),this.name="NakoError",this.type="NakoError",this.tag="["+e+"]",this.positionJa=u,this.msg=s}}class u extends t{constructor(e,s,n,t,u){super("文法エラー",e,u,s),this.type="NakoSyntaxError",this.file=u,this.line=s,this.startOffset=n,this.endOffset=t}static fromNode(e,s,n){if(!s)return new u(e,void 0,void 0,void 0,void 0);const t="number"==typeof s.startOffset?s.startOffset:void 0,a=n&&"number"==typeof n.endOffset?n.endOffset:"number"==typeof s.endOffset?s.endOffset:void 0;return new u(e,s.line,t,a,s.file)}}class a extends t{constructor(e,s){let n,u,o,i="unknown";"string"==typeof e?i=e:e instanceof a||e instanceof t?i=e.msg:e instanceof Error&&(i="Error"===e.name?e.message:`${e.name}: ${e.message}`),void 0===s?(n=void 0,u=void 0):(o=/^l(-?\d+):(.*)$/.exec(s))?(n=parseInt(o[1]),u=o[2]):(o=/^l(-?\d+)$/.exec(s))?(n=parseInt(o[1]),u="main.nako3"):(n=0,u=s),super("実行時エラー",i,u,n),this.type="NakoRuntimeError",this.lineNo=s,this.line=n,this.file=u}}},9485:function(e,s,n){n.d(s,{Jc:function(){return u}});var t=n(6297);class u{constructor(e){this.nakoFuncList={...e.getNakoFuncList()},this.nakoTestFuncs={},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=e.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varsSet={isFunction:!1,names:new Set,readonly:new Set},this.varslistSet[2]=this.varsSet,this.speedMode={lineNumbers:0,implicitTypeCasting:0,invalidSore:0,forcePure:0},this.performanceMonitor={userFunction:0,systemFunction:0,systemFunctionBody:0,mumeiId:0},this.warnUndefinedVar=!0,this.constPools=[],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)}convLineno(e,s=!1,n=0){if(this.speedMode.lineNumbers>0)return"";let t;if(t="number"!=typeof e.line?"unknown":"string"!=typeof e.file?`l${e.line+n}`:`l${e.line+n}:${e.file}`,!s){if(t===this.lastLineNo)return"";this.lastLineNo=t}const u=JSON.stringify(t);let a="";return this.debugOption.useDebug&&(this.debugOption.messageAction&&(a+=`window.postMessage({action:'${this.debugOption.messageAction}',line: ${u}});`),e.line+n>=1&&this.debugOption.waitTime>0&&(a+=`await __v0['秒待'](${this.debugOption.waitTime},__self);`),a+="if(__v0.forceClose){return-1};"),`__v0.line=${u};`+a}varname(e){return 3===this.varslistSet.length?`__varslist[2][${JSON.stringify(e)}]`:u.isValidIdentifier(e)?e:`__vars[${JSON.stringify(e)}]`}static getFuncName(e){if(e.indexOf("__")>=0){const s=e.split("__");return`${s[0]}__${u.getFuncName(s[1])}`}let s=e.replace(/[ぁ-ん]+$/,"");return""===s&&(s=e),s}static convPrint(e){return`__print(${e});`}convRequire(e){const s=e.value;return this.convLineno(e,!1)+`__module['${s}'] = require('${s}');\n`}getDefFuncCode(e,s){let n="";n+=`const nakoVersion = { version: ${JSON.stringify(e.version)} }\n`,n+="const __self = self;\n",n+="self.__self = self;\n",n+="const __varslist = self.__varslist;\n",n+="const __module = self.__module;\n",n+="const __v0 = self.__v0 = self.__varslist[0];\n",n+="const __v1 = self.__v1 = self.__varslist[1];\n",n+="const __vars = self.__vars = self.__varslist[2];\n",n+=`const __modList = self.__modList = ${JSON.stringify(e.getModList())}\n`,n+="__v0.line = 0;\n",n+="__v0.forceClose = false;\n",n+=`__v0.useDebug = ${this.debugOption.useDebug};\n`,n+="self.constPools = "+JSON.stringify(this.constPools)+";\n";let t="";for(const e in this.nakoFuncList){const s=this.nakoFuncList[e].fn;t+=`//[DEF_FUNC name='${e}' asyncFn=${this.nakoFuncList[e].asyncFn?"true":"false"}]\nself.__varslist[1]["${e}"]=${s};\n;//[/DEF_FUNC name='${e}']\n`}if(""!==t&&(n+="__v0.line='関数の定義';\n"+t),s.isTest){let e="const __tests = [];\n";for(const s in this.nakoTestFuncs){e+=`${this.nakoTestFuncs[s].fn};\n;`}""!==e&&(n+="__v0.line='テストの定義';\n",n+=e+"\n")}return n}addPlugin(e){return this.__self.addPlugin(e)}addPluginObject(e,s){this.__self.addPluginObject(e,s)}addPluginFile(e,s,n){this.__self.addPluginFile(e,s,n)}addFunc(e,s,n){this.__self.addFunc(e,s,n)}getFunc(e){return this.__self.getFunc(e)}registerFunction(e){if("block"!==e.type)throw t.ih.fromNode("構文解析に失敗しています。構文は必ずblockが先頭になります",e);const s=[],n=e=>{if(!e.block)return;const t=e.block instanceof Array?e.block:[e.block];for(let e=0;e<t.length;e++){const u=t[e];if("def_func"===u.type){if(!u.name)throw new Error("[System Error] 関数の定義で関数名が指定されていない");const e=u.name.value;this.usedFuncSet.add(e),this.__self.__varslist[1][e]=function(){},this.varslistSet[1].names.add(e);const n=u.name.meta;this.nakoFuncList[e]={josi:n.josi,fn:()=>{},type:"func",asyncFn:u.asyncFn},s.push({name:e,node:u})}else if("speed_mode"===u.type){if(!u.block)continue;"block"===u.block.type?n(u.block):n(u)}else if("performance_monitor"===u.type){if(!u.block)continue;"block"===u.block.type?n(u.block):n(u)}}};n(e);const u=new Set;0===this.speedMode.invalidSore&&u.add("それ"),this.varsSet={isFunction:!1,names:u,readonly:new Set},this.varslistSet=this.__self.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varslistSet[2]=this.varsSet}convGen(e,s){const n=this.convLineno(e,!1)+this._convGen(e,!0);return s.isTest?"":n}_convGen(e,s){if(!e)return"";let n="";if(e instanceof Array){for(let t=0;t<e.length;t++){const u=e[t];n+=this._convGen(u,s)}return n}if(null===e)return"null";if(void 0===e)return"undefined";if("object"!=typeof e)return""+e;switch(e.type){case"nop":break;case"block":if(!e.block)return n;const t=e.block instanceof Array?e.block:[e.block];for(let e=0;e<t.length;e++){const s=t[e];n+=this._convGen(s,!1)}break;case"comment":case"eol":n+=this.convComment(e);break;case"break":n+=this.convCheckLoop(e,"break");break;case"continue":n+=this.convCheckLoop(e,"continue");break;case"end":n+="__v0['終'](__self);";break;case"number":n+=e.value;break;case"string":n+=this.convString(e);break;case"def_local_var":n+=this.convDefLocalVar(e);break;case"def_local_varlist":n+=this.convDefLocalVarlist(e);break;case"let":n+=this.convLet(e);break;case"inc":n+=this.convInc(e);break;case"word":case"variable":n+=this.convGetVar(e);break;case"op":case"calc":n+=this.convOp(e);break;case"renbun":n+=this.convRenbun(e);break;case"not":n+="(("+this._convGen(e.value,!0)+")?0:1)";break;case"func":case"func_pointer":case"calc_func":n+=this.convCallFunc(e,s);break;case"if":n+=this.convIf(e);break;case"tikuji":n+=this.convTikuji(e);break;case"for":n+=this.convFor(e);break;case"foreach":n+=this.convForeach(e);break;case"repeat_times":n+=this.convRepeatTimes(e);break;case"speed_mode":n+=this.convSpeedMode(e,s);break;case"performance_monitor":n+=this.convPerformanceMonitor(e,s);break;case"while":n+=this.convWhile(e);break;case"atohantei":n+=this.convAtohantei(e);break;case"switch":n+=this.convSwitch(e);break;case"let_array":n+=this.convLetArray(e);break;case"配列参照":n+=this.convRefArray(e);break;case"json_array":n+=this.convJsonArray(e);break;case"json_obj":n+=this.convJsonObj(e);break;case"func_obj":n+=this.convFuncObj(e);break;case"bool":n+=e.value?"true":"false";break;case"null":n+="null";break;case"def_test":n+=this.convDefTest(e);break;case"def_func":n+=this.convDefFunc(e);break;case"return":n+=this.convReturn(e);break;case"try_except":n+=this.convTryExcept(e);break;case"require":n+=this.convRequire(e);break;default:throw new Error("System Error: unknown_type="+e.type)}return n}findVar(e){if(this.varslistSet.length>3&&this.varsSet.names.has(e))return{i:this.varslistSet.length-1,name:e,isTop:!0,js:this.varname(e)};for(let s=2;s>=0;s--)if(this.varslistSet[s].names.has(e))return{i:s,name:e,isTop:!1,js:`__varslist[${s}][${JSON.stringify(e)}]`};return null}genVar(e,s){const n=this.findVar(e),u=s.line;if(null===n){if("引数"===e||"それ"===e||"対象"===e||"対象キー"===e);else if(this.warnUndefinedVar){const n=e.replace(/^main__(.+)$/,"$1");this.__self.getLogger().warn(`変数『${n}』は定義されていません。`,s)}return this.varsSet.names.add(e),this.varname(e)}if(0===n.i){const a=this.__self.getNakoFunc(e);if(!a)return`${n.js}/*err:${u}*/`;if("const"===a.type||"var"===a.type)return n.js;if("func"===a.type){if(!a.josi||0===a.josi.length)return`(${n.js}())`;throw t.ih.fromNode(`『${e}』が複文で使われました。単文で記述してください。(v1非互換)`,s)}throw t.ih.fromNode(`『${e}』は関数であり参照できません。`,s)}return n.js}convGetVar(e){const s=e.value;return this.genVar(s,e)}convComment(e){let s=String(e.value);s=s.replace(/\n/g,"¶");const n=this.convLineno(e,!1);return""===s&&""===n?";":""===s?";"+n+"\n":";"+n+"//"+s+"\n"}convReturn(e){if(this.varsSet.names.has("!関数"))throw t.ih.fromNode("『戻る』がありますが、関数定義内のみで使用可能です。",e);const s=this.convLineno(e,!1);let n;if(e.value)n=this._convGen(e.value,!0);else{if(0!==this.speedMode.invalidSore)return s+"return;";n=this.varname("それ")}if(0===this.warnUndefinedReturnUserFunc)return s+`return ${n};`;{const t=this.constPools.length;return this.constPools.push({msg:"ユーザ関数からundefinedが返されています",file:e.file,line:e.line}),s+`return (__self.chk(${n}, ${t}));`}}convCheckLoop(e,s){if(!this.flagLoop){const n="continue"===s?"続ける":"抜ける";throw t.ih.fromNode(`『${n}』文がありますが、それは繰り返しの中で利用してください。`,e)}return this.convLineno(e)+s+";"}convDefFuncCommon(e,s){let n="",t="";if(0!==this.performanceMonitor.userFunction){let e=s;e||(void 0===this.performanceMonitor.mumeiId&&(this.performanceMonitor.mumeiId=0),this.performanceMonitor.mumeiId++,e=`anous_${this.performanceMonitor.mumeiId}`),n=`const performanceMonitorEnd = (function (key, type) {\nconst uf_start = performance.now() * 1000;\nreturn function () {\nconst el_time = performance.now() * 1000 - uf_start;\nif (!__self.__performance_monitor) {\n__self.__performance_monitor={};\n__self.__performance_monitor[key] = { called:1, totel_usec: el_time, min_usec: el_time, max_usec: el_time, type: type };\n} else if (!__self.__performance_monitor[key]) {\n__self.__performance_monitor[key] = { called:1, totel_usec: el_time, min_usec: el_time, max_usec: el_time, type: type };\n} else {\n__self.__performance_monitor[key].called++;\n__self.__performance_monitor[key].totel_usec+=el_time;\nif(__self.__performance_monitor[key].min_usec>el_time){__self.__performance_monitor[key].min_usec=el_time;}\nif(__self.__performance_monitor[key].max_usec<el_time){__self.__performance_monitor[key].max_usec=el_time;}\n}};})('${e}', 'user');try {\n`,t="} finally { performanceMonitorEnd(); }\n"}let a="";const o=new Set;0===this.speedMode.invalidSore&&o.add("それ"),this.varsSet={isFunction:!0,names:o,readonly:new Set},this.varslistSet.push(this.varsSet),a+=" var 引数 = arguments;\n",a+=" var __vars = {};\n";const i=Array.from(this.varsSet.names.values());let r="";const c=s?e.name.meta:e.meta;for(let n=0;n<c.varnames.length;n++){const t=c.varnames[n];0===this.warnUndefinedCalledUserFuncArgs?r+=` ${this.varname(t)} = arguments[${n}];\n`:r+=s?` ${this.varname(t)} = (function(a){if(a===undefined){__self.logger.warn('ユーザ関数(${s})の引数(${this.varname(t)})にundefinedが渡されました',{file:'${e.file}',line:${e.line}});};return a;})(arguments[${n}]);\n`:` ${this.varname(t)} = (function(a){if(a===undefined){__self.logger.warn('匿名関数の引数(${this.varname(t)})にundefinedが渡されました',{file:'${e.file}',line:${e.line}});};return a;})(arguments[${n}]);\n`,this.varsSet.names.add(t)}s&&(this.usedFuncSet.add(s),this.varslistSet[1].names.add(s),void 0===this.nakoFuncList[s]&&(this.nakoFuncList[s]={josi:e.name.meta.josi,fn:()=>{},type:"func",asyncFn:!1}));const d=this.usedAsyncFn;this.usedAsyncFn=this.debugOption.useDebug;r+=this._convGen(e.block,!1).split("\n").map((e=>" "+e)).join("\n")+"\n",0===this.speedMode.invalidSore&&(r+=` return (${this.varname("それ")});\n`),r+=t,s&&this.usedAsyncFn&&(this.nakoFuncList[s].asyncFn=!0);for(const e of Array.from(this.varsSet.names.values()))i.includes(e)||u.isValidIdentifier(e)&&(a+=` var ${e};\n`);0===this.speedMode.invalidSore&&(u.isValidIdentifier("それ")?a+=" var それ = '';\n":a+=` ${this.varname("それ")} = '';`);return r=(this.usedAsyncFn?"(async function(){\n":"(function(){\n")+n+a+(" "+this.convLineno(e,!0,1)+"\n")+r+"",r+="})",s&&(this.nakoFuncList[s].fn=r,this.nakoFuncList[s].asyncFn=this.usedAsyncFn,c.asyncFn=this.usedAsyncFn),this.usedAsyncFn=d,this.varslistSet.pop(),this.varsSet=this.varslistSet[this.varslistSet.length-1],s&&(this.__self.__varslist[1][s]=r),r}convDefTest(e){const s=e.name.value;let n=`__tests.push({ name: '${s}', f: () => {\n`;return n+=` ${this._convGen(e.block,!1)}\n}});`,this.nakoTestFuncs[s]={josi:e.name.meta.josi,fn:n,type:"test_func"},""}convDefFunc(e){if(!e.name)return"";const s=u.getFuncName(e.name.value);return this.convDefFuncCommon(e,s),""}convFuncObj(e){return this.convDefFuncCommon(e,"")}convJsonObj(e){return"{"+e.value.map((e=>`${this._convGen(e.key,!0)}:${this._convGen(e.value,!0)}`)).join(",")+"}"}convJsonArray(e){return"["+e.value.map((e=>this._convGen(e,!0))).join(",")+"]"}convRefArray(e){const s=this._convGen(e.name,!0),n=e.index;let t=s;if(!n)return t;for(let e=0;e<n.length;e++){t+="["+this._convGen(n[e],!0)+"]"}return t}convLetArray(e){const s=this._convGen(e.name,!0),n=e.index||[];let u="",a=s,o="";if(e.checkInit){const e="[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]";u+=`\n/*配列初期化*/if (!(${s} instanceof Array)) { ${s} = ${e}; /*console.log('初期化:${s}')*/ };`;for(let t=0;t<n.length-1;t++){o+=`[${this._convGen(n[t],!0)}]`,u+=`\n/*配列初期化${t}*/if (!(${s}${o} instanceof Array)) { ${s}${o} = ${e}; };`}u+="\n"}for(let e=0;e<n.length;e++){a+="["+this._convGen(n[e],!0)+"]"}let i=null;if(0===this.speedMode.invalidSore&&(i=this.varname("それ")),e.value&&(i=this._convGen(e.value,!0)),null==i)throw t.ih.fromNode("代入する先の変数名がありません。",e);a+=" = "+i+";\n";return this.convLineno(e,!1)+u+a}convGenLoop(e){const s=this.flagLoop;this.flagLoop=!0;try{return this._convGen(e,!1)}finally{this.flagLoop=s}}convFor(e){let s;if(null!==e.word){const n=e.word.value;this.varsSet.names.add(n),s=this.varname(n)}else this.varsSet.names.add("dummy"),s=this.varname("dummy");const n=this.loopId++,t=`$nako_i${n}`,u=this._convGen(e.from,!0),a=this._convGen(e.to,!0);let o="1";null===e.inc&&void 0!==e.inc&&"null"!==e.inc||(o=this._convGen(e.inc,!0));const i=this.convGenLoop(e.block),r=`$nako_from${n}`,c=`$nako_to${n}`;let d="";0===this.speedMode.invalidSore&&(d=`${this.varname("それ")} = `);const l=`\n//[FOR id=${n}]\nconst ${r} = ${u};\nconst ${c} = ${a};\nif (${r} <= ${c}) { // up\n for (let ${t} = ${r}; ${t} <= ${c}; ${t}+= ${o}) {\n ${d}${s} = ${t};\n ${i}\n };\n} else { // down\n for (let ${t} = ${r}; ${t} >= ${c}; ${t}-= ${o}) {\n ${d}${s} = ${t};\n ${i}\n };\n};\n//[/FOR id=${n}]\n`;return this.convLineno(e,!1)+l}convForeach(e){let s;if(null===e.target){if(0!==this.speedMode.invalidSore)throw t.ih.fromNode("『反復』の対象がありません。",e);s=this.varname("それ")}else s=this._convGen(e.target,!0);let n='__v0["対象"]';e.name&&(n=this.varname(e.name.value),this.varsSet.names.add(e.name.value));const u=this.convGenLoop(e.block),a=this.loopId++;let o="";0===this.speedMode.invalidSore&&(o=`${this.varname("それ")} = `);const i=`let $nako_foreach_v${a}=${s};\nfor (let $nako_i${a} in $nako_foreach_v${a}){\n if ($nako_foreach_v${a}.hasOwnProperty($nako_i${a})) {\n ${n} = ${o}$nako_foreach_v${a}[$nako_i${a}];\n __v0["対象キー"] = $nako_i${a};\n ${u}\n }\n};\n`;return this.convLineno(e,!1)+i}convRepeatTimes(e){const s=this.loopId++,n=this._convGen(e.value,!0),t=this.convGenLoop(e.block);let u="";0===this.speedMode.invalidSore&&(u=`${this.varname("それ")} = `);const a=`let $nako_times_v${s} = ${n};\nfor(var $nako_i${s} = 1; $nako_i${s} <= $nako_times_v${s}; $nako_i${s}++){\n ${u}__v0["回数"] = $nako_i${s};\n `+t+"\n}\n";return this.convLineno(e,!1)+a}convSpeedMode(e,s){if(!e.options)return"";const n={...this.speedMode};e.options["行番号無し"]&&this.speedMode.lineNumbers++,e.options["暗黙の型変換無し"]&&this.speedMode.implicitTypeCasting++,e.options["強制ピュア"]&&this.speedMode.forcePure++,e.options["それ無効"]&&this.speedMode.invalidSore++;try{return this._convGen(e.block,s)}finally{this.speedMode=n}}convPerformanceMonitor(e,s){const n={...this.performanceMonitor};if(!e.options)return"";e.options["ユーザ関数"]&&this.performanceMonitor.userFunction++,e.options["システム関数本体"]&&this.performanceMonitor.systemFunctionBody++,e.options["システム関数"]&&this.performanceMonitor.systemFunction++;try{return this._convGen(e.block,s)}finally{this.performanceMonitor=n}}convWhile(e){const s=`while (${this._convGen(e.cond,!0)}){\n ${this.convGenLoop(e.block)}\n}\n`;return this.convLineno(e,!1)+s}convAtohantei(e){const s=`$nako_i${this.loopId++}`,n=this._convGen(e.cond,!0),t=`for(;;) {\n ${this.convGenLoop(e.block)}\n let ${s} = ${n};\n if (${s}) { continue } else { break }\n}\n\n`;return this.convLineno(e,!1)+t}convSwitch(e){const s=this._convGen(e.value,!0),n=e.cases||[];let t="";for(let e=0;e<n.length;e++){const s=n[e][0],u=this.convGenLoop(n[e][1]);if("違えば"===s.type)t+=" default:\n";else{t+=` case ${this._convGen(s,!0)}:\n`}t+=` ${u}\n break\n`}const u=`switch (${s}){\n${t}\n}\n`;return this.convLineno(e,!1)+u}convIf(e){const s=this._convGen(e.expr,!0),n=this._convGen(e.block,!1),t=null===e.false_block?"":"else {"+this._convGen(e.false_block,!1)+"};\n";return this.convLineno(e,!1)+`if (${s}) {\n ${n}\n}`+t+";\n"}convTikuji(e){const s=`__tikuji${this.loopId++}`;let n=`const ${s} = []\n`;const t=e.blocks?e.blocks:[];for(let e=0;e<t.length;e++){const u=this._convGen(t[e],!1).replace(/\s+$/,"")+"\n";n+=`${s}.push(function(resolve, reject) {\n __self.resolve = resolve;\n __self.reject = reject;\n __self.resolveCount = 0;\n ${this.convLineno(t[e],!0)}\n ${u} if (__self.resolveCount === 0) resolve();\n}); // end of tikuji__\${pid}[{$i}]\n`}n+=`// end of ${s} \n`;let u=` ${s}.splice(0);\n __v0["エラーメッセージ"]=errMsg;\n`;if(null!=e.errorBlock){u+=this._convGen(e.errorBlock,!1).replace(/\s+$/,"")+"\n"}return n+=`const ${s}__reject = function(errMsg){\n${u}};\n`,n+="__self.resolve = undefined;\n",n+=`const ${s}__resolve = function(){\n`,n+=" setTimeout(function(){\n",n+=` if (${s}.length == 0) {return}\n`,n+=` const f = ${s}.shift()\n`,n+=` f(${s}__resolve, ${s}__reject);\n`,n+=" }, 0);\n",n+="};\n",n+=`${s}__resolve()\n`,this.convLineno(e,!1)+n}convFuncGetArgsCalcType(e,s,n){const t=[],u={},a=n.args?n.args:[];for(let e=0;e<a.length;e++){const s=a[e];0===e&&null===s&&0===this.speedMode.invalidSore?(t.push(this.varname("それ")),u.sore=!0):t.push(this._convGen(s,!0))}return[t,u]}getPluginList(){const e=[];for(const s in this.__self.__module)e.push(s);return e}convCallFunc(e,s){const n=u.getFuncName(e.name),a=this.findVar(n);if(null===a)throw t.ih.fromNode(`関数『${n}』が見当たりません。有効プラグイン=[`+this.getPluginList().join(", ")+"]",e);let o;if(0===a.i){if(o=this.__self.getFunc(n),!o)throw new Error(`[System Error] 関数「${n}」NakoCompiler.nakoFuncList の不整合があります。`);if("func"!==o.type)throw t.ih.fromNode(`『${n}』は関数ではありません。`,e)}else o=this.nakoFuncList[n],void 0===o&&(o={return_none:!1});if("func_pointer"===e.type)return a.js;const i=this.convFuncGetArgsCalcType(n,o,e),r=i[0],c=i[1];if(this.usedFuncSet.add(n),"名前空間設定"===n)return`\n// --- 名前空間(${r[0]}) ---\n__varslist[0]['名前空間設定'](${r[0]}, __self);__self.__modName=${r[0]};\n`;if("プラグイン名設定"===n)return`\n__varslist[0]['プラグイン名設定'](${r[0]}, __self);\n`;r.push("__self");let d="function",l="",f="";if(e.setter&&(l+=";__self.isSetter = true;\n",f+=";__self.isSetter = false;\n"),0===a.i&&this.varslistSet.length>3&&!0!==o.pure&&0===this.speedMode.forcePure){const e=[];for(const s of Array.from(this.varsSet.names.values()))u.isValidIdentifier(s)&&e.push({str:JSON.stringify(s),js:this.varname(s)});l+="__self.__locals = __vars;\n";for(const s of e)l+=`__self.__locals[${s.str}] = ${s.js};\n`;for(const s of e)"それ"!==s.js&&(f+=`${s.js} = __self.__locals[${s.str}];\n`)}c.sore&&(l+="/*[sore]*/");const _=(e,s)=>{let n="";for(const t of e.split("\n"))""!==t&&(n+=" ".repeat(s)+t+"\n");return n},h={TYPEOF:!0,"変数型確認":!0};let v;if(0===this.warnUndefinedCallingUserFunc&&0!==a.i||0===this.warnUndefinedCallingSystemFunc&&0===a.i)v=r.join(",");else{const s=[];r.forEach((t=>{if("__self"===t||!0===h[n])s.push(`${t}`);else{const u=this.constPools.length;0===a.i?this.constPools.push({msg:`命令『${n}』の引数にundefinedを渡しています。`,file:e.file,line:e.line}):this.constPools.push({msg:`ユーザ関数『『${n}』の引数にundefinedを渡しています。`,file:e.file,line:e.line});const o=""===t?'""':t;s.push(`(__self.chk(${o}, ${u}))`)}})),v=s.join(", ")}let b=`${a.js}(${v})`;if(o.asyncFn&&(d=`async ${d}`,b=`await ${b}`,this.numAsyncFn++,this.usedAsyncFn=!0),0===a.i&&0!==this.performanceMonitor.systemFunctionBody){let e=n;e||(void 0===this.performanceMonitor.mumeiId&&(this.performanceMonitor.mumeiId=0),this.performanceMonitor.mumeiId++,e=`anous_${this.performanceMonitor.mumeiId}`),b=`(${d} (key, type) {\nconst sbf_start = performance.now() * 1000;\ntry {\nreturn `+b+";\n} finally {\nconst sbl_time = performance.now() * 1000 - sbf_start;\nif (!__self.__performance_monitor) {\n__self.__performance_monitor={};\n__self.__performance_monitor[key] = { called:1, totel_usec: sbl_time, min_usec: sbl_time, max_usec: sbl_time, type: type };\n} else if (!__self.__performance_monitor[key]) {\n__self.__performance_monitor[key] = { called:1, totel_usec: sbl_time, min_usec: sbl_time, max_usec: sbl_time, type: type };\n} else {\n__self.__performance_monitor[key].called++;\n__self.__performance_monitor[key].totel_usec+=sbl_time;\nif(__self.__performance_monitor[key].min_usec>sbl_time){__self.__performance_monitor[key].min_usec=sbl_time;}\nif(__self.__performance_monitor[key].max_usec<sbl_time){__self.__performance_monitor[key].max_usec=sbl_time;}\n"+`}}})('${n}_body', 'sysbody')\n`}let y="";if(o.return_none)y=""===f?""===l?`${b};\n`:`${l} ${b};\n`:`${l}try {\n${_(b,1)};\n} finally {\n${_(f,1)}}\n`;else{let n="";0===this.speedMode.invalidSore&&(n=`${this.varname("それ")} = `),y=""===l&&""===f?`(${n}${b})`:""===f?`(${d}(){\n${_(`${l};\nreturn ${n} ${b}`,1)}}).call(this)`:`(${d}(){\n${_(`${l}try {\n${_(`return ${n}${b};`,1)}\n} finally {\n${_(f,1)}}`,1)}}).call(this)`,("して"===e.josi||""===e.josi&&!s)&&(y+=";\n")}return 0===a.i&&0!==this.performanceMonitor.systemFunction&&(y="(function (key, type) {\nconst sf_start = performance.now() * 1000;\ntry {\nreturn "+y+";\n} finally {\nconst sl_time = performance.now() * 1000 - sf_start;\nif (!__self.__performance_monitor) {\n__self.__performance_monitor={};\n__self.__performance_monitor[key] = { called:1, totel_usec: sl_time, min_usec: sl_time, max_usec: sl_time, type: type };\n} else if (!__self.__performance_monitor[key]) {\n__self.__performance_monitor[key] = { called:1, totel_usec: sl_time, min_usec: sl_time, max_usec: sl_time, type: type };\n} else {\n__self.__performance_monitor[key].called++;\n__self.__performance_monitor[key].totel_usec+=sl_time;\nif(__self.__performance_monitor[key].min_usec>sl_time){__self.__performance_monitor[key].min_usec=sl_time;}\nif(__self.__performance_monitor[key].max_usec<sl_time){__self.__performance_monitor[key].max_usec=sl_time;}\n"+`}}})('${n}_sys', 'system')\n`),y}convRenbun(e){const s=this._convGen(e.right,!0);return`(function(){${this._convGen(e.left,!1)}; return ${s}}).call(this)`}convOp(e){const s={"&":'+""+',eq:"==",noteq:"!=","===":"===","!==":"!==",gt:">",lt:"<",gteq:">=",lteq:"<=",and:"&&",or:"||",shift_l:"<<",shift_r:">>",shift_r0:">>>","÷":"/"};let n=e.operator||"",t=this._convGen(e.right,!0),u=this._convGen(e.left,!0);return"+"===n&&0===this.speedMode.implicitTypeCasting&&(e.left&&"number"!==e.left.type&&(u=`parseFloat(${u})`),e.right&&"number"!==e.right.type&&(t=`parseFloat(${t})`)),"^"===n?`(Math.pow(${u}, ${t}))`:"÷÷"===n?`(Math.floor(${u} / ${t}))`:(s[n]&&(n=s[n]),`(${u} ${n} ${t})`)}convInc(e){let s=null;if(0===this.speedMode.invalidSore&&(s=this.varname("それ")),e.value&&(s=this._convGen(e.value,!0)),null==s)throw t.ih.fromNode("加算する先の変数名がありません。",e);const n=e.name.value;let u=this.findVar(n),a="";if(null===u&&(this.varsSet.names.add(n),u=this.findVar(n),!u))throw new Error("『増』または『減』で変数が見当たりません。");const o=u.js;return a+=`if (typeof(${o}) === 'undefined') { ${o} = 0; }`,a+=`${o} += ${s}`,";"+this.convLineno(e,!1)+a+"\n"}convLet(e){let s=null;if(0===this.speedMode.invalidSore&&(s=this.varname("それ")),e.value&&(s=this._convGen(e.value,!0)),null==s)throw t.ih.fromNode("代入する先の変数名がありません。",e);const n=e.name.value,u=this.findVar(n);let a="";if(null===u)this.varsSet.names.add(n),a=`${this.varname(n)} = ${s};`;else{if(this.varslistSet[u.i].readonly.has(n))throw t.ih.fromNode(`定数『${n}』は既に定義済みなので、値を代入することはできません。`,e);a=`${u.js} = ${s};`}return";"+this.convLineno(e,!1)+a+"\n"}convDefLocalVar(e){const s=null===e.value?"null":this._convGen(e.value,!0),n=e.name.value,u=e.vartype;if(this.varsSet.names.has(n))throw t.ih.fromNode(`${u}『${n}』の二重定義はできません。`,e);this.varsSet.names.add(n),"定数"===u&&this.varsSet.readonly.add(n);const a=`${this.varname(n)}=${s};\n`;return this.convLineno(e,!1)+a}convDefLocalVarlist(e){let s="";const n=e.vartype,t=null===e.value?"null":this._convGen(e.value,!0);this.loopId++;const u=`$nako_i${this.loopId}`;s+=`${u}=${t}\n`,s+=`if (!(${u} instanceof Array)) { ${u}=[${u}] }\n`;const a=e.names?e.names:[];for(let e=0;e<a.length;e++){const t=a[e].value;this.varsSet.names.has(t),this.varsSet.names.add(t),"定数"===n&&this.varsSet.readonly.add(t);s+=`${this.varname(t)}=${u}[${e}];\n`}return this.convLineno(e,!1)+s}convString(e){let s=""+e.value;const n=e.mode;if(s=s.replace(/\\/g,"\\\\"),s=s.replace(/"/g,'\\"'),s=s.replace(/\r/g,"\\r"),s=s.replace(/\n/g,"\\n"),"ex"===n){const n=(s,n)=>'"+'+this.genVar(n,e)+'+"';s=s.replace(/\{(.+?)\}/g,n),s=s.replace(/{(.+?)}/g,n)}return'"'+s+'"'}convTryExcept(e){const s=this._convGen(e.block,!1),n=this._convGen(e.errBlock,!1);return this.convLineno(e,!1)+`try {\n${s}\n} catch (e) {\n __v0["エラーメッセージ"] = e.message;\n;\n`+`${n}}\n`}getUsedFuncSet(){return this.usedFuncSet}getPluginInitCode(){let e="",s="";for(const e in this.__self.__module){const n=`!${e}:初期化`;this.varslistSet[0].names.has(n)&&(this.usedFuncSet.add(`!${e}:初期化`),s+=`__v0["!${e}:初期化"](__self);\n`)}return""!==s&&(e+="__v0.line='l0:プラグインの初期化';\n"+s),e}}}},s={};function n(t){var u=s[t];if(void 0!==u)return u.exports;var a=s[t]={exports:{}};return e[t](a,a.exports,n),a.exports}n.d=function(e,s){for(var t in s)n.o(s,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},n.o=function(e,s){return Object.prototype.hasOwnProperty.call(e,s)},function(){var e=n(6297),s=n(4228),t=n(9485);const u="NOP",a="LBL",o="EOL",i="JMP",r="JMP_T",c="JMP_F",d="CALL",l="CALL_OBJ",f="RET",_="TRY",h="CODE";class v{constructor(e,s){this.type=e,this.value=s,this.no=-1,this.tag=0}}class b{constructor(e){this.com=e,this.nakoFuncList={...e.getNakoFuncList()},this.nakoTestList={},this.usedFuncSet=new Set,this.loopId=1,this.flagLoop=!1,this.codeId=0,this.codeArray=[],this.labelContinue=null,this.labelBreak=null,this.labels={},this.__self=e,this.genMode="非同期モード",this.lastLineNo=null,this.varslistSet=e.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varsSet={isFunction:!1,names:new Set,readonly:new Set},this.varslistSet[2]=this.varsSet,this.speedMode={lineNumbers:0,implicitTypeCasting:0,invalidSore:0,forcePure:0},this.performanceMonitor={userFunction:0,systemFunction:0,systemFunctionBody:0}}static generate(n,t,u){const a=new b(n);a.registerFunction(t);let o=a.convGen(t,!!u);return o=a.getDefFuncCode(u)+o,n.getLogger().trace("--- generate(非同期モード) ---\n"+o),o&&u&&(o+="\n__self._runTests(__tests);\n"),{runtimeEnv:o,standalone:`const nakoVersion = ${JSON.stringify(s.Z)};\n${e.k.toString()}\n${e.as.toString()}\nthis.logger = {\n error(message) { console.error(message) },\n send(level, message) { console.log(message) },\n};\nthis.__varslist = [{}, {}, {}];\nthis.__vars = this.__varslist[2];\nthis.__module = {};\nthis.__locals = {};\nthis.__labels = {};\nthis.__code = [];\nthis.__callstack = [];\nthis.__stack = [];\nthis.__genMode = '非同期モード';\ntry {\n ${a.getVarsCode()}\n ${o}\n} catch (err) {\n if (!(err instanceof NakoRuntimeError)) {\n err = new NakoRuntimeError(err, this.__varslist[0].line);\n }\n this.logger.error(err);\n throw err;\n}`,gen:a}}convLineno(e,s){if(this.speedMode.lineNumbers>0)return"";let n;if(n="number"!=typeof e.line?"unknown":"string"!=typeof e.file?`l${e.line}`:`l${e.line}:${e.file}`,!s){if(n===this.lastLineNo)return"";this.lastLineNo=n}return`__v0.line=${JSON.stringify(n)};`}varname(e){return`sys.__vars[${JSON.stringify(e)}]`}getVarsCode(){let e="";for(const s of Array.from(this.usedFuncSet.values())){const n=this.__self.__varslist[0][s],t=`this.__varslist[0]["${s}"]`;e+="function"==typeof n?t+"="+n.toString()+";\n":t+"="+JSON.stringify(n)+";\n"}return e}getDefFuncCode(e){let s="";s+="const __self = this.__self = this;\n",s+="const __varslist = this.__varslist;\n",s+="const __module = this.__module;\n",s+="const __v0 = this.__v0 = this.__varslist[0];\n",s+="const __v1 = this.__v1 = this.__varslist[1];\n",s+="const __vars = this.__vars = this.__varslist[2];\n",s+="const __code = this.__code;\n";let n="";for(const e in this.nakoFuncList){n+=`//[DEF_FUNC name='${e}']\n__v1["${e}"]=${this.nakoFuncList[e].fn};\n;//[/DEF_FUNC name='${e}']\n`}""!==n&&(s+="__v0.line='関数の定義';\n"+n);let t="";for(const e in this.__self.__module){const s=`!${e}:初期化`;this.varslistSet[0].names.has(s)&&(this.usedFuncSet.add(`!${e}:初期化`),t+=`__v0["!${e}:初期化"](__self);\n`)}if(""!==t&&(s+="__v0.line='プラグインの初期化';\n"+t),e){let n="const __tests = [];\n";for(const s in this.nakoTestList)if(!0===e||"string"==typeof e&&e===s){n+=`${this.nakoTestList[s].fn};\n;`}""!==n&&(s+="__v0.line='テストの定義';\n",s+=n+"\n")}return s}addPlugin(e){return this.__self.addPlugin(e)}addPluginObject(e,s){this.__self.addPluginObject(e,s)}addPluginFile(e,s,n){this.__self.addPluginFile(e,s,n)}addFunc(e,s,n){this.__self.addFunc(e,s,n)}getFunc(e){return this.__self.getFunc(e)}registerFunction(s){if("block"!==s.type)throw e.ih.fromNode("構文解析に失敗しています。構文は必ずblockが先頭になります",s);const n=e=>{for(let s=0;s<e.block.length;s++){const t=e.block[s];if("def_func"===t.type){const e=t.name.value;this.usedFuncSet.add(e),this.__self.__varslist[1][e]=function(){},this.nakoFuncList[e]={josi:t.name.meta.josi,fn:"",type:"func"}}else("speed_mode"===t.type||"performance_monitor"===t.type)&&("block"===t.block.type?n(t.block):n(t))}};n(s);const t=new Set;0===this.speedMode.invalidSore&&t.add("それ"),this.varsSet={isFunction:!1,names:t,readonly:new Set},this.varslistSet=this.__self.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varslistSet[2]=this.varsSet}convGen(e,s){this._convGen(e,!0);const n=new Set([i,r,c,d,_]);let t=this.codeArray;{t=t.filter((e=>e.type!==u));const e=new Set;t.forEach((s=>{n.has(s.type)&&e.add(s.value)})),t=t.filter((s=>s.type!==a||(15===s.tag||e.has(s.value))));let s=0;for(;s<t.length-1;)t[s].type!==o||t[s+1].type!==o?s++:t.splice(s+1,1);this.codeArray=t}t.forEach(((e,s)=>{e.type===a&&(this.labels[e.value]=s)})),t.forEach((e=>{n.has(e.type)&&e.no<0&&(e.no=this.labels[e.value])}));let v="";return t.forEach(((e,s)=>{switch(e.type){case u:v+=`case ${s}: break; // [NOP] ${e.value}\n`;break;case a:v+=`case ${s}: break; // [LABEL] ${e.value}\n`;break;case o:v+=`case ${s}: ${e.value}; break; // [EOL]\n`;break;case i:v+=`case ${s}: sys.nextIndex = ${e.no}; break; // ${e.value}\n`;break;case r:v+=`case ${s}: if (sys.__stack.pop()) { sys.nextIndex = ${e.no};} break; // ${e.value}\n`;break;case c:v+=`case ${s}: if (!sys.__stack.pop()) { sys.nextIndex = ${e.no}} break; // ${e.value}\n`;break;case f:v+=`case ${s}: sys.__return(sys); break;\n`;break;case d:v+=`case ${s}: sys.__call(${e.no}, sys); break; // ${e.value}\n`;break;case l:v+=`case ${s}: sys.__callObj('${e.value}', ${s}, sys); break; // ${e.value}\n`;break;case _:v+=`case ${s}: sys.tryIndex = ${e.no}; break; // TRY \n`;break;case h:{const n=e.value.replace(/\s+$/,"");v+=`case ${s}: {\n${n}\n};break;\n`;break}default:throw new Error("invalid code type")}})),v=`\n //-------------------------\n // main_code\n this.__labels = ${JSON.stringify(this.labels)};\n this.nextAsync = (sys) => {\n if (sys.index >= sys.codeSize || sys.index < 0) {return}\n const __v0 = sys.__v0\n try {\n sys.inLoop = true\n while (sys.index < sys.codeSize && sys.index >= 0) {\n // console.log('@@[run]', sys.index)\n switch (sys.index) {\n // --- CODE.BEGIN ---\n ${v}\n // --- CODE.END ---\n default:\n sys.inLoop = false\n console.log(sys.index, sys.__stack)\n throw new Error('Invalid sys.index:' + sys.index)\n break\n }\n // check next\n if (sys.nextIndex >= 0) {\n sys.index = sys.nextIndex\n sys.nextIndex = -1\n } else {\n sys.index++\n }\n if (sys.async) {\n sys.__saveSysenv(sys)\n sys.async = false\n break\n }\n } // end of while\n sys.inLoop = false\n } catch (e) {\n sys.__errorAsync(e, sys)\n }\n }\n this.__errorAsync = (e, sys) => { // エラーが起きた時呼び出す\n sys.__v0["エラーメッセージ"] = e.message;\n if (e.message == '__終わる__') {\n sys.__stopAsync(sys)\n return\n }\n if (sys.tryIndex >= 0) {\n sys.index = sys.tryIndex;\n setTimeout(() => {sys.nextAsync(sys)}, 1)\n } else {\n throw e\n }\n }\n this.__call = (no, sys) => {\n const info = {lastVars:sys.__vars, backNo: this.index + 1}\n sys.__callstack.push(info);\n sys.__vars = {"それ":""}\n sys.__varslist.push(sys.__vars)\n sys.nextIndex = no;\n }\n this.__return = sys => {\n if (sys.__callstack.length === 0) {\n sys.__destroySysenv(sys, sys.curSysenv.envid)\n sys.index = -2\n sys.nextIndex = -1\n return\n }\n const sore = sys.__vars['それ'];\n sys.__varslist.pop();\n const info = sys.__callstack.pop();\n sys.nextIndex = info.backNo;\n sys.__vars = info.lastVars;\n sys.__vars['それ'] = sore\n sys.__stack.push(sore);\n }\n this.__resetAsync = sys => {\n sys.index = 0\n sys.codeSize = ${t.length};\n sys.async = false\n sys.nextIndex = -1\n sys.tryIndex = -1\n }\n this.__stopAsync = sys => {\n sys.__resetAsync(sys)\n sys.index = -1 // force stop!!\n }\n this.__callNakoCode = (no, backNo, sys) => {\n this.__call(backNo, sys)\n sys.nextIndex = no\n const sysenv = sys.setAsync(sys)\n setTimeout(() => {\n // console.log('//__callNakoCode, back=', backNo, 'no=', no)\n sys.compAsync(sys, sysenv)\n } ,1)\n }\n this.__callNakoCodeEntry = (no, sys) => {\n sys.__saveSysenv(sys)\n sys.curSysenv = sys.__generateSysenv(sys)\n sys.__restoreSysenv(sys)\n sys.__vars = {"それ":""}\n sys.__varslist.push(sys.__vars)\n sys.index = no;\n sys.nextAsync(sys)\n }\n this.__callObj = (vname, curNo, sys) => {\n if (sys.__vars[vname]) {\n const fname = sys.__vars[vname]\n // console.log(sys.__labels)\n if (fname && sys.__labels[fname]) {\n const no = sys.__labels[fname]\n sys.__call(no, sys)\n return\n } else {\n console.log('vname=', vname, 'label=', fname)\n }\n }\n throw new Error('async error in __callObj::', vname)\n }\n this.__generateSysenv = sys => {\n sys.envid = ( sys.envid == null ? 0 : sys.envid ) + 1\n const sysenv = {\n callstack: [],\n varstack: [],\n varslist: [sys.__varslist[0], sys.__varslist[1], sys.__varslist[2]],\n index: -1,\n nextIndex: -1,\n tryIndex: -1,\n envid: sys.envid\n }\n sysenv.vars = sysenv.varslist[2]\n if (sys.sysenvs == null) { sys.sysenvs={} }\n sys.sysenvs[sys.envid] = sysenv\n // console.log('generete envid '+sys.envid)\n return sysenv\n }\n this.__destroySysenv = (sys, envid) => {\n delete sys.sysenvs[envid]\n // console.log('destroy envid '+envid)\n }\n this.__saveSysenv = sys => {\n const sysenv = sys.curSysenv\n sysenv.callstack = sys.__callstack\n sysenv.varstack = sys.__stack\n sysenv.varslist = sys.__varslist\n sysenv.vars = sys.__vars\n sysenv.index = sys.index\n sysenv.nextIndex = sys.nextIndex\n sysenv.tryIndex = sys.tryIndex\n }\n this.__restoreSysenv = sys => {\n const sysenv = sys.curSysenv\n sys.__callstack = sysenv.callstack\n sys.__stack = sysenv.varstack\n sys.__varslist = sysenv.varslist\n sys.__vars = sysenv.vars\n ___vars = sys.__vars\n sys.index = sysenv.index\n sys.nextIndex = sysenv.nextIndex\n sys.tryIndex = sysenv.tryIndex\n }\n this.setAsync = sys => {\n sys.async = true\n return sys.curSysenv\n }\n this.compAsync = (sys,sysenv) => {\n if (sys.async && sys.curSysenv != null && sysenv != null && sys.curSysenv.envid === sysenv.envid) {\n sys.async = false\n } else {\n if (sys.curSysenv == null || sysenv == null || sys.curSysenv.envid !== sysenv.envid) {\n sys.__saveSysenv(sys)\n const envid = sys.curSysenv.envid\n sys.curSysenv = sysenv\n sys.__restoreSysenv(sys)\n // console.log('switch envid '+envid+' to '+sys.curSysenv.envid)\n }\n sys.nextAsync(sys)\n }\n }\n\n this.__resetAsync(this)\n this.curSysenv = this.__generateSysenv(this)\n this.nextAsync(this)\n //-------------------------\n `,s?"":v}_convGen(s,n){let t="";if(s instanceof Array){for(let e=0;e<s.length;e++){const u=s[e];t+=this._convGen(u,n)}return t}if(null===s)return"null";if(void 0===s)return"undefined";if("object"!=typeof s)return""+s;switch(s.type){case"nop":break;case"comment":s.value||(s.value=""),this.addCode(new v(u,s.value));break;case"eol":this.addCode(new v(o,this.convLineno(s,!0)));break;case"number":this.addCodeStr(`sys.__stack.push(${s.value});//number`);break;case"string":this.convString(s);break;case"word":case"variable":this.convGetVar(s);break;case"op":case"calc":this.convOp(s);break;case"renbun":this.convRenbun(s);break;case"not":this._convGen(s.value,!0),this.addCodeStr("if (sys.__stack.length==0) throw new Error('NOTでスタックに値がありません');sys.__stack[sys.__stack.length-1] = (sys.__stack[sys.__stack.length-1]) ? 0:1");break;case"配列参照":this.convRefArray(s);break;case"json_array":this.convJsonArray(s);break;case"json_obj":this.convJsonObj(s);break;case"bool":{const e=s.value?"true":"false";this.addCodeStr(`sys.__stack.push(${e})`);break}case"null":this.addCodeStr("sys.__stack.push(null)");break;case"func":case"func_pointer":case"calc_func":this.convFunc(s,n);break;case"let":this.convLet(s);break;case"let_array":this.convLetArray(s);break;case"block":for(let e=0;e<s.block.length;e++){const n=s.block[e];this._convGen(n,!1)}break;case"if":this.convIf(s);break;case"repeat_times":this.convRepeatTimes(s);break;case"break":this.addCodeStr(this.convCheckLoop(s,"break"));break;case"continue":this.addCodeStr(this.convCheckLoop(s,"continue"));break;case"for":this.convFor(s);break;case"foreach":this.convForeach(s);break;case"while":this.convWhile(s);break;case"switch":this.convSwitch(s);break;case"return":this.convReturn(s);break;case"end":t+=this.addCodeStr("__varslist[0]['終']();");break;case"def_local_var":this.convDefLocalVar(s);break;case"def_local_varlist":t+=this.addCodeStr(this.convDefLocalVarlist(s));break;case"tikuji":throw e.ih.fromNode("「逐次実行」構文は「!非同期モード」では使えません。",s);case"speed_mode":throw e.ih.fromNode("「速度有線」構文は「!非同期モード」では使えません。",s);case"performance_monitor":this.convPerformanceMonitor(s,n);break;case"func_obj":this.convFuncObj(s);break;case"def_test":this.convDefTest(s);break;case"def_func":t+=this.addCodeStr(this.convDefFunc(s));break;case"try_except":t+=this.convTryExcept(s);break;case"require":t+=this.convRequire(s);break;default:throw new Error("System Error: unknown_type="+s.type)}return t}convRequire(e){const s=new t.Jc(this.com);return this.addCodeStr(s.convRequire(e)),""}addCodeStr(e){if(""===e)return"";const s=e.split("\n").map((e=>" "+e.replace(/\s+$/,""))),n=new v(h,s.join("\n"));return this.addCode(n)}addCode(e){return this.codeArray[this.codeId]=e,this.codeId++,""}makeLabel(e){const s=e+"_"+this.loopId++;return this.makeLabelDirectly(s)}makeLabelDirectly(e){const s=new v(a,e);return this.labels[e]=-1,s}makeJump(e){return new v(i,e.value)}makeJumpIfTrue(e){return new v(r,e.value)}makeJumpIfFalse(e){return new v(c,e.value)}convIf(e){const s=this.makeLabel("もし:ここから"),n=this.makeLabel("もし:ここまで"),t=this.makeLabel("もし:違えば");return this.addCode(s),this._convGen(e.expr,!0),this.addCode(this.makeJumpIfFalse(t)),this._convGen(e.block,!1),this.addCode(this.makeJump(n)),this.addCode(t),e.falseBlock&&this._convGen(e.falseBlock,!1),this.addCode(n),""}convRepeatTimes(e){this.flagLoop=!0,this.varsSet.names.add("回数"),this.varsSet.readonly.add("回数");const s=`sys.__tmp_i${this.loopId}`;this.loopId++;const n=`sys.__tmp_count${this.loopId}`;this.loopId++,this._convGen(e.value,!0),this.addCodeStr(`${n} = sys.__stack.pop(); ${s} = 0;`);const t=this.makeLabel("回:条件チェック");this.addCode(t);const u=this.makeLabel("回:ここまで");this.labelBreak=u,this.labelContinue=t;const a=`sys.__vars["回数"] = ++${s}\nsys.__stack.push(${s} > ${n})\n`;return this.addCodeStr(a),this.addCode(this.makeJumpIfTrue(u)),this.convGenLoop(e.block),this.addCode(this.makeJump(t)),this.addCode(u),this.flagLoop=!1,""}findVar(e){if(this.varsSet.names.has(e))return{i:this.varslistSet.length-1,name:e,isTop:!0,js:`sys.__vars[${JSON.stringify(e)}]`};for(let s=2;s>=0;s--)if(this.varslistSet[s].names.has(e))return{i:s,name:e,isTop:!1,js:`sys.__varslist[${s}][${JSON.stringify(e)}]`};return null}genVar(s,n){const t=this.findVar(s),u=n.line;if(null===t)return"引数"===s||"それ"===s||"対象"===s||"対象キー"===s||"回数"===s||this.__self.getLogger().warn(`変数『${s}』は定義されていません。`,n),this.varsSet.names.add(s),this.varname(s);if(0===t.i){const a=this.__self.getFunc(s);if(!a)return`${t.js}/*err:${u}*/`;if("const"===a.type||"var"===a.type)return t.js;if("func"===a.type){if(!a.josi)throw new Error("[System Error]");if(0===a.josi.length)return`(${t.js}())`;throw e.ih.fromNode(`『${s}』が複文で使われました。単文で記述してください。(v1非互換)`,n)}throw e.ih.fromNode(`『${s}』は関数であり参照できません。`,n)}return t.js}convGetVar(e){const s=e.value;let n=`sys.__vars[${JSON.stringify(s)}]`;const t=this.findVar(s);null!=t&&(n=t.js),this.addCodeStr(`sys.__stack.push(${n});`)}convComment(e){let s=String(e.value);s=s.replace(/\n/g,"¶");const n=this.convLineno(e,!1);return""===s&&""===n?";":""===s?";"+n+"\n":";"+n+"//"+s+"\n"}convReturn(s){if(this.varsSet.names.has("!関数"))throw e.ih.fromNode("『戻る』がありますが、関数定義内のみで使用可能です。",s);return s.value&&(this._convGen(s.value,!0),this.addCodeStr('sys.__vars["それ"] = sys.__stack.pop()')),this.addCode(new v(f,"")),""}convCheckLoop(s,n){if(!this.flagLoop){const t="continue"===n?"続ける":"抜ける";throw e.ih.fromNode(`『${t}』文がありますが、それは繰り返しの中で利用してください。`,s)}return"continue"===n?this.labelContinue&&this.addCode(this.makeJump(this.labelContinue)):this.labelBreak&&this.addCode(this.makeJump(this.labelBreak)),""}convDefFuncCommon(e,s){const n=""===s;let t=s;n&&(t="無名関数:"+this.loopId++);const u=this.makeLabel(`関数「${t}」:ここまで`);this.addCode(this.makeJump(u));const a=this.makeLabelDirectly(t);a.tag=15,this.addCode(a);const o=new Set;this.varsSet={isFunction:!0,names:o,readonly:new Set},this.varsSet.names.add("それ"),this.varslistSet.push(this.varsSet);const i=n?e.meta:e.name.meta;let r="",c="";r+=`//関数『${t}』の初期化処理\n`,r+="// 引数をローカル変数として登録\n";for(let e=i.varnames.length-1;e>=0;e--){const s=i.varnames[e];r+=` ${this.varname(s)} = sys.__stack.pop();\n`,this.varsSet.names.add(s),c+=""}return r+="// ここまで:引数をローカル変数として登録\n",this.addCodeStr(r),this.usedFuncSet.add(t),this.varslistSet[1].names.add(t),this.nakoFuncList[t]={josi:i.josi,fn:`(function(){\n const sys = (arguments.length > 0) ? arguments[arguments.length-1] : {}; \n if (sys.newenv) { \n sys.newenv = false\n sys.__callNakoCodeEntry(sys.__labels['${t}'], sys);\n } else {\n `+c+"\n"+` sys.__callNakoCode(sys.__labels['${t}'], sys.nextIndex, sys);\n if (!sys.inLoop) { sys.nextAsync(sys) }\n } })`,type:"func"},this._convGen(e.block,!1),this.varslistSet.pop(),this.varsSet=this.varslistSet[this.varslistSet.length-1],this.__self.__varslist[1][t]=function(){},this.addCode(new v(f,"")),this.addCode(u),s||this.addCodeStr(`sys.__stack.push('${t}')`),""}convDefTest(s){throw e.ih.fromNode("テスト構文は!非同期モードでは使えません。",s)}convDefFunc(e){const s=t.Jc.getFuncName(e.name.value);return this.convDefFuncCommon(e,s),""}convFuncObj(e){return this.convDefFuncCommon(e,"")}convJsonObj(e){const s=e.value,n="sys.__tmp_obj"+this.loopId++;return this.addCodeStr(n+"={}; // convJsonObj::ここから"),s.forEach((e=>{this._convGen(e.value,!0),this._convGen(e.key,!0),this.addCodeStr(`${n}[sys.__stack.pop()]=sys.__stack.pop()`)})),this.addCodeStr(`this.__stack.push(${n}); delete $objName; // convJsonObj::ここまで`),""}convJsonArray(e){const s=e.value;this.addCode(this.makeLabel("convJsonArray::ここから")),s.forEach((e=>this._convGen(e,!0)));const n=s.length;return this.addCodeStr(`sys.__stack.push(sys.__stack.splice(sys.__stack.length-${n},${n}))`),""}convRefArray(e){this._convGen(e.name,!0);const s=e.index;for(let e=0;e<s.length;e++)this._convGen(s[e],!0),this.addCodeStr("const idx = sys.__stack.pop();\nconst obj = sys.__stack.pop();\nsys.__stack.push(obj[idx]);");return""}convLetArray(e){this._convGen(e.value,!0),this._convGen(e.name,!0);const s=e.index;for(let e=0;e<s.length;e++){if(this._convGen(s[e],!0),e===s.length-1){this.addCodeStr("const idx = this.__stack.pop();const obj = this.__stack.pop();const val = this.__stack.pop();obj[idx]=val;");break}this.addCodeStr("const idx = sys.__stack.pop();\nconst obj = sys.__stack.pop();\nsys.__stack.push(obj[idx]);")}return""}convGenLoop(e){const s=this.flagLoop;this.flagLoop=!0;try{return this._convGen(e,!1)}finally{this.flagLoop=s}}convFor(e){let s;if(this.flagLoop=!0,null!==e.word){const n=e.word.value;this.varsSet.names.add(n),s=this.varname(n)}else this.varsSet.names.add("dummy"),s=this.varname("dummy");const n=this.varname("それ"),t=this.loopId++,u=`sys.__tmp__i${t}`,a=`sys.__tmp__to${t}`;this._convGen(e.from,!0),this._convGen(e.to,!0),this.addCodeStr(`${a}=sys.__stack.pop();${u}=sys.__stack.pop();`),this.addCodeStr(`${n} = ${s} = ${u}`);const o=this.makeLabel("繰返:条件確認"),i=this.makeLabel("繰返:加算");this.addCode(o);const r=this.makeLabel("繰返:ここまで");return this.addCodeStr(`sys.__stack.push(${s} <= ${a})`),this.addCode(this.makeJumpIfFalse(r)),this.labelContinue=i,this.labelBreak=r,this.convGenLoop(e.block),this.addCode(i),this.addCodeStr(`${n} = ++${s};`),this.addCode(this.makeJump(o)),this.addCode(r),this.addCodeStr(`delete ${u};delete ${a};//繰返:掃除`),this.flagLoop=!1,""}convForeach(s){this.flagLoop=!0;let n='__v0["対象"]';s.name&&(n=this.varname(s.name.value),this.varsSet.names.add(s.name.value));if(null===s.target)throw e.ih.fromNode("『反復』の対象がありません。",s);const t=this.varname("それ"),u="sys.__tmp__target"+this.loopId++,a="sys.__tmp__keys"+this.loopId++,o="sys.__tmp__i"+this.loopId++,i="sys.__tmp__count"+this.loopId++;this._convGen(s.target,!0);const r=`// 反復: 初期化\n${u} = sys.__stack.pop();\n${o} = 0;\nif (typeof(${u}) == 'string' || typeof(${u}) == 'number') { ${u} = [${u}]; }\nif (${u} instanceof Array) { ${i} = ${u}.length; }\nelse { // キーの一覧を得る\n ${a} = Object.keys(${u}); \n // hasOwnPropertyがfalseならばkeyを消す処理\n ${a} = ${a}.filter((key)=>{ return ${u}.hasOwnProperty(key) })\n ${i} = ${a}.length;\n}\n`;this.addCodeStr(r);const c=this.makeLabel("反復:条件確認"),d=this.makeLabel("反復:加算"),l=this.makeLabel("反復:ここまで");this.labelBreak=l,this.labelContinue=d,this.addCode(c);const f=`if (${u} instanceof Array) {\n ${n} = ${t} = ${u}[${o}]; __v0["対象キー"] = ${o};\n} else {\n __v0["対象キー"] = ${a}[${o}]; ${n} = ${t} = ${u}[__v0["対象キー"]];\n}\n`;return this.addCodeStr(`${f}\nsys.__stack.push(${o} < ${i});`),this.addCode(this.makeJumpIfFalse(l)),this.convGenLoop(s.block),this.addCode(d),this.addCodeStr(`${o}++`),this.addCode(this.makeJump(c)),this.addCode(l),this.flagLoop=!1,""}convWhile(e){this.flagLoop=!0;const s=this.makeLabel("間:ここから"),n=this.makeLabel("間:ここまで");return this.labelContinue=s,this.labelBreak=n,this.addCode(s),this._convGen(e.cond,!0),this.addCode(this.makeJumpIfFalse(n)),this.convGenLoop(e.block),this.addCode(this.makeJump(s)),this.addCode(n),this.flagLoop=!1,""}convSpeedMode(e,s){return""}convPerformanceMonitor(e,s){const n={...this.performanceMonitor};e.options["ユーザ関数"]&&this.performanceMonitor.userFunction++,e.options["システム関数本体"]&&this.performanceMonitor.systemFunctionBody++,e.options["システム関数"]&&this.performanceMonitor.systemFunction++,this._convGen(e.block,s),this.performanceMonitor=n}convSwitch(e){this._convGen(e.value,!0);const s="sys.__tmp__i"+this.loopId++;this.addCodeStr(`${s} = sys.__stack.pop()`);const n=this.makeLabel("条件分岐:ここまで"),t=e.cases;for(let e=0;e<t.length;e++){const u=t[e][0];if("違えば"===u.type)this.convGenLoop(t[e][1]);else{const a=this.makeLabel("条件分岐:次");this._convGen(u,!0),this.addCodeStr(`sys.__stack.push(sys.__stack.pop() == ${s})`),this.addCode(this.makeJumpIfFalse(a)),this.convGenLoop(t[e][1]),this.addCode(this.makeJump(n)),this.addCode(a)}}return this.addCode(n),this.addCodeStr(`delete ${s}//条件分岐:掃除`),""}convFuncGetArgsCalcType(e,s,n){const t={};for(let e=0;e<n.args.length;e++){const s=n.args[e];0===e&&null===s?(this.addCodeStr("sys.__stack.push(sys.__vars['それ'])"),t.sore=!0):this._convGen(s,!0)}return t}getPluginList(){const e=[];for(const s in this.__self.__module)e.push(s);return e}convFunc(s,n){let u=!1,a=!1;const o=t.Jc.getFuncName(s.name),i=this.findVar(o);if(null===i)throw e.ih.fromNode(`関数『${o}』が見当たりません。有効プラグイン=[`+this.getPluginList().join(", ")+"]",s);let r;if(0===i.i){if(r=this.__self.getFunc(o),"func"!==r.type)throw e.ih.fromNode(`『${o}』は関数ではありません。`,s);u=!0}else r=this.nakoFuncList[o],void 0===r&&(a=!0,r={return_none:!1});if("func_pointer"===s.type)return i.js;const c=this.convFuncGetArgsCalcType(o,r,s);this.usedFuncSet.add(o);let f="",_="";s.setter&&(f+=";__self.isSetter = true;\n",_+=";__self.isSetter = false;\n"),c.sore&&(f+="/*[sore]*/");const h=s.args.length;let b="";u?(b+=f,b+=`const args = sys.__stack.splice(sys.__stack.length - ${h}, ${h});\n`,b+="args.push(sys);\n",b+=`const ret = ${i.js}.apply(sys, args);\n`,r.return_none||(b+="sys.__vars['それ'] = ret;\n",n&&(b+="sys.__stack.push(ret);\n")),b+=_,this.addCodeStr(b)):(a?this.addCode(new v(l,o)):this.addCode(new v(d,o)),n||this.addCodeStr("sys.__stack.pop();// 戻り値を利用しない関数呼出"))}convRenbun(e){this._convGen(e.left,!1),this._convGen(e.right,!0)}convOp(e){const s={"&":'+""+',eq:"==",noteq:"!=","===":"===","!==":"!==",gt:">",lt:"<",gteq:">=",lteq:"<=",and:"&&",or:"||",shift_l:"<<",shift_r:">>",shift_r0:">>>","÷":"/"},n=e.operator;this._convGen(e.left,!0),this._convGen(e.right,!0);let t="const rv = sys.__stack.pop();\nconst lv = sys.__stack.pop();\n";if("^"===n)t+="const v = (Math.pow(lv, rv))\n";else{t+=`const v = ((lv) ${s[n]||n} (rv));\n`}t+=`sys.__stack.push(v); //op:${n}\n`,this.addCodeStr(t)}convLet(s){let n="";null===s.value?this.addCodeStr("sys.__stack.push(sys.__vars['それ'])"):this._convGen(s.value,!0);const t=s.name.value,u=this.findVar(t);if(null===u)this.varsSet.names.add(t),n=`${this.varname(t)}=sys.__stack.pop();`;else{if(this.varslistSet[u.i].readonly.has(t))throw e.ih.fromNode(`定数『${t}』は既に定義済みなので、値を代入することはできません。`,s);n=`${u.js}=sys.__stack.pop();`}this.addCodeStr(n+"//let")}convDefLocalVar(s){null===s.value?this.addCodeStr("sys.__stack.push(null)"):this._convGen(s.value,!0);const n=s.name.value,t=s.vartype;if(this.varsSet.names.has(n))throw e.ih.fromNode(`${t}『${n}』の二重定義はできません。`,s);return this.varsSet.names.add(n),"定数"===t&&this.varsSet.readonly.add(n),this.addCodeStr(`${this.varname(n)}=sys.__stack.pop()`),""}convDefLocalVarlist(s){const n=s.vartype;null===s.value?this.addCodeStr("sys.__stack.push(null)"):this._convGen(s.value,!0);const t=`sys.__tmp_i${this.loopId}`;this.loopId++,this.addCodeStr(`${t}=sys.__stack.pop();if (!(${t} instanceof Array)) { ${t}=[${t}] }`);for(const u of s.names){const a=u.value;if(this.varsSet.names.has(a))throw e.ih.fromNode(`${n}『${a}』の二重定義はできません。`,s);this.varsSet.names.add(a),"定数"===n&&this.varsSet.readonly.add(a);const o=this.varname(a);this.addCodeStr(`${o}=${t}.pop()`)}return this.addCodeStr(`delete ${t}//複数代入:掃除`),""}convString(e){let s=""+e.value;const n=e.mode;if(s=s.replace(/\\/g,"\\\\"),s=s.replace(/"/g,'\\"'),s=s.replace(/\r/g,"\\r"),s=s.replace(/\n/g,"\\n"),"ex"===n)throw new Error("[システムエラー] ジェネレーターでの文字列の展開はサポートしていません");return this.addCodeStr(`sys.__stack.push("${s}")//string`),'"'+s+'"'}convTryExcept(e){const s=this.makeLabel("エラー監視:ならば"),n=this.makeLabel("エラー監視:ここまで");this.addCode(new v(_,s.value)),this._convGen(e.block,!1),this.addCode(this.makeJump(n)),this.addCode(s),this._convGen(e.errBlock,!1),this.addCode(n)}}if("object"==typeof navigator&&"object"==typeof navigator.nako3){const e=navigator.nako3;e.addCodeGenerator&&e.addCodeGenerator("非同期モード",b)}}()}();
1
+ !function(){"use strict";var e={4228:function(e,s){s.Z={version:"3.3.79",major:3,minor:3,patch:79}},6297:function(e,s,n){n.d(s,{as:function(){return a},ih:function(){return u},k:function(){return t}});class t extends Error{constructor(e,s,n,t){const u=`${n||""}${void 0===t?"":`(${t+1}行目): `}`;super(`[${e}]${u}${s=s.replace(/『main__(.+?)』/g,"『$1』")}`),this.name="NakoError",this.type="NakoError",this.tag="["+e+"]",this.positionJa=u,this.msg=s}}class u extends t{constructor(e,s,n,t,u){super("文法エラー",e,u,s),this.type="NakoSyntaxError",this.file=u,this.line=s,this.startOffset=n,this.endOffset=t}static fromNode(e,s,n){if(!s)return new u(e,void 0,void 0,void 0,void 0);const t="number"==typeof s.startOffset?s.startOffset:void 0,a=n&&"number"==typeof n.endOffset?n.endOffset:"number"==typeof s.endOffset?s.endOffset:void 0;return new u(e,s.line,t,a,s.file)}}class a extends t{constructor(e,s){let n,u,o,i="unknown";"string"==typeof e?i=e:e instanceof a||e instanceof t?i=e.msg:e instanceof Error&&(i="Error"===e.name?e.message:`${e.name}: ${e.message}`),void 0===s?(n=void 0,u=void 0):(o=/^l(-?\d+):(.*)$/.exec(s))?(n=parseInt(o[1]),u=o[2]):(o=/^l(-?\d+)$/.exec(s))?(n=parseInt(o[1]),u="main.nako3"):(n=0,u=s),super("実行時エラー",i,u,n),this.type="NakoRuntimeError",this.lineNo=s,this.line=n,this.file=u}}},9485:function(e,s,n){n.d(s,{Jc:function(){return u}});var t=n(6297);class u{constructor(e){this.nakoFuncList={...e.getNakoFuncList()},this.nakoTestFuncs={},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=e.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varsSet={isFunction:!1,names:new Set,readonly:new Set},this.varslistSet[2]=this.varsSet,this.speedMode={lineNumbers:0,implicitTypeCasting:0,invalidSore:0,forcePure:0},this.performanceMonitor={userFunction:0,systemFunction:0,systemFunctionBody:0,mumeiId:0},this.warnUndefinedVar=!0,this.constPools=[],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)}convLineno(e,s=!1,n=0){if(this.speedMode.lineNumbers>0)return"";let t;if(t="number"!=typeof e.line?"unknown":"string"!=typeof e.file?`l${e.line+n}`:`l${e.line+n}:${e.file}`,!s){if(t===this.lastLineNo)return"";this.lastLineNo=t}const u=JSON.stringify(t);let a="";return this.debugOption.useDebug&&(this.debugOption.messageAction&&(a+=`window.postMessage({action:'${this.debugOption.messageAction}',line: ${u}});`),e.line+n>=1&&this.debugOption.waitTime>0&&(a+=`await __v0['秒待'](${this.debugOption.waitTime},__self);`),a+="if(__v0.forceClose){return-1};"),`__v0.line=${u};`+a}varname(e){return 3===this.varslistSet.length?`__varslist[2][${JSON.stringify(e)}]`:u.isValidIdentifier(e)?e:`__vars[${JSON.stringify(e)}]`}static getFuncName(e){if(e.indexOf("__")>=0){const s=e.split("__");return`${s[0]}__${u.getFuncName(s[1])}`}let s=e.replace(/[ぁ-ん]+$/,"");return""===s&&(s=e),s}static convPrint(e){return`__print(${e});`}convRequire(e){const s=e.value;return this.convLineno(e,!1)+`__module['${s}'] = require('${s}');\n`}getDefFuncCode(e,s){let n="";n+=`const nakoVersion = { version: ${JSON.stringify(e.version)} }\n`,n+="const __self = self;\n",n+="self.__self = self;\n",n+="const __varslist = self.__varslist;\n",n+="const __module = self.__module;\n",n+="const __v0 = self.__v0 = self.__varslist[0];\n",n+="const __v1 = self.__v1 = self.__varslist[1];\n",n+="const __vars = self.__vars = self.__varslist[2];\n",n+=`const __modList = self.__modList = ${JSON.stringify(e.getModList())}\n`,n+="__v0.line = 0;\n",n+="__v0.forceClose = false;\n",n+=`__v0.useDebug = ${this.debugOption.useDebug};\n`,n+="self.constPools = "+JSON.stringify(this.constPools)+";\n";let t="";for(const e in this.nakoFuncList){const s=this.nakoFuncList[e].fn;t+=`//[DEF_FUNC name='${e}' asyncFn=${this.nakoFuncList[e].asyncFn?"true":"false"}]\nself.__varslist[1]["${e}"]=${s};\n;//[/DEF_FUNC name='${e}']\n`}if(""!==t&&(n+="__v0.line='関数の定義';\n"+t),s.isTest){let e="const __tests = [];\n";for(const s in this.nakoTestFuncs){e+=`${this.nakoTestFuncs[s].fn};\n;`}""!==e&&(n+="__v0.line='テストの定義';\n",n+=e+"\n")}return n}addPlugin(e){return this.__self.addPlugin(e)}addPluginObject(e,s){this.__self.addPluginObject(e,s)}addPluginFile(e,s,n){this.__self.addPluginFile(e,s,n)}addFunc(e,s,n){this.__self.addFunc(e,s,n)}getFunc(e){return this.__self.getFunc(e)}registerFunction(e){if("block"!==e.type)throw t.ih.fromNode("構文解析に失敗しています。構文は必ずblockが先頭になります",e);const s=[],n=e=>{if(!e.block)return;const t=e.block instanceof Array?e.block:[e.block];for(let e=0;e<t.length;e++){const u=t[e];if("def_func"===u.type){if(!u.name)throw new Error("[System Error] 関数の定義で関数名が指定されていない");const e=u.name.value;this.usedFuncSet.add(e),this.__self.__varslist[1][e]=function(){},this.varslistSet[1].names.add(e);const n=u.name.meta;this.nakoFuncList[e]={josi:n.josi,fn:()=>{},type:"func",asyncFn:u.asyncFn},s.push({name:e,node:u})}else if("speed_mode"===u.type){if(!u.block)continue;"block"===u.block.type?n(u.block):n(u)}else if("performance_monitor"===u.type){if(!u.block)continue;"block"===u.block.type?n(u.block):n(u)}}};n(e);const u=new Set;0===this.speedMode.invalidSore&&u.add("それ"),this.varsSet={isFunction:!1,names:u,readonly:new Set},this.varslistSet=this.__self.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varslistSet[2]=this.varsSet}convGen(e,s){const n=this.convLineno(e,!1)+this._convGen(e,!0);return s.isTest?"":n}_convGen(e,s){if(!e)return"";let n="";if(e instanceof Array){for(let t=0;t<e.length;t++){const u=e[t];n+=this._convGen(u,s)}return n}if(null===e)return"null";if(void 0===e)return"undefined";if("object"!=typeof e)return""+e;switch(e.type){case"nop":break;case"block":if(!e.block)return n;const t=e.block instanceof Array?e.block:[e.block];for(let e=0;e<t.length;e++){const s=t[e];n+=this._convGen(s,!1)}break;case"comment":case"eol":n+=this.convComment(e);break;case"break":n+=this.convCheckLoop(e,"break");break;case"continue":n+=this.convCheckLoop(e,"continue");break;case"end":n+="__v0['終'](__self);";break;case"number":n+=e.value;break;case"string":n+=this.convString(e);break;case"def_local_var":n+=this.convDefLocalVar(e);break;case"def_local_varlist":n+=this.convDefLocalVarlist(e);break;case"let":n+=this.convLet(e);break;case"inc":n+=this.convInc(e);break;case"word":case"variable":n+=this.convGetVar(e);break;case"op":case"calc":n+=this.convOp(e);break;case"renbun":n+=this.convRenbun(e);break;case"not":n+="(("+this._convGen(e.value,!0)+")?0:1)";break;case"func":case"func_pointer":case"calc_func":n+=this.convCallFunc(e,s);break;case"if":n+=this.convIf(e);break;case"tikuji":n+=this.convTikuji(e);break;case"for":n+=this.convFor(e);break;case"foreach":n+=this.convForeach(e);break;case"repeat_times":n+=this.convRepeatTimes(e);break;case"speed_mode":n+=this.convSpeedMode(e,s);break;case"performance_monitor":n+=this.convPerformanceMonitor(e,s);break;case"while":n+=this.convWhile(e);break;case"atohantei":n+=this.convAtohantei(e);break;case"switch":n+=this.convSwitch(e);break;case"let_array":n+=this.convLetArray(e);break;case"配列参照":n+=this.convRefArray(e);break;case"json_array":n+=this.convJsonArray(e);break;case"json_obj":n+=this.convJsonObj(e);break;case"func_obj":n+=this.convFuncObj(e);break;case"bool":n+=e.value?"true":"false";break;case"null":n+="null";break;case"def_test":n+=this.convDefTest(e);break;case"def_func":n+=this.convDefFunc(e);break;case"return":n+=this.convReturn(e);break;case"try_except":n+=this.convTryExcept(e);break;case"require":n+=this.convRequire(e);break;default:throw new Error("System Error: unknown_type="+e.type)}return n}findVar(e){if(this.varslistSet.length>3&&this.varsSet.names.has(e))return{i:this.varslistSet.length-1,name:e,isTop:!0,js:this.varname(e)};for(let s=2;s>=0;s--)if(this.varslistSet[s].names.has(e))return{i:s,name:e,isTop:!1,js:`__varslist[${s}][${JSON.stringify(e)}]`};return null}genVar(e,s){const n=this.findVar(e),u=s.line;if(null===n){if("引数"===e||"それ"===e||"対象"===e||"対象キー"===e);else if(this.warnUndefinedVar){const n=e.replace(/^main__(.+)$/,"$1");this.__self.getLogger().warn(`変数『${n}』は定義されていません。`,s)}return this.varsSet.names.add(e),this.varname(e)}if(0===n.i){const a=this.__self.getNakoFunc(e);if(!a)return`${n.js}/*err:${u}*/`;if("const"===a.type||"var"===a.type)return n.js;if("func"===a.type){if(!a.josi||0===a.josi.length)return`(${n.js}())`;throw t.ih.fromNode(`『${e}』が複文で使われました。単文で記述してください。(v1非互換)`,s)}throw t.ih.fromNode(`『${e}』は関数であり参照できません。`,s)}return n.js}convGetVar(e){const s=e.value;return this.genVar(s,e)}convComment(e){let s=String(e.value);s=s.replace(/\n/g,"¶");const n=this.convLineno(e,!1);return""===s&&""===n?";":""===s?";"+n+"\n":";"+n+"//"+s+"\n"}convReturn(e){if(this.varsSet.names.has("!関数"))throw t.ih.fromNode("『戻る』がありますが、関数定義内のみで使用可能です。",e);const s=this.convLineno(e,!1);let n;if(e.value)n=this._convGen(e.value,!0);else{if(0!==this.speedMode.invalidSore)return s+"return;";n=this.varname("それ")}if(0===this.warnUndefinedReturnUserFunc)return s+`return ${n};`;{const t=this.constPools.length;return this.constPools.push({msg:"ユーザ関数からundefinedが返されています",file:e.file,line:e.line}),s+`return (__self.chk(${n}, ${t}));`}}convCheckLoop(e,s){if(!this.flagLoop){const n="continue"===s?"続ける":"抜ける";throw t.ih.fromNode(`『${n}』文がありますが、それは繰り返しの中で利用してください。`,e)}return this.convLineno(e)+s+";"}convDefFuncCommon(e,s){let n="",t="";if(0!==this.performanceMonitor.userFunction){let e=s;e||(void 0===this.performanceMonitor.mumeiId&&(this.performanceMonitor.mumeiId=0),this.performanceMonitor.mumeiId++,e=`anous_${this.performanceMonitor.mumeiId}`),n=`const performanceMonitorEnd = (function (key, type) {\nconst uf_start = performance.now() * 1000;\nreturn function () {\nconst el_time = performance.now() * 1000 - uf_start;\nif (!__self.__performance_monitor) {\n__self.__performance_monitor={};\n__self.__performance_monitor[key] = { called:1, totel_usec: el_time, min_usec: el_time, max_usec: el_time, type: type };\n} else if (!__self.__performance_monitor[key]) {\n__self.__performance_monitor[key] = { called:1, totel_usec: el_time, min_usec: el_time, max_usec: el_time, type: type };\n} else {\n__self.__performance_monitor[key].called++;\n__self.__performance_monitor[key].totel_usec+=el_time;\nif(__self.__performance_monitor[key].min_usec>el_time){__self.__performance_monitor[key].min_usec=el_time;}\nif(__self.__performance_monitor[key].max_usec<el_time){__self.__performance_monitor[key].max_usec=el_time;}\n}};})('${e}', 'user');try {\n`,t="} finally { performanceMonitorEnd(); }\n"}let a="";const o=new Set;0===this.speedMode.invalidSore&&o.add("それ"),this.varsSet={isFunction:!0,names:o,readonly:new Set},this.varslistSet.push(this.varsSet),a+=" var 引数 = arguments;\n",a+=" var __vars = {};\n";const i=Array.from(this.varsSet.names.values());let r="";const c=s?e.name.meta:e.meta;for(let n=0;n<c.varnames.length;n++){const t=c.varnames[n];0===this.warnUndefinedCalledUserFuncArgs?r+=` ${this.varname(t)} = arguments[${n}];\n`:r+=s?` ${this.varname(t)} = (function(a){if(a===undefined){__self.logger.warn('ユーザ関数(${s})の引数(${this.varname(t)})にundefinedが渡されました',{file:'${e.file}',line:${e.line}});};return a;})(arguments[${n}]);\n`:` ${this.varname(t)} = (function(a){if(a===undefined){__self.logger.warn('匿名関数の引数(${this.varname(t)})にundefinedが渡されました',{file:'${e.file}',line:${e.line}});};return a;})(arguments[${n}]);\n`,this.varsSet.names.add(t)}s&&(this.usedFuncSet.add(s),this.varslistSet[1].names.add(s),void 0===this.nakoFuncList[s]&&(this.nakoFuncList[s]={josi:e.name.meta.josi,fn:()=>{},type:"func",asyncFn:!1}));const d=this.usedAsyncFn;this.usedAsyncFn=this.debugOption.useDebug;r+=this._convGen(e.block,!1).split("\n").map((e=>" "+e)).join("\n")+"\n",0===this.speedMode.invalidSore&&(r+=` return (${this.varname("それ")});\n`),r+=t,s&&this.usedAsyncFn&&(this.nakoFuncList[s].asyncFn=!0);for(const e of Array.from(this.varsSet.names.values()))i.includes(e)||u.isValidIdentifier(e)&&(a+=` var ${e};\n`);0===this.speedMode.invalidSore&&(u.isValidIdentifier("それ")?a+=" var それ = '';\n":a+=` ${this.varname("それ")} = '';`);return r=(this.usedAsyncFn?"(async function(){\n":"(function(){\n")+n+a+(" "+this.convLineno(e,!0,1)+"\n")+r+"",r+="})",s&&(this.nakoFuncList[s].fn=r,this.nakoFuncList[s].asyncFn=this.usedAsyncFn,c.asyncFn=this.usedAsyncFn),this.usedAsyncFn=d,this.varslistSet.pop(),this.varsSet=this.varslistSet[this.varslistSet.length-1],s&&(this.__self.__varslist[1][s]=r),r}convDefTest(e){const s=e.name.value;let n=`__tests.push({ name: '${s}', f: () => {\n`;return n+=` ${this._convGen(e.block,!1)}\n}});`,this.nakoTestFuncs[s]={josi:e.name.meta.josi,fn:n,type:"test_func"},""}convDefFunc(e){if(!e.name)return"";const s=u.getFuncName(e.name.value);return this.convDefFuncCommon(e,s),""}convFuncObj(e){return this.convDefFuncCommon(e,"")}convJsonObj(e){return"{"+e.value.map((e=>`${this._convGen(e.key,!0)}:${this._convGen(e.value,!0)}`)).join(",")+"}"}convJsonArray(e){return"["+e.value.map((e=>this._convGen(e,!0))).join(",")+"]"}convRefArray(e){const s=this._convGen(e.name,!0),n=e.index;let t=s;if(!n)return t;for(let e=0;e<n.length;e++){t+="["+this._convGen(n[e],!0)+"]"}return t}convLetArray(e){const s=this._convGen(e.name,!0),n=e.index||[];let u="",a=s,o="";if(e.checkInit){const e="[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]";u+=`\n/*配列初期化*/if (!(${s} instanceof Array)) { ${s} = ${e}; /*console.log('初期化:${s}')*/ };`;for(let t=0;t<n.length-1;t++){o+=`[${this._convGen(n[t],!0)}]`,u+=`\n/*配列初期化${t}*/if (!(${s}${o} instanceof Array)) { ${s}${o} = ${e}; };`}u+="\n"}for(let e=0;e<n.length;e++){a+="["+this._convGen(n[e],!0)+"]"}let i=null;if(0===this.speedMode.invalidSore&&(i=this.varname("それ")),e.value&&(i=this._convGen(e.value,!0)),null==i)throw t.ih.fromNode("代入する先の変数名がありません。",e);a+=" = "+i+";\n";return this.convLineno(e,!1)+u+a}convGenLoop(e){const s=this.flagLoop;this.flagLoop=!0;try{return this._convGen(e,!1)}finally{this.flagLoop=s}}convFor(e){let s;if(null!==e.word){const n=e.word.value;this.varsSet.names.add(n),s=this.varname(n)}else this.varsSet.names.add("dummy"),s=this.varname("dummy");const n=this.loopId++,t=`$nako_i${n}`,u=this._convGen(e.from,!0),a=this._convGen(e.to,!0),o=e.flagDown;let i="1";null===e.inc&&void 0!==e.inc&&"null"!==e.inc||(i=this._convGen(e.inc,!0));const r=this.convGenLoop(e.block),c=`$nako_from${n}`,d=`$nako_to${n}`;let l="";0===this.speedMode.invalidSore&&(l=`${this.varname("それ")} = `);const f=`\n//[FOR id=${n}]\nconst ${c} = ${u};\nconst ${d} = ${a};\nif (${c} <= ${d}) { // up\n for (let ${t} = ${c}; ${t} <= ${d}; ${t}+= ${i}) {\n ${l}${s} = ${t};\n ${r}\n };\n} else { // down\n if (${o}) { for (let ${t} = ${c}; ${t} >= ${d}; ${t}-= ${i}) {\n ${l}${s} = ${t};\n ${r}\n }\n };\n};\n//[/FOR id=${n}]\n`;return this.convLineno(e,!1)+f}convForeach(e){let s;if(null===e.target){if(0!==this.speedMode.invalidSore)throw t.ih.fromNode("『反復』の対象がありません。",e);s=this.varname("それ")}else s=this._convGen(e.target,!0);let n='__v0["対象"]';e.name&&(n=this.varname(e.name.value),this.varsSet.names.add(e.name.value));const u=this.convGenLoop(e.block),a=this.loopId++;let o="";0===this.speedMode.invalidSore&&(o=`${this.varname("それ")} = `);const i=`let $nako_foreach_v${a}=${s};\nfor (let $nako_i${a} in $nako_foreach_v${a}){\n if ($nako_foreach_v${a}.hasOwnProperty($nako_i${a})) {\n ${n} = ${o}$nako_foreach_v${a}[$nako_i${a}];\n __v0["対象キー"] = $nako_i${a};\n ${u}\n }\n};\n`;return this.convLineno(e,!1)+i}convRepeatTimes(e){const s=this.loopId++,n=this._convGen(e.value,!0),t=this.convGenLoop(e.block);let u="";0===this.speedMode.invalidSore&&(u=`${this.varname("それ")} = `);const a=`let $nako_times_v${s} = ${n};\nfor(var $nako_i${s} = 1; $nako_i${s} <= $nako_times_v${s}; $nako_i${s}++){\n ${u}__v0["回数"] = $nako_i${s};\n `+t+"\n}\n";return this.convLineno(e,!1)+a}convSpeedMode(e,s){if(!e.options)return"";const n={...this.speedMode};e.options["行番号無し"]&&this.speedMode.lineNumbers++,e.options["暗黙の型変換無し"]&&this.speedMode.implicitTypeCasting++,e.options["強制ピュア"]&&this.speedMode.forcePure++,e.options["それ無効"]&&this.speedMode.invalidSore++;try{return this._convGen(e.block,s)}finally{this.speedMode=n}}convPerformanceMonitor(e,s){const n={...this.performanceMonitor};if(!e.options)return"";e.options["ユーザ関数"]&&this.performanceMonitor.userFunction++,e.options["システム関数本体"]&&this.performanceMonitor.systemFunctionBody++,e.options["システム関数"]&&this.performanceMonitor.systemFunction++;try{return this._convGen(e.block,s)}finally{this.performanceMonitor=n}}convWhile(e){const s=`while (${this._convGen(e.cond,!0)}){\n ${this.convGenLoop(e.block)}\n}\n`;return this.convLineno(e,!1)+s}convAtohantei(e){const s=`$nako_i${this.loopId++}`,n=this._convGen(e.cond,!0),t=`for(;;) {\n ${this.convGenLoop(e.block)}\n let ${s} = ${n};\n if (${s}) { continue } else { break }\n}\n\n`;return this.convLineno(e,!1)+t}convSwitch(e){const s=this._convGen(e.value,!0),n=e.cases||[];let t="";for(let e=0;e<n.length;e++){const s=n[e][0],u=this.convGenLoop(n[e][1]);if("違えば"===s.type)t+=" default:\n";else{t+=` case ${this._convGen(s,!0)}:\n`}t+=` ${u}\n break\n`}const u=`switch (${s}){\n${t}\n}\n`;return this.convLineno(e,!1)+u}convIf(e){const s=this._convGen(e.expr,!0),n=this._convGen(e.block,!1),t=null===e.false_block?"":"else {"+this._convGen(e.false_block,!1)+"};\n";return this.convLineno(e,!1)+`if (${s}) {\n ${n}\n}`+t+";\n"}convTikuji(e){const s=`__tikuji${this.loopId++}`;let n=`const ${s} = []\n`;const t=e.blocks?e.blocks:[];for(let e=0;e<t.length;e++){const u=this._convGen(t[e],!1).replace(/\s+$/,"")+"\n";n+=`${s}.push(function(resolve, reject) {\n __self.resolve = resolve;\n __self.reject = reject;\n __self.resolveCount = 0;\n ${this.convLineno(t[e],!0)}\n ${u} if (__self.resolveCount === 0) resolve();\n}); // end of tikuji__\${pid}[{$i}]\n`}n+=`// end of ${s} \n`;let u=` ${s}.splice(0);\n __v0["エラーメッセージ"]=errMsg;\n`;if(null!=e.errorBlock){u+=this._convGen(e.errorBlock,!1).replace(/\s+$/,"")+"\n"}return n+=`const ${s}__reject = function(errMsg){\n${u}};\n`,n+="__self.resolve = undefined;\n",n+=`const ${s}__resolve = function(){\n`,n+=" setTimeout(function(){\n",n+=` if (${s}.length == 0) {return}\n`,n+=` const f = ${s}.shift()\n`,n+=` f(${s}__resolve, ${s}__reject);\n`,n+=" }, 0);\n",n+="};\n",n+=`${s}__resolve()\n`,this.convLineno(e,!1)+n}convFuncGetArgsCalcType(e,s,n){const t=[],u={},a=n.args?n.args:[];for(let e=0;e<a.length;e++){const s=a[e];0===e&&null===s&&0===this.speedMode.invalidSore?(t.push(this.varname("それ")),u.sore=!0):t.push(this._convGen(s,!0))}return[t,u]}getPluginList(){const e=[];for(const s in this.__self.__module)e.push(s);return e}convCallFunc(e,s){const n=u.getFuncName(e.name),a=this.findVar(n);if(null===a)throw t.ih.fromNode(`関数『${n}』が見当たりません。有効プラグイン=[`+this.getPluginList().join(", ")+"]",e);let o;if(0===a.i){if(o=this.__self.getFunc(n),!o)throw new Error(`[System Error] 関数「${n}」NakoCompiler.nakoFuncList の不整合があります。`);if("func"!==o.type)throw t.ih.fromNode(`『${n}』は関数ではありません。`,e)}else o=this.nakoFuncList[n],void 0===o&&(o={return_none:!1});if("func_pointer"===e.type)return a.js;const i=this.convFuncGetArgsCalcType(n,o,e),r=i[0],c=i[1];if(this.usedFuncSet.add(n),"名前空間設定"===n)return`\n// --- 名前空間(${r[0]}) ---\n__varslist[0]['名前空間設定'](${r[0]}, __self);__self.__modName=${r[0]};\n`;if("プラグイン名設定"===n)return`\n__varslist[0]['プラグイン名設定'](${r[0]}, __self);\n`;r.push("__self");let d="function",l="",f="";if(e.setter&&(l+=";__self.isSetter = true;\n",f+=";__self.isSetter = false;\n"),0===a.i&&this.varslistSet.length>3&&!0!==o.pure&&0===this.speedMode.forcePure){const e=[];for(const s of Array.from(this.varsSet.names.values()))u.isValidIdentifier(s)&&e.push({str:JSON.stringify(s),js:this.varname(s)});l+="__self.__locals = __vars;\n";for(const s of e)l+=`__self.__locals[${s.str}] = ${s.js};\n`;for(const s of e)"それ"!==s.js&&(f+=`${s.js} = __self.__locals[${s.str}];\n`)}c.sore&&(l+="/*[sore]*/");const _=(e,s)=>{let n="";for(const t of e.split("\n"))""!==t&&(n+=" ".repeat(s)+t+"\n");return n},h={TYPEOF:!0,"変数型確認":!0};let v;if(0===this.warnUndefinedCallingUserFunc&&0!==a.i||0===this.warnUndefinedCallingSystemFunc&&0===a.i)v=r.join(",");else{const s=[];r.forEach((t=>{if("__self"===t||!0===h[n])s.push(`${t}`);else{const u=this.constPools.length;0===a.i?this.constPools.push({msg:`命令『${n}』の引数にundefinedを渡しています。`,file:e.file,line:e.line}):this.constPools.push({msg:`ユーザ関数『『${n}』の引数にundefinedを渡しています。`,file:e.file,line:e.line});const o=""===t?'""':t;s.push(`(__self.chk(${o}, ${u}))`)}})),v=s.join(", ")}let b=`${a.js}(${v})`;if(o.asyncFn&&(d=`async ${d}`,b=`await ${b}`,this.numAsyncFn++,this.usedAsyncFn=!0),0===a.i&&0!==this.performanceMonitor.systemFunctionBody){let e=n;e||(void 0===this.performanceMonitor.mumeiId&&(this.performanceMonitor.mumeiId=0),this.performanceMonitor.mumeiId++,e=`anous_${this.performanceMonitor.mumeiId}`),b=`(${d} (key, type) {\nconst sbf_start = performance.now() * 1000;\ntry {\nreturn `+b+";\n} finally {\nconst sbl_time = performance.now() * 1000 - sbf_start;\nif (!__self.__performance_monitor) {\n__self.__performance_monitor={};\n__self.__performance_monitor[key] = { called:1, totel_usec: sbl_time, min_usec: sbl_time, max_usec: sbl_time, type: type };\n} else if (!__self.__performance_monitor[key]) {\n__self.__performance_monitor[key] = { called:1, totel_usec: sbl_time, min_usec: sbl_time, max_usec: sbl_time, type: type };\n} else {\n__self.__performance_monitor[key].called++;\n__self.__performance_monitor[key].totel_usec+=sbl_time;\nif(__self.__performance_monitor[key].min_usec>sbl_time){__self.__performance_monitor[key].min_usec=sbl_time;}\nif(__self.__performance_monitor[key].max_usec<sbl_time){__self.__performance_monitor[key].max_usec=sbl_time;}\n"+`}}})('${n}_body', 'sysbody')\n`}let y="";if(o.return_none)y=""===f?""===l?`${b};\n`:`${l} ${b};\n`:`${l}try {\n${_(b,1)};\n} finally {\n${_(f,1)}}\n`;else{let n="";0===this.speedMode.invalidSore&&(n=`${this.varname("それ")} = `),y=""===l&&""===f?`(${n}${b})`:""===f?`(${d}(){\n${_(`${l};\nreturn ${n} ${b}`,1)}}).call(this)`:`(${d}(){\n${_(`${l}try {\n${_(`return ${n}${b};`,1)}\n} finally {\n${_(f,1)}}`,1)}}).call(this)`,("して"===e.josi||""===e.josi&&!s)&&(y+=";\n")}return 0===a.i&&0!==this.performanceMonitor.systemFunction&&(y="(function (key, type) {\nconst sf_start = performance.now() * 1000;\ntry {\nreturn "+y+";\n} finally {\nconst sl_time = performance.now() * 1000 - sf_start;\nif (!__self.__performance_monitor) {\n__self.__performance_monitor={};\n__self.__performance_monitor[key] = { called:1, totel_usec: sl_time, min_usec: sl_time, max_usec: sl_time, type: type };\n} else if (!__self.__performance_monitor[key]) {\n__self.__performance_monitor[key] = { called:1, totel_usec: sl_time, min_usec: sl_time, max_usec: sl_time, type: type };\n} else {\n__self.__performance_monitor[key].called++;\n__self.__performance_monitor[key].totel_usec+=sl_time;\nif(__self.__performance_monitor[key].min_usec>sl_time){__self.__performance_monitor[key].min_usec=sl_time;}\nif(__self.__performance_monitor[key].max_usec<sl_time){__self.__performance_monitor[key].max_usec=sl_time;}\n"+`}}})('${n}_sys', 'system')\n`),y}convRenbun(e){const s=this._convGen(e.right,!0);return`(function(){${this._convGen(e.left,!1)}; return ${s}}).call(this)`}convOp(e){const s={"&":'+""+',eq:"==",noteq:"!=","===":"===","!==":"!==",gt:">",lt:"<",gteq:">=",lteq:"<=",and:"&&",or:"||",shift_l:"<<",shift_r:">>",shift_r0:">>>","÷":"/"};let n=e.operator||"",t=this._convGen(e.right,!0),u=this._convGen(e.left,!0);return"+"===n&&0===this.speedMode.implicitTypeCasting&&(e.left&&"number"!==e.left.type&&(u=`parseFloat(${u})`),e.right&&"number"!==e.right.type&&(t=`parseFloat(${t})`)),"^"===n?`(Math.pow(${u}, ${t}))`:"÷÷"===n?`(Math.floor(${u} / ${t}))`:(s[n]&&(n=s[n]),`(${u} ${n} ${t})`)}convInc(e){let s=null;if(0===this.speedMode.invalidSore&&(s=this.varname("それ")),e.value&&(s=this._convGen(e.value,!0)),null==s)throw t.ih.fromNode("加算する先の変数名がありません。",e);const n=e.name.value;let u=this.findVar(n),a="";if(null===u&&(this.varsSet.names.add(n),u=this.findVar(n),!u))throw new Error("『増』または『減』で変数が見当たりません。");const o=u.js;return a+=`if (typeof(${o}) === 'undefined') { ${o} = 0; }`,a+=`${o} += ${s}`,";"+this.convLineno(e,!1)+a+"\n"}convLet(e){let s=null;if(0===this.speedMode.invalidSore&&(s=this.varname("それ")),e.value&&(s=this._convGen(e.value,!0)),null==s)throw t.ih.fromNode("代入する先の変数名がありません。",e);const n=e.name.value,u=this.findVar(n);let a="";if(null===u)this.varsSet.names.add(n),a=`${this.varname(n)} = ${s};`;else{if(this.varslistSet[u.i].readonly.has(n))throw t.ih.fromNode(`定数『${n}』は既に定義済みなので、値を代入することはできません。`,e);a=`${u.js} = ${s};`}return";"+this.convLineno(e,!1)+a+"\n"}convDefLocalVar(e){const s=null===e.value?"null":this._convGen(e.value,!0),n=e.name.value,u=e.vartype;if(this.varsSet.names.has(n))throw t.ih.fromNode(`${u}『${n}』の二重定義はできません。`,e);this.varsSet.names.add(n),"定数"===u&&this.varsSet.readonly.add(n);const a=`${this.varname(n)}=${s};\n`;return this.convLineno(e,!1)+a}convDefLocalVarlist(e){let s="";const n=e.vartype,t=null===e.value?"null":this._convGen(e.value,!0);this.loopId++;const u=`$nako_i${this.loopId}`;s+=`${u}=${t}\n`,s+=`if (!(${u} instanceof Array)) { ${u}=[${u}] }\n`;const a=e.names?e.names:[];for(let e=0;e<a.length;e++){const t=a[e].value;this.varsSet.names.has(t),this.varsSet.names.add(t),"定数"===n&&this.varsSet.readonly.add(t);s+=`${this.varname(t)}=${u}[${e}];\n`}return this.convLineno(e,!1)+s}convString(e){let s=""+e.value;const n=e.mode;if(s=s.replace(/\\/g,"\\\\"),s=s.replace(/"/g,'\\"'),s=s.replace(/\r/g,"\\r"),s=s.replace(/\n/g,"\\n"),"ex"===n){const n=(s,n)=>'"+'+this.genVar(n,e)+'+"';s=s.replace(/\{(.+?)\}/g,n),s=s.replace(/{(.+?)}/g,n)}return'"'+s+'"'}convTryExcept(e){const s=this._convGen(e.block,!1),n=this._convGen(e.errBlock,!1);return this.convLineno(e,!1)+`try {\n${s}\n} catch (e) {\n __v0["エラーメッセージ"] = e.message;\n;\n`+`${n}}\n`}getUsedFuncSet(){return this.usedFuncSet}getPluginInitCode(){let e="",s="";for(const e in this.__self.__module){const n=`!${e}:初期化`;this.varslistSet[0].names.has(n)&&(this.usedFuncSet.add(`!${e}:初期化`),s+=`__v0["!${e}:初期化"](__self);\n`)}return""!==s&&(e+="__v0.line='l0:プラグインの初期化';\n"+s),e}}}},s={};function n(t){var u=s[t];if(void 0!==u)return u.exports;var a=s[t]={exports:{}};return e[t](a,a.exports,n),a.exports}n.d=function(e,s){for(var t in s)n.o(s,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:s[t]})},n.o=function(e,s){return Object.prototype.hasOwnProperty.call(e,s)},function(){var e=n(6297),s=n(4228),t=n(9485);const u="NOP",a="LBL",o="EOL",i="JMP",r="JMP_T",c="JMP_F",d="CALL",l="CALL_OBJ",f="RET",_="TRY",h="CODE";class v{constructor(e,s){this.type=e,this.value=s,this.no=-1,this.tag=0}}class b{constructor(e){this.com=e,this.nakoFuncList={...e.getNakoFuncList()},this.nakoTestList={},this.usedFuncSet=new Set,this.loopId=1,this.flagLoop=!1,this.codeId=0,this.codeArray=[],this.labelContinue=null,this.labelBreak=null,this.labels={},this.__self=e,this.genMode="非同期モード",this.lastLineNo=null,this.varslistSet=e.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varsSet={isFunction:!1,names:new Set,readonly:new Set},this.varslistSet[2]=this.varsSet,this.speedMode={lineNumbers:0,implicitTypeCasting:0,invalidSore:0,forcePure:0},this.performanceMonitor={userFunction:0,systemFunction:0,systemFunctionBody:0}}static generate(n,t,u){const a=new b(n);a.registerFunction(t);let o=a.convGen(t,!!u);return o=a.getDefFuncCode(u)+o,n.getLogger().trace("--- generate(非同期モード) ---\n"+o),o&&u&&(o+="\n__self._runTests(__tests);\n"),{runtimeEnv:o,standalone:`const nakoVersion = ${JSON.stringify(s.Z)};\n${e.k.toString()}\n${e.as.toString()}\nthis.logger = {\n error(message) { console.error(message) },\n send(level, message) { console.log(message) },\n};\nthis.__varslist = [{}, {}, {}];\nthis.__vars = this.__varslist[2];\nthis.__module = {};\nthis.__locals = {};\nthis.__labels = {};\nthis.__code = [];\nthis.__callstack = [];\nthis.__stack = [];\nthis.__genMode = '非同期モード';\ntry {\n ${a.getVarsCode()}\n ${o}\n} catch (err) {\n if (!(err instanceof NakoRuntimeError)) {\n err = new NakoRuntimeError(err, this.__varslist[0].line);\n }\n this.logger.error(err);\n throw err;\n}`,gen:a}}convLineno(e,s){if(this.speedMode.lineNumbers>0)return"";let n;if(n="number"!=typeof e.line?"unknown":"string"!=typeof e.file?`l${e.line}`:`l${e.line}:${e.file}`,!s){if(n===this.lastLineNo)return"";this.lastLineNo=n}return`__v0.line=${JSON.stringify(n)};`}varname(e){return`sys.__vars[${JSON.stringify(e)}]`}getVarsCode(){let e="";for(const s of Array.from(this.usedFuncSet.values())){const n=this.__self.__varslist[0][s],t=`this.__varslist[0]["${s}"]`;e+="function"==typeof n?t+"="+n.toString()+";\n":t+"="+JSON.stringify(n)+";\n"}return e}getDefFuncCode(e){let s="";s+="const __self = this.__self = this;\n",s+="const __varslist = this.__varslist;\n",s+="const __module = this.__module;\n",s+="const __v0 = this.__v0 = this.__varslist[0];\n",s+="const __v1 = this.__v1 = this.__varslist[1];\n",s+="const __vars = this.__vars = this.__varslist[2];\n",s+="const __code = this.__code;\n";let n="";for(const e in this.nakoFuncList){n+=`//[DEF_FUNC name='${e}']\n__v1["${e}"]=${this.nakoFuncList[e].fn};\n;//[/DEF_FUNC name='${e}']\n`}""!==n&&(s+="__v0.line='関数の定義';\n"+n);let t="";for(const e in this.__self.__module){const s=`!${e}:初期化`;this.varslistSet[0].names.has(s)&&(this.usedFuncSet.add(`!${e}:初期化`),t+=`__v0["!${e}:初期化"](__self);\n`)}if(""!==t&&(s+="__v0.line='プラグインの初期化';\n"+t),e){let n="const __tests = [];\n";for(const s in this.nakoTestList)if(!0===e||"string"==typeof e&&e===s){n+=`${this.nakoTestList[s].fn};\n;`}""!==n&&(s+="__v0.line='テストの定義';\n",s+=n+"\n")}return s}addPlugin(e){return this.__self.addPlugin(e)}addPluginObject(e,s){this.__self.addPluginObject(e,s)}addPluginFile(e,s,n){this.__self.addPluginFile(e,s,n)}addFunc(e,s,n){this.__self.addFunc(e,s,n)}getFunc(e){return this.__self.getFunc(e)}registerFunction(s){if("block"!==s.type)throw e.ih.fromNode("構文解析に失敗しています。構文は必ずblockが先頭になります",s);const n=e=>{for(let s=0;s<e.block.length;s++){const t=e.block[s];if("def_func"===t.type){const e=t.name.value;this.usedFuncSet.add(e),this.__self.__varslist[1][e]=function(){},this.nakoFuncList[e]={josi:t.name.meta.josi,fn:"",type:"func"}}else("speed_mode"===t.type||"performance_monitor"===t.type)&&("block"===t.block.type?n(t.block):n(t))}};n(s);const t=new Set;0===this.speedMode.invalidSore&&t.add("それ"),this.varsSet={isFunction:!1,names:t,readonly:new Set},this.varslistSet=this.__self.__varslist.map((e=>({isFunction:!1,names:new Set(Object.keys(e)),readonly:new Set}))),this.varslistSet[2]=this.varsSet}convGen(e,s){this._convGen(e,!0);const n=new Set([i,r,c,d,_]);let t=this.codeArray;{t=t.filter((e=>e.type!==u));const e=new Set;t.forEach((s=>{n.has(s.type)&&e.add(s.value)})),t=t.filter((s=>s.type!==a||(15===s.tag||e.has(s.value))));let s=0;for(;s<t.length-1;)t[s].type!==o||t[s+1].type!==o?s++:t.splice(s+1,1);this.codeArray=t}t.forEach(((e,s)=>{e.type===a&&(this.labels[e.value]=s)})),t.forEach((e=>{n.has(e.type)&&e.no<0&&(e.no=this.labels[e.value])}));let v="";return t.forEach(((e,s)=>{switch(e.type){case u:v+=`case ${s}: break; // [NOP] ${e.value}\n`;break;case a:v+=`case ${s}: break; // [LABEL] ${e.value}\n`;break;case o:v+=`case ${s}: ${e.value}; break; // [EOL]\n`;break;case i:v+=`case ${s}: sys.nextIndex = ${e.no}; break; // ${e.value}\n`;break;case r:v+=`case ${s}: if (sys.__stack.pop()) { sys.nextIndex = ${e.no};} break; // ${e.value}\n`;break;case c:v+=`case ${s}: if (!sys.__stack.pop()) { sys.nextIndex = ${e.no}} break; // ${e.value}\n`;break;case f:v+=`case ${s}: sys.__return(sys); break;\n`;break;case d:v+=`case ${s}: sys.__call(${e.no}, sys); break; // ${e.value}\n`;break;case l:v+=`case ${s}: sys.__callObj('${e.value}', ${s}, sys); break; // ${e.value}\n`;break;case _:v+=`case ${s}: sys.tryIndex = ${e.no}; break; // TRY \n`;break;case h:{const n=e.value.replace(/\s+$/,"");v+=`case ${s}: {\n${n}\n};break;\n`;break}default:throw new Error("invalid code type")}})),v=`\n //-------------------------\n // main_code\n this.__labels = ${JSON.stringify(this.labels)};\n this.nextAsync = (sys) => {\n if (sys.index >= sys.codeSize || sys.index < 0) {return}\n const __v0 = sys.__v0\n try {\n sys.inLoop = true\n while (sys.index < sys.codeSize && sys.index >= 0) {\n // console.log('@@[run]', sys.index)\n switch (sys.index) {\n // --- CODE.BEGIN ---\n ${v}\n // --- CODE.END ---\n default:\n sys.inLoop = false\n console.log(sys.index, sys.__stack)\n throw new Error('Invalid sys.index:' + sys.index)\n break\n }\n // check next\n if (sys.nextIndex >= 0) {\n sys.index = sys.nextIndex\n sys.nextIndex = -1\n } else {\n sys.index++\n }\n if (sys.async) {\n sys.__saveSysenv(sys)\n sys.async = false\n break\n }\n } // end of while\n sys.inLoop = false\n } catch (e) {\n sys.__errorAsync(e, sys)\n }\n }\n this.__errorAsync = (e, sys) => { // エラーが起きた時呼び出す\n sys.__v0["エラーメッセージ"] = e.message;\n if (e.message == '__終わる__') {\n sys.__stopAsync(sys)\n return\n }\n if (sys.tryIndex >= 0) {\n sys.index = sys.tryIndex;\n setTimeout(() => {sys.nextAsync(sys)}, 1)\n } else {\n throw e\n }\n }\n this.__call = (no, sys) => {\n const info = {lastVars:sys.__vars, backNo: this.index + 1}\n sys.__callstack.push(info);\n sys.__vars = {"それ":""}\n sys.__varslist.push(sys.__vars)\n sys.nextIndex = no;\n }\n this.__return = sys => {\n if (sys.__callstack.length === 0) {\n sys.__destroySysenv(sys, sys.curSysenv.envid)\n sys.index = -2\n sys.nextIndex = -1\n return\n }\n const sore = sys.__vars['それ'];\n sys.__varslist.pop();\n const info = sys.__callstack.pop();\n sys.nextIndex = info.backNo;\n sys.__vars = info.lastVars;\n sys.__vars['それ'] = sore\n sys.__stack.push(sore);\n }\n this.__resetAsync = sys => {\n sys.index = 0\n sys.codeSize = ${t.length};\n sys.async = false\n sys.nextIndex = -1\n sys.tryIndex = -1\n }\n this.__stopAsync = sys => {\n sys.__resetAsync(sys)\n sys.index = -1 // force stop!!\n }\n this.__callNakoCode = (no, backNo, sys) => {\n this.__call(backNo, sys)\n sys.nextIndex = no\n const sysenv = sys.setAsync(sys)\n setTimeout(() => {\n // console.log('//__callNakoCode, back=', backNo, 'no=', no)\n sys.compAsync(sys, sysenv)\n } ,1)\n }\n this.__callNakoCodeEntry = (no, sys) => {\n sys.__saveSysenv(sys)\n sys.curSysenv = sys.__generateSysenv(sys)\n sys.__restoreSysenv(sys)\n sys.__vars = {"それ":""}\n sys.__varslist.push(sys.__vars)\n sys.index = no;\n sys.nextAsync(sys)\n }\n this.__callObj = (vname, curNo, sys) => {\n if (sys.__vars[vname]) {\n const fname = sys.__vars[vname]\n // console.log(sys.__labels)\n if (fname && sys.__labels[fname]) {\n const no = sys.__labels[fname]\n sys.__call(no, sys)\n return\n } else {\n console.log('vname=', vname, 'label=', fname)\n }\n }\n throw new Error('async error in __callObj::', vname)\n }\n this.__generateSysenv = sys => {\n sys.envid = ( sys.envid == null ? 0 : sys.envid ) + 1\n const sysenv = {\n callstack: [],\n varstack: [],\n varslist: [sys.__varslist[0], sys.__varslist[1], sys.__varslist[2]],\n index: -1,\n nextIndex: -1,\n tryIndex: -1,\n envid: sys.envid\n }\n sysenv.vars = sysenv.varslist[2]\n if (sys.sysenvs == null) { sys.sysenvs={} }\n sys.sysenvs[sys.envid] = sysenv\n // console.log('generete envid '+sys.envid)\n return sysenv\n }\n this.__destroySysenv = (sys, envid) => {\n delete sys.sysenvs[envid]\n // console.log('destroy envid '+envid)\n }\n this.__saveSysenv = sys => {\n const sysenv = sys.curSysenv\n sysenv.callstack = sys.__callstack\n sysenv.varstack = sys.__stack\n sysenv.varslist = sys.__varslist\n sysenv.vars = sys.__vars\n sysenv.index = sys.index\n sysenv.nextIndex = sys.nextIndex\n sysenv.tryIndex = sys.tryIndex\n }\n this.__restoreSysenv = sys => {\n const sysenv = sys.curSysenv\n sys.__callstack = sysenv.callstack\n sys.__stack = sysenv.varstack\n sys.__varslist = sysenv.varslist\n sys.__vars = sysenv.vars\n ___vars = sys.__vars\n sys.index = sysenv.index\n sys.nextIndex = sysenv.nextIndex\n sys.tryIndex = sysenv.tryIndex\n }\n this.setAsync = sys => {\n sys.async = true\n return sys.curSysenv\n }\n this.compAsync = (sys,sysenv) => {\n if (sys.async && sys.curSysenv != null && sysenv != null && sys.curSysenv.envid === sysenv.envid) {\n sys.async = false\n } else {\n if (sys.curSysenv == null || sysenv == null || sys.curSysenv.envid !== sysenv.envid) {\n sys.__saveSysenv(sys)\n const envid = sys.curSysenv.envid\n sys.curSysenv = sysenv\n sys.__restoreSysenv(sys)\n // console.log('switch envid '+envid+' to '+sys.curSysenv.envid)\n }\n sys.nextAsync(sys)\n }\n }\n\n this.__resetAsync(this)\n this.curSysenv = this.__generateSysenv(this)\n this.nextAsync(this)\n //-------------------------\n `,s?"":v}_convGen(s,n){let t="";if(s instanceof Array){for(let e=0;e<s.length;e++){const u=s[e];t+=this._convGen(u,n)}return t}if(null===s)return"null";if(void 0===s)return"undefined";if("object"!=typeof s)return""+s;switch(s.type){case"nop":break;case"comment":s.value||(s.value=""),this.addCode(new v(u,s.value));break;case"eol":this.addCode(new v(o,this.convLineno(s,!0)));break;case"number":this.addCodeStr(`sys.__stack.push(${s.value});//number`);break;case"string":this.convString(s);break;case"word":case"variable":this.convGetVar(s);break;case"op":case"calc":this.convOp(s);break;case"renbun":this.convRenbun(s);break;case"not":this._convGen(s.value,!0),this.addCodeStr("if (sys.__stack.length==0) throw new Error('NOTでスタックに値がありません');sys.__stack[sys.__stack.length-1] = (sys.__stack[sys.__stack.length-1]) ? 0:1");break;case"配列参照":this.convRefArray(s);break;case"json_array":this.convJsonArray(s);break;case"json_obj":this.convJsonObj(s);break;case"bool":{const e=s.value?"true":"false";this.addCodeStr(`sys.__stack.push(${e})`);break}case"null":this.addCodeStr("sys.__stack.push(null)");break;case"func":case"func_pointer":case"calc_func":this.convFunc(s,n);break;case"let":this.convLet(s);break;case"let_array":this.convLetArray(s);break;case"block":for(let e=0;e<s.block.length;e++){const n=s.block[e];this._convGen(n,!1)}break;case"if":this.convIf(s);break;case"repeat_times":this.convRepeatTimes(s);break;case"break":this.addCodeStr(this.convCheckLoop(s,"break"));break;case"continue":this.addCodeStr(this.convCheckLoop(s,"continue"));break;case"for":this.convFor(s);break;case"foreach":this.convForeach(s);break;case"while":this.convWhile(s);break;case"switch":this.convSwitch(s);break;case"return":this.convReturn(s);break;case"end":t+=this.addCodeStr("__varslist[0]['終']();");break;case"def_local_var":this.convDefLocalVar(s);break;case"def_local_varlist":t+=this.addCodeStr(this.convDefLocalVarlist(s));break;case"tikuji":throw e.ih.fromNode("「逐次実行」構文は「!非同期モード」では使えません。",s);case"speed_mode":throw e.ih.fromNode("「速度有線」構文は「!非同期モード」では使えません。",s);case"performance_monitor":this.convPerformanceMonitor(s,n);break;case"func_obj":this.convFuncObj(s);break;case"def_test":this.convDefTest(s);break;case"def_func":t+=this.addCodeStr(this.convDefFunc(s));break;case"try_except":t+=this.convTryExcept(s);break;case"require":t+=this.convRequire(s);break;default:throw new Error("System Error: unknown_type="+s.type)}return t}convRequire(e){const s=new t.Jc(this.com);return this.addCodeStr(s.convRequire(e)),""}addCodeStr(e){if(""===e)return"";const s=e.split("\n").map((e=>" "+e.replace(/\s+$/,""))),n=new v(h,s.join("\n"));return this.addCode(n)}addCode(e){return this.codeArray[this.codeId]=e,this.codeId++,""}makeLabel(e){const s=e+"_"+this.loopId++;return this.makeLabelDirectly(s)}makeLabelDirectly(e){const s=new v(a,e);return this.labels[e]=-1,s}makeJump(e){return new v(i,e.value)}makeJumpIfTrue(e){return new v(r,e.value)}makeJumpIfFalse(e){return new v(c,e.value)}convIf(e){const s=this.makeLabel("もし:ここから"),n=this.makeLabel("もし:ここまで"),t=this.makeLabel("もし:違えば");return this.addCode(s),this._convGen(e.expr,!0),this.addCode(this.makeJumpIfFalse(t)),this._convGen(e.block,!1),this.addCode(this.makeJump(n)),this.addCode(t),e.falseBlock&&this._convGen(e.falseBlock,!1),this.addCode(n),""}convRepeatTimes(e){this.flagLoop=!0,this.varsSet.names.add("回数"),this.varsSet.readonly.add("回数");const s=`sys.__tmp_i${this.loopId}`;this.loopId++;const n=`sys.__tmp_count${this.loopId}`;this.loopId++,this._convGen(e.value,!0),this.addCodeStr(`${n} = sys.__stack.pop(); ${s} = 0;`);const t=this.makeLabel("回:条件チェック");this.addCode(t);const u=this.makeLabel("回:ここまで");this.labelBreak=u,this.labelContinue=t;const a=`sys.__vars["回数"] = ++${s}\nsys.__stack.push(${s} > ${n})\n`;return this.addCodeStr(a),this.addCode(this.makeJumpIfTrue(u)),this.convGenLoop(e.block),this.addCode(this.makeJump(t)),this.addCode(u),this.flagLoop=!1,""}findVar(e){if(this.varsSet.names.has(e))return{i:this.varslistSet.length-1,name:e,isTop:!0,js:`sys.__vars[${JSON.stringify(e)}]`};for(let s=2;s>=0;s--)if(this.varslistSet[s].names.has(e))return{i:s,name:e,isTop:!1,js:`sys.__varslist[${s}][${JSON.stringify(e)}]`};return null}genVar(s,n){const t=this.findVar(s),u=n.line;if(null===t)return"引数"===s||"それ"===s||"対象"===s||"対象キー"===s||"回数"===s||this.__self.getLogger().warn(`変数『${s}』は定義されていません。`,n),this.varsSet.names.add(s),this.varname(s);if(0===t.i){const a=this.__self.getFunc(s);if(!a)return`${t.js}/*err:${u}*/`;if("const"===a.type||"var"===a.type)return t.js;if("func"===a.type){if(!a.josi)throw new Error("[System Error]");if(0===a.josi.length)return`(${t.js}())`;throw e.ih.fromNode(`『${s}』が複文で使われました。単文で記述してください。(v1非互換)`,n)}throw e.ih.fromNode(`『${s}』は関数であり参照できません。`,n)}return t.js}convGetVar(e){const s=e.value;let n=`sys.__vars[${JSON.stringify(s)}]`;const t=this.findVar(s);null!=t&&(n=t.js),this.addCodeStr(`sys.__stack.push(${n});`)}convComment(e){let s=String(e.value);s=s.replace(/\n/g,"¶");const n=this.convLineno(e,!1);return""===s&&""===n?";":""===s?";"+n+"\n":";"+n+"//"+s+"\n"}convReturn(s){if(this.varsSet.names.has("!関数"))throw e.ih.fromNode("『戻る』がありますが、関数定義内のみで使用可能です。",s);return s.value&&(this._convGen(s.value,!0),this.addCodeStr('sys.__vars["それ"] = sys.__stack.pop()')),this.addCode(new v(f,"")),""}convCheckLoop(s,n){if(!this.flagLoop){const t="continue"===n?"続ける":"抜ける";throw e.ih.fromNode(`『${t}』文がありますが、それは繰り返しの中で利用してください。`,s)}return"continue"===n?this.labelContinue&&this.addCode(this.makeJump(this.labelContinue)):this.labelBreak&&this.addCode(this.makeJump(this.labelBreak)),""}convDefFuncCommon(e,s){const n=""===s;let t=s;n&&(t="無名関数:"+this.loopId++);const u=this.makeLabel(`関数「${t}」:ここまで`);this.addCode(this.makeJump(u));const a=this.makeLabelDirectly(t);a.tag=15,this.addCode(a);const o=new Set;this.varsSet={isFunction:!0,names:o,readonly:new Set},this.varsSet.names.add("それ"),this.varslistSet.push(this.varsSet);const i=n?e.meta:e.name.meta;let r="",c="";r+=`//関数『${t}』の初期化処理\n`,r+="// 引数をローカル変数として登録\n";for(let e=i.varnames.length-1;e>=0;e--){const s=i.varnames[e];r+=` ${this.varname(s)} = sys.__stack.pop();\n`,this.varsSet.names.add(s),c+=""}return r+="// ここまで:引数をローカル変数として登録\n",this.addCodeStr(r),this.usedFuncSet.add(t),this.varslistSet[1].names.add(t),this.nakoFuncList[t]={josi:i.josi,fn:`(function(){\n const sys = (arguments.length > 0) ? arguments[arguments.length-1] : {}; \n if (sys.newenv) { \n sys.newenv = false\n sys.__callNakoCodeEntry(sys.__labels['${t}'], sys);\n } else {\n `+c+"\n"+` sys.__callNakoCode(sys.__labels['${t}'], sys.nextIndex, sys);\n if (!sys.inLoop) { sys.nextAsync(sys) }\n } })`,type:"func"},this._convGen(e.block,!1),this.varslistSet.pop(),this.varsSet=this.varslistSet[this.varslistSet.length-1],this.__self.__varslist[1][t]=function(){},this.addCode(new v(f,"")),this.addCode(u),s||this.addCodeStr(`sys.__stack.push('${t}')`),""}convDefTest(s){throw e.ih.fromNode("テスト構文は!非同期モードでは使えません。",s)}convDefFunc(e){const s=t.Jc.getFuncName(e.name.value);return this.convDefFuncCommon(e,s),""}convFuncObj(e){return this.convDefFuncCommon(e,"")}convJsonObj(e){const s=e.value,n="sys.__tmp_obj"+this.loopId++;return this.addCodeStr(n+"={}; // convJsonObj::ここから"),s.forEach((e=>{this._convGen(e.value,!0),this._convGen(e.key,!0),this.addCodeStr(`${n}[sys.__stack.pop()]=sys.__stack.pop()`)})),this.addCodeStr(`this.__stack.push(${n}); delete $objName; // convJsonObj::ここまで`),""}convJsonArray(e){const s=e.value;this.addCode(this.makeLabel("convJsonArray::ここから")),s.forEach((e=>this._convGen(e,!0)));const n=s.length;return this.addCodeStr(`sys.__stack.push(sys.__stack.splice(sys.__stack.length-${n},${n}))`),""}convRefArray(e){this._convGen(e.name,!0);const s=e.index;for(let e=0;e<s.length;e++)this._convGen(s[e],!0),this.addCodeStr("const idx = sys.__stack.pop();\nconst obj = sys.__stack.pop();\nsys.__stack.push(obj[idx]);");return""}convLetArray(e){this._convGen(e.value,!0),this._convGen(e.name,!0);const s=e.index;for(let e=0;e<s.length;e++){if(this._convGen(s[e],!0),e===s.length-1){this.addCodeStr("const idx = this.__stack.pop();const obj = this.__stack.pop();const val = this.__stack.pop();obj[idx]=val;");break}this.addCodeStr("const idx = sys.__stack.pop();\nconst obj = sys.__stack.pop();\nsys.__stack.push(obj[idx]);")}return""}convGenLoop(e){const s=this.flagLoop;this.flagLoop=!0;try{return this._convGen(e,!1)}finally{this.flagLoop=s}}convFor(e){let s;if(this.flagLoop=!0,null!==e.word){const n=e.word.value;this.varsSet.names.add(n),s=this.varname(n)}else this.varsSet.names.add("dummy"),s=this.varname("dummy");const n=this.varname("それ"),t=this.loopId++,u=`sys.__tmp__i${t}`,a=`sys.__tmp__to${t}`;this._convGen(e.from,!0),this._convGen(e.to,!0),this.addCodeStr(`${a}=sys.__stack.pop();${u}=sys.__stack.pop();`),this.addCodeStr(`${n} = ${s} = ${u}`);const o=this.makeLabel("繰返:条件確認"),i=this.makeLabel("繰返:加算");this.addCode(o);const r=this.makeLabel("繰返:ここまで");return this.addCodeStr(`sys.__stack.push(${s} <= ${a})`),this.addCode(this.makeJumpIfFalse(r)),this.labelContinue=i,this.labelBreak=r,this.convGenLoop(e.block),this.addCode(i),this.addCodeStr(`${n} = ++${s};`),this.addCode(this.makeJump(o)),this.addCode(r),this.addCodeStr(`delete ${u};delete ${a};//繰返:掃除`),this.flagLoop=!1,""}convForeach(s){this.flagLoop=!0;let n='__v0["対象"]';s.name&&(n=this.varname(s.name.value),this.varsSet.names.add(s.name.value));if(null===s.target)throw e.ih.fromNode("『反復』の対象がありません。",s);const t=this.varname("それ"),u="sys.__tmp__target"+this.loopId++,a="sys.__tmp__keys"+this.loopId++,o="sys.__tmp__i"+this.loopId++,i="sys.__tmp__count"+this.loopId++;this._convGen(s.target,!0);const r=`// 反復: 初期化\n${u} = sys.__stack.pop();\n${o} = 0;\nif (typeof(${u}) == 'string' || typeof(${u}) == 'number') { ${u} = [${u}]; }\nif (${u} instanceof Array) { ${i} = ${u}.length; }\nelse { // キーの一覧を得る\n ${a} = Object.keys(${u}); \n // hasOwnPropertyがfalseならばkeyを消す処理\n ${a} = ${a}.filter((key)=>{ return ${u}.hasOwnProperty(key) })\n ${i} = ${a}.length;\n}\n`;this.addCodeStr(r);const c=this.makeLabel("反復:条件確認"),d=this.makeLabel("反復:加算"),l=this.makeLabel("反復:ここまで");this.labelBreak=l,this.labelContinue=d,this.addCode(c);const f=`if (${u} instanceof Array) {\n ${n} = ${t} = ${u}[${o}]; __v0["対象キー"] = ${o};\n} else {\n __v0["対象キー"] = ${a}[${o}]; ${n} = ${t} = ${u}[__v0["対象キー"]];\n}\n`;return this.addCodeStr(`${f}\nsys.__stack.push(${o} < ${i});`),this.addCode(this.makeJumpIfFalse(l)),this.convGenLoop(s.block),this.addCode(d),this.addCodeStr(`${o}++`),this.addCode(this.makeJump(c)),this.addCode(l),this.flagLoop=!1,""}convWhile(e){this.flagLoop=!0;const s=this.makeLabel("間:ここから"),n=this.makeLabel("間:ここまで");return this.labelContinue=s,this.labelBreak=n,this.addCode(s),this._convGen(e.cond,!0),this.addCode(this.makeJumpIfFalse(n)),this.convGenLoop(e.block),this.addCode(this.makeJump(s)),this.addCode(n),this.flagLoop=!1,""}convSpeedMode(e,s){return""}convPerformanceMonitor(e,s){const n={...this.performanceMonitor};e.options["ユーザ関数"]&&this.performanceMonitor.userFunction++,e.options["システム関数本体"]&&this.performanceMonitor.systemFunctionBody++,e.options["システム関数"]&&this.performanceMonitor.systemFunction++,this._convGen(e.block,s),this.performanceMonitor=n}convSwitch(e){this._convGen(e.value,!0);const s="sys.__tmp__i"+this.loopId++;this.addCodeStr(`${s} = sys.__stack.pop()`);const n=this.makeLabel("条件分岐:ここまで"),t=e.cases;for(let e=0;e<t.length;e++){const u=t[e][0];if("違えば"===u.type)this.convGenLoop(t[e][1]);else{const a=this.makeLabel("条件分岐:次");this._convGen(u,!0),this.addCodeStr(`sys.__stack.push(sys.__stack.pop() == ${s})`),this.addCode(this.makeJumpIfFalse(a)),this.convGenLoop(t[e][1]),this.addCode(this.makeJump(n)),this.addCode(a)}}return this.addCode(n),this.addCodeStr(`delete ${s}//条件分岐:掃除`),""}convFuncGetArgsCalcType(e,s,n){const t={};for(let e=0;e<n.args.length;e++){const s=n.args[e];0===e&&null===s?(this.addCodeStr("sys.__stack.push(sys.__vars['それ'])"),t.sore=!0):this._convGen(s,!0)}return t}getPluginList(){const e=[];for(const s in this.__self.__module)e.push(s);return e}convFunc(s,n){let u=!1,a=!1;const o=t.Jc.getFuncName(s.name),i=this.findVar(o);if(null===i)throw e.ih.fromNode(`関数『${o}』が見当たりません。有効プラグイン=[`+this.getPluginList().join(", ")+"]",s);let r;if(0===i.i){if(r=this.__self.getFunc(o),"func"!==r.type)throw e.ih.fromNode(`『${o}』は関数ではありません。`,s);u=!0}else r=this.nakoFuncList[o],void 0===r&&(a=!0,r={return_none:!1});if("func_pointer"===s.type)return i.js;const c=this.convFuncGetArgsCalcType(o,r,s);this.usedFuncSet.add(o);let f="",_="";s.setter&&(f+=";__self.isSetter = true;\n",_+=";__self.isSetter = false;\n"),c.sore&&(f+="/*[sore]*/");const h=s.args.length;let b="";u?(b+=f,b+=`const args = sys.__stack.splice(sys.__stack.length - ${h}, ${h});\n`,b+="args.push(sys);\n",b+=`const ret = ${i.js}.apply(sys, args);\n`,r.return_none||(b+="sys.__vars['それ'] = ret;\n",n&&(b+="sys.__stack.push(ret);\n")),b+=_,this.addCodeStr(b)):(a?this.addCode(new v(l,o)):this.addCode(new v(d,o)),n||this.addCodeStr("sys.__stack.pop();// 戻り値を利用しない関数呼出"))}convRenbun(e){this._convGen(e.left,!1),this._convGen(e.right,!0)}convOp(e){const s={"&":'+""+',eq:"==",noteq:"!=","===":"===","!==":"!==",gt:">",lt:"<",gteq:">=",lteq:"<=",and:"&&",or:"||",shift_l:"<<",shift_r:">>",shift_r0:">>>","÷":"/"},n=e.operator;this._convGen(e.left,!0),this._convGen(e.right,!0);let t="const rv = sys.__stack.pop();\nconst lv = sys.__stack.pop();\n";if("^"===n)t+="const v = (Math.pow(lv, rv))\n";else{t+=`const v = ((lv) ${s[n]||n} (rv));\n`}t+=`sys.__stack.push(v); //op:${n}\n`,this.addCodeStr(t)}convLet(s){let n="";null===s.value?this.addCodeStr("sys.__stack.push(sys.__vars['それ'])"):this._convGen(s.value,!0);const t=s.name.value,u=this.findVar(t);if(null===u)this.varsSet.names.add(t),n=`${this.varname(t)}=sys.__stack.pop();`;else{if(this.varslistSet[u.i].readonly.has(t))throw e.ih.fromNode(`定数『${t}』は既に定義済みなので、値を代入することはできません。`,s);n=`${u.js}=sys.__stack.pop();`}this.addCodeStr(n+"//let")}convDefLocalVar(s){null===s.value?this.addCodeStr("sys.__stack.push(null)"):this._convGen(s.value,!0);const n=s.name.value,t=s.vartype;if(this.varsSet.names.has(n))throw e.ih.fromNode(`${t}『${n}』の二重定義はできません。`,s);return this.varsSet.names.add(n),"定数"===t&&this.varsSet.readonly.add(n),this.addCodeStr(`${this.varname(n)}=sys.__stack.pop()`),""}convDefLocalVarlist(s){const n=s.vartype;null===s.value?this.addCodeStr("sys.__stack.push(null)"):this._convGen(s.value,!0);const t=`sys.__tmp_i${this.loopId}`;this.loopId++,this.addCodeStr(`${t}=sys.__stack.pop();if (!(${t} instanceof Array)) { ${t}=[${t}] }`);for(const u of s.names){const a=u.value;if(this.varsSet.names.has(a))throw e.ih.fromNode(`${n}『${a}』の二重定義はできません。`,s);this.varsSet.names.add(a),"定数"===n&&this.varsSet.readonly.add(a);const o=this.varname(a);this.addCodeStr(`${o}=${t}.pop()`)}return this.addCodeStr(`delete ${t}//複数代入:掃除`),""}convString(e){let s=""+e.value;const n=e.mode;if(s=s.replace(/\\/g,"\\\\"),s=s.replace(/"/g,'\\"'),s=s.replace(/\r/g,"\\r"),s=s.replace(/\n/g,"\\n"),"ex"===n)throw new Error("[システムエラー] ジェネレーターでの文字列の展開はサポートしていません");return this.addCodeStr(`sys.__stack.push("${s}")//string`),'"'+s+'"'}convTryExcept(e){const s=this.makeLabel("エラー監視:ならば"),n=this.makeLabel("エラー監視:ここまで");this.addCode(new v(_,s.value)),this._convGen(e.block,!1),this.addCode(this.makeJump(n)),this.addCode(s),this._convGen(e.errBlock,!1),this.addCode(n)}}if("object"==typeof navigator&&"object"==typeof navigator.nako3){const e=navigator.nako3;e.addCodeGenerator&&e.addCodeGenerator("非同期モード",b)}}()}();
@@ -1 +1 @@
1
- !function(){"use strict";const t={"初期化":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle||(t._turtle={list:[],target:-1,ctx:null,canvas:null,canvas_r:{left:0,top:0,width:640,height:400},clearAll:function(){const t=this;console.log("[TURTLE] clearAll");for(let e=0;e<t.list.length;e++){const n=t.list[e];n.mlist=[],document.body.removeChild(n.canvas)}t.list=[],null!==t.canvas&&t.ctx.clearRect(0,0,t.canvas.width,t.canvas.height),t.target=-1,t.flagSetTimer=!1},drawTurtle:function(t){const e=this.list[t];if(!e)return;const n=this.canvas_r;if(e.canvas.style.left=n.left+e.x-e.cx+"px",e.canvas.style.top=n.top+e.y-e.cx+"px",e.f_update&&e.flagLoaded&&(e.f_update=!1,e.ctx.clearRect(0,0,e.canvas.width,e.canvas.height),e.f_visible))if(270!==e.dir){const t=.017453292519943295*(e.dir+90);e.ctx.save(),e.ctx.translate(e.cx,e.cy),e.ctx.rotate(t),e.ctx.translate(-e.cx,-e.cy),e.ctx.drawImage(e.img,0,0),e.ctx.restore()}else e.ctx.drawImage(e.img,0,0)},getCur:function(){if(0===this.list.length)throw Error("最初に『カメ作成』命令を呼び出してください。");return this.list[this.target]},flagSetTimer:!1,setTimer:function(){this.flagSetTimer||(this.flagSetTimer=!0,console.log("[TURTLE] standby ..."),setTimeout((()=>{console.log("[TURTLE] Let's go!"),t._turtle.play()}),1))},line:function(t,e,n,i,r){if(t&&!t.flagDown)return;const c=this.ctx;t.flagBegeinPath?c.lineTo(i,r):(c.beginPath(),c.lineWidth=t.lineWidth,c.strokeStyle=t.color,c.moveTo(e,n),c.lineTo(i,r),c.stroke())},doMacro:function(e,n){const i=this;if(!e.flagLoaded&&n>0)return!0;const r=e.mlist.shift();switch(void 0!==r?r[0]:""){case"xy":e.x=r[1],e.y=r[2];break;case"begin":this.ctx.beginPath(),this.ctx.moveTo(e.x,e.y),e.flagBegeinPath=!0;break;case"close":this.ctx.closePath(),e.flagBegeinPath=!1;break;case"fill":e.flagBegeinPath&&(this.ctx.closePath(),e.flagBegeinPath=!1),this.ctx.fill();break;case"stroke":e.flagBegeinPath&&(this.ctx.closePath(),e.flagBegeinPath=!1),this.ctx.stroke();break;case"text":this.ctx.fillText(r[1],e.x,e.y);break;case"textset":this.ctx.font=r[1];break;case"fillStyle":this.ctx.fillStyle=r[1];break;case"mv":{i.line(e,e.x,e.y,r[1],r[2]);const t=Math.atan2(r[2]-e.y,r[1]-e.x);e.dir=57.29577951308232*t,e.f_update=!0,e.x=r[1],e.y=r[2];break}case"fd":{const t=r[1]*r[2],n=.017453292519943295*e.dir,c=e.x+Math.cos(n)*t,s=e.y+Math.sin(n)*t;i.line(e,e.x,e.y,c,s),e.x=c,e.y=s;break}case"angle":{const t=r[1];e.dir=(t-90+360)%360,e.f_update=!0;break}case"rotr":{const t=r[1];e.dir=(e.dir+t)%360,e.f_update=!0;break}case"rotl":{const t=r[1];e.dir=(e.dir-t+360)%360,e.f_update=!0;break}case"color":e.color=r[1],this.ctx.strokeStyle=e.color;break;case"size":this.ctx.lineWidth=e.lineWidth,e.lineWidth=r[1];break;case"penOn":e.flagDown=r[1];break;case"visible":e.f_visible=r[1],e.f_update=!0;break;case"changeImage":e.flagLoaded=!1,e.img.src=r[1]}return e.flagLoaded&&t._turtle.drawTurtle(e.id),e.mlist.length>0},doMacroAll:function(e){let n=!1;for(let i=0;i<t._turtle.list.length;i++){const r=t._turtle.list[i];this.doMacro(r,e)&&(n=!0)}return n},play:function(){const e=this,n=t.__v0["カメ速度"];let i=this.doMacroAll(n);if(n<=0)for(;i;)i=this.doMacroAll(n);else if(i)return void setTimeout((()=>e.play()),n);console.log("[TURTLE] finished."),e.flagSetTimer=!1},setupCanvas:function(t){let e=t.__v0["カメ描画先"];"string"==typeof e&&(e=document.getElementById(e)||document.querySelector(e),t.__v0["カメ描画先"]=e),console.log("カメ描画先=",e);if(!(t._turtle.canvas=e))throw console.log("[ERROR] カメ描画先が見当たりません。"+e),Error("カメ描画先が見当たりません。");const n=t._turtle.ctx=t._turtle.canvas.getContext("2d");n.lineWidth=4,n.strokeStyle="black",n.lineCap="round",t._turtle.resizeCanvas(t)},resizeCanvas:function(t){const e=t._turtle.canvas.getBoundingClientRect(),n=e.left+window.pageXOffset,i=e.top+window.pageYOffset;t._turtle.canvas_r={left:n,top:i,width:e.width,height:e.height}},createTurtle:function(t,e){e._turtle.setupCanvas(e);const n=e._turtle.list.length,i={id:n,img:null,canvas:null,ctx:null,dir:270,cx:32,cy:32,x:0,y:0,color:"black",lineWidth:4,flagDown:!0,flagBegeinPath:!1,f_update:!0,flagLoaded:!1,f_visible:!0,mlist:[]};return e._turtle.list.push(i),e._turtle.target=n,i.img=document.createElement("img"),i.canvas=document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.canvas.id=n,i.img.onload=()=>{i.cx=i.img.width/2,i.cy=i.img.height/2,i.canvas.width=i.img.width,i.canvas.height=i.img.height,i.flagLoaded=!0,i.f_update=!0,e._turtle.drawTurtle(i.id),console.log("turtle.onload")},i.img.onerror=()=>{console.log("カメの読み込みに失敗"),i.flagLoaded=!0,i.f_visible=!1,i.f_update=!0,e._turtle.drawTurtle(i.id)},i.img.src=t,i.canvas.style.position="absolute",document.body.appendChild(i.canvas),i.x=e._turtle.canvas_r.width/2,i.y=e._turtle.canvas_r.height/2,n}})}},"!クリア":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.clearAll()}},"カメ作成":{type:"func",josi:[],pure:!0,fn:function(t){const e=t.__v0["カメ画像URL"];return t._turtle.createTurtle(e,t)}},"ゾウ作成":{type:"func",josi:[],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MFxKKKBZXJdjut5IH5qaQs6KAA/VpzOvtFT9/gSY5tamqSaY7vIPmOS90cnhNIYe3xTgNQHt2GfFu3bV+L7kPTgaecaArwexApy4cgJFgcJIK5AzjTovCz0VLIz0i3ZmYcKsTfy9owTFa2HE4ekEm/iLWlp6c9AOV5IGE6YoploNLqYwCvNTY2jgD8KvDUxwKewielQXbeSVhS2YUU+/nJhlMH3K6h9qHbQwI7sx3Wi0epobHmb25u/vRK+9XN9H3wGApwDnpM9UMrV77CSzWABl6ZWlXwq9BHg+WHtu/YSZ8/Eit4gpoUSOycggiAq34LbffpM41sHIaf7MXi+6qr7rfb7Rtv3Ojcwc7e3t6wh8AFTVhFUZiXs4rnC7fb1e12jQyilr85OjLShQx3ra/vprOl9Qpj58JMwHOumRKBaYyLGTBKZQqzswvBw6uQNLQp+XHxH5NHgD9M/wVPQaO2U1a1NwAAAABJRU5ErkJggg==",t)}},"パンダ作成":{type:"func",josi:[],pure:!0,fn:function(t){return t._turtle.createTurtle("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAq5pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0d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z8vyf//tHHL904Zoyjvb25FStZg0MiqiN9vitl/EVwcDKGIRab+gex3RBWMNracVDT2HgK7Uy/zc5OSFG9rumwYL4VkLm4sU5CfTrmnv+pgqNz8BKVn3+Ls7b2igD8GrQXnbt4EdmAZMYJbzRxEV6ny0OZgauYUGEGuUrwiMTEZF+kNQpn1UyxHKk4V0Wy85X6xvYf3HPP0Te2bDmDT1chpmoPCiHinFGWPcum4Xr5vwBI81/lIwKhoQAAAABJRU5ErkJggg==",t)}},"カメ操作対象設定":{type:"func",josi:[["に","へ","の"]],pure:!0,fn:function(t,e){e._turtle.target=t},return_none:!0},"カメ描画先":{type:"var",value:"turtle_cv"},"カメ画像URL":{type:"var",value:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAB9VBMVEVHcEyZZjOaZTGYZzGZZjOYZTIAiFUEjlWZZjKaZjMFjlMGjlOaZjMHjVOcYzEAjFIGj1QFjVQFjVMFjVGyfzOYZTOcazKWZjKZZTIGjVOYZDCcaTOZZjIbiE6gbTIDjlR1cTklhU38yTTI/scGjlQ8yTtl2WRT0lIyxjFi2GF233U3xzZz3nJw3W9V01Rd1lyJ5oh/4n5Lz0pDzEI/yj584Xtb1VovxC6C44FZ1Fhn2WZQ0U+E5INr22qX65ZFzURHzUZBy0CS6pGo8qdJzkkqwyk5yDiM54tO0E1X01Y0xjOc7Ztp2mij8KKl8aSr86pNz0wmwSV64HmV6pS09rO5+LgHkVGZ7Jiu9K2297Uswysowief7p4iwCFu3G3D/MIfvh4QuQ+G5YXB+8ARpTiP6I6x9bAYvBcKtgl433eO6I1t22xg119ipEjjsDO8+buh76BDnEwUuhMcvRu+ujyI5YfG/cVf1l7KlzOR6ZAVnVAasi+vfDO/+r4kwCS+izMVkVIPrSQToz8FpSIIlEwarTfvvDO3hDPsxTYcrTwpvy4KmUb1wjMOmU0FjU3YpTMxvT/EkTMMtBIHnjSkdTPptjMapkeBq0Qps0c0mU4Lm0IjtzTQnTM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QAtgsX6ir4xmcpZ/fjaHg6AJTgk+ErJiuBICarU6EIAzI1G+MniH1Gfss06v595Vern+MTcDlRjiEQIXnzlec0IsIiZOwKGD/f02WM/a9/RyZRTU0+v9NxLENE2w+bn0peQ1E/OCO9xJxF/Ie4x+wx4HTA5qWg6YA+X3U0K/VQG3ml6a4/M5YHz6UoNjD/t/YE6U08+QOloC692z3+fuY4LWzVYpbQpybGqkYBpyK8KlR/ypd+TPFypWG31kPXr3bLdEwCJsCidcuxJscPP68a2J9VPvSAKe36hYbbV9W/B1tdXXhgghPhnlCYfZ/UrboELhdzqdfoUCDuZ+1TCO/7ufVsH6qj+jGnrhA6+3AQ7V3Rczdx/Ex4a0GKHqV1qtVpvNagVv9rDQffgYTtV6uDN7G/7mYu1GT17MYBEY4QYGW0WMjd15h0eo+5+O5Z4O6uWL+3cfTG+ODUWB4RYSc7t52sMdqqPnHOf+FbT3M0HExyaBwVj0cGcPXTnfR0fnNYRe/kgQ8c2xsUmwzf0dhK51nv+bpasVob33dxh7v4dQa1fnxT78em5d60CMdVy71VPzX9mfgxDe5Qu9BEIAAAAASUVORK5CYII="},"カメ画像変更":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["changeImage",t]),e._turtle.setTimer()},return_none:!0},"カメ速度":{type:"const",value:100},"カメ速度設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e.__varslist[0]["カメ速度"]=t}},"カメ移動":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["mv",t[0],t[1]]),e._turtle.setTimer()},return_none:!0},"カメ起点移動":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["xy",t[0],t[1]]),e._turtle.setTimer()},return_none:!0},"カメ進":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["fd",t,1]),e._turtle.setTimer()},return_none:!0},"カメ戻":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["fd",t,-1]),e._turtle.setTimer()},return_none:!0},"カメ角度設定":{type:"func",josi:[["に","へ","の"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["angle",parseFloat(t)]),e._turtle.setTimer()},return_none:!0},"カメ右回転":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["rotr",t]),e._turtle.setTimer()},return_none:!0},"カメ左回転":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["rotl",t]),e._turtle.setTimer()},return_none:!0},"カメペン色設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["color",t]),e._turtle.setTimer()},return_none:!0},"カメペンサイズ設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["size",t]),e._turtle.setTimer()}},"カメペン設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["penOn",t]),e._turtle.setTimer()}},"カメパス開始":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["begin"]),t._turtle.setTimer()}},"カメパス閉":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["close"]),t._turtle.setTimer()}},"カメパス線引":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["stroke"]),t._turtle.setTimer()}},"カメパス塗":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["fill"]),t._turtle.setTimer()}},"カメ文字描画":{type:"func",josi:[["を","と","の"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["text",t]),e._turtle.setTimer()}},"カメ文字設定":{type:"func",josi:[["に","へ","で"]],pure:!0,fn:function(t,e){(t=""+t).match(/^\d+$/)?t+="px serif":t.match(/^\d+(px|em)$/)&&(t+=" serif");e._turtle.getCur().mlist.push(["textset",t]),e._turtle.setTimer()}},"カメ塗色設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["fillStyle",t]),e._turtle.setTimer()},return_none:!0},"カメ全消去":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.clearAll()},return_none:!0},"カメコマンド実行":{type:"func",josi:[["の","を"]],pure:!0,fn:function(t,e){const n=e._turtle.getCur(),i=t.split(/(\n|;)/);for(let t=0;t<i.length;t++){let e=i[t];e=e.replace(/^([a-zA-Z_]+)\s*(\d+)/,"$1,$2"),e=e.replace(/^([a-zA-Z_]+)\s*=/,"$1,");const r=e.split(/\s*,\s*/);n.mlist.push(r)}e._turtle.setTimer()},return_none:!0},"カメ非表示":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["visible",!1]),t._turtle.setTimer()},return_none:!0},"カメ表示":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["visible",!0]),t._turtle.setTimer()},return_none:!0},"カメクリック時":{type:"func",josi:[["を"]],pure:!1,fn:function(t,e){t=e.__findVar(t,null);const n=e._turtle.target;e._turtle.list[n].canvas.onclick=n=>(e.__v0["対象"]=n.target,t(n,e))},return_none:!0}};"object"==typeof navigator&&(navigator.nako3,1)&&navigator.nako3.addPluginObject("PluginTurtle",t)}();
1
+ !function(){"use strict";const t={"初期化":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle||(t._turtle={list:[],target:-1,ctx:null,canvas:null,canvas_r:{left:0,top:0,width:640,height:400},clearAll:function(){const t=this;console.log("[TURTLE] clearAll");for(let e=0;e<t.list.length;e++){const n=t.list[e];n.mlist=[],document.body.removeChild(n.canvas)}t.list=[],null!==t.canvas&&t.ctx.clearRect(0,0,t.canvas.width,t.canvas.height),t.target=-1,t.flagSetTimer=!1},drawTurtle:function(t){const e=this.list[t];if(!e)return;const n=this.canvas_r;if(e.canvas.style.left=n.left+e.x-e.cx+"px",e.canvas.style.top=n.top+e.y-e.cx+"px",e.f_update&&e.flagLoaded&&(e.f_update=!1,e.ctx.clearRect(0,0,e.canvas.width,e.canvas.height),e.f_visible))if(270!==e.dir){const t=.017453292519943295*(e.dir+90);e.ctx.save(),e.ctx.translate(e.cx,e.cy),e.ctx.rotate(t),e.ctx.translate(-e.cx,-e.cy),e.ctx.drawImage(e.img,0,0),e.ctx.restore()}else e.ctx.drawImage(e.img,0,0)},getCur:function(){if(0===this.list.length)throw Error("最初に『カメ作成』命令を呼び出してください。");return this.list[this.target]},flagSetTimer:!1,setTimer:function(){this.flagSetTimer||(this.flagSetTimer=!0,console.log("[TURTLE] standby ..."),setTimeout((()=>{console.log("[TURTLE] Let's go!"),t._turtle.play()}),1))},line:function(t,e,n,i,r){if(t&&!t.flagDown)return;const c=this.ctx;t.flagBegeinPath?c.lineTo(i,r):(c.beginPath(),c.lineWidth=t.lineWidth,c.strokeStyle=t.color,c.moveTo(e,n),c.lineTo(i,r),c.stroke())},doMacro:function(e,n){const i=this;if(!e.flagLoaded&&n>0)return!0;const r=e.mlist.shift();switch(void 0!==r?r[0]:""){case"xy":e.x=r[1],e.y=r[2];break;case"begin":this.ctx.beginPath(),this.ctx.moveTo(e.x,e.y),e.flagBegeinPath=!0;break;case"close":this.ctx.closePath(),e.flagBegeinPath=!1;break;case"fill":e.flagBegeinPath&&(this.ctx.closePath(),e.flagBegeinPath=!1),this.ctx.fill();break;case"stroke":e.flagBegeinPath&&(this.ctx.closePath(),e.flagBegeinPath=!1),this.ctx.stroke();break;case"text":this.ctx.fillText(r[1],e.x,e.y);break;case"textset":this.ctx.font=r[1];break;case"fillStyle":this.ctx.fillStyle=r[1];break;case"mv":{i.line(e,e.x,e.y,r[1],r[2]);const t=Math.atan2(r[2]-e.y,r[1]-e.x);e.dir=57.29577951308232*t,e.f_update=!0,e.x=r[1],e.y=r[2];break}case"fd":{const t=r[1]*r[2],n=.017453292519943295*e.dir,c=e.x+Math.cos(n)*t,s=e.y+Math.sin(n)*t;i.line(e,e.x,e.y,c,s),e.x=c,e.y=s;break}case"angle":{const t=r[1];e.dir=(t-90+360)%360,e.f_update=!0;break}case"rotr":{const t=r[1];e.dir=(e.dir+t)%360,e.f_update=!0;break}case"rotl":{const t=r[1];e.dir=(e.dir-t+360)%360,e.f_update=!0;break}case"color":e.color=r[1],this.ctx.strokeStyle=e.color;break;case"size":e.lineWidth=r[1],this.ctx.lineWidth=e.lineWidth;break;case"penOn":e.flagDown=r[1];break;case"visible":e.f_visible=r[1],e.f_update=!0;break;case"changeImage":e.flagLoaded=!1,e.img.src=r[1]}return e.flagLoaded&&t._turtle.drawTurtle(e.id),e.mlist.length>0},doMacroAll:function(e){let n=!1;for(let i=0;i<t._turtle.list.length;i++){const r=t._turtle.list[i];this.doMacro(r,e)&&(n=!0)}return n},play:function(){const e=this,n=t.__v0["カメ速度"];let i=this.doMacroAll(n);if(n<=0)for(;i;)i=this.doMacroAll(n);else if(i)return void setTimeout((()=>e.play()),n);console.log("[TURTLE] finished."),e.flagSetTimer=!1},setupCanvas:function(t){let e=t.__v0["カメ描画先"];"string"==typeof e&&(e=document.getElementById(e)||document.querySelector(e),t.__v0["カメ描画先"]=e),console.log("カメ描画先=",e);if(!(t._turtle.canvas=e))throw console.log("[ERROR] カメ描画先が見当たりません。"+e),Error("カメ描画先が見当たりません。");const n=t._turtle.ctx=t._turtle.canvas.getContext("2d");n.lineWidth=4,n.strokeStyle="black",n.lineCap="round",t._turtle.resizeCanvas(t)},resizeCanvas:function(t){const e=t._turtle.canvas.getBoundingClientRect(),n=e.left+window.pageXOffset,i=e.top+window.pageYOffset;t._turtle.canvas_r={left:n,top:i,width:e.width,height:e.height}},createTurtle:function(t,e){e._turtle.setupCanvas(e);const n=e._turtle.list.length,i={id:n,img:null,canvas:null,ctx:null,dir:270,cx:32,cy:32,x:0,y:0,color:"black",lineWidth:4,flagDown:!0,flagBegeinPath:!1,f_update:!0,flagLoaded:!1,f_visible:!0,mlist:[]};return e._turtle.list.push(i),e._turtle.target=n,i.img=document.createElement("img"),i.canvas=document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.canvas.id=n,i.img.onload=()=>{i.cx=i.img.width/2,i.cy=i.img.height/2,i.canvas.width=i.img.width,i.canvas.height=i.img.height,i.flagLoaded=!0,i.f_update=!0,e._turtle.drawTurtle(i.id),console.log("turtle.onload")},i.img.onerror=()=>{console.log("カメの読み込みに失敗"),i.flagLoaded=!0,i.f_visible=!1,i.f_update=!0,e._turtle.drawTurtle(i.id)},i.img.src=t,i.canvas.style.position="absolute",document.body.appendChild(i.canvas),i.x=e._turtle.canvas_r.width/2,i.y=e._turtle.canvas_r.height/2,n}})}},"!クリア":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.clearAll()}},"カメ作成":{type:"func",josi:[],pure:!0,fn:function(t){const e=t.__v0["カメ画像URL"];return t._turtle.createTurtle(e,t)}},"ゾウ作成":{type:"func",josi:[],pure:!0,fn:function(t){return t._turtle.createTurtle("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAq5pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGl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bMdXVy12I75PQBg4S8nV65e21q5aNEb6GMpPAkIwQO4aXh4WL3c1tYyMjp6Crx2xFFlbm5uHotB8IXvyTnpVETwmMMLXS2nTp/qPXjo8AaMc6ERn7EfSdbxCrCDH9nXtOs/Hz/g8XjfL5k/v4R1xxdfnPgF+i9aLdYFnADNSMHoxtKFljuIusn0z3+887tBl+fn8kPoD7Kx+MnzP3juN9m41J1OCYD3QXHz2bNnXR99vHsNeDvQzGiy6sQzTHcqwA+GEo179u6rRKP2DN6DaGWoQjN1BSZ4AyfFd63xXOPHBnjGVXl5OX+aHcO31y+3ttXk5uQ+An4f2qS5KVcHr51rbBz9cOcugj9bXV1tbmhomAQe38JBzPfxRDD0NdY/29AOopGKcV+vYSK6W9iF9ImRpdzi0sXzHC8A3MLrP4APQBEL+1DCnAzdqeKkx447iG4DF9QQj/5tO3auw+fj0cCTfYIb3CFPZhmmrPXr19MFxKKKBZXJdjut5IH5qaQs6KAA/VpzOvtFT9/gSY5tamqSaY7vIPmOS90cnhNIYe3xTgNQHt2GfFu3bV+L7kPTgaecaArwexApy4cgJFgcJIK5AzjTovCz0VLIz0i3ZmYcKsTfy9owTFa2HE4ekEm/iLWlp6c9AOV5IGE6YoploNLqYwCvNTY2jgD8KvDUxwKewielQXbeSVhS2YUU+/nJhlMH3K6h9qHbQwI7sx3Wi0epobHmb25u/vRK+9XN9H3wGApwDnpM9UMrV77CSzWABl6ZWlXwq9BHg+WHtu/YSZ8/Eit4gpoUSOycggiAq34LbffpM41sHIaf7MXi+6qr7rfb7Rtv3Ojcwc7e3t6wh8AFTVhFUZiXs4rnC7fb1e12jQyilr85OjLShQx3ra/vprOl9Qpj58JMwHOumRKBaYyLGTBKZQqzswvBw6uQNLQp+XHxH5NHgD9M/wVPQaO2U1a1NwAAAABJRU5ErkJggg==",t)}},"パンダ作成":{type:"func",josi:[],pure:!0,fn:function(t){return t._turtle.createTurtle("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXA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cAC8Kiws8GIfiv6/zZsr0F0/ryMf8Fd0LgcR7V1dlXFxsU1Oh/VN4GYcEDxdiu0sX6WMCV60hSjYheD5Q8ilymppwQ8dqSlu/TQTch0NFAzMGXOUb4+BFUdiY6Ic2LkjmptbWne/+x7wSGkhftUvKyvzDxigRkBHZ9fBmLjYY9iSc1CXi7hwahP2VQZNmq5SyDRER8dIeWWVfPc7S/Hj99xA8Z69/hR3suJVEUpoYwQXO6wzmCJU6aWMbbre4WiH+xUdOXr8O5BZQvC4f9OYwXchM1C/nBZx1NY2vIP8HY8naYoEHIshcBEabsIowfMIXAfftBgFEgx3daOMzimINH78V/04edJoDv62YHlNN+nGq3gDdowKcJZiSyiBGl/ABXswTq/Dp0pqGlsqKWP58uVO3Lc1eH7bEvgxCDEmOLUGh2S43XnKaS2AMgtFBebAYGkoYzOiBJ6fmGulFIFerq6Vgq/f4v/Ryvsj39z8vyf//tHHL904Zoyjvb25FStZg0MiqiN9vitl/EVwcDKGIRab+gex3RBWMNracVDT2HgK7Uy/zc5OSFG9rumwYL4VkLm4sU5CfTrmnv+pgqNz8BKVn3+Ls7b2igD8GrQXnbt4EdmAZMYJbzRxEV6ny0OZgauYUGEGuUrwiMTEZF+kNQpn1UyxHKk4V0Wy85X6xvYf3HPP0Te2bDmDT1chpmoPCiHinFGWPcum4Xr5vwBI81/lIwKhoQAAAABJRU5ErkJggg==",t)}},"カメ操作対象設定":{type:"func",josi:[["に","へ","の"]],pure:!0,fn:function(t,e){e._turtle.target=t},return_none:!0},"カメ描画先":{type:"var",value:"turtle_cv"},"カメ画像URL":{type:"var",value:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAB9VBMVEVHcEyZZjOaZTGYZzGZZjOYZTIAiFUEjlWZZjKaZjMFjlMGjlOaZjMHjVOcYzEAjFIGj1QFjVQFjVMFjVGyfzOYZTOcazKWZjKZZTIGjVOYZDCcaTOZZjIbiE6gbTIDjlR1cTklhU38yTTI/scG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u9BEIAAAAASUVORK5CYII="},"カメ画像変更":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["changeImage",t]),e._turtle.setTimer()},return_none:!0},"カメ速度":{type:"const",value:100},"カメ速度設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e.__varslist[0]["カメ速度"]=t}},"カメ移動":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["mv",t[0],t[1]]),e._turtle.setTimer()},return_none:!0},"カメ起点移動":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["xy",t[0],t[1]]),e._turtle.setTimer()},return_none:!0},"カメ進":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["fd",t,1]),e._turtle.setTimer()},return_none:!0},"カメ戻":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["fd",t,-1]),e._turtle.setTimer()},return_none:!0},"カメ角度設定":{type:"func",josi:[["に","へ","の"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["angle",parseFloat(t)]),e._turtle.setTimer()},return_none:!0},"カメ右回転":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["rotr",t]),e._turtle.setTimer()},return_none:!0},"カメ左回転":{type:"func",josi:[["だけ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["rotl",t]),e._turtle.setTimer()},return_none:!0},"カメペン色設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["color",t]),e._turtle.setTimer()},return_none:!0},"カメペンサイズ設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["size",t]),e._turtle.setTimer()}},"カメペン設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["penOn",t]),e._turtle.setTimer()}},"カメパス開始":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["begin"]),t._turtle.setTimer()}},"カメパス閉":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["close"]),t._turtle.setTimer()}},"カメパス線引":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["stroke"]),t._turtle.setTimer()}},"カメパス塗":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["fill"]),t._turtle.setTimer()}},"カメ文字描画":{type:"func",josi:[["を","と","の"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["text",t]),e._turtle.setTimer()}},"カメ文字設定":{type:"func",josi:[["に","へ","で"]],pure:!0,fn:function(t,e){(t=""+t).match(/^\d+$/)?t+="px serif":t.match(/^\d+(px|em)$/)&&(t+=" serif");e._turtle.getCur().mlist.push(["textset",t]),e._turtle.setTimer()}},"カメ塗色設定":{type:"func",josi:[["に","へ"]],pure:!0,fn:function(t,e){e._turtle.getCur().mlist.push(["fillStyle",t]),e._turtle.setTimer()},return_none:!0},"カメ全消去":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.clearAll()},return_none:!0},"カメコマンド実行":{type:"func",josi:[["の","を"]],pure:!0,fn:function(t,e){const n=e._turtle.getCur(),i=t.split(/(\n|;)/);for(let t=0;t<i.length;t++){let e=i[t];e=e.replace(/^([a-zA-Z_]+)\s*(\d+)/,"$1,$2"),e=e.replace(/^([a-zA-Z_]+)\s*=/,"$1,");const r=e.split(/\s*,\s*/);n.mlist.push(r)}e._turtle.setTimer()},return_none:!0},"カメ非表示":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["visible",!1]),t._turtle.setTimer()},return_none:!0},"カメ表示":{type:"func",josi:[],pure:!0,fn:function(t){t._turtle.getCur().mlist.push(["visible",!0]),t._turtle.setTimer()},return_none:!0},"カメクリック時":{type:"func",josi:[["を"]],pure:!1,fn:function(t,e){t=e.__findVar(t,null);const n=e._turtle.target;e._turtle.list[n].canvas.onclick=n=>(e.__v0["対象"]=n.target,t(n,e))},return_none:!0}};"object"==typeof navigator&&(navigator.nako3,1)&&navigator.nako3.addPluginObject("PluginTurtle",t)}();