From d8010c4f1d70685404a510d604f8b6d5c362f93a Mon Sep 17 00:00:00 2001 From: z3dev Date: Sun, 29 Dec 2024 10:02:32 +0900 Subject: [PATCH] chore(release): publish - @jscad/cli@2.3.5 - @jscad/core@2.6.12 - @jscad/3mf-serializer@2.1.14 - @jscad/amf-deserializer@2.3.10 - @jscad/amf-serializer@2.1.20 - @jscad/dxf-deserializer@2.3.27 - @jscad/dxf-serializer@2.1.20 - @jscad/io-utils@2.0.30 - @jscad/io@2.4.11 - @jscad/json-deserializer@2.0.31 - @jscad/json-serializer@2.0.30 - @jscad/obj-deserializer@2.0.30 - @jscad/obj-serializer@2.1.20 - @jscad/stl-deserializer@2.1.27 - @jscad/stl-serializer@2.1.20 - @jscad/svg-deserializer@2.5.11 - @jscad/svg-serializer@2.3.18 - @jscad/x3d-deserializer@2.2.10 - @jscad/x3d-serializer@2.4.10 - @jscad/modeling@2.12.5 - @jscad/regl-renderer@2.6.12 - @jscad/vtree@2.0.31 - @jscad/web@2.6.10 --- packages/cli/CHANGELOG.md | 8 + packages/cli/package.json | 8 +- packages/core/CHANGELOG.md | 8 + packages/core/dist/jscad-core.min.js | 56 +-- packages/core/package.json | 8 +- packages/io/3mf-serializer/CHANGELOG.md | 8 + packages/io/3mf-serializer/package.json | 4 +- packages/io/amf-deserializer/CHANGELOG.md | 8 + packages/io/amf-deserializer/package.json | 6 +- packages/io/amf-serializer/CHANGELOG.md | 8 + packages/io/amf-serializer/package.json | 4 +- packages/io/dxf-deserializer/CHANGELOG.md | 8 + packages/io/dxf-deserializer/package.json | 6 +- packages/io/dxf-serializer/CHANGELOG.md | 8 + packages/io/dxf-serializer/package.json | 4 +- packages/io/io-utils/CHANGELOG.md | 8 + packages/io/io-utils/package.json | 4 +- packages/io/io/CHANGELOG.md | 8 + packages/io/io/package.json | 36 +- packages/io/json-deserializer/CHANGELOG.md | 8 + packages/io/json-deserializer/package.json | 6 +- packages/io/json-serializer/CHANGELOG.md | 8 + packages/io/json-serializer/package.json | 4 +- packages/io/obj-deserializer/CHANGELOG.md | 8 + packages/io/obj-deserializer/package.json | 6 +- packages/io/obj-serializer/CHANGELOG.md | 8 + packages/io/obj-serializer/package.json | 4 +- packages/io/stl-deserializer/CHANGELOG.md | 8 + packages/io/stl-deserializer/package.json | 6 +- packages/io/stl-serializer/CHANGELOG.md | 8 + packages/io/stl-serializer/package.json | 4 +- packages/io/svg-deserializer/CHANGELOG.md | 8 + packages/io/svg-deserializer/package.json | 6 +- packages/io/svg-serializer/CHANGELOG.md | 8 + packages/io/svg-serializer/package.json | 4 +- packages/io/x3d-deserializer/CHANGELOG.md | 8 + packages/io/x3d-deserializer/package.json | 6 +- packages/io/x3d-serializer/CHANGELOG.md | 8 + packages/io/x3d-serializer/package.json | 4 +- packages/modeling/CHANGELOG.md | 8 + packages/modeling/dist/jscad-modeling.min.js | 2 +- packages/modeling/package.json | 2 +- packages/utils/regl-renderer/CHANGELOG.md | 8 + packages/utils/regl-renderer/package.json | 4 +- packages/vtree/CHANGELOG.md | 8 + packages/vtree/package.json | 8 +- packages/web/CHANGELOG.md | 8 + packages/web/dist/jscad-web.min.js | 501 ++++++++++--------- packages/web/package.json | 10 +- 49 files changed, 557 insertions(+), 340 deletions(-) diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 65233dc84..1f42bf145 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.3.5](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/cli@2.3.4...@jscad/cli@2.3.5) (2024-12-29) + +**Note:** Version bump only for package @jscad/cli + + + + + ## [2.3.4](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/cli@2.3.3...@jscad/cli@2.3.4) (2024-11-10) **Note:** Version bump only for package @jscad/cli diff --git a/packages/cli/package.json b/packages/cli/package.json index 479e53780..00c6e6812 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/cli", - "version": "2.3.4", + "version": "2.3.5", "description": "Command Line Interface (CLI) for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -36,9 +36,9 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/core": "2.6.11", - "@jscad/io": "2.4.10", - "@jscad/modeling": "2.12.4", + "@jscad/core": "2.6.12", + "@jscad/io": "2.4.11", + "@jscad/modeling": "2.12.5", "jszip": "^3.10.1" }, "devDependencies": { diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index b1b9480c1..d150ba99a 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.6.12](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/core@2.6.11...@jscad/core@2.6.12) (2024-12-29) + +**Note:** Version bump only for package @jscad/core + + + + + ## [2.6.11](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/core@2.6.10...@jscad/core@2.6.11) (2024-11-10) **Note:** Version bump only for package @jscad/core diff --git a/packages/core/dist/jscad-core.min.js b/packages/core/dist/jscad-core.min.js index 0362e1288..6c76eba6d 100644 --- a/packages/core/dist/jscad-core.min.js +++ b/packages/core/dist/jscad-core.min.js @@ -26,7 +26,7 @@ var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defau },{}],8:[function(require,module,exports){ module.exports={ "name": "@jscad/core", - "version": "2.6.11", + "version": "2.6.12", "description": "Core functionality for JSCAD Applications", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -62,9 +62,9 @@ module.exports={ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io": "2.4.10", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io": "2.4.11", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "json5": "2.2.3", "strip-bom": "4.0.0" }, @@ -196,7 +196,7 @@ const zipSync=require("fflate").zipSync,strToU8=require("fflate").strToU8,string },{"xmlchars/xml/1.0/ed5":42,"xmlchars/xml/1.1/ed2":43,"xmlchars/xmlns/1.0/ed3":44}],46:[function(require,module,exports){ module.exports={ "name": "@jscad/amf-deserializer", - "version": "2.3.9", + "version": "2.3.10", "description": "AMF Deserializer for JSCAD", "repository": "https://github.com/jscad/OpenJSCAD.org/", "main": "src/index.js", @@ -227,8 +227,8 @@ module.exports={ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "saxes": "5.0.1" }, "devDependencies": { @@ -286,7 +286,7 @@ const{geometries:geometries,maths:maths,primitives:primitives}=require("@jscad/m },{"./helpers":59,"@jscad/modeling":217}],62:[function(require,module,exports){ module.exports={ "name": "@jscad/dxf-deserializer", - "version": "2.3.26", + "version": "2.3.27", "description": "DXF Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -314,8 +314,8 @@ module.exports={ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4" + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", @@ -374,7 +374,7 @@ const{flatten:flatten,toArray:toArray}=require("@jscad/array-utils"),{ensureStri },{"./package.json":78,"@jscad/array-utils":533,"@jscad/io-utils":71}],78:[function(require,module,exports){ module.exports={ "name": "@jscad/json-deserializer", - "version": "2.0.30", + "version": "2.0.31", "description": "JSON Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -403,10 +403,10 @@ module.exports={ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io-utils": "2.0.29" + "@jscad/io-utils": "2.0.30" }, "devDependencies": { - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "ava": "3.15.0", "nyc": "15.1.0" }, @@ -422,7 +422,7 @@ const{colors:colors,primitives:primitives}=require("@jscad/modeling"),{ensureStr },{"./package.json":81,"@jscad/io-utils":71,"@jscad/modeling":217}],81:[function(require,module,exports){ module.exports={ "name": "@jscad/obj-deserializer", - "version": "2.0.29", + "version": "2.0.30", "description": "OBJ Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -454,8 +454,8 @@ module.exports={ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4" + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", @@ -473,7 +473,7 @@ const{maths:maths,primitives:primitives}=require("@jscad/modeling"),{BinaryReade },{"./package.json":84,"@jscad/io-utils":71,"@jscad/modeling":217}],84:[function(require,module,exports){ module.exports={ "name": "@jscad/stl-deserializer", - "version": "2.1.26", + "version": "2.1.27", "description": "STL Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -505,8 +505,8 @@ module.exports={ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4" + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", @@ -539,7 +539,7 @@ const{geometries:geometries,modifiers:modifiers}=require("@jscad/modeling"),{fla },{"xmlchars/xml/1.0/ed5":88,"xmlchars/xml/1.1/ed2":89,"xmlchars/xmlns/1.0/ed3":90}],92:[function(require,module,exports){ module.exports={ "name": "@jscad/svg-deserializer", - "version": "2.5.10", + "version": "2.5.11", "description": "SVG Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -572,8 +572,8 @@ module.exports={ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "saxes": "5.0.1" }, "devDependencies": { @@ -610,7 +610,7 @@ const{geometries:geometries,maths:maths,measurements:measurements,utils:utils}=r },{}],101:[function(require,module,exports){ module.exports={ "name": "@jscad/svg-serializer", - "version": "2.3.17", + "version": "2.3.18", "description": "SVG Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -642,7 +642,7 @@ module.exports={ ], "license": "MIT", "dependencies": { - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "onml": "1.3.0" }, "devDependencies": { @@ -667,7 +667,7 @@ module.exports={ },{"xmlchars/xml/1.0/ed5":102,"xmlchars/xml/1.1/ed2":103,"xmlchars/xmlns/1.0/ed3":104}],106:[function(require,module,exports){ module.exports={ "name": "@jscad/x3d-deserializer", - "version": "2.2.9", + "version": "2.2.10", "description": "X3D Deserializer for JSCAD", "repository": "https://github.com/jscad/OpenJSCAD.org/", "main": "src/index.js", @@ -694,8 +694,8 @@ module.exports={ }, "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "saxes": "5.0.1" }, "devDependencies": { @@ -1926,7 +1926,7 @@ const rectangle=require("./rectangle"),{isGTE:isGTE}=require("./commonChecks"),s const{TAU:TAU}=require("../maths/constants"),vec2=require("../maths/vec2"),geom2=require("../geometries/geom2"),{isGT:isGT,isGTE:isGTE,isNumberArray:isNumberArray}=require("./commonChecks"),getRadiusRatio=(e,r)=>e>0&&r>1&&r{const o=TAU/e,i=[];for(let a=0;a{let{center:r,vertices:t,outerRadius:s,innerRadius:o,density:i,startAngle:a}=Object.assign({},{center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0},e);if(!isNumberArray(r,2))throw new Error("center must be an array of X and Y values");if(!isGTE(t,2))throw new Error("vertices must be two or more");if(!isGT(s,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(o,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(a,0))throw new Error("startAngle must be greater than zero");if(t=Math.floor(t),i=Math.floor(i),a%=TAU,0===o){if(!isGTE(i,2))throw new Error("density must be two or more");o=s*getRadiusRatio(t,i)}const n=vec2.clone(r),u=getPoints(t,s,a,n),c=getPoints(t,o,a+Math.PI/t,n),h=[];for(let e=0;e{const r={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:TAU},{innerRadius:t,innerSegments:o,outerRadius:n,outerSegments:s,innerRotation:i,startAngle:a,outerRotation:u}=Object.assign({},r,e);if(!isGT(t,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(o,3))throw new Error("innerSegments must be three or more");if(!isGT(n,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(s,3))throw new Error("outerSegments must be three or more");if(!isGTE(a,0))throw new Error("startAngle must be positive");if(!isGT(u,0))throw new Error("outerRotation must be greater than zero");if(t>=n)throw new Error("inner circle is two large to rotate about the outer circle");let m=circle({radius:t,segments:o});return 0!==i&&(m=rotate([0,0,i],m)),m=translate([n,0],m),extrudeRotate({startAngle:a,angle:u,segments:s},m)};module.exports=torus; +const{TAU:TAU}=require("../maths/constants"),extrudeRotate=require("../operations/extrusions/extrudeRotate"),{rotate:rotate}=require("../operations/transforms/rotate"),{translate:translate}=require("../operations/transforms/translate"),circle=require("./circle"),{isGT:isGT,isGTE:isGTE}=require("./commonChecks"),torus=e=>{const r={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:TAU},{innerRadius:t,innerSegments:o,outerRadius:n,outerSegments:s,innerRotation:i,startAngle:a,outerRotation:u}=Object.assign({},r,e);if(!isGT(t,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(o,3))throw new Error("innerSegments must be three or more");if(!isGT(n,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(s,3))throw new Error("outerSegments must be three or more");if(!isGTE(a,0))throw new Error("startAngle must be positive");if(!isGT(u,0))throw new Error("outerRotation must be greater than zero");if(t>=n)throw new Error("inner circle is too large to rotate about the outer circle");let m=circle({radius:t,segments:o});return 0!==i&&(m=rotate([0,0,i],m)),m=translate([n,0],m),extrudeRotate({startAngle:a,angle:u,segments:s},m)};module.exports=torus; },{"../maths/constants":219,"../operations/extrusions/extrudeRotate":441,"../operations/transforms/rotate":489,"../operations/transforms/translate":492,"./circle":494,"./commonChecks":495}],515:[function(require,module,exports){ const{NEPS:NEPS}=require("../maths/constants"),vec2=require("../maths/vec2"),geom2=require("../geometries/geom2"),{isNumberArray:isNumberArray}=require("./commonChecks"),solveAngleFromSSS=(e,r,t)=>Math.acos((e*e+r*r-t*t)/(2*e*r)),solveSideFromSAS=(e,r,t)=>r>NEPS?Math.sqrt(e*e+t*t-2*e*t*Math.cos(r)):Math.sqrt((e-t)*(e-t)+e*t*r*r*(1-r*r/12)),solveAAA=e=>{if(Math.abs(e[0]+e[1]+e[2]-Math.PI)>NEPS)throw new Error("AAA triangles require angles that sum to PI");const r=e[0],t=e[1],s=Math.PI-r-t,a=1/Math.sin(s)*Math.sin(r),n=1/Math.sin(s)*Math.sin(t);return createTriangle(r,t,s,a,n,1)},solveAAS=e=>{const r=e[0],t=e[1],s=Math.PI+NEPS-r-t;if(s{const r=e[0],t=e[2],s=Math.PI+NEPS-r-t;if(s{const r=e[0],t=e[1],s=e[2],a=solveSideFromSAS(r,t,s),n=solveAngleFromSSS(a,r,s),o=Math.PI-n-t;return createTriangle(n,t,o,s,a,r)},solveSSA=e=>{const r=e[0],t=e[1],s=e[2],a=Math.asin(t*Math.sin(s)/r),n=Math.PI-a-s,o=r/Math.sin(s)*Math.sin(n);return createTriangle(a,n,s,t,o,r)},solveSSS=e=>{const r=e[1],t=e[2],s=e[0];if(r+t<=s||t+s<=r||s+r<=t)throw new Error("SSS triangle is incorrect, as the longest side is longer than the sum of the other sides");const a=solveAngleFromSSS(t,s,r),n=solveAngleFromSSS(s,r,t),o=Math.PI-a-n;return createTriangle(a,n,o,r,t,s)},createTriangle=(e,r,t,s,a,n)=>{const o=vec2.fromValues(0,0),i=vec2.fromValues(n,0),S=vec2.fromValues(s,0);return vec2.add(S,vec2.rotate(S,S,[0,0],Math.PI-r),i),geom2.fromPoints([o,i,S])},triangle=e=>{let{type:r,values:t}=Object.assign({},{type:"SSS",values:[1,1,1]},e);if("string"!=typeof r)throw new Error("triangle type must be a string");if("A"!==(r=r.toUpperCase())[0]&&"S"!==r[0]||"A"!==r[1]&&"S"!==r[1]||"A"!==r[2]&&"S"!==r[2])throw new Error("triangle type must contain three letters; A or S");if(!isNumberArray(t,3))throw new Error("triangle values must contain three values");if(!t.every(e=>e>0))throw new Error("triangle values must be greater than zero");switch(r){case"AAA":return solveAAA(t);case"AAS":return solveAAS(t);case"ASA":return solveASA(t);case"SAS":return solveSAS(t);case"SSA":return solveSSA(t);case"SSS":return solveSSS(t);default:throw new Error("invalid triangle type, try again")}};module.exports=triangle; diff --git a/packages/core/package.json b/packages/core/package.json index d16df4f49..16822129b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/core", - "version": "2.6.11", + "version": "2.6.12", "description": "Core functionality for JSCAD Applications", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -36,9 +36,9 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io": "2.4.10", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io": "2.4.11", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "json5": "2.2.3", "strip-bom": "4.0.0" }, diff --git a/packages/io/3mf-serializer/CHANGELOG.md b/packages/io/3mf-serializer/CHANGELOG.md index eb3a19b8f..46b5e6223 100644 --- a/packages/io/3mf-serializer/CHANGELOG.md +++ b/packages/io/3mf-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.14](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/3mf-serializer@2.1.13...@jscad/3mf-serializer@2.1.14) (2024-12-29) + +**Note:** Version bump only for package @jscad/3mf-serializer + + + + + ## [2.1.13](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/3mf-serializer@2.1.12...@jscad/3mf-serializer@2.1.13) (2024-11-10) **Note:** Version bump only for package @jscad/3mf-serializer diff --git a/packages/io/3mf-serializer/package.json b/packages/io/3mf-serializer/package.json index ebe26beea..e165d5218 100644 --- a/packages/io/3mf-serializer/package.json +++ b/packages/io/3mf-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/3mf-serializer", - "version": "2.1.13", + "version": "2.1.14", "description": "3MF serializer for JSCAD project", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -28,7 +28,7 @@ }, "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "fflate": "0.7.3", "onml": "1.2.0" }, diff --git a/packages/io/amf-deserializer/CHANGELOG.md b/packages/io/amf-deserializer/CHANGELOG.md index cc5ad5667..c36a28951 100644 --- a/packages/io/amf-deserializer/CHANGELOG.md +++ b/packages/io/amf-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.3.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/amf-deserializer@2.3.9...@jscad/amf-deserializer@2.3.10) (2024-12-29) + +**Note:** Version bump only for package @jscad/amf-deserializer + + + + + ## [2.3.9](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/amf-deserializer@2.3.8...@jscad/amf-deserializer@2.3.9) (2024-11-10) **Note:** Version bump only for package @jscad/amf-deserializer diff --git a/packages/io/amf-deserializer/package.json b/packages/io/amf-deserializer/package.json index d294feb37..94a1b10de 100644 --- a/packages/io/amf-deserializer/package.json +++ b/packages/io/amf-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/amf-deserializer", - "version": "2.3.9", + "version": "2.3.10", "description": "AMF Deserializer for JSCAD", "repository": "https://github.com/jscad/OpenJSCAD.org/", "main": "src/index.js", @@ -31,8 +31,8 @@ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "saxes": "5.0.1" }, "devDependencies": { diff --git a/packages/io/amf-serializer/CHANGELOG.md b/packages/io/amf-serializer/CHANGELOG.md index 9b9f1169e..a857b3d66 100644 --- a/packages/io/amf-serializer/CHANGELOG.md +++ b/packages/io/amf-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.20](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/amf-serializer@2.1.19...@jscad/amf-serializer@2.1.20) (2024-12-29) + +**Note:** Version bump only for package @jscad/amf-serializer + + + + + ## [2.1.19](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/amf-serializer@2.1.18...@jscad/amf-serializer@2.1.19) (2024-11-10) **Note:** Version bump only for package @jscad/amf-serializer diff --git a/packages/io/amf-serializer/package.json b/packages/io/amf-serializer/package.json index d396f0502..61b4bc24b 100644 --- a/packages/io/amf-serializer/package.json +++ b/packages/io/amf-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/amf-serializer", - "version": "2.1.19", + "version": "2.1.20", "description": "AMF Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -33,7 +33,7 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "onml": "1.3.0" }, "devDependencies": { diff --git a/packages/io/dxf-deserializer/CHANGELOG.md b/packages/io/dxf-deserializer/CHANGELOG.md index 675dbbad7..a319fc96e 100644 --- a/packages/io/dxf-deserializer/CHANGELOG.md +++ b/packages/io/dxf-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.3.27](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/dxf-deserializer@2.3.26...@jscad/dxf-deserializer@2.3.27) (2024-12-29) + +**Note:** Version bump only for package @jscad/dxf-deserializer + + + + + ## [2.3.26](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/dxf-deserializer@2.3.25...@jscad/dxf-deserializer@2.3.26) (2024-11-10) **Note:** Version bump only for package @jscad/dxf-deserializer diff --git a/packages/io/dxf-deserializer/package.json b/packages/io/dxf-deserializer/package.json index c6c1346e9..42aed374e 100644 --- a/packages/io/dxf-deserializer/package.json +++ b/packages/io/dxf-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/dxf-deserializer", - "version": "2.3.26", + "version": "2.3.27", "description": "DXF Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -28,8 +28,8 @@ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4" + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/dxf-serializer/CHANGELOG.md b/packages/io/dxf-serializer/CHANGELOG.md index e87a52e02..9e4ac116c 100644 --- a/packages/io/dxf-serializer/CHANGELOG.md +++ b/packages/io/dxf-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.20](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/dxf-serializer@2.1.19...@jscad/dxf-serializer@2.1.20) (2024-12-29) + +**Note:** Version bump only for package @jscad/dxf-serializer + + + + + ## [2.1.19](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/dxf-serializer@2.1.18...@jscad/dxf-serializer@2.1.19) (2024-11-10) **Note:** Version bump only for package @jscad/dxf-serializer diff --git a/packages/io/dxf-serializer/package.json b/packages/io/dxf-serializer/package.json index eadebd55f..cc478597d 100644 --- a/packages/io/dxf-serializer/package.json +++ b/packages/io/dxf-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/dxf-serializer", - "version": "2.1.19", + "version": "2.1.20", "description": "DXF Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -33,7 +33,7 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4" + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/io-utils/CHANGELOG.md b/packages/io/io-utils/CHANGELOG.md index 4ff56e5b4..7b42101b7 100644 --- a/packages/io/io-utils/CHANGELOG.md +++ b/packages/io/io-utils/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.30](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/io-utils@2.0.29...@jscad/io-utils@2.0.30) (2024-12-29) + +**Note:** Version bump only for package @jscad/io-utils + + + + + ## [2.0.29](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/io-utils@2.0.28...@jscad/io-utils@2.0.29) (2024-11-10) **Note:** Version bump only for package @jscad/io-utils diff --git a/packages/io/io-utils/package.json b/packages/io/io-utils/package.json index 24e3f541e..5cc2ac581 100644 --- a/packages/io/io-utils/package.json +++ b/packages/io/io-utils/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/io-utils", - "version": "2.0.29", + "version": "2.0.30", "description": "Utilities for JSCAD IO Packages", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -33,7 +33,7 @@ ], "license": "MIT", "devDependencies": { - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "ava": "3.15.0", "nyc": "15.1.0" }, diff --git a/packages/io/io/CHANGELOG.md b/packages/io/io/CHANGELOG.md index 3d775c899..b5f1f5d0f 100644 --- a/packages/io/io/CHANGELOG.md +++ b/packages/io/io/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.4.11](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/io@2.4.10...@jscad/io@2.4.11) (2024-12-29) + +**Note:** Version bump only for package @jscad/io + + + + + ## [2.4.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/io@2.4.9...@jscad/io@2.4.10) (2024-11-10) **Note:** Version bump only for package @jscad/io diff --git a/packages/io/io/package.json b/packages/io/io/package.json index 795abbaa8..01ea32e98 100644 --- a/packages/io/io/package.json +++ b/packages/io/io/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/io", - "version": "2.4.10", + "version": "2.4.11", "description": "Meta Package for JSCAD IO Packages", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -30,24 +30,24 @@ ], "license": "MIT", "dependencies": { - "@jscad/3mf-serializer": "2.1.13", - "@jscad/amf-deserializer": "2.3.9", - "@jscad/amf-serializer": "2.1.19", + "@jscad/3mf-serializer": "2.1.14", + "@jscad/amf-deserializer": "2.3.10", + "@jscad/amf-serializer": "2.1.20", "@jscad/array-utils": "2.1.4", - "@jscad/dxf-deserializer": "2.3.26", - "@jscad/dxf-serializer": "2.1.19", - "@jscad/io-utils": "2.0.29", - "@jscad/json-deserializer": "2.0.30", - "@jscad/json-serializer": "2.0.29", - "@jscad/modeling": "2.12.4", - "@jscad/obj-deserializer": "2.0.29", - "@jscad/obj-serializer": "2.1.19", - "@jscad/stl-deserializer": "2.1.26", - "@jscad/stl-serializer": "2.1.19", - "@jscad/svg-deserializer": "2.5.10", - "@jscad/svg-serializer": "2.3.17", - "@jscad/x3d-deserializer": "2.2.9", - "@jscad/x3d-serializer": "2.4.9" + "@jscad/dxf-deserializer": "2.3.27", + "@jscad/dxf-serializer": "2.1.20", + "@jscad/io-utils": "2.0.30", + "@jscad/json-deserializer": "2.0.31", + "@jscad/json-serializer": "2.0.30", + "@jscad/modeling": "2.12.5", + "@jscad/obj-deserializer": "2.0.30", + "@jscad/obj-serializer": "2.1.20", + "@jscad/stl-deserializer": "2.1.27", + "@jscad/stl-serializer": "2.1.20", + "@jscad/svg-deserializer": "2.5.11", + "@jscad/svg-serializer": "2.3.18", + "@jscad/x3d-deserializer": "2.2.10", + "@jscad/x3d-serializer": "2.4.10" }, "gitHead": "a90b9bad95a417661c619dc733e62c587dc71a4a" } diff --git a/packages/io/json-deserializer/CHANGELOG.md b/packages/io/json-deserializer/CHANGELOG.md index bbfd6cb00..264d3b9a7 100644 --- a/packages/io/json-deserializer/CHANGELOG.md +++ b/packages/io/json-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.31](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.30...@jscad/json-deserializer@2.0.31) (2024-12-29) + +**Note:** Version bump only for package @jscad/json-deserializer + + + + + ## [2.0.30](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-deserializer@2.0.29...@jscad/json-deserializer@2.0.30) (2024-11-10) **Note:** Version bump only for package @jscad/json-deserializer diff --git a/packages/io/json-deserializer/package.json b/packages/io/json-deserializer/package.json index bd1a4c9f5..ffd58e39e 100644 --- a/packages/io/json-deserializer/package.json +++ b/packages/io/json-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/json-deserializer", - "version": "2.0.30", + "version": "2.0.31", "description": "JSON Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -29,10 +29,10 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io-utils": "2.0.29" + "@jscad/io-utils": "2.0.30" }, "devDependencies": { - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "ava": "3.15.0", "nyc": "15.1.0" }, diff --git a/packages/io/json-serializer/CHANGELOG.md b/packages/io/json-serializer/CHANGELOG.md index d33b26a09..0cdb8ebe7 100644 --- a/packages/io/json-serializer/CHANGELOG.md +++ b/packages/io/json-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.30](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-serializer@2.0.29...@jscad/json-serializer@2.0.30) (2024-12-29) + +**Note:** Version bump only for package @jscad/json-serializer + + + + + ## [2.0.29](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/json-serializer@2.0.28...@jscad/json-serializer@2.0.29) (2024-11-10) **Note:** Version bump only for package @jscad/json-serializer diff --git a/packages/io/json-serializer/package.json b/packages/io/json-serializer/package.json index 5c0f5d3d2..0bb50a465 100644 --- a/packages/io/json-serializer/package.json +++ b/packages/io/json-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/json-serializer", - "version": "2.0.29", + "version": "2.0.30", "description": "JSON Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -28,7 +28,7 @@ ], "license": "MIT", "dependencies": { - "@jscad/modeling": "2.12.4" + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/obj-deserializer/CHANGELOG.md b/packages/io/obj-deserializer/CHANGELOG.md index f4dcf3d76..d6aaff368 100644 --- a/packages/io/obj-deserializer/CHANGELOG.md +++ b/packages/io/obj-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.30](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-deserializer@2.0.29...@jscad/obj-deserializer@2.0.30) (2024-12-29) + +**Note:** Version bump only for package @jscad/obj-deserializer + + + + + ## [2.0.29](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-deserializer@2.0.28...@jscad/obj-deserializer@2.0.29) (2024-11-10) **Note:** Version bump only for package @jscad/obj-deserializer diff --git a/packages/io/obj-deserializer/package.json b/packages/io/obj-deserializer/package.json index 9c9baf160..520b862a0 100644 --- a/packages/io/obj-deserializer/package.json +++ b/packages/io/obj-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/obj-deserializer", - "version": "2.0.29", + "version": "2.0.30", "description": "OBJ Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -32,8 +32,8 @@ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4" + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/obj-serializer/CHANGELOG.md b/packages/io/obj-serializer/CHANGELOG.md index c3461fb76..d11547ab6 100644 --- a/packages/io/obj-serializer/CHANGELOG.md +++ b/packages/io/obj-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.20](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-serializer@2.1.19...@jscad/obj-serializer@2.1.20) (2024-12-29) + +**Note:** Version bump only for package @jscad/obj-serializer + + + + + ## [2.1.19](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/obj-serializer@2.1.18...@jscad/obj-serializer@2.1.19) (2024-11-10) **Note:** Version bump only for package @jscad/obj-serializer diff --git a/packages/io/obj-serializer/package.json b/packages/io/obj-serializer/package.json index 20c8db577..845022cc2 100644 --- a/packages/io/obj-serializer/package.json +++ b/packages/io/obj-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/obj-serializer", - "version": "2.1.19", + "version": "2.1.20", "description": "OBJ Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -28,7 +28,7 @@ }, "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4" + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/stl-deserializer/CHANGELOG.md b/packages/io/stl-deserializer/CHANGELOG.md index 846c59256..475544107 100644 --- a/packages/io/stl-deserializer/CHANGELOG.md +++ b/packages/io/stl-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.27](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/stl-deserializer@2.1.26...@jscad/stl-deserializer@2.1.27) (2024-12-29) + +**Note:** Version bump only for package @jscad/stl-deserializer + + + + + ## [2.1.26](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/stl-deserializer@2.1.25...@jscad/stl-deserializer@2.1.26) (2024-11-10) **Note:** Version bump only for package @jscad/stl-deserializer diff --git a/packages/io/stl-deserializer/package.json b/packages/io/stl-deserializer/package.json index ae8b3b509..559d0252f 100644 --- a/packages/io/stl-deserializer/package.json +++ b/packages/io/stl-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/stl-deserializer", - "version": "2.1.26", + "version": "2.1.27", "description": "STL Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -32,8 +32,8 @@ ], "license": "MIT", "dependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4" + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/stl-serializer/CHANGELOG.md b/packages/io/stl-serializer/CHANGELOG.md index 52d9e08e6..6878c0981 100644 --- a/packages/io/stl-serializer/CHANGELOG.md +++ b/packages/io/stl-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.1.20](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/stl-serializer@2.1.19...@jscad/stl-serializer@2.1.20) (2024-12-29) + +**Note:** Version bump only for package @jscad/stl-serializer + + + + + ## [2.1.19](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/stl-serializer@2.1.18...@jscad/stl-serializer@2.1.19) (2024-11-10) **Note:** Version bump only for package @jscad/stl-serializer diff --git a/packages/io/stl-serializer/package.json b/packages/io/stl-serializer/package.json index cd3ff6f92..f8c75d67a 100644 --- a/packages/io/stl-serializer/package.json +++ b/packages/io/stl-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/stl-serializer", - "version": "2.1.19", + "version": "2.1.20", "description": "STL Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -33,7 +33,7 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4" + "@jscad/modeling": "2.12.5" }, "devDependencies": { "ava": "3.15.0", diff --git a/packages/io/svg-deserializer/CHANGELOG.md b/packages/io/svg-deserializer/CHANGELOG.md index 098b9c921..12b0cfa62 100644 --- a/packages/io/svg-deserializer/CHANGELOG.md +++ b/packages/io/svg-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.5.11](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-deserializer@2.5.10...@jscad/svg-deserializer@2.5.11) (2024-12-29) + +**Note:** Version bump only for package @jscad/svg-deserializer + + + + + ## [2.5.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-deserializer@2.5.9...@jscad/svg-deserializer@2.5.10) (2024-11-10) **Note:** Version bump only for package @jscad/svg-deserializer diff --git a/packages/io/svg-deserializer/package.json b/packages/io/svg-deserializer/package.json index 48b5c98c2..2946c5424 100644 --- a/packages/io/svg-deserializer/package.json +++ b/packages/io/svg-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/svg-deserializer", - "version": "2.5.10", + "version": "2.5.11", "description": "SVG Deserializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -33,8 +33,8 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "saxes": "5.0.1" }, "devDependencies": { diff --git a/packages/io/svg-serializer/CHANGELOG.md b/packages/io/svg-serializer/CHANGELOG.md index fb30ada18..1becf307f 100644 --- a/packages/io/svg-serializer/CHANGELOG.md +++ b/packages/io/svg-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.3.18](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.17...@jscad/svg-serializer@2.3.18) (2024-12-29) + +**Note:** Version bump only for package @jscad/svg-serializer + + + + + ## [2.3.17](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/svg-serializer@2.3.16...@jscad/svg-serializer@2.3.17) (2024-11-10) **Note:** Version bump only for package @jscad/svg-serializer diff --git a/packages/io/svg-serializer/package.json b/packages/io/svg-serializer/package.json index f52e83914..b8ba1ae1a 100644 --- a/packages/io/svg-serializer/package.json +++ b/packages/io/svg-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/svg-serializer", - "version": "2.3.17", + "version": "2.3.18", "description": "SVG Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -32,7 +32,7 @@ ], "license": "MIT", "dependencies": { - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "onml": "1.3.0" }, "devDependencies": { diff --git a/packages/io/x3d-deserializer/CHANGELOG.md b/packages/io/x3d-deserializer/CHANGELOG.md index ab3aba033..89ecef3ed 100644 --- a/packages/io/x3d-deserializer/CHANGELOG.md +++ b/packages/io/x3d-deserializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.2.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/x3d-deserializer@2.2.9...@jscad/x3d-deserializer@2.2.10) (2024-12-29) + +**Note:** Version bump only for package @jscad/x3d-deserializer + + + + + ## [2.2.9](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/x3d-deserializer@2.2.8...@jscad/x3d-deserializer@2.2.9) (2024-11-10) **Note:** Version bump only for package @jscad/x3d-deserializer diff --git a/packages/io/x3d-deserializer/package.json b/packages/io/x3d-deserializer/package.json index 05cac8334..84bf67161 100644 --- a/packages/io/x3d-deserializer/package.json +++ b/packages/io/x3d-deserializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/x3d-deserializer", - "version": "2.2.9", + "version": "2.2.10", "description": "X3D Deserializer for JSCAD", "repository": "https://github.com/jscad/OpenJSCAD.org/", "main": "src/index.js", @@ -27,8 +27,8 @@ }, "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "saxes": "5.0.1" }, "devDependencies": { diff --git a/packages/io/x3d-serializer/CHANGELOG.md b/packages/io/x3d-serializer/CHANGELOG.md index 555feb8b0..f036439d4 100644 --- a/packages/io/x3d-serializer/CHANGELOG.md +++ b/packages/io/x3d-serializer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.4.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/x3d-serializer@2.4.9...@jscad/x3d-serializer@2.4.10) (2024-12-29) + +**Note:** Version bump only for package @jscad/x3d-serializer + + + + + ## [2.4.9](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/x3d-serializer@2.4.8...@jscad/x3d-serializer@2.4.9) (2024-11-10) **Note:** Version bump only for package @jscad/x3d-serializer diff --git a/packages/io/x3d-serializer/package.json b/packages/io/x3d-serializer/package.json index ba8ab1fdc..8978afb5c 100644 --- a/packages/io/x3d-serializer/package.json +++ b/packages/io/x3d-serializer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/x3d-serializer", - "version": "2.4.9", + "version": "2.4.10", "description": "X3D Serializer for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -33,7 +33,7 @@ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "onml": "1.3.0" }, "devDependencies": { diff --git a/packages/modeling/CHANGELOG.md b/packages/modeling/CHANGELOG.md index f1c684e69..3f32df7f7 100644 --- a/packages/modeling/CHANGELOG.md +++ b/packages/modeling/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.12.5](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/modeling@2.12.4...@jscad/modeling@2.12.5) (2024-12-29) + +**Note:** Version bump only for package @jscad/modeling + + + + + ## [2.12.4](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/modeling@2.12.3...@jscad/modeling@2.12.4) (2024-11-10) **Note:** Version bump only for package @jscad/modeling diff --git a/packages/modeling/dist/jscad-modeling.min.js b/packages/modeling/dist/jscad-modeling.min.js index 9238cff27..ba3af4069 100644 --- a/packages/modeling/dist/jscad-modeling.min.js +++ b/packages/modeling/dist/jscad-modeling.min.js @@ -1163,7 +1163,7 @@ const rectangle=require("./rectangle"),{isGTE:isGTE}=require("./commonChecks"),s const{TAU:TAU}=require("../maths/constants"),vec2=require("../maths/vec2"),geom2=require("../geometries/geom2"),{isGT:isGT,isGTE:isGTE,isNumberArray:isNumberArray}=require("./commonChecks"),getRadiusRatio=(e,r)=>e>0&&r>1&&r{const o=TAU/e,i=[];for(let a=0;a{let{center:r,vertices:t,outerRadius:s,innerRadius:o,density:i,startAngle:a}=Object.assign({},{center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0},e);if(!isNumberArray(r,2))throw new Error("center must be an array of X and Y values");if(!isGTE(t,2))throw new Error("vertices must be two or more");if(!isGT(s,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(o,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(a,0))throw new Error("startAngle must be greater than zero");if(t=Math.floor(t),i=Math.floor(i),a%=TAU,0===o){if(!isGTE(i,2))throw new Error("density must be two or more");o=s*getRadiusRatio(t,i)}const n=vec2.clone(r),u=getPoints(t,s,a,n),c=getPoints(t,o,a+Math.PI/t,n),h=[];for(let e=0;e{const r={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:TAU},{innerRadius:t,innerSegments:o,outerRadius:n,outerSegments:s,innerRotation:i,startAngle:a,outerRotation:u}=Object.assign({},r,e);if(!isGT(t,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(o,3))throw new Error("innerSegments must be three or more");if(!isGT(n,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(s,3))throw new Error("outerSegments must be three or more");if(!isGTE(a,0))throw new Error("startAngle must be positive");if(!isGT(u,0))throw new Error("outerRotation must be greater than zero");if(t>=n)throw new Error("inner circle is two large to rotate about the outer circle");let m=circle({radius:t,segments:o});return 0!==i&&(m=rotate([0,0,i],m)),m=translate([n,0],m),extrudeRotate({startAngle:a,angle:u,segments:s},m)};module.exports=torus; +const{TAU:TAU}=require("../maths/constants"),extrudeRotate=require("../operations/extrusions/extrudeRotate"),{rotate:rotate}=require("../operations/transforms/rotate"),{translate:translate}=require("../operations/transforms/translate"),circle=require("./circle"),{isGT:isGT,isGTE:isGTE}=require("./commonChecks"),torus=e=>{const r={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:TAU},{innerRadius:t,innerSegments:o,outerRadius:n,outerSegments:s,innerRotation:i,startAngle:a,outerRotation:u}=Object.assign({},r,e);if(!isGT(t,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(o,3))throw new Error("innerSegments must be three or more");if(!isGT(n,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(s,3))throw new Error("outerSegments must be three or more");if(!isGTE(a,0))throw new Error("startAngle must be positive");if(!isGT(u,0))throw new Error("outerRotation must be greater than zero");if(t>=n)throw new Error("inner circle is too large to rotate about the outer circle");let m=circle({radius:t,segments:o});return 0!==i&&(m=rotate([0,0,i],m)),m=translate([n,0],m),extrudeRotate({startAngle:a,angle:u,segments:s},m)};module.exports=torus; },{"../maths/constants":94,"../operations/extrusions/extrudeRotate":316,"../operations/transforms/rotate":364,"../operations/transforms/translate":367,"./circle":369,"./commonChecks":370}],390:[function(require,module,exports){ const{NEPS:NEPS}=require("../maths/constants"),vec2=require("../maths/vec2"),geom2=require("../geometries/geom2"),{isNumberArray:isNumberArray}=require("./commonChecks"),solveAngleFromSSS=(e,r,t)=>Math.acos((e*e+r*r-t*t)/(2*e*r)),solveSideFromSAS=(e,r,t)=>r>NEPS?Math.sqrt(e*e+t*t-2*e*t*Math.cos(r)):Math.sqrt((e-t)*(e-t)+e*t*r*r*(1-r*r/12)),solveAAA=e=>{if(Math.abs(e[0]+e[1]+e[2]-Math.PI)>NEPS)throw new Error("AAA triangles require angles that sum to PI");const r=e[0],t=e[1],s=Math.PI-r-t,a=1/Math.sin(s)*Math.sin(r),n=1/Math.sin(s)*Math.sin(t);return createTriangle(r,t,s,a,n,1)},solveAAS=e=>{const r=e[0],t=e[1],s=Math.PI+NEPS-r-t;if(s{const r=e[0],t=e[2],s=Math.PI+NEPS-r-t;if(s{const r=e[0],t=e[1],s=e[2],a=solveSideFromSAS(r,t,s),n=solveAngleFromSSS(a,r,s),o=Math.PI-n-t;return createTriangle(n,t,o,s,a,r)},solveSSA=e=>{const r=e[0],t=e[1],s=e[2],a=Math.asin(t*Math.sin(s)/r),n=Math.PI-a-s,o=r/Math.sin(s)*Math.sin(n);return createTriangle(a,n,s,t,o,r)},solveSSS=e=>{const r=e[1],t=e[2],s=e[0];if(r+t<=s||t+s<=r||s+r<=t)throw new Error("SSS triangle is incorrect, as the longest side is longer than the sum of the other sides");const a=solveAngleFromSSS(t,s,r),n=solveAngleFromSSS(s,r,t),o=Math.PI-a-n;return createTriangle(a,n,o,r,t,s)},createTriangle=(e,r,t,s,a,n)=>{const o=vec2.fromValues(0,0),i=vec2.fromValues(n,0),S=vec2.fromValues(s,0);return vec2.add(S,vec2.rotate(S,S,[0,0],Math.PI-r),i),geom2.fromPoints([o,i,S])},triangle=e=>{let{type:r,values:t}=Object.assign({},{type:"SSS",values:[1,1,1]},e);if("string"!=typeof r)throw new Error("triangle type must be a string");if("A"!==(r=r.toUpperCase())[0]&&"S"!==r[0]||"A"!==r[1]&&"S"!==r[1]||"A"!==r[2]&&"S"!==r[2])throw new Error("triangle type must contain three letters; A or S");if(!isNumberArray(t,3))throw new Error("triangle values must contain three values");if(!t.every(e=>e>0))throw new Error("triangle values must be greater than zero");switch(r){case"AAA":return solveAAA(t);case"AAS":return solveAAS(t);case"ASA":return solveASA(t);case"SAS":return solveSAS(t);case"SSA":return solveSSA(t);case"SSS":return solveSSS(t);default:throw new Error("invalid triangle type, try again")}};module.exports=triangle; diff --git a/packages/modeling/package.json b/packages/modeling/package.json index ebc69e220..c5931822a 100644 --- a/packages/modeling/package.json +++ b/packages/modeling/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/modeling", - "version": "2.12.4", + "version": "2.12.5", "description": "Constructive Solid Geometry (CSG) Library for JSCAD", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", diff --git a/packages/utils/regl-renderer/CHANGELOG.md b/packages/utils/regl-renderer/CHANGELOG.md index 7e8e153e4..1c0e8353d 100644 --- a/packages/utils/regl-renderer/CHANGELOG.md +++ b/packages/utils/regl-renderer/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.6.12](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/regl-renderer@2.6.11...@jscad/regl-renderer@2.6.12) (2024-12-29) + +**Note:** Version bump only for package @jscad/regl-renderer + + + + + ## [2.6.11](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/regl-renderer@2.6.10...@jscad/regl-renderer@2.6.11) (2024-11-10) **Note:** Version bump only for package @jscad/regl-renderer diff --git a/packages/utils/regl-renderer/package.json b/packages/utils/regl-renderer/package.json index f4cdc3d9e..ce9783d4b 100644 --- a/packages/utils/regl-renderer/package.json +++ b/packages/utils/regl-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/regl-renderer", - "version": "2.6.11", + "version": "2.6.12", "description": "Renderer for JSCAD Geometries", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -36,7 +36,7 @@ }, "devDependencies": { "@jscad/img-utils": "2.0.5", - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "ava": "3.15.0", "browserify": "16.5.1", "budo": "11.6.4", diff --git a/packages/vtree/CHANGELOG.md b/packages/vtree/CHANGELOG.md index 107e8c2de..a35fab76d 100644 --- a/packages/vtree/CHANGELOG.md +++ b/packages/vtree/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.0.31](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/vtree@2.0.30...@jscad/vtree@2.0.31) (2024-12-29) + +**Note:** Version bump only for package @jscad/vtree + + + + + ## [2.0.30](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/vtree@2.0.29...@jscad/vtree@2.0.30) (2024-11-10) **Note:** Version bump only for package @jscad/vtree diff --git a/packages/vtree/package.json b/packages/vtree/package.json index 5e7ab9b94..549febeaf 100644 --- a/packages/vtree/package.json +++ b/packages/vtree/package.json @@ -1,6 +1,6 @@ { "name": "@jscad/vtree", - "version": "2.0.30", + "version": "2.0.31", "description": "Experimental Object Caching for JSCAD", "main": "index.js", "scripts": { @@ -19,12 +19,12 @@ }, "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/modeling": "2.12.4", + "@jscad/modeling": "2.12.5", "object-hash": "2.0.3" }, "devDependencies": { - "@jscad/io-utils": "2.0.29", - "@jscad/stl-serializer": "2.1.19", + "@jscad/io-utils": "2.0.30", + "@jscad/stl-serializer": "2.1.20", "decache": "4.4.0", "just-diff": "2.1.1", "serialize-to-js": "3.0.2", diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index b76403b60..279c0c839 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [2.6.10](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/web@2.6.9...@jscad/web@2.6.10) (2024-12-29) + +**Note:** Version bump only for package @jscad/web + + + + + ## [2.6.9](https://github.com/jscad/OpenJSCAD.org/compare/@jscad/web@2.6.8...@jscad/web@2.6.9) (2024-11-10) **Note:** Version bump only for package @jscad/web diff --git a/packages/web/dist/jscad-web.min.js b/packages/web/dist/jscad-web.min.js index 3b680f039..f11b1c16b 100644 --- a/packages/web/dist/jscad-web.min.js +++ b/packages/web/dist/jscad-web.min.js @@ -7,7 +7,7 @@ },{}],3:[function(require,module,exports){ module.exports={ "name": "@jscad/core", - "version": "2.6.11", + "version": "2.6.12", "description": "Core functionality for JSCAD Applications", "homepage": "https://openjscad.xyz/", "repository": "https://github.com/jscad/OpenJSCAD.org", @@ -43,9 +43,9 @@ module.exports={ "license": "MIT", "dependencies": { "@jscad/array-utils": "2.1.4", - "@jscad/io": "2.4.10", - "@jscad/io-utils": "2.0.29", - "@jscad/modeling": "2.12.4", + "@jscad/io": "2.4.11", + "@jscad/io-utils": "2.0.30", + "@jscad/modeling": "2.12.5", "json5": "2.2.3", "strip-bom": "4.0.0" }, @@ -75,7 +75,7 @@ const loadDesign=require("../code-loading/loadDesign"),instanciateDesign=require },{"../code-loading/loadDesign":11,"../parameters/applyParameterDefinitions":22,"./instanciateDesign":5}],7:[function(require,module,exports){ const path=require("path"),{toArray:toArray}=require("@jscad/array-utils"),requireDesignFromModule=require("../code-loading/requireDesignFromModule"),getAllParameterDefintionsAndValues=require("../parameters/getParameterDefinitionsAndValues"),makeWebRequire=require("../code-loading/webRequire"),rebuildSolids=e=>{let{apiMainPath:r,mainPath:a,parameterValues:i,useFakeFs:t}=Object.assign({},{apiMainPath:"@jscad/modeling"},e),s=require;if(t){const i=path.parse(a),t=`${i.name}.js`,u=`/${i.name}.js`,n=[{ext:"js",fullPath:u,name:t,source:e.source}];s=makeWebRequire(n,{apiMainPath:r}),a=u}const u=requireDesignFromModule(a,s),n=getAllParameterDefintionsAndValues(u,i);return toArray(u.main(n.parameterValues))};module.exports=rebuildSolids; -},{"../code-loading/requireDesignFromModule":14,"../code-loading/webRequire":18,"../parameters/getParameterDefinitionsAndValues":23,"@jscad/array-utils":528,"path":714}],8:[function(require,module,exports){ +},{"../code-loading/requireDesignFromModule":14,"../code-loading/webRequire":18,"../parameters/getParameterDefinitionsAndValues":23,"@jscad/array-utils":528,"path":723}],8:[function(require,module,exports){ const rebuildGeometryWorker=e=>{const o=require("./rebuildGeometry");e.onmessage=function(t){if(t.data instanceof Object){const{data:r}=t;"generate"===r.cmd&&o(r,(o,t)=>{t&&e.postMessage(t),o&&e.postMessage(o)})}}};module.exports=rebuildGeometryWorker; },{"./rebuildGeometry":6}],9:[function(require,module,exports){ @@ -99,7 +99,7 @@ const validateDesignModule=require("./validateDesignModule"),normalizeDesignModu },{"./normalizeDesignModule":13,"./validateDesignModule":17}],15:[function(require,module,exports){ const path=require("path"),{toArray:toArray}=require("@jscad/array-utils"),splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/,splitPath=e=>splitPathRe.exec(e).slice(1),parsePath=e=>{assertPath(e);const t=splitPath(e);if(!t||4!==t.length)throw new TypeError("Invalid path '"+e+"'");return t[1]=t[1]||"",t[2]=t[2]||"",t[3]=t[3]||"",{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},assertPath=e=>{if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+e)},getDesignEntryPoint=(e,t)=>{if(!t)return;const a=toArray(t)[0];let r;const n=e.statSync(a);if(n.isFile())return a;if(n.isDirectory()){const t=path.join(a,"package.json");if(e.existsSync(t)){const r=JSON.parse(e.readFileSync(t)).main;if(r)return path.join(a,r)}const n=e.readdirSync(a),i=["main","index",parsePath(path.basename(a)).name],s=i.map(e=>e+".js"),o=i.map(e=>e+".jscad"),c=n.filter(e=>s.concat(o).includes(e));return c.length>0&&(r=path.join(a,c[0])),r}return a},packageNameFromDir=(e,t,a)=>{const r=path.join(t,"package.json");if(e.existsSync(r)){const t=JSON.parse(e.readFileSync(r)).name;if(t)return t}return a?parsePath(path.basename(a)).name:path.basename(t)},getDesignName=(e,t)=>{if(!t)return"undefined";const a=toArray(t)[0],r=e.statSync(a);if(r.isFile()){const t=path.dirname(a);return packageNameFromDir(e,t,a)}return r.isDirectory()?packageNameFromDir(e,a):void 0};module.exports={getDesignEntryPoint:getDesignEntryPoint,getDesignName:getDesignName}; -},{"@jscad/array-utils":528,"path":714}],16:[function(require,module,exports){ +},{"@jscad/array-utils":528,"path":723}],16:[function(require,module,exports){ const{deserializers:deserializers}=require("@jscad/io"),modulifyTransform=(e,r)=>Object.assign({},r,{source:r.source}),createJscadEntry=(e,r)=>{const s=e.name.substring(0,e.name.lastIndexOf(".")+1)+"jscad",t="/"+s;return Object.assign({},e,{ext:"jscad",name:s,fullPath:t,source:r})},transformSources=(e,r)=>{if(r&&r.length>1)return r;const s={js:[modulifyTransform],jscad:[modulifyTransform]};return r&&(r=r.map(r=>(r=>{if(r.source&&r.ext){const t=Object.assign({},e,{filename:r.name,output:"script"});if(r.ext in deserializers){const e=(0,deserializers[r.ext])(t,r.source);return createJscadEntry(r,e)}if(r.ext in s)return s[r.ext].reduce((e,r)=>r(t,e),r)}return r})(r))),r};module.exports=transformSources; },{"@jscad/io":70}],17:[function(require,module,exports){ @@ -108,7 +108,7 @@ const validateDesignModule=n=>{if(!n)throw new Error("undefined root module pass },{}],18:[function(require,module,exports){ const path=require("path"),posix=path.posix?path.posix:path,getFileExtensionFromString=require("../utils/getFileExtensionFromString"),{combineParameterDefinitions:combineParameterDefinitions,getParameterDefinitionsFromSource:getParameterDefinitionsFromSource}=require("../parameters/getParameterDefinitionsFromSource"),findMatch=(e,t)=>{for(let r=0;r{const r=require("strip-bom");t.extensions[".js"]=((t,n)=>{const i=e.readFileSync(n,"utf8");t._compile(r(i),n)})},registerJsonExtension=(e,t)=>{t.extensions[".json"]=((t,r)=>{const n=e.readFileSync(r,"utf8");t.exports=JSON.parse(n)})},makeWebRequire=(e,t)=>{const r={apiMainPath:"@jscad/modeling",fakeFs:require("./makeFakeFs")(e)},{apiMainPath:n,fakeFs:i}=Object.assign({},r,t),s="@jscad/modeling"===n?require("@jscad/modeling"):require(n),o={"@jscad/io":{exports:require("@jscad/io")},"@jscad/array-utils":{exports:require("@jscad/array-utils")},"@jscad/modeling":{exports:s},fs:{exports:i}},a={},l={},u=(t,r)=>{const n=o[r];if(n)return n.exports;t&&!r.startsWith("/")||(t="/");const i=t=>{let r=getFileExtensionFromString(t);r||(r="js",t+=".js"),r="."+r;const n=findMatch(t,e);if(!n)return null;if(n.children)return null;if(a[r]){if(l[t])return l[t];const e={exports:{},_compile:(t,r)=>{try{new Function("require","module",t)(u.bind(null,n.fullPath),e)}catch(e){const t=e.message;r=r.replace("/","");const n=e.lineNumber?e.lineNumber-2:0,i=e.columnNumber?e.columnNumber:0;throw e.stack.startsWith("Object")?e.stack=`${e.stack}\nObject. (${r}:${n}:${i})`:((e=new SyntaxError(t,r,n)).columnNumber=i,e.stack=`Object. (${r}:${n}:${i})`),e}const i=t.includes("@jscad-params")?getParameterDefinitionsFromSource(t,r):[],s=e.exports.getParameterDefinitions;e.exports.getParameterDefinitions=(()=>combineParameterDefinitions(i,s&&s()||[]))}};return a[r](e,n.fullPath),l[t]=e.exports,l[t]}return null},s=t=>{if(!findMatch(t,e))return null;"/"===t&&(t="");let r=t+"/index.js",n=i(r);return n||((n=i(r=t+"/index.json"))||null)},c=t=>{let r,n=findMatch(t,e);if(!n)return null;if(!n.children)return null;if(n=findMatch(t+"/package.json",e)){const e=JSON.parse(n.source).main;if(e){const n=posix.normalize(t+"/"+e);return(r=i(n))?r:(r=s(n))||null}}return(r=s(t))||null};if(r.startsWith("./")||r.startsWith("/")||r.startsWith("../")){r=posix.normalize(posix.dirname(t)+posix.sep+r);let e=i(r);if(e)return e;if(e=c(r))return e;throw new Error(`Cannot find relative path to module ${r}`)}const m=((e,t)=>{const r=(e=>{const t=e.split("/"),r=[];for(let e=t.length-1;e>0;e--){if("node_modules"===t[e])continue;const n=posix.sep+posix.join(...t.slice(1,e+1),"node_modules");r.push(n)}return r})(t);for(let t=0;t{}),registerJsExtension(i,c),registerJsonExtension(i,c),c};module.exports=makeWebRequire; -},{"../parameters/getParameterDefinitionsFromSource":24,"../utils/getFileExtensionFromString":28,"./makeFakeFs":12,"@jscad/array-utils":528,"@jscad/io":70,"@jscad/modeling":212,"path":714,"strip-bom":2}],19:[function(require,module,exports){ +},{"../parameters/getParameterDefinitionsFromSource":24,"../utils/getFileExtensionFromString":28,"./makeFakeFs":12,"@jscad/array-utils":528,"@jscad/io":70,"@jscad/modeling":212,"path":723,"strip-bom":2}],19:[function(require,module,exports){ module.exports={evaluation:require("./code-evaluation"),io:require("./io"),loading:require("./code-loading"),parameters:require("./parameters"),utils:require("./utils"),web:require("./web")}; },{"./code-evaluation":4,"./code-loading":10,"./io":20,"./parameters":27,"./utils":29,"./web":31}],20:[function(require,module,exports){ @@ -150,7 +150,7 @@ module.exports={walkFileTree:require("./walkFileTree")}; },{"./walkFileTree":32}],32:[function(require,module,exports){ const{flatten:flatten}=require("@jscad/array-utils"),{formats:formats}=require("@jscad/io/formats"),getFileExtensionFromString=require("../utils/getFileExtensionFromString"),binaryMimetypes={bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",tif:"image/tiff",tiff:"image/tiff",otc:"font/otf",otf:"font/otf",ttc:"font/ttf",ttf:"font/ttf",woff:"font/woff",woff2:"font/woff",stl:"application/sla"},readFileAsync=(e,t)=>{const r=e.fullPath?e.fullPath:t.fullPath?t.fullPath:"",i=getFileExtensionFromString(e.name),n=e.mimetype;return new Promise((t,s)=>{const o=new FileReader;o.onload=(s=>{const o=s.target.result;o.byteLength?t({name:e.name,ext:i,fullPath:r,mimetype:n,source:o}):"string"==typeof o&&t({name:e.name,ext:i,fullPath:r,mimetype:n,source:o})}),o.onerror=(e=>{s(new Error(`Failed to load file: ${r} [${o.error}]`))}),binaryMimetypes[i]?o.readAsArrayBuffer(e):o.readAsText(e)})},isSupportedFormat=e=>{const t=getFileExtensionFromString(e.name),r=formats[t]?formats[t].mimetype:binaryMimetypes[t];return e.mimetype=e.type&&e.type.length?e.type:r,e.mimetype&&e.mimetype.length},pseudoArraytoArray=e=>{const t=[];for(let r=0;rnull!=e,processEntries=e=>{const t=pseudoArraytoArray(e.filter(isEmpty)).filter(isEmpty).reduce((e,t)=>{if(t.name.startsWith("."))return e;if(t.isFile)e.push(processFile(t));else if(t.isDirectory)e.push(processDirectory(t));else if(t instanceof File){const r=t.webkitRelativePath?t.webkitRelativePath:void 0,i=isSupportedFormat(t)?readFileAsync(t,{fullPath:r}):void 0;if(!i)throw new Error("Unsuported format (or folder in Safari)!");e.push(i)}return e},[]);return Promise.all(t).then(e=>e.filter(e=>null!=e))},processFile=e=>{return new Promise((t,r)=>{e.file(r=>{isSupportedFormat(r)?t(readFileAsync(r,e)):t(void 0)},t=>{const i=`${t.message} (${t.code})`;r(new Error(`Failed to load file: ${e.fullPath} [${i}]`))})})},processDirectory=e=>{return new Promise((t,r)=>{if(e.entries)e.entries.length?processEntries(e.entries).then(t):t([]);else{e.createReader().readEntries(e=>{e.length?processEntries(e).then(t):t([])},r)}}).then(flatten).then(t=>({children:t=t.map(t=>(t.fullPath.startsWith("/")||(t.fullPath=e.fullPath+"/"+t.name),t)),fullPath:e.fullPath,name:e.name}))},transformFileList=e=>{const t=require("path");if(1===e.length){const r=e[0],i=r.webkitRelativePath?r.webkitRelativePath:r.name;if(i.split(t.sep).length<2){const e=t.sep,n={fullPath:e,name:e,isDirectory:!0,entries:[]};return r.fullPath=t.normalize(e+i),n.entries.push(r),[n]}}let r;const i=new Map,n=(e,n)=>{if(!i.has(e)){const s={fullPath:e,name:n,isDirectory:!0,entries:[]};r||(r=s),i.set(e,s);const o=e.split(t.sep);if(o.length>1){const e=t.sep+t.join(...o.slice(0,-1)),r=i.get(e);r&&r.entries.push(s)}}};for(let r=0;re||t.startsWith("."),!1))continue;if(!isSupportedFormat(s))continue;const l=o.slice(0,-1);for(let e=0;e{let t=e;return e.length&&e[0]instanceof File&&(t=transformFileList(e)),processEntries(t)};module.exports=walkFileTree; -},{"../utils/getFileExtensionFromString":28,"@jscad/array-utils":528,"@jscad/io/formats":69,"path":714}],33:[function(require,module,exports){ +},{"../utils/getFileExtensionFromString":28,"@jscad/array-utils":528,"@jscad/io/formats":69,"path":723}],33:[function(require,module,exports){ "use strict";var node_worker_1=require("./node-worker.cjs"),u8=Uint8Array,u16=Uint16Array,u32=Uint32Array,fleb=new u8([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,0,0,0]),fdeb=new u8([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,0,0]),clim=new u8([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb=function(t,n){for(var e=new u16(31),r=0;r<31;++r)e[r]=n+=1<>>1|(21845&i)<<1;x=(61680&(x=(52428&x)>>>2|(13107&x)<<2))>>>4|(3855&x)<<4,rev[i]=((65280&x)>>>8|(255&x)<<8)>>>1}var hMap=function(t,n,e){for(var r=t.length,i=0,s=new u16(n);i>>f]=u}else for(o=new u16(r),i=0;i>>15-t[i]);return o},flt=new u8(288);for(i=0;i<144;++i)flt[i]=8;for(i=144;i<256;++i)flt[i]=9;for(i=256;i<280;++i)flt[i]=7;for(i=280;i<288;++i)flt[i]=8;var fdt=new u8(32);for(i=0;i<32;++i)fdt[i]=5;var flm=hMap(flt,9,0),flrm=hMap(flt,9,1),fdm=hMap(fdt,5,0),fdrm=hMap(fdt,5,1),max=function(t){for(var n=t[0],e=1;en&&(n=t[e]);return n},bits=function(t,n,e){var r=n/8|0;return(t[r]|t[r+1]<<8)>>(7&n)&e},bits16=function(t,n){var e=n/8|0;return(t[e]|t[e+1]<<8|t[e+2]<<16)>>(7&n)},shft=function(t){return(t+7)/8|0},slc=function(t,n,e){(null==n||n<0)&&(n=0),(null==e||e>t.length)&&(e=t.length);var r=new(2==t.BYTES_PER_ELEMENT?u16:4==t.BYTES_PER_ELEMENT?u32:u8)(e-n);return r.set(t.subarray(n,e)),r};exports.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err=function(t,n,e){var r=new Error(n||ec[t]);if(r.code=t,Error.captureStackTrace&&Error.captureStackTrace(r,err),!e)throw r;return r},inflt=function(t,n,e){var r=t.length;if(!r||e&&e.f&&!e.l)return n||new u8(0);var i=!n||e,s=!e||e.i;e||(e={}),n||(n=new u8(3*r));var o=function(t){var e=n.length;if(t>e){var r=new u8(Math.max(2*e,t));r.set(n),n=r}},a=e.f||0,f=e.p||0,u=e.b||0,l=e.l,c=e.d,h=e.m,p=e.n,v=8*r;do{if(!l){a=bits(t,f,1);var d=bits(t,f+1,3);if(f+=3,!d){var b=t[(A=shft(f)+4)-4]|t[A-3]<<8,y=A+b;if(y>r){s&&err(0);break}i&&o(u+b),n.set(t.subarray(A,y),u),e.b=u+=b,e.p=f=8*y,e.f=a;continue}if(1==d)l=flrm,c=fdrm,h=9,p=5;else if(2==d){var g=bits(t,f,31)+257,m=bits(t,f+10,15)+4,z=g+bits(t,f+5,31)+1;f+=14;for(var w=new u8(z),x=new u8(19),S=0;S>>4)<16)w[S++]=A;else{var I=0,M=0;for(16==A?(M=3+bits(t,f,3),f+=2,I=w[S-1]):17==A?(M=3+bits(t,f,7),f+=3):18==A&&(M=11+bits(t,f,127),f+=7);M--;)w[S++]=I}}var Z=w.subarray(0,g),C=w.subarray(g);h=max(Z),p=max(C),l=hMap(Z,h,1),c=hMap(C,p,1)}else err(1);if(f>v){s&&err(0);break}}i&&o(u+131072);for(var G=(1<>>4;if((f+=15&I)>v){s&&err(0);break}if(I||err(2),_<256)n[u++]=_;else{if(256==_){F=f,l=null;break}var P=_-254;if(_>264){var O=fleb[S=_-257];P=bits(t,f,(1<>>4;L||err(3),f+=15&L;C=fd[N];if(N>3){O=fdeb[N];C+=bits16(t,f)&(1<v){s&&err(0);break}i&&o(u+131072);for(var q=u+P;u>>8},wbits16=function(t,n,e){e<<=7&n;var r=n/8|0;t[r]|=e,t[r+1]|=e>>>8,t[r+2]|=e>>>16},hTree=function(t,n){for(var e=[],r=0;rh&&(h=s[r].s);var p=new u16(h+1),v=ln(e[l-1],p,0);if(v>n){r=0;var d=0,b=v-n,y=1<n))break;d+=y-(1<>>=b;d>0;){var m=s[r].s;p[m]=0&&d;--r){var z=s[r].s;p[z]==n&&(--p[z],++d)}v=n}return[new u8(p),v]},ln=function(t,n,e){return-1==t.s?Math.max(ln(t.l,n,e+1),ln(t.r,n,e+1)):n[t.s]=e},lc=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new u16(++n),r=0,i=t[0],s=1,o=function(t){e[r++]=t},a=1;a<=n;++a)if(t[a]==i&&a!=n)++s;else{if(!i&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(i),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(i);s=1,i=t[a]}return[e.subarray(0,r),n]},clen=function(t,n){for(var e=0,r=0;r>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s4&&!T[clim[k-1]];--k);var I,M,Z,C,G=u+5<<3,E=clen(i,flt)+clen(s,fdt)+o,F=clen(i,h)+clen(s,d)+o+14+3*k+clen(S,T)+(2*S[16]+3*S[17]+7*S[18]);if(G<=E&&G<=F)return wfblk(n,l,t.subarray(f,f+u));if(wbits(n,l,1+(F15&&(wbits(n,l,L[U]>>>5&127),l+=L[U]>>>12)}}}else I=flm,M=flt,Z=fdm,C=fdt;for(U=0;U255){N=r[U]>>>18&31;wbits16(n,l,I[N+257]),l+=M[N+257],N>7&&(wbits(n,l,r[U]>>>23&31),l+=fleb[N]);var q=31&r[U];wbits16(n,l,Z[q]),l+=C[q],q>3&&(wbits16(n,l,r[U]>>>5&8191),l+=fdeb[q])}else wbits16(n,l,I[r[U]]),l+=M[r[U]];return wbits16(n,l,I[256]),l+M[256]},deo=new u32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et=new u8(0),dflt=function(t,n,e,r,i,s){var o=t.length,a=new u8(r+o+5*(1+Math.ceil(o/7e3))+i),f=a.subarray(r,a.length-i),u=0;if(!n||o<8)for(var l=0;l<=o;l+=65535){var c=l+65535;c>=o&&(f[u>>3]=s),u=wfblk(f,u+1,t.subarray(l,c))}else{for(var h=deo[n-1],p=h>>>13,v=8191&h,d=(1<7e3||T>24576)&&C>423){u=wblk(t,f,0,w,x,S,D,T,k,l-k,u),T=U=D=0,k=l;for(var G=0;G<286;++G)x[G]=0;for(G=0;G<30;++G)S[G]=0}var E=2,F=0,_=v,P=M-Z&32767;if(C>2&&I==z(l-P))for(var O=Math.min(p,C)-1,L=Math.min(32767,l),N=Math.min(258,C);P<=L&&--_&&M!=Z;){if(t[l+E]==t[l+E-P]){for(var q=0;qE){if(E=q,F=P,q>O)break;var B=Math.min(P,q-2),H=0;for(G=0;GH&&(H=j,Z=Y)}}}P+=(M=Z)-(Z=b[M])+32768&32767}if(F){w[T++]=268435456|revfl[E]<<18|revfd[F];var R=31&revfl[E],J=31&revfd[F];D+=fleb[R]+fdeb[J],++x[257+R],++S[J],A=l+E,++U}else w[T++]=t[l],++x[t[l]]}}u=wblk(t,f,s,w,x,S,D,T,k,l-k,u),!s&&7&u&&(u=wfblk(f,u+1,et))}return slc(a,0,r+shft(u)+i)},crct=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var e=n,r=9;--r;)e=(1&e&&-306674912)^e>>>1;t[n]=e}return t}(),crc=function(){var t=-1;return{p:function(n){for(var e=t,r=0;r>>8;t=e},d:function(){return~t}}},adler=function(){var t=1,n=0;return{p:function(e){for(var r=t,i=n,s=0|e.length,o=0;o!=s;){for(var a=Math.min(o+2655,s);o>16),i=(65535&i)+15*(i>>16)}t=r,n=i},d:function(){return(255&(t%=65521))<<24|t>>>8<<16|(255&(n%=65521))<<8|n>>>8}}},dopt=function(t,n,e,r,i){return dflt(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,e,r,!i)},mrg=function(t,n){var e={};for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e},wcln=function(t,n,e){for(var r=t(),i=t.toString(),s=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o>>0},b8=function(t,n){return b4(t,n)+4294967296*b4(t,n+4)},wbytes=function(t,n,e){for(;e;++n)t[n]=e,e>>>=8},gzh=function(t,n){var e=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&wbytes(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),e){t[3]=8;for(var r=0;r<=e.length;++r)t[r+10]=e.charCodeAt(r)}},gzs=function(t){31==t[0]&&139==t[1]&&8==t[2]||err(6,"invalid gzip data");var n=t[3],e=10;4&n&&(e+=t[10]|2+(t[11]<<8));for(var r=(n>>3&1)+(n>>4&1);r>0;r-=!t[e++]);return e+(2&n)},gzl=function(t){var n=t.length;return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0},gzhl=function(t){return 10+(t.filename&&t.filename.length+1||0)},zlh=function(t,n){var e=n.level,r=0==e?0:e<6?1:9==e?3:2;t[0]=120,t[1]=r<<6|(r?32-2*r:1)},zlv=function(t){(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)&&err(6,"invalid zlib data"),32&t[1]&&err(6,"invalid zlib data: preset dictionaries not supported")};function AsyncCmpStrm(t,n){return n||"function"!=typeof t||(n=t,t={}),this.ondata=n,t}var Deflate=function(){function t(t,n){n||"function"!=typeof t||(n=t,t={}),this.ondata=n,this.o=t||{}}return t.prototype.p=function(t,n){this.ondata(dopt(t,this.o,0,0,!n),n)},t.prototype.push=function(t,n){this.ondata||err(5),this.d&&err(4),this.d=n,this.p(t,n||!1)},t}();exports.Deflate=Deflate;var AsyncDeflate=function(){return function(t,n){astrmify([bDflt,function(){return[astrm,Deflate]}],this,AsyncCmpStrm.call(this,t,n),function(t){var n=new Deflate(t.data);onmessage=astrm(n)},6)}}();function deflate(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),cbify(t,n,[bDflt],function(t){return pbf(deflateSync(t.data[0],t.data[1]))},0,e)}function deflateSync(t,n){return dopt(t,n||{},0,0)}exports.AsyncDeflate=AsyncDeflate,exports.deflate=deflate,exports.deflateSync=deflateSync;var Inflate=function(){function t(t){this.s={},this.p=new u8(0),this.ondata=t}return t.prototype.e=function(t){this.ondata||err(5),this.d&&err(4);var n=this.p.length,e=new u8(n+t.length);e.set(this.p),e.set(t,n),this.p=e},t.prototype.c=function(t){this.d=this.s.i=t||!1;var n=this.s.b,e=inflt(this.p,this.o,this.s);this.ondata(slc(e,n,this.s.b),this.d),this.o=slc(e,this.s.b-32768),this.s.b=this.o.length,this.p=slc(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,n){this.e(t),this.c(n)},t}();exports.Inflate=Inflate;var AsyncInflate=function(){return function(t){this.ondata=t,astrmify([bInflt,function(){return[astrm,Inflate]}],this,0,function(){var t=new Inflate;onmessage=astrm(t)},7)}}();function inflate(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),cbify(t,n,[bInflt],function(t){return pbf(inflateSync(t.data[0],gu8(t.data[1])))},1,e)}function inflateSync(t,n){return inflt(t,n)}exports.AsyncInflate=AsyncInflate,exports.inflate=inflate,exports.inflateSync=inflateSync;var Gzip=function(){function t(t,n){this.c=crc(),this.l=0,this.v=1,Deflate.call(this,t,n)}return t.prototype.push=function(t,n){Deflate.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t),this.l+=t.length;var e=dopt(t,this.o,this.v&&gzhl(this.o),n&&8,!n);this.v&&(gzh(e,this.o),this.v=0),n&&(wbytes(e,e.length-8,this.c.d()),wbytes(e,e.length-4,this.l)),this.ondata(e,n)},t}();exports.Gzip=Gzip,exports.Compress=Gzip;var AsyncGzip=function(){return function(t,n){astrmify([bDflt,gze,function(){return[astrm,Deflate,Gzip]}],this,AsyncCmpStrm.call(this,t,n),function(t){var n=new Gzip(t.data);onmessage=astrm(n)},8)}}();function gzip(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),cbify(t,n,[bDflt,gze,function(){return[gzipSync]}],function(t){return pbf(gzipSync(t.data[0],t.data[1]))},2,e)}function gzipSync(t,n){n||(n={});var e=crc(),r=t.length;e.p(t);var i=dopt(t,n,gzhl(n),8),s=i.length;return gzh(i,n),wbytes(i,s-8,e.d()),wbytes(i,s-4,r),i}exports.AsyncGzip=AsyncGzip,exports.AsyncCompress=AsyncGzip,exports.gzip=gzip,exports.compress=gzip,exports.gzipSync=gzipSync,exports.compressSync=gzipSync;var Gunzip=function(){function t(t){this.v=1,Inflate.call(this,t)}return t.prototype.push=function(t,n){if(Inflate.prototype.e.call(this,t),this.v){var e=this.p.length>3?gzs(this.p):4;if(e>=this.p.length&&!n)return;this.p=this.p.subarray(e),this.v=0}n&&(this.p.length<8&&err(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),Inflate.prototype.c.call(this,n)},t}();exports.Gunzip=Gunzip;var AsyncGunzip=function(){return function(t){this.ondata=t,astrmify([bInflt,guze,function(){return[astrm,Inflate,Gunzip]}],this,0,function(){var t=new Gunzip;onmessage=astrm(t)},9)}}();function gunzip(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),cbify(t,n,[bInflt,guze,function(){return[gunzipSync]}],function(t){return pbf(gunzipSync(t.data[0]))},3,e)}function gunzipSync(t,n){return inflt(t.subarray(gzs(t),-8),n||new u8(gzl(t)))}exports.AsyncGunzip=AsyncGunzip,exports.gunzip=gunzip,exports.gunzipSync=gunzipSync;var Zlib=function(){function t(t,n){this.c=adler(),this.v=1,Deflate.call(this,t,n)}return t.prototype.push=function(t,n){Deflate.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t);var e=dopt(t,this.o,this.v&&2,n&&4,!n);this.v&&(zlh(e,this.o),this.v=0),n&&wbytes(e,e.length-4,this.c.d()),this.ondata(e,n)},t}();exports.Zlib=Zlib;var AsyncZlib=function(){return function(t,n){astrmify([bDflt,zle,function(){return[astrm,Deflate,Zlib]}],this,AsyncCmpStrm.call(this,t,n),function(t){var n=new Zlib(t.data);onmessage=astrm(n)},10)}}();function zlib(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),cbify(t,n,[bDflt,zle,function(){return[zlibSync]}],function(t){return pbf(zlibSync(t.data[0],t.data[1]))},4,e)}function zlibSync(t,n){n||(n={});var e=adler();e.p(t);var r=dopt(t,n,2,4);return zlh(r,n),wbytes(r,r.length-4,e.d()),r}exports.AsyncZlib=AsyncZlib,exports.zlib=zlib,exports.zlibSync=zlibSync;var Unzlib=function(){function t(t){this.v=1,Inflate.call(this,t)}return t.prototype.push=function(t,n){if(Inflate.prototype.e.call(this,t),this.v){if(this.p.length<2&&!n)return;this.p=this.p.subarray(2),this.v=0}n&&(this.p.length<4&&err(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate.prototype.c.call(this,n)},t}();exports.Unzlib=Unzlib;var AsyncUnzlib=function(){return function(t){this.ondata=t,astrmify([bInflt,zule,function(){return[astrm,Inflate,Unzlib]}],this,0,function(){var t=new Unzlib;onmessage=astrm(t)},11)}}();function unzlib(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),cbify(t,n,[bInflt,zule,function(){return[unzlibSync]}],function(t){return pbf(unzlibSync(t.data[0],gu8(t.data[1])))},5,e)}function unzlibSync(t,n){return inflt((zlv(t),t.subarray(2,-4)),n)}exports.AsyncUnzlib=AsyncUnzlib,exports.unzlib=unzlib,exports.unzlibSync=unzlibSync;var Decompress=function(){function t(t){this.G=Gunzip,this.I=Inflate,this.Z=Unzlib,this.ondata=t}return t.prototype.push=function(t,n){if(this.ondata||err(5),this.s)this.s.push(t,n);else{if(this.p&&this.p.length){var e=new u8(this.p.length+t.length);e.set(this.p),e.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var r=this,i=function(){r.ondata.apply(r,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,n),this.p=null}}},t}();exports.Decompress=Decompress;var AsyncDecompress=function(){function t(t){this.G=AsyncGunzip,this.I=AsyncInflate,this.Z=AsyncUnzlib,this.ondata=t}return t.prototype.push=function(t,n){Decompress.prototype.push.call(this,t,n)},t}();function decompress(t,n,e){return e||(e=n,n={}),"function"!=typeof e&&err(7),31==t[0]&&139==t[1]&&8==t[2]?gunzip(t,n,e):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?inflate(t,n,e):unzlib(t,n,e)}function decompressSync(t,n){return 31==t[0]&&139==t[1]&&8==t[2]?gunzipSync(t,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?inflateSync(t,n):unzlibSync(t,n)}exports.AsyncDecompress=AsyncDecompress,exports.decompress=decompress,exports.decompressSync=decompressSync;var fltn=function(t,n,e,r){for(var i in t){var s=t[i],o=n+i,a=r;Array.isArray(s)&&(a=mrg(r,s[1]),s=s[0]),s instanceof u8?e[o]=[s,a]:(e[o+="/"]=[new u8(0),a],fltn(s,o,e,r))}},te="undefined"!=typeof TextEncoder&&new TextEncoder,td="undefined"!=typeof TextDecoder&&new TextDecoder,tds=0;try{td.decode(et,{stream:!0}),tds=1}catch(t){}var dutf8=function(t){for(var n="",e=0;;){var r=t[e++],i=(r>127)+(r>223)+(r>239);if(e+i>t.length)return[n,slc(t,e-1)];i?3==i?(r=((15&r)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,n+=String.fromCharCode(55296|r>>10,56320|1023&r)):n+=1&i?String.fromCharCode((31&r)<<6|63&t[e++]):String.fromCharCode((15&r)<<12|(63&t[e++])<<6|63&t[e++]):n+=String.fromCharCode(r)}},DecodeUTF8=function(){function t(t){this.ondata=t,tds?this.t=new TextDecoder:this.p=et}return t.prototype.push=function(t,n){if(this.ondata||err(5),n=!!n,this.t)return this.ondata(this.t.decode(t,{stream:!0}),n),void(n&&(this.t.decode().length&&err(8),this.t=null));this.p||err(4);var e=new u8(this.p.length+t.length);e.set(this.p),e.set(t,this.p.length);var r=dutf8(e),i=r[0],s=r[1];n?(s.length&&err(8),this.p=null):this.p=s,this.ondata(i,n)},t}();exports.DecodeUTF8=DecodeUTF8;var EncodeUTF8=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||err(5),this.d&&err(4),this.ondata(strToU8(t),this.d=n||!1)},t}();function strToU8(t,n){if(n){for(var e=new u8(t.length),r=0;r>1)),o=0,a=function(t){s[o++]=t};for(r=0;rs.length){var f=new u8(o+8+(i-r<<1));f.set(s),s=f}var u=t.charCodeAt(r);u<128||n?a(u):u<2048?(a(192|u>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++r))>>18),a(128|u>>12&63),a(128|u>>6&63),a(128|63&u)):(a(224|u>>12),a(128|u>>6&63),a(128|63&u))}return slc(s,0,o)}function strFromU8(t,n){if(n){for(var e="",r=0;r65535&&err(9),n+=r+4}return n},wzh=function(t,n,e,r,i,s,o,a){var f=r.length,u=e.extra,l=a&&a.length,c=exfl(u);wbytes(t,n,null!=o?33639248:67324752),n+=4,null!=o&&(t[n++]=20,t[n++]=e.os),t[n]=20,n+=2,t[n++]=e.flag<<1|(null==s&&8),t[n++]=i&&8,t[n++]=255&e.compression,t[n++]=e.compression>>8;var h=new Date(null==e.mtime?Date.now():e.mtime),p=h.getFullYear()-1980;if((p<0||p>119)&&err(10),wbytes(t,n,p<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>>1),n+=4,null!=s&&(wbytes(t,n,e.crc),wbytes(t,n+4,s),wbytes(t,n+8,e.size)),wbytes(t,n+12,f),wbytes(t,n+14,c),n+=16,null!=o&&(wbytes(t,n,l),wbytes(t,n+6,e.attrs),wbytes(t,n+10,o),n+=14),t.set(r,n),n+=f,c)for(var v in u){var d=u[v],b=d.length;wbytes(t,n,+v),wbytes(t,n+2,b),t.set(d,n+4),n+=4+b}return l&&(t.set(a,n),n+=l),n},wzf=function(t,n,e,r,i){wbytes(t,n,101010256),wbytes(t,n+8,e),wbytes(t,n+10,e),wbytes(t,n+12,r),wbytes(t,n+16,i)},ZipPassThrough=function(){function t(t){this.filename=t,this.c=crc(),this.size=0,this.compression=0}return t.prototype.process=function(t,n){this.ondata(null,t,n)},t.prototype.push=function(t,n){this.ondata||err(5),this.c.p(t),this.size+=t.length,n&&(this.crc=this.c.d()),this.process(t,n||!1)},t}();exports.ZipPassThrough=ZipPassThrough;var ZipDeflate=function(){function t(t,n){var e=this;n||(n={}),ZipPassThrough.call(this,t),this.d=new Deflate(n,function(t,n){e.ondata(null,t,n)}),this.compression=8,this.flag=dbf(n.level)}return t.prototype.process=function(t,n){try{this.d.push(t,n)}catch(t){this.ondata(t,null,n)}},t.prototype.push=function(t,n){ZipPassThrough.prototype.push.call(this,t,n)},t}();exports.ZipDeflate=ZipDeflate;var AsyncZipDeflate=function(){function t(t,n){var e=this;n||(n={}),ZipPassThrough.call(this,t),this.d=new AsyncDeflate(n,function(t,n,r){e.ondata(t,n,r)}),this.compression=8,this.flag=dbf(n.level),this.terminate=this.d.terminate}return t.prototype.process=function(t,n){this.d.push(t,n)},t.prototype.push=function(t,n){ZipPassThrough.prototype.push.call(this,t,n)},t}();exports.AsyncZipDeflate=AsyncZipDeflate;var Zip=function(){function t(t){this.ondata=t,this.u=[],this.d=1}return t.prototype.add=function(t){var n=this;if(this.ondata||err(5),2&this.d)this.ondata(err(4+8*(1&this.d),0,1),null,!1);else{var e=strToU8(t.filename),r=e.length,i=t.comment,s=i&&strToU8(i),o=r!=t.filename.length||s&&i.length!=s.length,a=r+exfl(t.extra)+30;r>65535&&this.ondata(err(11,0,1),null,!1);var f=new u8(a);wzh(f,0,t,e,o);var u=[f],l=function(){for(var t=0,e=u;t65535&&U(err(11,0,1),null),S)if(b<16e4)try{U(null,deflateSync(f,v))}catch(t){U(t,null)}else l.push(deflate(f,v,U));else U(null,f)},d=0;d65535&&err(11);var b=l?deflateSync(f,u):f,y=b.length,g=crc();g.p(f),r.push(mrg(u,{size:f.length,crc:g.d(),c:b,f:S,m:p,u:c!=o.length||p&&h.length!=v,o:i,compression:l})),i+=30+c+d+y,s+=76+2*(c+d)+(v||0)+y}for(var m=new u8(s+22),z=i,w=s-i,x=0;x0){var r=Math.min(this.c,t.length),i=t.subarray(0,r);if(this.c-=r,this.d?this.d.push(i,!this.c):this.k[0].push(i),(t=t.subarray(r)).length)return this.push(t,n)}else{var s=0,o=0,a=void 0,f=void 0;this.p.length?t.length?((f=new u8(this.p.length+t.length)).set(this.p),f.set(t,this.p.length)):f=this.p:f=t;for(var u=f.length,l=this.c,c=l&&this.d,h=function(){var t,n=b4(f,o);if(67324752==n){s=1,a=o,p.d=null,p.c=0;var r=b2(f,o+6),i=b2(f,o+8),c=2048&r,h=8&r,v=b2(f,o+26),d=b2(f,o+28);if(u>o+30+v+d){var b=[];p.k.unshift(b),s=2;var y,g=b4(f,o+18),m=b4(f,o+22),z=strFromU8(f.subarray(o+30,o+=30+v),!c);4294967295==g?(t=h?[-2]:z64e(f,o),g=t[0],m=t[1]):h&&(g=-1),o+=d,p.c=g;var w={name:z,compression:i,start:function(){if(w.ondata||err(5),g){var t=e.o[i];t||w.ondata(err(14,"unknown compression type "+i,1),null,!1),(y=g<0?new t(z):new t(z,g,m)).ondata=function(t,n,e){w.ondata(t,n,e)};for(var n=0,r=b;n=0&&(w.size=g,w.originalSize=m),p.onfile(w)}return"break"}if(l){if(134695760==n)return a=o+=12+(-2==l&&8),s=3,p.c=0,"break";if(33639248==n)return a=o-=4,s=3,p.c=0,"break"}},p=this;o65558)return o(err(13,0,1),null),i;var f=b2(t,a+8);if(f){var u=f,l=b4(t,a+16),c=4294967295==l;if(c){if(a=b4(t,a-12),101075792!=b4(t,a))return o(err(13,0,1),null),i;u=f=b4(t,a+32),l=b4(t,a+48)}for(var h=n&&n.filter,p=function(n){var e=zh(t,l,c),a=e[0],u=e[1],p=e[2],v=e[3],d=e[4],b=e[5],y=slzh(t,b);l=d;var g=function(t,n){t?(i(),o(t,null)):(n&&(s[v]=n),--f||o(null,s))};if(!h||h({name:v,size:u,originalSize:p,compression:a}))if(a)if(8==a){var m=t.subarray(y,y+u);if(u<32e4)try{g(null,inflateSync(m,new u8(p)))}catch(t){g(t,null)}else r.push(inflate(m,{size:p},g))}else g(err(14,"unknown compression type "+a,1),null);else g(null,slc(t,y,y+u));else g(null,null)},v=0;v65558)&&err(13);var i=b2(t,r+8);if(!i)return{};var s=b4(t,r+16),o=4294967295==s;o&&(r=b4(t,r-12),101075792!=b4(t,r)&&err(13),i=b4(t,r+32),s=b4(t,r+48));for(var a=n&&n.filter,f=0;fe>0&&r>1&&r{const o=TAU/e,i=[];for(let a=0;a{let{center:r,vertices:t,outerRadius:s,innerRadius:o,density:i,startAngle:a}=Object.assign({},{center:[0,0],vertices:5,outerRadius:1,innerRadius:0,density:2,startAngle:0},e);if(!isNumberArray(r,2))throw new Error("center must be an array of X and Y values");if(!isGTE(t,2))throw new Error("vertices must be two or more");if(!isGT(s,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(o,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(a,0))throw new Error("startAngle must be greater than zero");if(t=Math.floor(t),i=Math.floor(i),a%=TAU,0===o){if(!isGTE(i,2))throw new Error("density must be two or more");o=s*getRadiusRatio(t,i)}const n=vec2.clone(r),u=getPoints(t,s,a,n),c=getPoints(t,o,a+Math.PI/t,n),h=[];for(let e=0;e{const r={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:TAU},{innerRadius:t,innerSegments:o,outerRadius:n,outerSegments:s,innerRotation:i,startAngle:a,outerRotation:u}=Object.assign({},r,e);if(!isGT(t,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(o,3))throw new Error("innerSegments must be three or more");if(!isGT(n,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(s,3))throw new Error("outerSegments must be three or more");if(!isGTE(a,0))throw new Error("startAngle must be positive");if(!isGT(u,0))throw new Error("outerRotation must be greater than zero");if(t>=n)throw new Error("inner circle is two large to rotate about the outer circle");let m=circle({radius:t,segments:o});return 0!==i&&(m=rotate([0,0,i],m)),m=translate([n,0],m),extrudeRotate({startAngle:a,angle:u,segments:s},m)};module.exports=torus; +const{TAU:TAU}=require("../maths/constants"),extrudeRotate=require("../operations/extrusions/extrudeRotate"),{rotate:rotate}=require("../operations/transforms/rotate"),{translate:translate}=require("../operations/transforms/translate"),circle=require("./circle"),{isGT:isGT,isGTE:isGTE}=require("./commonChecks"),torus=e=>{const r={innerRadius:1,innerSegments:32,outerRadius:4,outerSegments:32,innerRotation:0,startAngle:0,outerRotation:TAU},{innerRadius:t,innerSegments:o,outerRadius:n,outerSegments:s,innerRotation:i,startAngle:a,outerRotation:u}=Object.assign({},r,e);if(!isGT(t,0))throw new Error("innerRadius must be greater than zero");if(!isGTE(o,3))throw new Error("innerSegments must be three or more");if(!isGT(n,0))throw new Error("outerRadius must be greater than zero");if(!isGTE(s,3))throw new Error("outerSegments must be three or more");if(!isGTE(a,0))throw new Error("startAngle must be positive");if(!isGT(u,0))throw new Error("outerRotation must be greater than zero");if(t>=n)throw new Error("inner circle is too large to rotate about the outer circle");let m=circle({radius:t,segments:o});return 0!==i&&(m=rotate([0,0,i],m)),m=translate([n,0],m),extrudeRotate({startAngle:a,angle:u,segments:s},m)};module.exports=torus; },{"../maths/constants":214,"../operations/extrusions/extrudeRotate":436,"../operations/transforms/rotate":484,"../operations/transforms/translate":487,"./circle":489,"./commonChecks":490}],510:[function(require,module,exports){ const{NEPS:NEPS}=require("../maths/constants"),vec2=require("../maths/vec2"),geom2=require("../geometries/geom2"),{isNumberArray:isNumberArray}=require("./commonChecks"),solveAngleFromSSS=(e,r,t)=>Math.acos((e*e+r*r-t*t)/(2*e*r)),solveSideFromSAS=(e,r,t)=>r>NEPS?Math.sqrt(e*e+t*t-2*e*t*Math.cos(r)):Math.sqrt((e-t)*(e-t)+e*t*r*r*(1-r*r/12)),solveAAA=e=>{if(Math.abs(e[0]+e[1]+e[2]-Math.PI)>NEPS)throw new Error("AAA triangles require angles that sum to PI");const r=e[0],t=e[1],s=Math.PI-r-t,a=1/Math.sin(s)*Math.sin(r),n=1/Math.sin(s)*Math.sin(t);return createTriangle(r,t,s,a,n,1)},solveAAS=e=>{const r=e[0],t=e[1],s=Math.PI+NEPS-r-t;if(s{const r=e[0],t=e[2],s=Math.PI+NEPS-r-t;if(s{const r=e[0],t=e[1],s=e[2],a=solveSideFromSAS(r,t,s),n=solveAngleFromSSS(a,r,s),o=Math.PI-n-t;return createTriangle(n,t,o,s,a,r)},solveSSA=e=>{const r=e[0],t=e[1],s=e[2],a=Math.asin(t*Math.sin(s)/r),n=Math.PI-a-s,o=r/Math.sin(s)*Math.sin(n);return createTriangle(a,n,s,t,o,r)},solveSSS=e=>{const r=e[1],t=e[2],s=e[0];if(r+t<=s||t+s<=r||s+r<=t)throw new Error("SSS triangle is incorrect, as the longest side is longer than the sum of the other sides");const a=solveAngleFromSSS(t,s,r),n=solveAngleFromSSS(s,r,t),o=Math.PI-a-n;return createTriangle(a,n,o,r,t,s)},createTriangle=(e,r,t,s,a,n)=>{const o=vec2.fromValues(0,0),i=vec2.fromValues(n,0),S=vec2.fromValues(s,0);return vec2.add(S,vec2.rotate(S,S,[0,0],Math.PI-r),i),geom2.fromPoints([o,i,S])},triangle=e=>{let{type:r,values:t}=Object.assign({},{type:"SSS",values:[1,1,1]},e);if("string"!=typeof r)throw new Error("triangle type must be a string");if("A"!==(r=r.toUpperCase())[0]&&"S"!==r[0]||"A"!==r[1]&&"S"!==r[1]||"A"!==r[2]&&"S"!==r[2])throw new Error("triangle type must contain three letters; A or S");if(!isNumberArray(t,3))throw new Error("triangle values must contain three values");if(!t.every(e=>e>0))throw new Error("triangle values must be greater than zero");switch(r){case"AAA":return solveAAA(t);case"AAS":return solveAAS(t);case"ASA":return solveASA(t);case"SAS":return solveSAS(t);case"SSA":return solveSSA(t);case"SSS":return solveSSS(t);default:throw new Error("invalid triangle type, try again")}};module.exports=triangle; @@ -2851,7 +2851,7 @@ module.exports={ },{}],686:[function(require,module,exports){ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("most"),require("@most/multicast")):"function"==typeof define&&define.amd?define(["exports","most","@most/multicast"],e):e(t.mostCreate=t.mostCreate||{},t.most,t.mostMulticast)}(this,function(t,e,i){"use strict";function n(t){return Promise.resolve(t).then(s)}function s(t){try{return t.run()}catch(e){return t.error(e)}}var r=function(t,e,i){this.sink=t,this.time=e,this.events=i};r.prototype.run=function(){for(var t,e=this.events,i=this.sink,n=0,s=e.length;n=0&&(this.sinks=e.remove(s,this.sinks)),this.sinks.length},u.prototype.event=function(t,e){var s=this.sinks;if(1===s.length)return s[0].event(t,e);for(var n=0;nK_MAX_LENGTH)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=Buffer.prototype,t}function Buffer(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(e)}return from(e,t,r)}function from(e,t,r){if("string"==typeof e)return fromString(e,t);if(ArrayBuffer.isView(e))return fromArrayLike(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer))return fromArrayBuffer(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return Buffer.from(n,t,r);var f=fromObject(e);if(f)return f;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return Buffer.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function alloc(e,t,r){return assertSize(e),e<=0?createBuffer(e):void 0!==t?"string"==typeof r?createBuffer(e).fill(t,r):createBuffer(e).fill(t):createBuffer(e)}function allocUnsafe(e){return assertSize(e),createBuffer(e<0?0:0|checked(e))}function fromString(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!Buffer.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|byteLength(e,t),n=createBuffer(r),f=n.write(e,t);return f!==r&&(n=n.slice(0,f)),n}function fromArrayLike(e){for(var t=e.length<0?0:0|checked(e.length),r=createBuffer(t),n=0;n=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|e}function SlowBuffer(e){return+e!=e&&(e=0),Buffer.alloc(+e)}function byteLength(e,t){if(Buffer.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var f=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(f)return n?-1:utf8ToBytes(e).length;t=(""+t).toLowerCase(),f=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,f){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),numberIsNaN(r=+r)&&(r=f?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(f)return-1;r=e.length-1}else if(r<0){if(!f)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),Buffer.isBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,f);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,f);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,f){var i,o=1,u=e.length,s=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,u/=2,s/=2,r/=2}function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(f){var h=-1;for(i=r;iu&&(r=u-s),i=r;i>=0;i--){for(var c=!0,l=0;lf&&(n=f):n=f;var i=t.length;n>i/2&&(n=i/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(f+c<=r)switch(c){case 1:a<128&&(h=a);break;case 2:128==(192&(i=e[f+1]))&&(s=(31&a)<<6|63&i)>127&&(h=s);break;case 3:i=e[f+1],o=e[f+2],128==(192&i)&&128==(192&o)&&(s=(15&a)<<12|(63&i)<<6|63&o)>2047&&(s<55296||s>57343)&&(h=s);break;case 4:i=e[f+1],o=e[f+2],u=e[f+3],128==(192&i)&&128==(192&o)&&128==(192&u)&&(s=(15&a)<<18|(63&i)<<12|(63&o)<<6|63&u)>65535&&s<1114112&&(h=s)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),f+=c}return decodeCodePointsArray(n)}exports.kMaxLength=K_MAX_LENGTH,Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport(),Buffer.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(Buffer.prototype,"parent",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.buffer}}),Object.defineProperty(Buffer.prototype,"offset",{enumerable:!0,get:function(){if(Buffer.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),Buffer.poolSize=8192,Buffer.from=function(e,t,r){return from(e,t,r)},Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,Buffer.alloc=function(e,t,r){return alloc(e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)},Buffer.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==Buffer.prototype},Buffer.compare=function(e,t){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),isInstance(t,Uint8Array)&&(t=Buffer.from(t,t.offset,t.byteLength)),!Buffer.isBuffer(e)||!Buffer.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,f=0,i=Math.min(r,n);ft&&(e+=" ... "),""},Buffer.prototype.compare=function(e,t,r,n,f){if(isInstance(e,Uint8Array)&&(e=Buffer.from(e,e.offset,e.byteLength)),!Buffer.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===f&&(f=this.length),t<0||r>e.length||n<0||f>this.length)throw new RangeError("out of range index");if(n>=f&&t>=r)return 0;if(n>=f)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(f>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),u=Math.min(i,o),s=this.slice(n,f),a=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var f="",i=t;ir)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,f,i){if(!Buffer.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>f||te.length)throw new RangeError("Index out of range")}function checkIEEE754(e,t,r,n,f,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,f){return t=+t,r>>>=0,f||checkIEEE754(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],f=1;t>0&&(f*=256);)n+=this[e+--t]*f;return n},Buffer.prototype.readUInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return e>>>=0,t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=this[e],f=1,i=0;++i=(f*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||checkOffset(e,t,this.length);for(var n=t,f=1,i=this[e+--n];n>0&&(f*=256);)i+=this[e+--n]*f;return i>=(f*=128)&&(i-=Math.pow(2,8*t)),i},Buffer.prototype.readInt8=function(e,t){return e>>>=0,t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){e>>>=0,t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return e>>>=0,t||checkOffset(e,4,this.length),ieee754.read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return e>>>=0,t||checkOffset(e,8,this.length),ieee754.read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t>>>=0,r>>>=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=1,i=0;for(this[t]=255&e;++i>>=0,r>>>=0,n)||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var f=r-1,i=1;for(this[t+f]=255&e;--f>=0&&(i*=256);)this[t+f]=e/i&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,255,0),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=0,o=1,u=0;for(this[t]=255&e;++i>0)-u&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var f=Math.pow(2,8*r-1);checkInt(this,e,t,r,f-1,-f)}var i=r-1,o=1,u=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===u&&0!==this[t+i+1]&&(u=1),this[t+i]=(e/o>>0)-u&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(!Buffer.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return f},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var f=e.charCodeAt(0);("utf8"===n&&f<128||"latin1"===n)&&(e=f)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!f){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}f=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),f=r;continue}r=65536+(f-55296<<10|r-56320)}else f&&(t-=3)>-1&&i.push(239,191,189);if(f=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function asciiToBytes(e){for(var t=[],r=0;r>8,f=r%256,i.push(f),i.push(n);return i}function base64ToBytes(e){return base64.toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var f=0;f=t.length||f>=e.length);++f)t[f+r]=e[f];return f}function isInstance(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function numberIsNaN(e){return e!=e} }).call(this)}).call(this,require("buffer").Buffer) -},{"base64-js":689,"buffer":691,"ieee754":712}],692:[function(require,module,exports){ -"use strict";var GetIntrinsic=require("get-intrinsic"),callBind=require("./"),$indexOf=callBind(GetIntrinsic("String.prototype.indexOf"));module.exports=function(i,n){var t=GetIntrinsic(i,!!n);return"function"==typeof t&&$indexOf(i,".prototype.")>-1?callBind(t):t}; +},{"base64-js":689,"buffer":691,"ieee754":716}],692:[function(require,module,exports){ +"use strict";var bind=require("function-bind"),$apply=require("./functionApply"),$call=require("./functionCall"),$reflectApply=require("./reflectApply");module.exports=$reflectApply||bind.call($call,$apply); -},{"./":693,"get-intrinsic":705}],693:[function(require,module,exports){ -"use strict";var bind=require("function-bind"),GetIntrinsic=require("get-intrinsic"),setFunctionLength=require("set-function-length"),$TypeError=require("es-errors/type"),$apply=GetIntrinsic("%Function.prototype.apply%"),$call=GetIntrinsic("%Function.prototype.call%"),$reflectApply=GetIntrinsic("%Reflect.apply%",!0)||bind.call($call,$apply),$defineProperty=require("es-define-property"),$max=GetIntrinsic("%Math.max%");module.exports=function(e){if("function"!=typeof e)throw new $TypeError("a function is required");var t=$reflectApply(bind,$call,arguments);return setFunctionLength(t,1+$max(0,e.length-(arguments.length-1)),!0)};var applyBind=function(){return $reflectApply(bind,$apply,arguments)};$defineProperty?$defineProperty(module.exports,"apply",{value:applyBind}):module.exports.apply=applyBind; +},{"./functionApply":693,"./functionCall":694,"./reflectApply":696,"function-bind":709}],693:[function(require,module,exports){ +"use strict";module.exports=Function.prototype.apply; -},{"es-define-property":695,"es-errors/type":701,"function-bind":704,"get-intrinsic":705,"set-function-length":722}],694:[function(require,module,exports){ -"use strict";var $defineProperty=require("es-define-property"),$SyntaxError=require("es-errors/syntax"),$TypeError=require("es-errors/type"),gopd=require("gopd");module.exports=function(e,r,o){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new $TypeError("`obj` must be an object or a function`");if("string"!=typeof r&&"symbol"!=typeof r)throw new $TypeError("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new $TypeError("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,t=arguments.length>5?arguments[5]:null,i=arguments.length>6&&arguments[6],u=!!gopd&&gopd(e,r);if($defineProperty)$defineProperty(e,r,{configurable:null===t&&u?u.configurable:!t,enumerable:null===n&&u?u.enumerable:!n,value:o,writable:null===l&&u?u.writable:!l});else{if(!i&&(n||l||t))throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[r]=o}}; +},{}],694:[function(require,module,exports){ +"use strict";module.exports=Function.prototype.call; -},{"es-define-property":695,"es-errors/syntax":700,"es-errors/type":701,"gopd":706}],695:[function(require,module,exports){ -"use strict";var GetIntrinsic=require("get-intrinsic"),$defineProperty=GetIntrinsic("%Object.defineProperty%",!0)||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty; +},{}],695:[function(require,module,exports){ +"use strict";var bind=require("function-bind"),$TypeError=require("es-errors/type"),$call=require("./functionCall"),$actualApply=require("./actualApply");module.exports=function(r){if(r.length<1||"function"!=typeof r[0])throw new $TypeError("a function is required");return $actualApply(bind,$call,r)}; -},{"get-intrinsic":705}],696:[function(require,module,exports){ -"use strict";module.exports=EvalError; +},{"./actualApply":692,"./functionCall":694,"es-errors/type":705,"function-bind":709}],696:[function(require,module,exports){ +"use strict";module.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply; },{}],697:[function(require,module,exports){ +"use strict";var GetIntrinsic=require("get-intrinsic"),callBindBasic=require("call-bind-apply-helpers"),$indexOf=callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);module.exports=function(i,n){var e=GetIntrinsic(i,!!n);return"function"==typeof e&&$indexOf(i,".prototype.")>-1?callBindBasic([e]):e}; + +},{"call-bind-apply-helpers":695,"get-intrinsic":710}],698:[function(require,module,exports){ +"use strict";var hasProtoAccessor,callBind=require("call-bind-apply-helpers"),gOPD=require("gopd");try{hasProtoAccessor=[].__proto__===Array.prototype}catch(t){if(!(t&&"object"==typeof t&&"code"in t&&"ERR_PROTO_ACCESS"===t.code))throw t}var desc=!!hasProtoAccessor&&gOPD&&gOPD(Object.prototype,"__proto__"),$Object=Object,$getPrototypeOf=$Object.getPrototypeOf;module.exports=desc&&"function"==typeof desc.get?callBind([desc.get]):"function"==typeof $getPrototypeOf&&function(t){return $getPrototypeOf(null==t?t:$Object(t))}; + +},{"call-bind-apply-helpers":695,"gopd":712}],699:[function(require,module,exports){ +"use strict";var $defineProperty=Object.defineProperty||!1;if($defineProperty)try{$defineProperty({},"a",{value:1})}catch(e){$defineProperty=!1}module.exports=$defineProperty; + +},{}],700:[function(require,module,exports){ +"use strict";module.exports=EvalError; + +},{}],701:[function(require,module,exports){ "use strict";module.exports=Error; -},{}],698:[function(require,module,exports){ +},{}],702:[function(require,module,exports){ "use strict";module.exports=RangeError; -},{}],699:[function(require,module,exports){ +},{}],703:[function(require,module,exports){ "use strict";module.exports=ReferenceError; -},{}],700:[function(require,module,exports){ +},{}],704:[function(require,module,exports){ "use strict";module.exports=SyntaxError; -},{}],701:[function(require,module,exports){ +},{}],705:[function(require,module,exports){ "use strict";module.exports=TypeError; -},{}],702:[function(require,module,exports){ +},{}],706:[function(require,module,exports){ "use strict";module.exports=URIError; -},{}],703:[function(require,module,exports){ +},{}],707:[function(require,module,exports){ +"use strict";module.exports=Object; + +},{}],708:[function(require,module,exports){ "use strict";var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max=Math.max,funcType="[object Function]",concatty=function(t,n){for(var r=[],o=0;o1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,r))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,y=n.value,i=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var d=1,s=!0;d=t.length){var c=$gOPD(y,f);y=(s=!!c)&&"get"in c&&!("originalValue"in c.get)?c.get:y[f]}else s=hasOwn(y,f),y=y[f];s&&!i&&(INTRINSICS[a]=y)}}return y}; - -},{"es-errors":697,"es-errors/eval":696,"es-errors/range":698,"es-errors/ref":699,"es-errors/syntax":700,"es-errors/type":701,"es-errors/uri":702,"function-bind":704,"has-proto":708,"has-symbols":709,"hasown":711}],706:[function(require,module,exports){ -"use strict";var GetIntrinsic=require("get-intrinsic"),$gOPD=GetIntrinsic("%Object.getOwnPropertyDescriptor%",!0);if($gOPD)try{$gOPD([],"length")}catch(t){$gOPD=null}module.exports=$gOPD; +},{"./implementation":708}],710:[function(require,module,exports){ +"use strict";var undefined,$Object=require("es-object-atoms"),$Error=require("es-errors"),$EvalError=require("es-errors/eval"),$RangeError=require("es-errors/range"),$ReferenceError=require("es-errors/ref"),$SyntaxError=require("es-errors/syntax"),$TypeError=require("es-errors/type"),$URIError=require("es-errors/uri"),abs=require("math-intrinsics/abs"),floor=require("math-intrinsics/floor"),max=require("math-intrinsics/max"),min=require("math-intrinsics/min"),pow=require("math-intrinsics/pow"),$Function=Function,getEvalledConstructor=function(r){try{return $Function('"use strict"; return ('+r+").constructor;")()}catch(r){}},$gOPD=require("gopd"),$defineProperty=require("es-define-property"),throwTypeError=function(){throw new $TypeError},ThrowTypeError=$gOPD?function(){try{return arguments.callee,throwTypeError}catch(r){try{return $gOPD(arguments,"callee").get}catch(r){return throwTypeError}}}():throwTypeError,hasSymbols=require("has-symbols")(),getDunderProto=require("dunder-proto/get"),getProto="function"==typeof Reflect&&Reflect.getPrototypeOf||$Object.getPrototypeOf||getDunderProto,$apply=require("call-bind-apply-helpers/functionApply"),$call=require("call-bind-apply-helpers/functionCall"),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined,"%Symbol%":hasSymbols?Symbol:undefined,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow};if(getProto)try{null.error}catch(r){var errorProto=getProto(getProto(r));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function r(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var o=r("%AsyncGeneratorFunction%");o&&(t=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=r("%AsyncGenerator%");n&&getProto&&(t=getProto(n.prototype))}return INTRINSICS[e]=t,t},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=require("function-bind"),hasOwn=require("hasown"),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(r){var e=$strSlice(r,0,1),t=$strSlice(r,-1);if("%"===e&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var o=[];return $replace(r,rePropName,function(r,e,t,n){o[o.length]=t?$replace(n,reEscapeChar,"$1"):e||r}),o},getBaseIntrinsic=function(r,e){var t,o=r;if(hasOwn(LEGACY_ALIASES,o)&&(o="%"+(t=LEGACY_ALIASES[o])[0]+"%"),hasOwn(INTRINSICS,o)){var n=INTRINSICS[o];if(n===needsEval&&(n=doEval(o)),void 0===n&&!e)throw new $TypeError("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new $SyntaxError("intrinsic "+r+" does not exist!")};module.exports=function(r,e){if("string"!=typeof r||0===r.length)throw new $TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new $TypeError('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,r))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=stringToPath(r),o=t.length>0?t[0]:"",n=getBaseIntrinsic("%"+o+"%",e),a=n.name,i=n.value,y=!1,p=n.alias;p&&(o=p[0],$spliceApply(t,$concat([0,1],p)));for(var d=1,s=!0;d=t.length){var c=$gOPD(i,f);i=(s=!!c)&&"get"in c&&!("originalValue"in c.get)?c.get:i[f]}else s=hasOwn(i,f),i=i[f];s&&!y&&(INTRINSICS[a]=i)}}return i}; -},{"get-intrinsic":705}],707:[function(require,module,exports){ -"use strict";var $defineProperty=require("es-define-property"),hasPropertyDescriptors=function(){return!!$defineProperty};hasPropertyDescriptors.hasArrayLengthDefineBug=function(){if(!$defineProperty)return null;try{return 1!==$defineProperty([],"length",{value:1}).length}catch(r){return!0}},module.exports=hasPropertyDescriptors; +},{"call-bind-apply-helpers/functionApply":693,"call-bind-apply-helpers/functionCall":694,"dunder-proto/get":698,"es-define-property":699,"es-errors":701,"es-errors/eval":700,"es-errors/range":702,"es-errors/ref":703,"es-errors/syntax":704,"es-errors/type":705,"es-errors/uri":706,"es-object-atoms":707,"function-bind":709,"gopd":712,"has-symbols":713,"hasown":715,"math-intrinsics/abs":717,"math-intrinsics/floor":718,"math-intrinsics/max":719,"math-intrinsics/min":720,"math-intrinsics/pow":721}],711:[function(require,module,exports){ +"use strict";module.exports=Object.getOwnPropertyDescriptor; -},{"es-define-property":695}],708:[function(require,module,exports){ -"use strict";var test={__proto__:null,foo:{}},$Object=Object;module.exports=function(){return{__proto__:test}.foo===test.foo&&!(test instanceof $Object)}; +},{}],712:[function(require,module,exports){ +"use strict";var $gOPD=require("./gOPD");if($gOPD)try{$gOPD([],"length")}catch(g){$gOPD=null}module.exports=$gOPD; -},{}],709:[function(require,module,exports){ +},{"./gOPD":711}],713:[function(require,module,exports){ "use strict";var origSymbol="undefined"!=typeof Symbol&&Symbol,hasSymbolSham=require("./shams");module.exports=function(){return"function"==typeof origSymbol&&("function"==typeof Symbol&&("symbol"==typeof origSymbol("foo")&&("symbol"==typeof Symbol("bar")&&hasSymbolSham())))}; -},{"./shams":710}],710:[function(require,module,exports){ -"use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(t,e);if(42!==n.value||!0!==n.enumerable)return!1}return!0}; +},{"./shams":714}],714:[function(require,module,exports){ +"use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var y=Object.getOwnPropertyDescriptor(t,e);if(42!==y.value||!0!==y.enumerable)return!1}return!0}; -},{}],711:[function(require,module,exports){ +},{}],715:[function(require,module,exports){ "use strict";var call=Function.prototype.call,$hasOwn=Object.prototype.hasOwnProperty,bind=require("function-bind");module.exports=bind.call(call,$hasOwn); -},{"function-bind":704}],712:[function(require,module,exports){ +},{"function-bind":709}],716:[function(require,module,exports){ exports.read=function(a,o,t,r,h){var M,p,w=8*h-r-1,f=(1<>1,i=-7,N=t?h-1:0,n=t?-1:1,s=a[o+N];for(N+=n,M=s&(1<<-i)-1,s>>=-i,i+=w;i>0;M=256*M+a[o+N],N+=n,i-=8);for(p=M&(1<<-i)-1,M>>=-i,i+=r;i>0;p=256*p+a[o+N],N+=n,i-=8);if(0===M)M=1-e;else{if(M===f)return p?NaN:1/0*(s?-1:1);p+=Math.pow(2,r),M-=e}return(s?-1:1)*p*Math.pow(2,M-r)},exports.write=function(a,o,t,r,h,M){var p,w,f,e=8*M-h-1,i=(1<>1,n=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,s=r?0:M-1,u=r?1:-1,l=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(w=isNaN(o)?1:0,p=i):(p=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-p))<1&&(p--,f*=2),(o+=p+N>=1?n/f:n*Math.pow(2,1-N))*f>=2&&(p++,f/=2),p+N>=i?(w=0,p=i):p+N>=1?(w=(o*f-1)*Math.pow(2,h),p+=N):(w=o*Math.pow(2,N-1)*Math.pow(2,h),p=0));h>=8;a[t+s]=255&w,s+=u,w/=256,h-=8);for(p=p<0;a[t+s]=255&p,s+=u,p/=256,e-=8);a[t+s-u]|=128*l}; -},{}],713:[function(require,module,exports){ +},{}],717:[function(require,module,exports){ +"use strict";module.exports=Math.abs; + +},{}],718:[function(require,module,exports){ +"use strict";module.exports=Math.floor; + +},{}],719:[function(require,module,exports){ +"use strict";module.exports=Math.max; + +},{}],720:[function(require,module,exports){ +"use strict";module.exports=Math.min; + +},{}],721:[function(require,module,exports){ +"use strict";module.exports=Math.pow; + +},{}],722:[function(require,module,exports){ (function (global){(function (){ var hasMap="function"==typeof Map&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&"function"==typeof mapSizeDescriptor.get?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet="function"==typeof Set&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&"function"==typeof setSizeDescriptor.get?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap="function"==typeof WeakMap&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet="function"==typeof WeakSet&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef="function"==typeof WeakRef&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf="function"==typeof BigInt?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,hasShammedSymbols="function"==typeof Symbol&&"object"==typeof Symbol.iterator,toStringTag="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function addNumericSeparator(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||$test.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n),a=$slice.call(e,o.length+1);return $replace.call(o,r,"$&_")+"."+$replace.call($replace.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,r,"$&_")}var utilInspect=require("./util.inspect"),inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function wrapQuotes(t,e,r){var n=r.quoteStyle||e,o=quotes[n];return o+t+o}function quote(t){return $replace.call(String(t),/"/g,""")}function isArray(t){return!("[object Array]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isDate(t){return!("[object Date]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isRegExp(t){return!("[object RegExp]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isError(t){return!("[object Error]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isString(t){return!("[object String]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isNumber(t){return!("[object Number]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isBoolean(t){return!("[object Boolean]"!==toStr(t)||toStringTag&&"object"==typeof t&&toStringTag in t)}function isSymbol(t){if(hasShammedSymbols)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!symToString)return!1;try{return symToString.call(t),!0}catch(t){}return!1}function isBigInt(t){if(!t||"object"!=typeof t||!bigIntValueOf)return!1;try{return bigIntValueOf.call(t),!0}catch(t){}return!1}module.exports=function t(e,r,n,o){var a=r||{};if(has(a,"quoteStyle")&&!has(quotes,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has(a,"customInspect")||a.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,a);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return l?addNumericSeparator(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return l?addNumericSeparator(e,u):u}var p=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=p&&p>0&&"object"==typeof e)return isArray(e)?"[Array]":"[Object]";var f=getIndent(a,n);if(void 0===o)o=[];else if(indexOf(o,e)>=0)return"[Circular]";function s(e,r,i){if(r&&(o=$arrSlice.call(o)).push(r),i){var l={depth:a.depth};return has(a,"quoteStyle")&&(l.quoteStyle=a.quoteStyle),t(e,l,n+1,o)}return t(e,a,n+1,o)}if("function"==typeof e&&!isRegExp(e)){var y=nameOf(e),S=arrObjKeys(e,s);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(S.length>0?" { "+$join.call(S,", ")+" }":"")}if(isSymbol(e)){var g=hasShammedSymbols?$replace.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e);return"object"!=typeof e||hasShammedSymbols?g:markBoxed(g)}if(isElement(e)){for(var b="<"+$toLowerCase.call(String(e.nodeName)),m=e.attributes||[],h=0;h"}if(isArray(e)){if(0===e.length)return"[]";var d=arrObjKeys(e,s);return f&&!singleLineValues(d)?"["+indentedJoin(d,f)+"]":"[ "+$join.call(d,", ")+" ]"}if(isError(e)){var j=arrObjKeys(e,s);return"cause"in Error.prototype||!("cause"in e)||isEnumerable.call(e,"cause")?0===j.length?"["+String(e)+"]":"{ ["+String(e)+"] "+$join.call(j,", ")+" }":"{ ["+String(e)+"] "+$join.call($concat.call("[cause]: "+s(e.cause),j),", ")+" }"}if("object"==typeof e&&i){if(inspectSymbol&&"function"==typeof e[inspectSymbol]&&utilInspect)return utilInspect(e,{depth:p-n});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(isMap(e)){var O=[];return mapForEach&&mapForEach.call(e,function(t,r){O.push(s(r,e,!0)+" => "+s(t,e))}),collectionOf("Map",mapSize.call(e),O,f)}if(isSet(e)){var w=[];return setForEach&&setForEach.call(e,function(t){w.push(s(t,e))}),collectionOf("Set",setSize.call(e),w,f)}if(isWeakMap(e))return weakCollectionOf("WeakMap");if(isWeakSet(e))return weakCollectionOf("WeakSet");if(isWeakRef(e))return weakCollectionOf("WeakRef");if(isNumber(e))return markBoxed(s(Number(e)));if(isBigInt(e))return markBoxed(s(bigIntValueOf.call(e)));if(isBoolean(e))return markBoxed(booleanValueOf.call(e));if(isString(e))return markBoxed(s(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||"undefined"!=typeof global&&e===global)return"{ [object globalThis] }";if(!isDate(e)&&!isRegExp(e)){var $=arrObjKeys(e,s),k=gPO?gPO(e)===Object.prototype:e instanceof Object||e.constructor===Object,v=e instanceof Object?"":"null prototype",T=!k&&toStringTag&&Object(e)===e&&toStringTag in e?$slice.call(toStr(e),8,-1):v?"Object":"",E=(k||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(T||v?"["+$join.call($concat.call([],T||[],v||[]),": ")+"] ":"");return 0===$.length?E+"{}":f?E+"{"+indentedJoin($,f)+"}":E+"{ "+$join.call($,", ")+" }"}return String(e)};var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name)return t.name;var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function indexOf(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=quoteREs[e.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace.call($replace.call(t,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",e)}function lowbyte(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,r,n){return t+" ("+e+") {"+(n?indentedJoin(r,n):$join.call(r,", "))+"}"}function singleLineValues(t){for(var e=0;e=0)return!1;return!0}function getIndent(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=$join.call(Array(t.indent+1)," ")}return{base:r,prev:$join.call(Array(e+1),r)}}function indentedJoin(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+$join.call(t,","+r)+"\n"+e.prev}function arrObjKeys(t,e){var r=isArray(t),n=[];if(r){n.length=t.length;for(var o=0;o=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),e++):e&&(r.splice(n,1),e--)}if(t)for(;e--;e)r.unshift("..");return r}function basename(r){"string"!=typeof r&&(r+="");var t,e=0,n=-1,o=!0;for(t=r.length-1;t>=0;--t)if(47===r.charCodeAt(t)){if(!o){e=t+1;break}}else-1===n&&(o=!1,n=t+1);return-1===n?"":r.slice(e,n)}function filter(r,t){if(r.filter)return r.filter(t);for(var e=[],n=0;n=-1&&!t;e--){var n=e>=0?arguments[e]:process.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(r=n+"/"+r,t="/"===n.charAt(0))}return(t?"/":"")+(r=normalizeArray(filter(r.split("/"),function(r){return!!r}),!t).join("/"))||"."},exports.normalize=function(r){var t=exports.isAbsolute(r),e="/"===substr(r,-1);return(r=normalizeArray(filter(r.split("/"),function(r){return!!r}),!t).join("/"))||t||(r="."),r&&e&&(r+="/"),(t?"/":"")+r},exports.isAbsolute=function(r){return"/"===r.charAt(0)},exports.join=function(){var r=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(r,function(r,t){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r}).join("/"))},exports.relative=function(r,t){function e(r){for(var t=0;t=0&&""===r[e];e--);return t>e?[]:r.slice(t,e-t+1)}r=exports.resolve(r).substr(1),t=exports.resolve(t).substr(1);for(var n=e(r.split("/")),o=e(t.split("/")),s=Math.min(n.length,o.length),i=s,u=0;u=1;--s)if(47===(t=r.charCodeAt(s))){if(!o){n=s;break}}else o=!1;return-1===n?e?"/":".":e&&1===n?"/":r.slice(0,n)},exports.basename=function(r,t){var e=basename(r);return t&&e.substr(-1*t.length)===t&&(e=e.substr(0,e.length-t.length)),e},exports.extname=function(r){"string"!=typeof r&&(r+="");for(var t=-1,e=0,n=-1,o=!0,s=0,i=r.length-1;i>=0;--i){var u=r.charCodeAt(i);if(47!==u)-1===n&&(o=!1,n=i+1),46===u?-1===t?t=i:1!==s&&(s=1):-1!==t&&(s=-1);else if(!o){e=i+1;break}}return-1===t||-1===n||0===s||1===s&&t===n-1&&t===e+1?"":r.slice(t,n)};var substr="b"==="ab".substr(-1)?function(r,t,e){return r.substr(t,e)}:function(r,t,e){return t<0&&(t=r.length+t),r.substr(t,e)}; }).call(this)}).call(this,require('_process')) -},{"_process":715}],715:[function(require,module,exports){ +},{"_process":724}],724:[function(require,module,exports){ var cachedSetTimeout,cachedClearTimeout,process=module.exports={};function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch(t){try{return cachedSetTimeout.call(null,e,0)}catch(t){return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch(t){try{return cachedClearTimeout.call(null,e)}catch(t){return cachedClearTimeout.call(this,e)}}}!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;function cleanUpNextTick(){draining&¤tQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=f-c,y=Math.floor,C=String.fromCharCode;function m(e){throw new RangeError(x[e])}function j(e,o){for(var n=e.length,t=[];n--;)t[n]=o(e[n]);return t}function A(e,o){var n=e.split("@"),t="";return n.length>1&&(t=n[0]+"@",e=n[1]),t+j((e=e.replace(w,".")).split("."),o).join(".")}function I(e){for(var o,n,t=[],r=0,u=e.length;r=55296&&o<=56319&&r65535&&(o+=C((e-=65536)>>>10&1023|55296),e=56320|1023&e),o+=C(e)}).join("")}function F(e,o){return e+22+75*(e<26)-((0!=o)<<5)}function O(e,o,n){var t=0;for(e=n?y(e/d):e>>1,e+=y(e/o);e>b*l>>1;t+=f)e=y(e/b);return y(t+(b+1)*e/(e+s))}function S(e){var o,n,t,r,u,s,d,v,g,w,x,b=[],C=e.length,j=0,A=a,I=p;for((n=e.lastIndexOf(h))<0&&(n=0),t=0;t=128&&m("not-basic"),b.push(e.charCodeAt(t));for(r=n>0?n+1:0;r=C&&m("invalid-input"),((v=(x=e.charCodeAt(r++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:f)>=f||v>y((i-j)/s))&&m("overflow"),j+=v*s,!(v<(g=d<=I?c:d>=I+l?l:d-I));d+=f)s>y(i/(w=f-g))&&m("overflow"),s*=w;I=O(j-u,o=b.length+1,0==u),y(j/o)>i-A&&m("overflow"),A+=y(j/o),j%=o,b.splice(j++,0,A)}return E(b)}function T(e){var o,n,t,r,u,s,d,v,g,w,x,b,j,A,E,S=[];for(b=(e=I(e)).length,o=a,n=0,u=p,s=0;s=o&&xy((i-n)/(j=t+1))&&m("overflow"),n+=(d-o)*j,o=d,s=0;si&&m("overflow"),x==o){for(v=n,g=f;!(v<(w=g<=u?c:g>=u+l?l:g-u));g+=f)E=v-w,A=f-w,S.push(C(F(w+E%A,0))),v=y(E/A);S.push(C(F(v,0))),u=O(n,j,t==r),n=0,++t}++n,++o}return S.join("")}if(r={version:"1.4.1",ucs2:{decode:I,encode:E},decode:S,encode:T,toASCII:function(e){return A(e,function(e){return g.test(e)?"xn--"+T(e):e})},toUnicode:function(e){return A(e,function(e){return v.test(e)?S(e.slice(4).toLowerCase()):e})}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return r});else if(o&&n)if(module.exports==o)n.exports=r;else for(u in r)r.hasOwnProperty(u)&&(o[u]=r[u]);else e.punycode=r}(this); }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],717:[function(require,module,exports){ +},{}],726:[function(require,module,exports){ "use strict";var replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"};module.exports={default:Format.RFC3986,formatters:{RFC1738:function(e){return replace.call(e,percentTwenties,"+")},RFC3986:function(e){return String(e)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986}; -},{}],718:[function(require,module,exports){ +},{}],727:[function(require,module,exports){ "use strict";var stringify=require("./stringify"),parse=require("./parse"),formats=require("./formats");module.exports={formats:formats,parse:parse,stringify:stringify}; -},{"./formats":717,"./parse":719,"./stringify":720}],719:[function(require,module,exports){ -"use strict";var utils=require("./utils"),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(e,t){var r={__proto__:null},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;a=a.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var i,o=t.parameterLimit===1/0?void 0:t.parameterLimit,l=a.split(t.delimiter,o),s=-1,n=t.charset;if(t.charsetSentinel)for(i=0;i-1&&(c=isArray(c)?[c]:c);var y=has.call(r,p);y&&"combine"===t.duplicates?r[p]=utils.combine(r[p],c):y&&"last"!==t.duplicates||(r[p]=c)}return r},parseObject=function(e,t,r,a){for(var i=a?t:parseArrayValue(t,r),o=e.length-1;o>=0;--o){var l,s=e[o];if("[]"===s&&r.parseArrays)l=r.allowEmptyArrays&&(""===i||r.strictNullHandling&&null===i)?[]:[].concat(i);else{l=r.plainObjects?Object.create(null):{};var n="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,p=r.decodeDotInKeys?n.replace(/%2E/g,"."):n,c=parseInt(p,10);r.parseArrays||""!==p?!isNaN(c)&&s!==p&&String(c)===p&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(l=[])[c]=i:"__proto__"!==p&&(l[p]=i):l={0:i}}i=l}return i},parseKeys=function(e,t,r,a){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(i),s=l?i.slice(0,l.index):i,n=[];if(s){if(!r.plainObjects&&has.call(Object.prototype,s)&&!r.allowPrototypes)return;n.push(s)}for(var p=0;r.depth>0&&null!==(l=o.exec(i))&&p-1?e.split(","):e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(e,t){var r={__proto__:null},a=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;a=a.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o,i=t.parameterLimit===1/0?void 0:t.parameterLimit,l=a.split(t.delimiter,i),s=-1,n=t.charset;if(t.charsetSentinel)for(o=0;o-1&&(c=isArray(c)?[c]:c);var y=has.call(r,p);y&&"combine"===t.duplicates?r[p]=utils.combine(r[p],c):y&&"last"!==t.duplicates||(r[p]=c)}return r},parseObject=function(e,t,r,a){for(var o=a?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var l,s=e[i];if("[]"===s&&r.parseArrays)l=r.allowEmptyArrays&&(""===o||r.strictNullHandling&&null===o)?[]:[].concat(o);else{l=r.plainObjects?{__proto__:null}:{};var n="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,p=r.decodeDotInKeys?n.replace(/%2E/g,"."):n,c=parseInt(p,10);r.parseArrays||""!==p?!isNaN(c)&&s!==p&&String(c)===p&&c>=0&&r.parseArrays&&c<=r.arrayLimit?(l=[])[c]=o:"__proto__"!==p&&(l[p]=o):l={0:o}}o=l}return o},parseKeys=function(e,t,r,a){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,l=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=l?o.slice(0,l.index):o,n=[];if(s){if(!r.plainObjects&&has.call(Object.prototype,s)&&!r.allowPrototypes)return;n.push(s)}for(var p=0;r.depth>0&&null!==(l=i.exec(o))&&p0?w.join(",")||null:void 0}];else if(isArray(u))S=u;else{var T=Object.keys(w);S=d?T.sort(d):T}var O=s?String(t).replace(/\./g,"%2E"):String(t),k=a&&isArray(w)&&1===w.length?O+"[]":O;if(n&&isArray(w)&&0===w.length)return k+"[]";for(var I=0;I0?c+y:""}; -},{"./utils":721}],720:[function(require,module,exports){ -"use strict";var getSideChannel=require("side-channel"),utils=require("./utils"),formats=require("./formats"),has=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},isArray=Array.isArray,push=Array.prototype.push,pushToArray=function(e,r){push.apply(e,isArray(r)?r:[r])},toISO=Date.prototype.toISOString,defaultFormat=formats.default,defaults={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:utils.encode,encodeValuesOnly:!1,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:!1,serializeDate:function(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},sentinel={},stringify=function e(r,t,o,a,n,i,l,s,f,u,d,y,c,p,m,h,v,w){for(var b=r,g=w,A=0,D=!1;void 0!==(g=g.get(sentinel))&&!D;){var E=g.get(r);if(A+=1,void 0!==E){if(E===A)throw new RangeError("Cyclic object value");D=!0}void 0===g.get(sentinel)&&(A=0)}if("function"==typeof u?b=u(t,b):b instanceof Date?b=c(b):"comma"===o&&isArray(b)&&(b=utils.maybeMap(b,function(e){return e instanceof Date?c(e):e})),null===b){if(i)return f&&!h?f(t,defaults.encoder,v,"key",p):t;b=""}if(isNonNullishPrimitive(b)||utils.isBuffer(b))return f?[m(h?t:f(t,defaults.encoder,v,"key",p))+"="+m(f(b,defaults.encoder,v,"value",p))]:[m(t)+"="+m(String(b))];var N,S=[];if(void 0===b)return S;if("comma"===o&&isArray(b))h&&f&&(b=utils.maybeMap(b,f)),N=[{value:b.length>0?b.join(",")||null:void 0}];else if(isArray(u))N=u;else{var T=Object.keys(b);N=d?T.sort(d):T}var O=s?t.replace(/\./g,"%2E"):t,k=a&&isArray(b)&&1===b.length?O+"[]":O;if(n&&isArray(b)&&0===b.length)return k+"[]";for(var I=0;I0?y+d:""}; +},{"./formats":726,"./utils":730,"side-channel":734}],730:[function(require,module,exports){ +"use strict";var formats=require("./formats"),has=Object.prototype.hasOwnProperty,isArray=Array.isArray,hexTable=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),compactQueue=function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var o=[],n=0;n=limit?a.slice(i,i+limit):a,f=[],p=0;p=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||n===formats.RFC1738&&(40===s||41===s)?f[f.length]=u.charAt(p):s<128?f[f.length]=hexTable[s]:s<2048?f[f.length]=hexTable[192|s>>6]+hexTable[128|63&s]:s<55296||s>=57344?f[f.length]=hexTable[224|s>>12]+hexTable[128|s>>6&63]+hexTable[128|63&s]:(p+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(p)),f[f.length]=hexTable[240|s>>18]+hexTable[128|s>>12&63]+hexTable[128|s>>6&63]+hexTable[128|63&s])}c+=f.join("")}return c},compact=function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o1;){var r=e.pop(),t=r.obj[r.prop];if(isArray(t)){for(var o=[],n=0;n=limit?a.slice(i,i+limit):a,f=[],p=0;p=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||n===formats.RFC1738&&(40===s||41===s)?f[f.length]=u.charAt(p):s<128?f[f.length]=hexTable[s]:s<2048?f[f.length]=hexTable[192|s>>6]+hexTable[128|63&s]:s<55296||s>=57344?f[f.length]=hexTable[224|s>>12]+hexTable[128|s>>6&63]+hexTable[128|63&s]:(p+=1,s=65536+((1023&s)<<10|1023&u.charCodeAt(p)),f[f.length]=hexTable[240|s>>18]+hexTable[128|s>>12&63]+hexTable[128|s>>6&63]+hexTable[128|63&s])}c+=f.join("")}return c},compact=function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],o=0;o4294967295||$floor(r)!==r)throw new $TypeError("`length` must be a positive 32-bit integer");var t=arguments.length>2&&!!arguments[2],i=!0,n=!0;if("length"in e&&gOPD){var o=gOPD(e,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(n=!1)}return(i||n||!t)&&(hasDescriptors?define(e,"length",r,!0,!0):define(e,"length",r)),e}; +},{"es-errors/type":705,"object-inspect":722}],732:[function(require,module,exports){ +"use strict";var GetIntrinsic=require("get-intrinsic"),callBound=require("call-bound"),inspect=require("object-inspect"),$TypeError=require("es-errors/type"),$Map=GetIntrinsic("%Map%",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),$mapDelete=callBound("Map.prototype.delete",!0),$mapSize=callBound("Map.prototype.size",!0);module.exports=!!$Map&&function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(t){if(e){var r=$mapDelete(e,t);return 0===$mapSize(e)&&(e=void 0),r}return!1},get:function(t){if(e)return $mapGet(e,t)},has:function(t){return!!e&&$mapHas(e,t)},set:function(t,r){e||(e=new $Map),$mapSet(e,t,r)}};return t}; -},{"define-data-property":694,"es-errors/type":701,"get-intrinsic":705,"gopd":706,"has-property-descriptors":707}],723:[function(require,module,exports){ -"use strict";var GetIntrinsic=require("get-intrinsic"),callBound=require("call-bind/callBound"),inspect=require("object-inspect"),$TypeError=require("es-errors/type"),$WeakMap=GetIntrinsic("%WeakMap%",!0),$Map=GetIntrinsic("%Map%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$mapGet=callBound("Map.prototype.get",!0),$mapSet=callBound("Map.prototype.set",!0),$mapHas=callBound("Map.prototype.has",!0),listGetNode=function(e,t){for(var a,n=e;null!==(a=n.next);n=a)if(a.key===t)return n.next=a.next,a.next=e.next,e.next=a,a},listGet=function(e,t){var a=listGetNode(e,t);return a&&a.value},listSet=function(e,t,a){var n=listGetNode(e,t);n?n.value=a:e.next={key:t,next:e.next,value:a}},listHas=function(e,t){return!!listGetNode(e,t)};module.exports=function(){var e,t,a,n={assert:function(e){if(!n.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},get:function(n){if($WeakMap&&n&&("object"==typeof n||"function"==typeof n)){if(e)return $weakMapGet(e,n)}else if($Map){if(t)return $mapGet(t,n)}else if(a)return listGet(a,n)},has:function(n){if($WeakMap&&n&&("object"==typeof n||"function"==typeof n)){if(e)return $weakMapHas(e,n)}else if($Map){if(t)return $mapHas(t,n)}else if(a)return listHas(a,n);return!1},set:function(n,r){$WeakMap&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new $WeakMap),$weakMapSet(e,n,r)):$Map?(t||(t=new $Map),$mapSet(t,n,r)):(a||(a={key:{},next:null}),listSet(a,n,r))}};return n}; +},{"call-bound":697,"es-errors/type":705,"get-intrinsic":710,"object-inspect":722}],733:[function(require,module,exports){ +"use strict";var GetIntrinsic=require("get-intrinsic"),callBound=require("call-bound"),inspect=require("object-inspect"),getSideChannelMap=require("side-channel-map"),$TypeError=require("es-errors/type"),$WeakMap=GetIntrinsic("%WeakMap%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$weakMapDelete=callBound("WeakMap.prototype.delete",!0);module.exports=$WeakMap?function(){var e,t,a={assert:function(e){if(!a.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(a){if($WeakMap&&a&&("object"==typeof a||"function"==typeof a)){if(e)return $weakMapDelete(e,a)}else if(getSideChannelMap&&t)return t.delete(a);return!1},get:function(a){return $WeakMap&&a&&("object"==typeof a||"function"==typeof a)&&e?$weakMapGet(e,a):t&&t.get(a)},has:function(a){return $WeakMap&&a&&("object"==typeof a||"function"==typeof a)&&e?$weakMapHas(e,a):!!t&&t.has(a)},set:function(a,n){$WeakMap&&a&&("object"==typeof a||"function"==typeof a)?(e||(e=new $WeakMap),$weakMapSet(e,a,n)):getSideChannelMap&&(t||(t=getSideChannelMap()),t.set(a,n))}};return a}:getSideChannelMap; -},{"call-bind/callBound":692,"es-errors/type":701,"get-intrinsic":705,"object-inspect":713}],724:[function(require,module,exports){ +},{"call-bound":697,"es-errors/type":705,"get-intrinsic":710,"object-inspect":722,"side-channel-map":732}],734:[function(require,module,exports){ +"use strict";var $TypeError=require("es-errors/type"),inspect=require("object-inspect"),getSideChannelList=require("side-channel-list"),getSideChannelMap=require("side-channel-map"),getSideChannelWeakMap=require("side-channel-weakmap"),makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList;module.exports=function(){var e,n={assert:function(e){if(!n.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,t){e||(e=makeChannel()),e.set(n,t)}};return n}; + +},{"es-errors/type":705,"object-inspect":722,"side-channel-list":731,"side-channel-map":732,"side-channel-weakmap":733}],735:[function(require,module,exports){ "use strict";var punycode=require("punycode/");function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require("qs");function urlParse(t,s,e){if(t&&"object"==typeof t&&t instanceof Url)return t;var h=new Url;return h.parse(t,s,e),h}function urlFormat(t){return"string"==typeof t&&(t=urlParse(t)),t instanceof Url?t.format():Url.prototype.format.call(t)}function urlResolve(t,s){return urlParse(t,!1,!0).resolve(s)}function urlResolveObject(t,s){return t?urlParse(t,!1,!0).resolveObject(s):s}Url.prototype.parse=function(t,s,e){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var h=t.indexOf("?"),r=-1!==h&&h127?b+="x":b+=d[q];if(!b.match(hostnamePartPattern)){var j=g.slice(0,m),O=g.slice(m+1),U=d.match(hostnamePartStart);U&&(j.push(U[1]),O.unshift(U[2])),O.length&&(o="/"+O.join(".")+o),this.hostname=j.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),y||(this.hostname=punycode.toASCII(this.hostname));var C=this.port?":"+this.port:"",A=this.hostname||"";this.host=A+C,this.href+=this.host,y&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!unsafeProtocol[l])for(m=0,P=autoEscape.length;m0)&&e.host.split("@"))&&(e.auth=U.shift(),e.hostname=U.shift(),e.host=e.hostname);return e.search=t.search,e.query=t.query,null===e.pathname&&null===e.search||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!d.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var q=d.slice(-1)[0],x=(e.host||t.host||d.length>1)&&("."===q||".."===q)||""===q,j=0,O=d.length;O>=0;O--)"."===(q=d[O])?d.splice(O,1):".."===q?(d.splice(O,1),j++):j&&(d.splice(O,1),j--);if(!g&&!P)for(;j--;j)d.unshift("..");!g||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),x&&"/"!==d.join("/").substr(-1)&&d.push("");var U,C=""===d[0]||d[0]&&"/"===d[0].charAt(0);b&&(e.hostname=C?"":d.length?d.shift():"",e.host=e.hostname,(U=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=U.shift(),e.hostname=U.shift(),e.host=e.hostname));return(g=g||e.host&&d.length)&&!C&&d.unshift(""),d.length>0?e.pathname=d.join("/"):(e.pathname=null,e.path=null),null===e.pathname&&null===e.search||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},Url.prototype.parseHost=function(){var t=this.host,s=portPattern.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)},exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url; -},{"punycode/":716,"qs":718}],725:[function(require,module,exports){ +},{"punycode/":725,"qs":727}],736:[function(require,module,exports){ !function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){var e=t.Pos;function r(t,e){for(var r=0,n=t.length;rs.ch&&(a.end=s.ch,a.string=a.string.slice(0,s.ch-a.start)):a={start:s.ch,end:s.ch,string:"",state:a.state,type:"."==a.string?"property":null};for(var f=a;"property"==f.type;){if("."!=(f=i(r,e(s.line,f.start))).string)return;if(f=i(r,e(s.line,f.start)),!p)var p=[];p.push(f)}return{list:c(a,p,n,o),from:e(s.line,a.start),to:e(s.line,a.end)}}}}function i(t,e){var r=t.getTokenAt(e);return e.ch==r.start+1&&"."==r.string.charAt(0)?(r.end=r.start,r.string=".",r.type="property"):/^\.[\w$_]*$/.test(r.string)&&(r.type="property",r.start++,r.string=r.string.replace(/\./,"")),r}t.registerHelper("hint","javascript",function(t,e){return n(t,l,function(t,e){return t.getTokenAt(e)},e)}),t.registerHelper("hint","coffeescript",function(t,e){return n(t,f,i,e)});var o="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),s="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),a="prototype apply call bind".split(" "),l="break case catch class const continue debugger default delete do else export extends false finally for function if in import instanceof new null return super switch this throw true try typeof var void while with yield".split(" "),f="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ");function c(t,e,n,i){var l=[],f=t.string,c=i&&i.globalScope||window;function p(t){0!=t.lastIndexOf(f,0)||function(t,e){if(!Array.prototype.indexOf){for(var r=t.length;r--;)if(t[r]===e)return!0;return!1}return-1!=t.indexOf(e)}(l,t)||l.push(t)}function u(t){"string"==typeof t?r(o,p):t instanceof Array?r(s,p):t instanceof Function&&r(a,p),function(t,e){if(Object.getOwnPropertyNames&&Object.getPrototypeOf)for(var r=t;r;r=Object.getPrototypeOf(r))Object.getOwnPropertyNames(r).forEach(e);else for(var n in t)e(n)}(t,p)}if(e&&e.length){var d,g=e.pop();for(g.type&&0===g.type.indexOf("variable")?(i&&i.additionalContext&&(d=i.additionalContext[g.string]),i&&!1===i.useGlobalScope||(d=d||c[g.string])):"string"==g.type?d="":"atom"==g.type?d=1:"function"==g.type&&(null==c.jQuery||"$"!=g.string&&"jQuery"!=g.string||"function"!=typeof c.jQuery?null!=c._&&"_"==g.string&&"function"==typeof c._&&(d=c._()):d=c.jQuery());null!=d&&e.length;)d=d[e.pop().string];null!=d&&u(d)}else{for(var y=t.state.localVars;y;y=y.next)p(y.name);for(var h=t.state.context;h;h=h.prev)for(y=h.vars;y;y=y.next)p(y.name);for(y=t.state.globalVars;y;y=y.next)p(y.name);if(i&&null!=i.additionalContext)for(var v in i.additionalContext)p(v);i&&!1===i.useGlobalScope||u(c),r(n,p)}return l}}); -},{"../../lib/codemirror":726}],726:[function(require,module,exports){ +},{"../../lib/codemirror":737}],737:[function(require,module,exports){ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=f&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=E(this.onTimeout,this)};function B(e,t){for(var r=0;r=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function $(e){for(;Y.length<=e;)Y.push(_(Y)+" ");return Y[e]}function _(e){return e[e.length-1]}function q(e,t){for(var r=[],n=0;n"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:tr?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}var se=null;function ae(e,t,r){var n;se=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:se=i)}return null!=n?n:se}var ue=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var r=de(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ce(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Se(e){we(e),xe(e)}function Le(e){return e.target||e.srcElement}function ke(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Me,Ne=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function Oe(e){if(null==Te){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=Te?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ae(e){if(null!=Me)return Me;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(Me=n.right-r.right<3)}var De,We=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},He=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe="oncopy"in(De=O("div"))||(De.setAttribute("oncopy","return;"),"function"==typeof De.oncopy),Pe=null;var Ee={},Ie={};function Re(e){if("string"==typeof e&&Ie.hasOwnProperty(e))e=Ie[e];else if(e&&"string"==typeof e.name&&Ie.hasOwnProperty(e.name)){var t=Ie[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Re("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Re("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ze(e,t){t=Re(t);var r=Ee[t.name];if(!r)return ze(e,"text/plain");var n=r(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Be={};function Ge(e,t){I(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Ve(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ke(e,t,r){return!e.startState||e.startState(t,r)}var je=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};function Xe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t=e.first&&tr?et(r,Xe(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?et(e.line,t):r<0?et(e.line,0):e}(t,Xe(e,t.line).text.length)}function at(e,t){for(var r=[],n=0;n=this.string.length},je.prototype.sol=function(){return this.pos==this.lineStart},je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},je.prototype.next=function(){if(this.post},je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},je.prototype.skipToEnd=function(){this.pos=this.string.length},je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},je.prototype.backUp=function(e){this.pos-=e},je.prototype.column=function(){return this.lastColumnPos0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},je.prototype.current=function(){return this.string.slice(this.start,this.pos)},je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ct=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function ht(e,t,r,n){var i=[e.state.modeGen],o={};wt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,wt(e,t.text,s.mode,r,function(e,t){for(var r=a;ue&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;re.options.maxHighlightLength&&Ue(e.doc.mode,n.state),o=ht(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function dt(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new ct(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=Xe(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof ut?u.lookAhead:0)<=o.modeFrontier))return s;var c=R(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&Xe(n,o-1).stateAfter,s=l?ct.fromSaved(n,l,o):new ct(n,Ke(n.mode),o);return n.iter(o,t,function(r){pt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&nt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ct.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ct.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ct.fromSaved=function(e,t,r){return t instanceof ut?new ct(e,Ue(e.mode,t.state),r,t.lookAhead):new ct(e,Ue(e.mode,t),r)},ct.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var mt=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function yt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=Xe(l,(t=st(l,t)).line),u=dt(e,t.line,r),c=new je(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pose.options.maxHighlightLength?(s=!1,l&&pt(e,t,n,h.pos),h.pos=t.length,a=null):a=bt(vt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u=t:o.to>t);(n||(n=[])).push(new St(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from0&&s)for(var b=0;bt)&&(!r||Wt(r,o.marker)<0)&&(r=o.marker)}return r}function It(e,t,r,n,i){var o=Xe(e,t),l=Ct&&o.markedSpans;if(l)for(var s=0;s=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.to,r)>=0:tt(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?tt(u.from,n)<=0:tt(u.from,n)<0)))return!0}}}function Rt(e){for(var t;t=Ft(e);)e=t.find(-1,!0).line;return e}function zt(e,t){var r=Xe(e,t),n=Rt(r);return r==n?t:qe(n)}function Bt(e,t){if(t>e.lastLine())return t;var r,n=Xe(e,t);if(!Gt(e,n))return t;for(;r=Pt(n);)n=r.find(1,!0).line;return qe(n)+1}function Gt(e,t){var r=Ct&&t.markedSpans;if(r)for(var n=void 0,i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var Xt=function(e,t,r){this.text=e,Ot(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,Nt(e)}Xt.prototype.lineNo=function(){return qe(this)},be(Xt);var $t={},_t={};function qt(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?_t:$t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=A("span",null,null,a?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;n.pos=0,n.addToken=Jt,Ae(e.display.measure)&&(l=ce(o,e.doc.direction))&&(n.addToken=er(n.addToken,l)),n.map=[],rr(o,n,ft(e,o,t!=e.display.externalMeasured&&qe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Oe(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var s=n.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;iu&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=s="",f=null,h=null,m=1/0;for(var y=[],b=void 0,w=0;wp||C.collapsed&&x.to==p&&x.from==p)){if(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&((f||(f={})).title=C.title),C.attributes)for(var S in C.attributes)(f||(f={}))[S]=C.attributes[S];C.collapsed&&(!h||Wt(h.marker,C)<0)&&(h=x)}else x.from>p&&m>x.from&&(m=x.from)}if(b)for(var L=0;L=d)break;for(var T=Math.min(d,m);;){if(v){var M=p+v.length;if(!h){var N=M>T?v.slice(0,T-p):v;t.addToken(t,N,l?l+a:a,c,p+N.length==m?u:"",s,f)}if(M>=T){v=v.slice(T-p),p=T;break}p=M,c=""}v=i.slice(o,o=r[g++]),l=qt(r[g++],t.cm.options)}}else for(var O=1;Or)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}}function Or(e,t,r,n){return Wr(e,Dr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t=r.lineN&&t2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Fr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u=0&&(r=e[i]).left==r.right;i--);return r}function Ir(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=ae(s,a,u),f=se,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Yr(e,t){var r=0;t=st(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=Xe(e.doc,t.line),i=Vt(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function $r(e,t,r,n,i){var o=et(e,t,r);return o.xRel=i,n&&(o.outside=n),o}function _r(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return $r(n.first,0,null,-1,-1);var i=Ze(n,r),o=n.first+n.size-1;if(i>o)return $r(n.first+n.size-1,Xe(n,o).text.length,null,1,1);t<0&&(t=0);for(var l=Xe(n,i);;){var s=Jr(e,l,i,t,r),a=Et(l,s.ch+(s.xRel>0||s.outside>0?1:0));if(!a)return s;var u=a.find(1);if(u.line==i)return u;l=Xe(n,i=u.line)}}function qr(e,t,r,n){n-=Ur(t);var i=t.text.length,o=le(function(t){return Wr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Wr(e,r,t).top>n},o,i)}}function Zr(e,t,r,n){return r||(r=Dr(e,t)),qr(e,t,r,Vr(e,t,Wr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(e,t,r,n,i){i-=Vt(t);var o=Dr(e,t),l=Ur(t),s=0,a=t.text.length,u=!0,c=ce(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=qr(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f=u||d.to<=a)){var p=1!=d.level,g=Wr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=gv)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.fromu&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Qr(Xr(e,et(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Xr(e,et(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Qr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Wr(e,o,t);return r.top+=l,r.bottom+=l,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left=w.bottom?1:0}return $r(r,v=oe(t.text,v,1),d,m,n-f)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t],"CodeMirror-line-like");N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l){var s=e.display.gutterSpecs[l].className;r[s]=o.offsetLeft+o.clientLeft+i,n[s]=o.clientWidth}return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(i){if(Gt(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l0&&(a=Xe(e.doc,u.line).text).length==u.ch){var c=R(a,a.length,e.options.tabSize)-a.length;u=et(u.line,Math.max(0,Math.round((o-Lr(e.display).left)/tn(e.display))-c))}return u}function an(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;nt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ct&&zt(e.doc,t)i.viewFrom?hn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)hn(e);else if(t<=i.viewFrom){var o=fn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):hn(e)}else if(r>=i.viewTo){var l=fn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):hn(e)}else{var s=fn(e,t,t,-1),a=fn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):hn(e)}var u=i.externalMeasured;u&&(r=i.lineN&&t=n.viewTo)){var o=n.view[an(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function hn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function fn(e,t,r,n){var i,o=an(e,t),l=e.display.view;if(!Ct||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;zt(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function dn(e){for(var t=e.display.view,r=0,n=0;n=e.display.viewTo||a.to().line0?l:e.defaultCharWidth())+"px"}if(n.other){var s=r.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));s.style.display="",s.style.left=n.other.left+"px",s.style.top=n.other.top+"px",s.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function mn(e,t){return e.top-t.top||e.left-t.left}function yn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Lr(e.display),s=l.left,a=Math.max(n.sizerWidth,Tr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function h(t,r,n){var o,l,h=Xe(i,t),f=h.text.length;function d(r,n){return jr(e,et(t,r),"div",h,n)}function p(t,r,n){var i=Zr(e,h,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=ce(h,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;ot||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom0?t.blinker=setInterval(function(){e.hasFocus()||Sn(e),t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function wn(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Cn(e))}function xn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Sn(e))},100)}function Cn(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),bn(e))}function Sn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Ln(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,a=0;a.005||g<-.005)&&(ie.display.sizerWidth){var m=Math.ceil(f/tn(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function kn(e){if(e.widgets)for(var t=0;t=l&&(o=Ze(t,Vt(Xe(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Mn(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.tops-n;if(t.topi+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.options.fixedGutter?0:r.gutters.offsetWidth,f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft-h,d=Tr(e)-r.gutters.offsetWidth,p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?l.scrollLeft=0:t.leftd+f-3&&(l.scrollLeft=t.right+(p?0:10)-d),l}function Nn(e,t){null!=t&&(Dn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function On(e){Dn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function An(e,t,r){null==t&&null==r||Dn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Dn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Wn(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function Wn(e,t,r,n){var i=Mn(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});An(e,i.scrollLeft,i.scrollTop)}function Hn(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||oi(e,{top:t}),Fn(e,t,!0),r&&oi(e),ei(e,100))}function Fn(e,t,r){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Pn(e,t,r,n){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,ai(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function En(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var In=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");n.tabIndex=i.tabIndex=-1,e(n),e(i),fe(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),fe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};In.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},In.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},In.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},In.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},In.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},In.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Rn=function(){};function zn(e,t){t||(t=En(e));var r=e.display.barWidth,n=e.display.barHeight;Bn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Ln(e),Bn(e,En(e)),r=e.display.barWidth,n=e.display.barHeight}function Bn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Rn.prototype.update=function(){return{bottom:0,right:0}},Rn.prototype.setScrollLeft=function(){},Rn.prototype.setScrollTop=function(){},Rn.prototype.clear=function(){};var Gn={native:In,null:Rn};function Un(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Gn[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Pn(e,t):Hn(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Vn=0;function Kn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Vn,markArrays:null},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function jn(e){var t=e.curOp;t&&function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ri(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Ln(t),e.barMeasure=En(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function $n(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==t.sticky?et(t.line,t.ch+1,"before"):t,t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,s=Xr(e,t),a=r&&r!=t?Xr(e,r):s,u=Mn(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(Hn(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Pn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,st(n,e.scrollToPos.from),st(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l=e.display.viewTo)){var r=+new Date+e.options.workTime,n=dt(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?Ue(t.mode,n.state):null,a=ht(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&fr)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&qn(e,function(){for(var t=0;t=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==dn(e))return!1;ui(e)&&(hn(e),t.dims=rn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Ct&&(o=zt(e.doc,o),l=Bt(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFromr&&(n.view=n.view.slice(0,an(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Vt(Xe(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=dn(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=W();if(!t||!D(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&D(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(Je(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=W()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&D(document.body,e.anchorNode)&&D(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ei(e,400)),r.updateLineNumbers=null,!0}function ii(e,t){for(var r=t.viewport,n=!0;;n=!1){if(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Tr(e))n&&(t.visible=Tn(e.display,e.doc,r));else if(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=Tn(e.display,e.doc,r),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ni(e,t))break;Ln(e);var i=En(e);pn(e),zn(e,i),si(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function oi(e,t){var r=new ri(e,t);if(ni(e,r)){Ln(e),ii(e,r);var n=En(e);pn(e),zn(e,n),si(e,n),r.finish()}}function li(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",sr(e,"gutterChanged",e)}function si(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function ai(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;lu.clientWidth,f=u.scrollHeight>u.clientHeight;if(i&&c||o&&f){if(o&&y&&a)e:for(var d=t.target,p=s.view;d!=u;d=d.parentNode)for(var g=0;g=0&&tt(e,n.to())<=0)return r}return-1};var wi=function(e,t){this.anchor=e,this.head=t};function xi(e,t,r){var n=e&&e.options.selectionsMayTouch,i=t[r];t.sort(function(e,t){return tt(e.from(),t.from())}),r=B(t,i);for(var o=1;o0:a>=0){var u=ot(s.from(),l.from()),c=it(s.to(),l.to()),h=s.empty()?l.from()==l.head:s.from()==s.head;o<=r&&--r,t.splice(--o,2,new wi(h?c:u,h?u:c))}}return new bi(t,r)}function Ci(e,t){return new bi([new wi(e,t||e)],0)}function Si(e){return e.text?et(e.from.line+e.text.length-1,_(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Li(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Si(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Si(t).ch-t.to.ch),et(r,n)}function ki(e,t){for(var r=[],n=0;n1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Di(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;ls-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Ei(e.done),_(e.done)):e.done.length&&!_(e.done).ranges?_(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),_(e.done)):void 0}(i,i.lastOp==n)))l=_(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,l.to)?l.to=Si(t):o.changes.push(Pi(e,t));else{var a=_(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Pi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||ge(e,"historyAdded")}function Ri(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,_(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Ei(i.undone)}function zi(e,t){var r=_(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Bi(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Gi(e){if(!e)return null;for(var t,r=0;r-1&&(_(s)[h]=u[h],delete u[h])}}}return n}function Ki(e,t,r,n){if(n){var i=e.anchor;if(r){var o=tt(t,i)<0;o!=tt(r,i)<0?(i=t,t=r):o!=tt(t,r)<0&&(t=r)}return new wi(i,t)}return new wi(r||t,t)}function ji(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),qi(e,new bi([Ki(e.sel.primary(),t,r,i)],0),n)}function Xi(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(ge(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var h=a.find(n<0?1:-1),f=void 0;if((n<0?c:u)&&(h=no(e,h,-n,h&&h.line==t.line?o:null)),h&&h.line==t.line&&(f=tt(h,r))&&(n<0?f<0:f>0))return to(e,h,t,n,i)}var d=a.find(n<0?-1:1);return(n<0?u:c)&&(d=no(e,d,n,d.line==t.line?o:null)),d?to(e,d,t,n,i):null}}return t}function ro(e,t,r,n,i){var o=n||1,l=to(e,t,r,o,i)||!i&&to(e,t,r,o,!0)||to(e,t,r,-o,i)||!i&&to(e,t,r,-o,!0);return l||(e.cantEdit=!0,et(e.first,0))}function no(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:r>0&&t.ch==(n||Xe(e,t.line)).text.length?t.line0)){var c=[a,1],h=tt(u.from,s.from),f=tt(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)so(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else so(e,t)}}function so(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var r=ki(e,t);Ii(e,t,r,e.cm?e.cm.curOp.id:NaN),co(e,t,r,Tt(e,t));var n=[];Di(e,function(e,r){r||-1!=B(n,e.history)||(go(e.history,t),n.push(e.history)),co(e,t,null,Tt(e,t))})}}function ao(e,t,r){var n=e.cm&&e.cm.state.suppressEdits;if(!n||r){for(var i,o=e.history,l=e.sel,s="undo"==t?o.done:o.undone,a="undo"==t?o.undone:o.done,u=0;u=0;--d){var p=f(d);if(p)return p.v}}}}function uo(e,t){if(0!=t&&(e.first+=t,e.sel=new bi(q(e.sel.ranges,function(e){return new wi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){un(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;ne.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Xe(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ye(e,t.from,t.to),r||(r=ki(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=qe(Rt(Xe(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&me(e);Ai(n,t,r,on(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Kt(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontierr;n--){var i=Xe(e,n).stateAfter;if(i&&(!(i instanceof ut)||n+i.lookAhead1||!(this.children[0]instanceof mo))){var s=[];this.collapse(s),this.children=[new mo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var l=i.lines.length%25+25,s=l;s10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(It(e,t.line,t,r,o)||t.line!=r.line&&It(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}o.addToHistory&&Ii(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(n){u&&o.collapsed&&!u.options.lineWrapping&&Rt(n)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&_e(n,0),function(e,t,r){var n=r&&window.WeakSet&&(r.markedSpans||(r.markedSpans=new WeakSet));n&&n.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],n&&n.add(e.markedSpans)),t.marker.attachLine(e)}(n,new St(o,a==t.line?t.ch:null,a==r.line?r.ch:null),e.cm&&e.cm.curOp),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Gt(e,t)&&_e(t,0)}),o.clearOnEnter&&fe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++xo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)un(u,t.line,r.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var c=t.line;c<=r.line;c++)cn(u,c,"text");o.atomic&&Ji(u.doc),sr(u,"markerAdded",u,o)}return o}Co.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kn(e),ye(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&un(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ji(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&jn(e),this.parent&&this.parent.clear()}},Co.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;a--)lo(this,n[a]);s?_i(this,s):this.cm&&On(this.cm)}),undo:Jn(function(){ao(this,"undo")}),redo:Jn(function(){ao(this,"redo")}),undoSelection:Jn(function(){ao(this,"undo",!0)}),redoSelection:Jn(function(){ao(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=st(this,e),t=st(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;ne)return t=e,!0;e-=o,++r}),st(this,et(r,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var h=e.dataTransfer.getData("Text");if(h){var f;if(t.state.draggingText&&!t.state.draggingText.copy&&(f=t.listSelections()),Zi(t.doc,Ci(r,r)),f)for(var d=0;d=0;t--)ho(e.doc,"",n[t].from,n[t].to,"+delete");On(e)})}function _o(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function qo(e,t,r){var n=_o(e,t.ch,r);return null==n?null:new et(t.line,n,r<0?"after":"before")}function Zo(e,t,r,n,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ce(r,t.doc.direction);if(o){var l,s=i<0?_(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Dr(t,r);l=i<0?r.text.length-1:0;var c=Wr(t,u,l).top;l=le(function(e){return Wr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=_o(r,l,1))}else l=i<0?s.to:s.from;return new et(n,l,a)}}return new et(n,i<0?r.text.length:0,i<0?"before":"after")}Bo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Bo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Bo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Bo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Bo.default=y?Bo.macDefault:Bo.pcDefault;var Qo={selectAll:io,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return $o(e,function(t){if(t.empty()){var r=Xe(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=Xe(e.doc,i.line-1).text;l&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),et(i.line-1,l.length-1),i,"+transpose"))}r.push(new wi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return qn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n-1&&(tt((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=Zn(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:xn(e)),pe(i.wrapper.ownerDocument,"mouseup",u),pe(i.wrapper.ownerDocument,"mousemove",c),pe(i.scroller,"dragstart",h),pe(i.scroller,"drop",u),o||(we(t),n.addNew||ji(e.doc,r,null,null,n.extend),a&&!f||l&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,fe(i.wrapper.ownerDocument,"mouseup",u),fe(i.wrapper.ownerDocument,"mousemove",c),fe(i.scroller,"dragstart",h),fe(i.scroller,"drop",u),e.state.delayingBlurEvent=!0,setTimeout(function(){return i.input.focus()},20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,n,t,o):function(e,t,r,n){l&&xn(e);var i=e.display,o=e.doc;we(t);var s,a,u=o.sel,c=u.ranges;n.addNew&&!n.extend?(a=o.sel.contains(r),s=a>-1?c[a]:new wi(r,r)):(s=o.sel.primary(),a=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(s=new wi(r,r)),r=sn(e,t,!0,!0),a=-1;else{var h=pl(e,r,n.unit);s=n.extend?Ki(s,h.anchor,h.head,n.extend):h}n.addNew?-1==a?(a=c.length,qi(o,xi(e,c.concat([s]),a),{scroll:!1,origin:"*mouse"})):c.length>1&&c[a].empty()&&"char"==n.unit&&!n.extend?(qi(o,xi(e,c.slice(0,a).concat(c.slice(a+1)),0),{scroll:!1,origin:"*mouse"}),u=o.sel):Yi(o,a,s,K):(a=0,qi(o,new bi([s],0),K),u=o.sel);var f=r;function d(t){if(0!=tt(f,t))if(f=t,"rectangle"==n.unit){for(var i=[],l=e.options.tabSize,c=R(Xe(o,r.line).text,r.ch,l),h=R(Xe(o,t.line).text,t.ch,l),d=Math.min(c,h),p=Math.max(c,h),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=Xe(o,g).text,y=X(m,d,l);d==p?i.push(new wi(et(g,y),et(g,y))):m.length>y&&i.push(new wi(et(g,y),et(g,X(m,p,l))))}i.length||i.push(new wi(r,r)),qi(o,xi(e,u.ranges.slice(0,a).concat(i),a),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=s,x=pl(e,t,n.unit),C=w.anchor;tt(x.anchor,C)>0?(b=x.head,C=ot(w.from(),x.anchor)):(b=x.anchor,C=it(w.to(),x.head));var S=u.ranges.slice(0);S[a]=function(e,t){var r=t.anchor,n=t.head,i=Xe(e.doc,r.line);if(0==tt(r,n)&&r.sticky==n.sticky)return t;var o=ce(i);if(!o)return t;var l=ae(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=ae(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new wi(new et(r.line,p,g),n)}(e,new wi(st(o,C),b)),qi(o,xi(e,S,a),K)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){e.state.selectingText=!1,g=1/0,t&&(we(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",m),pe(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var m=Zn(e,function(t){0!==t.buttons&&ke(t)?function t(r){var l=++g;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=tt(s,f)){e.curOp.focus=W(),d(s);var a=Tn(i,o);(s.line>=a.to||s.linep.bottom?20:0;u&&setTimeout(Zn(e,function(){g==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):v(t)}),y=Zn(e,v);e.state.selectingText=y,fe(i.wrapper.ownerDocument,"mousemove",m),fe(i.wrapper.ownerDocument,"mouseup",y)}(e,n,t,o)}(t,n,o,e):Le(e)==r.scroller&&we(e):2==i?(n&&ji(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?t.display.input.onContextMenu(e):xn(t)))}}function pl(e,t,r){if("char"==r)return new wi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new wi(et(t.line,0),st(e.doc,et(t.line+1,0)));var n=r(e,t);return new wi(n.from,n.to)}function gl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&we(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,r))return Ce(t);o-=s.top-l.viewOffset;for(var a=0;a=i)return ge(e,r,e,Ze(e.doc,o),e.display.gutterSpecs[a].className,t),Ce(t)}}function vl(e,t){return gl(e,t,"gutterClick",!0)}function ml(e,t){xr(e.display,t)||function(e,t){if(!ye(e,"gutterContextMenu"))return!1;return gl(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function yl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zr(e)}fl.prototype.compare=function(e,t,r){return this.time+400>e&&0==tt(t,this.pos)&&r==this.button};var bl={toString:function(){return"CodeMirror.Init"}},wl={},xl={};function Cl(e,t,r){if(!t!=!(r&&r!=bl)){var n=e.display.dragFunctions,i=t?fe:pe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Sl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),jt(e)),ln(e),un(e),zr(e),setTimeout(function(){return zn(e)},100)}function Ll(e,t){var r=this;if(!(this instanceof Ll))return new Ll(e,t);this.options=t=t?I(t):{},I(wl,t,!1);var n=t.value;"string"==typeof n?n=new No(n,t.mode,null,t.lineSeparator,t.direction):t.mode&&(n.modeOption=t.mode),this.doc=n;var i=new Ll.inputStyles[t.inputStyle](this),o=this.display=new di(e,n,i,t);for(var u in o.wrapper.CodeMirror=this,yl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Un(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;fe(t.scroller,"mousedown",Zn(e,dl)),fe(t.scroller,"dblclick",l&&s<11?Zn(e,function(t){if(!ve(e,t)){var r=sn(e,t);if(r&&!vl(e,t)&&!xr(e.display,t)){we(t);var n=e.findWordAt(r);ji(e.doc,n.anchor,n.head)}}}):function(t){return ve(e,t)||we(t)});fe(t.scroller,"contextmenu",function(t){return ml(e,t)}),fe(t.input.getField(),"contextmenu",function(r){t.scroller.contains(r.target)||ml(e,r)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}fe(t.scroller,"touchstart",function(i){if(!ve(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!vl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),fe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),fe(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new wi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new wi(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),we(r)}i()}),fe(t.scroller,"touchcancel",i),fe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(Hn(e,t.scroller.scrollTop),Pn(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))}),fe(t.scroller,"mousewheel",function(t){return yi(e,t)}),fe(t.scroller,"DOMMouseScroll",function(t){return yi(e,t)}),fe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ve(e,t)||Se(t)},over:function(t){ve(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();vn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),Se(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Oo<100))Se(t);else if(!ve(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:Zn(e,Ao),leave:function(t){ve(e,t)||Do(e)}};var a=t.input.getField();fe(a,"keyup",function(t){return al.call(e,t)}),fe(a,"keydown",Zn(e,sl)),fe(a,"keypress",Zn(e,ul)),fe(a,"focus",function(t){return Cn(e,t)}),fe(a,"blur",function(t){return Sn(e,t)})}(this),Fo(),Kn(this),this.curOp.forceUpdate=!0,Wi(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout(function(){r.hasFocus()&&!r.state.focused&&Cn(r)},20):Sn(this),xl)xl.hasOwnProperty(u)&&xl[u](this,t[u],bl);ui(this),t.finishInit&&t.finishInit(this);for(var c=0;c150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?R(Xe(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(fl,a=We(t),u=null;if(s&&n.ranges.length>1)if(Ml&&Ml.text.join("\n")==t){if(n.ranges.length%Ml.text.length==0){u=[];for(var c=0;c=0;f--){var d=n.ranges[f],p=d.from(),g=d.to();d.empty()&&(r&&r>0?p=et(p.line,p.ch-r):e.state.overwrite&&!s?g=et(g.line,Math.min(Xe(o,g.line).text.length,g.ch+_(a).length)):s&&Ml&&Ml.lineWise&&Ml.text.join("\n")==a.join("\n")&&(p=g=et(p.line,0)));var v={from:p,to:g,text:u?u[f%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming>l?"cut":"+input")};lo(e.doc,v),sr(e,"inputRead",e,v)}t&&!s&&Dl(e,t),On(e),e.curOp.updateInput<2&&(e.curOp.updateInput=h),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Al(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||qn(t,function(){return Ol(t,r,0,null,"paste")}),!0}function Dl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s-1){l=Tl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Xe(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=Tl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],r=[],n=0;n0?0:-1));if(isNaN(c))l=null;else{var h=r>0?c>=55296&&c<56320:c>=56320&&c<57343;l=new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+r*(h?2:1))),-r)}}else l=i?function(e,t,r,n){var i=ce(t,e.doc.direction);if(!i)return qo(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=ae(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from=l.from&&f>=c.begin)){var d=h?"before":"after";return new et(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new et(r.line,a(e,1),"before"):new et(r.line,e,"after")};e>=0&&e0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):qo(s,t,r);if(null==l){if(o||(u=t.line+a)=e.first+e.size||(t=new et(u,t.ch,t.sticky),!(s=Xe(e,u))))return!1;t=Zo(i,e.cm,s,t.line,a)}else t=l;return!0}if("char"==n||"codepoint"==n)u();else if("column"==n)u(!0);else if("word"==n||"group"==n)for(var c=null,h="group"==n,f=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||u(!d);d=!1){var p=s.text.charAt(t.ch)||"\n",g=te(p,f)?"w":h&&"\n"==p?"n":!h||/\s/.test(p)?null:"p";if(!h||d||g||(g="s"),c&&c!=g){r<0&&(r=1,u(),t.sticky="after");break}if(g&&(c=g),r>0&&!u(!d))break}var v=ro(e,t,o,l,!0);return rt(o,v)&&(v.hitSide=!0),v}function El(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*en(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=_r(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var Il=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Rl(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=Xe(e.doc,t.line),i=Nr(r,n,t.line),o=ce(n,e.doc.direction),l="left";o&&(l=ae(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function zl(e,t){return t&&(e.bad=!0),e}function Bl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return zl(e.clipPos(et(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Rl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.linen.firstLine()&&(l=et(l.line-1,Xe(n.doc,l.line-1).length)),s.ch==Xe(n.doc,s.line).text.length&&s.linei.viewTo-1)return!1;l.line==i.viewFrom||0==(e=an(n,l.line))?(t=qe(i.view[0].line),r=i.view[0].node):(t=qe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=an(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=qe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator(),a=!1;function u(){l&&(o+=s,a&&(o+=s),l=a=!1)}function c(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(r)return void c(r);var o,f=t.getAttribute("cm-marker");if(f){var d=e.findMarks(et(n,0),et(i+1,0),(v=+f,function(e){return e.id==v}));return void(d.length&&(o=d[0].find(0))&&c(Ye(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&u();for(var g=0;g1&&f.length>1;)if(_(h)==_(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);dl.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=et(t,d),C=et(a,f.length?_(f).length-p:0);return h.length>1||h[0]||tt(x,C)?(ho(n.doc,h,x,C,"+input"),!0):void 0},Il.prototype.ensurePolled=function(){this.forceCompositionEnd()},Il.prototype.reset=function(){this.forceCompositionEnd()},Il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Il.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Il.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||qn(this.cm,function(){return un(e.cm)})},Il.prototype.setUneditable=function(e){e.contentEditable="false"},Il.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Zn(this.cm,Ol)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Il.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Il.prototype.onContextMenu=function(){},Il.prototype.resetPosition=function(){},Il.prototype.needsContentAttribute=!0;var Ul=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Ul.prototype.init=function(e){var t=this,r=this,n=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(n,e)){if(n.somethingSelected())Nl({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Nl({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",i.value=t.text.join("\n"),P(i))}"cut"==e.type&&(n.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),fe(i,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),fe(i,"paste",function(e){ve(n,e)||Al(e,n)||(n.state.pasteIncoming=+new Date,r.fastPoll())}),fe(i,"cut",o),fe(i,"copy",o),fe(e.scroller,"paste",function(t){if(!xr(e,t)&&!ve(n,t)){if(!i.dispatchEvent)return n.state.pasteIncoming=+new Date,void r.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),fe(e.lineSpace,"selectstart",function(t){xr(e,t)||we(t)}),fe(i,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),fe(i,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Ul.prototype.createField=function(e){this.wrapper=Fl(),this.textarea=this.wrapper.firstChild},Ul.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ul.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=gn(e);if(e.options.moveInputWithCursor){var i=Xr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Ul.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ul.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Ul.prototype.getField=function(){return this.textarea},Ul.prototype.supportsTouch=function(){return!1},Ul.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||W()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ul.prototype.blur=function(){this.textarea.blur()},Ul.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ul.prototype.receivedFocus=function(){this.slowPoll()},Ul.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ul.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Ul.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||He(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ul.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ul.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ul.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=sn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&Zn(r,qi)(r.doc,Ci(o),V);var c,f=i.style.cssText,d=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(c=window.scrollY),n.input.focus(),a&&window.scrollTo(null,c),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){Se(e);var g=function(){pe(window,"mouseup",g),setTimeout(m,20)};fe(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,i.style.cssText=f,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart)){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Zn(r,io)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Ul.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ul.prototype.setUneditable=function(){},Ul.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=bl&&i(e,t,r)}:i)}e.defineOption=r,e.Init=bl,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,Mi(e)},!0),r("indentUnit",2,Mi,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Ni(e),zr(e),un(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(et(n,o))}n++});for(var i=r.length-1;i>=0;i--)ho(e.doc,t,r[i],et(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=bl&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),r("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){yl(e),fi(e)},!0),r("keyMap","default",function(e,t,r){var n=Yo(t),i=r!=bl&&Yo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Sl,!0),r("gutters",[],function(e,t){e.display.gutterSpecs=ci(t,e.options.lineNumbers),fi(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return zn(e)},!0),r("scrollbarStyle","native",function(e){Un(e),zn(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ci(e.options.gutters,t),fi(e)},!0),r("firstLineNumber",1,fi,!0),r("lineNumberFormatter",function(e){return e},fi,!0),r("showCursorWhenSelecting",!1,pn,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("selectionsMayTouch",!1),r("readOnly",!1,function(e,t){"nocursor"==t&&(Sn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("screenReaderLabel",null,function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,Cl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,pn,!0),r("singleCursorHeightPerLine",!0,pn,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ni,!0),r("addModeClass",!1,Ni,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Ni,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),r("phrases",null)}(Ll),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&Zn(this,t[e])(this,r,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;rr&&(Tl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&On(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a0&&Yi(this.doc,n,new wi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,r=ft(this,Xe(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]o&&(e=o,i=!0),n=Xe(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Vt(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Xr(this,st(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Mn(o,l)).scrollTop&&Hn(o,s.scrollTop),null!=s.scrollLeft&&Pn(o,s.scrollLeft))},triggerOnKeyDown:Qn(sl),triggerOnKeyPress:Qn(ul),triggerOnKeyUp:al,triggerOnMouseDown:Qn(dl),execCommand:function(e){if(Qo.hasOwnProperty(e))return Qo[e].call(null,this)},triggerElectric:Qn(function(e){Dl(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),l=0;l0&&l(t.charAt(r-1));)--r;for(;n.5||this.options.lineWrapping)&&ln(this),ge(this,"refresh",this)}),swapDoc:Qn(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Wi(this,e),zr(this),this.display.input.reset(),An(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Ll);var Vl="iter insert remove copy getEditor constructor".split(" ");for(var Kl in No.prototype)No.prototype.hasOwnProperty(Kl)&&B(Vl,Kl)<0&&(Ll.prototype[Kl]=function(e){return function(){return e.apply(this.doc,arguments)}}(No.prototype[Kl]));return be(No),Ll.inputStyles={textarea:Ul,contenteditable:Il},Ll.defineMode=function(e){Ll.defaults.mode||"null"==e||(Ll.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ee[e]=t}.apply(this,arguments)},Ll.defineMIME=function(e,t){Ie[e]=t},Ll.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ll.defineMIME("text/plain","null"),Ll.defineExtension=function(e,t){Ll.prototype[e]=t},Ll.defineDocExtension=function(e,t){No.prototype[e]=t},Ll.fromTextArea=function(e,t){if((t=t?I(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=W();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(fe(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(r){r.save=n,r.getTextArea=function(){return e},r.toTextArea=function(){r.toTextArea=isNaN,n(),e.parentNode.removeChild(r.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",n),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=Ll(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=mi,e.Doc=No,e.splitLines=We,e.countColumn=R,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=ge,e.Line=Xt,e.changeEnd=Si,e.scrollbarModel=Gn,e.Pos=et,e.cmpPos=tt,e.modes=Ee,e.mimeModes=Ie,e.resolveMode=Re,e.getMode=ze,e.modeExtensions=Be,e.extendMode=Ge,e.copyState=Ue,e.startState=Ke,e.innerMode=Ve,e.commands=Qo,e.keyMap=Bo,e.keyName=Xo,e.isModifierKey=Ko,e.lookupKey=Vo,e.normalizeKeyMap=Uo,e.StringStream=je,e.SharedTextMarker=Lo,e.TextMarker=Co,e.LineWidget=bo,e.e_preventDefault=we,e.e_stopPropagation=xe,e.e_stop=Se,e.addClass=H,e.contains=D,e.rmClass=T,e.keyNames=Eo}(Ll),Ll.version="5.65.2",Ll}); -},{}],727:[function(require,module,exports){ +},{}],738:[function(require,module,exports){ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("javascript",function(t,r){var n,a,i=t.indentUnit,o=r.statementIndent,c=r.jsonld,s=r.json||c,u=!1!==r.trackScope,f=r.typescript,l=r.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("keyword d"),i=e("operator"),o={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:e("new"),delete:n,void:n,throw:n,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:o,false:o,null:o,undefined:o,NaN:o,Infinity:o,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n}}(),p=/[+\-*&%=<>!?|~^@]/,m=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e,t,r){return n=e,a=r,t}function k(e,t){var r,n=e.next();if('"'==n||"'"==n)return t.tokenize=(r=n,function(e,t){var n,a=!1;if(c&&"@"==e.peek()&&e.match(m))return t.tokenize=k,v("jsonld-keyword","meta");for(;null!=(n=e.next())&&(n!=r||a);)a=!a&&"\\"==n;return a||(t.tokenize=k),v("string","string")}),t.tokenize(e,t);if("."==n&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==n&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return v(n);if("="==n&&e.eat(">"))return v("=>","operator");if("0"==n&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(n))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==n)return e.eat("*")?(t.tokenize=y,y(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):Ze(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==n)return t.tokenize=w,w(e,t);if("#"==n&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==n&&e.eatWhile(l))return v("variable","property");if("<"==n&&e.match("!--")||"-"==n&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(p.test(n))return">"==n&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=n&&"="!=n||e.eat("="):/[<>*+\-|&?]/.test(n)&&(e.eat(n),">"==n&&e.eat(n))),"?"==n&&e.eat(".")?v("."):v("operator","operator",e.current());if(l.test(n)){e.eatWhile(l);var a=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(a)){var i=d[a];return v(i.type,i.style,a)}if("async"==a&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",a)}return v("variable","variable",a)}}function y(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=k;break}n="*"==r}return v("comment","comment")}function w(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=k;break}n=!n&&"\\"==r}return v("quasi","string-2",e.current())}var b="([{}])";function x(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if(f){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),s=b.indexOf(c);if(s>=0&&s<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(s>=3&&s<6)++a;else if(l.test(c))i=!0;else if(/["'\/`]/.test(c))for(;;--o){if(0==o)return;if(e.string.charAt(o-1)==c&&"\\"!=e.string.charAt(o-2)){o--;break}}else if(i&&!a){++o;break}}i&&!a&&(t.fatArrowAt=o)}}var h={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function g(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function j(e,t){if(!u)return!1;for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(r=n.vars;r;r=r.next)if(r.name==t)return!0}function M(e,t,r,n,a){var i=e.cc;for(A.state=e,A.stream=a,A.marked=null,A.cc=i,A.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():s?F:W)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return A.marked?A.marked:"variable"==r&&j(e,n)?"variable-2":t}}}var A={state:null,column:null,marked:null,cc:null};function V(){for(var e=arguments.length-1;e>=0;e--)A.cc.push(arguments[e])}function E(){return V.apply(null,arguments),!0}function z(e,t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}function I(e){var t=A.state;if(A.marked="def",u){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var n=function e(t,r){if(r){if(r.block){var n=e(t,r.prev);return n?n==r.prev?r:new $(n,r.vars,!0):null}return z(t,r.vars)?r:new $(r.prev,new q(t,r.vars),!1)}return null}(e,t.context);if(null!=n)return void(t.context=n)}else if(!z(e,t.localVars))return void(t.localVars=new q(e,t.localVars));r.globalVars&&!z(e,t.globalVars)&&(t.globalVars=new q(e,t.globalVars))}}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function $(e,t,r){this.prev=e,this.vars=t,this.block=r}function q(e,t){this.name=e,this.next=t}var C=new q("this",new q("arguments",null));function S(){A.state.context=new $(A.state.context,A.state.localVars,!1),A.state.localVars=C}function _(){A.state.context=new $(A.state.context,A.state.localVars,!0),A.state.localVars=null}function O(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function P(e,t){var r=function(){var r=A.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new g(n,A.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function N(){var e=A.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function U(e){return function t(r){return r==e?E():";"==e||"}"==r||")"==r||"]"==r?V():E(t)}}function W(e,t){return"var"==e?E(P("vardef",t),Me,U(";"),N):"keyword a"==e?E(P("form"),D,W,N):"keyword b"==e?E(P("form"),W,N):"keyword d"==e?A.stream.match(/^\s*$/,!1)?E():E(P("stat"),J,U(";"),N):"debugger"==e?E(U(";")):"{"==e?E(P("}"),_,se,N,O):";"==e?E():"if"==e?("else"==A.state.lexical.info&&A.state.cc[A.state.cc.length-1]==N&&A.state.cc.pop()(),E(P("form"),D,W,N,Te)):"function"==e?E(Se):"for"==e?E(P("form"),_,$e,W,O,N):"class"==e||f&&"interface"==t?(A.marked="keyword",E(P("form","class"==e?e:t),Ue,N)):"variable"==e?f&&"declare"==t?(A.marked="keyword",E(W)):f&&("module"==t||"enum"==t||"type"==t)&&A.stream.match(/^\s*\w/,!1)?(A.marked="keyword","enum"==t?E(Xe):"type"==t?E(Oe,U("operator"),pe,U(";")):E(P("form"),Ae,U("{"),P("}"),se,N,N)):f&&"namespace"==t?(A.marked="keyword",E(P("form"),F,W,N)):f&&"abstract"==t?(A.marked="keyword",E(W)):E(P("stat"),te):"switch"==e?E(P("form"),D,U("{"),P("}","switch"),_,se,N,N,O):"case"==e?E(F,U(":")):"default"==e?E(U(":")):"catch"==e?E(P("form"),S,B,W,N,O):"export"==e?E(P("stat"),He,N):"import"==e?E(P("stat"),Ge,N):"async"==e?E(W):"@"==t?E(F,W):V(P("stat"),F,U(";"),N)}function B(e){if("("==e)return E(Pe,U(")"))}function F(e,t){return G(e,t,!1)}function H(e,t){return G(e,t,!0)}function D(e){return"("!=e?V():E(P(")"),J,U(")"),N)}function G(e,t,r){if(A.state.fatArrowAt==A.stream.start){var n=r?Y:X;if("("==e)return E(S,P(")"),oe(Pe,")"),N,U("=>"),n,O);if("variable"==e)return V(S,Ae,U("=>"),n,O)}var a=r?L:K;return h.hasOwnProperty(e)?E(a):"function"==e?E(Se,a):"class"==e||f&&"interface"==t?(A.marked="keyword",E(P("form"),Ne,N)):"keyword c"==e||"async"==e?E(r?H:F):"("==e?E(P(")"),J,U(")"),N,a):"operator"==e||"spread"==e?E(r?H:F):"["==e?E(P("]"),Re,N,a):"{"==e?ce(ne,"}",null,a):"quasi"==e?V(Q,a):"new"==e?E(function(e){return function(t){return"."==t?E(e?ee:Z):"variable"==t&&f?E(he,e?L:K):V(e?H:F)}}(r)):E()}function J(e){return e.match(/[;\}\)\],]/)?V():V(F)}function K(e,t){return","==e?E(J):L(e,t,!1)}function L(e,t,r){var n=0==r?K:L,a=0==r?F:H;return"=>"==e?E(S,r?Y:X,O):"operator"==e?/\+\+|--/.test(t)||f&&"!"==t?E(n):f&&"<"==t&&A.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(P(">"),oe(pe,">"),N,n):"?"==t?E(F,U(":"),a):E(a):"quasi"==e?V(Q,n):";"!=e?"("==e?ce(H,")","call",n):"."==e?E(re,n):"["==e?E(P("]"),J,U("]"),N,n):f&&"as"==t?(A.marked="keyword",E(pe,n)):"regexp"==e?(A.state.lastType=A.marked="operator",A.stream.backUp(A.stream.pos-A.stream.start-1),E(a)):void 0:void 0}function Q(e,t){return"quasi"!=e?V():"${"!=t.slice(t.length-2)?E(Q):E(J,R)}function R(e){if("}"==e)return A.marked="string-2",A.state.tokenize=w,E(Q)}function X(e){return x(A.stream,A.state),V("{"==e?W:F)}function Y(e){return x(A.stream,A.state),V("{"==e?W:H)}function Z(e,t){if("target"==t)return A.marked="keyword",E(K)}function ee(e,t){if("target"==t)return A.marked="keyword",E(L)}function te(e){return":"==e?E(N,W):V(K,U(";"),N)}function re(e){if("variable"==e)return A.marked="property",E()}function ne(e,t){return"async"==e?(A.marked="property",E(ne)):"variable"==e||"keyword"==A.style?(A.marked="property","get"==t||"set"==t?E(ae):(f&&A.state.fatArrowAt==A.stream.start&&(r=A.stream.match(/^\s*:\s*/,!1))&&(A.state.fatArrowAt=A.stream.pos+r[0].length),E(ie))):"number"==e||"string"==e?(A.marked=c?"property":A.style+" property",E(ie)):"jsonld-keyword"==e?E(ie):f&&T(t)?(A.marked="keyword",E(ne)):"["==e?E(F,ue,U("]"),ie):"spread"==e?E(H,ie):"*"==t?(A.marked="keyword",E(ne)):":"==e?V(ie):void 0;var r}function ae(e){return"variable"!=e?V(ie):(A.marked="property",E(Se))}function ie(e){return":"==e?E(H):"("==e?V(Se):void 0}function oe(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=A.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),E(function(r,n){return r==t||n==t?V():V(e)},n)}return a==t||i==t?E():r&&r.indexOf(";")>-1?V(e):E(U(t))}return function(r,a){return r==t||a==t?E():V(e,n)}}function ce(e,t,r){for(var n=3;n"),pe):"quasi"==e?V(ye,xe):void 0}function me(e){if("=>"==e)return E(pe)}function ve(e){return e.match(/[\}\)\]]/)?E():","==e||";"==e?E(ve):V(ke,ve)}function ke(e,t){return"variable"==e||"keyword"==A.style?(A.marked="property",E(ke)):"?"==t||"number"==e||"string"==e?E(ke):":"==e?E(pe):"["==e?E(U("variable"),fe,U("]"),ke):"("==e?V(_e,ke):e.match(/[;\}\)\],]/)?void 0:E()}function ye(e,t){return"quasi"!=e?V():"${"!=t.slice(t.length-2)?E(ye):E(pe,we)}function we(e){if("}"==e)return A.marked="string-2",A.state.tokenize=w,E(ye)}function be(e,t){return"variable"==e&&A.stream.match(/^\s*[?:]/,!1)||"?"==t?E(be):":"==e?E(pe):"spread"==e?E(be):V(pe)}function xe(e,t){return"<"==t?E(P(">"),oe(pe,">"),N,xe):"|"==t||"."==e||"&"==t?E(pe):"["==e?E(pe,U("]"),xe):"extends"==t||"implements"==t?(A.marked="keyword",E(pe)):"?"==t?E(pe,U(":"),pe):void 0}function he(e,t){if("<"==t)return E(P(">"),oe(pe,">"),N,xe)}function ge(){return V(pe,je)}function je(e,t){if("="==t)return E(pe)}function Me(e,t){return"enum"==t?(A.marked="keyword",E(Xe)):V(Ae,ue,ze,Ie)}function Ae(e,t){return f&&T(t)?(A.marked="keyword",E(Ae)):"variable"==e?(I(t),E()):"spread"==e?E(Ae):"["==e?ce(Ee,"]"):"{"==e?ce(Ve,"}"):void 0}function Ve(e,t){return"variable"!=e||A.stream.match(/^\s*:/,!1)?("variable"==e&&(A.marked="property"),"spread"==e?E(Ae):"}"==e?V():"["==e?E(F,U("]"),U(":"),Ve):E(U(":"),Ae,ze)):(I(t),E(ze))}function Ee(){return V(Ae,ze)}function ze(e,t){if("="==t)return E(H)}function Ie(e){if(","==e)return E(Me)}function Te(e,t){if("keyword b"==e&&"else"==t)return E(P("form","else"),W,N)}function $e(e,t){return"await"==t?E($e):"("==e?E(P(")"),qe,N):void 0}function qe(e){return"var"==e?E(Me,Ce):"variable"==e?E(Ce):V(Ce)}function Ce(e,t){return")"==e?E():";"==e?E(Ce):"in"==t||"of"==t?(A.marked="keyword",E(F,Ce)):V(F,Ce)}function Se(e,t){return"*"==t?(A.marked="keyword",E(Se)):"variable"==e?(I(t),E(Se)):"("==e?E(S,P(")"),oe(Pe,")"),N,le,W,O):f&&"<"==t?E(P(">"),oe(ge,">"),N,Se):void 0}function _e(e,t){return"*"==t?(A.marked="keyword",E(_e)):"variable"==e?(I(t),E(_e)):"("==e?E(S,P(")"),oe(Pe,")"),N,le,O):f&&"<"==t?E(P(">"),oe(ge,">"),N,_e):void 0}function Oe(e,t){return"keyword"==e||"variable"==e?(A.marked="type",E(Oe)):"<"==t?E(P(">"),oe(ge,">"),N):void 0}function Pe(e,t){return"@"==t&&E(F,Pe),"spread"==e?E(Pe):f&&T(t)?(A.marked="keyword",E(Pe)):f&&"this"==e?E(ue,ze):V(Ae,ue,ze)}function Ne(e,t){return"variable"==e?Ue(e,t):We(e,t)}function Ue(e,t){if("variable"==e)return I(t),E(We)}function We(e,t){return"<"==t?E(P(">"),oe(ge,">"),N,We):"extends"==t||"implements"==t||f&&","==e?("implements"==t&&(A.marked="keyword"),E(f?pe:F,We)):"{"==e?E(P("}"),Be,N):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||f&&T(t))&&A.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(A.marked="keyword",E(Be)):"variable"==e||"keyword"==A.style?(A.marked="property",E(Fe,Be)):"number"==e||"string"==e?E(Fe,Be):"["==e?E(F,ue,U("]"),Fe,Be):"*"==t?(A.marked="keyword",E(Be)):f&&"("==e?V(_e,Be):";"==e||","==e?E(Be):"}"==e?E():"@"==t?E(F,Be):void 0}function Fe(e,t){if("!"==t)return E(Fe);if("?"==t)return E(Fe);if(":"==e)return E(pe,ze);if("="==t)return E(H);var r=A.state.lexical.prev;return V(r&&"interface"==r.info?_e:Se)}function He(e,t){return"*"==t?(A.marked="keyword",E(Qe,U(";"))):"default"==t?(A.marked="keyword",E(F,U(";"))):"{"==e?E(oe(De,"}"),Qe,U(";")):V(W)}function De(e,t){return"as"==t?(A.marked="keyword",E(U("variable"))):"variable"==e?V(H,De):void 0}function Ge(e){return"string"==e?E():"("==e?V(F):"."==e?V(K):V(Je,Ke,Qe)}function Je(e,t){return"{"==e?ce(Je,"}"):("variable"==e&&I(t),"*"==t&&(A.marked="keyword"),E(Le))}function Ke(e){if(","==e)return E(Je,Ke)}function Le(e,t){if("as"==t)return A.marked="keyword",E(Je)}function Qe(e,t){if("from"==t)return A.marked="keyword",E(F)}function Re(e){return"]"==e?E():V(oe(H,"]"))}function Xe(){return V(P("form"),Ae,U("{"),P("}"),oe(Ye,"}"),N,N)}function Ye(){return V(Ae,ze)}function Ze(e,t,r){return t.tokenize==k&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}return S.lex=_.lex=!0,O.lex=!0,N.lex=!0,{startState:function(e){var t={tokenize:k,lastType:"sof",cc:[],lexical:new g((e||0)-i,0,"block",!1),localVars:r.localVars,context:r.localVars&&new $(null,null,!1),indented:e||0};return r.globalVars&&"object"==typeof r.globalVars&&(t.globalVars=r.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),x(e,t)),t.tokenize!=y&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==n?r:(t.lastType="operator"!=n||"++"!=a&&"--"!=a?n:"incdec",M(t,r,n,a,e))},indent:function(t,n){if(t.tokenize==y||t.tokenize==w)return e.Pass;if(t.tokenize!=k)return 0;var a,c=n&&n.charAt(0),s=t.lexical;if(!/^\s*else\b/.test(n))for(var u=t.cc.length-1;u>=0;--u){var f=t.cc[u];if(f==N)s=s.prev;else if(f!=Te&&f!=O)break}for(;("stat"==s.type||"form"==s.type)&&("}"==c||(a=t.cc[t.cc.length-1])&&(a==K||a==L)&&!/^[,\.=+\-*:?[\(]/.test(n));)s=s.prev;o&&")"==s.type&&"stat"==s.prev.type&&(s=s.prev);var l=s.type,d=c==l;return"vardef"==l?s.indented+("operator"==t.lastType||","==t.lastType?s.info.length+1:0):"form"==l&&"{"==c?s.indented:"form"==l?s.indented+i:"stat"==l?s.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||p.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,n)?o||i:0):"switch"!=s.info||d||0==r.doubleIndentSwitch?s.align?s.column+(d?0:1):s.indented+(d?0:i):s.indented+(/^(?:case|default)\b/.test(n)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:s?null:"/*",blockCommentEnd:s?null:"*/",blockCommentContinue:s?null:" * ",lineComment:s?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:s?"json":"javascript",jsonldMode:c,jsonMode:s,expressionAllowed:Ze,skipExpression:function(t){M(t,"atom","atom","true",new e.StringStream("",2,null))}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}); -},{"../../lib/codemirror":726}],728:[function(require,module,exports){ +},{"../../lib/codemirror":737}],739:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_createClass=function(){function t(t,n){for(var e=0;e3?s-3:0),l=3;l3?u-3:0),s=3;s1?n-1:0),i=1;i1?n-1:0),i=1;i1?i-1:0),o=1;o1?i-1:0),o=1;o1?e-1:0),r=1;r1?e-1:0),r=1;r1?n-1:0),i=1;i1?i-1:0),o=1;o1?i-1:0),o=1;o=t.status}function n(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),i=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(a,i,r){var c=o.URL||o.webkitURL,l=document.createElement("a");i=i||a.name||"download",l.download=i,l.rel="noopener","string"==typeof a?(l.href=a,l.origin===location.origin?n(l):t(l.href)?e(a,i,r):n(l,l.target="_blank")):(l.href=c.createObjectURL(a),setTimeout(function(){c.revokeObjectURL(l.href)},4e4),setTimeout(function(){n(l)},0))}:"msSaveOrOpenBlob"in navigator?function(o,a,i){if(a=a||o.name||"download","string"!=typeof o)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(o,i),a);else if(t(o))e(o,a,i);else{var r=document.createElement("a");r.href=o,r.target="_blank",setTimeout(function(){n(r)})}}:function(t,n,i,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,i);var c="application/octet-stream"===t.type,l=/constructor/i.test(o.HTMLElement)||o.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||c&&l||a)&&"undefined"!=typeof FileReader){var f=new FileReader;f.onloadend=function(){var e=f.result;e=s?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},f.readAsDataURL(t)}else{var u=o.URL||o.webkitURL,d=u.createObjectURL(t);r?r.location=d:location.href=d,r=null,setTimeout(function(){u.revokeObjectURL(d)},4e4)}});o.saveAs=i.saveAs=i,"undefined"!=typeof module&&(module.exports=i)}); }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],730:[function(require,module,exports){ +},{}],741:[function(require,module,exports){ (function (process){(function (){ function isElectron(){return"undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||(!("undefined"==typeof process||"object"!=typeof process.versions||!process.versions.electron)||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)}module.exports=isElectron; }).call(this)}).call(this,require('_process')) -},{"_process":715}],731:[function(require,module,exports){ +},{"_process":724}],742:[function(require,module,exports){ "use strict";var range,DOCUMENT_FRAGMENT_NODE=11;function morphAttrs(e,t){var n,r,o,a,i=t.attributes;if(t.nodeType!==DOCUMENT_FRAGMENT_NODE&&e.nodeType!==DOCUMENT_FRAGMENT_NODE){for(var d=i.length-1;d>=0;d--)r=(n=i[d]).name,o=n.namespaceURI,a=n.value,o?(r=n.localName||r,e.getAttributeNS(o,r)!==a&&("xmlns"===n.prefix&&(r=n.name),e.setAttributeNS(o,r,a))):e.getAttribute(r)!==a&&e.setAttribute(r,a);for(var l=e.attributes,c=l.length-1;c>=0;c--)r=(n=l[c]).name,(o=n.namespaceURI)?(r=n.localName||r,t.hasAttributeNS(o,r)||e.removeAttributeNS(o,r)):t.hasAttribute(r)||e.removeAttribute(r)}}var NS_XHTML="http://www.w3.org/1999/xhtml",doc="undefined"==typeof document?void 0:document,HAS_TEMPLATE_SUPPORT=!!doc&&"content"in doc.createElement("template"),HAS_RANGE_SUPPORT=!!doc&&doc.createRange&&"createContextualFragment"in doc.createRange();function createFragmentFromTemplate(e){var t=doc.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}function createFragmentFromRange(e){return range||(range=doc.createRange()).selectNode(doc.body),range.createContextualFragment(e).childNodes[0]}function createFragmentFromWrap(e){var t=doc.createElement("body");return t.innerHTML=e,t.childNodes[0]}function toElement(e){return e=e.trim(),HAS_TEMPLATE_SUPPORT?createFragmentFromTemplate(e):HAS_RANGE_SUPPORT?createFragmentFromRange(e):createFragmentFromWrap(e)}function compareNodeNames(e,t){var n,r,o=e.nodeName,a=t.nodeName;return o===a||(n=o.charCodeAt(0),r=a.charCodeAt(0),n<=90&&r>=97?o===a.toUpperCase():r<=90&&n>=97&&a===o.toUpperCase())}function createElementNS(e,t){return t&&t!==NS_XHTML?doc.createElementNS(t,e):doc.createElement(e)}function moveChildren(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function syncBooleanAttrProp(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,""):e.removeAttribute(n))}var specialElHandlers={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();"OPTGROUP"===r&&(r=(n=n.parentNode)&&n.nodeName.toUpperCase()),"SELECT"!==r||n.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),n.selectedIndex=-1)}syncBooleanAttrProp(e,t,"selected")},INPUT:function(e,t){syncBooleanAttrProp(e,t,"checked"),syncBooleanAttrProp(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var o=r.nodeValue;if(o==n||!n&&o==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var n,r,o=-1,a=0,i=e.firstChild;i;)if("OPTGROUP"===(r=i.nodeName&&i.nodeName.toUpperCase()))i=(n=i).firstChild;else{if("OPTION"===r){if(i.hasAttribute("selected")){o=a;break}a++}!(i=i.nextSibling)&&n&&(i=n.nextSibling,n=null)}e.selectedIndex=o}}},ELEMENT_NODE=1,DOCUMENT_FRAGMENT_NODE$1=11,TEXT_NODE=3,COMMENT_NODE=8;function noop(){}function defaultGetNodeKey(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}function morphdomFactory(e){return function(t,n,r){if(r||(r={}),"string"==typeof n)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var o=n;(n=doc.createElement("html")).innerHTML=o}else n=toElement(n);var a=r.getNodeKey||defaultGetNodeKey,i=r.onBeforeNodeAdded||noop,d=r.onNodeAdded||noop,l=r.onBeforeElUpdated||noop,c=r.onElUpdated||noop,u=r.onBeforeNodeDiscarded||noop,N=r.onNodeDiscarded||noop,m=r.onBeforeElChildrenUpdated||noop,f=!0===r.childrenOnly,E=Object.create(null),s=[];function p(e){s.push(e)}function T(e,t,n){!1!==u(e)&&(t&&t.removeChild(e),N(e),function e(t,n){if(t.nodeType===ELEMENT_NODE)for(var r=t.firstChild;r;){var o=void 0;n&&(o=a(r))?p(o):(N(r),r.firstChild&&e(r,n)),r=r.nextSibling}}(e,n))}function v(e){d(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=a(t);if(r){var o=E[r];o&&compareNodeNames(t,o)?(t.parentNode.replaceChild(o,t),A(o,t)):v(t)}else v(t);t=n}}function A(t,n,r){var o=a(n);if(o&&delete E[o],!r){if(!1===l(t,n))return;if(e(t,n),c(t),!1===m(t,n))return}"TEXTAREA"!==t.nodeName?function(e,t){var n,r,o,d,l,c=t.firstChild,u=e.firstChild;e:for(;c;){for(d=c.nextSibling,n=a(c);u;){if(o=u.nextSibling,c.isSameNode&&c.isSameNode(u)){c=d,u=o;continue e}r=a(u);var N=u.nodeType,m=void 0;if(N===c.nodeType&&(N===ELEMENT_NODE?(n?n!==r&&((l=E[n])?o===l?m=!1:(e.insertBefore(l,u),r?p(r):T(u,e,!0),u=l):m=!1):r&&(m=!1),(m=!1!==m&&compareNodeNames(u,c))&&A(u,c)):N!==TEXT_NODE&&N!=COMMENT_NODE||(m=!0,u.nodeValue!==c.nodeValue&&(u.nodeValue=c.nodeValue))),m){c=d,u=o;continue e}r?p(r):T(u,e,!0),u=o}if(n&&(l=E[n])&&compareNodeNames(l,c))e.appendChild(l),A(l,c);else{var f=i(c);!1!==f&&(f&&(c=f),c.actualize&&(c=c.actualize(e.ownerDocument||doc)),e.appendChild(c),v(c))}c=d,u=o}!function(e,t,n){for(;t;){var r=t.nextSibling;(n=a(t))?p(n):T(t,e,!0),t=r}}(e,u,r);var s=specialElHandlers[e.nodeName];s&&s(e,t)}(t,n):specialElHandlers.TEXTAREA(t,n)}!function e(t){if(t.nodeType===ELEMENT_NODE||t.nodeType===DOCUMENT_FRAGMENT_NODE$1)for(var n=t.firstChild;n;){var r=a(n);r&&(E[r]=n),e(n),n=n.nextSibling}}(t);var h=t,O=h.nodeType,C=n.nodeType;if(!f)if(O===ELEMENT_NODE)C===ELEMENT_NODE?compareNodeNames(t,n)||(N(t),h=moveChildren(t,createElementNS(n.nodeName,n.namespaceURI))):h=n;else if(O===TEXT_NODE||O===COMMENT_NODE){if(C===O)return h.nodeValue!==n.nodeValue&&(h.nodeValue=n.nodeValue),h;h=n}if(h===n)N(t);else{if(n.isSameNode&&n.isSameNode(h))return;if(A(h,n,f),s)for(var b=0,g=s.length;b=0&&(this.sinks=e.remove(s,this.sinks)),this.sinks.length},u.prototype.event=function(t,e){var s=this.sinks;if(1===s.length)return s[0].event(t,e);for(var n=0;n= 0");var e=n.length;return 0===r||0===e?n:r>=e?[]:function(r,n,e){for(var t=new Array(e),u=0;u= 0");var e=n.length;return 0===e||r>=e?n:1===e?[]:function(r,n,e){var t,u=new Array(e);for(t=0;t= 0");for(var t=e.length,u=new Array(t),o=0;oe&©(this,0,this,e,i&e-1)}; -},{}],740:[function(require,module,exports){ +},{}],751:[function(require,module,exports){ "use strict";function Stream(e){this.source=e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=Stream,Stream.prototype.run=function(e,t){return this.source.run(e,t)}; -},{}],741:[function(require,module,exports){ +},{}],752:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.scan=scan,exports.reduce=reduce;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_runSource=require("../runSource"),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose),_PropagateTask=require("../scheduler/PropagateTask"),_PropagateTask2=_interopRequireDefault(_PropagateTask);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function scan(e,t,r){return new _Stream2.default(new Scan(e,t,r.source))}function Scan(e,t,r){this.source=r,this.f=e,this.value=t}function ScanSink(e,t,r){this.f=e,this.value=t,this.sink=r}function reduce(e,t,r){return(0,_runSource.withDefaultScheduler)(new Reduce(e,t,r.source))}function Reduce(e,t,r){this.source=r,this.f=e,this.value=t}function ReduceSink(e,t,r){this.f=e,this.value=t,this.sink=r}Scan.prototype.run=function(e,t){var r=t.asap(_PropagateTask2.default.event(this.value,e)),i=this.source.run(new ScanSink(this.f,this.value,e),t);return dispose.all([r,i])},ScanSink.prototype.event=function(e,t){var r=this.f;this.value=r(this.value,t),this.sink.event(e,this.value)},ScanSink.prototype.error=_Pipe2.default.prototype.error,ScanSink.prototype.end=_Pipe2.default.prototype.end,Reduce.prototype.run=function(e,t){return this.source.run(new ReduceSink(this.f,this.value,e),t)},ReduceSink.prototype.event=function(e,t){var r=this.f;this.value=r(this.value,t),this.sink.event(e,this.value)},ReduceSink.prototype.error=_Pipe2.default.prototype.error,ReduceSink.prototype.end=function(e){this.sink.end(e,this.value)}; -},{"../Stream":740,"../disposable/dispose":768,"../runSource":779,"../scheduler/PropagateTask":781,"../sink/Pipe":788}],742:[function(require,module,exports){ +},{"../Stream":751,"../disposable/dispose":779,"../runSource":790,"../scheduler/PropagateTask":792,"../sink/Pipe":799}],753:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ap=ap;var _combine=require("./combine"),_prelude=require("@most/prelude");function ap(e,r){return(0,_combine.combine)(_prelude.apply,e,r)} -},{"./combine":744,"@most/prelude":804}],743:[function(require,module,exports){ +},{"./combine":755,"@most/prelude":815}],754:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cons=cons,exports.concat=concat;var _core=require("../source/core"),_continueWith=require("./continueWith");function cons(e,n){return concat((0,_core.of)(e),n)}function concat(e,n){return(0,_continueWith.continueWith)(function(){return n},e)} -},{"../source/core":792,"./continueWith":746}],744:[function(require,module,exports){ +},{"../source/core":803,"./continueWith":757}],755:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.combine=combine,exports.combineArray=combineArray;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_transform=require("./transform"),transform=_interopRequireWildcard(_transform),_core=require("../source/core"),core=_interopRequireWildcard(_core),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_IndexSink=require("../sink/IndexSink"),_IndexSink2=_interopRequireDefault(_IndexSink),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose),_prelude=require("@most/prelude"),base=_interopRequireWildcard(_prelude),_invoke=require("../invoke"),_invoke2=_interopRequireDefault(_invoke);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var i={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i.default=e,i}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var map=base.map,tail=base.tail;function combine(e){return combineArray(e,tail(arguments))}function combineArray(e,i){var r=i.length;return 0===r?core.empty():1===r?transform.map(e,i[0]):new _Stream2.default(combineSources(e,i))}function combineSources(e,i){return new Combine(e,map(getSource,i))}function getSource(e){return e.source}function Combine(e,i){this.f=e,this.sources=i}function CombineSink(e,i,r,t){this.sink=r,this.disposables=e,this.sinks=i,this.f=t;var n=i.length;this.awaiting=n,this.values=new Array(n),this.hasValue=new Array(n);for(var o=0;o0&&(this.hasValue[e]||(this.hasValue[e]=!0,this.awaiting-=1)),this.awaiting},CombineSink.prototype.end=function(e,i){dispose.tryDispose(e,this.disposables[i.index],this.sink),0==--this.activeCount&&this.sink.end(e,i.value)}; -},{"../Stream":740,"../disposable/dispose":768,"../invoke":774,"../sink/IndexSink":787,"../sink/Pipe":788,"../source/core":792,"./transform":764,"@most/prelude":804}],745:[function(require,module,exports){ +},{"../Stream":751,"../disposable/dispose":779,"../invoke":785,"../sink/IndexSink":798,"../sink/Pipe":799,"../source/core":803,"./transform":775,"@most/prelude":815}],756:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.concatMap=concatMap;var _mergeConcurrently=require("./mergeConcurrently");function concatMap(e,r){return(0,_mergeConcurrently.mergeMapConcurrently)(e,1,r)} -},{"./mergeConcurrently":754}],746:[function(require,module,exports){ +},{"./mergeConcurrently":765}],757:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.continueWith=continueWith;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose);function _interopRequireWildcard(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function continueWith(t,e){return new _Stream2.default(new ContinueWith(t,e.source))}function ContinueWith(t,e){this.f=t,this.source=e}function ContinueWithSink(t,e,i,n){this.f=t,this.sink=i,this.scheduler=n,this.active=!0,this.disposable=dispose.once(e.run(this,n))}ContinueWith.prototype.run=function(t,e){return new ContinueWithSink(this.f,this.source,t,e)},ContinueWithSink.prototype.error=_Pipe2.default.prototype.error,ContinueWithSink.prototype.event=function(t,e){this.active&&this.sink.event(t,e)},ContinueWithSink.prototype.end=function(t,e){this.active&&(dispose.tryDispose(t,this.disposable,this.sink),this._startNext(t,e,this.sink))},ContinueWithSink.prototype._startNext=function(t,e,i){try{this.disposable=this._continue(this.f,e,i)}catch(e){i.error(t,e)}},ContinueWithSink.prototype._continue=function(t,e,i){return t(e).source.run(i,this.scheduler)},ContinueWithSink.prototype.dispose=function(){return this.active=!1,this.disposable.dispose()}; -},{"../Stream":740,"../disposable/dispose":768,"../sink/Pipe":788}],747:[function(require,module,exports){ +},{"../Stream":751,"../disposable/dispose":779,"../sink/Pipe":799}],758:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.delay=delay;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose),_PropagateTask=require("../scheduler/PropagateTask"),_PropagateTask2=_interopRequireDefault(_PropagateTask);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function delay(e,t){return e<=0?t:new _Stream2.default(new Delay(e,t.source))}function Delay(e,t){this.dt=e,this.source=t}function DelaySink(e,t,r){this.dt=e,this.sink=t,this.scheduler=r}Delay.prototype.run=function(e,t){var r=new DelaySink(this.dt,e,t);return dispose.all([r,this.source.run(r,t)])},DelaySink.prototype.dispose=function(){var e=this;this.scheduler.cancelAll(function(t){return t.task.sink===e.sink})},DelaySink.prototype.event=function(e,t){this.scheduler.delay(this.dt,_PropagateTask2.default.event(t,this.sink))},DelaySink.prototype.end=function(e,t){this.scheduler.delay(this.dt,_PropagateTask2.default.end(t,this.sink))},DelaySink.prototype.error=_Pipe2.default.prototype.error; -},{"../Stream":740,"../disposable/dispose":768,"../scheduler/PropagateTask":781,"../sink/Pipe":788}],748:[function(require,module,exports){ +},{"../Stream":751,"../disposable/dispose":779,"../scheduler/PropagateTask":792,"../sink/Pipe":799}],759:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.flatMapError=void 0,exports.recoverWith=recoverWith,exports.throwError=throwError;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_SafeSink=require("../sink/SafeSink"),_SafeSink2=_interopRequireDefault(_SafeSink),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose),_tryEvent=require("../source/tryEvent"),tryEvent=_interopRequireWildcard(_tryEvent),_PropagateTask=require("../scheduler/PropagateTask"),_PropagateTask2=_interopRequireDefault(_PropagateTask);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function recoverWith(e,r){return new _Stream2.default(new RecoverWith(e,r.source))}var flatMapError=exports.flatMapError=recoverWith;function throwError(e){return new _Stream2.default(new ErrorSource(e))}function ErrorSource(e){this.value=e}function runError(e,r,t){t.error(e,r)}function RecoverWith(e,r){this.f=e,this.source=r}function RecoverWithSink(e,r,t,i){this.f=e,this.sink=new _SafeSink2.default(t),this.scheduler=i,this.disposable=r.run(this,i)}ErrorSource.prototype.run=function(e,r){return r.asap(new _PropagateTask2.default(runError,this.value,e))},RecoverWith.prototype.run=function(e,r){return new RecoverWithSink(this.f,this.source,e,r)},RecoverWithSink.prototype.event=function(e,r){tryEvent.tryEvent(e,r,this.sink)},RecoverWithSink.prototype.end=function(e,r){tryEvent.tryEnd(e,r,this.sink)},RecoverWithSink.prototype.error=function(e,r){var t=this.sink.disable();dispose.tryDispose(e,this.disposable,this.sink),this._startNext(e,r,t)},RecoverWithSink.prototype._startNext=function(e,r,t){try{this.disposable=this._continue(this.f,r,t)}catch(r){t.error(e,r)}},RecoverWithSink.prototype._continue=function(e,r,t){return e(r).source.run(t,this.scheduler)},RecoverWithSink.prototype.dispose=function(){return this.disposable.dispose()}; -},{"../Stream":740,"../disposable/dispose":768,"../scheduler/PropagateTask":781,"../sink/SafeSink":789,"../source/tryEvent":800}],749:[function(require,module,exports){ +},{"../Stream":751,"../disposable/dispose":779,"../scheduler/PropagateTask":792,"../sink/SafeSink":800,"../source/tryEvent":811}],760:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.filter=filter,exports.skipRepeats=skipRepeats,exports.skipRepeatsWith=skipRepeatsWith;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_Filter=require("../fusion/Filter"),_Filter2=_interopRequireDefault(_Filter);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function filter(e,t){return new _Stream2.default(_Filter2.default.create(e,t.source))}function skipRepeats(e){return skipRepeatsWith(same,e)}function skipRepeatsWith(e,t){return new _Stream2.default(new SkipRepeats(e,t.source))}function SkipRepeats(e,t){this.equals=e,this.source=t}function SkipRepeatsSink(e,t){this.equals=e,this.sink=t,this.value=void 0,this.init=!0}function same(e,t){return e===t}SkipRepeats.prototype.run=function(e,t){return this.source.run(new SkipRepeatsSink(this.equals,e),t)},SkipRepeatsSink.prototype.end=_Pipe2.default.prototype.end,SkipRepeatsSink.prototype.error=_Pipe2.default.prototype.error,SkipRepeatsSink.prototype.event=function(e,t){this.init?(this.init=!1,this.value=t,this.sink.event(e,t)):this.equals(this.value,t)||(this.value=t,this.sink.event(e,t))}; -},{"../Stream":740,"../fusion/Filter":770,"../sink/Pipe":788}],750:[function(require,module,exports){ +},{"../Stream":751,"../fusion/Filter":781,"../sink/Pipe":799}],761:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.flatMap=flatMap,exports.join=join;var _mergeConcurrently=require("./mergeConcurrently");function flatMap(e,r){return(0,_mergeConcurrently.mergeMapConcurrently)(e,1/0,r)}function join(e){return(0,_mergeConcurrently.mergeConcurrently)(1/0,e)} -},{"./mergeConcurrently":754}],751:[function(require,module,exports){ +},{"./mergeConcurrently":765}],762:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.throttle=throttle,exports.debounce=debounce;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_Map=require("../fusion/Map"),_Map2=_interopRequireDefault(_Map);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function throttle(e,t){return new _Stream2.default(throttleSource(e,t.source))}function throttleSource(e,t){return t instanceof _Map2.default?commuteMapThrottle(e,t):t instanceof Throttle?fuseThrottle(e,t):new Throttle(e,t)}function commuteMapThrottle(e,t){return _Map2.default.create(t.f,throttleSource(e,t.source))}function fuseThrottle(e,t){return new Throttle(Math.max(e,t.period),t.source)}function Throttle(e,t){this.period=e,this.source=t}function ThrottleSink(e,t){this.time=0,this.period=e,this.sink=t}function debounce(e,t){return new _Stream2.default(new Debounce(e,t.source))}function Debounce(e,t){this.dt=e,this.source=t}function DebounceSink(e,t,o,r){this.dt=e,this.sink=o,this.scheduler=r,this.value=void 0,this.timer=null,this.disposable=t.run(this,r)}function DebounceTask(e,t){this.debounce=e,this.value=t}Throttle.prototype.run=function(e,t){return this.source.run(new ThrottleSink(this.period,e),t)},ThrottleSink.prototype.event=function(e,t){e>=this.time&&(this.time=e+this.period,this.sink.event(e,t))},ThrottleSink.prototype.end=_Pipe2.default.prototype.end,ThrottleSink.prototype.error=_Pipe2.default.prototype.error,Debounce.prototype.run=function(e,t){return new DebounceSink(this.dt,this.source,e,t)},DebounceSink.prototype.event=function(e,t){this._clearTimer(),this.value=t,this.timer=this.scheduler.delay(this.dt,new DebounceTask(this,t))},DebounceSink.prototype._event=function(e,t){this._clearTimer(),this.sink.event(e,t)},DebounceSink.prototype.end=function(e,t){this._clearTimer()&&(this.sink.event(e,this.value),this.value=void 0),this.sink.end(e,t)},DebounceSink.prototype.error=function(e,t){this._clearTimer(),this.sink.error(e,t)},DebounceSink.prototype.dispose=function(){return this._clearTimer(),this.disposable.dispose()},DebounceSink.prototype._clearTimer=function(){return null!==this.timer&&(this.timer.dispose(),this.timer=null,!0)},DebounceTask.prototype.run=function(e){this.debounce._event(e,this.value)},DebounceTask.prototype.error=function(e,t){this.debounce.error(e,t)},DebounceTask.prototype.dispose=function(){}; -},{"../Stream":740,"../fusion/Map":772,"../sink/Pipe":788}],752:[function(require,module,exports){ +},{"../Stream":751,"../fusion/Map":783,"../sink/Pipe":799}],763:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.loop=loop;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe);function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function loop(e,t,o){return new _Stream2.default(new Loop(e,t,o.source))}function Loop(e,t,o){this.step=e,this.seed=t,this.source=o}function LoopSink(e,t,o){this.step=e,this.seed=t,this.sink=o}Loop.prototype.run=function(e,t){return this.source.run(new LoopSink(this.step,this.seed,e),t)},LoopSink.prototype.error=_Pipe2.default.prototype.error,LoopSink.prototype.event=function(e,t){var o=this.step(this.seed,t);this.seed=o.seed,this.sink.event(e,o.value)},LoopSink.prototype.end=function(e){this.sink.end(e,this.seed)}; -},{"../Stream":740,"../sink/Pipe":788}],753:[function(require,module,exports){ +},{"../Stream":751,"../sink/Pipe":799}],764:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.merge=merge,exports.mergeArray=mergeArray;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_Pipe=require("../sink/Pipe"),_Pipe2=_interopRequireDefault(_Pipe),_IndexSink=require("../sink/IndexSink"),_IndexSink2=_interopRequireDefault(_IndexSink),_core=require("../source/core"),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose),_prelude=require("@most/prelude"),base=_interopRequireWildcard(_prelude);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var copy=base.copy,reduce=base.reduce;function merge(){return mergeArray(copy(arguments))}function mergeArray(e){var r=e.length;return 0===r?(0,_core.empty)():1===r?e[0]:new _Stream2.default(mergeSources(e))}function mergeSources(e){return new Merge(reduce(appendSources,[],e))}function appendSources(e,r){var t=r.source;return t instanceof Merge?e.concat(t.sources):e.concat(t)}function Merge(e){this.sources=e}function MergeSink(e,r,t){this.sink=t,this.disposables=e,this.activeCount=r.length}Merge.prototype.run=function(e,r){for(var t,n=this.sources.length,i=new Array(n),o=new Array(n),u=new MergeSink(i,o,e),s=0;s0?this.skip-=1:0!==this.take&&(this.take-=1,this.sink.event(e,i),0===this.take&&(this.disposable.dispose(),this.sink.end(e,i)))},TakeWhile.prototype.run=function(e,i){var t=dispose.settable(),r=new TakeWhileSink(this.p,e,t);return t.setDisposable(this.source.run(r,i)),t},TakeWhileSink.prototype.end=_Pipe2.default.prototype.end,TakeWhileSink.prototype.error=_Pipe2.default.prototype.error,TakeWhileSink.prototype.event=function(e,i){if(this.active){var t=this.p;this.active=t(i),this.active?this.sink.event(e,i):(this.disposable.dispose(),this.sink.end(e,i))}},SkipWhile.prototype.run=function(e,i){return this.source.run(new SkipWhileSink(this.p,e),i)},SkipWhileSink.prototype.end=_Pipe2.default.prototype.end,SkipWhileSink.prototype.error=_Pipe2.default.prototype.error,SkipWhileSink.prototype.event=function(e,i){if(this.skipping){var t=this.p;if(this.skipping=t(i),this.skipping)return}this.sink.event(e,i)},SkipAfter.prototype.run=function(e,i){return this.source.run(new SkipAfterSink(this.p,e),i)},SkipAfterSink.prototype.event=function(e,i){if(!this.skipping){var t=this.p;this.skipping=t(i),this.sink.event(e,i),this.skipping&&this.sink.end(e,i)}},SkipAfterSink.prototype.end=_Pipe2.default.prototype.end,SkipAfterSink.prototype.error=_Pipe2.default.prototype.error; -},{"../Stream":740,"../disposable/dispose":768,"../fusion/Map":772,"../sink/Pipe":788,"../source/core":792}],759:[function(require,module,exports){ +},{"../Stream":751,"../disposable/dispose":779,"../fusion/Map":783,"../sink/Pipe":799,"../source/core":803}],770:[function(require,module,exports){ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.switch=void 0,exports.switchLatest=switchLatest;var _Stream=require("../Stream"),_Stream2=_interopRequireDefault(_Stream),_dispose=require("../disposable/dispose"),dispose=_interopRequireWildcard(_dispose);function _interopRequireWildcard(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function switchLatest(t){return new _Stream2.default(new Switch(t.source))}function Switch(t){this.source=t}function SwitchSink(t,e){this.sink=t,this.scheduler=e,this.current=null,this.ended=!1}function Segment(t,e,i,n){this.min=t,this.max=e,this.outer=i,this.sink=n,this.disposable=dispose.empty()}exports.switch=switchLatest,Switch.prototype.run=function(t,e){var i=new SwitchSink(t,e);return dispose.all([i,this.source.run(i,e)])},SwitchSink.prototype.event=function(t,e){this._disposeCurrent(t),this.current=new Segment(t,1/0,this,this.sink),this.current.disposable=e.source.run(this.current,this.scheduler)},SwitchSink.prototype.end=function(t,e){this.ended=!0,this._checkEnd(t,e)},SwitchSink.prototype.error=function(t,e){this.ended=!0,this.sink.error(t,e)},SwitchSink.prototype.dispose=function(){return this._disposeCurrent(this.scheduler.now())},SwitchSink.prototype._disposeCurrent=function(t){if(null!==this.current)return this.current._dispose(t)},SwitchSink.prototype._disposeInner=function(t,e){e._dispose(t),e===this.current&&(this.current=null)},SwitchSink.prototype._checkEnd=function(t,e){this.ended&&null===this.current&&this.sink.end(t,e)},SwitchSink.prototype._endInner=function(t,e,i){this._disposeInner(t,i),this._checkEnd(t,e)},SwitchSink.prototype._errorInner=function(t,e,i){this._disposeInner(t,i),this.sink.error(t,e)},Segment.prototype.event=function(t,e){t=this.min.value&&e=0&&n.active&&(n.time=n.time+n.period,insertByTime(n,i)))}return i}function insertByTime(e,t){var i=t.length;if(0!==i){var r=binarySearch(e.time,t);r>=i?t.push(newTimeslot(e.time,[e])):e.time===t[r].time?t[r].events.push(e):t.splice(r,0,newTimeslot(e.time,[e]))}else t.push(newTimeslot(e.time,[e]))}function removeAllFrom(e,t){t.events=base.removeAll(e,t.events)}function binarySearch(e,t){for(var i,r,s=0,n=t.length;s=0&&t=0)return this.tasks[t].events.splice(i,1),!0}return!1},Timeline.prototype.removeAll=function(e){for(var t=0,i=this.tasks.length;t1){for(var o=new Array(i),u=0;u=0&&(this.sinks=e.remove(s,this.sinks)),this.sinks.length},u.prototype.event=function(t,e){var s=this.sinks;if(1===s.length)return s[0].event(t,e);for(var n=0;n= 0");var e=n.length;return 0===r||0===e?n:r>=e?[]:function(r,n,e){for(var t=new Array(e),u=0;u= 0");var e=n.length;return 0===e||r>=e?n:1===e?[]:function(r,n,e){var t,u=new Array(e);for(t=0;t= 0");for(var t=e.length,u=new Array(t),o=0;o1&&(f.pop(),f[f.length-1][0][2][a]=T(p[0],p[1],p[2].length?p[2]:void 0))}else if(u===OPEN){var g=[l[1],{},[]];p[2].push(g),f.push([g,p[2].length-1])}else if(u===ATTR_KEY||u===VAR&&l[1]===ATTR_KEY){for(var L,V="";_1&&/^\s*$/.test(i[2][0])&&i[2].shift(),i[2].length>2||2===i[2].length&&/\S/.test(i[2][1])){if(e.createFragment)return e.createFragment(i[2]);throw new Error("multiple root elements must be wrapped in an enclosing tag")}return Array.isArray(i[2][0])&&"string"==typeof i[2][0][0]&&Array.isArray(i[2][0][2])&&(i[2][0]=T(i[2][0][0],i[2][0][1],i[2][0][2])),i[2][0];function U(T){var A=[];n===ATTR_VALUE_W&&(n=ATTR);for(var t=0;t"!==E||quot(n)||n===COMMENT?n===COMMENT&&/-$/.test(r)&&"-"===E?(e.comments&&A.push([ATTR_VALUE,r.substr(0,r.length-1)]),r="",n=TEXT):n===OPEN&&/^!--$/.test(r)?(e.comments&&A.push([OPEN,r],[ATTR_KEY,"comment"],[ATTR_EQ]),r=E,n=COMMENT):n===TEXT||n===COMMENT?r+=E:n===OPEN&&"/"===E&&r.length||(n===OPEN&&/\s/.test(E)?(r.length&&A.push([OPEN,r]),r="",n=ATTR):n===OPEN?r+=E:n===ATTR&&/[^\s"'=/]/.test(E)?(n=ATTR_KEY,r=E):n===ATTR&&/\s/.test(E)?(r.length&&A.push([ATTR_KEY,r]),A.push([ATTR_BREAK])):n===ATTR_KEY&&/\s/.test(E)?(A.push([ATTR_KEY,r]),r="",n=ATTR_KEY_W):n===ATTR_KEY&&"="===E?(A.push([ATTR_KEY,r],[ATTR_EQ]),r="",n=ATTR_VALUE_W):n===ATTR_KEY?r+=E:n!==ATTR_KEY_W&&n!==ATTR||"="!==E?n!==ATTR_KEY_W&&n!==ATTR||/\s/.test(E)?n===ATTR_VALUE_W&&'"'===E?n=ATTR_VALUE_DQ:n===ATTR_VALUE_W&&"'"===E?n=ATTR_VALUE_SQ:n===ATTR_VALUE_DQ&&'"'===E?(A.push([ATTR_VALUE,r],[ATTR_BREAK]),r="",n=ATTR):n===ATTR_VALUE_SQ&&"'"===E?(A.push([ATTR_VALUE,r],[ATTR_BREAK]),r="",n=ATTR):n!==ATTR_VALUE_W||/\s/.test(E)?n===ATTR_VALUE&&/\s/.test(E)?(A.push([ATTR_VALUE,r],[ATTR_BREAK]),r="",n=ATTR):n!==ATTR_VALUE&&n!==ATTR_VALUE_SQ&&n!==ATTR_VALUE_DQ||(r+=E):(n=ATTR_VALUE,t--):(A.push([ATTR_BREAK]),/[\w-]/.test(E)?(r+=E,n=ATTR_KEY):n=ATTR):(A.push([ATTR_EQ]),n=ATTR_VALUE_W)):(n===OPEN&&r.length?A.push([OPEN,r]):n===ATTR_KEY?A.push([ATTR_KEY,r]):n===ATTR_VALUE&&r.length&&A.push([ATTR_VALUE,r]),A.push([CLOSE]),r="",n=TEXT)}return n===TEXT&&r.length?(A.push([TEXT,r]),r=""):n===ATTR_VALUE&&r.length?(A.push([ATTR_VALUE,r]),r=""):n===ATTR_VALUE_DQ&&r.length?(A.push([ATTR_VALUE,r]),r=""):n===ATTR_VALUE_SQ&&r.length?(A.push([ATTR_VALUE,r]),r=""):n===ATTR_KEY&&(A.push([ATTR_KEY,r]),r=""),A}};function t(T){return"function"==typeof T?T:"string"==typeof T?T:T&&"object"==typeof T?T:null==T?T:A("",T)}};var closeRE=RegExp("^("+["area","base","basefont","bgsound","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr","!--","animate","animateTransform","circle","cursor","desc","ellipse","feBlend","feColorMatrix","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font-face-format","font-face-name","font-face-uri","glyph","glyphRef","hkern","image","line","missing-glyph","mpath","path","polygon","polyline","rect","set","stop","tref","use","view","vkern"].join("|")+")(?:[.#][a-zA-Z0-9-￿_:-]+)*$");function selfClosing(T){return closeRE.test(T)} -},{"hyperscript-attribute-to-property":813}],815:[function(require,module,exports){ +},{"hyperscript-attribute-to-property":824}],826:[function(require,module,exports){ var bundleFn=arguments[3],sources=arguments[4],cache=arguments[5],stringify=JSON.stringify;module.exports=function(r,e){for(var t,o=Object.keys(cache),n=0,a=o.length;n{const r=["jscad","js"],o=supportedFormatsForObjects(a).filter(a=>!r.includes(a)).map(a=>({name:a,displayName:formats[a].displayName}));return{exportFormat:head(o)?head(o).name:void 0,availableExportFormats:o}},exportFilePathFromFormatAndDesign=(a,r)=>{const o=r?formats[r].extension:"",t=`${a.name}.${o}`;return{exportFilePath:path.join(a.path,t)}};module.exports={availableExportFormatsFromSolids:availableExportFormatsFromSolids,exportFilePathFromFormatAndDesign:exportFilePathFromFormatAndDesign}; -},{"@jscad/array-utils":528,"@jscad/io/formats":69,"path":714}],818:[function(require,module,exports){ +},{"@jscad/array-utils":528,"@jscad/io/formats":69,"path":723}],829:[function(require,module,exports){ const html=require("nanohtml"),{evaluation:evaluation}=require("@jscad/core"),callbackToObservable=require("./most-utils/callbackToObservable"),packageMetadata=require("../package.json"),keyBindings=require("../data/keybindings.json");let instances=0;const makeJscad=async(e,s)=>{const{name:a,logging:r}=Object.assign({},{name:"jscad",logging:!1},s),i=html`
`;e.appendChild(i);const t=require("./sideEffects/localStorage")({name:a,logging:r}),o=require("./sideEffects/titleBar")({logging:r}),l=require("./sideEffects/dragDrop")({targetEl:i,logging:r}),n=require("./sideEffects/fileDialog")({targetEl:i,logging:r}),c=require("./sideEffects/dom")({targetEl:i},r),g=require("./sideEffects/state/index")({logging:r,packageMetadata:packageMetadata,keyBindings:keyBindings}),u=await require("./sideEffects/localFs")({logging:r}),d=require("./sideEffects/http")({logging:r}),k=await require("./sideEffects/dat")({logging:r}),f=require("./sideEffects/i18n")({translations:{en:require("../locales/en.json"),fr:require("../locales/fr.json"),de:require("../locales/de.json"),ja:require("../locales/ja.json"),hr:require("../locales/hr.json"),zh:require("../locales/zh.json")},logging:r}),m=require("./sideEffects/worker")(evaluation.rebuildGeometryWorker),q=callbackToObservable(),b=callbackToObservable(),p={paramChanges:q.stream,editor:b.stream,state:g.source(),store:t.source(),fs:u.source(),http:d.source(),https:d.source(),drops:l.source(),dom:c.source(),solidWorker:m.source(),i18n:f.source(),titleBar:o.source(),fileDialog:n.source(),dat:await k.source()},E={store:t.sink,fs:u.sink,http:d.sink,https:d.sink,i18n:f.sink,dom:c.sink,solidWorker:m.sink,state:g.sink,fileDialog:n.sink,dat:k.sink},j=require("./ui/flow/flowIn")(p),h={jscadEl:i,paramsCallbacktoStream:q,editorCallbackToStream:b};require("./ui/flow/flowOut")({sinks:E,sources:p,outputs$:j,extras:h}),instances+=1,setTimeout(()=>{document.getElementById("toggleAxes").click()},100),setTimeout(()=>{document.getElementById("toggleAxes").click()},200);const v=callbackToObservable();return e=>{v.callback(e)}};module.exports=makeJscad; -},{"../data/keybindings.json":636,"../locales/de.json":680,"../locales/en.json":681,"../locales/fr.json":682,"../locales/hr.json":683,"../locales/ja.json":684,"../locales/zh.json":685,"../package.json":816,"./most-utils/callbackToObservable":825,"./sideEffects/dat":830,"./sideEffects/dom":831,"./sideEffects/dragDrop":832,"./sideEffects/fileDialog":833,"./sideEffects/http":834,"./sideEffects/i18n":835,"./sideEffects/localFs":836,"./sideEffects/localStorage":838,"./sideEffects/state/index":839,"./sideEffects/titleBar":840,"./sideEffects/worker":841,"./ui/flow/flowIn":846,"./ui/flow/flowOut":847,"@jscad/core":19,"nanohtml":809}],819:[function(require,module,exports){ +},{"../data/keybindings.json":636,"../locales/de.json":680,"../locales/en.json":681,"../locales/fr.json":682,"../locales/hr.json":683,"../locales/ja.json":684,"../locales/zh.json":685,"../package.json":827,"./most-utils/callbackToObservable":836,"./sideEffects/dat":841,"./sideEffects/dom":842,"./sideEffects/dragDrop":843,"./sideEffects/fileDialog":844,"./sideEffects/http":845,"./sideEffects/i18n":846,"./sideEffects/localFs":847,"./sideEffects/localStorage":849,"./sideEffects/state/index":850,"./sideEffects/titleBar":851,"./sideEffects/worker":852,"./ui/flow/flowIn":857,"./ui/flow/flowOut":858,"@jscad/core":19,"nanohtml":820}],830:[function(require,module,exports){ const{merge:merge}=require("most");let isPinching=!1;"undefined"!=typeof window&&(window.addEventListener("pinchStarted",e=>{isPinching=!0}),window.addEventListener("pinchEnded",e=>{isPinching=!1}));const mouseDrags=(e,t,s,o)=>{const{pixelRatio:n}=o;return e.flatMap(e=>{const o=e.pageX*n,a=e.pageY*n;let r=o,i=a;return s.map(e=>{const t=e.pageX*n,s=e.pageY*n,u={left:t-o,top:s-a,x:r-t,y:s-i};return r=t,i=s,{originalEvents:[e],delta:u,normalized:{x:t,y:s},type:"mouse"}}).takeUntil(t)})},touchDrags=(e,t,s,o)=>{const{pixelRatio:n}=o;return e.filter(e=>1===e.touches.length||3===e.touches.length).flatMap(e=>{const o=e.touches[0].pageX*n,a=e.touches[0].pageY*n;let r=o,i=a;return s.takeWhile(e=>!1===isPinching).map(e=>{const t=e.touches[0].pageX*n,s=e.touches[0].pageY*n,u={left:t-o,top:s-a,x:r-t,y:s-i};return r=t,i=s,{originalEvents:[e],delta:u,normalized:{x:t,y:s},type:"touch"}}).takeUntil(t)})},drags=({mouseDowns$:e,mouseUps$:t,mouseMoves$:s,touchStarts$:o,touchEnds$:n,longTaps$:a,touchMoves$:r},i)=>{return merge(mouseDrags(e,t,s,i),touchDrags(o,n,r,i))};module.exports={mouseDrags:mouseDrags,touchDrags:touchDrags,drags:drags}; -},{"most":773}],820:[function(require,module,exports){ +},{"most":784}],831:[function(require,module,exports){ const{fromEvent:fromEvent,merge:merge}=require("most"),{normalizeWheel:normalizeWheel,preventDefault:preventDefault}=require("./utils"),{presses:presses}=require("./presses"),{taps:taps}=require("./taps"),{drags:drags}=require("./drags"),{zooms:zooms}=require("./zooms"),baseInteractionsFromEvents=(e,s)=>{s=Object.assign({},{passiveEventsHandlers:!0,preventScroll:!0,preventMenu:!0},s);const{passiveEventsHandlers:t,preventScroll:r,preventMenu:o}=s,a=fromEvent("mousedown",e,{passive:t,capture:!1}),n=fromEvent("mouseup",e,{passive:t,capture:!1}),p=fromEvent("mousemove",e,{passive:t,capture:!1}),i=fromEvent("contextmenu",e,{passive:!s.preventMenu,capture:!1}),u=fromEvent("touchstart",e,{passive:t,capture:!1}),v=fromEvent("touchmove",e,{passive:t,capture:!1}),m=fromEvent("touchend",e,{passive:t,capture:!1}),l=merge(a,u),c=merge(n,m),f=merge(p,v.filter(e=>1===e.touches.length));return r&&(e=>{fromEvent("mousewheel",e,{passive:!1,capture:!1}).forEach(preventDefault),fromEvent("DOMMouseScroll",e,{passive:!1,capture:!1}).forEach(preventDefault),fromEvent("wheel",e,{passive:!1,capture:!1}).forEach(preventDefault),fromEvent("touchmove",e,{passive:!1,capture:!1}).forEach(preventDefault)})(e),o&&i.forEach(preventDefault),{mouseDowns$:a,mouseUps$:n,mouseMoves$:p,rightClicks$:i,wheel$:merge(fromEvent("wheel",e,{passive:t,capture:!1}),fromEvent("DOMMouseScroll",e,{passive:t,capture:!1}),fromEvent("mousewheel",e,{passive:t,capture:!1})).map(normalizeWheel),touchStarts$:u,touchMoves$:v,touchEnds$:m,pointerDowns$:l,pointerUps$:c,pointerMoves$:f}},pointerGestures=(e,s)=>{const t="addEventListener"in e?baseInteractionsFromEvents(e,s):e,r={multiTapDelay:250,longPressDelay:250,maxStaticDeltaSqr:100,zoomMultiplier:200,pinchThreshold:4e3,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio?window.devicePixelRatio:1},o=Object.assign({},r,s),a=presses(t,o),n=a.filter(e=>e.timeDelta>o.longPressDelay).filter(e=>e.moveDelta.sqrd{l=l.filter(e=>1===e.touches.length);const r=merge(e,u),i=merge(s,a);return r.timestamp().flatMap(e=>merge(just(e),i.take(1).timestamp())).loop((e,s)=>{let t;if(1===e.length){const u=s.time-e[0].time,a="touches"in s.value?s.value.changedTouches[0].pageX:s.value.pageX,l="touches"in s.value?s.value.changedTouches[0].pageY:s.value.pageY,o="touches"in e[0].value?e[0].value.touches[0].pageX:e[0].value.pageX,r="touches"in e[0].value?e[0].value.touches[0].pageY:e[0].value.pageY;let i=[a-o,l-r];const v={x:o-a,y:l-r,sqrd:i=i[0]*i[0]+i[1]*i[1]};t={value:s.value,originalEvent:s.value,timeDelta:u,moveDelta:v,x:a,y:l},e=[]}else e.push(s);return{seed:e,value:t}},[]).filter(exists).filter(e=>void 0!==e.value).multicast()},presses=(e,s)=>{return basePresses(e)};module.exports={presses:presses}; -},{"./utils":823,"most":773}],822:[function(require,module,exports){ +},{"./utils":834,"most":784}],833:[function(require,module,exports){ const{exists:exists}=require("./utils"),taps=(t,e)=>{const{longPressDelay:a,maxStaticDeltaSqr:s,multiTapDelay:l}=e;return t.filter(t=>t.timeDelta<=a).filter(t=>t.moveDelta.sqrd({type:"data",data:t})).merge(t.debounce(l).map(t=>({type:"reset"}))).loop((t,{type:e,data:a})=>{let s;return"data"===e?t.push(a):(s=t,t=[]),{seed:t,value:s}},[]).filter(exists).map(t=>({list:t,nb:t.length})).multicast()};module.exports={taps:taps}; -},{"./utils":823}],823:[function(require,module,exports){ +},{"./utils":834}],834:[function(require,module,exports){ const{empty:empty,continueWith:continueWith}=require("most"),repeat=(e,t)=>0===e?empty():1===e?t:continueWith(()=>repeat(e-1,t),t),preventDefault=e=>(e.preventDefault(),e),isMoving=(e,t)=>!0,normalizeWheel=e=>{let t={x:0,y:0};return e.wheelDelta?t=e.wheelDelta:e.detail?t=-e.detail:e.deltaY&&(t=-e.deltaY),t=t>=0?1:-1},exists=e=>null!=e;module.exports={repeat:repeat,preventDefault:preventDefault,isMoving:isMoving,normalizeWheel:normalizeWheel,exists:exists}; -},{"most":773}],824:[function(require,module,exports){ +},{"most":784}],835:[function(require,module,exports){ const{merge:merge}=require("most"),pinchZooms=({touchStarts$:e,touchMoves$:t,touchEnds$:o},s)=>{const{pixelRatio:n,pinchThreshold:u}=s;return e.filter(e=>2===e.touches.length).flatMap(e=>{const s=e.touches[0].pageX*n,c=e.touches[0].pageY*n,h=e.touches[1].pageX*n,a=e.touches[1].pageY*n,p=(s-h)*(s-h)+(c-a)*(c-a);return t.tap(e=>e.preventDefault()).filter(e=>2===e.touches.length).tap(e=>{if("undefined"!=typeof CustomEvent){const e=new CustomEvent("pinchStarted",{detail:!0});window.dispatchEvent(e)}}).map(e=>{const t=e.touches[0].pageX*n,o=e.touches[0].pageY*n,s=e.touches[1].pageX*n,u=e.touches[1].pageY*n;return(t-s)*(t-s)+(o-u)*(o-u)}).loop((e,t)=>e?Math.abs(t-e)void 0!==e).map(e=>3e-6*e).takeUntil(o.tap(e=>{if("undefined"!=typeof CustomEvent){const e=new CustomEvent("pinchEnded",{detail:!0});window.dispatchEvent(e)}}))})},zooms=({touchStarts$:e,touchMoves$:t,touchEnds$:o,wheel$:s},n)=>{return merge(pinchZooms({touchStarts$:e,touchMoves$:t,touchEnds$:o},n),s).map(e=>e*n.zoomMultiplier)};module.exports={pinchZooms:pinchZooms,zooms:zooms}; -},{"most":773}],825:[function(require,module,exports){ +},{"most":784}],836:[function(require,module,exports){ const{create:create}=require("@most/create"),callBackToStream=()=>{let e=function(){};const t=t=>{e(t)};return{stream:create((t,a,c)=>{e=t}),callback:t}};module.exports=callBackToStream; -},{"@most/create":686}],826:[function(require,module,exports){ +},{"@most/create":686}],837:[function(require,module,exports){ const most=require("most"),delayFromObservable=(e,s)=>{const t=(e,s)=>most.just(s).delay(e),o=s.map(e);return e=>most.combine(t,o,e).switchLatest()};module.exports=delayFromObservable; -},{"most":773}],827:[function(require,module,exports){ +},{"most":784}],838:[function(require,module,exports){ const withLatestFrom=require("./withLatestFrom"),holdUntil=t=>{return e=>e.skipUntil(t).merge(t.take(1).thru(withLatestFrom(t=>t,e)))};module.exports=holdUntil; -},{"./withLatestFrom":829}],828:[function(require,module,exports){ +},{"./withLatestFrom":840}],839:[function(require,module,exports){ module.exports={callbackToObservable:require("./callbackToObservable"),delayFromObservable:require("./delayFromObservable"),holdUntil:require("./holdUntil"),withLatestFrom:require("./withLatestFrom")}; -},{"./callbackToObservable":825,"./delayFromObservable":826,"./holdUntil":827,"./withLatestFrom":829}],829:[function(require,module,exports){ +},{"./callbackToObservable":836,"./delayFromObservable":837,"./holdUntil":838,"./withLatestFrom":840}],840:[function(require,module,exports){ const most=require("most"),withLatestFrom=(t,o)=>s=>most.sample(t,s,o,s);module.exports=withLatestFrom; -},{"most":773}],830:[function(require,module,exports){ +},{"most":784}],841:[function(require,module,exports){ const{getFileExtensionFromString:getFileExtensionFromString}=require("@jscad/core").utils,callbackToObservable=require("../../most-utils/callbackToObservable"),makeLogger=require("../../utils/logger"),makeDatSideEffect=async e=>{const a=callbackToObservable(),{logging:t}=Object.assign({},{logging:!1},e),n=makeLogger({enabled:t});let r=!0;const i=window.DatArchive;i||(n.error("Dat archives not supported in this environment!"),r=!1);return{source:()=>a.stream.multicast(),sink:e=>{let t,l,o,s=[];e.forEach(e=>{const{type:c,id:d,urls:m,path:u}=e;if(!r)return void a.callback({type:c,id:d,error:new Error("Dat archives not supported in this environment!")});const h={unhandled:()=>{a.callback({type:c,id:d,error:new Error(`Dat: no handler found for command ${c}`)})},read:()=>{m.map(async e=>{e=e.replace(" ","+"),l=e,t=new i(e,{});const n=await t.readdir(u,{recursive:!0,stat:!0}),r=await Promise.all(n.map(async e=>{const a=`${u}/${e.name}`;if(e.stat.isFile()&&e.name.includes("js"))return{content:await t.readFile(a),name:e.name,fullPath:e.name,isFile:!0}})),m=await t.getInfo();o=m.title||"unnamed";const h=r.filter(e=>void 0!==e).map(e=>({name:e.name,ext:getFileExtensionFromString(e.name),source:e.content,fullPath:`/${o}/`+e.fullPath}));s=[{children:h,fullPath:`/${o}`,name:o}],a.callback({type:c,id:d,url:e,data:s}),await t.history()})},write:()=>{n.warning("writing to dat archives is not implemented yet")},watch:()=>{t.watch().addEventListener("changed",async({path:e})=>{const n=await t.readFile(e),r={name:require("path").basename(e),ext:"js",source:n,fullPath:`/${o}`+e},i=s[0].children.findIndex(e=>e.fullPath===r.fullPath);(s=JSON.parse(JSON.stringify(s)))[0].children[i]=r,a.callback({type:"read",id:"loadRemote",url:l,data:s})})}};(h[c]||h.unhandled)()})}}};module.exports=makeDatSideEffect; -},{"../../most-utils/callbackToObservable":825,"../../utils/logger":868,"@jscad/core":19,"path":714}],831:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836,"../../utils/logger":879,"@jscad/core":19,"path":723}],842:[function(require,module,exports){ const most=require("most"),morph=require("morphdom"),{proxy:proxy}=require("most-proxy"),makeDomSideEffect=({targetEl:e})=>{const{attach:t,stream:r}=proxy(),o=r,s={};return{source:()=>{const t=t=>Array.from(e.querySelectorAll(t));return o.forEach(()=>{Object.keys(s).forEach(e=>{const[r]=e.split("@@"),o=t(r);if(o&&o.length>0){const t=s[e];if(!1===t.live){t.live=!0;const e=o.map(e=>most.fromEvent(t.events,e)),r=most.mergeArray(e);t.observable.attach(r)}}})}),{select:e=>{const r=t(e);let o;return{events:function(t){if(!r||r&&0===r.length){const r=proxy();o=r.stream,s[e+"@@"+t]={observable:r,live:!1}}return s[e+"@@"+t].events=t,o.multicast()}}},element:e}},sink:((e,r)=>{let o;const s=r.take(1).map(t=>{o=t,e.appendChild(o)}),m=r.skip(1).map(e=>{morph(o,e)}),n=most.mergeArray([s,m]).multicast();t(n),n.forEach(e=>e)}).bind(null,e)}};module.exports=makeDomSideEffect; -},{"morphdom":731,"most":773,"most-proxy":734}],832:[function(require,module,exports){ +},{"morphdom":742,"most":784,"most-proxy":745}],843:[function(require,module,exports){ const{fromEvent:fromEvent}=require("most"),preventDefault=t=>(t.preventDefault(),t),isTextNotEmpty=t=>""!==t,exists=t=>null!=t,itemListToArray=t=>{const e=[];for(let r=0;r{if(isTextNotEmpty(t.dataTransfer.getData("url")))return{type:"url",data:t.dataTransfer.getData("url")};if(t.dataTransfer.types.includes("text/plain")){const e=t.dataTransfer.getData("text");try{return{type:"url",data:new URL(e).href}}catch{return{type:"text",data:e}}}return t.dataTransfer.items&&t.dataTransfer.items.length>0?{type:"fileOrFolder",data:itemListToArray(t.dataTransfer.items)}:void 0},makeDragAndDropSideEffect=({targetEl:t})=>{return{source:()=>{const{dragOvers$:e,drops$:r}=(t=>({dragOvers$:fromEvent("dragover",t),drops$:fromEvent("drop",t)}))(t);return r.multicast(),r.forEach(preventDefault),e.forEach(preventDefault),r.map(t=>extractData(t)).filter(exists).multicast()}}};module.exports=makeDragAndDropSideEffect; -},{"most":773}],833:[function(require,module,exports){ +},{"most":784}],844:[function(require,module,exports){ const callbackToObservable=require("../../most-utils/callbackToObservable"),makeFileDialog=e=>{const a=callbackToObservable();return{source:()=>{},sink:e=>{e.forEach(e=>{a.callback(e);const l=document.createElement("input");l.id="foo",l.name="gna",l.setAttribute("type","file"),l.click(),l.addEventListener("change",()=>{})})}}};module.exports=makeFileDialog; -},{"../../most-utils/callbackToObservable":825}],834:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836}],845:[function(require,module,exports){ const path=require("path"),{getFileExtensionFromString:getFileExtensionFromString}=require("@jscad/core").utils,{formats:formats}=require("@jscad/io/formats"),callbackToObservable=require("../../most-utils/callbackToObservable"),makeLogger=require("../../utils/logger"),proxyUrl="./remote.pl?url=",binaryMimetypes={stl:"application/sla"},makeHttpSideEffect=e=>{const{logging:t}=Object.assign({},{logging:!1},e),r=callbackToObservable(),a=makeLogger({enabled:t});return{source:()=>r.stream.multicast(),sink:e=>{e.forEach(e=>{const{type:t,id:o,urls:n,origin:i,proxy:l}=e,s={read:()=>{let e=[];n.forEach(n=>{const s=e=>{r.callback({type:t,id:o,url:n,error:e}),a.error(e)},c=a=>{e=e.concat(a),r.callback({type:t,id:o,url:n,data:e})};l?readProxy(n,s,e=>{if(e.file){const t=new URL(i),r=new URL(e.file,t);readFile(r.toString(),s,c)}}):readFile(n,s,c)})},write:()=>{a.warning("writing to http is not implemented yet")},watch:()=>{a.warning("watching http is not implemented yet")},unhandled:()=>{r.callback({type:t,id:o,error:new Error(`http: no handler found for command ${t}`)})}};(s[t]||s.unhandled)()})}}},readFile=(e,t,r)=>{const a=getFileExtensionFromString(e),o=void 0!==binaryMimetypes[a];fetch(e).then(e=>{if(e.ok)return o?e.arrayBuffer():e.text();t(new Error(`fetch error: ${e.status} ${e.statusText}`))}).then(t=>{const o=path.basename(e),n=`/${o}`,i=formats[a]?formats[a].mimetype:"";r({name:o,ext:a,mimetype:i,source:t,fullPath:n})}).catch(e=>{t(e)})},readProxy=(e,t,r)=>{fetch(proxyUrl+e).then(e=>{if(e.ok)return e.json();t(new Error(`fetch error: ${e.status} ${e.statusText}`))}).then(e=>{r(e)}).catch(e=>{t(e)})};module.exports=makeHttpSideEffect; -},{"../../most-utils/callbackToObservable":825,"../../utils/logger":868,"@jscad/core":19,"@jscad/io/formats":69,"path":714}],835:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836,"../../utils/logger":879,"@jscad/core":19,"@jscad/io/formats":69,"path":723}],846:[function(require,module,exports){ const isElectron=require("is-electron"),callBackToStream=require("../../most-utils/callbackToObservable"),longNames={en:"english",de:"german",fr:"french",ja:"japanese",hr:"croatian",zh:"chinese"},getDefaultLocale=()=>{let a;return isElectron()||(a=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.language),a?a.split("-")[0]:""},initTranslations=a=>{const{translations:e}=Object.assign({},{translations:{}},a);return e},i18nImport=require("es2015-i18n-tag"),i18n=i18nImport.default,{i18nConfig:i18nConfig}=i18nImport,makei18nSideEffect=a=>{const e=callBackToStream();let t=initTranslations(a);const n={setAvailableTranslations:a=>{t=a.data},getDefaultLocale:a=>{e.callback({data:getDefaultLocale(),type:a.type})},changeSettings:a=>{const n=a.data;i18nConfig({locales:n,translations:t[n]}),e.callback({data:i18n,type:"changeSettings"})},getAvailableLanguages:a=>{const n=Object.keys(t).map(a=>{let e=longNames[a]?longNames[a]:"placeholder";const n=t[a];return n&&"language"in n&&(e=n.language),{code:a,fullName:e}});e.callback({data:n,type:"getAvailableLanguages"})}};return{sink:a=>{a.forEach(a=>{const e=n[a.type];e&&e(a)})},source:()=>e.stream.multicast()}};module.exports=makei18nSideEffect; -},{"../../most-utils/callbackToObservable":825,"es2015-i18n-tag":728,"is-electron":730}],836:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836,"es2015-i18n-tag":739,"is-electron":741}],847:[function(require,module,exports){ const{walkFileTree:walkFileTree}=require("@jscad/core").web,callbackToObservable=require("../../most-utils/callbackToObservable"),{changedFiles:changedFiles,flattenFiles:flattenFiles}=require("./utils"),localFsOptions=require("../../../data/localFsOptions.json"),makeLocalFsSideEffect=async e=>{const l=callbackToObservable();let o=null,a=0;const t=e=>o.send(JSON.stringify(e));return{source:()=>l.stream.multicast(),sink:e=>{let n,c,r,s=5e3;e.forEach(e=>{const{type:i,id:d,data:f,options:m,path:u}=e,h={unhandled:()=>{l.callback({type:i,id:d,error:new Error(`LocalFs: no handler found for command ${i}`)})},read:async()=>{n=void 0,c=void 0,r&&(clearInterval(r),r=0,o&&o.close()),f.length&&f[0]instanceof File||(c=f),n=await walkFileTree(f),l.callback({type:i,id:d,data:n})},watch:()=>{if(void 0===c)return;const{enabled:e}=m;e?(o||((o=new WebSocket(localFsOptions.livereloadUrl)).onopen=function(e){t({command:"hello",protocols:["http://livereload.com/protocols/official-6","http://livereload.com/protocols/official-7"],ver:"2.0.8",ext:"Chrome",extver:"2.1.0"})},o.onmessage=function(e){const l=JSON.parse(e.data);"hello"===l.command&&t({command:"info",plugins:{less:{disable:!1,version:"1.0"}},url:document.location}),"reload"===l.command&&(a=0)},o.onerror=function(e){console.warn("websocket error",e)},o.onclose=function(e){o=null}),r=setInterval(()=>{const e=Date.now();!c||o&&a||e-a{console.error("failed to read files",e)}).then(o=>{const a=flattenFiles(n),t=flattenFiles(o),c=changedFiles(a,t);c.length>0&&(n=o,l.callback({type:"read",id:"loadRemote",data:n,path:u,changed:c}));const r=Date.now();s=Math.max(2*(r-e),1e3)}))},50)):r&&(clearInterval(r),r=0)},write:()=>{}};(h[i]||h.unhandled)()})}}};module.exports=makeLocalFsSideEffect; -},{"../../../data/localFsOptions.json":637,"../../most-utils/callbackToObservable":825,"./utils":837,"@jscad/core":19}],837:[function(require,module,exports){ +},{"../../../data/localFsOptions.json":637,"../../most-utils/callbackToObservable":836,"./utils":848,"@jscad/core":19}],848:[function(require,module,exports){ const sameFile=(e,t)=>{if(e.fullPath===t.fullPath&&typeof e.source==typeof t.source){if(e.source.byteLength){const n=new Uint8Array(e.source),r=new Uint8Array(t.source);return n.length===r.length&&n.every((e,t)=>e===r[t])}return e.length===t.length&&e.source===t.source}return!1},changedFiles=(e,t)=>{const n=e.slice();return t.filter(e=>{const t=n.findIndex((t,n)=>sameFile(t,e));return t<0||(n.splice(t,1),!1)})},flattenFiles=e=>{let t=[];return e.forEach(e=>{e.children?t=t.concat(flattenFiles(e.children)):t.push(e)}),t};module.exports={changedFiles:changedFiles,flattenFiles:flattenFiles}; -},{}],838:[function(require,module,exports){ +},{}],849:[function(require,module,exports){ const callbackToObservable=require("../../most-utils/callbackToObservable"),makeStorageSideEffect=({name:e})=>{const a=callbackToObservable();return{sink:t=>{let r=!0;try{localStorage.getItem("jscad:")}catch(e){r=!1}r?t&&t.forEach(t=>{const{type:r,key:c,data:o}=t;if("write"===r)localStorage.setItem(`jscad:${e}-${c}`,JSON.stringify(o));else if("read"===r){const t=localStorage.getItem(`jscad:${e}-${c}`),o=JSON.parse(t)||{};a.callback({type:r,key:c,data:o})}}):callbackToObservable().callback({type:void 0,id:void 0,error:new Error("Local storage not supported in this environment!")})},source:()=>{return a.stream.multicast()}}};module.exports=makeStorageSideEffect; -},{"../../most-utils/callbackToObservable":825}],839:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836}],850:[function(require,module,exports){ const most=require("most"),callbackToObservable=require("../../most-utils/callbackToObservable"),makeState=t=>{const{packageMetadata:s,keyBindings:a}=t,e=callbackToObservable(),r={appTitle:`jscad v ${s.version}`,activeTool:void 0,status:{message:"",error:void 0,busy:!1},shortcuts:a,storage:{path:""},version:s.version};return{source:()=>{const t=e.stream.multicast();return most.scan((t,s)=>Object.assign({},t,s.state),r,t).startWith(r).skipRepeatsWith((t,s)=>JSON.stringify(t)===JSON.stringify(s)).multicast()},sink:t=>{t.forEach(t=>{e.callback(t)})}}};module.exports=makeState; -},{"../../most-utils/callbackToObservable":825,"most":773}],840:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836,"most":784}],851:[function(require,module,exports){ const most=require("most"),makeTitleBarSideEffect=()=>{return{sink:e=>{e.forEach(e=>{document.title=e})},source:()=>{const e=window.location.href;return most.just(e).filter(e=>void 0!==e).multicast().skipRepeats()}}};module.exports=makeTitleBarSideEffect; -},{"most":773}],841:[function(require,module,exports){ +},{"most":784}],852:[function(require,module,exports){ const WebWorkify=require("webworkify"),callBackToStream=require("../../most-utils/callbackToObservable"),makeWorkerEffect=e=>{const r=callBackToStream();let a=WebWorkify(e,{});a.onerror=(e=>r.callback({error:e})),a.onmessage=(e=>r.callback(e));return{sink:c=>{c.filter(({cmd:e})=>"cancel"===e).forEach(c=>{a.terminate(),(a=WebWorkify(e)).onerror=(e=>r.callback({error:e})),a.onmessage=(e=>r.callback(e))}),c.filter(({cmd:e})=>"cancel"!==e).forEach(e=>{a.postMessage(e)})},source:function(){return r.stream.multicast()}}};module.exports=makeWorkerEffect; -},{"../../most-utils/callbackToObservable":825,"webworkify":815}],842:[function(require,module,exports){ +},{"../../most-utils/callbackToObservable":836,"webworkify":826}],853:[function(require,module,exports){ const most=require("most"),{delayFromObservable:delayFromObservable,holdUntil:holdUntil,withLatestFrom:withLatestFrom}=require("../../most-utils"),{getParameterValuesFromUIControls:getParameterValuesFromUIControls}=require("@jscad/core").parameters,{fetchUriParams:fetchUriParams,getAllUriParams:getAllUriParams}=require("../../utils/urlUtils"),reducers=require("./reducers"),jsonCompare=(e,t)=>JSON.stringify(e)===JSON.stringify(t),actions=({sources:e})=>{const t=most.just({}).thru(withLatestFrom(reducers.initialize,e.state)).map(e=>({type:"initializeDesign",state:e,sink:"state"})).multicast(),r=t.map(e=>({sink:"store",key:"design",type:"read"})),s=e.state.filter(reducers.isDesignValid).skipRepeatsWith(reducers.isDesignTheSameForSerialization).thru(holdUntil(e.store.filter(e=>"design"===e.key&&"read"===e.type))).map(reducers.requestSaveSettings).map(e=>Object.assign({},{data:e},{sink:"store",key:"design",type:"write"})).multicast(),a=e.store.filter(e=>"design"===e.key&&"read"===e.type&&void 0!==e.data).thru(withLatestFrom(reducers.setSettings,e.state)).map(e=>({type:"setDesignSettings",state:e,sink:"state"})).multicast(),i=most.mergeArray([e.drops.filter(e=>"fileOrFolder"===e.type).tap(e=>console.log("dropped file",e)).map(({data:e})=>({sink:"fs",data:e,path:"realFs",urls:[]})),e.drops.filter(e=>"url"===e.type).tap(e=>console.log("dropped url",e)).map(e=>{const t=window.location.href,r=e.data,s=new URL(r),a=r?[r]:[],{protocol:i,pathname:o}=s;return{sink:i.replace(":",""),urls:a,origin:t,path:o,proxy:!0}}),e.dom.select(".example").events("click").map(e=>e.target.dataset.path).map(e=>{const t=new URL(e),r=e?[e]:[],{protocol:s,origin:a}=t;return{sink:s.replace(":",""),urls:r,origin:a}}).tap(e=>console.log("load example",e)),e.dom.select("#fileLoader").events("change").tap(e=>console.log("selected directory",e)).filter(e=>e.target.files.length>0).map(e=>{const t=e.target.files,r=[];for(let e=0;evoid 0!==e).tap(e=>console.log("window href processing",e)).map(e=>{const t=e;let r=fetchUriParams(e,"uri",void 0);if(!r){const t=new URL(e);if(0===t.hash.length)return;r=t.hash.slice(1)}const s=new URL(r),a=[r],{protocol:i,pathname:o}=s;return{sink:i.replace(":",""),urls:a,origin:t,path:o,proxy:!0}})]).filter(e=>void 0!==e).thru(holdUntil(a)).map(e=>({type:"read",id:"loadRemote",urls:e.urls,sink:e.sink,origin:e.origin,path:e.path,data:e.data,proxy:e.proxy})).multicast().skipRepeats(),o=most.mergeArray(Object.values(e).filter(e=>void 0!==e&&"source"in e)).filter(e=>!("loadRemote"!==e.id||"read"!==e.type||"error"in e||"sink"in e)).map(({data:e})=>({filesAndFolders:e})).thru(withLatestFrom(reducers.setDesignContent,e.state)).map(e=>({type:"setDesignContent",state:e,sink:"state"})).multicast(),n=most.mergeArray([e.state.filter(reducers.isDesignValid).map(({design:e})=>{return{id:"watchScript",path:e.mainPath,origin:e.origin,options:{enabled:e.autoReload}}}).skipRepeatsWith(jsonCompare)]).map(e=>Object.assign({},{type:"watch",sink:e.origin},e)).multicast(),l=most.mergeArray([e.state.filter(reducers.isDesignValid).filter(e=>void 0!==e.design.solids).map(e=>e.design.solids).skipRepeatsWith(jsonCompare)]).thru(withLatestFrom(reducers.requestWriteCachedGeometry,e.state)).map(e=>Object.assign({},{type:"write",id:"cachedGeometry",sink:e.origin},e)).multicast(),m=most.mergeArray([i.map(({sink:e})=>e)]).thru(withLatestFrom(reducers.resetDesign,e.state)).map(e=>({type:"resetDesign",state:e,sink:"state"})).multicast(),d=most.mergeArray([e.solidWorker.filter(e=>!("error"in e)&&e.data instanceof Object&&"solids"===e.data.type).map(e=>{const{lookupCounts:t,lookup:r,solids:s}=e.data;return{solids:s,lookup:r,lookupCounts:t}}).multicast(),e.fs.filter(e=>"read"===e.type&&"loadCachedGeometry"===e.id&&e.data).map(e=>{return{solids:void 0,lookupCounts:void 0,lookup:void e.data}}).multicast()]).thru(withLatestFrom(reducers.setDesignSolids,e.state)).map(e=>({type:"setDesignSolids",state:e,sink:"state"})).multicast(),p=e.state.skipRepeatsWith(reducers.isDesignTheSame).filter(reducers.isDesignValid).map(reducers.requestGeometryRecompute).map(e=>Object.assign({},e,{sink:"geometryWorker",cmd:"generate"})).multicast(),u=p.thru(delayFromObservable(e=>e.design.solidsTimeOut,e.state.filter(reducers.isDesignValid))).thru(withLatestFrom(reducers.timeoutGeometryRecompute,e.state)).map(e=>Object.assign({},{state:e},{sink:"state",type:"timeOutDesignGeneration"})).multicast(),c=u.filter(({state:e})=>void 0!==e.status.error).map(e=>Object.assign({},{sink:"geometryWorker",cmd:"cancel"})).multicast(),g=e.solidWorker.filter(e=>!("error"in e)&&e.data instanceof Object&&"params"===e.data.type).map(({data:e})=>({parameterDefaults:e.parameterDefaults,parameterDefinitions:e.parameterDefinitions,origin:"worker"})),h=most.mergeArray([g]).skipRepeatsWith(jsonCompare).thru(holdUntil(e.state.filter(reducers.isDesignValid))).thru(withLatestFrom(reducers.setDesignParameterDefinitions,e.state)).map(e=>({type:"setDesignParameterDefinitions",state:e,sink:"state"})).multicast(),y=()=>Array.from(document.getElementById("paramsTable").getElementsByTagName("input")).concat(Array.from(document.getElementById("paramsTable").getElementsByTagName("select"))).concat(Array.from(document.getElementById("paramsTable").getElementsByClassName("groupTitle"))),k=most.mergeArray([e.dom.select("#updateDesignFromParams").events("click").map(()=>{const e=y();return{parameterValues:getParameterValuesFromUIControls(e),origin:"uiManualUpdate"}}),e.paramChanges.filter(e=>(()=>document.getElementById("instantUpdate").checked)()).map(()=>{try{const e=y();return{parameterValues:getParameterValuesFromUIControls(e),origin:"uiInstantUpdate"}}catch(e){return{error:e,origin:"instantUpdate"}}})]).multicast().debounce(10),f=e.store.filter(e=>"design"===e.key&&"read"===e.type&&void 0!==e.data.parameterValues).map(({data:e})=>({parameterValues:e.parameterValues,origin:"store"})).multicast(),D=e.titleBar.map(e=>getAllUriParams(e)).filter(e=>Object.keys(e).length>0).map(e=>({parameterValues:e,origin:"titleBar"})).multicast(),F=e.state.filter(reducers.isDesignValid).multicast(),w=most.mergeArray([k,f,D,e.dom.select("#resetDesignToParameterDefaults").events("click").thru(withLatestFrom((e,t)=>({parameterValues:e.design.parameterDefaults,origin:"reset"}),e.state))]).skipRepeatsWith(jsonCompare).thru(holdUntil(e.state.filter(reducers.isDesignValid))).thru(holdUntil(F.filter(e=>{return e.design&&Object.keys(e.design.parameterDefinitions).length>0}))).thru(withLatestFrom(reducers.setDesignParameterValues,e.state)).map(e=>({type:"setDesignParameterValues",state:e,sink:"state"})).multicast().delay(10),U=e.solidWorker.filter(e=>e.data instanceof Object&&"errors"===e.data.type).map(({data:e})=>({error:e,origin:"worker"}));return{initialize$:t,requestLoadDesignContent$:i,requestWatchDesign$:n,requestWriteCachedGeometry$:l,resetDesign$:m,setDesignContent$:o,setDesignSolids$:d,setDesignParameterDefinitions$:h,setDesignParameterValues$:w,reportErrorsFromWorker$:most.mergeArray([U]).skipRepeatsWith(jsonCompare).tap(e=>console.log("errors",e)),requestGeometryRecompute$:p,timeoutGeometryRecompute$:u,cancelGeometryRecompute$:c,requestLoadSettings$:r,requestSaveSettings$:s,setDesignSettings$:a,toggleAutoReload$:most.mergeArray([e.dom.select("#toggleAutoReload").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleAutoReload,e.state)).map(e=>({type:"toggleAutoReload",state:e,sink:"state"})),toggleInstantUpdate$:most.mergeArray([e.dom.select("#instantUpdate").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleInstantUpdate,e.state)).map(e=>({type:"toggleInstantUpdate",state:e,sink:"state"})),toggleVTreeMode$:most.mergeArray([e.dom.select("#toggleVtreeMode").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleVtreeMode,e.state)).map(e=>({type:"toggleVtreeMode",state:e,sink:"state"})),setSolidsTimeout$:most.mergeArray([e.dom.select("#solidsTimeout").events("change").map(e=>e.target.value).map(e=>parseFloat(e))]).thru(withLatestFrom(reducers.setSolidsTimeout,e.state)).map(e=>({type:"setSolidsTimeout",state:e,sink:"state"}))}};module.exports=actions; -},{"../../most-utils":828,"../../utils/urlUtils":870,"./reducers":849,"@jscad/core":19,"most":773}],843:[function(require,module,exports){ +},{"../../most-utils":839,"../../utils/urlUtils":881,"./reducers":860,"@jscad/core":19,"most":784}],854:[function(require,module,exports){ const makeOutput=({sources:e,extras:t})=>e.state.filter(e=>e.design&&e.languages&&e.viewer).skipRepeatsWith((e,t)=>JSON.stringify(e)===JSON.stringify(t)).combine((e,a)=>require("../views/main")(e,a,t.paramsCallbacktoStream,t.editorCallbackToStream),e.i18n.filter(e=>"changeSettings"===e.type).map(e=>e.data));module.exports=makeOutput; -},{"../views/main":859}],844:[function(require,module,exports){ +},{"../views/main":870}],855:[function(require,module,exports){ const most=require("most"),{withLatestFrom:withLatestFrom}=require("../../most-utils"),reducers={setErrors:(r,t)=>{const{error:s}=t;return{status:Object.assign({},r.status,{error:s,busy:!1})}},clearErrors:(r,t)=>{return{status:Object.assign({},r.status,{error:void 0,busy:!1})}}},actions=({sources:r})=>{return{setErrors$:most.mergeArray(Object.values(r).filter(r=>void 0!==r&&"source"in r)).filter(r=>{try{return"error"in r}catch(r){return!1}}).thru(withLatestFrom(reducers.setErrors,r.state)).map(r=>Object.assign({},{type:"setErrors",sink:"state"},{state:r})),clearErrors$:most.never().thru(withLatestFrom(reducers.clearErrors,r.state)).map(r=>Object.assign({},{type:"clearErrors",sink:"state"},{state:r}))}};module.exports=actions; -},{"../../most-utils":828,"most":773}],845:[function(require,module,exports){ +},{"../../most-utils":839,"most":784}],856:[function(require,module,exports){ const most=require("most"),{solidsAsBlob:solidsAsBlob}=require("@jscad/io"),{withLatestFrom:withLatestFrom}=require("../../most-utils"),{exportFilePathFromFormatAndDesign:exportFilePathFromFormatAndDesign}=require("../../core/io/exportUtils"),reducers={initialize:t=>{return{io:{exportFormat:"",exportFilePath:"",availableExportFormats:[]}}},setExportFormat:(t,e)=>{return{io:Object.assign({},t.io,exportFilePathFromFormatAndDesign(t.design,e),{exportFormat:e})}},requestExport:t=>{const{exportFilePath:e,exportFormat:r}=t.io,{solids:s}=t.design,{saveAs:o}=require("file-saver");o(solidsAsBlob(s,{format:r}),e)}},actions=({sources:t})=>{const e=most.just({}).thru(withLatestFrom(reducers.initialize,t.state)).map(t=>Object.assign({},{type:"initializeExports",sink:"state"},{state:t})),r=t.dom.select("#exportFormats").events("change").map(t=>t.target.value).thru(withLatestFrom(reducers.setExportFormat,t.state)).map(t=>Object.assign({},{type:"changeExportFormat",sink:"state"},{state:t})).multicast();return{initializeExports$:e,requestExport$:t.dom.select("#exportBtn").events("click").thru(withLatestFrom(reducers.requestExport,t.state)).map(t=>({type:"exportRequested",data:t})),changeExportFormat$:r}};module.exports=actions; -},{"../../core/io/exportUtils":817,"../../most-utils":828,"@jscad/io":70,"file-saver":729,"most":773}],846:[function(require,module,exports){ +},{"../../core/io/exportUtils":828,"../../most-utils":839,"@jscad/io":70,"file-saver":740,"most":784}],857:[function(require,module,exports){ const most=require("most"),{flatten:flatten}=require("@jscad/array-utils"),{proxy:proxy}=require("most-proxy"),makeActions=e=>{const{attach:r,stream:s}=proxy();e.actions=s.skipRepeatsWith((e,r)=>JSON.stringify(e)===JSON.stringify(r)).multicast();const t=require("./tools")({sources:e}),i=require("./viewer")({sources:e}),o=require("./themes")({sources:e}),u=require("./languages")({sources:e}),a=require("./shortcuts")({sources:e}),c=require("./errors")({sources:e}),n=require("./exports")({sources:e}),m=[c,require("./design")({sources:e}),n,t,o,i,u,a],l=most.mergeArray(flatten(m.map(e=>Object.values(e)))).skipRepeatsWith((e,r)=>JSON.stringify(e)===JSON.stringify(r)).multicast().filter(e=>void 0!==e);return r(l),l};module.exports=makeActions; -},{"./design":842,"./errors":844,"./exports":845,"./languages":848,"./shortcuts":850,"./themes":851,"./tools":852,"./viewer":853,"@jscad/array-utils":528,"most":773,"most-proxy":734}],847:[function(require,module,exports){ +},{"./design":853,"./errors":855,"./exports":856,"./languages":859,"./shortcuts":861,"./themes":862,"./tools":863,"./viewer":864,"@jscad/array-utils":528,"most":784,"most-proxy":745}],858:[function(require,module,exports){ const makeReactions=i=>{const{sinks:s,outputs$:t}=i,{store:n,fs:e,http:k,https:r,i18n:o,dom:f,solidWorker:l,state:a,dat:d}=s;f(require("./dom")(i)),o(t.filter(i=>"sink"in i&&"i18n"===i.sink)),n(t.filter(i=>"sink"in i&&"store"===i.sink)),k(t.filter(i=>"sink"in i&&"http"===i.sink)),r(t.filter(i=>"sink"in i&&"https"===i.sink)),e(t.filter(i=>"sink"in i&&"fs"===i.sink)),l(t.filter(i=>"sink"in i&&"geometryWorker"===i.sink)),a(t.filter(i=>"sink"in i&&"state"===i.sink)),d(t.filter(i=>"sink"in i&&"dat"===i.sink))};module.exports=makeReactions; -},{"./dom":843}],848:[function(require,module,exports){ +},{"./dom":854}],859:[function(require,module,exports){ const most=require("most"),{holdUntil:holdUntil,withLatestFrom:withLatestFrom}=require("../../most-utils"),reducers={initialize:e=>{return{languages:{active:void 0,available:[]}}},setLanguage:(e,a)=>{return{languages:Object.assign({},e.languages,{active:a})}},setAvailableLanguages:(e,a)=>{return{languages:Object.assign({},e.languages,{available:a})}},requestSaveSettings:e=>({active:e.active})},actions=({sources:e})=>{const a=most.just({}).thru(withLatestFrom(reducers.initialize,e.state)).map(e=>Object.assign({},{type:"initializeLanguages",sink:"state"},{state:e})),t=a.map(e=>({type:"getAvailableLanguages",sink:"i18n"})),s=t.map(e=>({type:"getDefaultLocale",sink:"i18n"})),i=e.state.filter(e=>e.languages&&void 0!==e.languages.active).map(e=>e.languages.active).skipRepeatsWith((e,a)=>JSON.stringify(e)===JSON.stringify(a)).map(e=>({type:"changeSettings",data:e,sink:"i18n"})),g=most.mergeArray([e.i18n.filter(e=>"getAvailableLanguages"===e.type).map(e=>e.data)]).thru(withLatestFrom(reducers.setAvailableLanguages,e.state)).map(e=>Object.assign({},{type:"setAvailableLanguages",sink:"state"},{state:e})).multicast(),n=a.map(e=>({sink:"store",key:"languages",type:"read"})),l=e.i18n.thru(holdUntil(g)).filter(e=>"getDefaultLocale"===e.type).map(e=>e.data).multicast().delay(1),r=e.store.filter(e=>"languages"===e.key&&"read"===e.type).thru(holdUntil(l)).map(e=>e.data.active).filter(e=>void 0!==e);return{initialize$:a,requestGetAvailableLanguages$:t,requestGetDefaultLanguage$:s,requestGetLanguageData$:i,setLanguage$:most.mergeArray([l,e.dom.select("#languageSwitcher").events("change").map(e=>e.target.value),r]).thru(withLatestFrom(reducers.setLanguage,e.state)).map(e=>Object.assign({},{type:"setLanguage",sink:"state"},{state:e})),setAvailableLanguages$:g,requestLoadSettings$:n,requestSaveSettings$:e.state.filter(e=>e.languages).map(e=>e.languages).thru(holdUntil(e.store.filter(e=>"languages"===e.key&&"read"===e.type))).map(reducers.requestSaveSettings).map(e=>Object.assign({},{data:e},{sink:"store",key:"languages",type:"write"})).multicast()}};module.exports=actions; -},{"../../most-utils":828,"most":773}],849:[function(require,module,exports){ +},{"../../most-utils":839,"most":784}],860:[function(require,module,exports){ const path=require("path"),{applyParameterDefinitions:applyParameterDefinitions}=require("@jscad/core").parameters,{makeFakeFs:makeFakeFs}=require("@jscad/core").loading,{getDesignEntryPoint:getDesignEntryPoint,getDesignName:getDesignName}=require("@jscad/core").loading.requireDesignUtilsFs,{keep:keep}=require("../../utils/object"),packageMetadata=require("../../../package.json"),{availableExportFormatsFromSolids:availableExportFormatsFromSolids,exportFilePathFromFormatAndDesign:exportFilePathFromFormatAndDesign}=require("../../core/io/exportUtils"),designEqualityFields=["parameterDefinitions","parameterValues","mainPath","filesAndFolders","vtreeMode"],serializableFields=["name","mainPath","origin","parameterValues","vtreeMode","autoReload","instantUpdate","solidsTimeOut"],reducers={initialize:()=>{return{design:{name:"",path:"",mainPath:"",origin:void 0,filesAndFolders:[],instantUpdate:!1,autoReload:!1,parameterDefinitions:[],parameterValues:{},parameterDefaults:{},solidsTimeOut:8e4,solids:[],vtreeMode:!1,lookup:{},lookupCounts:{},debug:{startTime:0,endTime:0,totalTime:0}}}},resetDesign:(e,t)=>{const i=Object.assign({},e.design,keep(["name","path","mainPath","origin","filesAndFolders","parameterDefinitions","parameterValues","parameterDefaults","lookup","lookupCounts","debug","solids"],reducers.initialize().design));return i.origin=t,{design:i}},setDesignContent:(e,t)=>{const{filesAndFolders:i}=t,s=makeFakeFs(i),a=i[0].fullPath,n=getDesignEntryPoint(s,a),r=getDesignName(s,a),o=path.dirname(a);let d=e.design;const g=Object.assign({},e.design.debug,{startTime:new Date});return{design:d=Object.assign({},d,{name:r,path:o,mainPath:n,filesAndFolders:i,debug:g}),appTitle:`jscad v ${packageMetadata.version}: ${e.design.name}`,status:Object.assign({},e.status,{busy:!0,error:void 0})}},setDesignSolids:(e,{solids:t,lookup:i,lookupCounts:s})=>{t=t||[],i=i||{},s=s||{};const a=new Date,n=a-e.design.debug.startTime,r=Object.assign({},e.design.debug,{endTime:a,totalTime:n});console.warn("total time for design regeneration",n,(new Date).getSeconds());const o=Object.assign({},e.design,{solids:t,lookup:i,lookupCounts:s,debug:r}),{exportFormat:d,availableExportFormats:g}=availableExportFormatsFromSolids(t),l={exportFormat:d,exportFilePath:exportFilePathFromFormatAndDesign(o,d).exportFilePath,availableExportFormats:g};return{design:o,status:Object.assign({},e.status,{busy:!1}),io:l}},setDesignParameterDefinitions:(e,t)=>{const i=t.parameterDefaults||e.design.parameterDefaults,s=t.parameterDefinitions||e.design.parameterDefinitions;return{design:Object.assign({},e.design,{parameterDefaults:i,parameterDefinitions:s,parametersOrigin:t.origin})}},setDesignParameterValues:(e,t)=>{let i=t.parameterValues;"instantUpdate"!==t.origin||e.design.instantUpdate||(i=e.design.parameterValues),i=i?applyParameterDefinitions(i,e.design.parameterDefinitions):i,i=Object.assign({},e.design.parameterValues,i);let s=Object.assign({},e.design,{parameterValues:i,parametersOrigin:t.origin});const a=Object.assign({},e.design.debug,{startTime:new Date});return{design:s=Object.assign({},s,{debug:a}),status:Object.assign({},e.status,{busy:!0,error:void 0})}},setSettings:(e,{data:t})=>{const{vtreeMode:i,autoReload:s,instantUpdate:a,solidsTimeOut:n}=t;return void 0===i?{design:e.design}:{design:Object.assign({},e.design,{vtreeMode:i,autoReload:s,instantUpdate:a,solidsTimeOut:n})}},requestGeometryRecompute:({design:e},t)=>keep(["mainPath","parameterValues","filesAndFolders","vtreeMode","lookup","lookupCounts"],e),timeoutGeometryRecompute:({status:e},t)=>e.isBusy?Object.assign({},e,{busy:!1,error:new Error("Failed to generate design within an acceptable time, bailing out")}):{status:e},requestWriteCachedGeometry:({design:e},t)=>{const i={};return Object.keys(t).forEach(e=>{i[e]=t[e]}),{path:".solidsCache",options:{isRawData:!0},origin:e.origin}},requestSaveSettings:({design:e})=>keep(serializableFields,e),isDesignValid:e=>e.design&&e.design.name&&""!==e.design.path,isDesignTheSame:(e,t)=>{if(!e.design)return!1;const i=JSON.stringify(keep(designEqualityFields,t.design));return JSON.stringify(keep(designEqualityFields,e.design))===i},isDesignTheSameForSerialization:(e,t)=>{if(!e.design)return!1;const i=JSON.stringify(keep(serializableFields,t.design));return JSON.stringify(keep(serializableFields,e.design))===i},toggleAutoReload:(e,t)=>{return{design:Object.assign({},e.design,{autoReload:t})}},toggleInstantUpdate:(e,t)=>{return{design:Object.assign({},e.design,{instantUpdate:t})}},toggleVtreeMode:(e,t)=>{return{design:Object.assign({},e.design,{vtreeMode:t})}},setSolidsTimeout:(e,t)=>{return{design:Object.assign({},e.design,{solidsTimeOut:t})}}};module.exports=reducers; -},{"../../../package.json":816,"../../core/io/exportUtils":817,"../../utils/object":869,"@jscad/core":19,"path":714}],850:[function(require,module,exports){ +},{"../../../package.json":827,"../../core/io/exportUtils":828,"../../utils/object":880,"@jscad/core":19,"path":723}],861:[function(require,module,exports){ const most=require("most"),{head:head}=require("@jscad/array-utils"),{holdUntil:holdUntil,withLatestFrom:withLatestFrom}=require("../../most-utils"),{getKeyCombos:getKeyCombos,isKeyEventScopeValid:isKeyEventScopeValid,simpleKey:simpleKey}=require("../../utils/keys"),{merge:merge}=require("../../utils/utils"),reducers={initialize:e=>e,setShortcuts:(e,t)=>{return{shortcuts:merge([],e.shortcuts,t)}},setShortcut:(e,t)=>{const s=t=>e.shortcuts.filter(e=>e.key===t).length>0;return{shortcuts:e.shortcuts.map(e=>{if(e.command===t.command&&e.args===t.args){if("inProgress"in t){const{inProgress:r,tmpKey:o}=t;if(r){const t=s(o)?"shortcut already exists":void 0;return Object.assign({},e,{inProgress:r,tmpKey:o,error:t})}return Object.assign({},e,{inProgress:r,tmpKey:o})}if(t.done&&!s(t.key)){const{command:s,args:r}=e;return{key:t.key,command:s,args:r}}return e}return e})}},triggerShortcut:(e,{event:t,compositeKey:s})=>{const r=head(e.shortcuts.filter(e=>e.key.toLowerCase()===s));if(r){const{command:e,args:t}=r;return{type:e,data:t}}},requestSaveSettings:e=>e},actions=({sources:e})=>{const t=most.just({}).thru(withLatestFrom(reducers.initialize,e.state)).map(e=>Object.assign({},{type:"initializeShortcuts",sink:"state"},{state:e})),s=most.mergeArray([e.store.filter(e=>"shortcuts"===e.key&&"read"===e.type&&e.data&&e.data.shortcuts).map(e=>e.data.shortcuts)]).thru(withLatestFrom(reducers.setShortcuts,e.state)).map(e=>Object.assign({},{type:"setShortcuts",sink:"state"},{state:e})),r=e.dom.select(".shortcutCommand").events("keyup").multicast(),o=e.dom.select(".shortcutCommand").events("keydown").multicast(),a=getKeyCombos({dropRepeats:!0,endKeys:["enter","escape"]},r,o);r.forEach(e=>(e.preventDefault(),e.stopPropagation(),!1)),o.forEach(e=>(e.preventDefault(),e.stopPropagation(),!1));const i=most.mergeArray([a.map(({event:e,compositeKey:t})=>({event:e,compositeKey:t,inProgress:!0})).merge(e.dom.select(".shortcutCommand").events("focus").map(e=>({event:e,compositeKey:"",inProgress:!0}))).merge(e.dom.select(".shortcutCommand").events("blur").map(e=>({event:e,compositeKey:"",inProgress:!1}))).merge(r.filter(e=>"escape"===simpleKey(e)).map(e=>({event:e,compositeKey:"",inProgress:!1}))).merge(r.filter(e=>"enter"===simpleKey(e)).map(e=>({event:e,done:!0}))).scan((e,t)=>{const{event:s,compositeKey:r,inProgress:o,done:a}=t,i=s.target.dataset.command,n=s.target.dataset.args,m=Object.assign({},e,{command:i,args:n,inProgress:o,done:a});return void 0!==r&&""!==r&&(m.key=r,m.tmpKey=r),"done"in m&&m.done&&(delete m.inProgress,delete m.tmpKey),m},{}).filter(e=>void 0!==e)]).thru(withLatestFrom(reducers.setShortcut,e.state)).map(e=>({type:"setShortcut",state:e,sink:"state"})).multicast(),n=e.dom.element.getAttribute("key"),m=most.fromEvent("keyup",e.dom.element).filter(e=>isKeyEventScopeValid(n,e.target)).multicast(),c=most.fromEvent("keydown",e.dom.element).filter(e=>isKeyEventScopeValid(n,e.target)).multicast(),u=getKeyCombos({dropRepeats:!1},m,c).thru(withLatestFrom(reducers.triggerShortcut,e.state)).filter(e=>void 0!==e),d=t.map(e=>({sink:"store",key:"shortcuts",type:"read"}));return{initialize$:t,setShortcut$:i,setShortcuts$:s,triggerFromShortcut$:u,requestLoadSettings$:d,requestSaveSettings$:e.state.filter(e=>e.shortcuts).map(e=>e.shortcuts).thru(holdUntil(e.store.filter(e=>"shortcuts"===e.key&&"read"===e.type))).map(reducers.requestSaveSettings).map(e=>Object.assign({},{data:e},{sink:"store",key:"shortcuts",type:"write"})).multicast()}};module.exports=actions; -},{"../../most-utils":828,"../../utils/keys":867,"../../utils/utils":871,"@jscad/array-utils":528,"most":773}],851:[function(require,module,exports){ +},{"../../most-utils":839,"../../utils/keys":878,"../../utils/utils":882,"@jscad/array-utils":528,"most":784}],862:[function(require,module,exports){ const most=require("most"),{holdUntil:holdUntil,withLatestFrom:withLatestFrom}=require("../../most-utils"),{merge:merge}=require("../../utils/utils"),reducers={initialize:e=>{return{themes:{active:"light",themeSettings:{mainTextColor:"#FFF"}}}},setTheme:(e,t)=>{const s=require("../../../data/themes"),i=s[t]?s[t]:s.light;return{viewer:e.viewer?merge({},e.viewer,i.viewer):i.viewer,themes:Object.assign({},e.themes,{available:s,active:t,themeSettings:i})}},requestSaveSettings:e=>({active:e.active})},actions=({sources:e})=>{const t=most.just({}).thru(withLatestFrom(reducers.initialize,e.state)).map(e=>Object.assign({},{type:"initializeThemes",sink:"state"},{state:e})),s=most.mergeArray([e.dom.select("#themeSwitcher").events("change").map(e=>e.target.value),e.store.filter(e=>"themes"===e.key&&"read"===e.type&&e.data&&e.data.active).map(e=>e.data.active)]).startWith("light").thru(withLatestFrom(reducers.setTheme,e.state)).map(e=>Object.assign({},{type:"setTheme",sink:"state"},{state:e})),i=t.map(e=>({sink:"store",key:"themes",type:"read"}));return{initialize$:t,setTheme$:s,requestLoadSettings$:i,requestSaveSettings$:e.state.filter(e=>e.themes).map(e=>e.themes).thru(holdUntil(e.store.filter(e=>"themes"===e.key&&"read"===e.type))).map(reducers.requestSaveSettings).map(e=>Object.assign({},{data:e},{sink:"store",key:"themes",type:"write"})).multicast()}};module.exports=actions; -},{"../../../data/themes":678,"../../most-utils":828,"../../utils/utils":871,"most":773}],852:[function(require,module,exports){ +},{"../../../data/themes":678,"../../most-utils":839,"../../utils/utils":882,"most":784}],863:[function(require,module,exports){ const most=require("most"),{withLatestFrom:withLatestFrom}=require("../../most-utils"),actions=({sources:e})=>{return{setActiveTool$:most.mergeArray([e.dom.select("#toggleOptions").events("click").map(e=>"options"),e.dom.select("#toggleEditor").events("click").map(e=>"editor"),e.dom.select("#toggleHelp").events("click").map(e=>"help"),e.dom.select(".example").events("mouseup").map(e=>void 0)]).thru(withLatestFrom((e,t)=>{return{activeTool:e.activeTool===t?void 0:t}},e.state)).map(e=>Object.assign({},{type:"setActiveTool",sink:"state"},{state:e}))}};module.exports=actions; -},{"../../most-utils":828,"most":773}],853:[function(require,module,exports){ +},{"../../most-utils":839,"most":784}],864:[function(require,module,exports){ const most=require("most"),{withLatestFrom:withLatestFrom}=require("../../most-utils"),reducers={initialize:e=>{return{viewer:{rendering:{background:[1,1,1,1],meshColor:[0,.6,1,1],autoRotate:!1,autoZoom:!1},grid:{show:!1,color:[1,1,1,.1]},axes:{show:!0},camera:{position:""}}}},toggleAutoRotate:(e,t)=>{const r=Object.assign({},e.viewer.rendering,{autoRotate:t});return{viewer:Object.assign({},e.viewer,{rendering:r})}},toggleAutoZoom:(e,t)=>{const r=Object.assign({},e.viewer.rendering,{autoZoom:t});return{viewer:Object.assign({},e.viewer,{rendering:r})}},toggleGrid:(e,t)=>{const r=Object.assign({},e.viewer.grid,{show:t});return{viewer:Object.assign({},e.viewer,{grid:r})}},toggleAxes:(e,t)=>{const r=Object.assign({},e.viewer.axes,{show:t});return{viewer:Object.assign({},e.viewer,{axes:r})}},toPresetView:(e,t)=>{const r=Object.assign({},e.viewer.camera,{position:t});return{viewer:Object.assign({},e.viewer,{camera:r})}},setProjectionType:(e,t)=>{return{viewer:Object.assign({},e.viewer,{camera:{projectionType:t}})}}},actions=({sources:e})=>{const t=most.just({}).thru(withLatestFrom(reducers.initialize,e.state)).map(e=>Object.assign({},{type:"initializeViewer",sink:"state"},{state:e})),r=most.mergeArray([e.dom.select("#toggleGrid").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleGrid,e.state)).map(e=>({type:"toggleGrid",state:e,sink:"state"})),s=most.mergeArray([e.dom.select("#toggleAxes").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleAxes,e.state)).map(e=>({type:"toggleAxes",state:e,sink:"state"})),o=most.mergeArray([e.dom.select("#toggleAutoRotate").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleAutoRotate,e.state)).map(e=>({type:"toggleAutoRotate",state:e,sink:"state"})),i=most.mergeArray([e.dom.select("#toggleAutoZoom").events("click").map(e=>e.target.checked)]).thru(withLatestFrom(reducers.toggleAutoZoom,e.state)).map(e=>({type:"toggleAutoZoom",state:e,sink:"state"})),a=["toPresetView"];return{initializeViewer$:t,toggleGrid$:r,toggleAxes$:s,toggleAutoRotate$:o,toggleAutoZoom$:i,otherViewerActions$:e.actions.filter(e=>a.includes(e.type)).thru(withLatestFrom((e,t)=>reducers[t.type](e,t.data),e.state)).map(e=>({type:"otherActions",state:e,sink:"state"}))}};module.exports=actions; -},{"../../most-utils":828,"most":773}],854:[function(require,module,exports){ +},{"../../most-utils":839,"most":784}],865:[function(require,module,exports){ const html=require("nanohtml"),{createParamControls:createParamControls}=require("./parameterControls"),designParameters=(e,t,a)=>{const{parameterValues:s,parameterDefinitions:r,parameterDefaults:n}=e.design;try{const{controls:i}=createParamControls(Object.assign({},n,s),r,t.callback);return html`
@@ -3452,7 +3485,7 @@ const html=require("nanohtml"),{createParamControls:createParamControls}=require
`}catch(t){t.stack=void 0,e.status.error=t}};module.exports=designParameters; -},{"./parameterControls":861,"nanohtml":809}],855:[function(require,module,exports){ +},{"./parameterControls":872,"nanohtml":820}],866:[function(require,module,exports){ const html=require("nanohtml"),CodeMirror=require("codemirror");require("codemirror/mode/javascript/javascript"),require("codemirror/addon/hint/javascript-hint");const editorOptions={mode:"javascript",indentUnit:2,smartIndent:!1,indentWithTabs:!1,lineNumbers:!0,autofocus:!0};let editor,wrapper;const createFileTree=e=>{const r=e.getValue();return r&&r.length>0?[{ext:"js",fullPath:"/changes.js",mimetype:"javascript",name:"changes.js",source:r}]:null},createWrapper=(e,r)=>{if(!wrapper){(wrapper=html`