[text] javascriptarena.html

Viewer

copydownloadembedprintName: javascriptarena.html
  1. document.write('<!DOCTYPE html>');
  2. document.write('<!-- Created with https://packager.turbowarp.org/ -->');
  3. document.write('<html>');
  4. document.write('<head>');
  5. document.write('  <meta charset="utf-8">');
  6. document.write('  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">');
  7. document.write('  <!-- We only include this to explicitly loosen the CSP of various packager environments. It does not provide any security. -->');
  8. document.write('  <meta http-equiv="Content-Security-Policy" content="default-src * \'self\' \'unsafe-inline\' \'unsafe-eval\' data: blob:">');
  9. document.write('  <title>Arena (v3</title>');
  10. document.write('  <style>');
  11. document.write('    body {');
  12. document.write('      color: #ffffff;');
  13. document.write('      font-family: sans-serif;');
  14. document.write('      overflow: hidden;');
  15. document.write('      margin: 0;');
  16. document.write('      padding: 0;');
  17. document.write('    }');
  18. document.write('    :root, body.is-fullscreen {');
  19. document.write('      background-color: #000000;');
  20. document.write('    }');
  21. document.write('    [hidden] {');
  22. document.write('      display: none !important;');
  23. document.write('    }');
  24. document.write('    h1 {');
  25. document.write('      font-weight: normal;');
  26. document.write('    }');
  27. document.write('    a {');
  28. document.write('      color: inherit;');
  29. document.write('      text-decoration: underline;');
  30. document.write('      cursor: pointer;');
  31. document.write('    }');
  32. document.write('');
  33. document.write('    #app, #loading, #error, #launch {');
  34. document.write('      position: absolute;');
  35. document.write('      top: 0;');
  36. document.write('      left: 0;');
  37. document.write('      width: 100%;');
  38. document.write('      height: 100%;');
  39. document.write('    }');
  40. document.write('    .screen {');
  41. document.write('      display: flex;');
  42. document.write('      flex-direction: column;');
  43. document.write('      align-items: center;');
  44. document.write('      justify-content: center;');
  45. document.write('      text-align: center;');
  46. document.write('      cursor: default;');
  47. document.write('      user-select: none;');
  48. document.write('      -webkit-user-select: none;');
  49. document.write('      background-color: #000000;');
  50. document.write('    }');
  51. document.write('    #launch {');
  52. document.write('      background-color: rgba(0, 0, 0, 0.7);');
  53. document.write('      cursor: pointer;');
  54. document.write('    }');
  55. document.write('    .green-flag {');
  56. document.write('      width: 80px;');
  57. document.write('      height: 80px;');
  58. document.write('      padding: 16px;');
  59. document.write('      border-radius: 100%;');
  60. document.write('      background: rgba(255, 255, 255, 0.75);');
  61. document.write('      border: 3px solid hsla(0, 100%, 100%, 1);');
  62. document.write('      display: flex;');
  63. document.write('      justify-content: center;');
  64. document.write('      align-items: center;');
  65. document.write('      box-sizing: border-box;');
  66. document.write('    }');
  67. document.write('    #loading {');
  68. document.write('      ');
  69. document.write('    }');
  70. document.write('    .progress-bar-outer {');
  71. document.write('      border: 1px solid currentColor;');
  72. document.write('      height: 10px;');
  73. document.write('      width: 200px;');
  74. document.write('      max-width: 200px;');
  75. document.write('    }');
  76. document.write('    .progress-bar-inner {');
  77. document.write('      height: 100%;');
  78. document.write('      width: 0;');
  79. document.write('      background-color: currentColor;');
  80. document.write('    }');
  81. document.write('    .loading-text, noscript {');
  82. document.write('      font-weight: normal;');
  83. document.write('      font-size: 36px;');
  84. document.write('      margin: 0 0 16px;');
  85. document.write('    }');
  86. document.write('    .loading-image {');
  87. document.write('      margin: 0 0 16px;');
  88. document.write('    }');
  89. document.write('    #error-message, #error-stack {');
  90. document.write('      font-family: monospace;');
  91. document.write('      max-width: 600px;');
  92. document.write('      white-space: pre-wrap;');
  93. document.write('      user-select: text;');
  94. document.write('      -webkit-user-select: text;');
  95. document.write('    }');
  96. document.write('    #error-stack {');
  97. document.write('      text-align: left;');
  98. document.write('      max-height: 200px;');
  99. document.write('      overflow: auto;');
  100. document.write('    }');
  101. document.write('    .control-button {');
  102. document.write('      width: 2rem;');
  103. document.write('      height: 2rem;');
  104. document.write('      padding: 0.375rem;');
  105. document.write('      margin-top: 0.5rem;');
  106. document.write('      margin-bottom: 0.5rem;');
  107. document.write('      user-select: none;');
  108. document.write('      -webkit-user-select: none;');
  109. document.write('      cursor: pointer;');
  110. document.write('      border: 0;');
  111. document.write('      border-radius: 4px;');
  112. document.write('    }');
  113. document.write('    .control-button:hover {');
  114. document.write('      background: #ff4c4c26;');
  115. document.write('    }');
  116. document.write('    .control-button.active {');
  117. document.write('      background: #ff4c4c59;');
  118. document.write('    }');
  119. document.write('    .fullscreen-button {');
  120. document.write('      background: white !important;');
  121. document.write('    }');
  122. document.write('    .standalone-fullscreen-button {');
  123. document.write('      position: absolute;');
  124. document.write('      top: 0;');
  125. document.write('      right: 0;');
  126. document.write('      background-color: rgba(0, 0, 0, 0.5);');
  127. document.write('      border-radius: 0 0 0 4px;');
  128. document.write('      padding: 4px;');
  129. document.write('      cursor: pointer;');
  130. document.write('    }');
  131. document.write('    .sc-canvas {');
  132. document.write('      cursor: auto;');
  133. document.write('    }');
  134. document.write('    .sc-monitor-root[data-opcode^="data_"] .sc-monitor-value-color {');
  135. document.write('      background-color: #ff8c1a;');
  136. document.write('    }');
  137. document.write('    .sc-monitor-row-value-outer {');
  138. document.write('      background-color: #fc662c;');
  139. document.write('    }');
  140. document.write('    .sc-monitor-row-value-editing .sc-monitor-row-value-outer {');
  141. document.write('      background-color: #e25b27;');
  142. document.write('    }');
  143. document.write('    ');
  144. document.write('  </style>');
  145. document.write('  <meta name="theme-color" content="#000000">');
  146. document.write('  ');
  147. document.write('</head>');
  148. document.write('<body>');
  149. document.write('  <div id="app"></div>');
  150. document.write('');
  151. document.write('  <div id="launch" class="screen" hidden title="Click to start">');
  152. document.write('    <div class="green-flag">');
  153. document.write('      <svg viewBox="0 0 16.63 17.5" width="42" height="44">');
  154. document.write('        <defs><style>.cls-1,.cls-2{fill:#4cbf56;stroke:#45993d;stroke-linecap:round;stroke-linejoin:round;}.cls-2{stroke-width:1.5px;}</style></defs>');
  155. document.write('        <path class="cls-1" d="M.75,2A6.44,6.44,0,0,1,8.44,2h0a6.44,6.44,0,0,0,7.69,0V12.4a6.44,6.44,0,0,1-7.69,0h0a6.44,6.44,0,0,0-7.69,0"/>');
  156. document.write('        <line class="cls-2" x1="0.75" y1="16.75" x2="0.75" y2="0.75"/>');
  157. document.write('      </svg>');
  158. document.write('    </div>');
  159. document.write('  </div>');
  160. document.write('');
  161. document.write('  <div id="loading" class="screen">');
  162. document.write('    <noscript>Enable JavaScript</noscript>');
  163. document.write('    ');
  164. document.write('    ');
  165. document.write('    <div class="progress-bar-outer"><div class="progress-bar-inner" id="loading-inner"></div></div>');
  166. document.write('  </div>');
  167. document.write('');
  168. document.write('  <div id="error" class="screen" hidden>');
  169. document.write('    <h1>Error</h1>');
  170. document.write('    <details>');
  171. document.write('      <summary id="error-message"></summary>');
  172. document.write('      <p id="error-stack"></p>');
  173. document.write('    </details>');
  174. document.write('  </div>');
  175. document.write('');
  176. document.write('  <script>/*!');
  177. document.write('Parts of this script are from the TurboWarp Packager <https://packager.turbowarp.org/>, licensed as follows:');
  178. document.write('Copyright (C) 2021-2022 Thomas Weber');
  179. document.write('');
  180. document.write('Licensed under the Apache License, Version 2.0 (the "License");');
  181. document.write('you may not use this file except in compliance with the License.');
  182. document.write('You may obtain a copy of the License at');
  183. document.write('');
  184. document.write('    http://www.apache.org/licenses/LICENSE-2.0');
  185. document.write('');
  186. document.write('Unless required by applicable law or agreed to in writing, software');
  187. document.write('distributed under the License is distributed on an "AS IS" BASIS,');
  188. document.write('WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.');
  189. document.write('See the License for the specific language governing permissions and');
  190. document.write('limitations under the License.');
  191. document.write('');
  192. document.write('Parts of this script are from Scratch <https://scratch.mit.edu/>, licensed as follows:');
  193. document.write('Copyright (c) 2016, Massachusetts Institute of Technology');
  194. document.write('All rights reserved.');
  195. document.write('');
  196. document.write('Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:');
  197. document.write('');
  198. document.write('1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.');
  199. document.write('');
  200. document.write('2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.');
  201. document.write('');
  202. document.write('3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.');
  203. document.write('');
  204. document.write('THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.');
  205. document.write('*/');
  206. document.write('');
  207. document.write('!function(A){function e(e){for(var t,B,n=e[0],s=e[1],r=0,g=[];r<n.length;r++)B=n[r],Object.prototype.hasOwnProperty.call(i,B)&&i[B]&&g.push(i[B][0]),i[B]=0;for(t in s)Object.prototype.hasOwnProperty.call(s,t)&&(A[t]=s[t]);for(o&&o(e);g.length;)g.shift()()}var t={},i={0:0};function B(e){if(t[e])return t[e].exports;var i=t[e]={i:e,l:!1,exports:{}};return A[e].call(i.exports,i,i.exports,B),i.l=!0,i.exports}B.e=function(A){var e=[],t=i[A];if(0!==t)if(t)e.push(t[2]);else{var n=new Promise((function(e,B){t=i[A]=[e,B]}));e.push(t[2]=n);var s,r=document.createElement("script");r.charset="utf-8",r.timeout=120,B.nc&&r.setAttribute("nonce",B.nc),r.src=function(A){return B.p+"scaffolding/"+({1:"vendors~iframe-extension-worker"}[A]||A)+".js"}(A);var o=new Error;s=function(e){r.onerror=r.onload=null,clearTimeout(g);var t=i[A];if(0!==t){if(t){var B=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src;o.message="Loading chunk "+A+" failed.\\n("+B+": "+n+")",o.name="ChunkLoadError",o.type=B,o.request=n,t[1](o)}i[A]=void 0}};var g=setTimeout((function(){s({type:"timeout",target:r})}),12e4);r.onerror=r.onload=s,document.head.appendChild(r)}return Promise.all(e)},B.m=A,B.c=t,B.d=function(A,e,t){B.o(A,e)||Object.defineProperty(A,e,{enumerable:!0,get:t})},B.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},B.t=function(A,e){if(1&e&&(A=B(A)),8&e)return A;if(4&e&&"object"==typeof A&&A&&A.__esModule)return A;var t=Object.create(null);if(B.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:A}),2&e&&"string"!=typeof A)for(var i in A)B.d(t,i,function(e){return A[e]}.bind(null,i));return t},B.n=function(A){var e=A&&A.__esModule?function(){return A.default}:function(){return A};return B.d(e,"a",e),e},B.o=function(A,e){return Object.prototype.hasOwnProperty.call(A,e)},B.p="",B.oe=function(A){throw console.error(A),A};var n=window.webpackJsonp=window.webpackJsonp||[],s=n.push.bind(n);n.push=e,n=n.slice();for(var r=0;r<n.length;r++)e(n[r]);var o=s;B(B.s=455)}([function(A,e,t){var i=t(39),B=t(103),n=t(40),s=n.TYPE,r=t(101),o=r.isNewline,g=r.isName,a=r.isValidEscape,c=r.isNumberStart,Q=r.isIdentifierStart,E=r.charCodeCategory,w=r.isBOM,C=t(28),l=C.cmpStr,I=C.getNewlineLength,h=C.findWhiteSpaceEnd,u=C.consumeEscaped,d=C.consumeName,Y=C.consumeNumber,M=C.consumeBadUrlRemnants;function F(A,e){function t(e){return e<F?A.charCodeAt(e):0}function n(){return f=Y(A,f),Q(t(f),t(f+1),t(f+2))?(k=s.Dimension,void(f=d(A,f))):37===t(f)?(k=s.Percentage,void f++):void(k=s.Number)}function r(){const e=f;return f=d(A,f),l(A,e,f,"url")&&40===t(f)?34===t(f=h(A,f+1))||39===t(f)?(k=s.Function,void(f=e+4)):void function(){for(k=s.Url,f=h(A,f);f<A.length;f++){var e=A.charCodeAt(f);switch(E(e)){case 41:return void f++;case E.Eof:return;case E.WhiteSpace:return 41===t(f=h(A,f))||f>=A.length?void(f<A.length&&f++):(f=M(A,f),void(k=s.BadUrl));case 34:case 39:case 40:case E.NonPrintable:return f=M(A,f),void(k=s.BadUrl);case 92:if(a(e,t(f+1))){f=u(A,f)-1;break}return f=M(A,f),void(k=s.BadUrl)}}}():40===t(f)?(k=s.Function,void f++):void(k=s.Ident)}function C(e){for(e||(e=t(f++)),k=s.String;f<A.length;f++){var i=A.charCodeAt(f);switch(E(i)){case e:return void f++;case E.Eof:return;case E.WhiteSpace:if(o(i))return f+=I(A,f,i),void(k=s.BadString);break;case 92:if(f===A.length-1)break;var B=t(f+1);o(B)?f+=I(A,f+1,B):a(i,B)&&(f=u(A,f)-1)}}}e||(e=new i);for(var F=(A=String(A||"")).length,D=B(e.offsetAndType,F+1),m=B(e.balance,F+1),p=0,U=w(t(0)),f=U,N=0,G=0,y=0;f<F;){var H=A.charCodeAt(f),k=0;switch(m[p]=F,E(H)){case E.WhiteSpace:k=s.WhiteSpace,f=h(A,f+1);break;case 34:C();break;case 35:g(t(f+1))||a(t(f+1),t(f+2))?(k=s.Hash,f=d(A,f+1)):(k=s.Delim,f++);break;case 39:C();break;case 40:k=s.LeftParenthesis,f++;break;case 41:k=s.RightParenthesis,f++;break;case 43:c(H,t(f+1),t(f+2))?n():(k=s.Delim,f++);break;case 44:k=s.Comma,f++;break;case 45:c(H,t(f+1),t(f+2))?n():45===t(f+1)&&62===t(f+2)?(k=s.CDC,f+=3):Q(H,t(f+1),t(f+2))?r():(k=s.Delim,f++);break;case 46:c(H,t(f+1),t(f+2))?n():(k=s.Delim,f++);break;case 47:42===t(f+1)?(k=s.Comment,1===(f=A.indexOf("*/",f+2)+2)&&(f=A.length)):(k=s.Delim,f++);break;case 58:k=s.Colon,f++;break;case 59:k=s.Semicolon,f++;break;case 60:33===t(f+1)&&45===t(f+2)&&45===t(f+3)?(k=s.CDO,f+=4):(k=s.Delim,f++);break;case 64:Q(t(f+1),t(f+2),t(f+3))?(k=s.AtKeyword,f=d(A,f+1)):(k=s.Delim,f++);break;case 91:k=s.LeftSquareBracket,f++;break;case 92:a(H,t(f+1))?r():(k=s.Delim,f++);break;case 93:k=s.RightSquareBracket,f++;break;case 123:k=s.LeftCurlyBracket,f++;break;case 125:k=s.RightCurlyBracket,f++;break;case E.Digit:n();break;case E.NameStart:r();break;case E.Eof:break;default:k=s.Delim,f++}switch(k){case N:for(N=(G=m[y=16777215&G])>>24,m[p]=y,m[y++]=p;y<p;y++)m[y]===F&&(m[y]=p);break;case s.LeftParenthesis:case s.Function:m[p]=G,G=(N=s.RightParenthesis)<<24|p;break;case s.LeftSquareBracket:m[p]=G,G=(N=s.RightSquareBracket)<<24|p;break;case s.LeftCurlyBracket:m[p]=G,G=(N=s.RightCurlyBracket)<<24|p}D[p++]=k<<24|f}for(D[p]=s.EOF<<24|f,m[p]=F,m[F]=F;0!==G;)G=m[y=16777215&G],m[y]=F;return e.source=A,e.firstCharOffset=U,e.offsetAndType=D,e.tokenCount=p,e.balance=m,e.reset(),e.next(),e}Object.keys(n).forEach((function(A){F[A]=n[A]})),Object.keys(r).forEach((function(A){F[A]=r[A]})),Object.keys(C).forEach((function(A){F[A]=C[A]})),A.exports=F},function(A,e,t){const i=t(25);i.enable(),A.exports=i("vm")},function(A,e,t){const i=t(26),B=A=>{if("string"!=typeof A)return!1;for(let e=0;e<A.length;e++){const t=A.charCodeAt(e);if(48===t||9===t)return!1}return!0};class n{static toNumber(A){if("number"==typeof A)return Number.isNaN(A)?0:A;const e=Number(A);return Number.isNaN(e)?0:e}static toBoolean(A){return"boolean"==typeof A?A:"string"==typeof A?""!==A&&"0"!==A&&"false"!==A.toLowerCase():Boolean(A)}static toString(A){return String(A)}static toRgbColorList(A){const e=n.toRgbColorObject(A);return[e.r,e.g,e.b]}static toRgbColorObject(A){let e;return"string"==typeof A&&"#"===A.substring(0,1)?(e=i.hexToRgb(A),e||(e={r:0,g:0,b:0,a:255})):e=i.decimalToRgb(n.toNumber(A)),e}static isWhiteSpace(A){return null===A||"string"==typeof A&&0===A.trim().length}static compare(A,e){let t=Number(A),i=Number(e);if(0===t&&B(A)?t=NaN:0===i&&B(e)&&(i=NaN),isNaN(t)||isNaN(i)){const t=String(A).toLowerCase(),i=String(e).toLowerCase();return t<i?-1:t>i?1:0}return t===1/0&&i===1/0||t===-1/0&&i===-1/0?0:t-i}static isInt(A){return"number"==typeof A?!!isNaN(A)||A===Math.floor(A):"boolean"==typeof A||"string"==typeof A&&A.indexOf(".")<0}static get LIST_INVALID(){return"INVALID"}static get LIST_ALL(){return"ALL"}static toListIndex(A,e,t){if("number"!=typeof A){if("all"===A)return t?n.LIST_ALL:n.LIST_INVALID;if("last"===A)return e>0?e:n.LIST_INVALID;if("random"===A||"any"===A)return e>0?1+Math.floor(Math.random()*e):n.LIST_INVALID}return(A=Math.floor(n.toNumber(A)))<1||A>e?n.LIST_INVALID:A}}A.exports=n},function(A,e){A.exports={BOOLEAN:"Boolean",BUTTON:"button",LABEL:"label",COMMAND:"command",CONDITIONAL:"conditional",EVENT:"event",HAT:"hat",LOOP:"loop",REPORTER:"reporter",XML:"xml"}},function(A,e){A.exports={ANGLE:"angle",BOOLEAN:"Boolean",COLOR:"color",NUMBER:"number",STRING:"string",MATRIX:"matrix",NOTE:"note",IMAGE:"image",COSTUME:"costume",SOUND:"sound"}},function(A,e){A.exports=class{static degToRad(A){return A*Math.PI/180}static radToDeg(A){return 180*A/Math.PI}static clamp(A,e,t){return Math.min(Math.max(A,e),t)}static wrapClamp(A,e,t){const i=t-e+1;return A-Math.floor((A-e)/i)*i}static tan(A){switch(A%=360){case-270:case 90:return 1/0;case-90:case 270:return-1/0;default:return Math.round(1e10*Math.tan(Math.PI*A/180))/1e10}}static reducedSortOrdering(A){const e=A.slice(0).sort((A,e)=>A-e);return A.map(A=>e.indexOf(A))}static inclusiveRandIntWithout(A,e,t){const i=e-A,B=A+Math.floor(Math.random()*i);return B>=t?B+1:B}static scale(A,e,t,i,B){return(A-e)/(t-e)*(B-i)+i}}},function(A,e,t){"use strict";var i=t(152),B=t(153),n=t(74),s=t(73),r=t(72);function o(A,e){return Object.keys(e).forEach((function(t){A[t]=e[t]})),A}A.exports=function A(){var e=o({},r),t="en",g={},a=function(A){return A},c=null,Q="warning",E={};function w(A,e,n){var s="string"==typeof A?A:A.default,r=I(s,"object"==typeof A&&A.id||a(s),n||t);return(r.format||(r.format=B(i(r.message),n||t,E)))(e)}w.rich=function(A,e,n){var s="string"==typeof A?A:A.default,r=I(s,"object"==typeof A&&A.id||a(s),n||t);return(r.toParts||(r.toParts=B.toParts(i(r.message,{tagsType:C}),n||t,E)))(e)};var C="<>";function l(A,e){var t=A[2];return function(A,e){var i="object"==typeof t?function(A,e){return Object.keys(A).reduce((function(t,i){return t[i]=A[i](e),t}),{})}(t,e):t;return"function"==typeof A?A(i):A}}function I(A,e,t){var i=s(t,g)||"en",B=g[i]||(g[i]={}),n=B[e];if("string"==typeof n&&(n=B[e]={message:n}),!n){var r=\'Translation for "\'+e+\'" in "\'+i+\'" is missing\';if("warning"===Q)"undefined"!=typeof console&&console.warn(r);else if("ignore"!==Q)throw new Error(r);var o="function"==typeof c?c(A,e,i)||A:c||A;n=B[e]={message:o}}return n}function h(A,e,i,B,r){"object"==typeof i&&"object"!=typeof B&&(r=B,B=i,i=0);var o=s(r||t,n),g=o&&n[o][A]||u;return B["="+ +e]||B[g(e-i)]||B.other}function u(){return"other"}return E[C]=l,w.setup=function(A){return(A=A||{}).locale&&(t=A.locale),"translations"in A&&(g=A.translations||{}),A.generateId&&(a=A.generateId),"missingReplacement"in A&&(c=A.missingReplacement),A.missingTranslation&&(Q=A.missingTranslation),A.formats&&(A.formats.number&&o(e.number,A.formats.number),A.formats.date&&o(e.date,A.formats.date),A.formats.time&&o(e.time,A.formats.time)),A.types&&((E=A.types)[C]=l),{locale:t,translations:g,generateId:a,missingReplacement:c,missingTranslation:Q,formats:e,types:E}},w.number=function(A,i,B){var n=i&&e.number[i]||e.parseNumberPattern(i)||e.number.default;return new Intl.NumberFormat(B||t,n).format(A)},w.date=function(A,i,B){var n=i&&e.date[i]||e.parseDatePattern(i)||e.date.default;return new Intl.DateTimeFormat(B||t,n).format(A)},w.time=function(A,i,B){var n=i&&e.time[i]||e.parseDatePattern(i)||e.time.default;return new Intl.DateTimeFormat(B||t,n).format(A)},w.select=function(A,e){return e[A]||e.other},w.custom=function(A,e,t,i){return A[1]in E?E[A[1]](A,e)(t,i):t},w.plural=h.bind(null,"cardinal"),w.selectordinal=h.bind(null,"ordinal"),w.namespace=A,w}()},function(A,e,t){const i=t(1);class B{static withoutTrailingDigits(A){let e=A.length-1;for(;e>=0&&"0123456789".indexOf(A.charAt(e))>-1;)e--;return A.slice(0,e+1)}static unusedName(A,e){if(e.indexOf(A)<0)return A;A=B.withoutTrailingDigits(A);let t=2;for(;e.indexOf(A+t)>=0;)t++;return A+t}static splitFirst(A,e){const t=A.indexOf(e);return t>=0?[A.substring(0,t),A.substring(t+1)]:[A,null]}static stringify(A){return JSON.stringify(A,(A,e)=>"number"!=typeof e||e!==1/0&&e!==-1/0&&!isNaN(e)?e:0)}static replaceUnsafeChars(A){if("string"!=typeof A){if(!Array.isArray(A))return i.error("Unexpected input recieved in replaceUnsafeChars"),A;A=String(A)}return A.replace(/[<>&\'"]/g,A=>{switch(A){case"<":return"lt";case">":return"gt";case"&":return"amp";case"\'":return"apos";case\'"\':return"quot"}})}}A.exports=B},function(A,e){const t="!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";A.exports=function(){const A=t.length,e=[];for(let i=0;i<20;i++)e[i]=t.charAt(Math.random()*A);return e.join("")}},function(A,e){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch(A){"object"==typeof window&&(t=window)}A.exports=t},function(A,e,t){const i=t(8),B=t(34);class n{constructor(A,e,t,B){switch(this.id=A||i(),this.name=e,this.type=t,this.isCloud=B,this.type){case n.SCALAR_TYPE:this.value=0;break;case n.LIST_TYPE:this.value=[];break;case n.BROADCAST_MESSAGE_TYPE:this.value=this.name;break;default:throw new Error("Invalid variable type: ".concat(this.type))}}toXML(A){return A=!0===A,\'<variable type="\'.concat(this.type,\'" id="\').concat(this.id,\'" islocal="\').concat(A,\'" iscloud="\').concat(this.isCloud,\'">\').concat(B(this.name),"</variable>")}static get SCALAR_TYPE(){return""}static get LIST_TYPE(){return"list"}static get BROADCAST_MESSAGE_TYPE(){return"broadcast_msg"}}A.exports=n},function(A,e,t){"use strict";t.r(e),t.d(e,"addExtensionsToContext",(function(){return Mi})),t.d(e,"attributes",(function(){return eA})),t.d(e,"bindFramebufferInfo",(function(){return ci})),t.d(e,"bindTransformFeedbackInfo",(function(){return kt})),t.d(e,"bindUniformBlock",(function(){return bt})),t.d(e,"canFilter",(function(){return le})),t.d(e,"canGenerateMipmap",(function(){return Ce})),t.d(e,"createAttribsFromArrays",(function(){return X})),t.d(e,"createAttributeSetters",(function(){return Wt})),t.d(e,"createBufferFromArray",(function(){return $})),t.d(e,"createBufferFromTypedArray",(function(){return S})),t.d(e,"createBufferInfoFromArrays",(function(){return q})),t.d(e,"createBuffersFromArrays",(function(){return AA})),t.d(e,"createFramebufferInfo",(function(){return gi})),t.d(e,"createProgram",(function(){return dt})),t.d(e,"createProgramAsync",(function(){return Mt})),t.d(e,"createProgramFromScripts",(function(){return pt})),t.d(e,"createProgramFromSources",(function(){return Ut})),t.d(e,"createProgramInfo",(function(){return _t})),t.d(e,"createProgramInfoAsync",(function(){return Ft})),t.d(e,"createProgramInfoFromProgram",(function(){return Kt})),t.d(e,"createProgramInfos",(function(){return $t})),t.d(e,"createProgramInfosAsync",(function(){return ei})),t.d(e,"createPrograms",(function(){return qt})),t.d(e,"createProgramsAsync",(function(){return Ai})),t.d(e,"createSampler",(function(){return Ue})),t.d(e,"createSamplers",(function(){return fe})),t.d(e,"createTexture",(function(){return Pe})),t.d(e,"createTextures",(function(){return Oe})),t.d(e,"createTransformFeedback",(function(){return Rt})),t.d(e,"createTransformFeedbackInfo",(function(){return Ht})),t.d(e,"createUniformBlockInfo",(function(){return St})),t.d(e,"createUniformBlockInfoFromProgram",(function(){return Tt})),t.d(e,"createUniformBlockSpecFromProgram",(function(){return xt})),t.d(e,"createUniformSetters",(function(){return yt})),t.d(e,"createVAOAndSetAttributes",(function(){return wi})),t.d(e,"createVAOFromBufferInfo",(function(){return Ci})),t.d(e,"createVertexArrayInfo",(function(){return Ei})),t.d(e,"draw",(function(){return ni})),t.d(e,"drawBufferInfo",(function(){return ii})),t.d(e,"drawObjectList",(function(){return Bi})),t.d(e,"framebuffers",(function(){return Qi})),t.d(e,"getArray_",(function(){return j})),t.d(e,"getBytesPerElementForInternalFormat",(function(){return Qe})),t.d(e,"getContext",(function(){return Di})),t.d(e,"getFormatAndTypeForInternalFormat",(function(){return Ee})),t.d(e,"getGLTypeForTypedArray",(function(){return M})),t.d(e,"getGLTypeForTypedArrayType",(function(){return F})),t.d(e,"getNumComponentsForFormat",(function(){return Ie})),t.d(e,"getNumComponents_",(function(){return L})),t.d(e,"getTypedArrayTypeForGLType",(function(){return D})),t.d(e,"getWebGLContext",(function(){return Fi})),t.d(e,"glEnumToString",(function(){return te})),t.d(e,"isArrayBuffer",(function(){return m})),t.d(e,"isWebGL1",(function(){return ee})),t.d(e,"isWebGL2",(function(){return Ae})),t.d(e,"loadTextureFromUrl",(function(){return be})),t.d(e,"m4",(function(){return d})),t.d(e,"primitives",(function(){return $A})),t.d(e,"programs",(function(){return ti})),t.d(e,"resizeCanvasToDisplaySize",(function(){return mi})),t.d(e,"resizeFramebufferInfo",(function(){return ai})),t.d(e,"resizeTexture",(function(){return We})),t.d(e,"setAttribInfoBufferFromArray",(function(){return _})),t.d(e,"setAttributeDefaults_",(function(){return J})),t.d(e,"setAttributePrefix",(function(){return x})),t.d(e,"setAttributes",(function(){return Ot})),t.d(e,"setBlockUniforms",(function(){return zt})),t.d(e,"setBuffersAndAttributes",(function(){return Vt})),t.d(e,"setDefaultTextureColor",(function(){return de})),t.d(e,"setDefaults",(function(){return hi})),t.d(e,"setEmptyTexture",(function(){return Le})),t.d(e,"setSamplerParameters",(function(){return pe})),t.d(e,"setTextureDefaults_",(function(){return Ye})),t.d(e,"setTextureFilteringForSize",(function(){return Ne})),t.d(e,"setTextureFromArray",(function(){return ve})),t.d(e,"setTextureFromElement",(function(){return ke})),t.d(e,"setTextureParameters",(function(){return me})),t.d(e,"setUniformBlock",(function(){return jt})),t.d(e,"setUniforms",(function(){return Lt})),t.d(e,"setUniformsAndBindTextures",(function(){return Pt})),t.d(e,"textures",(function(){return Ve})),t.d(e,"typedarrays",(function(){return p})),t.d(e,"utils",(function(){return ie})),t.d(e,"v3",(function(){return a})),t.d(e,"vertexArrays",(function(){return li}));');
  208. document.write('/* @license twgl.js 5.5.3 Copyright (c) 2015, Gregg Tavares All Rights Reserved.');
  209. document.write('Available via the MIT license.');
  210. document.write('see: http://github.com/greggman/twgl.js for details */');
  211. document.write('let i=Float32Array;function B(A,e,t){const B=new i(3);return A&&(B[0]=A),e&&(B[1]=e),t&&(B[2]=t),B}function n(A,e,t){return(t=t||new i(3))[0]=A[0]+e[0],t[1]=A[1]+e[1],t[2]=A[2]+e[2],t}function s(A,e,t){return(t=t||new i(3))[0]=A[0]-e[0],t[1]=A[1]-e[1],t[2]=A[2]-e[2],t}function r(A,e,t){t=t||new i(3);const B=A[2]*e[0]-A[0]*e[2],n=A[0]*e[1]-A[1]*e[0];return t[0]=A[1]*e[2]-A[2]*e[1],t[1]=B,t[2]=n,t}function o(A,e){e=e||new i(3);const t=A[0]*A[0]+A[1]*A[1]+A[2]*A[2],B=Math.sqrt(t);return B>1e-5?(e[0]=A[0]/B,e[1]=A[1]/B,e[2]=A[2]/B):(e[0]=0,e[1]=0,e[2]=0),e}function g(A,e,t){return(t=t||new i(3))[0]=A[0]*e[0],t[1]=A[1]*e[1],t[2]=A[2]*e[2],t}var a=Object.freeze({__proto__:null,add:n,copy:function(A,e){return(e=e||new i(3))[0]=A[0],e[1]=A[1],e[2]=A[2],e},create:B,cross:r,distance:function(A,e){const t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return Math.sqrt(t*t+i*i+B*B)},distanceSq:function(A,e){const t=A[0]-e[0],i=A[1]-e[1],B=A[2]-e[2];return t*t+i*i+B*B},divide:function(A,e,t){return(t=t||new i(3))[0]=A[0]/e[0],t[1]=A[1]/e[1],t[2]=A[2]/e[2],t},divScalar:function(A,e,t){return(t=t||new i(3))[0]=A[0]/e,t[1]=A[1]/e,t[2]=A[2]/e,t},dot:function(A,e){return A[0]*e[0]+A[1]*e[1]+A[2]*e[2]},lerp:function(A,e,t,B){return(B=B||new i(3))[0]=A[0]+t*(e[0]-A[0]),B[1]=A[1]+t*(e[1]-A[1]),B[2]=A[2]+t*(e[2]-A[2]),B},lerpV:function(A,e,t,B){return(B=B||new i(3))[0]=A[0]+t[0]*(e[0]-A[0]),B[1]=A[1]+t[1]*(e[1]-A[1]),B[2]=A[2]+t[2]*(e[2]-A[2]),B},length:function(A){return Math.sqrt(A[0]*A[0]+A[1]*A[1]+A[2]*A[2])},lengthSq:function(A){return A[0]*A[0]+A[1]*A[1]+A[2]*A[2]},max:function(A,e,t){return(t=t||new i(3))[0]=Math.max(A[0],e[0]),t[1]=Math.max(A[1],e[1]),t[2]=Math.max(A[2],e[2]),t},min:function(A,e,t){return(t=t||new i(3))[0]=Math.min(A[0],e[0]),t[1]=Math.min(A[1],e[1]),t[2]=Math.min(A[2],e[2]),t},mulScalar:function(A,e,t){return(t=t||new i(3))[0]=A[0]*e,t[1]=A[1]*e,t[2]=A[2]*e,t},multiply:g,negate:function(A,e){return(e=e||new i(3))[0]=-A[0],e[1]=-A[1],e[2]=-A[2],e},normalize:o,setDefaultType:function(A){const e=i;return i=A,e},subtract:s});let c,Q,E,w=Float32Array;function C(A,e){return(e=e||new w(16))[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}function l(A){return(A=A||new w(16))[0]=1,A[1]=0,A[2]=0,A[3]=0,A[4]=0,A[5]=1,A[6]=0,A[7]=0,A[8]=0,A[9]=0,A[10]=1,A[11]=0,A[12]=0,A[13]=0,A[14]=0,A[15]=1,A}function I(A,e){e=e||new w(16);const t=A[0],i=A[1],B=A[2],n=A[3],s=A[4],r=A[5],o=A[6],g=A[7],a=A[8],c=A[9],Q=A[10],E=A[11],C=A[12],l=A[13],I=A[14],h=A[15],u=Q*h,d=I*E,Y=o*h,M=I*g,F=o*E,D=Q*g,m=B*h,p=I*n,U=B*E,f=Q*n,N=B*g,G=o*n,y=a*l,H=C*c,k=s*l,R=C*r,x=s*c,J=a*r,T=t*l,S=C*i,b=t*c,j=a*i,z=t*r,v=s*i,L=u*r+M*c+F*l-(d*r+Y*c+D*l),P=d*i+m*c+f*l-(u*i+p*c+U*l),W=Y*i+p*r+N*l-(M*i+m*r+G*l),O=D*i+U*r+G*c-(F*i+f*r+N*c),V=1/(t*L+s*P+a*W+C*O);return e[0]=V*L,e[1]=V*P,e[2]=V*W,e[3]=V*O,e[4]=V*(d*s+Y*a+D*C-(u*s+M*a+F*C)),e[5]=V*(u*t+p*a+U*C-(d*t+m*a+f*C)),e[6]=V*(M*t+m*s+G*C-(Y*t+p*s+N*C)),e[7]=V*(F*t+f*s+N*a-(D*t+U*s+G*a)),e[8]=V*(y*g+R*E+x*h-(H*g+k*E+J*h)),e[9]=V*(H*n+T*E+j*h-(y*n+S*E+b*h)),e[10]=V*(k*n+S*g+z*h-(R*n+T*g+v*h)),e[11]=V*(J*n+b*g+v*E-(x*n+j*g+z*E)),e[12]=V*(k*Q+J*I+H*o-(x*I+y*o+R*Q)),e[13]=V*(b*I+y*B+S*Q-(T*Q+j*I+H*B)),e[14]=V*(T*o+v*I+R*B-(z*I+k*B+S*o)),e[15]=V*(z*Q+x*B+j*o-(b*o+v*Q+J*B)),e}function h(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2],r=i*A[3]+n*A[7]+s*A[11]+A[15];return t[0]=(i*A[0]+n*A[4]+s*A[8]+A[12])/r,t[1]=(i*A[1]+n*A[5]+s*A[9]+A[13])/r,t[2]=(i*A[2]+n*A[6]+s*A[10]+A[14])/r,t}function u(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2];return t[0]=i*A[0]+n*A[4]+s*A[8],t[1]=i*A[1]+n*A[5]+s*A[9],t[2]=i*A[2]+n*A[6]+s*A[10],t}var d=Object.freeze({__proto__:null,axisRotate:function(A,e,t,i){i=i||new w(16);let B=e[0],n=e[1],s=e[2];const r=Math.sqrt(B*B+n*n+s*s);B/=r,n/=r,s/=r;const o=B*B,g=n*n,a=s*s,c=Math.cos(t),Q=Math.sin(t),E=1-c,C=o+(1-o)*c,l=B*n*E+s*Q,I=B*s*E-n*Q,h=B*n*E-s*Q,u=g+(1-g)*c,d=n*s*E+B*Q,Y=B*s*E+n*Q,M=n*s*E-B*Q,F=a+(1-a)*c,D=A[0],m=A[1],p=A[2],U=A[3],f=A[4],N=A[5],G=A[6],y=A[7],H=A[8],k=A[9],R=A[10],x=A[11];return i[0]=C*D+l*f+I*H,i[1]=C*m+l*N+I*k,i[2]=C*p+l*G+I*R,i[3]=C*U+l*y+I*x,i[4]=h*D+u*f+d*H,i[5]=h*m+u*N+d*k,i[6]=h*p+u*G+d*R,i[7]=h*U+u*y+d*x,i[8]=Y*D+M*f+F*H,i[9]=Y*m+M*N+F*k,i[10]=Y*p+M*G+F*R,i[11]=Y*U+M*y+F*x,A!==i&&(i[12]=A[12],i[13]=A[13],i[14]=A[14],i[15]=A[15]),i},axisRotation:function(A,e,t){t=t||new w(16);let i=A[0],B=A[1],n=A[2];const s=Math.sqrt(i*i+B*B+n*n);i/=s,B/=s,n/=s;const r=i*i,o=B*B,g=n*n,a=Math.cos(e),c=Math.sin(e),Q=1-a;return t[0]=r+(1-r)*a,t[1]=i*B*Q+n*c,t[2]=i*n*Q-B*c,t[3]=0,t[4]=i*B*Q-n*c,t[5]=o+(1-o)*a,t[6]=B*n*Q+i*c,t[7]=0,t[8]=i*n*Q+B*c,t[9]=B*n*Q-i*c,t[10]=g+(1-g)*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},copy:C,create:function(){return new w(16).fill(0)},frustum:function(A,e,t,i,B,n,s){const r=e-A,o=i-t,g=B-n;return(s=s||new w(16))[0]=2*B/r,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*B/o,s[6]=0,s[7]=0,s[8]=(A+e)/r,s[9]=(i+t)/o,s[10]=n/g,s[11]=-1,s[12]=0,s[13]=0,s[14]=B*n/g,s[15]=0,s},getAxis:function(A,e,t){const i=4*e;return(t=t||B())[0]=A[i+0],t[1]=A[i+1],t[2]=A[i+2],t},getTranslation:function(A,e){return(e=e||B())[0]=A[12],e[1]=A[13],e[2]=A[14],e},identity:l,inverse:I,lookAt:function(A,e,t,i){return i=i||new w(16),c=c||B(),Q=Q||B(),E=E||B(),o(s(A,e,E),E),o(r(t,E,c),c),o(r(E,c,Q),Q),i[0]=c[0],i[1]=c[1],i[2]=c[2],i[3]=0,i[4]=Q[0],i[5]=Q[1],i[6]=Q[2],i[7]=0,i[8]=E[0],i[9]=E[1],i[10]=E[2],i[11]=0,i[12]=A[0],i[13]=A[1],i[14]=A[2],i[15]=1,i},multiply:function(A,e,t){t=t||new w(16);const i=A[0],B=A[1],n=A[2],s=A[3],r=A[4],o=A[5],g=A[6],a=A[7],c=A[8],Q=A[9],E=A[10],C=A[11],l=A[12],I=A[13],h=A[14],u=A[15],d=e[0],Y=e[1],M=e[2],F=e[3],D=e[4],m=e[5],p=e[6],U=e[7],f=e[8],N=e[9],G=e[10],y=e[11],H=e[12],k=e[13],R=e[14],x=e[15];return t[0]=i*d+r*Y+c*M+l*F,t[1]=B*d+o*Y+Q*M+I*F,t[2]=n*d+g*Y+E*M+h*F,t[3]=s*d+a*Y+C*M+u*F,t[4]=i*D+r*m+c*p+l*U,t[5]=B*D+o*m+Q*p+I*U,t[6]=n*D+g*m+E*p+h*U,t[7]=s*D+a*m+C*p+u*U,t[8]=i*f+r*N+c*G+l*y,t[9]=B*f+o*N+Q*G+I*y,t[10]=n*f+g*N+E*G+h*y,t[11]=s*f+a*N+C*G+u*y,t[12]=i*H+r*k+c*R+l*x,t[13]=B*H+o*k+Q*R+I*x,t[14]=n*H+g*k+E*R+h*x,t[15]=s*H+a*k+C*R+u*x,t},negate:function(A,e){return(e=e||new w(16))[0]=-A[0],e[1]=-A[1],e[2]=-A[2],e[3]=-A[3],e[4]=-A[4],e[5]=-A[5],e[6]=-A[6],e[7]=-A[7],e[8]=-A[8],e[9]=-A[9],e[10]=-A[10],e[11]=-A[11],e[12]=-A[12],e[13]=-A[13],e[14]=-A[14],e[15]=-A[15],e},ortho:function(A,e,t,i,B,n,s){return(s=s||new w(16))[0]=2/(e-A),s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2/(i-t),s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2/(B-n),s[11]=0,s[12]=(e+A)/(A-e),s[13]=(i+t)/(t-i),s[14]=(n+B)/(B-n),s[15]=1,s},perspective:function(A,e,t,i,B){B=B||new w(16);const n=Math.tan(.5*Math.PI-.5*A),s=1/(t-i);return B[0]=n/e,B[1]=0,B[2]=0,B[3]=0,B[4]=0,B[5]=n,B[6]=0,B[7]=0,B[8]=0,B[9]=0,B[10]=(t+i)*s,B[11]=-1,B[12]=0,B[13]=0,B[14]=t*i*s*2,B[15]=0,B},rotateX:function(A,e,t){t=t||new w(16);const i=A[4],B=A[5],n=A[6],s=A[7],r=A[8],o=A[9],g=A[10],a=A[11],c=Math.cos(e),Q=Math.sin(e);return t[4]=c*i+Q*r,t[5]=c*B+Q*o,t[6]=c*n+Q*g,t[7]=c*s+Q*a,t[8]=c*r-Q*i,t[9]=c*o-Q*B,t[10]=c*g-Q*n,t[11]=c*a-Q*s,A!==t&&(t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},rotateY:function(A,e,t){t=t||new w(16);const i=A[0],B=A[1],n=A[2],s=A[3],r=A[8],o=A[9],g=A[10],a=A[11],c=Math.cos(e),Q=Math.sin(e);return t[0]=c*i-Q*r,t[1]=c*B-Q*o,t[2]=c*n-Q*g,t[3]=c*s-Q*a,t[8]=c*r+Q*i,t[9]=c*o+Q*B,t[10]=c*g+Q*n,t[11]=c*a+Q*s,A!==t&&(t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},rotateZ:function(A,e,t){t=t||new w(16);const i=A[0],B=A[1],n=A[2],s=A[3],r=A[4],o=A[5],g=A[6],a=A[7],c=Math.cos(e),Q=Math.sin(e);return t[0]=c*i+Q*r,t[1]=c*B+Q*o,t[2]=c*n+Q*g,t[3]=c*s+Q*a,t[4]=c*r-Q*i,t[5]=c*o-Q*B,t[6]=c*g-Q*n,t[7]=c*a-Q*s,A!==t&&(t[8]=A[8],t[9]=A[9],t[10]=A[10],t[11]=A[11],t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},rotationX:function(A,e){e=e||new w(16);const t=Math.cos(A),i=Math.sin(A);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=i,e[7]=0,e[8]=0,e[9]=-i,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},rotationY:function(A,e){e=e||new w(16);const t=Math.cos(A),i=Math.sin(A);return e[0]=t,e[1]=0,e[2]=-i,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=i,e[9]=0,e[10]=t,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},rotationZ:function(A,e){e=e||new w(16);const t=Math.cos(A),i=Math.sin(A);return e[0]=t,e[1]=i,e[2]=0,e[3]=0,e[4]=-i,e[5]=t,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},scale:function(A,e,t){t=t||new w(16);const i=e[0],B=e[1],n=e[2];return t[0]=i*A[0],t[1]=i*A[1],t[2]=i*A[2],t[3]=i*A[3],t[4]=B*A[4],t[5]=B*A[5],t[6]=B*A[6],t[7]=B*A[7],t[8]=n*A[8],t[9]=n*A[9],t[10]=n*A[10],t[11]=n*A[11],A!==t&&(t[12]=A[12],t[13]=A[13],t[14]=A[14],t[15]=A[15]),t},scaling:function(A,e){return(e=e||new w(16))[0]=A[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=A[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=A[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},setAxis:function(A,e,t,i){i!==A&&(i=C(A,i));const B=4*t;return i[B+0]=e[0],i[B+1]=e[1],i[B+2]=e[2],i},setDefaultType:function(A){const e=w;return w=A,e},setTranslation:function(A,e,t){return A!==(t=t||l())&&(t[0]=A[0],t[1]=A[1],t[2]=A[2],t[3]=A[3],t[4]=A[4],t[5]=A[5],t[6]=A[6],t[7]=A[7],t[8]=A[8],t[9]=A[9],t[10]=A[10],t[11]=A[11]),t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},transformDirection:u,transformNormal:function(A,e,t){t=t||B();const i=I(A),n=e[0],s=e[1],r=e[2];return t[0]=n*i[0]+s*i[1]+r*i[2],t[1]=n*i[4]+s*i[5]+r*i[6],t[2]=n*i[8]+s*i[9]+r*i[10],t},transformPoint:h,translate:function(A,e,t){t=t||new w(16);const i=e[0],B=e[1],n=e[2],s=A[0],r=A[1],o=A[2],g=A[3],a=A[4],c=A[5],Q=A[6],E=A[7],C=A[8],l=A[9],I=A[10],h=A[11],u=A[12],d=A[13],Y=A[14],M=A[15];return A!==t&&(t[0]=s,t[1]=r,t[2]=o,t[3]=g,t[4]=a,t[5]=c,t[6]=Q,t[7]=E,t[8]=C,t[9]=l,t[10]=I,t[11]=h),t[12]=s*i+a*B+C*n+u,t[13]=r*i+c*B+l*n+d,t[14]=o*i+Q*B+I*n+Y,t[15]=g*i+E*B+h*n+M,t},translation:function(A,e){return(e=e||new w(16))[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=A[0],e[13]=A[1],e[14]=A[2],e[15]=1,e},transpose:function(A,e){if((e=e||new w(16))===A){let t;return t=A[1],A[1]=A[4],A[4]=t,t=A[2],A[2]=A[8],A[8]=t,t=A[3],A[3]=A[12],A[12]=t,t=A[6],A[6]=A[9],A[9]=t,t=A[7],A[7]=A[13],A[13]=t,t=A[11],A[11]=A[14],A[14]=t,e}const t=A[0],i=A[1],B=A[2],n=A[3],s=A[4],r=A[5],o=A[6],g=A[7],a=A[8],c=A[9],Q=A[10],E=A[11],C=A[12],l=A[13],I=A[14],h=A[15];return e[0]=t,e[1]=s,e[2]=a,e[3]=C,e[4]=i,e[5]=r,e[6]=c,e[7]=l,e[8]=B,e[9]=o,e[10]=Q,e[11]=I,e[12]=n,e[13]=g,e[14]=E,e[15]=h,e}});const Y={};{const A=Y;A[5120]=Int8Array,A[5121]=Uint8Array,A[5122]=Int16Array,A[5123]=Uint16Array,A[5124]=Int32Array,A[5125]=Uint32Array,A[5126]=Float32Array,A[32819]=Uint16Array,A[32820]=Uint16Array,A[33635]=Uint16Array,A[5131]=Uint16Array,A[33640]=Uint32Array,A[35899]=Uint32Array,A[35902]=Uint32Array,A[36269]=Uint32Array,A[34042]=Uint32Array}function M(A){if(A instanceof Int8Array)return 5120;if(A instanceof Uint8Array)return 5121;if(A instanceof Uint8ClampedArray)return 5121;if(A instanceof Int16Array)return 5122;if(A instanceof Uint16Array)return 5123;if(A instanceof Int32Array)return 5124;if(A instanceof Uint32Array)return 5125;if(A instanceof Float32Array)return 5126;throw new Error("unsupported typed array type")}function F(A){if(A===Int8Array)return 5120;if(A===Uint8Array)return 5121;if(A===Uint8ClampedArray)return 5121;if(A===Int16Array)return 5122;if(A===Uint16Array)return 5123;if(A===Int32Array)return 5124;if(A===Uint32Array)return 5125;if(A===Float32Array)return 5126;throw new Error("unsupported typed array type")}function D(A){const e=Y[A];if(!e)throw new Error("unknown gl type");return e}const m="undefined"!=typeof SharedArrayBuffer?function(A){return A&&A.buffer&&(A.buffer instanceof ArrayBuffer||A.buffer instanceof SharedArrayBuffer)}:function(A){return A&&A.buffer&&A.buffer instanceof ArrayBuffer};var p=Object.freeze({__proto__:null,getGLTypeForTypedArray:M,getGLTypeForTypedArrayType:F,getTypedArrayTypeForGLType:D,isArrayBuffer:m});function U(A,e){Object.keys(e).forEach((function(t){e.hasOwnProperty(t)&&A.hasOwnProperty(t)&&(e[t]=A[t])}))}function f(...A){console.error(...A)}function N(...A){console.warn(...A)}const G=new Map;function y(A,e){if(!A||"object"!=typeof A)return!1;let t=G.get(e);t||(t=new WeakMap,G.set(e,t));let i=t.get(A);if(void 0===i){const B=Object.prototype.toString.call(A);i=B.substring(8,B.length-1)===e,t.set(A,i)}return i}function H(A,e){return"undefined"!=typeof WebGLRenderbuffer&&y(e,"WebGLRenderbuffer")}function k(A,e){return"undefined"!=typeof WebGLTexture&&y(e,"WebGLTexture")}const R={attribPrefix:""};function x(A){R.attribPrefix=A}function J(A){U(A,R)}function T(A,e,t,i,B){A.bindBuffer(e,t),A.bufferData(e,i,B||35044)}function S(A,e,t,i){if(B=e,"undefined"!=typeof WebGLBuffer&&y(B,"WebGLBuffer"))return e;var B;t=t||34962;const n=A.createBuffer();return T(A,t,n,e,i),n}function b(A){return"indices"===A}function j(A){return A.length?A:A.data}const z=/coord|texture/i,v=/color|colour/i;function L(A,e,t){return A.numComponents||A.size||function(A,e){let t;if(t=z.test(A)?2:v.test(A)?4:3,e%t>0)throw new Error(`Can not guess numComponents for attribute \'${A}\'. Tried ${t} but ${e} values is not evenly divisible by ${t}. You should specify it.`);return t}(e,t||j(A).length)}function P(A,e){if(m(A))return A;if(m(A.data))return A.data;Array.isArray(A)&&(A={data:A});let t=A.type?W(A.type):void 0;return t||(t=b(e)?Uint16Array:Float32Array),new t(A.data)}function W(A){return"number"==typeof A?D(A):A||Float32Array}function O(A,e){return{buffer:e.buffer,numValues:24,type:(t=e.type,"number"==typeof t?t:t?F(t):5126),arrayType:W(e.type)};var t}function V(A,e){const t=e.data||e,i=W(e.type),B=t*i.BYTES_PER_ELEMENT,n=A.createBuffer();return A.bindBuffer(34962,n),A.bufferData(34962,B,e.drawType||35044),{buffer:n,numValues:t,type:F(i),arrayType:i}}function K(A,e,t){const i=P(e,t);return{arrayType:i.constructor,buffer:S(A,i,void 0,e.drawType),type:M(i),numValues:0}}function X(A,e){const t={};return Object.keys(e).forEach((function(i){if(!b(i)){const n=e[i],s=n.attrib||n.name||n.attribName||R.attribPrefix+i;if(n.value){if(!Array.isArray(n.value)&&!m(n.value))throw new Error("array.value is not array or typedarray");t[s]={value:n.value}}else{let e;e=n.buffer&&n.buffer instanceof WebGLBuffer?O:"number"==typeof n||"number"==typeof n.data?V:K;const{buffer:r,type:o,numValues:g,arrayType:a}=e(A,n,i),c=void 0!==n.normalize?n.normalize:(B=a)===Int8Array||B===Uint8Array,Q=L(n,i,g);t[s]={buffer:r,numComponents:Q,type:o,normalize:c,stride:n.stride||0,offset:n.offset||0,divisor:void 0===n.divisor?void 0:n.divisor,drawType:n.drawType}}}var B})),A.bindBuffer(34962,null),t}function _(A,e,t,i){t=P(t),void 0!==i?(A.bindBuffer(34962,e.buffer),A.bufferSubData(34962,i,t)):T(A,34962,e.buffer,t,e.drawType)}const Z=["position","positions","a_position"];function q(A,e,t){const i=X(A,e),B=Object.assign({},t||{});B.attribs=Object.assign({},t?t.attribs:{},i);const n=e.indices;if(n){const e=P(n,"indices");B.indices=S(A,e,34963),B.numElements=e.length,B.elementType=M(e)}else B.numElements||(B.numElements=function(A,e){let t,i;for(i=0;i<Z.length&&(t=Z[i],!(t in e))&&(t=R.attribPrefix+t,!(t in e));++i);i===Z.length&&(t=Object.keys(e)[0]);const B=e[t];if(!B.buffer)return 1;A.bindBuffer(34962,B.buffer);const n=A.getBufferParameter(34962,34660);var s;A.bindBuffer(34962,null);const r=n/(5120===(s=B.type)||5121===s?1:5122===s||5123===s?2:5124===s||5125===s||5126===s?4:0),o=B.numComponents||B.size,g=r/o;if(g%1!=0)throw new Error(`numComponents ${o} not correct for length ${length}`);return g}(A,B.attribs));return B}function $(A,e,t){const i="indices"===t?34963:34962;return S(A,P(e,t),i)}function AA(A,e){const t={};return Object.keys(e).forEach((function(i){t[i]=$(A,e[i],i)})),e.indices?(t.numElements=e.indices.length,t.elementType=M(P(e.indices))):t.numElements=function(A){let e,t;for(t=0;t<Z.length&&(e=Z[t],!(e in A));++t);t===Z.length&&(e=Object.keys(A)[0]);const i=A[e],B=j(i).length;if(void 0===B)return 1;const n=L(i,e),s=B/n;if(B%n>0)throw new Error(`numComponents ${n} not correct for length ${B}`);return s}(e),t}var eA=Object.freeze({__proto__:null,createAttribsFromArrays:X,createBuffersFromArrays:AA,createBufferFromArray:$,createBufferFromTypedArray:S,createBufferInfoFromArrays:q,setAttribInfoBufferFromArray:_,setAttributePrefix:x,setAttributeDefaults_:J,getNumComponents_:L,getArray_:j});const tA=j,iA=L;function BA(A,e){let t=0;return A.push=function(){for(let e=0;e<arguments.length;++e){const i=arguments[e];if(i instanceof Array||m(i))for(let e=0;e<i.length;++e)A[t++]=i[e];else A[t++]=i}},A.reset=function(A){t=A||0},A.numComponents=e,Object.defineProperty(A,"numElements",{get:function(){return this.length/this.numComponents|0}}),A}function nA(A,e,t){return BA(new(t||Float32Array)(A*e),A)}function sA(A){return"indices"!==A}function rA(A,e,t){const i=A.length,B=new Float32Array(3);for(let n=0;n<i;n+=3)t(e,[A[n],A[n+1],A[n+2]],B),A[n]=B[0],A[n+1]=B[1],A[n+2]=B[2]}function oA(A,e,t){t=t||B();const i=e[0],n=e[1],s=e[2];return t[0]=i*A[0]+n*A[1]+s*A[2],t[1]=i*A[4]+n*A[5]+s*A[6],t[2]=i*A[8]+n*A[9]+s*A[10],t}function gA(A,e){return rA(A,e,u),A}function aA(A,e){return rA(A,I(e),oA),A}function cA(A,e){return rA(A,e,h),A}function QA(A,e){return Object.keys(A).forEach((function(t){const i=A[t];t.indexOf("pos")>=0?cA(i,e):t.indexOf("tan")>=0||t.indexOf("binorm")>=0?gA(i,e):t.indexOf("norm")>=0&&aA(i,e)})),A}function EA(A,e,t){return A=A||2,{position:{numComponents:2,data:[(e=e||0)+-1*(A*=.5),(t=t||0)+-1*A,e+1*A,t+-1*A,e+-1*A,t+1*A,e+1*A,t+1*A]},normal:[0,0,1,0,0,1,0,0,1,0,0,1],texcoord:[0,0,1,0,0,1,1,1],indices:[0,1,2,2,1,3]}}function wA(A,e,t,i,B){A=A||1,e=e||1,t=t||1,i=i||1,B=B||l();const n=(t+1)*(i+1),s=nA(3,n),r=nA(3,n),o=nA(2,n);for(let B=0;B<=i;B++)for(let n=0;n<=t;n++){const g=n/t,a=B/i;s.push(A*g-.5*A,0,e*a-.5*e),r.push(0,1,0),o.push(g,a)}const g=t+1,a=nA(3,t*i*2,Uint16Array);for(let A=0;A<i;A++)for(let e=0;e<t;e++)a.push((A+0)*g+e,(A+1)*g+e,(A+0)*g+e+1),a.push((A+1)*g+e,(A+1)*g+e+1,(A+0)*g+e+1);return QA({position:s,normal:r,texcoord:o,indices:a},B)}function CA(A,e,t,i,B,n,s){if(e<=0||t<=0)throw new Error("subdivisionAxis and subdivisionHeight must be > 0");i=i||0,n=n||0;const r=(B=B||Math.PI)-i,o=(s=s||2*Math.PI)-n,g=(e+1)*(t+1),a=nA(3,g),c=nA(3,g),Q=nA(2,g);for(let B=0;B<=t;B++)for(let s=0;s<=e;s++){const g=s/e,E=B/t,w=o*g+n,C=r*E+i,l=Math.sin(w),I=Math.cos(w),h=Math.sin(C),u=I*h,d=Math.cos(C),Y=l*h;a.push(A*u,A*d,A*Y),c.push(u,d,Y),Q.push(1-g,E)}const E=e+1,w=nA(3,e*t*2,Uint16Array);for(let A=0;A<e;A++)for(let e=0;e<t;e++)w.push((e+0)*E+A,(e+0)*E+A+1,(e+1)*E+A),w.push((e+1)*E+A,(e+0)*E+A+1,(e+1)*E+A+1);return{position:a,normal:c,texcoord:Q,indices:w}}const lA=[[3,7,5,1],[6,2,0,4],[6,7,3,2],[0,1,5,4],[7,6,4,5],[2,3,1,0]];function IA(A){const e=(A=A||1)/2,t=[[-e,-e,-e],[+e,-e,-e],[-e,+e,-e],[+e,+e,-e],[-e,-e,+e],[+e,-e,+e],[-e,+e,+e],[+e,+e,+e]],i=[[1,0,0],[-1,0,0],[0,1,0],[0,-1,0],[0,0,1],[0,0,-1]],B=[[1,0],[0,0],[0,1],[1,1]],n=nA(3,24),s=nA(3,24),r=nA(2,24),o=nA(3,12,Uint16Array);for(let A=0;A<6;++A){const e=lA[A];for(let o=0;o<4;++o){const g=t[e[o]],a=i[A],c=B[o];n.push(g),s.push(a),r.push(c)}const g=4*A;o.push(g+0,g+1,g+2),o.push(g+0,g+2,g+3)}return{position:n,normal:s,texcoord:r,indices:o}}function hA(A,e,t,i,B,n,s){if(i<3)throw new Error("radialSubdivisions must be 3 or greater");if(B<1)throw new Error("verticalSubdivisions must be 1 or greater");const r=void 0===n||n,o=void 0===s||s,g=(r?2:0)+(o?2:0),a=(i+1)*(B+1+g),c=nA(3,a),Q=nA(3,a),E=nA(2,a),w=nA(3,i*(B+g/2)*2,Uint16Array),C=i+1,l=Math.atan2(A-e,t),I=Math.cos(l),h=Math.sin(l),u=B+(o?2:0);for(let n=r?-2:0;n<=u;++n){let s,r=n/B,o=t*r;n<0?(o=0,r=1,s=A):n>B?(o=t,r=1,s=e):s=A+n/B*(e-A),-2!==n&&n!==B+2||(s=0,r=0),o-=t/2;for(let A=0;A<C;++A){const e=Math.sin(A*Math.PI*2/i),t=Math.cos(A*Math.PI*2/i);c.push(e*s,o,t*s),n<0?Q.push(0,-1,0):n>B?Q.push(0,1,0):0===s?Q.push(0,0,0):Q.push(e*I,h,t*I),E.push(A/i,1-r)}}for(let A=0;A<B+g;++A)if(!(1===A&&r||A===B+g-2&&o))for(let e=0;e<i;++e)w.push(C*(A+0)+0+e,C*(A+0)+1+e,C*(A+1)+1+e),w.push(C*(A+0)+0+e,C*(A+1)+1+e,C*(A+1)+0+e);return{position:c,normal:Q,texcoord:E,indices:w}}function uA(A,e){e=e||[];const t=[];for(let i=0;i<A.length;i+=4){const B=A[i],n=A.slice(i+1,i+4);n.push.apply(n,e);for(let A=0;A<B;++A)t.push.apply(t,n)}return t}function dA(){const A=[0,0,0,0,150,0,30,0,0,0,150,0,30,150,0,30,0,0,30,0,0,30,30,0,100,0,0,30,30,0,100,30,0,100,0,0,30,60,0,30,90,0,67,60,0,30,90,0,67,90,0,67,60,0,0,0,30,30,0,30,0,150,30,0,150,30,30,0,30,30,150,30,30,0,30,100,0,30,30,30,30,30,30,30,100,0,30,100,30,30,30,60,30,67,60,30,30,90,30,30,90,30,67,60,30,67,90,30,0,0,0,100,0,0,100,0,30,0,0,0,100,0,30,0,0,30,100,0,0,100,30,0,100,30,30,100,0,0,100,30,30,100,0,30,30,30,0,30,30,30,100,30,30,30,30,0,100,30,30,100,30,0,30,30,0,30,60,30,30,30,30,30,30,0,30,60,0,30,60,30,30,60,0,67,60,30,30,60,30,30,60,0,67,60,0,67,60,30,67,60,0,67,90,30,67,60,30,67,60,0,67,90,0,67,90,30,30,90,0,30,90,30,67,90,30,30,90,0,67,90,30,67,90,0,30,90,0,30,150,30,30,90,30,30,90,0,30,150,0,30,150,30,0,150,0,0,150,30,30,150,30,0,150,0,30,150,30,30,150,0,0,0,0,0,0,30,0,150,30,0,0,0,0,150,30,0,150,0],e=uA([18,0,0,1,18,0,0,-1,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,1,0,6,1,0,0,6,0,-1,0,6,1,0,0,6,0,-1,0,6,-1,0,0]),t=uA([18,200,70,120,18,80,70,200,6,70,200,210,6,200,200,70,6,210,100,70,6,210,160,70,6,70,180,210,6,100,70,210,6,76,210,100,6,140,210,80,6,90,130,110,6,160,160,220],[255]),i=A.length/3,B={position:nA(3,i),texcoord:nA(2,i),normal:nA(3,i),color:nA(4,i,Uint8Array),indices:nA(3,i/3,Uint16Array)};B.position.push(A),B.texcoord.push([.22,.19,.22,.79,.34,.19,.22,.79,.34,.79,.34,.19,.34,.19,.34,.31,.62,.19,.34,.31,.62,.31,.62,.19,.34,.43,.34,.55,.49,.43,.34,.55,.49,.55,.49,.43,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,1,1,0,1,0,0,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0]),B.normal.push(e),B.color.push(t);for(let A=0;A<i;++A)B.indices.push(A);return B}function YA(A,e,t,i,B,s,r){if(B<=0)throw new Error("subdivisionDown must be > 0");const o=(r=r||1)-(s=s||0),a=2*(B+1)*4,c=nA(3,a),Q=nA(3,a),E=nA(2,a);function w(A,e,t){return A+(e-A)*t}function C(e,t,r,a,C,l){for(let I=0;I<=B;I++){const h=t/1,u=I/B,d=2*(h-.5),Y=(s+u*o)*Math.PI,M=Math.sin(Y),F=Math.cos(Y),D=w(A,e,M),m=d*i,p=F*A,U=M*D;c.push(m,p,U);const f=n(g([0,M,F],r),a);Q.push(f),E.push(h*C+l,u)}}for(let A=0;A<2;A++){const i=2*(A/1-.5);C(e,A,[1,1,1],[0,0,0],1,0),C(e,A,[0,0,0],[i,0,0],0,0),C(t,A,[1,1,1],[0,0,0],1,0),C(t,A,[0,0,0],[i,0,0],0,1)}const l=nA(3,2*B*4,Uint16Array);function I(A,e){for(let t=0;t<B;++t)l.push(A+t+0,A+t+1,e+t+0),l.push(A+t+1,e+t+1,e+t+0)}const h=B+1;return I(0*h,4*h),I(5*h,7*h),I(6*h,2*h),I(3*h,1*h),{position:c,normal:Q,texcoord:E,indices:l}}function MA(A,e,t,i,B,n){return hA(A,A,e,t,i,B,n)}function FA(A,e,t,i,B,n){if(t<3)throw new Error("radialSubdivisions must be 3 or greater");if(i<3)throw new Error("verticalSubdivisions must be 3 or greater");B=B||0;const s=(n=n||2*Math.PI)-B,r=t+1,o=i+1,g=r*o,a=nA(3,g),c=nA(3,g),Q=nA(2,g),E=nA(3,t*i*2,Uint16Array);for(let n=0;n<o;++n){const o=n/i,g=o*Math.PI*2,E=Math.sin(g),w=A+E*e,C=Math.cos(g),l=C*e;for(let A=0;A<r;++A){const e=A/t,i=B+e*s,n=Math.sin(i),r=Math.cos(i),g=n*w,I=r*w,h=n*E,u=r*E;a.push(g,l,I),c.push(h,C,u),Q.push(e,1-o)}}for(let A=0;A<i;++A)for(let e=0;e<t;++e){const t=1+e,i=1+A;E.push(r*A+e,r*i+e,r*A+t),E.push(r*i+e,r*i+t,r*A+t)}return{position:a,normal:c,texcoord:Q,indices:E}}function DA(A,e,t,i,B){if(e<3)throw new Error("divisions must be at least 3");B=B||1,i=i||0;const n=(e+1)*((t=t||1)+1),s=nA(3,n),r=nA(3,n),o=nA(2,n),g=nA(3,t*e*2,Uint16Array);let a=0;const c=A-i,Q=e+1;for(let A=0;A<=t;++A){const n=i+c*Math.pow(A/t,B);for(let i=0;i<=e;++i){const B=2*Math.PI*i/e,c=n*Math.cos(B),E=n*Math.sin(B);if(s.push(c,0,E),r.push(0,1,0),o.push(1-i/e,A/t),A>0&&i!==e){const A=a+(i+1),e=a+i,t=a+i-Q,B=a+(i+1)-Q;g.push(A,e,t),g.push(A,t,B)}}a+=e+1}return{position:s,normal:r,texcoord:o,indices:g}}function mA(A){return function(e){const t=A.apply(this,Array.prototype.slice.call(arguments,1));return AA(e,t)}}function pA(A){return function(e){const t=A.apply(null,Array.prototype.slice.call(arguments,1));return q(e,t)}}const UA=["numComponents","size","type","normalize","stride","offset","attrib","name","attribName"];function fA(A,e,t,i){i=i||0;const B=A.length;for(let n=0;n<B;++n)e[t+n]=A[n]+i}function NA(A,e){const t=tA(A),i=new t.constructor(e);let B=i;var n,s;return t.numComponents&&t.numElements&&BA(i,t.numComponents),A.data&&(B={data:i},n=A,s=B,UA.forEach((function(A){const e=n[A];void 0!==e&&(s[A]=e)}))),B}const GA=pA(dA),yA=mA(dA),HA=pA(IA),kA=mA(IA),RA=pA(wA),xA=mA(wA),JA=pA(CA),TA=mA(CA),SA=pA(hA),bA=mA(hA),jA=pA(EA),zA=mA(EA),vA=pA(YA),LA=mA(YA),PA=pA(MA),WA=mA(MA),OA=pA(FA),VA=mA(FA),KA=pA(DA),XA=mA(DA),_A=vA,ZA=LA,qA=YA;var $A=Object.freeze({__proto__:null,create3DFBufferInfo:GA,create3DFBuffers:yA,create3DFVertices:dA,createAugmentedTypedArray:nA,createCubeBufferInfo:HA,createCubeBuffers:kA,createCubeVertices:IA,createPlaneBufferInfo:RA,createPlaneBuffers:xA,createPlaneVertices:wA,createSphereBufferInfo:JA,createSphereBuffers:TA,createSphereVertices:CA,createTruncatedConeBufferInfo:SA,createTruncatedConeBuffers:bA,createTruncatedConeVertices:hA,createXYQuadBufferInfo:jA,createXYQuadBuffers:zA,createXYQuadVertices:EA,createCresentBufferInfo:_A,createCresentBuffers:ZA,createCresentVertices:qA,createCrescentBufferInfo:vA,createCrescentBuffers:LA,createCrescentVertices:YA,createCylinderBufferInfo:PA,createCylinderBuffers:WA,createCylinderVertices:MA,createTorusBufferInfo:OA,createTorusBuffers:VA,createTorusVertices:FA,createDiscBufferInfo:KA,createDiscBuffers:XA,createDiscVertices:DA,deindexVertices:function(A){const e=A.indices,t={},i=e.length;return Object.keys(A).filter(sA).forEach((function(B){const n=A[B],s=n.numComponents,r=nA(s,i,n.constructor);for(let A=0;A<i;++A){const t=e[A]*s;for(let A=0;A<s;++A)r.push(n[t+A])}t[B]=r})),t},flattenNormals:function(A){if(A.indices)throw new Error("can not flatten normals of indexed vertices. deindex them first");const e=A.normal,t=e.length;for(let A=0;A<t;A+=9){const t=e[A+0],i=e[A+1],B=e[A+2],n=e[A+3],s=e[A+4],r=e[A+5];let o=t+n+e[A+6],g=i+s+e[A+7],a=B+r+e[A+8];const c=Math.sqrt(o*o+g*g+a*a);o/=c,g/=c,a/=c,e[A+0]=o,e[A+1]=g,e[A+2]=a,e[A+3]=o,e[A+4]=g,e[A+5]=a,e[A+6]=o,e[A+7]=g,e[A+8]=a}return A},makeRandomVertexColors:function(A,e){e=e||{};const t=A.position.numElements,i=nA(4,t,Uint8Array),B=e.rand||function(A,e){return e<3?(t=256,Math.random()*t|0):255;var t};if(A.color=i,A.indices)for(let A=0;A<t;++A)i.push(B(A,0),B(A,1),B(A,2),B(A,3));else{const A=e.vertsPerColor||3,n=t/A;for(let e=0;e<n;++e){const t=[B(e,0),B(e,1),B(e,2),B(e,3)];for(let e=0;e<A;++e)i.push(t)}}return A},reorientDirections:gA,reorientNormals:aA,reorientPositions:cA,reorientVertices:QA,concatVertices:function(A){const e={};let t;for(let i=0;i<A.length;++i){const B=A[i];Object.keys(B).forEach((function(A){e[A]||(e[A]=[]),t||"indices"===A||(t=A);const i=B[A],n=iA(i,A),s=tA(i).length/n;e[A].push(s)}))}const i=e[t],B={};return Object.keys(e).forEach((function(e){const t=function(e){let t,i=0;for(let B=0;B<A.length;++B){const n=A[B][e];i+=tA(n).length,t&&!n.data||(t=n)}return{length:i,spec:t}}(e),n=NA(t.spec,t.length);!function(e,t,i){let B=0,n=0;for(let s=0;s<A.length;++s){const r=A[s][e],o=tA(r);"indices"===e?(fA(o,i,n,B),B+=t[s]):fA(o,i,n),n+=o.length}}(e,i,tA(n)),B[e]=n})),B},duplicateVertices:function(A){const e={};return Object.keys(A).forEach((function(t){const i=A[t],B=tA(i),n=NA(i,B.length);fA(B,tA(n),0),e[t]=n})),e}});function Ae(A){return!!A.texStorage2D}function ee(A){return!A.texStorage2D}const te=function(){const A={},e={};return function(t,i){return function(t){const i=t.constructor.name;if(!A[i]){for(const A in t)if("number"==typeof t[A]){const i=e[t[A]];e[t[A]]=i?`${i} | ${A}`:A}A[i]=!0}}(t),e[i]||("number"==typeof i?"0x"+i.toString(16):i)}}();var ie=Object.freeze({__proto__:null,glEnumToString:te,isWebGL1:ee,isWebGL2:Ae});const Be={textureColor:new Uint8Array([128,192,255,255]),textureOptions:{},crossOrigin:void 0},ne=m,se=function(){let A;return function(){return A=A||("undefined"!=typeof document&&document.createElement?document.createElement("canvas").getContext("2d"):null),A}}(),re=6407,oe=33319,ge={};{const A=ge;A[6406]={numColorComponents:1},A[6409]={numColorComponents:1},A[6410]={numColorComponents:2},A[re]={numColorComponents:3},A[6408]={numColorComponents:4},A[6403]={numColorComponents:1},A[36244]={numColorComponents:1},A[oe]={numColorComponents:2},A[33320]={numColorComponents:2},A[re]={numColorComponents:3},A[36248]={numColorComponents:3},A[6408]={numColorComponents:4},A[36249]={numColorComponents:4},A[6402]={numColorComponents:1},A[34041]={numColorComponents:2}}let ae;function ce(A){if(!ae){const A={6406:{textureFormat:6406,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},6409:{textureFormat:6409,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1,2,2,4],type:[5121,5131,36193,5126]},6410:{textureFormat:6410,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2,4,4,8],type:[5121,5131,36193,5126]}};A[re]={textureFormat:re,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,6,6,12,2],type:[5121,5131,36193,5126,33635]},A[6408]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,8,8,16,2,2],type:[5121,5131,36193,5126,32819,32820]},A[6402]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[5125,5123]},A[33321]={textureFormat:6403,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[1],type:[5121]},A[36756]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[1],type:[5120]},A[33325]={textureFormat:6403,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4,2],type:[5126,5131]},A[33326]={textureFormat:6403,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[4],type:[5126]},A[33330]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[5121]},A[33329]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[1],type:[5120]},A[33332]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[5123]},A[33331]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[5122]},A[33334]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5125]},A[33333]={textureFormat:36244,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5124]},A[33323]={textureFormat:oe,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[2],type:[5121]},A[36757]={textureFormat:oe,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[2],type:[5120]},A[33327]={textureFormat:oe,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[8,4],type:[5126,5131]},A[33328]={textureFormat:oe,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[8],type:[5126]},A[33336]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[5121]},A[33335]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2],type:[5120]},A[33338]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5123]},A[33337]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5122]},A[33340]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[5125]},A[33339]={textureFormat:33320,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[5124]},A[32849]={textureFormat:re,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3],type:[5121]},A[35905]={textureFormat:re,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[5121]},A[36194]={textureFormat:re,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[3,2],type:[5121,33635]},A[36758]={textureFormat:re,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[3],type:[5120]},A[35898]={textureFormat:re,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35899]},A[35901]={textureFormat:re,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6,4],type:[5126,5131,35902]},A[34843]={textureFormat:re,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[12,6],type:[5126,5131]},A[34837]={textureFormat:re,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[5126]},A[36221]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[5121]},A[36239]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[3],type:[5120]},A[36215]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[5123]},A[36233]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[6],type:[5122]},A[36209]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[5125]},A[36227]={textureFormat:36248,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[12],type:[5124]},A[32856]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[5121]},A[35907]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[5121]},A[36759]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[4],type:[5120]},A[32855]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2,4],type:[5121,32820,33640]},A[32854]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4,2],type:[5121,32819]},A[32857]={textureFormat:6408,colorRenderable:!0,textureFilterable:!0,bytesPerElement:[4],type:[33640]},A[34842]={textureFormat:6408,colorRenderable:!1,textureFilterable:!0,bytesPerElement:[16,8],type:[5126,5131]},A[34836]={textureFormat:6408,colorRenderable:!1,textureFilterable:!1,bytesPerElement:[16],type:[5126]},A[36220]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5121]},A[36238]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5120]},A[36975]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[33640]},A[36214]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[5123]},A[36232]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[8],type:[5122]},A[36226]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[5124]},A[36208]={textureFormat:36249,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[16],type:[5125]},A[33189]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[2,4],type:[5123,5125]},A[33190]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5125]},A[36012]={textureFormat:6402,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[5126]},A[35056]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[34042]},A[36013]={textureFormat:34041,colorRenderable:!0,textureFilterable:!1,bytesPerElement:[4],type:[36269]},Object.keys(A).forEach((function(e){const t=A[e];t.bytesPerElementMap={},t.bytesPerElement.forEach((function(A,e){const i=t.type[e];t.bytesPerElementMap[i]=A}))})),ae=A}return ae[A]}function Qe(A,e){const t=ce(A);if(!t)throw"unknown internal format";const i=t.bytesPerElementMap[e];if(void 0===i)throw"unknown internal format";return i}function Ee(A){const e=ce(A);if(!e)throw"unknown internal format";return{format:e.textureFormat,type:e.type[0]}}function we(A){return 0==(A&A-1)}function Ce(A,e,t,i){if(!Ae(A))return we(e)&&we(t);const B=ce(i);if(!B)throw"unknown internal format";return B.colorRenderable&&B.textureFilterable}function le(A){const e=ce(A);if(!e)throw"unknown internal format";return e.textureFilterable}function Ie(A){const e=ge[A];if(!e)throw"unknown format: "+A;return e.numColorComponents}function he(A,e,t){return ne(e)?M(e):t||5121}function ue(A,e,t,i,B){if(B%1!=0)throw"can\'t guess dimensions";if(t||i){if(i){if(!t&&(t=B/i)%1)throw"can\'t guess dimensions"}else if((i=B/t)%1)throw"can\'t guess dimensions"}else{const A=Math.sqrt(B/(34067===e?6:1));A%1==0?(t=A,i=A):(t=B,i=1)}return{width:t,height:i}}function de(A){Be.textureColor=new Uint8Array([255*A[0],255*A[1],255*A[2],255*A[3]])}function Ye(A){U(A,Be),A.textureColor&&de(A.textureColor)}function Me(A,e){void 0!==e.colorspaceConversion&&A.pixelStorei(37443,e.colorspaceConversion),void 0!==e.premultiplyAlpha&&A.pixelStorei(37441,e.premultiplyAlpha),void 0!==e.flipY&&A.pixelStorei(37440,e.flipY)}function Fe(A){A.pixelStorei(3317,4),Ae(A)&&(A.pixelStorei(3314,0),A.pixelStorei(32878,0),A.pixelStorei(3316,0),A.pixelStorei(3315,0),A.pixelStorei(32877,0))}function De(A,e,t,i){var B;i.minMag&&(t.call(A,e,10241,i.minMag),t.call(A,e,10240,i.minMag)),i.min&&t.call(A,e,10241,i.min),i.mag&&t.call(A,e,10240,i.mag),i.wrap&&(t.call(A,e,10242,i.wrap),t.call(A,e,10243,i.wrap),(32879===e||(B=e,"undefined"!=typeof WebGLSampler&&y(B,"WebGLSampler")))&&t.call(A,e,32882,i.wrap)),i.wrapR&&t.call(A,e,32882,i.wrapR),i.wrapS&&t.call(A,e,10242,i.wrapS),i.wrapT&&t.call(A,e,10243,i.wrapT),void 0!==i.minLod&&t.call(A,e,33082,i.minLod),void 0!==i.maxLod&&t.call(A,e,33083,i.maxLod),void 0!==i.baseLevel&&t.call(A,e,33084,i.baseLevel),void 0!==i.maxLevel&&t.call(A,e,33085,i.maxLevel),void 0!==i.compareFunc&&t.call(A,e,34893,i.compareFunc),void 0!==i.compareMode&&t.call(A,e,34892,i.compareMode)}function me(A,e,t){const i=t.target||3553;A.bindTexture(i,e),De(A,i,A.texParameteri,t)}function pe(A,e,t){De(A,e,A.samplerParameteri,t)}function Ue(A,e){const t=A.createSampler();return pe(A,t,e),t}function fe(A,e){const t={};return Object.keys(e).forEach((function(i){t[i]=Ue(A,e[i])})),t}function Ne(A,e,t,i,B,n){n=n||6408;const s=(t=t||Be.textureOptions).target||3553;if(i=i||t.width,B=B||t.height,A.bindTexture(s,e),Ce(A,i,B,n))A.generateMipmap(s);else{const e=le(n)?9729:9728;A.texParameteri(s,10241,e),A.texParameteri(s,10240,e),A.texParameteri(s,10242,33071),A.texParameteri(s,10243,33071)}}function Ge(A){return!0===A.auto||void 0===A.auto&&void 0===A.level}function ye(A,e){return(e=e||{}).cubeFaceOrder||[34069,34070,34071,34072,34073,34074]}function He(A,e){const t=ye(0,e).map((function(A,e){return{face:A,ndx:e}}));return t.sort((function(A,e){return A.face-e.face})),t}function ke(A,e,t,i){const B=(i=i||Be.textureOptions).target||3553,n=i.level||0;let s=t.width,r=t.height;const o=i.internalFormat||i.format||6408,g=Ee(o),a=i.format||g.format,c=i.type||g.type;if(Me(A,i),A.bindTexture(B,e),34067===B){const g=t.width,Q=t.height;let E,w;if(g/6===Q)E=Q,w=[0,0,1,0,2,0,3,0,4,0,5,0];else if(Q/6===g)E=g,w=[0,0,0,1,0,2,0,3,0,4,0,5];else if(g/3==Q/2)E=g/3,w=[0,0,1,0,2,0,0,1,1,1,2,1];else{if(g/2!=Q/3)throw"can\'t figure out cube map from element: "+(t.src?t.src:t.nodeName);E=g/2,w=[0,0,1,0,0,1,1,1,0,2,1,2]}const C=se();C?(C.canvas.width=E,C.canvas.height=E,s=E,r=E,He(0,i).forEach((function(e){const i=w[2*e.ndx+0]*E,B=w[2*e.ndx+1]*E;C.drawImage(t,i,B,E,E,0,0,E,E),A.texImage2D(e.face,n,o,a,c,C.canvas)})),C.canvas.width=1,C.canvas.height=1):"undefined"!=typeof createImageBitmap&&(s=E,r=E,He(0,i).forEach((function(g){const Q=w[2*g.ndx+0]*E,C=w[2*g.ndx+1]*E;A.texImage2D(g.face,n,o,E,E,0,a,c,null),createImageBitmap(t,Q,C,E,E,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then((function(t){Me(A,i),A.bindTexture(B,e),A.texImage2D(g.face,n,o,a,c,t),Ge(i)&&Ne(A,e,i,s,r,o)}))})))}else if(32879===B||35866===B){const e=Math.min(t.width,t.height),i=Math.max(t.width,t.height),s=i/e;if(s%1!=0)throw"can not compute 3D dimensions of element";const r=t.width===i?1:0,g=t.height===i?1:0;A.pixelStorei(3317,1),A.pixelStorei(3314,t.width),A.pixelStorei(32878,0),A.pixelStorei(32877,0),A.texImage3D(B,n,o,e,e,e,0,a,c,null);for(let i=0;i<s;++i){const s=i*e*r,o=i*e*g;A.pixelStorei(3316,s),A.pixelStorei(3315,o),A.texSubImage3D(B,n,0,0,i,e,e,1,a,c,t)}Fe(A)}else A.texImage2D(B,n,o,a,c,t);Ge(i)&&Ne(A,e,i,s,r,o),me(A,e,i)}function Re(){}function xe(A,e){return void 0!==e||function(A){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=A,e.hostname===location.hostname&&e.port===location.port&&e.protocol===location.protocol}{const e=new URL(location.href).origin;return new URL(A,location.href).origin===e}}(A)?e:"anonymous"}function Je(A){return"undefined"!=typeof ImageBitmap&&A instanceof ImageBitmap||"undefined"!=typeof ImageData&&A instanceof ImageData||"undefined"!=typeof HTMLElement&&A instanceof HTMLElement}function Te(A,e,t){return Je(A)?(setTimeout((function(){t(null,A)})),A):function(A,e,t){let i;if(t=t||Re,e=void 0!==e?e:Be.crossOrigin,e=xe(A,e),"undefined"!=typeof Image){i=new Image,void 0!==e&&(i.crossOrigin=e);const B=function(){i.removeEventListener("error",n),i.removeEventListener("load",s),i=null},n=function(){const e="couldn\'t load image: "+A;f(e),t(e,i),B()},s=function(){t(null,i),B()};return i.addEventListener("error",n),i.addEventListener("load",s),i.src=A,i}if("undefined"!=typeof ImageBitmap){let B,n;const s=function(){t(B,n)},r={};e&&(r.mode="cors"),fetch(A,r).then((function(A){if(!A.ok)throw A;return A.blob()})).then((function(A){return createImageBitmap(A,{premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(A){n=A,setTimeout(s)})).catch((function(A){B=A,setTimeout(s)})),i=null}return i}(A,e,t)}function Se(A,e,t){const i=(t=t||Be.textureOptions).target||3553;if(A.bindTexture(i,e),!1===t.color)return;const B=function(A){return A=A||Be.textureColor,ne(A)?A:new Uint8Array([255*A[0],255*A[1],255*A[2],255*A[3]])}(t.color);if(34067===i)for(let e=0;e<6;++e)A.texImage2D(34069+e,0,6408,1,1,0,6408,5121,B);else 32879===i||35866===i?A.texImage3D(i,0,6408,1,1,1,0,6408,5121,B):A.texImage2D(i,0,6408,1,1,0,6408,5121,B)}function be(A,e,t,i){i=i||Re,t=t||Be.textureOptions,Se(A,e,t);return Te((t=Object.assign({},t)).src,t.crossOrigin,(function(B,n){B?i(B,e,n):(ke(A,e,n,t),i(null,e,n))}))}function je(A,e,t,i){i=i||Re;const B=t.src;if(6!==B.length)throw"there must be 6 urls for a cubemap";const n=t.level||0,s=t.internalFormat||t.format||6408,r=Ee(s),o=t.format||r.format,g=t.type||5121,a=t.target||3553;if(34067!==a)throw"target must be TEXTURE_CUBE_MAP";Se(A,e,t),t=Object.assign({},t);let c=6;const Q=[],E=ye(0,t);let w;w=B.map((function(B,r){return Te(B,t.crossOrigin,(C=E[r],function(B,r){--c,B?Q.push(B):r.width!==r.height?Q.push("cubemap face img is not a square: "+r.src):(Me(A,t),A.bindTexture(a,e),5===c?ye().forEach((function(e){A.texImage2D(e,n,s,o,g,r)})):A.texImage2D(C,n,s,o,g,r),Ge(t)&&A.generateMipmap(a)),0===c&&i(Q.length?Q:void 0,e,w)}));var C}))}function ze(A,e,t,i){i=i||Re;const B=t.src,n=t.internalFormat||t.format||6408,s=Ee(n),r=t.format||s.format,o=t.type||5121,g=t.target||35866;if(32879!==g&&35866!==g)throw"target must be TEXTURE_3D or TEXTURE_2D_ARRAY";Se(A,e,t),t=Object.assign({},t);let a=B.length;const c=[];let Q;const E=t.level||0;let w=t.width,C=t.height;const l=B.length;let I=!0;Q=B.map((function(B,s){return Te(B,t.crossOrigin,(h=s,function(B,s){if(--a,B)c.push(B);else{if(Me(A,t),A.bindTexture(g,e),I){I=!1,w=t.width||s.width,C=t.height||s.height,A.texImage3D(g,E,n,w,C,l,0,r,o,null);for(let e=0;e<l;++e)A.texSubImage3D(g,E,0,0,e,w,C,1,r,o,s)}else{let e,t=s;s.width===w&&s.height===C||(e=se(),t=e.canvas,e.canvas.width=w,e.canvas.height=C,e.drawImage(s,0,0,w,C)),A.texSubImage3D(g,E,0,0,h,w,C,1,r,o,t),e&&t===e.canvas&&(e.canvas.width=0,e.canvas.height=0)}Ge(t)&&A.generateMipmap(g)}0===a&&i(c.length?c:void 0,e,Q)}));var h}))}function ve(A,e,t,i){const B=(i=i||Be.textureOptions).target||3553;A.bindTexture(B,e);let n=i.width,s=i.height,r=i.depth;const o=i.level||0,g=i.internalFormat||i.format||6408,a=Ee(g),c=i.format||a.format,Q=i.type||he(0,t,a.type);if(ne(t))t instanceof Uint8ClampedArray&&(t=new Uint8Array(t.buffer));else{const A=D(Q);t=new A(t)}const E=Qe(g,Q),w=t.byteLength/E;if(w%1)throw"length wrong size for format: "+te(A,c);let C;if(32879===B||35866===B)if(n||s||r)!n||s&&r?!s||n&&r?(C=ue(0,B,n,s,w/r),n=C.width,s=C.height):(C=ue(0,B,n,r,w/s),n=C.width,r=C.height):(C=ue(0,B,s,r,w/n),s=C.width,r=C.height);else{const A=Math.cbrt(w);if(A%1!=0)throw"can\'t guess cube size of array of numElements: "+w;n=A,s=A,r=A}else C=ue(0,B,n,s,w),n=C.width,s=C.height;if(Fe(A),A.pixelStorei(3317,i.unpackAlignment||1),Me(A,i),34067===B){const e=w/6*(E/t.BYTES_PER_ELEMENT);He(0,i).forEach(i=>{const B=e*i.ndx,r=t.subarray(B,B+e);A.texImage2D(i.face,o,g,n,s,0,c,Q,r)})}else 32879===B||35866===B?A.texImage3D(B,o,g,n,s,r,0,c,Q,t):A.texImage2D(B,o,g,n,s,0,c,Q,t);return{width:n,height:s,depth:r,type:Q}}function Le(A,e,t){const i=t.target||3553;A.bindTexture(i,e);const B=t.level||0,n=t.internalFormat||t.format||6408,s=Ee(n),r=t.format||s.format,o=t.type||s.type;if(Me(A,t),34067===i)for(let e=0;e<6;++e)A.texImage2D(34069+e,B,n,t.width,t.height,0,r,o,null);else 32879===i||35866===i?A.texImage3D(i,B,n,t.width,t.height,t.depth,0,r,o,null):A.texImage2D(i,B,n,t.width,t.height,0,r,o,null)}function Pe(A,e,t){t=t||Re,e=e||Be.textureOptions;const i=A.createTexture(),B=e.target||3553;let n=e.width||1,s=e.height||1;const r=e.internalFormat||6408;A.bindTexture(B,i),34067===B&&(A.texParameteri(B,10242,33071),A.texParameteri(B,10243,33071));let o=e.src;if(o)if("function"==typeof o&&(o=o(A,e)),"string"==typeof o)be(A,i,e,t);else if(ne(o)||Array.isArray(o)&&("number"==typeof o[0]||Array.isArray(o[0])||ne(o[0]))){const t=ve(A,i,o,e);n=t.width,s=t.height}else Array.isArray(o)&&("string"==typeof o[0]||Je(o[0]))?34067===B?je(A,i,e,t):ze(A,i,e,t):(ke(A,i,o,e),n=o.width,s=o.height);else Le(A,i,e);return Ge(e)&&Ne(A,i,e,n,s,r),me(A,i,e),i}function We(A,e,t,i,B,n){i=i||t.width,B=B||t.height,n=n||t.depth;const s=t.target||3553;A.bindTexture(s,e);const r=t.level||0,o=t.internalFormat||t.format||6408,g=Ee(o),a=t.format||g.format;let c;const Q=t.src;if(c=Q&&(ne(Q)||Array.isArray(Q)&&"number"==typeof Q[0])?t.type||he(0,Q,g.type):t.type||g.type,34067===s)for(let e=0;e<6;++e)A.texImage2D(34069+e,r,o,i,B,0,a,c,null);else 32879===s||35866===s?A.texImage3D(s,r,o,i,B,n,0,a,c,null):A.texImage2D(s,r,o,i,B,0,a,c,null)}function Oe(A,e,t){t=t||Re;let i=0;const B=[],n={},s={};function r(){0===i&&setTimeout((function(){t(B.length?B:void 0,n,s)}),0)}return Object.keys(e).forEach((function(t){const o=e[t];let g;var a;("string"==typeof(a=o.src)||Array.isArray(a)&&"string"==typeof a[0])&&(g=function(A,e,n){s[t]=n,--i,A&&B.push(A),r()},++i),n[t]=Pe(A,o,g)})),r(),n}var Ve=Object.freeze({__proto__:null,setTextureDefaults_:Ye,createSampler:Ue,createSamplers:fe,setSamplerParameters:pe,createTexture:Pe,setEmptyTexture:Le,setTextureFromArray:ve,loadTextureFromUrl:be,setTextureFromElement:ke,setTextureFilteringForSize:Ne,setTextureParameters:me,setDefaultTextureColor:de,createTextures:Oe,resizeTexture:We,canGenerateMipmap:Ce,canFilter:le,getNumComponentsForFormat:Ie,getBytesPerElementForInternalFormat:Qe,getFormatAndTypeForInternalFormat:Ee});const Ke=f,Xe=N;function _e(A){return"undefined"!=typeof document&&document.getElementById?document.getElementById(A):null}const Ze={};function qe(A,e){return Ze[e].bindPoint}function $e(A,e){return function(t){A.uniform1i(e,t)}}function At(A,e){return function(t){A.uniform1iv(e,t)}}function et(A,e){return function(t){A.uniform2iv(e,t)}}function tt(A,e){return function(t){A.uniform3iv(e,t)}}function it(A,e){return function(t){A.uniform4iv(e,t)}}function Bt(A,e,t,i){const B=qe(0,e);return Ae(A)?function(e){let n,s;!e||k(0,e)?(n=e,s=null):(n=e.texture,s=e.sampler),A.uniform1i(i,t),A.activeTexture(33984+t),A.bindTexture(B,n),A.bindSampler(t,s)}:function(e){A.uniform1i(i,t),A.activeTexture(33984+t),A.bindTexture(B,e)}}function nt(A,e,t,i,B){const n=qe(0,e),s=new Int32Array(B);for(let A=0;A<B;++A)s[A]=t+A;return Ae(A)?function(e){A.uniform1iv(i,s),e.forEach((function(e,i){let B,r;A.activeTexture(33984+s[i]),!e||k(0,e)?(B=e,r=null):(B=e.texture,r=e.sampler),A.bindSampler(t,r),A.bindTexture(n,B)}))}:function(e){A.uniform1iv(i,s),e.forEach((function(e,t){A.activeTexture(33984+s[t]),A.bindTexture(n,e)}))}}function st(A,e){return function(t){if(t.value)switch(A.disableVertexAttribArray(e),t.value.length){case 4:A.vertexAttrib4fv(e,t.value);break;case 3:A.vertexAttrib3fv(e,t.value);break;case 2:A.vertexAttrib2fv(e,t.value);break;case 1:A.vertexAttrib1fv(e,t.value);break;default:throw new Error("the length of a float constant value must be between 1 and 4!")}else A.bindBuffer(34962,t.buffer),A.enableVertexAttribArray(e),A.vertexAttribPointer(e,t.numComponents||t.size,t.type||5126,t.normalize||!1,t.stride||0,t.offset||0),A.vertexAttribDivisor&&A.vertexAttribDivisor(e,t.divisor||0)}}function rt(A,e){return function(t){if(t.value){if(A.disableVertexAttribArray(e),4!==t.value.length)throw new Error("The length of an integer constant value must be 4!");A.vertexAttrib4iv(e,t.value)}else A.bindBuffer(34962,t.buffer),A.enableVertexAttribArray(e),A.vertexAttribIPointer(e,t.numComponents||t.size,t.type||5124,t.stride||0,t.offset||0),A.vertexAttribDivisor&&A.vertexAttribDivisor(e,t.divisor||0)}}function ot(A,e){return function(t){if(t.value){if(A.disableVertexAttribArray(e),4!==t.value.length)throw new Error("The length of an unsigned integer constant value must be 4!");A.vertexAttrib4uiv(e,t.value)}else A.bindBuffer(34962,t.buffer),A.enableVertexAttribArray(e),A.vertexAttribIPointer(e,t.numComponents||t.size,t.type||5125,t.stride||0,t.offset||0),A.vertexAttribDivisor&&A.vertexAttribDivisor(e,t.divisor||0)}}function gt(A,e,t){const i=t.size,B=t.count;return function(t){A.bindBuffer(34962,t.buffer);const n=t.size||t.numComponents||i,s=n/B,r=t.type||5126,o=Ze[r].size*n,g=t.normalize||!1,a=t.offset||0,c=o/B;for(let i=0;i<B;++i)A.enableVertexAttribArray(e+i),A.vertexAttribPointer(e+i,s,r,g,o,a+c*i),A.vertexAttribDivisor&&A.vertexAttribDivisor(e+i,t.divisor||0)}}Ze[5126]={Type:Float32Array,size:4,setter:function(A,e){return function(t){A.uniform1f(e,t)}},arraySetter:function(A,e){return function(t){A.uniform1fv(e,t)}}},Ze[35664]={Type:Float32Array,size:8,setter:function(A,e){return function(t){A.uniform2fv(e,t)}},cols:2},Ze[35665]={Type:Float32Array,size:12,setter:function(A,e){return function(t){A.uniform3fv(e,t)}},cols:3},Ze[35666]={Type:Float32Array,size:16,setter:function(A,e){return function(t){A.uniform4fv(e,t)}},cols:4},Ze[5124]={Type:Int32Array,size:4,setter:$e,arraySetter:At},Ze[35667]={Type:Int32Array,size:8,setter:et,cols:2},Ze[35668]={Type:Int32Array,size:12,setter:tt,cols:3},Ze[35669]={Type:Int32Array,size:16,setter:it,cols:4},Ze[5125]={Type:Uint32Array,size:4,setter:function(A,e){return function(t){A.uniform1ui(e,t)}},arraySetter:function(A,e){return function(t){A.uniform1uiv(e,t)}}},Ze[36294]={Type:Uint32Array,size:8,setter:function(A,e){return function(t){A.uniform2uiv(e,t)}},cols:2},Ze[36295]={Type:Uint32Array,size:12,setter:function(A,e){return function(t){A.uniform3uiv(e,t)}},cols:3},Ze[36296]={Type:Uint32Array,size:16,setter:function(A,e){return function(t){A.uniform4uiv(e,t)}},cols:4},Ze[35670]={Type:Uint32Array,size:4,setter:$e,arraySetter:At},Ze[35671]={Type:Uint32Array,size:8,setter:et,cols:2},Ze[35672]={Type:Uint32Array,size:12,setter:tt,cols:3},Ze[35673]={Type:Uint32Array,size:16,setter:it,cols:4},Ze[35674]={Type:Float32Array,size:32,setter:function(A,e){return function(t){A.uniformMatrix2fv(e,!1,t)}},rows:2,cols:2},Ze[35675]={Type:Float32Array,size:48,setter:function(A,e){return function(t){A.uniformMatrix3fv(e,!1,t)}},rows:3,cols:3},Ze[35676]={Type:Float32Array,size:64,setter:function(A,e){return function(t){A.uniformMatrix4fv(e,!1,t)}},rows:4,cols:4},Ze[35685]={Type:Float32Array,size:32,setter:function(A,e){return function(t){A.uniformMatrix2x3fv(e,!1,t)}},rows:2,cols:3},Ze[35686]={Type:Float32Array,size:32,setter:function(A,e){return function(t){A.uniformMatrix2x4fv(e,!1,t)}},rows:2,cols:4},Ze[35687]={Type:Float32Array,size:48,setter:function(A,e){return function(t){A.uniformMatrix3x2fv(e,!1,t)}},rows:3,cols:2},Ze[35688]={Type:Float32Array,size:48,setter:function(A,e){return function(t){A.uniformMatrix3x4fv(e,!1,t)}},rows:3,cols:4},Ze[35689]={Type:Float32Array,size:64,setter:function(A,e){return function(t){A.uniformMatrix4x2fv(e,!1,t)}},rows:4,cols:2},Ze[35690]={Type:Float32Array,size:64,setter:function(A,e){return function(t){A.uniformMatrix4x3fv(e,!1,t)}},rows:4,cols:3},Ze[35678]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:3553},Ze[35680]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:34067},Ze[35679]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:32879},Ze[35682]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:3553},Ze[36289]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:35866},Ze[36292]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:35866},Ze[36293]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:34067},Ze[36298]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:3553},Ze[36299]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:32879},Ze[36300]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:34067},Ze[36303]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:35866},Ze[36306]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:3553},Ze[36307]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:32879},Ze[36308]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:34067},Ze[36311]={Type:null,size:0,setter:Bt,arraySetter:nt,bindPoint:35866};const at={};at[5126]={size:4,setter:st},at[35664]={size:8,setter:st},at[35665]={size:12,setter:st},at[35666]={size:16,setter:st},at[5124]={size:4,setter:rt},at[35667]={size:8,setter:rt},at[35668]={size:12,setter:rt},at[35669]={size:16,setter:rt},at[5125]={size:4,setter:ot},at[36294]={size:8,setter:ot},at[36295]={size:12,setter:ot},at[36296]={size:16,setter:ot},at[35670]={size:4,setter:rt},at[35671]={size:8,setter:rt},at[35672]={size:12,setter:rt},at[35673]={size:16,setter:rt},at[35674]={size:4,setter:gt,count:2},at[35675]={size:9,setter:gt,count:3},at[35676]={size:16,setter:gt,count:4};const ct=/ERROR:\\s*\\d+:(\\d+)/gi;const Qt=/^[ \\t]*\\n/;function Et(A){let e=0;return Qt.test(A)&&(e=1,A=A.replace(Qt,"")),{lineOffset:e,shaderSource:A}}function wt(A,e){return A.errorCallback(e),A.callback&&setTimeout(()=>{A.callback(`${e}\\n${A.errors.join("\\n")}`)}),null}function Ct(A,e,t,i){i=i||Ke;if(!A.getShaderParameter(t,35713)){const B=A.getShaderInfoLog(t),{lineOffset:n,shaderSource:s}=Et(A.getShaderSource(t)),r=`${function(A,e="",t=0){const i=[...e.matchAll(ct)],B=new Map(i.map((A,t)=>{const B=parseInt(A[1]),n=i[t+1],s=n?n.index:e.length;return[B-1,e.substring(A.index,s)]}));return A.split("\\n").map((A,e)=>{const i=B.get(e);return`${e+1+t}: ${A}${i?"\\n\\n^^^ "+i:""}`}).join("\\n")}(s,B,n)}\\nError compiling ${te(A,e)}: ${B}`;return i(r),r}return""}function lt(A,e,t){let i,B,n;if("function"==typeof e&&(t=e,e=void 0),"function"==typeof A)t=A,A=void 0;else if(A&&!Array.isArray(A)){const e=A;t=e.errorCallback,A=e.attribLocations,i=e.transformFeedbackVaryings,B=e.transformFeedbackMode,n=e.callback}const s=t||Ke,r=[],o={errorCallback(A,...e){r.push(A),s(A,...e)},transformFeedbackVaryings:i,transformFeedbackMode:B,callback:n,errors:r};{let t={};Array.isArray(A)?A.forEach((function(A,i){t[A]=e?e[i]:i})):t=A||{},o.attribLocations=t}return o}const It=["VERTEX_SHADER","FRAGMENT_SHADER"];const ht=(A=0)=>new Promise(e=>setTimeout(e,A));function ut(A,e,t){const i=A.createProgram(),{attribLocations:B,transformFeedbackVaryings:n,transformFeedbackMode:s}=lt(t);for(let t=0;t<e.length;++t){let B=e[t];if("string"==typeof B){const e=_e(B),n=e?e.text:B;let s=A[It[t]];e&&e.type&&(s=((r=e.type).indexOf("frag")>=0?35632:r.indexOf("vert")>=0?35633:void 0)||s),B=A.createShader(s),A.shaderSource(B,Et(n).shaderSource),A.compileShader(B),A.attachShader(i,B)}}var r;Object.entries(B).forEach(([e,t])=>A.bindAttribLocation(i,t,e));{let e=n;e&&(e.attribs&&(e=e.attribs),Array.isArray(e)||(e=Object.keys(e)),A.transformFeedbackVaryings(i,e,s||35981))}return A.linkProgram(i),i}function dt(A,e,t,i,B){const n=lt(t,i,B),s=new Set(e),r=ut(A,e,n);function o(A,e){const t=mt(A,e,n.errorCallback);return t&&function(A,e,t){const i=A.getAttachedShaders(e);for(const e of i)t.has(e)&&A.deleteShader(e);A.deleteProgram(e)}(A,e,s),t}if(!n.callback)return o(A,r)?void 0:r;Dt(A,r).then(()=>{const e=o(A,r);n.callback(e,e?void 0:r)})}function Yt(A){return function(e,t,...i){return new Promise((B,n)=>{const s=lt(...i);s.callback=(A,e)=>{A?n(A):B(e)},A(e,t,s)})}}const Mt=Yt(dt),Ft=Yt(_t);async function Dt(A,e){const t=A.getExtension("KHR_parallel_shader_compile"),i=t?(A,e)=>A.getProgramParameter(e,t.COMPLETION_STATUS_KHR):()=>!0;let B=0;do{await ht(B),B=1e3/60}while(!i(A,e))}function mt(A,e,t){t=t||Ke;if(!A.getProgramParameter(e,35714)){const i=A.getProgramInfoLog(e);t("Error in program linking: "+i);return`${i}\\n${A.getAttachedShaders(e).map(e=>Ct(A,A.getShaderParameter(e,A.SHADER_TYPE),e,t)).filter(A=>A).join("\\n")}`}}function pt(A,e,t,i,B){const n=lt(t,i,B),s=[];for(const A of e){const e=_e(A);if(!e)return wt(n,"unknown script element: "+A);s.push(e.text)}return dt(A,s,n)}function Ut(A,e,t,i,B){return dt(A,e,t,i,B)}function ft(A){const e=A.name;return e.startsWith("gl_")||e.startsWith("webgl_")}const Nt=/(\\.|\\[|]|\\w+)/g;function Gt(A,e,t,i){const B=A.split(Nt).filter(A=>""!==A);let n=0,s="";for(;;){const A=B[n++];s+=A;const o=(r=A[0])>="0"&&r<="9",g=o?parseInt(A):A;o&&(s+=B[n++]);if(n===B.length){t[g]=e;break}{const A=B[n++],e="["===A,r=t[g]||(e?[]:{});t[g]=r,t=r,i[s]=i[s]||function(A){return function(e){vt(A,e)}}(r),s+=A}}var r}function yt(A,e){let t=0;function i(e,i,B){const n=i.name.endsWith("[0]"),s=i.type,r=Ze[s];if(!r)throw new Error("unknown type: 0x"+s.toString(16));let o;if(r.bindPoint){const e=t;t+=i.size,o=n?r.arraySetter(A,s,e,B,i.size):r.setter(A,s,e,B,i.size)}else o=r.arraySetter&&n?r.arraySetter(A,B):r.setter(A,B);return o.location=B,o}const B={},n={},s=A.getProgramParameter(e,35718);for(let t=0;t<s;++t){const s=A.getActiveUniform(e,t);if(ft(s))continue;let r=s.name;r.endsWith("[0]")&&(r=r.substr(0,r.length-3));const o=A.getUniformLocation(e,s.name);if(o){const A=i(0,s,o);B[r]=A,Gt(r,A,n,B)}}return B}function Ht(A,e){const t={},i=A.getProgramParameter(e,35971);for(let B=0;B<i;++B){const i=A.getTransformFeedbackVarying(e,B);t[i.name]={index:B,type:i.type,size:i.size}}return t}function kt(A,e,t){e.transformFeedbackInfo&&(e=e.transformFeedbackInfo),t.attribs&&(t=t.attribs);for(const i in t){const B=e[i];if(B){const e=t[i];e.offset?A.bindBufferRange(35982,B.index,e.buffer,e.offset,e.size):A.bindBufferBase(35982,B.index,e.buffer)}}}function Rt(A,e,t){const i=A.createTransformFeedback();return A.bindTransformFeedback(36386,i),A.useProgram(e.program),kt(A,e,t),A.bindTransformFeedback(36386,null),i}function xt(A,e){const t=A.getProgramParameter(e,35718),i=[],B=[];for(let n=0;n<t;++n){B.push(n),i.push({});const t=A.getActiveUniform(e,n);i[n].name=t.name}[["UNIFORM_TYPE","type"],["UNIFORM_SIZE","size"],["UNIFORM_BLOCK_INDEX","blockNdx"],["UNIFORM_OFFSET","offset"]].forEach((function(t){const n=t[0],s=t[1];A.getActiveUniforms(e,B,A[n]).forEach((function(A,e){i[e][s]=A}))}));const n={},s=A.getProgramParameter(e,35382);for(let t=0;t<s;++t){const i=A.getActiveUniformBlockName(e,t),B={index:A.getUniformBlockIndex(e,i),usedByVertexShader:A.getActiveUniformBlockParameter(e,t,35396),usedByFragmentShader:A.getActiveUniformBlockParameter(e,t,35398),size:A.getActiveUniformBlockParameter(e,t,35392),uniformIndices:A.getActiveUniformBlockParameter(e,t,35395)};B.used=B.usedByVertexShader||B.usedByFragmentShader,n[i]=B}return{blockSpecs:n,uniformData:i}}const Jt=/\\[\\d+\\]\\.$/;function Tt(A,e,t,i){const B=t.blockSpecs,n=t.uniformData,s=B[i];if(!s)return Xe("no uniform block object named:",i),{name:i,uniforms:{}};const r=new ArrayBuffer(s.size),o=A.createBuffer(),g=s.index;A.bindBuffer(35345,o),A.uniformBlockBinding(e,s.index,g);let a=i+".";Jt.test(a)&&(a=a.replace(Jt,"."));const c={},Q={},E={};return s.uniformIndices.forEach((function(A){const e=n[A];let t=e.name;t.startsWith(a)&&(t=t.substr(a.length));const i=t.endsWith("[0]");i&&(t=t.substr(0,t.length-3));const B=Ze[e.type],s=B.Type,o=i?((B.size+((g=16)-1))/g|0)*g*e.size:B.size*e.size;var g;const w=new s(r,e.offset,o/s.BYTES_PER_ELEMENT);c[t]=w;const C=function(A,e,t,i){if(e||t){i=i||1;const e=A.length/4;return function(t){let B=0,n=0;for(let s=0;s<e;++s){for(let e=0;e<i;++e)A[B++]=t[n++];B+=4-i}}}return function(e){e.length?A.set(e):A[0]=e}}(w,i,B.rows,B.cols);Q[t]=C,Gt(t,C,E,Q)})),{name:i,array:r,asFloat:new Float32Array(r),buffer:o,uniforms:c,setters:Q}}function St(A,e,t){return Tt(A,e.program,e.uniformBlockSpec,t)}function bt(A,e,t){const i=(e.uniformBlockSpec||e).blockSpecs[t.name];if(i){const e=i.index;return A.bindBufferRange(35345,e,t.buffer,t.offset||0,t.array.byteLength),!0}return!1}function jt(A,e,t){bt(A,e,t)&&A.bufferData(35345,t.array,35048)}function zt(A,e){const t=A.setters;for(const A in e){const i=t[A];if(i){i(e[A])}}}function vt(A,e){for(const t in e){const i=A[t];"function"==typeof i?i(e[t]):vt(A[t],e[t])}}function Lt(A,...e){const t=A.uniformSetters||A,i=e.length;for(let A=0;A<i;++A){const i=e[A];if(Array.isArray(i)){const A=i.length;for(let e=0;e<A;++e)Lt(t,i[e])}else for(const A in i){const e=t[A];e&&e(i[A])}}}const Pt=Lt;function Wt(A,e){const t={},i=A.getProgramParameter(e,35721);for(let B=0;B<i;++B){const i=A.getActiveAttrib(e,B);if(ft(i))continue;const n=A.getAttribLocation(e,i.name),s=at[i.type],r=s.setter(A,n,s);r.location=n,t[i.name]=r}return t}function Ot(A,e){for(const t in e){const i=A[t];i&&i(e[t])}}function Vt(A,e,t){t.vertexArrayObject?A.bindVertexArray(t.vertexArrayObject):(Ot(e.attribSetters||e,t.attribs),t.indices&&A.bindBuffer(34963,t.indices))}function Kt(A,e){const t={program:e,uniformSetters:yt(A,e),attribSetters:Wt(A,e)};return Ae(A)&&(t.uniformBlockSpec=xt(A,e),t.transformFeedbackInfo=Ht(A,e)),t}const Xt=/\\s|{|}|;/;function _t(A,e,t,i,B){const n=lt(t,i,B),s=[];if(e=e.map((function(A){if(!Xt.test(A)){const e=_e(A);if(e)A=e.text;else{const e="no element with id: "+A;n.errorCallback(e),s.push(e)}}return A})),s.length)return wt(n,"");const r=n.callback;r&&(n.callback=(e,t)=>{r(e,e?void 0:Kt(A,t))});const o=Ut(A,e,n);return o?Kt(A,o):null}function Zt(A,e,t,i,B){for(const[n,s]of Object.entries(e)){const r={...B},o=t[n];Array.isArray(o)||Object.assign(r,o);const g=mt(A,s,r.errorCallback);if(g){for(const t of Object.values(e)){const e=A.getAttachedShaders(t);A.deleteProgram(t);for(const t of e)i.has(t)||A.deleteShader(t)}return g}}}function qt(A,e,t={}){const i=new Set,B=Object.fromEntries(Object.entries(e).map(([e,B])=>{const n={...t},s=Array.isArray(B)?B:B.shaders;return Array.isArray(B)||Object.assign(n,B),s.forEach(i.add,i),[e,ut(A,s,n)]}));if(t.callback)return void async function(A,e){for(const t of Object.values(e))await Dt(A,t)}(A,B).then(()=>{const n=Zt(A,B,e,i,t);t.callback(n,n?void 0:B)});return Zt(A,B,e,i,t)?void 0:B}function $t(A,e,t){function i(A,e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Kt(A,t)]))}const B=(t=lt(t)).callback;B&&(t.callback=(e,t)=>{B(e,e?void 0:i(A,t))});const n=qt(A,e,t);if(!B&&n)return i(A,n)}const Ai=Yt(qt),ei=Yt($t);var ti=Object.freeze({__proto__:null,createAttributeSetters:Wt,createProgram:dt,createProgramAsync:Mt,createPrograms:qt,createProgramsAsync:Ai,createProgramFromScripts:pt,createProgramFromSources:Ut,createProgramInfo:_t,createProgramInfoAsync:Ft,createProgramInfos:$t,createProgramInfosAsync:ei,createProgramInfoFromProgram:Kt,createUniformSetters:yt,createUniformBlockSpecFromProgram:xt,createUniformBlockInfoFromProgram:Tt,createUniformBlockInfo:St,createTransformFeedback:Rt,createTransformFeedbackInfo:Ht,bindTransformFeedbackInfo:kt,setAttributes:Ot,setBuffersAndAttributes:Vt,setUniforms:Lt,setUniformsAndBindTextures:Pt,setUniformBlock:jt,setBlockUniforms:zt,bindUniformBlock:bt});function ii(A,e,t,i,B,n){t=void 0===t?4:t;const s=e.indices,r=e.elementType,o=void 0===i?e.numElements:i;B=void 0===B?0:B,r||s?void 0!==n?A.drawElementsInstanced(t,o,void 0===r?5123:e.elementType,B,n):A.drawElements(t,o,void 0===r?5123:e.elementType,B):void 0!==n?A.drawArraysInstanced(t,B,o,n):A.drawArrays(t,B,o)}function Bi(A,e){let t=null,i=null;e.forEach((function(e){if(!1===e.active)return;const B=e.programInfo,n=e.vertexArrayInfo||e.bufferInfo;let s=!1;const r=void 0===e.type?4:e.type;B!==t&&(t=B,A.useProgram(B.program),s=!0),(s||n!==i)&&(i&&i.vertexArrayObject&&!n.vertexArrayObject&&A.bindVertexArray(null),i=n,Vt(A,B,n)),Lt(B,e.uniforms),ii(A,n,r,e.count,e.offset,e.instanceCount)})),i&&i.vertexArrayObject&&A.bindVertexArray(null)}var ni=Object.freeze({__proto__:null,drawBufferInfo:ii,drawObjectList:Bi});const si=[{format:6408,type:5121,min:9729,wrap:33071},{format:34041}],ri={};ri[34041]=33306,ri[6401]=36128,ri[36168]=36128,ri[6402]=36096,ri[33189]=36096,ri[33190]=36096,ri[36012]=36096,ri[35056]=33306,ri[36013]=33306;const oi={};oi[32854]=!0,oi[32855]=!0,oi[36194]=!0,oi[34041]=!0,oi[33189]=!0,oi[6401]=!0,oi[36168]=!0;function gi(A,e,t,i){const B=A.createFramebuffer();A.bindFramebuffer(36160,B),t=t||A.drawingBufferWidth,i=i||A.drawingBufferHeight;const n=[],s={framebuffer:B,attachments:[],width:t,height:i};return(e=e||si).forEach((function(e,B){let r=e.attachment;const o=e.samples,g=e.format;let a=e.attachmentPoint||function(A,e){return ri[A]||ri[e]}(g,e.internalFormat);if(a||(a=36064+B),function(A){return A>=36064&&A<36096}(a)&&n.push(a),!r)if(void 0!==o||function(A){return oi[A]}(g))r=A.createRenderbuffer(),A.bindRenderbuffer(36161,r),o>1?A.renderbufferStorageMultisample(36161,o,g,t,i):A.renderbufferStorage(36161,g,t,i);else{const B=Object.assign({},e);B.width=t,B.height=i,void 0===B.auto&&(B.auto=!1,B.min=B.min||B.minMag||9729,B.mag=B.mag||B.minMag||9729,B.wrapS=B.wrapS||B.wrap||33071,B.wrapT=B.wrapT||B.wrap||33071),r=Pe(A,B)}if(H(0,r))A.framebufferRenderbuffer(36160,a,36161,r);else{if(!k(0,r))throw new Error("unknown attachment type");void 0!==e.layer?A.framebufferTextureLayer(36160,a,r,e.level||0,e.layer):A.framebufferTexture2D(36160,a,e.target||3553,r,e.level||0)}s.attachments.push(r)})),A.drawBuffers&&A.drawBuffers(n),s}function ai(A,e,t,i,B){i=i||A.drawingBufferWidth,B=B||A.drawingBufferHeight,e.width=i,e.height=B,(t=t||si).forEach((function(t,n){const s=e.attachments[n],r=t.format,o=t.samples;if(void 0!==o||H(0,s))A.bindRenderbuffer(36161,s),o>1?A.renderbufferStorageMultisample(36161,o,r,i,B):A.renderbufferStorage(36161,r,i,B);else{if(!k(0,s))throw new Error("unknown attachment type");We(A,s,t,i,B)}}))}function ci(A,e,t){t=t||36160,e?(A.bindFramebuffer(t,e.framebuffer),A.viewport(0,0,e.width,e.height)):(A.bindFramebuffer(t,null),A.viewport(0,0,A.drawingBufferWidth,A.drawingBufferHeight))}var Qi=Object.freeze({__proto__:null,bindFramebufferInfo:ci,createFramebufferInfo:gi,resizeFramebufferInfo:ai});function Ei(A,e,t){const i=A.createVertexArray();return A.bindVertexArray(i),e.length||(e=[e]),e.forEach((function(e){Vt(A,e,t)})),A.bindVertexArray(null),{numElements:t.numElements,elementType:t.elementType,vertexArrayObject:i}}function wi(A,e,t,i){const B=A.createVertexArray();return A.bindVertexArray(B),Ot(e,t),i&&A.bindBuffer(34963,i),A.bindVertexArray(null),B}function Ci(A,e,t){return wi(A,e.attribSetters||e,t.attribs,t.indices)}var li=Object.freeze({__proto__:null,createVertexArrayInfo:Ei,createVAOAndSetAttributes:wi,createVAOFromBufferInfo:Ci});const Ii={addExtensionsToContext:!0};function hi(A){U(A,Ii),J(A),Ye(A)}const ui=/^(.*?)_/;function di(A,e){te(A,0);const t=A.getExtension(e);if(t){const i={},B=ui.exec(e)[1],n="_"+B;for(const e in t){const s=t[e],r="function"==typeof s,o=r?B:n;let g=e;e.endsWith(o)&&(g=e.substring(0,e.length-o.length)),void 0!==A[g]?r||A[g]===s||N(g,A[g],s,e):r?A[g]=function(A){return function(){return A.apply(t,arguments)}}(s):(A[g]=s,i[g]=s)}i.constructor={name:t.constructor.name},te(i,0)}return t}const Yi=["ANGLE_instanced_arrays","EXT_blend_minmax","EXT_color_buffer_float","EXT_color_buffer_half_float","EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2","EXT_frag_depth","EXT_sRGB","EXT_shader_texture_lod","EXT_texture_filter_anisotropic","OES_element_index_uint","OES_standard_derivatives","OES_texture_float","OES_texture_float_linear","OES_texture_half_float","OES_texture_half_float_linear","OES_vertex_array_object","WEBGL_color_buffer_float","WEBGL_compressed_texture_atc","WEBGL_compressed_texture_etc1","WEBGL_compressed_texture_pvrtc","WEBGL_compressed_texture_s3tc","WEBGL_compressed_texture_s3tc_srgb","WEBGL_depth_texture","WEBGL_draw_buffers"];function Mi(A){for(let e=0;e<Yi.length;++e)di(A,Yi[e])}function Fi(A,e){return function(A,e){const t=["webgl","experimental-webgl"];let i=null;for(let B=0;B<t.length;++B)if(i=A.getContext(t[B],e),i){Ii.addExtensionsToContext&&Mi(i);break}return i}(A,e)}function Di(A,e){return function(A,e){const t=["webgl2","webgl","experimental-webgl"];let i=null;for(let B=0;B<t.length;++B)if(i=A.getContext(t[B],e),i){Ii.addExtensionsToContext&&Mi(i);break}return i}(A,e)}function mi(A,e){e=e||1,e=Math.max(0,e);const t=A.clientWidth*e|0,i=A.clientHeight*e|0;return(A.width!==t||A.height!==i)&&(A.width=t,A.height=i,!0)}},function(A,e,t){"use strict";(function(A){');
  212. document.write('/*!');
  213. document.write(' * The buffer module from node.js, for the browser.');
  214. document.write(' *');
  215. document.write(' * @author   Feross Aboukhadijeh <http://feross.org>');
  216. document.write(' * @license  MIT');
  217. document.write(' */');
  218. document.write('var i=t(136),B=t(137),n=t(138);function s(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(A,e){if(s()<e)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(A=new Uint8Array(e)).__proto__=o.prototype:(null===A&&(A=new o(e)),A.length=e),A}function o(A,e,t){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(A,e,t);if("number"==typeof A){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(this,A)}return g(this,A,e,t)}function g(A,e,t,i){if("number"==typeof e)throw new TypeError(\'"value" argument must not be a number\');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(A,e,t,i){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("\'offset\' is out of bounds");if(e.byteLength<t+(i||0))throw new RangeError("\'length\' is out of bounds");e=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i);o.TYPED_ARRAY_SUPPORT?(A=e).__proto__=o.prototype:A=Q(A,e);return A}(A,e,t,i):"string"==typeof e?function(A,e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError(\'"encoding" must be a valid string encoding\');var i=0|w(e,t),B=(A=r(A,i)).write(e,t);B!==i&&(A=A.slice(0,B));return A}(A,e,t):function(A,e){if(o.isBuffer(e)){var t=0|E(e.length);return 0===(A=r(A,t)).length||e.copy(A,0,0,t),A}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(i=e.length)!=i?r(A,0):Q(A,e);if("Buffer"===e.type&&n(e.data))return Q(A,e.data)}var i;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(A,e)}function a(A){if("number"!=typeof A)throw new TypeError(\'"size" argument must be a number\');if(A<0)throw new RangeError(\'"size" argument must not be negative\')}function c(A,e){if(a(e),A=r(A,e<0?0:0|E(e)),!o.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)A[t]=0;return A}function Q(A,e){var t=e.length<0?0:0|E(e.length);A=r(A,t);for(var i=0;i<t;i+=1)A[i]=255&e[i];return A}function E(A){if(A>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|A}function w(A,e){if(o.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var t=A.length;if(0===t)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return j(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return z(A).length;default:if(i)return j(A).length;e=(""+e).toLowerCase(),i=!0}}function C(A,e,t){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if((t>>>=0)<=(e>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return N(this,e,t);case"utf8":case"utf-8":return p(this,e,t);case"ascii":return U(this,e,t);case"latin1":case"binary":return f(this,e,t);case"base64":return m(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,e,t);default:if(i)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),i=!0}}function l(A,e,t){var i=A[e];A[e]=A[t],A[t]=i}function I(A,e,t,i,B){if(0===A.length)return-1;if("string"==typeof t?(i=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=B?0:A.length-1),t<0&&(t=A.length+t),t>=A.length){if(B)return-1;t=A.length-1}else if(t<0){if(!B)return-1;t=0}if("string"==typeof e&&(e=o.from(e,i)),o.isBuffer(e))return 0===e.length?-1:h(A,e,t,i,B);if("number"==typeof e)return e&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?B?Uint8Array.prototype.indexOf.call(A,e,t):Uint8Array.prototype.lastIndexOf.call(A,e,t):h(A,[e],t,i,B);throw new TypeError("val must be string, number or Buffer")}function h(A,e,t,i,B){var n,s=1,r=A.length,o=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(A.length<2||e.length<2)return-1;s=2,r/=2,o/=2,t/=2}function g(A,e){return 1===s?A[e]:A.readUInt16BE(e*s)}if(B){var a=-1;for(n=t;n<r;n++)if(g(A,n)===g(e,-1===a?0:n-a)){if(-1===a&&(a=n),n-a+1===o)return a*s}else-1!==a&&(n-=n-a),a=-1}else for(t+o>r&&(t=r-o),n=t;n>=0;n--){for(var c=!0,Q=0;Q<o;Q++)if(g(A,n+Q)!==g(e,Q)){c=!1;break}if(c)return n}return-1}function u(A,e,t,i){t=Number(t)||0;var B=A.length-t;i?(i=Number(i))>B&&(i=B):i=B;var n=e.length;if(n%2!=0)throw new TypeError("Invalid hex string");i>n/2&&(i=n/2);for(var s=0;s<i;++s){var r=parseInt(e.substr(2*s,2),16);if(isNaN(r))return s;A[t+s]=r}return s}function d(A,e,t,i){return v(j(e,A.length-t),A,t,i)}function Y(A,e,t,i){return v(function(A){for(var e=[],t=0;t<A.length;++t)e.push(255&A.charCodeAt(t));return e}(e),A,t,i)}function M(A,e,t,i){return Y(A,e,t,i)}function F(A,e,t,i){return v(z(e),A,t,i)}function D(A,e,t,i){return v(function(A,e){for(var t,i,B,n=[],s=0;s<A.length&&!((e-=2)<0);++s)t=A.charCodeAt(s),i=t>>8,B=t%256,n.push(B),n.push(i);return n}(e,A.length-t),A,t,i)}function m(A,e,t){return 0===e&&t===A.length?i.fromByteArray(A):i.fromByteArray(A.slice(e,t))}function p(A,e,t){t=Math.min(A.length,t);for(var i=[],B=e;B<t;){var n,s,r,o,g=A[B],a=null,c=g>239?4:g>223?3:g>191?2:1;if(B+c<=t)switch(c){case 1:g<128&&(a=g);break;case 2:128==(192&(n=A[B+1]))&&(o=(31&g)<<6|63&n)>127&&(a=o);break;case 3:n=A[B+1],s=A[B+2],128==(192&n)&&128==(192&s)&&(o=(15&g)<<12|(63&n)<<6|63&s)>2047&&(o<55296||o>57343)&&(a=o);break;case 4:n=A[B+1],s=A[B+2],r=A[B+3],128==(192&n)&&128==(192&s)&&128==(192&r)&&(o=(15&g)<<18|(63&n)<<12|(63&s)<<6|63&r)>65535&&o<1114112&&(a=o)}null===a?(a=65533,c=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),B+=c}return function(A){var e=A.length;if(e<=4096)return String.fromCharCode.apply(String,A);var t="",i=0;for(;i<e;)t+=String.fromCharCode.apply(String,A.slice(i,i+=4096));return t}(i)}e.Buffer=o,e.SlowBuffer=function(A){+A!=A&&(A=0);return o.alloc(+A)},e.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==A.TYPED_ARRAY_SUPPORT?A.TYPED_ARRAY_SUPPORT:function(){try{var A=new Uint8Array(1);return A.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===A.foo()&&"function"==typeof A.subarray&&0===A.subarray(1,1).byteLength}catch(A){return!1}}(),e.kMaxLength=s(),o.poolSize=8192,o._augment=function(A){return A.__proto__=o.prototype,A},o.from=function(A,e,t){return g(null,A,e,t)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(A,e,t){return function(A,e,t,i){return a(e),e<=0?r(A,e):void 0!==t?"string"==typeof i?r(A,e).fill(t,i):r(A,e).fill(t):r(A,e)}(null,A,e,t)},o.allocUnsafe=function(A){return c(null,A)},o.allocUnsafeSlow=function(A){return c(null,A)},o.isBuffer=function(A){return!(null==A||!A._isBuffer)},o.compare=function(A,e){if(!o.isBuffer(A)||!o.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(A===e)return 0;for(var t=A.length,i=e.length,B=0,n=Math.min(t,i);B<n;++B)if(A[B]!==e[B]){t=A[B],i=e[B];break}return t<i?-1:i<t?1:0},o.isEncoding=function(A){switch(String(A).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(A,e){if(!n(A))throw new TypeError(\'"list" argument must be an Array of Buffers\');if(0===A.length)return o.alloc(0);var t;if(void 0===e)for(e=0,t=0;t<A.length;++t)e+=A[t].length;var i=o.allocUnsafe(e),B=0;for(t=0;t<A.length;++t){var s=A[t];if(!o.isBuffer(s))throw new TypeError(\'"list" argument must be an Array of Buffers\');s.copy(i,B),B+=s.length}return i},o.byteLength=w,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var A=this.length;if(A%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<A;e+=2)l(this,e,e+1);return this},o.prototype.swap32=function(){var A=this.length;if(A%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<A;e+=4)l(this,e,e+3),l(this,e+1,e+2);return this},o.prototype.swap64=function(){var A=this.length;if(A%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<A;e+=8)l(this,e,e+7),l(this,e+1,e+6),l(this,e+2,e+5),l(this,e+3,e+4);return this},o.prototype.toString=function(){var A=0|this.length;return 0===A?"":0===arguments.length?p(this,0,A):C.apply(this,arguments)},o.prototype.equals=function(A){if(!o.isBuffer(A))throw new TypeError("Argument must be a Buffer");return this===A||0===o.compare(this,A)},o.prototype.inspect=function(){var A="",t=e.INSPECT_MAX_BYTES;return this.length>0&&(A=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(A+=" ... ")),"<Buffer "+A+">"},o.prototype.compare=function(A,e,t,i,B){if(!o.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===t&&(t=A?A.length:0),void 0===i&&(i=0),void 0===B&&(B=this.length),e<0||t>A.length||i<0||B>this.length)throw new RangeError("out of range index");if(i>=B&&e>=t)return 0;if(i>=B)return-1;if(e>=t)return 1;if(this===A)return 0;for(var n=(B>>>=0)-(i>>>=0),s=(t>>>=0)-(e>>>=0),r=Math.min(n,s),g=this.slice(i,B),a=A.slice(e,t),c=0;c<r;++c)if(g[c]!==a[c]){n=g[c],s=a[c];break}return n<s?-1:s<n?1:0},o.prototype.includes=function(A,e,t){return-1!==this.indexOf(A,e,t)},o.prototype.indexOf=function(A,e,t){return I(this,A,e,t,!0)},o.prototype.lastIndexOf=function(A,e,t){return I(this,A,e,t,!1)},o.prototype.write=function(A,e,t,i){if(void 0===e)i="utf8",t=this.length,e=0;else if(void 0===t&&"string"==typeof e)i=e,t=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(t)?(t|=0,void 0===i&&(i="utf8")):(i=t,t=void 0)}var B=this.length-e;if((void 0===t||t>B)&&(t=B),A.length>0&&(t<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var n=!1;;)switch(i){case"hex":return u(this,A,e,t);case"utf8":case"utf-8":return d(this,A,e,t);case"ascii":return Y(this,A,e,t);case"latin1":case"binary":return M(this,A,e,t);case"base64":return F(this,A,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,A,e,t);default:if(n)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),n=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(A,e,t){var i="";t=Math.min(A.length,t);for(var B=e;B<t;++B)i+=String.fromCharCode(127&A[B]);return i}function f(A,e,t){var i="";t=Math.min(A.length,t);for(var B=e;B<t;++B)i+=String.fromCharCode(A[B]);return i}function N(A,e,t){var i=A.length;(!e||e<0)&&(e=0),(!t||t<0||t>i)&&(t=i);for(var B="",n=e;n<t;++n)B+=b(A[n]);return B}function G(A,e,t){for(var i=A.slice(e,t),B="",n=0;n<i.length;n+=2)B+=String.fromCharCode(i[n]+256*i[n+1]);return B}function y(A,e,t){if(A%1!=0||A<0)throw new RangeError("offset is not uint");if(A+e>t)throw new RangeError("Trying to access beyond buffer length")}function H(A,e,t,i,B,n){if(!o.isBuffer(A))throw new TypeError(\'"buffer" argument must be a Buffer instance\');if(e>B||e<n)throw new RangeError(\'"value" argument is out of bounds\');if(t+i>A.length)throw new RangeError("Index out of range")}function k(A,e,t,i){e<0&&(e=65535+e+1);for(var B=0,n=Math.min(A.length-t,2);B<n;++B)A[t+B]=(e&255<<8*(i?B:1-B))>>>8*(i?B:1-B)}function R(A,e,t,i){e<0&&(e=4294967295+e+1);for(var B=0,n=Math.min(A.length-t,4);B<n;++B)A[t+B]=e>>>8*(i?B:3-B)&255}function x(A,e,t,i,B,n){if(t+i>A.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function J(A,e,t,i,n){return n||x(A,0,t,4),B.write(A,e,t,i,23,4),t+4}function T(A,e,t,i,n){return n||x(A,0,t,8),B.write(A,e,t,i,52,8),t+8}o.prototype.slice=function(A,e){var t,i=this.length;if((A=~~A)<0?(A+=i)<0&&(A=0):A>i&&(A=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e<A&&(e=A),o.TYPED_ARRAY_SUPPORT)(t=this.subarray(A,e)).__proto__=o.prototype;else{var B=e-A;t=new o(B,void 0);for(var n=0;n<B;++n)t[n]=this[n+A]}return t},o.prototype.readUIntLE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=this[A],B=1,n=0;++n<e&&(B*=256);)i+=this[A+n]*B;return i},o.prototype.readUIntBE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=this[A+--e],B=1;e>0&&(B*=256);)i+=this[A+--e]*B;return i},o.prototype.readUInt8=function(A,e){return e||y(A,1,this.length),this[A]},o.prototype.readUInt16LE=function(A,e){return e||y(A,2,this.length),this[A]|this[A+1]<<8},o.prototype.readUInt16BE=function(A,e){return e||y(A,2,this.length),this[A]<<8|this[A+1]},o.prototype.readUInt32LE=function(A,e){return e||y(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},o.prototype.readUInt32BE=function(A,e){return e||y(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},o.prototype.readIntLE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=this[A],B=1,n=0;++n<e&&(B*=256);)i+=this[A+n]*B;return i>=(B*=128)&&(i-=Math.pow(2,8*e)),i},o.prototype.readIntBE=function(A,e,t){A|=0,e|=0,t||y(A,e,this.length);for(var i=e,B=1,n=this[A+--i];i>0&&(B*=256);)n+=this[A+--i]*B;return n>=(B*=128)&&(n-=Math.pow(2,8*e)),n},o.prototype.readInt8=function(A,e){return e||y(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},o.prototype.readInt16LE=function(A,e){e||y(A,2,this.length);var t=this[A]|this[A+1]<<8;return 32768&t?4294901760|t:t},o.prototype.readInt16BE=function(A,e){e||y(A,2,this.length);var t=this[A+1]|this[A]<<8;return 32768&t?4294901760|t:t},o.prototype.readInt32LE=function(A,e){return e||y(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},o.prototype.readInt32BE=function(A,e){return e||y(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},o.prototype.readFloatLE=function(A,e){return e||y(A,4,this.length),B.read(this,A,!0,23,4)},o.prototype.readFloatBE=function(A,e){return e||y(A,4,this.length),B.read(this,A,!1,23,4)},o.prototype.readDoubleLE=function(A,e){return e||y(A,8,this.length),B.read(this,A,!0,52,8)},o.prototype.readDoubleBE=function(A,e){return e||y(A,8,this.length),B.read(this,A,!1,52,8)},o.prototype.writeUIntLE=function(A,e,t,i){(A=+A,e|=0,t|=0,i)||H(this,A,e,t,Math.pow(2,8*t)-1,0);var B=1,n=0;for(this[e]=255&A;++n<t&&(B*=256);)this[e+n]=A/B&255;return e+t},o.prototype.writeUIntBE=function(A,e,t,i){(A=+A,e|=0,t|=0,i)||H(this,A,e,t,Math.pow(2,8*t)-1,0);var B=t-1,n=1;for(this[e+B]=255&A;--B>=0&&(n*=256);)this[e+B]=A/n&255;return e+t},o.prototype.writeUInt8=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,1,255,0),o.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[e]=255&A,e+1},o.prototype.writeUInt16LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):k(this,A,e,!0),e+2},o.prototype.writeUInt16BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):k(this,A,e,!1),e+2},o.prototype.writeUInt32LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e+3]=A>>>24,this[e+2]=A>>>16,this[e+1]=A>>>8,this[e]=255&A):R(this,A,e,!0),e+4},o.prototype.writeUInt32BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):R(this,A,e,!1),e+4},o.prototype.writeIntLE=function(A,e,t,i){if(A=+A,e|=0,!i){var B=Math.pow(2,8*t-1);H(this,A,e,t,B-1,-B)}var n=0,s=1,r=0;for(this[e]=255&A;++n<t&&(s*=256);)A<0&&0===r&&0!==this[e+n-1]&&(r=1),this[e+n]=(A/s>>0)-r&255;return e+t},o.prototype.writeIntBE=function(A,e,t,i){if(A=+A,e|=0,!i){var B=Math.pow(2,8*t-1);H(this,A,e,t,B-1,-B)}var n=t-1,s=1,r=0;for(this[e+n]=255&A;--n>=0&&(s*=256);)A<0&&0===r&&0!==this[e+n+1]&&(r=1),this[e+n]=(A/s>>0)-r&255;return e+t},o.prototype.writeInt8=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,1,127,-128),o.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[e]=255&A,e+1},o.prototype.writeInt16LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8):k(this,A,e,!0),e+2},o.prototype.writeInt16BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>8,this[e+1]=255&A):k(this,A,e,!1),e+2},o.prototype.writeInt32LE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[e]=255&A,this[e+1]=A>>>8,this[e+2]=A>>>16,this[e+3]=A>>>24):R(this,A,e,!0),e+4},o.prototype.writeInt32BE=function(A,e,t){return A=+A,e|=0,t||H(this,A,e,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),o.TYPED_ARRAY_SUPPORT?(this[e]=A>>>24,this[e+1]=A>>>16,this[e+2]=A>>>8,this[e+3]=255&A):R(this,A,e,!1),e+4},o.prototype.writeFloatLE=function(A,e,t){return J(this,A,e,!0,t)},o.prototype.writeFloatBE=function(A,e,t){return J(this,A,e,!1,t)},o.prototype.writeDoubleLE=function(A,e,t){return T(this,A,e,!0,t)},o.prototype.writeDoubleBE=function(A,e,t){return T(this,A,e,!1,t)},o.prototype.copy=function(A,e,t,i){if(t||(t=0),i||0===i||(i=this.length),e>=A.length&&(e=A.length),e||(e=0),i>0&&i<t&&(i=t),i===t)return 0;if(0===A.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(t<0||t>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),A.length-e<i-t&&(i=A.length-e+t);var B,n=i-t;if(this===A&&t<e&&e<i)for(B=n-1;B>=0;--B)A[B+e]=this[B+t];else if(n<1e3||!o.TYPED_ARRAY_SUPPORT)for(B=0;B<n;++B)A[B+e]=this[B+t];else Uint8Array.prototype.set.call(A,this.subarray(t,t+n),e);return n},o.prototype.fill=function(A,e,t,i){if("string"==typeof A){if("string"==typeof e?(i=e,e=0,t=this.length):"string"==typeof t&&(i=t,t=this.length),1===A.length){var B=A.charCodeAt(0);B<256&&(A=B)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!o.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof A&&(A&=255);if(e<0||this.length<e||this.length<t)throw new RangeError("Out of range index");if(t<=e)return this;var n;if(e>>>=0,t=void 0===t?this.length:t>>>0,A||(A=0),"number"==typeof A)for(n=e;n<t;++n)this[n]=A;else{var s=o.isBuffer(A)?A:j(new o(A,i).toString()),r=s.length;for(n=0;n<t-e;++n)this[n+e]=s[n%r]}return this};var S=/[^+\\/0-9A-Za-z-_]/g;function b(A){return A<16?"0"+A.toString(16):A.toString(16)}function j(A,e){var t;e=e||1/0;for(var i=A.length,B=null,n=[],s=0;s<i;++s){if((t=A.charCodeAt(s))>55295&&t<57344){if(!B){if(t>56319){(e-=3)>-1&&n.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&n.push(239,191,189);continue}B=t;continue}if(t<56320){(e-=3)>-1&&n.push(239,191,189),B=t;continue}t=65536+(B-55296<<10|t-56320)}else B&&(e-=3)>-1&&n.push(239,191,189);if(B=null,t<128){if((e-=1)<0)break;n.push(t)}else if(t<2048){if((e-=2)<0)break;n.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;n.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;n.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return n}function z(A){return i.toByteArray(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\\s+|\\s+$/g,"")}(A).replace(S,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function v(A,e,t,i){for(var B=0;B<i&&!(B+t>=e.length||B>=A.length);++B)e[B+t]=A[B];return B}}).call(this,t(9))},function(A,e,t){function i(){}t(143).mixin(i),i.prototype.write=function(A,e,t){this.emit("item",A,e,t)},i.prototype.end=function(){this.emit("end"),this.removeAllListeners()},i.prototype.pipe=function(A){var e=this;function t(){A.write.apply(A,Array.prototype.slice.call(arguments))}function i(){!A._isStdio&&A.end()}return e.emit("unpipe",A),A.emit("pipe",e),e.on("item",t),e.on("end",i),e.when("unpipe",(function(B){var n=B===A||void 0===B;return n&&(e.removeListener("item",t),e.removeListener("end",i),A.emit("unpipe")),n})),A},i.prototype.unpipe=function(A){return this.emit("unpipe",A),this},i.prototype.format=function(A){throw new Error(["Warning: .format() is deprecated in Minilog v2! Use .pipe() instead. For example:","var Minilog = require(\'minilog\');","Minilog","  .pipe(Minilog.backends.console.formatClean)","  .pipe(Minilog.backends.console);"].join("\\n"))},i.mixin=function(A){var e,t=i.prototype;for(e in t)t.hasOwnProperty(e)&&(A.prototype[e]=t[e])},A.exports=i},function(A,e){A.exports=class{static simple(A){return JSON.parse(JSON.stringify(A))}}},function(A,e){class t{static get BACKGROUND_LAYER(){return"background"}static get VIDEO_LAYER(){return"video"}static get PEN_LAYER(){return"pen"}static get SPRITE_LAYER(){return"sprite"}static get LAYER_GROUPS(){return[t.BACKGROUND_LAYER,t.VIDEO_LAYER,t.PEN_LAYER,t.SPRITE_LAYER]}}A.exports=t},function(A,e,t){(function(e){class t{constructor(){let A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.nowObj;this.startTime=0,this.nowObj=A}static get USE_PERFORMANCE(){return!1}static get legacyDateCode(){return{now:function(){return(new Date).getTime()}}}static get nowObj(){return t.USE_PERFORMANCE&&"undefined"!=typeof self&&self.performance&&"now"in self.performance?self.performance:Date.now?Date:t.legacyDateCode}time(){return this.nowObj.now()}relativeTime(){return this.nowObj.now()}start(){this.startTime=this.nowObj.now()}timeElapsed(){return this.nowObj.now()-this.startTime}setTimeout(A,t){return e.setTimeout(A,t)}clearTimeout(A){e.clearTimeout(A)}}A.exports=t}).call(this,t(9))},function(A,e,t){const i=t(228),B=t(80),n=t(34),s=t(46),r=t(14),{Map:o}=t(27),g=t(82),a=t(83),c=t(1),Q=t(10),E=t(47);class w{constructor(A,e){this.runtime=A,this._blocks={},this._scripts=[],Object.defineProperty(this,"_cache",{writable:!0,enumerable:!1}),this._cache={inputs:{},procedureParamNames:{},procedureDefinitions:{},_executeCached:{},_monitored:null,scripts:{},compiledScripts:{},compiledProcedures:{},proceduresPopulated:!1},this.forceNoGlow=e||!1}getCachedCompileResult(A){return this._cache.compiledScripts.hasOwnProperty(A)?this._cache.compiledScripts[A]:null}cacheCompileResult(A,e){this._cache.compiledScripts[A]={success:!0,value:e}}cacheCompileError(A,e){this._cache.compiledScripts[A]={success:!1,value:e}}static get BRANCH_INPUT_PREFIX(){return"SUBSTACK"}getBlock(A){return this._blocks[A]}getScripts(){return this._scripts}getNextBlock(A){const e=this._blocks[A];return void 0===e?null:e.next}getBranch(A,e){const t=this._blocks[A];if(void 0===t)return null;e||(e=1);let i=w.BRANCH_INPUT_PREFIX;e>1&&(i+=e);const B=t.inputs[i];return void 0===B?null:B.block}getOpcode(A){return void 0===A?null:A.opcode}getFields(A){return void 0===A?null:A.fields}getInputs(A){if(void 0===A)return null;let e=this._cache.inputs[A.id];if(void 0!==e)return e;e={};for(const t in A.inputs)t.substring(0,w.BRANCH_INPUT_PREFIX.length)!==w.BRANCH_INPUT_PREFIX&&(e[t]=A.inputs[t]);return this._cache.inputs[A.id]=e,e}getMutation(A){return void 0===A?null:A.mutation}getTopLevelScript(A){let e=this._blocks[A];if(void 0===e)return null;for(;null!==e.parent;)e=this._blocks[e.parent];return e.id}getProcedureDefinition(A){const e=this._cache.procedureDefinitions[A];if(void 0!==e)return e;for(const e in this._blocks){if(!this._blocks.hasOwnProperty(e))continue;const t=this._blocks[e];if("procedures_definition"===t.opcode){const i=this._getCustomBlockInternal(t);if(i&&i.mutation.proccode===A)return this._cache.procedureDefinitions[A]=e,e}}return this._cache.procedureDefinitions[A]=null,null}getProcedureParamNamesAndIds(A){return this.getProcedureParamNamesIdsAndDefaults(A).slice(0,2)}getProcedureParamNamesIdsAndDefaults(A){const e=this._cache.procedureParamNames[A];if(void 0!==e)return e;for(const e in this._blocks){if(!this._blocks.hasOwnProperty(e))continue;const t=this._blocks[e];if("procedures_prototype"===t.opcode&&t.mutation.proccode===A){const e=JSON.parse(t.mutation.argumentnames),i=JSON.parse(t.mutation.argumentids),B=JSON.parse(t.mutation.argumentdefaults);return this._cache.procedureParamNames[A]=[e,i,B],this._cache.procedureParamNames[A]}}const t=this.runtime.getAddonBlock(A);return t?(this._cache.procedureParamNames[A]=t.namesIdsDefaults,t.namesIdsDefaults):(this._cache.procedureParamNames[A]=null,null)}populateProcedureCache(){if(!this._cache.proceduresPopulated){for(const A in this._blocks){if(!this._blocks.hasOwnProperty(A))continue;const e=this._blocks[A];if("procedures_prototype"!==e.opcode){if("procedures_definition"===e.opcode){const t=this._getCustomBlockInternal(e);if(t){const e=t.mutation.proccode;this._cache.procedureDefinitions[e]||(this._cache.procedureDefinitions[e]=A);continue}}}else{const A=e.mutation.proccode;if(!this._cache.procedureParamNames[A]){const t=JSON.parse(e.mutation.argumentnames),i=JSON.parse(e.mutation.argumentids),B=JSON.parse(e.mutation.argumentdefaults);this._cache.procedureParamNames[A]=[t,i,B]}}}this._cache.proceduresPopulated=!0}}duplicate(){const A=new w(this.runtime,this.forceNoGlow);return A._blocks=r.simple(this._blocks),A._scripts=r.simple(this._scripts),A}blocklyListen(A){if("object"!=typeof A)return;if("string"!=typeof A.blockId&&"string"!=typeof A.varId&&"string"!=typeof A.commentId)return;const e=this.runtime.getTargetForStage(),t=this.runtime.getEditingTarget();if("stackclick"!==A.element)switch(A.type){case"create":{const e=i(A);for(let A=0;A<e.length;A++)this.createBlock(e[A]);break}case"change":this.changeBlock({id:A.blockId,element:A.element,name:A.name,value:A.newValue});break;case"move":this.moveBlock({id:A.blockId,oldParent:A.oldParentId,oldInput:A.oldInputName,newParent:A.newParentId,newInput:A.newInputName,newCoordinate:A.newCoordinate});break;case"dragOutside":this.runtime.emitBlockDragUpdate(A.isOutside);break;case"endDrag":if(this.runtime.emitBlockDragUpdate(!1),A.isOutside){const e=i(A);this.runtime.emitBlockEndDrag(e,A.blockId)}break;case"delete":if(!this._blocks.hasOwnProperty(A.blockId)||this._blocks[A.blockId].shadow)return;this._blocks[A.blockId].topLevel&&this.runtime.quietGlow(A.blockId),this.deleteBlock(A.blockId);break;case"var_create":if(this.resetCache(),A.isLocal&&t&&!t.isStage&&!A.isCloud)t.lookupVariableById(A.varId)||(t.createVariable(A.varId,A.varName,A.varType),this.emitProjectChanged());else{if(e.lookupVariableById(A.varId))return;const t=this.runtime.targets.filter(A=>A.isOriginal);for(const e of t)if(e.lookupVariableByNameAndType(A.varName,A.varType,!0))return;e.createVariable(A.varId,A.varName,A.varType,A.isCloud),this.emitProjectChanged()}break;case"var_rename":if(t&&t.variables.hasOwnProperty(A.varId))t.renameVariable(A.varId,A.newName),t.blocks.updateBlocksAfterVarRename(A.varId,A.newName);else{e.renameVariable(A.varId,A.newName);const t=this.runtime.targets;for(let e=0;e<t.length;e++){t[e].blocks.updateBlocksAfterVarRename(A.varId,A.newName)}}this.emitProjectChanged();break;case"var_delete":this.resetCache();(t&&t.variables.hasOwnProperty(A.varId)?t:e).deleteVariable(A.varId),this.emitProjectChanged();break;case"comment_create":if(this.resetCache(),this.runtime.getEditingTarget()){const e=this.runtime.getEditingTarget();e.createComment(A.commentId,A.blockId,A.text,A.xy.x,A.xy.y,A.width,A.height,A.minimized),null===e.comments[A.commentId].x&&null===e.comments[A.commentId].y&&(e.comments[A.commentId].x=A.xy.x,e.comments[A.commentId].y=A.xy.y)}this.emitProjectChanged();break;case"comment_change":if(this.resetCache(),this.runtime.getEditingTarget()){const e=this.runtime.getEditingTarget();if(!e.comments.hasOwnProperty(A.commentId))return void c.warn("Cannot change comment with id ".concat(A.commentId," because it does not exist."));const t=e.comments[A.commentId],i=A.newContents_;i.hasOwnProperty("minimized")&&(t.minimized=i.minimized),i.hasOwnProperty("width")&&i.hasOwnProperty("height")&&(t.width=i.width,t.height=i.height),i.hasOwnProperty("text")&&(t.text=i.text),this.emitProjectChanged()}break;case"comment_move":if(this.runtime.getEditingTarget()){const e=this.runtime.getEditingTarget();if(e&&!e.comments.hasOwnProperty(A.commentId))return void c.warn("Cannot change comment with id ".concat(A.commentId," because it does not exist."));const t=e.comments[A.commentId],i=A.newCoordinate_;t.x=i.x,t.y=i.y,this.emitProjectChanged()}break;case"comment_delete":if(this.resetCache(),this.runtime.getEditingTarget()){const e=this.runtime.getEditingTarget();if(!e.comments.hasOwnProperty(A.commentId))return;if(delete e.comments[A.commentId],A.blockId){const t=e.blocks.getBlock(A.blockId);if(!t)return void c.warn("Could not find block referenced by comment with id: ".concat(A.commentId));delete t.comment}this.emitProjectChanged()}}else this.runtime.toggleScript(A.blockId,{stackClick:!0})}resetCache(){this._cache.inputs={},this._cache.procedureParamNames={},this._cache.procedureDefinitions={},this._cache._executeCached={},this._cache._monitored=null,this._cache.scripts={},this._cache.compiledScripts={},this._cache.compiledProcedures={},this._cache.proceduresPopulated=!1}emitProjectChanged(){this.forceNoGlow||this.runtime.emitProjectChanged()}createBlock(A){this._blocks.hasOwnProperty(A.id)||(this._blocks[A.id]=A,A.topLevel&&this._addScript(A.id),this.resetCache(),this.emitProjectChanged())}changeBlock(A){if(-1===["field","mutation","checkbox"].indexOf(A.element))return;let e=this._blocks[A.id];if(void 0!==e){switch(A.element){case"field":if(!e.fields[A.name])return;if("VARIABLE"===A.name||"LIST"===A.name||"BROADCAST_OPTION"===A.name){const t=this.runtime.getEditingTarget().lookupVariableById(A.value);t&&(e.fields[A.name].value=t.name,e.fields[A.name].id=A.value)}else{e.fields[A.name].value=A.value,"sensing_of_object_menu"===e.opcode&&("_stage_"===e.fields.OBJECT.value?this._blocks[e.parent].fields.PROPERTY.value="backdrop #":this._blocks[e.parent].fields.PROPERTY.value="x position",this.runtime.requestBlocksUpdate());const t=e.shadow&&e.parent?this._blocks[e.parent]:e;t.isMonitored&&this.runtime.requestUpdateMonitor(o({id:t.id,params:this._getBlockParams(t)}))}break;case"mutation":e.mutation=B(A.value);break;case"checkbox":{if(e.fields&&Object.keys(e.fields).length>0&&"data_variable"!==e.opcode&&"data_listcontents"!==e.opcode){const A=E(e.id,e.fields);let t=this.runtime.monitorBlocks.getBlock(A);t||(t=JSON.parse(JSON.stringify(e)),t.id=A,this.runtime.monitorBlocks.createBlock(t)),e=t}const t=e.isMonitored;e.isMonitored=A.value;let i=!1;"data_variable"===e.opcode?i=!this.runtime.getTargetForStage().variables[e.fields.VARIABLE.id]:"data_listcontents"===e.opcode&&(i=!this.runtime.getTargetForStage().variables[e.fields.LIST.id]);const B=i||this.runtime.monitorBlockInfo.hasOwnProperty(e.opcode)&&this.runtime.monitorBlockInfo[e.opcode].isSpriteSpecific;e.targetId=B?e.targetId||this.runtime.getEditingTarget().id:null,t&&!e.isMonitored?this.runtime.requestHideMonitor(e.id):!t&&e.isMonitored&&(this.runtime.requestShowMonitor(e.id)||this.runtime.requestAddMonitor(s({id:e.id,targetId:e.targetId,spriteName:e.targetId?this.runtime.getTargetById(e.targetId).getName():null,opcode:e.opcode,params:this._getBlockParams(e),value:"",mode:"data_listcontents"===e.opcode?"list":"default"})));break}}this.emitProjectChanged(),this.resetCache()}}moveBlock(A){if(!this._blocks.hasOwnProperty(A.id))return;const e=this._blocks[A.id];let t=!1;if(A.newCoordinate&&(t=e.x!==A.newCoordinate.x||e.y!==A.newCoordinate.y,e.x=A.newCoordinate.x,e.y=A.newCoordinate.y),void 0!==A.oldParent){const e=this._blocks[A.oldParent];void 0!==A.oldInput&&e.inputs[A.oldInput].block===A.id?e.inputs[A.oldInput].block=null:e.next===A.id&&(e.next=null),this._blocks[A.id].parent=null,t=!0}if(void 0===A.newParent)this._addScript(A.id);else{if(this._deleteScript(A.id),void 0===A.newInput)this._blocks[A.newParent].next=A.id;else{let e=null;this._blocks[A.newParent].inputs.hasOwnProperty(A.newInput)&&(e=this._blocks[A.newParent].inputs[A.newInput].shadow),this._blocks[A.id].shadow&&(e=A.id),this._blocks[A.newParent].inputs[A.newInput]={name:A.newInput,block:A.id,shadow:e}}this._blocks[A.id].parent=A.newParent,t=!0}this.resetCache(),t&&this.emitProjectChanged()}runAllMonitored(A){null===this._cache._monitored&&(this._cache._monitored=Object.keys(this._blocks).filter(A=>this.getBlock(A).isMonitored).map(e=>{const t=this.getBlock(e).targetId;return{blockId:e,target:t?A.getTargetById(t):null}}));const e=this._cache._monitored;for(let t=0;t<e.length;t++){const{blockId:i,target:B}=e[t];A.addMonitorScript(i,B)}}deleteBlock(A){const e=this._blocks[A];if(e){null!==e.next&&this.deleteBlock(e.next);for(const A in e.inputs)null!==e.inputs[A].block&&this.deleteBlock(e.inputs[A].block),null!==e.inputs[A].shadow&&e.inputs[A].shadow!==e.inputs[A].block&&this.deleteBlock(e.inputs[A].shadow);this._deleteScript(A),delete this._blocks[A],this.resetCache(),this.emitProjectChanged()}}getAllVariableAndListReferences(A,e){const t=A||this._blocks,i=Object.create(null);for(const A in t){let B=null,n=null;if(t[A].fields.VARIABLE?(B=t[A].fields.VARIABLE,n=Q.SCALAR_TYPE):t[A].fields.LIST?(B=t[A].fields.LIST,n=Q.LIST_TYPE):e&&t[A].fields.BROADCAST_OPTION&&(B=t[A].fields.BROADCAST_OPTION,n=Q.BROADCAST_MESSAGE_TYPE),B){const A=B.id;i[A]?i[A].push({referencingField:B,type:n}):i[A]=[{referencingField:B,type:n}]}}return i}updateBlocksAfterVarRename(A,e){const t=this._blocks;for(const i in t){let B=null;if(t[i].fields.VARIABLE?B=t[i].fields.VARIABLE:t[i].fields.LIST&&(B=t[i].fields.LIST),B){A===B.id&&(B.value=e)}}}updateTargetSpecificBlocks(A){const e=this._blocks;for(const t in e)A&&"event_whenthisspriteclicked"===e[t].opcode?e[t].opcode="event_whenstageclicked":A||"event_whenstageclicked"!==e[t].opcode||(e[t].opcode="event_whenthisspriteclicked")}updateAssetName(A,e,t){let i;if("costume"===t)i=this._getCostumeField.bind(this);else if("sound"===t)i=this._getSoundField.bind(this);else if("backdrop"===t)i=this._getBackdropField.bind(this);else{if("sprite"!==t)return;i=this._getSpriteField.bind(this)}const B=this._blocks;for(const t in B){const B=i(t);B&&B.value===A&&(B.value=e)}this.resetCache()}updateSensingOfReference(A,e,t){const i=this._blocks;let B=!1;for(const n in i){const s=i[n];if("sensing_of"===s.opcode&&s.fields.PROPERTY.value===A&&s.inputs.OBJECT.block===s.inputs.OBJECT.shadow){this.getBlock(s.inputs.OBJECT.block).fields.OBJECT.value===t&&(s.fields.PROPERTY.value=e,B=!0)}}return B&&this.resetCache(),B}_getCostumeField(A){const e=this.getBlock(A);return e&&e.fields.hasOwnProperty("COSTUME")?e.fields.COSTUME:null}_getSoundField(A){const e=this.getBlock(A);return e&&e.fields.hasOwnProperty("SOUND_MENU")?e.fields.SOUND_MENU:null}_getBackdropField(A){const e=this.getBlock(A);return e&&e.fields.hasOwnProperty("BACKDROP")?e.fields.BACKDROP:null}_getSpriteField(A){const e=this.getBlock(A);if(!e)return null;const t=["TOWARDS","TO","OBJECT","VIDEOONMENU2","DISTANCETOMENU","TOUCHINGOBJECTMENU","CLONE_OPTION"];for(let A=0;A<t.length;A++){const i=t[A];if(e.fields.hasOwnProperty(i))return e.fields[i]}return null}toXML(A){return this._scripts.map(e=>this.blockToXML(e,A)).join()}blockToXML(A,e){const t=this._blocks[A];if(!t)return;const i=t.shadow?"shadow":"block";let B="<".concat(i,\'\\n                id="\').concat(n(t.id),\'"\\n                type="\').concat(n(t.opcode),\'"\\n                \').concat(t.topLevel?\'x="\'.concat(t.x,\'" y="\').concat(t.y,\'"\'):"","\\n            >");const s=t.comment;s&&(e?e.hasOwnProperty(s)?B+=e[s].toXML():c.warn("Could not find comment with id: ".concat(s," in provided comment descriptions.")):c.warn("Cannot serialize comment with id: ".concat(s,"; no comment descriptions provided."))),t.mutation&&(B+=this.mutationToXML(t.mutation));for(const A in t.inputs){if(!t.inputs.hasOwnProperty(A))continue;const i=t.inputs[A];(i.block||i.shadow)&&(B+=\'<value name="\'.concat(n(i.name),\'">\'),i.block&&(B+=this.blockToXML(i.block,e)),i.shadow&&i.shadow!==i.block&&(B+=this.blockToXML(i.shadow,e)),B+="</value>")}for(const A in t.fields){if(!t.fields.hasOwnProperty(A))continue;const e=t.fields[A];B+=\'<field name="\'.concat(n(e.name),\'"\');const i=e.id;i&&(B+=\' id="\'.concat(n(i),\'"\'));const s=e.variableType;"string"==typeof s&&(B+=\' variabletype="\'.concat(n(s),\'"\'));let r=e.value;"string"==typeof r&&(r=n(e.value)),B+=">".concat(r,"</field>")}return t.next&&(B+="<next>".concat(this.blockToXML(t.next,e),"</next>")),B+="</".concat(i,">"),B}mutationToXML(A){let e="<".concat(A.tagName);for(const t in A){if("children"===t||"tagName"===t)continue;let i="string"==typeof A[t]?n(A[t]):A[t];"blockInfo"===t&&(i=n(JSON.stringify(A[t]))),e+=" ".concat(t,\'="\').concat(i,\'"\')}e+=">";for(let t=0;t<A.children.length;t++)e+=this.mutationToXML(A.children[t]);return e+="</".concat(A.tagName,">"),e}_getBlockParams(A){const e={};for(const t in A.fields)e[t]=A.fields[t].value;for(const t in A.inputs){const i=this._blocks[A.inputs[t].block];for(const A in i.fields)e[A]=i.fields[A].value}return e}_getCustomBlockInternal(A){if(A.inputs&&A.inputs.custom_block)return this._blocks[A.inputs.custom_block.block]}_addScript(A){this._scripts.indexOf(A)>-1||(this._scripts.push(A),this._blocks[A].topLevel=!0)}_deleteScript(A){const e=this._scripts.indexOf(A);e>-1&&this._scripts.splice(e,1),this._blocks[A]&&(this._blocks[A].topLevel=!1)}}g.getCached=function(A,e,t){let i=A._cache._executeCached[e];if(void 0!==i)return i;const B=A.getBlock(e);return void 0===B?null:(i=void 0===t?{id:e,opcode:A.getOpcode(B),fields:A.getFields(B),inputs:A.getInputs(B),mutation:A.getMutation(B)}:new t(A,{id:e,opcode:A.getOpcode(B),fields:A.getFields(B),inputs:A.getInputs(B),mutation:A.getMutation(B)}),A._cache._executeCached[e]=i,i)};const C=a._RuntimeScriptCache;a.getScripts=function(A,e){let t=A._cache.scripts[e];if(!t){t=A._cache.scripts[e]=[];const i=A._scripts;for(let B=0;B<i.length;B++){const n=i[B];A.getBlock(n).opcode===e&&t.push(new C(A,n))}}return t},A.exports=w},function(A,e,t){var i=t(0).TYPE,B=i.WhiteSpace,n=i.Semicolon,s=i.LeftCurlyBracket,r=i.Delim;function o(){return this.scanner.tokenIndex>0&&this.scanner.lookupType(-1)===B?this.scanner.tokenIndex>1?this.scanner.getTokenStart(this.scanner.tokenIndex-1):this.scanner.firstCharOffset:this.scanner.tokenStart}function g(){return 0}A.exports={name:"Raw",structure:{value:String},parse:function(A,e,t){var i,B=this.scanner.getTokenStart(A);return this.scanner.skip(this.scanner.getRawLength(A,e||g)),i=t&&this.scanner.tokenStart>B?o.call(this):this.scanner.tokenStart,{type:"Raw",loc:this.getLocation(B,i),value:this.scanner.source.substring(B,i)}},generate:function(A){this.chunk(A.value)},mode:{default:g,leftCurlyBracket:function(A){return A===s?1:0},leftCurlyBracketOrSemicolon:function(A){return A===s||A===n?1:0},exclamationMarkOrSemicolon:function(A,e,t){return A===r&&33===e.charCodeAt(t)||A===n?1:0},semicolonIncluded:function(A){return A===n?2:0}}}},function(A,e,t){"use strict";var i,B="object"==typeof Reflect?Reflect:null,n=B&&"function"==typeof B.apply?B.apply:function(A,e,t){return Function.prototype.apply.call(A,e,t)};i=B&&"function"==typeof B.ownKeys?B.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var s=Number.isNaN||function(A){return A!=A};function r(){r.init.call(this)}A.exports=r,A.exports.once=function(A,e){return new Promise((function(t,i){function B(t){A.removeListener(e,n),i(t)}function n(){"function"==typeof A.removeListener&&A.removeListener("error",B),t([].slice.call(arguments))}I(A,e,n,{once:!0}),"error"!==e&&function(A,e,t){"function"==typeof A.on&&I(A,"error",e,t)}(A,B,{once:!0})}))},r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var o=10;function g(A){if("function"!=typeof A)throw new TypeError(\'The "listener" argument must be of type Function. Received type \'+typeof A)}function a(A){return void 0===A._maxListeners?r.defaultMaxListeners:A._maxListeners}function c(A,e,t,i){var B,n,s,r;if(g(t),void 0===(n=A._events)?(n=A._events=Object.create(null),A._eventsCount=0):(void 0!==n.newListener&&(A.emit("newListener",e,t.listener?t.listener:t),n=A._events),s=n[e]),void 0===s)s=n[e]=t,++A._eventsCount;else if("function"==typeof s?s=n[e]=i?[t,s]:[s,t]:i?s.unshift(t):s.push(t),(B=a(A))>0&&s.length>B&&!s.warned){s.warned=!0;var o=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");o.name="MaxListenersExceededWarning",o.emitter=A,o.type=e,o.count=s.length,r=o,console&&console.warn&&console.warn(r)}return A}function Q(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(A,e,t){var i={fired:!1,wrapFn:void 0,target:A,type:e,listener:t},B=Q.bind(i);return B.listener=t,i.wrapFn=B,B}function w(A,e,t){var i=A._events;if(void 0===i)return[];var B=i[e];return void 0===B?[]:"function"==typeof B?t?[B.listener||B]:[B]:t?function(A){for(var e=new Array(A.length),t=0;t<e.length;++t)e[t]=A[t].listener||A[t];return e}(B):l(B,B.length)}function C(A){var e=this._events;if(void 0!==e){var t=e[A];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function l(A,e){for(var t=new Array(e),i=0;i<e;++i)t[i]=A[i];return t}function I(A,e,t,i){if("function"==typeof A.on)i.once?A.once(e,t):A.on(e,t);else{if("function"!=typeof A.addEventListener)throw new TypeError(\'The "emitter" argument must be of type EventEmitter. Received type \'+typeof A);A.addEventListener(e,(function B(n){i.once&&A.removeEventListener(e,B),t(n)}))}}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(A){if("number"!=typeof A||A<0||s(A))throw new RangeError(\'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received \'+A+".");o=A}}),r.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},r.prototype.setMaxListeners=function(A){if("number"!=typeof A||A<0||s(A))throw new RangeError(\'The value of "n" is out of range. It must be a non-negative number. Received \'+A+".");return this._maxListeners=A,this},r.prototype.getMaxListeners=function(){return a(this)},r.prototype.emit=function(A){for(var e=[],t=1;t<arguments.length;t++)e.push(arguments[t]);var i="error"===A,B=this._events;if(void 0!==B)i=i&&void 0===B.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var r=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw r.context=s,r}var o=B[A];if(void 0===o)return!1;if("function"==typeof o)n(o,this,e);else{var g=o.length,a=l(o,g);for(t=0;t<g;++t)n(a[t],this,e)}return!0},r.prototype.addListener=function(A,e){return c(this,A,e,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(A,e){return c(this,A,e,!0)},r.prototype.once=function(A,e){return g(e),this.on(A,E(this,A,e)),this},r.prototype.prependOnceListener=function(A,e){return g(e),this.prependListener(A,E(this,A,e)),this},r.prototype.removeListener=function(A,e){var t,i,B,n,s;if(g(e),void 0===(i=this._events))return this;if(void 0===(t=i[A]))return this;if(t===e||t.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete i[A],i.removeListener&&this.emit("removeListener",A,t.listener||e));else if("function"!=typeof t){for(B=-1,n=t.length-1;n>=0;n--)if(t[n]===e||t[n].listener===e){s=t[n].listener,B=n;break}if(B<0)return this;0===B?t.shift():function(A,e){for(;e+1<A.length;e++)A[e]=A[e+1];A.pop()}(t,B),1===t.length&&(i[A]=t[0]),void 0!==i.removeListener&&this.emit("removeListener",A,s||e)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(A){var e,t,i;if(void 0===(t=this._events))return this;if(void 0===t.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==t[A]&&(0==--this._eventsCount?this._events=Object.create(null):delete t[A]),this;if(0===arguments.length){var B,n=Object.keys(t);for(i=0;i<n.length;++i)"removeListener"!==(B=n[i])&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=t[A]))this.removeListener(A,e);else if(void 0!==e)for(i=e.length-1;i>=0;i--)this.removeListener(A,e[i]);return this},r.prototype.listeners=function(A){return w(this,A,!0)},r.prototype.rawListeners=function(A){return w(this,A,!1)},r.listenerCount=function(A,e){return"function"==typeof A.listenerCount?A.listenerCount(e):C.call(A,e)},r.prototype.listenerCount=C,r.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(A,e,t){const i=t(158),B=t(160);class n{static base64ToUint8Array(A){const e=i(A),t=e.length,B=new Uint8Array(t);for(let A=0;A<t;A++)B[A]=e.charCodeAt(A);return B}static uint8ArrayToBase64(A){let e="";const t=A.byteLength;for(let i=0;i<t;i++)e+=String.fromCharCode(A[i]);return B(e)}static arrayBufferToBase64(A){return n.uint8ArrayToBase64(new Uint8Array(A))}}A.exports=n},function(A,e){function t(A){return{prev:null,next:null,data:A}}function i(A,e,t){var i;return null!==n?(i=n,n=n.cursor,i.prev=e,i.next=t,i.cursor=A.cursor):i={prev:e,next:t,cursor:A.cursor},A.cursor=i,i}function B(A){var e=A.cursor;A.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=n,n=e}var n=null,s=function(){this.cursor=null,this.head=null,this.tail=null};s.createItem=t,s.prototype.createItem=t,s.prototype.updateCursors=function(A,e,t,i){for(var B=this.cursor;null!==B;)B.prev===A&&(B.prev=e),B.next===t&&(B.next=i),B=B.cursor},s.prototype.getSize=function(){for(var A=0,e=this.head;e;)A++,e=e.next;return A},s.prototype.fromArray=function(A){var e=null;this.head=null;for(var i=0;i<A.length;i++){var B=t(A[i]);null!==e?e.next=B:this.head=B,B.prev=e,e=B}return this.tail=e,this},s.prototype.toArray=function(){for(var A=this.head,e=[];A;)e.push(A.data),A=A.next;return e},s.prototype.toJSON=s.prototype.toArray,s.prototype.isEmpty=function(){return null===this.head},s.prototype.first=function(){return this.head&&this.head.data},s.prototype.last=function(){return this.tail&&this.tail.data},s.prototype.each=function(A,e){var t;void 0===e&&(e=this);for(var n=i(this,null,this.head);null!==n.next;)t=n.next,n.next=t.next,A.call(e,t.data,t,this);B(this)},s.prototype.forEach=s.prototype.each,s.prototype.eachRight=function(A,e){var t;void 0===e&&(e=this);for(var n=i(this,this.tail,null);null!==n.prev;)t=n.prev,n.prev=t.prev,A.call(e,t.data,t,this);B(this)},s.prototype.forEachRight=s.prototype.eachRight,s.prototype.reduce=function(A,e,t){var n;void 0===t&&(t=this);for(var s=i(this,null,this.head),r=e;null!==s.next;)n=s.next,s.next=n.next,r=A.call(t,r,n.data,n,this);return B(this),r},s.prototype.reduceRight=function(A,e,t){var n;void 0===t&&(t=this);for(var s=i(this,this.tail,null),r=e;null!==s.prev;)n=s.prev,s.prev=n.prev,r=A.call(t,r,n.data,n,this);return B(this),r},s.prototype.nextUntil=function(A,e,t){if(null!==A){var n;void 0===t&&(t=this);for(var s=i(this,null,A);null!==s.next&&(n=s.next,s.next=n.next,!e.call(t,n.data,n,this)););B(this)}},s.prototype.prevUntil=function(A,e,t){if(null!==A){var n;void 0===t&&(t=this);for(var s=i(this,A,null);null!==s.prev&&(n=s.prev,s.prev=n.prev,!e.call(t,n.data,n,this)););B(this)}},s.prototype.some=function(A,e){var t=this.head;for(void 0===e&&(e=this);null!==t;){if(A.call(e,t.data,t,this))return!0;t=t.next}return!1},s.prototype.map=function(A,e){var t=new s,i=this.head;for(void 0===e&&(e=this);null!==i;)t.appendData(A.call(e,i.data,i,this)),i=i.next;return t},s.prototype.filter=function(A,e){var t=new s,i=this.head;for(void 0===e&&(e=this);null!==i;)A.call(e,i.data,i,this)&&t.appendData(i.data),i=i.next;return t},s.prototype.clear=function(){this.head=null,this.tail=null},s.prototype.copy=function(){for(var A=new s,e=this.head;null!==e;)A.insert(t(e.data)),e=e.next;return A},s.prototype.prepend=function(A){return this.updateCursors(null,A,this.head,A),null!==this.head?(this.head.prev=A,A.next=this.head):this.tail=A,this.head=A,this},s.prototype.prependData=function(A){return this.prepend(t(A))},s.prototype.append=function(A){return this.insert(A)},s.prototype.appendData=function(A){return this.insert(t(A))},s.prototype.insert=function(A,e){if(null!=e)if(this.updateCursors(e.prev,A,e,A),null===e.prev){if(this.head!==e)throw new Error("before doesn\'t belong to list");this.head=A,e.prev=A,A.next=e,this.updateCursors(null,A)}else e.prev.next=A,A.prev=e.prev,e.prev=A,A.next=e;else this.updateCursors(this.tail,A,null,A),null!==this.tail?(this.tail.next=A,A.prev=this.tail):this.head=A,this.tail=A;return this},s.prototype.insertData=function(A,e){return this.insert(t(A),e)},s.prototype.remove=function(A){if(this.updateCursors(A,A.prev,A,A.next),null!==A.prev)A.prev.next=A.next;else{if(this.head!==A)throw new Error("item doesn\'t belong to list");this.head=A.next}if(null!==A.next)A.next.prev=A.prev;else{if(this.tail!==A)throw new Error("item doesn\'t belong to list");this.tail=A.prev}return A.prev=null,A.next=null,A},s.prototype.push=function(A){this.insert(t(A))},s.prototype.pop=function(){if(null!==this.tail)return this.remove(this.tail)},s.prototype.unshift=function(A){this.prepend(t(A))},s.prototype.shift=function(){if(null!==this.head)return this.remove(this.head)},s.prototype.prependList=function(A){return this.insertList(A,this.head)},s.prototype.appendList=function(A){return this.insertList(A)},s.prototype.insertList=function(A,e){return null===A.head||(null!=e?(this.updateCursors(e.prev,A.tail,e,A.head),null!==e.prev?(e.prev.next=A.head,A.head.prev=e.prev):this.head=A.head,e.prev=A.tail,A.tail.next=e):(this.updateCursors(this.tail,A.tail,null,A.head),null!==this.tail?(this.tail.next=A.head,A.head.prev=this.tail):this.head=A.head,this.tail=A.tail),A.head=null,A.tail=null),this},s.prototype.replace=function(A,e){"head"in e?this.insertList(e,A):this.insert(e,A),this.remove(A)},A.exports=s},function(A,e,t){t(32),A.exports={TextEncoder:TextEncoder,TextDecoder:TextDecoder}},function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;');
  219. document.write('/**');
  220. document.write(' * [js-md5]{@link https://github.com/emn178/js-md5}');
  221. document.write(' *');
  222. document.write(' * @namespace md5');
  223. document.write(' * @version 0.7.3');
  224. document.write(' * @author Chen, Yi-Cyuan [[email protected]]');
  225. document.write(' * @copyright Chen, Yi-Cyuan 2014-2017');
  226. document.write(' * @license MIT');
  227. document.write(' */!function(){"use strict";var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"==typeof module&&module.exports,AMD=__webpack_require__(393),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(A){return"[object Array]"===Object.prototype.toString.call(A)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(A){return"object"==typeof A&&A.buffer&&A.buffer.constructor===ArrayBuffer});var createOutputMethod=function(A){return function(e){return new Md5(!0).update(e)[A]()}},createMethod=function(){var A=createOutputMethod("hex");NODE_JS&&(A=nodeWrap(A)),A.create=function(){return new Md5},A.update=function(e){return A.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var t=OUTPUT_TYPES[e];A[t]=createOutputMethod(t)}return A},nodeWrap=function(method){var crypto=eval("require(\'crypto\')"),Buffer=eval("require(\'buffer\').Buffer"),nodeMethod=function(A){if("string"==typeof A)return crypto.createHash("md5").update(A,"utf8").digest("hex");if(null==A)throw ERROR;return A.constructor===ArrayBuffer&&(A=new Uint8Array(A)),Array.isArray(A)||ArrayBuffer.isView(A)||A.constructor===Buffer?crypto.createHash("md5").update(new Buffer(A)).digest("hex"):method(A)};return nodeMethod};function Md5(A){if(A)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(A){if(!this.finalized){var e,t=typeof A;if("string"!==t){if("object"!==t)throw ERROR;if(null===A)throw ERROR;if(ARRAY_BUFFER&&A.constructor===ArrayBuffer)A=new Uint8Array(A);else if(!(Array.isArray(A)||ARRAY_BUFFER&&ArrayBuffer.isView(A)))throw ERROR;e=!0}for(var i,B,n=0,s=A.length,r=this.blocks,o=this.buffer8;n<s;){if(this.hashed&&(this.hashed=!1,r[0]=r[16],r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),e)if(ARRAY_BUFFER)for(B=this.start;n<s&&B<64;++n)o[B++]=A[n];else for(B=this.start;n<s&&B<64;++n)r[B>>2]|=A[n]<<SHIFT[3&B++];else if(ARRAY_BUFFER)for(B=this.start;n<s&&B<64;++n)(i=A.charCodeAt(n))<128?o[B++]=i:i<2048?(o[B++]=192|i>>6,o[B++]=128|63&i):i<55296||i>=57344?(o[B++]=224|i>>12,o[B++]=128|i>>6&63,o[B++]=128|63&i):(i=65536+((1023&i)<<10|1023&A.charCodeAt(++n)),o[B++]=240|i>>18,o[B++]=128|i>>12&63,o[B++]=128|i>>6&63,o[B++]=128|63&i);else for(B=this.start;n<s&&B<64;++n)(i=A.charCodeAt(n))<128?r[B>>2]|=i<<SHIFT[3&B++]:i<2048?(r[B>>2]|=(192|i>>6)<<SHIFT[3&B++],r[B>>2]|=(128|63&i)<<SHIFT[3&B++]):i<55296||i>=57344?(r[B>>2]|=(224|i>>12)<<SHIFT[3&B++],r[B>>2]|=(128|i>>6&63)<<SHIFT[3&B++],r[B>>2]|=(128|63&i)<<SHIFT[3&B++]):(i=65536+((1023&i)<<10|1023&A.charCodeAt(++n)),r[B>>2]|=(240|i>>18)<<SHIFT[3&B++],r[B>>2]|=(128|i>>12&63)<<SHIFT[3&B++],r[B>>2]|=(128|i>>6&63)<<SHIFT[3&B++],r[B>>2]|=(128|63&i)<<SHIFT[3&B++]);this.lastByteIndex=B,this.bytes+=B-this.start,B>=64?(this.start=B-64,this.hash(),this.hashed=!0):this.start=B}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var A=this.blocks,e=this.lastByteIndex;A[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),A[0]=A[16],A[16]=A[1]=A[2]=A[3]=A[4]=A[5]=A[6]=A[7]=A[8]=A[9]=A[10]=A[11]=A[12]=A[13]=A[14]=A[15]=0),A[14]=this.bytes<<3,A[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var A,e,t,i,B,n,s=this.blocks;this.first?e=((e=((A=((A=s[0]-680876937)<<7|A>>>25)-271733879<<0)^(t=((t=(-271733879^(i=((i=(-1732584194^2004318071&A)+s[1]-117830708)<<12|i>>>20)+A<<0)&(-271733879^A))+s[2]-1126478375)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1316259209)<<22|e>>>10)+t<<0:(A=this.h0,e=this.h1,t=this.h2,e=((e+=((A=((A+=((i=this.h3)^e&(t^i))+s[0]-680876936)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[1]-389564586)<<12|i>>>20)+A<<0)&(A^e))+s[2]+606105819)<<17|t>>>15)+i<<0)&(i^A))+s[3]-1044525330)<<22|e>>>10)+t<<0),e=((e+=((A=((A+=(i^e&(t^i))+s[4]-176418897)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[5]+1200080426)<<12|i>>>20)+A<<0)&(A^e))+s[6]-1473231341)<<17|t>>>15)+i<<0)&(i^A))+s[7]-45705983)<<22|e>>>10)+t<<0,e=((e+=((A=((A+=(i^e&(t^i))+s[8]+1770035416)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[9]-1958414417)<<12|i>>>20)+A<<0)&(A^e))+s[10]-42063)<<17|t>>>15)+i<<0)&(i^A))+s[11]-1990404162)<<22|e>>>10)+t<<0,e=((e+=((A=((A+=(i^e&(t^i))+s[12]+1804603682)<<7|A>>>25)+e<<0)^(t=((t+=(e^(i=((i+=(t^A&(e^t))+s[13]-40341101)<<12|i>>>20)+A<<0)&(A^e))+s[14]-1502002290)<<17|t>>>15)+i<<0)&(i^A))+s[15]+1236535329)<<22|e>>>10)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[1]-165796510)<<5|A>>>27)+e<<0)^e))+s[6]-1069501632)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[11]+643717713)<<14|t>>>18)+i<<0)^i))+s[0]-373897302)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[5]-701558691)<<5|A>>>27)+e<<0)^e))+s[10]+38016083)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[15]-660478335)<<14|t>>>18)+i<<0)^i))+s[4]-405537848)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[9]+568446438)<<5|A>>>27)+e<<0)^e))+s[14]-1019803690)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[3]-187363961)<<14|t>>>18)+i<<0)^i))+s[8]+1163531501)<<20|e>>>12)+t<<0,e=((e+=((i=((i+=(e^t&((A=((A+=(t^i&(e^t))+s[13]-1444681467)<<5|A>>>27)+e<<0)^e))+s[2]-51403784)<<9|i>>>23)+A<<0)^A&((t=((t+=(A^e&(i^A))+s[7]+1735328473)<<14|t>>>18)+i<<0)^i))+s[12]-1926607734)<<20|e>>>12)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[5]-378558)<<4|A>>>28)+e<<0))+s[8]-2022574463)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[11]+1839030562)<<16|t>>>16)+i<<0))+s[14]-35309556)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[1]-1530992060)<<4|A>>>28)+e<<0))+s[4]+1272893353)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[7]-155497632)<<16|t>>>16)+i<<0))+s[10]-1094730640)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[13]+681279174)<<4|A>>>28)+e<<0))+s[0]-358537222)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[3]-722521979)<<16|t>>>16)+i<<0))+s[6]+76029189)<<23|e>>>9)+t<<0,e=((e+=((n=(i=((i+=((B=e^t)^(A=((A+=(B^i)+s[9]-640364487)<<4|A>>>28)+e<<0))+s[12]-421815835)<<11|i>>>21)+A<<0)^A)^(t=((t+=(n^e)+s[15]+530742520)<<16|t>>>16)+i<<0))+s[2]-995338651)<<23|e>>>9)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[0]-198630844)<<6|A>>>26)+e<<0)|~t))+s[7]+1126891415)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[14]-1416354905)<<15|t>>>17)+i<<0)|~A))+s[5]-57434055)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[12]+1700485571)<<6|A>>>26)+e<<0)|~t))+s[3]-1894986606)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[10]-1051523)<<15|t>>>17)+i<<0)|~A))+s[1]-2054922799)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[8]+1873313359)<<6|A>>>26)+e<<0)|~t))+s[15]-30611744)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[6]-1560198380)<<15|t>>>17)+i<<0)|~A))+s[13]+1309151649)<<21|e>>>11)+t<<0,e=((e+=((i=((i+=(e^((A=((A+=(t^(e|~i))+s[4]-145523070)<<6|A>>>26)+e<<0)|~t))+s[11]-1120210379)<<10|i>>>22)+A<<0)^((t=((t+=(A^(i|~e))+s[2]+718787259)<<15|t>>>17)+i<<0)|~A))+s[9]-343485551)<<21|e>>>11)+t<<0,this.first?(this.h0=A+1732584193<<0,this.h1=e-271733879<<0,this.h2=t-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+A<<0,this.h1=this.h1+e<<0,this.h2=this.h2+t<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var A=this.h0,e=this.h1,t=this.h2,i=this.h3;return HEX_CHARS[A>>4&15]+HEX_CHARS[15&A]+HEX_CHARS[A>>12&15]+HEX_CHARS[A>>8&15]+HEX_CHARS[A>>20&15]+HEX_CHARS[A>>16&15]+HEX_CHARS[A>>28&15]+HEX_CHARS[A>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var A=this.h0,e=this.h1,t=this.h2,i=this.h3;return[255&A,A>>8&255,A>>16&255,A>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&t,t>>8&255,t>>16&255,t>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var A=new ArrayBuffer(16),e=new Uint32Array(A);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,A},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var A,e,t,i="",B=this.array(),n=0;n<15;)A=B[n++],e=B[n++],t=B[n++],i+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[63&(A<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|t>>>6)]+BASE64_ENCODE_CHAR[63&t];return A=B[n],i+=BASE64_ENCODE_CHAR[A>>>2]+BASE64_ENCODE_CHAR[A<<4&63]+"=="};var exports=createMethod();COMMON_JS?module.exports=exports:(root.md5=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(43),__webpack_require__(9))},function(A,e,t){(function(e,t,i,B){A.exports=function A(e,t,i){function B(s,r){if(!t[s]){if(!e[s]){if(n)return n(s,!0);var o=new Error("Cannot find module \'"+s+"\'");throw o.code="MODULE_NOT_FOUND",o}var g=t[s]={exports:{}};e[s][0].call(g.exports,(function(A){return B(e[s][1][A]||A)}),g,g.exports,A,e,t,i)}return t[s].exports}for(var n=!1,s=0;s<i.length;s++)B(i[s]);return B}({1:[function(A,e,t){"use strict";var i=A("./utils"),B=A("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.encode=function(A){for(var e,t,B,s,r,o,g,a=[],c=0,Q=A.length,E=Q,w="string"!==i.getTypeOf(A);c<A.length;)E=Q-c,B=w?(e=A[c++],t=c<Q?A[c++]:0,c<Q?A[c++]:0):(e=A.charCodeAt(c++),t=c<Q?A.charCodeAt(c++):0,c<Q?A.charCodeAt(c++):0),s=e>>2,r=(3&e)<<4|t>>4,o=1<E?(15&t)<<2|B>>6:64,g=2<E?63&B:64,a.push(n.charAt(s)+n.charAt(r)+n.charAt(o)+n.charAt(g));return a.join("")},t.decode=function(A){var e,t,i,s,r,o,g=0,a=0,c="data:";if(A.substr(0,c.length)===c)throw new Error("Invalid base64 input, it looks like a data url.");var Q,E=3*(A=A.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(A.charAt(A.length-1)===n.charAt(64)&&E--,A.charAt(A.length-2)===n.charAt(64)&&E--,E%1!=0)throw new Error("Invalid base64 input, bad content length.");for(Q=B.uint8array?new Uint8Array(0|E):new Array(0|E);g<A.length;)e=n.indexOf(A.charAt(g++))<<2|(s=n.indexOf(A.charAt(g++)))>>4,t=(15&s)<<4|(r=n.indexOf(A.charAt(g++)))>>2,i=(3&r)<<6|(o=n.indexOf(A.charAt(g++))),Q[a++]=e,64!==r&&(Q[a++]=t),64!==o&&(Q[a++]=i);return Q}},{"./support":30,"./utils":32}],2:[function(A,e,t){"use strict";var i=A("./external"),B=A("./stream/DataWorker"),n=A("./stream/Crc32Probe"),s=A("./stream/DataLengthProbe");function r(A,e,t,i,B){this.compressedSize=A,this.uncompressedSize=e,this.crc32=t,this.compression=i,this.compressedContent=B}r.prototype={getContentWorker:function(){var A=new B(i.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return A.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),A},getCompressedWorker:function(){return new B(i.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},r.createWorkerFrom=function(A,e,t){return A.pipe(new n).pipe(new s("uncompressedSize")).pipe(e.compressWorker(t)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=r},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(A,e,t){"use strict";var i=A("./stream/GenericWorker");t.STORE={magic:"\\0\\0",compressWorker:function(){return new i("STORE compression")},uncompressWorker:function(){return new i("STORE decompression")}},t.DEFLATE=A("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(A,e,t){"use strict";var i=A("./utils"),B=function(){for(var A,e=[],t=0;t<256;t++){A=t;for(var i=0;i<8;i++)A=1&A?3988292384^A>>>1:A>>>1;e[t]=A}return e}();e.exports=function(A,e){return void 0!==A&&A.length?"string"!==i.getTypeOf(A)?function(A,e,t,i){var n=B,s=0+t;A^=-1;for(var r=0;r<s;r++)A=A>>>8^n[255&(A^e[r])];return-1^A}(0|e,A,A.length):function(A,e,t,i){var n=B,s=0+t;A^=-1;for(var r=0;r<s;r++)A=A>>>8^n[255&(A^e.charCodeAt(r))];return-1^A}(0|e,A,A.length):0}},{"./utils":32}],5:[function(A,e,t){"use strict";t.base64=!1,t.binary=!1,t.dir=!1,t.createFolders=!0,t.date=null,t.compression=null,t.compressionOptions=null,t.comment=null,t.unixPermissions=null,t.dosPermissions=null},{}],6:[function(A,e,t){"use strict";var i;i="undefined"!=typeof Promise?Promise:A("lie"),e.exports={Promise:i}},{lie:37}],7:[function(A,e,t){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,B=A("pako"),n=A("./utils"),s=A("./stream/GenericWorker"),r=i?"uint8array":"array";function o(A,e){s.call(this,"FlateWorker/"+A),this._pako=null,this._pakoAction=A,this._pakoOptions=e,this.meta={}}t.magic="\\b\\0",n.inherits(o,s),o.prototype.processChunk=function(A){this.meta=A.meta,null===this._pako&&this._createPako(),this._pako.push(n.transformTo(r,A.data),!1)},o.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},o.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},o.prototype._createPako=function(){this._pako=new B[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var A=this;this._pako.onData=function(e){A.push({data:e,meta:A.meta})}},t.compressWorker=function(A){return new o("Deflate",A)},t.uncompressWorker=function(){return new o("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(A,e,t){"use strict";function i(A,e){var t,i="";for(t=0;t<e;t++)i+=String.fromCharCode(255&A),A>>>=8;return i}function B(A,e,t,B,s,a){var c,Q,E=A.file,w=A.compression,C=a!==r.utf8encode,l=n.transformTo("string",a(E.name)),I=n.transformTo("string",r.utf8encode(E.name)),h=E.comment,u=n.transformTo("string",a(h)),d=n.transformTo("string",r.utf8encode(h)),Y=I.length!==E.name.length,M=d.length!==h.length,F="",D="",m="",p=E.dir,U=E.date,f={crc32:0,compressedSize:0,uncompressedSize:0};e&&!t||(f.crc32=A.crc32,f.compressedSize=A.compressedSize,f.uncompressedSize=A.uncompressedSize);var N=0;e&&(N|=8),C||!Y&&!M||(N|=2048);var G=0,y=0;p&&(G|=16),"UNIX"===s?(y=798,G|=function(A,e){var t=A;return A||(t=e?16893:33204),(65535&t)<<16}(E.unixPermissions,p)):(y=20,G|=function(A){return 63&(A||0)}(E.dosPermissions)),c=U.getUTCHours(),c<<=6,c|=U.getUTCMinutes(),c<<=5,c|=U.getUTCSeconds()/2,Q=U.getUTCFullYear()-1980,Q<<=4,Q|=U.getUTCMonth()+1,Q<<=5,Q|=U.getUTCDate(),Y&&(D=i(1,1)+i(o(l),4)+I,F+="up"+i(D.length,2)+D),M&&(m=i(1,1)+i(o(u),4)+d,F+="uc"+i(m.length,2)+m);var H="";return H+="\\n\\0",H+=i(N,2),H+=w.magic,H+=i(c,2),H+=i(Q,2),H+=i(f.crc32,4),H+=i(f.compressedSize,4),H+=i(f.uncompressedSize,4),H+=i(l.length,2),H+=i(F.length,2),{fileRecord:g.LOCAL_FILE_HEADER+H+l+F,dirRecord:g.CENTRAL_FILE_HEADER+i(y,2)+H+i(u.length,2)+"\\0\\0\\0\\0"+i(G,4)+i(B,4)+l+F+u}}var n=A("../utils"),s=A("../stream/GenericWorker"),r=A("../utf8"),o=A("../crc32"),g=A("../signature");function a(A,e,t,i){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=t,this.encodeFileName=i,this.streamFiles=A,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(a,s),a.prototype.push=function(A){var e=A.meta.percent||0,t=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(A):(this.bytesWritten+=A.data.length,s.prototype.push.call(this,{data:A.data,meta:{currentFile:this.currentFile,percent:t?(e+100*(t-i-1))/t:100}}))},a.prototype.openedSource=function(A){this.currentSourceOffset=this.bytesWritten,this.currentFile=A.file.name;var e=this.streamFiles&&!A.file.dir;if(e){var t=B(A,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},a.prototype.closedSource=function(A){this.accumulate=!1;var e=this.streamFiles&&!A.file.dir,t=B(A,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),e)this.push({data:function(A){return g.DATA_DESCRIPTOR+i(A.crc32,4)+i(A.compressedSize,4)+i(A.uncompressedSize,4)}(A),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},a.prototype.flush=function(){for(var A=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var t=this.bytesWritten-A,B=function(A,e,t,B,s){var r=n.transformTo("string",s(B));return g.CENTRAL_DIRECTORY_END+"\\0\\0\\0\\0"+i(A,2)+i(A,2)+i(e,4)+i(t,4)+i(r.length,2)+r}(this.dirRecords.length,t,A,this.zipComment,this.encodeFileName);this.push({data:B,meta:{percent:100}})},a.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},a.prototype.registerPrevious=function(A){this._sources.push(A);var e=this;return A.on("data",(function(A){e.processChunk(A)})),A.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),A.on("error",(function(A){e.error(A)})),this},a.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},a.prototype.error=function(A){var e=this._sources;if(!s.prototype.error.call(this,A))return!1;for(var t=0;t<e.length;t++)try{e[t].error(A)}catch(A){}return!0},a.prototype.lock=function(){s.prototype.lock.call(this);for(var A=this._sources,e=0;e<A.length;e++)A[e].lock()},e.exports=a},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(A,e,t){"use strict";var i=A("../compressions"),B=A("./ZipFileWorker");t.generateWorker=function(A,e,t){var n=new B(e.streamFiles,t,e.platform,e.encodeFileName),s=0;try{A.forEach((function(A,t){s++;var B=function(A,e){var t=A||e,B=i[t];if(!B)throw new Error(t+" is not a valid compression method !");return B}(t.options.compression,e.compression),r=t.options.compressionOptions||e.compressionOptions||{},o=t.dir,g=t.date;t._compressWorker(B,r).withStreamInfo("file",{name:A,dir:o,date:g,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(n)})),n.entriesCount=s}catch(A){n.error(A)}return n}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(A,e,t){"use strict";function i(){if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var A=new i;for(var e in this)"function"!=typeof this[e]&&(A[e]=this[e]);return A}}(i.prototype=A("./object")).loadAsync=A("./load"),i.support=A("./support"),i.defaults=A("./defaults"),i.version="3.10.1",i.loadAsync=function(A,e){return(new i).loadAsync(A,e)},i.external=A("./external"),e.exports=i},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(A,e,t){"use strict";var i=A("./utils"),B=A("./external"),n=A("./utf8"),s=A("./zipEntries"),r=A("./stream/Crc32Probe"),o=A("./nodejsUtils");function g(A){return new B.Promise((function(e,t){var i=A.decompressed.getContentWorker().pipe(new r);i.on("error",(function(A){t(A)})).on("end",(function(){i.streamInfo.crc32!==A.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(A,e){var t=this;return e=i.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),o.isNode&&o.isStream(A)?B.Promise.reject(new Error("JSZip can\'t accept a stream when loading a zip file.")):i.prepareContent("the loaded zip file",A,!0,e.optimizedBinaryString,e.base64).then((function(A){var t=new s(e);return t.load(A),t})).then((function(A){var t=[B.Promise.resolve(A)],i=A.files;if(e.checkCRC32)for(var n=0;n<i.length;n++)t.push(g(i[n]));return B.Promise.all(t)})).then((function(A){for(var B=A.shift(),n=B.files,s=0;s<n.length;s++){var r=n[s],o=r.fileNameStr,g=i.resolve(r.fileNameStr);t.file(g,r.decompressed,{binary:!0,optimizedBinaryString:!0,date:r.date,dir:r.dir,comment:r.fileCommentStr.length?r.fileCommentStr:null,unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions,createFolders:e.createFolders}),r.dir||(t.file(g).unsafeOriginalName=o)}return B.zipComment.length&&(t.comment=B.zipComment),t}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(A,e,t){"use strict";var i=A("../utils"),B=A("../stream/GenericWorker");function n(A,e){B.call(this,"Nodejs stream input adapter for "+A),this._upstreamEnded=!1,this._bindStream(e)}i.inherits(n,B),n.prototype._bindStream=function(A){var e=this;(this._stream=A).pause(),A.on("data",(function(A){e.push({data:A,meta:{percent:0}})})).on("error",(function(A){e.isPaused?this.generatedError=A:e.error(A)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},n.prototype.pause=function(){return!!B.prototype.pause.call(this)&&(this._stream.pause(),!0)},n.prototype.resume=function(){return!!B.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=n},{"../stream/GenericWorker":28,"../utils":32}],13:[function(A,e,t){"use strict";var i=A("readable-stream").Readable;function B(A,e,t){i.call(this,e),this._helper=A;var B=this;A.on("data",(function(A,e){B.push(A)||B._helper.pause(),t&&t(e)})).on("error",(function(A){B.emit("error",A)})).on("end",(function(){B.push(null)}))}A("../utils").inherits(B,i),B.prototype._read=function(){this._helper.resume()},e.exports=B},{"../utils":32,"readable-stream":16}],14:[function(A,t,i){"use strict";t.exports={isNode:void 0!==e,newBufferFrom:function(A,t){if(e.from&&e.from!==Uint8Array.from)return e.from(A,t);if("number"==typeof A)throw new Error(\'The "data" argument must not be a number\');return new e(A,t)},allocBuffer:function(A){if(e.alloc)return e.alloc(A);var t=new e(A);return t.fill(0),t},isBuffer:function(A){return e.isBuffer(A)},isStream:function(A){return A&&"function"==typeof A.on&&"function"==typeof A.pause&&"function"==typeof A.resume}}},{}],15:[function(A,e,t){"use strict";function i(A,e,t){var i,B=n.getTypeOf(e),r=n.extend(t||{},o);r.date=r.date||new Date,null!==r.compression&&(r.compression=r.compression.toUpperCase()),"string"==typeof r.unixPermissions&&(r.unixPermissions=parseInt(r.unixPermissions,8)),r.unixPermissions&&16384&r.unixPermissions&&(r.dir=!0),r.dosPermissions&&16&r.dosPermissions&&(r.dir=!0),r.dir&&(A=C(A)),r.createFolders&&(i=w(A))&&l.call(this,i,!0);var c,I="string"===B&&!1===r.binary&&!1===r.base64;t&&void 0!==t.binary||(r.binary=!I),(e instanceof g&&0===e.uncompressedSize||r.dir||!e||0===e.length)&&(r.base64=!1,r.binary=!0,e="",r.compression="STORE",B="string"),c=e instanceof g||e instanceof s?e:Q.isNode&&Q.isStream(e)?new E(A,e):n.prepareContent(A,e,r.binary,r.optimizedBinaryString,r.base64);var h=new a(A,c,r);this.files[A]=h}var B=A("./utf8"),n=A("./utils"),s=A("./stream/GenericWorker"),r=A("./stream/StreamHelper"),o=A("./defaults"),g=A("./compressedObject"),a=A("./zipObject"),c=A("./generate"),Q=A("./nodejsUtils"),E=A("./nodejs/NodejsStreamInputAdapter"),w=function(A){"/"===A.slice(-1)&&(A=A.substring(0,A.length-1));var e=A.lastIndexOf("/");return 0<e?A.substring(0,e):""},C=function(A){return"/"!==A.slice(-1)&&(A+="/"),A},l=function(A,e){return e=void 0!==e?e:o.createFolders,A=C(A),this.files[A]||i.call(this,A,null,{dir:!0,createFolders:e}),this.files[A]};function I(A){return"[object RegExp]"===Object.prototype.toString.call(A)}var h={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var e,t,i;for(e in this.files)i=this.files[e],(t=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&A(t,i)},filter:function(A){var e=[];return this.forEach((function(t,i){A(t,i)&&e.push(i)})),e},file:function(A,e,t){if(1!==arguments.length)return A=this.root+A,i.call(this,A,e,t),this;if(I(A)){var B=A;return this.filter((function(A,e){return!e.dir&&B.test(A)}))}var n=this.files[this.root+A];return n&&!n.dir?n:null},folder:function(A){if(!A)return this;if(I(A))return this.filter((function(e,t){return t.dir&&A.test(e)}));var e=this.root+A,t=l.call(this,e),i=this.clone();return i.root=t.name,i},remove:function(A){A=this.root+A;var e=this.files[A];if(e||("/"!==A.slice(-1)&&(A+="/"),e=this.files[A]),e&&!e.dir)delete this.files[A];else for(var t=this.filter((function(e,t){return t.name.slice(0,A.length)===A})),i=0;i<t.length;i++)delete this.files[t[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(A){var e,t={};try{if((t=n.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:B.utf8encode})).type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),"binarystring"===t.type&&(t.type="string"),!t.type)throw new Error("No output type specified.");n.checkSupport(t.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var i=t.comment||this.comment||"";e=c.generateWorker(this,t,i)}catch(A){(e=new s("error")).error(A)}return new r(e,t.type||"string",t.mimeType)},generateAsync:function(A,e){return this.generateInternalStream(A).accumulate(e)},generateNodeStream:function(A,e){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(e)}};e.exports=h},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(A,e,t){"use strict";e.exports=A("stream")},{stream:void 0}],17:[function(A,e,t){"use strict";var i=A("./DataReader");function B(A){i.call(this,A);for(var e=0;e<this.data.length;e++)A[e]=255&A[e]}A("../utils").inherits(B,i),B.prototype.byteAt=function(A){return this.data[this.zero+A]},B.prototype.lastIndexOfSignature=function(A){for(var e=A.charCodeAt(0),t=A.charCodeAt(1),i=A.charCodeAt(2),B=A.charCodeAt(3),n=this.length-4;0<=n;--n)if(this.data[n]===e&&this.data[n+1]===t&&this.data[n+2]===i&&this.data[n+3]===B)return n-this.zero;return-1},B.prototype.readAndCheckSignature=function(A){var e=A.charCodeAt(0),t=A.charCodeAt(1),i=A.charCodeAt(2),B=A.charCodeAt(3),n=this.readData(4);return e===n[0]&&t===n[1]&&i===n[2]&&B===n[3]},B.prototype.readData=function(A){if(this.checkOffset(A),0===A)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./DataReader":18}],18:[function(A,e,t){"use strict";var i=A("../utils");function B(A){this.data=A,this.length=A.length,this.index=0,this.zero=0}B.prototype={checkOffset:function(A){this.checkIndex(this.index+A)},checkIndex:function(A){if(this.length<this.zero+A||A<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+A+"). Corrupted zip ?")},setIndex:function(A){this.checkIndex(A),this.index=A},skip:function(A){this.setIndex(this.index+A)},byteAt:function(){},readInt:function(A){var e,t=0;for(this.checkOffset(A),e=this.index+A-1;e>=this.index;e--)t=(t<<8)+this.byteAt(e);return this.index+=A,t},readString:function(A){return i.transformTo("string",this.readData(A))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var A=this.readInt(4);return new Date(Date.UTC(1980+(A>>25&127),(A>>21&15)-1,A>>16&31,A>>11&31,A>>5&63,(31&A)<<1))}},e.exports=B},{"../utils":32}],19:[function(A,e,t){"use strict";var i=A("./Uint8ArrayReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.readData=function(A){this.checkOffset(A);var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(A,e,t){"use strict";var i=A("./DataReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.byteAt=function(A){return this.data.charCodeAt(this.zero+A)},B.prototype.lastIndexOfSignature=function(A){return this.data.lastIndexOf(A)-this.zero},B.prototype.readAndCheckSignature=function(A){return A===this.readData(4)},B.prototype.readData=function(A){this.checkOffset(A);var e=this.data.slice(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./DataReader":18}],21:[function(A,e,t){"use strict";var i=A("./ArrayReader");function B(A){i.call(this,A)}A("../utils").inherits(B,i),B.prototype.readData=function(A){if(this.checkOffset(A),0===A)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+A);return this.index+=A,e},e.exports=B},{"../utils":32,"./ArrayReader":17}],22:[function(A,e,t){"use strict";var i=A("../utils"),B=A("../support"),n=A("./ArrayReader"),s=A("./StringReader"),r=A("./NodeBufferReader"),o=A("./Uint8ArrayReader");e.exports=function(A){var e=i.getTypeOf(A);return i.checkSupport(e),"string"!==e||B.uint8array?"nodebuffer"===e?new r(A):B.uint8array?new o(i.transformTo("uint8array",A)):new n(i.transformTo("array",A)):new s(A)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(A,e,t){"use strict";t.LOCAL_FILE_HEADER="PK  ",t.CENTRAL_FILE_HEADER="PK  ",t.CENTRAL_DIRECTORY_END="PK  ",t.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK  ",t.ZIP64_CENTRAL_DIRECTORY_END="PK  ",t.DATA_DESCRIPTOR="PK \\b"},{}],24:[function(A,e,t){"use strict";var i=A("./GenericWorker"),B=A("../utils");function n(A){i.call(this,"ConvertWorker to "+A),this.destType=A}B.inherits(n,i),n.prototype.processChunk=function(A){this.push({data:B.transformTo(this.destType,A.data),meta:A.meta})},e.exports=n},{"../utils":32,"./GenericWorker":28}],25:[function(A,e,t){"use strict";var i=A("./GenericWorker"),B=A("../crc32");function n(){i.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}A("../utils").inherits(n,i),n.prototype.processChunk=function(A){this.streamInfo.crc32=B(A.data,this.streamInfo.crc32||0),this.push(A)},e.exports=n},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(A,e,t){"use strict";var i=A("../utils"),B=A("./GenericWorker");function n(A){B.call(this,"DataLengthProbe for "+A),this.propName=A,this.withStreamInfo(A,0)}i.inherits(n,B),n.prototype.processChunk=function(A){if(A){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+A.data.length}B.prototype.processChunk.call(this,A)},e.exports=n},{"../utils":32,"./GenericWorker":28}],27:[function(A,e,t){"use strict";var i=A("../utils"),B=A("./GenericWorker");function n(A){B.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,A.then((function(A){e.dataIsReady=!0,e.data=A,e.max=A&&A.length||0,e.type=i.getTypeOf(A),e.isPaused||e._tickAndRepeat()}),(function(A){e.error(A)}))}i.inherits(n,B),n.prototype.cleanUp=function(){B.prototype.cleanUp.call(this),this.data=null},n.prototype.resume=function(){return!!B.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,i.delay(this._tickAndRepeat,[],this)),!0)},n.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(i.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},n.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var A=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":A=this.data.substring(this.index,e);break;case"uint8array":A=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":A=this.data.slice(this.index,e)}return this.index=e,this.push({data:A,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=n},{"../utils":32,"./GenericWorker":28}],28:[function(A,e,t){"use strict";function i(A){this.name=A||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}i.prototype={push:function(A){this.emit("data",A)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(A){this.emit("error",A)}return!0},error:function(A){return!this.isFinished&&(this.isPaused?this.generatedError=A:(this.isFinished=!0,this.emit("error",A),this.previous&&this.previous.error(A),this.cleanUp()),!0)},on:function(A,e){return this._listeners[A].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(A,e){if(this._listeners[A])for(var t=0;t<this._listeners[A].length;t++)this._listeners[A][t].call(this,e)},pipe:function(A){return A.registerPrevious(this)},registerPrevious:function(A){if(this.isLocked)throw new Error("The stream \'"+this+"\' has already been used.");this.streamInfo=A.streamInfo,this.mergeStreamInfo(),this.previous=A;var e=this;return A.on("data",(function(A){e.processChunk(A)})),A.on("end",(function(){e.end()})),A.on("error",(function(A){e.error(A)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var A=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),A=!0),this.previous&&this.previous.resume(),!A},flush:function(){},processChunk:function(A){this.push(A)},withStreamInfo:function(A,e){return this.extraStreamInfo[A]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var A in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,A)&&(this.streamInfo[A]=this.extraStreamInfo[A])},lock:function(){if(this.isLocked)throw new Error("The stream \'"+this+"\' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var A="Worker "+this.name;return this.previous?this.previous+" -> "+A:A}},e.exports=i},{}],29:[function(A,t,i){"use strict";var B=A("../utils"),n=A("./ConvertWorker"),s=A("./GenericWorker"),r=A("../base64"),o=A("../support"),g=A("../external"),a=null;if(o.nodestream)try{a=A("../nodejs/NodejsStreamOutputAdapter")}catch(A){}function c(A,e,t){var i=e;switch(e){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string"}try{this._internalType=i,this._outputType=e,this._mimeType=t,B.checkSupport(i),this._worker=A.pipe(new n(i)),A.lock()}catch(A){this._worker=new s("error"),this._worker.error(A)}}c.prototype={accumulate:function(A){return function(A,t){return new g.Promise((function(i,n){var s=[],o=A._internalType,g=A._outputType,a=A._mimeType;A.on("data",(function(A,e){s.push(A),t&&t(e)})).on("error",(function(A){s=[],n(A)})).on("end",(function(){try{var A=function(A,e,t){switch(A){case"blob":return B.newBlob(B.transformTo("arraybuffer",e),t);case"base64":return r.encode(e);default:return B.transformTo(A,e)}}(g,function(A,t){var i,B=0,n=null,s=0;for(i=0;i<t.length;i++)s+=t[i].length;switch(A){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(n=new Uint8Array(s),i=0;i<t.length;i++)n.set(t[i],B),B+=t[i].length;return n;case"nodebuffer":return e.concat(t);default:throw new Error("concat : unsupported type \'"+A+"\'")}}(o,s),a);i(A)}catch(A){n(A)}s=[]})).resume()}))}(this,A)},on:function(A,e){var t=this;return"data"===A?this._worker.on(A,(function(A){e.call(t,A.data,A.meta)})):this._worker.on(A,(function(){B.delay(e,arguments,t)})),this},resume:function(){return B.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(A){if(B.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new a(this,{objectMode:"nodebuffer"!==this._outputType},A)}},t.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(A,t,i){"use strict";if(i.base64=!0,i.array=!0,i.string=!0,i.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,i.nodebuffer=void 0!==e,i.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)i.blob=!1;else{var B=new ArrayBuffer(0);try{i.blob=0===new Blob([B],{type:"application/zip"}).size}catch(A){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(B),i.blob=0===n.getBlob("application/zip").size}catch(A){i.blob=!1}}}try{i.nodestream=!!A("readable-stream").Readable}catch(A){i.nodestream=!1}},{"readable-stream":16}],31:[function(A,e,t){"use strict";for(var i=A("./utils"),B=A("./support"),n=A("./nodejsUtils"),s=A("./stream/GenericWorker"),r=new Array(256),o=0;o<256;o++)r[o]=252<=o?6:248<=o?5:240<=o?4:224<=o?3:192<=o?2:1;function g(){s.call(this,"utf-8 decode"),this.leftOver=null}function a(){s.call(this,"utf-8 encode")}r[254]=r[254]=1,t.utf8encode=function(A){return B.nodebuffer?n.newBufferFrom(A,"utf-8"):function(A){var e,t,i,n,s,r=A.length,o=0;for(n=0;n<r;n++)55296==(64512&(t=A.charCodeAt(n)))&&n+1<r&&56320==(64512&(i=A.charCodeAt(n+1)))&&(t=65536+(t-55296<<10)+(i-56320),n++),o+=t<128?1:t<2048?2:t<65536?3:4;for(e=B.uint8array?new Uint8Array(o):new Array(o),n=s=0;s<o;n++)55296==(64512&(t=A.charCodeAt(n)))&&n+1<r&&56320==(64512&(i=A.charCodeAt(n+1)))&&(t=65536+(t-55296<<10)+(i-56320),n++),t<128?e[s++]=t:(t<2048?e[s++]=192|t>>>6:(t<65536?e[s++]=224|t>>>12:(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63),e[s++]=128|t>>>6&63),e[s++]=128|63&t);return e}(A)},t.utf8decode=function(A){return B.nodebuffer?i.transformTo("nodebuffer",A).toString("utf-8"):function(A){var e,t,B,n,s=A.length,o=new Array(2*s);for(e=t=0;e<s;)if((B=A[e++])<128)o[t++]=B;else if(4<(n=r[B]))o[t++]=65533,e+=n-1;else{for(B&=2===n?31:3===n?15:7;1<n&&e<s;)B=B<<6|63&A[e++],n--;1<n?o[t++]=65533:B<65536?o[t++]=B:(B-=65536,o[t++]=55296|B>>10&1023,o[t++]=56320|1023&B)}return o.length!==t&&(o.subarray?o=o.subarray(0,t):o.length=t),i.applyFromCharCode(o)}(A=i.transformTo(B.uint8array?"uint8array":"array",A))},i.inherits(g,s),g.prototype.processChunk=function(A){var e=i.transformTo(B.uint8array?"uint8array":"array",A.data);if(this.leftOver&&this.leftOver.length){if(B.uint8array){var n=e;(e=new Uint8Array(n.length+this.leftOver.length)).set(this.leftOver,0),e.set(n,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(A,e){var t;for((e=e||A.length)>A.length&&(e=A.length),t=e-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?e:t+r[A[t]]>e?t:e}(e),o=e;s!==e.length&&(B.uint8array?(o=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(o=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:t.utf8decode(o),meta:A.meta})},g.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=g,i.inherits(a,s),a.prototype.processChunk=function(A){this.push({data:t.utf8encode(A.data),meta:A.meta})},t.Utf8EncodeWorker=a},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(A,e,i){"use strict";var B=A("./support"),n=A("./base64"),s=A("./nodejsUtils"),r=A("./external");function o(A){return A}function g(A,e){for(var t=0;t<A.length;++t)e[t]=255&A.charCodeAt(t);return e}A("setimmediate"),i.newBlob=function(A,e){i.checkSupport("blob");try{return new Blob([A],{type:e})}catch(i){try{var t=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return t.append(A),t.getBlob(e)}catch(A){throw new Error("Bug : can\'t construct the Blob.")}}};var a={stringifyByChunk:function(A,e,t){var i=[],B=0,n=A.length;if(n<=t)return String.fromCharCode.apply(null,A);for(;B<n;)"array"===e||"nodebuffer"===e?i.push(String.fromCharCode.apply(null,A.slice(B,Math.min(B+t,n)))):i.push(String.fromCharCode.apply(null,A.subarray(B,Math.min(B+t,n)))),B+=t;return i.join("")},stringifyByChar:function(A){for(var e="",t=0;t<A.length;t++)e+=String.fromCharCode(A[t]);return e},applyCanBeUsed:{uint8array:function(){try{return B.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(A){return!1}}(),nodebuffer:function(){try{return B.nodebuffer&&1===String.fromCharCode.apply(null,s.allocBuffer(1)).length}catch(A){return!1}}()}};function c(A){var e=65536,t=i.getTypeOf(A),B=!0;if("uint8array"===t?B=a.applyCanBeUsed.uint8array:"nodebuffer"===t&&(B=a.applyCanBeUsed.nodebuffer),B)for(;1<e;)try{return a.stringifyByChunk(A,t,e)}catch(A){e=Math.floor(e/2)}return a.stringifyByChar(A)}function Q(A,e){for(var t=0;t<A.length;t++)e[t]=A[t];return e}i.applyFromCharCode=c;var E={};E.string={string:o,array:function(A){return g(A,new Array(A.length))},arraybuffer:function(A){return E.string.uint8array(A).buffer},uint8array:function(A){return g(A,new Uint8Array(A.length))},nodebuffer:function(A){return g(A,s.allocBuffer(A.length))}},E.array={string:c,array:o,arraybuffer:function(A){return new Uint8Array(A).buffer},uint8array:function(A){return new Uint8Array(A)},nodebuffer:function(A){return s.newBufferFrom(A)}},E.arraybuffer={string:function(A){return c(new Uint8Array(A))},array:function(A){return Q(new Uint8Array(A),new Array(A.byteLength))},arraybuffer:o,uint8array:function(A){return new Uint8Array(A)},nodebuffer:function(A){return s.newBufferFrom(new Uint8Array(A))}},E.uint8array={string:c,array:function(A){return Q(A,new Array(A.length))},arraybuffer:function(A){return A.buffer},uint8array:o,nodebuffer:function(A){return s.newBufferFrom(A)}},E.nodebuffer={string:c,array:function(A){return Q(A,new Array(A.length))},arraybuffer:function(A){return E.nodebuffer.uint8array(A).buffer},uint8array:function(A){return Q(A,new Uint8Array(A.length))},nodebuffer:o},i.transformTo=function(A,e){if(e=e||"",!A)return e;i.checkSupport(A);var t=i.getTypeOf(e);return E[t][A](e)},i.resolve=function(A){for(var e=A.split("/"),t=[],i=0;i<e.length;i++){var B=e[i];"."===B||""===B&&0!==i&&i!==e.length-1||(".."===B?t.pop():t.push(B))}return t.join("/")},i.getTypeOf=function(A){return"string"==typeof A?"string":"[object Array]"===Object.prototype.toString.call(A)?"array":B.nodebuffer&&s.isBuffer(A)?"nodebuffer":B.uint8array&&A instanceof Uint8Array?"uint8array":B.arraybuffer&&A instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(A){if(!B[A.toLowerCase()])throw new Error(A+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(A){var e,t,i="";for(t=0;t<(A||"").length;t++)i+="\\\\x"+((e=A.charCodeAt(t))<16?"0":"")+e.toString(16).toUpperCase();return i},i.delay=function(A,e,i){t((function(){A.apply(i||null,e||[])}))},i.inherits=function(A,e){function t(){}t.prototype=e.prototype,A.prototype=new t},i.extend=function(){var A,e,t={};for(A=0;A<arguments.length;A++)for(e in arguments[A])Object.prototype.hasOwnProperty.call(arguments[A],e)&&void 0===t[e]&&(t[e]=arguments[A][e]);return t},i.prepareContent=function(A,e,t,s,o){return r.Promise.resolve(e).then((function(A){return B.blob&&(A instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(A)))&&"undefined"!=typeof FileReader?new r.Promise((function(e,t){var i=new FileReader;i.onload=function(A){e(A.target.result)},i.onerror=function(A){t(A.target.error)},i.readAsArrayBuffer(A)})):A})).then((function(e){var a=i.getTypeOf(e);return a?("arraybuffer"===a?e=i.transformTo("uint8array",e):"string"===a&&(o?e=n.decode(e):t&&!0!==s&&(e=function(A){return g(A,B.uint8array?new Uint8Array(A.length):new Array(A.length))}(e))),e):r.Promise.reject(new Error("Can\'t read the data of \'"+A+"\'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(A,e,t){"use strict";var i=A("./reader/readerFor"),B=A("./utils"),n=A("./signature"),s=A("./zipEntry"),r=A("./support");function o(A){this.files=[],this.loadOptions=A}o.prototype={checkSignature:function(A){if(!this.reader.readAndCheckSignature(A)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+B.pretty(e)+", expected "+B.pretty(A)+")")}},isSignature:function(A,e){var t=this.reader.index;this.reader.setIndex(A);var i=this.reader.readString(4)===e;return this.reader.setIndex(t),i},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var A=this.reader.readData(this.zipCommentLength),e=r.uint8array?"uint8array":"array",t=B.transformTo(e,A);this.zipComment=this.loadOptions.decodeFileName(t)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var A,e,t,i=this.zip64EndOfCentralSize-44;0<i;)A=this.reader.readInt(2),e=this.reader.readInt(4),t=this.reader.readData(e),this.zip64ExtensibleData[A]={id:A,length:e,value:t}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var A,e;for(A=0;A<this.files.length;A++)e=this.files[A],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(n.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var A;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER);)(A=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(A);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var A=this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);if(A<0)throw this.isSignature(0,n.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can\'t find end of central directory"):new Error("Can\'t find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(A);var e=A;if(this.checkSignature(n.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===B.MAX_VALUE_16BITS||this.diskWithCentralDirStart===B.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===B.MAX_VALUE_16BITS||this.centralDirRecords===B.MAX_VALUE_16BITS||this.centralDirSize===B.MAX_VALUE_32BITS||this.centralDirOffset===B.MAX_VALUE_32BITS){if(this.zip64=!0,(A=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can\'t find the ZIP64 end of central directory locator");if(this.reader.setIndex(A),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,n.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can\'t find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var t=this.centralDirOffset+this.centralDirSize;this.zip64&&(t+=20,t+=12+this.zip64EndOfCentralSize);var i=e-t;if(0<i)this.isSignature(e,n.CENTRAL_FILE_HEADER)||(this.reader.zero=i);else if(i<0)throw new Error("Corrupted zip: missing "+Math.abs(i)+" bytes.")},prepareReader:function(A){this.reader=i(A)},load:function(A){this.prepareReader(A),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=o},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(A,e,t){"use strict";var i=A("./reader/readerFor"),B=A("./utils"),n=A("./compressedObject"),s=A("./crc32"),r=A("./utf8"),o=A("./compressions"),g=A("./support");function a(A,e){this.options=A,this.loadOptions=e}a.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(A){var e,t;if(A.skip(22),this.fileNameLength=A.readInt(2),t=A.readInt(2),this.fileName=A.readData(this.fileNameLength),A.skip(t),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn\'t get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(A){for(var e in o)if(Object.prototype.hasOwnProperty.call(o,e)&&o[e].magic===A)return o[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+B.pretty(this.compressionMethod)+" unknown (inner file : "+B.transformTo("string",this.fileName)+")");this.decompressed=new n(this.compressedSize,this.uncompressedSize,this.crc32,e,A.readData(this.compressedSize))},readCentralPart:function(A){this.versionMadeBy=A.readInt(2),A.skip(2),this.bitFlag=A.readInt(2),this.compressionMethod=A.readString(2),this.date=A.readDate(),this.crc32=A.readInt(4),this.compressedSize=A.readInt(4),this.uncompressedSize=A.readInt(4);var e=A.readInt(2);if(this.extraFieldsLength=A.readInt(2),this.fileCommentLength=A.readInt(2),this.diskNumberStart=A.readInt(2),this.internalFileAttributes=A.readInt(2),this.externalFileAttributes=A.readInt(4),this.localHeaderOffset=A.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");A.skip(e),this.readExtraFields(A),this.parseZIP64ExtraField(A),this.fileComment=A.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var A=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==A&&(this.dosPermissions=63&this.externalFileAttributes),3==A&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var A=i(this.extraFields[1].value);this.uncompressedSize===B.MAX_VALUE_32BITS&&(this.uncompressedSize=A.readInt(8)),this.compressedSize===B.MAX_VALUE_32BITS&&(this.compressedSize=A.readInt(8)),this.localHeaderOffset===B.MAX_VALUE_32BITS&&(this.localHeaderOffset=A.readInt(8)),this.diskNumberStart===B.MAX_VALUE_32BITS&&(this.diskNumberStart=A.readInt(4))}},readExtraFields:function(A){var e,t,i,B=A.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});A.index+4<B;)e=A.readInt(2),t=A.readInt(2),i=A.readData(t),this.extraFields[e]={id:e,length:t,value:i};A.setIndex(B)},handleUTF8:function(){var A=g.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=r.utf8decode(this.fileName),this.fileCommentStr=r.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var t=B.transformTo(A,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(t)}var i=this.findExtraFieldUnicodeComment();if(null!==i)this.fileCommentStr=i;else{var n=B.transformTo(A,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(n)}}},findExtraFieldUnicodePath:function(){var A=this.extraFields[28789];if(A){var e=i(A.value);return 1!==e.readInt(1)||s(this.fileName)!==e.readInt(4)?null:r.utf8decode(e.readData(A.length-5))}return null},findExtraFieldUnicodeComment:function(){var A=this.extraFields[25461];if(A){var e=i(A.value);return 1!==e.readInt(1)||s(this.fileComment)!==e.readInt(4)?null:r.utf8decode(e.readData(A.length-5))}return null}},e.exports=a},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(A,e,t){"use strict";function i(A,e,t){this.name=A,this.dir=t.dir,this.date=t.date,this.comment=t.comment,this.unixPermissions=t.unixPermissions,this.dosPermissions=t.dosPermissions,this._data=e,this._dataBinary=t.binary,this.options={compression:t.compression,compressionOptions:t.compressionOptions}}var B=A("./stream/StreamHelper"),n=A("./stream/DataWorker"),s=A("./utf8"),r=A("./compressedObject"),o=A("./stream/GenericWorker");i.prototype={internalStream:function(A){var e=null,t="string";try{if(!A)throw new Error("No output type specified.");var i="string"===(t=A.toLowerCase())||"text"===t;"binarystring"!==t&&"text"!==t||(t="string"),e=this._decompressWorker();var n=!this._dataBinary;n&&!i&&(e=e.pipe(new s.Utf8EncodeWorker)),!n&&i&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(A){(e=new o("error")).error(A)}return new B(e,t,"")},async:function(A,e){return this.internalStream(A).accumulate(e)},nodeStream:function(A,e){return this.internalStream(A||"nodebuffer").toNodejsStream(e)},_compressWorker:function(A,e){if(this._data instanceof r&&this._data.compression.magic===A.magic)return this._data.getCompressedWorker();var t=this._decompressWorker();return this._dataBinary||(t=t.pipe(new s.Utf8EncodeWorker)),r.createWorkerFrom(t,A,e)},_decompressWorker:function(){return this._data instanceof r?this._data.getContentWorker():this._data instanceof o?this._data:new n(this._data)}};for(var g=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],a=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},c=0;c<g.length;c++)i.prototype[g[c]]=a;e.exports=i},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(A,e,t){(function(A){"use strict";var t,i,B=A.MutationObserver||A.WebKitMutationObserver;if(B){var n=0,s=new B(a),r=A.document.createTextNode("");s.observe(r,{characterData:!0}),t=function(){r.data=n=++n%2}}else if(A.setImmediate||void 0===A.MessageChannel)t="document"in A&&"onreadystatechange"in A.document.createElement("script")?function(){var e=A.document.createElement("script");e.onreadystatechange=function(){a(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},A.document.documentElement.appendChild(e)}:function(){setTimeout(a,0)};else{var o=new A.MessageChannel;o.port1.onmessage=a,t=function(){o.port2.postMessage(0)}}var g=[];function a(){var A,e;i=!0;for(var t=g.length;t;){for(e=g,g=[],A=-1;++A<t;)e[A]();t=g.length}i=!1}e.exports=function(A){1!==g.push(A)||i||t()}}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(A,e,t){"use strict";var i=A("immediate");function B(){}var n={},s=["REJECTED"],r=["FULFILLED"],o=["PENDING"];function g(A){if("function"!=typeof A)throw new TypeError("resolver must be a function");this.state=o,this.queue=[],this.outcome=void 0,A!==B&&E(this,A)}function a(A,e,t){this.promise=A,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof t&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}function c(A,e,t){i((function(){var i;try{i=e(t)}catch(i){return n.reject(A,i)}i===A?n.reject(A,new TypeError("Cannot resolve promise with itself")):n.resolve(A,i)}))}function Q(A){var e=A&&A.then;if(A&&("object"==typeof A||"function"==typeof A)&&"function"==typeof e)return function(){e.apply(A,arguments)}}function E(A,e){var t=!1;function i(e){t||(t=!0,n.reject(A,e))}function B(e){t||(t=!0,n.resolve(A,e))}var s=w((function(){e(B,i)}));"error"===s.status&&i(s.value)}function w(A,e){var t={};try{t.value=A(e),t.status="success"}catch(A){t.status="error",t.value=A}return t}(e.exports=g).prototype.finally=function(A){if("function"!=typeof A)return this;var e=this.constructor;return this.then((function(t){return e.resolve(A()).then((function(){return t}))}),(function(t){return e.resolve(A()).then((function(){throw t}))}))},g.prototype.catch=function(A){return this.then(null,A)},g.prototype.then=function(A,e){if("function"!=typeof A&&this.state===r||"function"!=typeof e&&this.state===s)return this;var t=new this.constructor(B);return this.state!==o?c(t,this.state===r?A:e,this.outcome):this.queue.push(new a(t,A,e)),t},a.prototype.callFulfilled=function(A){n.resolve(this.promise,A)},a.prototype.otherCallFulfilled=function(A){c(this.promise,this.onFulfilled,A)},a.prototype.callRejected=function(A){n.reject(this.promise,A)},a.prototype.otherCallRejected=function(A){c(this.promise,this.onRejected,A)},n.resolve=function(A,e){var t=w(Q,e);if("error"===t.status)return n.reject(A,t.value);var i=t.value;if(i)E(A,i);else{A.state=r,A.outcome=e;for(var B=-1,s=A.queue.length;++B<s;)A.queue[B].callFulfilled(e)}return A},n.reject=function(A,e){A.state=s,A.outcome=e;for(var t=-1,i=A.queue.length;++t<i;)A.queue[t].callRejected(e);return A},g.resolve=function(A){return A instanceof this?A:n.resolve(new this(B),A)},g.reject=function(A){var e=new this(B);return n.reject(e,A)},g.all=function(A){var e=this;if("[object Array]"!==Object.prototype.toString.call(A))return this.reject(new TypeError("must be an array"));var t=A.length,i=!1;if(!t)return this.resolve([]);for(var s=new Array(t),r=0,o=-1,g=new this(B);++o<t;)a(A[o],o);return g;function a(A,B){e.resolve(A).then((function(A){s[B]=A,++r!==t||i||(i=!0,n.resolve(g,s))}),(function(A){i||(i=!0,n.reject(g,A))}))}},g.race=function(A){if("[object Array]"!==Object.prototype.toString.call(A))return this.reject(new TypeError("must be an array"));var e=A.length,t=!1;if(!e)return this.resolve([]);for(var i,s=-1,r=new this(B);++s<e;)i=A[s],this.resolve(i).then((function(A){t||(t=!0,n.resolve(r,A))}),(function(A){t||(t=!0,n.reject(r,A))}));return r}},{immediate:36}],38:[function(A,e,t){"use strict";var i={};(0,A("./lib/utils/common").assign)(i,A("./lib/deflate"),A("./lib/inflate"),A("./lib/zlib/constants")),e.exports=i},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(A,e,t){"use strict";var i=A("./zlib/deflate"),B=A("./utils/common"),n=A("./utils/strings"),s=A("./zlib/messages"),r=A("./zlib/zstream"),o=Object.prototype.toString;function g(A){if(!(this instanceof g))return new g(A);this.options=B.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},A||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new r,this.strm.avail_out=0;var t=i.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==t)throw new Error(s[t]);if(e.header&&i.deflateSetHeader(this.strm,e.header),e.dictionary){var a;if(a="string"==typeof e.dictionary?n.string2buf(e.dictionary):"[object ArrayBuffer]"===o.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(t=i.deflateSetDictionary(this.strm,a)))throw new Error(s[t]);this._dict_set=!0}}function a(A,e){var t=new g(e);if(t.push(A,!0),t.err)throw t.msg||s[t.err];return t.result}g.prototype.push=function(A,e){var t,s,r=this.strm,g=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof A?r.input=n.string2buf(A):"[object ArrayBuffer]"===o.call(A)?r.input=new Uint8Array(A):r.input=A,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new B.Buf8(g),r.next_out=0,r.avail_out=g),1!==(t=i.deflate(r,s))&&0!==t)return this.onEnd(t),!(this.ended=!0);0!==r.avail_out&&(0!==r.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(n.buf2binstring(B.shrinkBuf(r.output,r.next_out))):this.onData(B.shrinkBuf(r.output,r.next_out)))}while((0<r.avail_in||0===r.avail_out)&&1!==t);return 4===s?(t=i.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,0===t):2!==s||(this.onEnd(0),!(r.avail_out=0))},g.prototype.onData=function(A){this.chunks.push(A)},g.prototype.onEnd=function(A){0===A&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=B.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg},t.Deflate=g,t.deflate=a,t.deflateRaw=function(A,e){return(e=e||{}).raw=!0,a(A,e)},t.gzip=function(A,e){return(e=e||{}).gzip=!0,a(A,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(A,e,t){"use strict";var i=A("./zlib/inflate"),B=A("./utils/common"),n=A("./utils/strings"),s=A("./zlib/constants"),r=A("./zlib/messages"),o=A("./zlib/zstream"),g=A("./zlib/gzheader"),a=Object.prototype.toString;function c(A){if(!(this instanceof c))return new c(A);this.options=B.assign({chunkSize:16384,windowBits:0,to:""},A||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||A&&A.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var t=i.inflateInit2(this.strm,e.windowBits);if(t!==s.Z_OK)throw new Error(r[t]);this.header=new g,i.inflateGetHeader(this.strm,this.header)}function Q(A,e){var t=new c(e);if(t.push(A,!0),t.err)throw t.msg||r[t.err];return t.result}c.prototype.push=function(A,e){var t,r,o,g,c,Q,E=this.strm,w=this.options.chunkSize,C=this.options.dictionary,l=!1;if(this.ended)return!1;r=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof A?E.input=n.binstring2buf(A):"[object ArrayBuffer]"===a.call(A)?E.input=new Uint8Array(A):E.input=A,E.next_in=0,E.avail_in=E.input.length;do{if(0===E.avail_out&&(E.output=new B.Buf8(w),E.next_out=0,E.avail_out=w),(t=i.inflate(E,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&C&&(Q="string"==typeof C?n.string2buf(C):"[object ArrayBuffer]"===a.call(C)?new Uint8Array(C):C,t=i.inflateSetDictionary(this.strm,Q)),t===s.Z_BUF_ERROR&&!0===l&&(t=s.Z_OK,l=!1),t!==s.Z_STREAM_END&&t!==s.Z_OK)return this.onEnd(t),!(this.ended=!0);E.next_out&&(0!==E.avail_out&&t!==s.Z_STREAM_END&&(0!==E.avail_in||r!==s.Z_FINISH&&r!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(o=n.utf8border(E.output,E.next_out),g=E.next_out-o,c=n.buf2string(E.output,o),E.next_out=g,E.avail_out=w-g,g&&B.arraySet(E.output,E.output,o,g,0),this.onData(c)):this.onData(B.shrinkBuf(E.output,E.next_out)))),0===E.avail_in&&0===E.avail_out&&(l=!0)}while((0<E.avail_in||0===E.avail_out)&&t!==s.Z_STREAM_END);return t===s.Z_STREAM_END&&(r=s.Z_FINISH),r===s.Z_FINISH?(t=i.inflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===s.Z_OK):r!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(E.avail_out=0))},c.prototype.onData=function(A){this.chunks.push(A)},c.prototype.onEnd=function(A){A===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=B.flattenChunks(this.chunks)),this.chunks=[],this.err=A,this.msg=this.strm.msg},t.Inflate=c,t.inflate=Q,t.inflateRaw=function(A,e){return(e=e||{}).raw=!0,Q(A,e)},t.ungzip=Q},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(A,e,t){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;t.assign=function(A){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var t=e.shift();if(t){if("object"!=typeof t)throw new TypeError(t+"must be non-object");for(var i in t)t.hasOwnProperty(i)&&(A[i]=t[i])}}return A},t.shrinkBuf=function(A,e){return A.length===e?A:A.subarray?A.subarray(0,e):(A.length=e,A)};var B={arraySet:function(A,e,t,i,B){if(e.subarray&&A.subarray)A.set(e.subarray(t,t+i),B);else for(var n=0;n<i;n++)A[B+n]=e[t+n]},flattenChunks:function(A){var e,t,i,B,n,s;for(e=i=0,t=A.length;e<t;e++)i+=A[e].length;for(s=new Uint8Array(i),e=B=0,t=A.length;e<t;e++)n=A[e],s.set(n,B),B+=n.length;return s}},n={arraySet:function(A,e,t,i,B){for(var n=0;n<i;n++)A[B+n]=e[t+n]},flattenChunks:function(A){return[].concat.apply([],A)}};t.setTyped=function(A){A?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,B)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,n))},t.setTyped(i)},{}],42:[function(A,e,t){"use strict";var i=A("./common"),B=!0,n=!0;try{String.fromCharCode.apply(null,[0])}catch(A){B=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(A){n=!1}for(var s=new i.Buf8(256),r=0;r<256;r++)s[r]=252<=r?6:248<=r?5:240<=r?4:224<=r?3:192<=r?2:1;function o(A,e){if(e<65537&&(A.subarray&&n||!A.subarray&&B))return String.fromCharCode.apply(null,i.shrinkBuf(A,e));for(var t="",s=0;s<e;s++)t+=String.fromCharCode(A[s]);return t}s[254]=s[254]=1,t.string2buf=function(A){var e,t,B,n,s,r=A.length,o=0;for(n=0;n<r;n++)55296==(64512&(t=A.charCodeAt(n)))&&n+1<r&&56320==(64512&(B=A.charCodeAt(n+1)))&&(t=65536+(t-55296<<10)+(B-56320),n++),o+=t<128?1:t<2048?2:t<65536?3:4;for(e=new i.Buf8(o),n=s=0;s<o;n++)55296==(64512&(t=A.charCodeAt(n)))&&n+1<r&&56320==(64512&(B=A.charCodeAt(n+1)))&&(t=65536+(t-55296<<10)+(B-56320),n++),t<128?e[s++]=t:(t<2048?e[s++]=192|t>>>6:(t<65536?e[s++]=224|t>>>12:(e[s++]=240|t>>>18,e[s++]=128|t>>>12&63),e[s++]=128|t>>>6&63),e[s++]=128|63&t);return e},t.buf2binstring=function(A){return o(A,A.length)},t.binstring2buf=function(A){for(var e=new i.Buf8(A.length),t=0,B=e.length;t<B;t++)e[t]=A.charCodeAt(t);return e},t.buf2string=function(A,e){var t,i,B,n,r=e||A.length,g=new Array(2*r);for(t=i=0;t<r;)if((B=A[t++])<128)g[i++]=B;else if(4<(n=s[B]))g[i++]=65533,t+=n-1;else{for(B&=2===n?31:3===n?15:7;1<n&&t<r;)B=B<<6|63&A[t++],n--;1<n?g[i++]=65533:B<65536?g[i++]=B:(B-=65536,g[i++]=55296|B>>10&1023,g[i++]=56320|1023&B)}return o(g,i)},t.utf8border=function(A,e){var t;for((e=e||A.length)>A.length&&(e=A.length),t=e-1;0<=t&&128==(192&A[t]);)t--;return t<0||0===t?e:t+s[A[t]]>e?t:e}},{"./common":41}],43:[function(A,e,t){"use strict";e.exports=function(A,e,t,i){for(var B=65535&A|0,n=A>>>16&65535|0,s=0;0!==t;){for(t-=s=2e3<t?2e3:t;n=n+(B=B+e[i++]|0)|0,--s;);B%=65521,n%=65521}return B|n<<16|0}},{}],44:[function(A,e,t){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(A,e,t){"use strict";var i=function(){for(var A,e=[],t=0;t<256;t++){A=t;for(var i=0;i<8;i++)A=1&A?3988292384^A>>>1:A>>>1;e[t]=A}return e}();e.exports=function(A,e,t,B){var n=i,s=B+t;A^=-1;for(var r=B;r<s;r++)A=A>>>8^n[255&(A^e[r])];return-1^A}},{}],46:[function(A,e,t){"use strict";var i,B=A("../utils/common"),n=A("./trees"),s=A("./adler32"),r=A("./crc32"),o=A("./messages"),g=-2,a=258,c=262,Q=113;function E(A,e){return A.msg=o[e],e}function w(A){return(A<<1)-(4<A?9:0)}function C(A){for(var e=A.length;0<=--e;)A[e]=0}function l(A){var e=A.state,t=e.pending;t>A.avail_out&&(t=A.avail_out),0!==t&&(B.arraySet(A.output,e.pending_buf,e.pending_out,t,A.next_out),A.next_out+=t,e.pending_out+=t,A.total_out+=t,A.avail_out-=t,e.pending-=t,0===e.pending&&(e.pending_out=0))}function I(A,e){n._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,e),A.block_start=A.strstart,l(A.strm)}function h(A,e){A.pending_buf[A.pending++]=e}function u(A,e){A.pending_buf[A.pending++]=e>>>8&255,A.pending_buf[A.pending++]=255&e}function d(A,e){var t,i,B=A.max_chain_length,n=A.strstart,s=A.prev_length,r=A.nice_match,o=A.strstart>A.w_size-c?A.strstart-(A.w_size-c):0,g=A.window,Q=A.w_mask,E=A.prev,w=A.strstart+a,C=g[n+s-1],l=g[n+s];A.prev_length>=A.good_match&&(B>>=2),r>A.lookahead&&(r=A.lookahead);do{if(g[(t=e)+s]===l&&g[t+s-1]===C&&g[t]===g[n]&&g[++t]===g[n+1]){n+=2,t++;do{}while(g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&g[++n]===g[++t]&&n<w);if(i=a-(w-n),n=w-a,s<i){if(A.match_start=e,r<=(s=i))break;C=g[n+s-1],l=g[n+s]}}}while((e=E[e&Q])>o&&0!=--B);return s<=A.lookahead?s:A.lookahead}function Y(A){var e,t,i,n,o,g,a,Q,E,w,C=A.w_size;do{if(n=A.window_size-A.lookahead-A.strstart,A.strstart>=C+(C-c)){for(B.arraySet(A.window,A.window,C,C,0),A.match_start-=C,A.strstart-=C,A.block_start-=C,e=t=A.hash_size;i=A.head[--e],A.head[e]=C<=i?i-C:0,--t;);for(e=t=C;i=A.prev[--e],A.prev[e]=C<=i?i-C:0,--t;);n+=C}if(0===A.strm.avail_in)break;if(g=A.strm,a=A.window,Q=A.strstart+A.lookahead,w=void 0,(E=n)<(w=g.avail_in)&&(w=E),t=0===w?0:(g.avail_in-=w,B.arraySet(a,g.input,g.next_in,w,Q),1===g.state.wrap?g.adler=s(g.adler,a,w,Q):2===g.state.wrap&&(g.adler=r(g.adler,a,w,Q)),g.next_in+=w,g.total_in+=w,w),A.lookahead+=t,A.lookahead+A.insert>=3)for(o=A.strstart-A.insert,A.ins_h=A.window[o],A.ins_h=(A.ins_h<<A.hash_shift^A.window[o+1])&A.hash_mask;A.insert&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[o+3-1])&A.hash_mask,A.prev[o&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=o,o++,A.insert--,!(A.lookahead+A.insert<3)););}while(A.lookahead<c&&0!==A.strm.avail_in)}function M(A,e){for(var t,i;;){if(A.lookahead<c){if(Y(A),A.lookahead<c&&0===e)return 1;if(0===A.lookahead)break}if(t=0,A.lookahead>=3&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+3-1])&A.hash_mask,t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),0!==t&&A.strstart-t<=A.w_size-c&&(A.match_length=d(A,t)),A.match_length>=3)if(i=n._tr_tally(A,A.strstart-A.match_start,A.match_length-3),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=3){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+3-1])&A.hash_mask,t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart,0!=--A.match_length;);A.strstart++}else A.strstart+=A.match_length,A.match_length=0,A.ins_h=A.window[A.strstart],A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+1])&A.hash_mask;else i=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(i&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=A.strstart<2?A.strstart:2,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}function F(A,e){for(var t,i,B;;){if(A.lookahead<c){if(Y(A),A.lookahead<c&&0===e)return 1;if(0===A.lookahead)break}if(t=0,A.lookahead>=3&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+3-1])&A.hash_mask,t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),A.prev_length=A.match_length,A.prev_match=A.match_start,A.match_length=2,0!==t&&A.prev_length<A.max_lazy_match&&A.strstart-t<=A.w_size-c&&(A.match_length=d(A,t),A.match_length<=5&&(1===A.strategy||3===A.match_length&&4096<A.strstart-A.match_start)&&(A.match_length=2)),A.prev_length>=3&&A.match_length<=A.prev_length){for(B=A.strstart+A.lookahead-3,i=n._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-3),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=B&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+3-1])&A.hash_mask,t=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),0!=--A.prev_length;);if(A.match_available=0,A.match_length=2,A.strstart++,i&&(I(A,!1),0===A.strm.avail_out))return 1}else if(A.match_available){if((i=n._tr_tally(A,0,A.window[A.strstart-1]))&&I(A,!1),A.strstart++,A.lookahead--,0===A.strm.avail_out)return 1}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(i=n._tr_tally(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<2?A.strstart:2,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}function D(A,e,t,i,B){this.good_length=A,this.max_lazy=e,this.nice_length=t,this.max_chain=i,this.func=B}function m(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new B.Buf16(1146),this.dyn_dtree=new B.Buf16(122),this.bl_tree=new B.Buf16(78),C(this.dyn_ltree),C(this.dyn_dtree),C(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new B.Buf16(16),this.heap=new B.Buf16(573),C(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new B.Buf16(573),C(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function p(A){var e;return A&&A.state?(A.total_in=A.total_out=0,A.data_type=2,(e=A.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:Q,A.adler=2===e.wrap?0:1,e.last_flush=0,n._tr_init(e),0):E(A,g)}function U(A){var e=p(A);return 0===e&&function(A){A.window_size=2*A.w_size,C(A.head),A.max_lazy_match=i[A.level].max_lazy,A.good_match=i[A.level].good_length,A.nice_match=i[A.level].nice_length,A.max_chain_length=i[A.level].max_chain,A.strstart=0,A.block_start=0,A.lookahead=0,A.insert=0,A.match_length=A.prev_length=2,A.match_available=0,A.ins_h=0}(A.state),e}function f(A,e,t,i,n,s){if(!A)return g;var r=1;if(-1===e&&(e=6),i<0?(r=0,i=-i):15<i&&(r=2,i-=16),n<1||9<n||8!==t||i<8||15<i||e<0||9<e||s<0||4<s)return E(A,g);8===i&&(i=9);var o=new m;return(A.state=o).strm=A,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new B.Buf8(2*o.w_size),o.head=new B.Buf16(o.hash_size),o.prev=new B.Buf16(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new B.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=s,o.method=t,U(A)}i=[new D(0,0,0,0,(function(A,e){var t=65535;for(t>A.pending_buf_size-5&&(t=A.pending_buf_size-5);;){if(A.lookahead<=1){if(Y(A),0===A.lookahead&&0===e)return 1;if(0===A.lookahead)break}A.strstart+=A.lookahead,A.lookahead=0;var i=A.block_start+t;if((0===A.strstart||A.strstart>=i)&&(A.lookahead=A.strstart-i,A.strstart=i,I(A,!1),0===A.strm.avail_out))return 1;if(A.strstart-A.block_start>=A.w_size-c&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):(A.strstart>A.block_start&&(I(A,!1),A.strm.avail_out),1)})),new D(4,4,8,4,M),new D(4,5,16,8,M),new D(4,6,32,32,M),new D(4,4,16,16,F),new D(8,16,32,32,F),new D(8,16,128,128,F),new D(8,32,128,256,F),new D(32,128,258,1024,F),new D(32,258,258,4096,F)],t.deflateInit=function(A,e){return f(A,e,8,15,8,0)},t.deflateInit2=f,t.deflateReset=U,t.deflateResetKeep=p,t.deflateSetHeader=function(A,e){return A&&A.state?2!==A.state.wrap?g:(A.state.gzhead=e,0):g},t.deflate=function(A,e){var t,B,s,o;if(!A||!A.state||5<e||e<0)return A?E(A,g):g;if(B=A.state,!A.output||!A.input&&0!==A.avail_in||666===B.status&&4!==e)return E(A,0===A.avail_out?-5:g);if(B.strm=A,t=B.last_flush,B.last_flush=e,42===B.status)if(2===B.wrap)A.adler=0,h(B,31),h(B,139),h(B,8),B.gzhead?(h(B,(B.gzhead.text?1:0)+(B.gzhead.hcrc?2:0)+(B.gzhead.extra?4:0)+(B.gzhead.name?8:0)+(B.gzhead.comment?16:0)),h(B,255&B.gzhead.time),h(B,B.gzhead.time>>8&255),h(B,B.gzhead.time>>16&255),h(B,B.gzhead.time>>24&255),h(B,9===B.level?2:2<=B.strategy||B.level<2?4:0),h(B,255&B.gzhead.os),B.gzhead.extra&&B.gzhead.extra.length&&(h(B,255&B.gzhead.extra.length),h(B,B.gzhead.extra.length>>8&255)),B.gzhead.hcrc&&(A.adler=r(A.adler,B.pending_buf,B.pending,0)),B.gzindex=0,B.status=69):(h(B,0),h(B,0),h(B,0),h(B,0),h(B,0),h(B,9===B.level?2:2<=B.strategy||B.level<2?4:0),h(B,3),B.status=Q);else{var c=8+(B.w_bits-8<<4)<<8;c|=(2<=B.strategy||B.level<2?0:B.level<6?1:6===B.level?2:3)<<6,0!==B.strstart&&(c|=32),c+=31-c%31,B.status=Q,u(B,c),0!==B.strstart&&(u(B,A.adler>>>16),u(B,65535&A.adler)),A.adler=1}if(69===B.status)if(B.gzhead.extra){for(s=B.pending;B.gzindex<(65535&B.gzhead.extra.length)&&(B.pending!==B.pending_buf_size||(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending!==B.pending_buf_size));)h(B,255&B.gzhead.extra[B.gzindex]),B.gzindex++;B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),B.gzindex===B.gzhead.extra.length&&(B.gzindex=0,B.status=73)}else B.status=73;if(73===B.status)if(B.gzhead.name){s=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending===B.pending_buf_size)){o=1;break}o=B.gzindex<B.gzhead.name.length?255&B.gzhead.name.charCodeAt(B.gzindex++):0,h(B,o)}while(0!==o);B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),0===o&&(B.gzindex=0,B.status=91)}else B.status=91;if(91===B.status)if(B.gzhead.comment){s=B.pending;do{if(B.pending===B.pending_buf_size&&(B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),l(A),s=B.pending,B.pending===B.pending_buf_size)){o=1;break}o=B.gzindex<B.gzhead.comment.length?255&B.gzhead.comment.charCodeAt(B.gzindex++):0,h(B,o)}while(0!==o);B.gzhead.hcrc&&B.pending>s&&(A.adler=r(A.adler,B.pending_buf,B.pending-s,s)),0===o&&(B.status=103)}else B.status=103;if(103===B.status&&(B.gzhead.hcrc?(B.pending+2>B.pending_buf_size&&l(A),B.pending+2<=B.pending_buf_size&&(h(B,255&A.adler),h(B,A.adler>>8&255),A.adler=0,B.status=Q)):B.status=Q),0!==B.pending){if(l(A),0===A.avail_out)return B.last_flush=-1,0}else if(0===A.avail_in&&w(e)<=w(t)&&4!==e)return E(A,-5);if(666===B.status&&0!==A.avail_in)return E(A,-5);if(0!==A.avail_in||0!==B.lookahead||0!==e&&666!==B.status){var d=2===B.strategy?function(A,e){for(var t;;){if(0===A.lookahead&&(Y(A),0===A.lookahead)){if(0===e)return 1;break}if(A.match_length=0,t=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++,t&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}(B,e):3===B.strategy?function(A,e){for(var t,i,B,s,r=A.window;;){if(A.lookahead<=a){if(Y(A),A.lookahead<=a&&0===e)return 1;if(0===A.lookahead)break}if(A.match_length=0,A.lookahead>=3&&0<A.strstart&&(i=r[B=A.strstart-1])===r[++B]&&i===r[++B]&&i===r[++B]){s=A.strstart+a;do{}while(i===r[++B]&&i===r[++B]&&i===r[++B]&&i===r[++B]&&i===r[++B]&&i===r[++B]&&i===r[++B]&&i===r[++B]&&B<s);A.match_length=a-(s-B),A.match_length>A.lookahead&&(A.match_length=A.lookahead)}if(A.match_length>=3?(t=n._tr_tally(A,1,A.match_length-3),A.lookahead-=A.match_length,A.strstart+=A.match_length,A.match_length=0):(t=n._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++),t&&(I(A,!1),0===A.strm.avail_out))return 1}return A.insert=0,4===e?(I(A,!0),0===A.strm.avail_out?3:4):A.last_lit&&(I(A,!1),0===A.strm.avail_out)?1:2}(B,e):i[B.level].func(B,e);if(3!==d&&4!==d||(B.status=666),1===d||3===d)return 0===A.avail_out&&(B.last_flush=-1),0;if(2===d&&(1===e?n._tr_align(B):5!==e&&(n._tr_stored_block(B,0,0,!1),3===e&&(C(B.head),0===B.lookahead&&(B.strstart=0,B.block_start=0,B.insert=0))),l(A),0===A.avail_out))return B.last_flush=-1,0}return 4!==e?0:B.wrap<=0?1:(2===B.wrap?(h(B,255&A.adler),h(B,A.adler>>8&255),h(B,A.adler>>16&255),h(B,A.adler>>24&255),h(B,255&A.total_in),h(B,A.total_in>>8&255),h(B,A.total_in>>16&255),h(B,A.total_in>>24&255)):(u(B,A.adler>>>16),u(B,65535&A.adler)),l(A),0<B.wrap&&(B.wrap=-B.wrap),0!==B.pending?0:1)},t.deflateEnd=function(A){var e;return A&&A.state?42!==(e=A.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==Q&&666!==e?E(A,g):(A.state=null,e===Q?E(A,-3):0):g},t.deflateSetDictionary=function(A,e){var t,i,n,r,o,a,c,Q,E=e.length;if(!A||!A.state)return g;if(2===(r=(t=A.state).wrap)||1===r&&42!==t.status||t.lookahead)return g;for(1===r&&(A.adler=s(A.adler,e,E,0)),t.wrap=0,E>=t.w_size&&(0===r&&(C(t.head),t.strstart=0,t.block_start=0,t.insert=0),Q=new B.Buf8(t.w_size),B.arraySet(Q,e,E-t.w_size,t.w_size,0),e=Q,E=t.w_size),o=A.avail_in,a=A.next_in,c=A.input,A.avail_in=E,A.next_in=0,A.input=e,Y(t);t.lookahead>=3;){for(i=t.strstart,n=t.lookahead-2;t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+3-1])&t.hash_mask,t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,--n;);t.strstart=i,t.lookahead=2,Y(t)}return t.strstart+=t.lookahead,t.block_start=t.strstart,t.insert=t.lookahead,t.lookahead=0,t.match_length=t.prev_length=2,t.match_available=0,A.next_in=a,A.input=c,A.avail_in=o,t.wrap=r,0},t.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(A,e,t){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(A,e,t){"use strict";e.exports=function(A,e){var t,i,B,n,s,r,o,g,a,c,Q,E,w,C,l,I,h,u,d,Y,M,F,D,m,p;t=A.state,i=A.next_in,m=A.input,B=i+(A.avail_in-5),n=A.next_out,p=A.output,s=n-(e-A.avail_out),r=n+(A.avail_out-257),o=t.dmax,g=t.wsize,a=t.whave,c=t.wnext,Q=t.window,E=t.hold,w=t.bits,C=t.lencode,l=t.distcode,I=(1<<t.lenbits)-1,h=(1<<t.distbits)-1;A:do{w<15&&(E+=m[i++]<<w,w+=8,E+=m[i++]<<w,w+=8),u=C[E&I];e:for(;;){if(E>>>=d=u>>>24,w-=d,0==(d=u>>>16&255))p[n++]=65535&u;else{if(!(16&d)){if(0==(64&d)){u=C[(65535&u)+(E&(1<<d)-1)];continue e}if(32&d){t.mode=12;break A}A.msg="invalid literal/length code",t.mode=30;break A}Y=65535&u,(d&=15)&&(w<d&&(E+=m[i++]<<w,w+=8),Y+=E&(1<<d)-1,E>>>=d,w-=d),w<15&&(E+=m[i++]<<w,w+=8,E+=m[i++]<<w,w+=8),u=l[E&h];t:for(;;){if(E>>>=d=u>>>24,w-=d,!(16&(d=u>>>16&255))){if(0==(64&d)){u=l[(65535&u)+(E&(1<<d)-1)];continue t}A.msg="invalid distance code",t.mode=30;break A}if(M=65535&u,w<(d&=15)&&(E+=m[i++]<<w,(w+=8)<d&&(E+=m[i++]<<w,w+=8)),o<(M+=E&(1<<d)-1)){A.msg="invalid distance too far back",t.mode=30;break A}if(E>>>=d,w-=d,(d=n-s)<M){if(a<(d=M-d)&&t.sane){A.msg="invalid distance too far back",t.mode=30;break A}if(D=Q,(F=0)===c){if(F+=g-d,d<Y){for(Y-=d;p[n++]=Q[F++],--d;);F=n-M,D=p}}else if(c<d){if(F+=g+c-d,(d-=c)<Y){for(Y-=d;p[n++]=Q[F++],--d;);if(F=0,c<Y){for(Y-=d=c;p[n++]=Q[F++],--d;);F=n-M,D=p}}}else if(F+=c-d,d<Y){for(Y-=d;p[n++]=Q[F++],--d;);F=n-M,D=p}for(;2<Y;)p[n++]=D[F++],p[n++]=D[F++],p[n++]=D[F++],Y-=3;Y&&(p[n++]=D[F++],1<Y&&(p[n++]=D[F++]))}else{for(F=n-M;p[n++]=p[F++],p[n++]=p[F++],p[n++]=p[F++],2<(Y-=3););Y&&(p[n++]=p[F++],1<Y&&(p[n++]=p[F++]))}break}}break}}while(i<B&&n<r);i-=Y=w>>3,E&=(1<<(w-=Y<<3))-1,A.next_in=i,A.next_out=n,A.avail_in=i<B?B-i+5:5-(i-B),A.avail_out=n<r?r-n+257:257-(n-r),t.hold=E,t.bits=w}},{}],49:[function(A,e,t){"use strict";var i=A("../utils/common"),B=A("./adler32"),n=A("./crc32"),s=A("./inffast"),r=A("./inftrees"),o=-2;function g(A){return(A>>>24&255)+(A>>>8&65280)+((65280&A)<<8)+((255&A)<<24)}function a(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new i.Buf16(320),this.work=new i.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(A){var e;return A&&A.state?(e=A.state,A.total_in=A.total_out=e.total=0,A.msg="",e.wrap&&(A.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new i.Buf32(852),e.distcode=e.distdyn=new i.Buf32(592),e.sane=1,e.back=-1,0):o}function Q(A){var e;return A&&A.state?((e=A.state).wsize=0,e.whave=0,e.wnext=0,c(A)):o}function E(A,e){var t,i;return A&&A.state?(i=A.state,e<0?(t=0,e=-e):(t=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?o:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,Q(A))):o}function w(A,e){var t,i;return A?(i=new a,(A.state=i).window=null,0!==(t=E(A,e))&&(A.state=null),t):o}var C,l,I=!0;function h(A){if(I){var e;for(C=new i.Buf32(512),l=new i.Buf32(32),e=0;e<144;)A.lens[e++]=8;for(;e<256;)A.lens[e++]=9;for(;e<280;)A.lens[e++]=7;for(;e<288;)A.lens[e++]=8;for(r(1,A.lens,0,288,C,0,A.work,{bits:9}),e=0;e<32;)A.lens[e++]=5;r(2,A.lens,0,32,l,0,A.work,{bits:5}),I=!1}A.lencode=C,A.lenbits=9,A.distcode=l,A.distbits=5}function u(A,e,t,B){var n,s=A.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new i.Buf8(s.wsize)),B>=s.wsize?(i.arraySet(s.window,e,t-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(B<(n=s.wsize-s.wnext)&&(n=B),i.arraySet(s.window,e,t-B,n,s.wnext),(B-=n)?(i.arraySet(s.window,e,t-B,B,0),s.wnext=B,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0}t.inflateReset=Q,t.inflateReset2=E,t.inflateResetKeep=c,t.inflateInit=function(A){return w(A,15)},t.inflateInit2=w,t.inflate=function(A,e){var t,a,c,Q,E,w,C,l,I,d,Y,M,F,D,m,p,U,f,N,G,y,H,k,R,x=0,J=new i.Buf8(4),T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!A||!A.state||!A.output||!A.input&&0!==A.avail_in)return o;12===(t=A.state).mode&&(t.mode=13),E=A.next_out,c=A.output,C=A.avail_out,Q=A.next_in,a=A.input,w=A.avail_in,l=t.hold,I=t.bits,d=w,Y=C,H=0;A:for(;;)switch(t.mode){case 1:if(0===t.wrap){t.mode=13;break}for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(2&t.wrap&&35615===l){J[t.check=0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0),I=l=0,t.mode=2;break}if(t.flags=0,t.head&&(t.head.done=!1),!(1&t.wrap)||(((255&l)<<8)+(l>>8))%31){A.msg="incorrect header check",t.mode=30;break}if(8!=(15&l)){A.msg="unknown compression method",t.mode=30;break}if(I-=4,y=8+(15&(l>>>=4)),0===t.wbits)t.wbits=y;else if(y>t.wbits){A.msg="invalid window size",t.mode=30;break}t.dmax=1<<y,A.adler=t.check=1,t.mode=512&l?10:12,I=l=0;break;case 2:for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(t.flags=l,8!=(255&t.flags)){A.msg="unknown compression method",t.mode=30;break}if(57344&t.flags){A.msg="unknown header flags set",t.mode=30;break}t.head&&(t.head.text=l>>8&1),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0,t.mode=3;case 3:for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}t.head&&(t.head.time=l),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,J[2]=l>>>16&255,J[3]=l>>>24&255,t.check=n(t.check,J,4,0)),I=l=0,t.mode=4;case 4:for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}t.head&&(t.head.xflags=255&l,t.head.os=l>>8),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0,t.mode=5;case 5:if(1024&t.flags){for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}t.length=l,t.head&&(t.head.extra_len=l),512&t.flags&&(J[0]=255&l,J[1]=l>>>8&255,t.check=n(t.check,J,2,0)),I=l=0}else t.head&&(t.head.extra=null);t.mode=6;case 6:if(1024&t.flags&&(w<(M=t.length)&&(M=w),M&&(t.head&&(y=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),i.arraySet(t.head.extra,a,Q,M,y)),512&t.flags&&(t.check=n(t.check,a,M,Q)),w-=M,Q+=M,t.length-=M),t.length))break A;t.length=0,t.mode=7;case 7:if(2048&t.flags){if(0===w)break A;for(M=0;y=a[Q+M++],t.head&&y&&t.length<65536&&(t.head.name+=String.fromCharCode(y)),y&&M<w;);if(512&t.flags&&(t.check=n(t.check,a,M,Q)),w-=M,Q+=M,y)break A}else t.head&&(t.head.name=null);t.length=0,t.mode=8;case 8:if(4096&t.flags){if(0===w)break A;for(M=0;y=a[Q+M++],t.head&&y&&t.length<65536&&(t.head.comment+=String.fromCharCode(y)),y&&M<w;);if(512&t.flags&&(t.check=n(t.check,a,M,Q)),w-=M,Q+=M,y)break A}else t.head&&(t.head.comment=null);t.mode=9;case 9:if(512&t.flags){for(;I<16;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(l!==(65535&t.check)){A.msg="header crc mismatch",t.mode=30;break}I=l=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),A.adler=t.check=0,t.mode=12;break;case 10:for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}A.adler=t.check=g(l),I=l=0,t.mode=11;case 11:if(0===t.havedict)return A.next_out=E,A.avail_out=C,A.next_in=Q,A.avail_in=w,t.hold=l,t.bits=I,2;A.adler=t.check=1,t.mode=12;case 12:if(5===e||6===e)break A;case 13:if(t.last){l>>>=7&I,I-=7&I,t.mode=27;break}for(;I<3;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}switch(t.last=1&l,I-=1,3&(l>>>=1)){case 0:t.mode=14;break;case 1:if(h(t),t.mode=20,6!==e)break;l>>>=2,I-=2;break A;case 2:t.mode=17;break;case 3:A.msg="invalid block type",t.mode=30}l>>>=2,I-=2;break;case 14:for(l>>>=7&I,I-=7&I;I<32;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if((65535&l)!=(l>>>16^65535)){A.msg="invalid stored block lengths",t.mode=30;break}if(t.length=65535&l,I=l=0,t.mode=15,6===e)break A;case 15:t.mode=16;case 16:if(M=t.length){if(w<M&&(M=w),C<M&&(M=C),0===M)break A;i.arraySet(c,a,Q,M,E),w-=M,Q+=M,C-=M,E+=M,t.length-=M;break}t.mode=12;break;case 17:for(;I<14;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(t.nlen=257+(31&l),l>>>=5,I-=5,t.ndist=1+(31&l),l>>>=5,I-=5,t.ncode=4+(15&l),l>>>=4,I-=4,286<t.nlen||30<t.ndist){A.msg="too many length or distance symbols",t.mode=30;break}t.have=0,t.mode=18;case 18:for(;t.have<t.ncode;){for(;I<3;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}t.lens[T[t.have++]]=7&l,l>>>=3,I-=3}for(;t.have<19;)t.lens[T[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,k={bits:t.lenbits},H=r(0,t.lens,0,19,t.lencode,0,t.work,k),t.lenbits=k.bits,H){A.msg="invalid code lengths set",t.mode=30;break}t.have=0,t.mode=19;case 19:for(;t.have<t.nlen+t.ndist;){for(;p=(x=t.lencode[l&(1<<t.lenbits)-1])>>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(U<16)l>>>=m,I-=m,t.lens[t.have++]=U;else{if(16===U){for(R=m+2;I<R;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(l>>>=m,I-=m,0===t.have){A.msg="invalid bit length repeat",t.mode=30;break}y=t.lens[t.have-1],M=3+(3&l),l>>>=2,I-=2}else if(17===U){for(R=m+3;I<R;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}I-=m,y=0,M=3+(7&(l>>>=m)),l>>>=3,I-=3}else{for(R=m+7;I<R;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}I-=m,y=0,M=11+(127&(l>>>=m)),l>>>=7,I-=7}if(t.have+M>t.nlen+t.ndist){A.msg="invalid bit length repeat",t.mode=30;break}for(;M--;)t.lens[t.have++]=y}}if(30===t.mode)break;if(0===t.lens[256]){A.msg="invalid code -- missing end-of-block",t.mode=30;break}if(t.lenbits=9,k={bits:t.lenbits},H=r(1,t.lens,0,t.nlen,t.lencode,0,t.work,k),t.lenbits=k.bits,H){A.msg="invalid literal/lengths set",t.mode=30;break}if(t.distbits=6,t.distcode=t.distdyn,k={bits:t.distbits},H=r(2,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,k),t.distbits=k.bits,H){A.msg="invalid distances set",t.mode=30;break}if(t.mode=20,6===e)break A;case 20:t.mode=21;case 21:if(6<=w&&258<=C){A.next_out=E,A.avail_out=C,A.next_in=Q,A.avail_in=w,t.hold=l,t.bits=I,s(A,Y),E=A.next_out,c=A.output,C=A.avail_out,Q=A.next_in,a=A.input,w=A.avail_in,l=t.hold,I=t.bits,12===t.mode&&(t.back=-1);break}for(t.back=0;p=(x=t.lencode[l&(1<<t.lenbits)-1])>>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(p&&0==(240&p)){for(f=m,N=p,G=U;p=(x=t.lencode[G+((l&(1<<f+N)-1)>>f)])>>>16&255,U=65535&x,!(f+(m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}l>>>=f,I-=f,t.back+=f}if(l>>>=m,I-=m,t.back+=m,t.length=U,0===p){t.mode=26;break}if(32&p){t.back=-1,t.mode=12;break}if(64&p){A.msg="invalid literal/length code",t.mode=30;break}t.extra=15&p,t.mode=22;case 22:if(t.extra){for(R=t.extra;I<R;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}t.length+=l&(1<<t.extra)-1,l>>>=t.extra,I-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=23;case 23:for(;p=(x=t.distcode[l&(1<<t.distbits)-1])>>>16&255,U=65535&x,!((m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(0==(240&p)){for(f=m,N=p,G=U;p=(x=t.distcode[G+((l&(1<<f+N)-1)>>f)])>>>16&255,U=65535&x,!(f+(m=x>>>24)<=I);){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}l>>>=f,I-=f,t.back+=f}if(l>>>=m,I-=m,t.back+=m,64&p){A.msg="invalid distance code",t.mode=30;break}t.offset=U,t.extra=15&p,t.mode=24;case 24:if(t.extra){for(R=t.extra;I<R;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}t.offset+=l&(1<<t.extra)-1,l>>>=t.extra,I-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){A.msg="invalid distance too far back",t.mode=30;break}t.mode=25;case 25:if(0===C)break A;if(M=Y-C,t.offset>M){if((M=t.offset-M)>t.whave&&t.sane){A.msg="invalid distance too far back",t.mode=30;break}F=M>t.wnext?(M-=t.wnext,t.wsize-M):t.wnext-M,M>t.length&&(M=t.length),D=t.window}else D=c,F=E-t.offset,M=t.length;for(C<M&&(M=C),C-=M,t.length-=M;c[E++]=D[F++],--M;);0===t.length&&(t.mode=21);break;case 26:if(0===C)break A;c[E++]=t.length,C--,t.mode=21;break;case 27:if(t.wrap){for(;I<32;){if(0===w)break A;w--,l|=a[Q++]<<I,I+=8}if(Y-=C,A.total_out+=Y,t.total+=Y,Y&&(A.adler=t.check=t.flags?n(t.check,c,Y,E-Y):B(t.check,c,Y,E-Y)),Y=C,(t.flags?l:g(l))!==t.check){A.msg="incorrect data check",t.mode=30;break}I=l=0}t.mode=28;case 28:if(t.wrap&&t.flags){for(;I<32;){if(0===w)break A;w--,l+=a[Q++]<<I,I+=8}if(l!==(4294967295&t.total)){A.msg="incorrect length check",t.mode=30;break}I=l=0}t.mode=29;case 29:H=1;break A;case 30:H=-3;break A;case 31:return-4;case 32:default:return o}return A.next_out=E,A.avail_out=C,A.next_in=Q,A.avail_in=w,t.hold=l,t.bits=I,(t.wsize||Y!==A.avail_out&&t.mode<30&&(t.mode<27||4!==e))&&u(A,A.output,A.next_out,Y-A.avail_out)?(t.mode=31,-4):(d-=A.avail_in,Y-=A.avail_out,A.total_in+=d,A.total_out+=Y,t.total+=Y,t.wrap&&Y&&(A.adler=t.check=t.flags?n(t.check,c,Y,A.next_out-Y):B(t.check,c,Y,A.next_out-Y)),A.data_type=t.bits+(t.last?64:0)+(12===t.mode?128:0)+(20===t.mode||15===t.mode?256:0),(0==d&&0===Y||4===e)&&0===H&&(H=-5),H)},t.inflateEnd=function(A){if(!A||!A.state)return o;var e=A.state;return e.window&&(e.window=null),A.state=null,0},t.inflateGetHeader=function(A,e){var t;return A&&A.state?0==(2&(t=A.state).wrap)?o:((t.head=e).done=!1,0):o},t.inflateSetDictionary=function(A,e){var t,i=e.length;return A&&A.state?0!==(t=A.state).wrap&&11!==t.mode?o:11===t.mode&&B(1,e,i,0)!==t.check?-3:u(A,e,i,i)?(t.mode=31,-4):(t.havedict=1,0):o},t.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(A,e,t){"use strict";var i=A("../utils/common"),B=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],n=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],r=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(A,e,t,o,g,a,c,Q){var E,w,C,l,I,h,u,d,Y,M=Q.bits,F=0,D=0,m=0,p=0,U=0,f=0,N=0,G=0,y=0,H=0,k=null,R=0,x=new i.Buf16(16),J=new i.Buf16(16),T=null,S=0;for(F=0;F<=15;F++)x[F]=0;for(D=0;D<o;D++)x[e[t+D]]++;for(U=M,p=15;1<=p&&0===x[p];p--);if(p<U&&(U=p),0===p)return g[a++]=20971520,g[a++]=20971520,Q.bits=1,0;for(m=1;m<p&&0===x[m];m++);for(U<m&&(U=m),F=G=1;F<=15;F++)if(G<<=1,(G-=x[F])<0)return-1;if(0<G&&(0===A||1!==p))return-1;for(J[1]=0,F=1;F<15;F++)J[F+1]=J[F]+x[F];for(D=0;D<o;D++)0!==e[t+D]&&(c[J[e[t+D]]++]=D);if(h=0===A?(k=T=c,19):1===A?(k=B,R-=257,T=n,S-=257,256):(k=s,T=r,-1),F=m,I=a,N=D=H=0,C=-1,l=(y=1<<(f=U))-1,1===A&&852<y||2===A&&592<y)return 1;for(;;){for(u=F-N,Y=c[D]<h?(d=0,c[D]):c[D]>h?(d=T[S+c[D]],k[R+c[D]]):(d=96,0),E=1<<F-N,m=w=1<<f;g[I+(H>>N)+(w-=E)]=u<<24|d<<16|Y|0,0!==w;);for(E=1<<F-1;H&E;)E>>=1;if(0!==E?(H&=E-1,H+=E):H=0,D++,0==--x[F]){if(F===p)break;F=e[t+c[D]]}if(U<F&&(H&l)!==C){for(0===N&&(N=U),I+=m,G=1<<(f=F-N);f+N<p&&!((G-=x[f+N])<=0);)f++,G<<=1;if(y+=1<<f,1===A&&852<y||2===A&&592<y)return 1;g[C=H&l]=U<<24|f<<16|I-a|0}}return 0!==H&&(g[I+H]=F-N<<24|64<<16|0),Q.bits=U,0}},{"../utils/common":41}],51:[function(A,e,t){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(A,e,t){"use strict";var i=A("../utils/common");function B(A){for(var e=A.length;0<=--e;)A[e]=0}var n=256,s=286,r=30,o=15,g=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],c=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(576);B(E);var w=new Array(60);B(w);var C=new Array(512);B(C);var l=new Array(256);B(l);var I=new Array(29);B(I);var h,u,d,Y=new Array(r);function M(A,e,t,i,B){this.static_tree=A,this.extra_bits=e,this.extra_base=t,this.elems=i,this.max_length=B,this.has_stree=A&&A.length}function F(A,e){this.dyn_tree=A,this.max_code=0,this.stat_desc=e}function D(A){return A<256?C[A]:C[256+(A>>>7)]}function m(A,e){A.pending_buf[A.pending++]=255&e,A.pending_buf[A.pending++]=e>>>8&255}function p(A,e,t){A.bi_valid>16-t?(A.bi_buf|=e<<A.bi_valid&65535,m(A,A.bi_buf),A.bi_buf=e>>16-A.bi_valid,A.bi_valid+=t-16):(A.bi_buf|=e<<A.bi_valid&65535,A.bi_valid+=t)}function U(A,e,t){p(A,t[2*e],t[2*e+1])}function f(A,e){for(var t=0;t|=1&A,A>>>=1,t<<=1,0<--e;);return t>>>1}function N(A,e,t){var i,B,n=new Array(16),s=0;for(i=1;i<=o;i++)n[i]=s=s+t[i-1]<<1;for(B=0;B<=e;B++){var r=A[2*B+1];0!==r&&(A[2*B]=f(n[r]++,r))}}function G(A){var e;for(e=0;e<s;e++)A.dyn_ltree[2*e]=0;for(e=0;e<r;e++)A.dyn_dtree[2*e]=0;for(e=0;e<19;e++)A.bl_tree[2*e]=0;A.dyn_ltree[512]=1,A.opt_len=A.static_len=0,A.last_lit=A.matches=0}function y(A){8<A.bi_valid?m(A,A.bi_buf):0<A.bi_valid&&(A.pending_buf[A.pending++]=A.bi_buf),A.bi_buf=0,A.bi_valid=0}function H(A,e,t,i){var B=2*e,n=2*t;return A[B]<A[n]||A[B]===A[n]&&i[e]<=i[t]}function k(A,e,t){for(var i=A.heap[t],B=t<<1;B<=A.heap_len&&(B<A.heap_len&&H(e,A.heap[B+1],A.heap[B],A.depth)&&B++,!H(e,i,A.heap[B],A.depth));)A.heap[t]=A.heap[B],t=B,B<<=1;A.heap[t]=i}function R(A,e,t){var i,B,s,r,o=0;if(0!==A.last_lit)for(;i=A.pending_buf[A.d_buf+2*o]<<8|A.pending_buf[A.d_buf+2*o+1],B=A.pending_buf[A.l_buf+o],o++,0===i?U(A,B,e):(U(A,(s=l[B])+n+1,e),0!==(r=g[s])&&p(A,B-=I[s],r),U(A,s=D(--i),t),0!==(r=a[s])&&p(A,i-=Y[s],r)),o<A.last_lit;);U(A,256,e)}function x(A,e){var t,i,B,n=e.dyn_tree,s=e.stat_desc.static_tree,r=e.stat_desc.has_stree,g=e.stat_desc.elems,a=-1;for(A.heap_len=0,A.heap_max=573,t=0;t<g;t++)0!==n[2*t]?(A.heap[++A.heap_len]=a=t,A.depth[t]=0):n[2*t+1]=0;for(;A.heap_len<2;)n[2*(B=A.heap[++A.heap_len]=a<2?++a:0)]=1,A.depth[B]=0,A.opt_len--,r&&(A.static_len-=s[2*B+1]);for(e.max_code=a,t=A.heap_len>>1;1<=t;t--)k(A,n,t);for(B=g;t=A.heap[1],A.heap[1]=A.heap[A.heap_len--],k(A,n,1),i=A.heap[1],A.heap[--A.heap_max]=t,A.heap[--A.heap_max]=i,n[2*B]=n[2*t]+n[2*i],A.depth[B]=(A.depth[t]>=A.depth[i]?A.depth[t]:A.depth[i])+1,n[2*t+1]=n[2*i+1]=B,A.heap[1]=B++,k(A,n,1),2<=A.heap_len;);A.heap[--A.heap_max]=A.heap[1],function(A,e){var t,i,B,n,s,r,g=e.dyn_tree,a=e.max_code,c=e.stat_desc.static_tree,Q=e.stat_desc.has_stree,E=e.stat_desc.extra_bits,w=e.stat_desc.extra_base,C=e.stat_desc.max_length,l=0;for(n=0;n<=o;n++)A.bl_count[n]=0;for(g[2*A.heap[A.heap_max]+1]=0,t=A.heap_max+1;t<573;t++)C<(n=g[2*g[2*(i=A.heap[t])+1]+1]+1)&&(n=C,l++),g[2*i+1]=n,a<i||(A.bl_count[n]++,s=0,w<=i&&(s=E[i-w]),r=g[2*i],A.opt_len+=r*(n+s),Q&&(A.static_len+=r*(c[2*i+1]+s)));if(0!==l){do{for(n=C-1;0===A.bl_count[n];)n--;A.bl_count[n]--,A.bl_count[n+1]+=2,A.bl_count[C]--,l-=2}while(0<l);for(n=C;0!==n;n--)for(i=A.bl_count[n];0!==i;)a<(B=A.heap[--t])||(g[2*B+1]!==n&&(A.opt_len+=(n-g[2*B+1])*g[2*B],g[2*B+1]=n),i--)}}(A,e),N(n,a,A.bl_count)}function J(A,e,t){var i,B,n=-1,s=e[1],r=0,o=7,g=4;for(0===s&&(o=138,g=3),e[2*(t+1)+1]=65535,i=0;i<=t;i++)B=s,s=e[2*(i+1)+1],++r<o&&B===s||(r<g?A.bl_tree[2*B]+=r:0!==B?(B!==n&&A.bl_tree[2*B]++,A.bl_tree[32]++):r<=10?A.bl_tree[34]++:A.bl_tree[36]++,n=B,g=(r=0)===s?(o=138,3):B===s?(o=6,3):(o=7,4))}function T(A,e,t){var i,B,n=-1,s=e[1],r=0,o=7,g=4;for(0===s&&(o=138,g=3),i=0;i<=t;i++)if(B=s,s=e[2*(i+1)+1],!(++r<o&&B===s)){if(r<g)for(;U(A,B,A.bl_tree),0!=--r;);else 0!==B?(B!==n&&(U(A,B,A.bl_tree),r--),U(A,16,A.bl_tree),p(A,r-3,2)):r<=10?(U(A,17,A.bl_tree),p(A,r-3,3)):(U(A,18,A.bl_tree),p(A,r-11,7));n=B,g=(r=0)===s?(o=138,3):B===s?(o=6,3):(o=7,4)}}B(Y);var S=!1;function b(A,e,t,B){p(A,0+(B?1:0),3),function(A,e,t,B){y(A),m(A,t),m(A,~t),i.arraySet(A.pending_buf,A.window,e,t,A.pending),A.pending+=t}(A,e,t)}t._tr_init=function(A){S||(function(){var A,e,t,i,B,n=new Array(16);for(i=t=0;i<28;i++)for(I[i]=t,A=0;A<1<<g[i];A++)l[t++]=i;for(l[t-1]=i,i=B=0;i<16;i++)for(Y[i]=B,A=0;A<1<<a[i];A++)C[B++]=i;for(B>>=7;i<r;i++)for(Y[i]=B<<7,A=0;A<1<<a[i]-7;A++)C[256+B++]=i;for(e=0;e<=o;e++)n[e]=0;for(A=0;A<=143;)E[2*A+1]=8,A++,n[8]++;for(;A<=255;)E[2*A+1]=9,A++,n[9]++;for(;A<=279;)E[2*A+1]=7,A++,n[7]++;for(;A<=287;)E[2*A+1]=8,A++,n[8]++;for(N(E,287,n),A=0;A<r;A++)w[2*A+1]=5,w[2*A]=f(A,5);h=new M(E,g,257,s,o),u=new M(w,a,0,r,o),d=new M(new Array(0),c,0,19,7)}(),S=!0),A.l_desc=new F(A.dyn_ltree,h),A.d_desc=new F(A.dyn_dtree,u),A.bl_desc=new F(A.bl_tree,d),A.bi_buf=0,A.bi_valid=0,G(A)},t._tr_stored_block=b,t._tr_flush_block=function(A,e,t,i){var B,s,r=0;0<A.level?(2===A.strm.data_type&&(A.strm.data_type=function(A){var e,t=4093624447;for(e=0;e<=31;e++,t>>>=1)if(1&t&&0!==A.dyn_ltree[2*e])return 0;if(0!==A.dyn_ltree[18]||0!==A.dyn_ltree[20]||0!==A.dyn_ltree[26])return 1;for(e=32;e<n;e++)if(0!==A.dyn_ltree[2*e])return 1;return 0}(A)),x(A,A.l_desc),x(A,A.d_desc),r=function(A){var e;for(J(A,A.dyn_ltree,A.l_desc.max_code),J(A,A.dyn_dtree,A.d_desc.max_code),x(A,A.bl_desc),e=18;3<=e&&0===A.bl_tree[2*Q[e]+1];e--);return A.opt_len+=3*(e+1)+5+5+4,e}(A),B=A.opt_len+3+7>>>3,(s=A.static_len+3+7>>>3)<=B&&(B=s)):B=s=t+5,t+4<=B&&-1!==e?b(A,e,t,i):4===A.strategy||s===B?(p(A,2+(i?1:0),3),R(A,E,w)):(p(A,4+(i?1:0),3),function(A,e,t,i){var B;for(p(A,e-257,5),p(A,t-1,5),p(A,i-4,4),B=0;B<i;B++)p(A,A.bl_tree[2*Q[B]+1],3);T(A,A.dyn_ltree,e-1),T(A,A.dyn_dtree,t-1)}(A,A.l_desc.max_code+1,A.d_desc.max_code+1,r+1),R(A,A.dyn_ltree,A.dyn_dtree)),G(A),i&&y(A)},t._tr_tally=function(A,e,t){return A.pending_buf[A.d_buf+2*A.last_lit]=e>>>8&255,A.pending_buf[A.d_buf+2*A.last_lit+1]=255&e,A.pending_buf[A.l_buf+A.last_lit]=255&t,A.last_lit++,0===e?A.dyn_ltree[2*t]++:(A.matches++,e--,A.dyn_ltree[2*(l[t]+n+1)]++,A.dyn_dtree[2*D(e)]++),A.last_lit===A.lit_bufsize-1},t._tr_align=function(A){p(A,2,3),U(A,256,E),function(A){16===A.bi_valid?(m(A,A.bi_buf),A.bi_buf=0,A.bi_valid=0):8<=A.bi_valid&&(A.pending_buf[A.pending++]=255&A.bi_buf,A.bi_buf>>=8,A.bi_valid-=8)}(A)}},{"../utils/common":41}],53:[function(A,e,t){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(A,e,t){(function(A){!function(A,e){"use strict";if(!A.setImmediate){var t,i,n,s,r=1,o={},g=!1,a=A.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(A);c=c&&c.setTimeout?c:A,t="[object process]"==={}.toString.call(A.process)?function(A){B.nextTick((function(){E(A)}))}:function(){if(A.postMessage&&!A.importScripts){var e=!0,t=A.onmessage;return A.onmessage=function(){e=!1},A.postMessage("","*"),A.onmessage=t,e}}()?(s="setImmediate$"+Math.random()+"$",A.addEventListener?A.addEventListener("message",w,!1):A.attachEvent("onmessage",w),function(e){A.postMessage(s+e,"*")}):A.MessageChannel?((n=new MessageChannel).port1.onmessage=function(A){E(A.data)},function(A){n.port2.postMessage(A)}):a&&"onreadystatechange"in a.createElement("script")?(i=a.documentElement,function(A){var e=a.createElement("script");e.onreadystatechange=function(){E(A),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):function(A){setTimeout(E,0,A)},c.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var e=new Array(arguments.length-1),i=0;i<e.length;i++)e[i]=arguments[i+1];var B={callback:A,args:e};return o[r]=B,t(r),r++},c.clearImmediate=Q}function Q(A){delete o[A]}function E(A){if(g)setTimeout(E,0,A);else{var e=o[A];if(e){g=!0;try{!function(A){var e=A.callback,t=A.args;switch(t.length){case 0:e();break;case 1:e(t[0]);break;case 2:e(t[0],t[1]);break;case 3:e(t[0],t[1],t[2]);break;default:e.apply(void 0,t)}}(e)}finally{Q(A),g=!1}}}}function w(e){e.source===A&&"string"==typeof e.data&&0===e.data.indexOf(s)&&E(+e.data.slice(s.length))}}("undefined"==typeof self?void 0===A?this:A:self)}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)}).call(this,t(12).Buffer,t(139).setImmediate,t(9),t(43))},function(A,e,t){var i=t(142),B=i.enable,n=i.disable,s="undefined"!=typeof navigator&&/chrome/i.test(navigator.userAgent),r=t(145);if(i.defaultBackend=s?r.minilog:r,"undefined"!=typeof window){try{i.enable(JSON.parse(window.localStorage.minilogSettings))}catch(A){}if(window.location&&window.location.search){var o=RegExp("[?&]minilog=([^&]*)").exec(window.location.search);o&&i.enable(decodeURIComponent(o[1]))}}i.enable=function(){B.call(i,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(A){}return this},i.disable=function(){n.call(i);try{delete window.localStorage.minilogSettings}catch(A){}return this},(A.exports=i).backends={array:t(148),browser:i.defaultBackend,localStorage:t(149),jQuery:t(150)}},function(A,e){class t{static get RGB_BLACK(){return{r:0,g:0,b:0}}static get RGB_WHITE(){return{r:255,g:255,b:255}}static decimalToHex(A){A<0&&(A+=16777216);let e=Number(A).toString(16);return e="#".concat("000000".substr(0,6-e.length)).concat(e),e}static decimalToRgb(A){const e=A>>24&255;return{r:A>>16&255,g:A>>8&255,b:255&A,a:e>0?e:255}}static hexToRgb(A){A.startsWith("#")&&(A=A.substring(1));const e=parseInt(A,16);if(isNaN(e))return null;if(6===A.length)return{r:e>>16&255,g:e>>8&255,b:255&e};if(3===A.length){const A=e>>8&15,t=e>>4&15,i=15&e;return{r:A<<4|A,g:t<<4|t,b:i<<4|i}}return null}static rgbToHex(A){return t.decimalToHex(t.rgbToDecimal(A))}static rgbToDecimal(A){return(A.r<<16)+(A.g<<8)+A.b}static hexToDecimal(A){return t.rgbToDecimal(t.hexToRgb(A))}static hsvToRgb(A){let e=A.h%360;e<0&&(e+=360);const t=Math.max(0,Math.min(A.s,1)),i=Math.max(0,Math.min(A.v,1)),B=Math.floor(e/60),n=e/60-B,s=i*(1-t),r=i*(1-t*n),o=i*(1-t*(1-n));let g,a,c;switch(B){default:case 0:g=i,a=o,c=s;break;case 1:g=r,a=i,c=s;break;case 2:g=s,a=i,c=o;break;case 3:g=s,a=r,c=i;break;case 4:g=o,a=s,c=i;break;case 5:g=i,a=s,c=r}return{r:Math.floor(255*g),g:Math.floor(255*a),b:Math.floor(255*c)}}static rgbToHsv(A){const e=A.r/255,t=A.g/255,i=A.b/255,B=Math.min(Math.min(e,t),i),n=Math.max(Math.max(e,t),i);let s=0,r=0;if(B!==n){s=60*((e===B?3:t===B?5:1)-(e===B?t-i:t===B?i-e:e-t)/(n-B))%360,r=(n-B)/n}return{h:s,s:r,v:n}}static mixRgb(A,e,t){if(t<=0)return A;if(t>=1)return e;const i=1-t;return{r:i*A.r+t*e.r,g:i*A.g+t*e.g,b:i*A.b+t*e.b}}}A.exports=t},function(A,e,t){A.exports=function(){"use strict";var A=Array.prototype.slice;function e(A,e){e&&(A.prototype=Object.create(e.prototype)),A.prototype.constructor=A}function t(A){return s(A)?A:v(A)}function i(A){return r(A)?A:L(A)}function B(A){return o(A)?A:P(A)}function n(A){return s(A)&&!g(A)?A:W(A)}function s(A){return!(!A||!A[c])}function r(A){return!(!A||!A[Q])}function o(A){return!(!A||!A[E])}function g(A){return r(A)||o(A)}function a(A){return!(!A||!A[w])}e(i,t),e(B,t),e(n,t),t.isIterable=s,t.isKeyed=r,t.isIndexed=o,t.isAssociative=g,t.isOrdered=a,t.Keyed=i,t.Indexed=B,t.Set=n;var c="@@__IMMUTABLE_ITERABLE__@@",Q="@@__IMMUTABLE_KEYED__@@",E="@@__IMMUTABLE_INDEXED__@@",w="@@__IMMUTABLE_ORDERED__@@",C={},l={value:!1},I={value:!1};function h(A){return A.value=!1,A}function u(A){A&&(A.value=!0)}function d(){}function Y(A,e){e=e||0;for(var t=Math.max(0,A.length-e),i=new Array(t),B=0;B<t;B++)i[B]=A[B+e];return i}function M(A){return void 0===A.size&&(A.size=A.__iterate(D)),A.size}function F(A,e){if("number"!=typeof e){var t=e>>>0;if(""+t!==e||4294967295===t)return NaN;e=t}return e<0?M(A)+e:e}function D(){return!0}function m(A,e,t){return(0===A||void 0!==t&&A<=-t)&&(void 0===e||void 0!==t&&e>=t)}function p(A,e){return f(A,e,0)}function U(A,e){return f(A,e,e)}function f(A,e,t){return void 0===A?t:A<0?Math.max(0,e+A):void 0===e?A:Math.min(e,A)}var N,G,y,H="function"==typeof Symbol&&Symbol.iterator,k=H||"@@iterator";function R(A){this.next=A}function x(A,e,t,i){var B=0===A?e:1===A?t:[e,t];return i?i.value=B:i={value:B,done:!1},i}function J(){return{value:void 0,done:!0}}function T(A){return!!j(A)}function S(A){return A&&"function"==typeof A.next}function b(A){var e=j(A);return e&&e.call(A)}function j(A){var e=A&&(H&&A[H]||A["@@iterator"]);if("function"==typeof e)return e}function z(A){return A&&"number"==typeof A.length}function v(A){return null==A?Z():s(A)?A.toSeq():function(A){var e=AA(A)||"object"==typeof A&&new V(A);if(!e)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+A);return e}(A)}function L(A){return null==A?Z().toKeyedSeq():s(A)?r(A)?A.toSeq():A.fromEntrySeq():q(A)}function P(A){return null==A?Z():s(A)?r(A)?A.entrySeq():A.toIndexedSeq():$(A)}function W(A){return(null==A?Z():s(A)?r(A)?A.entrySeq():A:$(A)).toSetSeq()}function O(A){this._array=A,this.size=A.length}function V(A){var e=Object.keys(A);this._object=A,this._keys=e,this.size=e.length}function K(A){this._iterable=A,this.size=A.length||A.size}function X(A){this._iterator=A,this._iteratorCache=[]}function _(A){return!(!A||!A["@@__IMMUTABLE_SEQ__@@"])}function Z(){return N||(N=new O([]))}function q(A){var e=Array.isArray(A)?new O(A).fromEntrySeq():S(A)?new X(A).fromEntrySeq():T(A)?new K(A).fromEntrySeq():"object"==typeof A?new V(A):void 0;if(!e)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+A);return e}function $(A){var e=AA(A);if(!e)throw new TypeError("Expected Array or iterable object of values: "+A);return e}function AA(A){return z(A)?new O(A):S(A)?new X(A):T(A)?new K(A):void 0}function eA(A,e,t,i){var B=A._cache;if(B){for(var n=B.length-1,s=0;s<=n;s++){var r=B[t?n-s:s];if(!1===e(r[1],i?r[0]:s,A))return s+1}return s}return A.__iterateUncached(e,t)}function tA(A,e,t,i){var B=A._cache;if(B){var n=B.length-1,s=0;return new R((function(){var A=B[t?n-s:s];return s++>n?{value:void 0,done:!0}:x(e,i?A[0]:s-1,A[1])}))}return A.__iteratorUncached(e,t)}function iA(A,e){return e?function A(e,t,i,B){return Array.isArray(t)?e.call(B,i,P(t).map((function(i,B){return A(e,i,B,t)}))):nA(t)?e.call(B,i,L(t).map((function(i,B){return A(e,i,B,t)}))):t}(e,A,"",{"":A}):BA(A)}function BA(A){return Array.isArray(A)?P(A).map(BA).toList():nA(A)?L(A).map(BA).toMap():A}function nA(A){return A&&(A.constructor===Object||void 0===A.constructor)}function sA(A,e){if(A===e||A!=A&&e!=e)return!0;if(!A||!e)return!1;if("function"==typeof A.valueOf&&"function"==typeof e.valueOf){if((A=A.valueOf())===(e=e.valueOf())||A!=A&&e!=e)return!0;if(!A||!e)return!1}return!("function"!=typeof A.equals||"function"!=typeof e.equals||!A.equals(e))}function rA(A,e){if(A===e)return!0;if(!s(e)||void 0!==A.size&&void 0!==e.size&&A.size!==e.size||void 0!==A.__hash&&void 0!==e.__hash&&A.__hash!==e.__hash||r(A)!==r(e)||o(A)!==o(e)||a(A)!==a(e))return!1;if(0===A.size&&0===e.size)return!0;var t=!g(A);if(a(A)){var i=A.entries();return e.every((function(A,e){var B=i.next().value;return B&&sA(B[1],A)&&(t||sA(B[0],e))}))&&i.next().done}var B=!1;if(void 0===A.size)if(void 0===e.size)"function"==typeof A.cacheResult&&A.cacheResult();else{B=!0;var n=A;A=e,e=n}var c=!0,Q=e.__iterate((function(e,i){if(t?!A.has(e):B?!sA(e,A.get(i,C)):!sA(A.get(i,C),e))return c=!1,!1}));return c&&A.size===Q}function oA(A,e){if(!(this instanceof oA))return new oA(A,e);if(this._value=A,this.size=void 0===e?1/0:Math.max(0,e),0===this.size){if(G)return G;G=this}}function gA(A,e){if(!A)throw new Error(e)}function aA(A,e,t){if(!(this instanceof aA))return new aA(A,e,t);if(gA(0!==t,"Cannot step a Range by 0"),A=A||0,void 0===e&&(e=1/0),t=void 0===t?1:Math.abs(t),e<A&&(t=-t),this._start=A,this._end=e,this._step=t,this.size=Math.max(0,Math.ceil((e-A)/t-1)+1),0===this.size){if(y)return y;y=this}}function cA(){throw TypeError("Abstract")}function QA(){}function EA(){}function wA(){}R.prototype.toString=function(){return"[Iterator]"},R.KEYS=0,R.VALUES=1,R.ENTRIES=2,R.prototype.inspect=R.prototype.toSource=function(){return this.toString()},R.prototype[k]=function(){return this},e(v,t),v.of=function(){return v(arguments)},v.prototype.toSeq=function(){return this},v.prototype.toString=function(){return this.__toString("Seq {","}")},v.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},v.prototype.__iterate=function(A,e){return eA(this,A,e,!0)},v.prototype.__iterator=function(A,e){return tA(this,A,e,!0)},e(L,v),L.prototype.toKeyedSeq=function(){return this},e(P,v),P.of=function(){return P(arguments)},P.prototype.toIndexedSeq=function(){return this},P.prototype.toString=function(){return this.__toString("Seq [","]")},P.prototype.__iterate=function(A,e){return eA(this,A,e,!1)},P.prototype.__iterator=function(A,e){return tA(this,A,e,!1)},e(W,v),W.of=function(){return W(arguments)},W.prototype.toSetSeq=function(){return this},v.isSeq=_,v.Keyed=L,v.Set=W,v.Indexed=P,v.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,e(O,P),O.prototype.get=function(A,e){return this.has(A)?this._array[F(this,A)]:e},O.prototype.__iterate=function(A,e){for(var t=this._array,i=t.length-1,B=0;B<=i;B++)if(!1===A(t[e?i-B:B],B,this))return B+1;return B},O.prototype.__iterator=function(A,e){var t=this._array,i=t.length-1,B=0;return new R((function(){return B>i?{value:void 0,done:!0}:x(A,B,t[e?i-B++:B++])}))},e(V,L),V.prototype.get=function(A,e){return void 0===e||this.has(A)?this._object[A]:e},V.prototype.has=function(A){return this._object.hasOwnProperty(A)},V.prototype.__iterate=function(A,e){for(var t=this._object,i=this._keys,B=i.length-1,n=0;n<=B;n++){var s=i[e?B-n:n];if(!1===A(t[s],s,this))return n+1}return n},V.prototype.__iterator=function(A,e){var t=this._object,i=this._keys,B=i.length-1,n=0;return new R((function(){var s=i[e?B-n:n];return n++>B?{value:void 0,done:!0}:x(A,s,t[s])}))},V.prototype[w]=!0,e(K,P),K.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);var t=b(this._iterable),i=0;if(S(t))for(var B;!(B=t.next()).done&&!1!==A(B.value,i++,this););return i},K.prototype.__iteratorUncached=function(A,e){if(e)return this.cacheResult().__iterator(A,e);var t=b(this._iterable);if(!S(t))return new R(J);var i=0;return new R((function(){var e=t.next();return e.done?e:x(A,i++,e.value)}))},e(X,P),X.prototype.__iterateUncached=function(A,e){if(e)return this.cacheResult().__iterate(A,e);for(var t,i=this._iterator,B=this._iteratorCache,n=0;n<B.length;)if(!1===A(B[n],n++,this))return n;for(;!(t=i.next()).done;){var s=t.value;if(B[n]=s,!1===A(s,n++,this))break}return n},X.prototype.__iteratorUncached=function(A,e){if(e)return this.cacheResult().__iterator(A,e);var t=this._iterator,i=this._iteratorCache,B=0;return new R((function(){if(B>=i.length){var e=t.next();if(e.done)return e;i[B]=e.value}return x(A,B,i[B++])}))},e(oA,P),oA.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},oA.prototype.get=function(A,e){return this.has(A)?this._value:e},oA.prototype.includes=function(A){return sA(this._value,A)},oA.prototype.slice=function(A,e){var t=this.size;return m(A,e,t)?this:new oA(this._value,U(e,t)-p(A,t))},oA.prototype.reverse=function(){return this},oA.prototype.indexOf=function(A){return sA(this._value,A)?0:-1},oA.prototype.lastIndexOf=function(A){return sA(this._value,A)?this.size:-1},oA.prototype.__iterate=function(A,e){for(var t=0;t<this.size;t++)if(!1===A(this._value,t,this))return t+1;return t},oA.prototype.__iterator=function(A,e){var t=this,i=0;return new R((function(){return i<t.size?x(A,i++,t._value):{value:void 0,done:!0}}))},oA.prototype.equals=function(A){return A instanceof oA?sA(this._value,A._value):rA(A)},e(aA,P),aA.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!');
  228.  

Editor

You can edit this paste and save as new:


File Description
  • javascriptarena.html
  • Paste Code
  • 26 Apr-2024
  • 260.6 Kb
You can Share it: