go-core 0.2.31 → 0.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/code.umd.js CHANGED
@@ -29,7 +29,7 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
29
29
  * derived from CryptoJS.mode.CTR
30
30
  * Jan Hruby jhruby.web@gmail.com
31
31
  */
32
- (r=core).mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c<i;c++)e[t+c]^=s[c]}});return e.Decryptor=i,e}(),r.mode.CTRGladman)})),modeOfb=createCommonjsModule((function(e,t){var r,n,i;e.exports=((i=core).mode.OFB=(r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),r.Decryptor=n,r),i.mode.OFB)})),modeEcb=createCommonjsModule((function(e,t){var r,n;e.exports=((n=core).mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),n.mode.ECB)})),padAnsix923=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)})),padIso10126=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)})),padIso97971=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)})),padZeropadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},r.pad.ZeroPadding)})),padNopadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)})),formatHex=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return n.create({ciphertext:t})}}}(),r.format.Hex)})),aes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],d=[],h=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[p]=y<<24|y>>>8,d[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,f[p]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^d[i[u>>>16&255]]^h[i[u>>>8&255]]^f[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,d,h,f,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],d=e[t+2]^r[2],h=e[t+3]^r[3],f=4,p=1;p<c;p++){var m=n[u>>>24]^i[l>>>16&255]^o[d>>>8&255]^a[255&h]^r[f++],g=n[l>>>24]^i[d>>>16&255]^o[h>>>8&255]^a[255&u]^r[f++],v=n[d>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[f++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&d]^r[f++];u=m,l=g,d=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^r[f++],g=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[f++],v=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[f++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^r[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)})),tripledes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(r=0;r<24;r++)u[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var d=this._invSubKeys=[];for(r=0;r<16;r++)d[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=o^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(d);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(t)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)})),rc4=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)})),rabbit=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,h=l<<16|65535&u;for(i[0]^=u,i[1]^=d,i[2]^=l,i[3]^=h,i[4]^=u,i[5]^=d,i[6]^=l,i[7]^=h,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)})),rabbitLegacy=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,h=l<<16|65535&u;for(n[0]^=u,n[1]^=d,n[2]^=l,n[3]^=h,n[4]^=u,n[5]^=d,n[6]^=l,n[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)})),blowfish=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function c(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function u(e,t,r){let n,o=t,a=r;for(let t=0;t<i;++t)o^=e.pbox[t],a=c(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[i],o^=e.pbox[i+1],{left:o,right:a}}function l(e,t,r){let n,o=t,a=r;for(let t=i+1;t>1;--t)o^=e.pbox[t],a=c(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function d(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a<i+2;a++)e.pbox[a]=o[a]^t[n],n++,n>=r&&(n=0);let s=0,c=0,l=0;for(let t=0;t<i+2;t+=2)l=u(e,s,c),s=l.left,c=l.right,e.pbox[t]=s,e.pbox[t+1]=c;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)l=u(e,s,c),s=l.left,c=l.right,e.sbox[t][r]=s,e.sbox[t][r+1]=c;return!0}var h=n.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;d(s,t,r)}},encryptBlock:function(e,t){var r=u(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=l(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(h)}(),r.Blowfish)})),cryptoJs=createCommonjsModule((function(e,t){e.exports=core}));function setSessionData(e,t){var r=JSON.stringify(t);sessionStorage.setItem(e,r)}function getSessionData(e){var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}var updataSizeDeep=function(e,t){try{var r=t.xRatio,n=t.yRatio;return isNaN(r)||isNaN(n)?(console.error("发生错误:on updataSizeDeep in go-code "),e):(e.forEach((function(e){var i;e.baseData.left=e.baseData.left*r,e.baseData.width=e.baseData.width*r,e.baseData.top=e.baseData.top*n,e.baseData.height=e.baseData.height*n,e.baseData.angle=e.baseData.angle,(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&updataSizeDeep(null==e?void 0:e.children,t)})),e)}catch(t){return e}},checkBaseData=function(e,t){var r=!0;try{for(var n=0,i=["width","height","left","top","opacity","angel","skewY","skewX","rotateX","rotateY"];n<i.length;n++){var o=i[n];if(Object.hasOwn(e,o)&&isNaN(e[o])){if(!("string"==typeof e[o]&&e[o].includes("%")||"NaN"==e[o])){console.warn(o+"--参数校验不合法:"+t),r=!1;break}r=!0}}return r}catch(e){return console.warn("参数校验不合法:"+t),!1}},arraySwap=function(e,t,r){var n=e[r];return e.splice(r,1),e.splice(t,0,n),e},arraySwapForId=function(e,t,r){var n=_$1.findIndex(e,(function(e){return e.cid==r})),i=_$1.findIndex(e,(function(e){return e.cid==t}));return arraySwap(e,i,n)},arraySwapDeep=function(e,t,r){for(var n=-1,i=0;i<e.length;i++){var o=e[i];if(o.children&&o.children.length)for(var a=0;a<o.children.length;a++){if(n=a,o.children[a].cid===r){switch(t){case"up":n>=1&&arraySwap(o.children,n-1,n);break;case"down":n<o.children.length-2&&arraySwap(o.children,n+1,n);break;case"top":0!==n&&arraySwap(o.children,0,n);break;case"bottom":var s=o.children.length-1;n!==s&&arraySwap(o.children,s,n)}break}}}return e},findItemDeep$1=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var c=a[s][1];i(c)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){c=a[s][1];i(c)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1},getAncestorsNodes=function(e,t){var r=[],n=function(e){for(var i=0;i<e.length;i++){if(e[i].cid===t)return!0;if(Array.isArray(e[i].children)){if(n(e[i].children))return r.push(e[i]),!0;n(e[i].children)}}};return n(e),r},findItemIndexDeep=function(e,t){for(var r,n=0,i=0;i<e.length;i++){var o=e[i];if(n+=1,o.cid==t)break;if(null===(r=null==o?void 0:o.children)||void 0===r?void 0:r.length)for(var a=0;a<(null==o?void 0:o.children.length);a++){if(n+=1,(null==o?void 0:o.children[a]).cid==t)return n}}return n},getLength=function(e){var t=0,r=function(e){for(var n=function(n){if(e[n].isShow&&e[n].children)r(e[n].children);else if(e[n].isShow&&e[n].dynamicChildren){if(e[n].dynamicChildren instanceof Map){for(var i=Array.from(e[n].dynamicChildren),o=0;o<i.length;o++)if(i[o]instanceof Array){var a=i[o][1];r(a)}}else if(e[n].isShow&&e[n].dynamicChildren instanceof Array){var s=e[n].dynamicChildren.find((function(t){return t[0]=e[n].activeDynamic}));s&&s.length&&r(s[1])}}else e[n].isShow&&e[n].stateChildren?r(e[n].stateChildren):e[n].isShow&&t++},i=0;i<e.length;i++)n(i)};return r(e),t||!1},findParentDeep=function(e,t){var r=null,n=function(e,i){for(var o=0,a=e;o<a.length;o++){var s=a[o];if(s.cid==t){r=i;break}if(s.children)n(s.children,s);else if(s.dynamicChildren)if(s.dynamicChildren instanceof Map){for(var c=Array.from(s.dynamicChildren),u=0;u<c.length;u++)if(c[u]instanceof Array){var l=c[u][1];n(l,s)}}else s.dynamicChildren;else s.stateChildren&&n(s.stateChildren,s)}};return n(e,null),r||!1},findItem=function(e,t,r){for(var n,i=function(i){var o=e[i];if(o.cid===t)return n=o,r&&e.splice(i,1),{value:n};if(o.children&&o.children.length){for(var a=0;a<o.children.length;a++)if(o.children[a].cid===t)return n=o.children[a],r&&o.children.splice(a,1),{value:n}}else if(o.stateChildren&&o.stateChildren.length){for(a=0;a<o.stateChildren.length;a++)if(o.stateChildren[a].cid===t)return n=o.stateChildren[a],r&&o.stateChildren.splice(a,1),{value:n}}else if(o.dynamicChildren){var s=void 0;if(o.dynamicChildren instanceof Map?s=o.dynamicChildren.get(o.activeDynamic):o.dynamicChildren instanceof Array&&(s=o.dynamicChildren.find((function(e){return e[0]==o.activeDynamic}))[1]),s)for(a=0;a<s.length;a++)if(s[a].cid===t)return n=s[a],r&&s.splice(a,1),{value:n}}},o=0;o<e.length;o++){var a=i(o);if("object"==typeof a)return a.value}return!!n},isPeer=function(e,t,r){var n=findItem(e,t),i=findItem(e,r);return n.pid&&i.pid||!n.pid&&!i.pid},recursion=function(e,t){var r=function(e){for(var n,i,o,a=0,s=e;a<s.length;a++){var c=s[a],u=null===(o=null===(i=null===(n=null==c?void 0:c.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;if(null==u?void 0:u.length)for(var l=0,d=u;l<d.length;l++){var h=d[l];h.code=h.code.replace(/&gt;/g,">").replace(/&lt;/g,"<")}t(c),c&&c.children?r(c.children):c&&c.dynamicChildren?(c.dynamicChildren&&c.dynamicChildren instanceof Map&&c.dynamicChildren.forEach((function(e){r(e)})),c.dynamicChildren&&c.dynamicChildren instanceof Array&&c.dynamicChildren.forEach((function(e){r(e[1])}))):(null==c?void 0:c.stateChildren)&&r(c.stateChildren)}};r(e)},setIndex=function(e){var t=e.length,r=function(e,t){for(var n=function(n){var i=e[n];if(i&&i.children&&i.children.length){var o=i.children.length;r(i.children,o)}else if(i&&i.dynamicChildren){var a=i.dynamicChildren.length;Array.from(i.dynamicChildren).forEach((function(e,t){r(e[1],a)}))}i.z=10*t-n},i=0;i<e.length;i++)n(i)};r(e,t)},resetID=function(e){var t=function(e,r){for(var n=function(n){var i=e[n],o=genID();r?i.pid=r:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=o,i&&i.children&&i.children.length?t(i.children,o):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(e,r){t(e[1],o)}))},i=0;i<e.length;i++)n(i)};t(e)},updataAttribute=function(e,t,r,n){try{if(!e||!e.hasOwnProperty(t)&&!e.hasOwnProperty(n))throw"The property you want to modify is not found. Please check whether the attribute ".concat(t," is entered correctly!");if(n){_$1.cloneDeep(e[n][t]);e[n][t]=r}else e[t]=r}catch(e){console.error(e)}},updataAttributeForOption=function(e,t){var r;try{var n="tmpData";if(!e||!(null===(r=e[n])||void 0===r?void 0:r.hasOwnProperty("option")))throw new Error("The property you want to modify is not found. Please check whether the attribute 'option' is entered correctly!");var i=_$1.cloneDeep(e[n].option),o={};Object.assign(o,i,t),console.log(o,i,"newOP"),e[n].option=o}catch(e){console.error(new Error("An error occurred: ".concat(e)))}},comToggle=function(e){try{if(!e)throw" 没有找到组件";e.isShow||"false"==e.isShow?e.isShow=!1:e.isShow=!0}catch(e){console.error(e)}},setAttr=function(e,t,r){for(var n,i=0;i<e.length;i++)(n=e[i]).cid!==t&&n.id!==t||(n[r]=!n[r])},setPositionForGroup=function(e,t){t.forEach((function(t){t.baseData.left=t.baseData.left-e.left,t.baseData.top=t.baseData.top-e.top}))},resetPositionForGroup=function(e,t){var r=t.map((function(e){return e.cid}));t.forEach((function(t){t.pid&&setPositionForWorld(t,e)}));var n=selectdArea(r,t);return setPositionForGroup(n,t),{left:n.left,top:n.top,width:n.width,height:n.height}},calculateNodePosition=function(e,t,r){var n=e.baseData.left,i=e.baseData.top,o=t;if(n+=o.baseData.left,i+=o.baseData.top,r){if(r.baseData.angle){var a=r.baseData.angle*Math.PI/180,s=Math.cos(a),c=Math.sin(a),u=n*c+i*s;n=n*s-i*c,i=u}r.baseData.scale&&(n*=r.baseData.scale.x,i*=r.baseData.scale.y)}return{left:n,top:i}},breakUp=function(e,t){var r=_$1.cloneDeep(e),n=[];return r.children&&r.children.length&&r.children.forEach((function(e){var i=t&&(null==r?void 0:r.pid)?findItemDeep$1(t,r.pid):null;setPositionForWorldNew(e,r,i),n.push(e)})),n},setPositionForWorldNew=function(e,t,r){var n=calculateNodePosition(e,t,r),i=n.left,o=n.top;e.baseData.left=i,e.baseData.top=o},setPositionForWorld=function(e,t){e.baseData.left=e.baseData.left+t.left,e.baseData.top=e.baseData.top+t.top},transformPosition=function(e,t,r){var n={left:0,top:0};return e.left=e.left||0,e.top=e.top||0,t.left=t.left||0,t.top=t.top||0,r&&0!==r?(n.left=e.left-t.left,n.top=e.top-t.top):(n.left=e.left+t.left,n.top=e.top+t.top),n},resizePosition=function(e,t){var r=_$1.cloneDeep(e),n=[],i=function(e,t){var r=findItemDeep$1(e,t);n.push(r.baseData),r.pid&&i(e,r.pid)};i(r,t);var o={left:0,top:0};return n.map((function(e){e&&(o.left+=e.left,o.top+=e.top)})),o},resziePositionForGroup=function(e,t,r,n){var i=e.baseData.left,o=e.baseData.top,a=t.left,s=t.top,c=_$1.cloneDeep(e.children),u=r||"";if(a-i<0)for(var l=0;l<c.length;l++){(d=c[l]).cid!==u&&(d.baseData.left=d.baseData.left+(i-a))}if(s-o<0)for(l=0;l<c.length;l++){var d;(d=c[l]).cid!==u&&(d.baseData.top=d.baseData.top+(o-s))}e.children=c},setPorp=function(e,t,r){var n=t.find((function(t){return t.cid===e}));"folder"===n.type?n.children.length&&n.children.forEach((function(e){e[r]=!e[r]})):n[r]=!n[r]},sortArray$1=function(e,t,r){var n=e.slice();return r||(n=_$1.cloneDeep(e)),n.length>1&&n.sort((function(e,r){return e.baseData[t]-r.baseData[t]})),n},selectdArea=function(e,t){var r=[];return e.map((function(e){var n=t.find((function(t){return t.cid===e}));n&&r.push(n)})),getPosition(r)},getPosition=function(e,t){if(e.length>0){var r={left:0,top:0,width:0,height:0},n=sortArray$1(e,"left",t),i=sortArray$1(e,"top",t),o=n[0].baseData,a=n[n.length-1].baseData,s=i[0].baseData,c=i[i.length-1].baseData,u=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.top+1*e.baseData.height}))),l=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.left+1*e.baseData.width})));return r.left=o.left,r.width=Math.max(1*a.left+1*a.width,l)-1*o.left,r.top=s.top,r.height=Math.max(1*c.top+1*c.height,u)-1*s.top,r}return{left:0,top:0,width:0,height:0}};function safeConvertToNumber(e){try{if(null==e||""===e)return 0;var t=e.toString().match(/^-?\d+\.?\d*/);return t?Number(t[0]):0}catch(e){return console.error("Error converting to number: ".concat(e)),0}}function validateAndFixObject(e){var t={};for(var r in e)if(e.hasOwnProperty(r))try{t[r]=safeConvertToNumber(e[r])}catch(e){console.error("Error processing key ".concat(r,": ").concat(e)),t[r]=0}return t}var upDataGroup=function(e,t,r,n){var i=e.children,o=_$1.cloneDeep(t),a=_$1.cloneDeep(getPosition(i,n)),s=validateAndFixObject(o),c=s.left,u=s.top;s.width,s.height;var l=validateAndFixObject(a),d=l.left,h=l.top,f=l.width,p=l.height,m={left:c+d,top:u+h,width:f,height:p,angle:t.angle?t.angle:0};return i.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-d,e.baseData.top<0?t.top=0:t.top=t.top-h,e.baseData=t})),e.baseData=m,e.children=i,m},upDataGroupChildren=function(e,t,r){var n=e.children,i=_$1.cloneDeep(t),o=_$1.cloneDeep(getPosition(n)),a=i.left,s=i.top;i.width,i.height;var c=o.left,u=o.top,l=o.width,d=o.height,h={left:a+c,top:s+u,width:l,height:d,angle:t.angle?t.angle:0};return n.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-c,e.baseData.top<0?t.top=0:t.top=t.top-u,e.baseData=t})),e.children=n,h},resizeListPosition=function(e,t){var r=function(e,n){for(var i,o=0;o<e.length;o++){var a=e[o];if(a.pid!=n){var s=resizePosition(t,a.cid),c=resizePosition(t,a.pid);a.baseData.left=s.left-c.left,a.baseData.top=s.top-c.top}(null===(i=null==a?void 0:a.children)||void 0===i?void 0:i.length)&&r(a.children,a.cid)}};r(e,t)},RecursiveList=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];e[r].index=r,n.children&&n.children.length?RecursiveList(n.children):t&&t(n)}},genID=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},genCopyName=function(e,t,r){var n,i;void 0===r&&(r=" copy");var o=new RegExp("".concat(r,"( \\d+)?$")).exec(e);o?(n=o[1]?parseInt(o[1]):0,i=e.slice(0,o.index)):(n=0,i=e);var a=new RegExp("^".concat(i).concat(r,"( [1-9][0-9]*)?$")),s=[];t.forEach((function(e){if(o=a.exec(e)){var t=o[1]?parseInt(o[1]):1;s.push(t)}})),s.sort((function(e,t){return e-t})),n++;for(var c=0,u=s.length;c<u;c++)if(s[c]===n)n++;else if(s[c]>n)break;return i+r+" "+n},getUrlParams=function(e,t){try{var r=t||window.location.href;if(-1!=r.indexOf("?")){var n={};return r.slice(r.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");n[t[0]]=t[1]})),e?n[e]?n[e]:null:n}return console.log("没有参数"),null}catch(e){console.error(e)}};function setActions(e,t){var r=e.types,n=e.element,i=e.actions,o=e.events,a=e.eventsComs;e.filter,store.state.globalVars;for(var s=function(e){var t=r[e],s=n.tmpData.actions[e];if(s&&s.use){a&&a.push(n.cid);var c=s[s.behave];if(!c)return"continue";"vars"===s.behave?c.map((function(e){e.type=t,e.id=n.cid,e.model=0,e.originalValue||(e.originalValue=e.value),e.mapField&&i.push(e)})):c.length>0&&c.forEach((function(e,r){"toggle"===s.behave&&""!==e.value&&e.value.length&&o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}),"update"===s.behave&&""!==e.value&&e.value.length?o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}):"link"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,link:e.value,eventType:t,target:e.target,index:r}):"page"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,page:e.value,params:e.params,eventType:t,index:r}):"dynamic"===s.behave&&""!==e.value&&e.value.length>0?o.push({id:n.cid,type:s.behave,dynamic:e.value,eventType:t,index:r}):o.push(void 0)}))}},c=0;c<r.length;c++)s(c)}var publicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB",privateKey="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQClaeLu4thVXyLI\nM9NHpmxqP7YEcKfjFPMV5UcAPNN20GIUf2Lh8p4MrQh9s9X/1MZ5Fg1+XSpJ90u1\nT7VkjOamoemlp26SaTn41sEbheb+UBmBW3d1QitLJqbFWPCfKY3s8t3FpI5L+aBT\npIMYyE1MzvoBcplldYwrXZQJe8qSH5OQa59xfMt7su2u8c8s6BycQQPYKRYBO4T2\nDwr2PhN44zGElwcFSZcuBToKG59ricF53bz30TuPElrXj4nUgNrZqGsMUtk3sf/9\nmy/CderFVvGbSTmPJap8KmDXdXvMPcPE1aWjcwiHZ8+0gRQNWG6Co93SM+aqq6p0\nE1Oe7YgZAgMBAAECggEABN8LadGQYWM92Pt9u1xxUOezaooOx6c0SW7JGn6wE42r\ndcMSnGjSsrjdySXkpXYUqjg2CYSg3DDGL/667s0fdcTK5q/5l6I1rNhWM4NL/C1L\nsv2IlRFvyPTIcINgAq/smA/G7C0ea6pcSFpN6grsC9kEj8paLhy6FgTZeTYGDyuG\nwI3D7XWZNzWfyQlAsoWEYAmDx72rOuEaeK4W4SMf3BB2g1hJ6fZoKT3ehHozAGcJ\nB7R8k3tGALVYdOqQgXhj8t3vNu1OATG0Q6d4z28e4TwsVunxReTyRcofrgOVwpry\nEmb4C5RYaN/rWxRrL8aW+nB3wAD/PFDacVBz/8RvaQKBgQDX90jqlLtLRVAsqbiS\nSHmX67CqQzNNDWgysQLmF2YmmkGyth4QR+cNEenIEeSSt+vc0VMAbxYY5SVzVCRl\nSZHoKHNlLGmepd3aJw5ZcFnpU86J7aG8fhvgZGEmCR+1JOZU7pUbpTvka0WQC3AK\n2+O7nUYIU65xeOaJVZvUu6My+wKBgQDEE6DrFVMNgI3dDZM0buHMYDJ2mL9F1DZb\n2URxYAlmvjkpaQb9Vq1VXV0ApZ3ItXgIX6cVrJB+MILmrsoxAamFOl/9AYiKnpnb\nYMxxqFYPuME7fzEli041915j6CpMmOwrAq6SrLiZ//hNlobJf76dAY9qyX91BTC8\nBfEWVhnk+wKBgQDT5kb+G+bVSPIMkI6PwVrE7DWQKZV5YdE+A55TgtvwvmP95GEF\nGneixFO8wYmjR6C+LgihoV1uGc+wI/v+AbyOrLnkqDoNtrNB7BZRPUKLBHbfsHCE\nELxrZDJJ7qPUyZrR9LIKyQpF6db8KazKiswc9oiTfP/pSHXyhDP8/Ap55wKBgQC6\njDI9dzxdTEGsXo3/BL+vQpbAXvMb7JsLJ9sGQuiu56xayaHsxdqDrSAezXMg0gYx\ncU/2Pwf6Bw2DjCiyF3LBXpiUjjDqMZsQLThVqmK28oBlqs2HetIeZgtX4jrcRWHs\nSdDtm4bGfdIvf1cdvnwLxMA+SRcKrrV/LegB6EkaoQKBgEwE4rllfRxOSGaF47ew\nRxTLGphZmxhLDsx0fMOHflx/BnGnxruBLEhdv3mlp12YMmb2s6kwFJvngLq4fZll\nTmC7BW3Z9h8XsL9j2xtID+5gsxYHHOCcdbzGuQV5KWb51cBym7EP9qk/3NP8w3/+\nH0iKrgAII5Ym0yh41dGL5HCo";function encrypt$1(e){var t=new JSEncrypt;return t.setPublicKey(publicKey),t.encrypt(e)}function decrypt(e){var t=new JSEncrypt;return t.setPrivateKey(privateKey),t.decrypt(e)}var decryptKey={key:"anov@2019:helloX",iv:"anov@2020:helloX"};function decrypAES(e){var t=cryptoJs.enc.Utf8.parse(decryptKey.key),r=cryptoJs.enc.Utf8.parse(decryptKey.iv);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function safeEval(e,t){var r=store.state.globalVars,n={};r.forEach((function(e){(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return/^(?:[^\r\n]*[\r\n]){0,2}(?:[^\r\n]*(?=\{))?\s*(?:function\s*[^\r\n]*|\(.*?\))?\s*[\w\s\$\._\[\]]*\s*(?:[=:]\s*)?(?:new\s+)?[A-Z]\w*\s*(?:\[.*?\]|\([^\r\n]*\))*\s*\{.*?\}/i.test(e),new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}var globalSourceTemp={type:"static",converse:{use:!1,data:[]},static:{data:{},originData:""},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""},datasource:{data:"",inputSql:"",dsName:"",dsType:300,autoUpdate:{open:!1,time:10}},indicator:{zbId:"",zbName:"",params:"",data:"",autoUpdate:{open:!1,time:10}},staticFile:{data:"",dsName:"",dsType:201}},UpdataForContainer=function(e){var t;try{var r=[];if((null==e?void 0:e.dynamicChildren)instanceof Map)for(var n=Array.from(null==e?void 0:e.dynamicChildren),i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);else if((null==e?void 0:e.dynamicChildren)instanceof Array)for(n=null==e?void 0:e.dynamicChildren,i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);if(null==r?void 0:r.length)for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s){var c=null===(t=null==s?void 0:s.tmpData)||void 0===t?void 0:t.source,u=c.type;c&&"packData"==u&&(s.tmpData.source.packData.data=e.source[0])}}}catch(e){console.log(e)}},__defProp$1=Object.defineProperty,__getOwnPropSymbols$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=Object.prototype.propertyIsEnumerable,__defNormalProp$1=(e,t,r)=>t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues$1=(e,t)=>{for(var r in t||(t={}))__hasOwnProp$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);if(__getOwnPropSymbols$1)for(var r of __getOwnPropSymbols$1(t))__propIsEnum$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);return e},NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors="production"!==process$1.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if("production"!==process$1.env.NODE_ENV){const r=errors[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return!!e&&(isPlainObject(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!(null==(t=e.constructor)?void 0:t[DRAFTABLE])||isMap(e)||isSet(e))}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(e){if(!e||"object"!=typeof e)return!1;const t=getPrototypeOf(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===objectCtorString}function each(e,t){0===getArchtype(e)?Reflect.ownKeys(e).forEach((r=>{t(r,e[r],e)})):e.forEach(((r,n)=>t(n,r,e)))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has(e,t){return 2===getArchtype(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function set(e,t,r){const n=getArchtype(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&isPlainObject(e)){if(!getPrototypeOf(e)){const t=Object.create(null);return Object.assign(t,e)}return __spreadValues$1({},e)}const r=Object.getOwnPropertyDescriptors(e);delete r[DRAFT_STATE];let n=Reflect.ownKeys(r);for(let t=0;t<n.length;t++){const i=n[t],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(getPrototypeOf(e),r)}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&(e.set=e.add=e.clear=e.delete=dontMutateFrozenCollections),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>freeze(t,!0)))),e}function dontMutateFrozenCollections(){die(2)}function isFrozen(e){return Object.isFrozen(e)}var plugins={},currentScope;function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(r[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,r,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,r){if(isFrozen(t))return t;const n=t[DRAFT_STATE];if(!n)return each(t,((i,o)=>finalizeProperty(e,n,t,i,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return maybeFreeze(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),each(i,((i,a)=>finalizeProperty(e,n,t,i,a,r,o))),maybeFreeze(e,t,!1),r&&e.patches_&&getPlugin("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function finalizeProperty(e,t,r,n,i,o,a){if("production"!==process$1.env.NODE_ENV&&i===r&&die(5),isDraft(i)){const a=finalize(e,i,o&&t&&3!==t.type_&&!has(t.assigned_,n)?o.concat(n):void 0);if(set(r,n,a),!isDraft(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(isDraftable(i)&&!isFrozen(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;finalize(e,i),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||maybeFreeze(e,i)}}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}function createProxyProxy(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=objectTraps;r&&(i=[n],o=arrayTraps);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return n.draft_=s,n.revoke_=a,s}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const r=latest(e);if(!has(r,t))return readPropFromProto(e,r,t);const n=r[t];return e.finalized_||!isDraftable(n)?n:n===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(n,e)):n},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,r){const n=getDescriptorFromProto(latest(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=peek(latest(e),t),i=null==n?void 0:n[DRAFT_STATE];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(is(r,n)&&(void 0!==r||has(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=latest(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>getPrototypeOf(e.base_),setPrototypeOf(){die(12)}},arrayTraps={};function peek(e,t){const r=e[DRAFT_STATE];return(r?latest(r):e)[t]}function readPropFromProto(e,t,r){var n;const i=getDescriptorFromProto(t,r);return i?"value"in i?i.value:null==(n=i.get)?void 0:n.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=getPrototypeOf(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=getPrototypeOf(r)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}each(objectTraps,((e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),arrayTraps.deleteProperty=function(e,t){return"production"!==process$1.env.NODE_ENV&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,r){return"production"!==process$1.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,r,e[0])};var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,(e=>t.call(this,e,...i)))}}let n;if("function"!=typeof t&&die(6),void 0!==r&&"function"!=typeof r&&die(7),isDraftable(e)){const i=enterScope(this),o=createProxy(e,void 0);let a=!0;try{n=t(o),a=!1}finally{a?revokeScope(i):leaveScope(i)}return usePatchesInScope(i,r),processResult(n,i)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===NOTHING&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){const t=[],i=[];getPlugin("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;const i=this.produce(e,t,((e,t)=>{r=e,n=t}));return[i,r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),r=createProxy(e,void 0);return r[DRAFT_STATE].isManual_=!0,leaveScope(t),r}finishDraft(e,t){const r=e&&e[DRAFT_STATE];r&&r.isManual_||die(9);const{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=getPlugin("Patches").applyPatches_;return isDraft(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function createProxy(e,t){const r=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(r),r}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[DRAFT_STATE];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_)}else r=shallowCopy(e,!0);return each(r,((e,t)=>{set(r,e,currentImpl(t))})),t&&(t.finalized_=!1),r}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);var setAutoFreeze=immer.setAutoFreeze.bind(immer);function produceWithImmer(e,t){return setAutoFreeze(!1),produce(e,t)}immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);var baseDataMutaitons={updataArea:function(e,t){e.currentArea=t},selectdArea:function(e,t){var r=selectdArea(t,e.list);e.currentArea=r},updataAngle:function(e,t){var r=t.id,n=t.angle,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.baseData.angle=n)},updataBaseData:function(e,t){var r,n=t.data;if(null==(null===(r=null==n?void 0:n.baseData)||void 0===r?void 0:r.opacity)&&(n.baseData.opacity=100),checkBaseData(t.data.baseData,"updataBaseData")){var i=t.ratio,o=findItemDeep$1(e.list,n.cid),a=t.oldData;if("object"!=typeof o||o.pid){if("object"==typeof o&&o.pid){var s=findItemDeep$1(e.list,o.pid);"object"==typeof s?(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData),upDataGroup(s,s.baseData),e.groupFlag=!e.groupFlag):s||(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData))}}else if(Object.assign(o.baseData,n.baseData),i&&o.children&&o.children.length>0){var c=o.baseData.width/a.width,u=o.baseData.height/a.height;updataSizeDeep(o.children,{xRatio:c,yRatio:u})}}},multipleUpdataBaseData:function(e,t){if(t.ratio)for(var r=t.newData,n=t.oldData,i=r.width/n.width,o=r.height/n.height,a=e.cache.length;a--;)e.cache[a].baseData.left=e.cache[a].baseData.left*i,e.cache[a].baseData.width=e.cache[a].baseData.width*i,e.cache[a].baseData.top=e.cache[a].baseData.top*o,e.cache[a].baseData.height=e.cache[a].baseData.height*o;else for(a=e.cache.length;a--;){var s=_$1.cloneDeep(e.cache[a].baseData);s.left=s.left+t.deltaX,s.top=s.top+t.deltaY,e.cache[a].comPanel?e.cache[a].comPanel.setAttrData(Object.assign(s,t.baseData)):e.cache[a].baseData=s}},multipleUpdata:function(e,t){var r=t.ids,n=t.data,i=findItemDeep$1(e.list,r);i&&Object.assign(i.baseData,n)},multipleMove:function(e,t){},move:function(e,t){var r=e.selectd,n=t.type,i=t.speed?t.speed:1;if(0!==r.length){var o=e.list.filter((function(e){return r.includes(e.cid)}));0==o.length&&(o=[findItemDeep$1(e.list,r[0])]);for(var a=0;a<o.length;a++){var s=o[a];if(s.pid&&e.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===n?s.baseData.top=s.baseData.top-i:"down"===n?s.baseData.top+=i:"left"===n?s.baseData.left-=i:"right"===n&&(s.baseData.left+=i),"object"==typeof s&&s.pid){var c=findItemDeep$1(e.list,s.pid);"object"==typeof c&&(upDataGroup(c,c.baseData),e.groupFlag=!e.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t.pid),n=_$1.cloneDeep(r);findItemDeep$1(r.children,t.cid),upDataGroup(r,n.baseData)},editGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t);r.children.forEach((function(e){setPositionForWorld(e,r.baseData)}))},syncBaseData:function(e,t){var r=t.cid,n=t.data,i=t.isContainer,o=function(e){for(var t=0;t<e.length;t++)r===e[t].cid?(e[t].baseData=Object.assign({},e[t].baseData,n),console.log(__assign$1({},e[t].baseData))):e[t].hasOwnProperty("children")&&o(e[t].children)},a=produceWithImmer(e.list,(function(e){void 0!==i&&e.length&&o(e)}));if(i)e.list=a;else{var s=findItemDeep$1(a,r);if(s){var c=_$1.cloneDeep(s.baseData),u=Object.assign({},s.baseData,n);this.commit("GoCom/updataBaseData",{data:{cid:r,baseData:u},oldData:c,ratio:!0})}}},updataItemData:function(e,t){var r=t.cid,n=t.propsName,i=t.propsValue,o=findItemDeep$1(e.list,r);o&&(o[n]=i)},updataOpacity:function(e,t){var r=t.cid,n=t.propsValue,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&(i.baseData.opacity=n)}},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};
32
+ (r=core).mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){if(255&~(e>>24))e+=1<<24;else{var t=e>>16&255,r=e>>8&255,n=255&e;255===t?(t=0,255===r?(r=0,255===n?n=0:++n):++r):++t,e=0,e+=t<<16,e+=r<<8,e+=n}return e}function n(e){return 0===(e[0]=t(e[0]))&&(e[1]=t(e[1])),e}var i=e.Encryptor=e.extend({processBlock:function(e,t){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter;o&&(a=this._counter=o.slice(0),this._iv=void 0),n(a);var s=a.slice(0);r.encryptBlock(s,0);for(var c=0;c<i;c++)e[t+c]^=s[c]}});return e.Decryptor=i,e}(),r.mode.CTRGladman)})),modeOfb=createCommonjsModule((function(e,t){var r,n,i;e.exports=((i=core).mode.OFB=(r=i.lib.BlockCipherMode.extend(),n=r.Encryptor=r.extend({processBlock:function(e,t){var r=this._cipher,n=r.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}}),r.Decryptor=n,r),i.mode.OFB)})),modeEcb=createCommonjsModule((function(e,t){var r,n;e.exports=((n=core).mode.ECB=((r=n.lib.BlockCipherMode.extend()).Encryptor=r.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),r.Decryptor=r.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),r),n.mode.ECB)})),padAnsix923=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.AnsiX923={pad:function(e,t){var r=e.sigBytes,n=4*t,i=n-r%n,o=r+i-1;e.clamp(),e.words[o>>>2]|=i<<24-o%4*8,e.sigBytes+=i},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Ansix923)})),padIso10126=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso10126={pad:function(e,t){var n=4*t,i=n-e.sigBytes%n;e.concat(r.lib.WordArray.random(i-1)).concat(r.lib.WordArray.create([i<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)})),padIso97971=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)})),padZeropadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.ZeroPadding={pad:function(e,t){var r=4*t;e.clamp(),e.sigBytes+=r-(e.sigBytes%r||r)},unpad:function(e){var t=e.words,r=e.sigBytes-1;for(r=e.sigBytes-1;r>=0;r--)if(t[r>>>2]>>>24-r%4*8&255){e.sigBytes=r+1;break}}},r.pad.ZeroPadding)})),padNopadding=createCommonjsModule((function(e,t){var r;e.exports=((r=core).pad.NoPadding={pad:function(){},unpad:function(){}},r.pad.NoPadding)})),formatHex=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(e){var t=r,n=t.lib.CipherParams,i=t.enc.Hex;t.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){var t=i.parse(e);return n.create({ciphertext:t})}}}(),r.format.Hex)})),aes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo,i=[],o=[],a=[],s=[],c=[],u=[],l=[],d=[],h=[],f=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var r=0,n=0;for(t=0;t<256;t++){var p=n^n<<1^n<<2^n<<3^n<<4;p=p>>>8^255&p^99,i[r]=p,o[p]=r;var m=e[r],g=e[m],v=e[g],y=257*e[p]^16843008*p;a[r]=y<<24|y>>>8,s[r]=y<<16|y>>>16,c[r]=y<<8|y>>>24,u[r]=y,y=16843009*v^65537*g^257*m^16843008*r,l[p]=y<<24|y>>>8,d[p]=y<<16|y>>>16,h[p]=y<<8|y>>>24,f[p]=y,r?(r=m^e[e[e[v^m]]],n^=e[e[n]]):r=n=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4,n=4*((this._nRounds=r+6)+1),o=this._keySchedule=[],a=0;a<n;a++)a<r?o[a]=t[a]:(u=o[a-1],a%r?r>6&&a%r==4&&(u=i[u>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u]):(u=i[(u=u<<8|u>>>24)>>>24]<<24|i[u>>>16&255]<<16|i[u>>>8&255]<<8|i[255&u],u^=p[a/r|0]<<24),o[a]=o[a-r]^u);for(var s=this._invKeySchedule=[],c=0;c<n;c++){if(a=n-c,c%4)var u=o[a];else u=o[a-4];s[c]=c<4||a<=4?u:l[i[u>>>24]]^d[i[u>>>16&255]]^h[i[u>>>8&255]]^f[i[255&u]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,c,u,i)},decryptBlock:function(e,t){var r=e[t+1];e[t+1]=e[t+3],e[t+3]=r,this._doCryptBlock(e,t,this._invKeySchedule,l,d,h,f,o),r=e[t+1],e[t+1]=e[t+3],e[t+3]=r},_doCryptBlock:function(e,t,r,n,i,o,a,s){for(var c=this._nRounds,u=e[t]^r[0],l=e[t+1]^r[1],d=e[t+2]^r[2],h=e[t+3]^r[3],f=4,p=1;p<c;p++){var m=n[u>>>24]^i[l>>>16&255]^o[d>>>8&255]^a[255&h]^r[f++],g=n[l>>>24]^i[d>>>16&255]^o[h>>>8&255]^a[255&u]^r[f++],v=n[d>>>24]^i[h>>>16&255]^o[u>>>8&255]^a[255&l]^r[f++],y=n[h>>>24]^i[u>>>16&255]^o[l>>>8&255]^a[255&d]^r[f++];u=m,l=g,d=v,h=y}m=(s[u>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^r[f++],g=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&u])^r[f++],v=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[u>>>8&255]<<8|s[255&l])^r[f++],y=(s[h>>>24]<<24|s[u>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^r[f++],e[t]=m,e[t+1]=g,e[t+2]=v,e[t+3]=y},keySize:8});e.AES=t._createHelper(m)}(),r.AES)})),tripledes=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib,n=t.WordArray,i=t.BlockCipher,o=e.algo,a=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],l=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=o.DES=i.extend({_doReset:function(){for(var e=this._key.words,t=[],r=0;r<56;r++){var n=a[r]-1;t[r]=e[n>>>5]>>>31-n%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var u=i[o]=[],l=c[o];for(r=0;r<24;r++)u[r/6|0]|=t[(s[r]-1+l)%28]<<31-r%6,u[4+(r/6|0)]|=t[28+(s[r+24]-1+l)%28]<<31-r%6;for(u[0]=u[0]<<1|u[0]>>>31,r=1;r<7;r++)u[r]=u[r]>>>4*(r-1)+3;u[7]=u[7]<<5|u[7]>>>27}var d=this._invSubKeys=[];for(r=0;r<16;r++)d[r]=i[15-r]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,r){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),f.call(this,2,858993459),f.call(this,8,16711935),h.call(this,1,1431655765);for(var n=0;n<16;n++){for(var i=r[n],o=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=u[c][((a^i[c])&l[c])>>>0];this._lBlock=a,this._rBlock=o^s}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,h.call(this,1,1431655765),f.call(this,8,16711935),f.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var r=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=r,this._lBlock^=r<<e}function f(e,t){var r=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=r,this._rBlock^=r<<e}e.DES=i._createHelper(d);var p=o.TripleDES=i.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),r=e.length<4?e.slice(0,2):e.slice(2,4),i=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(n.create(t)),this._des2=d.createEncryptor(n.create(r)),this._des3=d.createEncryptor(n.create(i))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=i._createHelper(p)}(),r.TripleDES)})),rc4=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,r=e.sigBytes,n=this._S=[],i=0;i<256;i++)n[i]=i;i=0;for(var o=0;i<256;i++){var a=i%r,s=t[a>>>2]>>>24-a%4*8&255;o=(o+n[i]+s)%256;var c=n[i];n[i]=n[o],n[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,r=this._j,n=0,i=0;i<4;i++){r=(r+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[r],e[r]=o,n|=e[(e[t]+e[r])%256]<<24-8*i}return this._i=t,this._j=r,n}e.RC4=t._createHelper(i);var a=n.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var e=this.cfg.drop;e>0;e--)o.call(this)}});e.RC4Drop=t._createHelper(a)}(),r.RC4)})),rabbit=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,r=0;r<4;r++)e[r]=16711935&(e[r]<<8|e[r]>>>24)|4278255360&(e[r]<<24|e[r]>>>8);var n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(this._b=0,r=0;r<4;r++)c.call(this);for(r=0;r<8;r++)i[r]^=n[r+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,h=l<<16|65535&u;for(i[0]^=u,i[1]^=d,i[2]^=l,i[3]^=h,i[4]^=u,i[5]^=d,i[6]^=l,i[7]^=h,r=0;r<4;r++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.Rabbit=t._createHelper(s)}(),r.Rabbit)})),rabbitLegacy=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.StreamCipher,n=e.algo,i=[],o=[],a=[],s=n.RabbitLegacy=t.extend({_doReset:function(){var e=this._key.words,t=this.cfg.iv,r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],n=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];this._b=0;for(var i=0;i<4;i++)c.call(this);for(i=0;i<8;i++)n[i]^=r[i+4&7];if(t){var o=t.words,a=o[0],s=o[1],u=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=u>>>16|4294901760&l,h=l<<16|65535&u;for(n[0]^=u,n[1]^=d,n[2]^=l,n[3]^=h,n[4]^=u,n[5]^=d,n[6]^=l,n[7]^=h,i=0;i<4;i++)c.call(this)}},_doProcessBlock:function(e,t){var r=this._X;c.call(this),i[0]=r[0]^r[5]>>>16^r[3]<<16,i[1]=r[2]^r[7]>>>16^r[5]<<16,i[2]=r[4]^r[1]>>>16^r[7]<<16,i[3]=r[6]^r[3]>>>16^r[1]<<16;for(var n=0;n<4;n++)i[n]=16711935&(i[n]<<8|i[n]>>>24)|4278255360&(i[n]<<24|i[n]>>>8),e[t+n]^=i[n]},blockSize:4,ivSize:2});function c(){for(var e=this._X,t=this._C,r=0;r<8;r++)o[r]=t[r];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<o[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<o[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<o[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<o[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<o[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<o[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<o[6]>>>0?1:0)|0,this._b=t[7]>>>0<o[7]>>>0?1:0,r=0;r<8;r++){var n=e[r]+t[r],i=65535&n,s=n>>>16,c=((i*i>>>17)+i*s>>>15)+s*s,u=((4294901760&n)*n|0)+((65535&n)*n|0);a[r]=c^u}e[0]=a[0]+(a[7]<<16|a[7]>>>16)+(a[6]<<16|a[6]>>>16)|0,e[1]=a[1]+(a[0]<<8|a[0]>>>24)+a[7]|0,e[2]=a[2]+(a[1]<<16|a[1]>>>16)+(a[0]<<16|a[0]>>>16)|0,e[3]=a[3]+(a[2]<<8|a[2]>>>24)+a[1]|0,e[4]=a[4]+(a[3]<<16|a[3]>>>16)+(a[2]<<16|a[2]>>>16)|0,e[5]=a[5]+(a[4]<<8|a[4]>>>24)+a[3]|0,e[6]=a[6]+(a[5]<<16|a[5]>>>16)+(a[4]<<16|a[4]>>>16)|0,e[7]=a[7]+(a[6]<<8|a[6]>>>24)+a[5]|0}e.RabbitLegacy=t._createHelper(s)}(),r.RabbitLegacy)})),blowfish=createCommonjsModule((function(e,t){var r;e.exports=(r=core,function(){var e=r,t=e.lib.BlockCipher,n=e.algo;const i=16,o=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],a=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var s={pbox:[],sbox:[]};function c(e,t){let r=t>>24&255,n=t>>16&255,i=t>>8&255,o=255&t,a=e.sbox[0][r]+e.sbox[1][n];return a^=e.sbox[2][i],a+=e.sbox[3][o],a}function u(e,t,r){let n,o=t,a=r;for(let t=0;t<i;++t)o^=e.pbox[t],a=c(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[i],o^=e.pbox[i+1],{left:o,right:a}}function l(e,t,r){let n,o=t,a=r;for(let t=i+1;t>1;--t)o^=e.pbox[t],a=c(e,o)^a,n=o,o=a,a=n;return n=o,o=a,a=n,a^=e.pbox[1],o^=e.pbox[0],{left:o,right:a}}function d(e,t,r){for(let t=0;t<4;t++){e.sbox[t]=[];for(let r=0;r<256;r++)e.sbox[t][r]=a[t][r]}let n=0;for(let a=0;a<i+2;a++)e.pbox[a]=o[a]^t[n],n++,n>=r&&(n=0);let s=0,c=0,l=0;for(let t=0;t<i+2;t+=2)l=u(e,s,c),s=l.left,c=l.right,e.pbox[t]=s,e.pbox[t+1]=c;for(let t=0;t<4;t++)for(let r=0;r<256;r+=2)l=u(e,s,c),s=l.left,c=l.right,e.sbox[t][r]=s,e.sbox[t][r+1]=c;return!0}var h=n.Blowfish=t.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var e=this._keyPriorReset=this._key,t=e.words,r=e.sigBytes/4;d(s,t,r)}},encryptBlock:function(e,t){var r=u(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},decryptBlock:function(e,t){var r=l(s,e[t],e[t+1]);e[t]=r.left,e[t+1]=r.right},blockSize:2,keySize:4,ivSize:2});e.Blowfish=t._createHelper(h)}(),r.Blowfish)})),cryptoJs=createCommonjsModule((function(e,t){e.exports=core}));function setSessionData(e,t){var r=JSON.stringify(t);sessionStorage.setItem(e,r)}function getSessionData(e){var t=sessionStorage.getItem(e);return t?JSON.parse(t):null}var updataSizeDeep=function(e,t){try{var r=t.xRatio,n=t.yRatio;return isNaN(r)||isNaN(n)?(console.error("发生错误:on updataSizeDeep in go-code "),e):(e.forEach((function(e){var i;e.baseData.left=e.baseData.left*r,e.baseData.width=e.baseData.width*r,e.baseData.top=e.baseData.top*n,e.baseData.height=e.baseData.height*n,e.baseData.angle=e.baseData.angle,(null===(i=null==e?void 0:e.children)||void 0===i?void 0:i.length)&&updataSizeDeep(null==e?void 0:e.children,t)})),e)}catch(t){return e}},checkBaseData=function(e,t){var r=!0;try{for(var n=0,i=["width","height","left","top","opacity","angel","skewY","skewX","rotateX","rotateY"];n<i.length;n++){var o=i[n];if(Object.hasOwn(e,o)&&isNaN(e[o])){if(!("string"==typeof e[o]&&e[o].includes("%")||"NaN"==e[o])){console.warn(o+"--参数校验不合法:"+t),r=!1;break}r=!0}}return r}catch(e){return console.warn("参数校验不合法:"+t),!1}},arraySwap=function(e,t,r){var n=e[r];return e.splice(r,1),e.splice(t,0,n),e},arraySwapForId=function(e,t,r){var n=_$1.findIndex(e,(function(e){return e.cid==r})),i=_$1.findIndex(e,(function(e){return e.cid==t}));return arraySwap(e,i,n)},arraySwapDeep=function(e,t,r){for(var n=-1,i=0;i<e.length;i++){var o=e[i];if(o.children&&o.children.length)for(var a=0;a<o.children.length;a++){if(n=a,o.children[a].cid===r){switch(t){case"up":n>=1&&arraySwap(o.children,n-1,n);break;case"down":n<o.children.length-2&&arraySwap(o.children,n+1,n);break;case"top":0!==n&&arraySwap(o.children,0,n);break;case"bottom":var s=o.children.length-1;n!==s&&arraySwap(o.children,s,n)}break}}}return e},findItemDeep$1=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var c=a[s][1];i(c)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){c=a[s][1];i(c)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1},getAncestorsNodes=function(e,t){var r=[],n=function(e){for(var i=0;i<e.length;i++){if(e[i].cid===t)return!0;if(Array.isArray(e[i].children)){if(n(e[i].children))return r.push(e[i]),!0;n(e[i].children)}}};return n(e),r},findItemIndexDeep=function(e,t){for(var r,n=0,i=0;i<e.length;i++){var o=e[i];if(n+=1,o.cid==t)break;if(null===(r=null==o?void 0:o.children)||void 0===r?void 0:r.length)for(var a=0;a<(null==o?void 0:o.children.length);a++){if(n+=1,(null==o?void 0:o.children[a]).cid==t)return n}}return n},getLength=function(e){var t=0,r=function(e){for(var n=function(n){if(e[n].isShow&&e[n].children)r(e[n].children);else if(e[n].isShow&&e[n].dynamicChildren){if(e[n].dynamicChildren instanceof Map){for(var i=Array.from(e[n].dynamicChildren),o=0;o<i.length;o++)if(i[o]instanceof Array){var a=i[o][1];r(a)}}else if(e[n].isShow&&e[n].dynamicChildren instanceof Array){var s=e[n].dynamicChildren.find((function(t){return t[0]=e[n].activeDynamic}));s&&s.length&&r(s[1])}}else e[n].isShow&&e[n].stateChildren?r(e[n].stateChildren):e[n].isShow&&t++},i=0;i<e.length;i++)n(i)};return r(e),t||!1},findParentDeep=function(e,t){var r=null,n=function(e,i){for(var o=0,a=e;o<a.length;o++){var s=a[o];if(s.cid==t){r=i;break}if(s.children)n(s.children,s);else if(s.dynamicChildren)if(s.dynamicChildren instanceof Map){for(var c=Array.from(s.dynamicChildren),u=0;u<c.length;u++)if(c[u]instanceof Array){var l=c[u][1];n(l,s)}}else s.dynamicChildren;else s.stateChildren&&n(s.stateChildren,s)}};return n(e,null),r||!1},findItem=function(e,t,r){for(var n,i=function(i){var o=e[i];if(o.cid===t)return n=o,r&&e.splice(i,1),{value:n};if(o.children&&o.children.length){for(var a=0;a<o.children.length;a++)if(o.children[a].cid===t)return n=o.children[a],r&&o.children.splice(a,1),{value:n}}else if(o.stateChildren&&o.stateChildren.length){for(a=0;a<o.stateChildren.length;a++)if(o.stateChildren[a].cid===t)return n=o.stateChildren[a],r&&o.stateChildren.splice(a,1),{value:n}}else if(o.dynamicChildren){var s=void 0;if(o.dynamicChildren instanceof Map?s=o.dynamicChildren.get(o.activeDynamic):o.dynamicChildren instanceof Array&&(s=o.dynamicChildren.find((function(e){return e[0]==o.activeDynamic}))[1]),s)for(a=0;a<s.length;a++)if(s[a].cid===t)return n=s[a],r&&s.splice(a,1),{value:n}}},o=0;o<e.length;o++){var a=i(o);if("object"==typeof a)return a.value}return!!n},isPeer=function(e,t,r){var n=findItem(e,t),i=findItem(e,r);return n.pid&&i.pid||!n.pid&&!i.pid},recursion=function(e,t){var r=function(e){for(var n,i,o,a=0,s=e;a<s.length;a++){var c=s[a],u=null===(o=null===(i=null===(n=null==c?void 0:c.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;if(null==u?void 0:u.length)for(var l=0,d=u;l<d.length;l++){var h=d[l];h.code=h.code.replace(/&gt;/g,">").replace(/&lt;/g,"<")}t(c),c&&c.children?r(c.children):c&&c.dynamicChildren?(c.dynamicChildren&&c.dynamicChildren instanceof Map&&c.dynamicChildren.forEach((function(e){r(e)})),c.dynamicChildren&&c.dynamicChildren instanceof Array&&c.dynamicChildren.forEach((function(e){r(e[1])}))):(null==c?void 0:c.stateChildren)&&r(c.stateChildren)}};r(e)},setIndex=function(e){var t=e.length,r=function(e,t){for(var n=function(n){var i=e[n];if(i&&i.children&&i.children.length){var o=i.children.length;r(i.children,o)}else if(i&&i.dynamicChildren){var a=i.dynamicChildren.length;Array.from(i.dynamicChildren).forEach((function(e,t){r(e[1],a)}))}i.z=10*t-n},i=0;i<e.length;i++)n(i)};r(e,t)},resetID=function(e){var t=function(e,r){for(var n=function(n){var i=e[n],o=genID();r?i.pid=r:i.drag||(i.baseData.left=0,i.baseData.top=0),i.cid=o,i&&i.children&&i.children.length?t(i.children,o):i&&i.dynamicChildren&&Array.from(i.dynamicChildren).forEach((function(e,r){t(e[1],o)}))},i=0;i<e.length;i++)n(i)};t(e)},updataAttribute=function(e,t,r,n){try{if(!e||!e.hasOwnProperty(t)&&!e.hasOwnProperty(n))throw"The property you want to modify is not found. Please check whether the attribute ".concat(t," is entered correctly!");if(n){_$1.cloneDeep(e[n][t]);e[n][t]=r}else e[t]=r}catch(e){console.error(e)}},updataAttributeForOption=function(e,t){var r;try{var n="tmpData";if(!e||!(null===(r=e[n])||void 0===r?void 0:r.hasOwnProperty("option")))throw new Error("The property you want to modify is not found. Please check whether the attribute 'option' is entered correctly!");var i=_$1.cloneDeep(e[n].option),o={};Object.assign(o,i,t),console.log(o,i,"newOP"),e[n].option=o}catch(e){console.error(new Error("An error occurred: ".concat(e)))}},comToggle=function(e){try{if(!e)throw" 没有找到组件";e.isShow||"false"==e.isShow?e.isShow=!1:e.isShow=!0}catch(e){console.error(e)}},setAttr=function(e,t,r){for(var n,i=0;i<e.length;i++)(n=e[i]).cid!==t&&n.id!==t||(n[r]=!n[r])},setPositionForGroup=function(e,t){t.forEach((function(t){t.baseData.left=t.baseData.left-e.left,t.baseData.top=t.baseData.top-e.top}))},resetPositionForGroup=function(e,t){var r=t.map((function(e){return e.cid}));t.forEach((function(t){t.pid&&setPositionForWorld(t,e)}));var n=selectdArea(r,t);return setPositionForGroup(n,t),{left:n.left,top:n.top,width:n.width,height:n.height}},calculateNodePosition=function(e,t,r){var n=e.baseData.left,i=e.baseData.top,o=t;if(n+=o.baseData.left,i+=o.baseData.top,r){if(r.baseData.angle){var a=r.baseData.angle*Math.PI/180,s=Math.cos(a),c=Math.sin(a),u=n*c+i*s;n=n*s-i*c,i=u}r.baseData.scale&&(n*=r.baseData.scale.x,i*=r.baseData.scale.y)}return{left:n,top:i}},breakUp=function(e,t){var r=_$1.cloneDeep(e),n=[];return r.children&&r.children.length&&r.children.forEach((function(e){var i=t&&(null==r?void 0:r.pid)?findItemDeep$1(t,r.pid):null;setPositionForWorldNew(e,r,i),n.push(e)})),n},setPositionForWorldNew=function(e,t,r){var n=calculateNodePosition(e,t,r),i=n.left,o=n.top;e.baseData.left=i,e.baseData.top=o},setPositionForWorld=function(e,t){e.baseData.left=e.baseData.left+t.left,e.baseData.top=e.baseData.top+t.top},transformPosition=function(e,t,r){var n={left:0,top:0};return e.left=e.left||0,e.top=e.top||0,t.left=t.left||0,t.top=t.top||0,r&&0!==r?(n.left=e.left-t.left,n.top=e.top-t.top):(n.left=e.left+t.left,n.top=e.top+t.top),n},resizePosition=function(e,t){var r=_$1.cloneDeep(e),n=[],i=function(e,t){var r=findItemDeep$1(e,t);n.push(r.baseData),r.pid&&i(e,r.pid)};i(r,t);var o={left:0,top:0};return n.map((function(e){e&&(o.left+=e.left,o.top+=e.top)})),o},resziePositionForGroup=function(e,t,r,n){var i=e.baseData.left,o=e.baseData.top,a=t.left,s=t.top,c=_$1.cloneDeep(e.children),u=r||"";if(a-i<0)for(var l=0;l<c.length;l++){(d=c[l]).cid!==u&&(d.baseData.left=d.baseData.left+(i-a))}if(s-o<0)for(l=0;l<c.length;l++){var d;(d=c[l]).cid!==u&&(d.baseData.top=d.baseData.top+(o-s))}e.children=c},setPorp=function(e,t,r){var n=t.find((function(t){return t.cid===e}));"folder"===n.type?n.children.length&&n.children.forEach((function(e){e[r]=!e[r]})):n[r]=!n[r]},sortArray$1=function(e,t,r){var n=e.slice();return r||(n=_$1.cloneDeep(e)),n.length>1&&n.sort((function(e,r){return e.baseData[t]-r.baseData[t]})),n},selectdArea=function(e,t){var r=[];return e.map((function(e){var n=t.find((function(t){return t.cid===e}));n&&r.push(n)})),getPosition(r)},getPosition=function(e,t){if(e.length>0){var r={left:0,top:0,width:0,height:0},n=sortArray$1(e,"left",t),i=sortArray$1(e,"top",t),o=n[0].baseData,a=n[n.length-1].baseData,s=i[0].baseData,c=i[i.length-1].baseData,u=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.top+1*e.baseData.height}))),l=Math.max.apply(Math,i.map((function(e){return 1*e.baseData.left+1*e.baseData.width})));return r.left=o.left,r.width=Math.max(1*a.left+1*a.width,l)-1*o.left,r.top=s.top,r.height=Math.max(1*c.top+1*c.height,u)-1*s.top,r}return{left:0,top:0,width:0,height:0}};function safeConvertToNumber(e){try{if(null==e||""===e)return 0;var t=e.toString().match(/^-?\d+\.?\d*/);return t?Number(t[0]):0}catch(e){return console.error("Error converting to number: ".concat(e)),0}}function validateAndFixObject(e){var t={};for(var r in e)if(e.hasOwnProperty(r))try{t[r]=safeConvertToNumber(e[r])}catch(e){console.error("Error processing key ".concat(r,": ").concat(e)),t[r]=0}return t}var upDataGroup=function(e,t,r,n){var i=e.children,o=_$1.cloneDeep(t),a=_$1.cloneDeep(getPosition(i,n)),s=validateAndFixObject(o),c=s.left,u=s.top;s.width,s.height;var l=validateAndFixObject(a),d=l.left,h=l.top,f=l.width,p=l.height,m={left:c+d,top:u+h,width:f,height:p,angle:t.angle?t.angle:0};return i.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-d,e.baseData.top<0?t.top=0:t.top=t.top-h,e.baseData=t})),e.baseData=m,e.children=i,m},upDataGroupChildren=function(e,t,r){var n=e.children,i=_$1.cloneDeep(t),o=_$1.cloneDeep(getPosition(n)),a=i.left,s=i.top;i.width,i.height;var c=o.left,u=o.top,l=o.width,d=o.height,h={left:a+c,top:s+u,width:l,height:d,angle:t.angle?t.angle:0};return n.forEach((function(e){var t=_$1.cloneDeep(e.baseData);e.baseData.left<0?t.left=0:t.left=t.left-c,e.baseData.top<0?t.top=0:t.top=t.top-u,e.baseData=t})),e.children=n,h},resizeListPosition=function(e,t){var r=function(e,n){for(var i,o=0;o<e.length;o++){var a=e[o];if(a.pid!=n){var s=resizePosition(t,a.cid),c=resizePosition(t,a.pid);a.baseData.left=s.left-c.left,a.baseData.top=s.top-c.top}(null===(i=null==a?void 0:a.children)||void 0===i?void 0:i.length)&&r(a.children,a.cid)}};r(e,t)},RecursiveList=function(e,t){for(var r=0;r<e.length;r++){var n=e[r];e[r].index=r,n.children&&n.children.length?RecursiveList(n.children):t&&t(n)}},genID=function(){return(Math.random().toString().substr(3,10)+Date.now()).toString()},genCopyName=function(e,t,r){var n,i;void 0===r&&(r=" copy");var o=new RegExp("".concat(r,"( \\d+)?$")).exec(e);o?(n=o[1]?parseInt(o[1]):0,i=e.slice(0,o.index)):(n=0,i=e);var a=new RegExp("^".concat(i).concat(r,"( [1-9][0-9]*)?$")),s=[];t.forEach((function(e){if(o=a.exec(e)){var t=o[1]?parseInt(o[1]):1;s.push(t)}})),s.sort((function(e,t){return e-t})),n++;for(var c=0,u=s.length;c<u;c++)if(s[c]===n)n++;else if(s[c]>n)break;return i+r+" "+n},getUrlParams=function(e,t){try{var r=t||window.location.href;if(-1!=r.indexOf("?")){var n={};return r.slice(r.indexOf("?")+1).split("&").forEach((function(e){var t=e.split("=");n[t[0]]=t[1]})),e?n[e]?n[e]:null:n}return console.log("没有参数"),null}catch(e){console.error(e)}};function setActions(e,t){var r=e.types,n=e.element,i=e.actions,o=e.events,a=e.eventsComs;e.filter,store.state.globalVars;for(var s=function(e){var t=r[e],s=n.tmpData.actions[e];if(s&&s.use){a&&a.push(n.cid);var c=s[s.behave];if(!c)return"continue";"vars"===s.behave?c.map((function(e){e.type=t,e.id=n.cid,e.model=0,e.originalValue||(e.originalValue=e.value),e.mapField&&i.push(e)})):c.length>0&&c.forEach((function(e,r){"toggle"===s.behave&&""!==e.value&&e.value.length&&o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}),"update"===s.behave&&""!==e.value&&e.value.length?o.push({id:n.cid,type:s.behave,children:e.value.map((function(e){return{cid:e.cid,visible:e.visible}})),eventType:t,index:r}):"link"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,link:e.value,eventType:t,target:e.target,index:r}):"page"===s.behave&&""!==e.value?o.push({id:n.cid,type:s.behave,page:e.value,params:e.params,eventType:t,index:r}):"dynamic"===s.behave&&""!==e.value&&e.value.length>0?o.push({id:n.cid,type:s.behave,dynamic:e.value,eventType:t,index:r}):o.push(void 0)}))}},c=0;c<r.length;c++)s(c)}var publicKey="MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApWni7uLYVV8iyDPTR6Zs\naj+2BHCn4xTzFeVHADzTdtBiFH9i4fKeDK0IfbPV/9TGeRYNfl0qSfdLtU+1ZIzm\npqHppadukmk5+NbBG4Xm/lAZgVt3dUIrSyamxVjwnymN7PLdxaSOS/mgU6SDGMhN\nTM76AXKZZXWMK12UCXvKkh+TkGufcXzLe7LtrvHPLOgcnEED2CkWATuE9g8K9j4T\neOMxhJcHBUmXLgU6Chufa4nBed2899E7jxJa14+J1IDa2ahrDFLZN7H//ZsvwnXq\nxVbxm0k5jyWqfCpg13V7zD3DxNWlo3MIh2fPtIEUDVhugqPd0jPmqquqdBNTnu2I\nGQIDAQAB",privateKey="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQClaeLu4thVXyLI\nM9NHpmxqP7YEcKfjFPMV5UcAPNN20GIUf2Lh8p4MrQh9s9X/1MZ5Fg1+XSpJ90u1\nT7VkjOamoemlp26SaTn41sEbheb+UBmBW3d1QitLJqbFWPCfKY3s8t3FpI5L+aBT\npIMYyE1MzvoBcplldYwrXZQJe8qSH5OQa59xfMt7su2u8c8s6BycQQPYKRYBO4T2\nDwr2PhN44zGElwcFSZcuBToKG59ricF53bz30TuPElrXj4nUgNrZqGsMUtk3sf/9\nmy/CderFVvGbSTmPJap8KmDXdXvMPcPE1aWjcwiHZ8+0gRQNWG6Co93SM+aqq6p0\nE1Oe7YgZAgMBAAECggEABN8LadGQYWM92Pt9u1xxUOezaooOx6c0SW7JGn6wE42r\ndcMSnGjSsrjdySXkpXYUqjg2CYSg3DDGL/667s0fdcTK5q/5l6I1rNhWM4NL/C1L\nsv2IlRFvyPTIcINgAq/smA/G7C0ea6pcSFpN6grsC9kEj8paLhy6FgTZeTYGDyuG\nwI3D7XWZNzWfyQlAsoWEYAmDx72rOuEaeK4W4SMf3BB2g1hJ6fZoKT3ehHozAGcJ\nB7R8k3tGALVYdOqQgXhj8t3vNu1OATG0Q6d4z28e4TwsVunxReTyRcofrgOVwpry\nEmb4C5RYaN/rWxRrL8aW+nB3wAD/PFDacVBz/8RvaQKBgQDX90jqlLtLRVAsqbiS\nSHmX67CqQzNNDWgysQLmF2YmmkGyth4QR+cNEenIEeSSt+vc0VMAbxYY5SVzVCRl\nSZHoKHNlLGmepd3aJw5ZcFnpU86J7aG8fhvgZGEmCR+1JOZU7pUbpTvka0WQC3AK\n2+O7nUYIU65xeOaJVZvUu6My+wKBgQDEE6DrFVMNgI3dDZM0buHMYDJ2mL9F1DZb\n2URxYAlmvjkpaQb9Vq1VXV0ApZ3ItXgIX6cVrJB+MILmrsoxAamFOl/9AYiKnpnb\nYMxxqFYPuME7fzEli041915j6CpMmOwrAq6SrLiZ//hNlobJf76dAY9qyX91BTC8\nBfEWVhnk+wKBgQDT5kb+G+bVSPIMkI6PwVrE7DWQKZV5YdE+A55TgtvwvmP95GEF\nGneixFO8wYmjR6C+LgihoV1uGc+wI/v+AbyOrLnkqDoNtrNB7BZRPUKLBHbfsHCE\nELxrZDJJ7qPUyZrR9LIKyQpF6db8KazKiswc9oiTfP/pSHXyhDP8/Ap55wKBgQC6\njDI9dzxdTEGsXo3/BL+vQpbAXvMb7JsLJ9sGQuiu56xayaHsxdqDrSAezXMg0gYx\ncU/2Pwf6Bw2DjCiyF3LBXpiUjjDqMZsQLThVqmK28oBlqs2HetIeZgtX4jrcRWHs\nSdDtm4bGfdIvf1cdvnwLxMA+SRcKrrV/LegB6EkaoQKBgEwE4rllfRxOSGaF47ew\nRxTLGphZmxhLDsx0fMOHflx/BnGnxruBLEhdv3mlp12YMmb2s6kwFJvngLq4fZll\nTmC7BW3Z9h8XsL9j2xtID+5gsxYHHOCcdbzGuQV5KWb51cBym7EP9qk/3NP8w3/+\nH0iKrgAII5Ym0yh41dGL5HCo";function encrypt$1(e){var t=new JSEncrypt;return t.setPublicKey(publicKey),t.encrypt(e)}function decrypt(e){var t=new JSEncrypt;return t.setPrivateKey(privateKey),t.decrypt(e)}var decryptKey={key:"anov@2019:helloX",iv:"anov@2020:helloX"};function decrypAES(e){var t=cryptoJs.enc.Utf8.parse(decryptKey.key),r=cryptoJs.enc.Utf8.parse(decryptKey.iv);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function safeEval(e,t){var r=store.state.globalVars,n={};r.forEach((function(e){(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return/^(?:[^\r\n]*[\r\n]){0,2}(?:[^\r\n]*(?=\{))?\s*(?:function\s*[^\r\n]*|\(.*?\))?\s*[\w\s\$\._\[\]]*\s*(?:[=:]\s*)?(?:new\s+)?[A-Z]\w*\s*(?:\[.*?\]|\([^\r\n]*\))*\s*\{.*?\}/i.test(e),new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}var globalSourceTemp={type:"static",converse:{use:!1,data:[]},static:{data:{},originData:""},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""},datasource:{data:"",inputSql:"",dsName:"",dsType:300,autoUpdate:{open:!1,time:10}},indicator:{zbId:"",zbName:"",params:"",data:"",autoUpdate:{open:!1,time:10}},staticFile:{data:"",dsName:"",dsType:201}},UpdataForContainer=function(e){var t;try{var r=[];if((null==e?void 0:e.dynamicChildren)instanceof Map)for(var n=Array.from(null==e?void 0:e.dynamicChildren),i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);else if((null==e?void 0:e.dynamicChildren)instanceof Array)for(n=null==e?void 0:e.dynamicChildren,i=0;i<n.length;i++)n[i]instanceof Array&&r.push.apply(r,n[i][1]);if(null==r?void 0:r.length)for(var o=0,a=r;o<a.length;o++){var s=a[o];if(s){var c=null===(t=null==s?void 0:s.tmpData)||void 0===t?void 0:t.source,u=c.type;c&&"packData"==u&&(s.tmpData.source.packData.data=e.source[0])}}}catch(e){console.log(e)}},__defProp$1=Object.defineProperty,__getOwnPropSymbols$1=Object.getOwnPropertySymbols,__hasOwnProp$1=Object.prototype.hasOwnProperty,__propIsEnum$1=Object.prototype.propertyIsEnumerable,__defNormalProp$1=(e,t,r)=>t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues$1=(e,t)=>{for(var r in t||(t={}))__hasOwnProp$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);if(__getOwnPropSymbols$1)for(var r of __getOwnPropSymbols$1(t))__propIsEnum$1.call(t,r)&&__defNormalProp$1(e,r,t[r]);return e},NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state"),errors="production"!==process$1.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die(e,...t){if("production"!==process$1.env.NODE_ENV){const r=errors[e],n="function"==typeof r?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var getPrototypeOf=Object.getPrototypeOf;function isDraft(e){return!!e&&!!e[DRAFT_STATE]}function isDraftable(e){var t;return!!e&&(isPlainObject(e)||Array.isArray(e)||!!e[DRAFTABLE]||!!(null==(t=e.constructor)?void 0:t[DRAFTABLE])||isMap(e)||isSet(e))}var objectCtorString=Object.prototype.constructor.toString();function isPlainObject(e){if(!e||"object"!=typeof e)return!1;const t=getPrototypeOf(e);if(null===t)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object||"function"==typeof r&&Function.toString.call(r)===objectCtorString}function each(e,t){0===getArchtype(e)?Reflect.ownKeys(e).forEach((r=>{t(r,e[r],e)})):e.forEach(((r,n)=>t(n,r,e)))}function getArchtype(e){const t=e[DRAFT_STATE];return t?t.type_:Array.isArray(e)?1:isMap(e)?2:isSet(e)?3:0}function has(e,t){return 2===getArchtype(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function set(e,t,r){const n=getArchtype(e);2===n?e.set(t,r):3===n?e.add(r):e[t]=r}function is(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function isMap(e){return e instanceof Map}function isSet(e){return e instanceof Set}function latest(e){return e.copy_||e.base_}function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=isPlainObject(e);if(!0===t||"class_only"===t&&!r){const t=Object.getOwnPropertyDescriptors(e);delete t[DRAFT_STATE];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){const i=r[n],o=t[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(getPrototypeOf(e),t)}{const t=getPrototypeOf(e);if(null!==t&&r)return __spreadValues$1({},e);const n=Object.create(t);return Object.assign(n,e)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&(e.set=e.add=e.clear=e.delete=dontMutateFrozenCollections),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>freeze(t,!0)))),e}function dontMutateFrozenCollections(){die(2)}function isFrozen(e){return Object.isFrozen(e)}var plugins={},currentScope;function getPlugin(e){const t=plugins[e];return t||die(0,e),t}function getCurrentScope(){return currentScope}function createScope(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function usePatchesInScope(e,t){t&&(getPlugin("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===currentScope&&(currentScope=e.parent_)}function enterScope(e){return currentScope=createScope(currentScope,e)}function revokeDraft(e){const t=e[DRAFT_STATE];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return void 0!==e&&e!==r?(r[DRAFT_STATE].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e),t.parent_||maybeFreeze(t,e)),t.patches_&&getPlugin("Patches").generateReplacementPatches_(r[DRAFT_STATE].base_,e,t.patches_,t.inversePatches_)):e=finalize(t,r,[]),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING?e:void 0}function finalize(e,t,r){if(isFrozen(t))return t;const n=t[DRAFT_STATE];if(!n)return each(t,((i,o)=>finalizeProperty(e,n,t,i,o,r))),t;if(n.scope_!==e)return t;if(!n.modified_)return maybeFreeze(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const t=n.copy_;let i=t,o=!1;3===n.type_&&(i=new Set(t),t.clear(),o=!0),each(i,((i,a)=>finalizeProperty(e,n,t,i,a,r,o))),maybeFreeze(e,t,!1),r&&e.patches_&&getPlugin("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function finalizeProperty(e,t,r,n,i,o,a){if("production"!==process$1.env.NODE_ENV&&i===r&&die(5),isDraft(i)){const a=finalize(e,i,o&&t&&3!==t.type_&&!has(t.assigned_,n)?o.concat(n):void 0);if(set(r,n,a),!isDraft(a))return;e.canAutoFreeze_=!1}else a&&r.add(i);if(isDraftable(i)&&!isFrozen(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;finalize(e,i),t&&t.scope_.parent_||"symbol"==typeof n||!Object.prototype.propertyIsEnumerable.call(r,n)||maybeFreeze(e,i)}}function maybeFreeze(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,r)}function createProxyProxy(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=objectTraps;r&&(i=[n],o=arrayTraps);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return n.draft_=s,n.revoke_=a,s}var objectTraps={get(e,t){if(t===DRAFT_STATE)return e;const r=latest(e);if(!has(r,t))return readPropFromProto(e,r,t);const n=r[t];return e.finalized_||!isDraftable(n)?n:n===peek(e.base_,t)?(prepareCopy(e),e.copy_[t]=createProxy(n,e)):n},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,r){const n=getDescriptorFromProto(latest(e),t);if(null==n?void 0:n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const n=peek(latest(e),t),i=null==n?void 0:n[DRAFT_STATE];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(is(r,n)&&(void 0!==r||has(e.base_,t)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===r&&(void 0!==r||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==peek(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,prepareCopy(e),markChanged(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const r=latest(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:n.enumerable,value:r[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>getPrototypeOf(e.base_),setPrototypeOf(){die(12)}},arrayTraps={};function peek(e,t){const r=e[DRAFT_STATE];return(r?latest(r):e)[t]}function readPropFromProto(e,t,r){var n;const i=getDescriptorFromProto(t,r);return i?"value"in i?i.value:null==(n=i.get)?void 0:n.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let r=getPrototypeOf(e);for(;r;){const e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=getPrototypeOf(r)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}each(objectTraps,((e,t)=>{arrayTraps[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),arrayTraps.deleteProperty=function(e,t){return"production"!==process$1.env.NODE_ENV&&isNaN(parseInt(t))&&die(13),arrayTraps.set.call(this,e,t,void 0)},arrayTraps.set=function(e,t,r){return"production"!==process$1.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&die(14),objectTraps.set.call(this,e[0],t,r,e[0])};var Immer2=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,r)=>{if("function"==typeof e&&"function"!=typeof t){const r=t;t=e;const n=this;return function(e=r,...i){return n.produce(e,(e=>t.call(this,e,...i)))}}let n;if("function"!=typeof t&&die(6),void 0!==r&&"function"!=typeof r&&die(7),isDraftable(e)){const i=enterScope(this),o=createProxy(e,void 0);let a=!0;try{n=t(o),a=!1}finally{a?revokeScope(i):leaveScope(i)}return usePatchesInScope(i,r),processResult(n,i)}if(!e||"object"!=typeof e){if(n=t(e),void 0===n&&(n=e),n===NOTHING&&(n=void 0),this.autoFreeze_&&freeze(n,!0),r){const t=[],i=[];getPlugin("Patches").generateReplacementPatches_(e,n,t,i),r(t,i)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...r)=>this.produceWithPatches(t,(t=>e(t,...r)));let r,n;const i=this.produce(e,t,((e,t)=>{r=e,n=t}));return[i,r,n]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),r=createProxy(e,void 0);return r[DRAFT_STATE].isManual_=!0,leaveScope(t),r}finishDraft(e,t){const r=e&&e[DRAFT_STATE];r&&r.isManual_||die(9);const{scope_:n}=r;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));const n=getPlugin("Patches").applyPatches_;return isDraft(e)?n(e,t):this.produce(e,(e=>n(e,t)))}};function createProxy(e,t){const r=isMap(e)?getPlugin("MapSet").proxyMap_(e,t):isSet(e)?getPlugin("MapSet").proxySet_(e,t):createProxyProxy(e,t);return(t?t.scope_:getCurrentScope()).drafts_.push(r),r}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[DRAFT_STATE];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_)}else r=shallowCopy(e,!0);return each(r,((e,t)=>{set(r,e,currentImpl(t))})),t&&(t.finalized_=!1),r}var immer=new Immer2,produce=immer.produce;immer.produceWithPatches.bind(immer);var setAutoFreeze=immer.setAutoFreeze.bind(immer);function produceWithImmer(e,t){return setAutoFreeze(!1),produce(e,t)}immer.setUseStrictShallowCopy.bind(immer),immer.applyPatches.bind(immer),immer.createDraft.bind(immer),immer.finishDraft.bind(immer);var baseDataMutaitons={updataArea:function(e,t){e.currentArea=t},selectdArea:function(e,t){var r=selectdArea(t,e.list);e.currentArea=r},updataAngle:function(e,t){var r=t.id,n=t.angle,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.baseData.angle=n)},updataBaseData:function(e,t){var r,n=t.data;if(null==(null===(r=null==n?void 0:n.baseData)||void 0===r?void 0:r.opacity)&&(n.baseData.opacity=100),checkBaseData(t.data.baseData,"updataBaseData")){var i=t.ratio,o=findItemDeep$1(e.list,n.cid),a=t.oldData;if("object"!=typeof o||o.pid){if("object"==typeof o&&o.pid){var s=findItemDeep$1(e.list,o.pid);"object"==typeof s?(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData),upDataGroup(s,s.baseData),e.groupFlag=!e.groupFlag):s||(o.baseData.left<0&&(o.baseData.left=0),o.baseData.top<0&&(o.baseData.top=0),Object.assign(o.baseData,n.baseData))}}else if(Object.assign(o.baseData,n.baseData),i&&o.children&&o.children.length>0){var c=o.baseData.width/a.width,u=o.baseData.height/a.height;updataSizeDeep(o.children,{xRatio:c,yRatio:u})}}},multipleUpdataBaseData:function(e,t){if(t.ratio)for(var r=t.newData,n=t.oldData,i=r.width/n.width,o=r.height/n.height,a=e.cache.length;a--;)e.cache[a].baseData.left=e.cache[a].baseData.left*i,e.cache[a].baseData.width=e.cache[a].baseData.width*i,e.cache[a].baseData.top=e.cache[a].baseData.top*o,e.cache[a].baseData.height=e.cache[a].baseData.height*o;else for(a=e.cache.length;a--;){var s=_$1.cloneDeep(e.cache[a].baseData);s.left=s.left+t.deltaX,s.top=s.top+t.deltaY,e.cache[a].comPanel?e.cache[a].comPanel.setAttrData(Object.assign(s,t.baseData)):e.cache[a].baseData=s}},multipleUpdata:function(e,t){var r=t.ids,n=t.data,i=findItemDeep$1(e.list,r);i&&Object.assign(i.baseData,n)},multipleMove:function(e,t){},move:function(e,t){var r=e.selectd,n=t.type,i=t.speed?t.speed:1;if(0!==r.length){var o=e.list.filter((function(e){return r.includes(e.cid)}));0==o.length&&(o=[findItemDeep$1(e.list,r[0])]);for(var a=0;a<o.length;a++){var s=o[a];if(s.pid&&e.selectd.length>1)return void console.warn("Only one component can be moved within a group");if("up"===n?s.baseData.top=s.baseData.top-i:"down"===n?s.baseData.top+=i:"left"===n?s.baseData.left-=i:"right"===n&&(s.baseData.left+=i),"object"==typeof s&&s.pid){var c=findItemDeep$1(e.list,s.pid);"object"==typeof c&&(upDataGroup(c,c.baseData),e.groupFlag=!e.groupFlag)}}}else console.warn("Warning! please select the component to move.")},updataGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t.pid),n=_$1.cloneDeep(r);findItemDeep$1(r.children,t.cid),upDataGroup(r,n.baseData)},editGroupBaseData:function(e,t){var r=findItemDeep$1(e.list,t);r.children.forEach((function(e){setPositionForWorld(e,r.baseData)}))},syncBaseData:function(e,t){var r=t.cid,n=t.data,i=t.isContainer,o=function(e){for(var t=0;t<e.length;t++)r===e[t].cid?(e[t].baseData=Object.assign({},e[t].baseData,n),console.log(__assign$1({},e[t].baseData))):e[t].hasOwnProperty("children")&&o(e[t].children)},a=produceWithImmer(e.list,(function(e){void 0!==i&&e.length&&o(e)}));if(i)e.list=a;else{var s=findItemDeep$1(a,r);if(s){var c=_$1.cloneDeep(s.baseData),u=Object.assign({},s.baseData,n);this.commit("GoCom/updataBaseData",{data:{cid:r,baseData:u},oldData:c,ratio:!0})}}},updataItemData:function(e,t){var r=t.cid,n=t.propsName,i=t.propsValue,o=findItemDeep$1(e.list,r);o&&(o[n]=i)},updataOpacity:function(e,t){var r=t.cid,n=t.propsValue,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&(i.baseData.opacity=n)}},extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)};
33
33
  /*! *****************************************************************************
34
34
  Copyright (c) Microsoft Corporation.
35
35
  Permission to use, copy, modify, and/or distribute this software for any
@@ -41,7 +41,7 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
41
41
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
42
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
43
  PERFORMANCE OF THIS SOFTWARE.
44
- ***************************************************************************** */function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __spreadArray(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,keys=Object.keys,isArray=Array.isArray;function extend(e,t){return"object"!=typeof t||keys(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||_global.Promise||(_global.Promise=Promise);var getProto=Object.getPrototypeOf,_hasOwn={}.hasOwnProperty;function hasOwn(e,t){return _hasOwn.call(e,t)}function props(e,t){"function"==typeof t&&(t=t(getProto(e))),("undefined"==typeof Reflect?keys:Reflect.ownKeys)(t).forEach((function(r){setProp(e,r,t[r])}))}var defineProperty=Object.defineProperty;function setProp(e,t,r,n){defineProperty(e,t,extend(r&&hasOwn(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function derive(e){return{from:function(t){return e.prototype=Object.create(t.prototype),setProp(e.prototype,"constructor",e),{extend:props.bind(null,e.prototype)}}}}var getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;function getPropertyDescriptor(e,t){var r;return getOwnPropertyDescriptor(e,t)||(r=getProto(e))&&getPropertyDescriptor(r,t)}var _slice$1=[].slice;function slice(e,t,r){return _slice$1.call(e,t,r)}function override(e,t){return t(e)}function assert(e){if(!e)throw new Error("Assertion Failed")}function asap$1(e){_global.setImmediate?setImmediate(e):setTimeout(e,0)}function arrayToObject(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function getByKeyPath(e,t){if("string"==typeof t&&hasOwn(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=getByKeyPath(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:getByKeyPath(s,t.substr(a+1))}}function setByKeyPath(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){assert("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)setByKeyPath(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?isArray(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var c=e[a];c&&hasOwn(e,a)||(c=e[a]={}),setByKeyPath(c,s,r)}}else void 0===r?isArray(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function delByKeyPath(e,t){"string"==typeof t?setByKeyPath(e,t,void 0):"length"in t&&[].map.call(t,(function(t){setByKeyPath(e,t,void 0)}))}function shallowClone(e){var t={};for(var r in e)hasOwn(e,r)&&(t[r]=e[r]);return t}var concat=[].concat;function flatten(e){return concat.apply([],e)}var intrinsicTypeNames="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(flatten([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return _global[e]})),intrinsicTypes=new Set(intrinsicTypeNames.map((function(e){return _global[e]})));function cloneSimpleObjectTree(e){var t={};for(var r in e)if(hasOwn(e,r)){var n=e[r];t[r]=!n||"object"!=typeof n||intrinsicTypes.has(n.constructor)?n:cloneSimpleObjectTree(n)}return t}function objectIsEmpty(e){for(var t in e)if(hasOwn(e,t))return!1;return!0}var circularRefs=null;function deepClone(e){circularRefs=new WeakMap;var t=innerDeepClone(e);return circularRefs=null,t}function innerDeepClone(e){if(!e||"object"!=typeof e)return e;var t=circularRefs.get(e);if(t)return t;if(isArray(e)){t=[],circularRefs.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(innerDeepClone(e[r]))}else if(intrinsicTypes.has(e.constructor))t=e;else{var i=getProto(e);for(var o in t=i===Object.prototype?{}:Object.create(i),circularRefs.set(e,t),e)hasOwn(e,o)&&(t[o]=innerDeepClone(e[o]))}return t}var toString={}.toString;function toStringTag(e){return toString.call(e).slice(8,-1)}var iteratorSymbol="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",getIteratorOf="symbol"==typeof iteratorSymbol?function(e){var t;return null!=e&&(t=e[iteratorSymbol])&&t.apply(e)}:function(){return null};function delArrayItem(e,t){var r=e.indexOf(t);return r>=0&&e.splice(r,1),r>=0}var NO_CHAR_ARRAY={};function getArrayOf(e){var t,r,n,i;if(1===arguments.length){if(isArray(e))return e.slice();if(this===NO_CHAR_ARRAY&&"string"==typeof e)return[e];if(i=getIteratorOf(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var isAsyncFunction="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dexieErrorNames=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],idbDomErrorNames=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],errorList=dexieErrorNames.concat(idbDomErrorNames),defaultTexts={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function DexieError(e,t){this.name=e,this.message=t}function getMultiErrorMessage(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function ModifyError(e,t,r,n){this.failures=t,this.failedKeys=n,this.successCount=r,this.message=getMultiErrorMessage(e,t)}function BulkError(e,t){this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=getMultiErrorMessage(e,this.failures)}derive(DexieError).from(Error).extend({toString:function(){return this.name+": "+this.message}}),derive(ModifyError).from(DexieError),derive(BulkError).from(DexieError);var errnames=errorList.reduce((function(e,t){return e[t]=t+"Error",e}),{}),BaseException=DexieError,exceptions=errorList.reduce((function(e,t){var r=t+"Error";function n(e,n){this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=defaultTexts[t]||r,this.inner=null)}return derive(n).from(BaseException),e[t]=n,e}),{});exceptions.Syntax=SyntaxError,exceptions.Type=TypeError,exceptions.Range=RangeError;var exceptionMap=idbDomErrorNames.reduce((function(e,t){return e[t+"Error"]=exceptions[t],e}),{});function mapError(e,t){if(!e||e instanceof DexieError||e instanceof TypeError||e instanceof SyntaxError||!e.name||!exceptionMap[e.name])return e;var r=new exceptionMap[e.name](t||e.message,e);return"stack"in e&&setProp(r,"stack",{get:function(){return this.inner.stack}}),r}var fullNameExceptions=errorList.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=exceptions[t]),e}),{});function nop(){}function mirror(e){return e}function pureFunctionChain(e,t){return null==e||e===mirror?t:function(r){return t(e(r))}}function callBoth(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hookCreatingChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?callBoth(n,this.onsuccess):n),i&&(this.onerror=this.onerror?callBoth(i,this.onerror):i),void 0!==o?o:r}}function hookDeletingChain(e,t){return e===nop?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?callBoth(r,this.onsuccess):r),n&&(this.onerror=this.onerror?callBoth(n,this.onerror):n)}}function hookUpdatingChain(e,t){return e===nop?t:function(r){var n=e.apply(this,arguments);extend(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?callBoth(i,this.onsuccess):i),o&&(this.onerror=this.onerror?callBoth(o,this.onerror):o),void 0===n?void 0===a?void 0:a:extend(n,a)}}function reverseStoppableEventChain(e,t){return e===nop?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function promisableChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}fullNameExceptions.ModifyError=ModifyError,fullNameExceptions.DexieError=DexieError,fullNameExceptions.BulkError=BulkError;var debug="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function setDebug(e,t){debug=e}var INTERNAL={},ZONE_ECHO_LIMIT=100,_a$1="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,getProto(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,getProto(t),e]}(),resolvedNativePromise=_a$1[0],nativePromiseProto=_a$1[1],resolvedGlobalPromise=_a$1[2],nativePromiseThen=nativePromiseProto&&nativePromiseProto.then,NativePromise=resolvedNativePromise&&resolvedNativePromise.constructor,patchGlobalPromise=!!resolvedGlobalPromise;function schedulePhysicalTick(){queueMicrotask(physicalTick)}var asap=function(e,t){microtickQueue.push([e,t]),needsNewPhysicalTick&&(schedulePhysicalTick(),needsNewPhysicalTick=!1)},isOutsideMicroTick=!0,needsNewPhysicalTick=!0,unhandledErrors=[],rejectingErrors=[],rejectionMapper=mirror,globalPSD={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nop,pgp:!1,env:{},finalize:nop},PSD=globalPSD,microtickQueue=[],numScheduledCalls=0,tickFinalizers=[];function DexiePromise(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=PSD;if("function"!=typeof e){if(e!==INTERNAL)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&handleRejection(this,this._value))}this._state=null,this._value=null,++t.ref,executePromiseTask(this,e)}var thenProp={get:function(){var e=PSD,t=totalEchoes;function r(r,n){var i=this,o=!e.global&&(e!==PSD||t!==totalEchoes),a=o&&!decrementExpectedAwaits(),s=new DexiePromise((function(t,s){propagateToListener(i,new Listener(nativeAwaitCompatibleWrap(r,e,o,a),nativeAwaitCompatibleWrap(n,e,o,a),t,s,e))}));return this._consoleTask&&(s._consoleTask=this._consoleTask),s}return r.prototype=INTERNAL,r},set:function(e){setProp(this,"then",e&&e.prototype===INTERNAL?thenProp:{get:function(){return e},set:thenProp.set})}};function Listener(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function executePromiseTask(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&beginMicroTickScope();t&&"function"==typeof t.then?executePromiseTask(e,(function(e,r){t instanceof DexiePromise?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,propagateAllListeners(e)),r&&endMicroTickScope()}}),handleRejection.bind(null,e))}catch(t){handleRejection(e,t)}}function handleRejection(e,t){if(rejectingErrors.push(t),null===e._state){var r=e._lib&&beginMicroTickScope();t=rejectionMapper(t),e._state=!1,e._value=t,addPossiblyUnhandledError(e),propagateAllListeners(e),r&&endMicroTickScope()}}function propagateAllListeners(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)propagateToListener(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===numScheduledCalls&&(++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[]))}function propagateToListener(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++numScheduledCalls,asap(callListener,[r,e,t])}else e._listeners.push(t)}function callListener(e,t,r){try{var n,i=t._value;!t._state&&rejectingErrors.length&&(rejectingErrors=[]),n=debug&&t._consoleTask?t._consoleTask.run((function(){return e(i)})):e(i),t._state||-1!==rejectingErrors.indexOf(i)||markErrorAsHandled(t),r.resolve(n)}catch(e){r.reject(e)}finally{0==--numScheduledCalls&&finalizePhysicalTick(),--r.psd.ref||r.psd.finalize()}}function physicalTick(){usePSD(globalPSD,(function(){beginMicroTickScope()&&endMicroTickScope()}))}function beginMicroTickScope(){var e=isOutsideMicroTick;return isOutsideMicroTick=!1,needsNewPhysicalTick=!1,e}function endMicroTickScope(){var e,t,r;do{for(;microtickQueue.length>0;)for(e=microtickQueue,microtickQueue=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(microtickQueue.length>0);isOutsideMicroTick=!0,needsNewPhysicalTick=!0}function finalizePhysicalTick(){var e=unhandledErrors;unhandledErrors=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=tickFinalizers.slice(0),r=t.length;r;)t[--r]()}function run_at_end_of_this_or_next_physical_tick(e){tickFinalizers.push((function t(){e(),tickFinalizers.splice(tickFinalizers.indexOf(t),1)})),++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[])}function addPossiblyUnhandledError(e){unhandledErrors.some((function(t){return t._value===e._value}))||unhandledErrors.push(e)}function markErrorAsHandled(e){for(var t=unhandledErrors.length;t;)if(unhandledErrors[--t]._value===e._value)return void unhandledErrors.splice(t,1)}function PromiseReject(e){return new DexiePromise(INTERNAL,!1,e)}function wrap$1(e,t){var r=PSD;return function(){var n=beginMicroTickScope(),i=PSD;try{return switchToZone(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{switchToZone(i,!1),n&&endMicroTickScope()}}}props(DexiePromise.prototype,{then:thenProp,_then:function(e,t){propagateToListener(this,new Listener(null,null,e,t,PSD))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):PromiseReject(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):PromiseReject(e)}))},finally:function(e){return this.then((function(t){return DexiePromise.resolve(e()).then((function(){return t}))}),(function(t){return DexiePromise.resolve(e()).then((function(){return PromiseReject(t)}))}))},timeout:function(e,t){var r=this;return e<1/0?new DexiePromise((function(n,i){var o=setTimeout((function(){return i(new exceptions.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&setProp(DexiePromise.prototype,Symbol.toStringTag,"Dexie.Promise"),globalPSD.env=snapShot(),props(DexiePromise,{all:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return DexiePromise.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){return e instanceof DexiePromise?e:e&&"function"==typeof e.then?new DexiePromise((function(t,r){e.then(t,r)})):new DexiePromise(INTERNAL,!0,e)},reject:PromiseReject,race:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){e.map((function(e){return DexiePromise.resolve(e).then(t,r)}))}))},PSD:{get:function(){return PSD},set:function(e){return PSD=e}},totalEchoes:{get:function(){return totalEchoes}},newPSD:newScope,usePSD:usePSD,scheduler:{get:function(){return asap},set:function(e){asap=e}},rejectionMapper:{get:function(){return rejectionMapper},set:function(e){rejectionMapper=e}},follow:function(e,t){return new DexiePromise((function(r,n){return newScope((function(t,r){var n=PSD;n.unhandleds=[],n.onunhandled=r,n.finalize=callBoth((function(){var e=this;run_at_end_of_this_or_next_physical_tick((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),NativePromise&&(NativePromise.allSettled&&setProp(DexiePromise,"allSettled",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return DexiePromise.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),NativePromise.any&&"undefined"!=typeof AggregateError&&setProp(DexiePromise,"any",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return DexiePromise.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var task={awaits:0,echoes:0,id:0},taskCounter=0,zoneStack=[],zoneEchoes=0,totalEchoes=0,zone_id_counter=0;function newScope(e,t,r,n){var i=PSD,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++zone_id_counter,globalPSD.env,o.env=patchGlobalPromise?{Promise:DexiePromise,PromiseProp:{value:DexiePromise,configurable:!0,writable:!0},all:DexiePromise.all,race:DexiePromise.race,allSettled:DexiePromise.allSettled,any:DexiePromise.any,resolve:DexiePromise.resolve,reject:DexiePromise.reject}:{},t&&extend(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=usePSD(o,e,r,n);return 0===o.ref&&o.finalize(),a}function incrementExpectedAwaits(){return task.id||(task.id=++taskCounter),++task.awaits,task.echoes+=ZONE_ECHO_LIMIT,task.id}function decrementExpectedAwaits(){return!!task.awaits&&(0==--task.awaits&&(task.id=0),task.echoes=task.awaits*ZONE_ECHO_LIMIT,!0)}function onPossibleParallellAsync(e){return task.echoes&&e&&e.constructor===NativePromise?(incrementExpectedAwaits(),e.then((function(e){return decrementExpectedAwaits(),e}),(function(e){return decrementExpectedAwaits(),rejection(e)}))):e}function zoneEnterEcho(e){++totalEchoes,task.echoes&&0!=--task.echoes||(task.echoes=task.awaits=task.id=0),zoneStack.push(PSD),switchToZone(e,!0)}function zoneLeaveEcho(){var e=zoneStack[zoneStack.length-1];zoneStack.pop(),switchToZone(e,!1)}function switchToZone(e,t){var r=PSD;if((t?!task.echoes||zoneEchoes++&&e===PSD:!zoneEchoes||--zoneEchoes&&e===PSD)||queueMicrotask(t?zoneEnterEcho.bind(null,e):zoneLeaveEcho),e!==PSD&&(PSD=e,r===globalPSD&&(globalPSD.env=snapShot()),patchGlobalPromise)){var n=globalPSD.env.Promise,i=e.env;(r.global||e.global)&&(Object.defineProperty(_global,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function snapShot(){var e=_global.Promise;return patchGlobalPromise?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(_global,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function usePSD(e,t,r,n,i){var o=PSD;try{return switchToZone(e,!0),t(r,n,i)}finally{switchToZone(o,!1)}}function nativeAwaitCompatibleWrap(e,t,r,n){return"function"!=typeof e?e:function(){var i=PSD;r&&incrementExpectedAwaits(),switchToZone(t,!0);try{return e.apply(this,arguments)}finally{switchToZone(i,!1),n&&queueMicrotask(decrementExpectedAwaits)}}}function execInGlobalContext(e){Promise===NativePromise&&0===task.echoes?0===zoneEchoes?e():enqueueNativeMicroTask(e):setTimeout(e,0)}-1===(""+nativePromiseThen).indexOf("[native code]")&&(incrementExpectedAwaits=decrementExpectedAwaits=nop);var rejection=DexiePromise.reject;function tempTransaction(e,t,r,n){if(e.idbdb&&(e._state.openComplete||PSD.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return tempTransaction(e,t,r,n)}))):rejection(i)}return i._promise(t,(function(e,t){return newScope((function(){return PSD.trans=i,n(e,t,i)}))})).then((function(e){if("readwrite"===t)try{i.idbtrans.commit()}catch(e){}return"readonly"===t?e:i._completion.then((function(){return e}))}))}if(e._state.openComplete)return rejection(new exceptions.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._state.autoOpen)return rejection(new exceptions.DatabaseClosed);e.open().catch(nop)}return e._state.dbReadyPromise.then((function(){return tempTransaction(e,t,r,n)}))}var DEXIE_VERSION="4.0.7",maxString=String.fromCharCode(65535),minKey=-1/0,INVALID_KEY_ARGUMENT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",STRING_EXPECTED="String expected.",connections=[],DBNAMES_DB="__dbnames",READONLY="readonly",READWRITE="readwrite";function combine(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var AnyRange={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function workaroundForUndefinedPrimKey(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=deepClone(t))[e],t}}function Entity(){throw exceptions.Type()}function cmp(e,t){try{var r=type(e),n=type(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return compareUint8Arrays(getUint8Array(e),getUint8Array(t));case"Array":return compareArrays(e,t)}}catch(e){}return NaN}function compareArrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o){var a=cmp(e[o],t[o]);if(0!==a)return a}return r===n?0:r<n?-1:1}function compareUint8Arrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o)if(e[o]!==t[o])return e[o]<t[o]?-1:1;return r===n?0:r<n?-1:1}function type(e){var t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var r=toStringTag(e);return"ArrayBuffer"===r?"binary":r}function getUint8Array(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Table=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||PSD.trans,i=this.name,o=debug&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===e?"read":"write"," ").concat(this.name));function a(e,r,n){if(!n.schema[i])throw new exceptions.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var s=beginMicroTickScope();try{var c=n&&n.db._novip===this.db._novip?n===PSD.trans?n._promise(e,a,r):newScope((function(){return n._promise(e,a,r)}),{trans:n,transless:PSD.transless||PSD}):tempTransaction(this.db,e,[this.name],a);return o&&(c._consoleTask=o,c=c.catch((function(e){return console.trace(e),rejection(e)}))),c}finally{s&&endMicroTickScope()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):null==e?rejection(new exceptions.Type("Invalid argument to Table.get()")):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(isArray(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=keys(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){if(e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))){for(var r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1})).sort((function(e,t){return e.keyPath.length-t.keyPath.length}))[0];if(r&&this.db._maxKey!==maxString){var n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map((function(t){return e[t]})))}!r&&debug&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(e,t){return 0===o.cmp(e,t)}var s=t.reduce((function(t,r){var n=t[0],o=t[1],s=i[r],c=e[r];return[n||s,n||!s?combine(o,s&&s.multi?function(e){var t=getByKeyPath(e,r);return isArray(t)&&t.some((function(e){return a(c,e)}))}:function(e){return a(c,getByKeyPath(e,r))}):o]}),[null,null]),c=s[0],u=s[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(u):r?this.filter(u):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,isArray(e)?"[".concat(e.join("+"),"]"):e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){var t=this.db,r=this.name;this.schema.mappedClass=e,e.prototype instanceof Entity&&(e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),Object.defineProperty(n.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),n.prototype.table=function(){return r},n}(e));for(var n=new Set,i=e.prototype;i;i=getProto(i))Object.getOwnPropertyNames(i).forEach((function(e){return n.add(e)}));var o=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var i in t)if(!n.has(i))try{r[i]=t[i]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=o,this.hook("reading",o),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){extend(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof e||isArray(e))return this.where(":id").equals(e).modify(t);var r=getByKeyPath(e,this.schema.primKey.keyPath);return void 0===r?rejection(new exceptions.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:AnyRange})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(c," operations failed"),a)}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(c," operations failed"),a)}))}))},e.prototype.bulkUpdate=function(e){var t=this,r=this.core,n=e.map((function(e){return e.key})),i=e.map((function(e){return e.changes})),o=[];return this._trans("readwrite",(function(a){return r.getMany({trans:a,keys:n,cache:"clone"}).then((function(s){var c=[],u=[];e.forEach((function(e,r){var n=e.key,i=e.changes,a=s[r];if(a){for(var l=0,d=Object.keys(i);l<d.length;l++){var h=d[l],f=i[h];if(h===t.schema.primKey.keyPath){if(0!==cmp(f,n))throw new exceptions.Constraint("Cannot update primary key in bulkUpdate()")}else setByKeyPath(a,h,f)}o.push(r),c.push(n),u.push(a)}}));var l=c.length;return r.mutate({trans:a,type:"put",keys:c,values:u,updates:{keys:n,changeSpecs:i}}).then((function(e){var r=e.numFailures,n=e.failures;if(0===r)return l;for(var i=0,a=Object.keys(n);i<a.length;i++){var s=a[i],c=o[Number(s)];if(null!=c){var u=n[s];delete n[s],n[c]=u}}throw new BulkError("".concat(t.name,".bulkUpdate(): ").concat(r," of ").concat(l," operations failed"),n)}))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new BulkError("".concat(t.name,".bulkDelete(): ").concat(n," of ").concat(r," operations failed"),o)}))},e}();function Events(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"!=typeof e){var a;n||(n=reverseStoppableEventChain),i||(i=nop);var s={subscribers:[],fire:i,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter((function(t){return t!==e})),s.fire=s.subscribers.reduce(n,i)}};return t[e]=r[e]=s,s}keys(a=e).forEach((function(e){var t=a[e];if(isArray(t))o(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new exceptions.InvalidArgument("Invalid event config");var r=o(e,mirror,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){asap$1((function(){e.apply(null,t)}))}))}))}}))}}function makeClassConstructor(e,t){return derive(t).from({prototype:e}),t}function createTableConstructor(e){return makeClassConstructor(Table.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Events(null,{creating:[hookCreatingChain,nop],reading:[pureFunctionChain,mirror],updating:[hookUpdatingChain,nop],deleting:[hookDeletingChain,nop]})}))}function isPlainKeyRange(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function addFilter(e,t){e.filter=combine(e.filter,t)}function addReplayFilter(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return combine(n(),t())}:t,e.justLimit=r&&!n}function addMatchFilter(e,t){e.isMatch=combine(e.isMatch,t)}function getIndexOrStore(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new exceptions.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function openCursor(e,t,r){var n=getIndexOrStore(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function iter(e,t,r,n){var i=e.replayFilter?combine(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),hasOwn(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),iterate(openCursor(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return iterate(openCursor(e,n,r),combine(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function iterate(e,t,r,n){var i=n?function(e,t,i){return r(n(e),t,i)}:r,o=wrap$1(i);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=nop}),(function(t){e.fail(t),r=nop}))||o(e.value,e,(function(e){return r=e})),r()}))}))}var PropModification=function(){function e(e){Object.assign(this,e)}return e.prototype.execute=function(e){var t;if(void 0!==this.add){var r=this.add;if(isArray(r))return __spreadArray(__spreadArray([],isArray(e)?e:[],!0),r,!0).sort();if("number"==typeof r)return(Number(e)||0)+r;if("bigint"==typeof r)try{return BigInt(e)+r}catch(e){return BigInt(0)+r}throw new TypeError("Invalid term ".concat(r))}if(void 0!==this.remove){var n=this.remove;if(isArray(n))return isArray(e)?e.filter((function(e){return!n.includes(e)})).sort():[];if("number"==typeof n)return Number(e)-n;if("bigint"==typeof n)try{return BigInt(e)-n}catch(e){return BigInt(0)-n}throw new TypeError("Invalid subtrahend ".concat(n))}var i=null===(t=this.replacePrefix)||void 0===t?void 0:t[0];return i&&"string"==typeof e&&e.startsWith(i)?this.replacePrefix[1]+e.substring(i.length):e},e}(),Collection=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,rejection.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,rejection.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=combine(t.algorithm,e)},e.prototype._iterate=function(e,t){return iter(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&extend(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return iter(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(isPlainKeyRange(r,!0))return n.count({trans:e,query:{index:getIndexOrStore(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return iter(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&isPlainKeyRange(r,!0)&&r.limit>0){var n=r.valueMapper,i=getIndexOrStore(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return iter(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,isPlainKeyRange(t)?addReplayFilter(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):addReplayFilter(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),addReplayFilter(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return addFilter(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){return addFilter(this._ctx,(function(t){return e(t.value)})),addMatchFilter(this._ctx,e),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&isPlainKeyRange(t,!0)&&t.limit>0)return this._read((function(e){var r=getIndexOrStore(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return addFilter(this._ctx,(function(e){var t=e.primaryKey.toString(),n=hasOwn(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=keys(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i],c=getByKeyPath(t,i);s instanceof PropModification?(setByKeyPath(t,i,s.execute(c)),r=!0):c!==s&&(setByKeyPath(t,i,s),r=!0)}return r}}var s=r.table.core,c=s.schema.primaryKey,u=c.outbound,l=c.extractKey,d=t.db._options.modifyChunkSize||200,h=[],f=0,p=[],m=function(e,t){var r=t.failures,n=t.numFailures;f+=e-n;for(var i=0,o=keys(r);i<o.length;i++){var a=o[i];h.push(r[a])}};return t.clone().primaryKeys().then((function(t){var o=isPlainKeyRange(r)&&r.limit===1/0&&("function"!=typeof e||e===deleteCallback)&&{index:r.index,range:r.range},a=function(r){var c=Math.min(d,t.length-r);return s.getMany({trans:n,keys:t.slice(r,r+c),cache:"immutable"}).then((function(h){for(var f=[],p=[],g=u?[]:null,v=[],y=0;y<c;++y){var _=h[y],b={value:deepClone(_),primKey:t[r+y]};!1!==i.call(b,b.value,b)&&(null==b.value?v.push(t[r+y]):u||0===cmp(l(_),l(b.value))?(p.push(b.value),u&&g.push(t[r+y])):(v.push(t[r+y]),f.push(b.value)))}return Promise.resolve(f.length>0&&s.mutate({trans:n,type:"add",values:f}).then((function(e){for(var t in e.failures)v.splice(parseInt(t),1);m(f.length,e)}))).then((function(){return(p.length>0||o&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:g,values:p,criteria:o,changeSpec:"function"!=typeof e&&e,isAdditionalChunk:r>0}).then((function(e){return m(p.length,e)}))})).then((function(){return(v.length>0||o&&e===deleteCallback)&&s.mutate({trans:n,type:"delete",keys:v,criteria:o,isAdditionalChunk:r>0}).then((function(e){return m(v.length,e)}))})).then((function(){return t.length>r+c&&a(r+d)}))}))};return a(0).then((function(){if(h.length>0)throw new ModifyError("Error modifying one or more objects",h,f,p);return t.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return isPlainKeyRange(e)&&(e.isPrimKey||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures;e.lastResult,e.results;var n=e.numFailures;if(n)throw new ModifyError("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify(deleteCallback)},e}(),deleteCallback=function(e,t){return t.value=null};function createCollectionConstructor(e){return makeClassConstructor(Collection.prototype,(function(t,r){this.db=e;var n=AnyRange,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==mirror?s:null}}))}function simpleCompare(e,t){return e<t?-1:e===t?0:1}function simpleCompareReverse(e,t){return e>t?-1:e===t?0:1}function fail(e,t,r){var n=e instanceof WhereClause?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function emptyCollection(e){return new e.Collection(e,(function(){return rangeEqual("")})).limit(0)}function upperFactory(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function lowerFactory(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function nextCasing(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,c=0;c<a;++c){var u=t[c];if(u!==n[c])return i(e[c],r[c])<0?e.substr(0,c)+r[c]+r.substr(c+1):i(e[c],n[c])<0?e.substr(0,c)+n[c]+r.substr(c+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[c],u)<0&&(s=c)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function addIgnoreCaseAlgorithm(e,t,r,n){var i,o,a,s,c,u,l,d=r.length;if(!r.every((function(e){return"string"==typeof e})))return fail(e,STRING_EXPECTED);function h(e){i=upperFactory(e),o=lowerFactory(e),a="next"===e?simpleCompare:simpleCompareReverse;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),u=e,l="next"===e?"":n}h("next");var f=new e.Collection(e,(function(){return createRange(s[0],c[d-1]+n)}));f._ondirectionchange=function(e){h(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var h=o(i);if(t(h,c,p))return!0;for(var f=null,m=p;m<d;++m){var g=nextCasing(i,h,s[m],c[m],a,u);null===g&&null===f?p=m+1:(null===f||a(f,g)>0)&&(f=g)}return r(null!==f?function(){e.continue(f+l)}:n),!1})),f}function createRange(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function rangeEqual(e){return{type:1,lower:e,upper:e}}var WhereClause=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?emptyCollection(this):new this.Collection(this,(function(){return createRange(e,t,!r,!n)}))}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}},e.prototype.equals=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return rangeEqual(e)}))},e.prototype.above=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?fail(this,STRING_EXPECTED):this.between(e,e+maxString,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):addIgnoreCaseAlgorithm(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],maxString)},e.prototype.equalsIgnoreCase=function(e){return addIgnoreCaseAlgorithm(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,maxString)},e.prototype.anyOf=function(){var e=this,t=getArrayOf.apply(NO_CHAR_ARRAY,arguments),r=this._cmp;try{t.sort(r)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}if(0===t.length)return emptyCollection(this);var n=new this.Collection(this,(function(){return createRange(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[minKey,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[minKey,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return emptyCollection(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return fail(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",exceptions.InvalidArgument);var c=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;var l,d=i;function h(e,t){return d(e[0],t[0])}try{l=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),l.sort(h)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var f=0,p=u?function(e){return i(e,l[f][1])>0}:function(e){return i(e,l[f][1])>=0},m=c?function(e){return o(e,l[f][0])>0}:function(e){return o(e,l[f][0])>=0};var g=p,v=new this.Collection(this,(function(){return createRange(l[0][0],l[l.length-1][1],!c,!u)}));return v._ondirectionchange=function(e){"next"===e?(g=p,d=i):(g=m,d=o),l.sort(h)},v._addAlgorithm((function(e,t,n){for(var o=e.key;g(o);)if(++f===l.length)return t(n),!1;return!!function(e){return!p(e)&&!m(e)}(o)||(0===r._cmp(o,l[f][1])||0===r._cmp(o,l[f][0])||t((function(){d===i?e.continue(l[f][0]):e.continue(l[f][1])})),!1)})),v},e.prototype.startsWithAnyOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?emptyCollection(this):this.inAnyRange(e.map((function(e){return[e,e+maxString]}))):fail(this,"startsWithAnyOf() only works with strings")},e}();function createWhereClauseConstructor(e){return makeClassConstructor(WhereClause.prototype,(function(t,r,n){if(this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n},this._cmp=this._ascending=cmp,this._descending=function(e,t){return cmp(t,e)},this._max=function(e,t){return cmp(e,t)>0?e:t},this._min=function(e,t){return cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange,!this._IDBKeyRange)throw new exceptions.MissingAPI}))}function eventRejectHandler(e){return wrap$1((function(t){return preventDefault(t),e(t.target.error),!1}))}function preventDefault(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var DEXIE_STORAGE_MUTATED_EVENT_NAME="storagemutated",STORAGE_MUTATED_DOM_EVENT_NAME="x-storagemutated-1",globalEvents=Events(null,DEXIE_STORAGE_MUTATED_EVENT_NAME),Transaction=function(){function e(){}return e.prototype._lock=function(){return assert(!PSD.global),++this._reculock,1!==this._reculock||PSD.global||(PSD.lockOwnerFor=this),this},e.prototype._unlock=function(){if(assert(!PSD.global),0==--this._reculock)for(PSD.global||(PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{usePSD(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&PSD.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(assert(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new exceptions.DatabaseClosed(n);case"MissingAPIError":throw new exceptions.MissingAPI(n.message,n);default:throw new exceptions.OpenFailed(n)}if(!this.active)throw new exceptions.TransactionInactive;return assert(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=wrap$1((function(r){preventDefault(r),t._reject(e.error)})),e.onabort=wrap$1((function(r){preventDefault(r),t.active&&t._reject(new exceptions.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=wrap$1((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&globalEvents.storagemutated.fire(e.mutatedParts)})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return rejection(new exceptions.ReadOnly("Transaction is readonly"));if(!this.active)return rejection(new exceptions.TransactionInactive);if(this._locked())return new DexiePromise((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},PSD])}));if(r)return newScope((function(){var e=new DexiePromise((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new DexiePromise((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=DexiePromise.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new DexiePromise((function(e,n){r.then((function(r){return t._waitingQueue.push(wrap$1(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(wrap$1(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new exceptions.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(hasOwn(t,e))return t[e];var r=this.schema[e];if(!r)throw new exceptions.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function createTransactionConstructor(e){return makeClassConstructor(Transaction.prototype,(function(t,r,n,i,o){var a=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Events(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new DexiePromise((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),rejection(e)}))}))}function createIndexSpec(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+nameFromKeyPath(t)}}function nameFromKeyPath(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function createTableSchema(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:arrayToObject(r,(function(e){return[e.name,e]}))}}function safariMultiStoreFix(e){return 1===e.length?e[0]:e}var getMaxKey=function(e){try{return e.only([[]]),getMaxKey=function(){return[[]]},[[]]}catch(e){return getMaxKey=function(){return maxString},maxString}};function getKeyExtractor(e){return null==e?function(){}:"string"==typeof e?getSinglePathKeyExtractor(e):function(t){return getByKeyPath(t,e)}}function getSinglePathKeyExtractor(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return getByKeyPath(t,e)}}function arrayify(e){return[].slice.call(e)}var _id_counter=0;function getKeyPathAlias(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")}function createDBCore(e,t,r){function n(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var r=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}var i=function(e,t){var r=arrayify(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=isArray(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:getKeyExtractor(t)},indexes:arrayify(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:isArray(i),keyPath:i,unique:r,multiEntry:n,extractKey:getKeyExtractor(i)};return o[getKeyPathAlias(i)]=a,a})),getIndexByKeyPath:function(e){return o[getKeyPathAlias(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[getKeyPathAlias(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),o=i.schema,a=i.hasGetAll,s=o.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var r=e.trans,i=e.type,o=e.keys,a=e.values,s=e.range;return new Promise((function(e,c){e=wrap$1(e);var u=r.objectStore(t),l=null==u.keyPath,d="put"===i||"add"===i;if(!d&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var h,f=(o||a||{length:1}).length;if(o&&a&&o.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===f)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var p=[],m=[],g=0,v=function(e){++g,preventDefault(e)};if("deleteRange"===i){if(4===s.type)return e({numFailures:g,failures:m,results:[],lastResult:void 0});3===s.type?p.push(h=u.clear()):p.push(h=u.delete(n(s)))}else{var y=d?l?[a,o]:[a,null]:[o,null],_=y[0],b=y[1];if(d)for(var w=0;w<f;++w)p.push(h=b&&void 0!==b[w]?u[i](_[w],b[w]):u[i](_[w])),h.onerror=v;else for(w=0;w<f;++w)p.push(h=u[i](_[w])),h.onerror=v}var D=function(t){var r=t.target.result;p.forEach((function(e,t){return null!=e.error&&(m[t]=e.error)})),e({numFailures:g,failures:m,results:"delete"===i?o:p.map((function(e){return e.result})),lastResult:r})};h.onerror=function(e){v(e),D(e)},h.onsuccess=D}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=wrap$1(e);for(var o,a=r.objectStore(t),s=n.length,c=new Array(s),u=0,l=0,d=function(t){var r=t.target;c[r._pos]=r.result,++l===u&&e(c)},h=eventRejectHandler(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=d,o.onerror=h,++u);0===u&&e(c)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=wrap$1(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=eventRejectHandler(i)}))},query:function(e){return function(r){return new Promise((function(i,o){i=wrap$1(i);var a=r.trans,s=r.values,c=r.limit,u=r.query,l=c===1/0?void 0:c,d=u.index,h=u.range,f=a.objectStore(t),p=d.isPrimaryKey?f:f.index(d.name),m=n(h);if(0===c)return i({result:[]});if(e){var g=s?p.getAll(m,l):p.getAllKeys(m,l);g.onsuccess=function(e){return i({result:e.target.result})},g.onerror=eventRejectHandler(o)}else{var v=0,y=s||!("openKeyCursor"in p)?p.openCursor(m):p.openKeyCursor(m),_=[];y.onsuccess=function(e){var t=y.result;return t?(_.push(s?t.value:t.primaryKey),++v===c?i({result:_}):void t.continue()):i({result:_})},y.onerror=eventRejectHandler(o)}}))}}(a),openCursor:function(e){var r=e.trans,i=e.values,o=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,c){e=wrap$1(e);var u=o.index,l=o.range,d=r.objectStore(t),h=u.isPrimaryKey?d:d.index(u.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=i||!("openKeyCursor"in h)?h.openCursor(n(l),f):h.openKeyCursor(n(l),f);p.onerror=eventRejectHandler(c),p.onsuccess=wrap$1((function(t){var n=p.result;if(n){n.___id=++_id_counter,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=wrap$1(c),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=wrap$1(e),p.onerror=eventRejectHandler(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=wrap$1((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),c)}))},count:function(e){var r=e.query,i=e.trans,o=r.index,a=r.range;return new Promise((function(e,r){var s=i.objectStore(t),c=o.isPrimaryKey?s:s.index(o.name),u=n(a),l=u?c.count(u):c.count();l.onsuccess=wrap$1((function(t){return e(t.target.result)})),l.onerror=eventRejectHandler(r)}))}}}(e)})),c={};return s.forEach((function(e){return c[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!c[e])throw new Error("Table '".concat(e,"' not found"));return c[e]},MIN_KEY:-1/0,MAX_KEY:getMaxKey(t),schema:o}}function createMiddlewareStack(e,t){return t.reduce((function(e,t){var r=t.create;return __assign(__assign({},e),r(e))}),e)}function createMiddlewareStacks(e,t,r,n){var i=r.IDBKeyRange;return r.indexedDB,{dbcore:createMiddlewareStack(createDBCore(t,i,n),e.dbcore)}}function generateMiddlewareStacks(e,t){var r=t.db,n=createMiddlewareStacks(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function setApiOnPlace(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=getPropertyDescriptor(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?setProp(t,r,{get:function(){return this.table(r)},set:function(e){defineProperty(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function removeTablesApi(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function lowerVersionFirst(e,t){return e._cfg.version-t._cfg.version}function runUpgraders(e,t,r,n){var i=e._dbSchema;r.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=createTableSchema("$meta",parseIndexSyntax("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=PSD.transless||PSD;newScope((function(){if(PSD.trans=o,PSD.transless=s,0!==t)return generateMiddlewareStacks(e,r),getExistingVersion(e,o,t).then((function(t){return updateTablesAndIndexes(e,t,o,r)})).catch(a);keys(i).forEach((function(e){createTable(r,e,i[e].primKey,i[e].indexes)})),generateMiddlewareStacks(e,r),DexiePromise.follow((function(){return e.on.populate.fire(o)})).catch(a)}))}function patchCurrentVersion(e,t){createMissingTables(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var r=buildGlobalSchema(e,e.idbdb,t);adjustToExistingIndexNames(e,e._dbSchema,t);for(var n=function(e){if(e.change.length||e.recreate)return console.warn("Unable to patch indexes of table ".concat(e.name," because it has changes on the type of index or primary key.")),{value:void 0};var r=t.objectStore(e.name);e.add.forEach((function(t){debug&&console.debug("Dexie upgrade patch: Creating missing index ".concat(e.name,".").concat(t.src)),addIndex(r,t)}))},i=0,o=getSchemaDiff(r,e._dbSchema).change;i<o.length;i++){var a=n(o[i]);if("object"==typeof a)return a.value}}function getExistingVersion(e,t,r){return t.storeNames.includes("$meta")?t.table("$meta").get("version").then((function(e){return null!=e?e:r})):DexiePromise.resolve(r)}function updateTablesAndIndexes(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=buildGlobalSchema(e,e.idbdb,n),s=o.filter((function(e){return e._cfg.version>=t}));if(0===s.length)return DexiePromise.resolve();return s.forEach((function(o){i.push((function(){var i=a,s=o._cfg.dbschema;adjustToExistingIndexNames(e,i,n),adjustToExistingIndexNames(e,s,n),a=e._dbSchema=s;var c=getSchemaDiff(i,s);c.add.forEach((function(e){createTable(n,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new exceptions.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return addIndex(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),addIndex(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var u=o._cfg.contentUpgrade;if(u&&o._cfg.version>t){generateMiddlewareStacks(e,n),r._memoizedTables={};var l=shallowClone(s);c.del.forEach((function(e){l[e]=i[e]})),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],keys(l),l),r.schema=l;var d,h=isAsyncFunction(u);h&&incrementExpectedAwaits();var f=DexiePromise.follow((function(){if((d=u(r))&&h){var e=decrementExpectedAwaits.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?DexiePromise.resolve(d):f.then((function(){return d}))}})),i.push((function(t){deleteRemovedTables(o._cfg.dbschema,t),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})),i.push((function(t){e.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(e.idbdb.version/10)===o._cfg.version?(e.idbdb.deleteObjectStore("$meta"),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter((function(e){return"$meta"!==e}))):t.objectStore("$meta").put(o._cfg.version,"version"))}))})),function e(){return i.length?DexiePromise.resolve(i.shift()(r.idbtrans)).then(e):DexiePromise.resolve()}().then((function(){createMissingTables(a,n)}))}function getSchemaDiff(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,c=o.idxByName,u=void 0;for(u in s)c[u]||a.del.push(u);for(u in c){var l=s[u],d=c[u];l?l.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function createTable(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return addIndex(i,e)})),i}function createMissingTables(e,t){keys(e).forEach((function(r){t.db.objectStoreNames.contains(r)||(debug&&console.debug("Dexie: Creating missing table",r),createTable(t,r,e[r].primKey,e[r].indexes))}))}function deleteRemovedTables(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(r){return null==e[r]&&t.db.deleteObjectStore(r)}))}function addIndex(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function buildGlobalSchema(e,t,r){var n={};return slice(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=createIndexSpec(nameFromKeyPath(i),i||"",!0,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var c=t.index(t.indexNames[s]);i=c.keyPath;var u=createIndexSpec(c.name,i,!!c.unique,!!c.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(u)}n[e]=createTableSchema(e,o,a)})),n}function readGlobalSchema(e,t,r){e.verno=t.version/10;var n=e._dbSchema=buildGlobalSchema(e,t,r);e._storeNames=slice(t.objectStoreNames,0),setApiOnPlace(e,[e._allTables],keys(n),n)}function verifyInstalledSchema(e,t){var r=getSchemaDiff(buildGlobalSchema(e,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}function adjustToExistingIndexNames(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var c=a.indexNames[s],u=a.index(c).keyPath,l="string"==typeof u?u:"["+slice(u).join("+")+"]";if(t[o]){var d=t[o].idxByName[l];d&&(d.name=c,delete t[o].idxByName[l],t[o].idxByName[c]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&_global.WorkerGlobalScope&&_global instanceof _global.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function parseIndexSyntax(e){return e.split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return createIndexSpec(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),isArray(n),0===t)}))}var Version=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){keys(e).forEach((function(r){if(null!==e[r]){var n=parseIndexSyntax(e[r]),i=n.shift();if(i.unique=!0,i.multi)throw new exceptions.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new exceptions.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new exceptions.Schema("Index must have a name and cannot be an empty string")})),t[r]=createTableSchema(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?extend(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){extend(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,removeTablesApi(t,[t._allTables,t,t.Transaction.prototype]),setApiOnPlace(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],keys(i),i),t._storeNames=keys(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=promisableChain(this._cfg.contentUpgrade||nop,e),this},e}(),_a;function createVersionConstructor(e){return makeClassConstructor(Version.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}function getDbNamesTable(e,t){var r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Dexie$1(DBNAMES_DB,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function hasDatabasesNative(e){return e&&"function"==typeof e.databases}function getDatabaseNames(e){var t=e.indexedDB,r=e.IDBKeyRange;return hasDatabasesNative(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==DBNAMES_DB}))})):getDbNamesTable(t,r).toCollection().primaryKeys()}function _onDatabaseCreated(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).put({name:t}).catch(nop)}function _onDatabaseDeleted(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).delete(t).catch(nop)}function vip(e){return newScope((function(){return PSD.letThrough=!0,e()}))}function idbReady(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function isEmptyRange(e){return!("from"in e)}var RangeSet=function(e,t){if(!this){var r=new RangeSet;return e&&"d"in e&&extend(r,e),r}extend(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function addRange(e,t,r){var n=cmp(t,r);if(!isNaN(n)){if(n>0)throw RangeError();if(isEmptyRange(e))return extend(e,{from:t,to:r,d:1});var i=e.l,o=e.r;if(cmp(r,e.from)<0)return i?addRange(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rebalance(e);if(cmp(t,e.to)>0)return o?addRange(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rebalance(e);cmp(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),cmp(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&mergeRanges(e,i),o&&a&&mergeRanges(e,o)}}function mergeRanges(e,t){isEmptyRange(t)||function e(t,r){var n=r.from,i=r.to,o=r.l,a=r.r;addRange(t,n,i),o&&e(t,o),a&&e(t,a)}(e,t)}function rangesOverlap(e,t){var r=getRangeSetIterator(t),n=r.next();if(n.done)return!1;for(var i=n.value,o=getRangeSetIterator(e),a=o.next(i.from),s=a.value;!n.done&&!a.done;){if(cmp(s.from,i.to)<=0&&cmp(s.to,i.from)>=0)return!0;cmp(i.from,s.from)<0?i=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function getRangeSetIterator(e){var t=isEmptyRange(e)?null:{s:0,n:e};return{next:function(e){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&cmp(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||cmp(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rebalance(e){var t,r,n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){var o="r"===i?"l":"r",a=__assign({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=computeDepth(a)}e.d=computeDepth(e)}function computeDepth(e){var t=e.r,r=e.l;return(t?r?Math.max(t.d,r.d):t.d:r?r.d:0)+1}function extendObservabilitySet(e,t){return keys(t).forEach((function(r){e[r]?mergeRanges(e[r],t[r]):e[r]=cloneSimpleObjectTree(t[r])})),e}function obsSetsOverlap(e,t){return e.all||t.all||Object.keys(e).some((function(r){return t[r]&&rangesOverlap(t[r],e[r])}))}props(RangeSet.prototype,(_a={add:function(e){return mergeRanges(this,e),this},addKey:function(e){return addRange(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return addRange(t,e,e)})),this}},_a[iteratorSymbol]=function(){return getRangeSetIterator(this)},_a));var cache={},unsignaledParts={},isTaskEnqueued=!1;function signalSubscribersLazily(e,t){extendObservabilitySet(unsignaledParts,e),isTaskEnqueued||(isTaskEnqueued=!0,setTimeout((function(){isTaskEnqueued=!1;var e=unsignaledParts;unsignaledParts={},signalSubscribersNow(e,!1)}),0))}function signalSubscribersNow(e,t){void 0===t&&(t=!1);var r=new Set;if(e.all)for(var n=0,i=Object.values(cache);n<i.length;n++){collectTableSubscribers(s=i[n],e,r,t)}else for(var o in e){var a=/^idb\:\/\/(.*)\/(.*)\//.exec(o);if(a){var s,c=a[1],u=a[2];(s=cache["idb://".concat(c,"/").concat(u)])&&collectTableSubscribers(s,e,r,t)}}r.forEach((function(e){return e()}))}function collectTableSubscribers(e,t,r,n){for(var i=[],o=0,a=Object.entries(e.queries.query);o<a.length;o++){for(var s=a[o],c=s[0],u=[],l=0,d=s[1];l<d.length;l++){var h=d[l];obsSetsOverlap(t,h.obsSet)?h.subscribers.forEach((function(e){return r.add(e)})):n&&u.push(h)}n&&i.push([c,u])}if(n)for(var f=0,p=i;f<p.length;f++){var m=p[f];c=m[0],u=m[1];e.queries.query[c]=u}}function dexieOpen(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?rejection(t.dbOpenError):e}));t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.openCanceller,i=Math.round(10*e.verno),o=!1;function a(){if(t.openCanceller!==n)throw new exceptions.DatabaseClosed("db.open() was cancelled")}var s=t.dbReadyResolve,c=null,u=!1,l=function(){return new DexiePromise((function(n,s){if(a(),!r)throw new exceptions.MissingAPI;var d=e.name,h=t.autoSchema||!i?r.open(d):r.open(d,i);if(!h)throw new exceptions.MissingAPI;h.onerror=eventRejectHandler(s),h.onblocked=wrap$1(e._fireOnBlocked),h.onupgradeneeded=wrap$1((function(n){if(c=h.transaction,t.autoSchema&&!e._options.allowEmptyDB){h.onerror=preventDefault,c.abort(),h.result.close();var i=r.deleteDatabase(d);i.onsuccess=i.onerror=wrap$1((function(){s(new exceptions.NoSuchDatabase("Database ".concat(d," doesnt exist")))}))}else{c.onerror=eventRejectHandler(s);var a=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;u=a<1,e.idbdb=h.result,o&&patchCurrentVersion(e,c),runUpgraders(e,a/10,c,s)}}),s),h.onsuccess=wrap$1((function(){c=null;var r=e.idbdb=h.result,a=slice(r.objectStoreNames);if(a.length>0)try{var s=r.transaction(safariMultiStoreFix(a),"readonly");if(t.autoSchema)readGlobalSchema(e,r,s);else if(adjustToExistingIndexNames(e,e._dbSchema,s),!verifyInstalledSchema(e,s)&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),r.close(),i=r.version+1,o=!0,n(l());generateMiddlewareStacks(e,s)}catch(e){}connections.push(e),r.onversionchange=wrap$1((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=wrap$1((function(t){e.on("close").fire(t)})),u&&_onDatabaseCreated(e._deps,d),n()}),s)})).catch((function(e){switch(null==e?void 0:e.name){case"UnknownError":if(t.PR1398_maxLoop>0)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),l();break;case"VersionError":if(i>0)return i=0,l()}return DexiePromise.reject(e)}))};return DexiePromise.race([n,("undefined"==typeof navigator?DexiePromise.resolve():idbReady()).then(l)]).then((function(){return a(),t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return e.on.ready.fire(e.vip)}))).then((function r(){if(t.onReadyBeingFired.length>0){var n=t.onReadyBeingFired.reduce(promisableChain,nop);return t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return n(e.vip)}))).then(r)}}))})).finally((function(){t.openCanceller===n&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)})).catch((function(r){t.dbOpenError=r;try{c&&c.abort()}catch(e){}return n===t.openCanceller&&e._close(),rejection(r)})).finally((function(){t.openComplete=!0,s()})).then((function(){if(u){var t={};e.tables.forEach((function(r){r.schema.indexes.forEach((function(n){n.name&&(t["idb://".concat(e.name,"/").concat(r.name,"/").concat(n.name)]=new RangeSet(-1/0,[[[]]]))})),t["idb://".concat(e.name,"/").concat(r.name,"/")]=t["idb://".concat(e.name,"/").concat(r.name,"/:dels")]=new RangeSet(-1/0,[[[]]])})),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME).fire(t),signalSubscribersNow(t,!0)}return e}))}function awaitIterator(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):isArray(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function extractTransactionArgs(e,t,r){var n=arguments.length;if(n<2)throw new exceptions.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,flatten(i),r]}function enterTransactionScope(e,t,r,n,i){return DexiePromise.resolve().then((function(){var o=PSD.transless||PSD,a=e._createTransaction(t,r,e._dbSchema,n);a.explicit=!0;var s={trans:a,transless:o};if(n)a.idbtrans=n.idbtrans;else try{a.create(),a.idbtrans._explicit=!0,e._state.PR1398_maxLoop=3}catch(n){return n.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return enterTransactionScope(e,t,r,null,i)}))):rejection(n)}var c,u=isAsyncFunction(i);u&&incrementExpectedAwaits();var l=DexiePromise.follow((function(){if(c=i.call(a,a))if(u){var e=decrementExpectedAwaits.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=awaitIterator(c))}),s);return(c&&"function"==typeof c.then?DexiePromise.resolve(c).then((function(e){return a.active?e:rejection(new exceptions.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),rejection(e)}))}))}function pad(e,t,r){for(var n=isArray(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}function createVirtualIndexMiddleware(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=getKeyPathAlias(e),s=i[n]=i[n]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l=__assign(__assign({},r),{name:u?"".concat(n,"(virtual-from:").concat(r.name,")"):r.name,lowLevelIndex:r,isVirtual:u,keyTail:t,keyLength:c,extractKey:getKeyExtractor(e),unique:!u&&r.unique});(s.push(l),l.isPrimaryKey||o.push(l),c>1)&&a(2===c?e[0]:e.slice(0,c-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),l}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var c=0,u=n.indexes;c<u.length;c++){var l=u[c];a(l.keyPath,0,l)}function d(t){var r,n,i=t.query.index;return i.isVirtual?__assign(__assign({},t),{query:{index:i.lowLevelIndex,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:pad(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:pad(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var h=__assign(__assign({},r),{schema:__assign(__assign({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[getKeyPathAlias(e)];return t&&t[0]}}),count:function(e){return r.count(d(e))},query:function(e){return r.query(d(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(d(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(pad(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(pad(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return h}})}var virtualIndexMiddleware={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:createVirtualIndexMiddleware};function getObjectDiff(e,t,r,n){return r=r||{},n=n||"",keys(e).forEach((function(i){if(hasOwn(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=toStringTag(o);s!==toStringTag(a)?r[n+i]=t[i]:"Object"===s?getObjectDiff(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),keys(t).forEach((function(i){hasOwn(e,i)||(r[n+i]=t[i])})),r}function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}var hooksMiddleware={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=__assign(__assign({},r),{mutate:function(e){var i=PSD.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,c=o.updating;switch(e.type){case"add":if(s.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"put":if(s.fire===nop&&c.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"delete":if(a.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"deleteRange":if(a.fire===nop)break;return i._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function u(e){var t=PSD.trans,i=e.keys||getEffectiveKeys(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?__assign(__assign({},e),{keys:i}):__assign({},e)).type&&(e.values=__spreadArray([],e.values,!0)),e.keys&&(e.keys=__spreadArray([],e.keys,!0)),getExistingValues(r,e,i).then((function(o){var u=i.map((function(r,i){var u=o[i],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,r,u,t);else if("add"===e.type||void 0===u){var d=s.fire.call(l,r,e.values[i],t);null==r&&null!=d&&(r=d,e.keys[i]=r,n.outbound||setByKeyPath(e.values[i],n.keyPath,r))}else{var h=getObjectDiff(u,e.values[i]),f=c.fire.call(l,h,r,u,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){hasOwn(p,e)?p[e]=f[e]:setByKeyPath(p,e,f[e])}))}}return l}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,c=0;c<i.length;++c){var l=n?n[c]:i[c],d=u[c];null==l?d.onerror&&d.onerror(r[c]):d.onsuccess&&d.onsuccess("put"===e.type&&o[c]?e.values[c]:l)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return u.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function l(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return u({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:l(e,__assign(__assign({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}};function getExistingValues(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}function getFromTransactionCache(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var n=[],i=0,o=0;i<t.keys.length&&o<e.length;++i)0===cmp(t.keys[i],e[o])&&(n.push(r?deepClone(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}var cacheExistingValuesMiddleware={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var r=e.table(t);return __assign(__assign({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=getFromTransactionCache(e.keys,e.trans._cache,"clone"===e.cache);return t?DexiePromise.resolve(t):r.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?deepClone(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),r.mutate(e)}})}}}};function isCachableContext(e,t){return"readonly"===e.trans.mode&&!!e.subscr&&!e.trans.explicit&&"disabled"!==e.trans.db._options.cache&&!t.schema.primaryKey.outbound}function isCachableRequest(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var observabilityMiddleware={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,r=new RangeSet(e.MIN_KEY,e.MAX_KEY);return __assign(__assign({},e),{transaction:function(t,r,n){if(PSD.subscr&&"readonly"!==r)throw new exceptions.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(PSD.querier));return e.transaction(t,r,n)},table:function(n){var i=e.table(n),o=i.schema,a=o.primaryKey,s=o.indexes,c=a.extractKey,u=a.outbound,l=a.autoIncrement&&s.filter((function(e){return e.compound&&e.keyPath.includes(a.keyPath)})),d=__assign(__assign({},i),{mutate:function(e){var s=e.trans,c=e.mutatedParts||(e.mutatedParts={}),u=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return c[r]||(c[r]=new RangeSet)},d=u(""),h=u(":dels"),f=e.type,p="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[getEffectiveKeys(a,e).filter((function(e){return e})),e.values]:[],m=p[0],g=p[1],v=e.trans._cache;if(isArray(m)){d.addKeys(m);var y="delete"===f||m.length===g.length?getFromTransactionCache(m,v):null;y||h.addKeys(m),(y||g)&&trackAffectedIndexes(u,o,y,g)}else if(m){var _={from:m.lower,to:m.upper};h.add(_),d.add(_)}else d.add(r),h.add(r),o.indexes.forEach((function(e){return u(e.name).add(r)}));return i.mutate(e).then((function(t){return!m||"add"!==e.type&&"put"!==e.type||(d.addKeys(t.results),l&&l.forEach((function(r){var n=e.values.map((function(e){return r.extractKey(e)})),i=r.keyPath.findIndex((function(e){return e===a.keyPath}));t.results.forEach((function(e){return n[i]=e})),u(r.name).addKeys(n)}))),s.mutatedParts=extendObservabilitySet(s.mutatedParts||{},c),t}))}}),h=function(t){var r,n,i=t.query,o=i.index,a=i.range;return[o,new RangeSet(null!==(r=a.lower)&&void 0!==r?r:e.MIN_KEY,null!==(n=a.upper)&&void 0!==n?n:e.MAX_KEY)]},f={get:function(e){return[a,new RangeSet(e.key)]},getMany:function(e){return[a,(new RangeSet).addKeys(e.keys)]},count:h,query:h,openCursor:h};return keys(f).forEach((function(e){d[e]=function(o){var a=PSD.subscr,s=!!a,l=isCachableContext(PSD,i)&&isCachableRequest(e,o)?o.obsSet={}:a;if(s){var d=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return l[r]||(l[r]=new RangeSet)},h=d(""),p=d(":dels"),m=f[e](o),g=m[0],v=m[1];if("query"===e&&g.isPrimaryKey&&!o.values?p.add(v):d(g.name||"").add(v),!g.isPrimaryKey){if("count"!==e){var y="query"===e&&u&&o.values&&i.query(__assign(__assign({},o),{values:!1}));return i[e].apply(this,arguments).then((function(t){if("query"===e){if(u&&o.values)return y.then((function(e){var r=e.result;return h.addKeys(r),t}));var r=o.values?t.result.map(c):t.result;o.values?h.addKeys(r):p.addKeys(r)}else if("openCursor"===e){var n=t,i=o.values;return n&&Object.create(n,{key:{get:function(){return p.addKey(n.primaryKey),n.key}},primaryKey:{get:function(){var e=n.primaryKey;return p.addKey(e),e}},value:{get:function(){return i&&h.addKey(n.primaryKey),n.value}}})}return t}))}p.add(r)}}return i[e].apply(this,arguments)}})),d}})}};function trackAffectedIndexes(e,t,r,n){t.indexes.forEach((function(t){var i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&isArray(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(r||n).forEach((function(e,t){var i=r&&o(r[t]),s=n&&o(n[t]);0!==cmp(i,s)&&(null!=i&&a(i),null!=s&&a(s))}))}))}function adjustOptimisticFromFailures(e,t,r){if(0===r.numFailures)return t;if("deleteRange"===t.type)return null;var n=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;if(r.numFailures===n)return null;var i=__assign({},t);return isArray(i.keys)&&(i.keys=i.keys.filter((function(e,t){return!(t in r.failures)}))),"values"in i&&isArray(i.values)&&(i.values=i.values.filter((function(e,t){return!(t in r.failures)}))),i}function isAboveLower(e,t){return void 0===t.lower||(t.lowerOpen?cmp(e,t.lower)>0:cmp(e,t.lower)>=0)}function isBelowUpper(e,t){return void 0===t.upper||(t.upperOpen?cmp(e,t.upper)<0:cmp(e,t.upper)<=0)}function isWithinRange(e,t){return isAboveLower(e,t)&&isBelowUpper(e,t)}function applyOptimisticOps(e,t,r,n,i,o){if(!r||0===r.length)return e;var a=t.query.index,s=a.multiEntry,c=t.query.range,u=n.schema.primaryKey.extractKey,l=a.extractKey,d=(a.lowLevelIndex||a).extractKey,h=r.reduce((function(e,r){var n=e,i="add"===r.type||"put"===r.type?r.values.filter((function(e){var t=l(e);return s&&isArray(t)?t.some((function(e){return isWithinRange(e,c)})):isWithinRange(t,c)})).map((function(e){return e=deepClone(e),o&&Object.freeze(e),e})):[];switch(r.type){case"add":n=e.concat(t.values?i:i.map((function(e){return u(e)})));break;case"put":var a=(new RangeSet).addKeys(r.values.map((function(e){return u(e)})));n=e.filter((function(e){var r=t.values?u(e):e;return!rangesOverlap(new RangeSet(r),a)})).concat(t.values?i:i.map((function(e){return u(e)})));break;case"delete":var d=(new RangeSet).addKeys(r.keys);n=e.filter((function(e){var r=t.values?u(e):e;return!rangesOverlap(new RangeSet(r),d)}));break;case"deleteRange":var h=r.range;n=e.filter((function(e){return!isWithinRange(u(e),h)}))}return n}),e);return h===e?e:(h.sort((function(e,t){return cmp(d(e),d(t))||cmp(u(e),u(t))})),t.limit&&t.limit<1/0&&(h.length>t.limit?h.length=t.limit:e.length===t.limit&&h.length<t.limit&&(i.dirty=!0)),o?Object.freeze(h):h)}function areRangesEqual(e,t){return 0===cmp(e.lower,t.lower)&&0===cmp(e.upper,t.upper)&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function compareLowers(e,t,r,n){if(void 0===e)return void 0!==t?-1:0;if(void 0===t)return 1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return 1;if(n)return-1}return i}function compareUppers(e,t,r,n){if(void 0===e)return void 0!==t?1:0;if(void 0===t)return-1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return-1;if(n)return 1}return i}function isSuperRange(e,t){return compareLowers(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&compareUppers(e.upper,t.upper,e.upperOpen,t.upperOpen)>=0}function findCompatibleQuery(e,t,r,n){var i=cache["idb://".concat(e,"/").concat(t)];if(!i)return[];var o=i.queries[r];if(!o)return[null,!1,i,null];var a=o[(n.query?n.query.index.name:null)||""];if(!a)return[null,!1,i,null];switch(r){case"query":var s=a.find((function(e){return e.req.limit===n.limit&&e.req.values===n.values&&areRangesEqual(e.req.query.range,n.query.range)}));return s?[s,!0,i,a]:[a.find((function(e){return("limit"in e.req?e.req.limit:1/0)>=n.limit&&(!n.values||e.req.values)&&isSuperRange(e.req.query.range,n.query.range)})),!1,i,a];case"count":var c=a.find((function(e){return areRangesEqual(e.req.query.range,n.query.range)}));return[c,!!c,i,a]}}function subscribeToCacheEntry(e,t,r,n){e.subscribers.add(r),n.addEventListener("abort",(function(){e.subscribers.delete(r),0===e.subscribers.size&&enqueForDeletion(e,t)}))}function enqueForDeletion(e,t){setTimeout((function(){0===e.subscribers.size&&delArrayItem(t,e)}),3e3)}var cacheMiddleware={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name,r=__assign(__assign({},e),{transaction:function(r,n,i){var o=e.transaction(r,n,i);if("readwrite"===n){var a=new AbortController,s=a.signal,c=function(i){return function(){if(a.abort(),"readwrite"===n){for(var s=new Set,c=0,u=r;c<u.length;c++){var l=u[c],d=cache["idb://".concat(t,"/").concat(l)];if(d){var h=e.table(l),f=d.optimisticOps.filter((function(e){return e.trans===o}));if(o._explicit&&i&&o.mutatedParts)for(var p=0,m=Object.values(d.queries.query);p<m.length;p++)for(var g=0,v=(b=m[p]).slice();g<v.length;g++){obsSetsOverlap((S=v[g]).obsSet,o.mutatedParts)&&(delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)})))}else if(f.length>0){d.optimisticOps=d.optimisticOps.filter((function(e){return e.trans!==o}));for(var y=0,_=Object.values(d.queries.query);y<_.length;y++)for(var b,w=0,D=(b=_[y]).slice();w<D.length;w++){var S;if(null!=(S=D[w]).res&&o.mutatedParts)if(i&&!S.dirty){var x=Object.isFrozen(S.res),T=applyOptimisticOps(S.res,S.req,f,h,S,x);S.dirty?(delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)}))):T!==S.res&&(S.res=T,S.promise=DexiePromise.resolve({result:T}))}else S.dirty&&delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)}))}}}}s.forEach((function(e){return e()}))}}};o.addEventListener("abort",c(!1),{signal:s}),o.addEventListener("error",c(!1),{signal:s}),o.addEventListener("complete",c(!0),{signal:s})}return o},table:function(r){var n=e.table(r),i=n.schema.primaryKey,o=__assign(__assign({},n),{mutate:function(e){var o=PSD.trans;if(i.outbound||"disabled"===o.db._options.cache||o.explicit)return n.mutate(e);var a=cache["idb://".concat(t,"/").concat(r)];if(!a)return n.mutate(e);var s=n.mutate(e);return"add"!==e.type&&"put"!==e.type||!(e.values.length>=50||getEffectiveKeys(i,e).some((function(e){return null==e})))?(a.optimisticOps.push(e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts),s.then((function(t){if(t.numFailures>0){delArrayItem(a.optimisticOps,e);var r=adjustOptimisticFromFailures(a,e,t);r&&a.optimisticOps.push(r),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}})),s.catch((function(){delArrayItem(a.optimisticOps,e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))):s.then((function(t){var r=__assign(__assign({},e),{values:e.values.map((function(e,r){var n,o=(null===(n=i.keyPath)||void 0===n?void 0:n.includes("."))?deepClone(e):__assign({},e);return setByKeyPath(o,i.keyPath,t.results[r]),o}))}),n=adjustOptimisticFromFailures(a,r,t);a.optimisticOps.push(n),queueMicrotask((function(){return e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))})),s},query:function(e){var i;if(!isCachableContext(PSD,n)||!isCachableRequest("query",e))return n.query(e);var o="immutable"===(null===(i=PSD.trans)||void 0===i?void 0:i.db._options.cache),a=PSD,s=a.requery,c=a.signal,u=findCompatibleQuery(t,r,"query",e),l=u[0],d=u[1],h=u[2],f=u[3];if(l&&d)l.obsSet=e.obsSet;else{var p=n.query(e).then((function(e){var t=e.result;if(l&&(l.res=t),o){for(var r=0,n=t.length;r<n;++r)Object.freeze(t[r]);Object.freeze(t)}else e.result=deepClone(t);return e})).catch((function(e){return f&&l&&delArrayItem(f,l),Promise.reject(e)}));l={obsSet:e.obsSet,promise:p,subscribers:new Set,type:"query",req:e,dirty:!1},f?f.push(l):(f=[l],h||(h=cache["idb://".concat(t,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),h.queries.query[e.query.index.name||""]=f)}return subscribeToCacheEntry(l,f,s,c),l.promise.then((function(t){return{result:applyOptimisticOps(t.result,e,null==h?void 0:h.optimisticOps,n,l,o)}}))}});return o}});return r}};function vipify(e,t){return new Proxy(e,{get:function(e,r,n){return"db"===r?t:Reflect.get(e,r,n)}})}var Dexie$1=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=__assign({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:nop,dbReadyPromise:null,cancelOpen:nop,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:r.autoOpen};a.dbReadyPromise=new DexiePromise((function(e){a.dbReadyResolve=e})),a.openCanceller=new DexiePromise((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Events(this,"populate","blocked","versionchange","close",{ready:[promisableChain,nop]}),this.on.ready.subscribe=override(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||DexiePromise.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=createCollectionConstructor(this),this.Table=createTableConstructor(this),this.Transaction=createTransactionConstructor(this),this.Version=createVersionConstructor(this),this.WhereClause=createWhereClauseConstructor(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=getMaxKey(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,n._options.chromeTransactionDurability,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),connections.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(cacheExistingValuesMiddleware),this.use(cacheMiddleware),this.use(observabilityMiddleware),this.use(virtualIndexMiddleware),this.use(hooksMiddleware);var s=new Proxy(this,{get:function(e,t,r){if("_vip"===t)return!0;if("table"===t)return function(e){return vipify(n.table(e),s)};var i=Reflect.get(e,t,r);return i instanceof Table?vipify(i,s):"tables"===t?i.map((function(e){return vipify(e,s)})):"_createTransaction"===t?function(){return vipify(i.apply(this,arguments),s)}:i}});this.vip=s,o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new exceptions.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new exceptions.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(lowerVersionFirst),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||PSD.letThrough||this._vip)?e():new DexiePromise((function(e,r){if(t._state.openComplete)return r(new exceptions.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void r(new exceptions.DatabaseClosed);t.open().catch(nop)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){var e=this;return usePSD(globalPSD,(function(){return dexieOpen(e)}))},e.prototype._close=function(){var e=this._state,t=connections.indexOf(this);if(t>=0&&connections.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new DexiePromise((function(t){e.dbReadyResolve=t})),e.openCanceller=new DexiePromise((function(t,r){e.cancelOpen=r})))},e.prototype.close=function(e){var t=(void 0===e?{disableAutoOpen:!0}:e).disableAutoOpen,r=this._state;t?(r.isBeingOpened&&r.cancelOpen(new exceptions.DatabaseClosed),this._close(),r.autoOpen=!1,r.dbOpenError=new exceptions.DatabaseClosed):(this._close(),r.autoOpen=this._options.autoOpen||r.isBeingOpened,r.openComplete=!1,r.dbOpenError=null)},e.prototype.delete=function(e){var t=this;void 0===e&&(e={disableAutoOpen:!0});var r=arguments.length>0&&"object"!=typeof arguments[0],n=this._state;return new DexiePromise((function(i,o){var a=function(){t.close(e);var r=t._deps.indexedDB.deleteDatabase(t.name);r.onsuccess=wrap$1((function(){_onDatabaseDeleted(t._deps,t.name),i()})),r.onerror=eventRejectHandler(o),r.onblocked=t._fireOnBlocked};if(r)throw new exceptions.InvalidArgument("Invalid closeOptions argument to db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return keys(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=extractTransactionArgs.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=PSD.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===READONLY)o=READONLY;else{if("rw"!=e&&e!=READWRITE)throw new exceptions.InvalidArgument("Invalid transaction mode: "+e);o=READWRITE}if(i){if(i.mode===READONLY&&o===READWRITE){if(!s)throw new exceptions.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new exceptions.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):rejection(e)}var c=enterTransactionScope.bind(null,this,o,a,i,r);return i?i._promise(o,c,"lock"):PSD.trans?usePSD(PSD.transless,(function(){return n._whenReady(c)})):this._whenReady(c)},e.prototype.table=function(e){if(!hasOwn(this._allTables,e))throw new exceptions.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},e}(),symbolObservable="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Observable=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})},e.prototype[symbolObservable]=function(){return this},e}(),domDeps;try{domDeps={indexedDB:_global.indexedDB||_global.mozIndexedDB||_global.webkitIndexedDB||_global.msIndexedDB,IDBKeyRange:_global.IDBKeyRange||_global.webkitIDBKeyRange}}catch(e){domDeps={indexedDB:null,IDBKeyRange:null}}function liveQuery(e){var t,r=!1,n=new Observable((function(n){var i=isAsyncFunction(e);var o,a=!1,s={},c={},u={get closed(){return a},unsubscribe:function(){a||(a=!0,o&&o.abort(),l&&globalEvents.storagemutated.unsubscribe(h))}};n.start&&n.start(u);var l=!1,d=function(){return execInGlobalContext(f)};var h=function(e){extendObservabilitySet(s,e),obsSetsOverlap(c,s)&&d()},f=function(){if(!a&&domDeps.indexedDB){s={};var u={};o&&o.abort(),o=new AbortController;var f={subscr:u,signal:o.signal,requery:d,querier:e,trans:null},p=function(t){var r=beginMicroTickScope();try{i&&incrementExpectedAwaits();var n=newScope(e,t);return i&&(n=n.finally(decrementExpectedAwaits)),n}finally{r&&endMicroTickScope()}}(f);Promise.resolve(p).then((function(e){r=!0,t=e,a||f.signal.aborted||(s={},objectIsEmpty(c=u)||l||(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,h),l=!0),execInGlobalContext((function(){return!a&&n.next&&n.next(e)})))}),(function(e){r=!1,["DatabaseClosedError","AbortError"].includes(null==e?void 0:e.name)||a||execInGlobalContext((function(){a||n.error&&n.error(e)}))}))}};return setTimeout(d,0),u}));return n.hasValue=function(){return r},n.getValue=function(){return t},n}var Dexie=Dexie$1;function propagateLocally(e){var t=propagatingLocally;try{propagatingLocally=!0,globalEvents.storagemutated.fire(e),signalSubscribersNow(e,!0)}finally{propagatingLocally=t}}props(Dexie,__assign(__assign({},fullNameExceptions),{delete:function(e){return new Dexie(e,{addons:[]}).delete()},exists:function(e){return new Dexie(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return getDatabaseNames(Dexie.dependencies).then(e)}catch(e){return rejection(new exceptions.MissingAPI)}},defineClass:function(){return function(e){extend(this,e)}},ignoreTransaction:function(e){return PSD.trans?usePSD(PSD.transless,e):e()},vip:vip,async:function(e){return function(){try{var t=awaitIterator(e.apply(this,arguments));return t&&"function"==typeof t.then?t:DexiePromise.resolve(t)}catch(e){return rejection(e)}}},spawn:function(e,t,r){try{var n=awaitIterator(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:DexiePromise.resolve(n)}catch(e){return rejection(e)}},currentTransaction:{get:function(){return PSD.trans||null}},waitFor:function(e,t){var r=DexiePromise.resolve("function"==typeof e?Dexie.ignoreTransaction(e):e).timeout(t||6e4);return PSD.trans?PSD.trans.waitFor(r):r},Promise:DexiePromise,debug:{get:function(){return debug},set:function(e){setDebug(e)}},derive:derive,extend:extend,props:props,override:override,Events:Events,on:globalEvents,liveQuery:liveQuery,extendObservabilitySet:extendObservabilitySet,getByKeyPath:getByKeyPath,setByKeyPath:setByKeyPath,delByKeyPath:delByKeyPath,shallowClone:shallowClone,deepClone:deepClone,getObjectDiff:getObjectDiff,cmp:cmp,asap:asap$1,minKey:minKey,addons:[],connections:connections,errnames:errnames,dependencies:domDeps,cache:cache,semVer:DEXIE_VERSION,version:DEXIE_VERSION.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)}))})),Dexie.maxKey=getMaxKey(Dexie.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){var t;propagatingLocally||(t=new CustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME,{detail:e}),propagatingLocally=!0,dispatchEvent(t),propagatingLocally=!1)})),addEventListener(STORAGE_MUTATED_DOM_EVENT_NAME,(function(e){var t=e.detail;propagatingLocally||propagateLocally(t)})));var propagatingLocally=!1,bc,createBC=function(){};"undefined"!=typeof BroadcastChannel&&(createBC=function(){(bc=new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME)).onmessage=function(e){return e.data&&propagateLocally(e.data)}},createBC(),"function"==typeof bc.unref&&bc.unref(),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){propagatingLocally||bc.postMessage(e)}))),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",(function(e){if(!Dexie$1.disableBfCache&&e.persisted){debug&&console.debug("Dexie: handling persisted pagehide"),null==bc||bc.close();for(var t=0,r=connections;t<r.length;t++){r[t].close({disableAutoOpen:!1})}}})),addEventListener("pageshow",(function(e){!Dexie$1.disableBfCache&&e.persisted&&(debug&&console.debug("Dexie: handling persisted pageshow"),createBC(),propagateLocally({all:new RangeSet(-1/0,[[]])}))}))),DexiePromise.rejectionMapper=mapError,setDebug(debug);var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),requireFoolWebpack_1=requireFoolWebpack,environment=createCommonjsModule((function(e){var t=function(e){return void 0!==e&&null!=e.versions&&null!=e.versions.node};e.exports.isNode=t,e.exports.platform=void 0!==process$1&&t(process$1)?"node":"browser";var r=function(e){try{return requireFoolWebpack_1(e)}catch(e){return null}}("worker_threads");e.exports.isMainThread="node"===e.exports.platform?(!r||r.isMainThread)&&!process$1.connected:"undefined"!=typeof Window,e.exports.cpus="browser"===e.exports.platform?self.navigator.hardwareConcurrency:requireFoolWebpack_1("os").cpus().length}));function Promise$2(e,t){var r=this;if(!(this instanceof Promise$2))throw new SyntaxError("Constructor must be called with the new operator");if("function"!=typeof e)throw new SyntaxError("Function parameter handler(resolve, reject) missing");var n=[],i=[];this.resolved=!1,this.rejected=!1,this.pending=!0;var o=function(e,t){n.push(e),i.push(t)};this.then=function(e,t){return new Promise$2((function(r,n){var i=e?_then(e,r,n):r,a=t?_then(t,r,n):n;o(i,a)}),r)};var a=function(e){return r.resolved=!0,r.rejected=!1,r.pending=!1,n.forEach((function(t){t(e)})),o=function(t,r){t(e)},a=s=function(){},r},s=function(e){return r.resolved=!1,r.rejected=!0,r.pending=!1,i.forEach((function(t){t(e)})),o=function(t,r){r(e)},a=s=function(){},r};this.cancel=function(){return t?t.cancel():s(new CancellationError),r},this.timeout=function(e){if(t)t.timeout(e);else{var n=setTimeout((function(){s(new TimeoutError("Promise timed out after "+e+" ms"))}),e);r.always((function(){clearTimeout(n)}))}return r},e((function(e){a(e)}),(function(e){s(e)}))}function _then(e,t,r){return function(n){try{var i=e(n);i&&"function"==typeof i.then&&"function"==typeof i.catch?i.then(t,r):t(i)}catch(e){r(e)}}}function CancellationError(e){this.message=e||"promise cancelled",this.stack=(new Error).stack}function TimeoutError(e){this.message=e||"timeout exceeded",this.stack=(new Error).stack}environment.isNode,environment.platform,environment.isMainThread,environment.cpus,Promise$2.prototype.catch=function(e){return this.then(null,e)},Promise$2.prototype.always=function(e){return this.then(e,e)},Promise$2.all=function(e){return new Promise$2((function(t,r){var n=e.length,i=[];n?e.forEach((function(e,o){e.then((function(e){i[o]=e,0==--n&&t(i)}),(function(e){n=0,r(e)}))})):t(i)}))},Promise$2.defer=function(){var e={};return e.promise=new Promise$2((function(t,r){e.resolve=t,e.reject=r})),e},CancellationError.prototype=new Error,CancellationError.prototype.constructor=Error,CancellationError.prototype.name="CancellationError",Promise$2.CancellationError=CancellationError,TimeoutError.prototype=new Error,TimeoutError.prototype.constructor=Error,TimeoutError.prototype.name="TimeoutError",Promise$2.TimeoutError=TimeoutError;var _Promise=Promise$2,__dirname="/Users/wangshuai/workspace/web-design/go-design/packages/core/node_modules/@wdslib/go-utils/node_modules/workerpool/src",embeddedWorker='!function(){var __webpack_modules__={577:function(e){e.exports=function(e,r){this.message=e,this.transfer=r}}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];return void 0!==r||(r=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e](r,r.exports,__webpack_require__)),r.exports}var __webpack_exports__={};!function(){var exports=__webpack_exports__,__webpack_unused_export__;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Transfer=__webpack_require__(577),requireFoolWebpack=eval("typeof require !== \'undefined\' ? require : function (module) { throw new Error(\'Module \\" + module + \\" not found.\') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}},WorkerThreads,parentPort;if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,r){addEventListener(e,function(e){r(e.data)})},worker.send=function(e){postMessage(e)};else{if("undefined"==typeof process)throw new Error("Script must be executed as a worker");try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(error){if("object"!==_typeof(error)||null===error||"MODULE_NOT_FOUND"!==error.code)throw error}WorkerThreads&&null!==WorkerThreads.parentPort?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=function(e){process.send(e)},worker.on("disconnect",function(){process.exit(1)})),worker.exit=process.exit.bind(process)}function convertError(o){return Object.getOwnPropertyNames(o).reduce(function(e,r){return Object.defineProperty(e,r,{value:o[r],enumerable:!0})},{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,r){e=new Function("return ("+e+").apply(null, arguments);");return e.apply(e,r)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){function r(){worker.exit(e)}if(!worker.terminationHandler)return r();var o=worker.terminationHandler(e);isPromise(o)?o.then(r,r):r()};var currentRequestId=null;worker.on("message",function(r){if(r===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var e=worker.methods[r.method];if(!e)throw new Error(\'Unknown method "\'+r.method+\'"\');currentRequestId=r.id;var o=e.apply(e,r.params);isPromise(o)?o.then(function(e){e instanceof Transfer?worker.send({id:r.id,result:e.message,error:null},e.transfer):worker.send({id:r.id,result:e,error:null}),currentRequestId=null}).catch(function(e){worker.send({id:r.id,result:null,error:convertError(e)}),currentRequestId=null}):(o instanceof Transfer?worker.send({id:r.id,result:o.message,error:null},o.transfer):worker.send({id:r.id,result:o,error:null}),currentRequestId=null)}catch(e){worker.send({id:r.id,result:null,error:convertError(e)})}}),worker.register=function(e,r){if(e)for(var o in e)e.hasOwnProperty(o)&&(worker.methods[o]=e[o]);r&&(worker.terminationHandler=r.onTerminate),worker.send("ready")},worker.emit=function(e){currentRequestId&&(e instanceof Transfer?worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer):worker.send({id:currentRequestId,isEvent:!0,payload:e}))},__webpack_unused_export__=worker.register,worker.emit}()}();',TERMINATE_METHOD_ID="__workerpool-terminate__";function ensureWorkerThreads(){var e=tryRequireWorkerThreads();if(!e)throw new Error("WorkerPool: workerType = 'thread' is not supported, Node >= 11.7.0 required");return e}function ensureWebWorker(){if("function"!=typeof Worker&&("object"!=typeof Worker||"function"!=typeof Worker.prototype.constructor))throw new Error("WorkerPool: Web Workers not supported")}function tryRequireWorkerThreads(){try{return requireFoolWebpack_1("worker_threads")}catch(e){if("object"==typeof e&&null!==e&&"MODULE_NOT_FOUND"===e.code)return null;throw e}}function getDefaultWorker(){if("browser"===environment.platform){if("undefined"==typeof Blob)throw new Error("Blob not supported by the browser");if(!window.URL||"function"!=typeof window.URL.createObjectURL)throw new Error("URL.createObjectURL not supported by the browser");var e=new Blob([embeddedWorker],{type:"text/javascript"});return window.URL.createObjectURL(e)}return __dirname+"/worker.js"}function setupWorker(e,t){if("web"===t.workerType)return ensureWebWorker(),setupBrowserWorker(e,t.workerOpts,Worker);if("thread"===t.workerType)return setupWorkerThreadWorker(e,r=ensureWorkerThreads(),t.workerThreadOpts);if("process"!==t.workerType&&t.workerType){if("browser"===environment.platform)return ensureWebWorker(),setupBrowserWorker(e,t.workerOpts,Worker);var r=tryRequireWorkerThreads();return r?setupWorkerThreadWorker(e,r,t.workerThreadOpts):setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}return setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}function setupBrowserWorker(e,t,r){var n=new r(e,t);return n.isBrowserWorker=!0,n.on=function(e,t){this.addEventListener(e,(function(e){t(e.data)}))},n.send=function(e,t){this.postMessage(e,t)},n}function setupWorkerThreadWorker(e,t,r){var n=new t.Worker(e,{stdout:!1,stderr:!1,...r});return n.isWorkerThread=!0,n.send=function(e,t){this.postMessage(e,t)},n.kill=function(){return this.terminate(),!0},n.disconnect=function(){this.terminate()},n}function setupProcessWorker(e,t,r){var n=r.fork(e,t.forkArgs,t.forkOpts),i=n.send;return n.send=function(e){return i.call(n,e)},n.isChildProcess=!0,n}function resolveForkOptions(e){e=e||{};var t=process$1.execArgv.join(" "),r=-1!==t.indexOf("--inspect"),n=-1!==t.indexOf("--debug-brk"),i=[];return r&&(i.push("--inspect="+e.debugPort),n&&i.push("--debug-brk")),process$1.execArgv.forEach((function(e){e.indexOf("--max-old-space-size")>-1&&i.push(e)})),Object.assign({},e,{forkArgs:e.forkArgs,forkOpts:Object.assign({},e.forkOpts,{execArgv:(e.forkOpts&&e.forkOpts.execArgv||[]).concat(i)})})}function objectToError(e){for(var t=new Error(""),r=Object.keys(e),n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}function WorkerHandler(e,t){var r=this,n=t||{};function i(e){for(var t in r.terminated=!0,r.processing)void 0!==r.processing[t]&&r.processing[t].resolver.reject(e);r.processing=Object.create(null)}this.script=e||getDefaultWorker(),this.worker=setupWorker(this.script,n),this.debugPort=n.debugPort,this.forkOpts=n.forkOpts,this.forkArgs=n.forkArgs,this.workerOpts=n.workerOpts,this.workerThreadOpts=n.workerThreadOpts,this.workerTerminateTimeout=n.workerTerminateTimeout,e||(this.worker.ready=!0),this.requestQueue=[],this.worker.on("message",(function(e){if(!r.terminated)if("string"==typeof e&&"ready"===e)r.worker.ready=!0,function(){for(const e of r.requestQueue.splice(0))r.worker.send(e.message,e.transfer)}();else{var t=e.id,n=r.processing[t];void 0!==n&&(e.isEvent?n.options&&"function"==typeof n.options.on&&n.options.on(e.payload):(delete r.processing[t],!0===r.terminating&&r.terminate(),e.error?n.resolver.reject(objectToError(e.error)):n.resolver.resolve(e.result)))}}));var o=this.worker;this.worker.on("error",i),this.worker.on("exit",(function(e,t){var n="Workerpool Worker terminated Unexpectedly\n";n+=" exitCode: `"+e+"`\n",n+=" signalCode: `"+t+"`\n",n+=" workerpool.script: `"+r.script+"`\n",n+=" spawnArgs: `"+o.spawnargs+"`\n",n+=" spawnfile: `"+o.spawnfile+"`\n",n+=" stdout: `"+o.stdout+"`\n",n+=" stderr: `"+o.stderr+"`\n",i(new Error(n))})),this.processing=Object.create(null),this.terminating=!1,this.terminated=!1,this.cleaning=!1,this.terminationHandler=null,this.lastId=0}WorkerHandler.prototype.methods=function(){return this.exec("methods")},WorkerHandler.prototype.exec=function(e,t,r,n){r||(r=_Promise.defer());var i=++this.lastId;this.processing[i]={id:i,resolver:r,options:n};var o={message:{id:i,method:e,params:t},transfer:n&&n.transfer};this.terminated?r.reject(new Error("Worker is terminated")):this.worker.ready?this.worker.send(o.message,o.transfer):this.requestQueue.push(o);var a=this;return r.promise.catch((function(e){if(e instanceof _Promise.CancellationError||e instanceof _Promise.TimeoutError)return delete a.processing[i],a.terminateAndNotify(!0).then((function(){throw e}),(function(e){throw e}));throw e}))},WorkerHandler.prototype.busy=function(){return this.cleaning||Object.keys(this.processing).length>0},WorkerHandler.prototype.terminate=function(e,t){var r=this;if(e){for(var n in this.processing)void 0!==this.processing[n]&&this.processing[n].resolver.reject(new Error("Worker terminated"));this.processing=Object.create(null)}if("function"==typeof t&&(this.terminationHandler=t),this.busy())this.terminating=!0;else{var i=function(e){if(r.terminated=!0,r.cleaning=!1,null!=r.worker&&r.worker.removeAllListeners&&r.worker.removeAllListeners("message"),r.worker=null,r.terminating=!1,r.terminationHandler)r.terminationHandler(e,r);else if(e)throw e};if(this.worker){if("function"==typeof this.worker.kill){if(this.worker.killed)return void i(new Error("worker already killed!"));var o=setTimeout((function(){r.worker&&r.worker.kill()}),this.workerTerminateTimeout);return this.worker.once("exit",(function(){clearTimeout(o),r.worker&&(r.worker.killed=!0),i()})),this.worker.ready?this.worker.send(TERMINATE_METHOD_ID):this.requestQueue.push({message:TERMINATE_METHOD_ID}),void(this.cleaning=!0)}if("function"!=typeof this.worker.terminate)throw new Error("Failed to terminate worker");this.worker.terminate(),this.worker.killed=!0}i()}},WorkerHandler.prototype.terminateAndNotify=function(e,t){var r=_Promise.defer();return t&&r.promise.timeout(t),this.terminate(e,(function(e,t){e?r.reject(e):r.resolve(t)})),r.promise};var WorkerHandler_1=WorkerHandler,_tryRequireWorkerThreads=tryRequireWorkerThreads,_setupProcessWorker=setupProcessWorker,_setupBrowserWorker=setupBrowserWorker,_setupWorkerThreadWorker=setupWorkerThreadWorker,ensureWorkerThreads_1=ensureWorkerThreads;WorkerHandler_1._tryRequireWorkerThreads=_tryRequireWorkerThreads,WorkerHandler_1._setupProcessWorker=_setupProcessWorker,WorkerHandler_1._setupBrowserWorker=_setupBrowserWorker,WorkerHandler_1._setupWorkerThreadWorker=_setupWorkerThreadWorker,WorkerHandler_1.ensureWorkerThreads=ensureWorkerThreads_1;var MAX_PORTS=65535,debugPortAllocator=DebugPortAllocator;function DebugPortAllocator(){this.ports=Object.create(null),this.length=0}DebugPortAllocator.prototype.nextAvailableStartingAt=function(e){for(;!0===this.ports[e];)e++;if(e>=MAX_PORTS)throw new Error("WorkerPool debug port limit reached: "+e+">= "+MAX_PORTS);return this.ports[e]=!0,this.length++,e},DebugPortAllocator.prototype.releasePort=function(e){delete this.ports[e],this.length--};var DEBUG_PORT_ALLOCATOR=new debugPortAllocator;function Pool(e,t){"string"==typeof e?this.script=e||null:(this.script=null,t=e),this.workers=[],this.tasks=[],t=t||{},this.forkArgs=Object.freeze(t.forkArgs||[]),this.forkOpts=Object.freeze(t.forkOpts||{}),this.workerOpts=Object.freeze(t.workerOpts||{}),this.workerThreadOpts=Object.freeze(t.workerThreadOpts||{}),this.debugPortStart=t.debugPortStart||43210,this.nodeWorker=t.nodeWorker,this.workerType=t.workerType||t.nodeWorker||"auto",this.maxQueueSize=t.maxQueueSize||1/0,this.workerTerminateTimeout=t.workerTerminateTimeout||1e3,this.onCreateWorker=t.onCreateWorker||(()=>null),this.onTerminateWorker=t.onTerminateWorker||(()=>null),t&&"maxWorkers"in t?(validateMaxWorkers(t.maxWorkers),this.maxWorkers=t.maxWorkers):this.maxWorkers=Math.max((environment.cpus||4)-1,1),t&&"minWorkers"in t&&("max"===t.minWorkers?this.minWorkers=this.maxWorkers:(validateMinWorkers(t.minWorkers),this.minWorkers=t.minWorkers,this.maxWorkers=Math.max(this.minWorkers,this.maxWorkers)),this._ensureMinWorkers()),this._boundNext=this._next.bind(this),"thread"===this.workerType&&WorkerHandler_1.ensureWorkerThreads()}function validateMaxWorkers(e){if(!isNumber(e)||!isInteger(e)||e<1)throw new TypeError("Option maxWorkers must be an integer number >= 1")}function validateMinWorkers(e){if(!isNumber(e)||!isInteger(e)||e<0)throw new TypeError("Option minWorkers must be an integer number >= 0")}function isNumber(e){return"number"==typeof e}function isInteger(e){return Math.round(e)==e}Pool.prototype.exec=function(e,t,r){if(t&&!Array.isArray(t))throw new TypeError('Array expected as argument "params"');if("string"==typeof e){var n=_Promise.defer();if(this.tasks.length>=this.maxQueueSize)throw new Error("Max queue size of "+this.maxQueueSize+" reached");var i=this.tasks,o={method:e,params:t,resolver:n,timeout:null,options:r};i.push(o);var a=n.promise.timeout;return n.promise.timeout=function(e){return-1!==i.indexOf(o)?(o.timeout=e,n.promise):a.call(n.promise,e)},this._next(),n.promise}if("function"==typeof e)return this.exec("run",[String(e),t]);throw new TypeError('Function or string expected as argument "method"')},Pool.prototype.proxy=function(){if(arguments.length>0)throw new Error("No arguments expected");var e=this;return this.exec("methods").then((function(t){var r={};return t.forEach((function(t){r[t]=function(){return e.exec(t,Array.prototype.slice.call(arguments))}})),r}))},Pool.prototype._next=function(){if(this.tasks.length>0){var e=this._getWorker();if(e){var t=this,r=this.tasks.shift();if(r.resolver.promise.pending){var n=e.exec(r.method,r.params,r.resolver,r.options).then(t._boundNext).catch((function(){if(e.terminated)return t._removeWorker(e)})).then((function(){t._next()}));"number"==typeof r.timeout&&n.timeout(r.timeout)}else t._next()}}},Pool.prototype._getWorker=function(){for(var e=this.workers,t=0;t<e.length;t++){var r=e[t];if(!1===r.busy())return r}return e.length<this.maxWorkers?(r=this._createWorkerHandler(),e.push(r),r):null},Pool.prototype._removeWorker=function(e){var t=this;return DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e),this._ensureMinWorkers(),new _Promise((function(r,n){e.terminate(!1,(function(i){t.onTerminateWorker({forkArgs:e.forkArgs,forkOpts:e.forkOpts,workerThreadOpts:e.workerThreadOpts,script:e.script}),i?n(i):r(e)}))}))},Pool.prototype._removeWorkerFromList=function(e){var t=this.workers.indexOf(e);-1!==t&&this.workers.splice(t,1)},Pool.prototype.terminate=function(e,t){var r=this;this.tasks.forEach((function(e){e.resolver.reject(new Error("Pool terminated"))})),this.tasks.length=0;var n=function(e){DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e)}.bind(this),i=[];return this.workers.slice().forEach((function(o){var a=o.terminateAndNotify(e,t).then(n).always((function(){r.onTerminateWorker({forkArgs:o.forkArgs,forkOpts:o.forkOpts,workerThreadOpts:o.workerThreadOpts,script:o.script})}));i.push(a)})),_Promise.all(i)},Pool.prototype.stats=function(){var e=this.workers.length,t=this.workers.filter((function(e){return e.busy()})).length;return{totalWorkers:e,busyWorkers:t,idleWorkers:e-t,pendingTasks:this.tasks.length,activeTasks:t}},Pool.prototype._ensureMinWorkers=function(){if(this.minWorkers)for(var e=this.workers.length;e<this.minWorkers;e++)this.workers.push(this._createWorkerHandler())},Pool.prototype._createWorkerHandler=function(){const e=this.onCreateWorker({forkArgs:this.forkArgs,forkOpts:this.forkOpts,workerOpts:this.workerOpts,workerThreadOpts:this.workerThreadOpts,script:this.script})||{};return new WorkerHandler_1(e.script||this.script,{forkArgs:e.forkArgs||this.forkArgs,forkOpts:e.forkOpts||this.forkOpts,workerOpts:e.workerOpts||this.workerOpts,workerThreadOpts:e.workerThreadOpts||this.workerThreadOpts,debugPort:DEBUG_PORT_ALLOCATOR.nextAvailableStartingAt(this.debugPortStart),workerType:this.workerType,workerTerminateTimeout:this.workerTerminateTimeout})};var Pool_1=Pool;function Transfer$1(e,t){this.message=e,this.transfer=t}var transfer=Transfer$1,worker_1=createCommonjsModule((function(module,exports){var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}};if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,t){addEventListener(e,(function(e){t(e.data)}))},worker.send=function(e){postMessage(e)};else{if(void 0===process$1)throw new Error("Script must be executed as a worker");var WorkerThreads;try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(e){if("object"!=typeof e||null===e||"MODULE_NOT_FOUND"!==e.code)throw e}if(WorkerThreads&&null!==WorkerThreads.parentPort){var parentPort=WorkerThreads.parentPort;worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort),worker.exit=process$1.exit.bind(process$1)}else worker.on=process$1.on.bind(process$1),worker.send=function(e){process$1.send(e)},worker.on("disconnect",(function(){process$1.exit(1)})),worker.exit=process$1.exit.bind(process$1)}function convertError(e){return Object.getOwnPropertyNames(e).reduce((function(t,r){return Object.defineProperty(t,r,{value:e[r],enumerable:!0})}),{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,t){var r=new Function("return ("+e+").apply(null, arguments);");return r.apply(r,t)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){var t=function(){worker.exit(e)};if(!worker.terminationHandler)return t();var r=worker.terminationHandler(e);isPromise(r)?r.then(t,t):t()};var currentRequestId=null;worker.on("message",(function(e){if(e===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var t=worker.methods[e.method];if(!t)throw new Error('Unknown method "'+e.method+'"');currentRequestId=e.id;var r=t.apply(t,e.params);isPromise(r)?r.then((function(t){t instanceof transfer?worker.send({id:e.id,result:t.message,error:null},t.transfer):worker.send({id:e.id,result:t,error:null}),currentRequestId=null})).catch((function(t){worker.send({id:e.id,result:null,error:convertError(t)}),currentRequestId=null})):(r instanceof transfer?worker.send({id:e.id,result:r.message,error:null},r.transfer):worker.send({id:e.id,result:r,error:null}),currentRequestId=null)}catch(t){worker.send({id:e.id,result:null,error:convertError(t)})}})),worker.register=function(e,t){if(e)for(var r in e)e.hasOwnProperty(r)&&(worker.methods[r]=e[r]);t&&(worker.terminationHandler=t.onTerminate),worker.send("ready")},worker.emit=function(e){if(currentRequestId){if(e instanceof transfer)return void worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer);worker.send({id:currentRequestId,isEvent:!0,payload:e})}},exports.add=worker.register,exports.emit=worker.emit}));worker_1.add,worker_1.emit;var pool=function(e,t){return new Pool_1(e,t)},worker=function(e,t){var r=worker_1;r.add(e,t)},workerEmit=function(e){worker_1.emit(e)},Promise$1=_Promise,Transfer=transfer,platform=environment.platform,isMainThread=environment.isMainThread,cpus=environment.cpus,src={pool:pool,worker:worker,workerEmit:workerEmit,Promise:Promise$1,Transfer:Transfer,platform:platform,isMainThread:isMainThread,cpus:cpus};function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class l{constructor(){this.requests=[],console.log("RequestTracker")}static getInstance(){return l.instance||(l.instance=new l),l.instance}addRequest(e){if(this.isDuplicateRequest(e)){let t=this.findRequest(e);this.cancelRequest(t)}this.requests.push(e)}findRequest(e){let t;for(const r of this.requests)if(this.areRequestsEqual(r,e)){t=r;break}return t}removeRequest(e){const t=this.requests.indexOf(e);-1!==t&&this.requests.splice(t,1)}cancelRequest(e){e.cancelToken.cancel("Request canceled"),this.removeRequest(e)}isDuplicateRequest(e){return this.requests.some((t=>this.areRequestsEqual(t,e)))}areRequestsEqual(e,t){var r,n;return e.url===t.url&&JSON.stringify(null===(r=e.headers)||void 0===r?void 0:r.sponsor)===JSON.stringify(null===(n=t.headers)||void 0===n?void 0:n.sponsor)&&JSON.stringify(e.data)===JSON.stringify(t.data)&&JSON.stringify(e.params)===JSON.stringify(t.params)&&e.method===t.method}}const d=l.getInstance(),c=3e4,u=3e4,h=(t="",r)=>{let n,i=e.create({baseURL:t,timeout:c,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return i.interceptors.request.use((function(t){let{url:r,params:i,headers:o,data:a,method:s}=t;const c=e.CancelToken.source();return n={url:r,params:i,headers:o,data:a,method:s,cancelToken:c},t.cancelToken=c.token,d.addRequest(n),sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(t.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(t.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(t.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===t.method?(t.headers["Content-Type"]="application/json;",t):"get"===t.method?t:"put"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",t):"delete"===t.method?t:void 0}),(function(e){return Promise.reject(e)})),i.interceptors.response.use((function(e){return 200===e.status||e.data.code,r&&r(e),d.removeRequest(n),e.data}),(function(e){return r&&(d.removeRequest(n),r(null==e?void 0:e.response)),Promise.reject(e.response)})),i},p=(e,t)=>{try{let r=t||window.location.href;if(-1!=r.indexOf("?")){let t={};return r.slice(r.indexOf("?")+1).split("&").forEach((e=>{let r=e.split("=");t[r[0]]=r[1]})),e?t[e]?t[e]:null:t}return console.log("没有参数"),null}catch(e){console.error(e)}};function m(e,t=!1){try{return t?f(e)?e:JSON.stringify(e):f(e)?JSON.parse(e):e}catch(t){return console.log("转化JSON 发生错我!",e),e}}const f=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch(e){return!1}return!1},g=(e,t)=>{try{const r=JSON.stringify(t);sessionStorage.setItem(e,r)}catch(t){console.error(`Error setting session data for key ${e}:`,t)}},v=e=>{const t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(t){console.error(`Error parsing session data for key ${e}:`,t)}return null},y=e=>{for(const t of e)t.code&&(t.code=t.code.replace(/&gt;/g,">").replace(/&lt;/g,"<"))},b=(e,t)=>{e instanceof Map?e.forEach((e=>{t([e])})):Array.isArray(e)&&e.forEach((e=>{t(e.children)}))},w=(e,t)=>{const r=e=>{var n,i,o;if(e)for(const a of e){const e=null===(o=null===(i=null===(n=null==a?void 0:a.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;(null==e?void 0:e.length)&&y(e),t(a),a.children?r(a.children):a.dynamicChildren?b(a.dynamicChildren,r):a.stateChildren&&r(a.stateChildren)}};r(e)},D=(e,t,r,n)=>{const i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){const e=i.map((e=>e.replace(/{{|}}|@/gm,"")));for(const i of e)if(i&&t&&!(t.findIndex((e=>e.mapField===i))<0))return r&&n&&k(n,i,r.cid),!0}return!1},k=(e,t,r)=>{if(!e)throw new Error("Share variable tree is not defined");if("string"!=typeof t)throw new Error("Variable name should be a string");if(!r)throw new Error("ID is required");Array.isArray(e[t])||(e[t]=[]),e[t].includes(r)||e[t].push(r)},N=(e,t,r)=>{var n;let i=!1;const o=null==t?void 0:t.converse;if(o&&o.use&&o.data.length)for(const t of o.data)if((null==t?void 0:t.dependVars)&&t.dependVars.includes(e))return!0;const a=null==t?void 0:t[null==t?void 0:t.type];return((null==a?void 0:a.inputSql)||(null==a?void 0:a.url)||(null==a?void 0:a.headers)||(null==a?void 0:a.params))&&(i=D(a.inputSql||a.url||(null===(n=a.headers)||void 0===n?void 0:n.value)||a.params,r)),i},x=(e,t,r=!1)=>{let n=null;const i=e=>{for(const o of e){if(o.cid===t){n=o,r&&_$1.remove(e,(e=>e.cid===t));break}if(o.children&&i(o.children),o.dynamicChildren&&Array.isArray(o.dynamicChildren))for(const[,e]of Array.from(o.dynamicChildren))i(e);o.stateChildren&&i(o.stateChildren)}};return i(e),n},C=(e,t,r)=>{let n=!1;const i=e=>{for(let o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(e=>e.cid==t));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){let t=Array.from(e[o].dynamicChildren);for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}else if(e[o].dynamicChildren instanceof Array){let t=e[o].dynamicChildren;for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function S(e,t,r){const n={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}function A(e,t,r){let n=_$1.cloneDeep(t);const i={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(i[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(n,i)}catch(e){return console.error(e),n}}const O=e=>{let t=window.goFetchList;return t||(window.goFetchList={},t=window.goFetchList),t[e]?!t[e]&&void 0:(t[e]={id:e,time:(new Date).getTime()},!0)},I=e=>{let t=window.goFetchList;t&&t[e]&&delete t[e]},T="anov@2019:helloX",V="anov@2020:helloX";function F(e){let t=cryptoJs.enc.Utf8.parse(T),r=cryptoJs.enc.Utf8.parse(V);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function E(e,t){if(0===e.length)throw new Error("Array is empty.");if(!t)return e[Math.floor(Math.random()*e.length)];if(t.length!==e.length)throw new Error("Length of probabilities array must match length of array.");const r=t.reduce(((e,t)=>e+t),0),n=Math.random()*r;let i=0;for(let r=0;r<e.length;r++)if(i+=t[r],n<i)return e[r];return e[0]}const P=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n"]),j=URL.createObjectURL(P);function R(e,t,r={},n="worker"){return s(this,void 0,void 0,(function*(){try{if("window"==n){let[n,i]=[["data"],[t]];"object"==typeof r&&Object.keys(r).forEach((e=>{n.push(e),i.push(r[e])}));return{success:!0,data:new Function(...n,e)(...i)}}{let[n,i,o]=[t,r,""];"object"==typeof n&&(n=JSON.stringify(t)),"object"==typeof r&&(i=JSON.stringify(r)),Object.keys(r).forEach((e=>o+=`${e},`));let a=`let data=eval(${n}); \n             let app=${JSON.stringify({})};`;a+=o?`let {${o}} = eval(${i}); `:"",a+=`${e}`;let c=yield function(e,t=5e3){return s(this,void 0,void 0,(function*(){let r=new Worker(j);return new Promise(((n,i)=>{const o=()=>{clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=e=>{let{code:t,result:r,err:a}=e.data;o(),1===t?n(r):i(a)};r.postMessage({code:e}),r.addEventListener("message",a);let s=setTimeout((()=>{o(),i("timeout")}),t)}))}))}(a);return{success:!0,data:c}}}catch(e){return{success:!1,error:e,data:t}}}))}var $,q,M,U;!function(e){e.StaticFile="staticFile",e.DataSource="datasource"}($||($={})),function(e){e.json="application/json;charset=UTF-8",e.form="application/x-www-form-urlencoded; charset=UTF-8"}(q||(q={})),function(e){e.get="GET",e.post="POST",e.put="PUT",e.patch="PATCH",e.delete="DELETE"}(M||(M={}));class L{constructor(e){this.db=null,this.dbName=e.databaseName,this.tableName=e.tableName,this.keyPath=e.keyPath}static getInstance(e){return L.instance||(L.instance=new L(e)),L.instance}init(){return s(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,1);r.onerror=e=>{t(e.target.error)},r.onupgradeneeded=e=>{this.db=e.target.result,this.db.objectStoreNames.contains(this.tableName)||this.db.createObjectStore(this.tableName,{keyPath:this.keyPath})},r.onsuccess=t=>{this.db=t.target.result,e()}}))}))}addRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).add(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}deleteRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}updateRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}getRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);n.onsuccess=()=>{t(n.result)},n.onerror=e=>{r(e.target.error)}}))}))}getAllRecords(){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,t)=>{const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAll();r.onsuccess=()=>{e(r.result)},r.onerror=e=>{t(e.target.error)}}))}))}}L.instance=null,function(e){e[e.FATAL=0]="FATAL",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(U||(U={}));const H={databaseName:"GODB",tableName:"go-log",keyPath:"time"};class B{constructor(){this.logLevel=U.INFO,this.indexedDBInstance=L.getInstance(H);try{this.indexedDBInstance.init(),console.log("IndexedDB 初始化成功。")}catch(e){console.error("初始化 IndexedDB 时出错:",e)}}static getInstance(){return B.instance||(B.instance=new B),B.instance}setLogLevel(e){this.logLevel=e}getColor(e){switch(e){case U.FATAL:return"";case U.ERROR:return"";case U.WARN:return"";case U.INFO:return"";case U.DEBUG:return"";case U.TRACE:return"";default:return""}}log(e,t){if(t<=this.logLevel){const r=(new Date).toISOString(),n=`[${r}] [${U[t]}]`,i=this.getColor(t);if(null===window||void 0===window?void 0:window.goDev)console.log(`${i}${n} ${e}`);else{let t=v("anov-go-userInfo"),o=v("anov-go-proid"),a=` [操作人:${null==t?void 0:t.userName} 项目ID:${o}] `;const s={time:r,value:`${e}`};try{this.indexedDBInstance.addRecord(s)}catch(e){console.error("添加记录时出错:",e)}console.log(`${i}${n} ${a} ${e}`)}}}fatal(e){this.log(e,U.FATAL)}error(e){this.log(e,U.ERROR)}warn(e){this.log(e,U.WARN)}info(e){this.log(e,U.INFO)}debug(e){this.log(e,U.DEBUG)}trace(e){this.log(e,U.TRACE)}}const z=B.getInstance(),J=(e,t)=>"string"!=typeof e?Promise.reject(new Error("URL should be a string")):h(e,t),G$1=h();let _=h();function W(e,t="get",r={},n={},i){return s(this,void 0,void 0,(function*(){try{const o={method:M[t],url:e,headers:n,timeout:u};return["post","put"].includes(t.toLowerCase())?o.data=_$1.cloneDeep(r):o.params=_$1.cloneDeep(r),i&&(o.headers.sponsor=i),/.json$/.test(e)?function(e){return s(this,void 0,void 0,(function*(){try{return(yield G$1({method:"get",url:e})).data}catch(e){throw console.error("JSON 数据请求:",e),e}}))}(e):function(e){return s(this,void 0,void 0,(function*(){try{return{code:2e4,data:(yield G$1(e)).data}}catch(e){throw console.error("请求数据发生错误-Error:",e),e}}))}(o)}catch(e){throw console.error("获取数据:Error:",e),e}}))}function X(e,t,r,n,i){return s(this,void 0,void 0,(function*(){try{const o=(window.anUrl||"")+(window.agentPath||"/ds/v1/api-proxy/v1/query"),a=m(r,!0);return yield G$1({url:o,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",sponsor:i||""},data:{body:"post"===e?a:void 0,headers:f(n)?m(n,!0):n,method:e,url:t}})}catch(e){throw console.error("代理请求数据:Error1:",e),e}}))}function K(e,t,r,n,i,o){return s(this,void 0,void 0,(function*(){return i?X(t,e,r,n,o):W(e,t,r,n,o)}))}function Q(e,t="",r){var n,i,o,a;const s=`${null!==(i=null===(n=null===window||void 0===window?void 0:window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))&&void 0!==i?i:""}/ds/data-engine/v1/${e}/zb-query?token=${(null===(o=le("YZH_EXCHANGE_TOKEN"))||void 0===o?void 0:o.YZH_EXCHANGE_TOKEN)||(null===(a=null===window||void 0===window?void 0:window.yzhAuth)||void 0===a?void 0:a.getToken())}&passid=${null===window||void 0===window?void 0:window.gdPassid}${(null===window||void 0===window?void 0:window.BASE_RELEASE)?"&preview=1":""}`;let u={};try{u=t?JSON.parse(t):{}}catch(e){u=t||{}}return G$1({method:"POST",url:s,data:{headers:r,param:u},timeout:c})}const Y=(e,t)=>s(void 0,void 0,void 0,(function*(){const r=window.BaseUrl,{dateType:n="",endPeriod:i="",metricsName:o=e,startPeriod:a=""}=t;return _({method:"GET",url:`${r}ds/v1/metrics/v1/data-alarm?dateType=${n}&endPeriod=${i}&metricsName=${o}&startPeriod=${a}`,timeout:c})})),Z=(e,t,r)=>s(void 0,void 0,void 0,(function*(){var n;const i=(null===(n=window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))||"";t.newEncryption=!0;const o={staticFile:{method:"get",params:t,url:`${i}/ds/v1/file/v1/${e}/query`},datasource:{method:"post",url:`${i}/ds/v1/database/v1/${e}/query`,data:Object.assign({},t)}}[r];if(!o)throw new Error("Invalid data type provided");return G$1(Object.assign({timeout:c},o))})),ee=e=>new Promise(((t,r)=>{let n;n=e.originData&&Object.keys(e.originData).length?e.originData:e.data,void 0!==n?t({data:n}):r("Failed to retrieve cdata")})),te=(e,t,r)=>{try{switch(t){case"api":{let t=ue(e,r);return{requestType:t.requestType,url:t.url,params:t.params,headers:t.headers,agency:t.agency}}case"static":return{data:e};case"datasource":{const t=ce(e.inputSql,r);return{dsName:e.dsName,dsType:"1",sql:F(t),filter:e.sqlFilter}}case"staticFile":return{dsName:e.dsName,dsType:e.dsType,sql:""};case"indicator":return{zbId:e.zbId,params:ce(e.params,r),headers:ce(e.headers,r)};case"indicatorCQ":return{zbName:e.zbName,params:ce(e.params,r)};case"packData":return{};default:throw new Error("Invalid type")}}catch(t){console.log("准备请求数据发生错误",t,e)}},ie=(e,t,r)=>s(void 0,void 0,void 0,(function*(){try{switch(t){case"api":return yield K(e.url,e.requestType,e.params,e.headers,e.agency,r);case"static":return yield ee(e.data);case"datasource":return yield Z(e.dsName,{dsType:e.dsType,sql:e.sql,filter:e.filter},"datasource");case"staticFile":return yield Z(e.dsName,{dsType:e.dsType,sql:e.sql},"staticFile");case"indicator":return yield Q(e.zbId,e.params,e.headers);case"indicatorCQ":return yield Y(e.zbName,e.params);case"packData":return{};default:throw new Error("Invalid type")}}catch(e){return console.warn(e,"执行请求并获取数据发生错误"),yield new Promise(((e,t)=>{e({error:!0})}))}})),oe=(e,t,r,n=[],i=!1)=>s(void 0,void 0,void 0,(function*(){const o=t||e.tmpData.source.dataType,a=e.tmpData.source["indicatorCQ"==o?"indicator":o];if("globalData"===o){const e=n.find((e=>e.key===a.id||e.key===a.key)),t=v(a.id);if(t&&!i)return t.data;if(e){let t=yield re(e,r),n={key:a.id,data:t};return g(a.id,n),t}return}const s=te(a,o,r),c=yield ie(s,o,e.cid?e.cid:"");return(null==c?void 0:c.data)?c.data:c})),re=(e,t)=>s(void 0,void 0,void 0,(function*(){let r=Object.assign({},{tmpData:{source:e.value}});const n=r.tmpData.source.type,i=r.tmpData.source[n],o=te(i,n,t),a=yield ie(o,n);return yield ae(a.data,r,!0,t)})),ae=(e,t,r=!0,n)=>s(void 0,void 0,void 0,(function*(){try{const{converse:i,mapFields:o}=t.tmpData.source;return i&&i.use&&r?yield new Promise(((t,r)=>{const o=function(e,t,r,n,i){return s(this,void 0,void 0,(function*(){let r,i=e,{use:o,data:a}=_$1.cloneDeep(t);if(o)for(let e=0;e<a.length;e++)if(a[e].use){let t=a[e].dependVars,o={};n&&o&&t&&t.length&&t.map((e=>{let t=_$1.cloneDeep(n).filter((t=>{let r=t.mapField==e;return r&&(o[e]=t.value),r}));t&&0!=t.length||(o[e]="")})),r=yield R(a[e].code,i,o,a[e].mode?a[e].mode:"worker"),i=r.data}return i}))}(e,i,0,n);t(o)})):yield new Promise(((t,r)=>{t(e)}))}catch(t){return console.error("执行过滤器发生错误:"+t),yield new Promise(((t,r)=>{t(e)}))}})),ne=(e,t,r)=>{const{source:n}=e.tmpData,i=n.type;r?("static"===i&&n[i]&&(n[i].originData=r),"indicatorCQ"===i?n.indicator.data=t:n[i].data=t):"indicatorCQ"===i?n.indicator.data=t:n[i].data=t,e.source=t},se=(e,t,r=[],n,i,o)=>s(void 0,void 0,void 0,(function*(){try{let a=e.tmpData.source.type,s=yield oe(e,a,r,n,o||!1);if(null==s||!s)return i&&i({error:!0}),Promise.resolve({error:!0});let c=yield ae(s,e,t,r);return ne(e,c),i&&i(c),(null==e?void 0:e.cid)&&I(e.cid),Promise.resolve(c)}catch(e){return i&&i(e),z.error("Error in updateComData"),console.error("Error in updateComData:",e),Promise.reject(e)}})),le=e=>{const t={};if(e&&e.includes("?")){const r=e.split("?")[1].split("&");for(let e of r){const[r,n]=e.split("=").map(decodeURIComponent);t[r]=n}}return t},de=e=>{try{return(null==e?void 0:e.value)&&"string"==typeof e.value?JSON.parse(e.value):"string"==typeof e?JSON.parse(e):e}catch(t){return e}},ce=(e,t)=>{if(!t)return de(e);if("string"==typeof e){if(""===e.trim())return"";try{if("string"!=typeof JSON.parse(e))return ce(JSON.parse(e),t);{let r=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value||o.originalValue||"":e}));return de(r)}}catch(r){let n=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value:e}));return de(n)}}else{if(Array.isArray(e))return e.map((e=>ce(e,t)));if("object"==typeof e&&null!==e){const r={};for(let n in e)r[n]=ce(e[n],t);return de(r)}}return de(e)},ue=(e,t)=>{const r=e.agency,n=e,{url:i=null,headers:o,params:a,requestType:s}=n,c=i?ce(i,t):void 0,u=o&&o.use?ce(o.value,t):{};return{url:c,requestType:s,params:a?ce(a,t):{},headers:u,agency:r}},he=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){if(e&&e.length)for(const o of e)N(t,o.value,r)&&(yield se({tmpData:{source:{type:"globalData",globalData:{id:o.key}}}},!0,r,e,(e=>{console.log("数据更新成功-变量改变全局数据跟新")}),!0),w(n,(t=>{var n,a,s;"globalData"===(null===(a=null===(n=null==t?void 0:t.tmpData)||void 0===n?void 0:n.source)||void 0===a?void 0:a.type)&&(null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData).id===o.key&&se(t,!0,r,e,(e=>{i(t,e)}),!1)})))})),pe=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){e&&(yield se({tmpData:{source:{type:"globalData",globalData:{id:e.key}}}},!0,t,r,(e=>{console.log("数据更新成功-数据源编辑")}),!0),w(n,(n=>{var o,a,s;"globalData"===(null===(a=null===(o=null==n?void 0:n.tmpData)||void 0===o?void 0:o.source)||void 0===a?void 0:a.type)&&(null===(s=null==n?void 0:n.tmpData)||void 0===s?void 0:s.source.globalData).id===e.key&&se(n,!0,t,r,(e=>{i(n,e)}),!1)})))}));class me{constructor(e,t){this.isUpdating=!1,this.des=e.des,this.field=e.field,this.id=e.id,this.key=e.key,this.mapping=e.mapping,this.mapField=e.mapField,this.type=e.type,this.originalValue=e.originalValue,this.model=(null==e?void 0:e.model)?null==e?void 0:e.model:1,this.converter=e.converter,this.converterCode=e.converterCode,this.fork=e.fork,this.delayUpdate=!!(null==e?void 0:e.delayUpdate),t&&(this.globalVariables=t),e.fork&&(this.model=5,this.forkValue=e.forkValue,this.originalValue=this.getForkedValue())}get value(){if(this.fork&&(this.originalValue=this.getForkedValue()),this.converter&&this.converterCode){let e=[];return A(this.converterCode,this.originalValue,e)}return this.originalValue}togglePropertyState(e){let t=Object.prototype.hasOwnProperty.call(this,e);this[e]=!t||!e}getForkedValue(){if(this.forkValue&&Array.isArray(this.forkValue))return this.forkValue.map((e=>{const t=this.globalVariables.get(e);return t?t.value:null}));if(this.forkValue){const e=this.globalVariables.get(this.forkValue);return e?e.value:null}return null}updateValue(e,t){var r;const n=Object.assign({},this,e);this.des=n.des,this.field=n.field,this.mapping=n.mapping,this.type=n.type,this.originalValue=n.originalValue,this.converter=n.converter,this.converterCode=n.converterCode,this.fork=n.fork,this.delayUpdate=null==n?void 0:n.delayUpdate,this.model=null==n?void 0:n.model,e.id&&(this.id?"string"==typeof this.id?e.id instanceof Array?this.id=_$1.uniq([this.id,...e.id]):this.id=[this.id,e.id]:this.id instanceof Array&&(e.id instanceof Array?this.id=_$1.uniq([...this.id,...e.id]):this.id=_$1.uniq([...this.id,e.id])):this.id=e.id),e.fork&&(this.model=5,this.forkValue=null!==(r=e.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}updateWidthOriginalValue(e,t){var r;this.originalValue=e,this.fork&&(this.forkValue=null!==(r=this.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}renew(e){e&&e(this)}static create(e,t){return new me(e,t)}}class fe{constructor(){this.variables=new Map,this.globalObservers=[],this.url=window.location.search,this.list=[]}clearVars(){this.list=[],this.variables.clear()}togglePropertyState(e,t,r){try{let n=this.getVariable(e);if(!n)throw new Error("没有找到相应的变量!");n.togglePropertyState(t),this.addToObjectArray(this.list,n),r&&r()}catch(e){console.error(e)}}static getInstance(){return fe.instance||(fe.instance=new fe),fe.instance}getFullUrl(){this.url=window.location.search}getAllUrlParams(){const e=new URLSearchParams(window.location.search),t={};for(const[r,n]of e.entries())t[r]=n;return t}delVariable(e,t){this.variables.delete(e),this.list=this.list.filter((t=>t.mapField!=e)),t&&t()}addUrlParamsToGlobalVars(){this.getFullUrl();let e=this.getAllUrlParams(),t=Object.keys(e),r=[];for(const n of t)r.push({mapField:n,originalValue:e[n],model:4});if(r.length)for(const e of r)this.addVariable(e)}addVariables(e){Array.isArray(e)?e.map(((e,t)=>{this.addVariable(e)})):this.addVariable(e),this.addUrlParamsToGlobalVars()}addVariable(e,t){if(!e||!(null==e?void 0:e.mapField))return console.error(e+"参数不合法!"),!1;if(this.isVariableNameExist(e.mapField)){let r=this.getVariable(e.mapField);return this.sameValue(r,e)?r:(this.editVariable(e,t),!1)}const r=me.create(e,this.variables);return this.variables.set(r.mapField,r),this.addToObjectArray(this.list,r),t&&t(r),this.notifyGlobalObservers(r),r}toJSON(e){try{return!!e&&JSON.stringify(e)}catch(e){return!1}}sameValue(e,t){if(e.mapfield!==t.mapfield)return!1;for(const r in t)if(!(["mapfield","field","key","value","name","globalVariables"].includes(r)||r in e&&e[r]==t[r]))return!1;return!0}creatVarJson(e){const{des:t,field:r,id:n,key:i,mapping:o,mapField:a,type:s,value:c,originalValue:u,model:l,converter:d,converterCode:h,fork:f,forkValue:p,update:m,delayUpdate:g}=e,v={};return void 0!==t&&(v.des=t),void 0!==r&&(v.field=r),void 0!==n&&(v.id=n),void 0!==i&&(v.key=i),void 0!==o&&(v.mapping=o),void 0!==a&&(v.mapField=a),void 0!==s&&(v.type=s),void 0!==c&&(v.value=c),void 0!==u&&(v.originalValue=u),void 0!==l&&(v.model=l),void 0!==d&&(v.converter=d),void 0!==h&&(v.converterCode=h),void 0!==f&&(v.fork=f),void 0!==p&&(v.forkValue=p),void 0!==m&&(v.update=m),void 0!==g&&(v.delayUpdate=g),v}addToObjectArray(e,t){let r=!1;for(let n=0;n<e.length;n++)if(e[n].mapField==t.mapField){e[n]=this.creatVarJson(t),r=!0;break}r||e.push(t)}editVariable(e,t){const r=this.getVariable(e.mapField);if(r&&this.isVariableNameExist(e.mapField)&&this.sameValue(r,e))return;const n=e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),t&&t(e),e.isUpdating=!1)};r?r.updateValue(e,n):this.addVariable(e,n)}getForkList(e){return this.isMapFieldInForkValues(e)||[]}editVariableForValue(e,t,r){const n=this.getVariable(e);n&&n.updateWidthOriginalValue(t,(e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),r&&r(e),e.isUpdating=!1)}))}isMapFieldInForkValues(e){return this.getAllVariables().filter((e=>e.fork&&e.forkValue)).filter((t=>t.forkValue==e||Array.from(t.forkValue).includes(e)))}isVariableNameExist(e){return this.variables.has(e)}checkExist(e,t){if("string"==typeof e&&this.isVariableNameExist(e)){let r=this.getVariable(e);return t==r.id&&!r.id.includes(t)&&[{key:e}]}if(Array.isArray(e)){const r=e.filter((e=>{let r=this.getVariable(e);return this.isVariableNameExist(e)&&t!=r.id&&!(r.id&&r.id.includes(t))})).map((e=>({key:e})));return!!r.length&&r}return!1}getVariable(e){return this.variables.get(e)}getVariableForId(e){var t;let r=[];for(const[,n]of this.variables)(n.id===e||(null===(t=n.id)||void 0===t?void 0:t.includes(e)))&&r.push(n);return _$1.uniq(r)}getAllVariables(e=!1){return this.addUrlParamsToGlobalVars(),e?(this.list=Array.from(this.variables.values()),this.list):[...this.list]}restoreVariables(e){e.forEach((e=>{this.addVariable(e)}))}registerGlobalObserver(e){this.globalObservers.push(e)}notifyGlobalObservers(e){this.globalObservers.forEach((t=>{t.update(e)}))}}fe.instance=null;const ge=fe.getInstance(),ve=(e,t)=>Array.isArray(t)?t.some((t=>e&&(void 0!==e[t]||e.hasOwnProperty(t)))):"string"==typeof t&&e&&(void 0!==e[t]||e.hasOwnProperty(t)),ye=(e,t,r,n)=>{const i=((e,t,r,n)=>{var i;let o;if(ve(e,null==t?void 0:t.field)||ve(e,null==t?void 0:t.forkValue))o=e[null==t?void 0:t.field]||"";else if(ve(e.data,null==t?void 0:t.field)||ve(e.data,null==t?void 0:t.forkValue))o=e.data[null==t?void 0:t.field]||"";else{const e=x(r,n),a=(null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.actions)||[];for(const e of a){const r=e.vars.find((e=>(null==e?void 0:e.mapField)===(null==t?void 0:t.mapField)));if(r){o=r.value;break}}}return o})(e,t,r,n);return void 0!==i?i:t.value},be=(e,t,r,n,i,o,a,s,c)=>{var u;switch(e.type){case"link":let l=ce(e.link,o);window.open(l,e.target);break;case"page":if(null===(u=null==e?void 0:e.params)||void 0===u?void 0:u.length)for(let t=0;t<e.params.length;t++){const r=e.params[t],n=o.find((e=>e.mapField==r.mapField));n&&(r.value=n.value)}c&&c(e);break;case"dynamic":((e,t,r,n,i)=>{const o=e.dynamic||[];for(const a of o){if(e.id!==t.cid)continue;const o=x(r,a.pid);o&&(o.activeDynamic=a.name,o.isShow=a.visible||!n||e.index===t.index-1,i({cid:o.cid,flag:a.visible}))}})(e,t,r,n,i);break;case"toggle":((e,t,r,n,i)=>{const o=e.children||[];for(const r of o){const o=r.visible&&(!n||e.index===t.index-1);i({cid:r.cid,flag:o})}})(e,t,0,n,i);break;case"update":((e,t,r,n,i)=>{const o=e.children||[];for(const e of o){const o=x(t,e.cid);o&&se(o,!0,r,n,(e=>{i({cid:o.cid,data:e})}))}})(e,r,o,a,s)}},we=(e,t,r,n,i,o,a,s,c,u)=>{const{cid:l,actions:d,index:h}=i,{eventName:f,mode:p}=d,m=2===p;((e,t,r,n,i,o)=>{let a=ge.getVariableForId(t.cid);if(null==a?void 0:a.length)for(const s of a)if(s.type==e){let e=ye(t,s,r,n);ge.editVariableForValue(s.mapField,e,(()=>{let e=i[s.mapField]||[],t=ge.getForkList(s.mapField);if(t)for(const r of t){let t=i[r.mapField];e=_$1.concat(e,t)}o&&o(s,_$1.uniq(e))}))}})(f,i,n,l,r,((e,t)=>{if(he(c,e.mapFile,ge.getAllVariables(),n,((e,t)=>{a({cid:e.cid,data:t})})),null==t?void 0:t.length)for(const r of t){e.eventSourceId=r;const t=x(n,r);!(null==e?void 0:e.delayUpdate)&&t&&se(t,!0,ge.getAllVariables(),c,(e=>{a({cid:t.cid,data:e})}))}}));const g=((e,t,r,n,i)=>e.filter((e=>e.id===t&&e.eventType===r&&(!i||parseInt(e.index||"0")+1===parseInt(n||"0")))))(e,l,f,h,m);for(const e of g)be(e,i,n,m,o,ge.getAllVariables(),c,a,s)},De=(e,t={})=>{let r={},n={type:"static",converse:{use:!1,data:[]},static:{data:e},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""}};return Object.assign(r,n,t),r},ke=(e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}=((e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}=_$1.cloneDeep(t[e]);return{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}})(e,t);return{iconClass:null,isAssembly:null,source:i,cid:(Math.random().toString().substr(3,10)+Date.now()).toString(),isLock:!1,isShow:!0,tmpData:{option:r,source:De(i,s),actions:n},baseData:xe(),dynamic:null,filePath:"",origin:"anov-ui",name:"",componentType:"",viewComName:e,optionComName:"AnOptionPanel",dataComName:"AnSourcePanel",eventComName:"AnActionsPanel",assemblyDeveloper:"",devEmail:"",version:"",devDept:""}},Ne=(e,t,r)=>{let n=ke(e,t);return r?_$1.merge(n,r):n},xe=e=>{let t={left:0,top:0,width:100,height:100,angle:0,penetrate:0,opacity:100,perspective:100,rotateX:0,rotateY:0,rotateZ:0,transformOriginX:"center",transformOriginY:"center",transformSwitch:!1};return e?Object.assign(t,e):t};class Ce{constructor(e,t,r){this.theme=null,this.plant=null,this.list=[],this.titleHeqadeHeight=70,this.clearance=3,this.checkComponentIntersection=(e,t,r=10)=>{const n=e.left,i=e.left+e.width,o=e.top,a=e.top+e.height,s=t.left,c=t.left+t.width,u=t.top,l=t.top+t.height,d=n<c&&i>s&&o<l&&a>u,h=Math.abs(e.left+e.width/2-(t.left+t.width/2)),f=Math.abs(e.top+e.height/2-(t.top+t.height/2));return d||h<r&&f<r},this.calculateCombinedComponent=e=>{if(0===e.length)return{left:0,top:0,width:0,height:0};let t=e[0].left,r=e[0].top,n=e[0].left+e[0].width,i=e[0].top+e[0].height;for(let o=1;o<e.length;o++){const a=e[o];t=Math.min(t,a.left),r=Math.min(r,a.top),n=Math.max(n,a.left+a.width),i=Math.max(i,a.top+a.height)}return{left:t,top:r,width:n-t,height:i-r}},this.getAnTextNormaltText=e=>{var t,r;try{return null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.text}catch(e){return console.error("配置优化(ConfigOptimizer):",e),""}},this.initProp(e),this.upgradePlant(),this.staticComponentData=t,this.upgradeHeaderComponent(),r&&Object.assign(this,r)}isStringOrObject(e){return"string"==typeof e?"string":"object"==typeof e&&null!==e&&"object"}initProp(e){try{let t,r=this.isStringOrObject(e);if(r&&"string"===r)t=JSON.parse(e);else{if(!r||"object"!==r)throw new Error(`initProp fn error :-- 传入参数${e}不合法!`);t=e}if(t){this.originData=t;const{theme:e,plant:r,list:n}=t;this.theme=e,this.plant=r,this.list=n,this.filterFileGroup()}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradePlant(){this.plant&&(this.plant.option.bg={type:1,code:"70942ec525344c96aa32b81b2c9155f6",path:"/anov-prod/resources/page/png/bg22 科技星球背景.png",thumb:"/anov-prod/resources/page/thumbnail/1e48f8fb26ec4edfb1a0f499627e84fc.png"})}areComponentsIntersecting(e,t){let r=e.baseData,n=t.baseData;const i=Math.max(0,Math.min(r.left+r.width,n.left+n.width)-Math.max(r.left,n.left)),o=Math.max(0,Math.min(r.top+r.height,n.top+n.height)-Math.max(r.top,n.top));return i>0&&o>0}filterFileGroup(){this.list=_$1.cloneDeep(this.list).map((e=>{var t,r;if(1===(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.children[0])||void 0===r?void 0:r.children)){const t=e.children[0],{left:r,top:n}=e.baseData;return t.baseData.left=r,t.baseData.top=n,t}return e}))}getText(e,t,r){const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error("Failed to get 2D context from canvas.");return n.font=`${r}px ${t}`,n.measureText(e).width}calculateMaxWidths(e){const t=Math.min(...e.map((e=>e.width))),r=[];let n=[],i=e[0].width;for(const o of e){const e=o.width;Math.abs(e-i)<=t?n.push(e):(n.length>0&&r.push(n),n=[e]),i=e}n.length>0&&r.push(n);const o=[];for(const e of r){const t=Math.max(...e);o.push(t)}return o}findClosestValue(e,t){let r=t[0],n=Math.abs(e-r);for(const i of t){const t=Math.abs(e-i);t<n&&(n=t,r=i)}return r}adjustHeightAndTop(e,t){const r=t-e.height;return Object.assign(Object.assign({},e),{height:t,top:e.top-r/2})}findNearestComponent(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData;a.top,a.height;for(const e of o){const t=e.baseData;if(t.top,t.height,a.left<t.left+t.width&&a.left+a.width>t.left){const r=t.top-a.top;r<i&&r<100&&(i=r,n=e)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForTitlePoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestTitleForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=t.top-a.top;r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}getDistance(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}findNearestComponent2(e,t,r){let n=null,i=1/0,o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top));try{const e=o.filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData,s=a.top+a.height;for(const t of e){const e=t.baseData,r=e.top+e.height;if(a.left<e.left+e.width&&a.left+a.width>e.left){const e=r-s;e>=0&&e<i&&(i=e,n=t)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}verticalDistance(e,t){e.left,e.width;const r=e.top+e.height,n=(t.left,t.width,t.top);return Math.abs(r-n)}extractAmount(e){const t=e.match(/(\d{1,3}(?:,\d{3})*)(\D+)/);if(t){const e=t[1].replace(/,/g,"");return[parseInt(e,10),t[2].trim()]}return[!1,!1]}getAnTextNormal(){return this.list.filter((e=>"AnTextNormal"==e.viewComName))}getAnDeckTitle3(){return this.list.filter((e=>"AnDeckTitle3"==e.viewComName)).sort(((e,t)=>e.baseData.left-t.baseData.left))}judgeAnOdometer(){let e=this.getAnTextNormal().sort(((e,t)=>e.baseData.left-t.baseData.left)),t=[],r=new Set;for(const n of e){if(r.has(n.cid))continue;let i=[];for(const t of e)r.has(t.cid)||n.cid==t.cid||this.checkComponentIntersection(n.baseData,t.baseData)&&(r.add(t.cid),r.add(n.cid),i.push(t));t.push([n,...i])}let n=[];for(const e of t)for(const t of e){let r=this.getAnTextNormaltText(t);this.extractAmount(r).every((e=>e))&&n.push(e)}return n}createAnOdometer(){var e,t;let r=this.judgeAnOdometer();for(const n of r){let r,i,o,a=this.calculateCombinedComponent(n.map((e=>e.baseData)));for(const e of n){let t=this.getAnTextNormaltText(e),n=this.extractAmount(t);n.every((e=>!e))&&(r=t),n.every((e=>e))&&(i=n[0],o=n[1]),_$1.remove(this.list,(t=>t.cid==e.cid))}let s=Ne("AnIndicatorNormal",this.staticComponentData,_$1.cloneDeep({baseData:a}));(null===(t=null===(e=null==s?void 0:s.tmpData)||void 0===e?void 0:e.source)||void 0===t?void 0:t.static)&&(s.tmpData.source.static.data={text:r,num:i,unit:o},s.tmpData.source.static.originData={text:r,num:i,unit:o}),this.list.push(s)}}upgradeHeaderComponent(){for(let e=0;e<this.list.length;e++){const t=this.list[e];"AnDeckHeader3"==t.viewComName&&(t.baseData.left=0,t.baseData.top=0)}}upgradeTitleComponent(){let e=this.getAnDeckTitle3().map((e=>e.baseData)),t=this.calculateMaxWidths(e);for(let e=0;e<this.list.length;e++){const r=this.list[e];if("AnDeckTitle3"==r.viewComName){let e=this.findClosestValue(r.baseData.width,t);r.baseData.width=e>300?e:300,r.baseData=this.adjustHeightAndTop(r.baseData,this.titleHeqadeHeight)}}this.removeErroneousComponents()}containsFractionStructure(e){return/\b\d+\/\d+\b/.test(e)}removeErroneousComponents(){let e=this.getAnDeckTitle3(),t=[];for(let r=0;r<e.length;r++){const n=e[r];let i=n.tmpData.option.textNormal.text;if(this.containsFractionStructure(i))for(let r=0;r<e.length;r++){const i=e[r];n.cid!=i.cid&&this.areComponentsIntersecting(n,i)&&t.push(n.cid)}}this.list=this.list.filter((e=>!t.includes(e.cid)))}upgradeGroupComponent(){try{let e=this.getAnDeckTitle3(),t=this.list.filter((e=>"AnDeckTitle3"!=e.viewComName&&"AnDeckHeader3"!=e.viewComName&&"AnTextNormal"!=e.viewComName)),r=[],n=[];for(let i=0;i<e.length;i++){const o=e[i];let a=this.findNearestComponentForPoint(t,o,r);if(a&&a.cid&&r.push(a.cid),a){o.baseData.left=a.baseData.left;let t=this.upgradeComponentHeight(o,e,n);t&&t>=30&&(a.baseData=Object.assign({},a.baseData,{top:o.baseData.top+o.baseData.height+this.clearance}))}}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradeComponentHeight(e,t,r=[]){const n=e;let i=this.findNearestTitleForPoint(_$1.cloneDeep(t),n);return i?i.baseData.top-n.baseData.top-this.titleHeqadeHeight:1080-n.baseData.top-this.titleHeqadeHeight}getData(){return this.originData.list=this.list,this.originData.plant=this.plant,this.originData}}const Se=new class{randomNum(e,t){return Math.floor(Math.random()*(t-e+1))+e}generateRandomIntArray(e,t,r,n){const i=[];for(let n=0;n<e;n++){const e=this.randomNum(t,r);i.push(e)}return n&&"asc"===n?i.sort(((e,t)=>e-t)):n&&"desc"===n?i.sort(((e,t)=>t-e)):i}randomString(e,t){const r=this.randomNum(e,t);let n="";for(let e=0;e<r;e++){const e=Math.floor(26*Math.random());n+="abcdefghijklmnopqrstuvwxyz".charAt(e)}return n}generateRandomNameArray(e,t,r){const n=[];for(let i=0;i<e;i++){const e=this.randomString(t,r);n.push(e)}return n}pick(e,t){const r=void 0!==t?e.filter((e=>e!==t)):e;return r[Math.floor(Math.random()*r.length)]}},Ae=()=>{const e=[],t=Se.pick([!0,!1]);let r=Se.randomNum(3,20);const n=Se.pick([null,null,null,{}]);let i=Se.pick(["asc","desc",void 0,void 0,void 0]);for(let o=0;o<Se.randomNum(1,9);o++)e.push({data:Se.generateRandomIntArray(r,0,300,i),type:"line",smooth:t,symbolSize:Se.randomNum(1,10),lineStyle:{width:Se.randomNum(1,4)},areaStyle:n});return{xAxis:{type:"category",show:!1,boundaryGap:!1,data:Se.generateRandomNameArray(r,3,6)},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Oe=(e,t)=>{let r={type:e,show:!1};return"category"===e&&(r.data=Se.generateRandomNameArray(t,3,6)),r},Ie=()=>{const e=[],t=Se.pick([!0,!1]);let r=Se.randomNum(3,20);const n=Se.pick([null,null,null,{}]);let i=Se.pick(["asc","desc",void 0,void 0,void 0]),o=Se.randomNum(1,9),a=Se.pick([!0,!1]);for(let s=0;s<o;s++){let o={data:Se.generateRandomIntArray(r,0,300,i),type:"bar",smooth:t,stack:a,areaStyle:n};e.push(o)}let s=Se.pick(["value","category"]),c=Se.pick(["value","category"],s);return{xAxis:Oe(s,r),grid:{left:0,top:0,bottom:0,right:0},yAxis:Oe(c,r),series:e}},Te=()=>{const e=[];let t=Se.randomNum(3,20);Se.pick([null,null,null,{}]);let r=Se.pick(["asc","desc",void 0,void 0,void 0]),n=Se.pick([1,2]),i=[Se.pick(["10%","20%","30%","40%","50%","60%","70%","80%"]),Se.pick(["90%","100%"])];return e.push({data:Se.generateRandomIntArray(t,3,20,r),type:"pie",radius:1==n?"100%":i,roseType:1==n?Se.pick(["area",null,null]):null,padAngle:1==n?0:Se.randomNum(1,5),startAngle:1==n?Se.pick([0,180]):0,endAngle:360,label:{show:!1},itemStyle:{borderRadius:3}}),{grid:{left:0,top:0,bottom:0,right:0},series:e}},Ve=()=>{const e=[];Se.pick([!0,!1]),Se.randomNum(3,20),Se.pick([null,null,null,{}]),Se.pick(["asc","desc",void 0,void 0,void 0]);for(let t=0;t<Se.randomNum(1,20);t++){let t=Se.randomNum(3,Se.randomNum(3,20)),r=[];for(let e=0;e<t;e++){let e=[];for(let t=0;t<2;t++)e.push(Se.randomNum(1,30));r.push(e)}e.push({type:"scatter",symbolSize:Se.randomNum(3,30),data:r})}return{xAxis:{show:!1},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Fe=()=>{const e=[],t=Se.pick(["polygon","circle"]);let r=Se.randomNum(1e4,99999),n=Se.randomNum(3,10),i=[];for(let e=0;e<n;e++)i.push({name:Se.randomString(4,8),max:r});for(let t=0;t<Se.randomNum(2,10);t++)e.push({value:Se.generateRandomIntArray(n,1e4,r),name:Se.randomString(4,8)});return{radar:{shape:t,indicator:i,axisName:{show:!1},radius:"100%"},grid:{left:0,top:0,bottom:0,right:0},series:[{type:"radar",symbol:"none",lineStyle:{width:1},data:e}]}},Ee=()=>{const e=[];for(let t=0;t<Se.randomNum(4,15);t++)e.push({value:Se.randomNum(1,100),name:Se.randomString(4,8)});return{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"funnel",left:"0%",top:0,bottom:0,width:"100%",min:0,minSize:"0%",maxSize:"100%",label:{show:!1,position:"inside"},sort:Se.pick(["descending","ascending"]),gap:2,lineStyle:{width:1},data:e}]}};let Pe=Se.randomNum(5,20);const je={width:Pe};Se.pick([!0,!1])&&(je.color=[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]);class Re{constructor(){this.names=["line","bar","pie","scatter","radar","funnel","gauge"]}static getInstance(){return Re.instance||(Re.instance=new Re),Re.instance}createLine(){switch(Se.pick(this.names)){case"line":return{type:"line",typeNum:1,option:Ae()};case"bar":return{type:"bar",typeNum:2,option:Ie()};case"pie":return{type:"pie",typeNum:3,option:Te()};case"scatter":return{type:"scatter",typeNum:4,option:Ve()};case"radar":return{type:"radar",typeNum:5,option:Fe()};case"funnel":return{type:"funnel",typeNum:6,option:Ee()};case"gauge":return{type:"gauge",typeNum:7,option:{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"gauge",radius:"100%",detail:{formatter:"{value}"},progress:{show:Se.pick([!0,!1]),width:Pe},axisLine:{lineStyle:je},data:[{value:Se.randomNum(1,100),name:"SCORE"}]}]}}}}}Re.instance=null;const $e=Re.getInstance(),qe=new class{constructor(){this.directions=["row","row"],this.direction="column",this.splitNumbers=24,this.margin=[0,0]}baseLayout(e){const t=(null==e?void 0:e.maRrows)?null==e?void 0:e.maRrows:this.splitNumbers,r=(null==e?void 0:e.colNum)?null==e?void 0:e.colNum:this.splitNumbers,n=e.wrapWidth/r,i=e.wrapHeight/t;let o=E(this.directions);o&&(this.direction=o);let a=[];if("row"===this.direction){let e=E([3,4]);a=this.simulateRandomSegments(24,4,12,e)}else{let e=E([2,3]);a=this.simulateRandomSegments(24,4,6,e)}let s=[],c=[];if("row"===this.direction){for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i});else{let t=s[e-1].x;s.push({x:a[e-1]+t,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i})}let e=E([2,3]),t=this.simulateRandomSegments(24,6,12,e);for(let e=0;e<s.length;e++){const r=s[e];for(let o=0;o<t.length;o++){const a=t[o];c.push({x:r.x,y:a,w:r.w,h:a,i:10*e+o,wStep:n,hStep:i})}}}else{for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:24,h:a[e],i:e,wStep:n,hStep:i});else{let t=s[e-1].y;s.push({x:0,y:a[e-1]+t,w:24,h:a[e],i:e,wStep:n,hStep:i})}for(let e=0;e<s.length;e++){const t=s[e];let r=E([1,2,3,4]),o=this.simulateRandomSegments(24,5,12,r),a=[];for(let r=0;r<o.length;r++){const s=o[r];if(0==r)a.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),c.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i});else{let u=a[r-1].x;a.push({x:o[r-1]+u,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),c.push({x:o[r-1]+u,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i})}}}}return{layouts:c.map((t=>{let{option:r,typeNum:n}=$e.createLine(),i=t.x*t.wStep+t.w*t.wStep/2,o=t.y*t.hStep+t.h*t.hStep/2,a=t.w*t.wStep,s=t.h*t.hStep;if(3==n||5==n||7==n){let e=Math.min(a,s);a=e,s=e}let c=e.wrapWidth,u=e.wrapHeight;return t.chartsOption=r,t.typeNum=n,t.txt=n+" "+i/c+" "+o/u+" "+a/c+" "+s/u,console.log(t.txt),t})),option:{colNum:r,margin:(null==e?void 0:e.margin)?null==e?void 0:e.margin:this.margin,isDraggable:!!(null==e?void 0:e.isDraggable)&&(null==e?void 0:e.isDraggable),isResizable:!!(null==e?void 0:e.isResizable)&&(null==e?void 0:e.isResizable),verticalCompact:!(null==e?void 0:e.verticalCompact)||(null==e?void 0:e.verticalCompact),useCssTransforms:!(null==e?void 0:e.useCssTransforms)||(null==e?void 0:e.useCssTransforms),rowHeight:e.wrapHeight/t,maRrows:t}}}simulateRandomSegments(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1===a)i.push(o),a--;else{const e=Math.min(r,o-t*(a-1)),n=Math.floor(Math.random()*(e-t+1))+t;i.push(n),o-=n,a--}return i}simulateRandomSegments2(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1==a){const t=e-i.reduce(((e,t)=>e+t),0);i.push(t),a--}else{let e=Math.floor(Math.random()*r),n=Math.max(t,e),s=o-t*a;const c=Math.min(n,s);i.push(c),o-=c,a--}return i}},Me=src.pool(),Ue=e=>{try{return JSON.parse(e)}catch(t){return e}},Le=new class{constructor(){this.requested=new Set,this.db=new Dexie$1("go-db"),this.init()}init(){return s(this,void 0,void 0,(function*(){this.db.version(1).stores({store:"key, value"})}))}pushCaseIdToRequested(e){this.requested.add(e)}add(e,t){return s(this,void 0,void 0,(function*(){try{(yield this.isExist(e))||(t.caseDetailData&&(t.caseDetailData="string"==typeof t.caseDetailData?Ue(t.caseDetailData):t.caseDetailData),this.pushCaseIdToRequested(e),yield this.db.table("store").add({key:e,value:t}))}catch(e){console.error(e)}}))}bulkPut(e){return s(this,void 0,void 0,(function*(){let t=yield Promise.all(e.map((e=>s(this,void 0,void 0,(function*(){const{caseId:t,id:r}=e,n=`${t}_${r}`;if(yield this.isExist(n))return null;if(e.caseDetailData){const t=yield Me.exec(Ue,[e.caseDetailData]);e.caseDetailData=t,Me.terminate()}return e})))));t=t.filter((e=>null!==e));const r=t.map((e=>{const{caseId:t,id:r}=e,n=`${t}_${r}`;return this.pushCaseIdToRequested(n),{key:n,value:e}}));this.db.table("store").bulkPut(r).then((()=>{})).catch((e=>console.error(e)))}))}get(e){return s(this,void 0,void 0,(function*(){if(!(yield this.isExist(e)))return null;const t=yield this.db.table("store").where("key").equals(e).first();return t?t.value:null}))}getAllData(){return s(this,void 0,void 0,(function*(){return yield this.db.table("store").toArray()}))}update(e,t){return s(this,void 0,void 0,(function*(){if(yield this.isExist(e)){const r=yield this.get(e),n=yield Me.exec(Ue,[t]);Me.terminate(),yield this.db.table("store").update(e,{value:Object.assign(Object.assign({},r),{caseDetailData:n})})}else console.error("update indexdb error")}))}delete(e){this.requested.delete(e),this.db.table("store").delete(e)}isExist(e){return s(this,void 0,void 0,(function*(){return(yield this.db.table("store").where("key").equals(e).count())>0}))}reset(){this.requested.clear(),this.db.table("store").clear()}clear(){return s(this,void 0,void 0,(function*(){yield this.db.table("store").clear()}))}isExistStore(){return s(this,void 0,void 0,(function*(){try{return yield this.db.open(),!0}catch(e){return!1}}))}},He=function(e){return s(this,void 0,void 0,(function*(){try{let{fontUrl:t,fontName:r}=e;const n="__custom_font__";let i=document.getElementById(n);if(!i){i=document.createElement("style"),i.id=n;const e=document.head||document.getElementsByTagName("head")[0];yield e.appendChild(i)}i.innerText+=`@font-face{font-family:'${r}';src:url(${t});}`}catch(e){console.warn(e)}}))},Be=(e,t="jspaths",r)=>s(void 0,void 0,void 0,(function*(){const n="csspaths"===t?"link":"script",i=document.createElement(n);"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),yield new Promise(((e,t)=>{i.addEventListener("load",e),i.addEventListener("error",e)}))})),ze=(e,t="jspaths")=>s(void 0,void 0,void 0,(function*(){const r="fonts"===t?He:Be;yield Promise.all(e.map((e=>r(e))))}));function Je(e){!function(e,t){e.depends?optionTheme_js.setOptionColorByTheme(e):Ge(e,!1)}(e)}function Ge(e,t=!0){let{theme:r,option:n,optionDes:i}=e;n&&i&&r&&Object.keys(i).forEach((o=>{"conditionSeries"!==i[o].type&&"tabs"!==i[o].type||!n[o]?i[o].theme?n.hasOwnProperty(o)&&function({theme:e,option:t,optionDes:r},n,i){let o;if("color"!=r[n].type||!i&&t[n]){if("bgcolor"==r[n].type&&(i||!t[n]||!t[n].style)){t[n]||(t[n]={});let{key:i,points:a,degree:s,type:c,opacity:u}=r[n].theme;if(a){s||(s=90),c||(c="linear");let r=`${c}-gradient(${s}deg`,i=100/(a.length-1),l=[];a.forEach(((t,n)=>{o=_e(e,t),r+=`,${We(o,t.opacity)} ${i*n}%`;let{red:a,green:s,blue:c,alpha:d}=Xe(o,u);l.push({red:a,green:s,blue:c,alpha:d,left:i*n})})),r+=")",t[n].style=r,t[n].degree=s,t[n].flag=a.length?3:2,t[n].points=l,t[n].type=c}else i&&(o=_e(e,r[n].theme),t[n]=Object.assign(Object.assign({},Xe(o,u)),{style:We(o,u)}))}}else{let{opacity:i}=r[n].theme;o=_e(e,r[n].theme),t[n]=We(o,i)}}(e,o,t):i[o].hasOwnProperty("type")&&"slot"!=i[o].type&&"textStyle"!=i[o].type&&"sheet"!=i[o].type||i[o].constructor!=Object||Ge({option:n[o],optionDes:i[o],theme:r},t):function(e,t,r,n,i,o){let a=t.form,s=e;if(Array.isArray(a))for(let e=0;e<a.length;e++){let t,r=a[e];t=o?s[e].form:s[e],Ge({option:t,optionDes:r,theme:n},i)}else{let e=s.length;for(let t=0;t<e;t++){let e;e=o?s[t].form:s[t],Ge({option:e,optionDes:a,theme:n},i)}}}(n[o],i[o],0,r,t,"conditionSeries"===i[o].type)}))}function _e(e,t){return e[t.key]?e[t.key]||e.color:t.key.indexOf(".")>-1?[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(Ke(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color))):(Ke(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color)}function We(e,t){let{red:r,green:n,blue:i,alpha:o}=Xe(e,t);return`rgba(${r},${n},${i},${o})`}function Xe(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function Ke(e){console.warn(e)}class Qe{constructor(e){this.processedIds=new Set,this.validateAccessResolve=null,e?(e.caseId&&(this.caseId=e.caseId),e.pageId&&(this.pageId=e.pageId),e.mode&&(this.mode=e.mode),e.environment&&(this.environment=e.environment),e.xhr&&(this.xhr=e.xhr),e.staticComponentData&&(this.staticComponentData=e.staticComponentData),e.theme&&(this.theme=e.theme)):console.log("初始化错误!"),this.defaultTheme={name:"科技蓝",color:"#006aee",background:"#00000033",pageBackground:"#051836",text:"#F0F0F0",groups:["#006aee","#00eae9","#00a9ec","#00ec80","#edc700","#9913ee"]}}checkHardware(){return s(this,void 0,void 0,(function*(){return yield new Promise(((e,t)=>{e("Hardware is not available")}))}))}checkSecurity(e){return s(this,void 0,void 0,(function*(){return yield new Promise(((t,r)=>{"preview"==this.environment?t(0):this.getShareForRelease(e).then((e=>{2e4==e.code&&e.data?(e.data,e.data.loginLimitSwitch?t(1):e.data.hasAuth?t(2):t(3)):t(4)}))}))}))}validateAccess(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{this.validateAccessResolve=r,t&&t(e)}))}))}initBefore(){return new Promise(((e,t)=>{let r=p("secretFree");r?sessionStorage.setItem("secret-free",r):sessionStorage.setItem("secret-free",null),console.log("运行免登录设置完成!"),e(!0)}))}fetchCaseId(e,t){return s(this,void 0,void 0,(function*(){try{const r=yield this.getKey(e,t);return 2e4===(null==r?void 0:r.code)&&(null==r?void 0:r.data)?r.data:e}catch(t){return console.error("Error fetching caseId:",t),e}}))}getDataForrelease(){return new Promise(((e,t)=>{e("data")}))}onProjectLoaded(e){try{if(e)return void e(this.caseData)}catch(e){return console.error(e),caseData}return caseData}authenticate(){return s(this,void 0,void 0,(function*(){this.environment}))}getShareForRelease(e){return this.xhr.get(`/go/v1/go-share/v1/${e}/config`)}findById(e,t="",r=0,n=""){return"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}?pwd=${t}&mode=${r}&token=${n}`):this.xhr.get(`/go/v1/go-cases/v1/${e}?mode=${r}&token=${n}`)}getKey(e,t=0){return this.xhr.get(`/go/v1/go-cases/v1/key/${e}?caseMode=${t}`)}getPageData(e,t){return s(this,void 0,void 0,(function*(){const r=yield Le.get(e+"_"+t);return r?{data:r}:"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}/pages/${t}`):this.xhr.get(`/go/v1/go-cases/v1/${e}/pages/${t}`)}))}getPageId(e,t){if(null==t?void 0:t.length){if(t.find((t=>t.id==e)))return e;let r=t.find((t=>t.caseDetailPath==e||t.caseDetailName==e));return r?r.id:e}return e}fetchProjectForId(e,t="",r=0,n=""){return s(this,void 0,void 0,(function*(){return yield this.findById(e,t,r,n)}))}updataPageData(e,t){return s(this,void 0,void 0,(function*(){let r=yield this.getPageDataForID(e,t);(null==r?void 0:r.data)?this.lifecycleHooks.onPageDataReady(r.data.caseDetailData):console.error("请求数据发生错误!")}))}getPageDataForID(e,t,r){return s(this,void 0,void 0,(function*(){const n=this.getPageId(t,this.projectInfo.details);if(this.processedIds.has(n)){console.log(`ID ${n} has already been processed.`);const t=yield Le.get(e+"_"+n);if(t)return{data:t}}const i=this.getPageData(e,n);this.processedIds.add(n),r&&r.length&&r.map((t=>s(this,void 0,void 0,(function*(){try{if(this.processedIds.has(t))return void console.log(`ID ${n} has already been processed.`);const r=yield this.getPageData(e,t);Le.add(e+"_"+t,r.data),this.processedIds.add(t)}catch(e){console.error(`Error processing ID ${t}: ${e}`)}}))));const o=yield i;return Le.add(e+"_"+n,o.data),yield i}))}fetchPageDataForId(e,t="",r=0,n=""){return s(this,void 0,void 0,(function*(){return yield this.findById(e,t,r,n)}))}setTheme(){console.log("设置主题")}setBackground(){console.log("设置背景信息")}updateVariables(){console.log("更新变量信息")}beforeRender(e){}renderComponents(){return s(this,void 0,void 0,(function*(){}))}setGlobalThemeVars(e){document.body.style.cssText=`\n --theme-background: ${e.background};\n --theme-color: ${e.color};\n --theme-pageBackground: ${e.pageBackground};\n --theme-text: ${e.text};\n ${e.groups.map(((e,t)=>`--theme-groups-${t}: ${e};`)).join("\n")}\n `}listenForRenderCompletion(){}showAnimation(){console.log("所有组件渲染完成,显示动画。")}setComTheme(e,t){var r,n;let i=null===(r=this.staticComponentData[t.viewComName])||void 0===r?void 0:r.optionDes,o=null===(n=this.staticComponentData[t.viewComName])||void 0===n?void 0:n.theme;return Je({theme:e,option:t.tmpData.option,optionDes:i,depends:o}),t}getComData(e,t,r,n){return s(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(e.tmpData&&e.tmpData.source){this.setComTheme(n,e);try{se(e,!0,t,r).then((t=>{t&&(e.source=t)})),i(1)}catch(e){i(e)}}else i("")}))}))}pageInit(e){var t;return s(this,void 0,void 0,(function*(){try{let r=null==e?void 0:e.caseDetailData,n=this.defaultTheme;if((null==r?void 0:r.theme)&&(n=r.theme),this.setGlobalThemeVars(n),r.resource){let e=(null===(t=null===window||void 0===window?void 0:window.anovuiConfig)||void 0===t?void 0:t.fonts)||[],n=_$1.concat(r.resource.fonts,e),i=_$1.cloneDeep(r.resource);i.fonts=n,yield(({jspaths:e=[],csspaths:t=[],fonts:r=[]})=>s(void 0,void 0,void 0,(function*(){const n=_$1.uniqBy(r,"fontName");yield Promise.all([ze(e,"jspaths"),ze(t,"csspaths"),ze(n,"fonts")])})))(i)}ge.clearVars(),ge.addVariables(r.globalVars);let i=ge.getAllVariables();return w(r.list,(e=>s(this,void 0,void 0,(function*(){yield this.getComData(e,i,r.globalSource,n)})))),r}catch(t){return console.warn("页面初始化发生错误:",t),(null==e?void 0:e.data)?e.data:e}}))}validate(e,t,r){return s(this,void 0,void 0,(function*(){return new Promise(((n,i)=>{const o=(e,r)=>s(this,void 0,void 0,(function*(){let i=yield this.validateAccess(e,r),a=(null==i?void 0:i.pwd)?i.pwd:"",s=(null==i?void 0:i.mode)?i.mode:0,c=(null==i?void 0:i.token)?i.token:"",u=yield this.fetchProjectForId(t,a,s,c);2e4==(null==u?void 0:u.code)&&(null==u?void 0:u.data)?(this.projectInfo=u.data,console.log("验证成功!"),this.lifecycleHooks.message("验证成功!"),n(!0)):(this.lifecycleHooks.validateError(u),this.lifecycleHooks.message(u.msg,"warning"),o(e,r))}));o(e,r)}))}))}init(e){var t;return s(this,void 0,void 0,(function*(){try{this.lifecycleHooks=e,yield this.checkHardware();let r=yield this.fetchCaseId(this.caseId,this.mode),n=yield this.checkSecurity(r);(yield this.validate(n,r,e.onValidateAccess))&&e.onCaseReady(this.projectInfo);let i=(null===(t=this.projectInfo)||void 0===t?void 0:t.details).map((e=>e.id)),o=this.getPageId(this.pageId,this.projectInfo.details);console.log(o,this.pageId,"this.pageId");let a=yield this.getPageDataForID(r,o||i[0],i);const s=yield this.pageInit(a.data);return e.onPageDataReady(s),{currentData:this.projectInfo,currentPageData:s}}catch(e){console.error("加载页面时出错:",e)}}))}}var index$3=Object.freeze({__proto__:null,ConfigOptimizer:Ce,GlobalVariables:fe,Http:J,Log:z,PageLoader:Qe,agentData:X,delFetchStatus:I,displayGenerator:qe,editItem:ne,emitEvent:we,fetchDataByGlobal:re,fetchDataByType:oe,filterData:ae,findItemDeep:x,findItemDeep2:C,getData:W,getDataForApi:K,getDataForSource:Z,getDataForStatic:ee,getDataForZb:Q,getDataForZbCQ:Y,getSessionData:v,getStandardData:m,getStringVars:D,getUrlParams:p,getVarDefaultVal:ye,globalVars:ge,hasVar:N,isJSON:f,recursion:w,replaceVariable:ce,safeEval:S,safeEvalForCode:A,setFetchStatus:O,setSessionData:g,updataGlobalDataSourceForVar:he,updateComData:se,updateGlobalDataSource:pe}),getInteractive=function(e,t,r,n,i){var o;try{var a={},s=[],c=[],u=[],l=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var c=0,u=s;c<u.length;c++){var l=u[c],d=l.value;(null==d?void 0:d.length)&&(l.value=l.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(l,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:c,eventsComs:u,filter:i})}})),ge.addVariables(s),s=ge.getAllVariables(),recursion(l,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),{shareVariableTree:a,globalVars:ge.getAllVariables(),globalEvents:c.filter((function(e){return e})),eventsComs:u}}catch(e){return console.error("error",e),{}}},getInteractive2=function(e,t,r,n,i){var o;try{var a={},s=[],c=[],u=[],l=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var c=0,u=s;c<u.length;c++){var l=u[c],d=l.value;(null==d?void 0:d.length)&&(l.value=l.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(l,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:c,eventsComs:u})}})),t&&t.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),t,!0)),r&&r.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),r,!0)),n&&n.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),n,!0)),recursion(l,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),s.filter((function(e){if(e.fork){var t=s.find((function(t){return t.mapField==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(t.mapField)}));(i?i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i):!!t)&&(Array.isArray(e.forkValue)?e.originalValue=e.forkValue.map((function(e){var t=s.find((function(t){return t.mapField==e}));if(t)return t.value})):e.originalValue=t.value)}})),{shareVariableTree:a,globalVars:s.filter((function(e){return i?(i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i))&&(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue):(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue),e})),globalEvents:c.filter((function(e){return e})),eventsComs:u}}catch(e){return console.error("error",e),{}}},checkVar=function(e,t){var r,n,i,o=!1,a=e.type,s=e.converse,c=e[a];if((null==s?void 0:s.use)&&(null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.length))for(var u=0,l=s.data;u<l.length;u++){if((null==(v=l[u])?void 0:v.use)&&v.dependVars.includes(t)){o=!0;break}}if(o)return o;var d="",h="",f="";"api"==a&&(d=c.url,(null===(n=c.headers)||void 0===n?void 0:n.use)&&(h=c.headers.value),f=c.params),"datasource"==a&&(d=c.inputSql),"indicator"==a&&((null===(i=c.headers)||void 0===i?void 0:i.use)&&(h=c.headers.value),f=c.params);for(var p=/({{[\w]*}})|((@)[\w]*)/gm,m=0,g=[d,h,f];m<g.length;m++){var v,y=(v=g[m]).match(p);if((null==y?void 0:y.length)&&y.find((function(e){return e=="{{".concat(t,"}}")||e=="@".concat(t)}))){o=!0;break}}return o},executeFilter=function(e){return e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue,e},getShareTree=function(e,t){try{var r={},n=[],i=[];return recursion(e,(function(e){var o,a,s,c=null===(o=null==e?void 0:e.tmpData)||void 0===o?void 0:o.source;if(getShareVariableTree(c,t,e,r),null===(s=null===(a=null==e?void 0:e.tmpData)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length){var u=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:u,element:e,actions:n,events:i})}})),r}catch(e){return console.error(e),{}}},hasVar=function(e,t,r){var n,i,o,a,s=t[null==t?void 0:t.type],c=null==t?void 0:t.converse,u=!1;if(c&&c.use&&c.data.length)for(var l=0,d=c.data;l<d.length;l++){var h=d[l];if((null==h?void 0:h.dependVars)&&(null===(n=null==h?void 0:h.dependVars)||void 0===n?void 0:n.length)&&(null==h?void 0:h.dependVars.includes(e)))return u=!0}return(null==s?void 0:s.inputSql)&&(u=getStringVars(null==s?void 0:s.inputSql,r)),(null==s?void 0:s.url)&&(u=getStringVars(s.url,r)),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&(u=getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,r)),(null==s?void 0:s.params)&&(u=getStringVars(null==s?void 0:s.params,r)),u},getShareVariableTree=function(e,t,r,n){var i,o,a;if(e){var s=e[null==e?void 0:e.type],c=null==e?void 0:e.converse;c&&c.use&&c.data.length&&c.data.map((function(e){var t;(null==e?void 0:e.dependVars)&&(null===(t=null==e?void 0:e.dependVars)||void 0===t?void 0:t.length)&&e.dependVars.map((function(e){setShareVariableTreeData(n,e,r.cid)}))})),(null==s?void 0:s.inputSql)&&getStringVars(null==s?void 0:s.inputSql,t,r,n),(null==s?void 0:s.url)&&getStringVars(s.url,t,r,n),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,t,r,n),(null==s?void 0:s.params)&&getStringVars(null==s?void 0:s.params,t,r,n)}},getStringVars=function(e,t,r,n){"string"!=typeof e&&(e=JSON.stringify(e));var i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){var o=i.map((function(e){return e.replace(/{{|}}|@/gm,"")}));if(r)for(var a=function(e){var i=o[e];if(!i||!t||t.findIndex((function(e){return e.mapField===i}))<0)return"continue";r&&n&&setShareVariableTreeData(n,i,r.cid)},s=0;s<o.length;s++)a(s);else{var c=function(e){var i=o[e];return!i||!t||t.findIndex((function(e){return e.mapField===i}))<0?"continue":(r&&n&&setShareVariableTreeData(n,i,r.cid),{value:!0})};for(s=0;s<o.length;s++){var u=c(s);if("object"==typeof u)return u.value}}}return!1},setShareVariableTreeData=function(e,t,r){if(e[t]&&_$1.isArray(e[t])){e[t].push(r);var n=e[t];e[t]=_$1.uniq(n)}else e[t]=[],e[t].push(r)},isJSON=function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1};function getStandardData(e,t){return void 0===t&&(t=!1),t?isJSON(e)?e:JSON.stringify(e):isJSON(e)?JSON.parse(e):e}var rightMenuMutaitons={delListItem:function(e,t){var r=_$1.cloneDeep(e.list);"string"==typeof t?findItemDeep$1(r,t,!0):t.forEach((function(e){findItemDeep$1(r,e,!0)})),e.list=r,e.globalVars=getInteractive(e.list,e.globalConstant,e.sysConst).globalVars},editCloneCache:function(e,t){var r=_$1.cloneDeep(e.cloneCache);r.length&&r.map((function(e){e.baseData=Object.assign({},e.baseData,t)})),e.cloneCache=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var t=function(t){var r=findItemDeep$1(e.list,e.selectd[t]);if("boolean"!=typeof r){var n=_$1.cloneDeep(r);if(n.pid="",(null==n?void 0:n.stateChildren)||(null==n?void 0:n.children))((null==n?void 0:n.stateChildren)?null==n?void 0:n.stateChildren:null==n?void 0:n.children).forEach((function(e){var t,r,i,o,a=e.cid;if(e.cid=genID(),e.pid=n.cid,(null==n?void 0:n.stateChildren)&&(null===(r=null===(t=null==n?void 0:n.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children)){var s=null===(o=null===(i=null==n?void 0:n.tmpData)||void 0===i?void 0:i.option)||void 0===o?void 0:o.children.find((function(e){return e.cid==a}));s&&(s.cid=e.cid)}}));e.cloneCache.push(n),window.localStorage.setItem("cloneCache",JSON.stringify(e.cloneCache))}},r=0;r<e.selectd.length;r++)t(r)}},shearItem:function(e,t){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var n=findItemDeep$1(e.list,e.selectd[r],!0);if("boolean"!=typeof n){var i=_$1.cloneDeep(n);e.cloneCache.push(i)}}e.selectd=[]}},pasteItem:function(e){var t,r;try{var n=(null===(r=_$1.cloneDeep(e.cloneCache))||void 0===r?void 0:r.length)?_$1.cloneDeep(e.cloneCache):JSON.parse(window.localStorage.getItem("cloneCache"));if(n.length>0){var i=[],o={};recursion(n,(function(e){var t=genID();if(o[e.cid]=t,e.cid=t,e&&e.children)for(var r=0,n=e.children;r<n.length;r++){n[r].pid=e.cid}else if(e.stateChildren)for(var a=0,s=e.stateChildren;a<s.length;a++){s[a].pid=e.cid}if("dynamicComponent"==e.componentType){var c=void 0;e.dynamicChildren instanceof Map?c=e.dynamicChildren.get(e.activeDynamic):e.dynamicChildren instanceof Array&&(c=e.dynamicChildren.find((function(t){return t[0]==e.activeDynamic}))),c.length>1&&(Array.isArray(c[1])?c[1].forEach((function(t){t.pid=e.cid})):c.forEach((function(t){t.pid=e.cid}))),1==c.length&&c.forEach((function(t){t.pid=e.cid}))}i.push(e.cid)})),e.selectd.length>0?selectdArea(e.selectd,e.list):getPosition(n),n.forEach((function(e){var t,r,n,i;if(e.baseData.top=e.baseData.top+20,e.baseData.left=e.baseData.left+20,e&&e.hasOwnProperty("stateChildren")&&(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children))for(var o=function(t){t.pid=e.cid;var r=null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.option)||void 0===i?void 0:i.children.find((function(e){return e.disName==t.name}));r&&(r.cid=t.cid)},a=0,s=e.stateChildren;a<s.length;a++){o(s[a])}}));try{var a=Object.keys(o),s=JSON.stringify(n);(null==a?void 0:a.length)&&a.forEach((function(e){var t=o[e];-1!==s.indexOf(e)&&(s=s.replaceAll(null==e?void 0:e.toString(),null==t?void 0:t.toString()))})),n=JSON.parse(s)}catch(e){}(t=e.list).unshift.apply(t,_$1.cloneDeep(n)),e.selectd=i}}catch(e){console.warn(e)}},updataShow:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isShow;updataAttribute(r,"isShow",n,"")}},changeShow:function(e,t){var r=t.cid,n=t.flag,i=findItemDeep$1(e.list,r);i&&updataAttribute(i,"isShow",n,"")},comToggle:function(e,t){var r=findItemDeep$1(e.list,t);r&&comToggle(r)},updataLock:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isLock;updataAttribute(r,"isLock",n,"")}},breakUp:function(e,t){var r,n;try{if(!t)throw"Please pass in the component CID correctly!";var i=findParentDeep(e.list,t),o=findItemDeep$1(e.list,t),a=o.baseData;if(isNaN(a.left)||isNaN(a.top))throw new Error("top or left is NAN");var s=breakUp(o,e.list);if(s.map((function(e){return e.pid=""})),i){var c=i.children.findIndex((function(e){return e.cid==t}));i.children.splice(c,1),(r=i.children).push.apply(r,s.reverse())}else{c=e.list.findIndex((function(e){return e.cid==t}));e.list.splice(c,1),(n=e.list).push.apply(n,s.reverse())}}catch(e){console.error(e)}},editGroup:function(e,t){var r,n=t.groupId;t.status;try{if(!n)throw"Please pass in the component CID correctly!";var i=e.list.findIndex((function(e){return e.cid===n})),o=e.list[i],a=breakUp(o);a.map((function(e){return e.pid=""})),e.list.splice(i,1),(r=e.list).push.apply(r,a)}catch(e){console.error(e)}},combination:function(e){_$1.cloneDeep(e.list);var t,r,n=[],i=[],o=genID(),a=findItemDeep$1(e.list,e.selectd[0]);a.pid?console.info("Sorry, only level 2 is supported group"):a.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var r=e.list.findIndex((function(e){return e.cid===t}));if(r>-1){n.push(r);var a=e.list.splice(r,1)[0];a.pid=o,i.push(a)}})),t=n.sort((function(e,t){return e-t}))[0],r=1===i.length?_$1.cloneDeep(i[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),setPositionForGroup(r,i),e.list.splice(t,0,{cid:o,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",origin:"anov-ui",tmpData:{actions:null,option:null,source:globalSourceTemp},children:i}),setIndex(e.list),e.selectd=[o])},moveUp:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>=1?arraySwap(e.list,r-1,r):arraySwapDeep(e.list,"up",t)}catch(e){console.error(e)}},moveDown:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&r<=e.list.length-2?arraySwap(e.list,r+1,r):arraySwapDeep(e.list,"down",t)}catch(e){console.error(e)}},moveTop:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&0!==r?arraySwap(e.list,0,r):arraySwapDeep(e.list,"top",t)}catch(e){console.error(e)}},moveBottom:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t})),n=e.list.length-1;r>-1&&r!==n?arraySwap(e.list,n,r):arraySwapDeep(e.list,"bottom",t)}catch(e){console.error(e)}}};function setComActions(e){var t=[],r=[];recursion(_$1.cloneDeep(e),(function(e){var n,i;if(null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions)||void 0===i?void 0:i.length){var o=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:o,element:e,actions:t,events:r})}}));var n=r.filter((function(e){return e}));return{actions:t,events:n}}var eventMutations={addGlobalSource:function(e,t){var r=t.name,n=t.value,i=genID();e.globalSource.push({key:i,name:r,value:n}),pe({key:i,name:r,value:n},e.globalVars,e.globalSource,e.list,(function(e){}))},editGlobalSource:function(e,t){var r=this,n=t.key,i=t.value,o=e.globalSource.find((function(e){return e.key==n}));o&&(o.name=t.name,o.value=i,pe(o,e.globalVars,e.globalSource,e.list,(function(e,t){r.commit("GoCom/updataSourceForComponent",{cid:e.cid,data:t})})))},delGlobalSource:function(e,t){try{var r=e.globalSource.findIndex((function(e){return e.key===t}));-1!==r&&e.globalSource.splice(r,1)}catch(e){console.error("删除错误",e)}},setSyncFlag:function(e,t){e.syncFlag=t},goUpShareVar:function(e,t){e.shareVariable[t.key]=__assign$1({},t)},addGoRunVar:function(e,t){try{var r=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=r.globalVars,e.eventsComs=r.eventsComs}catch(e){console.warn(e)}},copyGoVar:function(e,t){try{for(var r=t.mapField,n=(r.toString().trim(),e.globalConstant.filter((function(e){return e.mapField.includes(r)}))),i=1,o=0;o<n.length;o++)i++;var a="".concat(r," (").concat(i,")"),s=e.globalConstant.find((function(e){return e.mapField==r}));if(r&&s){var c=_$1.cloneDeep(s);c.mapField=a,e.globalConstant.push(c);var u=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=u.globalVars,e.eventsComs=u.eventsComs}}catch(e){console.warn(e)}},goDelShareVar:function(e,t){delete e.shareVariable[t]},signal:function(e,t){},goSynchroDataAll:function(e,t){e.list=_$1.cloneDeep(t)},goSynchroDataForOption:function(e,t){if(e){var r=t.cid,n=t.value,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&updataAttributeForOption(i,n)}this.commit("GoCom/execute")},goSynchroData:function(e,t){if(e){var r=t.cid,n=t.attr,i=t.value,o=t.attrModel,a=findItemDeep$1(e.list,r);if("boolean"!=typeof a){if(a&&updataAttribute(a,n,i,o),"actions"===n.toLowerCase()){var s=e.list,c=_$1.uniqWith(_$1.concat(setComActions(s).actions,setComActions(e.caseList).actions),_$1.isEqual),u=_$1.uniqWith(_$1.concat(setComActions(s).events,setComActions(e.caseList).events),_$1.isEqual);ge.addVariables(c),e.globalVars=ge.getAllVariables(),e.globalEvents=u,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=c),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=u)}if("source"===n){if(!a.tmpData.source)return!1;var l=a.tmpData.source,d=l.type;if("api"===d){var h=l[d].url.match(/{{[\w]*}}|(@)[\w]*/gm);if(h)for(var f=h.map((function(e){return e.replace(/{{|}}|@/gm,"")})),p=function(t){var r=f[t];if(!r||!e.globalVars||e.globalVars.findIndex((function(e){return e.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&_$1.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(a.cid);var n=e.shareVariableTree[r];e.shareVariableTree[r]=_$1.uniq(n)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(a.cid)},m=0;m<f.length;m++)p(m)}}}}this.commit("GoCom/execute")},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),ge.addVariables(n)},resetGlobalData:function(e){e.globalVars=e.sysConst,e.globalConstant=[],e.globalSource=[]},updateGlobalRelatedVars:function(e,t){var r=t.run,n=t.gvData;return r.length&&r.forEach((function(e){var t=n.filter((function(t){return t.mapField==e.mapField||t.fork&&t.forkValue==e.mapField}));if(t.length)for(var r=0,i=t;r<i.length;r++){var o=i[r],a=e.value;o.mapField==e.mapField?o.value=a:o.fork&&e.mapField==o.forkValue?(o.converter&&o.converterCode,o.originalValue=a):n.push(e)}})),n}},comTreeMutations={updataList:function(e,t){var r=t.cid,n=produceWithImmer(t.list,(function(e){var t=findItemDeep$1(e,r),n=t.pid,i=getAncestorsNodes(e,r),o=function(e){for(var t=0;t<e.length;t++){var r=e[t];upDataGroup(r,r.baseData,null,!0)}},a=function(e){return e.reduce((function(e,t){return{left:e.left+t.baseData.left,top:e.top+t.baseData.top}}),{left:0,top:0})},s=function(e,t){void 0===t&&(t=e);for(var r=0;r<e.length;r++){var n=e[r];if(n.children&&Array.isArray(n.children))return 0===n.children.length?(t.splice(r,1),!0):(s(n.children,n.children)&&0===n.children.length&&t.splice(r,1),!0)}};if(i.length>0)if(t.pid=i[0].cid,n){var c=__spreadArray$1([findItemDeep$1(e,n)],getAncestorsNodes(e,n),!0),u=a(c),l=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u)),t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,l,1)),o(c),o(i)}else{l=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,l,1)),o(i)}n&&0==i.length&&(t.pid="",function(t,r){var n=getAncestorsNodes(e,r),i=findItemDeep$1(e,r);if(0===n.length)t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,i.baseData));else{n=__spreadArray$1([i],n,!0);var s=a(n);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,s))}o(__spreadArray$1([i],n,!0))}(t,n)),s(e),setIndex(e)}));e.list=n},updataListForContrast:function(e,t){var r=t.cid,n=t.list,i=findItemDeep$1(n,r);findParentDeep(n,r);var o=findParentDeep(e.list,r);if(!i.pid){i.pid=o.cid;var a=_$1.cloneDeep(i.baseData),s=transformPosition(i.baseData,o.baseData,1);Object.assign(i.baseData,s),upDataGroup(o,a)}setIndex(e.list)},updateTree:function(e){for(var t=e.list,r=0;r<t.length;r++){var n=t[r];if(n.pid)(a=findItemDeep$1(t,n.pid))&&Object.assign(n.baseData,transformPosition(n.baseData,a.baseData));if(n.children)for(var i=0;i<n.children.length;i++){var o=n.children[i];if(o.pid!=n.cid){var a=findItemDeep$1(t,o.pid);if(_$1.cloneDeep(o.baseData),a){Object.assign(o.baseData,transformPosition(o.baseData,a.baseData));var s=transformPosition(o.baseData,n.baseData,1);Object.assign(o.baseData,s),upDataGroup(n,n.baseData)}o.pid=n.cid}}}setIndex(t)}},ERR_OK=200,ERR_OK2=2e4,TIMEOUT=3e4,STATUS="status",xhr=function(t,r){void 0===t&&(t="");var n=e.create({baseURL:t,timeout:TIMEOUT,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return n.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),n.interceptors.response.use((function(e){return e[STATUS]===ERR_OK||e.data.code,r&&r(e),e.data}),(function(e){return r&&r(null==e?void 0:e.response),Promise.reject(e.response)})),n},Http=function(e,t){return xhr(e,t)},filterData=ae,parseSource=function(e,t,r,n,i,o,a,s){void 0===n&&(n=!0);console.log(t,r,n,i,"callback"),se(t,n,r,[],(function(e){i(e),("AnContainer"===(null==t?void 0:t.viewComName)&&n||"AnGridLayout"===(null==t?void 0:t.viewComName)&&n)&&UpdataForContainer(t)}),s)},updateComData=function(e,t,r,n,i,o,a){return void 0===r&&(r=!0),__awaiter(void 0,void 0,void 0,(function(){var o;return __generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,se(e,r,t,i,(function(e){n&&n(e)}),a)];case 1:return[2,s.sent()];case 2:return o=s.sent(),n&&n(o),console.log("error:11"+o),[3,3];case 3:return[2]}}))}))},autoUpdateComData=function(e,t,r){var n,i,o,a,s,c=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.source,u=null===(o=null===(i=c[null==c?void 0:c.type])||void 0===i?void 0:i.autoUpdate)||void 0===o?void 0:o.open,l=null===(s=null===(a=c[null==c?void 0:c.type])||void 0===a?void 0:a.autoUpdate)||void 0===s?void 0:s.time;u&&_$1.isNumber(l)&&l>0&&setInterval((function(){updateComData(e,t,!0,(function(t){r({cid:e.cid,data:t})}))}),1e3*l)},refreshData=function(e,t,r,n,i,o){void 0===o&&(o=!0),e&&se(e,o,t,[],(function(t){r({cid:e.clientWidth,data:t})}))},index$2=Object.freeze({__proto__:null,Http:Http,autoUpdateComData:autoUpdateComData,axios:e,filterData:filterData,getDataForEvaluator:getDataForEvaluator,parseSource:parseSource,refreshData:refreshData,updateComData:updateComData}),loadFontResource=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,o;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=e.fontUrl,r=e.fontName,n="__custom_font__",(i=document.getElementById(n))?[3,2]:((i=document.createElement("style")).id=n,[4,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)]);case 1:a.sent(),a.label=2;case 2:return i.innerText+="@font-face{font-family:'".concat(r,"';src:url(").concat(t,");}"),[3,4];case 3:return o=a.sent(),console.warn(o),[3,4];case 4:return[2]}}))}))},loadScript=function(e,t,r){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var n,i;return __generator(this,(function(o){switch(o.label){case 0:return n="csspaths"===t?"link":"script",i=document.createElement(n),"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),[4,new Promise((function(e,t){i.addEventListener("load",e),i.addEventListener("error",e)}))];case 1:return o.sent(),[2]}}))}))},addTag=function(e,t){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return r="fonts"===t?loadFontResource:loadScript,[4,Promise.all(e.map((function(e){return r(e)})))];case 1:return n.sent(),[2]}}))}))},loadFont=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.fonts&&e.fonts.length?[4,addTag(e.fonts,"fonts")]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},loadTag=function(e){var t=e.jspaths,r=void 0===t?[]:t,n=e.csspaths,i=void 0===n?[]:n,o=e.fonts,a=void 0===o?[]:o;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(a,"fontName"),[4,Promise.all([addTag(r,"jspaths"),addTag(i,"csspaths"),addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},removeTag=function(){removeFont(),Array.from(document.getElementsByTagName("script")).filter((function(e){return"jspaths"==e.className})).forEach((function(e){removeScript(e.src)})),Array.from(document.getElementsByTagName("link")).filter((function(e){return"csspaths"==e.className})).forEach((function(e){removeCss(e.href)}))};function removeScript(e){for(var t,r=Array.from(document.getElementsByTagName("script")),n=0;n<r.length;n++)r[n]&&r[n].src&&-1!=r[n].src.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeCss(e){for(var t,r=Array.from(document.getElementsByTagName("link")),n=0;n<r.length;n++)r[n].href,r[n]&&r[n].href&&-1!=r[n].href.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeFont(){var e=document.getElementById("__custom_font__");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}var toolMutations={reset:function(e){e.selectd=[],e.list=[],e.plant=null,e.tw=null,e.watermark=null,e.endnotes=null,e.globalConstant=[]},setFonts:function(e,t){e.resource.fonts.push({fontName:t.name,fontUrl:t.src}),loadFont(e.resource)},setCaseInfo:function(e,t){e.caseInfo=t},setPageId:function(e,t){e.pageId=t},pagePush:function(e,t){try{var r=t.type,n=t.value,i=t.option,o=["name","path","id"];if(!o.includes(r))throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填以下参数 ").concat(o.join(",")));if(!n)throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填正确的页面路径或者页面名称"));e.toPage=i?{type:r,value:n,option:i}:{type:r,value:n}}catch(e){console.warn(e)}},updatComs:function(e,t){var r=this,n=findItemDeep$1(e.list,t);if("boolean"!=typeof n){(null==n?void 0:n.children)&&(null==n||n.children),updateComData(n,e.globalVars,!0,(function(e){r.commit("GoCom/updataSourceForComponent",{cid:n.cid,data:e})}),e.globalSource)}},updatComsForVar:function(e,t){var r=e.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),n=[t];(null==r?void 0:r.length)&&(n=_$1.uniq(__spreadArray$1([t],r,!0)));for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];e.shareVariableTree[s]&&i.push.apply(i,e.shareVariableTree[s])}if(null==i?void 0:i.length)for(var c=0,u=i;c<u.length;c++){var l=u[c];this.commit("GoCom/updatComs",l)}},addConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r?Object.assign(r,t):e.constant.push(t)},editConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r&&Object.assign(r,t)},delConstant:function(e,t){_$1.remove(e.constant,(function(e){return e.name==t}))},setResource:function(e,t){var r=t.type,n=t.value;e.resource[r]=n,removeTag(),loadTag(e.resource)},updataResource:function(e){removeTag(),loadTag(e.resource)},resetResource:function(e){e.resource={jspaths:[],csspaths:[],otherpaths:[]}},setData:function(e,t){e.selectd=t.selectd},setList:function(e,t){e.list=t,setIndex(e.list)},saveDynamicChildren:function(e,t){var r=t.cid,n=t.data,i=t.name,o=e.pages[e.pageIndex].list,a=findItemDeep$1(o,r);a&&(a.activeDynamic=i,a.dynamicChildren instanceof Array&&(a.dynamicChildren=new Map(a.dynamicChildren)),a.dynamicChildren.set(i,n))},setTheme:function(e,t){e.theme=t},setPlant:function(e,t){var r=t.attr,n=t.value;e.plant||(e.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),e.plant[r]=n},setPlantHeight:function(e,t){e.plant&&(e.plant.baseData.height=e.plant.baseData.height+t)},reversal:function(e,t){e.undos=[],e.undoRedoPointer=-1;var r=_$1.cloneDeep(t.globalVars);delete t.globalVars,e=Object.assign(e,t),ge.addVariables(r),e.globalVars=ge.getAllVariables(),setIndex(e.list)},setComTmp:function(e,t){var r=e.list.find((function(e){return e.cid===t[0]}));r.com=t[1],r.tmp=t[2]},setLoading:function(e,t){var r=t.cid,n=t.flag,i=e.list.find((function(e){return e.cid===r}));i&&(i.loading=n)},setMultiple:function(e,t){e.multiple=t},setCaseList:function(e,t){e.caseList=t},updataComponentForList:function(e,t){var r=t.cid,n=t.data,i=e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponentForCaseList:function(e,t){var r=t.cid,n=t.data,i=e.caseList,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponent:function(e,t){var r=t.cid,n=t.data,i=e.pages&&e.pages[0]&&e.pages[0].list&&e.pages[0].list.length?e.pages[0].list:e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataArea:function(e,t){e.currentArea.left+=t.deltaX,e.currentArea.top+=t.deltaY},updataSource:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=n:(console.log("更新数据:"+i.cid),i.tmpData.source[i.tmpData.source.type].data=n))},updataSourceForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.source=_$1.cloneDeep(n))}},updataAnimationForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.tw=n)}},updataWatermark:function(e,t){e.watermark=t},updataEndnotes:function(e,t){e.endnotes=t},updataAnimation:function(e,t){e.tw=t},setContext:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.example=n)},setContextList:function(e,t){var r=t.cid,n=t.data;e.contextList[r]=n},setPosition:function(e,t){setPositionForWorld(e.list.find((function(e){return e.cid===t[0]})),t[1])},setSelect:function(e,t){e.cache=[],e.selectd=t instanceof Array?t:[t],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t&&"Other.Plant.Normal"!==e.type})))}))},setActive:function(e,t){var r=_$1.cloneDeep(t),n=r.id,i=r.multiple,o=r.origin,a=r.ctr,s=_$1.cloneDeep(e.selectd);if(i){var c=s.includes(n);if(s.length>=1){var u=s.every((function(r){return isPeer(e.list,r,t.id)}));if(!u)return void console.info("sorry Only sibling elements can be selected!")}c?s.splice(s.findIndex((function(e){return e===n})),1):s.push(n),e.selectd=s}else e.selectd=[n];e.selectd.forEach((function(t){var r=findItemDeep$1(e.list,t);if(r.pid){var n=findItemDeep$1(e.list,r.pid);n&&(n.toggle=!0)}a||(r.toggle=!0)})),e.selectdChangeOrigin=o||""},setCache:function(e){e.cache=[],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t})))}))},clearActive:function(e){e.selectd=[]},setMultipleActive:function(e,t){e.selectd=t},syncMenuInfo:function(e){RecursiveList(e.menuList,(function(t){var r=10*t.lv+t.index;e.list.filter((function(e){return e.cid===t.id}))[0].z=1e4-r}))},addComs:function(e,t){var r=t.com,n=t.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[]),r.lines={h:[],v:[]},"AnGridLayout"==r.viewComName&&r.dynamicChildren.set("状态1",null==r?void 0:r.AnGridChildren)),n?e.list.push(r):e.list.unshift(r),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,t){var r=t.com,n=t.isMobile,i=t.PID;if("MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i){var o=findItemDeep$1(e.list,i);n?(o.children=[],o.children.push(r)):o.children.unshift(r)}else n?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addMyComs:function(e,t){var r;try{var n=t.data,i=t.shareVariableTree,o=t.globalVars,a=t.globalEvents;e.globalVars=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalVars),o)),e.globalEvents=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalEvents),a));var s=Object.keys(i),c=Object.keys(e.shareVariableTree),u=_$1.difference(s,c);u.length?u.forEach((function(t){e.shareVariableTree[t]=_$1.concat(_$1.cloneDeep(e.shareVariableTree[t]),i[t])})):e.shareVariableTree=Object.assign(_$1.cloneDeep(e.shareVariableTree),i),n instanceof Array?(resetID(n),(r=e.list).unshift.apply(r,n)):(resetID([n]),e.list.unshift(n)),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")}catch(e){}},addStateChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.stateChildren.push(t)},addDynamicChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.dynamicChildren.push(t)},arraySwap:function(e,t){var r;try{if(!t||2!=t.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var n=_$1.cloneDeep(e.list),i=findItemDeep$1(n,t[0]),o=findItemDeep$1(n,t[1]),a=findItemDeep$1(n,i.pid),s={},c=0,u=0;if(o)if("selectContainer"==o.componentType){var l=findItemDeep$1(n,t[1]);a?(c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],a.children=a.children.filter((function(e){return e.cid!==s.cid}))):(s=findItemDeep$1(n,t[0]),n=n.filter((function(e){return e.cid!==s.cid}))),s.cid=genID(),s.pid=l.cid,l.children.push(s)}else if(i.pid||o.pid)if(a)if(c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],i.pid!==o.pid){l=findItemDeep$1(n,o.pid);u=_$1.findIndex(l.children,(function(e){return e.cid==t[1]}));d=l.children[u];s.cid=genID(),s.pid=l.cid,d.cid=genID(),d.pid=a.cid,a.children.splice(c,1,d),l.children.splice(u,1,s)}else u=_$1.findIndex(a.children,(function(e){return e.cid==t[1]})),(r=a.children).splice.apply(r,__spreadArray$1([u,1],a.children.splice(c,1,a.children[u]),!1));else{var l=findItemDeep$1(n,o.pid);c=_$1.findIndex(n,(function(e){return e.cid==t[0]})),u=_$1.findIndex(l.children,(function(e){return e.cid==t[1]})),s=findItemDeep$1(n,i.cid);var d=l.children[u];s.cid=genID(),s.pid=l.cid,d.cid=genID(),d.pid=null,n.splice(c,1,d),l.children.splice(u,1,s)}else arraySwapForId(e.list,t[0],t[1]);else c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],a.children.splice(c,1),s.cid=genID(),s.pid=null,n.push(s);e.list=n,setIndex(e.list)}catch(e){console.warn("组件位置交换发生错误",e)}},changeDynamicState:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&"dynamicComponent"==r.componentType&&(r.dynamicChildren instanceof Array&&r.dynamicChildren.find((function(e){return e[0]==t.activeName}))||r.dynamicChildren instanceof Map&&r.dynamicChildren.has(t.activeName)?r.activeDynamic=t.activeName:console.error(t.activeName+"不是一个正确的状态"))},addAlternateData:function(e,t){e.alternateData[t.pid]||(e.alternateData[t.pid]=[]),e.alternateData[t.pid].push(t)},setOptionForCom:function(e,t){var r;try{var n=t.cid,i=t.key,o=t.value,a=findItemDeep$1(e.list,n);if(!a)return;if("string"!=typeof i)return void console.error("key:[".concat(i,"]格式错误"));var s=null===(r=null==a?void 0:a.tmpData)||void 0===r?void 0:r.option,c=i.split(".");s&&(null==c?void 0:c.length)&&c.forEach((function(e,t){s.hasOwnProperty(e)&&(t===c.length-1?s[e]=o:s=s[e])}))}catch(e){console.warn("同步属性发生错误:"+e)}},mergeConfig:function(e,t){t.length>0&&t.forEach((function(t){e.list.unshift(t)})),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},updataName:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&(r.name=t.name)},setDynamicActive:function(e,t){t.cid;var r=t.name,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.activeDynamic=r)},updataScroll:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.srcollInfo={use:!!(null==r?void 0:r.use)&&(null==r?void 0:r.use),data:(null==r?void 0:r.data)?null==r?void 0:r.data:null})},updataDySetting:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.dyOption=r)},setCurrentEdited:function(e,t){if(t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=breakUp(r);r.children=n}e.currentEditerCid=t}else e.currentEditerCid=""},setDynamicLine:function(e,t){var r=_$1.cloneDeep(e.list),n=findItemDeep$1(r,t.cid);r.length&&"boolean"!=typeof n&&(n.lines=Object.assign({},n.lines,t.lines)),e.list=r}},findArray=function(e,t){try{var r=e.map((function(e){var r=findItemDeep$1(t,e);if("object"==typeof r)return r;throw"Please check whether the input and output parameters are correct!"}));if(_$1.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(e){return console.error(e),[]}},alignLeft=function(e,t){1===e.length&&(e[0].baseData.left=0);var r=_$1.sortBy(e,(function(e){return e.baseData.left})),n=r[0].baseData.left;e.map((function(e){return e.baseData.left=n}))},alignRight=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=1*n[n.length-1].baseData.left+1*n[n.length-1].baseData.width;e.map((function(e){return e.baseData.left=i-1*e.baseData.width}))},horizontally=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.left+1*e.baseData.width})),o=(1*n[0].baseData.left+(1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width))/2;e.map((function(e){return e.baseData.left=o-e.baseData.width/2}))},alignTop=function(e,t){1===e.length&&(e[0].baseData.top=0);var r=_$1.sortBy(e,(function(e){return e.baseData.top})),n=1*r[0].baseData.top;e.map((function(e){return e.baseData.top=n}))},alignBottom=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var n=_$1.sortBy(e,(function(e){return 1*e.baseData.top})),i=1*n[n.length-1].baseData.top+1*n[n.length-1].baseData.height;e.map((function(e){return e.baseData.top=i-1*e.baseData.height}))},verticalCenter=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var n=_$1.sortBy(e,(function(e){return e.baseData.top})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.top+1*e.baseData.height})),o=(1*n[0].baseData.top+(1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height))/2;e.map((function(e){return e.baseData.top=o-e.baseData.height/2}))},topDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top})),r=(t[t.length-1].baseData.top-t[0].baseData.top)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+r*n)}))},bottomDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height})),r=(t[t.length-1].baseData.top+t[t.length-1].baseData.height-(t[0].baseData.top+t[0].baseData.height))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+1*t[0].baseData.height-1*e.baseData.height+r*n)}))},xCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width/2})),r=1*t[t.length-1].baseData.left+t[t.length-1].baseData.width/2,n=1*t[0].baseData.left+t[0].baseData.width/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.left=n-e.baseData.width/2+i*r)}))},leftDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left})),r=(t[t.length-1].baseData.left-t[0].baseData.left)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+r*n)}))},rightDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width})),r=(t[t.length-1].baseData.left+t[t.length-1].baseData.width-(t[0].baseData.left+t[0].baseData.width))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+t[0].baseData.width-e.baseData.width+r*n)}))},yCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height/2})),r=1*t[t.length-1].baseData.top+t[t.length-1].baseData.height/2,n=1*t[0].baseData.top+t[0].baseData.height/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.top=n-e.baseData.height/2+i*r)}))},layoutMutations={layout:function(e,t){var r=findArray(e.selectd,e.list);switch(t){case"alignLeft":alignLeft(r);break;case"alignRight":alignRight(r,e);break;case"horizontally":horizontally(r,e);break;case"alignTop":alignTop(r);break;case"alignBottom":alignBottom(r,e);break;case"verticalCenter":verticalCenter(r,e);break;case"topDistribution":topDistribution(r);break;case"bottomDistribution":bottomDistribution(r);break;case"xCenterDistribution":xCenterDistribution(r);break;case"leftDistribution":leftDistribution(r);break;case"rightDistribution":rightDistribution(r);break;case"yCenterDistribution":yCenterDistribution(r)}}},pages={setPageData:function(e,t){e.pages[0]=t},parasePages:function(e,t){t instanceof Array&&(e.pages=t.map((function(e,t){return e.name||(e.name="页面"+(t+1)),e.path||(e.path="page"+(t+1)),e})))},addPage:function(e,t){var r=e.pages.length+1;t.name="页面"+r,t.path="page"+r,e.pages.push(t),e.pageIndex=e.pages.length-1,e.resource={jspaths:[],csspaths:[],otherpaths:[]},e.globalVars=e.sysConst},setCurrentPageIndex:function(e,t){var r=e.globalEvents,n=e.globalVars,i=e.list,o=e.name,a=e.theme,s=e.plant,c=e.shareVariableTree,u=e.resource;e.pages[e.pageIndex]={globalEvents:r,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:c,resource:u},e.pageIndex=t},setPageDataForIndex:function(e,t){var r=t.index,n=t.data;e.pages[r]=n},setPageName:function(e,t){e.name=t,e.pages[e.pageIndex].name=t},saveCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=void 0===r?[]:r,i=e.list,o=e.name,a=e.theme,s=e.plant,c=e.shareVariableTree,u=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:c,resource:u}},getCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=e.list,i=e.name,o=e.theme,a=e.plant,s=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:r,list:n,name:i,theme:o,plant:a,shareVariableTree:s,resource:c}}},containerMutaitons={segmentationContainer:function(e,t){var r=_$1.cloneDeep(e.list),n=t.containerData,i=t.direction,o=[];if("del"==i)if(n.pid){var a=findItemDeep$1(r,n.pid),s=a.children.length;if(a)if(s<=2)(o=a.children.filter((function(e){return e.cid!==n.cid&&e.children.length}))).length?(a.direction=o[0].direction,a.children=o[0].children.map((function(e){return e.pid=a.pid||a.cid,e}))):a.children=[];else{var c=a.children.find((function(e){return e.cid===n.cid})),u=a.children.findIndex((function(e){return e.cid===n.cid}));a.children=a.children.filter((function(e){return e.cid!==n.cid}));var l=a.children[u>=a.children.length-1?a.children.length-1:u],d="col"==l.direction?"height":"width";l.baseData[d]=(parseFloat(l.baseData[d])+parseFloat(c.baseData[d])).toFixed(2)+"%"}}else r.length&&(r=r.filter((function(e){return e.cid!==n.cid})));else{var h=findItemDeep$1(r,n.cid);if(h){h.direction=i,1===h.children.length&&(o=h.children,h.children=[]);for(var f=(s=h.children.length)>=2?1:2,p=(d=s>=2?(100/(s+1)).toFixed(2)+"%":"50%",0);p<f;p++)h.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==i?"100%":d,height:"col"==i?d:"100%",angle:0,penetrate:0,opacity:100},direction:i,componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"},imgOpt:"",bgScaleOpt:3,borderRadius:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],margins:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}]}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:genID(),pid:h.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==i,isRow:"col"!=i,isDragged:!1,grandParentId:n.pid});o.length&&(o[0].cid=genID(),o[0].pid=h.children[0].cid,h.children[0].children=o)}}e.list=r,0==r.length&&(e.selectd=[])}},shareCom={goEditShareCom:function(e,t){var r=t.name,n=t.mapping;e.shareComs||(e.shareComs=new Map),e.shareComs.set(r,n)},delShareCom:function(e,t){var r=t.key;e.shareComs&&e.shareComs.has(r)&&e.shareComs.delete(r)}},globalVars={mutation:{addGoVar:function(e,t){try{ge.addVariable(t,(function(){e.globalVars=ge.getAllVariables()}))}catch(e){console.warn(e)}},delGoVar:function(e,t){try{var r=t.mapField;console.log(r,"mapFieldmapField"),ge.delVariable(r,(function(){e.globalVars=ge.getAllVariables()}))}catch(e){console.warn(e)}},editGoVar:function(e,t){var r=this;try{ge.editVariable(t,(function(n){e.globalVars=ge.getAllVariables(),he(e.globalSource,t.mapField,e.globalVars,e.list,(function(e){r.commit("GoCom/updatComs",e.cid)})),(null==t?void 0:t.delayUpdate)||r.commit("GoCom/updatComsForVar",t.mapField)}))}catch(e){console.warn(e)}},goEditVar:function(e,t){var r=t.key,n=t.value,i=e.globalVars.find((function(e){return e.mapField==r}));i&&(i.originalValue=n,i.update=!0,this.commit("GoCom/editGoVar",i))},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),ge.addVariables(n)},updateGlobalVars:function(e,t){e.globalVars=t},updataVariables:function(e){e.globalVars=ge.getAllVariables()}},actions:{updateGlobalVarsAction:function(e){(0,e.commit)("updateGlobalVars",ge.getAllVariables())},goEditVar:function(e,t){(0,e.commit)("editGoVar",{mapField:t.key,originalValue:t.value})}}},mutations=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},UndoRedo),baseDataMutaitons),rightMenuMutaitons),eventMutations),comTreeMutations),toolMutations),layoutMutations),pages),containerMutaitons),shareCom),globalVars.mutation),actions=__assign$1({updataList:function(e,t){var r=e.commit;t&&r("updataList",t),r("updateTree")},updataBaseData:function(e,t){var r=e.commit;t&&r("updataBaseData",t)},setActive:function(e,t){var r=e.commit;t&&r("setActive",t)},setSyncFlag:function(e,t){var r=e.commit;t&&r("setSyncFlag",t)},execute:function(e,t){var r=e.commit;t&&r("execute",t)},updataAnimationForComponent:function(e,t){var r=e.commit;t&&r("updataAnimationForComponent",t)},updataAnimation:function(e,t){(0,e.commit)("updataAnimation",t)},setOptionForCom:function(e,t){(0,e.commit)("setOptionForCom",t)},updatComs:function(e,t){var r=e.commit;setTimeout((function(){r("updatComs",t)}))},updatComsForVar:function(e,t){var r=e.dispatch,n=e.state,i=n.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),o=[t];(null==i?void 0:i.length)&&(o=_$1.uniq(__spreadArray$1([t],i,!0)));for(var a=[],s=0,c=o;s<c.length;s++){var u=c[s];n.shareVariableTree[u]&&a.push.apply(a,n.shareVariableTree[u])}if(null==a?void 0:a.length)for(var l=0,d=a;l<d.length;l++){r("updatComs",d[l])}},goEditShareCom:function(e,t){var r=e.commit;e.state,r("goEditShareCom",t)},delShareCom:function(e,t){var r=e.commit;e.state,r("delShareCom",t)},updataSource:function(e,t){var r=e.commit;e.state,r("updataSource",t)}},globalVars.actions),getters={getCurrentPage:function(e){return e.pages.length?e.pages[e.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var t=[];return recursion(_$1.cloneDeep(e.list),(function(e){var r,n,i;if("globalData"==(null===(n=null===(r=null==e?void 0:e.tmpData)||void 0===r?void 0:r.source)||void 0===n?void 0:n.type)){var o=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source.globalData;t.push({name:e.name,cid:e.cid,sourceId:o.id,viewComName:e.viewComName})}})),t}return[]}},store={namespaced:!0,state:state,mutations:mutations,actions:actions,getters:getters},VueServer=function(){function e(){}return e.setAppStore=function(t){e.store=t},e.prototype.getState=function(){return e.store.state[e.storeModule]},e.prototype.mapState=function(t){return mapState(e.storeModule,t)},e.prototype.mapGetters=function(t){return mapGetters(e.storeModule,t)},e.prototype.mapMutations=function(t){return mapMutations(e.storeModule,t)},e.prototype.callState=function(t){return e.store.state[e.storeModule][t]},e.prototype.callGetter=function(t,r){return e.store.getters[e.storeModule+"/"+t]},e.prototype.callMutation=function(t,r,n){n?e.store.commit(e.storeModule+"/"+t,r,!0):e.store.commit(e.storeModule+"/"+t,r)},e.prototype.callAction=function(t,r){e.store.dispatch(e.storeModule+"/"+t,r)},e.storeModule="GoCom",e}(),mapState=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=getModuleByNamespace(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof i?i.call(this,t,r):t[i]},r[n].VuexServer=!0})),r})),mapMutations=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.$store.commit;if(e){var o=getModuleByNamespace(this.$store,"mapMutations",e);if(!o)return;n=o.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),r})),mapGetters=normalizeNamespace((function(e,t){var r={};return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,r[n]=function(){if(!e||getModuleByNamespace(this.$store,"mapGetters",e)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},r[n].VuexServer=!0})),r}));function normalizeMap(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function normalizeNamespace(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function getModuleByNamespace(e,t,r){var n=e._modulesNamespaceMap[r];return"production"===process.env.NODE_ENV||n||console.error("[VuexServer] module namespace not found in ".concat(t,"(): ").concat(r)),n}var GoComponent=function(){function e(e){var t=this;if(this.isLock=!1,this.isShow=!0,this.baseData={left:0,top:0,width:300,height:200,angle:0,opacity:100,rotate:0,rotateY:0},this.componentType="BaseComponent",this.cid=genID(),e){Object.keys(e).forEach((function(r){t[r]=e[r]}));["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnThreeMap","AnGisMap","AnMineMap","MineMapMarkerLayer","MineMapClusterLayer","AnChina3D","AncsAnovGis"].includes(e.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"!==e.viewComName&&"AmDynamic"!==e.viewComName&&"AnContainer"!==e.viewComName&&"AnGridLayout"!==e.viewComName||(this.componentType="dynamicComponent")}}return e.prototype.setIndex=function(e){this.z=e},e}(),Load=function(){function e(e){this.vueServer=e,this.loadScript=loadScript}return e.setStore=function(e){this.store=e},e.prototype.loadComponents=function(e){var t=e&&e.list?e.list:[];recursion(t,(function(e){e.viewComName&&(e&&e.path&&e.path,e.origin,e.viewComName?e.viewComName:e.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",_$1.cloneDeep(e))},e.prototype.addStore=function(e){this.vueServer.callMutation("setActive",{id:e}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i=this;return __generator(this,(function(o){switch(o.label){case 0:if(window[t])return[3,5];r=function(t){var r;return __generator(this,(function(n){switch(n.label){case 0:return r=e[t],[4,new Promise((function(e){e(i._load(r))}))];case 1:return n.sent(),[2]}}))},n=0,o.label=1;case 1:return n<e.length?[5,r(n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:window[t]=t,o.label=5;case 5:return[2]}}))}))},e.prototype._load=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){return[2,new Promise((function(r){r(t.loadScript(e))}))]}))}))},e}(),IndexedDB=function(){function e(e){var t=e.dbName,r=e.tables,n=e.version,i=void 0===n?1:n,o=__rest(e,["dbName","tables","version"]);this.dbName=t,this.tables=r,this.version=i,this.openDB(__assign$1({dbName:t,tables:r,version:i},o))}return e.deleteDB=function(e){var t;null===(t=window.indexedDB)||void 0===t||t.deleteDatabase(e)},e.prototype.deleteItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e).delete(t);return n.onsuccess=function(e){"function"==typeof r&&r(e)},n},e.prototype.getItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e),i=null;return(i=t?n.get(t):n.getAll()).onsuccess=function(e){var t;"function"==typeof r&&r(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.result)},i.onerror=function(e){console.error(e),r(e)},i},e.prototype.setItem=function(e,t,r,n){var i=this.storage.transaction(e,"readwrite").objectStore(e).put(r,t);return i.onsuccess=function(e){"function"==typeof n&&n(e)},i.onerror=function(e){"function"==typeof n&&n(e)},i},e.prototype.get=function(e,t){return this.getItem(this.tables[0],e,t)},e.prototype.set=function(e,t,r){return this.setItem(this.tables[0],e,t,r)},e.prototype.delete=function(e,t){return this.deleteItem(this.tables[0],e,t)},e.prototype.clear=function(e,t){var r=this.storage.transaction(this.dbName,"readwrite").objectStore(e).clear();return r.onsuccess=function(e){"function"==typeof t&&t(e)},r},e.prototype.getDB=function(){return this.storage},e.prototype.closeDB=function(){this.storage.close()},e.prototype.openDB=function(e){var t=this,r=e.dbName,n=e.tables,i=e.version,o=e.callback,a=window.indexedDB;if(a)if((null==n?void 0:n.length)<1)console.error("表名不能为空");else{var s=a.open(r,i);s.onerror=function(e){var t,r;console.error("打开数据库失败: ".concat(null===(r=null===(t=e.currentTarget)||void 0===t?void 0:t.error)||void 0===r?void 0:r.message)),"function"==typeof o&&o(e)},s.onsuccess=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,"function"==typeof o&&o(e)},s.onupgradeneeded=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,n.forEach((function(r){t.storage.objectStoreNames.contains(r)||(t.storage.createObjectStore(r),"function"==typeof o&&o(e))}))}}else console.error("你的浏览器不支持indexedDB")},e}(),Go=function(){function e(){this.VueServer=new VueServer}return e.getInstance=function(){return this.instance||(this.db=new IndexedDB({dbName:"AnovGo",tables:["logs"]}),this.instance=new e),this.instance},e.prototype.getAppStore=function(){return e.store},e.setAppStore=function(t){e.store=t,VueServer.setAppStore(t),Load.setStore(t)},e.prototype.add=function(e,t,r){t.MultiState?this.VueServer.callMutation("addStateChildren",t):(this.VueServer.callMutation("addComs",{com:t,isMobile:r}),this.VueServer.callMutation("setActive",{id:e}))},e.prototype.addForParent=function(e,t,r,n){this.VueServer.callMutation("addComsForParent",{com:t,PID:r,isMobile:n}),this.VueServer.callMutation("setActive",{id:e})},e.prototype.render=function(e,t){var r=new GoComponent(e);t?this.add(r.cid,r,!0):this.add(r.cid,r)},e.prototype.renderForParent=function(e,t,r){var n=new GoComponent(e);void 0!==r?this.addForParent(n.cid,n,t,r):this.addForParent(n.cid,n,t)},e.prototype.reversal=function(e){new Load(new VueServer).loadComponents(e)},e.prototype.emitEvent=function(e,t){var r=this,n=this.VueServer.callState("globalEvents"),i=this.VueServer.callState("globalVars"),o=this.VueServer.callState("shareVariableTree"),a=this.VueServer.callState("globalSource");this.VueServer.callState("globalConstant");var s=this.VueServer.callState("list");we(n,i,o,s,e,(function(e){r.VueServer.callMutation("changeShow",e)}),(function(e){r.VueServer.callMutation("updataSourceForComponent",e)}),t,a)},e}(),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r),__async=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{s(r.next(e))}catch(e){i(e)}},a=e=>{try{s(r.throw(e))}catch(e){i(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);s((r=r.apply(e,t)).next())})),defaultOptions={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},attributeNameTag="data-watermark-tag",observeOptions={childList:!0,subtree:!0,attributeFilter:["style","class",attributeNameTag]};function getMutationObserver(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function getDataSetKey(e){return e.split("-").slice(1).reduce(((e,t,r)=>0===r?t:`${e}${t[0].toUpperCase()+t.slice(1)}`))}var getStyleStr=e=>{let t="";return Object.keys(e).forEach((r=>{const n=r.replace(/([A-Z])/g,"-$1").toLowerCase();t+=`${n}:${e[r]};`})),t},encrypt=e=>window.btoa(decodeURI(encodeURIComponent(e))),getRandomId=(e="")=>`${encrypt(e)}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`,getContainer=(e,t,r={},n)=>{let i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw new Error(`水印挂载节点未找到,请检查#${e}是否存在`)}else i=null!=e?e:document.body;i.setAttribute(attributeNameTag,t);const o=__spreadValues({position:"relative"},r);return n||delete o.position,i.setAttribute("style",getStyleStr(o)),i},getContent=e=>{const t=document.createElement("div");return t.setAttribute("style",getStyleStr({pointerEvents:"none"})),t.setAttribute(attributeNameTag,e),t};function getDrawPattern(e){const{text:t,gapX:r,gapY:n,offsetTop:i,offsetLeft:o,width:a,height:s,rotate:c,opacity:u,fontSize:l,fontStyle:d,fontVariant:h,fontWeight:f,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindFontSize:b,blindOpacity:w}=e;return new Promise(((e,D)=>{const S=document.createElement("canvas"),x=S.getContext("2d"),T=1*(Number(r)+Number(a)),k=1*(Number(n)+Number(s)),P=Number(o)||Number(r)/2,E=Number(i)||Number(n)/2;if(S.setAttribute("width",`${T}px`),S.setAttribute("height",`${k}px`),x){const r=1*a,n=1*s;if(x.translate(1*P,1*E),x.rotate(Math.PI/180*Number(c)),_&&(x.globalAlpha=w,x.font=`${b}px normal`,x.fillText(_,0,0)),x.globalAlpha=u,y){const t=new Image;return t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.src=y,void(t.onload=()=>{x.drawImage(t,0,0,r,n),e({url:x.canvas.toDataURL(),width:T,height:k})})}const i=Array.isArray(t)?t:[t],o=i.map((e=>x.measureText(e).width)),d=Math.max(...o),h=1*Number(l);x.textAlign=g,x.textBaseline=v,x.fillStyle=m,x.font=A(`${h}px`),d>a&&(x.font=A(h/2+"px"));const f=h+5;let p=(n-(l*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let e=0;e<i.length;e++)x.fillText(i[e]||"",r/2,p+f*e);e({url:x.canvas.toDataURL(),width:T,height:k})}function A(e){return`${d} ${h} ${f} ${e} ${p}`}return D()}))}var MutationObserver=getMutationObserver(),Watermark=class{constructor(e={}){__publicField(this,"options"),__publicField(this,"container"),__publicField(this,"watermarkContent"),__publicField(this,"watermarkDom"),__publicField(this,"style"),__publicField(this,"watermarkTag"),__publicField(this,"shadowRoot"),__publicField(this,"mutationObserver"),__publicField(this,"_isAgainRender",(e=>{if("attributes"===e.type){if(e.attributeName===attributeNameTag)return!0;if(this.watermarkTag===this._getNodeRandomId(e.target))return!0}return!(!e.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(e.removedNodes[0]))})),__publicField(this,"_getNodeRandomId",(e=>{var t;return null==(t=null==e?void 0:e.dataset)?void 0:t[getDataSetKey(attributeNameTag)]})),__publicField(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),__publicField(this,"_getWatermarkDom",(e=>__async(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof e&&e&&(this.style.height=`${e}px`);const t=yield getDrawPattern(this.options);if(null==t?void 0:t.url){const e=t.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${e})`:(this.style.backgroundImage=`url(${e}), url(${e})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${t.width/2}px ${t.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",getStyleStr(this.style))}return this.watermarkDom.setAttribute(attributeNameTag,this.watermarkTag),this.watermarkDom})))),__publicField(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let e=0;const{scrollHeight:t=0,clientHeight:r=0}=this.options.container?this.container.parentNode:this.container;return t>r&&(e=Math.max(t,r)),e})),this.options=Object.assign({},defaultOptions,e),this.style={position:"absolute",left:0,top:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden",backgroundColor:"transparent",backgroundRepeat:"repeat"},this.style.zIndex=this.options.zIndex,this.watermarkTag=getRandomId("watermark"),this.mutationObserver=null,this._render()}update(e={}){this.options=__spreadValues(__spreadValues({},this.options),e),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}destroy(){this.shadowRoot=void 0,this.watermarkContent&&(this.watermarkContent.remove(),this.watermarkContent=void 0),this.watermarkDom&&(this.watermarkDom.remove(),this.watermarkDom=void 0),this._destroyMutationObserver()}_render(){return __async(this,null,(function*(){this._destroyMutationObserver(),this.container=getContainer(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=getContent(this.watermarkTag),this.container.append(this.watermarkContent));const e=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(e),this.watermarkContent){const e=this.watermarkContent.childNodes||[];for(let t=0;t<e.length;t++)this.watermarkContent.removeChild(e[t])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),MutationObserver&&this.options.monitor&&(this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{if(this._isAgainRender(e))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,observeOptions),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,observeOptions))}))}},FileSaver_min=createCommonjsModule((function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,a){var s=o.URL||o.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):n(c.href)?r(e,t,a):i(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){i(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,a){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),o);else if(n(e))r(e,o,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var s="application/octet-stream"===e.type,c=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||s&&c||a)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},l.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s}()})),getComOptions=function(e){var t=_$1.cloneDeep(e),r=_$1.omit(t,["comData","source"]);return __assign$1({},r)},generateComponentList=function(e){if(0===e.length)return[];var t=function(e){for(var r,n=0;n<e.length;n++)e[n].tmpData&&(e[n]=Object.assign({},getComOptions(e[n]))),e[n]&&e[n].children&&(null===(r=e[n])||void 0===r?void 0:r.children.length)?t(e[n].children):e[n]&&e[n].dynamicChildren&&Array.from(e[n].dynamicChildren).forEach((function(e,r){t(e[1])}))};return t(e),e},generateCaseDataJson=function(e){var t=_$1.cloneDeep(e)?_$1.cloneDeep(e):{};"string"==typeof e&&(t=JSON.parse(e));var r=[];if(t instanceof Array)t.forEach((function(e,t){var n=JSON.parse(e.caseDetailData)?JSON.parse(e.caseDetailData):{},i=e.caseDetailPath,o=e.caseDetailName,a=n.theme,s=void 0===a?null:a,c=n.globalVars,u=void 0===c?null:c,l=n.shareVariableTree,d=void 0===l?null:l,h=n.plant,f=void 0===h?null:h,p=n.list,m=void 0===p?[]:p,g=n.path,v=void 0===g?"":g;n.name;var y=n.resource,_=void 0===y?{jspaths:[],csspaths:[],otherpaths:[]}:y,b=n.watermark,w=void 0===b?null:b,D=n.tw,S=void 0===D?null:D,x=n.globalSource,T=void 0===x?[]:x,k=n.globalEvents,P=void 0===k?[]:k,E=n.globalConstant,A=void 0===E?[]:E;r.push({path:v||i,theme:s,name:o,resource:_,tw:S,watermark:w,globalSource:T,globalVars:u,globalEvents:P,globalConstant:A,shareVariableTree:d,plant:f,list:generateComponentList(m)})}));else{var n=t.theme,i=void 0===n?null:n,o=t.globalVars,a=void 0===o?null:o,s=t.shareVariableTree,c=void 0===s?null:s,u=t.plant,l=void 0===u?null:u,d=t.list,h=void 0===d?[]:d,f=t.resource,p=void 0===f?{jspaths:[],csspaths:[],otherpaths:[]}:f,m=t.watermark,g=void 0===m?null:m,v=t.tw,y=void 0===v?null:v,_=t.globalSource,b=void 0===_?[]:_,w=t.globalEvents,D=void 0===w?[]:w,S=t.globalConstant,x=void 0===S?[]:S;r.push({resource:p,tw:y,watermark:g,globalSource:b,theme:i,globalVars:a,globalEvents:D,shareVariableTree:c,globalConstant:x,plant:l,list:generateComponentList(h)})}return r},generatePageData=function(e){var t={},r=t.theme,n=void 0===r?null:r,i=t.globalVars,o=void 0===i?null:i,a=t.shareVariableTree,s=void 0===a?null:a,c=t.plant,u=void 0===c?null:c,l=t.list,d=void 0===l?[]:l,h=t.undos,f=void 0===h?[]:h,p=t.undoRedoPointer,m=void 0===p?-1:p,g=t.globalEvents,v=void 0===g?[]:g;return e&&(n=e.theme,u=e.plant),{theme:n,globalVars:o,globalEvents:v,shareVariableTree:s,plant:u,undos:f,undoRedoPointer:m,list:generateComponentList(d)}},exportJson=function(e){var t=e.caseName,r=void 0===t?"case-name":t,n=e.caseImg,i=void 0===n?"":n,o=e.caseRemark,a=void 0===o?"":o,s=e.details,c=e.caseClientType,u=void 0===c?"":c,l=e.id,d={caseClientType:u,caseName:r,caseImg:i,caseRemark:a,caseId:void 0===l?"":l,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(s)},h=new Blob([JSON.stringify(d)],{type:"json"});FileSaver_min.saveAs(h,r+".json")},generateJson=function(e){var t=e.caseName,r=void 0===t?"":t,n=e.caseData;return e.plangInfoForPsd,{caseName:r,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(n)}};function elementError(e,t){throw new Error("".concat(e,":Expected HTMLElement, got ").concat(t))}var SizeAdaption=function(){function e(e){this.option=e,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(e,"defaultOption",{get:function(){return e._defaultOption},set:function(t){e._defaultOption=t},enumerable:!1,configurable:!0}),e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},e.prototype.resize=function(){var e=this.option,t=e.isEqualScale,r=e.wrapSelector,n=e.viewSelector,i=e.designWidth,o=e.designHeight,a=e.horizontal,s=e.vertical,c=document.querySelector(r);c||elementError("wrap",c);var u=c.clientWidth,l=c.clientHeight,d=document.querySelector(n);d||elementError("view",d),d.style.position="absolute",d.style.width=i+"px",d.style.height=o+"px";var h,f,p,m,g=Math.min(u/i,l/o);if(t){switch(d.style.transform="scale(".concat(g,")"),a){case"center":h=(u-i)/2+"px";break;case"left":h=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(s){case"center":f=(l-o)/2+"px";break;case"top":f=(g-1)/2*o+"px";break;case"bottom":m=(g-1)/2*o+"px"}}else d.style.transform="scale('".concat(u/i,", ").concat(l/o,"')"),h=(u-i)/2+"px",f=(l-o)/2+"px";f?d.style.top=f:m&&(d.style.bottom=m),h?d.style.left=h:p&&(d.style.right=p)},e._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},e}(),Scale=function(){function e(e){this.wrap=null,this.target=null,this.type=0,this.minRatio=1,this.outSize={w:0,h:0},this.inSize={w:0,h:0};var t=e.wrap,r=e.target,n=e.type,i=e.size,o=e.callback;this.size=i,this.type=n,this.initOptions(t,r,i),this.initSize(i),this.layout(),this.scale(o),window.addEventListener("resize",this.reset.bind(this,o))}return e.prototype.reset=function(e){this.initSize(this.size),this.layout(),e?this.scale(e):this.scale()},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.reset.bind(this,void 0))},e.prototype.getDom=function(e){if(_$1.isElement(e))return e;var t=document.querySelector(e);return _$1.isElement(t)?t:null},e.prototype.initOptions=function(e,t,r){this.wrap=this.getDom(e),this.target=this.getDom(t),this.target.style.width=r.w+"px",this.target.style.height=r.h+"px",this.verificationDom()},e.prototype.initSize=function(e){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=e},e.prototype.verificationDom=function(){null!=this.wrap&&null!=this.target&&this.isChildOf(this.wrap,this.target)||console.warn("Please pass in the DOM element correctly!")},e.prototype.layout=function(){if(0==this.type||3==this.type){var e=(this.outSize.w-this.inSize.w)/2,t=(this.outSize.h-this.inSize.h)/2;this.target.style.top=t+"px",this.target.style.left=e+"px"}else this.wrap.style.display="flex",this.wrap.style["align-items"]="center",this.wrap.style["justify-content"]="center",this.target.style.position="static",1==this.type?(this.wrap.style["overflow-y"]="auto",this.wrap.style["overflow-x"]="hidden"):2==this.type&&(this.wrap.style["overflow-y"]="hidden",this.wrap.style["overflow-x"]="auto")},e.prototype.isChildOf=function(e,t){var r;if(e&&t)for(r=e.parentNode;r;){if(t===r)return!0;r=r.parentNode}return!1},e.prototype.scale=function(e){var t=1,r=1;switch(this.type){case 0:t=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),r=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:r=t=this.outSize.w/this.inSize.w;break;case 2:t=r=this.outSize.h/this.inSize.h;break;case 3:t=this.outSize.w/this.inSize.w,r=this.outSize.h/this.inSize.h}e&&e([t,r]),this.target.style.transform="scale(".concat(t,",").concat(r,")")},e.prototype.resize=function(){},e}(),domToImage=createCommonjsModule((function(e){!function(t){var r=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var r=e(t).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var r=window.atob(e.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),o=0;o<n;o++)i[o]=r.charCodeAt(o);t(new Blob([i],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=t,i.href=e,i.href},getAndEncode:function(e){var t=3e4;s.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=c,i.responseType="blob",i.timeout=t,i.open("GET",e,!0),i.send(),s.impl.options.imagePlaceholder){var o=s.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function a(){if(4===i.readyState)if(200===i.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];r(e)},t.readAsDataURL(i.response)}else n?r(n):u("cannot fetch resource: "+e+", status: "+i.status)}function c(){n?r(n):u("timeout of "+t+"ms occured while fetching resource: "+e)}function u(e){console.error(e),r("")}}))},uid:function(){var e=0;return function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(r){setTimeout((function(){r(t)}),e)}))}},asArray:function(e){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src=e}))},width:function(e){var r=t(e,"border-left-width"),n=t(e,"border-right-width");return e.scrollWidth+r+n},height:function(e){var r=t(e,"border-top-width"),n=t(e,"border-bottom-width");return e.scrollHeight+r+n}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var r=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(r.replace("px",""))}}(),n=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,r,o){return a()?Promise.resolve(e):Promise.resolve(e).then(n).then((function(t){var n=Promise.resolve(e);return t.forEach((function(e){n=n.then((function(t){return i(t,e,r,o)}))})),n}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:n,inline:i}};function t(t){return-1!==t.search(e)}function n(t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n[1]);return i.filter((function(e){return!r.isDataUrl(e)}))}function i(e,t,n,i){return Promise.resolve(t).then((function(e){return n?r.resolveUrl(e,n):e})).then(i||r.getAndEncode).then((function(e){return r.dataAsUrl(e,r.mimeType(t))})).then((function(n){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+r.escape(e)+")(['\"]?\\))","g")}(t),"$1"+n+"$3")}))}}(),i=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{r.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return n.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return n.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function t(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?e(i).inline():Promise.all(r.asArray(i.childNodes).map((function(e){return t(e)})))})):Promise.resolve(i);function o(e){var t=e.style.getPropertyValue("background");return t?n.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return r.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||r.getAndEncode).then((function(t){return r.dataAsUrl(t,r.mimeType(e.src))})).then((function(t){return new Promise((function(r,n){e.onload=r,e.onerror=n,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:c,toPng:function(e,t){return u(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return u(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return u(e,t||{}).then(r.canvasToBlob)},toPixelData:function(e,t){return u(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,r.width(e),r.height(e)).data}))},impl:{fontFaces:i,images:o,util:r,inliner:n,options:{}}};function c(e,t){return function(e){void 0===e.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return l(e,t.filter,!0)})).then(d).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(r){e.style[r]=t.style[r]}));return e})).then((function(n){return function(e,t,n){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(r.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+n+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(n,t.width||r.width(e),t.height||r.height(e))}))}function u(e,t){return c(e,t).then(r.makeImage).then(r.delay(100)).then((function(n){var i=function(e){var n=document.createElement("canvas");if(n.width=t.width||r.width(e),n.height=t.height||r.height(e),t.bgcolor){var i=n.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,n.width,n.height)}return n}(e);return i.getContext("2d").drawImage(n,0,0),i}))}function l(e,t,n){return n||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?r.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(n){return function(e,t,n){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,r.asArray(i),n).then((function(){return t}));function o(e,t,r){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return l(t,r)})).then((function(t){t&&e.appendChild(t)}))})),n}}(e,n,t)})).then((function(t){return function(e,t){var n=t;return n instanceof Element?Promise.resolve().then(i).then(o).then(a).then(s).then(c).then((function(){return n})):n;function i(){if(n instanceof HTMLVideoElement){var t=window.getComputedStyle(e),r=document.createElement("canvas");r.width=parseInt(t.width,10),r.height=parseInt(t.height,10);var i=Math.max(e.videoWidth/r.width,e.videoHeight/r.height),o=e.videoWidth/i,a=e.videoHeight/i,s=r.width/2-o/2,c=r.height/2-a/2;r.getContext("2d").drawImage(e,s,c,o,a);var u=n=document.createElement("img");try{u.src=r.toDataURL()}catch(e){u.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}}}function o(){function t(e,t){function n(e,t){r.asArray(e).forEach((function(r){t.setProperty(r,e.getPropertyValue(r),e.getPropertyPriority(r))}))}e.cssText?t.cssText=e.cssText:n(e,t)}t(window.getComputedStyle(e),n.style)}function a(){function t(t){var i=window.getComputedStyle(e,t),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=r.uid();n.className=n.className+" "+a;var s=document.createElement("style");s.appendChild(c(a,t,i)),n.appendChild(s)}function c(e,t,n){var i="."+e+":"+t,o=n.cssText?a(n):s(n);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return r.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){t(e)}))}function s(){e instanceof HTMLTextAreaElement&&(n.innerHTML=e.value),e instanceof HTMLInputElement&&n.setAttribute("value",e.value)}function c(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(e){var t=n.getAttribute(e);t&&n.style.setProperty(e,t)})))}}(e,t)})):Promise.resolve()}function d(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()})),isURL=function(e){if(!e)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(e)},ArrayBufferToBase64=function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return"data:image/jpeg;base64,".concat(window.btoa(t))},dataURLtoFile=function(e,t){void 0===t&&(t="screenshot.jpeg");try{for(var r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}catch(e){console.error("dataURLtoFile:数据转换错误 : "+e)}},transformData=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,11,,12]),"File"!=t||"string"!=typeof e?[3,2]:[4,dataURLtoFile(e)];case 1:case 3:case 5:case 7:return[2,n.sent()];case 2:return"File"!=t||"[object ArrayBuffer]"!=e.toString()?[3,4]:[4,new File([e],"screenshot.jpeg")];case 4:return"Base64"!=t||"string"!=typeof e?[3,6]:[4,e];case 6:return"Base64"!=t||"[object ArrayBuffer]"!=e.toString()?[3,8]:[4,ArrayBufferToBase64(e)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw n.sent();case 10:return[3,12];case 11:return r=n.sent(),console.log(r),[3,12];case 12:return[2]}}))}))},fetch=function(t,r,n,i){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e({url:t,method:"GET",responseType:"arraybuffer",params:{url:r,dom:n,quality:i}})];case 1:return[2,o.sent()];case 2:return o.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:t,path:r,dom:n,quality:i}),[2,null];case 3:return[2]}}))}))},domToImg=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(r=document.querySelector(e)))throw new Error("domToImg:"+e+" dom未被找到!");return[4,domToImage.toJpeg(r,{style:{transform:"scale(1)",position:"static"},quality:t})];case 1:return[2,i.sent()];case 2:return n=i.sent(),console.warn(n),[3,3];case 3:return[2]}}))}))},screenshot=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,n,i,o,a,s,c;return __generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,11,,12]),t=e.dom,r=e.servePath,n=e.targetPath,i=e.quality,o=e.type,a=void 0,isURL(r)&&isURL(n)?[4,fetch(r,n,t,i||.5)]:[3,5];case 1:return(s=u.sent())&&200==s.status&&s.data?(a=s.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 3:a=u.sent(),u.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 6:a=u.sent(),u.label=7;case 7:return a?[4,transformData(a,o)]:[3,9];case 8:return[2,u.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return c=u.sent(),console.error("截图发生错误:"+c),[2,null];case 12:return[2]}}))}))},toHex=function(e){return"".concat(e>15?"":0).concat(e.toString(16))},toHexString=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=void 0===i?1:i;return"#".concat(toHex(t)).concat(toHex(r)).concat(toHex(n)).concat(1===o?"":toHex(Math.floor(255*o)))},toRgbString=function(e){var t=e.r,r=e.g,n=e.b;return"rgb(".concat(t,",").concat(r,",").concat(n,")")},toRgbaString=function(e,t){void 0===t&&(t=1e4);var r=e.r,n=e.g,i=e.b,o=e.a,a=void 0===o?1:o;return"rgba(".concat(r,",").concat(n,",").concat(i,",").concat(Math.floor(a*t)/t,")")},parseHexColor=function(e){var t=e.slice(1),r=1;3===t.length&&(t="".concat(t[0]).concat(t[0]).concat(t[1]).concat(t[1]).concat(t[2]).concat(t[2])),8===t.length&&(r=parseInt(t.slice(6),16)/255,t=t.slice(0,6));var n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:255&n,a:r}},parseRgbaColor=function(e){var t=e.match(/(\d(\.\d+)?)+/g)||[],r=t.map((function(e){return parseInt(e,10)}));return{r:r[0],g:r[1],b:r[2],a:parseFloat(t[3])}},parseColorString=function(e){if(e.startsWith("#"))return parseHexColor(e);if(e.startsWith("rgb"))return parseRgbaColor(e);if("transparent"===e)return parseHexColor("#00000000");throw new Error("color string error: ".concat(e))},getColorInfo=function(e){var t=parseColorString(e);return{hex:toHexString(t),rgba:toRgbaString(t),rgb:toRgbString(t),rgbaObj:t}},hexToRgba=function(e){var t=parseColorString(e);return toRgbaString(t)},rgbaToHex=function(e){var t=parseColorString(e);return toHexString(t)},errCode=new Map([["E1001","系统未知错误"],["E1002","vue逻辑错误"],["E1003","JavaScript错误"],["E1004","静态资源加载错误"],["E1005","请求错误"],["E1006","Promise错误"]]),watchError=function(e,t){e.config.errorHandler=function(e){console.error("监测到E1002错误"),console.error(e.filename),errorHandler("E1002",e.name+":"+e.message,t)},window.addEventListener("error",(function(e){e.message?(console.error("监测到E1003错误"),errorHandler("E1003",e.message,e.filename,t)):(console.error("监测到E1004错误"),errorHandler("E1004",e.target.currentSrc,e.filename,t))}),!0)},errorHandler=function(e,t,r,n){void 0===n&&(n="null"),saveLog({code:e,type:errCode.get("".concat(e)),msg:t,router:r.currentRoute.value.fullPath,file:n,createTime:(new Date).toLocaleString()})},saveLog=function(e){var t=localStorage.getItem("ERROR");if(t){var r=JSON.parse(t);sortArray(r),r.length>50?(r[0]=e,sortArray(r)):r.push(e),localStorage.setItem("ERROR",JSON.stringify(r))}else localStorage.setItem("ERROR",JSON.stringify([e]))},sortArray=function(e){e.sort((function(e,t){return e.createTime>t.createTime?1:-1}))},index$1=Object.freeze({__proto__:null,RecursiveList:RecursiveList,Scale:Scale,SizeAdaption:SizeAdaption,UpdataForContainer:UpdataForContainer,Watermark:Watermark,arraySwap:arraySwap,arraySwapDeep:arraySwapDeep,arraySwapForId:arraySwapForId,breakUp:breakUp,checkBaseData:checkBaseData,checkVar:checkVar,comToggle:comToggle,decrypAES:decrypAES,decrypt:decrypt,encrypt:encrypt$1,errorHandler:errorHandler,executeFilter:executeFilter,exportJson:exportJson,findItem:findItem,findItemDeep:findItemDeep$1,findItemIndexDeep:findItemIndexDeep,findParentDeep:findParentDeep,genCopyName:genCopyName,genID:genID,generateCaseDataJson:generateCaseDataJson,generateComponentList:generateComponentList,generateJson:generateJson,generatePageData:generatePageData,getAncestorsNodes:getAncestorsNodes,getColorInfo:getColorInfo,getDataForEvaluator:getDataForEvaluator,getInteractive:getInteractive,getInteractive2:getInteractive2,getLength:getLength,getPosition:getPosition,getSessionData:getSessionData,getShareTree:getShareTree,getStandardData:getStandardData,getUrlParams:getUrlParams,globalSourceTemp:globalSourceTemp,hasVar:hasVar,hexToRgba:hexToRgba,isJSON:isJSON,isPeer:isPeer,loadFont:loadFont,loadFontResource:loadFontResource,loadScript:loadScript,loadTag:loadTag,parseColorString:parseColorString,parseHexColor:parseHexColor,parseRgbaColor:parseRgbaColor,recursion:recursion,removeTag:removeTag,resetID:resetID,resetPositionForGroup:resetPositionForGroup,resizeListPosition:resizeListPosition,resizePosition:resizePosition,resziePositionForGroup:resziePositionForGroup,rgbaToHex:rgbaToHex,safeConvertToNumber:safeConvertToNumber,safeEval:safeEval,screenshot:screenshot,selectdArea:selectdArea,setActions:setActions,setAttr:setAttr,setIndex:setIndex,setPorp:setPorp,setPositionForGroup:setPositionForGroup,setPositionForWorld:setPositionForWorld,setSessionData:setSessionData,toHex:toHex,toHexString:toHexString,toRgbString:toRgbString,toRgbaString:toRgbaString,transformPosition:transformPosition,upDataGroup:upDataGroup,upDataGroupChildren:upDataGroupChildren,updataAttribute:updataAttribute,updataAttributeForOption:updataAttributeForOption,updataSizeDeep:updataSizeDeep,validateAndFixObject:validateAndFixObject,watchError:watchError});function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
44
+ ***************************************************************************** */function __extends(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},__assign.apply(this,arguments)};function __spreadArray(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var _global="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,keys=Object.keys,isArray=Array.isArray;function extend(e,t){return"object"!=typeof t||keys(t).forEach((function(r){e[r]=t[r]})),e}"undefined"==typeof Promise||_global.Promise||(_global.Promise=Promise);var getProto=Object.getPrototypeOf,_hasOwn={}.hasOwnProperty;function hasOwn(e,t){return _hasOwn.call(e,t)}function props(e,t){"function"==typeof t&&(t=t(getProto(e))),("undefined"==typeof Reflect?keys:Reflect.ownKeys)(t).forEach((function(r){setProp(e,r,t[r])}))}var defineProperty=Object.defineProperty;function setProp(e,t,r,n){defineProperty(e,t,extend(r&&hasOwn(r,"get")&&"function"==typeof r.get?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},n))}function derive(e){return{from:function(t){return e.prototype=Object.create(t.prototype),setProp(e.prototype,"constructor",e),{extend:props.bind(null,e.prototype)}}}}var getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;function getPropertyDescriptor(e,t){var r;return getOwnPropertyDescriptor(e,t)||(r=getProto(e))&&getPropertyDescriptor(r,t)}var _slice$1=[].slice;function slice(e,t,r){return _slice$1.call(e,t,r)}function override(e,t){return t(e)}function assert(e){if(!e)throw new Error("Assertion Failed")}function asap$1(e){_global.setImmediate?setImmediate(e):setTimeout(e,0)}function arrayToObject(e,t){return e.reduce((function(e,r,n){var i=t(r,n);return i&&(e[i[0]]=i[1]),e}),{})}function getByKeyPath(e,t){if("string"==typeof t&&hasOwn(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var r=[],n=0,i=t.length;n<i;++n){var o=getByKeyPath(e,t[n]);r.push(o)}return r}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return null==s?void 0:getByKeyPath(s,t.substr(a+1))}}function setByKeyPath(e,t,r){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){assert("string"!=typeof r&&"length"in r);for(var n=0,i=t.length;n<i;++n)setByKeyPath(e,t[n],r[n])}else{var o=t.indexOf(".");if(-1!==o){var a=t.substr(0,o),s=t.substr(o+1);if(""===s)void 0===r?isArray(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=r;else{var c=e[a];c&&hasOwn(e,a)||(c=e[a]={}),setByKeyPath(c,s,r)}}else void 0===r?isArray(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function delByKeyPath(e,t){"string"==typeof t?setByKeyPath(e,t,void 0):"length"in t&&[].map.call(t,(function(t){setByKeyPath(e,t,void 0)}))}function shallowClone(e){var t={};for(var r in e)hasOwn(e,r)&&(t[r]=e[r]);return t}var concat=[].concat;function flatten(e){return concat.apply([],e)}var intrinsicTypeNames="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(flatten([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return _global[e]})),intrinsicTypes=new Set(intrinsicTypeNames.map((function(e){return _global[e]})));function cloneSimpleObjectTree(e){var t={};for(var r in e)if(hasOwn(e,r)){var n=e[r];t[r]=!n||"object"!=typeof n||intrinsicTypes.has(n.constructor)?n:cloneSimpleObjectTree(n)}return t}function objectIsEmpty(e){for(var t in e)if(hasOwn(e,t))return!1;return!0}var circularRefs=null;function deepClone(e){circularRefs=new WeakMap;var t=innerDeepClone(e);return circularRefs=null,t}function innerDeepClone(e){if(!e||"object"!=typeof e)return e;var t=circularRefs.get(e);if(t)return t;if(isArray(e)){t=[],circularRefs.set(e,t);for(var r=0,n=e.length;r<n;++r)t.push(innerDeepClone(e[r]))}else if(intrinsicTypes.has(e.constructor))t=e;else{var i=getProto(e);for(var o in t=i===Object.prototype?{}:Object.create(i),circularRefs.set(e,t),e)hasOwn(e,o)&&(t[o]=innerDeepClone(e[o]))}return t}var toString={}.toString;function toStringTag(e){return toString.call(e).slice(8,-1)}var iteratorSymbol="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",getIteratorOf="symbol"==typeof iteratorSymbol?function(e){var t;return null!=e&&(t=e[iteratorSymbol])&&t.apply(e)}:function(){return null};function delArrayItem(e,t){var r=e.indexOf(t);return r>=0&&e.splice(r,1),r>=0}var NO_CHAR_ARRAY={};function getArrayOf(e){var t,r,n,i;if(1===arguments.length){if(isArray(e))return e.slice();if(this===NO_CHAR_ARRAY&&"string"==typeof e)return[e];if(i=getIteratorOf(e)){for(r=[];!(n=i.next()).done;)r.push(n.value);return r}if(null==e)return[e];if("number"==typeof(t=e.length)){for(r=new Array(t);t--;)r[t]=e[t];return r}return[e]}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var isAsyncFunction="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},dexieErrorNames=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],idbDomErrorNames=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],errorList=dexieErrorNames.concat(idbDomErrorNames),defaultTexts={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function DexieError(e,t){this.name=e,this.message=t}function getMultiErrorMessage(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,r){return r.indexOf(e)===t})).join("\n")}function ModifyError(e,t,r,n){this.failures=t,this.failedKeys=n,this.successCount=r,this.message=getMultiErrorMessage(e,t)}function BulkError(e,t){this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=getMultiErrorMessage(e,this.failures)}derive(DexieError).from(Error).extend({toString:function(){return this.name+": "+this.message}}),derive(ModifyError).from(DexieError),derive(BulkError).from(DexieError);var errnames=errorList.reduce((function(e,t){return e[t]=t+"Error",e}),{}),BaseException=DexieError,exceptions=errorList.reduce((function(e,t){var r=t+"Error";function n(e,n){this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=defaultTexts[t]||r,this.inner=null)}return derive(n).from(BaseException),e[t]=n,e}),{});exceptions.Syntax=SyntaxError,exceptions.Type=TypeError,exceptions.Range=RangeError;var exceptionMap=idbDomErrorNames.reduce((function(e,t){return e[t+"Error"]=exceptions[t],e}),{});function mapError(e,t){if(!e||e instanceof DexieError||e instanceof TypeError||e instanceof SyntaxError||!e.name||!exceptionMap[e.name])return e;var r=new exceptionMap[e.name](t||e.message,e);return"stack"in e&&setProp(r,"stack",{get:function(){return this.inner.stack}}),r}var fullNameExceptions=errorList.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=exceptions[t]),e}),{});function nop(){}function mirror(e){return e}function pureFunctionChain(e,t){return null==e||e===mirror?t:function(r){return t(e(r))}}function callBoth(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function hookCreatingChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);void 0!==r&&(arguments[0]=r);var n=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var o=t.apply(this,arguments);return n&&(this.onsuccess=this.onsuccess?callBoth(n,this.onsuccess):n),i&&(this.onerror=this.onerror?callBoth(i,this.onerror):i),void 0!==o?o:r}}function hookDeletingChain(e,t){return e===nop?t:function(){e.apply(this,arguments);var r=this.onsuccess,n=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?callBoth(r,this.onsuccess):r),n&&(this.onerror=this.onerror?callBoth(n,this.onerror):n)}}function hookUpdatingChain(e,t){return e===nop?t:function(r){var n=e.apply(this,arguments);extend(r,n);var i=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?callBoth(i,this.onsuccess):i),o&&(this.onerror=this.onerror?callBoth(o,this.onerror):o),void 0===n?void 0===a?void 0:a:extend(n,a)}}function reverseStoppableEventChain(e,t){return e===nop?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function promisableChain(e,t){return e===nop?t:function(){var r=e.apply(this,arguments);if(r&&"function"==typeof r.then){for(var n=this,i=arguments.length,o=new Array(i);i--;)o[i]=arguments[i];return r.then((function(){return t.apply(n,o)}))}return t.apply(this,arguments)}}fullNameExceptions.ModifyError=ModifyError,fullNameExceptions.DexieError=DexieError,fullNameExceptions.BulkError=BulkError;var debug="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function setDebug(e,t){debug=e}var INTERNAL={},ZONE_ECHO_LIMIT=100,_a$1="undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,getProto(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,getProto(t),e]}(),resolvedNativePromise=_a$1[0],nativePromiseProto=_a$1[1],resolvedGlobalPromise=_a$1[2],nativePromiseThen=nativePromiseProto&&nativePromiseProto.then,NativePromise=resolvedNativePromise&&resolvedNativePromise.constructor,patchGlobalPromise=!!resolvedGlobalPromise;function schedulePhysicalTick(){queueMicrotask(physicalTick)}var asap=function(e,t){microtickQueue.push([e,t]),needsNewPhysicalTick&&(schedulePhysicalTick(),needsNewPhysicalTick=!1)},isOutsideMicroTick=!0,needsNewPhysicalTick=!0,unhandledErrors=[],rejectingErrors=[],rejectionMapper=mirror,globalPSD={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nop,pgp:!1,env:{},finalize:nop},PSD=globalPSD,microtickQueue=[],numScheduledCalls=0,tickFinalizers=[];function DexiePromise(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=PSD;if("function"!=typeof e){if(e!==INTERNAL)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&handleRejection(this,this._value))}this._state=null,this._value=null,++t.ref,executePromiseTask(this,e)}var thenProp={get:function(){var e=PSD,t=totalEchoes;function r(r,n){var i=this,o=!e.global&&(e!==PSD||t!==totalEchoes),a=o&&!decrementExpectedAwaits(),s=new DexiePromise((function(t,s){propagateToListener(i,new Listener(nativeAwaitCompatibleWrap(r,e,o,a),nativeAwaitCompatibleWrap(n,e,o,a),t,s,e))}));return this._consoleTask&&(s._consoleTask=this._consoleTask),s}return r.prototype=INTERNAL,r},set:function(e){setProp(this,"then",e&&e.prototype===INTERNAL?thenProp:{get:function(){return e},set:thenProp.set})}};function Listener(e,t,r,n,i){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=r,this.reject=n,this.psd=i}function executePromiseTask(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var r=e._lib&&beginMicroTickScope();t&&"function"==typeof t.then?executePromiseTask(e,(function(e,r){t instanceof DexiePromise?t._then(e,r):t.then(e,r)})):(e._state=!0,e._value=t,propagateAllListeners(e)),r&&endMicroTickScope()}}),handleRejection.bind(null,e))}catch(t){handleRejection(e,t)}}function handleRejection(e,t){if(rejectingErrors.push(t),null===e._state){var r=e._lib&&beginMicroTickScope();t=rejectionMapper(t),e._state=!1,e._value=t,addPossiblyUnhandledError(e),propagateAllListeners(e),r&&endMicroTickScope()}}function propagateAllListeners(e){var t=e._listeners;e._listeners=[];for(var r=0,n=t.length;r<n;++r)propagateToListener(e,t[r]);var i=e._PSD;--i.ref||i.finalize(),0===numScheduledCalls&&(++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[]))}function propagateToListener(e,t){if(null!==e._state){var r=e._state?t.onFulfilled:t.onRejected;if(null===r)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++numScheduledCalls,asap(callListener,[r,e,t])}else e._listeners.push(t)}function callListener(e,t,r){try{var n,i=t._value;!t._state&&rejectingErrors.length&&(rejectingErrors=[]),n=debug&&t._consoleTask?t._consoleTask.run((function(){return e(i)})):e(i),t._state||-1!==rejectingErrors.indexOf(i)||markErrorAsHandled(t),r.resolve(n)}catch(e){r.reject(e)}finally{0==--numScheduledCalls&&finalizePhysicalTick(),--r.psd.ref||r.psd.finalize()}}function physicalTick(){usePSD(globalPSD,(function(){beginMicroTickScope()&&endMicroTickScope()}))}function beginMicroTickScope(){var e=isOutsideMicroTick;return isOutsideMicroTick=!1,needsNewPhysicalTick=!1,e}function endMicroTickScope(){var e,t,r;do{for(;microtickQueue.length>0;)for(e=microtickQueue,microtickQueue=[],r=e.length,t=0;t<r;++t){var n=e[t];n[0].apply(null,n[1])}}while(microtickQueue.length>0);isOutsideMicroTick=!0,needsNewPhysicalTick=!0}function finalizePhysicalTick(){var e=unhandledErrors;unhandledErrors=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=tickFinalizers.slice(0),r=t.length;r;)t[--r]()}function run_at_end_of_this_or_next_physical_tick(e){tickFinalizers.push((function t(){e(),tickFinalizers.splice(tickFinalizers.indexOf(t),1)})),++numScheduledCalls,asap((function(){0==--numScheduledCalls&&finalizePhysicalTick()}),[])}function addPossiblyUnhandledError(e){unhandledErrors.some((function(t){return t._value===e._value}))||unhandledErrors.push(e)}function markErrorAsHandled(e){for(var t=unhandledErrors.length;t;)if(unhandledErrors[--t]._value===e._value)return void unhandledErrors.splice(t,1)}function PromiseReject(e){return new DexiePromise(INTERNAL,!1,e)}function wrap$1(e,t){var r=PSD;return function(){var n=beginMicroTickScope(),i=PSD;try{return switchToZone(r,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{switchToZone(i,!1),n&&endMicroTickScope()}}}props(DexiePromise.prototype,{then:thenProp,_then:function(e,t){propagateToListener(this,new Listener(null,null,e,t,PSD))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],r=arguments[1];return"function"==typeof t?this.then(null,(function(e){return e instanceof t?r(e):PromiseReject(e)})):this.then(null,(function(e){return e&&e.name===t?r(e):PromiseReject(e)}))},finally:function(e){return this.then((function(t){return DexiePromise.resolve(e()).then((function(){return t}))}),(function(t){return DexiePromise.resolve(e()).then((function(){return PromiseReject(t)}))}))},timeout:function(e,t){var r=this;return e<1/0?new DexiePromise((function(n,i){var o=setTimeout((function(){return i(new exceptions.Timeout(t))}),e);r.then(n,i).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&setProp(DexiePromise.prototype,Symbol.toStringTag,"Dexie.Promise"),globalPSD.env=snapShot(),props(DexiePromise,{all:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&t([]);var n=e.length;e.forEach((function(i,o){return DexiePromise.resolve(i).then((function(r){e[o]=r,--n||t(e)}),r)}))}))},resolve:function(e){return e instanceof DexiePromise?e:e&&"function"==typeof e.then?new DexiePromise((function(t,r){e.then(t,r)})):new DexiePromise(INTERNAL,!0,e)},reject:PromiseReject,race:function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){e.map((function(e){return DexiePromise.resolve(e).then(t,r)}))}))},PSD:{get:function(){return PSD},set:function(e){return PSD=e}},totalEchoes:{get:function(){return totalEchoes}},newPSD:newScope,usePSD:usePSD,scheduler:{get:function(){return asap},set:function(e){asap=e}},rejectionMapper:{get:function(){return rejectionMapper},set:function(e){rejectionMapper=e}},follow:function(e,t){return new DexiePromise((function(r,n){return newScope((function(t,r){var n=PSD;n.unhandleds=[],n.onunhandled=r,n.finalize=callBoth((function(){var e=this;run_at_end_of_this_or_next_physical_tick((function(){0===e.unhandleds.length?t():r(e.unhandleds[0])}))}),n.finalize),e()}),t,r,n)}))}}),NativePromise&&(NativePromise.allSettled&&setProp(DexiePromise,"allSettled",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t){0===e.length&&t([]);var r=e.length,n=new Array(r);e.forEach((function(e,i){return DexiePromise.resolve(e).then((function(e){return n[i]={status:"fulfilled",value:e}}),(function(e){return n[i]={status:"rejected",reason:e}})).then((function(){return--r||t(n)}))}))}))})),NativePromise.any&&"undefined"!=typeof AggregateError&&setProp(DexiePromise,"any",(function(){var e=getArrayOf.apply(null,arguments).map(onPossibleParallellAsync);return new DexiePromise((function(t,r){0===e.length&&r(new AggregateError([]));var n=e.length,i=new Array(n);e.forEach((function(e,o){return DexiePromise.resolve(e).then((function(e){return t(e)}),(function(e){i[o]=e,--n||r(new AggregateError(i))}))}))}))})));var task={awaits:0,echoes:0,id:0},taskCounter=0,zoneStack=[],zoneEchoes=0,totalEchoes=0,zone_id_counter=0;function newScope(e,t,r,n){var i=PSD,o=Object.create(i);o.parent=i,o.ref=0,o.global=!1,o.id=++zone_id_counter,globalPSD.env,o.env=patchGlobalPromise?{Promise:DexiePromise,PromiseProp:{value:DexiePromise,configurable:!0,writable:!0},all:DexiePromise.all,race:DexiePromise.race,allSettled:DexiePromise.allSettled,any:DexiePromise.any,resolve:DexiePromise.resolve,reject:DexiePromise.reject}:{},t&&extend(o,t),++i.ref,o.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=usePSD(o,e,r,n);return 0===o.ref&&o.finalize(),a}function incrementExpectedAwaits(){return task.id||(task.id=++taskCounter),++task.awaits,task.echoes+=ZONE_ECHO_LIMIT,task.id}function decrementExpectedAwaits(){return!!task.awaits&&(0==--task.awaits&&(task.id=0),task.echoes=task.awaits*ZONE_ECHO_LIMIT,!0)}function onPossibleParallellAsync(e){return task.echoes&&e&&e.constructor===NativePromise?(incrementExpectedAwaits(),e.then((function(e){return decrementExpectedAwaits(),e}),(function(e){return decrementExpectedAwaits(),rejection(e)}))):e}function zoneEnterEcho(e){++totalEchoes,task.echoes&&0!=--task.echoes||(task.echoes=task.awaits=task.id=0),zoneStack.push(PSD),switchToZone(e,!0)}function zoneLeaveEcho(){var e=zoneStack[zoneStack.length-1];zoneStack.pop(),switchToZone(e,!1)}function switchToZone(e,t){var r=PSD;if((t?!task.echoes||zoneEchoes++&&e===PSD:!zoneEchoes||--zoneEchoes&&e===PSD)||queueMicrotask(t?zoneEnterEcho.bind(null,e):zoneLeaveEcho),e!==PSD&&(PSD=e,r===globalPSD&&(globalPSD.env=snapShot()),patchGlobalPromise)){var n=globalPSD.env.Promise,i=e.env;(r.global||e.global)&&(Object.defineProperty(_global,"Promise",i.PromiseProp),n.all=i.all,n.race=i.race,n.resolve=i.resolve,n.reject=i.reject,i.allSettled&&(n.allSettled=i.allSettled),i.any&&(n.any=i.any))}}function snapShot(){var e=_global.Promise;return patchGlobalPromise?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(_global,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function usePSD(e,t,r,n,i){var o=PSD;try{return switchToZone(e,!0),t(r,n,i)}finally{switchToZone(o,!1)}}function nativeAwaitCompatibleWrap(e,t,r,n){return"function"!=typeof e?e:function(){var i=PSD;r&&incrementExpectedAwaits(),switchToZone(t,!0);try{return e.apply(this,arguments)}finally{switchToZone(i,!1),n&&queueMicrotask(decrementExpectedAwaits)}}}function execInGlobalContext(e){Promise===NativePromise&&0===task.echoes?0===zoneEchoes?e():enqueueNativeMicroTask(e):setTimeout(e,0)}-1===(""+nativePromiseThen).indexOf("[native code]")&&(incrementExpectedAwaits=decrementExpectedAwaits=nop);var rejection=DexiePromise.reject;function tempTransaction(e,t,r,n){if(e.idbdb&&(e._state.openComplete||PSD.letThrough||e._vip)){var i=e._createTransaction(t,r,e._dbSchema);try{i.create(),e._state.PR1398_maxLoop=3}catch(i){return i.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return tempTransaction(e,t,r,n)}))):rejection(i)}return i._promise(t,(function(e,t){return newScope((function(){return PSD.trans=i,n(e,t,i)}))})).then((function(e){if("readwrite"===t)try{i.idbtrans.commit()}catch(e){}return"readonly"===t?e:i._completion.then((function(){return e}))}))}if(e._state.openComplete)return rejection(new exceptions.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._state.autoOpen)return rejection(new exceptions.DatabaseClosed);e.open().catch(nop)}return e._state.dbReadyPromise.then((function(){return tempTransaction(e,t,r,n)}))}var DEXIE_VERSION="4.0.4",maxString=String.fromCharCode(65535),minKey=-1/0,INVALID_KEY_ARGUMENT="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",STRING_EXPECTED="String expected.",connections=[],DBNAMES_DB="__dbnames",READONLY="readonly",READWRITE="readwrite";function combine(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var AnyRange={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function workaroundForUndefinedPrimKey(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=deepClone(t))[e],t}}function Entity(){throw exceptions.Type()}function cmp(e,t){try{var r=type(e),n=type(t);if(r!==n)return"Array"===r?1:"Array"===n?-1:"binary"===r?1:"binary"===n?-1:"string"===r?1:"string"===n?-1:"Date"===r?1:"Date"!==n?NaN:-1;switch(r){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return compareUint8Arrays(getUint8Array(e),getUint8Array(t));case"Array":return compareArrays(e,t)}}catch(e){}return NaN}function compareArrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o){var a=cmp(e[o],t[o]);if(0!==a)return a}return r===n?0:r<n?-1:1}function compareUint8Arrays(e,t){for(var r=e.length,n=t.length,i=r<n?r:n,o=0;o<i;++o)if(e[o]!==t[o])return e[o]<t[o]?-1:1;return r===n?0:r<n?-1:1}function type(e){var t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var r=toStringTag(e);return"ArrayBuffer"===r?"binary":r}function getUint8Array(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Table=function(){function e(){}return e.prototype._trans=function(e,t,r){var n=this._tx||PSD.trans,i=this.name,o=debug&&"undefined"!=typeof console&&console.createTask&&console.createTask("Dexie: ".concat("readonly"===e?"read":"write"," ").concat(this.name));function a(e,r,n){if(!n.schema[i])throw new exceptions.NotFound("Table "+i+" not part of transaction");return t(n.idbtrans,n)}var s=beginMicroTickScope();try{var c=n&&n.db._novip===this.db._novip?n===PSD.trans?n._promise(e,a,r):newScope((function(){return n._promise(e,a,r)}),{trans:n,transless:PSD.transless||PSD}):tempTransaction(this.db,e,[this.name],a);return o&&(c._consoleTask=o,c=c.catch((function(e){return console.trace(e),rejection(e)}))),c}finally{s&&endMicroTickScope()}},e.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):null==e?rejection(new exceptions.Type("Invalid argument to Table.get()")):this._trans("readonly",(function(t){return r.core.get({trans:t,key:e}).then((function(e){return r.hook.reading.fire(e)}))})).then(t)},e.prototype.where=function(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(isArray(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=keys(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){if(e.compound&&t.every((function(t){return e.keyPath.indexOf(t)>=0}))){for(var r=0;r<t.length;++r)if(-1===t.indexOf(e.keyPath[r]))return!1;return!0}return!1})).sort((function(e,t){return e.keyPath.length-t.keyPath.length}))[0];if(r&&this.db._maxKey!==maxString){var n=r.keyPath.slice(0,t.length);return this.where(n).equals(n.map((function(t){return e[t]})))}!r&&debug&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName,o=this.db._deps.indexedDB;function a(e,t){return 0===o.cmp(e,t)}var s=t.reduce((function(t,r){var n=t[0],o=t[1],s=i[r],c=e[r];return[n||s,n||!s?combine(o,s&&s.multi?function(e){var t=getByKeyPath(e,r);return isArray(t)&&t.some((function(e){return a(c,e)}))}:function(e){return a(c,getByKeyPath(e,r))}):o]}),[null,null]),c=s[0],u=s[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(u):r?this.filter(u):this.where(t).equals("")},e.prototype.filter=function(e){return this.toCollection().and(e)},e.prototype.count=function(e){return this.toCollection().count(e)},e.prototype.offset=function(e){return this.toCollection().offset(e)},e.prototype.limit=function(e){return this.toCollection().limit(e)},e.prototype.each=function(e){return this.toCollection().each(e)},e.prototype.toArray=function(e){return this.toCollection().toArray(e)},e.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},e.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,isArray(e)?"[".concat(e.join("+"),"]"):e))},e.prototype.reverse=function(){return this.toCollection().reverse()},e.prototype.mapToClass=function(e){var t=this.db,r=this.name;this.schema.mappedClass=e,e.prototype instanceof Entity&&(e=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return __extends(n,e),Object.defineProperty(n.prototype,"db",{get:function(){return t},enumerable:!1,configurable:!0}),n.prototype.table=function(){return r},n}(e));for(var n=new Set,i=e.prototype;i;i=getProto(i))Object.getOwnPropertyNames(i).forEach((function(e){return n.add(e)}));var o=function(t){if(!t)return t;var r=Object.create(e.prototype);for(var i in t)if(!n.has(i))try{r[i]=t[i]}catch(e){}return r};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=o,this.hook("reading",o),e},e.prototype.defineClass=function(){return this.mapToClass((function(e){extend(this,e)}))},e.prototype.add=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.update=function(e,t){if("object"!=typeof e||isArray(e))return this.where(":id").equals(e).modify(t);var r=getByKeyPath(e,this.schema.primKey.keyPath);return void 0===r?rejection(new exceptions.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(r).modify(t)},e.prototype.put=function(e,t){var r=this,n=this.schema.primKey,i=n.auto,o=n.keyPath,a=e;return o&&i&&(a=workaroundForUndefinedPrimKey(o)(e)),this._trans("readwrite",(function(e){return r.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):e.lastResult})).then((function(t){if(o)try{setByKeyPath(e,o,t)}catch(e){}return t}))},e.prototype.delete=function(e){var t=this;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.clear=function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:AnyRange})})).then((function(e){return e.numFailures?DexiePromise.reject(e.failures[0]):void 0}))},e.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",(function(r){return t.core.getMany({keys:e,trans:r}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))},e.prototype.bulkAdd=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"add",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(c," operations failed"),a)}))}))},e.prototype.bulkPut=function(e,t,r){var n=this,i=Array.isArray(t)?t:void 0,o=(r=r||(i?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",(function(t){var r=n.schema.primKey,a=r.auto,s=r.keyPath;if(s&&i)throw new exceptions.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(i&&i.length!==e.length)throw new exceptions.InvalidArgument("Arguments objects and keys must have the same length");var c=e.length,u=s&&a?e.map(workaroundForUndefinedPrimKey(s)):e;return n.core.mutate({trans:t,type:"put",keys:i,values:u,wantResults:o}).then((function(e){var t=e.numFailures,r=e.results,i=e.lastResult,a=e.failures;if(0===t)return o?r:i;throw new BulkError("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(c," operations failed"),a)}))}))},e.prototype.bulkUpdate=function(e){var t=this,r=this.core,n=e.map((function(e){return e.key})),i=e.map((function(e){return e.changes})),o=[];return this._trans("readwrite",(function(a){return r.getMany({trans:a,keys:n,cache:"clone"}).then((function(s){var c=[],u=[];e.forEach((function(e,r){var n=e.key,i=e.changes,a=s[r];if(a){for(var l=0,d=Object.keys(i);l<d.length;l++){var h=d[l],f=i[h];if(h===t.schema.primKey.keyPath){if(0!==cmp(f,n))throw new exceptions.Constraint("Cannot update primary key in bulkUpdate()")}else setByKeyPath(a,h,f)}o.push(r),c.push(n),u.push(a)}}));var l=c.length;return r.mutate({trans:a,type:"put",keys:c,values:u,updates:{keys:n,changeSpecs:i}}).then((function(e){var r=e.numFailures,n=e.failures;if(0===r)return l;for(var i=0,a=Object.keys(n);i<a.length;i++){var s=a[i],c=o[Number(s)];if(null!=c){var u=n[s];delete n[s],n[c]=u}}throw new BulkError("".concat(t.name,".bulkUpdate(): ").concat(r," of ").concat(l," operations failed"),n)}))}))}))},e.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",(function(r){return t.core.mutate({trans:r,type:"delete",keys:e})})).then((function(e){var n=e.numFailures,i=e.lastResult,o=e.failures;if(0===n)return i;throw new BulkError("".concat(t.name,".bulkDelete(): ").concat(n," of ").concat(r," operations failed"),o)}))},e}();function Events(e){var t={},r=function(r,n){if(n){for(var i=arguments.length,o=new Array(i-1);--i;)o[i-1]=arguments[i];return t[r].subscribe.apply(null,o),e}if("string"==typeof r)return t[r]};r.addEventType=o;for(var n=1,i=arguments.length;n<i;++n)o(arguments[n]);return r;function o(e,n,i){if("object"!=typeof e){var a;n||(n=reverseStoppableEventChain),i||(i=nop);var s={subscribers:[],fire:i,subscribe:function(e){-1===s.subscribers.indexOf(e)&&(s.subscribers.push(e),s.fire=n(s.fire,e))},unsubscribe:function(e){s.subscribers=s.subscribers.filter((function(t){return t!==e})),s.fire=s.subscribers.reduce(n,i)}};return t[e]=r[e]=s,s}keys(a=e).forEach((function(e){var t=a[e];if(isArray(t))o(e,a[e][0],a[e][1]);else{if("asap"!==t)throw new exceptions.InvalidArgument("Invalid event config");var r=o(e,mirror,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){asap$1((function(){e.apply(null,t)}))}))}))}}))}}function makeClassConstructor(e,t){return derive(t).from({prototype:e}),t}function createTableConstructor(e){return makeClassConstructor(Table.prototype,(function(t,r,n){this.db=e,this._tx=n,this.name=t,this.schema=r,this.hook=e._allTables[t]?e._allTables[t].hook:Events(null,{creating:[hookCreatingChain,nop],reading:[pureFunctionChain,mirror],updating:[hookUpdatingChain,nop],deleting:[hookDeletingChain,nop]})}))}function isPlainKeyRange(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function addFilter(e,t){e.filter=combine(e.filter,t)}function addReplayFilter(e,t,r){var n=e.replayFilter;e.replayFilter=n?function(){return combine(n(),t())}:t,e.justLimit=r&&!n}function addMatchFilter(e,t){e.isMatch=combine(e.isMatch,t)}function getIndexOrStore(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new exceptions.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function openCursor(e,t,r){var n=getIndexOrStore(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:n,range:e.range}})}function iter(e,t,r,n){var i=e.replayFilter?combine(e.filter,e.replayFilter()):e.filter;if(e.or){var o={},a=function(e,r,n){if(!i||i(r,n,(function(e){return r.stop(e)}),(function(e){return r.fail(e)}))){var a=r.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),hasOwn(o,s)||(o[s]=!0,t(e,r,n))}};return Promise.all([e.or._iterate(a,r),iterate(openCursor(e,n,r),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return iterate(openCursor(e,n,r),combine(e.algorithm,i),t,!e.keysOnly&&e.valueMapper)}function iterate(e,t,r,n){var i=n?function(e,t,i){return r(n(e),t,i)}:r,o=wrap$1(i);return e.then((function(e){if(e)return e.start((function(){var r=function(){return e.continue()};t&&!t(e,(function(e){return r=e}),(function(t){e.stop(t),r=nop}),(function(t){e.fail(t),r=nop}))||o(e.value,e,(function(e){return r=e})),r()}))}))}var PropModification=function(){function e(e){Object.assign(this,e)}return e.prototype.execute=function(e){var t,r=null===(t=this.replacePrefix)||void 0===t?void 0:t[0];return r&&"string"==typeof e&&e.startsWith(r)?this.replacePrefix[1]+e.substring(r.length):e},e}(),Collection=function(){function e(){}return e.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,rejection.bind(null,r.error)):r.table._trans("readonly",e).then(t)},e.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,rejection.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},e.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=combine(t.algorithm,e)},e.prototype._iterate=function(e,t){return iter(this._ctx,e,t,this._ctx.table.core)},e.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&extend(r,e),t._ctx=r,t},e.prototype.raw=function(){return this._ctx.valueMapper=null,this},e.prototype.each=function(e){var t=this._ctx;return this._read((function(r){return iter(t,e,r,t.table.core)}))},e.prototype.count=function(e){var t=this;return this._read((function(e){var r=t._ctx,n=r.table.core;if(isPlainKeyRange(r,!0))return n.count({trans:e,query:{index:getIndexOrStore(r,n.schema),range:r.range}}).then((function(e){return Math.min(e,r.limit)}));var i=0;return iter(r,(function(){return++i,!1}),e,n).then((function(){return i}))})).then(e)},e.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),n=r[0],i=r.length-1;function o(e,t){return t?o(e[r[t]],t-1):e[n]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var r=o(e,i),n=o(t,i);return r<n?-a:r>n?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)},e.prototype.toArray=function(e){var t=this;return this._read((function(e){var r=t._ctx;if("next"===r.dir&&isPlainKeyRange(r,!0)&&r.limit>0){var n=r.valueMapper,i=getIndexOrStore(r,r.table.core.schema);return r.table.core.query({trans:e,limit:r.limit,values:!0,query:{index:i,range:r.range}}).then((function(e){var t=e.result;return n?t.map(n):t}))}var o=[];return iter(r,(function(e){return o.push(e)}),e,r.table.core).then((function(){return o}))}),e)},e.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,isPlainKeyRange(t)?addReplayFilter(t,(function(){var t=e;return function(e,r){return 0===t||(1===t?(--t,!1):(r((function(){e.advance(t),t=0})),!1))}})):addReplayFilter(t,(function(){var t=e;return function(){return--t<0}}))),this},e.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),addReplayFilter(this._ctx,(function(){var t=e;return function(e,r,n){return--t<=0&&r(n),t>=0}}),!0),this},e.prototype.until=function(e,t){return addFilter(this._ctx,(function(r,n,i){return!e(r.value)||(n(i),t)})),this},e.prototype.first=function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)},e.prototype.last=function(e){return this.reverse().first(e)},e.prototype.filter=function(e){return addFilter(this._ctx,(function(t){return e(t.value)})),addMatchFilter(this._ctx,e),this},e.prototype.and=function(e){return this.filter(e)},e.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},e.prototype.reverse=function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},e.prototype.desc=function(){return this.reverse()},e.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.key,r)}))},e.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},e.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,r){e(r.primaryKey,r)}))},e.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.key)})).then((function(){return r})).then(e)},e.prototype.primaryKeys=function(e){var t=this._ctx;if("next"===t.dir&&isPlainKeyRange(t,!0)&&t.limit>0)return this._read((function(e){var r=getIndexOrStore(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:r,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each((function(e,t){r.push(t.primaryKey)})).then((function(){return r})).then(e)},e.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},e.prototype.firstKey=function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)},e.prototype.lastKey=function(e){return this.reverse().firstKey(e)},e.prototype.distinct=function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var r={};return addFilter(this._ctx,(function(e){var t=e.primaryKey.toString(),n=hasOwn(r,t);return r[t]=!0,!n})),this},e.prototype.modify=function(e){var t=this,r=this._ctx;return this._write((function(n){var i;if("function"==typeof e)i=e;else{var o=keys(e),a=o.length;i=function(t){for(var r=!1,n=0;n<a;++n){var i=o[n],s=e[i],c=getByKeyPath(t,i);s instanceof PropModification?(setByKeyPath(t,i,s.execute(c)),r=!0):c!==s&&(setByKeyPath(t,i,s),r=!0)}return r}}var s=r.table.core,c=s.schema.primaryKey,u=c.outbound,l=c.extractKey,d=t.db._options.modifyChunkSize||200,h=[],f=0,p=[],m=function(e,t){var r=t.failures,n=t.numFailures;f+=e-n;for(var i=0,o=keys(r);i<o.length;i++){var a=o[i];h.push(r[a])}};return t.clone().primaryKeys().then((function(t){var o=function(a){var c=Math.min(d,t.length-a);return s.getMany({trans:n,keys:t.slice(a,a+c),cache:"immutable"}).then((function(h){for(var f=[],p=[],g=u?[]:null,v=[],y=0;y<c;++y){var _=h[y],b={value:deepClone(_),primKey:t[a+y]};!1!==i.call(b,b.value,b)&&(null==b.value?v.push(t[a+y]):u||0===cmp(l(_),l(b.value))?(p.push(b.value),u&&g.push(t[a+y])):(v.push(t[a+y]),f.push(b.value)))}var w=isPlainKeyRange(r)&&r.limit===1/0&&("function"!=typeof e||e===deleteCallback)&&{index:r.index,range:r.range};return Promise.resolve(f.length>0&&s.mutate({trans:n,type:"add",values:f}).then((function(e){for(var t in e.failures)v.splice(parseInt(t),1);m(f.length,e)}))).then((function(){return(p.length>0||w&&"object"==typeof e)&&s.mutate({trans:n,type:"put",keys:g,values:p,criteria:w,changeSpec:"function"!=typeof e&&e}).then((function(e){return m(p.length,e)}))})).then((function(){return(v.length>0||w&&e===deleteCallback)&&s.mutate({trans:n,type:"delete",keys:v,criteria:w}).then((function(e){return m(v.length,e)}))})).then((function(){return t.length>a+c&&o(a+d)}))}))};return o(0).then((function(){if(h.length>0)throw new ModifyError("Error modifying one or more objects",h,f,p);return t.length}))}))}))},e.prototype.delete=function(){var e=this._ctx,t=e.range;return isPlainKeyRange(e)&&(e.isPrimKey||3===t.type)?this._write((function(r){var n=e.table.core.schema.primaryKey,i=t;return e.table.core.count({trans:r,query:{index:n,range:i}}).then((function(t){return e.table.core.mutate({trans:r,type:"deleteRange",range:i}).then((function(e){var r=e.failures;e.lastResult,e.results;var n=e.numFailures;if(n)throw new ModifyError("Could not delete some values",Object.keys(r).map((function(e){return r[e]})),t-n);return t-n}))}))})):this.modify(deleteCallback)},e}(),deleteCallback=function(e,t){return t.value=null};function createCollectionConstructor(e){return makeClassConstructor(Collection.prototype,(function(t,r){this.db=e;var n=AnyRange,i=null;if(r)try{n=r()}catch(e){i=e}var o=t._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:i,or:o.or,valueMapper:s!==mirror?s:null}}))}function simpleCompare(e,t){return e<t?-1:e===t?0:1}function simpleCompareReverse(e,t){return e>t?-1:e===t?0:1}function fail(e,t,r){var n=e instanceof WhereClause?new e.Collection(e):e;return n._ctx.error=r?new r(t):new TypeError(t),n}function emptyCollection(e){return new e.Collection(e,(function(){return rangeEqual("")})).limit(0)}function upperFactory(e){return"next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()}}function lowerFactory(e){return"next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()}}function nextCasing(e,t,r,n,i,o){for(var a=Math.min(e.length,n.length),s=-1,c=0;c<a;++c){var u=t[c];if(u!==n[c])return i(e[c],r[c])<0?e.substr(0,c)+r[c]+r.substr(c+1):i(e[c],n[c])<0?e.substr(0,c)+n[c]+r.substr(c+1):s>=0?e.substr(0,s)+t[s]+r.substr(s+1):null;i(e[c],u)<0&&(s=c)}return a<n.length&&"next"===o?e+r.substr(e.length):a<e.length&&"prev"===o?e.substr(0,r.length):s<0?null:e.substr(0,s)+n[s]+r.substr(s+1)}function addIgnoreCaseAlgorithm(e,t,r,n){var i,o,a,s,c,u,l,d=r.length;if(!r.every((function(e){return"string"==typeof e})))return fail(e,STRING_EXPECTED);function h(e){i=upperFactory(e),o=lowerFactory(e),a="next"===e?simpleCompare:simpleCompareReverse;var t=r.map((function(e){return{lower:o(e),upper:i(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),u=e,l="next"===e?"":n}h("next");var f=new e.Collection(e,(function(){return createRange(s[0],c[d-1]+n)}));f._ondirectionchange=function(e){h(e)};var p=0;return f._addAlgorithm((function(e,r,n){var i=e.key;if("string"!=typeof i)return!1;var h=o(i);if(t(h,c,p))return!0;for(var f=null,m=p;m<d;++m){var g=nextCasing(i,h,s[m],c[m],a,u);null===g&&null===f?p=m+1:(null===f||a(f,g)>0)&&(f=g)}return r(null!==f?function(){e.continue(f+l)}:n),!1})),f}function createRange(e,t,r,n){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:n}}function rangeEqual(e){return{type:1,lower:e,upper:e}}var WhereClause=function(){function e(){}return Object.defineProperty(e.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),e.prototype.between=function(e,t,r,n){r=!1!==r,n=!0===n;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(r||n)&&(!r||!n)?emptyCollection(this):new this.Collection(this,(function(){return createRange(e,t,!r,!n)}))}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}},e.prototype.equals=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return rangeEqual(e)}))},e.prototype.above=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!0)}))},e.prototype.aboveOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(e,void 0,!1)}))},e.prototype.below=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e,!1,!0)}))},e.prototype.belowOrEqual=function(e){return null==e?fail(this,INVALID_KEY_ARGUMENT):new this.Collection(this,(function(){return createRange(void 0,e)}))},e.prototype.startsWith=function(e){return"string"!=typeof e?fail(this,STRING_EXPECTED):this.between(e,e+maxString,!0,!0)},e.prototype.startsWithIgnoreCase=function(e){return""===e?this.startsWith(e):addIgnoreCaseAlgorithm(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],maxString)},e.prototype.equalsIgnoreCase=function(e){return addIgnoreCaseAlgorithm(this,(function(e,t){return e===t[0]}),[e],"")},e.prototype.anyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")},e.prototype.startsWithAnyOfIgnoreCase=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return 0===e.length?emptyCollection(this):addIgnoreCaseAlgorithm(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,maxString)},e.prototype.anyOf=function(){var e=this,t=getArrayOf.apply(NO_CHAR_ARRAY,arguments),r=this._cmp;try{t.sort(r)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}if(0===t.length)return emptyCollection(this);var n=new this.Collection(this,(function(){return createRange(t[0],t[t.length-1])}));n._ondirectionchange=function(n){r="next"===n?e._ascending:e._descending,t.sort(r)};var i=0;return n._addAlgorithm((function(e,n,o){for(var a=e.key;r(a,t[i])>0;)if(++i===t.length)return n(o),!1;return 0===r(a,t[i])||(n((function(){e.continue(t[i])})),!1)})),n},e.prototype.notEqual=function(e){return this.inAnyRange([[minKey,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},e.prototype.noneOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var t=e.reduce((function(e,t){return e?e.concat([[e[e.length-1][1],t]]):[[minKey,t]]}),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},e.prototype.inAnyRange=function(e,t){var r=this,n=this._cmp,i=this._ascending,o=this._descending,a=this._min,s=this._max;if(0===e.length)return emptyCollection(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return fail(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",exceptions.InvalidArgument);var c=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;var l,d=i;function h(e,t){return d(e[0],t[0])}try{l=e.reduce((function(e,t){for(var r=0,i=e.length;r<i;++r){var o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=a(o[0],t[0]),o[1]=s(o[1],t[1]);break}}return r===i&&e.push(t),e}),[]),l.sort(h)}catch(e){return fail(this,INVALID_KEY_ARGUMENT)}var f=0,p=u?function(e){return i(e,l[f][1])>0}:function(e){return i(e,l[f][1])>=0},m=c?function(e){return o(e,l[f][0])>0}:function(e){return o(e,l[f][0])>=0};var g=p,v=new this.Collection(this,(function(){return createRange(l[0][0],l[l.length-1][1],!c,!u)}));return v._ondirectionchange=function(e){"next"===e?(g=p,d=i):(g=m,d=o),l.sort(h)},v._addAlgorithm((function(e,t,n){for(var o=e.key;g(o);)if(++f===l.length)return t(n),!1;return!!function(e){return!p(e)&&!m(e)}(o)||(0===r._cmp(o,l[f][1])||0===r._cmp(o,l[f][0])||t((function(){d===i?e.continue(l[f][0]):e.continue(l[f][1])})),!1)})),v},e.prototype.startsWithAnyOf=function(){var e=getArrayOf.apply(NO_CHAR_ARRAY,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?emptyCollection(this):this.inAnyRange(e.map((function(e){return[e,e+maxString]}))):fail(this,"startsWithAnyOf() only works with strings")},e}();function createWhereClauseConstructor(e){return makeClassConstructor(WhereClause.prototype,(function(t,r,n){if(this.db=e,this._ctx={table:t,index:":id"===r?null:r,or:n},this._cmp=this._ascending=cmp,this._descending=function(e,t){return cmp(t,e)},this._max=function(e,t){return cmp(e,t)>0?e:t},this._min=function(e,t){return cmp(e,t)<0?e:t},this._IDBKeyRange=e._deps.IDBKeyRange,!this._IDBKeyRange)throw new exceptions.MissingAPI}))}function eventRejectHandler(e){return wrap$1((function(t){return preventDefault(t),e(t.target.error),!1}))}function preventDefault(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var DEXIE_STORAGE_MUTATED_EVENT_NAME="storagemutated",STORAGE_MUTATED_DOM_EVENT_NAME="x-storagemutated-1",globalEvents=Events(null,DEXIE_STORAGE_MUTATED_EVENT_NAME),Transaction=function(){function e(){}return e.prototype._lock=function(){return assert(!PSD.global),++this._reculock,1!==this._reculock||PSD.global||(PSD.lockOwnerFor=this),this},e.prototype._unlock=function(){if(assert(!PSD.global),0==--this._reculock)for(PSD.global||(PSD.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{usePSD(e[1],e[0])}catch(e){}}return this},e.prototype._locked=function(){return this._reculock&&PSD.lockOwnerFor!==this},e.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,n=this.db._state.dbOpenError;if(assert(!this.idbtrans),!e&&!r)switch(n&&n.name){case"DatabaseClosedError":throw new exceptions.DatabaseClosed(n);case"MissingAPIError":throw new exceptions.MissingAPI(n.message,n);default:throw new exceptions.OpenFailed(n)}if(!this.active)throw new exceptions.TransactionInactive;return assert(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):r.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=wrap$1((function(r){preventDefault(r),t._reject(e.error)})),e.onabort=wrap$1((function(r){preventDefault(r),t.active&&t._reject(new exceptions.Abort(e.error)),t.active=!1,t.on("abort").fire(r)})),e.oncomplete=wrap$1((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&globalEvents.storagemutated.fire(e.mutatedParts)})),this},e.prototype._promise=function(e,t,r){var n=this;if("readwrite"===e&&"readwrite"!==this.mode)return rejection(new exceptions.ReadOnly("Transaction is readonly"));if(!this.active)return rejection(new exceptions.TransactionInactive);if(this._locked())return new DexiePromise((function(i,o){n._blockedFuncs.push([function(){n._promise(e,t,r).then(i,o)},PSD])}));if(r)return newScope((function(){var e=new DexiePromise((function(e,r){n._lock();var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return e.finally((function(){return n._unlock()})),e._lib=!0,e}));var i=new DexiePromise((function(e,r){var i=t(e,r,n);i&&i.then&&i.then(e,r)}));return i._lib=!0,i},e.prototype._root=function(){return this.parent?this.parent._root():this},e.prototype.waitFor=function(e){var t=this._root(),r=DexiePromise.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return r}));else{t._waitingFor=r,t._waitingQueue=[];var n=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(n.get(-1/0).onsuccess=e)}()}var i=t._waitingFor;return new DexiePromise((function(e,n){r.then((function(r){return t._waitingQueue.push(wrap$1(e.bind(null,r)))}),(function(e){return t._waitingQueue.push(wrap$1(n.bind(null,e)))})).finally((function(){t._waitingFor===i&&(t._waitingFor=null)}))}))},e.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new exceptions.Abort))},e.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(hasOwn(t,e))return t[e];var r=this.schema[e];if(!r)throw new exceptions.NotFound("Table "+e+" not part of transaction");var n=new this.db.Table(e,r,this);return n.core=this.db.core.table(e),t[e]=n,n},e}();function createTransactionConstructor(e){return makeClassConstructor(Transaction.prototype,(function(t,r,n,i,o){var a=this;this.db=e,this.mode=t,this.storeNames=r,this.schema=n,this.chromeTransactionDurability=i,this.idbtrans=null,this.on=Events(this,"complete","error","abort"),this.parent=o||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new DexiePromise((function(e,t){a._resolve=e,a._reject=t})),this._completion.then((function(){a.active=!1,a.on.complete.fire()}),(function(e){var t=a.active;return a.active=!1,a.on.error.fire(e),a.parent?a.parent._reject(e):t&&a.idbtrans&&a.idbtrans.abort(),rejection(e)}))}))}function createIndexSpec(e,t,r,n,i,o,a){return{name:e,keyPath:t,unique:r,multi:n,auto:i,compound:o,src:(r&&!a?"&":"")+(n?"*":"")+(i?"++":"")+nameFromKeyPath(t)}}function nameFromKeyPath(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function createTableSchema(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:arrayToObject(r,(function(e){return[e.name,e]}))}}function safariMultiStoreFix(e){return 1===e.length?e[0]:e}var getMaxKey=function(e){try{return e.only([[]]),getMaxKey=function(){return[[]]},[[]]}catch(e){return getMaxKey=function(){return maxString},maxString}};function getKeyExtractor(e){return null==e?function(){}:"string"==typeof e?getSinglePathKeyExtractor(e):function(t){return getByKeyPath(t,e)}}function getSinglePathKeyExtractor(e){return 1===e.split(".").length?function(t){return t[e]}:function(t){return getByKeyPath(t,e)}}function arrayify(e){return[].slice.call(e)}var _id_counter=0;function getKeyPathAlias(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")}function createDBCore(e,t,r){function n(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");var r=e.lower,n=e.upper,i=e.lowerOpen,o=e.upperOpen;return void 0===r?void 0===n?null:t.upperBound(n,!!o):void 0===n?t.lowerBound(r,!!i):t.bound(r,n,!!i,!!o)}var i=function(e,t){var r=arrayify(e.objectStoreNames);return{schema:{name:e.name,tables:r.map((function(e){return t.objectStore(e)})).map((function(e){var t=e.keyPath,r=e.autoIncrement,n=isArray(t),i=null==t,o={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:i,compound:n,keyPath:t,autoIncrement:r,unique:!0,extractKey:getKeyExtractor(t)},indexes:arrayify(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,r=e.unique,n=e.multiEntry,i=e.keyPath,a={name:t,compound:isArray(i),keyPath:i,unique:r,multiEntry:n,extractKey:getKeyExtractor(i)};return o[getKeyPathAlias(i)]=a,a})),getIndexByKeyPath:function(e){return o[getKeyPathAlias(e)]}};return o[":id"]=a.primaryKey,null!=t&&(o[getKeyPathAlias(t)]=a.primaryKey),a}))},hasGetAll:r.length>0&&"getAll"in t.objectStore(r[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,r),o=i.schema,a=i.hasGetAll,s=o.tables.map((function(e){return function(e){var t=e.name;return{name:t,schema:e,mutate:function(e){var r=e.trans,i=e.type,o=e.keys,a=e.values,s=e.range;return new Promise((function(e,c){e=wrap$1(e);var u=r.objectStore(t),l=null==u.keyPath,d="put"===i||"add"===i;if(!d&&"delete"!==i&&"deleteRange"!==i)throw new Error("Invalid operation type: "+i);var h,f=(o||a||{length:1}).length;if(o&&a&&o.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===f)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var p=[],m=[],g=0,v=function(e){++g,preventDefault(e)};if("deleteRange"===i){if(4===s.type)return e({numFailures:g,failures:m,results:[],lastResult:void 0});3===s.type?p.push(h=u.clear()):p.push(h=u.delete(n(s)))}else{var y=d?l?[a,o]:[a,null]:[o,null],_=y[0],b=y[1];if(d)for(var w=0;w<f;++w)p.push(h=b&&void 0!==b[w]?u[i](_[w],b[w]):u[i](_[w])),h.onerror=v;else for(w=0;w<f;++w)p.push(h=u[i](_[w])),h.onerror=v}var D=function(t){var r=t.target.result;p.forEach((function(e,t){return null!=e.error&&(m[t]=e.error)})),e({numFailures:g,failures:m,results:"delete"===i?o:p.map((function(e){return e.result})),lastResult:r})};h.onerror=function(e){v(e),D(e)},h.onsuccess=D}))},getMany:function(e){var r=e.trans,n=e.keys;return new Promise((function(e,i){e=wrap$1(e);for(var o,a=r.objectStore(t),s=n.length,c=new Array(s),u=0,l=0,d=function(t){var r=t.target;c[r._pos]=r.result,++l===u&&e(c)},h=eventRejectHandler(i),f=0;f<s;++f)null!=n[f]&&((o=a.get(n[f]))._pos=f,o.onsuccess=d,o.onerror=h,++u);0===u&&e(c)}))},get:function(e){var r=e.trans,n=e.key;return new Promise((function(e,i){e=wrap$1(e);var o=r.objectStore(t).get(n);o.onsuccess=function(t){return e(t.target.result)},o.onerror=eventRejectHandler(i)}))},query:function(e){return function(r){return new Promise((function(i,o){i=wrap$1(i);var a=r.trans,s=r.values,c=r.limit,u=r.query,l=c===1/0?void 0:c,d=u.index,h=u.range,f=a.objectStore(t),p=d.isPrimaryKey?f:f.index(d.name),m=n(h);if(0===c)return i({result:[]});if(e){var g=s?p.getAll(m,l):p.getAllKeys(m,l);g.onsuccess=function(e){return i({result:e.target.result})},g.onerror=eventRejectHandler(o)}else{var v=0,y=s||!("openKeyCursor"in p)?p.openCursor(m):p.openKeyCursor(m),_=[];y.onsuccess=function(e){var t=y.result;return t?(_.push(s?t.value:t.primaryKey),++v===c?i({result:_}):void t.continue()):i({result:_})},y.onerror=eventRejectHandler(o)}}))}}(a),openCursor:function(e){var r=e.trans,i=e.values,o=e.query,a=e.reverse,s=e.unique;return new Promise((function(e,c){e=wrap$1(e);var u=o.index,l=o.range,d=r.objectStore(t),h=u.isPrimaryKey?d:d.index(u.name),f=a?s?"prevunique":"prev":s?"nextunique":"next",p=i||!("openKeyCursor"in h)?h.openCursor(n(l),f):h.openKeyCursor(n(l),f);p.onerror=eventRejectHandler(c),p.onsuccess=wrap$1((function(t){var n=p.result;if(n){n.___id=++_id_counter,n.done=!1;var i=n.continue.bind(n),o=n.continuePrimaryKey;o&&(o=o.bind(n));var a=n.advance.bind(n),s=function(){throw new Error("Cursor not stopped")};n.trans=r,n.stop=n.continue=n.continuePrimaryKey=n.advance=function(){throw new Error("Cursor not started")},n.fail=wrap$1(c),n.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},n.start=function(e){var t=new Promise((function(e,t){e=wrap$1(e),p.onerror=eventRejectHandler(t),n.fail=t,n.stop=function(t){n.stop=n.continue=n.continuePrimaryKey=n.advance=s,e(t)}})),r=function(){if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=function(){throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=wrap$1((function(e){p.onsuccess=r,r()})),n.continue=i,n.continuePrimaryKey=o,n.advance=a,r(),t},e(n)}else e(null)}),c)}))},count:function(e){var r=e.query,i=e.trans,o=r.index,a=r.range;return new Promise((function(e,r){var s=i.objectStore(t),c=o.isPrimaryKey?s:s.index(o.name),u=n(a),l=u?c.count(u):c.count();l.onsuccess=wrap$1((function(t){return e(t.target.result)})),l.onerror=eventRejectHandler(r)}))}}}(e)})),c={};return s.forEach((function(e){return c[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!c[e])throw new Error("Table '".concat(e,"' not found"));return c[e]},MIN_KEY:-1/0,MAX_KEY:getMaxKey(t),schema:o}}function createMiddlewareStack(e,t){return t.reduce((function(e,t){var r=t.create;return __assign(__assign({},e),r(e))}),e)}function createMiddlewareStacks(e,t,r,n){var i=r.IDBKeyRange;return r.indexedDB,{dbcore:createMiddlewareStack(createDBCore(t,i,n),e.dbcore)}}function generateMiddlewareStacks(e,t){var r=t.db,n=createMiddlewareStacks(e._middlewares,r,e._deps,t);e.core=n.dbcore,e.tables.forEach((function(t){var r=t.name;e.core.schema.tables.some((function(e){return e.name===r}))&&(t.core=e.core.table(r),e[r]instanceof e.Table&&(e[r].core=t.core))}))}function setApiOnPlace(e,t,r,n){r.forEach((function(r){var i=n[r];t.forEach((function(t){var n=getPropertyDescriptor(t,r);(!n||"value"in n&&void 0===n.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?setProp(t,r,{get:function(){return this.table(r)},set:function(e){defineProperty(this,r,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[r]=new e.Table(r,i))}))}))}function removeTablesApi(e,t){t.forEach((function(t){for(var r in t)t[r]instanceof e.Table&&delete t[r]}))}function lowerVersionFirst(e,t){return e._cfg.version-t._cfg.version}function runUpgraders(e,t,r,n){var i=e._dbSchema;r.objectStoreNames.contains("$meta")&&!i.$meta&&(i.$meta=createTableSchema("$meta",parseIndexSyntax("")[0],[]),e._storeNames.push("$meta"));var o=e._createTransaction("readwrite",e._storeNames,i);o.create(r),o._completion.catch(n);var a=o._reject.bind(o),s=PSD.transless||PSD;newScope((function(){if(PSD.trans=o,PSD.transless=s,0!==t)return generateMiddlewareStacks(e,r),getExistingVersion(e,o,t).then((function(t){return updateTablesAndIndexes(e,t,o,r)})).catch(a);keys(i).forEach((function(e){createTable(r,e,i[e].primKey,i[e].indexes)})),generateMiddlewareStacks(e,r),DexiePromise.follow((function(){return e.on.populate.fire(o)})).catch(a)}))}function patchCurrentVersion(e,t){createMissingTables(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var r=buildGlobalSchema(e,e.idbdb,t);adjustToExistingIndexNames(e,e._dbSchema,t);for(var n=function(e){if(e.change.length||e.recreate)return console.warn("Unable to patch indexes of table ".concat(e.name," because it has changes on the type of index or primary key.")),{value:void 0};var r=t.objectStore(e.name);e.add.forEach((function(t){debug&&console.debug("Dexie upgrade patch: Creating missing index ".concat(e.name,".").concat(t.src)),addIndex(r,t)}))},i=0,o=getSchemaDiff(r,e._dbSchema).change;i<o.length;i++){var a=n(o[i]);if("object"==typeof a)return a.value}}function getExistingVersion(e,t,r){return t.storeNames.includes("$meta")?t.table("$meta").get("version").then((function(e){return null!=e?e:r})):DexiePromise.resolve(r)}function updateTablesAndIndexes(e,t,r,n){var i=[],o=e._versions,a=e._dbSchema=buildGlobalSchema(e,e.idbdb,n),s=o.filter((function(e){return e._cfg.version>=t}));if(0===s.length)return DexiePromise.resolve();return s.forEach((function(o){i.push((function(){var i=a,s=o._cfg.dbschema;adjustToExistingIndexNames(e,i,n),adjustToExistingIndexNames(e,s,n),a=e._dbSchema=s;var c=getSchemaDiff(i,s);c.add.forEach((function(e){createTable(n,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((function(e){if(e.recreate)throw new exceptions.Upgrade("Not yet support for changing primary key");var t=n.objectStore(e.name);e.add.forEach((function(e){return addIndex(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),addIndex(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var u=o._cfg.contentUpgrade;if(u&&o._cfg.version>t){generateMiddlewareStacks(e,n),r._memoizedTables={};var l=shallowClone(s);c.del.forEach((function(e){l[e]=i[e]})),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],keys(l),l),r.schema=l;var d,h=isAsyncFunction(u);h&&incrementExpectedAwaits();var f=DexiePromise.follow((function(){if((d=u(r))&&h){var e=decrementExpectedAwaits.bind(null,null);d.then(e,e)}}));return d&&"function"==typeof d.then?DexiePromise.resolve(d):f.then((function(){return d}))}})),i.push((function(t){deleteRemovedTables(o._cfg.dbschema,t),removeTablesApi(e,[e.Transaction.prototype]),setApiOnPlace(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),r.schema=e._dbSchema})),i.push((function(t){e.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(e.idbdb.version/10)===o._cfg.version?(e.idbdb.deleteObjectStore("$meta"),delete e._dbSchema.$meta,e._storeNames=e._storeNames.filter((function(e){return"$meta"!==e}))):t.objectStore("$meta").put(o._cfg.version,"version"))}))})),function e(){return i.length?DexiePromise.resolve(i.shift()(r.idbtrans)).then(e):DexiePromise.resolve()}().then((function(){createMissingTables(a,n)}))}function getSchemaDiff(e,t){var r,n={del:[],add:[],change:[]};for(r in e)t[r]||n.del.push(r);for(r in t){var i=e[r],o=t[r];if(i){var a={name:r,def:o,recreate:!1,del:[],add:[],change:[]};if(""+(i.primKey.keyPath||"")!=""+(o.primKey.keyPath||"")||i.primKey.auto!==o.primKey.auto)a.recreate=!0,n.change.push(a);else{var s=i.idxByName,c=o.idxByName,u=void 0;for(u in s)c[u]||a.del.push(u);for(u in c){var l=s[u],d=c[u];l?l.src!==d.src&&a.change.push(d):a.add.push(d)}(a.del.length>0||a.add.length>0||a.change.length>0)&&n.change.push(a)}}else n.add.push([r,o])}return n}function createTable(e,t,r,n){var i=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return n.forEach((function(e){return addIndex(i,e)})),i}function createMissingTables(e,t){keys(e).forEach((function(r){t.db.objectStoreNames.contains(r)||(debug&&console.debug("Dexie: Creating missing table",r),createTable(t,r,e[r].primKey,e[r].indexes))}))}function deleteRemovedTables(e,t){[].slice.call(t.db.objectStoreNames).forEach((function(r){return null==e[r]&&t.db.deleteObjectStore(r)}))}function addIndex(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function buildGlobalSchema(e,t,r){var n={};return slice(t.objectStoreNames,0).forEach((function(e){for(var t=r.objectStore(e),i=t.keyPath,o=createIndexSpec(nameFromKeyPath(i),i||"",!0,!1,!!t.autoIncrement,i&&"string"!=typeof i,!0),a=[],s=0;s<t.indexNames.length;++s){var c=t.index(t.indexNames[s]);i=c.keyPath;var u=createIndexSpec(c.name,i,!!c.unique,!!c.multiEntry,!1,i&&"string"!=typeof i,!1);a.push(u)}n[e]=createTableSchema(e,o,a)})),n}function readGlobalSchema(e,t,r){e.verno=t.version/10;var n=e._dbSchema=buildGlobalSchema(e,t,r);e._storeNames=slice(t.objectStoreNames,0),setApiOnPlace(e,[e._allTables],keys(n),n)}function verifyInstalledSchema(e,t){var r=getSchemaDiff(buildGlobalSchema(e,e.idbdb,t),e._dbSchema);return!(r.add.length||r.change.some((function(e){return e.add.length||e.change.length})))}function adjustToExistingIndexNames(e,t,r){for(var n=r.db.objectStoreNames,i=0;i<n.length;++i){var o=n[i],a=r.objectStore(o);e._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var c=a.indexNames[s],u=a.index(c).keyPath,l="string"==typeof u?u:"["+slice(u).join("+")+"]";if(t[o]){var d=t[o].idxByName[l];d&&(d.name=c,delete t[o].idxByName[l],t[o].idxByName[c]=d)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&_global.WorkerGlobalScope&&_global instanceof _global.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function parseIndexSyntax(e){return e.split(",").map((function(e,t){var r=(e=e.trim()).replace(/([&*]|\+\+)/g,""),n=/^\[/.test(r)?r.match(/^\[(.*)\]$/)[1].split("+"):r;return createIndexSpec(r,n||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),isArray(n),0===t)}))}var Version=function(){function e(){}return e.prototype._parseStoresSpec=function(e,t){keys(e).forEach((function(r){if(null!==e[r]){var n=parseIndexSyntax(e[r]),i=n.shift();if(i.unique=!0,i.multi)throw new exceptions.Schema("Primary key cannot be multi-valued");n.forEach((function(e){if(e.auto)throw new exceptions.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new exceptions.Schema("Index must have a name and cannot be an empty string")})),t[r]=createTableSchema(r,i,n)}}))},e.prototype.stores=function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?extend(this._cfg.storesSource,e):e;var r=t._versions,n={},i={};return r.forEach((function(e){extend(n,e._cfg.storesSource),i=e._cfg.dbschema={},e._parseStoresSpec(n,i)})),t._dbSchema=i,removeTablesApi(t,[t._allTables,t,t.Transaction.prototype]),setApiOnPlace(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],keys(i),i),t._storeNames=keys(i),this},e.prototype.upgrade=function(e){return this._cfg.contentUpgrade=promisableChain(this._cfg.contentUpgrade||nop,e),this},e}(),_a;function createVersionConstructor(e){return makeClassConstructor(Version.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}function getDbNamesTable(e,t){var r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Dexie$1(DBNAMES_DB,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function hasDatabasesNative(e){return e&&"function"==typeof e.databases}function getDatabaseNames(e){var t=e.indexedDB,r=e.IDBKeyRange;return hasDatabasesNative(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return e!==DBNAMES_DB}))})):getDbNamesTable(t,r).toCollection().primaryKeys()}function _onDatabaseCreated(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).put({name:t}).catch(nop)}function _onDatabaseDeleted(e,t){var r=e.indexedDB,n=e.IDBKeyRange;!hasDatabasesNative(r)&&t!==DBNAMES_DB&&getDbNamesTable(r,n).delete(t).catch(nop)}function vip(e){return newScope((function(){return PSD.letThrough=!0,e()}))}function idbReady(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var r=function(){return indexedDB.databases().finally(t)};e=setInterval(r,100),r()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function isEmptyRange(e){return!("from"in e)}var RangeSet=function(e,t){if(!this){var r=new RangeSet;return e&&"d"in e&&extend(r,e),r}extend(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function addRange(e,t,r){var n=cmp(t,r);if(!isNaN(n)){if(n>0)throw RangeError();if(isEmptyRange(e))return extend(e,{from:t,to:r,d:1});var i=e.l,o=e.r;if(cmp(r,e.from)<0)return i?addRange(i,t,r):e.l={from:t,to:r,d:1,l:null,r:null},rebalance(e);if(cmp(t,e.to)>0)return o?addRange(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},rebalance(e);cmp(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),cmp(r,e.to)>0&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;i&&!e.l&&mergeRanges(e,i),o&&a&&mergeRanges(e,o)}}function mergeRanges(e,t){isEmptyRange(t)||function e(t,r){var n=r.from,i=r.to,o=r.l,a=r.r;addRange(t,n,i),o&&e(t,o),a&&e(t,a)}(e,t)}function rangesOverlap(e,t){var r=getRangeSetIterator(t),n=r.next();if(n.done)return!1;for(var i=n.value,o=getRangeSetIterator(e),a=o.next(i.from),s=a.value;!n.done&&!a.done;){if(cmp(s.from,i.to)<=0&&cmp(s.to,i.from)>=0)return!0;cmp(i.from,s.from)<0?i=(n=r.next(s.from)).value:s=(a=o.next(i.from)).value}return!1}function getRangeSetIterator(e){var t=isEmptyRange(e)?null:{s:0,n:e};return{next:function(e){for(var r=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,r)for(;t.n.l&&cmp(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!r||cmp(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function rebalance(e){var t,r,n=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(r=e.l)||void 0===r?void 0:r.d)||0),i=n>1?"r":n<-1?"l":"";if(i){var o="r"===i?"l":"r",a=__assign({},e),s=e[i];e.from=s.from,e.to=s.to,e[i]=s[i],a[i]=s[o],e[o]=a,a.d=computeDepth(a)}e.d=computeDepth(e)}function computeDepth(e){var t=e.r,r=e.l;return(t?r?Math.max(t.d,r.d):t.d:r?r.d:0)+1}function extendObservabilitySet(e,t){return keys(t).forEach((function(r){e[r]?mergeRanges(e[r],t[r]):e[r]=cloneSimpleObjectTree(t[r])})),e}function obsSetsOverlap(e,t){return e.all||t.all||Object.keys(e).some((function(r){return t[r]&&rangesOverlap(t[r],e[r])}))}props(RangeSet.prototype,(_a={add:function(e){return mergeRanges(this,e),this},addKey:function(e){return addRange(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return addRange(t,e,e)})),this}},_a[iteratorSymbol]=function(){return getRangeSetIterator(this)},_a));var cache={},unsignaledParts={},isTaskEnqueued=!1;function signalSubscribersLazily(e,t){extendObservabilitySet(unsignaledParts,e),isTaskEnqueued||(isTaskEnqueued=!0,setTimeout((function(){isTaskEnqueued=!1;var e=unsignaledParts;unsignaledParts={},signalSubscribersNow(e,!1)}),0))}function signalSubscribersNow(e,t){void 0===t&&(t=!1);var r=new Set;if(e.all)for(var n=0,i=Object.values(cache);n<i.length;n++){collectTableSubscribers(s=i[n],e,r,t)}else for(var o in e){var a=/^idb\:\/\/(.*)\/(.*)\//.exec(o);if(a){var s,c=a[1],u=a[2];(s=cache["idb://".concat(c,"/").concat(u)])&&collectTableSubscribers(s,e,r,t)}}r.forEach((function(e){return e()}))}function collectTableSubscribers(e,t,r,n){for(var i=[],o=0,a=Object.entries(e.queries.query);o<a.length;o++){for(var s=a[o],c=s[0],u=[],l=0,d=s[1];l<d.length;l++){var h=d[l];obsSetsOverlap(t,h.obsSet)?h.subscribers.forEach((function(e){return r.add(e)})):n&&u.push(h)}n&&i.push([c,u])}if(n)for(var f=0,p=i;f<p.length;f++){var m=p[f];c=m[0],u=m[1];e.queries.query[c]=u}}function dexieOpen(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((function(){return t.dbOpenError?rejection(t.dbOpenError):e}));t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var n=t.openCanceller,i=Math.round(10*e.verno),o=!1;function a(){if(t.openCanceller!==n)throw new exceptions.DatabaseClosed("db.open() was cancelled")}var s=t.dbReadyResolve,c=null,u=!1,l=function(){return new DexiePromise((function(n,s){if(a(),!r)throw new exceptions.MissingAPI;var d=e.name,h=t.autoSchema||!i?r.open(d):r.open(d,i);if(!h)throw new exceptions.MissingAPI;h.onerror=eventRejectHandler(s),h.onblocked=wrap$1(e._fireOnBlocked),h.onupgradeneeded=wrap$1((function(n){if(c=h.transaction,t.autoSchema&&!e._options.allowEmptyDB){h.onerror=preventDefault,c.abort(),h.result.close();var i=r.deleteDatabase(d);i.onsuccess=i.onerror=wrap$1((function(){s(new exceptions.NoSuchDatabase("Database ".concat(d," doesnt exist")))}))}else{c.onerror=eventRejectHandler(s);var a=n.oldVersion>Math.pow(2,62)?0:n.oldVersion;u=a<1,e.idbdb=h.result,o&&patchCurrentVersion(e,c),runUpgraders(e,a/10,c,s)}}),s),h.onsuccess=wrap$1((function(){c=null;var r=e.idbdb=h.result,a=slice(r.objectStoreNames);if(a.length>0)try{var s=r.transaction(safariMultiStoreFix(a),"readonly");if(t.autoSchema)readGlobalSchema(e,r,s);else if(adjustToExistingIndexNames(e,e._dbSchema,s),!verifyInstalledSchema(e,s)&&!o)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),r.close(),i=r.version+1,o=!0,n(l());generateMiddlewareStacks(e,s)}catch(e){}connections.push(e),r.onversionchange=wrap$1((function(r){t.vcFired=!0,e.on("versionchange").fire(r)})),r.onclose=wrap$1((function(t){e.on("close").fire(t)})),u&&_onDatabaseCreated(e._deps,d),n()}),s)})).catch((function(e){switch(null==e?void 0:e.name){case"UnknownError":if(t.PR1398_maxLoop>0)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),l();break;case"VersionError":if(i>0)return i=0,l()}return DexiePromise.reject(e)}))};return DexiePromise.race([n,("undefined"==typeof navigator?DexiePromise.resolve():idbReady()).then(l)]).then((function(){return a(),t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return e.on.ready.fire(e.vip)}))).then((function r(){if(t.onReadyBeingFired.length>0){var n=t.onReadyBeingFired.reduce(promisableChain,nop);return t.onReadyBeingFired=[],DexiePromise.resolve(vip((function(){return n(e.vip)}))).then(r)}}))})).finally((function(){t.openCanceller===n&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)})).catch((function(r){t.dbOpenError=r;try{c&&c.abort()}catch(e){}return n===t.openCanceller&&e._close(),rejection(r)})).finally((function(){t.openComplete=!0,s()})).then((function(){if(u){var t={};e.tables.forEach((function(r){r.schema.indexes.forEach((function(n){n.name&&(t["idb://".concat(e.name,"/").concat(r.name,"/").concat(n.name)]=new RangeSet(-1/0,[[[]]]))})),t["idb://".concat(e.name,"/").concat(r.name,"/")]=t["idb://".concat(e.name,"/").concat(r.name,"/:dels")]=new RangeSet(-1/0,[[[]]])})),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME).fire(t),signalSubscribersNow(t,!0)}return e}))}function awaitIterator(e){var t=function(t){return e.next(t)},r=i(t),n=i((function(t){return e.throw(t)}));function i(e){return function(t){var i=e(t),o=i.value;return i.done?o:o&&"function"==typeof o.then?o.then(r,n):isArray(o)?Promise.all(o).then(r,n):r(o)}}return i(t)()}function extractTransactionArgs(e,t,r){var n=arguments.length;if(n<2)throw new exceptions.InvalidArgument("Too few arguments");for(var i=new Array(n-1);--n;)i[n-1]=arguments[n];return r=i.pop(),[e,flatten(i),r]}function enterTransactionScope(e,t,r,n,i){return DexiePromise.resolve().then((function(){var o=PSD.transless||PSD,a=e._createTransaction(t,r,e._dbSchema,n);a.explicit=!0;var s={trans:a,transless:o};if(n)a.idbtrans=n.idbtrans;else try{a.create(),a.idbtrans._explicit=!0,e._state.PR1398_maxLoop=3}catch(n){return n.name===errnames.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e.close({disableAutoOpen:!1}),e.open().then((function(){return enterTransactionScope(e,t,r,null,i)}))):rejection(n)}var c,u=isAsyncFunction(i);u&&incrementExpectedAwaits();var l=DexiePromise.follow((function(){if(c=i.call(a,a))if(u){var e=decrementExpectedAwaits.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=awaitIterator(c))}),s);return(c&&"function"==typeof c.then?DexiePromise.resolve(c).then((function(e){return a.active?e:rejection(new exceptions.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return n&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),rejection(e)}))}))}function pad(e,t,r){for(var n=isArray(e)?e.slice():[e],i=0;i<r;++i)n.push(t);return n}function createVirtualIndexMiddleware(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema,i={},o=[];function a(e,t,r){var n=getKeyPathAlias(e),s=i[n]=i[n]||[],c=null==e?0:"string"==typeof e?1:e.length,u=t>0,l=__assign(__assign({},r),{name:u?"".concat(n,"(virtual-from:").concat(r.name,")"):r.name,lowLevelIndex:r,isVirtual:u,keyTail:t,keyLength:c,extractKey:getKeyExtractor(e),unique:!u&&r.unique});(s.push(l),l.isPrimaryKey||o.push(l),c>1)&&a(2===c?e[0]:e.slice(0,c-1),t+1,r);return s.sort((function(e,t){return e.keyTail-t.keyTail})),l}var s=a(n.primaryKey.keyPath,0,n.primaryKey);i[":id"]=[s];for(var c=0,u=n.indexes;c<u.length;c++){var l=u[c];a(l.keyPath,0,l)}function d(t){var r,n,i=t.query.index;return i.isVirtual?__assign(__assign({},t),{query:{index:i.lowLevelIndex,range:(r=t.query.range,n=i.keyTail,{type:1===r.type?2:r.type,lower:pad(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,n),lowerOpen:!0,upper:pad(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,n),upperOpen:!0})}}):t}var h=__assign(__assign({},r),{schema:__assign(__assign({},n),{primaryKey:s,indexes:o,getIndexByKeyPath:function(e){var t=i[getKeyPathAlias(e)];return t&&t[0]}}),count:function(e){return r.count(d(e))},query:function(e){return r.query(d(e))},openCursor:function(t){var n=t.query.index,i=n.keyTail,o=n.isVirtual,a=n.keyLength;if(!o)return r.openCursor(t);return r.openCursor(d(t)).then((function(r){return r&&function(r){var n=Object.create(r,{continue:{value:function(n){null!=n?r.continue(pad(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,a).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(pad(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===a?e[0]:e.slice(0,a)}},value:{get:function(){return r.value}}});return n}(r)}))}});return h}})}var virtualIndexMiddleware={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:createVirtualIndexMiddleware};function getObjectDiff(e,t,r,n){return r=r||{},n=n||"",keys(e).forEach((function(i){if(hasOwn(t,i)){var o=e[i],a=t[i];if("object"==typeof o&&"object"==typeof a&&o&&a){var s=toStringTag(o);s!==toStringTag(a)?r[n+i]=t[i]:"Object"===s?getObjectDiff(o,a,r,n+i+"."):o!==a&&(r[n+i]=t[i])}else o!==a&&(r[n+i]=t[i])}else r[n+i]=void 0})),keys(t).forEach((function(i){hasOwn(e,i)||(r[n+i]=t[i])})),r}function getEffectiveKeys(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}var hooksMiddleware={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return __assign(__assign({},e),{table:function(t){var r=e.table(t),n=r.schema.primaryKey,i=__assign(__assign({},r),{mutate:function(e){var i=PSD.trans,o=i.table(t).hook,a=o.deleting,s=o.creating,c=o.updating;switch(e.type){case"add":if(s.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"put":if(s.fire===nop&&c.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"delete":if(a.fire===nop)break;return i._promise("readwrite",(function(){return u(e)}),!0);case"deleteRange":if(a.fire===nop)break;return i._promise("readwrite",(function(){return function(e){return l(e.trans,e.range,1e4)}(e)}),!0)}return r.mutate(e);function u(e){var t=PSD.trans,i=e.keys||getEffectiveKeys(n,e);if(!i)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?__assign(__assign({},e),{keys:i}):__assign({},e)).type&&(e.values=__spreadArray([],e.values,!0)),e.keys&&(e.keys=__spreadArray([],e.keys,!0)),getExistingValues(r,e,i).then((function(o){var u=i.map((function(r,i){var u=o[i],l={onerror:null,onsuccess:null};if("delete"===e.type)a.fire.call(l,r,u,t);else if("add"===e.type||void 0===u){var d=s.fire.call(l,r,e.values[i],t);null==r&&null!=d&&(r=d,e.keys[i]=r,n.outbound||setByKeyPath(e.values[i],n.keyPath,r))}else{var h=getObjectDiff(u,e.values[i]),f=c.fire.call(l,h,r,u,t);if(f){var p=e.values[i];Object.keys(f).forEach((function(e){hasOwn(p,e)?p[e]=f[e]:setByKeyPath(p,e,f[e])}))}}return l}));return r.mutate(e).then((function(t){for(var r=t.failures,n=t.results,a=t.numFailures,s=t.lastResult,c=0;c<i.length;++c){var l=n?n[c]:i[c],d=u[c];null==l?d.onerror&&d.onerror(r[c]):d.onsuccess&&d.onsuccess("put"===e.type&&o[c]?e.values[c]:l)}return{failures:r,results:n,numFailures:a,lastResult:s}})).catch((function(e){return u.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))}function l(e,t,i){return r.query({trans:e,values:!1,query:{index:n,range:t},limit:i}).then((function(r){var n=r.result;return u({type:"delete",keys:n,trans:e}).then((function(r){return r.numFailures>0?Promise.reject(r.failures[0]):n.length<i?{failures:[],numFailures:0,lastResult:void 0}:l(e,__assign(__assign({},t),{lower:n[n.length-1],lowerOpen:!0}),i)}))}))}}});return i}})}};function getExistingValues(e,t,r){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:r,cache:"immutable"})}function getFromTransactionCache(e,t,r){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var n=[],i=0,o=0;i<t.keys.length&&o<e.length;++i)0===cmp(t.keys[i],e[o])&&(n.push(r?deepClone(t.values[i]):t.values[i]),++o);return n.length===e.length?n:null}catch(e){return null}}var cacheExistingValuesMiddleware={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var r=e.table(t);return __assign(__assign({},r),{getMany:function(e){if(!e.cache)return r.getMany(e);var t=getFromTransactionCache(e.keys,e.trans._cache,"clone"===e.cache);return t?DexiePromise.resolve(t):r.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?deepClone(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),r.mutate(e)}})}}}};function isCachableContext(e,t){return"readonly"===e.trans.mode&&!!e.subscr&&!e.trans.explicit&&"disabled"!==e.trans.db._options.cache&&!t.schema.primaryKey.outbound}function isCachableRequest(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var observabilityMiddleware={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,r=new RangeSet(e.MIN_KEY,e.MAX_KEY);return __assign(__assign({},e),{transaction:function(t,r,n){if(PSD.subscr&&"readonly"!==r)throw new exceptions.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(PSD.querier));return e.transaction(t,r,n)},table:function(n){var i=e.table(n),o=i.schema,a=o.primaryKey,s=o.indexes,c=a.extractKey,u=a.outbound,l=a.autoIncrement&&s.filter((function(e){return e.compound&&e.keyPath.includes(a.keyPath)})),d=__assign(__assign({},i),{mutate:function(e){var s=e.trans,c=e.mutatedParts||(e.mutatedParts={}),u=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return c[r]||(c[r]=new RangeSet)},d=u(""),h=u(":dels"),f=e.type,p="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[getEffectiveKeys(a,e).filter((function(e){return e})),e.values]:[],m=p[0],g=p[1],v=e.trans._cache;if(isArray(m)){d.addKeys(m);var y="delete"===f||m.length===g.length?getFromTransactionCache(m,v):null;y||h.addKeys(m),(y||g)&&trackAffectedIndexes(u,o,y,g)}else if(m){var _={from:m.lower,to:m.upper};h.add(_),d.add(_)}else d.add(r),h.add(r),o.indexes.forEach((function(e){return u(e.name).add(r)}));return i.mutate(e).then((function(t){return!m||"add"!==e.type&&"put"!==e.type||(d.addKeys(t.results),l&&l.forEach((function(r){var n=e.values.map((function(e){return r.extractKey(e)})),i=r.keyPath.findIndex((function(e){return e===a.keyPath}));t.results.forEach((function(e){return n[i]=e})),u(r.name).addKeys(n)}))),s.mutatedParts=extendObservabilitySet(s.mutatedParts||{},c),t}))}}),h=function(t){var r,n,i=t.query,o=i.index,a=i.range;return[o,new RangeSet(null!==(r=a.lower)&&void 0!==r?r:e.MIN_KEY,null!==(n=a.upper)&&void 0!==n?n:e.MAX_KEY)]},f={get:function(e){return[a,new RangeSet(e.key)]},getMany:function(e){return[a,(new RangeSet).addKeys(e.keys)]},count:h,query:h,openCursor:h};return keys(f).forEach((function(e){d[e]=function(o){var a=PSD.subscr,s=!!a,l=isCachableContext(PSD,i)&&isCachableRequest(e,o)?o.obsSet={}:a;if(s){var d=function(e){var r="idb://".concat(t,"/").concat(n,"/").concat(e);return l[r]||(l[r]=new RangeSet)},h=d(""),p=d(":dels"),m=f[e](o),g=m[0],v=m[1];if("query"===e&&g.isPrimaryKey&&!o.values?p.add(v):d(g.name||"").add(v),!g.isPrimaryKey){if("count"!==e){var y="query"===e&&u&&o.values&&i.query(__assign(__assign({},o),{values:!1}));return i[e].apply(this,arguments).then((function(t){if("query"===e){if(u&&o.values)return y.then((function(e){var r=e.result;return h.addKeys(r),t}));var r=o.values?t.result.map(c):t.result;o.values?h.addKeys(r):p.addKeys(r)}else if("openCursor"===e){var n=t,i=o.values;return n&&Object.create(n,{key:{get:function(){return p.addKey(n.primaryKey),n.key}},primaryKey:{get:function(){var e=n.primaryKey;return p.addKey(e),e}},value:{get:function(){return i&&h.addKey(n.primaryKey),n.value}}})}return t}))}p.add(r)}}return i[e].apply(this,arguments)}})),d}})}};function trackAffectedIndexes(e,t,r,n){t.indexes.forEach((function(t){var i=e(t.name||"");function o(e){return null!=e?t.extractKey(e):null}var a=function(e){return t.multiEntry&&isArray(e)?e.forEach((function(e){return i.addKey(e)})):i.addKey(e)};(r||n).forEach((function(e,t){var i=r&&o(r[t]),s=n&&o(n[t]);0!==cmp(i,s)&&(null!=i&&a(i),null!=s&&a(s))}))}))}function adjustOptimisticFromFailures(e,t,r){if(0===r.numFailures)return t;if("deleteRange"===t.type)return null;var n=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;if(r.numFailures===n)return null;var i=__assign({},t);return isArray(i.keys)&&(i.keys=i.keys.filter((function(e,t){return!(t in r.failures)}))),"values"in i&&isArray(i.values)&&(i.values=i.values.filter((function(e,t){return!(t in r.failures)}))),i}function isAboveLower(e,t){return void 0===t.lower||(t.lowerOpen?cmp(e,t.lower)>0:cmp(e,t.lower)>=0)}function isBelowUpper(e,t){return void 0===t.upper||(t.upperOpen?cmp(e,t.upper)<0:cmp(e,t.upper)<=0)}function isWithinRange(e,t){return isAboveLower(e,t)&&isBelowUpper(e,t)}function applyOptimisticOps(e,t,r,n,i,o){if(!r||0===r.length)return e;var a=t.query.index,s=a.multiEntry,c=t.query.range,u=n.schema.primaryKey.extractKey,l=a.extractKey,d=(a.lowLevelIndex||a).extractKey,h=r.reduce((function(e,r){var n=e,i="add"===r.type||"put"===r.type?r.values.filter((function(e){var t=l(e);return s&&isArray(t)?t.some((function(e){return isWithinRange(e,c)})):isWithinRange(t,c)})).map((function(e){return e=deepClone(e),o&&Object.freeze(e),e})):[];switch(r.type){case"add":n=e.concat(t.values?i:i.map((function(e){return u(e)})));break;case"put":var a=(new RangeSet).addKeys(r.values.map((function(e){return u(e)})));n=e.filter((function(e){var r=t.values?u(e):e;return!rangesOverlap(new RangeSet(r),a)})).concat(t.values?i:i.map((function(e){return u(e)})));break;case"delete":var d=(new RangeSet).addKeys(r.keys);n=e.filter((function(e){var r=t.values?u(e):e;return!rangesOverlap(new RangeSet(r),d)}));break;case"deleteRange":var h=r.range;n=e.filter((function(e){return!isWithinRange(u(e),h)}))}return n}),e);return h===e?e:(h.sort((function(e,t){return cmp(d(e),d(t))||cmp(u(e),u(t))})),t.limit&&t.limit<1/0&&(h.length>t.limit?h.length=t.limit:e.length===t.limit&&h.length<t.limit&&(i.dirty=!0)),o?Object.freeze(h):h)}function areRangesEqual(e,t){return 0===cmp(e.lower,t.lower)&&0===cmp(e.upper,t.upper)&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function compareLowers(e,t,r,n){if(void 0===e)return void 0!==t?-1:0;if(void 0===t)return 1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return 1;if(n)return-1}return i}function compareUppers(e,t,r,n){if(void 0===e)return void 0!==t?1:0;if(void 0===t)return-1;var i=cmp(e,t);if(0===i){if(r&&n)return 0;if(r)return-1;if(n)return 1}return i}function isSuperRange(e,t){return compareLowers(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&compareUppers(e.upper,t.upper,e.upperOpen,t.upperOpen)>=0}function findCompatibleQuery(e,t,r,n){var i=cache["idb://".concat(e,"/").concat(t)];if(!i)return[];var o=i.queries[r];if(!o)return[null,!1,i,null];var a=o[(n.query?n.query.index.name:null)||""];if(!a)return[null,!1,i,null];switch(r){case"query":var s=a.find((function(e){return e.req.limit===n.limit&&e.req.values===n.values&&areRangesEqual(e.req.query.range,n.query.range)}));return s?[s,!0,i,a]:[a.find((function(e){return("limit"in e.req?e.req.limit:1/0)>=n.limit&&(!n.values||e.req.values)&&isSuperRange(e.req.query.range,n.query.range)})),!1,i,a];case"count":var c=a.find((function(e){return areRangesEqual(e.req.query.range,n.query.range)}));return[c,!!c,i,a]}}function subscribeToCacheEntry(e,t,r,n){e.subscribers.add(r),n.addEventListener("abort",(function(){e.subscribers.delete(r),0===e.subscribers.size&&enqueForDeletion(e,t)}))}function enqueForDeletion(e,t){setTimeout((function(){0===e.subscribers.size&&delArrayItem(t,e)}),3e3)}var cacheMiddleware={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name,r=__assign(__assign({},e),{transaction:function(r,n,i){var o=e.transaction(r,n,i);if("readwrite"===n){var a=new AbortController,s=a.signal,c=function(i){return function(){if(a.abort(),"readwrite"===n){for(var s=new Set,c=0,u=r;c<u.length;c++){var l=u[c],d=cache["idb://".concat(t,"/").concat(l)];if(d){var h=e.table(l),f=d.optimisticOps.filter((function(e){return e.trans===o}));if(o._explicit&&i&&o.mutatedParts)for(var p=0,m=Object.values(d.queries.query);p<m.length;p++)for(var g=0,v=(b=m[p]).slice();g<v.length;g++){obsSetsOverlap((S=v[g]).obsSet,o.mutatedParts)&&(delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)})))}else if(f.length>0){d.optimisticOps=d.optimisticOps.filter((function(e){return e.trans!==o}));for(var y=0,_=Object.values(d.queries.query);y<_.length;y++)for(var b,w=0,D=(b=_[y]).slice();w<D.length;w++){var S;if(null!=(S=D[w]).res&&o.mutatedParts)if(i&&!S.dirty){var x=Object.isFrozen(S.res),T=applyOptimisticOps(S.res,S.req,f,h,S,x);S.dirty?(delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)}))):T!==S.res&&(S.res=T,S.promise=DexiePromise.resolve({result:T}))}else S.dirty&&delArrayItem(b,S),S.subscribers.forEach((function(e){return s.add(e)}))}}}}s.forEach((function(e){return e()}))}}};o.addEventListener("abort",c(!1),{signal:s}),o.addEventListener("error",c(!1),{signal:s}),o.addEventListener("complete",c(!0),{signal:s})}return o},table:function(r){var n=e.table(r),i=n.schema.primaryKey,o=__assign(__assign({},n),{mutate:function(e){var o=PSD.trans;if(i.outbound||"disabled"===o.db._options.cache||o.explicit)return n.mutate(e);var a=cache["idb://".concat(t,"/").concat(r)];if(!a)return n.mutate(e);var s=n.mutate(e);return"add"!==e.type&&"put"!==e.type||!(e.values.length>=50||getEffectiveKeys(i,e).some((function(e){return null==e})))?(a.optimisticOps.push(e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts),s.then((function(t){if(t.numFailures>0){delArrayItem(a.optimisticOps,e);var r=adjustOptimisticFromFailures(a,e,t);r&&a.optimisticOps.push(r),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}})),s.catch((function(){delArrayItem(a.optimisticOps,e),e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))):s.then((function(t){var r=__assign(__assign({},e),{values:e.values.map((function(e,r){var n,o=(null===(n=i.keyPath)||void 0===n?void 0:n.includes("."))?deepClone(e):__assign({},e);return setByKeyPath(o,i.keyPath,t.results[r]),o}))}),n=adjustOptimisticFromFailures(a,r,t);a.optimisticOps.push(n),queueMicrotask((function(){return e.mutatedParts&&signalSubscribersLazily(e.mutatedParts)}))})),s},query:function(e){var i;if(!isCachableContext(PSD,n)||!isCachableRequest("query",e))return n.query(e);var o="immutable"===(null===(i=PSD.trans)||void 0===i?void 0:i.db._options.cache),a=PSD,s=a.requery,c=a.signal,u=findCompatibleQuery(t,r,"query",e),l=u[0],d=u[1],h=u[2],f=u[3];if(l&&d)l.obsSet=e.obsSet;else{var p=n.query(e).then((function(e){var t=e.result;if(l&&(l.res=t),o){for(var r=0,n=t.length;r<n;++r)Object.freeze(t[r]);Object.freeze(t)}else e.result=deepClone(t);return e})).catch((function(e){return f&&l&&delArrayItem(f,l),Promise.reject(e)}));l={obsSet:e.obsSet,promise:p,subscribers:new Set,type:"query",req:e,dirty:!1},f?f.push(l):(f=[l],h||(h=cache["idb://".concat(t,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}}),h.queries.query[e.query.index.name||""]=f)}return subscribeToCacheEntry(l,f,s,c),l.promise.then((function(t){return{result:applyOptimisticOps(t.result,e,null==h?void 0:h.optimisticOps,n,l,o)}}))}});return o}});return r}};function vipify(e,t){return new Proxy(e,{get:function(e,r,n){return"db"===r?t:Reflect.get(e,r,n)}})}var Dexie$1=function(){function e(t,r){var n=this;this._middlewares={},this.verno=0;var i=e.dependencies;this._options=r=__assign({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},r),this._deps={indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange};var o=r.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:nop,dbReadyPromise:null,cancelOpen:nop,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:r.autoOpen};a.dbReadyPromise=new DexiePromise((function(e){a.dbReadyResolve=e})),a.openCanceller=new DexiePromise((function(e,t){a.cancelOpen=t})),this._state=a,this.name=t,this.on=Events(this,"populate","blocked","versionchange","close",{ready:[promisableChain,nop]}),this.on.ready.subscribe=override(this.on.ready.subscribe,(function(t){return function(r,i){e.vip((function(){var e=n._state;if(e.openComplete)e.dbOpenError||DexiePromise.resolve().then(r),i&&t(r);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(r),i&&t(r);else{t(r);var o=n;i||t((function e(){o.on.ready.unsubscribe(r),o.on.ready.unsubscribe(e)}))}}))}})),this.Collection=createCollectionConstructor(this),this.Table=createTableConstructor(this),this.Transaction=createTransactionConstructor(this),this.Version=createVersionConstructor(this),this.WhereClause=createWhereClauseConstructor(this),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=getMaxKey(r.IDBKeyRange),this._createTransaction=function(e,t,r,i){return new n.Transaction(e,t,r,n._options.chromeTransactionDurability,i)},this._fireOnBlocked=function(e){n.on("blocked").fire(e),connections.filter((function(e){return e.name===n.name&&e!==n&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(cacheExistingValuesMiddleware),this.use(cacheMiddleware),this.use(observabilityMiddleware),this.use(virtualIndexMiddleware),this.use(hooksMiddleware);var s=new Proxy(this,{get:function(e,t,r){if("_vip"===t)return!0;if("table"===t)return function(e){return vipify(n.table(e),s)};var i=Reflect.get(e,t,r);return i instanceof Table?vipify(i,s):"tables"===t?i.map((function(e){return vipify(e,s)})):"_createTransaction"===t?function(){return vipify(i.apply(this,arguments),s)}:i}});this.vip=s,o.forEach((function(e){return e(n)}))}return e.prototype.version=function(e){if(isNaN(e)||e<.1)throw new exceptions.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new exceptions.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter((function(t){return t._cfg.version===e}))[0];return r||(r=new this.Version(e),t.push(r),t.sort(lowerVersionFirst),r.stores({}),this._state.autoSchema=!1,r)},e.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||PSD.letThrough||this._vip)?e():new DexiePromise((function(e,r){if(t._state.openComplete)return r(new exceptions.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void r(new exceptions.DatabaseClosed);t.open().catch(nop)}t._state.dbReadyPromise.then(e,r)})).then(e)},e.prototype.use=function(e){var t=e.stack,r=e.create,n=e.level,i=e.name;i&&this.unuse({stack:t,name:i});var o=this._middlewares[t]||(this._middlewares[t]=[]);return o.push({stack:t,create:r,level:null==n?10:n,name:i}),o.sort((function(e,t){return e.level-t.level})),this},e.prototype.unuse=function(e){var t=e.stack,r=e.name,n=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return n?e.create!==n:!!r&&e.name!==r}))),this},e.prototype.open=function(){var e=this;return usePSD(globalPSD,(function(){return dexieOpen(e)}))},e.prototype._close=function(){var e=this._state,t=connections.indexOf(this);if(t>=0&&connections.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new DexiePromise((function(t){e.dbReadyResolve=t})),e.openCanceller=new DexiePromise((function(t,r){e.cancelOpen=r})))},e.prototype.close=function(e){var t=(void 0===e?{disableAutoOpen:!0}:e).disableAutoOpen,r=this._state;t?(r.isBeingOpened&&r.cancelOpen(new exceptions.DatabaseClosed),this._close(),r.autoOpen=!1,r.dbOpenError=new exceptions.DatabaseClosed):(this._close(),r.autoOpen=this._options.autoOpen||r.isBeingOpened,r.openComplete=!1,r.dbOpenError=null)},e.prototype.delete=function(e){var t=this;void 0===e&&(e={disableAutoOpen:!0});var r=arguments.length>0&&"object"!=typeof arguments[0],n=this._state;return new DexiePromise((function(i,o){var a=function(){t.close(e);var r=t._deps.indexedDB.deleteDatabase(t.name);r.onsuccess=wrap$1((function(){_onDatabaseDeleted(t._deps,t.name),i()})),r.onerror=eventRejectHandler(o),r.onblocked=t._fireOnBlocked};if(r)throw new exceptions.InvalidArgument("Invalid closeOptions argument to db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))},e.prototype.backendDB=function(){return this.idbdb},e.prototype.isOpen=function(){return null!==this.idbdb},e.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name},e.prototype.hasFailed=function(){return null!==this._state.dbOpenError},e.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(e.prototype,"tables",{get:function(){var e=this;return keys(this._allTables).map((function(t){return e._allTables[t]}))},enumerable:!1,configurable:!0}),e.prototype.transaction=function(){var e=extractTransactionArgs.apply(this,arguments);return this._transaction.apply(this,e)},e.prototype._transaction=function(e,t,r){var n=this,i=PSD.trans;i&&i.db===this&&-1===e.indexOf("!")||(i=null);var o,a,s=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{if(a=t.map((function(e){var t=e instanceof n.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||e===READONLY)o=READONLY;else{if("rw"!=e&&e!=READWRITE)throw new exceptions.InvalidArgument("Invalid transaction mode: "+e);o=READWRITE}if(i){if(i.mode===READONLY&&o===READWRITE){if(!s)throw new exceptions.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");i=null}i&&a.forEach((function(e){if(i&&-1===i.storeNames.indexOf(e)){if(!s)throw new exceptions.SubTransaction("Table "+e+" not included in parent transaction.");i=null}})),s&&i&&!i.active&&(i=null)}}catch(e){return i?i._promise(null,(function(t,r){r(e)})):rejection(e)}var c=enterTransactionScope.bind(null,this,o,a,i,r);return i?i._promise(o,c,"lock"):PSD.trans?usePSD(PSD.transless,(function(){return n._whenReady(c)})):this._whenReady(c)},e.prototype.table=function(e){if(!hasOwn(this._allTables,e))throw new exceptions.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},e}(),symbolObservable="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Observable=function(){function e(e){this._subscribe=e}return e.prototype.subscribe=function(e,t,r){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:r})},e.prototype[symbolObservable]=function(){return this},e}(),domDeps;try{domDeps={indexedDB:_global.indexedDB||_global.mozIndexedDB||_global.webkitIndexedDB||_global.msIndexedDB,IDBKeyRange:_global.IDBKeyRange||_global.webkitIDBKeyRange}}catch(e){domDeps={indexedDB:null,IDBKeyRange:null}}function liveQuery(e){var t,r=!1,n=new Observable((function(n){var i=isAsyncFunction(e);var o,a=!1,s={},c={},u={get closed(){return a},unsubscribe:function(){a||(a=!0,o&&o.abort(),l&&globalEvents.storagemutated.unsubscribe(h))}};n.start&&n.start(u);var l=!1,d=function(){return execInGlobalContext(f)};var h=function(e){extendObservabilitySet(s,e),obsSetsOverlap(c,s)&&d()},f=function(){if(!a&&domDeps.indexedDB){s={};var u={};o&&o.abort(),o=new AbortController;var f={subscr:u,signal:o.signal,requery:d,querier:e,trans:null},p=function(t){var r=beginMicroTickScope();try{i&&incrementExpectedAwaits();var n=newScope(e,t);return i&&(n=n.finally(decrementExpectedAwaits)),n}finally{r&&endMicroTickScope()}}(f);Promise.resolve(p).then((function(e){r=!0,t=e,a||f.signal.aborted||(s={},objectIsEmpty(c=u)||l||(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,h),l=!0),execInGlobalContext((function(){return!a&&n.next&&n.next(e)})))}),(function(e){r=!1,["DatabaseClosedError","AbortError"].includes(null==e?void 0:e.name)||a||execInGlobalContext((function(){a||n.error&&n.error(e)}))}))}};return setTimeout(d,0),u}));return n.hasValue=function(){return r},n.getValue=function(){return t},n}var Dexie=Dexie$1;function propagateLocally(e){var t=propagatingLocally;try{propagatingLocally=!0,globalEvents.storagemutated.fire(e),signalSubscribersNow(e,!0)}finally{propagatingLocally=t}}props(Dexie,__assign(__assign({},fullNameExceptions),{delete:function(e){return new Dexie(e,{addons:[]}).delete()},exists:function(e){return new Dexie(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return getDatabaseNames(Dexie.dependencies).then(e)}catch(e){return rejection(new exceptions.MissingAPI)}},defineClass:function(){return function(e){extend(this,e)}},ignoreTransaction:function(e){return PSD.trans?usePSD(PSD.transless,e):e()},vip:vip,async:function(e){return function(){try{var t=awaitIterator(e.apply(this,arguments));return t&&"function"==typeof t.then?t:DexiePromise.resolve(t)}catch(e){return rejection(e)}}},spawn:function(e,t,r){try{var n=awaitIterator(e.apply(r,t||[]));return n&&"function"==typeof n.then?n:DexiePromise.resolve(n)}catch(e){return rejection(e)}},currentTransaction:{get:function(){return PSD.trans||null}},waitFor:function(e,t){var r=DexiePromise.resolve("function"==typeof e?Dexie.ignoreTransaction(e):e).timeout(t||6e4);return PSD.trans?PSD.trans.waitFor(r):r},Promise:DexiePromise,debug:{get:function(){return debug},set:function(e){setDebug(e)}},derive:derive,extend:extend,props:props,override:override,Events:Events,on:globalEvents,liveQuery:liveQuery,extendObservabilitySet:extendObservabilitySet,getByKeyPath:getByKeyPath,setByKeyPath:setByKeyPath,delByKeyPath:delByKeyPath,shallowClone:shallowClone,deepClone:deepClone,getObjectDiff:getObjectDiff,cmp:cmp,asap:asap$1,minKey:minKey,addons:[],connections:connections,errnames:errnames,dependencies:domDeps,cache:cache,semVer:DEXIE_VERSION,version:DEXIE_VERSION.split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,r){return e+t/Math.pow(10,2*r)}))})),Dexie.maxKey=getMaxKey(Dexie.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){var t;propagatingLocally||(t=new CustomEvent(STORAGE_MUTATED_DOM_EVENT_NAME,{detail:e}),propagatingLocally=!0,dispatchEvent(t),propagatingLocally=!1)})),addEventListener(STORAGE_MUTATED_DOM_EVENT_NAME,(function(e){var t=e.detail;propagatingLocally||propagateLocally(t)})));var propagatingLocally=!1,bc,createBC=function(){};"undefined"!=typeof BroadcastChannel&&(createBC=function(){(bc=new BroadcastChannel(STORAGE_MUTATED_DOM_EVENT_NAME)).onmessage=function(e){return e.data&&propagateLocally(e.data)}},createBC(),"function"==typeof bc.unref&&bc.unref(),globalEvents(DEXIE_STORAGE_MUTATED_EVENT_NAME,(function(e){propagatingLocally||bc.postMessage(e)}))),"undefined"!=typeof addEventListener&&(addEventListener("pagehide",(function(e){if(!Dexie$1.disableBfCache&&e.persisted){debug&&console.debug("Dexie: handling persisted pagehide"),null==bc||bc.close();for(var t=0,r=connections;t<r.length;t++){r[t].close({disableAutoOpen:!1})}}})),addEventListener("pageshow",(function(e){!Dexie$1.disableBfCache&&e.persisted&&(debug&&console.debug("Dexie: handling persisted pageshow"),createBC(),propagateLocally({all:new RangeSet(-1/0,[[]])}))}))),DexiePromise.rejectionMapper=mapError,setDebug(debug);var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),requireFoolWebpack_1=requireFoolWebpack,environment=createCommonjsModule((function(e){var t=function(e){return void 0!==e&&null!=e.versions&&null!=e.versions.node};e.exports.isNode=t,e.exports.platform=void 0!==process$1&&t(process$1)?"node":"browser";var r=function(e){try{return requireFoolWebpack_1(e)}catch(e){return null}}("worker_threads");e.exports.isMainThread="node"===e.exports.platform?(!r||r.isMainThread)&&!process$1.connected:"undefined"!=typeof Window,e.exports.cpus="browser"===e.exports.platform?self.navigator.hardwareConcurrency:requireFoolWebpack_1("os").cpus().length}));function Promise$2(e,t){var r=this;if(!(this instanceof Promise$2))throw new SyntaxError("Constructor must be called with the new operator");if("function"!=typeof e)throw new SyntaxError("Function parameter handler(resolve, reject) missing");var n=[],i=[];this.resolved=!1,this.rejected=!1,this.pending=!0;var o=function(e,t){n.push(e),i.push(t)};this.then=function(e,t){return new Promise$2((function(r,n){var i=e?_then(e,r,n):r,a=t?_then(t,r,n):n;o(i,a)}),r)};var a=function(e){return r.resolved=!0,r.rejected=!1,r.pending=!1,n.forEach((function(t){t(e)})),o=function(t,r){t(e)},a=s=function(){},r},s=function(e){return r.resolved=!1,r.rejected=!0,r.pending=!1,i.forEach((function(t){t(e)})),o=function(t,r){r(e)},a=s=function(){},r};this.cancel=function(){return t?t.cancel():s(new CancellationError),r},this.timeout=function(e){if(t)t.timeout(e);else{var n=setTimeout((function(){s(new TimeoutError("Promise timed out after "+e+" ms"))}),e);r.always((function(){clearTimeout(n)}))}return r},e((function(e){a(e)}),(function(e){s(e)}))}function _then(e,t,r){return function(n){try{var i=e(n);i&&"function"==typeof i.then&&"function"==typeof i.catch?i.then(t,r):t(i)}catch(e){r(e)}}}function CancellationError(e){this.message=e||"promise cancelled",this.stack=(new Error).stack}function TimeoutError(e){this.message=e||"timeout exceeded",this.stack=(new Error).stack}environment.isNode,environment.platform,environment.isMainThread,environment.cpus,Promise$2.prototype.catch=function(e){return this.then(null,e)},Promise$2.prototype.always=function(e){return this.then(e,e)},Promise$2.all=function(e){return new Promise$2((function(t,r){var n=e.length,i=[];n?e.forEach((function(e,o){e.then((function(e){i[o]=e,0==--n&&t(i)}),(function(e){n=0,r(e)}))})):t(i)}))},Promise$2.defer=function(){var e={};return e.promise=new Promise$2((function(t,r){e.resolve=t,e.reject=r})),e},CancellationError.prototype=new Error,CancellationError.prototype.constructor=Error,CancellationError.prototype.name="CancellationError",Promise$2.CancellationError=CancellationError,TimeoutError.prototype=new Error,TimeoutError.prototype.constructor=Error,TimeoutError.prototype.name="TimeoutError",Promise$2.TimeoutError=TimeoutError;var _Promise=Promise$2,__dirname="/Users/wangshuai/workspace/web-design/go-design/node_modules/.pnpm/workerpool@6.4.0/node_modules/workerpool/src",embeddedWorker='!function(){var __webpack_modules__={577:function(e){e.exports=function(e,r){this.message=e,this.transfer=r}}},__webpack_module_cache__={};function __webpack_require__(e){var r=__webpack_module_cache__[e];return void 0!==r||(r=__webpack_module_cache__[e]={exports:{}},__webpack_modules__[e](r,r.exports,__webpack_require__)),r.exports}var __webpack_exports__={};!function(){var exports=__webpack_exports__,__webpack_unused_export__;function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Transfer=__webpack_require__(577),requireFoolWebpack=eval("typeof require !== \'undefined\' ? require : function (module) { throw new Error(\'Module \\" + module + \\" not found.\') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}},WorkerThreads,parentPort;if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,r){addEventListener(e,function(e){r(e.data)})},worker.send=function(e){postMessage(e)};else{if("undefined"==typeof process)throw new Error("Script must be executed as a worker");try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(error){if("object"!==_typeof(error)||null===error||"MODULE_NOT_FOUND"!==error.code)throw error}WorkerThreads&&null!==WorkerThreads.parentPort?(parentPort=WorkerThreads.parentPort,worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort)):(worker.on=process.on.bind(process),worker.send=function(e){process.send(e)},worker.on("disconnect",function(){process.exit(1)})),worker.exit=process.exit.bind(process)}function convertError(o){return Object.getOwnPropertyNames(o).reduce(function(e,r){return Object.defineProperty(e,r,{value:o[r],enumerable:!0})},{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,r){e=new Function("return ("+e+").apply(null, arguments);");return e.apply(e,r)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){function r(){worker.exit(e)}if(!worker.terminationHandler)return r();var o=worker.terminationHandler(e);isPromise(o)?o.then(r,r):r()};var currentRequestId=null;worker.on("message",function(r){if(r===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var e=worker.methods[r.method];if(!e)throw new Error(\'Unknown method "\'+r.method+\'"\');currentRequestId=r.id;var o=e.apply(e,r.params);isPromise(o)?o.then(function(e){e instanceof Transfer?worker.send({id:r.id,result:e.message,error:null},e.transfer):worker.send({id:r.id,result:e,error:null}),currentRequestId=null}).catch(function(e){worker.send({id:r.id,result:null,error:convertError(e)}),currentRequestId=null}):(o instanceof Transfer?worker.send({id:r.id,result:o.message,error:null},o.transfer):worker.send({id:r.id,result:o,error:null}),currentRequestId=null)}catch(e){worker.send({id:r.id,result:null,error:convertError(e)})}}),worker.register=function(e,r){if(e)for(var o in e)e.hasOwnProperty(o)&&(worker.methods[o]=e[o]);r&&(worker.terminationHandler=r.onTerminate),worker.send("ready")},worker.emit=function(e){currentRequestId&&(e instanceof Transfer?worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer):worker.send({id:currentRequestId,isEvent:!0,payload:e}))},__webpack_unused_export__=worker.register,worker.emit}()}();',TERMINATE_METHOD_ID="__workerpool-terminate__";function ensureWorkerThreads(){var e=tryRequireWorkerThreads();if(!e)throw new Error("WorkerPool: workerType = 'thread' is not supported, Node >= 11.7.0 required");return e}function ensureWebWorker(){if("function"!=typeof Worker&&("object"!=typeof Worker||"function"!=typeof Worker.prototype.constructor))throw new Error("WorkerPool: Web Workers not supported")}function tryRequireWorkerThreads(){try{return requireFoolWebpack_1("worker_threads")}catch(e){if("object"==typeof e&&null!==e&&"MODULE_NOT_FOUND"===e.code)return null;throw e}}function getDefaultWorker(){if("browser"===environment.platform){if("undefined"==typeof Blob)throw new Error("Blob not supported by the browser");if(!window.URL||"function"!=typeof window.URL.createObjectURL)throw new Error("URL.createObjectURL not supported by the browser");var e=new Blob([embeddedWorker],{type:"text/javascript"});return window.URL.createObjectURL(e)}return __dirname+"/worker.js"}function setupWorker(e,t){if("web"===t.workerType)return ensureWebWorker(),setupBrowserWorker(e,Worker);if("thread"===t.workerType)return setupWorkerThreadWorker(e,r=ensureWorkerThreads(),t.workerThreadOpts);if("process"!==t.workerType&&t.workerType){if("browser"===environment.platform)return ensureWebWorker(),setupBrowserWorker(e,Worker);var r=tryRequireWorkerThreads();return r?setupWorkerThreadWorker(e,r):setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}return setupProcessWorker(e,resolveForkOptions(t),requireFoolWebpack_1("child_process"))}function setupBrowserWorker(e,t){var r=new t(e);return r.isBrowserWorker=!0,r.on=function(e,t){this.addEventListener(e,(function(e){t(e.data)}))},r.send=function(e,t){this.postMessage(e,t)},r}function setupWorkerThreadWorker(e,t,r){var n=new t.Worker(e,{stdout:!1,stderr:!1,...r});return n.isWorkerThread=!0,n.send=function(e,t){this.postMessage(e,t)},n.kill=function(){return this.terminate(),!0},n.disconnect=function(){this.terminate()},n}function setupProcessWorker(e,t,r){var n=r.fork(e,t.forkArgs,t.forkOpts),i=n.send;return n.send=function(e){return i.call(n,e)},n.isChildProcess=!0,n}function resolveForkOptions(e){e=e||{};var t=process$1.execArgv.join(" "),r=-1!==t.indexOf("--inspect"),n=-1!==t.indexOf("--debug-brk"),i=[];return r&&(i.push("--inspect="+e.debugPort),n&&i.push("--debug-brk")),process$1.execArgv.forEach((function(e){e.indexOf("--max-old-space-size")>-1&&i.push(e)})),Object.assign({},e,{forkArgs:e.forkArgs,forkOpts:Object.assign({},e.forkOpts,{execArgv:(e.forkOpts&&e.forkOpts.execArgv||[]).concat(i)})})}function objectToError(e){for(var t=new Error(""),r=Object.keys(e),n=0;n<r.length;n++)t[r[n]]=e[r[n]];return t}function WorkerHandler(e,t){var r=this,n=t||{};function i(e){for(var t in r.terminated=!0,r.processing)void 0!==r.processing[t]&&r.processing[t].resolver.reject(e);r.processing=Object.create(null)}this.script=e||getDefaultWorker(),this.worker=setupWorker(this.script,n),this.debugPort=n.debugPort,this.forkOpts=n.forkOpts,this.forkArgs=n.forkArgs,this.workerThreadOpts=n.workerThreadOpts,this.workerTerminateTimeout=n.workerTerminateTimeout,e||(this.worker.ready=!0),this.requestQueue=[],this.worker.on("message",(function(e){if(!r.terminated)if("string"==typeof e&&"ready"===e)r.worker.ready=!0,function(){for(const e of r.requestQueue.splice(0))r.worker.send(e.message,e.transfer)}();else{var t=e.id,n=r.processing[t];void 0!==n&&(e.isEvent?n.options&&"function"==typeof n.options.on&&n.options.on(e.payload):(delete r.processing[t],!0===r.terminating&&r.terminate(),e.error?n.resolver.reject(objectToError(e.error)):n.resolver.resolve(e.result)))}}));var o=this.worker;this.worker.on("error",i),this.worker.on("exit",(function(e,t){var n="Workerpool Worker terminated Unexpectedly\n";n+=" exitCode: `"+e+"`\n",n+=" signalCode: `"+t+"`\n",n+=" workerpool.script: `"+r.script+"`\n",n+=" spawnArgs: `"+o.spawnargs+"`\n",n+=" spawnfile: `"+o.spawnfile+"`\n",n+=" stdout: `"+o.stdout+"`\n",n+=" stderr: `"+o.stderr+"`\n",i(new Error(n))})),this.processing=Object.create(null),this.terminating=!1,this.terminated=!1,this.cleaning=!1,this.terminationHandler=null,this.lastId=0}WorkerHandler.prototype.methods=function(){return this.exec("methods")},WorkerHandler.prototype.exec=function(e,t,r,n){r||(r=_Promise.defer());var i=++this.lastId;this.processing[i]={id:i,resolver:r,options:n};var o={message:{id:i,method:e,params:t},transfer:n&&n.transfer};this.terminated?r.reject(new Error("Worker is terminated")):this.worker.ready?this.worker.send(o.message,o.transfer):this.requestQueue.push(o);var a=this;return r.promise.catch((function(e){if(e instanceof _Promise.CancellationError||e instanceof _Promise.TimeoutError)return delete a.processing[i],a.terminateAndNotify(!0).then((function(){throw e}),(function(e){throw e}));throw e}))},WorkerHandler.prototype.busy=function(){return this.cleaning||Object.keys(this.processing).length>0},WorkerHandler.prototype.terminate=function(e,t){var r=this;if(e){for(var n in this.processing)void 0!==this.processing[n]&&this.processing[n].resolver.reject(new Error("Worker terminated"));this.processing=Object.create(null)}if("function"==typeof t&&(this.terminationHandler=t),this.busy())this.terminating=!0;else{var i=function(e){if(r.terminated=!0,r.cleaning=!1,null!=r.worker&&r.worker.removeAllListeners&&r.worker.removeAllListeners("message"),r.worker=null,r.terminating=!1,r.terminationHandler)r.terminationHandler(e,r);else if(e)throw e};if(this.worker){if("function"==typeof this.worker.kill){if(this.worker.killed)return void i(new Error("worker already killed!"));var o=setTimeout((function(){r.worker&&r.worker.kill()}),this.workerTerminateTimeout);return this.worker.once("exit",(function(){clearTimeout(o),r.worker&&(r.worker.killed=!0),i()})),this.worker.ready?this.worker.send(TERMINATE_METHOD_ID):this.requestQueue.push(TERMINATE_METHOD_ID),void(this.cleaning=!0)}if("function"!=typeof this.worker.terminate)throw new Error("Failed to terminate worker");this.worker.terminate(),this.worker.killed=!0}i()}},WorkerHandler.prototype.terminateAndNotify=function(e,t){var r=_Promise.defer();return t&&(r.promise.timeout=t),this.terminate(e,(function(e,t){e?r.reject(e):r.resolve(t)})),r.promise};var WorkerHandler_1=WorkerHandler,_tryRequireWorkerThreads=tryRequireWorkerThreads,_setupProcessWorker=setupProcessWorker,_setupBrowserWorker=setupBrowserWorker,_setupWorkerThreadWorker=setupWorkerThreadWorker,ensureWorkerThreads_1=ensureWorkerThreads;WorkerHandler_1._tryRequireWorkerThreads=_tryRequireWorkerThreads,WorkerHandler_1._setupProcessWorker=_setupProcessWorker,WorkerHandler_1._setupBrowserWorker=_setupBrowserWorker,WorkerHandler_1._setupWorkerThreadWorker=_setupWorkerThreadWorker,WorkerHandler_1.ensureWorkerThreads=ensureWorkerThreads_1;var MAX_PORTS=65535,debugPortAllocator=DebugPortAllocator;function DebugPortAllocator(){this.ports=Object.create(null),this.length=0}DebugPortAllocator.prototype.nextAvailableStartingAt=function(e){for(;!0===this.ports[e];)e++;if(e>=MAX_PORTS)throw new Error("WorkerPool debug port limit reached: "+e+">= "+MAX_PORTS);return this.ports[e]=!0,this.length++,e},DebugPortAllocator.prototype.releasePort=function(e){delete this.ports[e],this.length--};var DEBUG_PORT_ALLOCATOR=new debugPortAllocator;function Pool(e,t){"string"==typeof e?this.script=e||null:(this.script=null,t=e),this.workers=[],this.tasks=[],t=t||{},this.forkArgs=Object.freeze(t.forkArgs||[]),this.forkOpts=Object.freeze(t.forkOpts||{}),this.workerThreadOpts=Object.freeze(t.workerThreadOpts||{}),this.debugPortStart=t.debugPortStart||43210,this.nodeWorker=t.nodeWorker,this.workerType=t.workerType||t.nodeWorker||"auto",this.maxQueueSize=t.maxQueueSize||1/0,this.workerTerminateTimeout=t.workerTerminateTimeout||1e3,this.onCreateWorker=t.onCreateWorker||(()=>null),this.onTerminateWorker=t.onTerminateWorker||(()=>null),t&&"maxWorkers"in t?(validateMaxWorkers(t.maxWorkers),this.maxWorkers=t.maxWorkers):this.maxWorkers=Math.max((environment.cpus||4)-1,1),t&&"minWorkers"in t&&("max"===t.minWorkers?this.minWorkers=this.maxWorkers:(validateMinWorkers(t.minWorkers),this.minWorkers=t.minWorkers,this.maxWorkers=Math.max(this.minWorkers,this.maxWorkers)),this._ensureMinWorkers()),this._boundNext=this._next.bind(this),"thread"===this.workerType&&WorkerHandler_1.ensureWorkerThreads()}function validateMaxWorkers(e){if(!isNumber(e)||!isInteger(e)||e<1)throw new TypeError("Option maxWorkers must be an integer number >= 1")}function validateMinWorkers(e){if(!isNumber(e)||!isInteger(e)||e<0)throw new TypeError("Option minWorkers must be an integer number >= 0")}function isNumber(e){return"number"==typeof e}function isInteger(e){return Math.round(e)==e}Pool.prototype.exec=function(e,t,r){if(t&&!Array.isArray(t))throw new TypeError('Array expected as argument "params"');if("string"==typeof e){var n=_Promise.defer();if(this.tasks.length>=this.maxQueueSize)throw new Error("Max queue size of "+this.maxQueueSize+" reached");var i=this.tasks,o={method:e,params:t,resolver:n,timeout:null,options:r};i.push(o);var a=n.promise.timeout;return n.promise.timeout=function(e){return-1!==i.indexOf(o)?(o.timeout=e,n.promise):a.call(n.promise,e)},this._next(),n.promise}if("function"==typeof e)return this.exec("run",[String(e),t]);throw new TypeError('Function or string expected as argument "method"')},Pool.prototype.proxy=function(){if(arguments.length>0)throw new Error("No arguments expected");var e=this;return this.exec("methods").then((function(t){var r={};return t.forEach((function(t){r[t]=function(){return e.exec(t,Array.prototype.slice.call(arguments))}})),r}))},Pool.prototype._next=function(){if(this.tasks.length>0){var e=this._getWorker();if(e){var t=this,r=this.tasks.shift();if(r.resolver.promise.pending){var n=e.exec(r.method,r.params,r.resolver,r.options).then(t._boundNext).catch((function(){if(e.terminated)return t._removeWorker(e)})).then((function(){t._next()}));"number"==typeof r.timeout&&n.timeout(r.timeout)}else t._next()}}},Pool.prototype._getWorker=function(){for(var e=this.workers,t=0;t<e.length;t++){var r=e[t];if(!1===r.busy())return r}return e.length<this.maxWorkers?(r=this._createWorkerHandler(),e.push(r),r):null},Pool.prototype._removeWorker=function(e){var t=this;return DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e),this._ensureMinWorkers(),new _Promise((function(r,n){e.terminate(!1,(function(i){t.onTerminateWorker({forkArgs:e.forkArgs,forkOpts:e.forkOpts,workerThreadOpts:e.workerThreadOpts,script:e.script}),i?n(i):r(e)}))}))},Pool.prototype._removeWorkerFromList=function(e){var t=this.workers.indexOf(e);-1!==t&&this.workers.splice(t,1)},Pool.prototype.terminate=function(e,t){var r=this;this.tasks.forEach((function(e){e.resolver.reject(new Error("Pool terminated"))})),this.tasks.length=0;var n=function(e){DEBUG_PORT_ALLOCATOR.releasePort(e.debugPort),this._removeWorkerFromList(e)}.bind(this),i=[];return this.workers.slice().forEach((function(o){var a=o.terminateAndNotify(e,t).then(n).always((function(){r.onTerminateWorker({forkArgs:o.forkArgs,forkOpts:o.forkOpts,workerThreadOpts:o.workerThreadOpts,script:o.script})}));i.push(a)})),_Promise.all(i)},Pool.prototype.stats=function(){var e=this.workers.length,t=this.workers.filter((function(e){return e.busy()})).length;return{totalWorkers:e,busyWorkers:t,idleWorkers:e-t,pendingTasks:this.tasks.length,activeTasks:t}},Pool.prototype._ensureMinWorkers=function(){if(this.minWorkers)for(var e=this.workers.length;e<this.minWorkers;e++)this.workers.push(this._createWorkerHandler())},Pool.prototype._createWorkerHandler=function(){const e=this.onCreateWorker({forkArgs:this.forkArgs,forkOpts:this.forkOpts,workerThreadOpts:this.workerThreadOpts,script:this.script})||{};return new WorkerHandler_1(e.script||this.script,{forkArgs:e.forkArgs||this.forkArgs,forkOpts:e.forkOpts||this.forkOpts,workerThreadOpts:e.workerThreadOpts||this.workerThreadOpts,debugPort:DEBUG_PORT_ALLOCATOR.nextAvailableStartingAt(this.debugPortStart),workerType:this.workerType,workerTerminateTimeout:this.workerTerminateTimeout})};var Pool_1=Pool;function Transfer$1(e,t){this.message=e,this.transfer=t}var transfer=Transfer$1,worker_1=createCommonjsModule((function(module,exports){var requireFoolWebpack=eval("typeof require !== 'undefined' ? require : function (module) { throw new Error('Module \" + module + \" not found.') }"),TERMINATE_METHOD_ID="__workerpool-terminate__",worker={exit:function(){}};if("undefined"!=typeof self&&"function"==typeof postMessage&&"function"==typeof addEventListener)worker.on=function(e,t){addEventListener(e,(function(e){t(e.data)}))},worker.send=function(e){postMessage(e)};else{if(void 0===process$1)throw new Error("Script must be executed as a worker");var WorkerThreads;try{WorkerThreads=requireFoolWebpack("worker_threads")}catch(e){if("object"!=typeof e||null===e||"MODULE_NOT_FOUND"!==e.code)throw e}if(WorkerThreads&&null!==WorkerThreads.parentPort){var parentPort=WorkerThreads.parentPort;worker.send=parentPort.postMessage.bind(parentPort),worker.on=parentPort.on.bind(parentPort),worker.exit=process$1.exit.bind(process$1)}else worker.on=process$1.on.bind(process$1),worker.send=function(e){process$1.send(e)},worker.on("disconnect",(function(){process$1.exit(1)})),worker.exit=process$1.exit.bind(process$1)}function convertError(e){return Object.getOwnPropertyNames(e).reduce((function(t,r){return Object.defineProperty(t,r,{value:e[r],enumerable:!0})}),{})}function isPromise(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}worker.methods={},worker.methods.run=function(e,t){var r=new Function("return ("+e+").apply(null, arguments);");return r.apply(r,t)},worker.methods.methods=function(){return Object.keys(worker.methods)},worker.terminationHandler=void 0,worker.cleanupAndExit=function(e){var t=function(){worker.exit(e)};if(!worker.terminationHandler)return t();var r=worker.terminationHandler(e);isPromise(r)?r.then(t,t):t()};var currentRequestId=null;worker.on("message",(function(e){if(e===TERMINATE_METHOD_ID)return worker.cleanupAndExit(0);try{var t=worker.methods[e.method];if(!t)throw new Error('Unknown method "'+e.method+'"');currentRequestId=e.id;var r=t.apply(t,e.params);isPromise(r)?r.then((function(t){t instanceof transfer?worker.send({id:e.id,result:t.message,error:null},t.transfer):worker.send({id:e.id,result:t,error:null}),currentRequestId=null})).catch((function(t){worker.send({id:e.id,result:null,error:convertError(t)}),currentRequestId=null})):(r instanceof transfer?worker.send({id:e.id,result:r.message,error:null},r.transfer):worker.send({id:e.id,result:r,error:null}),currentRequestId=null)}catch(t){worker.send({id:e.id,result:null,error:convertError(t)})}})),worker.register=function(e,t){if(e)for(var r in e)e.hasOwnProperty(r)&&(worker.methods[r]=e[r]);t&&(worker.terminationHandler=t.onTerminate),worker.send("ready")},worker.emit=function(e){if(currentRequestId){if(e instanceof transfer)return void worker.send({id:currentRequestId,isEvent:!0,payload:e.message},e.transfer);worker.send({id:currentRequestId,isEvent:!0,payload:e})}},exports.add=worker.register,exports.emit=worker.emit}));worker_1.add,worker_1.emit;var pool=function(e,t){return new Pool_1(e,t)},worker=function(e,t){var r=worker_1;r.add(e,t)},workerEmit=function(e){worker_1.emit(e)},Promise$1=_Promise,Transfer=transfer,platform=environment.platform,isMainThread=environment.isMainThread,cpus=environment.cpus,src={pool:pool,worker:worker,workerEmit:workerEmit,Promise:Promise$1,Transfer:Transfer,platform:platform,isMainThread:isMainThread,cpus:cpus};function s(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class l{constructor(){this.requests=[],console.log("RequestTracker")}static getInstance(){return l.instance||(l.instance=new l),l.instance}addRequest(e){if(this.isDuplicateRequest(e)){let t=this.findRequest(e);this.cancelRequest(t)}this.requests.push(e)}findRequest(e){let t;for(const r of this.requests)if(this.areRequestsEqual(r,e)){t=r;break}return t}removeRequest(e){const t=this.requests.indexOf(e);-1!==t&&this.requests.splice(t,1)}cancelRequest(e){e.cancelToken.cancel("Request canceled"),this.removeRequest(e)}isDuplicateRequest(e){return this.requests.some((t=>this.areRequestsEqual(t,e)))}areRequestsEqual(e,t){var r,n;return e.url===t.url&&JSON.stringify(null===(r=e.headers)||void 0===r?void 0:r.sponsor)===JSON.stringify(null===(n=t.headers)||void 0===n?void 0:n.sponsor)&&JSON.stringify(e.data)===JSON.stringify(t.data)&&JSON.stringify(e.params)===JSON.stringify(t.params)&&e.method===t.method}}const d=l.getInstance(),c=3e4,u=3e4,h=(t="",r)=>{let n,i=e.create({baseURL:t,timeout:c,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return i.interceptors.request.use((function(t){let{url:r,params:i,headers:o,data:a,method:s}=t;const c=e.CancelToken.source();return n={url:r,params:i,headers:o,data:a,method:s,cancelToken:c},t.cancelToken=c.token,d.addRequest(n),sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(t.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(t.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(t.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===t.method?(t.headers["Content-Type"]="application/json;",t):"get"===t.method?t:"put"===t.method?(t.headers["Content-Type"]="application/json; charset=UTF-8",t):"delete"===t.method?t:void 0}),(function(e){return Promise.reject(e)})),i.interceptors.response.use((function(e){return 200===e.status||e.data.code,r&&r(e),d.removeRequest(n),e.data}),(function(e){return r&&(d.removeRequest(n),r(null==e?void 0:e.response)),Promise.reject(e.response)})),i},p=(e,t)=>{try{let r=t||window.location.href;if(-1!=r.indexOf("?")){let t={};return r.slice(r.indexOf("?")+1).split("&").forEach((e=>{let r=e.split("=");t[r[0]]=r[1]})),e?t[e]?t[e]:null:t}return console.log("没有参数"),null}catch(e){console.error(e)}};function m(e,t=!1){try{return t?f(e)?e:JSON.stringify(e):f(e)?JSON.parse(e):e}catch(t){return console.log("转化JSON 发生错我!",e),e}}const f=e=>{if("string"==typeof e)try{const t=JSON.parse(e);return"object"==typeof t&&null!==t}catch(e){return!1}return!1},g=(e,t)=>{try{const r=JSON.stringify(t);sessionStorage.setItem(e,r)}catch(t){console.error(`Error setting session data for key ${e}:`,t)}},v=e=>{const t=sessionStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(t){console.error(`Error parsing session data for key ${e}:`,t)}return null},y=e=>{for(const t of e)t.code&&(t.code=t.code.replace(/&gt;/g,">").replace(/&lt;/g,"<"))},b=(e,t)=>{e instanceof Map?e.forEach((e=>{t([e])})):Array.isArray(e)&&e.forEach((e=>{t(e.children)}))},w=(e,t)=>{const r=e=>{var n,i,o;if(e)for(const a of e){const e=null===(o=null===(i=null===(n=null==a?void 0:a.tmpData)||void 0===n?void 0:n.source)||void 0===i?void 0:i.converse)||void 0===o?void 0:o.data;(null==e?void 0:e.length)&&y(e),t(a),a.children?r(a.children):a.dynamicChildren?b(a.dynamicChildren,r):a.stateChildren&&r(a.stateChildren)}};r(e)},D=(e,t,r,n)=>{const i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){const e=i.map((e=>e.replace(/{{|}}|@/gm,"")));for(const i of e)if(i&&t&&!(t.findIndex((e=>e.mapField===i))<0))return r&&n&&k(n,i,r.cid),!0}return!1},k=(e,t,r)=>{if(!e)throw new Error("Share variable tree is not defined");if("string"!=typeof t)throw new Error("Variable name should be a string");if(!r)throw new Error("ID is required");Array.isArray(e[t])||(e[t]=[]),e[t].includes(r)||e[t].push(r)},N=(e,t,r)=>{var n;let i=!1;const o=null==t?void 0:t.converse;if(o&&o.use&&o.data.length)for(const t of o.data)if((null==t?void 0:t.dependVars)&&t.dependVars.includes(e))return!0;const a=null==t?void 0:t[null==t?void 0:t.type];return((null==a?void 0:a.inputSql)||(null==a?void 0:a.url)||(null==a?void 0:a.headers)||(null==a?void 0:a.params))&&(i=D(a.inputSql||a.url||(null===(n=a.headers)||void 0===n?void 0:n.value)||a.params,r)),i},x=(e,t,r=!1)=>{let n=null;const i=e=>{for(const o of e){if(o.cid===t){n=o,r&&_$1.remove(e,(e=>e.cid===t));break}if(o.children&&i(o.children),o.dynamicChildren&&Array.isArray(o.dynamicChildren))for(const[,e]of Array.from(o.dynamicChildren))i(e);o.stateChildren&&i(o.stateChildren)}};return i(e),n},S=(e,t,r)=>{let n=!1;const i=e=>{for(let o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(e=>e.cid==t));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){let t=Array.from(e[o].dynamicChildren);for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}else if(e[o].dynamicChildren instanceof Array){let t=e[o].dynamicChildren;for(let e=0;e<t.length;e++)if(t[e]instanceof Array){let r=t[e][1];i(r)}}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function C(e,t,r){const n={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(n[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(t,n)}catch(e){return console.error(e),t}}function A(e,t,r){let n=_$1.cloneDeep(t);const i={};r&&r.forEach((e=>{(null==e?void 0:e.name)&&(i[e.name]=e.value||e.originvalue)}));try{return new Function("data","vars",e)(n,i)}catch(e){return console.error(e),n}}const O=e=>{let t=window.goFetchList;return t||(window.goFetchList={},t=window.goFetchList),t[e]?!t[e]&&void 0:(t[e]={id:e,time:(new Date).getTime()},!0)},I=e=>{let t=window.goFetchList;t&&t[e]&&delete t[e]},T="anov@2019:helloX",V="anov@2020:helloX";function F(e){let t=cryptoJs.enc.Utf8.parse(T),r=cryptoJs.enc.Utf8.parse(V);return cryptoJs.AES.encrypt(e,t,{iv:r,mode:cryptoJs.mode.CBC,padding:cryptoJs.pad.Pkcs7}).toString()}function E(e,t){if(0===e.length)throw new Error("Array is empty.");if(!t)return e[Math.floor(Math.random()*e.length)];if(t.length!==e.length)throw new Error("Length of probabilities array must match length of array.");const r=t.reduce(((e,t)=>e+t),0),n=Math.random()*r;let i=0;for(let r=0;r<e.length;r++)if(i+=t[r],n<i)return e[r];return e[0]}const P=new Blob(["\nfunction proxyObj(originObj) {\n const exposeObj = new Proxy(originObj, {\n has: (target, key) => {\n if (['fetch', 'XMLHttpRequest', 'postMessage'].indexOf(key) >= 0) {\n throw new Error('Illegal operation for key'+key)\n } else {\n return target[key]\n }\n },\n })\n return exposeObj\n}\nfunction compileCode(src) {\n src = 'with (exposeObj) {'+src+'}'\n //console.log(src)\n return new Function('exposeObj', src)\n}\nfunction run(code) {\n let proxy = proxyObj({})\n let result = compileCode(code)(proxy)\n return result\n}\n\nonmessage = (e) => {\n try {\n let result = run(e.data.code)\n postMessage({\n code: 1,\n result,\n })\n } catch (err) {\n postMessage({\n code: -1,\n err,\n })\n }\n}\n"]),j=URL.createObjectURL(P);function R(e,t){return s(this,arguments,void 0,(function*(e,t,r={},n="worker"){try{if("window"==n){let[n,i]=[["data"],[t]];"object"==typeof r&&Object.keys(r).forEach((e=>{n.push(e),i.push(r[e])}));return{success:!0,data:new Function(...n,e)(...i)}}{let[n,i,o]=[t,r,""];"object"==typeof n&&(n=JSON.stringify(t)),"object"==typeof r&&(i=JSON.stringify(r)),Object.keys(r).forEach((e=>o+=`${e},`));let a=`let data=eval(${n}); \n             let app=${JSON.stringify({})};`;a+=o?`let {${o}} = eval(${i}); `:"",a+=`${e}`;let c=yield function(e){return s(this,arguments,void 0,(function*(e,t=5e3){let r=new Worker(j);return new Promise(((n,i)=>{const o=()=>{clearTimeout(s),r.removeEventListener("message",a),r.terminate(),r=null},a=e=>{let{code:t,result:r,err:a}=e.data;o(),1===t?n(r):i(a)};r.postMessage({code:e}),r.addEventListener("message",a);let s=setTimeout((()=>{o(),i("timeout")}),t)}))}))}(a);return{success:!0,data:c}}}catch(e){return{success:!1,error:e,data:t}}}))}var $,q,M,U;!function(e){e.StaticFile="staticFile",e.DataSource="datasource"}($||($={})),function(e){e.json="application/json;charset=UTF-8",e.form="application/x-www-form-urlencoded; charset=UTF-8"}(q||(q={})),function(e){e.get="GET",e.post="POST",e.put="PUT",e.patch="PATCH",e.delete="DELETE"}(M||(M={}));class L{constructor(e){this.db=null,this.dbName=e.databaseName,this.tableName=e.tableName,this.keyPath=e.keyPath}static getInstance(e){return L.instance||(L.instance=new L(e)),L.instance}init(){return s(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=indexedDB.open(this.dbName,1);r.onerror=e=>{t(e.target.error)},r.onupgradeneeded=e=>{this.db=e.target.result,this.db.objectStoreNames.contains(this.tableName)||this.db.createObjectStore(this.tableName,{keyPath:this.keyPath})},r.onsuccess=t=>{this.db=t.target.result,e()}}))}))}addRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).add(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}deleteRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).delete(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}updateRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readwrite").objectStore(this.tableName).put(e);n.onsuccess=()=>{t()},n.onerror=e=>{r(e.target.error)}}))}))}getRecord(e){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((t,r)=>{const n=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).get(e);n.onsuccess=()=>{t(n.result)},n.onerror=e=>{r(e.target.error)}}))}))}getAllRecords(){return s(this,void 0,void 0,(function*(){if(!this.db)throw new Error("数据库未初始化。");return new Promise(((e,t)=>{const r=this.db.transaction([this.tableName],"readonly").objectStore(this.tableName).getAll();r.onsuccess=()=>{e(r.result)},r.onerror=e=>{t(e.target.error)}}))}))}}L.instance=null,function(e){e[e.FATAL=0]="FATAL",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e[e.TRACE=5]="TRACE"}(U||(U={}));const H={databaseName:"GODB",tableName:"go-log",keyPath:"time"};class B{constructor(){this.logLevel=U.INFO,this.indexedDBInstance=L.getInstance(H);try{this.indexedDBInstance.init(),console.log("IndexedDB 初始化成功。")}catch(e){console.error("初始化 IndexedDB 时出错:",e)}}static getInstance(){return B.instance||(B.instance=new B),B.instance}setLogLevel(e){this.logLevel=e}getColor(e){switch(e){case U.FATAL:return"";case U.ERROR:return"";case U.WARN:return"";case U.INFO:return"";case U.DEBUG:return"";case U.TRACE:return"";default:return""}}log(e,t){if(t<=this.logLevel){const r=(new Date).toISOString(),n=`[${r}] [${U[t]}]`,i=this.getColor(t);if(null===window||void 0===window?void 0:window.goDev)console.log(`${i}${n} ${e}`);else{let t=v("anov-go-userInfo"),o=v("anov-go-proid"),a=` [操作人:${null==t?void 0:t.userName} 项目ID:${o}] `;const s={time:r,value:`${e}`};try{this.indexedDBInstance.addRecord(s)}catch(e){console.error("添加记录时出错:",e)}console.log(`${i}${n} ${a} ${e}`)}}}fatal(e){this.log(e,U.FATAL)}error(e){this.log(e,U.ERROR)}warn(e){this.log(e,U.WARN)}info(e){this.log(e,U.INFO)}debug(e){this.log(e,U.DEBUG)}trace(e){this.log(e,U.TRACE)}}const z=B.getInstance(),J=(e,t)=>"string"!=typeof e?Promise.reject(new Error("URL should be a string")):h(e,t),G$1=h();let _=h();function W(e){return s(this,arguments,void 0,(function*(e,t="get",r={},n={},i){try{const o={method:M[t],url:e,headers:n,timeout:u};return["post","put"].includes(t.toLowerCase())?o.data=_$1.cloneDeep(r):o.params=_$1.cloneDeep(r),i&&(o.headers.sponsor=i),/.json$/.test(e)?function(e){return s(this,void 0,void 0,(function*(){try{return(yield G$1({method:"get",url:e})).data}catch(e){throw console.error("JSON 数据请求:",e),e}}))}(e):function(e){return s(this,void 0,void 0,(function*(){try{return{code:2e4,data:(yield G$1(e)).data}}catch(e){throw console.error("请求数据发生错误-Error:",e),e}}))}(o)}catch(e){throw console.error("获取数据:Error:",e),e}}))}function X(e,t,r,n,i){return s(this,void 0,void 0,(function*(){try{const o=(window.anUrl||"")+(window.agentPath||"/ds/v1/api-proxy/v1/query"),a=m(r,!0);return yield G$1({url:o,method:"post",headers:{"Content-Type":"application/json;charset=UTF-8",sponsor:i||""},data:{body:"post"===e?a:void 0,headers:f(n)?m(n,!0):n,method:e,url:t}})}catch(e){throw console.error("代理请求数据:Error1:",e),e}}))}function K(e,t,r,n,i,o){return s(this,void 0,void 0,(function*(){return i?X(t,e,r,n,o):W(e,t,r,n,o)}))}function Q(e,t="",r){var n,i,o,a;const s=`${null!==(i=null===(n=null===window||void 0===window?void 0:window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))&&void 0!==i?i:""}/ds/data-engine/v1/${e}/zb-query?token=${(null===(o=de("YZH_EXCHANGE_TOKEN"))||void 0===o?void 0:o.YZH_EXCHANGE_TOKEN)||(null===(a=null===window||void 0===window?void 0:window.yzhAuth)||void 0===a?void 0:a.getToken())}&passid=${null===window||void 0===window?void 0:window.gdPassid}${(null===window||void 0===window?void 0:window.BASE_RELEASE)?"&preview=1":""}`;let u={};try{u=t?JSON.parse(t):{}}catch(e){u=t||{}}return G$1({method:"POST",url:s,data:{headers:r,param:u},timeout:c})}function Y(e="",t){const r=`${null===window||void 0===window?void 0:window.BaseUrl}/ds/v1/data-views/query`;let n={};try{n=e?JSON.parse(e):{}}catch(t){n=e||{}}return G$1({method:"POST",url:r,data:{headers:t,param:n},timeout:c})}const Z=(e,t)=>s(void 0,void 0,void 0,(function*(){const r=window.BaseUrl,{dateType:n="",endPeriod:i="",metricsName:o=e,startPeriod:a=""}=t;return _({method:"GET",url:`${r}ds/v1/metrics/v1/data-alarm?dateType=${n}&endPeriod=${i}&metricsName=${o}&startPeriod=${a}`,timeout:c})})),ee=(e,t,r)=>s(void 0,void 0,void 0,(function*(){var n;const i=(null===(n=window.BaseUrl)||void 0===n?void 0:n.replace("/management",""))||"";t.newEncryption=!0;const o={staticFile:{method:"get",params:t,url:`${i}/ds/v1/file/v1/${e}/query`},datasource:{method:"post",url:`${i}/ds/v1/database/v1/${e}/query`,data:Object.assign({},t)}}[r];if(!o)throw new Error("Invalid data type provided");return G$1(Object.assign({timeout:c},o))})),te=e=>new Promise(((t,r)=>{let n;n=e.originData&&Object.keys(e.originData).length?e.originData:e.data,void 0!==n?t({data:n}):r("Failed to retrieve cdata")})),ie=(e,t,r)=>{try{switch(t){case"api":{let t=he(e,r);return{requestType:t.requestType,url:t.url,params:t.params,headers:t.headers,agency:t.agency}}case"static":return{data:e};case"datasource":{const t=ue(e.inputSql,r);return{dsName:e.dsName,dsType:"1",sql:F(t),filter:e.sqlFilter}}case"staticFile":return{dsName:e.dsName,dsType:e.dsType,sql:""};case"indicator":return{zbId:e.zbId,params:ue(e.params,r),headers:ue(e.headers,r)};case"dataSet":return{params:ue(e.params,r),headers:ue(e.headers,r)};case"indicatorCQ":return{zbName:e.zbName,params:ue(e.params,r)};case"packData":return{};default:throw new Error("Invalid type")}}catch(t){console.log("准备请求数据发生错误",t,e)}},oe=(e,t,r)=>s(void 0,void 0,void 0,(function*(){try{switch(t){case"api":return yield K(e.url,e.requestType,e.params,e.headers,e.agency,r);case"static":return yield te(e.data);case"datasource":return yield ee(e.dsName,{dsType:e.dsType,sql:e.sql,filter:e.filter},"datasource");case"staticFile":return yield ee(e.dsName,{dsType:e.dsType,sql:e.sql},"staticFile");case"indicator":return yield Q(e.zbId,e.params,e.headers);case"dataSet":return yield Y(e.params,e.headers);case"indicatorCQ":return yield Z(e.zbName,e.params);case"packData":return{};default:throw new Error("Invalid type")}}catch(e){return console.warn(e,"执行请求并获取数据发生错误"),yield new Promise(((e,t)=>{e({error:!0})}))}})),re=(e,t,r,...n)=>s(void 0,[e,t,r,...n],void 0,(function*(e,t,r,n=[],i=!1){const o=t||e.tmpData.source.dataType,a=e.tmpData.source["indicatorCQ"==o?"indicator":o];if("globalData"===o){const e=n.find((e=>e.key===a.id||e.key===a.key)),t=v(a.id);if(t&&!i)return t.data;if(e){let t=yield ae(e,r),n={key:a.id,data:t};return g(a.id,n),t}return}const s=ie(a,o,r),c=yield oe(s,o,e.cid?e.cid:"");return(null==c?void 0:c.data)?c.data:c})),ae=(e,t)=>s(void 0,void 0,void 0,(function*(){let r=Object.assign({},{tmpData:{source:e.value}});const n=r.tmpData.source.type,i=r.tmpData.source[n],o=ie(i,n,t),a=yield oe(o,n);return yield ne(a.data,r,!0,t)})),ne=(e,t,...r)=>s(void 0,[e,t,...r],void 0,(function*(e,t,r=!0,n){try{const{converse:i,mapFields:o}=t.tmpData.source;return i&&i.use&&r?yield new Promise(((t,r)=>{const o=function(e,t,r,n,i){return s(this,void 0,void 0,(function*(){let r,i=e,{use:o,data:a}=_$1.cloneDeep(t);if(o)for(let e=0;e<a.length;e++)if(a[e].use){let t=a[e].dependVars,o={};n&&o&&t&&t.length&&t.map((e=>{let t=_$1.cloneDeep(n).filter((t=>{let r=t.mapField==e;return r&&(o[e]=t.value),r}));t&&0!=t.length||(o[e]="")})),r=yield R(a[e].code,i,o,a[e].mode?a[e].mode:"worker"),i=r.data}return i}))}(e,i,0,n);t(o)})):yield new Promise(((t,r)=>{t(e)}))}catch(t){return console.error("执行过滤器发生错误:"+t),yield new Promise(((t,r)=>{t(e)}))}})),se=(e,t,r)=>{const{source:n}=e.tmpData,i=n.type;r?("static"===i&&n[i]&&(n[i].originData=r),"indicatorCQ"===i?n.indicator.data=t:n[i].data=t):"indicatorCQ"===i?n.indicator.data=t:n[i].data=t,e.source=t},le=(e,t,...r)=>s(void 0,[e,t,...r],void 0,(function*(e,t,r=[],n,i,o){try{let a=e.tmpData.source.type,s=yield re(e,a,r,n,o||!1);if(null==s||!s)return i&&i({error:!0}),Promise.resolve({error:!0});let c=yield ne(s,e,t,r);return se(e,c),i&&i(c),(null==e?void 0:e.cid)&&I(e.cid),Promise.resolve(c)}catch(e){return i&&i(e),z.error("Error in updateComData"),console.error("Error in updateComData:",e),Promise.reject(e)}})),de=e=>{const t={};if(e&&e.includes("?")){const r=e.split("?")[1].split("&");for(let e of r){const[r,n]=e.split("=").map(decodeURIComponent);t[r]=n}}return t},ce=e=>{try{return(null==e?void 0:e.value)&&"string"==typeof e.value?JSON.parse(e.value):"string"==typeof e?JSON.parse(e):e}catch(t){return e}},ue=(e,t)=>{if(!t)return ce(e);if("string"==typeof e){if(""===e.trim())return"";try{if("string"!=typeof JSON.parse(e))return ue(JSON.parse(e),t);{let r=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value||o.originalValue||"":e}));return ce(r)}}catch(r){let n=e.replace(/@(\w+)|{{(\w+)}}/g,((e,r,n)=>{const i=r||n,o=t.find((e=>e.mapField===i));return o?o.value:e}));return ce(n)}}else{if(Array.isArray(e))return e.map((e=>ue(e,t)));if("object"==typeof e&&null!==e){const r={};for(let n in e)r[n]=ue(e[n],t);return ce(r)}}return ce(e)},he=(e,t)=>{const r=e.agency,n=e,{url:i=null,headers:o,params:a,requestType:s}=n,c=i?ue(i,t):void 0,u=o&&o.use?ue(o.value,t):{};return{url:c,requestType:s,params:a?ue(a,t):{},headers:u,agency:r}},pe=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){if(e&&e.length)for(const o of e)N(t,o.value,r)&&(yield le({tmpData:{source:{type:"globalData",globalData:{id:o.key}}}},!0,r,e,(e=>{console.log("数据更新成功-变量改变全局数据跟新")}),!0),w(n,(t=>{var n,a,s;"globalData"===(null===(a=null===(n=null==t?void 0:t.tmpData)||void 0===n?void 0:n.source)||void 0===a?void 0:a.type)&&(null===(s=null==t?void 0:t.tmpData)||void 0===s?void 0:s.source.globalData).id===o.key&&le(t,!0,r,e,(e=>{i(t,e)}),!1)})))})),me=(e,t,r,n,i)=>s(void 0,void 0,void 0,(function*(){e&&(yield le({tmpData:{source:{type:"globalData",globalData:{id:e.key}}}},!0,t,r,(e=>{console.log("数据更新成功-数据源编辑")}),!0),w(n,(n=>{var o,a,s;"globalData"===(null===(a=null===(o=null==n?void 0:n.tmpData)||void 0===o?void 0:o.source)||void 0===a?void 0:a.type)&&(null===(s=null==n?void 0:n.tmpData)||void 0===s?void 0:s.source.globalData).id===e.key&&le(n,!0,t,r,(e=>{i(n,e)}),!1)})))}));class fe{constructor(e,t){this.isUpdating=!1,this.des=e.des,this.field=e.field,this.id=e.id,this.key=e.key,this.mapping=e.mapping,this.mapField=e.mapField,this.type=e.type,this.originalValue=e.originalValue,this.model=(null==e?void 0:e.model)?null==e?void 0:e.model:1,this.converter=e.converter,this.converterCode=e.converterCode,this.fork=e.fork,this.delayUpdate=!!(null==e?void 0:e.delayUpdate),t&&(this.globalVariables=t),e.fork&&(this.model=5,this.forkValue=e.forkValue,this.originalValue=this.getForkedValue())}get value(){if(this.fork&&(this.originalValue=this.getForkedValue()),this.converter&&this.converterCode){let e=[];return A(this.converterCode,this.originalValue,e)}return this.originalValue}togglePropertyState(e){let t=Object.prototype.hasOwnProperty.call(this,e);this[e]=!t||!e}getForkedValue(){if(this.forkValue&&Array.isArray(this.forkValue))return this.forkValue.map((e=>{const t=this.globalVariables.get(e);return t?t.value:null}));if(this.forkValue){const e=this.globalVariables.get(this.forkValue);return e?e.value:null}return null}updateValue(e,t){var r;const n=Object.assign({},this,e);this.des=n.des,this.field=n.field,this.mapping=n.mapping,this.type=n.type,this.originalValue=n.originalValue,this.converter=n.converter,this.converterCode=n.converterCode,this.fork=n.fork,this.delayUpdate=null==n?void 0:n.delayUpdate,this.model=null==n?void 0:n.model,e.id&&(this.id?"string"==typeof this.id?e.id instanceof Array?this.id=_$1.uniq([this.id,...e.id]):this.id=[this.id,e.id]:this.id instanceof Array&&(e.id instanceof Array?this.id=_$1.uniq([...this.id,...e.id]):this.id=_$1.uniq([...this.id,e.id])):this.id=e.id),e.fork&&(this.model=5,this.forkValue=null!==(r=e.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}updateWidthOriginalValue(e,t){var r;this.originalValue=e,this.fork&&(this.forkValue=null!==(r=this.forkValue)&&void 0!==r?r:this.forkValue,this.originalValue=this.getForkedValue()),t&&t(this)}renew(e){e&&e(this)}static create(e,t){return new fe(e,t)}}class ge{constructor(){this.variables=new Map,this.globalObservers=[],this.url=window.location.search,this.list=[]}clearVars(){this.list=[],this.variables.clear()}togglePropertyState(e,t,r){try{let n=this.getVariable(e);if(!n)throw new Error("没有找到相应的变量!");n.togglePropertyState(t),this.addToObjectArray(this.list,n),r&&r()}catch(e){console.error(e)}}static getInstance(){return ge.instance||(ge.instance=new ge),ge.instance}getFullUrl(){this.url=window.location.search}getAllUrlParams(){const e=new URLSearchParams(window.location.search),t={};for(const[r,n]of e.entries())t[r]=n;return t}delVariable(e,t){this.variables.delete(e),this.list=this.list.filter((t=>t.mapField!=e)),t&&t()}addUrlParamsToGlobalVars(){this.getFullUrl();let e=this.getAllUrlParams(),t=Object.keys(e),r=[];for(const n of t)r.push({mapField:n,originalValue:e[n],model:4});if(r.length)for(const e of r)this.addVariable(e)}addVariables(e){Array.isArray(e)?e.map(((e,t)=>{this.addVariable(e)})):this.addVariable(e),this.addUrlParamsToGlobalVars()}addVariable(e,t){if(!e||!(null==e?void 0:e.mapField))return console.error(e+"参数不合法!"),!1;if(this.isVariableNameExist(e.mapField)){let r=this.getVariable(e.mapField);return this.sameValue(r,e)?r:(this.editVariable(e,t),!1)}const r=fe.create(e,this.variables);return this.variables.set(r.mapField,r),this.addToObjectArray(this.list,r),t&&t(r),this.notifyGlobalObservers(r),r}toJSON(e){try{return!!e&&JSON.stringify(e)}catch(e){return!1}}sameValue(e,t){if(e.mapfield!==t.mapfield)return!1;for(const r in t)if(!(["mapfield","field","key","value","name","globalVariables"].includes(r)||r in e&&e[r]==t[r]))return!1;return!0}creatVarJson(e){const{des:t,field:r,id:n,key:i,mapping:o,mapField:a,type:s,value:c,originalValue:u,model:l,converter:d,converterCode:h,fork:f,forkValue:p,update:m,delayUpdate:g}=e,v={};return void 0!==t&&(v.des=t),void 0!==r&&(v.field=r),void 0!==n&&(v.id=n),void 0!==i&&(v.key=i),void 0!==o&&(v.mapping=o),void 0!==a&&(v.mapField=a),void 0!==s&&(v.type=s),void 0!==c&&(v.value=c),void 0!==u&&(v.originalValue=u),void 0!==l&&(v.model=l),void 0!==d&&(v.converter=d),void 0!==h&&(v.converterCode=h),void 0!==f&&(v.fork=f),void 0!==p&&(v.forkValue=p),void 0!==m&&(v.update=m),void 0!==g&&(v.delayUpdate=g),v}addToObjectArray(e,t){let r=!1;for(let n=0;n<e.length;n++)if(e[n].mapField==t.mapField){e[n]=this.creatVarJson(t),r=!0;break}r||e.push(t)}editVariable(e,t){const r=this.getVariable(e.mapField);if(r&&this.isVariableNameExist(e.mapField)&&this.sameValue(r,e))return;const n=e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),t&&t(e),e.isUpdating=!1)};r?r.updateValue(e,n):this.addVariable(e,n)}getForkList(e){return this.isMapFieldInForkValues(e)||[]}editVariableForValue(e,t,r){const n=this.getVariable(e);n&&n.updateWidthOriginalValue(t,(e=>{e.isUpdating||(e.isUpdating=!0,this.notifyGlobalObservers(e),this.isMapFieldInForkValues(e.mapField).forEach((e=>{let t=this.getVariable(e.mapField);t&&t.renew((e=>{this.addToObjectArray(this.list,e),this.notifyGlobalObservers(e)}))})),this.addToObjectArray(this.list,e),r&&r(e),e.isUpdating=!1)}))}isMapFieldInForkValues(e){return this.getAllVariables().filter((e=>e.fork&&e.forkValue)).filter((t=>t.forkValue==e||Array.from(t.forkValue).includes(e)))}isVariableNameExist(e){return this.variables.has(e)}checkExist(e,t){if("string"==typeof e&&this.isVariableNameExist(e)){let r=this.getVariable(e);return t==r.id&&!r.id.includes(t)&&[{key:e}]}if(Array.isArray(e)){const r=e.filter((e=>{let r=this.getVariable(e);return this.isVariableNameExist(e)&&t!=r.id&&!(r.id&&r.id.includes(t))})).map((e=>({key:e})));return!!r.length&&r}return!1}getVariable(e){return this.variables.get(e)}getVariableForId(e){var t;let r=[];for(const[,n]of this.variables)(n.id===e||(null===(t=n.id)||void 0===t?void 0:t.includes(e)))&&r.push(n);return _$1.uniq(r)}getAllVariables(e=!1){return this.addUrlParamsToGlobalVars(),e?(this.list=Array.from(this.variables.values()),this.list):[...this.list]}restoreVariables(e){e.forEach((e=>{this.addVariable(e)}))}registerGlobalObserver(e){this.globalObservers.push(e)}notifyGlobalObservers(e){this.globalObservers.forEach((t=>{t.update(e)}))}}ge.instance=null;const ve=ge.getInstance(),ye=(e,t)=>Array.isArray(t)?t.some((t=>e&&(void 0!==e[t]||e.hasOwnProperty(t)))):"string"==typeof t&&e&&(void 0!==e[t]||e.hasOwnProperty(t)),be=(e,t,r,n)=>{const i=((e,t,r,n)=>{var i;let o;if(ye(e,null==t?void 0:t.field)||ye(e,null==t?void 0:t.forkValue))o=e[null==t?void 0:t.field]||"";else if(ye(e.data,null==t?void 0:t.field)||ye(e.data,null==t?void 0:t.forkValue))o=e.data[null==t?void 0:t.field]||"";else{const e=x(r,n),a=(null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.actions)||[];for(const e of a){const r=e.vars.find((e=>(null==e?void 0:e.mapField)===(null==t?void 0:t.mapField)));if(r){o=r.value;break}}}return o})(e,t,r,n);return void 0!==i?i:t.value},we=(e,t,r,n,i,o,a,s,c)=>{var u;switch(e.type){case"link":let l=ue(e.link,o);window.open(l,e.target);break;case"page":if(null===(u=null==e?void 0:e.params)||void 0===u?void 0:u.length)for(let t=0;t<e.params.length;t++){const r=e.params[t],n=o.find((e=>e.mapField==r.mapField));n&&(r.value=n.value)}c&&c(e);break;case"dynamic":((e,t,r,n,i)=>{const o=e.dynamic||[];for(const a of o){if(e.id!==t.cid)continue;const o=x(r,a.pid);o&&(o.activeDynamic=a.name,o.isShow=a.visible||!n||e.index===t.index-1,i({cid:o.cid,flag:a.visible}))}})(e,t,r,n,i);break;case"toggle":((e,t,r,n,i)=>{const o=e.children||[];for(const r of o){const o=r.visible&&(!n||e.index===t.index-1);i({cid:r.cid,flag:o})}})(e,t,0,n,i);break;case"update":((e,t,r,n,i)=>{const o=e.children||[];for(const e of o){const o=x(t,e.cid);o&&le(o,!0,r,n,(e=>{i({cid:o.cid,data:e})}))}})(e,r,o,a,s)}},De=(e,t,r,n,i,o,a,s,c,u)=>{const{cid:l,actions:d,index:h}=i,{eventName:f,mode:p}=d,m=2===p;((e,t,r,n,i,o)=>{let a=ve.getVariableForId(t.cid);if(null==a?void 0:a.length)for(const s of a)if(s.type==e){let e=be(t,s,r,n);ve.editVariableForValue(s.mapField,e,(()=>{let e=i[s.mapField]||[],t=ve.getForkList(s.mapField);if(t)for(const r of t){let t=i[r.mapField];e=_$1.concat(e,t)}o&&o(s,_$1.uniq(e))}))}})(f,i,n,l,r,((e,t)=>{if(pe(c,e.mapFile,ve.getAllVariables(),n,((e,t)=>{a({cid:e.cid,data:t})})),null==t?void 0:t.length)for(const r of t){e.eventSourceId=r;const t=x(n,r);!(null==e?void 0:e.delayUpdate)&&t&&le(t,!0,ve.getAllVariables(),c,(e=>{a({cid:t.cid,data:e})}))}}));const g=((e,t,r,n,i)=>e.filter((e=>e.id===t&&e.eventType===r&&(!i||parseInt(e.index||"0")+1===parseInt(n||"0")))))(e,l,f,h,m);for(const e of g)we(e,i,n,m,o,ve.getAllVariables(),c,a,s)},ke=(e,t={})=>{let r={},n={type:"static",converse:{use:!1,data:[]},static:{data:e},api:{requestType:"get",url:"",headers:{use:!1,value:""},params:"",agency:!1,cookie:!0,autoUpdate:{open:!1,time:10},data:""}};return Object.assign(r,n,t),r},Ne=(e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}=((e,t)=>{let{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}=_$1.cloneDeep(t[e]);return{option:r,actions:n,data:i,optionDes:o,actionsDes:a,source:s,theme:c}})(e,t);return{iconClass:null,isAssembly:null,source:i,cid:(Math.random().toString().substr(3,10)+Date.now()).toString(),isLock:!1,isShow:!0,tmpData:{option:r,source:ke(i,s),actions:n},baseData:Se(),dynamic:null,filePath:"",origin:"anov-ui",name:"",componentType:"",viewComName:e,optionComName:"AnOptionPanel",dataComName:"AnSourcePanel",eventComName:"AnActionsPanel",assemblyDeveloper:"",devEmail:"",version:"",devDept:""}},xe=(e,t,r)=>{let n=Ne(e,t);return r?_$1.merge(n,r):n},Se=e=>{let t={left:0,top:0,width:100,height:100,angle:0,penetrate:0,opacity:100,perspective:100,rotateX:0,rotateY:0,rotateZ:0,transformOriginX:"center",transformOriginY:"center",transformSwitch:!1};return e?Object.assign(t,e):t};class Ce{constructor(e,t,r){this.theme=null,this.plant=null,this.list=[],this.titleHeqadeHeight=70,this.clearance=3,this.checkComponentIntersection=(e,t,r=10)=>{const n=e.left,i=e.left+e.width,o=e.top,a=e.top+e.height,s=t.left,c=t.left+t.width,u=t.top,l=t.top+t.height,d=n<c&&i>s&&o<l&&a>u,h=Math.abs(e.left+e.width/2-(t.left+t.width/2)),f=Math.abs(e.top+e.height/2-(t.top+t.height/2));return d||h<r&&f<r},this.calculateCombinedComponent=e=>{if(0===e.length)return{left:0,top:0,width:0,height:0};let t=e[0].left,r=e[0].top,n=e[0].left+e[0].width,i=e[0].top+e[0].height;for(let o=1;o<e.length;o++){const a=e[o];t=Math.min(t,a.left),r=Math.min(r,a.top),n=Math.max(n,a.left+a.width),i=Math.max(i,a.top+a.height)}return{left:t,top:r,width:n-t,height:i-r}},this.getAnTextNormaltText=e=>{var t,r;try{return null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.text}catch(e){return console.error("配置优化(ConfigOptimizer):",e),""}},this.initProp(e),this.upgradePlant(),this.staticComponentData=t,this.upgradeHeaderComponent(),r&&Object.assign(this,r)}isStringOrObject(e){return"string"==typeof e?"string":"object"==typeof e&&null!==e&&"object"}initProp(e){try{let t,r=this.isStringOrObject(e);if(r&&"string"===r)t=JSON.parse(e);else{if(!r||"object"!==r)throw new Error(`initProp fn error :-- 传入参数${e}不合法!`);t=e}if(t){this.originData=t;const{theme:e,plant:r,list:n}=t;this.theme=e,this.plant=r,this.list=n,this.filterFileGroup()}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradePlant(){this.plant&&(this.plant.option.bg={type:1,code:"70942ec525344c96aa32b81b2c9155f6",path:"/anov-prod/resources/page/png/bg22 科技星球背景.png",thumb:"/anov-prod/resources/page/thumbnail/1e48f8fb26ec4edfb1a0f499627e84fc.png"})}areComponentsIntersecting(e,t){let r=e.baseData,n=t.baseData;const i=Math.max(0,Math.min(r.left+r.width,n.left+n.width)-Math.max(r.left,n.left)),o=Math.max(0,Math.min(r.top+r.height,n.top+n.height)-Math.max(r.top,n.top));return i>0&&o>0}filterFileGroup(){this.list=_$1.cloneDeep(this.list).map((e=>{var t,r;if(1===(null===(t=null==e?void 0:e.children)||void 0===t?void 0:t.length)&&!(null===(r=null==e?void 0:e.children[0])||void 0===r?void 0:r.children)){const t=e.children[0],{left:r,top:n}=e.baseData;return t.baseData.left=r,t.baseData.top=n,t}return e}))}getText(e,t,r){const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error("Failed to get 2D context from canvas.");return n.font=`${r}px ${t}`,n.measureText(e).width}calculateMaxWidths(e){const t=Math.min(...e.map((e=>e.width))),r=[];let n=[],i=e[0].width;for(const o of e){const e=o.width;Math.abs(e-i)<=t?n.push(e):(n.length>0&&r.push(n),n=[e]),i=e}n.length>0&&r.push(n);const o=[];for(const e of r){const t=Math.max(...e);o.push(t)}return o}findClosestValue(e,t){let r=t[0],n=Math.abs(e-r);for(const i of t){const t=Math.abs(e-i);t<n&&(n=t,r=i)}return r}adjustHeightAndTop(e,t){const r=t-e.height;return Object.assign(Object.assign({},e),{height:t,top:e.top-r/2})}findNearestComponent(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData;a.top,a.height;for(const e of o){const t=e.baseData;if(t.top,t.height,a.left<t.left+t.width&&a.left+a.width>t.left){const r=t.top-a.top;r<i&&r<100&&(i=r,n=e)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestComponentForTitlePoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=this.getDistance(a.left,a.top+a.height,t.left,t.top);r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}findNearestTitleForPoint(e,t,r){let n=null,i=1/0;t.tmpData.option.textNormal.text;try{const o=e.sort(((e,t)=>e.baseData.top-t.baseData.top)).sort(((e,t)=>e.baseData.left-t.baseData.left)).filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=t.baseData;a.top,a.height;for(const e of o){const t=e.baseData;let r=t.top-a.top;r<i&&r<a.width&&t.top-a.top>100&&(i=r,n=e)}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}getDistance(e,t,r,n){return Math.sqrt(Math.pow(r-e,2)+Math.pow(n-t,2))}findNearestComponent2(e,t,r){let n=null,i=1/0,o=_$1.cloneDeep(e).sort(((e,t)=>e.baseData.top-t.baseData.top));try{const e=o.filter((e=>!(e.cid===t.cid||"AnTextNormal"===e.viewComName||r&&r.includes(e.cid)))),a=_$1.cloneDeep(t).baseData,s=a.top+a.height;for(const t of e){const e=t.baseData,r=e.top+e.height;if(a.left<e.left+e.width&&a.left+a.width>e.left){const e=r-s;e>=0&&e<i&&(i=e,n=t)}}}catch(e){console.error("配置优化(ConfigOptimizer)- findNearestComponent :",e)}return n}verticalDistance(e,t){e.left,e.width;const r=e.top+e.height,n=(t.left,t.width,t.top);return Math.abs(r-n)}extractAmount(e){const t=e.match(/(\d{1,3}(?:,\d{3})*)(\D+)/);if(t){const e=t[1].replace(/,/g,"");return[parseInt(e,10),t[2].trim()]}return[!1,!1]}getAnTextNormal(){return this.list.filter((e=>"AnTextNormal"==e.viewComName))}getAnDeckTitle3(){return this.list.filter((e=>"AnDeckTitle3"==e.viewComName)).sort(((e,t)=>e.baseData.left-t.baseData.left))}judgeAnOdometer(){let e=this.getAnTextNormal().sort(((e,t)=>e.baseData.left-t.baseData.left)),t=[],r=new Set;for(const n of e){if(r.has(n.cid))continue;let i=[];for(const t of e)r.has(t.cid)||n.cid==t.cid||this.checkComponentIntersection(n.baseData,t.baseData)&&(r.add(t.cid),r.add(n.cid),i.push(t));t.push([n,...i])}let n=[];for(const e of t)for(const t of e){let r=this.getAnTextNormaltText(t);this.extractAmount(r).every((e=>e))&&n.push(e)}return n}createAnOdometer(){var e,t;let r=this.judgeAnOdometer();for(const n of r){let r,i,o,a=this.calculateCombinedComponent(n.map((e=>e.baseData)));for(const e of n){let t=this.getAnTextNormaltText(e),n=this.extractAmount(t);n.every((e=>!e))&&(r=t),n.every((e=>e))&&(i=n[0],o=n[1]),_$1.remove(this.list,(t=>t.cid==e.cid))}let s=xe("AnIndicatorNormal",this.staticComponentData,_$1.cloneDeep({baseData:a}));(null===(t=null===(e=null==s?void 0:s.tmpData)||void 0===e?void 0:e.source)||void 0===t?void 0:t.static)&&(s.tmpData.source.static.data={text:r,num:i,unit:o},s.tmpData.source.static.originData={text:r,num:i,unit:o}),this.list.push(s)}}upgradeHeaderComponent(){for(let e=0;e<this.list.length;e++){const t=this.list[e];"AnDeckHeader3"==t.viewComName&&(t.baseData.left=0,t.baseData.top=0)}}upgradeTitleComponent(){let e=this.getAnDeckTitle3().map((e=>e.baseData)),t=this.calculateMaxWidths(e);for(let e=0;e<this.list.length;e++){const r=this.list[e];if("AnDeckTitle3"==r.viewComName){let e=this.findClosestValue(r.baseData.width,t);r.baseData.width=e>300?e:300,r.baseData=this.adjustHeightAndTop(r.baseData,this.titleHeqadeHeight)}}this.removeErroneousComponents()}containsFractionStructure(e){return/\b\d+\/\d+\b/.test(e)}removeErroneousComponents(){let e=this.getAnDeckTitle3(),t=[];for(let r=0;r<e.length;r++){const n=e[r];let i=n.tmpData.option.textNormal.text;if(this.containsFractionStructure(i))for(let r=0;r<e.length;r++){const i=e[r];n.cid!=i.cid&&this.areComponentsIntersecting(n,i)&&t.push(n.cid)}}this.list=this.list.filter((e=>!t.includes(e.cid)))}upgradeGroupComponent(){try{let e=this.getAnDeckTitle3(),t=this.list.filter((e=>"AnDeckTitle3"!=e.viewComName&&"AnDeckHeader3"!=e.viewComName&&"AnTextNormal"!=e.viewComName)),r=[],n=[];for(let i=0;i<e.length;i++){const o=e[i];let a=this.findNearestComponentForPoint(t,o,r);if(a&&a.cid&&r.push(a.cid),a){o.baseData.left=a.baseData.left;let t=this.upgradeComponentHeight(o,e,n);t&&t>=30&&(a.baseData=Object.assign({},a.baseData,{top:o.baseData.top+o.baseData.height+this.clearance}))}}}catch(e){console.error("配置优化(ConfigOptimizer):",e)}}upgradeComponentHeight(e,t,r=[]){const n=e;let i=this.findNearestTitleForPoint(_$1.cloneDeep(t),n);return i?i.baseData.top-n.baseData.top-this.titleHeqadeHeight:1080-n.baseData.top-this.titleHeqadeHeight}getData(){return this.originData.list=this.list,this.originData.plant=this.plant,this.originData}}const Ae=new class{randomNum(e,t){return Math.floor(Math.random()*(t-e+1))+e}generateRandomIntArray(e,t,r,n){const i=[];for(let n=0;n<e;n++){const e=this.randomNum(t,r);i.push(e)}return n&&"asc"===n?i.sort(((e,t)=>e-t)):n&&"desc"===n?i.sort(((e,t)=>t-e)):i}randomString(e,t){const r=this.randomNum(e,t);let n="";for(let e=0;e<r;e++){const e=Math.floor(26*Math.random());n+="abcdefghijklmnopqrstuvwxyz".charAt(e)}return n}generateRandomNameArray(e,t,r){const n=[];for(let i=0;i<e;i++){const e=this.randomString(t,r);n.push(e)}return n}pick(e,t){const r=void 0!==t?e.filter((e=>e!==t)):e;return r[Math.floor(Math.random()*r.length)]}},Oe=()=>{const e=[],t=Ae.pick([!0,!1]);let r=Ae.randomNum(3,20);const n=Ae.pick([null,null,null,{}]);let i=Ae.pick(["asc","desc",void 0,void 0,void 0]);for(let o=0;o<Ae.randomNum(1,9);o++)e.push({data:Ae.generateRandomIntArray(r,0,300,i),type:"line",smooth:t,symbolSize:Ae.randomNum(1,10),lineStyle:{width:Ae.randomNum(1,4)},areaStyle:n});return{xAxis:{type:"category",show:!1,boundaryGap:!1,data:Ae.generateRandomNameArray(r,3,6)},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Ie=(e,t)=>{let r={type:e,show:!1};return"category"===e&&(r.data=Ae.generateRandomNameArray(t,3,6)),r},Te=()=>{const e=[],t=Ae.pick([!0,!1]);let r=Ae.randomNum(3,20);const n=Ae.pick([null,null,null,{}]);let i=Ae.pick(["asc","desc",void 0,void 0,void 0]),o=Ae.randomNum(1,9),a=Ae.pick([!0,!1]);for(let s=0;s<o;s++){let o={data:Ae.generateRandomIntArray(r,0,300,i),type:"bar",smooth:t,stack:a,areaStyle:n};e.push(o)}let s=Ae.pick(["value","category"]),c=Ae.pick(["value","category"],s);return{xAxis:Ie(s,r),grid:{left:0,top:0,bottom:0,right:0},yAxis:Ie(c,r),series:e}},Ve=()=>{const e=[];let t=Ae.randomNum(3,20);Ae.pick([null,null,null,{}]);let r=Ae.pick(["asc","desc",void 0,void 0,void 0]),n=Ae.pick([1,2]),i=[Ae.pick(["10%","20%","30%","40%","50%","60%","70%","80%"]),Ae.pick(["90%","100%"])];return e.push({data:Ae.generateRandomIntArray(t,3,20,r),type:"pie",radius:1==n?"100%":i,roseType:1==n?Ae.pick(["area",null,null]):null,padAngle:1==n?0:Ae.randomNum(1,5),startAngle:1==n?Ae.pick([0,180]):0,endAngle:360,label:{show:!1},itemStyle:{borderRadius:3}}),{grid:{left:0,top:0,bottom:0,right:0},series:e}},Fe=()=>{const e=[];Ae.pick([!0,!1]),Ae.randomNum(3,20),Ae.pick([null,null,null,{}]),Ae.pick(["asc","desc",void 0,void 0,void 0]);for(let t=0;t<Ae.randomNum(1,20);t++){let t=Ae.randomNum(3,Ae.randomNum(3,20)),r=[];for(let e=0;e<t;e++){let e=[];for(let t=0;t<2;t++)e.push(Ae.randomNum(1,30));r.push(e)}e.push({type:"scatter",symbolSize:Ae.randomNum(3,30),data:r})}return{xAxis:{show:!1},grid:{left:0,top:0,bottom:0,right:0},yAxis:{show:!1,type:"value"},series:e}},Ee=()=>{const e=[],t=Ae.pick(["polygon","circle"]);let r=Ae.randomNum(1e4,99999),n=Ae.randomNum(3,10),i=[];for(let e=0;e<n;e++)i.push({name:Ae.randomString(4,8),max:r});for(let t=0;t<Ae.randomNum(2,10);t++)e.push({value:Ae.generateRandomIntArray(n,1e4,r),name:Ae.randomString(4,8)});return{radar:{shape:t,indicator:i,axisName:{show:!1},radius:"100%"},grid:{left:0,top:0,bottom:0,right:0},series:[{type:"radar",symbol:"none",lineStyle:{width:1},data:e}]}},Pe=()=>{const e=[];for(let t=0;t<Ae.randomNum(4,15);t++)e.push({value:Ae.randomNum(1,100),name:Ae.randomString(4,8)});return{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"funnel",left:"0%",top:0,bottom:0,width:"100%",min:0,minSize:"0%",maxSize:"100%",label:{show:!1,position:"inside"},sort:Ae.pick(["descending","ascending"]),gap:2,lineStyle:{width:1},data:e}]}};let je=Ae.randomNum(5,20);const Re={width:je};Ae.pick([!0,!1])&&(Re.color=[[.3,"#67e0e3"],[.7,"#37a2da"],[1,"#fd666d"]]);class $e{constructor(){this.names=["line","bar","pie","scatter","radar","funnel","gauge"]}static getInstance(){return $e.instance||($e.instance=new $e),$e.instance}createLine(){switch(Ae.pick(this.names)){case"line":return{type:"line",typeNum:1,option:Oe()};case"bar":return{type:"bar",typeNum:2,option:Te()};case"pie":return{type:"pie",typeNum:3,option:Ve()};case"scatter":return{type:"scatter",typeNum:4,option:Fe()};case"radar":return{type:"radar",typeNum:5,option:Ee()};case"funnel":return{type:"funnel",typeNum:6,option:Pe()};case"gauge":return{type:"gauge",typeNum:7,option:{grid:{left:0,top:0,bottom:0,right:0},series:[{type:"gauge",radius:"100%",detail:{formatter:"{value}"},progress:{show:Ae.pick([!0,!1]),width:je},axisLine:{lineStyle:Re},data:[{value:Ae.randomNum(1,100),name:"SCORE"}]}]}}}}}$e.instance=null;const qe=$e.getInstance(),Me=new class{constructor(){this.directions=["row","row"],this.direction="column",this.splitNumbers=24,this.margin=[0,0]}baseLayout(e){const t=(null==e?void 0:e.maRrows)?null==e?void 0:e.maRrows:this.splitNumbers,r=(null==e?void 0:e.colNum)?null==e?void 0:e.colNum:this.splitNumbers,n=e.wrapWidth/r,i=e.wrapHeight/t;let o=E(this.directions);o&&(this.direction=o);let a=[];if("row"===this.direction){let e=E([3,4]);a=this.simulateRandomSegments(24,4,12,e)}else{let e=E([2,3]);a=this.simulateRandomSegments(24,4,6,e)}let s=[],c=[];if("row"===this.direction){for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i});else{let t=s[e-1].x;s.push({x:a[e-1]+t,y:0,w:a[e],h:24,i:e,wStep:n,hStep:i})}let e=E([2,3]),t=this.simulateRandomSegments(24,6,12,e);for(let e=0;e<s.length;e++){const r=s[e];for(let o=0;o<t.length;o++){const a=t[o];c.push({x:r.x,y:a,w:r.w,h:a,i:10*e+o,wStep:n,hStep:i})}}}else{for(let e=0;e<a.length;e++)if(0==e)s.push({x:0,y:0,w:24,h:a[e],i:e,wStep:n,hStep:i});else{let t=s[e-1].y;s.push({x:0,y:a[e-1]+t,w:24,h:a[e],i:e,wStep:n,hStep:i})}for(let e=0;e<s.length;e++){const t=s[e];let r=E([1,2,3,4]),o=this.simulateRandomSegments(24,5,12,r),a=[];for(let r=0;r<o.length;r++){const s=o[r];if(0==r)a.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),c.push({x:0,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i});else{let u=a[r-1].x;a.push({x:o[r-1]+u,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i}),c.push({x:o[r-1]+u,y:t.y,w:s,h:t.h,i:10*e+r,wStep:n,hStep:i})}}}}return{layouts:c.map((t=>{let{option:r,typeNum:n}=qe.createLine(),i=t.x*t.wStep+t.w*t.wStep/2,o=t.y*t.hStep+t.h*t.hStep/2,a=t.w*t.wStep,s=t.h*t.hStep;if(3==n||5==n||7==n){let e=Math.min(a,s);a=e,s=e}let c=e.wrapWidth,u=e.wrapHeight;return t.chartsOption=r,t.typeNum=n,t.txt=n+" "+i/c+" "+o/u+" "+a/c+" "+s/u,console.log(t.txt),t})),option:{colNum:r,margin:(null==e?void 0:e.margin)?null==e?void 0:e.margin:this.margin,isDraggable:!!(null==e?void 0:e.isDraggable)&&(null==e?void 0:e.isDraggable),isResizable:!!(null==e?void 0:e.isResizable)&&(null==e?void 0:e.isResizable),verticalCompact:!(null==e?void 0:e.verticalCompact)||(null==e?void 0:e.verticalCompact),useCssTransforms:!(null==e?void 0:e.useCssTransforms)||(null==e?void 0:e.useCssTransforms),rowHeight:e.wrapHeight/t,maRrows:t}}}simulateRandomSegments(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1===a)i.push(o),a--;else{const e=Math.min(r,o-t*(a-1)),n=Math.floor(Math.random()*(e-t+1))+t;i.push(n),o-=n,a--}return i}simulateRandomSegments2(e,t,r,n){const i=[];let o=e,a=n;for(;a>0;)if(1==a){const t=e-i.reduce(((e,t)=>e+t),0);i.push(t),a--}else{let e=Math.floor(Math.random()*r),n=Math.max(t,e),s=o-t*a;const c=Math.min(n,s);i.push(c),o-=c,a--}return i}},Ue=src.pool(),Le=e=>{try{return JSON.parse(e)}catch(t){return e}},He=new class{constructor(){this.requested=new Set,this.db=new Dexie$1("go-db"),this.init()}init(){return s(this,void 0,void 0,(function*(){this.db.version(1).stores({store:"key, value"})}))}pushCaseIdToRequested(e){this.requested.add(e)}add(e,t){return s(this,void 0,void 0,(function*(){try{(yield this.isExist(e))||(t.caseDetailData&&(t.caseDetailData="string"==typeof t.caseDetailData?Le(t.caseDetailData):t.caseDetailData),this.pushCaseIdToRequested(e),yield this.db.table("store").add({key:e,value:t}))}catch(e){console.error(e)}}))}bulkPut(e){return s(this,void 0,void 0,(function*(){let t=yield Promise.all(e.map((e=>s(this,void 0,void 0,(function*(){const{caseId:t,id:r}=e,n=`${t}_${r}`;if(yield this.isExist(n))return null;if(e.caseDetailData){const t=yield Ue.exec(Le,[e.caseDetailData]);e.caseDetailData=t,Ue.terminate()}return e})))));t=t.filter((e=>null!==e));const r=t.map((e=>{const{caseId:t,id:r}=e,n=`${t}_${r}`;return this.pushCaseIdToRequested(n),{key:n,value:e}}));this.db.table("store").bulkPut(r).then((()=>{})).catch((e=>console.error(e)))}))}get(e){return s(this,void 0,void 0,(function*(){if(!(yield this.isExist(e)))return null;const t=yield this.db.table("store").where("key").equals(e).first();return t?t.value:null}))}getAllData(){return s(this,void 0,void 0,(function*(){return yield this.db.table("store").toArray()}))}update(e,t){return s(this,void 0,void 0,(function*(){if(yield this.isExist(e)){const r=yield this.get(e),n=yield Ue.exec(Le,[t]);Ue.terminate(),yield this.db.table("store").update(e,{value:Object.assign(Object.assign({},r),{caseDetailData:n})})}else console.error("update indexdb error")}))}delete(e){this.requested.delete(e),this.db.table("store").delete(e)}isExist(e){return s(this,void 0,void 0,(function*(){return(yield this.db.table("store").where("key").equals(e).count())>0}))}reset(){this.requested.clear(),this.db.table("store").clear()}clear(){return s(this,void 0,void 0,(function*(){yield this.db.table("store").clear()}))}isExistStore(){return s(this,void 0,void 0,(function*(){try{return yield this.db.open(),!0}catch(e){return!1}}))}},Be=function(e){return s(this,void 0,void 0,(function*(){try{let{fontUrl:t,fontName:r}=e;const n="__custom_font__";let i=document.getElementById(n);if(!i){i=document.createElement("style"),i.id=n;const e=document.head||document.getElementsByTagName("head")[0];yield e.appendChild(i)}i.innerText+=`@font-face{font-family:'${r}';src:url(${t});}`}catch(e){console.warn(e)}}))},ze=(e,...t)=>s(void 0,[e,...t],void 0,(function*(e,t="jspaths",r){const n="csspaths"===t?"link":"script",i=document.createElement(n);"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),yield new Promise(((e,t)=>{i.addEventListener("load",e),i.addEventListener("error",e)}))})),Je=(e,...t)=>s(void 0,[e,...t],void 0,(function*(e,t="jspaths"){const r="fonts"===t?Be:ze;yield Promise.all(e.map((e=>r(e))))}));function Ge(e){!function(e,t){e.depends?optionTheme_js.setOptionColorByTheme(e):_e(e,!1)}(e)}function _e(e,t=!0){let{theme:r,option:n,optionDes:i}=e;n&&i&&r&&Object.keys(i).forEach((o=>{"conditionSeries"!==i[o].type&&"tabs"!==i[o].type||!n[o]?i[o].theme?n.hasOwnProperty(o)&&function({theme:e,option:t,optionDes:r},n,i){let o;if("color"!=r[n].type||!i&&t[n]){if("bgcolor"==r[n].type&&(i||!t[n]||!t[n].style)){t[n]||(t[n]={});let{key:i,points:a,degree:s,type:c,opacity:u}=r[n].theme;if(a){s||(s=90),c||(c="linear");let r=`${c}-gradient(${s}deg`,i=100/(a.length-1),l=[];a.forEach(((t,n)=>{o=We(e,t),r+=`,${Xe(o,t.opacity)} ${i*n}%`;let{red:a,green:s,blue:c,alpha:d}=Ke(o,u);l.push({red:a,green:s,blue:c,alpha:d,left:i*n})})),r+=")",t[n].style=r,t[n].degree=s,t[n].flag=a.length?3:2,t[n].points=l,t[n].type=c}else i&&(o=We(e,r[n].theme),t[n]=Object.assign(Object.assign({},Ke(o,u)),{style:Xe(o,u)}))}}else{let{opacity:i}=r[n].theme;o=We(e,r[n].theme),t[n]=Xe(o,i)}}(e,o,t):i[o].hasOwnProperty("type")&&"slot"!=i[o].type&&"textStyle"!=i[o].type&&"sheet"!=i[o].type||i[o].constructor!=Object||_e({option:n[o],optionDes:i[o],theme:r},t):function(e,t,r,n,i,o){let a=t.form,s=e;if(Array.isArray(a))for(let e=0;e<a.length;e++){let t,r=a[e];t=o?s[e].form:s[e],_e({option:t,optionDes:r,theme:n},i)}else{let e=s.length;for(let t=0;t<e;t++){let e;e=o?s[t].form:s[t],_e({option:e,optionDes:a,theme:n},i)}}}(n[o],i[o],0,r,t,"conditionSeries"===i[o].type)}))}function We(e,t){return e[t.key]?e[t.key]||e.color:t.key.indexOf(".")>-1?[e,...t.key.split(".")].reduce(((t,r)=>"object"==typeof t&&r in t?t[r]:(Qe(`属性${r}不存在,获取主题颜色错误,将使用默认主题色`),e.color))):(Qe(`属性${t.key}不存在,获取主题颜色错误,将使用默认主题色`),e.color)}function Xe(e,t){let{red:r,green:n,blue:i,alpha:o}=Ke(e,t);return`rgba(${r},${n},${i},${o})`}function Ke(e,t){return-1!=e.indexOf("#")&&(e=e.substr(1)),null==t&&(t=1),{red:parseInt("0x"+e.slice(0,2)),green:parseInt("0x"+e.slice(2,4)),blue:parseInt("0x"+e.slice(4,6)),alpha:t}}function Qe(e){console.warn(e)}class Ye{constructor(e){this.processedIds=new Set,this.validateAccessResolve=null,e?(e.caseId&&(this.caseId=e.caseId),e.pageId&&(this.pageId=e.pageId),e.mode&&(this.mode=e.mode),e.environment&&(this.environment=e.environment),e.xhr&&(this.xhr=e.xhr),e.staticComponentData&&(this.staticComponentData=e.staticComponentData),e.theme&&(this.theme=e.theme)):console.log("初始化错误!"),this.defaultTheme={name:"科技蓝",color:"#006aee",background:"#00000033",pageBackground:"#051836",text:"#F0F0F0",groups:["#006aee","#00eae9","#00a9ec","#00ec80","#edc700","#9913ee"]}}checkHardware(){return s(this,void 0,void 0,(function*(){return yield new Promise(((e,t)=>{e("Hardware is not available")}))}))}checkSecurity(e){return s(this,void 0,void 0,(function*(){return yield new Promise(((t,r)=>{"preview"==this.environment?t(0):this.getShareForRelease(e).then((e=>{2e4==e.code&&e.data?(e.data,e.data.loginLimitSwitch?t(1):e.data.hasAuth?t(2):t(3)):t(4)}))}))}))}validateAccess(e,t){return s(this,void 0,void 0,(function*(){return new Promise(((r,n)=>{this.validateAccessResolve=r,t&&t(e)}))}))}initBefore(){return new Promise(((e,t)=>{let r=p("secretFree");r?sessionStorage.setItem("secret-free",r):sessionStorage.setItem("secret-free",null),console.log("运行免登录设置完成!"),e(!0)}))}fetchCaseId(e,t){return s(this,void 0,void 0,(function*(){try{const r=yield this.getKey(e,t);return 2e4===(null==r?void 0:r.code)&&(null==r?void 0:r.data)?r.data:e}catch(t){return console.error("Error fetching caseId:",t),e}}))}getDataForrelease(){return new Promise(((e,t)=>{e("data")}))}onProjectLoaded(e){}authenticate(){return s(this,void 0,void 0,(function*(){this.environment}))}getShareForRelease(e){return this.xhr.get(`/go/v1/go-share/v1/${e}/config`)}findById(e,t="",r=0,n=""){return"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}?pwd=${t}&mode=${r}&token=${n}`):this.xhr.get(`/go/v1/go-cases/v1/${e}?mode=${r}&token=${n}`)}getKey(e,t=0){return this.xhr.get(`/go/v1/go-cases/v1/key/${e}?caseMode=${t}`)}getPageData(e,t){return s(this,void 0,void 0,(function*(){const r=yield He.get(e+"_"+t);return r?{data:r}:"release"===this.environment?this.xhr.get(`/go/v1/go-share/v1/${e}/pages/${t}`):this.xhr.get(`/go/v1/go-cases/v1/${e}/pages/${t}`)}))}getPageId(e,t){if(null==t?void 0:t.length){if(t.find((t=>t.id==e)))return e;let r=t.find((t=>t.caseDetailPath==e||t.caseDetailName==e));return r?r.id:e}return e}fetchProjectForId(e){return s(this,arguments,void 0,(function*(e,t="",r=0,n=""){return yield this.findById(e,t,r,n)}))}updataPageData(e,t){return s(this,void 0,void 0,(function*(){var r;let n=yield this.getPageDataForID(e,t);(null==n?void 0:n.data)?null===(r=null==this?void 0:this.lifecycleHooks)||void 0===r||r.onPageDataReady(n.data.caseDetailData):console.error("请求数据发生错误!")}))}getPageDataForID(e,t,r){return s(this,void 0,void 0,(function*(){const n=this.getPageId(t,this.projectInfo.details);if(this.processedIds.has(n)){console.log(`ID ${n} has already been processed.`);const t=yield He.get(e+"_"+n);if(t)return{data:t}}const i=this.getPageData(e,n);this.processedIds.add(n),r&&r.length&&r.map((t=>s(this,void 0,void 0,(function*(){try{if(this.processedIds.has(t))return void console.log(`ID ${n} has already been processed.`);const r=yield this.getPageData(e,t);He.add(e+"_"+t,r.data),this.processedIds.add(t)}catch(e){console.error(`Error processing ID ${t}: ${e}`)}}))));const o=yield i;return He.add(e+"_"+n,o.data),yield i}))}fetchPageDataForId(e){return s(this,arguments,void 0,(function*(e,t="",r=0,n=""){return yield this.findById(e,t,r,n)}))}setTheme(){console.log("设置主题")}setBackground(){console.log("设置背景信息")}updateVariables(){console.log("更新变量信息")}beforeRender(e){}renderComponents(){return s(this,void 0,void 0,(function*(){}))}setGlobalThemeVars(e){document.body.style.cssText=`\n --theme-background: ${e.background};\n --theme-color: ${e.color};\n --theme-pageBackground: ${e.pageBackground};\n --theme-text: ${e.text};\n ${e.groups.map(((e,t)=>`--theme-groups-${t}: ${e};`)).join("\n")}\n `}listenForRenderCompletion(){}showAnimation(){console.log("所有组件渲染完成,显示动画。")}setComTheme(e,t){var r,n;let i=null===(r=this.staticComponentData[t.viewComName])||void 0===r?void 0:r.optionDes,o=null===(n=this.staticComponentData[t.viewComName])||void 0===n?void 0:n.theme;return Ge({theme:e,option:t.tmpData.option,optionDes:i,depends:o}),t}getComData(e,t,r,n){return s(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{if(e.tmpData&&e.tmpData.source){this.setComTheme(n,e);try{le(e,!0,t,r).then((t=>{t&&(e.source=t)})),i(1)}catch(e){i(e)}}else i("")}))}))}pageInit(e){return s(this,void 0,void 0,(function*(){var t;try{let r=null==e?void 0:e.caseDetailData,n=this.defaultTheme;if((null==r?void 0:r.theme)&&(n=r.theme),this.setGlobalThemeVars(n),r.resource){let e=(null===(t=null===window||void 0===window?void 0:window.anovuiConfig)||void 0===t?void 0:t.fonts)||[],n=_$1.concat(r.resource.fonts,e),i=_$1.cloneDeep(r.resource);i.fonts=n,yield(e=>s(void 0,[e],void 0,(function*({jspaths:e=[],csspaths:t=[],fonts:r=[]}){const n=_$1.uniqBy(r,"fontName");yield Promise.all([Je(e,"jspaths"),Je(t,"csspaths"),Je(n,"fonts")])})))(i)}ve.clearVars(),ve.addVariables(r.globalVars);let i=ve.getAllVariables();return w(r.list,(e=>s(this,void 0,void 0,(function*(){yield this.getComData(e,i,r.globalSource,n)})))),r}catch(t){return console.warn("页面初始化发生错误:",t),(null==e?void 0:e.data)?e.data:e}}))}validate(e,t,r){return s(this,void 0,void 0,(function*(){return new Promise(((n,i)=>{const o=(e,r)=>s(this,void 0,void 0,(function*(){let i=yield this.validateAccess(e,r),a=(null==i?void 0:i.pwd)?i.pwd:"",s=(null==i?void 0:i.mode)?i.mode:0,c=(null==i?void 0:i.token)?i.token:"",u=yield this.fetchProjectForId(t,a,s,c);2e4==(null==u?void 0:u.code)&&(null==u?void 0:u.data)?(this.projectInfo=u.data,console.log("验证成功!"),this.lifecycleHooks.message("验证成功!"),n(!0)):(this.lifecycleHooks.validateError(u),this.lifecycleHooks.message(u.msg,"warning"),o(e,r))}));o(e,r)}))}))}init(e){return s(this,void 0,void 0,(function*(){var t;try{this.lifecycleHooks=e,yield this.checkHardware();let r=yield this.fetchCaseId(this.caseId,this.mode),n=yield this.checkSecurity(r),i=e.onValidateAccess||(()=>{});(yield this.validate(n,r,i))&&e.onCaseReady(this.projectInfo);let o=(null===(t=this.projectInfo)||void 0===t?void 0:t.details).map((e=>e.id)),a=this.getPageId(this.pageId,this.projectInfo.details);console.log(a,this.pageId,"this.pageId");let s=yield this.getPageDataForID(r,a||o[0],o);const c=yield this.pageInit(s.data);return e.onPageDataReady(c),{currentData:this.projectInfo,currentPageData:c}}catch(e){console.error("加载页面时出错:",e)}}))}}var index$3=Object.freeze({__proto__:null,ConfigOptimizer:Ce,GlobalVariables:ge,Http:J,Log:z,PageLoader:Ye,agentData:X,delFetchStatus:I,displayGenerator:Me,editItem:se,emitEvent:De,fetchDataByGlobal:ae,fetchDataByType:re,filterData:ne,findItemDeep:x,findItemDeep2:S,getData:W,getDataForApi:K,getDataForDataSet:Y,getDataForSource:ee,getDataForStatic:te,getDataForZb:Q,getDataForZbCQ:Z,getSessionData:v,getStandardData:m,getStringVars:D,getUrlParams:p,getVarDefaultVal:be,globalVars:ve,hasVar:N,isJSON:f,recursion:w,replaceVariable:ue,safeEval:C,safeEvalForCode:A,setFetchStatus:O,setSessionData:g,updataGlobalDataSourceForVar:pe,updateComData:le,updateGlobalDataSource:me}),getInteractive=function(e,t,r,n,i){var o;try{var a={},s=[],c=[],u=[],l=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var c=0,u=s;c<u.length;c++){var l=u[c],d=l.value;(null==d?void 0:d.length)&&(l.value=l.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(l,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:c,eventsComs:u,filter:i})}})),ve.addVariables(s),s=ve.getAllVariables(),recursion(l,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),{shareVariableTree:a,globalVars:ve.getAllVariables(),globalEvents:c.filter((function(e){return e})),eventsComs:u}}catch(e){return console.error("error",e),{}}},getInteractive2=function(e,t,r,n,i){var o;try{var a={},s=[],c=[],u=[],l=_$1.cloneDeep(e);return(null===(o=null===window||void 0===window?void 0:window.go)||void 0===o?void 0:o.dev)&&recursion(e,(function(e){var t,r,n;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length)for(var i=0,o=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions;i<o.length;i++){var a=o[i];if("toggle"==a.behave){var s=a.toggle;if(null==s?void 0:s.length)for(var c=0,u=s;c<u.length;c++){var l=u[c],d=l.value;(null==d?void 0:d.length)&&(l.value=l.value.map((function(e){return{cid:e.cid,viewComName:e.viewComName,name:e.name,visible:e.visible}})))}}}})),recursion(l,(function(e){var t,r;if(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.actions)||void 0===r?void 0:r.length){var n=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:n,element:e,actions:s,events:c,eventsComs:u})}})),t&&t.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),t,!0)),r&&r.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),r,!0)),n&&n.length&&(s=__spreadArray$1(__spreadArray$1([],s,!0),n,!0)),recursion(l,(function(e){var t,r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.source;getShareVariableTree(r,s,e,a)})),s.filter((function(e){if(e.fork){var t=s.find((function(t){return t.mapField==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(t.mapField)}));(i?i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i):!!t)&&(Array.isArray(e.forkValue)?e.originalValue=e.forkValue.map((function(e){var t=s.find((function(t){return t.mapField==e}));if(t)return t.value})):e.originalValue=t.value)}})),{shareVariableTree:a,globalVars:s.filter((function(e){return i?(i==e.forkValue||Array.isArray(e.forkValue)&&e.forkValue.includes(i))&&(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue):(e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue),e})),globalEvents:c.filter((function(e){return e})),eventsComs:u}}catch(e){return console.error("error",e),{}}},checkVar=function(e,t){var r,n,i,o=!1,a=e.type,s=e.converse,c=e[a];if((null==s?void 0:s.use)&&(null===(r=null==s?void 0:s.data)||void 0===r?void 0:r.length))for(var u=0,l=s.data;u<l.length;u++){if((null==(v=l[u])?void 0:v.use)&&v.dependVars.includes(t)){o=!0;break}}if(o)return o;var d="",h="",f="";"api"==a&&(d=c.url,(null===(n=c.headers)||void 0===n?void 0:n.use)&&(h=c.headers.value),f=c.params),"datasource"==a&&(d=c.inputSql),"indicator"==a&&((null===(i=c.headers)||void 0===i?void 0:i.use)&&(h=c.headers.value),f=c.params);for(var p=/({{[\w]*}})|((@)[\w]*)/gm,m=0,g=[d,h,f];m<g.length;m++){var v,y=(v=g[m]).match(p);if((null==y?void 0:y.length)&&y.find((function(e){return e=="{{".concat(t,"}}")||e=="@".concat(t)}))){o=!0;break}}return o},executeFilter=function(e){return e.hasOwnProperty("originalValue")||(e.originalValue=e.value),e.converter&&e.converterCode?e.value=safeEval(e.converterCode,e.originalValue):e.value=e.originalValue,e},getShareTree=function(e,t){try{var r={},n=[],i=[];return recursion(e,(function(e){var o,a,s,c=null===(o=null==e?void 0:e.tmpData)||void 0===o?void 0:o.source;if(getShareVariableTree(c,t,e,r),null===(s=null===(a=null==e?void 0:e.tmpData)||void 0===a?void 0:a.actions)||void 0===s?void 0:s.length){var u=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:u,element:e,actions:n,events:i})}})),r}catch(e){return console.error(e),{}}},hasVar=function(e,t,r){var n,i,o,a,s=t[null==t?void 0:t.type],c=null==t?void 0:t.converse,u=!1;if(c&&c.use&&c.data.length)for(var l=0,d=c.data;l<d.length;l++){var h=d[l];if((null==h?void 0:h.dependVars)&&(null===(n=null==h?void 0:h.dependVars)||void 0===n?void 0:n.length)&&(null==h?void 0:h.dependVars.includes(e)))return u=!0}return(null==s?void 0:s.inputSql)&&(u=getStringVars(null==s?void 0:s.inputSql,r)),(null==s?void 0:s.url)&&(u=getStringVars(s.url,r)),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&(u=getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,r)),(null==s?void 0:s.params)&&(u=getStringVars(null==s?void 0:s.params,r)),u},getShareVariableTree=function(e,t,r,n){var i,o,a;if(e){var s=e[null==e?void 0:e.type],c=null==e?void 0:e.converse;c&&c.use&&c.data.length&&c.data.map((function(e){var t;(null==e?void 0:e.dependVars)&&(null===(t=null==e?void 0:e.dependVars)||void 0===t?void 0:t.length)&&e.dependVars.map((function(e){setShareVariableTreeData(n,e,r.cid)}))})),(null==s?void 0:s.inputSql)&&getStringVars(null==s?void 0:s.inputSql,t,r,n),(null==s?void 0:s.url)&&getStringVars(s.url,t,r,n),(null==s?void 0:s.headers)&&(null===(i=null==s?void 0:s.headers)||void 0===i?void 0:i.use)&&(null===(o=null==s?void 0:s.headers)||void 0===o?void 0:o.value)&&getStringVars(null===(a=null==s?void 0:s.headers)||void 0===a?void 0:a.value,t,r,n),(null==s?void 0:s.params)&&getStringVars(null==s?void 0:s.params,t,r,n)}},getStringVars=function(e,t,r,n){"string"!=typeof e&&(e=JSON.stringify(e));var i=e.match(/({{[\w]*}})|((@)[\w]*)/gm);if(i){var o=i.map((function(e){return e.replace(/{{|}}|@/gm,"")}));if(r)for(var a=function(e){var i=o[e];if(!i||!t||t.findIndex((function(e){return e.mapField===i}))<0)return"continue";r&&n&&setShareVariableTreeData(n,i,r.cid)},s=0;s<o.length;s++)a(s);else{var c=function(e){var i=o[e];return!i||!t||t.findIndex((function(e){return e.mapField===i}))<0?"continue":(r&&n&&setShareVariableTreeData(n,i,r.cid),{value:!0})};for(s=0;s<o.length;s++){var u=c(s);if("object"==typeof u)return u.value}}}return!1},setShareVariableTreeData=function(e,t,r){if(e[t]&&_$1.isArray(e[t])){e[t].push(r);var n=e[t];e[t]=_$1.uniq(n)}else e[t]=[],e[t].push(r)},isJSON=function(e){if("string"==typeof e)try{var t=JSON.parse(e);return!("object"!=typeof t||!t)}catch(e){return!1}return!1};function getStandardData(e,t){return void 0===t&&(t=!1),t?isJSON(e)?e:JSON.stringify(e):isJSON(e)?JSON.parse(e):e}var rightMenuMutaitons={delListItem:function(e,t){var r=_$1.cloneDeep(e.list);"string"==typeof t?findItemDeep$1(r,t,!0):t.forEach((function(e){findItemDeep$1(r,e,!0)})),e.list=r,e.globalVars=getInteractive(e.list,e.globalConstant,e.sysConst).globalVars},editCloneCache:function(e,t){var r=_$1.cloneDeep(e.cloneCache);r.length&&r.map((function(e){e.baseData=Object.assign({},e.baseData,t)})),e.cloneCache=r},cloneItem:function(e){if(e.selectd.length>0){e.cloneCache=[];for(var t=function(t){var r=findItemDeep$1(e.list,e.selectd[t]);if("boolean"!=typeof r){var n=_$1.cloneDeep(r);if(n.pid="",(null==n?void 0:n.stateChildren)||(null==n?void 0:n.children))((null==n?void 0:n.stateChildren)?null==n?void 0:n.stateChildren:null==n?void 0:n.children).forEach((function(e){var t,r,i,o,a=e.cid;if(e.cid=genID(),e.pid=n.cid,(null==n?void 0:n.stateChildren)&&(null===(r=null===(t=null==n?void 0:n.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children)){var s=null===(o=null===(i=null==n?void 0:n.tmpData)||void 0===i?void 0:i.option)||void 0===o?void 0:o.children.find((function(e){return e.cid==a}));s&&(s.cid=e.cid)}}));e.cloneCache.push(n),window.localStorage.setItem("cloneCache",JSON.stringify(e.cloneCache))}},r=0;r<e.selectd.length;r++)t(r)}},shearItem:function(e,t){if(e.selectd.length>0){e.cloneCache=[];for(var r=0;r<e.selectd.length;r++){var n=findItemDeep$1(e.list,e.selectd[r],!0);if("boolean"!=typeof n){var i=_$1.cloneDeep(n);e.cloneCache.push(i)}}e.selectd=[]}},pasteItem:function(e){var t,r;try{var n=(null===(r=_$1.cloneDeep(e.cloneCache))||void 0===r?void 0:r.length)?_$1.cloneDeep(e.cloneCache):JSON.parse(window.localStorage.getItem("cloneCache"));if(n.length>0){var i=[],o={};recursion(n,(function(e){var t=genID();if(o[e.cid]=t,e.cid=t,e&&e.children)for(var r=0,n=e.children;r<n.length;r++){n[r].pid=e.cid}else if(e.stateChildren)for(var a=0,s=e.stateChildren;a<s.length;a++){s[a].pid=e.cid}if("dynamicComponent"==e.componentType){var c=void 0;e.dynamicChildren instanceof Map?c=e.dynamicChildren.get(e.activeDynamic):e.dynamicChildren instanceof Array&&(c=e.dynamicChildren.find((function(t){return t[0]==e.activeDynamic}))),c.length>1&&(Array.isArray(c[1])?c[1].forEach((function(t){t.pid=e.cid})):c.forEach((function(t){t.pid=e.cid}))),1==c.length&&c.forEach((function(t){t.pid=e.cid}))}i.push(e.cid)})),e.selectd.length>0?selectdArea(e.selectd,e.list):getPosition(n),n.forEach((function(e){var t,r,n,i;if(e.baseData.top=e.baseData.top+20,e.baseData.left=e.baseData.left+20,e&&e.hasOwnProperty("stateChildren")&&(null===(r=null===(t=null==e?void 0:e.tmpData)||void 0===t?void 0:t.option)||void 0===r?void 0:r.children))for(var o=function(t){t.pid=e.cid;var r=null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.option)||void 0===i?void 0:i.children.find((function(e){return e.disName==t.name}));r&&(r.cid=t.cid)},a=0,s=e.stateChildren;a<s.length;a++){o(s[a])}}));try{var a=Object.keys(o),s=JSON.stringify(n);(null==a?void 0:a.length)&&a.forEach((function(e){var t=o[e];-1!==s.indexOf(e)&&(s=s.replaceAll(null==e?void 0:e.toString(),null==t?void 0:t.toString()))})),n=JSON.parse(s)}catch(e){}(t=e.list).unshift.apply(t,_$1.cloneDeep(n)),e.selectd=i}}catch(e){console.warn(e)}},updataShow:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isShow;updataAttribute(r,"isShow",n,"")}},changeShow:function(e,t){var r=t.cid,n=t.flag,i=findItemDeep$1(e.list,r);i&&updataAttribute(i,"isShow",n,"")},comToggle:function(e,t){var r=findItemDeep$1(e.list,t);r&&comToggle(r)},updataLock:function(e,t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=!r.isLock;updataAttribute(r,"isLock",n,"")}},breakUp:function(e,t){var r,n;try{if(!t)throw"Please pass in the component CID correctly!";var i=findParentDeep(e.list,t),o=findItemDeep$1(e.list,t),a=o.baseData;if(isNaN(a.left)||isNaN(a.top))throw new Error("top or left is NAN");var s=breakUp(o,e.list);if(s.map((function(e){return e.pid=""})),i){var c=i.children.findIndex((function(e){return e.cid==t}));i.children.splice(c,1),(r=i.children).push.apply(r,s.reverse())}else{c=e.list.findIndex((function(e){return e.cid==t}));e.list.splice(c,1),(n=e.list).push.apply(n,s.reverse())}}catch(e){console.error(e)}},editGroup:function(e,t){var r,n=t.groupId;t.status;try{if(!n)throw"Please pass in the component CID correctly!";var i=e.list.findIndex((function(e){return e.cid===n})),o=e.list[i],a=breakUp(o);a.map((function(e){return e.pid=""})),e.list.splice(i,1),(r=e.list).push.apply(r,a)}catch(e){console.error(e)}},combination:function(e){_$1.cloneDeep(e.list);var t,r,n=[],i=[],o=genID(),a=findItemDeep$1(e.list,e.selectd[0]);a.pid?console.info("Sorry, only level 2 is supported group"):a.children&&1===e.selectd.length?console.info("Sorry, only level 2 is supported group"):(e.selectd.forEach((function(t){var r=e.list.findIndex((function(e){return e.cid===t}));if(r>-1){n.push(r);var a=e.list.splice(r,1)[0];a.pid=o,i.push(a)}})),t=n.sort((function(e,t){return e-t}))[0],r=1===i.length?_$1.cloneDeep(i[0].baseData):e.currentArea,Object.assign(r,{angle:0,opacity:100,rotate:0,rotateY:0}),setPositionForGroup(r,i),e.list.splice(t,0,{cid:o,pid:"",isShow:!0,isLock:!1,editer:!1,baseData:r,z:0,toggle:!0,name:"群组",type:"folder",origin:"anov-ui",tmpData:{actions:null,option:null,source:globalSourceTemp},children:i}),setIndex(e.list),e.selectd=[o])},moveUp:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>=1?arraySwap(e.list,r-1,r):arraySwapDeep(e.list,"up",t)}catch(e){console.error(e)}},moveDown:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&r<=e.list.length-2?arraySwap(e.list,r+1,r):arraySwapDeep(e.list,"down",t)}catch(e){console.error(e)}},moveTop:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t}));r>-1&&0!==r?arraySwap(e.list,0,r):arraySwapDeep(e.list,"top",t)}catch(e){console.error(e)}},moveBottom:function(e,t){try{var r=e.list.findIndex((function(e){return e.cid===t})),n=e.list.length-1;r>-1&&r!==n?arraySwap(e.list,n,r):arraySwapDeep(e.list,"bottom",t)}catch(e){console.error(e)}}};function setComActions(e){var t=[],r=[];recursion(_$1.cloneDeep(e),(function(e){var n,i;if(null===(i=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.actions)||void 0===i?void 0:i.length){var o=e.tmpData.actions.map((function(e){return e.eventType}));setActions({types:o,element:e,actions:t,events:r})}}));var n=r.filter((function(e){return e}));return{actions:t,events:n}}var eventMutations={addGlobalSource:function(e,t){var r=t.name,n=t.value,i=genID();e.globalSource.push({key:i,name:r,value:n}),me({key:i,name:r,value:n},e.globalVars,e.globalSource,e.list,(function(e){}))},editGlobalSource:function(e,t){var r=this,n=t.key,i=t.value,o=e.globalSource.find((function(e){return e.key==n}));o&&(o.name=t.name,o.value=i,me(o,e.globalVars,e.globalSource,e.list,(function(e,t){r.commit("GoCom/updataSourceForComponent",{cid:e.cid,data:t})})))},delGlobalSource:function(e,t){try{var r=e.globalSource.findIndex((function(e){return e.key===t}));-1!==r&&e.globalSource.splice(r,1)}catch(e){console.error("删除错误",e)}},setSyncFlag:function(e,t){e.syncFlag=t},goUpShareVar:function(e,t){e.shareVariable[t.key]=__assign$1({},t)},addGoRunVar:function(e,t){try{var r=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=r.globalVars,e.eventsComs=r.eventsComs}catch(e){console.warn(e)}},copyGoVar:function(e,t){try{for(var r=t.mapField,n=(r.toString().trim(),e.globalConstant.filter((function(e){return e.mapField.includes(r)}))),i=1,o=0;o<n.length;o++)i++;var a="".concat(r," (").concat(i,")"),s=e.globalConstant.find((function(e){return e.mapField==r}));if(r&&s){var c=_$1.cloneDeep(s);c.mapField=a,e.globalConstant.push(c);var u=getInteractive(e.list,e.globalConstant,e.sysConst);e.globalVars=u.globalVars,e.eventsComs=u.eventsComs}}catch(e){console.warn(e)}},goDelShareVar:function(e,t){delete e.shareVariable[t]},signal:function(e,t){},goSynchroDataAll:function(e,t){e.list=_$1.cloneDeep(t)},goSynchroDataForOption:function(e,t){if(e){var r=t.cid,n=t.value,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&i&&updataAttributeForOption(i,n)}this.commit("GoCom/execute")},goSynchroData:function(e,t){if(e){var r=t.cid,n=t.attr,i=t.value,o=t.attrModel,a=findItemDeep$1(e.list,r);if("boolean"!=typeof a){if(a&&updataAttribute(a,n,i,o),"actions"===n.toLowerCase()){var s=e.list,c=_$1.uniqWith(_$1.concat(setComActions(s).actions,setComActions(e.caseList).actions),_$1.isEqual),u=_$1.uniqWith(_$1.concat(setComActions(s).events,setComActions(e.caseList).events),_$1.isEqual);ve.addVariables(c),e.globalVars=ve.getAllVariables(),e.globalEvents=u,e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalVars=c),e.pages[e.pageIndex]&&(e.pages[e.pageIndex].globalEvents=u)}if("source"===n){if(!a.tmpData.source)return!1;var l=a.tmpData.source,d=l.type;if("api"===d){var h=l[d].url.match(/{{[\w]*}}|(@)[\w]*/gm);if(h)for(var f=h.map((function(e){return e.replace(/{{|}}|@/gm,"")})),p=function(t){var r=f[t];if(!r||!e.globalVars||e.globalVars.findIndex((function(e){return e.mapField===r}))<0)return"continue";if(e.shareVariableTree||(e.shareVariableTree={}),e.shareVariableTree[r]&&_$1.isArray(e.shareVariableTree[r])){e.shareVariableTree[r].push(a.cid);var n=e.shareVariableTree[r];e.shareVariableTree[r]=_$1.uniq(n)}else e.shareVariableTree[r]=[],e.shareVariableTree[r].push(a.cid)},m=0;m<f.length;m++)p(m)}}}}this.commit("GoCom/execute")},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),ve.addVariables(n)},resetGlobalData:function(e){e.globalVars=e.sysConst,e.globalConstant=[],e.globalSource=[]},updateGlobalRelatedVars:function(e,t){var r=t.run,n=t.gvData;return r.length&&r.forEach((function(e){var t=n.filter((function(t){return t.mapField==e.mapField||t.fork&&t.forkValue==e.mapField}));if(t.length)for(var r=0,i=t;r<i.length;r++){var o=i[r],a=e.value;o.mapField==e.mapField?o.value=a:o.fork&&e.mapField==o.forkValue?(o.converter&&o.converterCode,o.originalValue=a):n.push(e)}})),n}},comTreeMutations={updataList:function(e,t){var r=t.cid,n=produceWithImmer(t.list,(function(e){var t=findItemDeep$1(e,r),n=t.pid,i=getAncestorsNodes(e,r),o=function(e){for(var t=0;t<e.length;t++){var r=e[t];upDataGroup(r,r.baseData,null,!0)}},a=function(e){return e.reduce((function(e,t){return{left:e.left+t.baseData.left,top:e.top+t.baseData.top}}),{left:0,top:0})},s=function(e,t){void 0===t&&(t=e);for(var r=0;r<e.length;r++){var n=e[r];if(n.children&&Array.isArray(n.children))return 0===n.children.length?(t.splice(r,1),!0):(s(n.children,n.children)&&0===n.children.length&&t.splice(r,1),!0)}};if(i.length>0)if(t.pid=i[0].cid,n){var c=__spreadArray$1([findItemDeep$1(e,n)],getAncestorsNodes(e,n),!0),u=a(c),l=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,u)),t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,l,1)),o(c),o(i)}else{l=a(i);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,l,1)),o(i)}n&&0==i.length&&(t.pid="",function(t,r){var n=getAncestorsNodes(e,r),i=findItemDeep$1(e,r);if(0===n.length)t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,i.baseData));else{n=__spreadArray$1([i],n,!0);var s=a(n);t.baseData=__assign$1(__assign$1({},t.baseData),transformPosition(t.baseData,s))}o(__spreadArray$1([i],n,!0))}(t,n)),s(e),setIndex(e)}));e.list=n},updataListForContrast:function(e,t){var r=t.cid,n=t.list,i=findItemDeep$1(n,r);findParentDeep(n,r);var o=findParentDeep(e.list,r);if(!i.pid){i.pid=o.cid;var a=_$1.cloneDeep(i.baseData),s=transformPosition(i.baseData,o.baseData,1);Object.assign(i.baseData,s),upDataGroup(o,a)}setIndex(e.list)},updateTree:function(e){for(var t=e.list,r=0;r<t.length;r++){var n=t[r];if(n.pid)(a=findItemDeep$1(t,n.pid))&&Object.assign(n.baseData,transformPosition(n.baseData,a.baseData));if(n.children)for(var i=0;i<n.children.length;i++){var o=n.children[i];if(o.pid!=n.cid){var a=findItemDeep$1(t,o.pid);if(_$1.cloneDeep(o.baseData),a){Object.assign(o.baseData,transformPosition(o.baseData,a.baseData));var s=transformPosition(o.baseData,n.baseData,1);Object.assign(o.baseData,s),upDataGroup(n,n.baseData)}o.pid=n.cid}}}setIndex(t)}},ERR_OK=200,ERR_OK2=2e4,TIMEOUT=3e4,STATUS="status",xhr=function(t,r){void 0===t&&(t="");var n=e.create({baseURL:t,timeout:TIMEOUT,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"}});return n.interceptors.request.use((function(e){return sessionStorage.getItem("anov-go-token")&&"null"!=sessionStorage.getItem("anov-go-token")&&(e.headers["X-ANOV-ACCESS-TOKEN"]=sessionStorage.getItem("anov-go-token")),sessionStorage.getItem("unify-access-token")&&"null"!=sessionStorage.getItem("unify-access-token")&&(e.headers["X-UNIFY-ACCESS-TOKEN"]=sessionStorage.getItem("unify-access-token")),sessionStorage.getItem("dgcc_authorization")&&"null"!=sessionStorage.getItem("dgcc_authorization")&&(e.headers.dgcc_authorization=sessionStorage.getItem("dgcc_authorization")),"post"===e.method?(e.headers["Content-Type"]="application/json;",e):"get"===e.method?e:"put"===e.method?(e.headers["Content-Type"]="application/json; charset=UTF-8",e):"delete"===e.method?e:void 0}),(function(e){return Promise.reject(e)})),n.interceptors.response.use((function(e){return e[STATUS]===ERR_OK||e.data.code,r&&r(e),e.data}),(function(e){return r&&r(null==e?void 0:e.response),Promise.reject(e.response)})),n},Http=function(e,t){return xhr(e,t)},filterData=ne,parseSource=function(e,t,r,n,i,o,a,s){void 0===n&&(n=!0);console.log(t,r,n,i,"callback"),le(t,n,r,[],(function(e){i(e),("AnContainer"===(null==t?void 0:t.viewComName)&&n||"AnGridLayout"===(null==t?void 0:t.viewComName)&&n)&&UpdataForContainer(t)}),s)},updateComData=function(e,t,r,n,i,o,a){return void 0===r&&(r=!0),__awaiter(void 0,void 0,void 0,(function(){var o;return __generator(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,le(e,r,t,i,(function(e){n&&n(e)}),a)];case 1:return[2,s.sent()];case 2:return o=s.sent(),n&&n(o),console.log("error:11"+o),[3,3];case 3:return[2]}}))}))},autoUpdateComData=function(e,t,r){var n,i,o,a,s,c=null===(n=null==e?void 0:e.tmpData)||void 0===n?void 0:n.source,u=null===(o=null===(i=c[null==c?void 0:c.type])||void 0===i?void 0:i.autoUpdate)||void 0===o?void 0:o.open,l=null===(s=null===(a=c[null==c?void 0:c.type])||void 0===a?void 0:a.autoUpdate)||void 0===s?void 0:s.time;u&&_$1.isNumber(l)&&l>0&&setInterval((function(){updateComData(e,t,!0,(function(t){r({cid:e.cid,data:t})}))}),1e3*l)},refreshData=function(e,t,r,n,i,o){void 0===o&&(o=!0),e&&le(e,o,t,[],(function(t){r({cid:e.clientWidth,data:t})}))},index$2=Object.freeze({__proto__:null,Http:Http,autoUpdateComData:autoUpdateComData,axios:e,filterData:filterData,getDataForEvaluator:getDataForEvaluator,parseSource:parseSource,refreshData:refreshData,updateComData:updateComData}),loadFontResource=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,o;return __generator(this,(function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),t=e.fontUrl,r=e.fontName,n="__custom_font__",(i=document.getElementById(n))?[3,2]:((i=document.createElement("style")).id=n,[4,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)]);case 1:a.sent(),a.label=2;case 2:return i.innerText+="@font-face{font-family:'".concat(r,"';src:url(").concat(t,");}"),[3,4];case 3:return o=a.sent(),console.warn(o),[3,4];case 4:return[2]}}))}))},loadScript=function(e,t,r){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var n,i;return __generator(this,(function(o){switch(o.label){case 0:return n="csspaths"===t?"link":"script",i=document.createElement(n),"jspaths"===t?i.defer=!0:i.rel="stylesheet",i.className=t,i.src=e,(r||document.head||document.getElementsByTagName("head")[0]).appendChild(i),[4,new Promise((function(e,t){i.addEventListener("load",e),i.addEventListener("error",e)}))];case 1:return o.sent(),[2]}}))}))},addTag=function(e,t){return void 0===t&&(t="jspaths"),__awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return r="fonts"===t?loadFontResource:loadScript,[4,Promise.all(e.map((function(e){return r(e)})))];case 1:return n.sent(),[2]}}))}))},loadFont=function(e){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return e.fonts&&e.fonts.length?[4,addTag(e.fonts,"fonts")]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},loadTag=function(e){var t=e.jspaths,r=void 0===t?[]:t,n=e.csspaths,i=void 0===n?[]:n,o=e.fonts,a=void 0===o?[]:o;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(a,"fontName"),[4,Promise.all([addTag(r,"jspaths"),addTag(i,"csspaths"),addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},loadFontTag=function(e){var t=e.fonts,r=void 0===t?[]:t;return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return e=_$1.uniqBy(r,"fontName"),[4,Promise.all([addTag(e,"fonts")])];case 1:return t.sent(),[2]}}))}))},removeTag=function(){removeFont(),Array.from(document.getElementsByTagName("script")).filter((function(e){return"jspaths"==e.className})).forEach((function(e){removeScript(e.src)})),Array.from(document.getElementsByTagName("link")).filter((function(e){return"csspaths"==e.className})).forEach((function(e){removeCss(e.href)}))};function removeScript(e){for(var t,r=Array.from(document.getElementsByTagName("script")),n=0;n<r.length;n++)r[n]&&r[n].src&&-1!=r[n].src.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeCss(e){for(var t,r=Array.from(document.getElementsByTagName("link")),n=0;n<r.length;n++)r[n].href,r[n]&&r[n].href&&-1!=r[n].href.indexOf(e)&&(null===(t=r[n])||void 0===t?void 0:t.parentNode)&&r[n].parentNode.removeChild(r[n])}function removeFont(){var e=document.getElementById("__custom_font__");(null==e?void 0:e.parentNode)&&e.parentNode.removeChild(e)}var toolMutations={reset:function(e){e.selectd=[],e.list=[],e.plant=null,e.tw=null,e.watermark=null,e.endnotes=null,e.globalConstant=[]},setFonts:function(e,t){e.resource.fonts.push({fontName:t.name,fontUrl:t.src}),loadFont(e.resource)},setCaseInfo:function(e,t){e.caseInfo=t},setPageId:function(e,t){e.pageId=t},pagePush:function(e,t){try{var r=t.type,n=t.value,i=t.option,o=["name","path","id"];if(!o.includes(r))throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填以下参数 ").concat(o.join(",")));if(!n)throw new Error("页面跳转错误!".concat(r," 不是一个正确的参数 请填正确的页面路径或者页面名称"));e.toPage=i?{type:r,value:n,option:i}:{type:r,value:n}}catch(e){console.warn(e)}},updatComs:function(e,t){var r=this,n=findItemDeep$1(e.list,t);if("boolean"!=typeof n){(null==n?void 0:n.children)&&(null==n||n.children),updateComData(n,e.globalVars,!0,(function(e){r.commit("GoCom/updataSourceForComponent",{cid:n.cid,data:e})}),e.globalSource)}},updatComsForVar:function(e,t){var r=e.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),n=[t];(null==r?void 0:r.length)&&(n=_$1.uniq(__spreadArray$1([t],r,!0)));for(var i=[],o=0,a=n;o<a.length;o++){var s=a[o];e.shareVariableTree[s]&&i.push.apply(i,e.shareVariableTree[s])}if(null==i?void 0:i.length)for(var c=0,u=i;c<u.length;c++){var l=u[c];this.commit("GoCom/updatComs",l)}},addConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r?Object.assign(r,t):e.constant.push(t)},editConstant:function(e,t){var r=_$1.find(e.constant,{name:t.name});r&&Object.assign(r,t)},delConstant:function(e,t){_$1.remove(e.constant,(function(e){return e.name==t}))},setResource:function(e,t){var r=t.type,n=t.value;e.resource[r]=n,removeTag(),loadTag(e.resource)},updataResource:function(e){removeTag(),loadTag(e.resource)},resetResource:function(e){e.resource={jspaths:[],csspaths:[],otherpaths:[]}},setData:function(e,t){e.selectd=t.selectd},setList:function(e,t){e.list=t,setIndex(e.list)},saveDynamicChildren:function(e,t){var r=t.cid,n=t.data,i=t.name,o=e.pages[e.pageIndex].list,a=findItemDeep$1(o,r);a&&(a.activeDynamic=i,a.dynamicChildren instanceof Array&&(a.dynamicChildren=new Map(a.dynamicChildren)),a.dynamicChildren.set(i,n))},setTheme:function(e,t){e.theme=t},setPlant:function(e,t){var r=t.attr,n=t.value;e.plant||(e.plant={name:"",theme:null,baseData:{width:1920,height:1080,left:0,top:0},option:null,optionDes:null}),e.plant[r]=n},setPlantHeight:function(e,t){e.plant&&(e.plant.baseData.height=e.plant.baseData.height+t)},reversal:function(e,t){e.undos=[],e.undoRedoPointer=-1;var r=_$1.cloneDeep(t.globalVars);delete t.globalVars,e=Object.assign(e,t),ve.addVariables(r),e.globalVars=ve.getAllVariables(),setIndex(e.list)},setComTmp:function(e,t){var r=e.list.find((function(e){return e.cid===t[0]}));r.com=t[1],r.tmp=t[2]},setLoading:function(e,t){var r=t.cid,n=t.flag,i=e.list.find((function(e){return e.cid===r}));i&&(i.loading=n)},setMultiple:function(e,t){e.multiple=t},setCaseList:function(e,t){e.caseList=t},updataComponentForList:function(e,t){var r=t.cid,n=t.data,i=e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponentForCaseList:function(e,t){var r=t.cid,n=t.data,i=e.caseList,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataComponent:function(e,t){var r=t.cid,n=t.data,i=e.pages&&e.pages[0]&&e.pages[0].list&&e.pages[0].list.length?e.pages[0].list:e.list,o=findItemDeep$1(i,r);"boolean"!=typeof o&&Object.assign(o,n)},updataArea:function(e,t){e.currentArea.left+=t.deltaX,e.currentArea.top+=t.deltaY},updataSource:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&("indicatorCQ"===i.tmpData.source.type?i.tmpData.source.indicator.data=n:(console.log("更新数据:"+i.cid),i.tmpData.source[i.tmpData.source.type].data=n))},updataSourceForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.source=_$1.cloneDeep(n))}},updataAnimationForComponent:function(e,t){var r=t.cid,n=t.data;if(e.list.length){var i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.tw=n)}},updataWatermark:function(e,t){e.watermark=t},updataEndnotes:function(e,t){e.endnotes=t},updataAnimation:function(e,t){e.tw=t},setContext:function(e,t){var r=t.cid,n=t.data,i=findItemDeep$1(e.list,r);"boolean"!=typeof i&&(i.example=n)},setContextList:function(e,t){var r=t.cid,n=t.data;e.contextList[r]=n},setPosition:function(e,t){setPositionForWorld(e.list.find((function(e){return e.cid===t[0]})),t[1])},setSelect:function(e,t){e.cache=[],e.selectd=t instanceof Array?t:[t],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t&&"Other.Plant.Normal"!==e.type})))}))},setActive:function(e,t){var r=_$1.cloneDeep(t),n=r.id,i=r.multiple,o=r.origin,a=r.ctr,s=_$1.cloneDeep(e.selectd);if(i){var c=s.includes(n);if(s.length>=1){var u=s.every((function(r){return isPeer(e.list,r,t.id)}));if(!u)return void console.info("sorry Only sibling elements can be selected!")}c?s.splice(s.findIndex((function(e){return e===n})),1):s.push(n),e.selectd=s}else e.selectd=[n];e.selectd.forEach((function(t){var r=findItemDeep$1(e.list,t);if(r.pid){var n=findItemDeep$1(e.list,r.pid);n&&(n.toggle=!0)}a||(r.toggle=!0)})),e.selectdChangeOrigin=o||""},setCache:function(e){e.cache=[],e.selectd.length>1&&e.selectd.forEach((function(t){e.cache.push(e.list.find((function(e){return e.cid===t})))}))},clearActive:function(e){e.selectd=[]},setMultipleActive:function(e,t){e.selectd=t},syncMenuInfo:function(e){RecursiveList(e.menuList,(function(t){var r=10*t.lv+t.index;e.list.filter((function(e){return e.cid===t.id}))[0].z=1e4-r}))},addComs:function(e,t){var r=t.com,n=t.isMobile;"MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[]),r.lines={h:[],v:[]},"AnGridLayout"==r.viewComName&&r.dynamicChildren.set("状态1",null==r?void 0:r.AnGridChildren)),n?e.list.push(r):e.list.unshift(r),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addComsForParent:function(e,t){var r=t.com,n=t.isMobile,i=t.PID;if("MultiStateComponent"!=r.componentType||r.stateChildren||(r.stateChildren=[]),"dynamicComponent"!=r.componentType||r.dynamicChildren||(r.dynamicChildren=new Map,r.activeDynamic="状态1",r.dynamicChildren.set("状态1",[])),i){var o=findItemDeep$1(e.list,i);n?(o.children=[],o.children.push(r)):o.children.unshift(r)}else n?e.list.splice(0,1,r):e.list.unshift(r);e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},addMyComs:function(e,t){var r;try{var n=t.data,i=t.shareVariableTree,o=t.globalVars,a=t.globalEvents;e.globalVars=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalVars),o)),e.globalEvents=_$1.uniq(_$1.concat(_$1.cloneDeep(e.globalEvents),a));var s=Object.keys(i),c=Object.keys(e.shareVariableTree),u=_$1.difference(s,c);u.length?u.forEach((function(t){e.shareVariableTree[t]=_$1.concat(_$1.cloneDeep(e.shareVariableTree[t]),i[t])})):e.shareVariableTree=Object.assign(_$1.cloneDeep(e.shareVariableTree),i),n instanceof Array?(resetID(n),(r=e.list).unshift.apply(r,n)):(resetID([n]),e.list.unshift(n)),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")}catch(e){}},addStateChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.stateChildren.push(t)},addDynamicChildren:function(e,t){var r=findItemDeep$1(e.list,t.pid);r&&r.dynamicChildren.push(t)},arraySwap:function(e,t){var r;try{if(!t||2!=t.length)throw new Error("参数错误,方法接受两个组件的CID组成的数组!");var n=_$1.cloneDeep(e.list),i=findItemDeep$1(n,t[0]),o=findItemDeep$1(n,t[1]),a=findItemDeep$1(n,i.pid),s={},c=0,u=0;if(o)if("selectContainer"==o.componentType){var l=findItemDeep$1(n,t[1]);a?(c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],a.children=a.children.filter((function(e){return e.cid!==s.cid}))):(s=findItemDeep$1(n,t[0]),n=n.filter((function(e){return e.cid!==s.cid}))),s.cid=genID(),s.pid=l.cid,l.children.push(s)}else if(i.pid||o.pid)if(a)if(c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],i.pid!==o.pid){l=findItemDeep$1(n,o.pid);u=_$1.findIndex(l.children,(function(e){return e.cid==t[1]}));d=l.children[u];s.cid=genID(),s.pid=l.cid,d.cid=genID(),d.pid=a.cid,a.children.splice(c,1,d),l.children.splice(u,1,s)}else u=_$1.findIndex(a.children,(function(e){return e.cid==t[1]})),(r=a.children).splice.apply(r,__spreadArray$1([u,1],a.children.splice(c,1,a.children[u]),!1));else{var l=findItemDeep$1(n,o.pid);c=_$1.findIndex(n,(function(e){return e.cid==t[0]})),u=_$1.findIndex(l.children,(function(e){return e.cid==t[1]})),s=findItemDeep$1(n,i.cid);var d=l.children[u];s.cid=genID(),s.pid=l.cid,d.cid=genID(),d.pid=null,n.splice(c,1,d),l.children.splice(u,1,s)}else arraySwapForId(e.list,t[0],t[1]);else c=_$1.findIndex(a.children,(function(e){return e.cid==t[0]})),s=a.children[c],a.children.splice(c,1),s.cid=genID(),s.pid=null,n.push(s);e.list=n,setIndex(e.list)}catch(e){console.warn("组件位置交换发生错误",e)}},changeDynamicState:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&"dynamicComponent"==r.componentType&&(r.dynamicChildren instanceof Array&&r.dynamicChildren.find((function(e){return e[0]==t.activeName}))||r.dynamicChildren instanceof Map&&r.dynamicChildren.has(t.activeName)?r.activeDynamic=t.activeName:console.error(t.activeName+"不是一个正确的状态"))},addAlternateData:function(e,t){e.alternateData[t.pid]||(e.alternateData[t.pid]=[]),e.alternateData[t.pid].push(t)},setOptionForCom:function(e,t){var r;try{var n=t.cid,i=t.key,o=t.value,a=findItemDeep$1(e.list,n);if(!a)return;if("string"!=typeof i)return void console.error("key:[".concat(i,"]格式错误"));var s=null===(r=null==a?void 0:a.tmpData)||void 0===r?void 0:r.option,c=i.split(".");s&&(null==c?void 0:c.length)&&c.forEach((function(e,t){s.hasOwnProperty(e)&&(t===c.length-1?s[e]=o:s=s[e])}))}catch(e){console.warn("同步属性发生错误:"+e)}},mergeConfig:function(e,t){t.length>0&&t.forEach((function(t){e.list.unshift(t)})),e.menuList=_$1.cloneDeep(e.list),setIndex(e.list),this.commit("GoCom/execute")},updataName:function(e,t){var r=findItemDeep$1(e.list,t.cid);r&&(r.name=t.name)},setDynamicActive:function(e,t){t.cid;var r=t.name,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.activeDynamic=r)},updataScroll:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.srcollInfo={use:!!(null==r?void 0:r.use)&&(null==r?void 0:r.use),data:(null==r?void 0:r.data)?null==r?void 0:r.data:null})},updataDySetting:function(e,t){t.cid;var r=t.data,n=findItemDeep$1(e.list,t.cid);n&&"dynamicComponent"==n.componentType&&(n.dyOption=r)},setCurrentEdited:function(e,t){if(t){var r=findItemDeep$1(e.list,t);if("boolean"!=typeof r){var n=breakUp(r);r.children=n}e.currentEditerCid=t}else e.currentEditerCid=""},setDynamicLine:function(e,t){var r=_$1.cloneDeep(e.list),n=findItemDeep$1(r,t.cid);r.length&&"boolean"!=typeof n&&(n.lines=Object.assign({},n.lines,t.lines)),e.list=r}},findArray=function(e,t){try{var r=e.map((function(e){var r=findItemDeep$1(t,e);if("object"==typeof r)return r;throw"Please check whether the input and output parameters are correct!"}));if(_$1.every(r,Object))return r;throw"Please check whether the input and output parameters are correct!"}catch(e){return console.error(e),[]}},alignLeft=function(e,t){1===e.length&&(e[0].baseData.left=0);var r=_$1.sortBy(e,(function(e){return e.baseData.left})),n=r[0].baseData.left;e.map((function(e){return e.baseData.left=n}))},alignRight=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width-e[0].baseData.width}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=1*n[n.length-1].baseData.left+1*n[n.length-1].baseData.width;e.map((function(e){return e.baseData.left=i-1*e.baseData.width}))},horizontally=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.left=r.width/2-e[0].baseData.width/2}var n=_$1.sortBy(e,(function(e){return e.baseData.left})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.left+1*e.baseData.width})),o=(1*n[0].baseData.left+(1*i[i.length-1].baseData.left+1*i[i.length-1].baseData.width))/2;e.map((function(e){return e.baseData.left=o-e.baseData.width/2}))},alignTop=function(e,t){1===e.length&&(e[0].baseData.top=0);var r=_$1.sortBy(e,(function(e){return e.baseData.top})),n=1*r[0].baseData.top;e.map((function(e){return e.baseData.top=n}))},alignBottom=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height-e[0].baseData.height}var n=_$1.sortBy(e,(function(e){return 1*e.baseData.top})),i=1*n[n.length-1].baseData.top+1*n[n.length-1].baseData.height;e.map((function(e){return e.baseData.top=i-1*e.baseData.height}))},verticalCenter=function(e,t){if(1===e.length){var r=t.plant?t.plant.baseData:{width:1920,height:1080};e[0].baseData.top=r.height/2-e[0].baseData.height/2}var n=_$1.sortBy(e,(function(e){return e.baseData.top})),i=_$1.sortBy(e,(function(e){return 1*e.baseData.top+1*e.baseData.height})),o=(1*n[0].baseData.top+(1*i[i.length-1].baseData.top+1*i[i.length-1].baseData.height))/2;e.map((function(e){return e.baseData.top=o-e.baseData.height/2}))},topDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top})),r=(t[t.length-1].baseData.top-t[0].baseData.top)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+r*n)}))},bottomDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height})),r=(t[t.length-1].baseData.top+t[t.length-1].baseData.height-(t[0].baseData.top+t[0].baseData.height))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.top=1*t[0].baseData.top+1*t[0].baseData.height-1*e.baseData.height+r*n)}))},xCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width/2})),r=1*t[t.length-1].baseData.left+t[t.length-1].baseData.width/2,n=1*t[0].baseData.left+t[0].baseData.width/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.left=n-e.baseData.width/2+i*r)}))},leftDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left})),r=(t[t.length-1].baseData.left-t[0].baseData.left)/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+r*n)}))},rightDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.left+e.baseData.width})),r=(t[t.length-1].baseData.left+t[t.length-1].baseData.width-(t[0].baseData.left+t[0].baseData.width))/(t.length-1);t.map((function(e,n){n>0&&n<t.length-1&&(e.baseData.left=t[0].baseData.left+t[0].baseData.width-e.baseData.width+r*n)}))},yCenterDistribution=function(e){if(e.length<3)return console.warn("A minimum of three elements are required for a distribution arrangement"),!1;var t=_$1.sortBy(e,(function(e){return e.baseData.top+e.baseData.height/2})),r=1*t[t.length-1].baseData.top+t[t.length-1].baseData.height/2,n=1*t[0].baseData.top+t[0].baseData.height/2,i=(r-n)/(t.length-1);t.map((function(e,r){r>0&&r<t.length-1&&(e.baseData.top=n-e.baseData.height/2+i*r)}))},layoutMutations={layout:function(e,t){var r=findArray(e.selectd,e.list);switch(t){case"alignLeft":alignLeft(r);break;case"alignRight":alignRight(r,e);break;case"horizontally":horizontally(r,e);break;case"alignTop":alignTop(r);break;case"alignBottom":alignBottom(r,e);break;case"verticalCenter":verticalCenter(r,e);break;case"topDistribution":topDistribution(r);break;case"bottomDistribution":bottomDistribution(r);break;case"xCenterDistribution":xCenterDistribution(r);break;case"leftDistribution":leftDistribution(r);break;case"rightDistribution":rightDistribution(r);break;case"yCenterDistribution":yCenterDistribution(r)}}},pages={setPageData:function(e,t){e.pages[0]=t},parasePages:function(e,t){t instanceof Array&&(e.pages=t.map((function(e,t){return e.name||(e.name="页面"+(t+1)),e.path||(e.path="page"+(t+1)),e})))},addPage:function(e,t){var r=e.pages.length+1;t.name="页面"+r,t.path="page"+r,e.pages.push(t),e.pageIndex=e.pages.length-1,e.resource={jspaths:[],csspaths:[],otherpaths:[]},e.globalVars=e.sysConst},setCurrentPageIndex:function(e,t){var r=e.globalEvents,n=e.globalVars,i=e.list,o=e.name,a=e.theme,s=e.plant,c=e.shareVariableTree,u=e.resource;e.pages[e.pageIndex]={globalEvents:r,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:c,resource:u},e.pageIndex=t},setPageDataForIndex:function(e,t){var r=t.index,n=t.data;e.pages[r]=n},setPageName:function(e,t){e.name=t,e.pages[e.pageIndex].name=t},saveCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=void 0===r?[]:r,i=e.list,o=e.name,a=e.theme,s=e.plant,c=e.shareVariableTree,u=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:n,list:i,name:o,theme:a,plant:s,shareVariableTree:c,resource:u}},getCurrentPageData:function(e){var t=e.globalEvents,r=e.globalVars,n=e.list,i=e.name,o=e.theme,a=e.plant,s=e.shareVariableTree,c=e.resource;e.pages[e.pageIndex]={globalEvents:t,globalVars:r,list:n,name:i,theme:o,plant:a,shareVariableTree:s,resource:c}}},containerMutaitons={segmentationContainer:function(e,t){var r=_$1.cloneDeep(e.list),n=t.containerData,i=t.direction,o=[];if("del"==i)if(n.pid){var a=findItemDeep$1(r,n.pid),s=a.children.length;if(a)if(s<=2)(o=a.children.filter((function(e){return e.cid!==n.cid&&e.children.length}))).length?(a.direction=o[0].direction,a.children=o[0].children.map((function(e){return e.pid=a.pid||a.cid,e}))):a.children=[];else{var c=a.children.find((function(e){return e.cid===n.cid})),u=a.children.findIndex((function(e){return e.cid===n.cid}));a.children=a.children.filter((function(e){return e.cid!==n.cid}));var l=a.children[u>=a.children.length-1?a.children.length-1:u],d="col"==l.direction?"height":"width";l.baseData[d]=(parseFloat(l.baseData[d])+parseFloat(c.baseData[d])).toFixed(2)+"%"}}else r.length&&(r=r.filter((function(e){return e.cid!==n.cid})));else{var h=findItemDeep$1(r,n.cid);if(h){h.direction=i,1===h.children.length&&(o=h.children,h.children=[]);for(var f=(s=h.children.length)>=2?1:2,p=(d=s>=2?(100/(s+1)).toFixed(2)+"%":"50%",0);p<f;p++)h.children.push({isLock:!1,isShow:!0,baseData:{width:"col"==i?"100%":d,height:"col"==i?d:"100%",angle:0,penetrate:0,opacity:100},direction:i,componentType:"selectContainer",iconClass:"__vue_devtool_undefined__",isAssembly:"__vue_devtool_undefined__",source:[],comData:{actions:[],option:{grid:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],bgColor:{alpha:1,blue:0,green:0,red:0,flag:1,style:"transparent"},imgOpt:"",bgScaleOpt:3,borderRadius:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}],margins:[{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"},{val:0,unit:"px"}]}},tmpData:{},dynamic:0,filePath:"/anov-prod/mgt/go/assembly/162-bgImage.png",origin:"anov-go",name:"容器组件",path:"/index.js",viewComName:"selectContainer",optionComName:"",dataComName:"",eventComName:"",assemblyDeveloper:"",devEmail:"",version:null,devDept:"",toggle:!0,cid:genID(),pid:h.cid,nestIndex:0,children:[],isTop:!1,isCol:"col"==i,isRow:"col"!=i,isDragged:!1,grandParentId:n.pid});o.length&&(o[0].cid=genID(),o[0].pid=h.children[0].cid,h.children[0].children=o)}}e.list=r,0==r.length&&(e.selectd=[])}},shareCom={goEditShareCom:function(e,t){var r=t.name,n=t.mapping;e.shareComs||(e.shareComs=new Map),e.shareComs.set(r,n)},delShareCom:function(e,t){var r=t.key;e.shareComs&&e.shareComs.has(r)&&e.shareComs.delete(r)}},globalVars={mutation:{addGoVar:function(e,t){try{ve.addVariable(t,(function(){e.globalVars=ve.getAllVariables()}))}catch(e){console.warn(e)}},delGoVar:function(e,t){try{var r=t.mapField;console.log(r,"mapFieldmapField"),ve.delVariable(r,(function(){e.globalVars=ve.getAllVariables()}))}catch(e){console.warn(e)}},editGoVar:function(e,t){var r=this;try{ve.editVariable(t,(function(n){e.globalVars=ve.getAllVariables(),pe(e.globalSource,t.mapField,e.globalVars,e.list,(function(e){r.commit("GoCom/updatComs",e.cid)})),(null==t?void 0:t.delayUpdate)||r.commit("GoCom/updatComsForVar",t.mapField)}))}catch(e){console.warn(e)}},goEditVar:function(e,t){var r=t.key,n=t.value,i=e.globalVars.find((function(e){return e.mapField==r}));i&&(i.originalValue=n,i.update=!0,this.commit("GoCom/editGoVar",i))},goUpdataSysVars:function(e,t){var r={U_CITY:"cityCode",U_COUNTY:"countyCode",U_PROVINCE:"provinceCode",U_PHONE:"userPhone"},n=e.sysConst,i=Object.keys(r);n.map((function(e){if(e.originalValue=e.value,(null==e?void 0:e.name)&&(null==i?void 0:i.includes(e.name))){var n=r[e.name];e.value=t[n],e.originalValue=t[n]}return e})),ve.addVariables(n)},updateGlobalVars:function(e,t){e.globalVars=t},updataVariables:function(e){e.globalVars=ve.getAllVariables()}},actions:{updateGlobalVarsAction:function(e){(0,e.commit)("updateGlobalVars",ve.getAllVariables())},goEditVar:function(e,t){(0,e.commit)("editGoVar",{mapField:t.key,originalValue:t.value})}}},mutations=__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1(__assign$1({},UndoRedo),baseDataMutaitons),rightMenuMutaitons),eventMutations),comTreeMutations),toolMutations),layoutMutations),pages),containerMutaitons),shareCom),globalVars.mutation),actions=__assign$1({updataList:function(e,t){var r=e.commit;t&&r("updataList",t),r("updateTree")},updataBaseData:function(e,t){var r=e.commit;t&&r("updataBaseData",t)},setActive:function(e,t){var r=e.commit;t&&r("setActive",t)},setSyncFlag:function(e,t){var r=e.commit;t&&r("setSyncFlag",t)},execute:function(e,t){var r=e.commit;t&&r("execute",t)},updataAnimationForComponent:function(e,t){var r=e.commit;t&&r("updataAnimationForComponent",t)},updataAnimation:function(e,t){(0,e.commit)("updataAnimation",t)},setOptionForCom:function(e,t){(0,e.commit)("setOptionForCom",t)},updatComs:function(e,t){var r=e.commit;setTimeout((function(){r("updatComs",t)}))},updatComsForVar:function(e,t){var r=e.dispatch,n=e.state,i=n.globalVars.map((function(e){var r,n;if((null===(r=null==e?void 0:e.forkValue)||void 0===r?void 0:r.length)&&(null===(n=null==e?void 0:e.forkValue)||void 0===n?void 0:n.includes(t))||e.forkValue==t)return e.mapField})).filter((function(e){return e})),o=[t];(null==i?void 0:i.length)&&(o=_$1.uniq(__spreadArray$1([t],i,!0)));for(var a=[],s=0,c=o;s<c.length;s++){var u=c[s];n.shareVariableTree[u]&&a.push.apply(a,n.shareVariableTree[u])}if(null==a?void 0:a.length)for(var l=0,d=a;l<d.length;l++){r("updatComs",d[l])}},goEditShareCom:function(e,t){var r=e.commit;e.state,r("goEditShareCom",t)},delShareCom:function(e,t){var r=e.commit;e.state,r("delShareCom",t)},updataSource:function(e,t){var r=e.commit;e.state,r("updataSource",t)}},globalVars.actions),getters={getCurrentPage:function(e){return e.pages.length?e.pages[e.pageIndex]:[]},globalSourceTree:function(e){if(e.list.length&&e.globalSource.length){var t=[];return recursion(_$1.cloneDeep(e.list),(function(e){var r,n,i;if("globalData"==(null===(n=null===(r=null==e?void 0:e.tmpData)||void 0===r?void 0:r.source)||void 0===n?void 0:n.type)){var o=null===(i=null==e?void 0:e.tmpData)||void 0===i?void 0:i.source.globalData;t.push({name:e.name,cid:e.cid,sourceId:o.id,viewComName:e.viewComName})}})),t}return[]}},store={namespaced:!0,state:state,mutations:mutations,actions:actions,getters:getters},VueServer=function(){function e(){}return e.setAppStore=function(t){e.store=t},e.prototype.getState=function(){return e.store.state[e.storeModule]},e.prototype.mapState=function(t){return mapState(e.storeModule,t)},e.prototype.mapGetters=function(t){return mapGetters(e.storeModule,t)},e.prototype.mapMutations=function(t){return mapMutations(e.storeModule,t)},e.prototype.callState=function(t){return e.store.state[e.storeModule][t]},e.prototype.callGetter=function(t,r){return e.store.getters[e.storeModule+"/"+t]},e.prototype.callMutation=function(t,r,n){n?e.store.commit(e.storeModule+"/"+t,r,!0):e.store.commit(e.storeModule+"/"+t,r)},e.prototype.callAction=function(t,r){e.store.dispatch(e.storeModule+"/"+t,r)},e.storeModule="GoCom",e}(),mapState=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){var t=this.$store.state,r=this.$store.getters;if(e){var n=getModuleByNamespace(this.$store,"mapState",e);if(!n)return;t=n.context.state,r=n.context.getters}return"function"==typeof i?i.call(this,t,r):t[i]},r[n].VuexServer=!0})),r})),mapMutations=normalizeNamespace((function(e,t){var r;return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;r[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this.$store.commit;if(e){var o=getModuleByNamespace(this.$store,"mapMutations",e);if(!o)return;n=o.context.commit}return"function"==typeof i?i.apply(this,[n].concat(t)):n.apply(this.$store,[i].concat(t))}})),r})),mapGetters=normalizeNamespace((function(e,t){var r={};return normalizeMap(t).forEach((function(t){var n=t.key,i=t.val;i=e+i,r[n]=function(){if(!e||getModuleByNamespace(this.$store,"mapGetters",e)){if("production"===process.env.NODE_ENV||i in this.$store.getters)return this.$store.getters[i];console.error("[VuexServer] unknown getter: ".concat(i))}},r[n].VuexServer=!0})),r}));function normalizeMap(e){return Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}}))}function normalizeNamespace(e){return function(t,r){return"string"!=typeof t?(r=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,r)}}function getModuleByNamespace(e,t,r){var n=e._modulesNamespaceMap[r];return"production"===process.env.NODE_ENV||n||console.error("[VuexServer] module namespace not found in ".concat(t,"(): ").concat(r)),n}var GoComponent=function(){function e(e){var t=this;if(this.isLock=!1,this.isShow=!0,this.baseData={left:0,top:0,width:300,height:200,angle:0,opacity:100,rotate:0,rotateY:0},this.componentType="BaseComponent",this.cid=genID(),e){Object.keys(e).forEach((function(r){t[r]=e[r]}));["AnEchartsMap","AnMaptalks","AnEchartsMap1","AnArcgisMapBase","AnAMap1","AnCesium","AnThreeMap3DChina","AnThreeMapForCesium","AnThreeMap","AnGisMap","AnMineMap","MineMapMarkerLayer","MineMapClusterLayer","AnChina3D","AncsAnovGis"].includes(e.viewComName)&&(this.componentType="MultiStateComponent"),"AnDynamic"!==e.viewComName&&"AmDynamic"!==e.viewComName&&"AnContainer"!==e.viewComName&&"AnGridLayout"!==e.viewComName||(this.componentType="dynamicComponent")}}return e.prototype.setIndex=function(e){this.z=e},e}(),Load=function(){function e(e){this.vueServer=e,this.loadScript=loadScript}return e.setStore=function(e){this.store=e},e.prototype.loadComponents=function(e){var t=e&&e.list?e.list:[];recursion(t,(function(e){e.viewComName&&(e&&e.path&&e.path,e.origin,e.viewComName?e.viewComName:e.rawData.viewComName)})),e&&this.vueServer.callMutation("reversal",_$1.cloneDeep(e))},e.prototype.addStore=function(e){this.vueServer.callMutation("setActive",{id:e}),this.vueServer.callMutation("addComs",this)},e.prototype._addPlantStore=function(){this.vueServer.callMutation("setPlant",this)},e.prototype._loadComTmp=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,i=this;return __generator(this,(function(o){switch(o.label){case 0:if(window[t])return[3,5];r=function(t){var r;return __generator(this,(function(n){switch(n.label){case 0:return r=e[t],[4,new Promise((function(e){e(i._load(r))}))];case 1:return n.sent(),[2]}}))},n=0,o.label=1;case 1:return n<e.length?[5,r(n)]:[3,4];case 2:o.sent(),o.label=3;case 3:return n++,[3,1];case 4:window[t]=t,o.label=5;case 5:return[2]}}))}))},e.prototype._load=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(r){return[2,new Promise((function(r){r(t.loadScript(e))}))]}))}))},e}(),IndexedDB=function(){function e(e){var t=e.dbName,r=e.tables,n=e.version,i=void 0===n?1:n,o=__rest(e,["dbName","tables","version"]);this.dbName=t,this.tables=r,this.version=i,this.openDB(__assign$1({dbName:t,tables:r,version:i},o))}return e.deleteDB=function(e){var t;null===(t=window.indexedDB)||void 0===t||t.deleteDatabase(e)},e.prototype.deleteItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e).delete(t);return n.onsuccess=function(e){"function"==typeof r&&r(e)},n},e.prototype.getItem=function(e,t,r){var n=this.storage.transaction(e,"readwrite").objectStore(e),i=null;return(i=t?n.get(t):n.getAll()).onsuccess=function(e){var t;"function"==typeof r&&r(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.result)},i.onerror=function(e){console.error(e),r(e)},i},e.prototype.setItem=function(e,t,r,n){var i=this.storage.transaction(e,"readwrite").objectStore(e).put(r,t);return i.onsuccess=function(e){"function"==typeof n&&n(e)},i.onerror=function(e){"function"==typeof n&&n(e)},i},e.prototype.get=function(e,t){return this.getItem(this.tables[0],e,t)},e.prototype.set=function(e,t,r){return this.setItem(this.tables[0],e,t,r)},e.prototype.delete=function(e,t){return this.deleteItem(this.tables[0],e,t)},e.prototype.clear=function(e,t){var r=this.storage.transaction(this.dbName,"readwrite").objectStore(e).clear();return r.onsuccess=function(e){"function"==typeof t&&t(e)},r},e.prototype.getDB=function(){return this.storage},e.prototype.closeDB=function(){this.storage.close()},e.prototype.openDB=function(e){var t=this,r=e.dbName,n=e.tables,i=e.version,o=e.callback,a=window.indexedDB;if(a)if((null==n?void 0:n.length)<1)console.error("表名不能为空");else{var s=a.open(r,i);s.onerror=function(e){var t,r;console.error("打开数据库失败: ".concat(null===(r=null===(t=e.currentTarget)||void 0===t?void 0:t.error)||void 0===r?void 0:r.message)),"function"==typeof o&&o(e)},s.onsuccess=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,"function"==typeof o&&o(e)},s.onupgradeneeded=function(e){var r;t.storage=null===(r=e.target)||void 0===r?void 0:r.result,n.forEach((function(r){t.storage.objectStoreNames.contains(r)||(t.storage.createObjectStore(r),"function"==typeof o&&o(e))}))}}else console.error("你的浏览器不支持indexedDB")},e}(),Go=function(){function e(){this.VueServer=new VueServer}return e.getInstance=function(){return this.instance||(this.db=new IndexedDB({dbName:"AnovGo",tables:["logs"]}),this.instance=new e),this.instance},e.prototype.getAppStore=function(){return e.store},e.setAppStore=function(t){e.store=t,VueServer.setAppStore(t),Load.setStore(t)},e.prototype.add=function(e,t,r){t.MultiState?this.VueServer.callMutation("addStateChildren",t):(this.VueServer.callMutation("addComs",{com:t,isMobile:r}),this.VueServer.callMutation("setActive",{id:e}))},e.prototype.addForParent=function(e,t,r,n){this.VueServer.callMutation("addComsForParent",{com:t,PID:r,isMobile:n}),this.VueServer.callMutation("setActive",{id:e})},e.prototype.render=function(e,t){var r=new GoComponent(e);t?this.add(r.cid,r,!0):this.add(r.cid,r)},e.prototype.renderForParent=function(e,t,r){var n=new GoComponent(e);void 0!==r?this.addForParent(n.cid,n,t,r):this.addForParent(n.cid,n,t)},e.prototype.reversal=function(e){new Load(new VueServer).loadComponents(e)},e.prototype.emitEvent=function(e,t){var r=this,n=this.VueServer.callState("globalEvents"),i=this.VueServer.callState("globalVars"),o=this.VueServer.callState("shareVariableTree"),a=this.VueServer.callState("globalSource");this.VueServer.callState("globalConstant");var s=this.VueServer.callState("list");De(n,i,o,s,e,(function(e){r.VueServer.callMutation("changeShow",e)}),(function(e){r.VueServer.callMutation("updataSourceForComponent",e)}),t,a)},e}(),__defProp=Object.defineProperty,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__spreadValues=(e,t)=>{for(var r in t||(t={}))__hasOwnProp.call(t,r)&&__defNormalProp(e,r,t[r]);if(__getOwnPropSymbols)for(var r of __getOwnPropSymbols(t))__propIsEnum.call(t,r)&&__defNormalProp(e,r,t[r]);return e},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r),__async=(e,t,r)=>new Promise(((n,i)=>{var o=e=>{try{s(r.next(e))}catch(e){i(e)}},a=e=>{try{s(r.throw(e))}catch(e){i(e)}},s=e=>e.done?n(e.value):Promise.resolve(e.value).then(o,a);s((r=r.apply(e,t)).next())})),defaultOptions={gapX:100,gapY:100,offsetLeft:0,offsetTop:0,width:120,height:64,opacity:.15,rotate:-22,fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"300",fontColor:"#000",fontFamily:"sans-serif",textAlign:"center",textBaseline:"alphabetic",monitor:!0,zIndex:9999,mode:"interval",pack:!0,blindFontSize:16,blindOpacity:.005},attributeNameTag="data-watermark-tag",observeOptions={childList:!0,subtree:!0,attributeFilter:["style","class",attributeNameTag]};function getMutationObserver(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function getDataSetKey(e){return e.split("-").slice(1).reduce(((e,t,r)=>0===r?t:`${e}${t[0].toUpperCase()+t.slice(1)}`))}var getStyleStr=e=>{let t="";return Object.keys(e).forEach((r=>{const n=r.replace(/([A-Z])/g,"-$1").toLowerCase();t+=`${n}:${e[r]};`})),t},encrypt=e=>window.btoa(decodeURI(encodeURIComponent(e))),getRandomId=(e="")=>`${encrypt(e)}-${(new Date).getTime()}-${Math.floor(Math.random()*Math.pow(10,8))}`,getContainer=(e,t,r={},n)=>{let i;if("string"==typeof e){if(i=document.getElementById(e),!i)throw new Error(`水印挂载节点未找到,请检查#${e}是否存在`)}else i=null!=e?e:document.body;i.setAttribute(attributeNameTag,t);const o=__spreadValues({position:"relative"},r);return n||delete o.position,i.setAttribute("style",getStyleStr(o)),i},getContent=e=>{const t=document.createElement("div");return t.setAttribute("style",getStyleStr({pointerEvents:"none"})),t.setAttribute(attributeNameTag,e),t};function getDrawPattern(e){const{text:t,gapX:r,gapY:n,offsetTop:i,offsetLeft:o,width:a,height:s,rotate:c,opacity:u,fontSize:l,fontStyle:d,fontVariant:h,fontWeight:f,fontFamily:p,fontColor:m,textAlign:g,textBaseline:v,image:y,blindText:_,blindFontSize:b,blindOpacity:w}=e;return new Promise(((e,D)=>{const S=document.createElement("canvas"),x=S.getContext("2d"),T=1*(Number(r)+Number(a)),k=1*(Number(n)+Number(s)),P=Number(o)||Number(r)/2,E=Number(i)||Number(n)/2;if(S.setAttribute("width",`${T}px`),S.setAttribute("height",`${k}px`),x){const r=1*a,n=1*s;if(x.translate(1*P,1*E),x.rotate(Math.PI/180*Number(c)),_&&(x.globalAlpha=w,x.font=`${b}px normal`,x.fillText(_,0,0)),x.globalAlpha=u,y){const t=new Image;return t.crossOrigin="anonymous",t.referrerPolicy="no-referrer",t.src=y,void(t.onload=()=>{x.drawImage(t,0,0,r,n),e({url:x.canvas.toDataURL(),width:T,height:k})})}const i=Array.isArray(t)?t:[t],o=i.map((e=>x.measureText(e).width)),d=Math.max(...o),h=1*Number(l);x.textAlign=g,x.textBaseline=v,x.fillStyle=m,x.font=A(`${h}px`),d>a&&(x.font=A(h/2+"px"));const f=h+5;let p=(n-(l*i.length+5*(i.length-1)))/2;p=p<0?0:p;for(let e=0;e<i.length;e++)x.fillText(i[e]||"",r/2,p+f*e);e({url:x.canvas.toDataURL(),width:T,height:k})}function A(e){return`${d} ${h} ${f} ${e} ${p}`}return D()}))}var MutationObserver=getMutationObserver(),Watermark=class{constructor(e={}){__publicField(this,"options"),__publicField(this,"container"),__publicField(this,"watermarkContent"),__publicField(this,"watermarkDom"),__publicField(this,"style"),__publicField(this,"watermarkTag"),__publicField(this,"shadowRoot"),__publicField(this,"mutationObserver"),__publicField(this,"_isAgainRender",(e=>{if("attributes"===e.type){if(e.attributeName===attributeNameTag)return!0;if(this.watermarkTag===this._getNodeRandomId(e.target))return!0}return!(!e.removedNodes.length||this.watermarkTag!==this._getNodeRandomId(e.removedNodes[0]))})),__publicField(this,"_getNodeRandomId",(e=>{var t;return null==(t=null==e?void 0:e.dataset)?void 0:t[getDataSetKey(attributeNameTag)]})),__publicField(this,"_destroyMutationObserver",(()=>{this.mutationObserver&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.mutationObserver=null)})),__publicField(this,"_getWatermarkDom",(e=>__async(this,null,(function*(){this.watermarkDom||(this.watermarkDom=document.createElement("div")),"number"==typeof e&&e&&(this.style.height=`${e}px`);const t=yield getDrawPattern(this.options);if(null==t?void 0:t.url){const e=t.url;"repeat"===this.options.mode?this.style.backgroundImage=`url(${e})`:(this.style.backgroundImage=`url(${e}), url(${e})`,this.style.backgroundRepeat="repeat, repeat",this.style.backgroundPosition=`${t.width/2}px ${t.height/2}px, 0 0`),this.options.container||(this.style.position="fixed",this.style.height=void 0),this.watermarkDom.setAttribute("style",getStyleStr(this.style))}return this.watermarkDom.setAttribute(attributeNameTag,this.watermarkTag),this.watermarkDom})))),__publicField(this,"_getWatermarkHeight",(()=>{if(!this.container)return 0;let e=0;const{scrollHeight:t=0,clientHeight:r=0}=this.options.container?this.container.parentNode:this.container;return t>r&&(e=Math.max(t,r)),e})),this.options=Object.assign({},defaultOptions,e),this.style={position:"absolute",left:0,top:0,right:0,bottom:0,pointerEvents:"none",overflow:"hidden",backgroundColor:"transparent",backgroundRepeat:"repeat"},this.style.zIndex=this.options.zIndex,this.watermarkTag=getRandomId("watermark"),this.mutationObserver=null,this._render()}update(e={}){this.options=__spreadValues(__spreadValues({},this.options),e),this.style.zIndex=this.options.zIndex,this._render()}show(){this.watermarkDom&&(this.style.display="block",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}hide(){this.watermarkDom&&(this.style.display="none",this.watermarkDom.setAttribute("style",getStyleStr(this.style)))}destroy(){this.shadowRoot=void 0,this.watermarkContent&&(this.watermarkContent.remove(),this.watermarkContent=void 0),this.watermarkDom&&(this.watermarkDom.remove(),this.watermarkDom=void 0),this._destroyMutationObserver()}_render(){return __async(this,null,(function*(){this._destroyMutationObserver(),this.container=getContainer(this.options.container,this.watermarkTag,this.options.containerStyle,this.options.pack),this.watermarkContent||(this.watermarkContent=getContent(this.watermarkTag),this.container.append(this.watermarkContent));const e=this._getWatermarkHeight();if(this.watermarkDom=yield this._getWatermarkDom(e),this.watermarkContent){const e=this.watermarkContent.childNodes||[];for(let t=0;t<e.length;t++)this.watermarkContent.removeChild(e[t])}"function"==typeof this.watermarkContent.attachShadow?this.shadowRoot||(this.shadowRoot=this.watermarkContent.attachShadow({mode:"open"})):this.shadowRoot=this.watermarkContent,this.shadowRoot.append(this.watermarkDom),MutationObserver&&this.options.monitor&&(this.mutationObserver=new MutationObserver((e=>{e.forEach((e=>{if(this._isAgainRender(e))return this.destroy(),void this._render()}))})),this.mutationObserver.observe(this.container,observeOptions),this.shadowRoot&&this.mutationObserver.observe(this.shadowRoot,observeOptions))}))}},FileSaver_min=createCommonjsModule((function(e,t){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,r){var n=new XMLHttpRequest;n.open("GET",e),n.responseType="blob",n.onload=function(){s(n.response,t,r)},n.onerror=function(){console.error("could not download file")},n.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(r){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof commonjsGlobal&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,t,a){var s=o.URL||o.webkitURL,c=document.createElement("a");t=t||e.name||"download",c.download=t,c.rel="noopener","string"==typeof e?(c.href=e,c.origin===location.origin?i(c):n(c.href)?r(e,t,a):i(c,c.target="_blank")):(c.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(c.href)}),4e4),setTimeout((function(){i(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,o,a){if(o=o||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,a),o);else if(n(e))r(e,o,a);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var s="application/octet-stream"===e.type,c=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||s&&c||a)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},l.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s}()})),getComOptions=function(e){var t=_$1.cloneDeep(e),r=_$1.omit(t,["comData","source"]);return __assign$1({},r)},generateComponentList=function(e){if(0===e.length)return[];var t=function(e){for(var r,n=0;n<e.length;n++)e[n].tmpData&&(e[n]=Object.assign({},getComOptions(e[n]))),e[n]&&e[n].children&&(null===(r=e[n])||void 0===r?void 0:r.children.length)?t(e[n].children):e[n]&&e[n].dynamicChildren&&Array.from(e[n].dynamicChildren).forEach((function(e,r){t(e[1])}))};return t(e),e},generateCaseDataJson=function(e){var t=_$1.cloneDeep(e)?_$1.cloneDeep(e):{};"string"==typeof e&&(t=JSON.parse(e));var r=[];if(t instanceof Array)t.forEach((function(e,t){var n=JSON.parse(e.caseDetailData)?JSON.parse(e.caseDetailData):{},i=e.caseDetailPath,o=e.caseDetailName,a=n.theme,s=void 0===a?null:a,c=n.globalVars,u=void 0===c?null:c,l=n.shareVariableTree,d=void 0===l?null:l,h=n.plant,f=void 0===h?null:h,p=n.list,m=void 0===p?[]:p,g=n.path,v=void 0===g?"":g;n.name;var y=n.resource,_=void 0===y?{jspaths:[],csspaths:[],otherpaths:[]}:y,b=n.watermark,w=void 0===b?null:b,D=n.tw,S=void 0===D?null:D,x=n.globalSource,T=void 0===x?[]:x,k=n.globalEvents,P=void 0===k?[]:k,E=n.globalConstant,A=void 0===E?[]:E;r.push({path:v||i,theme:s,name:o,resource:_,tw:S,watermark:w,globalSource:T,globalVars:u,globalEvents:P,globalConstant:A,shareVariableTree:d,plant:f,list:generateComponentList(m)})}));else{var n=t.theme,i=void 0===n?null:n,o=t.globalVars,a=void 0===o?null:o,s=t.shareVariableTree,c=void 0===s?null:s,u=t.plant,l=void 0===u?null:u,d=t.list,h=void 0===d?[]:d,f=t.resource,p=void 0===f?{jspaths:[],csspaths:[],otherpaths:[]}:f,m=t.watermark,g=void 0===m?null:m,v=t.tw,y=void 0===v?null:v,_=t.globalSource,b=void 0===_?[]:_,w=t.globalEvents,D=void 0===w?[]:w,S=t.globalConstant,x=void 0===S?[]:S;r.push({resource:p,tw:y,watermark:g,globalSource:b,theme:i,globalVars:a,globalEvents:D,shareVariableTree:c,globalConstant:x,plant:l,list:generateComponentList(h)})}return r},generatePageData=function(e){var t={},r=t.theme,n=void 0===r?null:r,i=t.globalVars,o=void 0===i?null:i,a=t.shareVariableTree,s=void 0===a?null:a,c=t.plant,u=void 0===c?null:c,l=t.list,d=void 0===l?[]:l,h=t.undos,f=void 0===h?[]:h,p=t.undoRedoPointer,m=void 0===p?-1:p,g=t.globalEvents,v=void 0===g?[]:g;return e&&(n=e.theme,u=e.plant),{theme:n,globalVars:o,globalEvents:v,shareVariableTree:s,plant:u,undos:f,undoRedoPointer:m,list:generateComponentList(d)}},exportJson=function(e){var t=e.caseName,r=void 0===t?"case-name":t,n=e.caseImg,i=void 0===n?"":n,o=e.caseRemark,a=void 0===o?"":o,s=e.details,c=e.caseClientType,u=void 0===c?"":c,l=e.id,d={caseClientType:u,caseName:r,caseImg:i,caseRemark:a,caseId:void 0===l?"":l,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(s)},h=new Blob([JSON.stringify(d)],{type:"json"});FileSaver_min.saveAs(h,r+".json")},generateJson=function(e){var t=e.caseName,r=void 0===t?"":t,n=e.caseData;return e.plangInfoForPsd,{caseName:r,createTime:moment().format("YYYY-MM-DD , h:mm:ss"),caseData:generateCaseDataJson(n)}};function elementError(e,t){throw new Error("".concat(e,":Expected HTMLElement, got ").concat(t))}var SizeAdaption=function(){function e(e){this.option=e,this.option.isResize&&window.addEventListener("resize",this.resize.bind(this))}return Object.defineProperty(e,"defaultOption",{get:function(){return e._defaultOption},set:function(t){e._defaultOption=t},enumerable:!1,configurable:!0}),e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.resize.bind(this))},e.prototype.resize=function(){var e=this.option,t=e.isEqualScale,r=e.wrapSelector,n=e.viewSelector,i=e.designWidth,o=e.designHeight,a=e.horizontal,s=e.vertical,c=document.querySelector(r);c||elementError("wrap",c);var u=c.clientWidth,l=c.clientHeight,d=document.querySelector(n);d||elementError("view",d),d.style.position="absolute",d.style.width=i+"px",d.style.height=o+"px";var h,f,p,m,g=Math.min(u/i,l/o);if(t){switch(d.style.transform="scale(".concat(g,")"),a){case"center":h=(u-i)/2+"px";break;case"left":h=(g-1)/2*i+"px";break;case"right":p=(g-1)/2*i+"px"}switch(s){case"center":f=(l-o)/2+"px";break;case"top":f=(g-1)/2*o+"px";break;case"bottom":m=(g-1)/2*o+"px"}}else d.style.transform="scale('".concat(u/i,", ").concat(l/o,"')"),h=(u-i)/2+"px",f=(l-o)/2+"px";f?d.style.top=f:m&&(d.style.bottom=m),h?d.style.left=h:p&&(d.style.right=p)},e._defaultOption={isEqualScale:!0,designWidth:1920,designHeight:1080,wrapSelector:"body",viewSelector:"#app",horizontal:"center",vertical:"center",isResize:!0},e}(),Scale=function(){function e(e){this.wrap=null,this.target=null,this.type=0,this.minRatio=1,this.outSize={w:0,h:0},this.inSize={w:0,h:0};var t=e.wrap,r=e.target,n=e.type,i=e.size,o=e.callback;this.size=i,this.type=n,this.initOptions(t,r,i),this.initSize(i),this.layout(),this.scale(o),window.addEventListener("resize",this.reset.bind(this,o))}return e.prototype.reset=function(e){this.initSize(this.size),this.layout(),e?this.scale(e):this.scale()},e.getInstance=function(t){return e.instance||(e.instance=new e(t)),e.instance},e.prototype.removeResize=function(){window.removeEventListener("resize",this.reset.bind(this,void 0))},e.prototype.getDom=function(e){if(_$1.isElement(e))return e;var t=document.querySelector(e);return _$1.isElement(t)?t:null},e.prototype.initOptions=function(e,t,r){this.wrap=this.getDom(e),this.target=this.getDom(t),this.target.style.width=r.w+"px",this.target.style.height=r.h+"px",this.verificationDom()},e.prototype.initSize=function(e){this.outSize.w=this.wrap.clientWidth,this.outSize.h=this.wrap.clientHeight,this.inSize=e},e.prototype.verificationDom=function(){null!=this.wrap&&null!=this.target&&this.isChildOf(this.wrap,this.target)||console.warn("Please pass in the DOM element correctly!")},e.prototype.layout=function(){if(0==this.type||3==this.type){var e=(this.outSize.w-this.inSize.w)/2,t=(this.outSize.h-this.inSize.h)/2;this.target.style.top=t+"px",this.target.style.left=e+"px"}else this.wrap.style.display="flex",this.wrap.style["align-items"]="center",this.wrap.style["justify-content"]="center",this.target.style.position="static",1==this.type?(this.wrap.style["overflow-y"]="auto",this.wrap.style["overflow-x"]="hidden"):2==this.type&&(this.wrap.style["overflow-y"]="hidden",this.wrap.style["overflow-x"]="auto")},e.prototype.isChildOf=function(e,t){var r;if(e&&t)for(r=e.parentNode;r;){if(t===r)return!0;r=r.parentNode}return!1},e.prototype.scale=function(e){var t=1,r=1;switch(this.type){case 0:t=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h),r=Math.min(this.outSize.w/this.inSize.w,this.outSize.h/this.inSize.h);break;case 1:r=t=this.outSize.w/this.inSize.w;break;case 2:t=r=this.outSize.h/this.inSize.h;break;case 3:t=this.outSize.w/this.inSize.w,r=this.outSize.h/this.inSize.h}e&&e([t,r]),this.target.style.transform="scale(".concat(t,",").concat(r,")")},e.prototype.resize=function(){},e}(),domToImage=createCommonjsModule((function(e){!function(t){var r=function(){return{escape:function(e){return e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:e,mimeType:function(t){var r=e(t).toLowerCase();return(n="application/font-woff",i="image/jpeg",{woff:n,woff2:n,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[r]||"";var n,i},dataAsUrl:function(e,t){return"data:"+t+";base64,"+e},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):function(e){return new Promise((function(t){for(var r=window.atob(e.toDataURL().split(",")[1]),n=r.length,i=new Uint8Array(n),o=0;o<n;o++)i[o]=r.charCodeAt(o);t(new Blob([i],{type:"image/png"}))}))}(e)},resolveUrl:function(e,t){var r=document.implementation.createHTMLDocument(),n=r.createElement("base");r.head.appendChild(n);var i=r.createElement("a");return r.body.appendChild(i),n.href=t,i.href=e,i.href},getAndEncode:function(e){var t=3e4;s.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime());return new Promise((function(r){var n,i=new XMLHttpRequest;if(i.onreadystatechange=a,i.ontimeout=c,i.responseType="blob",i.timeout=t,i.open("GET",e,!0),i.send(),s.impl.options.imagePlaceholder){var o=s.impl.options.imagePlaceholder.split(/,/);o&&o[1]&&(n=o[1])}function a(){if(4===i.readyState)if(200===i.status){var t=new FileReader;t.onloadend=function(){var e=t.result.split(/,/)[1];r(e)},t.readAsDataURL(i.response)}else n?r(n):u("cannot fetch resource: "+e+", status: "+i.status)}function c(){n?r(n):u("timeout of "+t+"ms occured while fetching resource: "+e)}function u(e){console.error(e),r("")}}))},uid:function(){var e=0;return function(){return"u"+t()+e++;function t(){return("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)}}}(),delay:function(e){return function(t){return new Promise((function(r){setTimeout((function(){r(t)}),e)}))}},asArray:function(e){for(var t=[],r=e.length,n=0;n<r;n++)t.push(e[n]);return t},escapeXhtml:function(e){return e.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return new Promise((function(t,r){var n=new Image;n.onload=function(){t(n)},n.onerror=r,n.src=e}))},width:function(e){var r=t(e,"border-left-width"),n=t(e,"border-right-width");return e.scrollWidth+r+n},height:function(e){var r=t(e,"border-top-width"),n=t(e,"border-bottom-width");return e.scrollHeight+r+n}};function e(e){var t=/\.([^\.\/]*?)$/g.exec(e);return t?t[1]:""}function t(e,t){var r=window.getComputedStyle(e).getPropertyValue(t);return parseFloat(r.replace("px",""))}}(),n=function(){var e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,r,o){return a()?Promise.resolve(e):Promise.resolve(e).then(n).then((function(t){var n=Promise.resolve(e);return t.forEach((function(e){n=n.then((function(t){return i(t,e,r,o)}))})),n}));function a(){return!t(e)}},shouldProcess:t,impl:{readUrls:n,inline:i}};function t(t){return-1!==t.search(e)}function n(t){for(var n,i=[];null!==(n=e.exec(t));)i.push(n[1]);return i.filter((function(e){return!r.isDataUrl(e)}))}function i(e,t,n,i){return Promise.resolve(t).then((function(e){return n?r.resolveUrl(e,n):e})).then(i||r.getAndEncode).then((function(e){return r.dataAsUrl(e,r.mimeType(t))})).then((function(n){return e.replace(function(e){return new RegExp("(url\\(['\"]?)("+r.escape(e)+")(['\"]?\\))","g")}(t),"$1"+n+"$3")}))}}(),i=function(){return{resolveAll:function(){return e().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(document.styleSheets)).then((function(e){var t=[];return e.forEach((function(e){try{r.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(t){console.log("Error while reading CSS rules from "+e.href,t.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return n.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return n.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function t(i){return i instanceof Element?o(i).then((function(){return i instanceof HTMLImageElement?e(i).inline():Promise.all(r.asArray(i.childNodes).map((function(e){return t(e)})))})):Promise.resolve(i);function o(e){var t=e.style.getPropertyValue("background");return t?n.inlineAll(t).then((function(t){e.style.setProperty("background",t,e.style.getPropertyPriority("background"))})).then((function(){return e})):Promise.resolve(e)}},impl:{newImage:e}};function e(e){return{inline:function(t){return r.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||r.getAndEncode).then((function(t){return r.dataAsUrl(t,r.mimeType(e.src))})).then((function(t){return new Promise((function(r,n){e.onload=r,e.onerror=n,e.src=t}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:c,toPng:function(e,t){return u(e,t||{}).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return u(e,t=t||{}).then((function(e){return e.toDataURL("image/jpeg",t.quality||1)}))},toBlob:function(e,t){return u(e,t||{}).then(r.canvasToBlob)},toPixelData:function(e,t){return u(e,t||{}).then((function(t){return t.getContext("2d").getImageData(0,0,r.width(e),r.height(e)).data}))},impl:{fontFaces:i,images:o,util:r,inliner:n,options:{}}};function c(e,t){return function(e){void 0===e.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=e.imagePlaceholder;void 0===e.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=e.cacheBust}(t=t||{}),Promise.resolve(e).then((function(e){return l(e,t.filter,!0)})).then(d).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor);t.width&&(e.style.width=t.width+"px");t.height&&(e.style.height=t.height+"px");t.style&&Object.keys(t.style).forEach((function(r){e.style[r]=t.style[r]}));return e})).then((function(n){return function(e,t,n){return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(r.escapeXhtml).then((function(e){return'<foreignObject x="0" y="0" width="100%" height="100%">'+e+"</foreignObject>"})).then((function(e){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+t+'" height="'+n+'">'+e+"</svg>"})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))}(n,t.width||r.width(e),t.height||r.height(e))}))}function u(e,t){return c(e,t).then(r.makeImage).then(r.delay(100)).then((function(n){var i=function(e){var n=document.createElement("canvas");if(n.width=t.width||r.width(e),n.height=t.height||r.height(e),t.bgcolor){var i=n.getContext("2d");i.fillStyle=t.bgcolor,i.fillRect(0,0,n.width,n.height)}return n}(e);return i.getContext("2d").drawImage(n,0,0),i}))}function l(e,t,n){return n||!t||t(e)?Promise.resolve(e).then((function(e){return e instanceof HTMLCanvasElement?r.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(n){return function(e,t,n){var i=e.childNodes;return 0===i.length?Promise.resolve(t):o(t,r.asArray(i),n).then((function(){return t}));function o(e,t,r){var n=Promise.resolve();return t.forEach((function(t){n=n.then((function(){return l(t,r)})).then((function(t){t&&e.appendChild(t)}))})),n}}(e,n,t)})).then((function(t){return function(e,t){var n=t;return n instanceof Element?Promise.resolve().then(i).then(o).then(a).then(s).then(c).then((function(){return n})):n;function i(){if(n instanceof HTMLVideoElement){var t=window.getComputedStyle(e),r=document.createElement("canvas");r.width=parseInt(t.width,10),r.height=parseInt(t.height,10);var i=Math.max(e.videoWidth/r.width,e.videoHeight/r.height),o=e.videoWidth/i,a=e.videoHeight/i,s=r.width/2-o/2,c=r.height/2-a/2;r.getContext("2d").drawImage(e,s,c,o,a);var u=n=document.createElement("img");try{u.src=r.toDataURL()}catch(e){u.src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}}}function o(){function t(e,t){function n(e,t){r.asArray(e).forEach((function(r){t.setProperty(r,e.getPropertyValue(r),e.getPropertyPriority(r))}))}e.cssText?t.cssText=e.cssText:n(e,t)}t(window.getComputedStyle(e),n.style)}function a(){function t(t){var i=window.getComputedStyle(e,t),o=i.getPropertyValue("content");if(""!==o&&"none"!==o){var a=r.uid();n.className=n.className+" "+a;var s=document.createElement("style");s.appendChild(c(a,t,i)),n.appendChild(s)}function c(e,t,n){var i="."+e+":"+t,o=n.cssText?a(n):s(n);return document.createTextNode(i+"{"+o+"}");function a(e){var t=e.getPropertyValue("content");return e.cssText+" content: "+t+";"}function s(e){return r.asArray(e).map(t).join("; ")+";";function t(t){return t+": "+e.getPropertyValue(t)+(e.getPropertyPriority(t)?" !important":"")}}}}[":before",":after"].forEach((function(e){t(e)}))}function s(){e instanceof HTMLTextAreaElement&&(n.innerHTML=e.value),e instanceof HTMLInputElement&&n.setAttribute("value",e.value)}function c(){n instanceof SVGElement&&(n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n instanceof SVGRectElement&&["width","height"].forEach((function(e){var t=n.getAttribute(e);t&&n.style.setProperty(e,t)})))}}(e,t)})):Promise.resolve()}function d(e){return o.inlineAll(e).then((function(){return e}))}e.exports=s}()})),isURL=function(e){if(!e)return!1;return 1==new RegExp(/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/).test(e)},ArrayBufferToBase64=function(e){for(var t="",r=new Uint8Array(e),n=r.byteLength,i=0;i<n;i++)t+=String.fromCharCode(r[i]);return"data:image/jpeg;base64,".concat(window.btoa(t))},dataURLtoFile=function(e,t){void 0===t&&(t="screenshot.jpeg");try{for(var r=e.split(","),n=r[0].match(/:(.*?);/)[1],i=atob(r[1]),o=i.length,a=new Uint8Array(o);o--;)a[o]=i.charCodeAt(o);return new File([a],t,{type:n})}catch(e){console.error("dataURLtoFile:数据转换错误 : "+e)}},transformData=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r;return __generator(this,(function(n){switch(n.label){case 0:return n.trys.push([0,11,,12]),"File"!=t||"string"!=typeof e?[3,2]:[4,dataURLtoFile(e)];case 1:case 3:case 5:case 7:return[2,n.sent()];case 2:return"File"!=t||"[object ArrayBuffer]"!=e.toString()?[3,4]:[4,new File([e],"screenshot.jpeg")];case 4:return"Base64"!=t||"string"!=typeof e?[3,6]:[4,e];case 6:return"Base64"!=t||"[object ArrayBuffer]"!=e.toString()?[3,8]:[4,ArrayBufferToBase64(e)];case 8:return[4,new Error("transformData: 转换发生错误")];case 9:throw n.sent();case 10:return[3,12];case 11:return r=n.sent(),console.log(r),[3,12];case 12:return[2]}}))}))},fetch=function(t,r,n,i){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,e({url:t,method:"GET",responseType:"arraybuffer",params:{url:r,dom:n,quality:i}})];case 1:return[2,o.sent()];case 2:return o.sent(),console.warn("请求截图服务器发生错误,请检查地址及参数是否正确!",{url:t,path:r,dom:n,quality:i}),[2,null];case 3:return[2]}}))}))},domToImg=function(e,t){return __awaiter(void 0,void 0,void 0,(function(){var r,n;return __generator(this,(function(i){switch(i.label){case 0:if(i.trys.push([0,2,,3]),!(r=document.querySelector(e)))throw new Error("domToImg:"+e+" dom未被找到!");return[4,domToImage.toJpeg(r,{style:{transform:"scale(1)",position:"static"},quality:t})];case 1:return[2,i.sent()];case 2:return n=i.sent(),console.warn(n),[3,3];case 3:return[2]}}))}))},screenshot=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,r,n,i,o,a,s,c;return __generator(this,(function(u){switch(u.label){case 0:return u.trys.push([0,11,,12]),t=e.dom,r=e.servePath,n=e.targetPath,i=e.quality,o=e.type,a=void 0,isURL(r)&&isURL(n)?[4,fetch(r,n,t,i||.5)]:[3,5];case 1:return(s=u.sent())&&200==s.status&&s.data?(a=s.data,[3,4]):[3,2];case 2:return console.warn("截取错误,请检查网络或服务地址配置是否正确,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 3:a=u.sent(),u.label=4;case 4:return[3,7];case 5:return console.warn("地址错误,请检查传入的地址是否争取,已转换为dom-to-img."),[4,domToImg(t,i||.5)];case 6:a=u.sent(),u.label=7;case 7:return a?[4,transformData(a,o)]:[3,9];case 8:return[2,u.sent()];case 9:return[2,null];case 10:return[3,12];case 11:return c=u.sent(),console.error("截图发生错误:"+c),[2,null];case 12:return[2]}}))}))},toHex=function(e){return"".concat(e>15?"":0).concat(e.toString(16))},toHexString=function(e){var t=e.r,r=e.g,n=e.b,i=e.a,o=void 0===i?1:i;return"#".concat(toHex(t)).concat(toHex(r)).concat(toHex(n)).concat(1===o?"":toHex(Math.floor(255*o)))},toRgbString=function(e){var t=e.r,r=e.g,n=e.b;return"rgb(".concat(t,",").concat(r,",").concat(n,")")},toRgbaString=function(e,t){void 0===t&&(t=1e4);var r=e.r,n=e.g,i=e.b,o=e.a,a=void 0===o?1:o;return"rgba(".concat(r,",").concat(n,",").concat(i,",").concat(Math.floor(a*t)/t,")")},parseHexColor=function(e){var t=e.slice(1),r=1;3===t.length&&(t="".concat(t[0]).concat(t[0]).concat(t[1]).concat(t[1]).concat(t[2]).concat(t[2])),8===t.length&&(r=parseInt(t.slice(6),16)/255,t=t.slice(0,6));var n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:255&n,a:r}},parseRgbaColor=function(e){var t=e.match(/(\d(\.\d+)?)+/g)||[],r=t.map((function(e){return parseInt(e,10)}));return{r:r[0],g:r[1],b:r[2],a:parseFloat(t[3])}},parseColorString=function(e){if(e.startsWith("#"))return parseHexColor(e);if(e.startsWith("rgb"))return parseRgbaColor(e);if("transparent"===e)return parseHexColor("#00000000");throw new Error("color string error: ".concat(e))},getColorInfo=function(e){var t=parseColorString(e);return{hex:toHexString(t),rgba:toRgbaString(t),rgb:toRgbString(t),rgbaObj:t}},hexToRgba=function(e){var t=parseColorString(e);return toRgbaString(t)},rgbaToHex=function(e){var t=parseColorString(e);return toHexString(t)},errCode=new Map([["E1001","系统未知错误"],["E1002","vue逻辑错误"],["E1003","JavaScript错误"],["E1004","静态资源加载错误"],["E1005","请求错误"],["E1006","Promise错误"]]),watchError=function(e,t){e.config.errorHandler=function(e){console.error("监测到E1002错误"),console.error(e.filename),errorHandler("E1002",e.name+":"+e.message,t)},window.addEventListener("error",(function(e){e.message?(console.error("监测到E1003错误"),errorHandler("E1003",e.message,e.filename,t)):(console.error("监测到E1004错误"),errorHandler("E1004",e.target.currentSrc,e.filename,t))}),!0)},errorHandler=function(e,t,r,n){void 0===n&&(n="null"),saveLog({code:e,type:errCode.get("".concat(e)),msg:t,router:r.currentRoute.value.fullPath,file:n,createTime:(new Date).toLocaleString()})},saveLog=function(e){var t=localStorage.getItem("ERROR");if(t){var r=JSON.parse(t);sortArray(r),r.length>50?(r[0]=e,sortArray(r)):r.push(e),localStorage.setItem("ERROR",JSON.stringify(r))}else localStorage.setItem("ERROR",JSON.stringify([e]))},sortArray=function(e){e.sort((function(e,t){return e.createTime>t.createTime?1:-1}))},index$1=Object.freeze({__proto__:null,RecursiveList:RecursiveList,Scale:Scale,SizeAdaption:SizeAdaption,UpdataForContainer:UpdataForContainer,Watermark:Watermark,arraySwap:arraySwap,arraySwapDeep:arraySwapDeep,arraySwapForId:arraySwapForId,breakUp:breakUp,checkBaseData:checkBaseData,checkVar:checkVar,comToggle:comToggle,decrypAES:decrypAES,decrypt:decrypt,encrypt:encrypt$1,errorHandler:errorHandler,executeFilter:executeFilter,exportJson:exportJson,findItem:findItem,findItemDeep:findItemDeep$1,findItemIndexDeep:findItemIndexDeep,findParentDeep:findParentDeep,genCopyName:genCopyName,genID:genID,generateCaseDataJson:generateCaseDataJson,generateComponentList:generateComponentList,generateJson:generateJson,generatePageData:generatePageData,getAncestorsNodes:getAncestorsNodes,getColorInfo:getColorInfo,getDataForEvaluator:getDataForEvaluator,getInteractive:getInteractive,getInteractive2:getInteractive2,getLength:getLength,getPosition:getPosition,getSessionData:getSessionData,getShareTree:getShareTree,getStandardData:getStandardData,getUrlParams:getUrlParams,globalSourceTemp:globalSourceTemp,hasVar:hasVar,hexToRgba:hexToRgba,isJSON:isJSON,isPeer:isPeer,loadFont:loadFont,loadFontResource:loadFontResource,loadFontTag:loadFontTag,loadScript:loadScript,loadTag:loadTag,parseColorString:parseColorString,parseHexColor:parseHexColor,parseRgbaColor:parseRgbaColor,recursion:recursion,removeTag:removeTag,resetID:resetID,resetPositionForGroup:resetPositionForGroup,resizeListPosition:resizeListPosition,resizePosition:resizePosition,resziePositionForGroup:resziePositionForGroup,rgbaToHex:rgbaToHex,safeConvertToNumber:safeConvertToNumber,safeEval:safeEval,screenshot:screenshot,selectdArea:selectdArea,setActions:setActions,setAttr:setAttr,setIndex:setIndex,setPorp:setPorp,setPositionForGroup:setPositionForGroup,setPositionForWorld:setPositionForWorld,setSessionData:setSessionData,toHex:toHex,toHexString:toHexString,toRgbString:toRgbString,toRgbaString:toRgbaString,transformPosition:transformPosition,upDataGroup:upDataGroup,upDataGroupChildren:upDataGroupChildren,updataAttribute:updataAttribute,updataAttributeForOption:updataAttributeForOption,updataSizeDeep:updataSizeDeep,validateAndFixObject:validateAndFixObject,watchError:watchError});function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}
45
45
  /*!
46
46
  * GSAP 3.12.5
47
47
  * https://gsap.com
@@ -60,5 +60,5 @@ function(e){var t=r,n=t.lib,i=n.WordArray,o=n.Hasher,a=t.algo,s=i.create([0,1,2,
60
60
  * Club GSAP members, the agreement issued with that membership.
61
61
  * @author: Jack Doyle, jack@greensock.com
62
62
  */
63
- var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return"undefined"!=typeof window},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},_setterCSSStyle=function(e,t,r){return e.style[t]=r},_setterCSSProp=function(e,t,r){return e.style.setProperty(t,r)},_setterTransform=function(e,t,r){return e._gsap[t]=r},_setterScale=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},_setterScaleWithRender=function(e,t,r,n,i){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},_setterTransformWithRender=function(e,t,r,n,i){var o=e._gsap;o[t]=r,o.renderTransform(i,o)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function e(t,r){var n=this,i=this.target,o=i.style,a=i._gsap;if(t in _transformProps&&o){if(this.tfm=this.tfm||{},"transform"===t)return _propertyAliases.transform.split(",").forEach((function(t){return e.call(n,t,r)}));if(~(t=_propertyAliases[t]||t).indexOf(",")?t.split(",").forEach((function(e){return n.tfm[e]=_get(i,e)})):this.tfm[t]=a.x?a[t]:_get(i,t),t===_transformOriginProp&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(_transformProp)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),t=_transformProp}(o||r)&&this.props.push(t,r,o[t])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function(){var e,t,r=this.props,n=this.target,i=n.style,o=n._gsap;for(e=0;e<r.length;e+=3)r[e+1]?n[r[e]]=r[e+2]:r[e+2]?i[r[e]]=r[e+2]:i.removeProperty("--"===r[e].substr(0,2)?r[e]:r[e].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)o[t]=this.tfm[t];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(e=_reverting())&&e.isStart||i[_transformProp]||(_removeIndependentTransforms(i),o.zOrigin&&i[_transformOriginProp]&&(i[_transformOriginProp]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},_getStyleSaver=function(e,t){var r={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap.core.getCache(e),t&&t.split(",").forEach((function(e){return r.save(e)})),r},_supports3D,_createElement=function(e,t){var r=_doc.createElementNS?_doc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):_doc.createElement(e);return r&&r.style?r:_doc.createElement(e)},_getComputedProperty=function e(t,r,n){var i=getComputedStyle(t);return i[r]||i.getPropertyValue(r.replace(_capsExp,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&e(t,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function(e,t,r){var n=(t||_tempDiv).style,i=5;if(e in n&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(_prefixes[i]+e in n););return i<0?null:(3===i?"ms":i>=0?_prefixes[i]:"")+e},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function e(t){var r,n=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(_docElement.appendChild(n),n.appendChild(this),this.style.display="block",t)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(r=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),_docElement.removeChild(n),this.style.cssText=a,r},_getAttributeFallbacks=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},_getBBox=function(e){var t;try{t=e.getBBox()}catch(r){t=_getBBoxHack.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===_getBBoxHack||(t=_getBBoxHack.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}},_isSVG=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!_getBBox(e))},_removeProperty=function(e,t){if(t){var r,n=e.style;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp),n.removeProperty?("ms"!==(r=t.substr(0,2))&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty("--"===r?t:t.replace(_capsExp,"-$1").toLowerCase())):n.removeAttribute(t)}},_addNonTweeningPT=function(e,t,r,n,i,o){var a=new PropTween(e._pt,t,r,0,1,o?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=a,a.b=n,a.e=i,e._props.push(r),a},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function e(t,r,n,i){var o,a,s,c,u=parseFloat(n)||0,l=(n+"").trim().substr((u+"").length)||"px",d=_tempDiv.style,h=_horizontalExp.test(r),f="svg"===t.tagName.toLowerCase(),p=(f?"client":"offset")+(h?"Width":"Height"),m=100,g="px"===i,v="%"===i;if(i===l||!u||_nonConvertibleUnits[i]||_nonConvertibleUnits[l])return u;if("px"!==l&&!g&&(u=e(t,r,n,"px")),c=t.getCTM&&_isSVG(t),(v||"%"===l)&&(_transformProps[r]||~r.indexOf("adius")))return o=c?t.getBBox()[h?"width":"height"]:t[p],_round(v?u/o*m:u/100*o);if(d[h?"width":"height"]=m+(g?l:i),a=~r.indexOf("adius")||"em"===i&&t.appendChild&&!f?t:t.parentNode,c&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==_doc&&a.appendChild||(a=_doc.body),(s=a._gsap)&&v&&s.width&&h&&s.time===_ticker.time&&!s.uncache)return _round(u/s.width*m);if(!v||"height"!==r&&"width"!==r)(v||"%"===l)&&!_nonStandardLayouts[_getComputedProperty(a,"display")]&&(d.position=_getComputedProperty(t,"position")),a===t&&(d.position="static"),a.appendChild(_tempDiv),o=_tempDiv[p],a.removeChild(_tempDiv),d.position="absolute";else{var y=t.style[r];t.style[r]=m+i,o=t[p],y?t.style[r]=y:_removeProperty(t,r)}return h&&v&&((s=_getCache(a)).time=_ticker.time,s.width=a[p]),_round(g?o*u/m:o&&u?m/o*u:0)},_get=function(e,t,r,n){var i;return _pluginInitted||_initCore(),t in _propertyAliases&&"transform"!==t&&~(t=_propertyAliases[t]).indexOf(",")&&(t=t.split(",")[0]),_transformProps[t]&&"transform"!==t?(i=_parseTransform(e,n),i="transformOrigin"!==t?i[t]:i.svg?i.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=_specialProps[t]&&_specialProps[t](e,t,r)||_getComputedProperty(e,t)||_getProperty(e,t)||("opacity"===t?1:0)),r&&!~(i+"").trim().indexOf(" ")?_convertToUnit(e,t,i,r)+r:i},_tweenComplexCSSString=function(e,t,r,n){if(!r||"none"===r){var i=_checkPropPrefix(t,e,1),o=i&&_getComputedProperty(e,i,1);o&&o!==r?(t=i,r=o):"borderColor"===t&&(r=_getComputedProperty(e,"borderTopColor"))}var a,s,c,u,l,d,h,f,p,m,g,v=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),y=0,_=0;if(v.b=r,v.e=n,r+="","auto"===(n+="")&&(d=e.style[t],e.style[t]=n,n=_getComputedProperty(e,t)||n,d?e.style[t]=d:_removeProperty(e,t)),_colorStringFilter(a=[r,n]),n=a[1],c=(r=a[0]).match(_numWithUnitExp)||[],(n.match(_numWithUnitExp)||[]).length){for(;s=_numWithUnitExp.exec(n);)h=s[0],p=n.substring(y,s.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),h!==(d=c[_++]||"")&&(u=parseFloat(d)||0,g=d.substr((u+"").length),"="===h.charAt(1)&&(h=_parseRelative(u,h)+g),f=parseFloat(h),m=h.substr((f+"").length),y=_numWithUnitExp.lastIndex-m.length,m||(m=m||_config.units[t]||g,y===n.length&&(n+=m,v.e+=m)),g!==m&&(u=_convertToUnit(e,t,d,m)||0),v._pt={_next:v._pt,p:p||1===_?p:",",s:u,c:f-u,m:l&&l<4||"zIndex"===t?Math.round:0});v.c=y<n.length?n.substring(y,n.length):""}else v.r="display"===t&&"none"===n?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(n)&&(v.e=0),this._pt=v,v},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==n&&"right"!==n||(e=r,r=n,n=e),t[0]=_keywordToPercent[r]||r,t[1]=_keywordToPercent[n]||n,t.join(" ")},_renderClearProps=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r,n,i,o=t.t,a=o.style,s=t.u,c=o._gsap;if("all"===s||!0===s)a.cssText="",n=1;else for(i=(s=s.split(",")).length;--i>-1;)r=s[i],_transformProps[r]&&(n=1,r="transformOrigin"===r?_transformOriginProp:_transformProp),_removeProperty(o,r);n&&(_removeProperty(o,_transformProp),c&&(c.svg&&o.removeAttribute("transform"),_parseTransform(o,1),c.uncache=1,_removeIndependentTransforms(a)))}},_specialProps={clearProps:function(e,t,r,n,i){if("isFromStart"!==i.data){var o=e._pt=new PropTween(e._pt,t,r,0,0,_renderClearProps);return o.u=n,o.pr=-10,o.tween=i,e._props.push(r),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round)},_getMatrix=function(e,t){var r,n,i,o,a=e._gsap||_getCache(e),s=e.style,c=_getComputedTransformMatrixAsArray(e);return a.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(c=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?_identity2DMatrix:c:(c!==_identity2DMatrix||e.offsetParent||e===_docElement||a.svg||(i=s.display,s.display="block",(r=e.parentNode)&&e.offsetParent||(o=1,n=e.nextElementSibling,_docElement.appendChild(e)),c=_getComputedTransformMatrixAsArray(e),i?s.display=i:_removeProperty(e,"display"),o&&(n?r.insertBefore(e,n):r?r.appendChild(e):_docElement.removeChild(e))),t&&c.length>6?[c[0],c[1],c[4],c[5],c[12],c[13]]:c)},_applySVGOrigin=function(e,t,r,n,i,o){var a,s,c,u=e._gsap,l=i||_getMatrix(e,!0),d=u.xOrigin||0,h=u.yOrigin||0,f=u.xOffset||0,p=u.yOffset||0,m=l[0],g=l[1],v=l[2],y=l[3],_=l[4],b=l[5],w=t.split(" "),D=parseFloat(w[0])||0,S=parseFloat(w[1])||0;r?l!==_identity2DMatrix&&(s=m*y-g*v)&&(c=D*(-g/s)+S*(m/s)-(m*b-g*_)/s,D=D*(y/s)+S*(-v/s)+(v*b-y*_)/s,S=c):(D=(a=_getBBox(e)).x+(~w[0].indexOf("%")?D/100*a.width:D),S=a.y+(~(w[1]||w[0]).indexOf("%")?S/100*a.height:S)),n||!1!==n&&u.smooth?(_=D-d,b=S-h,u.xOffset=f+(_*m+b*v)-_,u.yOffset=p+(_*g+b*y)-b):u.xOffset=u.yOffset=0,u.xOrigin=D,u.yOrigin=S,u.smooth=!!n,u.origin=t,u.originIsAbsolute=!!r,e.style[_transformOriginProp]="0px 0px",o&&(_addNonTweeningPT(o,u,"xOrigin",d,D),_addNonTweeningPT(o,u,"yOrigin",h,S),_addNonTweeningPT(o,u,"xOffset",f,u.xOffset),_addNonTweeningPT(o,u,"yOffset",p,u.yOffset)),e.setAttribute("data-svg-origin",D+" "+S)},_parseTransform=function(e,t){var r=e._gsap||new GSCache(e);if("x"in r&&!t&&!r.uncache)return r;var n,i,o,a,s,c,u,l,d,h,f,p,m,g,v,y,_,b,w,D,S,x,T,k,P,E,A,C,O,R,M,I,N=e.style,B=r.scaleX<0,F="px",j="deg",V=getComputedStyle(e),$=_getComputedProperty(e,_transformOriginProp)||"0";return n=i=o=c=u=l=d=h=f=0,a=s=1,r.svg=!(!e.getCTM||!_isSVG(e)),V.translate&&("none"===V.translate&&"none"===V.scale&&"none"===V.rotate||(N[_transformProp]=("none"!==V.translate?"translate3d("+(V.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==V.rotate?"rotate("+V.rotate+") ":"")+("none"!==V.scale?"scale("+V.scale.split(" ").join(",")+") ":"")+("none"!==V[_transformProp]?V[_transformProp]:"")),N.scale=N.rotate=N.translate="none"),g=_getMatrix(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),$=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",k=""):k=!t&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,k||$,!!k||r.originIsAbsolute,!1!==r.smooth,g)),p=r.xOrigin||0,m=r.yOrigin||0,g!==_identity2DMatrix&&(b=g[0],w=g[1],D=g[2],S=g[3],n=x=g[4],i=T=g[5],6===g.length?(a=Math.sqrt(b*b+w*w),s=Math.sqrt(S*S+D*D),c=b||w?_atan2(w,b)*_RAD2DEG:0,(d=D||S?_atan2(D,S)*_RAD2DEG+c:0)&&(s*=Math.abs(Math.cos(d*_DEG2RAD))),r.svg&&(n-=p-(p*b+m*D),i-=m-(p*w+m*S))):(I=g[6],R=g[7],A=g[8],C=g[9],O=g[10],M=g[11],n=g[12],i=g[13],o=g[14],u=(v=_atan2(I,O))*_RAD2DEG,v&&(k=x*(y=Math.cos(-v))+A*(_=Math.sin(-v)),P=T*y+C*_,E=I*y+O*_,A=x*-_+A*y,C=T*-_+C*y,O=I*-_+O*y,M=R*-_+M*y,x=k,T=P,I=E),l=(v=_atan2(-D,O))*_RAD2DEG,v&&(y=Math.cos(-v),M=S*(_=Math.sin(-v))+M*y,b=k=b*y-A*_,w=P=w*y-C*_,D=E=D*y-O*_),c=(v=_atan2(w,b))*_RAD2DEG,v&&(k=b*(y=Math.cos(v))+w*(_=Math.sin(v)),P=x*y+T*_,w=w*y-b*_,T=T*y-x*_,b=k,x=P),u&&Math.abs(u)+Math.abs(c)>359.9&&(u=c=0,l=180-l),a=_round(Math.sqrt(b*b+w*w+D*D)),s=_round(Math.sqrt(T*T+I*I)),v=_atan2(x,T),d=Math.abs(v)>2e-4?v*_RAD2DEG:0,f=M?1/(M<0?-M:M):0),r.svg&&(k=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp)),k&&e.setAttribute("transform",k))),Math.abs(d)>90&&Math.abs(d)<270&&(B?(a*=-1,d+=c<=0?180:-180,c+=c<=0?180:-180):(s*=-1,d+=d<=0?180:-180)),t=t||r.uncache,r.x=n-((r.xPercent=n&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+F,r.y=i-((r.yPercent=i&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+F,r.z=o+F,r.scaleX=_round(a),r.scaleY=_round(s),r.rotation=_round(c)+j,r.rotationX=_round(u)+j,r.rotationY=_round(l)+j,r.skewX=d+j,r.skewY=h+j,r.transformPerspective=f+F,(r.zOrigin=parseFloat($.split(" ")[2])||!t&&r.zOrigin||0)&&(N[_transformOriginProp]=_firstTwoOnly($)),r.xOffset=r.yOffset=0,r.force3D=_config.force3D,r.renderTransform=r.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,r.uncache=0,r},_firstTwoOnly=function(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function(e,t,r){var n=getUnit(t);return _round(parseFloat(t)+parseFloat(_convertToUnit(e,"x",r+"px",n)))+n},_renderNon3DTransforms=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,s=r.z,c=r.rotation,u=r.rotationY,l=r.rotationX,d=r.skewX,h=r.skewY,f=r.scaleX,p=r.scaleY,m=r.transformPerspective,g=r.force3D,v=r.target,y=r.zOrigin,_="",b="auto"===g&&e&&1!==e||!0===g;if(y&&(l!==_zeroDeg||u!==_zeroDeg)){var w,D=parseFloat(u)*_DEG2RAD,S=Math.sin(D),x=Math.cos(D);D=parseFloat(l)*_DEG2RAD,w=Math.cos(D),o=_addPxTranslate(v,o,S*w*-y),a=_addPxTranslate(v,a,-Math.sin(D)*-y),s=_addPxTranslate(v,s,x*w*-y+y)}m!==_zeroPx&&(_+="perspective("+m+_endParenthesis),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(b||o!==_zeroPx||a!==_zeroPx||s!==_zeroPx)&&(_+=s!==_zeroPx||b?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+_endParenthesis),c!==_zeroDeg&&(_+="rotate("+c+_endParenthesis),u!==_zeroDeg&&(_+="rotateY("+u+_endParenthesis),l!==_zeroDeg&&(_+="rotateX("+l+_endParenthesis),d===_zeroDeg&&h===_zeroDeg||(_+="skew("+d+", "+h+_endParenthesis),1===f&&1===p||(_+="scale("+f+", "+p+_endParenthesis),v.style[_transformProp]=_||"translate(0, 0)"},_renderSVGTransforms=function(e,t){var r,n,i,o,a,s=t||this,c=s.xPercent,u=s.yPercent,l=s.x,d=s.y,h=s.rotation,f=s.skewX,p=s.skewY,m=s.scaleX,g=s.scaleY,v=s.target,y=s.xOrigin,_=s.yOrigin,b=s.xOffset,w=s.yOffset,D=s.forceCSS,S=parseFloat(l),x=parseFloat(d);h=parseFloat(h),f=parseFloat(f),(p=parseFloat(p))&&(f+=p=parseFloat(p),h+=p),h||f?(h*=_DEG2RAD,f*=_DEG2RAD,r=Math.cos(h)*m,n=Math.sin(h)*m,i=Math.sin(h-f)*-g,o=Math.cos(h-f)*g,f&&(p*=_DEG2RAD,a=Math.tan(f-p),i*=a=Math.sqrt(1+a*a),o*=a,p&&(a=Math.tan(p),r*=a=Math.sqrt(1+a*a),n*=a)),r=_round(r),n=_round(n),i=_round(i),o=_round(o)):(r=m,o=g,n=i=0),(S&&!~(l+"").indexOf("px")||x&&!~(d+"").indexOf("px"))&&(S=_convertToUnit(v,"x",l,"px"),x=_convertToUnit(v,"y",d,"px")),(y||_||b||w)&&(S=_round(S+y-(y*r+_*i)+b),x=_round(x+_-(y*n+_*o)+w)),(c||u)&&(a=v.getBBox(),S=_round(S+c/100*a.width),x=_round(x+u/100*a.height)),a="matrix("+r+","+n+","+i+","+o+","+S+","+x+")",v.setAttribute("transform",a),D&&(v.style[_transformProp]=a)},_addRotationalPropTween=function(e,t,r,n,i){var o,a,s=360,c=_isString(i),u=parseFloat(i)*(c&&~i.indexOf("rad")?_RAD2DEG:1)-n,l=n+u+"deg";return c&&("short"===(o=i.split("_")[1])&&(u%=s)!==u%180&&(u+=u<0?s:-360),"cw"===o&&u<0?u=(u+s*_bigNum)%s-~~(u/s)*s:"ccw"===o&&u>0&&(u=(u-s*_bigNum)%s-~~(u/s)*s)),e._pt=a=new PropTween(e._pt,t,r,n,u,_renderPropWithEnd),a.e=l,a.u="deg",e._props.push(r),a},_assign=function(e,t){for(var r in t)e[r]=t[r];return e},_addRawTransformPTs=function(e,t,r){var n,i,o,a,s,c,u,l=_assign({},r._gsap),d=r.style;for(i in l.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),d[_transformProp]=t,n=_parseTransform(r,1),_removeProperty(r,_transformProp),r.setAttribute("transform",o)):(o=getComputedStyle(r)[_transformProp],d[_transformProp]=t,n=_parseTransform(r,1),d[_transformProp]=o),_transformProps)(o=l[i])!==(a=n[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=getUnit(o)!==(u=getUnit(a))?_convertToUnit(r,i,o,u):parseFloat(o),c=parseFloat(a),e._pt=new PropTween(e._pt,n,i,s,c-s,_renderCSSProp),e._pt.u=u||0,e._props.push(i));_assign(n,l)};_forEachName("padding,margin,Width,Radius",(function(e,t){var r="Top",n="Right",i="Bottom",o="Left",a=(t<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return t<2?e+r:"border"+r+e}));_specialProps[t>1?"border"+e:e]=function(e,t,r,n,i){var o,s;if(arguments.length<4)return o=a.map((function(t){return _get(e,t,r)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(n+"").split(" "),s={},a.forEach((function(e,t){return s[e]=o[t]=o[t]||o[(t-1)/2|0]})),e.init(t,s,i)}}));var CSSPlugin={name:"css",register:_initCore,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,i){var o,a,s,c,u,l,d,h,f,p,m,g,v,y,_,b,w=this._props,D=e.style,S=r.vars.startAt;for(d in _pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(e),b=this.styles.props,this.tween=r,t)if("autoRound"!==d&&(a=t[d],!_plugins[d]||!_checkPlugin(d,t,r,n,e,i)))if(u=typeof a,l=_specialProps[d],"function"===u&&(u=typeof(a=a.call(r,n,e,i))),"string"===u&&~a.indexOf("random(")&&(a=_replaceRandom(a)),l)l(this,e,d,a,r)&&(_=1);else if("--"===d.substr(0,2))o=(getComputedStyle(e).getPropertyValue(d)+"").trim(),a+="",_colorExp.lastIndex=0,_colorExp.test(o)||(h=getUnit(o),f=getUnit(a)),f?h!==f&&(o=_convertToUnit(e,d,o,f)+f):h&&(a+=h),this.add(D,"setProperty",o,a,n,i,0,0,d),w.push(d),b.push(d,0,D[d]);else if("undefined"!==u){if(S&&d in S?(o="function"==typeof S[d]?S[d].call(r,n,e,i):S[d],_isString(o)&&~o.indexOf("random(")&&(o=_replaceRandom(o)),getUnit(o+"")||"auto"===o||(o+=_config.units[d]||getUnit(_get(e,d))||""),"="===(o+"").charAt(1)&&(o=_get(e,d))):o=_get(e,d),c=parseFloat(o),(p="string"===u&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),s=parseFloat(a),d in _propertyAliases&&("autoAlpha"===d&&(1===c&&"hidden"===_get(e,"visibility")&&s&&(c=0),b.push("visibility",0,D.visibility),_addNonTweeningPT(this,D,"visibility",c?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==d&&"transform"!==d&&~(d=_propertyAliases[d]).indexOf(",")&&(d=d.split(",")[0])),m=d in _transformProps)if(this.styles.save(d),g||((v=e._gsap).renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),y=!1!==t.smoothOrigin&&v.smooth,(g=this._pt=new PropTween(this._pt,D,_transformProp,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===d)this._pt=new PropTween(this._pt,v,"scaleY",v.scaleY,(p?_parseRelative(v.scaleY,p+s):s)-v.scaleY||0,_renderCSSProp),this._pt.u=0,w.push("scaleY",d),d+="X";else{if("transformOrigin"===d){b.push(_transformOriginProp,0,D[_transformOriginProp]),a=_convertKeywordsToPercentages(a),v.svg?_applySVGOrigin(e,a,0,y,0,this):((f=parseFloat(a.split(" ")[2])||0)!==v.zOrigin&&_addNonTweeningPT(this,v,"zOrigin",v.zOrigin,f),_addNonTweeningPT(this,D,d,_firstTwoOnly(o),_firstTwoOnly(a)));continue}if("svgOrigin"===d){_applySVGOrigin(e,a,1,y,0,this);continue}if(d in _rotationalProperties){_addRotationalPropTween(this,v,d,c,p?_parseRelative(c,p+a):a);continue}if("smoothOrigin"===d){_addNonTweeningPT(this,v,"smooth",v.smooth,a);continue}if("force3D"===d){v[d]=a;continue}if("transform"===d){_addRawTransformPTs(this,a,e);continue}}else d in D||(d=_checkPropPrefix(d)||d);if(m||(s||0===s)&&(c||0===c)&&!_complexExp.test(a)&&d in D)s||(s=0),(h=(o+"").substr((c+"").length))!==(f=getUnit(a)||(d in _config.units?_config.units[d]:h))&&(c=_convertToUnit(e,d,o,f)),this._pt=new PropTween(this._pt,m?v:D,d,c,(p?_parseRelative(c,p+s):s)-c,m||"px"!==f&&"zIndex"!==d||!1===t.autoRound?_renderCSSProp:_renderRoundedCSSProp),this._pt.u=f||0,h!==f&&"%"!==f&&(this._pt.b=o,this._pt.r=_renderCSSPropWithBeginning);else if(d in D)_tweenComplexCSSString.call(this,e,d,o,p?p+a:a);else if(d in e)this.add(e,d,o||e[d],p?p+a:a,n,i);else if("parseTransform"!==d){_missingPlugin(d,a);continue}m||(d in D?b.push(d,0,D[d]):b.push(d,1,o||e[d])),w.push(d)}_&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,r){var n=_propertyAliases[t];return n&&n.indexOf(",")<0&&(t=n),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?r&&_recentSetterPlugin===r?"scale"===t?_setterScale:_setterTransform:(_recentSetterPlugin=r||{})&&("scale"===t?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf("-")?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}},positionAndScale,rotation,all;gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,positionAndScale="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",rotation="rotation,rotationX,rotationY,skewX,skewY",all=_forEachName(positionAndScale+","+rotation+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){_transformProps[e]=1})),_forEachName(rotation,(function(e){_config.units[e]="deg",_rotationalProperties[e]=1})),_propertyAliases[all[13]]=positionAndScale+","+rotation,_forEachName("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");_propertyAliases[t[1]]=all[t[0]]})),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){_config.units[e]="px"})),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;var GoAnimation=function(){function e(){this.startPoisiton={x:0,y:0},this.endPoisiton={x:1920,y:0},this.curtain={width:1920,height:1080},this.totalTime=5,this.timeLine=gsapWithCSS.timeline()}return e.getInstance=function(){return this.instance||(this.instance=new e),this.instance},e.prototype.init=function(e,t){var r;null===(r=this.timeLine)||void 0===r||r.clear();var n=t.curtain,i=t.totalTime,o=t.admissionMode;i&&(this.totalTime=i),this.setEndPoisiton(n);var a=this.filterData(e,o);this.goAnimationParams=t;for(var s=0;s<a.length;s++){var c=a[s];if(c instanceof Array)for(var u=0;u<c.length;u++){var l=this.totalTime/c.length,d=c[u],h=this._creatTl("#wrap"+d.cid);this._add(h,u*l)}else{l=this.totalTime/a.length,h=this._creatTl("#wrap"+c.cid);this._add(h,s*l)}}return this.timeLine},e.prototype.filterData=function(e,t){var r;if("left"==t)r=_$1.orderBy(e,["baseData.left"],["asc"]);else if("top"==t)r=_$1.orderBy(e,["baseData.top"],["asc"]);else if("topLeft"==t){var n=this.setSpacing(e,"left");r=_$1.orderBy(n,["spacing"],["asc"])}else if("topRight"==t){var i=this.setSpacing(e,"right");r=_$1.orderBy(i,["spacing"],["asc"])}else if("center"==t){var o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["asc"]),_$1.orderBy(o.false,["center.x"],["desc"])]}else if("spaceBetween"==t){o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["desc"]),_$1.orderBy(o.false,["center.x"],["asc"])]}else r=_$1.orderBy(e,["baseData.left"],["asc"]);return r},e.prototype.getSpacing=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y,a=Math.abs(r-i),s=Math.abs(n-o);return Math.sqrt(a*a+s*s)},e.prototype.creatPosition=function(e,t){var r=0,n=0;return e?("left"===t?(r=e.left,n=e.top):"right"===t&&(r=e.left+e.width,n=e.top),{x:r,y:n}):{x:r,y:n}},e.prototype.setEndPoisiton=function(e){if(e){var t=e.width,r=e.height;this.curtain=e,this.endPoisiton.x=t,this.endPoisiton.y=r}},e.prototype.setSpacing=function(e,t){var r,n=this;return"left"===t?r=this.startPoisiton:"right"===t&&(r=this.endPoisiton),e.forEach((function(e){var i=e.baseData;if(i){var o=n.creatPosition(i,t),a=n.getSpacing(o,r);e.spacing=a}})),e},e.prototype.setCenter=function(e){return e.forEach((function(e){if(e.baseData){var t=e.baseData.left+e.baseData.width/2,r=e.baseData.top+e.baseData.height/2;e.center={x:t,y:r}}})),e},e.prototype.splitArrayForCenter=function(e,t){var r,n=this,i=this.setCenter(e);return"left"!=t&&"right"!=t||(r=_$1.groupBy(i,(function(e){return e.center.x>=n.curtain.width/2}))),"top"!=t&&"bottom"!=t||(r=_$1.groupBy(i,(function(e){return e.center.y>=n.curtain.height/2}))),r},e.prototype._add=function(e,t){this.timeLine.add(e,t)},e.prototype._creatTl=function(e){var t=gsapWithCSS.timeline();return t.add(this._creatTw(e)),t},e.prototype._creatTw=function(e){var t=this.goAnimationParams.params,r=t.delay,n=t.duration,i=t.repeat,o=t.type,a=t.value;return a&&a.length&&a.forEach((function(e){e.delay=r||0,e.repeat=i||0})),gsapWithCSS[o](e,n,a[0],a[1])},e.prototype.in=function(){},e.prototype.out=function(){},e}(),index=GoAnimation.getInstance(),findItemDeep=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var c=a[s][1];i(c)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){c=a[s][1];i(c)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function mitt(e,t){return e=e||new Map,__assign$1(__assign$1({},t),{EventType:e,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);if(n){var i=n.slice().map((function(e){return e(r)}));if(i&&1==i.length)return i[0]}(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}})}var RuntimeServer=function(){function e(e){this.root=null,this.vuex=Go.getInstance().VueServer,this.eventType=new Map,(null==e?void 0:e.root)&&(this.root=e.root);var t={setGlobalVar:this.setGlobalVar.bind(this),showComponent:this._showComponent.bind(this),hideComponent:this._hideComponent.bind(this),pageChange:this.pageChange.bind(this),changeDynamicState:this.changeDynamicState.bind(this)};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.eventType.set(r,[t[r]])}return e.prototype.findComponentDownward=function(e,t){var r=e.$children;if(r.length)for(var n=0,i=r;n<i.length;n++){var o=i[n];o.$options&&o.$options.propsData&&o.$options.propsData.cid&&(t[o.$options.propsData.cid]=o),o.$children&&o.$children.length&&this.findComponentDownward(o,t)}return t},e.prototype.getAllComponents=function(){var e={};return this.findComponentDownward(this.root,e),e},e.prototype.getComponentByCid=function(e){try{var t=this.getAllComponents()[e];if(!t)throw new Error("The instance was not found");return t}catch(e){console.warn(e)}},e.prototype.getElementByCid=function(e){try{if(!e)throw new Error("Please input the parameters correctly");var t=this.getComponentByCid(e);if(!t)throw new Error("The element was not found");return t.$el}catch(e){console.warn(e)}},e.prototype.setGlobalVar=function(e){try{var t=e.key,r=e.value;if(!(e&&t&&r))throw new Error("An error occurred. Please check whether the incoming parameters are correct! The correct format of data is an object containing key and value");this.setVars(e)}catch(e){console.warn(e)}},e.prototype._showComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!0})}catch(e){console.warn(e)}},e.prototype._hideComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!1})}catch(e){console.warn(e)}},e.prototype.getList=function(e){return e&&"id"===e?this.vuex.callState("list").map((function(e){return e.cid})):this.vuex.callState("list")},e.prototype.getTheme=function(e){var t=this.vuex.callState("theme");return e&&e(t),t},e.prototype.getElement=function(e){var t=this.vuex.callState("list");return findItemDeep(t,e)},e.prototype.changeVis=function(e){return this.vuex.callMutation("changeShow",e)},e.prototype.comToggle=function(e){return this.vuex.callMutation("comToggle",e)},e.prototype.getPageInfo=function(e){var t=this.vuex.callState("caseInfo");return e&&e(t),(null==t?void 0:t.details)?t.details.map((function(e){return{name:e.caseDetailName,path:e.caseDetailPath,id:e.id}})):t},e.prototype.updateComp=function(e){return this.vuex.callMutation("updatComs",e)},e.prototype.changeDynamicState=function(e){return this.vuex.callMutation("changeDynamicState",e)},e.prototype.pageChange=function(e){return this.vuex.callMutation("setPageId",e)},e.prototype.pagePush=function(e,t,r){return void 0===r&&(r={}),this.vuex.callMutation("pagePush",{type:e,value:t,option:r})},e.prototype.activeState=function(e,t){return this.vuex.callMutation("setDynamicActive",{cid:e,name:t})},e.prototype.getVars=function(e){var t=ge.getAllVariables();return e&&e(t),t},e.prototype.setVars=function(e){var t=ge.getVariable(e.key);if(2!=(null==t?void 0:t.model))return this.vuex.callAction("goEditVar",e);console.warn("系统变量禁止修改!")},e}(),Run=function(e){function t(t){var r=e.call(this,t)||this,n=mitt(r.eventType);return r.$emit=n.emit,r.$on=n.on,r.$off=n.off,r}return __extends$2(t,e),Object.defineProperty(t.prototype,"Theme",{get:function(){return this.getTheme()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.getAllComponents()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"GlobalVars",{get:function(){return this.getVars()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.getPageInfo()},enumerable:!1,configurable:!0}),t.prototype.getElementById=function(e){this.getElementByCid(e)},t.prototype.getComponentById=function(e){this.getComponentByCid(e)},t.prototype.getPage=function(){},t}(RuntimeServer),G=function(){function e(e){this.$action=new GoEvent(e),this.instance=new Run(e)}return e.prototype.getGlobalvars=function(){for(var e=ge.getAllVariables(),t=e.map((function(e){return e.mapField})),r={},n=function(t){var n=e.find((function(e){return e.mapField==t}));n&&(r[t]=n.value)},i=0,o=t;i<o.length;i++){n(o[i])}var a=this.instance;return new Proxy(r,{has:function(e,t){return!t&&t in e},get:function(e,t){if(t in e)return e[t];throw new ReferenceError('Prop name "'+t+'" does not exist.')},set:function(e,t,r){if(!e[t])return console.log("变量不存在/不能被修改"),!1;if(e[t]=r,!t||"string"!=typeof t)throw new Error("Invalid key");a.setGlobalVar({key:t,value:r})}})},Object.defineProperty(e.prototype,"globalvars",{get:function(){return this.getGlobalvars()},enumerable:!1,configurable:!0}),e}(),GoEvent=function(e){var t=this;this.setGlobalVars=function(e,r){if(!e||"string"!=typeof e)throw new Error("Invalid key");t.instance.setGlobalVar({key:e,value:r})},this.skipTo=function(e){var r=null==e?void 0:e.params;if(!e||0===Object.keys(e).length)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));if(e.name)t.instance.pagePush("name",e.name,r);else if(e.path)t.instance.pagePush("path",e.path,r);else{if(!e.url)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));window.open(e.url)}},this.toggle=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e)if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.comToggle(i):console.warn("请传入正确的参数!")}else console.warn("请传入正确的参数!");else t.instance.comToggle(e);else console.warn("请传入正确的参数!")},this.show=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._showComponent(i.toString()):console.warn("请传入正确的参数!")}}else t.instance._showComponent(e.toString());else console.warn("请传入正确的参数!")},this.hide=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._hideComponent(i):console.warn("请传入正确的参数!")}}else t.instance._hideComponent(e);else console.warn("请传入正确的参数!")},this.activeState=function(e,r){t.instance.activeState(e,r)},this.updateComp=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.updateComp(i):console.warn("请传入正确的参数!")}}else t.instance.updateComp(e);else console.warn("请传入正确的参数!")},this.instance=new Run(e)},run=function(e){return new G(e)},getDataForRelease=function(e,t){console.log("弃用")},createComponent=function(e,t){return t&&e?Go.getInstance().render(e,t):e?Go.getInstance().render(e):void 0},createComponentForParent=function(e,t,r){return void 0!==r&&e?Go.getInstance().renderForParent(e,t,r):e?Go.getInstance().renderForParent(e,t):void 0},emitEvent=function(e,t){return Go.getInstance().emitEvent(e,t||function(){})},log=function(){};exports.Go=Go,exports.GoAnimation=index,exports.Tool=index$1,exports.createComponent=createComponent,exports.createComponentForParent=createComponentForParent,exports.emitEvent=emitEvent,exports.fxhr=index$2,exports.getDataForRelease=getDataForRelease,exports.goUtils=index$3,exports.log=log,exports.refreshData=refreshData,exports.run=run,exports.store=store}));
63
+ var _win,_doc,_docElement,_pluginInitted,_tempDiv,_recentSetterPlugin,_reverting,_windowExists=function(){return"undefined"!=typeof window},_transformProps={},_RAD2DEG=180/Math.PI,_DEG2RAD=Math.PI/180,_atan2=Math.atan2,_bigNum=1e8,_capsExp=/([A-Z])/g,_horizontalExp=/(left|right|width|margin|padding|x)/i,_complexExp=/[\s,\(]\S/,_propertyAliases={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_renderCSSProp=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderPropWithEnd=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_renderCSSPropWithBeginning=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},_renderRoundedCSSProp=function(e,t){var r=t.s+t.c*e;t.set(t.t,t.p,~~(r+(r<0?-.5:.5))+t.u,t)},_renderNonTweeningValue=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},_renderNonTweeningValueOnlyAtEnd=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},_setterCSSStyle=function(e,t,r){return e.style[t]=r},_setterCSSProp=function(e,t,r){return e.style.setProperty(t,r)},_setterTransform=function(e,t,r){return e._gsap[t]=r},_setterScale=function(e,t,r){return e._gsap.scaleX=e._gsap.scaleY=r},_setterScaleWithRender=function(e,t,r,n,i){var o=e._gsap;o.scaleX=o.scaleY=r,o.renderTransform(i,o)},_setterTransformWithRender=function(e,t,r,n,i){var o=e._gsap;o[t]=r,o.renderTransform(i,o)},_transformProp="transform",_transformOriginProp=_transformProp+"Origin",_saveStyle=function e(t,r){var n=this,i=this.target,o=i.style,a=i._gsap;if(t in _transformProps&&o){if(this.tfm=this.tfm||{},"transform"===t)return _propertyAliases.transform.split(",").forEach((function(t){return e.call(n,t,r)}));if(~(t=_propertyAliases[t]||t).indexOf(",")?t.split(",").forEach((function(e){return n.tfm[e]=_get(i,e)})):this.tfm[t]=a.x?a[t]:_get(i,t),t===_transformOriginProp&&(this.tfm.zOrigin=a.zOrigin),this.props.indexOf(_transformProp)>=0)return;a.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(_transformOriginProp,r,"")),t=_transformProp}(o||r)&&this.props.push(t,r,o[t])},_removeIndependentTransforms=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},_revertStyle=function(){var e,t,r=this.props,n=this.target,i=n.style,o=n._gsap;for(e=0;e<r.length;e+=3)r[e+1]?n[r[e]]=r[e+2]:r[e+2]?i[r[e]]=r[e+2]:i.removeProperty("--"===r[e].substr(0,2)?r[e]:r[e].replace(_capsExp,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)o[t]=this.tfm[t];o.svg&&(o.renderTransform(),n.setAttribute("data-svg-origin",this.svgo||"")),(e=_reverting())&&e.isStart||i[_transformProp]||(_removeIndependentTransforms(i),o.zOrigin&&i[_transformOriginProp]&&(i[_transformOriginProp]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},_getStyleSaver=function(e,t){var r={target:e,props:[],revert:_revertStyle,save:_saveStyle};return e._gsap||gsap.core.getCache(e),t&&t.split(",").forEach((function(e){return r.save(e)})),r},_supports3D,_createElement=function(e,t){var r=_doc.createElementNS?_doc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):_doc.createElement(e);return r&&r.style?r:_doc.createElement(e)},_getComputedProperty=function e(t,r,n){var i=getComputedStyle(t);return i[r]||i.getPropertyValue(r.replace(_capsExp,"-$1").toLowerCase())||i.getPropertyValue(r)||!n&&e(t,_checkPropPrefix(r)||r,1)||""},_prefixes="O,Moz,ms,Ms,Webkit".split(","),_checkPropPrefix=function(e,t,r){var n=(t||_tempDiv).style,i=5;if(e in n&&!r)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(_prefixes[i]+e in n););return i<0?null:(3===i?"ms":i>=0?_prefixes[i]:"")+e},_initCore=function(){_windowExists()&&window.document&&(_win=window,_doc=_win.document,_docElement=_doc.documentElement,_tempDiv=_createElement("div")||{style:{}},_createElement("div"),_transformProp=_checkPropPrefix(_transformProp),_transformOriginProp=_transformProp+"Origin",_tempDiv.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",_supports3D=!!_checkPropPrefix("perspective"),_reverting=gsap.core.reverting,_pluginInitted=1)},_getBBoxHack=function e(t){var r,n=_createElement("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,a=this.style.cssText;if(_docElement.appendChild(n),n.appendChild(this),this.style.display="block",t)try{r=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(r=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),_docElement.removeChild(n),this.style.cssText=a,r},_getAttributeFallbacks=function(e,t){for(var r=t.length;r--;)if(e.hasAttribute(t[r]))return e.getAttribute(t[r])},_getBBox=function(e){var t;try{t=e.getBBox()}catch(r){t=_getBBoxHack.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===_getBBoxHack||(t=_getBBoxHack.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+_getAttributeFallbacks(e,["x","cx","x1"])||0,y:+_getAttributeFallbacks(e,["y","cy","y1"])||0,width:0,height:0}},_isSVG=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!_getBBox(e))},_removeProperty=function(e,t){if(t){var r,n=e.style;t in _transformProps&&t!==_transformOriginProp&&(t=_transformProp),n.removeProperty?("ms"!==(r=t.substr(0,2))&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty("--"===r?t:t.replace(_capsExp,"-$1").toLowerCase())):n.removeAttribute(t)}},_addNonTweeningPT=function(e,t,r,n,i,o){var a=new PropTween(e._pt,t,r,0,1,o?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue);return e._pt=a,a.b=n,a.e=i,e._props.push(r),a},_nonConvertibleUnits={deg:1,rad:1,turn:1},_nonStandardLayouts={grid:1,flex:1},_convertToUnit=function e(t,r,n,i){var o,a,s,c,u=parseFloat(n)||0,l=(n+"").trim().substr((u+"").length)||"px",d=_tempDiv.style,h=_horizontalExp.test(r),f="svg"===t.tagName.toLowerCase(),p=(f?"client":"offset")+(h?"Width":"Height"),m=100,g="px"===i,v="%"===i;if(i===l||!u||_nonConvertibleUnits[i]||_nonConvertibleUnits[l])return u;if("px"!==l&&!g&&(u=e(t,r,n,"px")),c=t.getCTM&&_isSVG(t),(v||"%"===l)&&(_transformProps[r]||~r.indexOf("adius")))return o=c?t.getBBox()[h?"width":"height"]:t[p],_round(v?u/o*m:u/100*o);if(d[h?"width":"height"]=m+(g?l:i),a=~r.indexOf("adius")||"em"===i&&t.appendChild&&!f?t:t.parentNode,c&&(a=(t.ownerSVGElement||{}).parentNode),a&&a!==_doc&&a.appendChild||(a=_doc.body),(s=a._gsap)&&v&&s.width&&h&&s.time===_ticker.time&&!s.uncache)return _round(u/s.width*m);if(!v||"height"!==r&&"width"!==r)(v||"%"===l)&&!_nonStandardLayouts[_getComputedProperty(a,"display")]&&(d.position=_getComputedProperty(t,"position")),a===t&&(d.position="static"),a.appendChild(_tempDiv),o=_tempDiv[p],a.removeChild(_tempDiv),d.position="absolute";else{var y=t.style[r];t.style[r]=m+i,o=t[p],y?t.style[r]=y:_removeProperty(t,r)}return h&&v&&((s=_getCache(a)).time=_ticker.time,s.width=a[p]),_round(g?o*u/m:o&&u?m/o*u:0)},_get=function(e,t,r,n){var i;return _pluginInitted||_initCore(),t in _propertyAliases&&"transform"!==t&&~(t=_propertyAliases[t]).indexOf(",")&&(t=t.split(",")[0]),_transformProps[t]&&"transform"!==t?(i=_parseTransform(e,n),i="transformOrigin"!==t?i[t]:i.svg?i.origin:_firstTwoOnly(_getComputedProperty(e,_transformOriginProp))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||n||~(i+"").indexOf("calc("))&&(i=_specialProps[t]&&_specialProps[t](e,t,r)||_getComputedProperty(e,t)||_getProperty(e,t)||("opacity"===t?1:0)),r&&!~(i+"").trim().indexOf(" ")?_convertToUnit(e,t,i,r)+r:i},_tweenComplexCSSString=function(e,t,r,n){if(!r||"none"===r){var i=_checkPropPrefix(t,e,1),o=i&&_getComputedProperty(e,i,1);o&&o!==r?(t=i,r=o):"borderColor"===t&&(r=_getComputedProperty(e,"borderTopColor"))}var a,s,c,u,l,d,h,f,p,m,g,v=new PropTween(this._pt,e.style,t,0,1,_renderComplexString),y=0,_=0;if(v.b=r,v.e=n,r+="","auto"===(n+="")&&(d=e.style[t],e.style[t]=n,n=_getComputedProperty(e,t)||n,d?e.style[t]=d:_removeProperty(e,t)),_colorStringFilter(a=[r,n]),n=a[1],c=(r=a[0]).match(_numWithUnitExp)||[],(n.match(_numWithUnitExp)||[]).length){for(;s=_numWithUnitExp.exec(n);)h=s[0],p=n.substring(y,s.index),l?l=(l+1)%5:"rgba("!==p.substr(-5)&&"hsla("!==p.substr(-5)||(l=1),h!==(d=c[_++]||"")&&(u=parseFloat(d)||0,g=d.substr((u+"").length),"="===h.charAt(1)&&(h=_parseRelative(u,h)+g),f=parseFloat(h),m=h.substr((f+"").length),y=_numWithUnitExp.lastIndex-m.length,m||(m=m||_config.units[t]||g,y===n.length&&(n+=m,v.e+=m)),g!==m&&(u=_convertToUnit(e,t,d,m)||0),v._pt={_next:v._pt,p:p||1===_?p:",",s:u,c:f-u,m:l&&l<4||"zIndex"===t?Math.round:0});v.c=y<n.length?n.substring(y,n.length):""}else v.r="display"===t&&"none"===n?_renderNonTweeningValueOnlyAtEnd:_renderNonTweeningValue;return _relExp.test(n)&&(v.e=0),this._pt=v,v},_keywordToPercent={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},_convertKeywordsToPercentages=function(e){var t=e.split(" "),r=t[0],n=t[1]||"50%";return"top"!==r&&"bottom"!==r&&"left"!==n&&"right"!==n||(e=r,r=n,n=e),t[0]=_keywordToPercent[r]||r,t[1]=_keywordToPercent[n]||n,t.join(" ")},_renderClearProps=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var r,n,i,o=t.t,a=o.style,s=t.u,c=o._gsap;if("all"===s||!0===s)a.cssText="",n=1;else for(i=(s=s.split(",")).length;--i>-1;)r=s[i],_transformProps[r]&&(n=1,r="transformOrigin"===r?_transformOriginProp:_transformProp),_removeProperty(o,r);n&&(_removeProperty(o,_transformProp),c&&(c.svg&&o.removeAttribute("transform"),_parseTransform(o,1),c.uncache=1,_removeIndependentTransforms(a)))}},_specialProps={clearProps:function(e,t,r,n,i){if("isFromStart"!==i.data){var o=e._pt=new PropTween(e._pt,t,r,0,0,_renderClearProps);return o.u=n,o.pr=-10,o.tween=i,e._props.push(r),1}}},_identity2DMatrix=[1,0,0,1,0,0],_rotationalProperties={},_isNullTransform=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},_getComputedTransformMatrixAsArray=function(e){var t=_getComputedProperty(e,_transformProp);return _isNullTransform(t)?_identity2DMatrix:t.substr(7).match(_numExp).map(_round)},_getMatrix=function(e,t){var r,n,i,o,a=e._gsap||_getCache(e),s=e.style,c=_getComputedTransformMatrixAsArray(e);return a.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(c=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?_identity2DMatrix:c:(c!==_identity2DMatrix||e.offsetParent||e===_docElement||a.svg||(i=s.display,s.display="block",(r=e.parentNode)&&e.offsetParent||(o=1,n=e.nextElementSibling,_docElement.appendChild(e)),c=_getComputedTransformMatrixAsArray(e),i?s.display=i:_removeProperty(e,"display"),o&&(n?r.insertBefore(e,n):r?r.appendChild(e):_docElement.removeChild(e))),t&&c.length>6?[c[0],c[1],c[4],c[5],c[12],c[13]]:c)},_applySVGOrigin=function(e,t,r,n,i,o){var a,s,c,u=e._gsap,l=i||_getMatrix(e,!0),d=u.xOrigin||0,h=u.yOrigin||0,f=u.xOffset||0,p=u.yOffset||0,m=l[0],g=l[1],v=l[2],y=l[3],_=l[4],b=l[5],w=t.split(" "),D=parseFloat(w[0])||0,S=parseFloat(w[1])||0;r?l!==_identity2DMatrix&&(s=m*y-g*v)&&(c=D*(-g/s)+S*(m/s)-(m*b-g*_)/s,D=D*(y/s)+S*(-v/s)+(v*b-y*_)/s,S=c):(D=(a=_getBBox(e)).x+(~w[0].indexOf("%")?D/100*a.width:D),S=a.y+(~(w[1]||w[0]).indexOf("%")?S/100*a.height:S)),n||!1!==n&&u.smooth?(_=D-d,b=S-h,u.xOffset=f+(_*m+b*v)-_,u.yOffset=p+(_*g+b*y)-b):u.xOffset=u.yOffset=0,u.xOrigin=D,u.yOrigin=S,u.smooth=!!n,u.origin=t,u.originIsAbsolute=!!r,e.style[_transformOriginProp]="0px 0px",o&&(_addNonTweeningPT(o,u,"xOrigin",d,D),_addNonTweeningPT(o,u,"yOrigin",h,S),_addNonTweeningPT(o,u,"xOffset",f,u.xOffset),_addNonTweeningPT(o,u,"yOffset",p,u.yOffset)),e.setAttribute("data-svg-origin",D+" "+S)},_parseTransform=function(e,t){var r=e._gsap||new GSCache(e);if("x"in r&&!t&&!r.uncache)return r;var n,i,o,a,s,c,u,l,d,h,f,p,m,g,v,y,_,b,w,D,S,x,T,k,P,E,A,C,O,R,M,I,N=e.style,B=r.scaleX<0,F="px",j="deg",V=getComputedStyle(e),$=_getComputedProperty(e,_transformOriginProp)||"0";return n=i=o=c=u=l=d=h=f=0,a=s=1,r.svg=!(!e.getCTM||!_isSVG(e)),V.translate&&("none"===V.translate&&"none"===V.scale&&"none"===V.rotate||(N[_transformProp]=("none"!==V.translate?"translate3d("+(V.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==V.rotate?"rotate("+V.rotate+") ":"")+("none"!==V.scale?"scale("+V.scale.split(" ").join(",")+") ":"")+("none"!==V[_transformProp]?V[_transformProp]:"")),N.scale=N.rotate=N.translate="none"),g=_getMatrix(e,r.svg),r.svg&&(r.uncache?(P=e.getBBox(),$=r.xOrigin-P.x+"px "+(r.yOrigin-P.y)+"px",k=""):k=!t&&e.getAttribute("data-svg-origin"),_applySVGOrigin(e,k||$,!!k||r.originIsAbsolute,!1!==r.smooth,g)),p=r.xOrigin||0,m=r.yOrigin||0,g!==_identity2DMatrix&&(b=g[0],w=g[1],D=g[2],S=g[3],n=x=g[4],i=T=g[5],6===g.length?(a=Math.sqrt(b*b+w*w),s=Math.sqrt(S*S+D*D),c=b||w?_atan2(w,b)*_RAD2DEG:0,(d=D||S?_atan2(D,S)*_RAD2DEG+c:0)&&(s*=Math.abs(Math.cos(d*_DEG2RAD))),r.svg&&(n-=p-(p*b+m*D),i-=m-(p*w+m*S))):(I=g[6],R=g[7],A=g[8],C=g[9],O=g[10],M=g[11],n=g[12],i=g[13],o=g[14],u=(v=_atan2(I,O))*_RAD2DEG,v&&(k=x*(y=Math.cos(-v))+A*(_=Math.sin(-v)),P=T*y+C*_,E=I*y+O*_,A=x*-_+A*y,C=T*-_+C*y,O=I*-_+O*y,M=R*-_+M*y,x=k,T=P,I=E),l=(v=_atan2(-D,O))*_RAD2DEG,v&&(y=Math.cos(-v),M=S*(_=Math.sin(-v))+M*y,b=k=b*y-A*_,w=P=w*y-C*_,D=E=D*y-O*_),c=(v=_atan2(w,b))*_RAD2DEG,v&&(k=b*(y=Math.cos(v))+w*(_=Math.sin(v)),P=x*y+T*_,w=w*y-b*_,T=T*y-x*_,b=k,x=P),u&&Math.abs(u)+Math.abs(c)>359.9&&(u=c=0,l=180-l),a=_round(Math.sqrt(b*b+w*w+D*D)),s=_round(Math.sqrt(T*T+I*I)),v=_atan2(x,T),d=Math.abs(v)>2e-4?v*_RAD2DEG:0,f=M?1/(M<0?-M:M):0),r.svg&&(k=e.getAttribute("transform"),r.forceCSS=e.setAttribute("transform","")||!_isNullTransform(_getComputedProperty(e,_transformProp)),k&&e.setAttribute("transform",k))),Math.abs(d)>90&&Math.abs(d)<270&&(B?(a*=-1,d+=c<=0?180:-180,c+=c<=0?180:-180):(s*=-1,d+=d<=0?180:-180)),t=t||r.uncache,r.x=n-((r.xPercent=n&&(!t&&r.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-n)?-50:0)))?e.offsetWidth*r.xPercent/100:0)+F,r.y=i-((r.yPercent=i&&(!t&&r.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*r.yPercent/100:0)+F,r.z=o+F,r.scaleX=_round(a),r.scaleY=_round(s),r.rotation=_round(c)+j,r.rotationX=_round(u)+j,r.rotationY=_round(l)+j,r.skewX=d+j,r.skewY=h+j,r.transformPerspective=f+F,(r.zOrigin=parseFloat($.split(" ")[2])||!t&&r.zOrigin||0)&&(N[_transformOriginProp]=_firstTwoOnly($)),r.xOffset=r.yOffset=0,r.force3D=_config.force3D,r.renderTransform=r.svg?_renderSVGTransforms:_supports3D?_renderCSSTransforms:_renderNon3DTransforms,r.uncache=0,r},_firstTwoOnly=function(e){return(e=e.split(" "))[0]+" "+e[1]},_addPxTranslate=function(e,t,r){var n=getUnit(t);return _round(parseFloat(t)+parseFloat(_convertToUnit(e,"x",r+"px",n)))+n},_renderNon3DTransforms=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,_renderCSSTransforms(e,t)},_zeroDeg="0deg",_zeroPx="0px",_endParenthesis=") ",_renderCSSTransforms=function(e,t){var r=t||this,n=r.xPercent,i=r.yPercent,o=r.x,a=r.y,s=r.z,c=r.rotation,u=r.rotationY,l=r.rotationX,d=r.skewX,h=r.skewY,f=r.scaleX,p=r.scaleY,m=r.transformPerspective,g=r.force3D,v=r.target,y=r.zOrigin,_="",b="auto"===g&&e&&1!==e||!0===g;if(y&&(l!==_zeroDeg||u!==_zeroDeg)){var w,D=parseFloat(u)*_DEG2RAD,S=Math.sin(D),x=Math.cos(D);D=parseFloat(l)*_DEG2RAD,w=Math.cos(D),o=_addPxTranslate(v,o,S*w*-y),a=_addPxTranslate(v,a,-Math.sin(D)*-y),s=_addPxTranslate(v,s,x*w*-y+y)}m!==_zeroPx&&(_+="perspective("+m+_endParenthesis),(n||i)&&(_+="translate("+n+"%, "+i+"%) "),(b||o!==_zeroPx||a!==_zeroPx||s!==_zeroPx)&&(_+=s!==_zeroPx||b?"translate3d("+o+", "+a+", "+s+") ":"translate("+o+", "+a+_endParenthesis),c!==_zeroDeg&&(_+="rotate("+c+_endParenthesis),u!==_zeroDeg&&(_+="rotateY("+u+_endParenthesis),l!==_zeroDeg&&(_+="rotateX("+l+_endParenthesis),d===_zeroDeg&&h===_zeroDeg||(_+="skew("+d+", "+h+_endParenthesis),1===f&&1===p||(_+="scale("+f+", "+p+_endParenthesis),v.style[_transformProp]=_||"translate(0, 0)"},_renderSVGTransforms=function(e,t){var r,n,i,o,a,s=t||this,c=s.xPercent,u=s.yPercent,l=s.x,d=s.y,h=s.rotation,f=s.skewX,p=s.skewY,m=s.scaleX,g=s.scaleY,v=s.target,y=s.xOrigin,_=s.yOrigin,b=s.xOffset,w=s.yOffset,D=s.forceCSS,S=parseFloat(l),x=parseFloat(d);h=parseFloat(h),f=parseFloat(f),(p=parseFloat(p))&&(f+=p=parseFloat(p),h+=p),h||f?(h*=_DEG2RAD,f*=_DEG2RAD,r=Math.cos(h)*m,n=Math.sin(h)*m,i=Math.sin(h-f)*-g,o=Math.cos(h-f)*g,f&&(p*=_DEG2RAD,a=Math.tan(f-p),i*=a=Math.sqrt(1+a*a),o*=a,p&&(a=Math.tan(p),r*=a=Math.sqrt(1+a*a),n*=a)),r=_round(r),n=_round(n),i=_round(i),o=_round(o)):(r=m,o=g,n=i=0),(S&&!~(l+"").indexOf("px")||x&&!~(d+"").indexOf("px"))&&(S=_convertToUnit(v,"x",l,"px"),x=_convertToUnit(v,"y",d,"px")),(y||_||b||w)&&(S=_round(S+y-(y*r+_*i)+b),x=_round(x+_-(y*n+_*o)+w)),(c||u)&&(a=v.getBBox(),S=_round(S+c/100*a.width),x=_round(x+u/100*a.height)),a="matrix("+r+","+n+","+i+","+o+","+S+","+x+")",v.setAttribute("transform",a),D&&(v.style[_transformProp]=a)},_addRotationalPropTween=function(e,t,r,n,i){var o,a,s=360,c=_isString(i),u=parseFloat(i)*(c&&~i.indexOf("rad")?_RAD2DEG:1)-n,l=n+u+"deg";return c&&("short"===(o=i.split("_")[1])&&(u%=s)!==u%180&&(u+=u<0?s:-360),"cw"===o&&u<0?u=(u+s*_bigNum)%s-~~(u/s)*s:"ccw"===o&&u>0&&(u=(u-s*_bigNum)%s-~~(u/s)*s)),e._pt=a=new PropTween(e._pt,t,r,n,u,_renderPropWithEnd),a.e=l,a.u="deg",e._props.push(r),a},_assign=function(e,t){for(var r in t)e[r]=t[r];return e},_addRawTransformPTs=function(e,t,r){var n,i,o,a,s,c,u,l=_assign({},r._gsap),d=r.style;for(i in l.svg?(o=r.getAttribute("transform"),r.setAttribute("transform",""),d[_transformProp]=t,n=_parseTransform(r,1),_removeProperty(r,_transformProp),r.setAttribute("transform",o)):(o=getComputedStyle(r)[_transformProp],d[_transformProp]=t,n=_parseTransform(r,1),d[_transformProp]=o),_transformProps)(o=l[i])!==(a=n[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=getUnit(o)!==(u=getUnit(a))?_convertToUnit(r,i,o,u):parseFloat(o),c=parseFloat(a),e._pt=new PropTween(e._pt,n,i,s,c-s,_renderCSSProp),e._pt.u=u||0,e._props.push(i));_assign(n,l)};_forEachName("padding,margin,Width,Radius",(function(e,t){var r="Top",n="Right",i="Bottom",o="Left",a=(t<3?[r,n,i,o]:[r+o,r+n,i+n,i+o]).map((function(r){return t<2?e+r:"border"+r+e}));_specialProps[t>1?"border"+e:e]=function(e,t,r,n,i){var o,s;if(arguments.length<4)return o=a.map((function(t){return _get(e,t,r)})),5===(s=o.join(" ")).split(o[0]).length?o[0]:s;o=(n+"").split(" "),s={},a.forEach((function(e,t){return s[e]=o[t]=o[t]||o[(t-1)/2|0]})),e.init(t,s,i)}}));var CSSPlugin={name:"css",register:_initCore,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,r,n,i){var o,a,s,c,u,l,d,h,f,p,m,g,v,y,_,b,w=this._props,D=e.style,S=r.vars.startAt;for(d in _pluginInitted||_initCore(),this.styles=this.styles||_getStyleSaver(e),b=this.styles.props,this.tween=r,t)if("autoRound"!==d&&(a=t[d],!_plugins[d]||!_checkPlugin(d,t,r,n,e,i)))if(u=typeof a,l=_specialProps[d],"function"===u&&(u=typeof(a=a.call(r,n,e,i))),"string"===u&&~a.indexOf("random(")&&(a=_replaceRandom(a)),l)l(this,e,d,a,r)&&(_=1);else if("--"===d.substr(0,2))o=(getComputedStyle(e).getPropertyValue(d)+"").trim(),a+="",_colorExp.lastIndex=0,_colorExp.test(o)||(h=getUnit(o),f=getUnit(a)),f?h!==f&&(o=_convertToUnit(e,d,o,f)+f):h&&(a+=h),this.add(D,"setProperty",o,a,n,i,0,0,d),w.push(d),b.push(d,0,D[d]);else if("undefined"!==u){if(S&&d in S?(o="function"==typeof S[d]?S[d].call(r,n,e,i):S[d],_isString(o)&&~o.indexOf("random(")&&(o=_replaceRandom(o)),getUnit(o+"")||"auto"===o||(o+=_config.units[d]||getUnit(_get(e,d))||""),"="===(o+"").charAt(1)&&(o=_get(e,d))):o=_get(e,d),c=parseFloat(o),(p="string"===u&&"="===a.charAt(1)&&a.substr(0,2))&&(a=a.substr(2)),s=parseFloat(a),d in _propertyAliases&&("autoAlpha"===d&&(1===c&&"hidden"===_get(e,"visibility")&&s&&(c=0),b.push("visibility",0,D.visibility),_addNonTweeningPT(this,D,"visibility",c?"inherit":"hidden",s?"inherit":"hidden",!s)),"scale"!==d&&"transform"!==d&&~(d=_propertyAliases[d]).indexOf(",")&&(d=d.split(",")[0])),m=d in _transformProps)if(this.styles.save(d),g||((v=e._gsap).renderTransform&&!t.parseTransform||_parseTransform(e,t.parseTransform),y=!1!==t.smoothOrigin&&v.smooth,(g=this._pt=new PropTween(this._pt,D,_transformProp,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===d)this._pt=new PropTween(this._pt,v,"scaleY",v.scaleY,(p?_parseRelative(v.scaleY,p+s):s)-v.scaleY||0,_renderCSSProp),this._pt.u=0,w.push("scaleY",d),d+="X";else{if("transformOrigin"===d){b.push(_transformOriginProp,0,D[_transformOriginProp]),a=_convertKeywordsToPercentages(a),v.svg?_applySVGOrigin(e,a,0,y,0,this):((f=parseFloat(a.split(" ")[2])||0)!==v.zOrigin&&_addNonTweeningPT(this,v,"zOrigin",v.zOrigin,f),_addNonTweeningPT(this,D,d,_firstTwoOnly(o),_firstTwoOnly(a)));continue}if("svgOrigin"===d){_applySVGOrigin(e,a,1,y,0,this);continue}if(d in _rotationalProperties){_addRotationalPropTween(this,v,d,c,p?_parseRelative(c,p+a):a);continue}if("smoothOrigin"===d){_addNonTweeningPT(this,v,"smooth",v.smooth,a);continue}if("force3D"===d){v[d]=a;continue}if("transform"===d){_addRawTransformPTs(this,a,e);continue}}else d in D||(d=_checkPropPrefix(d)||d);if(m||(s||0===s)&&(c||0===c)&&!_complexExp.test(a)&&d in D)s||(s=0),(h=(o+"").substr((c+"").length))!==(f=getUnit(a)||(d in _config.units?_config.units[d]:h))&&(c=_convertToUnit(e,d,o,f)),this._pt=new PropTween(this._pt,m?v:D,d,c,(p?_parseRelative(c,p+s):s)-c,m||"px"!==f&&"zIndex"!==d||!1===t.autoRound?_renderCSSProp:_renderRoundedCSSProp),this._pt.u=f||0,h!==f&&"%"!==f&&(this._pt.b=o,this._pt.r=_renderCSSPropWithBeginning);else if(d in D)_tweenComplexCSSString.call(this,e,d,o,p?p+a:a);else if(d in e)this.add(e,d,o||e[d],p?p+a:a,n,i);else if("parseTransform"!==d){_missingPlugin(d,a);continue}m||(d in D?b.push(d,0,D[d]):b.push(d,1,o||e[d])),w.push(d)}_&&_sortPropTweensByPriority(this)},render:function(e,t){if(t.tween._time||!_reverting())for(var r=t._pt;r;)r.r(e,r.d),r=r._next;else t.styles.revert()},get:_get,aliases:_propertyAliases,getSetter:function(e,t,r){var n=_propertyAliases[t];return n&&n.indexOf(",")<0&&(t=n),t in _transformProps&&t!==_transformOriginProp&&(e._gsap.x||_get(e,"x"))?r&&_recentSetterPlugin===r?"scale"===t?_setterScale:_setterTransform:(_recentSetterPlugin=r||{})&&("scale"===t?_setterScaleWithRender:_setterTransformWithRender):e.style&&!_isUndefined(e.style[t])?_setterCSSStyle:~t.indexOf("-")?_setterCSSProp:_getSetter(e,t)},core:{_removeProperty:_removeProperty,_getMatrix:_getMatrix}},positionAndScale,rotation,all;gsap.utils.checkPrefix=_checkPropPrefix,gsap.core.getStyleSaver=_getStyleSaver,positionAndScale="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",rotation="rotation,rotationX,rotationY,skewX,skewY",all=_forEachName(positionAndScale+","+rotation+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){_transformProps[e]=1})),_forEachName(rotation,(function(e){_config.units[e]="deg",_rotationalProperties[e]=1})),_propertyAliases[all[13]]=positionAndScale+","+rotation,_forEachName("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");_propertyAliases[t[1]]=all[t[0]]})),_forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){_config.units[e]="px"})),gsap.registerPlugin(CSSPlugin);var gsapWithCSS=gsap.registerPlugin(CSSPlugin)||gsap;gsapWithCSS.core.Tween;var GoAnimation=function(){function e(){this.startPoisiton={x:0,y:0},this.endPoisiton={x:1920,y:0},this.curtain={width:1920,height:1080},this.totalTime=5,this.timeLine=gsapWithCSS.timeline()}return e.getInstance=function(){return this.instance||(this.instance=new e),this.instance},e.prototype.init=function(e,t){var r;null===(r=this.timeLine)||void 0===r||r.clear();var n=t.curtain,i=t.totalTime,o=t.admissionMode;i&&(this.totalTime=i),this.setEndPoisiton(n);var a=this.filterData(e,o);this.goAnimationParams=t;for(var s=0;s<a.length;s++){var c=a[s];if(c instanceof Array)for(var u=0;u<c.length;u++){var l=this.totalTime/c.length,d=c[u],h=this._creatTl("#wrap"+d.cid);this._add(h,u*l)}else{l=this.totalTime/a.length,h=this._creatTl("#wrap"+c.cid);this._add(h,s*l)}}return this.timeLine},e.prototype.filterData=function(e,t){var r;if("left"==t)r=_$1.orderBy(e,["baseData.left"],["asc"]);else if("top"==t)r=_$1.orderBy(e,["baseData.top"],["asc"]);else if("topLeft"==t){var n=this.setSpacing(e,"left");r=_$1.orderBy(n,["spacing"],["asc"])}else if("topRight"==t){var i=this.setSpacing(e,"right");r=_$1.orderBy(i,["spacing"],["asc"])}else if("center"==t){var o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["asc"]),_$1.orderBy(o.false,["center.x"],["desc"])]}else if("spaceBetween"==t){o=this.splitArrayForCenter(e,"left");r=[_$1.orderBy(o.true,["center.x"],["desc"]),_$1.orderBy(o.false,["center.x"],["asc"])]}else r=_$1.orderBy(e,["baseData.left"],["asc"]);return r},e.prototype.getSpacing=function(e,t){var r=e.x,n=e.y,i=t.x,o=t.y,a=Math.abs(r-i),s=Math.abs(n-o);return Math.sqrt(a*a+s*s)},e.prototype.creatPosition=function(e,t){var r=0,n=0;return e?("left"===t?(r=e.left,n=e.top):"right"===t&&(r=e.left+e.width,n=e.top),{x:r,y:n}):{x:r,y:n}},e.prototype.setEndPoisiton=function(e){if(e){var t=e.width,r=e.height;this.curtain=e,this.endPoisiton.x=t,this.endPoisiton.y=r}},e.prototype.setSpacing=function(e,t){var r,n=this;return"left"===t?r=this.startPoisiton:"right"===t&&(r=this.endPoisiton),e.forEach((function(e){var i=e.baseData;if(i){var o=n.creatPosition(i,t),a=n.getSpacing(o,r);e.spacing=a}})),e},e.prototype.setCenter=function(e){return e.forEach((function(e){if(e.baseData){var t=e.baseData.left+e.baseData.width/2,r=e.baseData.top+e.baseData.height/2;e.center={x:t,y:r}}})),e},e.prototype.splitArrayForCenter=function(e,t){var r,n=this,i=this.setCenter(e);return"left"!=t&&"right"!=t||(r=_$1.groupBy(i,(function(e){return e.center.x>=n.curtain.width/2}))),"top"!=t&&"bottom"!=t||(r=_$1.groupBy(i,(function(e){return e.center.y>=n.curtain.height/2}))),r},e.prototype._add=function(e,t){this.timeLine.add(e,t)},e.prototype._creatTl=function(e){var t=gsapWithCSS.timeline();return t.add(this._creatTw(e)),t},e.prototype._creatTw=function(e){var t=this.goAnimationParams.params,r=t.delay,n=t.duration,i=t.repeat,o=t.type,a=t.value;return a&&a.length&&a.forEach((function(e){e.delay=r||0,e.repeat=i||0})),gsapWithCSS[o](e,n,a[0],a[1])},e.prototype.in=function(){},e.prototype.out=function(){},e}(),index=GoAnimation.getInstance(),findItemDeep=function(e,t,r){var n=!1,i=function(e){for(var o=0;o<e.length;o++){if(e[o].cid==t){n=e[o],r&&_$1.remove(e,(function(e){return e.cid==t}));break}if(e[o].children)i(e[o].children);else if(e[o].dynamicChildren){if(e[o].dynamicChildren instanceof Map){for(var a=Array.from(e[o].dynamicChildren),s=0;s<a.length;s++)if(a[s]instanceof Array){var c=a[s][1];i(c)}}else if(e[o].dynamicChildren instanceof Array)for(a=e[o].dynamicChildren,s=0;s<a.length;s++)if(a[s]instanceof Array){c=a[s][1];i(c)}}else e[o].stateChildren&&i(e[o].stateChildren)}};return i(e),n||!1};function mitt(e,t){return e=e||new Map,__assign$1(__assign$1({},t),{EventType:e,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);if(n){var i=n.slice().map((function(e){return e(r)}));if(i&&1==i.length)return i[0]}(n=e.get("*"))&&n.slice().map((function(e){e(t,r)}))}})}var RuntimeServer=function(){function e(e){this.root=null,this.vuex=Go.getInstance().VueServer,this.eventType=new Map,(null==e?void 0:e.root)&&(this.root=e.root);var t={setGlobalVar:this.setGlobalVar.bind(this),showComponent:this._showComponent.bind(this),hideComponent:this._hideComponent.bind(this),pageChange:this.pageChange.bind(this),changeDynamicState:this.changeDynamicState.bind(this)};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&this.eventType.set(r,[t[r]])}return e.prototype.findComponentDownward=function(e,t){var r=e.$children;if(r.length)for(var n=0,i=r;n<i.length;n++){var o=i[n];o.$options&&o.$options.propsData&&o.$options.propsData.cid&&(t[o.$options.propsData.cid]=o),o.$children&&o.$children.length&&this.findComponentDownward(o,t)}return t},e.prototype.getAllComponents=function(){var e={};return this.findComponentDownward(this.root,e),e},e.prototype.getComponentByCid=function(e){try{var t=this.getAllComponents()[e];if(!t)throw new Error("The instance was not found");return t}catch(e){console.warn(e)}},e.prototype.getElementByCid=function(e){try{if(!e)throw new Error("Please input the parameters correctly");var t=this.getComponentByCid(e);if(!t)throw new Error("The element was not found");return t.$el}catch(e){console.warn(e)}},e.prototype.setGlobalVar=function(e){try{var t=e.key,r=e.value;if(!(e&&t&&r))throw new Error("An error occurred. Please check whether the incoming parameters are correct! The correct format of data is an object containing key and value");this.setVars(e)}catch(e){console.warn(e)}},e.prototype._showComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!0})}catch(e){console.warn(e)}},e.prototype._hideComponent=function(e){try{if(!e)throw new Error("Please input the parameters correctly");this.changeVis({cid:e,flag:!1})}catch(e){console.warn(e)}},e.prototype.getList=function(e){return e&&"id"===e?this.vuex.callState("list").map((function(e){return e.cid})):this.vuex.callState("list")},e.prototype.getTheme=function(e){var t=this.vuex.callState("theme");return e&&e(t),t},e.prototype.getElement=function(e){var t=this.vuex.callState("list");return findItemDeep(t,e)},e.prototype.changeVis=function(e){return this.vuex.callMutation("changeShow",e)},e.prototype.comToggle=function(e){return this.vuex.callMutation("comToggle",e)},e.prototype.getPageInfo=function(e){var t=this.vuex.callState("caseInfo");return e&&e(t),(null==t?void 0:t.details)?t.details.map((function(e){return{name:e.caseDetailName,path:e.caseDetailPath,id:e.id}})):t},e.prototype.updateComp=function(e){return this.vuex.callMutation("updatComs",e)},e.prototype.changeDynamicState=function(e){return this.vuex.callMutation("changeDynamicState",e)},e.prototype.pageChange=function(e){return this.vuex.callMutation("setPageId",e)},e.prototype.pagePush=function(e,t,r){return void 0===r&&(r={}),this.vuex.callMutation("pagePush",{type:e,value:t,option:r})},e.prototype.activeState=function(e,t){return this.vuex.callMutation("setDynamicActive",{cid:e,name:t})},e.prototype.getVars=function(e){var t=ve.getAllVariables();return e&&e(t),t},e.prototype.setVars=function(e){var t=ve.getVariable(e.key);if(2!=(null==t?void 0:t.model))return this.vuex.callAction("goEditVar",e);console.warn("系统变量禁止修改!")},e}(),Run=function(e){function t(t){var r=e.call(this,t)||this,n=mitt(r.eventType);return r.$emit=n.emit,r.$on=n.on,r.$off=n.off,r}return __extends$2(t,e),Object.defineProperty(t.prototype,"Theme",{get:function(){return this.getTheme()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.getAllComponents()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"GlobalVars",{get:function(){return this.getVars()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.getPageInfo()},enumerable:!1,configurable:!0}),t.prototype.getElementById=function(e){this.getElementByCid(e)},t.prototype.getComponentById=function(e){this.getComponentByCid(e)},t.prototype.getPage=function(){},t}(RuntimeServer),G=function(){function e(e){this.$action=new GoEvent(e),this.instance=new Run(e)}return e.prototype.getGlobalvars=function(){for(var e=ve.getAllVariables(),t=e.map((function(e){return e.mapField})),r={},n=function(t){var n=e.find((function(e){return e.mapField==t}));n&&(r[t]=n.value)},i=0,o=t;i<o.length;i++){n(o[i])}var a=this.instance;return new Proxy(r,{has:function(e,t){return!t&&t in e},get:function(e,t){if(t in e)return e[t];throw new ReferenceError('Prop name "'+t+'" does not exist.')},set:function(e,t,r){if(!e[t])return console.log("变量不存在/不能被修改"),!1;if(e[t]=r,!t||"string"!=typeof t)throw new Error("Invalid key");a.setGlobalVar({key:t,value:r})}})},Object.defineProperty(e.prototype,"globalvars",{get:function(){return this.getGlobalvars()},enumerable:!1,configurable:!0}),e}(),GoEvent=function(e){var t=this;this.setGlobalVars=function(e,r){if(!e||"string"!=typeof e)throw new Error("Invalid key");t.instance.setGlobalVar({key:e,value:r})},this.skipTo=function(e){var r=null==e?void 0:e.params;if(!e||0===Object.keys(e).length)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));if(e.name)t.instance.pagePush("name",e.name,r);else if(e.path)t.instance.pagePush("path",e.path,r);else{if(!e.url)throw new Error("事件跳转发生错误:参数:".concat(e," 不正确,请正确填写!doc: https://anov.cucloud.cn/anov-go-doc/"));window.open(e.url)}},this.toggle=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e)if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.comToggle(i):console.warn("请传入正确的参数!")}else console.warn("请传入正确的参数!");else t.instance.comToggle(e);else console.warn("请传入正确的参数!")},this.show=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._showComponent(i.toString()):console.warn("请传入正确的参数!")}}else t.instance._showComponent(e.toString());else console.warn("请传入正确的参数!")},this.hide=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance._hideComponent(i):console.warn("请传入正确的参数!")}}else t.instance._hideComponent(e);else console.warn("请传入正确的参数!")},this.activeState=function(e,r){t.instance.activeState(e,r)},this.updateComp=function(e){if(e)if("string"!=typeof e&&"number"!=typeof e){if(Array.isArray(e))for(var r=0,n=e;r<n.length;r++){var i=n[r];"string"==typeof i||"number"==typeof i?t.instance.updateComp(i):console.warn("请传入正确的参数!")}}else t.instance.updateComp(e);else console.warn("请传入正确的参数!")},this.instance=new Run(e)},run=function(e){return new G(e)},getDataForRelease=function(e,t){console.log("弃用")},createComponent=function(e,t){return t&&e?Go.getInstance().render(e,t):e?Go.getInstance().render(e):void 0},createComponentForParent=function(e,t,r){return void 0!==r&&e?Go.getInstance().renderForParent(e,t,r):e?Go.getInstance().renderForParent(e,t):void 0},emitEvent=function(e,t){return Go.getInstance().emitEvent(e,t||function(){})},log=function(){};exports.Go=Go,exports.GoAnimation=index,exports.Tool=index$1,exports.createComponent=createComponent,exports.createComponentForParent=createComponentForParent,exports.emitEvent=emitEvent,exports.fxhr=index$2,exports.getDataForRelease=getDataForRelease,exports.goUtils=index$3,exports.log=log,exports.refreshData=refreshData,exports.run=run,exports.store=store}));
64
64
  //# sourceMappingURL=code.umd.js.map