diff --git a/3d-visualisierungen-direkt-im-browser/index.html b/3d-visualisierungen-direkt-im-browser/index.html index ad0fb71..a99cdcd 100644 --- a/3d-visualisierungen-direkt-im-browser/index.html +++ b/3d-visualisierungen-direkt-im-browser/index.html @@ -18,14 +18,14 @@ - + - + @@ -76,7 +76,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -89,7 +89,7 @@ - + @@ -261,7 +261,7 @@

Logitech Rally

@@ -296,7 +296,7 @@

AVer PTC500S

@@ -331,7 +331,7 @@

AVer PTZ 300

@@ -393,8 +393,8 @@

AVer PTZ 300

- - + + - - - + + + - - + + - + \ No newline at end of file diff --git a/hybrid/index.html b/hybrid/index.html index f997228..840e14d 100644 --- a/hybrid/index.html +++ b/hybrid/index.html @@ -18,18 +18,18 @@ - + - + - + @@ -84,7 +84,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -97,7 +97,7 @@ - + @@ -272,7 +272,7 @@

Wahlfreiheit für Teilnehmende

-
+

Fexibilität im Unterricht

Sie möchten einen externen Dozierenden zuschalten? Kein Problem!

@@ -291,7 +291,7 @@

Fexibilität im Unterricht

-
+

Skalieren Sie Ihr Angebot

Ob zehn oder einhundert Personen teilnehmen, in einem Hybridraum hat es online immer Platz.

@@ -354,7 +354,7 @@

Bleiben Sie konkurrenzfähig

-
+

Teil jeder modernen Schule

Professionelle Hybridsysteme integrieren sich dezent in Ihren Raum und werden so zu einem Teil Ihrer modernen Infrastruktur.

@@ -427,7 +427,7 @@

Einfach und trotzdem umfangreich -
+

Barrierenfreie Kommunikation

Unser System ermöglicht einen natürlichen, komplett freien Austausch aller Teilnehmer – ohne dass die Technik in den Weg kommt.

@@ -471,7 +471,7 @@

Top-Audioqualität

-
+

Frei steuerbare Kamera

Sie möchten den Teilnehmern etwas im hinteren Teil des Raumes zeigen? Kein Problem. Schwenken Sie die Kamera einfach über den Touchscreen.

@@ -490,7 +490,7 @@

Frei steuerbare Kamera

-
+

Zukunftssichere Technologien

Wir setzen auf professionell hochwertige und weitverbreitete Standards. So bleibt das System auch über die Jahre hinweg aktuell, erweiter-, und anpassbar.

@@ -509,7 +509,7 @@

Zukunftssichere Technologien

-
+

Online-Tutorials inklusive

Wir haben für unser System eigens eine Plattform mit Erklärvideos und Tutorials erstellt, um Ihnen die Einführung so leicht wie möglich zu machen.

@@ -534,7 +534,7 @@

Online-Tutorials inklusive

-
+

Nikolaus Storz

@@ -552,7 +552,7 @@

Projektleiter Digitale Bildungsinfrastruktur bei der Kalaidos Fachhochschule
@@ -746,8 +746,8 @@

Projektleiter Digitale Bildungsinfrastruktur bei der Kalaidos Fachhochschule - - + + - - - + + + - - + + - + \ No newline at end of file diff --git a/index.html b/index.html index 08a7409..1a6211a 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ - + @@ -31,7 +31,7 @@ - + @@ -317,8 +317,8 @@ })(); - - + + + @@ -81,7 +81,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -94,7 +94,7 @@ - + @@ -224,7 +224,7 @@

AVer Cam520 Pro2

@@ -259,7 +259,7 @@

Logitech Rally

@@ -294,7 +294,7 @@

AVer PTC500S

@@ -329,7 +329,7 @@

AVer PTZ 300

@@ -391,8 +391,8 @@

AVer PTZ 300

- - + + - - - + + + - - + + - + \ No newline at end of file diff --git a/lernvideos-mitarbeiterschulungen-videoproduktion-und-3d-animationen/index.html b/lernvideos-mitarbeiterschulungen-videoproduktion-und-3d-animationen/index.html index 087fd43..75d369f 100644 --- a/lernvideos-mitarbeiterschulungen-videoproduktion-und-3d-animationen/index.html +++ b/lernvideos-mitarbeiterschulungen-videoproduktion-und-3d-animationen/index.html @@ -18,14 +18,14 @@ - + - + @@ -78,7 +78,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -91,7 +91,7 @@ - + @@ -195,7 +195,7 @@ - +
@@ -240,7 +240,7 @@
@@ -294,7 +294,7 @@
@@ -314,7 +314,7 @@
@@ -347,7 +347,7 @@
@@ -444,8 +444,8 @@ - - + + - - - + + + - - + + - + \ No newline at end of file diff --git a/live-streaming/index.html b/live-streaming/index.html index df8bf46..7d9070d 100644 --- a/live-streaming/index.html +++ b/live-streaming/index.html @@ -18,18 +18,18 @@ - + - + - + @@ -80,7 +80,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -93,7 +93,7 @@ - + @@ -464,8 +464,8 @@
- - + + - - - + + + \ No newline at end of file diff --git a/project/index.html b/project/index.html index 7a3ddc0..c3c0b82 100644 --- a/project/index.html +++ b/project/index.html @@ -18,10 +18,10 @@ - + - + @@ -83,7 +83,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -92,7 +92,7 @@ - + @@ -214,8 +214,8 @@

Recent Comments

- - + + - - - - - + + + + + \ No newline at end of file diff --git a/project/page/2/index.html b/project/page/2/index.html index 720cb63..e4bada6 100644 --- a/project/page/2/index.html +++ b/project/page/2/index.html @@ -18,10 +18,10 @@ - + - + @@ -83,7 +83,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -92,7 +92,7 @@ - + @@ -198,8 +198,8 @@

Recent Comments

- - + + - - - - - + + + + + \ No newline at end of file diff --git a/project/project-1/index.html b/project/project-1/index.html index e345371..fb92c7a 100644 --- a/project/project-1/index.html +++ b/project/project-1/index.html @@ -18,13 +18,13 @@ - + - + @@ -90,7 +90,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -103,7 +103,7 @@ - + @@ -346,9 +346,9 @@

WHAT WE DID

- - - + + + - - - - - + + + + + - - + + - + \ No newline at end of file diff --git a/project/project-2/index.html b/project/project-2/index.html index a7af19b..a6fbc84 100644 --- a/project/project-2/index.html +++ b/project/project-2/index.html @@ -18,13 +18,13 @@ - + - + @@ -88,7 +88,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -101,7 +101,7 @@ - + @@ -307,9 +307,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project/project-3/index.html b/project/project-3/index.html index 8003edc..3b02df7 100644 --- a/project/project-3/index.html +++ b/project/project-3/index.html @@ -18,13 +18,13 @@ - + - + @@ -87,7 +87,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -100,7 +100,7 @@ - + @@ -257,9 +257,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project/project-4/index.html b/project/project-4/index.html index 9b33a3c..2bdc04a 100644 --- a/project/project-4/index.html +++ b/project/project-4/index.html @@ -18,13 +18,13 @@ - + - + @@ -88,7 +88,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -101,7 +101,7 @@ - + @@ -288,9 +288,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project/project-5/index.html b/project/project-5/index.html index 8a8f863..8c99628 100644 --- a/project/project-5/index.html +++ b/project/project-5/index.html @@ -18,13 +18,13 @@ - + - + @@ -88,7 +88,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -101,7 +101,7 @@ - + @@ -307,9 +307,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project/project-6/index.html b/project/project-6/index.html index 2d609c0..cef0fa5 100644 --- a/project/project-6/index.html +++ b/project/project-6/index.html @@ -18,13 +18,13 @@ - + - + @@ -88,7 +88,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -101,7 +101,7 @@ - + @@ -307,9 +307,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project/project-7/index.html b/project/project-7/index.html index 9d7fc41..2e92624 100644 --- a/project/project-7/index.html +++ b/project/project-7/index.html @@ -18,13 +18,13 @@ - + - + @@ -88,7 +88,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -101,7 +101,7 @@ - + @@ -307,9 +307,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project/project-8/index.html b/project/project-8/index.html index d360fe0..5e38887 100644 --- a/project/project-8/index.html +++ b/project/project-8/index.html @@ -18,13 +18,13 @@ - + - + @@ -88,7 +88,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -101,7 +101,7 @@ - + @@ -288,9 +288,9 @@

WHAT WE DID

- - - + + + - - - - + + + + \ No newline at end of file diff --git a/project_category/brand-strategy/index.html b/project_category/brand-strategy/index.html index 880cca8..dc428d9 100644 --- a/project_category/brand-strategy/index.html +++ b/project_category/brand-strategy/index.html @@ -17,10 +17,10 @@ - + - + @@ -82,7 +82,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -92,7 +92,7 @@ - + @@ -198,8 +198,8 @@

Recent Comments

- - + + - - - - - + + + + + \ No newline at end of file diff --git a/project_category/build-a-website/index.html b/project_category/build-a-website/index.html index 2f009f3..515327d 100644 --- a/project_category/build-a-website/index.html +++ b/project_category/build-a-website/index.html @@ -17,10 +17,10 @@ - + - + @@ -82,7 +82,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -92,7 +92,7 @@ - + @@ -198,8 +198,8 @@

Recent Comments

- - + + - - - - - + + + + + \ No newline at end of file diff --git a/project_category/create-identity/index.html b/project_category/create-identity/index.html index 0e874f4..e63c03e 100644 --- a/project_category/create-identity/index.html +++ b/project_category/create-identity/index.html @@ -17,10 +17,10 @@ - + - + @@ -82,7 +82,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -92,7 +92,7 @@ - + @@ -190,8 +190,8 @@

Recent Comments

- - + + - - - - - + + + + + \ No newline at end of file diff --git a/uber-luz-media/index.html b/uber-luz-media/index.html index 662144a..0bb40ae 100644 --- a/uber-luz-media/index.html +++ b/uber-luz-media/index.html @@ -18,14 +18,14 @@ - + - + @@ -79,7 +79,7 @@ var v3d_ajax_object = {"ajax_url":".\/\/wp-admin\/admin-ajax.php","switch_on_update":""}; /* ]]> */ - + @@ -92,7 +92,7 @@ - + @@ -163,7 +163,7 @@ - + @@ -241,8 +241,8 @@ - - + + - - - + + + \ No newline at end of file diff --git a/wp-content/uploads/verge3d/29528/opentype.js b/wp-content/uploads/verge3d/29528/opentype.js index a9a7368..abef7b4 100644 --- a/wp-content/uploads/verge3d/29528/opentype.js +++ b/wp-content/uploads/verge3d/29528/opentype.js @@ -29,32 +29,32 @@ function Tree(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}f "use strict";function DefaultEncoding(e){this.font=e}function CmapEncoding(e){this.cmap=e}function CffEncoding(e,l){this.encoding=e,this.charset=l}function GlyphNames(e){var l;switch(e.version){case 1:this.names=exports.standardNames.slice();break;case 2:for(this.names=new Array(e.numberOfGlyphs),l=0;l0,"No English "+t+" specified.")}var n=[],i=this;t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),e(this.unitsPerEm>0,"No unitsPerEm specified.")},Font.prototype.toTables=function(){return sfnt.fontToTable(this)},Font.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Font.prototype.toArrayBuffer=function(){for(var e=this.toTables(),t=e.encode(),n=new ArrayBuffer(t.length),i=new Uint8Array(n),r=0;r0,"No English "+t+" specified.")}var n=[],i=this;t("fontFamily"),t("weightName"),t("manufacturer"),t("copyright"),t("version"),e(this.unitsPerEm>0,"No unitsPerEm specified.")},Font.prototype.toTables=function(){return sfnt.fontToTable(this)},Font.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()},Font.prototype.toArrayBuffer=function(){for(var e=this.toTables(),t=e.encode(),n=new ArrayBuffer(t.length),i=new Uint8Array(n),r=0;r=t;){var s=t+a>>>1,n=e[s].tag;if(n===r)return s;r>n?t=s+1:a=s-1}return-t-1}function binSearch(e,r){for(var t=0,a=e.length-1;a>=t;){var s=t+a>>>1,n=e[s];if(n===r)return s;r>n?t=s+1:a=s-1}return-t-1}var check=require("./check"),Layout={searchTag:searchTag,binSearch:binSearch,getScriptNames:function(){var e=this.getGsubTable();return e?e.scripts.map(function(e){return e.tag}):[]},getScriptTable:function(e,r){var t=this.getGsubTable(r);if(t){var a=t.scripts,s=searchTag(t.scripts,e);if(s>=0)return a[s].script;var n={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return a.splice(-1-s,0,n.script),n}},getLangSysTable:function(e,r,t){var a=this.getScriptTable(e,t);if(a){if("DFLT"===r)return a.defaultLangSys;var s=searchTag(a.langSysRecords,r);if(s>=0)return a.langSysRecords[s].langSys;if(t){var n={tag:r,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return a.langSysRecords.splice(-1-s,0,n),n.langSys}}},getFeatureTable:function(e,r,t,a){var s=this.getLangSysTable(e,r,a);if(s){for(var n,u=s.featureIndexes,i=this.font.tables.gsub.features,g=0;g=i[o-1].tag,"Features must be added in alphabetical order."),n={tag:t,feature:{params:0,lookupListIndexes:[]}},i.push(n),u.push(o),n.feature}}},getLookupTable:function(e,r,t,a,s){var n=this.getFeatureTable(e,r,t,s);if(n){for(var u,i=n.lookupListIndexes,g=this.font.tables.gsub.lookups,o=0;oa;a++)for(var s=t[a],n=s.start,u=s.end,i=n;u>=i;i++)r.push(i);return r}};module.exports=Layout; +},{"/glyph":6}],8:[function(require,module,exports){ +"use strict";function searchTag(e,r){for(var t=0,a=e.length-1;a>=t;){var s=t+a>>>1,n=e[s].tag;if(n===r)return s;r>n?t=s+1:a=s-1}return-t-1}function binSearch(e,r){for(var t=0,a=e.length-1;a>=t;){var s=t+a>>>1,n=e[s];if(n===r)return s;r>n?t=s+1:a=s-1}return-t-1}var check=require("/check"),Layout={searchTag:searchTag,binSearch:binSearch,getScriptNames:function(){var e=this.getGsubTable();return e?e.scripts.map(function(e){return e.tag}):[]},getScriptTable:function(e,r){var t=this.getGsubTable(r);if(t){var a=t.scripts,s=searchTag(t.scripts,e);if(s>=0)return a[s].script;var n={tag:e,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return a.splice(-1-s,0,n.script),n}},getLangSysTable:function(e,r,t){var a=this.getScriptTable(e,t);if(a){if("DFLT"===r)return a.defaultLangSys;var s=searchTag(a.langSysRecords,r);if(s>=0)return a.langSysRecords[s].langSys;if(t){var n={tag:r,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return a.langSysRecords.splice(-1-s,0,n),n.langSys}}},getFeatureTable:function(e,r,t,a){var s=this.getLangSysTable(e,r,a);if(s){for(var n,u=s.featureIndexes,i=this.font.tables.gsub.features,g=0;g=i[o-1].tag,"Features must be added in alphabetical order."),n={tag:t,feature:{params:0,lookupListIndexes:[]}},i.push(n),u.push(o),n.feature}}},getLookupTable:function(e,r,t,a,s){var n=this.getFeatureTable(e,r,t,s);if(n){for(var u,i=n.lookupListIndexes,g=this.font.tables.gsub.lookups,o=0;oa;a++)for(var s=t[a],n=s.start,u=s.end,i=n;u>=i;i++)r.push(i);return r}};module.exports=Layout; -},{"./check":2}],9:[function(require,module,exports){ -"use strict";function loadFromFile(e,a){var r=require("fs");r.readFile(e,function(e,r){return e?a(e.message):void a(null,util.nodeBufferToArrayBuffer(r))})}function loadFromUrl(e,a){var r=new XMLHttpRequest;r.open("get",e,!0),r.responseType="arraybuffer",r.onload=function(){return 200!==r.status?a("Font could not be loaded: "+r.statusText):a(null,r.response)},r.send()}function parseOpenTypeTableEntries(e,a){for(var r=[],s=12,t=0;a>t;t+=1){var n=parse.getTag(e,s),o=parse.getULong(e,s+4),p=parse.getULong(e,s+8),l=parse.getULong(e,s+12);r.push({tag:n,checksum:o,offset:p,length:l,compression:!1}),s+=16}return r}function parseWOFFTableEntries(e,a){for(var r=[],s=44,t=0;a>t;t+=1){var n,o=parse.getTag(e,s),p=parse.getULong(e,s+4),l=parse.getULong(e,s+8),f=parse.getULong(e,s+12);n=f>l?"WOFF":!1,r.push({tag:o,offset:p,compression:n,compressedLength:l,originalLength:f}),s+=20}return r}function uncompressTable(e,a){if("WOFF"===a.compression){var r=new Uint8Array(e.buffer,a.offset+2,a.compressedLength-2),s=new Uint8Array(a.originalLength);if(inflate(r,s),s.byteLength!==a.originalLength)throw new Error("Decompression error: "+a.tag+" decompressed length doesn't match recorded length");var t=new DataView(s.buffer,0);return{data:t,offset:0}}return{data:e,offset:a.offset}}function parseBuffer(e){var a,r,s,t=new _font.Font({empty:!0}),n=new DataView(e,0),o=[],p=parse.getTag(n,0);if(p===String.fromCharCode(0,1,0,0))t.outlinesFormat="truetype",s=parse.getUShort(n,4),o=parseOpenTypeTableEntries(n,s);else if("OTTO"===p)t.outlinesFormat="cff",s=parse.getUShort(n,4),o=parseOpenTypeTableEntries(n,s);else{if("wOFF"!==p)throw new Error("Unsupported OpenType signature "+p);var l=parse.getTag(n,4);if(l===String.fromCharCode(0,1,0,0))t.outlinesFormat="truetype";else{if("OTTO"!==l)throw new Error("Unsupported OpenType flavor "+p);t.outlinesFormat="cff"}s=parse.getUShort(n,12),o=parseWOFFTableEntries(n,s)}for(var f,u,i,c,b,m,d,g,h,T,y=0;s>y;y+=1){var v,F=o[y];switch(F.tag){case"cmap":v=uncompressTable(n,F),t.tables.cmap=cmap.parse(v.data,v.offset),t.encoding=new encoding.CmapEncoding(t.tables.cmap);break;case"fvar":u=F;break;case"head":v=uncompressTable(n,F),t.tables.head=head.parse(v.data,v.offset),t.unitsPerEm=t.tables.head.unitsPerEm,a=t.tables.head.indexToLocFormat;break;case"hhea":v=uncompressTable(n,F),t.tables.hhea=hhea.parse(v.data,v.offset),t.ascender=t.tables.hhea.ascender,t.descender=t.tables.hhea.descender,t.numberOfHMetrics=t.tables.hhea.numberOfHMetrics;break;case"hmtx":m=F;break;case"ltag":v=uncompressTable(n,F),r=ltag.parse(v.data,v.offset);break;case"maxp":v=uncompressTable(n,F),t.tables.maxp=maxp.parse(v.data,v.offset),t.numGlyphs=t.tables.maxp.numGlyphs;break;case"name":h=F;break;case"OS/2":v=uncompressTable(n,F),t.tables.os2=os2.parse(v.data,v.offset);break;case"post":v=uncompressTable(n,F),t.tables.post=post.parse(v.data,v.offset),t.glyphNames=new encoding.GlyphNames(t.tables.post);break;case"glyf":i=F;break;case"loca":g=F;break;case"CFF ":f=F;break;case"kern":d=F;break;case"GPOS":c=F;break;case"GSUB":b=F;break;case"meta":T=F}}var q=uncompressTable(n,h);if(t.tables.name=_name.parse(q.data,q.offset,r),t.names=t.tables.name,i&&g){var k=0===a,w=uncompressTable(n,g),x=loca.parse(w.data,w.offset,t.numGlyphs,k),O=uncompressTable(n,i);t.glyphs=glyf.parse(O.data,O.offset,x,t)}else{if(!f)throw new Error("Font doesn't contain TrueType or CFF outlines.");var U=uncompressTable(n,f);cff.parse(U.data,U.offset,t)}var L=uncompressTable(n,m);if(hmtx.parse(L.data,L.offset,t.numberOfHMetrics,t.numGlyphs,t.glyphs),encoding.addGlyphNames(t),d){var E=uncompressTable(n,d);t.kerningPairs=kern.parse(E.data,E.offset)}else t.kerningPairs={};if(c){var S=uncompressTable(n,c);gpos.parse(S.data,S.offset,t)}if(b){var G=uncompressTable(n,b);t.tables.gsub=gsub.parse(G.data,G.offset)}if(u){var B=uncompressTable(n,u);t.tables.fvar=fvar.parse(B.data,B.offset,t.names)}if(T){var C=uncompressTable(n,T);t.tables.meta=meta.parse(C.data,C.offset),t.metas=t.tables.meta}return t}function load(e,a){var r="undefined"==typeof window,s=r?loadFromFile:loadFromUrl;s(e,function(e,r){if(e)return a(e);var s;try{s=parseBuffer(r)}catch(t){return a(t,null)}return a(null,s)})}function loadSync(e){var a=require("fs"),r=a.readFileSync(e);return parseBuffer(util.nodeBufferToArrayBuffer(r))}var inflate=require("tiny-inflate"),encoding=require("./encoding"),_font=require("./font"),glyph=require("./glyph"),parse=require("./parse"),path=require("./path"),util=require("./util"),cmap=require("./tables/cmap"),cff=require("./tables/cff"),fvar=require("./tables/fvar"),glyf=require("./tables/glyf"),gpos=require("./tables/gpos"),gsub=require("./tables/gsub"),head=require("./tables/head"),hhea=require("./tables/hhea"),hmtx=require("./tables/hmtx"),kern=require("./tables/kern"),ltag=require("./tables/ltag"),loca=require("./tables/loca"),maxp=require("./tables/maxp"),_name=require("./tables/name"),os2=require("./tables/os2"),post=require("./tables/post"),meta=require("./tables/meta");exports._parse=parse,exports.Font=_font.Font,exports.Glyph=glyph.Glyph,exports.Path=path.Path,exports.parse=parseBuffer,exports.load=load,exports.loadSync=loadSync; -},{"./encoding":4,"./font":5,"./glyph":6,"./parse":10,"./path":11,"./tables/cff":14,"./tables/cmap":15,"./tables/fvar":16,"./tables/glyf":17,"./tables/gpos":18,"./tables/gsub":19,"./tables/head":20,"./tables/hhea":21,"./tables/hmtx":22,"./tables/kern":23,"./tables/loca":24,"./tables/ltag":25,"./tables/maxp":26,"./tables/meta":27,"./tables/name":28,"./tables/os2":29,"./tables/post":30,"./util":33,"fs":undefined,"tiny-inflate":1}],10:[function(require,module,exports){ -"use strict";function getUShort(t,r){return t.getUint16(r,!1)}function Parser(t,r){this.data=t,this.offset=r,this.relativeOffset=0}var check=require("./check");exports.getByte=function(t,r){return t.getUint8(r)},exports.getCard8=exports.getByte,exports.getUShort=exports.getCard16=getUShort,exports.getShort=function(t,r){return t.getInt16(r,!1)},exports.getULong=function(t,r){return t.getUint32(r,!1)},exports.getFixed=function(t,r){var e=t.getInt16(r,!1),s=t.getUint16(r+2,!1);return e+s/65535},exports.getTag=function(t,r){for(var e="",s=r;r+4>s;s+=1)e+=String.fromCharCode(t.getInt8(s));return e},exports.getOffset=function(t,r,e){for(var s=0,a=0;e>a;a+=1)s<<=8,s+=t.getUint8(r+a);return s},exports.getBytes=function(t,r,e){for(var s=[],a=r;e>a;a+=1)s.push(t.getUint8(a));return s},exports.bytesToString=function(t){for(var r="",e=0;ea;a++)s+=String.fromCharCode(r.getUint8(e+a));return s},Parser.prototype.parseTag=function(){return this.parseString(4)},Parser.prototype.parseLongDateTime=function(){var t=exports.getULong(this.data,this.offset+this.relativeOffset+4);return t-=2082844800,this.relativeOffset+=8,t},Parser.prototype.parseVersion=function(){var t=getUShort(this.data,this.offset+this.relativeOffset),r=getUShort(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,t+r/4096/10},Parser.prototype.skip=function(t,r){void 0===r&&(r=1),this.relativeOffset+=typeOffsets[t]*r},Parser.prototype.parseOffset16List=Parser.prototype.parseUShortList=function(t){void 0===t&&(t=this.parseUShort());for(var r=new Array(t),e=this.data,s=this.offset+this.relativeOffset,a=0;t>a;a++)r[a]=e.getUint16(s),s+=2;return this.relativeOffset+=2*t,r},Parser.prototype.parseList=function(t,r){r||(r=t,t=this.parseUShort());for(var e=new Array(t),s=0;t>s;s++)e[s]=r.call(this);return e},Parser.prototype.parseRecordList=function(t,r){r||(r=t,t=this.parseUShort());for(var e=new Array(t),s=Object.keys(r),a=0;t>a;a++){for(var o={},i=0;i0?new Parser(this.data,this.offset+r).parseStruct(t):void 0},Parser.prototype.parseListOfLists=function(t){for(var r=this.parseOffset16List(),e=r.length,s=this.relativeOffset,a=new Array(e),o=0;e>o;o++){var i=r[o];if(0!==i)if(this.relativeOffset=i,t){for(var n=this.parseOffset16List(),f=new Array(n.length),p=0;pa;a++)s[a]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:s}}check.assert(!1,"0x"+t.toString(16)+": Coverage format must be 1 or 2.")},Parser.prototype.parseClassDef=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort();return 1===r?{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()}:2===r?{format:2,ranges:this.parseRecordList({start:Parser.uShort,end:Parser.uShort,classId:Parser.uShort})}:void check.assert(!1,"0x"+t.toString(16)+": ClassDef format must be 1 or 2.")},Parser.list=function(t,r){return function(){return this.parseList(t,r)}},Parser.recordList=function(t,r){return function(){return this.parseRecordList(t,r)}},Parser.pointer=function(t){return function(){return this.parsePointer(t)}},Parser.tag=Parser.prototype.parseTag,Parser.byte=Parser.prototype.parseByte,Parser.uShort=Parser.offset16=Parser.prototype.parseUShort,Parser.uShortList=Parser.prototype.parseUShortList,Parser.struct=Parser.prototype.parseStruct,Parser.coverage=Parser.prototype.parseCoverage,Parser.classDef=Parser.prototype.parseClassDef;var langSysTable={reserved:Parser.uShort,reqFeatureIndex:Parser.uShort,featureIndexes:Parser.uShortList};Parser.prototype.parseScriptList=function(){return this.parsePointer(Parser.recordList({tag:Parser.tag,script:Parser.pointer({defaultLangSys:Parser.pointer(langSysTable),langSysRecords:Parser.recordList({tag:Parser.tag,langSys:Parser.pointer(langSysTable)})})}))},Parser.prototype.parseFeatureList=function(){return this.parsePointer(Parser.recordList({tag:Parser.tag,feature:Parser.pointer({featureParams:Parser.offset16,lookupListIndexes:Parser.uShortList})}))},Parser.prototype.parseLookupList=function(t){return this.parsePointer(Parser.list(Parser.pointer(function(){var r=this.parseUShort();check.argument(r>=1&&8>=r,"GSUB lookup type "+r+" unknown.");var e=this.parseUShort(),s=16&e;return{lookupType:r,lookupFlag:e,subtables:this.parseList(Parser.pointer(t[r])),markFilteringSet:s?this.parseUShort():void 0}})))},exports.Parser=Parser; +},{"/check":2}],9:[function(require,module,exports){ +"use strict";function loadFromFile(e,a){var r=require("fs");r.readFile(e,function(e,r){return e?a(e.message):void a(null,util.nodeBufferToArrayBuffer(r))})}function loadFromUrl(e,a){var r=new XMLHttpRequest;r.open("get",e,!0),r.responseType="arraybuffer",r.onload=function(){return 200!==r.status?a("Font could not be loaded: "+r.statusText):a(null,r.response)},r.send()}function parseOpenTypeTableEntries(e,a){for(var r=[],s=12,t=0;a>t;t+=1){var n=parse.getTag(e,s),o=parse.getULong(e,s+4),p=parse.getULong(e,s+8),l=parse.getULong(e,s+12);r.push({tag:n,checksum:o,offset:p,length:l,compression:!1}),s+=16}return r}function parseWOFFTableEntries(e,a){for(var r=[],s=44,t=0;a>t;t+=1){var n,o=parse.getTag(e,s),p=parse.getULong(e,s+4),l=parse.getULong(e,s+8),f=parse.getULong(e,s+12);n=f>l?"WOFF":!1,r.push({tag:o,offset:p,compression:n,compressedLength:l,originalLength:f}),s+=20}return r}function uncompressTable(e,a){if("WOFF"===a.compression){var r=new Uint8Array(e.buffer,a.offset+2,a.compressedLength-2),s=new Uint8Array(a.originalLength);if(inflate(r,s),s.byteLength!==a.originalLength)throw new Error("Decompression error: "+a.tag+" decompressed length doesn't match recorded length");var t=new DataView(s.buffer,0);return{data:t,offset:0}}return{data:e,offset:a.offset}}function parseBuffer(e){var a,r,s,t=new _font.Font({empty:!0}),n=new DataView(e,0),o=[],p=parse.getTag(n,0);if(p===String.fromCharCode(0,1,0,0))t.outlinesFormat="truetype",s=parse.getUShort(n,4),o=parseOpenTypeTableEntries(n,s);else if("OTTO"===p)t.outlinesFormat="cff",s=parse.getUShort(n,4),o=parseOpenTypeTableEntries(n,s);else{if("wOFF"!==p)throw new Error("Unsupported OpenType signature "+p);var l=parse.getTag(n,4);if(l===String.fromCharCode(0,1,0,0))t.outlinesFormat="truetype";else{if("OTTO"!==l)throw new Error("Unsupported OpenType flavor "+p);t.outlinesFormat="cff"}s=parse.getUShort(n,12),o=parseWOFFTableEntries(n,s)}for(var f,u,i,c,b,m,d,g,h,T,y=0;s>y;y+=1){var v,F=o[y];switch(F.tag){case"cmap":v=uncompressTable(n,F),t.tables.cmap=cmap.parse(v.data,v.offset),t.encoding=new encoding.CmapEncoding(t.tables.cmap);break;case"fvar":u=F;break;case"head":v=uncompressTable(n,F),t.tables.head=head.parse(v.data,v.offset),t.unitsPerEm=t.tables.head.unitsPerEm,a=t.tables.head.indexToLocFormat;break;case"hhea":v=uncompressTable(n,F),t.tables.hhea=hhea.parse(v.data,v.offset),t.ascender=t.tables.hhea.ascender,t.descender=t.tables.hhea.descender,t.numberOfHMetrics=t.tables.hhea.numberOfHMetrics;break;case"hmtx":m=F;break;case"ltag":v=uncompressTable(n,F),r=ltag.parse(v.data,v.offset);break;case"maxp":v=uncompressTable(n,F),t.tables.maxp=maxp.parse(v.data,v.offset),t.numGlyphs=t.tables.maxp.numGlyphs;break;case"name":h=F;break;case"OS/2":v=uncompressTable(n,F),t.tables.os2=os2.parse(v.data,v.offset);break;case"post":v=uncompressTable(n,F),t.tables.post=post.parse(v.data,v.offset),t.glyphNames=new encoding.GlyphNames(t.tables.post);break;case"glyf":i=F;break;case"loca":g=F;break;case"CFF ":f=F;break;case"kern":d=F;break;case"GPOS":c=F;break;case"GSUB":b=F;break;case"meta":T=F}}var q=uncompressTable(n,h);if(t.tables.name=_name.parse(q.data,q.offset,r),t.names=t.tables.name,i&&g){var k=0===a,w=uncompressTable(n,g),x=loca.parse(w.data,w.offset,t.numGlyphs,k),O=uncompressTable(n,i);t.glyphs=glyf.parse(O.data,O.offset,x,t)}else{if(!f)throw new Error("Font doesn't contain TrueType or CFF outlines.");var U=uncompressTable(n,f);cff.parse(U.data,U.offset,t)}var L=uncompressTable(n,m);if(hmtx.parse(L.data,L.offset,t.numberOfHMetrics,t.numGlyphs,t.glyphs),encoding.addGlyphNames(t),d){var E=uncompressTable(n,d);t.kerningPairs=kern.parse(E.data,E.offset)}else t.kerningPairs={};if(c){var S=uncompressTable(n,c);gpos.parse(S.data,S.offset,t)}if(b){var G=uncompressTable(n,b);t.tables.gsub=gsub.parse(G.data,G.offset)}if(u){var B=uncompressTable(n,u);t.tables.fvar=fvar.parse(B.data,B.offset,t.names)}if(T){var C=uncompressTable(n,T);t.tables.meta=meta.parse(C.data,C.offset),t.metas=t.tables.meta}return t}function load(e,a){var r="undefined"==typeof window,s=r?loadFromFile:loadFromUrl;s(e,function(e,r){if(e)return a(e);var s;try{s=parseBuffer(r)}catch(t){return a(t,null)}return a(null,s)})}function loadSync(e){var a=require("fs"),r=a.readFileSync(e);return parseBuffer(util.nodeBufferToArrayBuffer(r))}var inflate=require("tiny-inflate"),encoding=require("/encoding"),_font=require("/font"),glyph=require("/glyph"),parse=require("/parse"),path=require("/path"),util=require("/util"),cmap=require("/tables/cmap"),cff=require("/tables/cff"),fvar=require("/tables/fvar"),glyf=require("/tables/glyf"),gpos=require("/tables/gpos"),gsub=require("/tables/gsub"),head=require("/tables/head"),hhea=require("/tables/hhea"),hmtx=require("/tables/hmtx"),kern=require("/tables/kern"),ltag=require("/tables/ltag"),loca=require("/tables/loca"),maxp=require("/tables/maxp"),_name=require("/tables/name"),os2=require("/tables/os2"),post=require("/tables/post"),meta=require("/tables/meta");exports._parse=parse,exports.Font=_font.Font,exports.Glyph=glyph.Glyph,exports.Path=path.Path,exports.parse=parseBuffer,exports.load=load,exports.loadSync=loadSync; +},{"/encoding":4,"/font":5,"/glyph":6,"/parse":10,"/path":11,"/tables/cff":14,"/tables/cmap":15,"/tables/fvar":16,"/tables/glyf":17,"/tables/gpos":18,"/tables/gsub":19,"/tables/head":20,"/tables/hhea":21,"/tables/hmtx":22,"/tables/kern":23,"/tables/loca":24,"/tables/ltag":25,"/tables/maxp":26,"/tables/meta":27,"/tables/name":28,"/tables/os2":29,"/tables/post":30,"/util":33,"fs":undefined,"tiny-inflate":1}],10:[function(require,module,exports){ +"use strict";function getUShort(t,r){return t.getUint16(r,!1)}function Parser(t,r){this.data=t,this.offset=r,this.relativeOffset=0}var check=require("/check");exports.getByte=function(t,r){return t.getUint8(r)},exports.getCard8=exports.getByte,exports.getUShort=exports.getCard16=getUShort,exports.getShort=function(t,r){return t.getInt16(r,!1)},exports.getULong=function(t,r){return t.getUint32(r,!1)},exports.getFixed=function(t,r){var e=t.getInt16(r,!1),s=t.getUint16(r+2,!1);return e+s/65535},exports.getTag=function(t,r){for(var e="",s=r;r+4>s;s+=1)e+=String.fromCharCode(t.getInt8(s));return e},exports.getOffset=function(t,r,e){for(var s=0,a=0;e>a;a+=1)s<<=8,s+=t.getUint8(r+a);return s},exports.getBytes=function(t,r,e){for(var s=[],a=r;e>a;a+=1)s.push(t.getUint8(a));return s},exports.bytesToString=function(t){for(var r="",e=0;ea;a++)s+=String.fromCharCode(r.getUint8(e+a));return s},Parser.prototype.parseTag=function(){return this.parseString(4)},Parser.prototype.parseLongDateTime=function(){var t=exports.getULong(this.data,this.offset+this.relativeOffset+4);return t-=2082844800,this.relativeOffset+=8,t},Parser.prototype.parseVersion=function(){var t=getUShort(this.data,this.offset+this.relativeOffset),r=getUShort(this.data,this.offset+this.relativeOffset+2);return this.relativeOffset+=4,t+r/4096/10},Parser.prototype.skip=function(t,r){void 0===r&&(r=1),this.relativeOffset+=typeOffsets[t]*r},Parser.prototype.parseOffset16List=Parser.prototype.parseUShortList=function(t){void 0===t&&(t=this.parseUShort());for(var r=new Array(t),e=this.data,s=this.offset+this.relativeOffset,a=0;t>a;a++)r[a]=e.getUint16(s),s+=2;return this.relativeOffset+=2*t,r},Parser.prototype.parseList=function(t,r){r||(r=t,t=this.parseUShort());for(var e=new Array(t),s=0;t>s;s++)e[s]=r.call(this);return e},Parser.prototype.parseRecordList=function(t,r){r||(r=t,t=this.parseUShort());for(var e=new Array(t),s=Object.keys(r),a=0;t>a;a++){for(var o={},i=0;i0?new Parser(this.data,this.offset+r).parseStruct(t):void 0},Parser.prototype.parseListOfLists=function(t){for(var r=this.parseOffset16List(),e=r.length,s=this.relativeOffset,a=new Array(e),o=0;e>o;o++){var i=r[o];if(0!==i)if(this.relativeOffset=i,t){for(var n=this.parseOffset16List(),f=new Array(n.length),p=0;pa;a++)s[a]={start:this.parseUShort(),end:this.parseUShort(),index:this.parseUShort()};return{format:2,ranges:s}}check.assert(!1,"0x"+t.toString(16)+": Coverage format must be 1 or 2.")},Parser.prototype.parseClassDef=function(){var t=this.offset+this.relativeOffset,r=this.parseUShort();return 1===r?{format:1,startGlyph:this.parseUShort(),classes:this.parseUShortList()}:2===r?{format:2,ranges:this.parseRecordList({start:Parser.uShort,end:Parser.uShort,classId:Parser.uShort})}:void check.assert(!1,"0x"+t.toString(16)+": ClassDef format must be 1 or 2.")},Parser.list=function(t,r){return function(){return this.parseList(t,r)}},Parser.recordList=function(t,r){return function(){return this.parseRecordList(t,r)}},Parser.pointer=function(t){return function(){return this.parsePointer(t)}},Parser.tag=Parser.prototype.parseTag,Parser.byte=Parser.prototype.parseByte,Parser.uShort=Parser.offset16=Parser.prototype.parseUShort,Parser.uShortList=Parser.prototype.parseUShortList,Parser.struct=Parser.prototype.parseStruct,Parser.coverage=Parser.prototype.parseCoverage,Parser.classDef=Parser.prototype.parseClassDef;var langSysTable={reserved:Parser.uShort,reqFeatureIndex:Parser.uShort,featureIndexes:Parser.uShortList};Parser.prototype.parseScriptList=function(){return this.parsePointer(Parser.recordList({tag:Parser.tag,script:Parser.pointer({defaultLangSys:Parser.pointer(langSysTable),langSysRecords:Parser.recordList({tag:Parser.tag,langSys:Parser.pointer(langSysTable)})})}))},Parser.prototype.parseFeatureList=function(){return this.parsePointer(Parser.recordList({tag:Parser.tag,feature:Parser.pointer({featureParams:Parser.offset16,lookupListIndexes:Parser.uShortList})}))},Parser.prototype.parseLookupList=function(t){return this.parsePointer(Parser.list(Parser.pointer(function(){var r=this.parseUShort();check.argument(r>=1&&8>=r,"GSUB lookup type "+r+" unknown.");var e=this.parseUShort(),s=16&e;return{lookupType:r,lookupFlag:e,subtables:this.parseList(Parser.pointer(t[r])),markFilteringSet:s?this.parseUShort():void 0}})))},exports.Parser=Parser; -},{"./check":2}],11:[function(require,module,exports){ +},{"/check":2}],11:[function(require,module,exports){ "use strict";function Path(){this.commands=[],this.fill="black",this.stroke=null,this.strokeWidth=1}Path.prototype.moveTo=function(t,o){this.commands.push({type:"M",x:t,y:o})},Path.prototype.lineTo=function(t,o){this.commands.push({type:"L",x:t,y:o})},Path.prototype.curveTo=Path.prototype.bezierCurveTo=function(t,o,e,i,s,h){this.commands.push({type:"C",x1:t,y1:o,x2:e,y2:i,x:s,y:h})},Path.prototype.quadTo=Path.prototype.quadraticCurveTo=function(t,o,e,i){this.commands.push({type:"Q",x1:t,y1:o,x:e,y:i})},Path.prototype.close=Path.prototype.closePath=function(){this.commands.push({type:"Z"})},Path.prototype.extend=function(t){t.commands&&(t=t.commands),Array.prototype.push.apply(this.commands,t)},Path.prototype.draw=function(t){t.beginPath();for(var o=0;o=0&&e>0&&(t+=" "),t+=o(i)}return t}t=void 0!==t?t:2;for(var i="",s=0;sa;a++)if(t[a]!==e[a])return!1;return!0}function getSubstFormat(t,e,r){for(var a=t.subtables,s=0;si&&(i=-1-i,o.coverage.glyphs.splice(i,0,u),o.substitute.splice(i,0,0)),o.substitute[i]=e.by},Substitution.prototype.addAlternate=function(t,e,r,a){var s=this.getLookupTable(r,a,t,3,!0),o=getSubstFormat(s,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});check.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var u=e.sub,i=this.binSearch(o.coverage.glyphs,u);0>i&&(i=-1-i,o.coverage.glyphs.splice(i,0,u),o.alternateSets.splice(i,0,0)),o.alternateSets[i]=e.by},Substitution.prototype.addLigature=function(t,e,r,a){r=r||"DFLT",a=a||"DFLT";var s=this.getLookupTable(r,a,t,4,!0),o=s.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},s.subtables[0]=o),check.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var u=e.sub[0],i=e.sub.slice(1),n={ligGlyph:e.by,components:i},g=this.binSearch(o.coverage.glyphs,u);if(g>=0){for(var l=o.ligatureSets[g],c=0;ca;a++)if(t[a]!==e[a])return!1;return!0}function getSubstFormat(t,e,r){for(var a=t.subtables,s=0;si&&(i=-1-i,o.coverage.glyphs.splice(i,0,u),o.substitute.splice(i,0,0)),o.substitute[i]=e.by},Substitution.prototype.addAlternate=function(t,e,r,a){var s=this.getLookupTable(r,a,t,3,!0),o=getSubstFormat(s,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});check.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var u=e.sub,i=this.binSearch(o.coverage.glyphs,u);0>i&&(i=-1-i,o.coverage.glyphs.splice(i,0,u),o.alternateSets.splice(i,0,0)),o.alternateSets[i]=e.by},Substitution.prototype.addLigature=function(t,e,r,a){r=r||"DFLT",a=a||"DFLT";var s=this.getLookupTable(r,a,t,4,!0),o=s.subtables[0];o||(o={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},s.subtables[0]=o),check.assert(1===o.coverage.format,"Ligature: unable to modify coverage table format "+o.coverage.format);var u=e.sub[0],i=e.sub.slice(1),n={ligGlyph:e.by,components:i},g=this.binSearch(o.coverage.glyphs,u);if(g>=0){for(var l=o.ligatureSets[g],c=0;cs;s++)o[s+1]={name:e+s,type:"TABLE",value:a(t[s],s)};return o}function recordList(e,t,a){var r=t.length,o=[];o[0]={name:e+"Count",type:"USHORT",value:r};for(var s=0;r>s;s++)o=o.concat(a(t[s],s));return o}function Coverage(e){1===e.format?Table.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(ushortList("glyph",e.glyphs))):check.assert(!1,"Can't create coverage table format 2 yet.")}function ScriptList(e){Table.call(this,"scriptListTable",recordList("scriptRecord",e,function(e,t){var a=e.script,r=a.defaultLangSys;return check.assert(!!r,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new Table("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new Table("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(ushortList("featureIndex",r.featureIndexes)))}].concat(recordList("langSys",a.langSysRecords,function(e,t){var a=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new Table("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(ushortList("featureIndex",a.featureIndexes)))}]})))}]}))}function FeatureList(e){Table.call(this,"featureListTable",recordList("featureRecord",e,function(e,t){var a=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new Table("featureTable",[{name:"featureParams",type:"USHORT",value:a.featureParams}].concat(ushortList("lookupListIndex",a.lookupListIndexes)))}]}))}function LookupList(e,t){Table.call(this,"lookupListTable",tableList("lookup",e,function(e){var a=t[e.lookupType];return check.assert(!!a,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new Table("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(tableList("subtable",e.subtables,a)))}))}var check=require("./check"),encode=require("./types").encode,sizeOf=require("./types").sizeOf;Table.prototype.encode=function(){return encode.TABLE(this)},Table.prototype.sizeOf=function(){return sizeOf.TABLE(this)},Coverage.prototype=Object.create(Table.prototype),Coverage.prototype.constructor=Coverage,ScriptList.prototype=Object.create(Table.prototype),ScriptList.prototype.constructor=ScriptList,FeatureList.prototype=Object.create(Table.prototype),FeatureList.prototype.constructor=FeatureList,LookupList.prototype=Object.create(Table.prototype),LookupList.prototype.constructor=LookupList,exports.Record=exports.Table=Table,exports.Coverage=Coverage,exports.ScriptList=ScriptList,exports.FeatureList=FeatureList,exports.LookupList=LookupList,exports.ushortList=ushortList,exports.tableList=tableList,exports.recordList=recordList; +},{"/check":2,"/layout":8}],13:[function(require,module,exports){ +"use strict";function Table(e,t,a){var r;for(r=0;rs;s++)o[s+1]={name:e+s,type:"TABLE",value:a(t[s],s)};return o}function recordList(e,t,a){var r=t.length,o=[];o[0]={name:e+"Count",type:"USHORT",value:r};for(var s=0;r>s;s++)o=o.concat(a(t[s],s));return o}function Coverage(e){1===e.format?Table.call(this,"coverageTable",[{name:"coverageFormat",type:"USHORT",value:1}].concat(ushortList("glyph",e.glyphs))):check.assert(!1,"Can't create coverage table format 2 yet.")}function ScriptList(e){Table.call(this,"scriptListTable",recordList("scriptRecord",e,function(e,t){var a=e.script,r=a.defaultLangSys;return check.assert(!!r,"Unable to write GSUB: script "+e.tag+" has no default language system."),[{name:"scriptTag"+t,type:"TAG",value:e.tag},{name:"script"+t,type:"TABLE",value:new Table("scriptTable",[{name:"defaultLangSys",type:"TABLE",value:new Table("defaultLangSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:r.reqFeatureIndex}].concat(ushortList("featureIndex",r.featureIndexes)))}].concat(recordList("langSys",a.langSysRecords,function(e,t){var a=e.langSys;return[{name:"langSysTag"+t,type:"TAG",value:e.tag},{name:"langSys"+t,type:"TABLE",value:new Table("langSys",[{name:"lookupOrder",type:"USHORT",value:0},{name:"reqFeatureIndex",type:"USHORT",value:a.reqFeatureIndex}].concat(ushortList("featureIndex",a.featureIndexes)))}]})))}]}))}function FeatureList(e){Table.call(this,"featureListTable",recordList("featureRecord",e,function(e,t){var a=e.feature;return[{name:"featureTag"+t,type:"TAG",value:e.tag},{name:"feature"+t,type:"TABLE",value:new Table("featureTable",[{name:"featureParams",type:"USHORT",value:a.featureParams}].concat(ushortList("lookupListIndex",a.lookupListIndexes)))}]}))}function LookupList(e,t){Table.call(this,"lookupListTable",tableList("lookup",e,function(e){var a=t[e.lookupType];return check.assert(!!a,"Unable to write GSUB lookup type "+e.lookupType+" tables."),new Table("lookupTable",[{name:"lookupType",type:"USHORT",value:e.lookupType},{name:"lookupFlag",type:"USHORT",value:e.lookupFlag}].concat(tableList("subtable",e.subtables,a)))}))}var check=require("/check"),encode=require("/types").encode,sizeOf=require("/types").sizeOf;Table.prototype.encode=function(){return encode.TABLE(this)},Table.prototype.sizeOf=function(){return sizeOf.TABLE(this)},Coverage.prototype=Object.create(Table.prototype),Coverage.prototype.constructor=Coverage,ScriptList.prototype=Object.create(Table.prototype),ScriptList.prototype.constructor=ScriptList,FeatureList.prototype=Object.create(Table.prototype),FeatureList.prototype.constructor=FeatureList,LookupList.prototype=Object.create(Table.prototype),LookupList.prototype.constructor=LookupList,exports.Record=exports.Table=Table,exports.Coverage=Coverage,exports.ScriptList=ScriptList,exports.FeatureList=FeatureList,exports.LookupList=LookupList,exports.ushortList=ushortList,exports.tableList=tableList,exports.recordList=recordList; -},{"./check":2,"./types":32}],14:[function(require,module,exports){ +},{"/check":2,"/types":32}],14:[function(require,module,exports){ "use strict";function equals(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(var a=0;ar;r+=1)i.push(parse.getOffset(e,p,f)),p+=f;s=n+i[h]}else s=t+2;for(r=0;r>4,i=15&n;if(s===a)break;if(t+=r[s],i===a)break;t+=r[i]}return parseFloat(t)}function parseOperand(e,t){var a,r,n,s;if(28===t)return a=e.parseByte(),r=e.parseByte(),a<<8|r;if(29===t)return a=e.parseByte(),r=e.parseByte(),n=e.parseByte(),s=e.parseByte(),a<<24|r<<16|n<<8|s;if(30===t)return parseFloatOperand(e);if(t>=32&&246>=t)return t-139;if(t>=247&&250>=t)return a=e.parseByte(),256*(t-247)+a+108;if(t>=251&&254>=t)return a=e.parseByte(),256*-(t-251)-a-108;throw new Error("Invalid b0 "+t)}function entriesToObject(e){for(var t={},a=0;a=i?(12===i&&(i=1200+r.parseByte()),n.push([i,s]),s=[]):s.push(parseOperand(r,i))}return entriesToObject(n)}function getCFFString(e,t){return t=390>=t?encoding.cffStandardStrings[t]:e[t-391]}function interpretDict(e,t,a){for(var r={},n=0;nn;n+=1)s=o.parseSID(),h.push(getCFFString(r,s));else if(1===f)for(;h.length<=a;)for(s=o.parseSID(),i=o.parseCard8(),n=0;i>=n;n+=1)h.push(getCFFString(r,s)),s+=1;else{if(2!==f)throw new Error("Unknown charset format "+f);for(;h.length<=a;)for(s=o.parseSID(),i=o.parseCard16(),n=0;i>=n;n+=1)h.push(getCFFString(r,s)),s+=1}return h}function parseCFFEncoding(e,t,a){var r,n,s={},i=new parse.Parser(e,t),o=i.parseCard8();if(0===o){var h=i.parseCard8();for(r=0;h>r;r+=1)n=i.parseCard8(),s[n]=r}else{if(1!==o)throw new Error("Unknown encoding format "+o);var f=i.parseCard8();for(n=1,r=0;f>r;r+=1)for(var p=i.parseCard8(),u=i.parseCard8(),l=p;p+u>=l;l+=1)s[l]=n,n+=1}return new encoding.CffEncoding(s,a)}function parseCFFCharstring(e,t,a){function r(e,t){g&&p.closePath(),p.moveTo(e,t),g=!0}function n(){var t;t=u.length%2!==0,t&&!c&&(d=u.shift()+e.nominalWidthX),l+=u.length>>1,u.length=0,c=!0}function s(a){for(var y,b,C,T,F,I,D,x,k,S,E,O,R=0;R1&&!c&&(d=u.shift()+e.nominalWidthX,c=!0),m+=u.pop(),r(v,m);break;case 5:for(;u.length>0;)v+=u.shift(),m+=u.shift(),p.lineTo(v,m);break;case 6:for(;u.length>0&&(v+=u.shift(),p.lineTo(v,m),0!==u.length);)m+=u.shift(),p.lineTo(v,m);break;case 7:for(;u.length>0&&(m+=u.shift(),p.lineTo(v,m),0!==u.length);)v+=u.shift(),p.lineTo(v,m);break;case 8:for(;u.length>0;)i=v+u.shift(),o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),v=h+u.shift(),m=f+u.shift(),p.curveTo(i,o,h,f,v,m);break;case 10:F=u.pop()+e.subrsBias,I=e.subrs[F],I&&s(I);break;case 11:return;case 12:switch(M=a[R],R+=1,M){case 35:i=v+u.shift(),o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),D=h+u.shift(),x=f+u.shift(),k=D+u.shift(),S=x+u.shift(),E=k+u.shift(),O=S+u.shift(),v=E+u.shift(),m=O+u.shift(),u.shift(),p.curveTo(i,o,h,f,D,x),p.curveTo(k,S,E,O,v,m);break;case 34:i=v+u.shift(),o=m,h=i+u.shift(),f=o+u.shift(),D=h+u.shift(),x=f,k=D+u.shift(),S=f,E=k+u.shift(),O=m,v=E+u.shift(),p.curveTo(i,o,h,f,D,x),p.curveTo(k,S,E,O,v,m);break;case 36:i=v+u.shift(),o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),D=h+u.shift(),x=f,k=D+u.shift(),S=f,E=k+u.shift(),O=S+u.shift(),v=E+u.shift(),p.curveTo(i,o,h,f,D,x),p.curveTo(k,S,E,O,v,m);break;case 37:i=v+u.shift(),o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),D=h+u.shift(),x=f+u.shift(),k=D+u.shift(),S=x+u.shift(),E=k+u.shift(),O=S+u.shift(),Math.abs(E-v)>Math.abs(O-m)?v=E+u.shift():m=O+u.shift(),p.curveTo(i,o,h,f,D,x),p.curveTo(k,S,E,O,v,m);break;default:console.log("Glyph "+t.index+": unknown operator 1200"+M),u.length=0}break;case 14:u.length>0&&!c&&(d=u.shift()+e.nominalWidthX,c=!0),g&&(p.closePath(),g=!1);break;case 18:n();break;case 19:case 20:n(),R+=l+7>>3;break;case 21:u.length>2&&!c&&(d=u.shift()+e.nominalWidthX,c=!0),m+=u.pop(),v+=u.pop(),r(v,m);break;case 22:u.length>1&&!c&&(d=u.shift()+e.nominalWidthX,c=!0),v+=u.pop(),r(v,m);break;case 23:n();break;case 24:for(;u.length>2;)i=v+u.shift(),o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),v=h+u.shift(),m=f+u.shift(),p.curveTo(i,o,h,f,v,m);v+=u.shift(),m+=u.shift(),p.lineTo(v,m);break;case 25:for(;u.length>6;)v+=u.shift(),m+=u.shift(),p.lineTo(v,m);i=v+u.shift(),o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),v=h+u.shift(),m=f+u.shift(),p.curveTo(i,o,h,f,v,m);break;case 26:for(u.length%2&&(v+=u.shift());u.length>0;)i=v,o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),v=h,m=f+u.shift(),p.curveTo(i,o,h,f,v,m);break;case 27:for(u.length%2&&(m+=u.shift());u.length>0;)i=v+u.shift(),o=m,h=i+u.shift(),f=o+u.shift(),v=h+u.shift(),m=f,p.curveTo(i,o,h,f,v,m);break;case 28:y=a[R],b=a[R+1],u.push((y<<24|b<<16)>>16),R+=2;break;case 29:F=u.pop()+e.gsubrsBias,I=e.gsubrs[F],I&&s(I);break;case 30:for(;u.length>0&&(i=v,o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),v=h+u.shift(),m=f+(1===u.length?u.shift():0),p.curveTo(i,o,h,f,v,m),0!==u.length);)i=v+u.shift(),o=m,h=i+u.shift(),f=o+u.shift(),m=f+u.shift(),v=h+(1===u.length?u.shift():0),p.curveTo(i,o,h,f,v,m);break;case 31:for(;u.length>0&&(i=v+u.shift(),o=m,h=i+u.shift(),f=o+u.shift(),m=f+u.shift(),v=h+(1===u.length?u.shift():0),p.curveTo(i,o,h,f,v,m),0!==u.length);)i=v,o=m+u.shift(),h=i+u.shift(),f=o+u.shift(),v=h+u.shift(),m=f+(1===u.length?u.shift():0),p.curveTo(i,o,h,f,v,m);break;default:32>M?console.log("Glyph "+t.index+": unknown operator "+M):247>M?u.push(M-139):251>M?(y=a[R],R+=1,u.push(256*(M-247)+y+108)):255>M?(y=a[R],R+=1,u.push(256*-(M-251)-y-108)):(y=a[R],b=a[R+1],C=a[R+2],T=a[R+3],R+=4,u.push((y<<24|b<<16|C<<8|T)/65536))}}}var i,o,h,f,p=new path.Path,u=[],l=0,c=!1,d=e.defaultWidthX,g=!1,v=0,m=0;return s(a),t.advanceWidth=d,p}function calcCFFSubroutineBias(e){var t;return t=e.length<1240?107:e.length<33900?1131:32768}function parseCFFTable(e,t,a){a.tables.cff={};var r=parseCFFHeader(e,t),n=parseCFFIndex(e,r.endOffset,parse.bytesToString),s=parseCFFIndex(e,n.endOffset),i=parseCFFIndex(e,s.endOffset,parse.bytesToString),o=parseCFFIndex(e,i.endOffset);a.gsubrs=o.objects,a.gsubrsBias=calcCFFSubroutineBias(a.gsubrs);var h=new DataView(new Uint8Array(s.objects[0]).buffer),f=parseCFFTopDict(h,i.objects);a.tables.cff.topDict=f;var p=t+f["private"][1],u=parseCFFPrivateDict(e,p,f["private"][0],i.objects);if(a.defaultWidthX=u.defaultWidthX,a.nominalWidthX=u.nominalWidthX,0!==u.subrs){var l=p+u.subrs,c=parseCFFIndex(e,l);a.subrs=c.objects,a.subrsBias=calcCFFSubroutineBias(a.subrs)}else a.subrs=[],a.subrsBias=0;var d=parseCFFIndex(e,t+f.charStrings);a.nGlyphs=d.objects.length;var g=parseCFFCharset(e,t+f.charset,a.nGlyphs,i.objects);a.cffEncoding=0===f.encoding?new encoding.CffEncoding(encoding.cffStandardEncoding,g):1===f.encoding?new encoding.CffEncoding(encoding.cffExpertEncoding,g):parseCFFEncoding(e,t+f.encoding,g),a.encoding=a.encoding||a.cffEncoding,a.glyphs=new glyphset.GlyphSet(a);for(var v=0;v=0&&(a=r),r=t.indexOf(e),r>=0?a=r+encoding.cffStandardStrings.length:(a=encoding.cffStandardStrings.length+t.length,t.push(e)),a}function makeHeader(){return new table.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function makeNameIndex(e){var t=new table.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);t.names=[];for(var a=0;a=encoding.standardNames.length){var p=s.parseChar();n.names.push(s.parseString(p))}break;case 2.5:for(n.numberOfGlyphs=s.parseUShort(),n.offset=new Array(n.numberOfGlyphs),r=0;ra.value.tag?1:-1}),a.fields=a.fields.concat(t),a.fields=a.fields.concat(r),a}function metricsForChar(e,a,n){for(var t=0;t0){var i=e.glyphs.get(r);return i.getMetrics()}}return n}function average(e){for(var a=0,n=0;nf||void 0===a)&&f>0&&(a=f),f>m&&(m=f);var v=os2.getUnicodeRange(f);if(32>v)h|=1<v)o|=1<v)c|=1<v))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");d|=1<0?ltag.make(w):void 0,L=post.make(),A=cff.make(e.glyphs,{version:e.getEnglishName("version"),fullName:E,familyName:C,weightName:N,postScriptName:O,unitsPerEm:e.unitsPerEm,fontBBox:[0,x.yMin,x.ascender,x.advanceWidthMax]}),F=e.metas&&Object.keys(e.metas).length>0?meta.make(e.metas):void 0,G=[b,M,S,T,B,R,L,A,k];U&&G.push(U),e.tables.gsub&&G.push(gsub.make(e.tables.gsub)),F&&G.push(F);var D=makeSfntTable(G),H=D.encode(),P=computeCheckSum(H),I=D.fields,j=!1;for(g=0;ga.value.tag?1:-1}),a.fields=a.fields.concat(t),a.fields=a.fields.concat(r),a}function metricsForChar(e,a,n){for(var t=0;t0){var i=e.glyphs.get(r);return i.getMetrics()}}return n}function average(e){for(var a=0,n=0;nf||void 0===a)&&f>0&&(a=f),f>m&&(m=f);var v=os2.getUnicodeRange(f);if(32>v)h|=1<v)o|=1<v)c|=1<v))throw new Error("Unicode ranges bits > 123 are reserved for internal usage");d|=1<0?ltag.make(w):void 0,L=post.make(),A=cff.make(e.glyphs,{version:e.getEnglishName("version"),fullName:E,familyName:C,weightName:N,postScriptName:O,unitsPerEm:e.unitsPerEm,fontBBox:[0,x.yMin,x.ascender,x.advanceWidthMax]}),F=e.metas&&Object.keys(e.metas).length>0?meta.make(e.metas):void 0,G=[b,M,S,T,B,R,L,A,k];U&&G.push(U),e.tables.gsub&&G.push(gsub.make(e.tables.gsub)),F&&G.push(F);var D=makeSfntTable(G),H=D.encode(),P=computeCheckSum(H),I=D.fields,j=!1;for(g=0;g=0&&255>=e,"Byte value should be between 0 and 255."),[e]},sizeOf.BYTE=constant(1),encode.CHAR=function(e){return[e.charCodeAt(0)]},sizeOf.CHAR=constant(1),encode.CHARARRAY=function(e){for(var n=[],t=0;t>8&255,255&e]},sizeOf.USHORT=constant(2),encode.SHORT=function(e){return e>=LIMIT16&&(e=-(2*LIMIT16-e)),[e>>8&255,255&e]},sizeOf.SHORT=constant(2),encode.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},sizeOf.UINT24=constant(3),encode.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.ULONG=constant(4),encode.LONG=function(e){return e>=LIMIT32&&(e=-(2*LIMIT32-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.LONG=constant(4),encode.FIXED=encode.ULONG,sizeOf.FIXED=sizeOf.ULONG,encode.FWORD=encode.SHORT,sizeOf.FWORD=sizeOf.SHORT,encode.UFWORD=encode.USHORT,sizeOf.UFWORD=sizeOf.USHORT,encode.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.LONGDATETIME=constant(8),encode.TAG=function(e){return check.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},sizeOf.TAG=constant(4),encode.Card8=encode.BYTE,sizeOf.Card8=sizeOf.BYTE,encode.Card16=encode.USHORT,sizeOf.Card16=sizeOf.USHORT,encode.OffSize=encode.BYTE,sizeOf.OffSize=sizeOf.BYTE,encode.SID=encode.USHORT,sizeOf.SID=sizeOf.USHORT,encode.NUMBER=function(e){return e>=-107&&107>=e?[e+139]:e>=108&&1131>=e?(e-=108,[(e>>8)+247,255&e]):e>=-1131&&-108>=e?(e=-e-108,[(e>>8)+251,255&e]):e>=-32768&&32767>=e?encode.NUMBER16(e):encode.NUMBER32(e)},sizeOf.NUMBER=function(e){return encode.NUMBER(e).length},encode.NUMBER16=function(e){return[28,e>>8&255,255&e]},sizeOf.NUMBER16=constant(3),encode.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.NUMBER32=constant(5),encode.REAL=function(e){var n=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(n);if(t){var o=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));n=(Math.round(e*o)/o).toString()}var c,r,i="";for(c=0,r=n.length;r>c;c+=1){var a=n[c];i+="e"===a?"-"===n[++c]?"c":"b":"."===a?"a":"-"===a?"e":a}i+=1&i.length?"f":"ff";var f=[30];for(c=0,r=i.length;r>c;c+=2)f.push(parseInt(i.substr(c,2),16));return f},sizeOf.REAL=function(e){return encode.REAL(e).length},encode.NAME=encode.CHARARRAY,sizeOf.NAME=sizeOf.CHARARRAY,encode.STRING=encode.CHARARRAY,sizeOf.STRING=sizeOf.CHARARRAY,decode.UTF8=function(e,n,t){for(var o=[],c=t,r=0;c>r;r++,n+=1)o[r]=e.getUint8(n);return String.fromCharCode.apply(null,o)},decode.UTF16=function(e,n,t){for(var o=[],c=t/2,r=0;c>r;r++,n+=2)o[r]=e.getUint16(n);return String.fromCharCode.apply(null,o)},encode.UTF16=function(e){for(var n=[],t=0;t>8&255,n[n.length]=255&o}return n},sizeOf.UTF16=function(e){return 2*e.length};var eightBitMacEncodings={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};decode.MACSTRING=function(e,n,t,o){var c=eightBitMacEncodings[o];if(void 0===c)return void 0;for(var r="",i=0;t>i;i++){var a=e.getUint8(n+i);r+=127>=a?String.fromCharCode(a):c[127&a]}return r};var macEncodingTableCache="function"==typeof WeakMap&&new WeakMap,macEncodingCacheKeys,getMacEncodingTable=function(e){if(!macEncodingCacheKeys){macEncodingCacheKeys={};for(var n in eightBitMacEncodings)macEncodingCacheKeys[n]=new String(n)}var t=macEncodingCacheKeys[e];if(void 0===t)return void 0;if(macEncodingTableCache){var o=macEncodingTableCache.get(t);if(void 0!==o)return o}var c=eightBitMacEncodings[e];if(void 0===c)return void 0;for(var r={},i=0;i=128&&(r=t[r],void 0===r))return void 0;o[c]=r}return o},sizeOf.MACSTRING=function(e,n){var t=encode.MACSTRING(e,n);return void 0!==t?t.length:0},encode.INDEX=function(e){var n,t=1,o=[t],c=[];for(n=0;nc;c+=1){var r=parseInt(t[c],0),i=e[r];n=n.concat(encode.OPERAND(i.value,i.type)),n=n.concat(encode.OPERATOR(r))}return n},sizeOf.DICT=function(e){return encode.DICT(e).length},encode.OPERATOR=function(e){return 1200>e?[e]:[12,e-1200]},encode.OPERAND=function(e,n){var t=[];if(Array.isArray(n))for(var o=0;oc;c+=1){var r=e[c];t=t.concat(encode[r.type](r.value))}return wmm&&wmm.set(e,t),t},sizeOf.CHARSTRING=function(e){return encode.CHARSTRING(e).length},encode.OBJECT=function(e){var n=encode[e.type];return check.argument(void 0!==n,"No encoding function for type "+e.type),n(e.value)},sizeOf.OBJECT=function(e){var n=sizeOf[e.type];return check.argument(void 0!==n,"No sizeOf function for type "+e.type),n(e.value)},encode.TABLE=function(e){var n,t=[],o=e.fields.length,c=[],r=[];for(n=0;o>n;n+=1){var i=e.fields[n],a=encode[i.type];check.argument(void 0!==a,"No encoding function for field type "+i.type+" ("+i.name+")");var f=e[i.name];void 0===f&&(f=i.value);var d=a(f);"TABLE"===i.type?(r.push(t.length),t=t.concat([0,0]),c.push(d)):t=t.concat(d)}for(n=0;ns,"Table "+e.tableName+" too big."),t[u]=s>>8,t[u+1]=255&s,t=t.concat(c[n])}return t},sizeOf.TABLE=function(e){for(var n=0,t=e.fields.length,o=0;t>o;o+=1){var c=e.fields[o],r=sizeOf[c.type];check.argument(void 0!==r,"No sizeOf function for field type "+c.type+" ("+c.name+")");var i=e[c.name];void 0===i&&(i=c.value),n+=r(i),"TABLE"===c.type&&(n+=2)}return n},encode.RECORD=encode.TABLE,sizeOf.RECORD=sizeOf.TABLE,encode.LITERAL=function(e){return e},sizeOf.LITERAL=function(e){return e.length},exports.decode=decode,exports.encode=encode,exports.sizeOf=sizeOf; +},{"../check":2,"../table":13,"/cff":14,"/cmap":15,"/gsub":19,"/head":20,"/hhea":21,"/hmtx":22,"/ltag":25,"/maxp":26,"/meta":27,"/name":28,"/os2":29,"/post":30}],32:[function(require,module,exports){ +"use strict";function constant(e){return function(){return e}}var check=require("/check"),LIMIT16=32768,LIMIT32=2147483648,decode={},encode={},sizeOf={};encode.BYTE=function(e){return check.argument(e>=0&&255>=e,"Byte value should be between 0 and 255."),[e]},sizeOf.BYTE=constant(1),encode.CHAR=function(e){return[e.charCodeAt(0)]},sizeOf.CHAR=constant(1),encode.CHARARRAY=function(e){for(var n=[],t=0;t>8&255,255&e]},sizeOf.USHORT=constant(2),encode.SHORT=function(e){return e>=LIMIT16&&(e=-(2*LIMIT16-e)),[e>>8&255,255&e]},sizeOf.SHORT=constant(2),encode.UINT24=function(e){return[e>>16&255,e>>8&255,255&e]},sizeOf.UINT24=constant(3),encode.ULONG=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.ULONG=constant(4),encode.LONG=function(e){return e>=LIMIT32&&(e=-(2*LIMIT32-e)),[e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.LONG=constant(4),encode.FIXED=encode.ULONG,sizeOf.FIXED=sizeOf.ULONG,encode.FWORD=encode.SHORT,sizeOf.FWORD=sizeOf.SHORT,encode.UFWORD=encode.USHORT,sizeOf.UFWORD=sizeOf.USHORT,encode.LONGDATETIME=function(e){return[0,0,0,0,e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.LONGDATETIME=constant(8),encode.TAG=function(e){return check.argument(4===e.length,"Tag should be exactly 4 ASCII characters."),[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]},sizeOf.TAG=constant(4),encode.Card8=encode.BYTE,sizeOf.Card8=sizeOf.BYTE,encode.Card16=encode.USHORT,sizeOf.Card16=sizeOf.USHORT,encode.OffSize=encode.BYTE,sizeOf.OffSize=sizeOf.BYTE,encode.SID=encode.USHORT,sizeOf.SID=sizeOf.USHORT,encode.NUMBER=function(e){return e>=-107&&107>=e?[e+139]:e>=108&&1131>=e?(e-=108,[(e>>8)+247,255&e]):e>=-1131&&-108>=e?(e=-e-108,[(e>>8)+251,255&e]):e>=-32768&&32767>=e?encode.NUMBER16(e):encode.NUMBER32(e)},sizeOf.NUMBER=function(e){return encode.NUMBER(e).length},encode.NUMBER16=function(e){return[28,e>>8&255,255&e]},sizeOf.NUMBER16=constant(3),encode.NUMBER32=function(e){return[29,e>>24&255,e>>16&255,e>>8&255,255&e]},sizeOf.NUMBER32=constant(5),encode.REAL=function(e){var n=e.toString(),t=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(n);if(t){var o=parseFloat("1e"+((t[2]?+t[2]:0)+t[1].length));n=(Math.round(e*o)/o).toString()}var c,r,i="";for(c=0,r=n.length;r>c;c+=1){var a=n[c];i+="e"===a?"-"===n[++c]?"c":"b":"."===a?"a":"-"===a?"e":a}i+=1&i.length?"f":"ff";var f=[30];for(c=0,r=i.length;r>c;c+=2)f.push(parseInt(i.substr(c,2),16));return f},sizeOf.REAL=function(e){return encode.REAL(e).length},encode.NAME=encode.CHARARRAY,sizeOf.NAME=sizeOf.CHARARRAY,encode.STRING=encode.CHARARRAY,sizeOf.STRING=sizeOf.CHARARRAY,decode.UTF8=function(e,n,t){for(var o=[],c=t,r=0;c>r;r++,n+=1)o[r]=e.getUint8(n);return String.fromCharCode.apply(null,o)},decode.UTF16=function(e,n,t){for(var o=[],c=t/2,r=0;c>r;r++,n+=2)o[r]=e.getUint16(n);return String.fromCharCode.apply(null,o)},encode.UTF16=function(e){for(var n=[],t=0;t>8&255,n[n.length]=255&o}return n},sizeOf.UTF16=function(e){return 2*e.length};var eightBitMacEncodings={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};decode.MACSTRING=function(e,n,t,o){var c=eightBitMacEncodings[o];if(void 0===c)return void 0;for(var r="",i=0;t>i;i++){var a=e.getUint8(n+i);r+=127>=a?String.fromCharCode(a):c[127&a]}return r};var macEncodingTableCache="function"==typeof WeakMap&&new WeakMap,macEncodingCacheKeys,getMacEncodingTable=function(e){if(!macEncodingCacheKeys){macEncodingCacheKeys={};for(var n in eightBitMacEncodings)macEncodingCacheKeys[n]=new String(n)}var t=macEncodingCacheKeys[e];if(void 0===t)return void 0;if(macEncodingTableCache){var o=macEncodingTableCache.get(t);if(void 0!==o)return o}var c=eightBitMacEncodings[e];if(void 0===c)return void 0;for(var r={},i=0;i=128&&(r=t[r],void 0===r))return void 0;o[c]=r}return o},sizeOf.MACSTRING=function(e,n){var t=encode.MACSTRING(e,n);return void 0!==t?t.length:0},encode.INDEX=function(e){var n,t=1,o=[t],c=[];for(n=0;nc;c+=1){var r=parseInt(t[c],0),i=e[r];n=n.concat(encode.OPERAND(i.value,i.type)),n=n.concat(encode.OPERATOR(r))}return n},sizeOf.DICT=function(e){return encode.DICT(e).length},encode.OPERATOR=function(e){return 1200>e?[e]:[12,e-1200]},encode.OPERAND=function(e,n){var t=[];if(Array.isArray(n))for(var o=0;oc;c+=1){var r=e[c];t=t.concat(encode[r.type](r.value))}return wmm&&wmm.set(e,t),t},sizeOf.CHARSTRING=function(e){return encode.CHARSTRING(e).length},encode.OBJECT=function(e){var n=encode[e.type];return check.argument(void 0!==n,"No encoding function for type "+e.type),n(e.value)},sizeOf.OBJECT=function(e){var n=sizeOf[e.type];return check.argument(void 0!==n,"No sizeOf function for type "+e.type),n(e.value)},encode.TABLE=function(e){var n,t=[],o=e.fields.length,c=[],r=[];for(n=0;o>n;n+=1){var i=e.fields[n],a=encode[i.type];check.argument(void 0!==a,"No encoding function for field type "+i.type+" ("+i.name+")");var f=e[i.name];void 0===f&&(f=i.value);var d=a(f);"TABLE"===i.type?(r.push(t.length),t=t.concat([0,0]),c.push(d)):t=t.concat(d)}for(n=0;ns,"Table "+e.tableName+" too big."),t[u]=s>>8,t[u+1]=255&s,t=t.concat(c[n])}return t},sizeOf.TABLE=function(e){for(var n=0,t=e.fields.length,o=0;t>o;o+=1){var c=e.fields[o],r=sizeOf[c.type];check.argument(void 0!==r,"No sizeOf function for field type "+c.type+" ("+c.name+")");var i=e[c.name];void 0===i&&(i=c.value),n+=r(i),"TABLE"===c.type&&(n+=2)}return n},encode.RECORD=encode.TABLE,sizeOf.RECORD=sizeOf.TABLE,encode.LITERAL=function(e){return e},sizeOf.LITERAL=function(e){return e.length},exports.decode=decode,exports.encode=encode,exports.sizeOf=sizeOf; -},{"./check":2}],33:[function(require,module,exports){ +},{"/check":2}],33:[function(require,module,exports){ "use strict";exports.isBrowser=function(){return"undefined"!=typeof window},exports.isNode=function(){return"undefined"==typeof window},exports.nodeBufferToArrayBuffer=function(r){for(var e=new ArrayBuffer(r.length),n=new Uint8Array(e),t=0;t=i.get(e).length?(n=new $o(r),i.get(e).push(n)):n=i.get(e)[t],n},dispose:function(){i=new WeakMap}}}function ts(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new An,color:new xr};break;case"SpotLight":t={position:new An,direction:new An,color:new xr,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new An,color:new xr,distance:0,decay:0};break;case"HemisphereLight":t={direction:new An,skyColor:new xr,groundColor:new xr};break;case"RectAreaLight":t={color:new xr,position:new An,halfWidth:new An,halfHeight:new An}}return n[e.id]=t,t}}}let ns=0;function rs(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function is(t,I){const N=new ts,D=function(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dn,position:new An,shadowCameraNear:1,maxDistance:0,expBias:1};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dn,shadow:0,shadowCameraNear:1,shadowCameraFar:1e3,expBias:1};break;case"PointLight":case"RectAreaLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dn,shadowCameraNear:1,shadowCameraFar:1e3,expBias:1}}return n[e.id]=t,t}}}(),O={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numRectAreaShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],rectAreaShadow:[],rectAreaShadowMap:[],rectAreaShadowMatrix:[]};for(let e=0;e<9;e++)O.probe.push(new An);const _=new An,x=new er,y=new er;return{setup:function(n){let r=0,i=0,a=0;for(let e=0;e<9;e++)O.probe[e].set(0,0,0);let o=0,s=0,l=0,c=0,u=0,d=0,h=0,p=0,f=0;n.sort(rs);for(let e=0,t=n.length;ee.influenceDistance-t.influenceDistance)},pushPlaneReflProbe:function(e){o.push(e)}}}function os(r,i){let a=new WeakMap;return{get:function(e,t=0){let n;return!1===a.has(e)?(n=new as(r,i),a.set(e,[n])):t>=a.get(e).length?(n=new as(r,i),a.get(e).push(n)):n=a.get(e)[t],n},dispose:function(){a=new WeakMap}}}class ss extends Yr{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.useSlopeScaledBias=!1,this.slopeScaledBias=0,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.useSlopeScaledBias=e.useSlopeScaledBias,this.slopeScaledBias=e.slopeScaledBias,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}ss.prototype.isMeshDepthMaterial=!0;class ls extends Yr{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new An,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.defines={DISTANCE_SCALE:"1.0"},this.distancePacking=Nt,this.useSlopeScaledBias=!1,this.slopeScaledBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.distancePacking=e.distancePacking,this.useSlopeScaledBias=e.useSlopeScaledBias,this.slopeScaledBias=e.slopeScaledBias,this}}ls.prototype.isMeshDistanceMaterial=!0;var cs="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\nfloat mean = 0.0;\nfloat squared_mean = 0.0;\nfloat depth = unpackRGBAToDepth(texture2D(shadow_pass, (gl_FragCoord.xy) / resolution));\nfor (float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n#ifdef HORIZONTAL_PASS\nvec2 distribution = unpackRGBATo2Half(texture2D(shadow_pass, (gl_FragCoord.xy + vec2(i, 0.0) * radius) / resolution));\nmean += distribution.x;\nsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n#else\nfloat depth = unpackRGBAToDepth(texture2D(shadow_pass, (gl_FragCoord.xy + vec2(0.0, i) * radius) / resolution));\nmean += depth;\nsquared_mean += depth * depth;\n#endif\n}\nmean = mean * HALF_SAMPLE_RATE;\nsquared_mean = squared_mean * HALF_SAMPLE_RATE;\nfloat std_dev = sqrt(squared_mean - mean * mean);\ngl_FragColor = pack2HalfToRGBA(vec2(mean, std_dev));\n}",us="void main() {\ngl_Position = vec4(position, 1.0);\n}";const ds=new er,hs=new An,ps=new An;class fs{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new dn(512,512),this.map=null,this.mapPass=null,this.matrix=new er,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ca,this._frameExtents=new dn(1,1),this._viewportCount=1,this._viewports=[new _n(0,0,1,1)],this.expBias=1,this.slopeScaledBias=0,this._additionalMap2D=null,this._additionalMapCube=null}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;hs.setFromMatrixPosition(e.matrixWorld),t.position.copy(hs),ps.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(ps),t.updateMatrixWorld(),ds.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ds),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose(),null!==this._additionalMap2D&&this._additionalMap2D.dispose(),null!==this._additionalMapCube&&this._additionalMapCube.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this.expBias=e.expBias,this.slopeScaledBias=e.slopeScaledBias,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}fs.prototype.isLightShadow=!0;const ms=Math.PI/4,vs=new er,gs=new An,_s=new An;class xs extends fs{constructor(){super(new Ji(50,1,.5,500)),this.focus=1,this.useOmniMaps=!1,this.useMinFov90=!1,this._frameExtentsOmni=new dn(4,2),this._viewportCountOmni=6,this._viewportsOmni=[new _n(2,1,1,1),new _n(0,1,1,1),new _n(3,1,1,1),new _n(1,1,1,1),new _n(3,0,1,1),new _n(1,0,1,1)],this._cubeDirections=[new An(1,0,0),new An(-1,0,0),new An(0,0,1),new An(0,0,-1),new An(0,1,0),new An(0,-1,0)],this._cubeUps=[new An(0,1,0),new An(0,1,0),new An(0,1,0),new An(0,1,0),new An(0,0,1),new An(0,0,-1)]}updateMatrices(e,t=0){if(this.useOmniMaps){const i=this.camera,a=this.matrix;gs.setFromMatrixPosition(e.matrixWorld),i.position.copy(gs),_s.copy(i.position),_s.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(_s),i.updateMatrixWorld(),a.makeTranslation(-gs.x,-gs.y,-gs.z),vs.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(vs)}else{const o=this.camera;var n=2*jt*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,t=e.distance||o.far;n===o.fov&&r===o.aspect&&t===o.far||(o.fov=n,o.aspect=r,o.far=t,o.updateProjectionMatrix()),super.updateMatrices(e)}}getViewportCount(){return this.useOmniMaps?this._viewportCountOmni:super.getViewportCount()}getViewport(e){return this.useOmniMaps?this._viewportsOmni[e]:super.getViewport(e)}getFrameExtents(){return this.useOmniMaps?this._frameExtentsOmni:super.getFrameExtents()}calcUseOmniMaps(e){return e>ms?this.useOmniMaps=!0:this.useOmniMaps=!1,this.useOmniMaps}copy(e){return super.copy(e),this.focus=e.focus,this.useOmniMaps=e.useOmniMaps,this.useMinFov90=e.useMinFov90,this}}xs.prototype.isSpotLightShadow=!0;class ys extends Ki{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,o=r+t,s=r-t;null!==this.view&&this.view.enabled&&(r=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom,i+=r*this.view.offsetX,a=i+r*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height),this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}ys.prototype.isOrthographicCamera=!0;const bs=.8,Ms=.2,As=.8,ws=50;function Ss(m,f,e){let v=new ca;const p=new dn,g=new dn,_=new _n,r=[],i=[],x={},y=e.maxTextureSize,d=e.isWebGL2,b={0:Be,1:Fe,2:ze},M=new Qi({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new dn},radius:{value:4}},vertexShader:us,fragmentShader:cs}),A=M.clone();A.defines.HORIZONTAL_PASS=1;const t=new Ti;t.setAttribute("position",new Kr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Hi(t,M),h=new er,c=new er,S=new dn(y,y),T=new An,C=new An,E=new An,L=[new An(1,0,0),new An(-1,0,0),new An(0,1,0),new An(0,-1,0),new An(0,0,1),new An(0,0,-1)],R=[new An(0,1,0),new An(0,1,0),new An(0,0,1),new An(0,0,-1),new An(0,1,0),new An(0,1,0)],P=new Xn,u=[new An,new An,new An,new An,new An,new An,new An,new An],I=new Hi(new ha(1,1,1,1));I.name="esmFarPlane",I.castShadow=!0,I.material.shadowSide=Fe;const N=0,D=1,O=0,F=1,B=new ys(-1,1,1,-1,0,10),z=new Hi(new ha(2,2)),V=new Qi({type:"ShadowCubeOctahedral",defines:Object.assign({},ma.cubeOctahedral.defines),uniforms:qi.clone(ma.cubeOctahedral.uniforms),vertexShader:ma.cubeOctahedral.vertexShader,fragmentShader:ma.cubeOctahedral.fragmentShader}),l={},U={},G=this;function k(e){var t=e<<0;let n=r[t];return void 0===n&&(n=new ss({depthPacking:It,morphTargets:e}),r[t]=n),n}function W(e){var t=e<<0;let n=i[t];return void 0===n&&(n=new ls({morphTargets:e}),i[t]=n),n}function H(e,t,n,r,i,a,o,s,l){let c=null,u=k,d=e.customDepthMaterial;!s&&o!==ee||(u=W,d=e.customDistanceMaterial);let h=!1;if(c=void 0===d?(!0===n.morphTargets&&(h=t.morphAttributes&&t.morphAttributes.position&&0y||p.y>y)&&(p.x>y&&(g.x=Math.floor(y/o.x),p.x=g.x*o.x,a.mapSize.x=g.x),p.y>y&&(g.y=Math.floor(y/o.y),p.y=g.y*o.y,a.mapSize.y=g.y)),r.isSpotLight&&a.map&&a.map.width/a.map.height!=2&&(o=a.map,a.map=a._additionalMap2D,a._additionalMap2D=o);var s=r.isPointLight||r.isRectAreaLight||r.isSpotLight&&a.useOmniMaps;s?r.isSpotLight&&(e.fov=90,e.updateProjectionMatrix()):r.isDirectionalLight?(r.shadow.isDirectionalLightShadowCSM&&(l=Z(n,a,p,P),e.left=l.center.x-l.radius,e.right=l.center.x+l.radius,e.top=l.center.y+l.radius,e.bottom=l.center.y-l.radius,e.near=-l.center.z-l.radius,e.far=-l.center.z+l.radius,e.updateProjectionMatrix()),l=r.getWorldDirection(E),C.addScaledVector(l,e.near)):r.isSpotLight&&a.useMinFov90&&(e.fov=90,e.updateProjectionMatrix()),null!==a.map||s||i!==$||(c={minFilter:Ie,magFilter:Ie,format:je},a.map=new xn(p.x,p.y,c),a.map.texture.name=r.name+".shadowMap",a.mapPass=new xn(p.x,p.y,c),e.updateProjectionMatrix()),null===a.map&&(u={minFilter:Ge,magFilter:Ge,format:je},a.map=new xn(p.x,p.y,u),a.map.texture.name=r.name+".shadowMap",e.updateProjectionMatrix()),m.state.buffers.color.setClear(1,1,1,1),m.setRenderTarget(a.map),m.clear();var l,c,u,d=a.getViewportCount();for(let e=0;e>2&1,e>>1&1,a).multiplyScalar(2).subScalar(1).applyMatrix4(t.projectionMatrixInverse),1==a&&l.multiplyScalar(i)}r.setFromPoints(u),c.multiplyMatrices(e.camera.matrixWorldInverse,t.matrixWorld);const o=r.center.applyMatrix4(c);var s=r.radius*=c.getMaxScaleOnAxis(),e=n.x/2/s,s=n.y/2/s;return o.x=Math.round(o.x*e)/e,o.y=Math.round(o.y*s)/s,r}function q(e,t,n,r){let i,a,o,s,l,c;t.isPerspectiveCamera?(i=a=0,o=-.999*t.far,s=l=2*-o*Math.tan(Jt(t.fov)/2),c=1):t.isOrthographicCamera&&(i=(t.right+t.left)/2,a=(t.top+t.bottom)/2,o=-.999*t.far,s=t.right-t.left,l=t.top-t.bottom,c=1),t.add(I),I.scale.set(s,l,c),I.position.set(i,a,o),I.updateMatrixWorld(),X(I,e,t,n,r,!0)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=K,this.esmDistanceScale=1,this.render=function(n,r,i){if(!1!==G.enabled&&(!1!==G.autoUpdate||!1!==G.needsUpdate)&&0!==n.length){var e=m.getRenderTarget(),t=m.getActiveCubeFace(),a=m.getActiveMipmapLevel();const s=m.state;s.setBlending(re),s.buffers.color.setClear(1,1,1,1),s.buffers.depth.setTest(!0),s.setScissorTest(!1);for(let e=0,t=n.length;er||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const a=t?nn:Math.floor;r=a(i*e.width),t=a(i*e.height);void 0===l&&(l=c(r,t));const o=n?c(r,t):l;o.width=r,o.height=t;const s=o.getContext("2d");return s.drawImage(e,0,0,r,t),console.warn("v3d.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+r+"x"+t+")."),o}return"data"in e&&console.warn("v3d.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function A(e){return en(e.width)&&en(e.height)}function w(e,t){return e.generateMipmaps&&t&&e.minFilter!==Ge&&e.minFilter!==Ie}function S(e,t,n,r){m.generateMipmap(e);const i=g.get(t);i.__maxMipLevel=Math.log(Math.max(n,r))*Math.LOG2E}function T(e,t,n){if(!1===b)return t;if(null!==e){if(void 0!==m[e])return m[e];console.warn("v3d.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+e+"'")}let r=t;return 6403===t&&(5126===n&&(r=33326),5131===n&&(r=33325),5121===n&&(r=33321)),6407===t&&(5126===n&&(r=34837),5131===n&&(r=34843),5121===n&&(r=32849)),6408===t&&(5126===n&&(r=34836),5131===n&&(r=34842),5121===n&&(r=32856)),33325!==r&&33326!==r&&34842!==r&&34836!==r||i.get("EXT_color_buffer_float"),r}function o(e){return e===Ge||e===k||e===W?9728:9729}function s(e){const t=e.target;var n;t.removeEventListener("dispose",s),n=t,void 0!==(e=g.get(n)).__webglInit&&(m.deleteTexture(e.__webglTexture),g.remove(n)),t.isVideoTexture&&a.delete(t),y.memory.textures--,y.removeTextureSpec(t)}function C(e){const t=e.target;t.removeEventListener("dispose",C),function(e){var n=e.texture,t=g.get(e),r=g.get(n);if(e){if(void 0!==r.__webglTexture&&(m.deleteTexture(r.__webglTexture),y.memory.textures--),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)m.deleteFramebuffer(t.__webglFramebuffer[e]),t.__webglDepthbuffer&&m.deleteRenderbuffer(t.__webglDepthbuffer[e]);else m.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&m.deleteRenderbuffer(t.__webglDepthbuffer),t.__webglMultisampledFramebuffer&&m.deleteFramebuffer(t.__webglMultisampledFramebuffer),t.__webglColorRenderbuffer&&m.deleteRenderbuffer(t.__webglColorRenderbuffer),t.__webglDepthRenderbuffer&&m.deleteRenderbuffer(t.__webglDepthRenderbuffer);if(e.isWebGLMultipleRenderTargets)for(let e=0,t=n.length;e=t&&console.warn("v3d.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+t),d+=1,e},this.resetTextureUnits=function(){d=0},this.setTexture2D=h,this.setTexture2DArray=function(e,t){var n=g.get(e);0{e.isLight?(n.pushLight(e),e.castShadow&&n.pushShadow(e)):e.isCubeReflectionProbe?n.pushEnvMapProbe(e):e.isPlaneReflectionProbe&&n.pushPlaneReflProbe(e)}),n.setupLights(t),n.sortEnvMapProbes();let r=null;return null!==e.worldEnvMapProbe&&null!==e.worldEnvMapProbe.renderTarget&&(r=e.worldEnvMapProbe.renderTarget.texture),e.traverse(t=>{if(t.material){const e=Array.isArray(t.material)?t.material:[t.material];e.forEach(e=>{(e.isMeshStandardMaterial||e.isMeshPhysicalMaterial||e.isMeshNodeMaterial)&&(t.material.envMap=r,t.material.needsUpdate=!0)})}}),n},this.compile=function(i,e){const a=ce.get(i,h.length);this._compilePrepareRenderState(i,e,a);const o={};i.traverse(function(t){var n=t.material;if(n)if(Array.isArray(n))for(let e=0;ee.intersectsMesh(t))||null}function De(e,t,r,n){!0!==t.isScene&&(t=U),te.resetTextureUnits();var i=t.fog,a=r.isMeshStandardMaterial?t.environment:null,o=null===L?E.outputEncoding:L.texture.encoding;r.envMapAutoAssign&&(r.isMeshStandardMaterial||r.isMeshPhysicalMaterial||r.isMeshNodeMaterial)&&((d=C.state.envMapProbeArray.find(e=>{return null===e.influenceGroup?e.intersectsMesh(n):n.groupNames.includes(e.influenceGroup)^e.influenceGroupInv})||t.worldEnvMapProbe)&&(r.envMap=(null==(l=d.renderTarget)?void 0:l.texture)||null,c=d.parallaxDistance,r.envMapParallaxMatrix.copy(d.matrixWorldInverse).premultiply(H.makeScale(1/c,1/c,1/c)),r.envMapParallaxMatrixInv.copy(d.matrixWorld).multiply(H.makeScale(c,c,c)),r.envMapParallaxType=d.parallaxType));var s=ne.get(r.envMap||a),l=!0===r.vertexColors&&n.geometry&&n.geometry.attributes.color&&4===n.geometry.attributes.color.itemSize,c=r.side===Be;const u=ee.get(r);var d=C.state.lights;!0===F&&(!0!==B&&e===P||(p=e===P&&r.id===R,ue.setState(r,e,p)));var h,a=Ne(n,r,C),p=r.isMeshNodeMaterial&&r.canUseGTAO()&&E.gtaoMap;let f=!1,m=!1;if(r.version===u.__version)(!u.needsLights||u.lightsStateVersion===d.state.version)&&u.outputEncoding===o&&(!n.isInstancedMesh||!1!==u.instancing)&&(n.isInstancedMesh||!0!==u.instancing)&&(!n.isSkinnedMesh||!1!==u.skinning)&&(n.isSkinnedMesh||!0!==u.skinning)?u.envMap!==s?(f=!0,m=!0):(r.fog&&u.fog!==i||void 0!==u.numClippingPlanes&&(u.numClippingPlanes!==ue.numPlanes||u.numIntersection!==ue.numIntersection)||u.vertexAlphas!==l||u.planeReflProbe!==a||r.isMeshNormalMaterial&&u.flipSided!==c||u.useGTAO!==p)&&(f=!0):f=!0;else if(f=!0,u.__version=r.version,r.nodeRGBArr)for(let e=0;ee.far||t.push({distance:n,point:qs.clone(),uv:Hr.getUV(qs,tl,nl,rl,il,al,ol,new dn),face:null,object:this}))}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function ll(e,t,n,r,i,a){Js.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?($s.x=a*Js.x-i*Js.y,$s.y=i*Js.x+a*Js.y):$s.copy(Js),e.copy(t),e.x+=$s.x,e.y+=$s.y,e.applyMatrix4(el)}sl.prototype.isSprite=!0;const cl=new An,ul=new An;class dl extends Nr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);var n=e.levels;for(let e=0,t=n.length;e=r[e].distance;e++)r[e-1].object.visible=!1,r[e].object.visible=!0;for(this._currentLevel=e-1;en.far||r.push({distance:d,point:f.clone().applyMatrix4(this.matrixWorld),index:e,face:null,faceIndex:null,object:this}))}else for(let e=Math.max(0,a.start),t=Math.min(c.count,a.start+a.count)-1;en.far||r.push({distance:l,point:f.clone().applyMatrix4(this.matrixWorld),index:e,face:null,faceIndex:null,object:this}))}else e.isGeometry&&console.error("v3d.Line.raycast() no longer supports v3d.Geometry. Use v3d.BufferGeometry instead.")}}updateMorphTargets(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(0i.far||a.push({distance:r,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:o})}}Hl.prototype.isPoints=!0;class jl extends vn{constructor(t,e,n,r,i,a,o,s,l){super(t,e,n,r,i,a,o,s,l),this.format=void 0!==o?o:Oe,this.minFilter=void 0!==a?a:Ie,this.magFilter=void 0!==i?i:Ie,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)})}clone(){return new this.constructor(this.image).copy(this)}update(){var e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}jl.prototype.isVideoTexture=!0;class Yl extends vn{constructor(e,t,n,r,i,a,o,s,l,c,u,d){super(null,a,o,s,l,c,r,i,u,d),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}Yl.prototype.isCompressedTexture=!0;class Zl extends vn{constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r,i,a,o,s,l),this.needsUpdate=!0}}Zl.prototype.isCanvasTexture=!0;class ql extends vn{constructor(e,t,n,r,i,a,o,s,l,c){if((c=void 0!==c?c:Ye)!==Ye&&c!==Ze)throw new Error("DepthTexture format must be either v3d.DepthFormat or v3d.DepthStencilFormat");super(null,r,i,a,o,s,c,n=void 0===(n=void 0===n&&c===Ye?V:n)&&c===Ze?De:n,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:Ge,this.minFilter=void 0!==s?s:Ge,this.flipY=!1,this.generateMipmaps=!1}}ql.prototype.isDepthTexture=!0;class Ql extends Ti{constructor(n=1,r=8,i=0,a=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:n,segments:r,thetaStart:i,thetaLength:a},r=Math.max(3,r);const t=[],o=[],s=[],l=[],c=new An,u=new dn;o.push(0,0,0),s.push(0,0,1),l.push(.5,.5);for(let e=0,t=3;e<=r;e++,t+=3){var d=i+e/r*a;c.x=n*Math.cos(d),c.y=n*Math.sin(d),o.push(c.x,c.y,c.z),s.push(0,0,1),u.x=(o[t]/n+1)/2,u.y=(o[t+1]/n+1)/2,l.push(u.x,u.y)}for(let e=1;e<=r;e++)t.push(e,e+1,0);this.setIndex(t),this.setAttribute("position",new oi(o,3)),this.setAttribute("normal",new oi(s,3)),this.setAttribute("uv",new oi(l,2))}static fromJSON(e){return new Ql(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Kl extends Ti{constructor(m=1,v=1,g=1,_=8,x=1,e=!1,y=0,b=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:m,radiusBottom:v,height:g,radialSegments:_,heightSegments:x,openEnded:e,thetaStart:y,thetaLength:b};const M=this;_=Math.floor(_),x=Math.floor(x);const A=[],w=[],S=[],T=[];let C=0;const E=[],L=g/2;let R=0;function t(t){var n=C;const r=new dn,i=new An;let a=0;var o=!0===t?m:v,s=!0===t?1:-1;for(let e=1;e<=_;e++)w.push(0,L*s,0),S.push(0,s,0),T.push(.5,.5),C++;var l=C;for(let e=0;e<=_;e++){var c=e/_*b+y,u=Math.cos(c),c=Math.sin(c);i.x=o*c,i.y=L*s,i.z=o*u,w.push(i.x,i.y,i.z),S.push(0,s,0),r.x=.5*u+.5,r.y=.5*c*s+.5,T.push(r.x,r.y),C++}for(let e=0;e<_;e++){var d=n+e,h=l+e;!0===t?A.push(h,h+1,d):A.push(h+1,h,d),a+=3}M.addGroup(R,a,!0===t?1:2),R+=a}!function(){const t=new An,n=new An;let r=0;var i=(v-m)/g;for(let e=0;e<=x;e++){const f=[];var a=e/x,o=a*(v-m)+m;for(let e=0;e<=_;e++){var s=e/_,l=s*b+y,c=Math.sin(l),l=Math.cos(l);n.x=o*c,n.y=-a*g+L,n.z=o*l,w.push(n.x,n.y,n.z),t.set(c,i,l).normalize(),S.push(t.x,t.y,t.z),T.push(s,1-a),f.push(C++)}E.push(f)}for(let t=0;t<_;t++)for(let e=0;eNumber.EPSILON&&(o.normalize(),u=Math.acos(Zt(r[e-1].dot(r[e]),-1,1)),i[e].applyMatrix4(s.makeRotationAxis(o,u))),a[e].crossVectors(r[e],i[e]);if(!0===e){let t=Math.acos(Zt(i[0].dot(i[n]),-1,1));t/=n,0r;)i-=r;ir.length-2?r.length-1:a+1],a=r[a>r.length-3?r.length-1:a+2];return n.set(mc(o,t.x,e.x,i.x,a.x),mc(o,t.y,e.y,i.y,a.y)),n}copy(n){super.copy(n),this.points=[];for(let e=0,t=n.points.length;e=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if((a=s)===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x=n.x&&n.x>=c&&r!==n.x&&Ic(io.x||n.x===o.x&&function(e,t){return Nc(e.prev,e,t.prev)<0&&Nc(t.next,e,e.next)<0}(o,n)))&&(o=n,d=h)),n=n.next,n!==l;);return o}(e,t))&&(e=Vc(t,e),Ec(t,t.next),Ec(e,e.next))}(i[a],n),n=Ec(n,n.next);return n}(t,e,a,n)),t.length>80*n){s=c=t[0],l=u=t[1];for(let e=n;ec&&(c=d),h>u&&(u=h);p=Math.max(c-s,u-l),p=0!==p?1/p:0}return Lc(a,o,n,s,l,p),o}};function Cc(e,t,n,r,i){let a,o;if(i===0=t;a-=r)o=Uc(a,e[a],e[a+1],o);return o&&Dc(o,o.next)&&(Gc(o),o=o.next),o}function Ec(e,t){if(!e)return e;t=t||e;let n=e,r;do{if(r=!1,n.steiner||!Dc(n,n.next)&&0!==Nc(n.prev,n,n.next))n=n.next;else{if(Gc(n),n=t=n.prev,n===n.next)break;r=!0}}while(r||n!==t);return t}function Lc(r,i,a,o,s,l,c){if(r){!c&&l&&function(e,t,n,r){let i=e;for(;null===i.z&&(i.z=Pc(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,a,o,s,l,c=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;ta.x?i.x>o.x?i:o:a.x>o.x?a:o).x,u=(i.y>a.y?i.y>o.y?i:o:a.y>o.y?a:o).y,d=Pc(s,l,t,n,r),h=Pc(c,u,t,n,r);let p=e.prevZ,f=e.nextZ;for(;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=Nc(p.prev,p,p.next))return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=Nc(f.prev,f,f.next))return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=Nc(p.prev,p,p.next))return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=Nc(f.prev,f,f.next))return!1;f=f.nextZ}return!0}(r,o,s,l):function(e){var t=e.prev,n=e,r=e.next;if(0<=Nc(t,n,r))return!1;let i=e.next.next;for(;i!==e.prev;){if(Ic(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&0<=Nc(i.prev,i,i.next))return!1;i=i.next}return!0}(r))i.push(t.i/a),i.push(r.i/a),i.push(n.i/a),Gc(r),r=n.next,e=n.next;else if((r=n)===e){c?1===c?Lc(r=function(e,t,n){let r=e;do{var i=r.prev,a=r.next.next;!Dc(i,a)&&Oc(i,r,r.next,a)&&zc(i,a)&&zc(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Gc(r),Gc(r.next),r=e=a),r=r.next}while(r!==e);return Ec(r)}(Ec(r),i,a),i,a,o,s,l,2):2===c&&function(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Oc(n,n.next,e,t))return!0}while(n=n.next,n!==e);return!1}(e,t)&&(zc(e,t)&&zc(t,e)&&function(e,t){let n=e,r=!1;var i=(e.x+t.x)/2,a=(e.y+t.y)/2;for(;n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}(e,t)&&(Nc(e.prev,e,t.prev)||Nc(e,t.prev,t))||Dc(e,t)&&0=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Bc(e){return 0Number.EPSILON){var d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),p=t.x-s/d,d=t.y+o/d,h=((n.x-c/h-p)*c-(n.y+l/h-d)*l)/(o*c-s*l);r=p+o*h-e.x,i=d+s*h-e.y;e=r*r+i*i;if(e<=2)return new dn(r,i);a=Math.sqrt(e/2)}else{let e=!1;o>Number.EPSILON?l>Number.EPSILON&&(e=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),a=e?(r=-s,i=o,Math.sqrt(u)):(r=o,i=s,Math.sqrt(u/2))}return new dn(r/a,i/a)}const E=[];for(let e=0,t=M.length,n=t-1,r=e+1;e!(p[3*e]===p[3*t]&&p[3*e+1]===p[3*t+1]&&p[3*e+2]===p[3*t+2]||p[3*e]===p[3*n]&&p[3*e+1]===p[3*n+1]&&p[3*e+2]===p[3*n+2]||p[3*t]===p[3*n]&&p[3*t+1]===p[3*n+1]&&p[3*t+2]===p[3*n+2]);for(let e=0;e<3;e++)M[e]=new er;var H=t?32:28,X=n+1;let j=0,Y=0,Z=0,q=0,Q=0;for(let r=a?0:20;ru?1:-1,0):N.set(T.x,T.z,-T.y),p[Y++]=d*A[0],p[Y++]=d*(A[2]-u),p[Y++]=-d*A[1],f[Z++]=N.x,f[Z++]=N.y,f[Z++]=N.z,m[q++]=1-J,m[q++]=1-K}}for(let t=0;t=a)break e;var s=n[1];t=a)break t}e=r,r=0}for(;r>>1;t "+r[i]+";"}t+="}",console.log(t)},l.DiGraph=u;function n(e,t,n){this.v=e,this.w=t,this.weight=n}n.prototype.either=function(){return this.v},n.prototype.other=function(e){return e==this.v?this.w:this.v},n.prototype.from=function(){return this.v},n.prototype.to=function(){return this.w},n.prototype.copy=function(){var e,t=new n(0,0,0);for(e in this)this.hasOwnProperty(e)&&(t[e]=this[e]);return t},l.Edge=n;e=function(e,t){this.s=t;var n=e.V;this.marked=[],this.edgeTo=[];for(var r=0;r "+n);(i<1||1!=i&&"normal"==r)&&(a="mix("+r+","+a+","+we(i)+")","normal"==r&&(a="normalize("+a+")"));return a}($[0].name,$[0].type,J,ne,te)}):console.error("MeshNodeMaterial: wrong node connections")):ie?q.inputs.push({code:"normal"}):q.inputs.push({code:Ae(J,K)})}}function de(e,t,n){for(var r=e.findInEdges(t),i=0;i"+a+", please reexport your scene")}for(i=0;ia.tracks[e].times[0]&&(c=a.tracks[e].times[0]);for(let e=0;e=m.times[l]){var l=l*o+e,d=l+o-e;n=Zu.arraySlice(m.values,l,d)}else{const _=m.createInterpolant();d=e,o=o-e;_.evaluate(a),n=Zu.arraySlice(_.resultBuffer,d,o)}if("quaternion"===v){const x=(new Mn).fromArray(n).normalize().conjugate();x.toArray(n)}var h=g.times.length;for(let e=0;et;)--o;return++o,0===a&&o===i||(a>=o&&(o=Math.max(o,1),a=o-1),n=this.getValueSize(),this.times=Zu.arraySlice(r,a,o),this.values=Zu.arraySlice(this.values,a*n,o*n)),this}validate(){let n=!0;var e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("v3d.KeyframeTrack: Invalid value size in track.",this),n=!1);var t=this.times,r=this.values,i=t.length;0===i&&(console.error("v3d.KeyframeTrack: Track is empty.",this),n=!1);let a=null;for(let e=0;e!==i;e++){var o=t[e];if("number"==typeof o&&isNaN(o)){console.error("v3d.KeyframeTrack: Time is not a valid number.",this,e,o),n=!1;break}if(null!==a&&a>o){console.error("v3d.KeyframeTrack: Out of order keys.",this,e,o,a),n=!1;break}a=o}if(void 0!==r&&Zu.isTypedArray(r))for(let e=0,t=r.length;e!==t;++e){var s=r[e];if(isNaN(s)){console.error("v3d.KeyframeTrack: Value is not a valid number.",this,e,s),n=!1;break}}return n}optimize(){const n=Zu.arraySlice(this.times),r=Zu.arraySlice(this.values),i=this.getValueSize(),a=this.getInterpolation()===St,o=n.length-1;let s=1;for(let e=1;e=t){var i=n[r]-t;const o=this.curves[r];var a=o.getLength();return o.getPointAt(0===a?0:1-i/a)}r++}return null}getLength(){var e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const n=[];let r=0;for(let e=0,t=this.curves.length;eNumber.EPSILON){if(r<0&&(e=s[a],n=-n,t=s[i],r=-r),!(o.yt.y))if(o.y===e.y){if(o.x===e.x)return 1}else{var c=r*(o.x-e.x)-n*(o.y-e.y);if(0==c)return 1;c<0||(l=!l)}}else if(o.y===e.y&&(t.x<=o.x&&o.x<=e.x||e.x<=o.x&&o.x<=t.x))return 1}return l}(g.p,d[e].p)||(r!==e&&_.push({froms:r,tos:e,hole:n}),t?(t=!1,u[e].push(g)):i=!0);t&&u[r].push(g)}}0<_.length&&(i||(h=u))}for(let n=0,e=d.length;n=o){var u=o++,d=n[u];r[d.uuid]=c,n[c]=d,r[l]=u,n[u]=s;for(let e=0,t=a;e!==t;++e){const h=i[e],p=h[u],f=h[c];h[c]=p,h[u]=f}}}this.nCachedObjects_=o}uncache(){const n=this._objects,r=this._indicesByUUID,i=this._bindings,a=i.length;let o=this.nCachedObjects_,s=n.length;for(let e=0,t=arguments.length;e!==t;++e){var l=arguments[e].uuid,c=r[l];if(void 0!==c)if(delete r[l],cr.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1)))}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const r=this._timeScaleInterpolant;var n;null!==r&&(n=r.evaluate(e)[0],t*=n,e>r.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_loopIsPing(e){return 2202!==this.loop||(-1==e||0==(1&e)===this._pingIsEven)}_updateTime(e){if(0===e)return this.time;if(2200!==this.loop&&this.repetitions<=0)return this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1}),this.time;var t=this.timeStart,n=Math.max(t,this._clip.duration),r=n-t;if(2200===this.loop)return this.time+=e,-1===this._loopCount&&(this._loopCount=0,this._setEndings(!0,!0,!1)),(this.timen)&&(this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=Zt(this.time,t,n),this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})),this.time;var i=2202===this.loop,a=this._loopIsPing(this._loopCount)?1:-1;this.time+=a*e;var o,s=this.timen,l=!1;return-1===this._loopCount&&(this._loopCount=(l=s)?-1:0,this._pingIsEven=!l,0<=e?this._setEndings(!0,0===this.repetitions,i):this._setEndings(0===this.repetitions,!0,i)),s&&(a=Math.floor((this.time-t)/r),this._loopCount+=Math.abs(a),(s=this.repetitions-this._loopCount)<=0?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=Zt(this.time,t,n),this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})):(1==s?this._setEndings(o=e<0,!o,i):this._setEndings(!1,!1,i),(o=(this.time-t)%r)<0&&(o+=r),this.time=i?n-o:o+t,l||this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a}))),this.time}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Ct,r.endingEnd=Ct):(r.endingStart=e?this.zeroSlopeAtStart?Ct:Tt:Et,r.endingEnd=t?this.zeroSlopeAtEnd?Ct:Tt:Et)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}class wh extends t{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,a=i.length,o=e._propertyBindings,s=e._interpolants,l=r.uuid,t=this._bindingsByRootAndName;let c=t[l];void 0===c&&(c={},t[l]=c);for(let t=0;t!==a;++t){const d=i[t],h=d.name;let e=c[h];if(void 0!==e)o[t]=e;else{if(e=o[t],void 0!==e){null===e._cacheIndex&&(++e.referenceCount,this._addInactiveBinding(e,l,h));continue}var u=n&&n._propertyBindings[t].binding.parsedPath;e=new fh(bh.create(r,h,u),d.ValueTypeName,d.getValueSize()),++e.referenceCount,this._addInactiveBinding(e,l,h),o[t]=e}s[t].resultBuffer=e.buffer}}_activateAction(e){if(!this._isActiveAction(e)){var t,n,r;null===e._cacheIndex&&(t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n],this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t));var i=e._propertyBindings;for(let e=0,t=i.length;e!==t;++e){const a=i[e];0==a.useCount++&&(this._lendBinding(a),a.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){var n=e._propertyBindings;for(let e=0,t=n.length;e!==t;++e){const r=n[e];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){e=e._cacheIndex;return null!==e&&ethis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){const t=Eh.copy(e).clamp(this.min,this.max);return t.sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Lh.prototype.isBox2=!0;const Rh=new An,Ph=new An;class Ih{constructor(e=new An,t=new An){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Rh.subVectors(e,this.start),Ph.subVectors(this.end,this.start);e=Ph.dot(Ph);let n=Ph.dot(Rh)/e;return t&&(n=Zt(n,0,1)),n}closestPointToPoint(e,t,n){t=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(t).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}class Nh extends Nr{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}Nh.prototype.isImmediateRenderObject=!0;const Dh=new An;class Oh extends Nr{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new Ti,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){var i=e/32*Math.PI*2,a=t/32*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(a),Math.sin(a),1)}n.setAttribute("position",new oi(r,3));t=new El({fog:!1,toneMapped:!1});this.cone=new Bl(n,t),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();var e=this.light.distance||1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Dh.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Dh),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Fh=new An,Bh=new er,zh=new er;class Vh extends Bl{constructor(e){var t=function t(n){const r=[];n&&n.isBone&&r.push(n);for(let e=0;e>16&32768,r=t>>12&2047;e=t>>23&255;return e<103||(142>114-e)+(r>>113-e&1)):(n|=e-112<<10|r>>1,n+=1&r)),n}}let up=256;const dp=[{relSize:1,sigma:0,origin:[0,0]},{relSize:.5,sigma:.025,origin:[0,2/3]},{relSize:.25,sigma:.07,origin:[.5,2/3]},{relSize:1/8,sigma:.18,origin:[.75,2/3]},{relSize:1/16,sigma:.24,origin:[.875,2/3]},{relSize:1/16,sigma:.3,origin:[.875,17/24]},{relSize:1/16,sigma:.36,origin:[.875,.75]},{relSize:1/16,sigma:.42,origin:[.875,19/24]},{relSize:1/16,sigma:.48,origin:[.875,20/24]},{relSize:1/16,sigma:.54,origin:[.875,.875]},{relSize:1/16,sigma:.6,origin:[.875,22/24]}];function hp(e){return dp[e].relSize*up}let pp=!1;const fp=20,mp={[Lt]:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},vp=new ys;let gp=null,_p=null,xp=null;const yp=dp.map(function(e,t){var n=1/(hp(t)-1),t=-n/2,n=1+n/2,r=[t,t,n,t,n,n,t,t,n,n,t,n];const i=new Float32Array(108),a=new Float32Array(72),o=new Float32Array(36);for(let e=0;e<6;e++){var s=e%3*2/3-1,l=2=i.get(e).length?(n=new $o(r),i.get(e).push(n)):n=i.get(e)[t],n},dispose:function(){i=new WeakMap}}}function ts(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new An,color:new xr};break;case"SpotLight":t={position:new An,direction:new An,color:new xr,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new An,color:new xr,distance:0,decay:0};break;case"HemisphereLight":t={direction:new An,skyColor:new xr,groundColor:new xr};break;case"RectAreaLight":t={color:new xr,position:new An,halfWidth:new An,halfHeight:new An}}return n[e.id]=t,t}}}let ns=0;function rs(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function is(t,I){const N=new ts,D=function(){const n={};return{get:function(e){if(void 0!==n[e.id])return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dn,position:new An,shadowCameraNear:1,maxDistance:0,expBias:1};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dn,shadow:0,shadowCameraNear:1,shadowCameraFar:1e3,expBias:1};break;case"PointLight":case"RectAreaLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new dn,shadowCameraNear:1,shadowCameraFar:1e3,expBias:1}}return n[e.id]=t,t}}}(),O={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numRectAreaShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],rectAreaShadow:[],rectAreaShadowMap:[],rectAreaShadowMatrix:[]};for(let e=0;e<9;e++)O.probe.push(new An);const _=new An,x=new er,y=new er;return{setup:function(n){let r=0,i=0,a=0;for(let e=0;e<9;e++)O.probe[e].set(0,0,0);let o=0,s=0,l=0,c=0,u=0,d=0,h=0,p=0,f=0;n.sort(rs);for(let e=0,t=n.length;ee.influenceDistance-t.influenceDistance)},pushPlaneReflProbe:function(e){o.push(e)}}}function os(r,i){let a=new WeakMap;return{get:function(e,t=0){let n;return!1===a.has(e)?(n=new as(r,i),a.set(e,[n])):t>=a.get(e).length?(n=new as(r,i),a.get(e).push(n)):n=a.get(e)[t],n},dispose:function(){a=new WeakMap}}}class ss extends Yr{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.useSlopeScaledBias=!1,this.slopeScaledBias=0,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.useSlopeScaledBias=e.useSlopeScaledBias,this.slopeScaledBias=e.slopeScaledBias,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}ss.prototype.isMeshDepthMaterial=!0;class ls extends Yr{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new An,this.nearDistance=1,this.farDistance=1e3,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.defines={DISTANCE_SCALE:"1.0"},this.distancePacking=Nt,this.useSlopeScaledBias=!1,this.slopeScaledBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.morphTargets=e.morphTargets,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.distancePacking=e.distancePacking,this.useSlopeScaledBias=e.useSlopeScaledBias,this.slopeScaledBias=e.slopeScaledBias,this}}ls.prototype.isMeshDistanceMaterial=!0;var cs="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\nfloat mean = 0.0;\nfloat squared_mean = 0.0;\nfloat depth = unpackRGBAToDepth(texture2D(shadow_pass, (gl_FragCoord.xy) / resolution));\nfor (float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n#ifdef HORIZONTAL_PASS\nvec2 distribution = unpackRGBATo2Half(texture2D(shadow_pass, (gl_FragCoord.xy + vec2(i, 0.0) * radius) / resolution));\nmean += distribution.x;\nsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n#else\nfloat depth = unpackRGBAToDepth(texture2D(shadow_pass, (gl_FragCoord.xy + vec2(0.0, i) * radius) / resolution));\nmean += depth;\nsquared_mean += depth * depth;\n#endif\n}\nmean = mean * HALF_SAMPLE_RATE;\nsquared_mean = squared_mean * HALF_SAMPLE_RATE;\nfloat std_dev = sqrt(squared_mean - mean * mean);\ngl_FragColor = pack2HalfToRGBA(vec2(mean, std_dev));\n}",us="void main() {\ngl_Position = vec4(position, 1.0);\n}";const ds=new er,hs=new An,ps=new An;class fs{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.mapSize=new dn(512,512),this.map=null,this.mapPass=null,this.matrix=new er,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ca,this._frameExtents=new dn(1,1),this._viewportCount=1,this._viewports=[new _n(0,0,1,1)],this.expBias=1,this.slopeScaledBias=0,this._additionalMap2D=null,this._additionalMapCube=null}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;hs.setFromMatrixPosition(e.matrixWorld),t.position.copy(hs),ps.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(ps),t.updateMatrixWorld(),ds.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ds),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(t.projectionMatrix),n.multiply(t.matrixWorldInverse)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose(),null!==this._additionalMap2D&&this._additionalMap2D.dispose(),null!==this._additionalMapCube&&this._additionalMapCube.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this.expBias=e.expBias,this.slopeScaledBias=e.slopeScaledBias,this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}fs.prototype.isLightShadow=!0;const ms=Math.PI/4,vs=new er,gs=new An,_s=new An;class xs extends fs{constructor(){super(new Ji(50,1,.5,500)),this.focus=1,this.useOmniMaps=!1,this.useMinFov90=!1,this._frameExtentsOmni=new dn(4,2),this._viewportCountOmni=6,this._viewportsOmni=[new _n(2,1,1,1),new _n(0,1,1,1),new _n(3,1,1,1),new _n(1,1,1,1),new _n(3,0,1,1),new _n(1,0,1,1)],this._cubeDirections=[new An(1,0,0),new An(-1,0,0),new An(0,0,1),new An(0,0,-1),new An(0,1,0),new An(0,-1,0)],this._cubeUps=[new An(0,1,0),new An(0,1,0),new An(0,1,0),new An(0,1,0),new An(0,0,1),new An(0,0,-1)]}updateMatrices(e,t=0){if(this.useOmniMaps){const i=this.camera,a=this.matrix;gs.setFromMatrixPosition(e.matrixWorld),i.position.copy(gs),_s.copy(i.position),_s.add(this._cubeDirections[t]),i.up.copy(this._cubeUps[t]),i.lookAt(_s),i.updateMatrixWorld(),a.makeTranslation(-gs.x,-gs.y,-gs.z),vs.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(vs)}else{const o=this.camera;var n=2*jt*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,t=e.distance||o.far;n===o.fov&&r===o.aspect&&t===o.far||(o.fov=n,o.aspect=r,o.far=t,o.updateProjectionMatrix()),super.updateMatrices(e)}}getViewportCount(){return this.useOmniMaps?this._viewportCountOmni:super.getViewportCount()}getViewport(e){return this.useOmniMaps?this._viewportsOmni[e]:super.getViewport(e)}getFrameExtents(){return this.useOmniMaps?this._frameExtentsOmni:super.getFrameExtents()}calcUseOmniMaps(e){return e>ms?this.useOmniMaps=!0:this.useOmniMaps=!1,this.useOmniMaps}copy(e){return super.copy(e),this.focus=e.focus,this.useOmniMaps=e.useOmniMaps,this.useMinFov90=e.useMinFov90,this}}xs.prototype.isSpotLightShadow=!0;class ys extends Ki{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){var e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,o=r+t,s=r-t;null!==this.view&&this.view.enabled&&(r=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom,i+=r*this.view.offsetX,a=i+r*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height),this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}ys.prototype.isOrthographicCamera=!0;const bs=.8,Ms=.2,As=.8,ws=50;function Ss(m,f,e){let v=new ca;const p=new dn,g=new dn,_=new _n,r=[],i=[],x={},y=e.maxTextureSize,d=e.isWebGL2,b={0:Be,1:Fe,2:ze},M=new Qi({defines:{SAMPLE_RATE:.25,HALF_SAMPLE_RATE:1/8},uniforms:{shadow_pass:{value:null},resolution:{value:new dn},radius:{value:4}},vertexShader:us,fragmentShader:cs}),A=M.clone();A.defines.HORIZONTAL_PASS=1;const t=new Ti;t.setAttribute("position",new Kr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Hi(t,M),h=new er,c=new er,S=new dn(y,y),T=new An,C=new An,E=new An,L=[new An(1,0,0),new An(-1,0,0),new An(0,1,0),new An(0,-1,0),new An(0,0,1),new An(0,0,-1)],R=[new An(0,1,0),new An(0,1,0),new An(0,0,1),new An(0,0,-1),new An(0,1,0),new An(0,1,0)],P=new Xn,u=[new An,new An,new An,new An,new An,new An,new An,new An],I=new Hi(new ha(1,1,1,1));I.name="esmFarPlane",I.castShadow=!0,I.material.shadowSide=Fe;const N=0,D=1,O=0,F=1,B=new ys(-1,1,1,-1,0,10),z=new Hi(new ha(2,2)),V=new Qi({type:"ShadowCubeOctahedral",defines:Object.assign({},ma.cubeOctahedral.defines),uniforms:qi.clone(ma.cubeOctahedral.uniforms),vertexShader:ma.cubeOctahedral.vertexShader,fragmentShader:ma.cubeOctahedral.fragmentShader}),l={},U={},G=this;function k(e){var t=e<<0;let n=r[t];return void 0===n&&(n=new ss({depthPacking:It,morphTargets:e}),r[t]=n),n}function W(e){var t=e<<0;let n=i[t];return void 0===n&&(n=new ls({morphTargets:e}),i[t]=n),n}function H(e,t,n,r,i,a,o,s,l){let c=null,u=k,d=e.customDepthMaterial;!s&&o!==ee||(u=W,d=e.customDistanceMaterial);let h=!1;if(c=void 0===d?(!0===n.morphTargets&&(h=t.morphAttributes&&t.morphAttributes.position&&0y||p.y>y)&&(p.x>y&&(g.x=Math.floor(y/o.x),p.x=g.x*o.x,a.mapSize.x=g.x),p.y>y&&(g.y=Math.floor(y/o.y),p.y=g.y*o.y,a.mapSize.y=g.y)),r.isSpotLight&&a.map&&a.map.width/a.map.height!=2&&(o=a.map,a.map=a._additionalMap2D,a._additionalMap2D=o);var s=r.isPointLight||r.isRectAreaLight||r.isSpotLight&&a.useOmniMaps;s?r.isSpotLight&&(e.fov=90,e.updateProjectionMatrix()):r.isDirectionalLight?(r.shadow.isDirectionalLightShadowCSM&&(l=Z(n,a,p,P),e.left=l.center.x-l.radius,e.right=l.center.x+l.radius,e.top=l.center.y+l.radius,e.bottom=l.center.y-l.radius,e.near=-l.center.z-l.radius,e.far=-l.center.z+l.radius,e.updateProjectionMatrix()),l=r.getWorldDirection(E),C.addScaledVector(l,e.near)):r.isSpotLight&&a.useMinFov90&&(e.fov=90,e.updateProjectionMatrix()),null!==a.map||s||i!==$||(c={minFilter:Ie,magFilter:Ie,format:je},a.map=new xn(p.x,p.y,c),a.map.texture.name=r.name+".shadowMap",a.mapPass=new xn(p.x,p.y,c),e.updateProjectionMatrix()),null===a.map&&(u={minFilter:Ge,magFilter:Ge,format:je},a.map=new xn(p.x,p.y,u),a.map.texture.name=r.name+".shadowMap",e.updateProjectionMatrix()),m.state.buffers.color.setClear(1,1,1,1),m.setRenderTarget(a.map),m.clear();var l,c,u,d=a.getViewportCount();for(let e=0;e>2&1,e>>1&1,a).multiplyScalar(2).subScalar(1).applyMatrix4(t.projectionMatrixInverse),1==a&&l.multiplyScalar(i)}r.setFromPoints(u),c.multiplyMatrices(e.camera.matrixWorldInverse,t.matrixWorld);const o=r.center.applyMatrix4(c);var s=r.radius*=c.getMaxScaleOnAxis(),e=n.x/2/s,s=n.y/2/s;return o.x=Math.round(o.x*e)/e,o.y=Math.round(o.y*s)/s,r}function q(e,t,n,r){let i,a,o,s,l,c;t.isPerspectiveCamera?(i=a=0,o=-.999*t.far,s=l=2*-o*Math.tan(Jt(t.fov)/2),c=1):t.isOrthographicCamera&&(i=(t.right+t.left)/2,a=(t.top+t.bottom)/2,o=-.999*t.far,s=t.right-t.left,l=t.top-t.bottom,c=1),t.add(I),I.scale.set(s,l,c),I.position.set(i,a,o),I.updateMatrixWorld(),X(I,e,t,n,r,!0)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=K,this.esmDistanceScale=1,this.render=function(n,r,i){if(!1!==G.enabled&&(!1!==G.autoUpdate||!1!==G.needsUpdate)&&0!==n.length){var e=m.getRenderTarget(),t=m.getActiveCubeFace(),a=m.getActiveMipmapLevel();const s=m.state;s.setBlending(re),s.buffers.color.setClear(1,1,1,1),s.buffers.depth.setTest(!0),s.setScissorTest(!1);for(let e=0,t=n.length;er||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const a=t?nn:Math.floor;r=a(i*e.width),t=a(i*e.height);void 0===l&&(l=c(r,t));const o=n?c(r,t):l;o.width=r,o.height=t;const s=o.getContext("2d");return s.drawImage(e,0,0,r,t),console.warn("v3d.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+r+"x"+t+")."),o}return"data"in e&&console.warn("v3d.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function A(e){return en(e.width)&&en(e.height)}function w(e,t){return e.generateMipmaps&&t&&e.minFilter!==Ge&&e.minFilter!==Ie}function S(e,t,n,r){m.generateMipmap(e);const i=g.get(t);i.__maxMipLevel=Math.log(Math.max(n,r))*Math.LOG2E}function T(e,t,n){if(!1===b)return t;if(null!==e){if(void 0!==m[e])return m[e];console.warn("v3d.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+e+"'")}let r=t;return 6403===t&&(5126===n&&(r=33326),5131===n&&(r=33325),5121===n&&(r=33321)),6407===t&&(5126===n&&(r=34837),5131===n&&(r=34843),5121===n&&(r=32849)),6408===t&&(5126===n&&(r=34836),5131===n&&(r=34842),5121===n&&(r=32856)),33325!==r&&33326!==r&&34842!==r&&34836!==r||i.get("EXT_color_buffer_float"),r}function o(e){return e===Ge||e===k||e===W?9728:9729}function s(e){const t=e.target;var n;t.removeEventListener("dispose",s),n=t,void 0!==(e=g.get(n)).__webglInit&&(m.deleteTexture(e.__webglTexture),g.remove(n)),t.isVideoTexture&&a.delete(t),y.memory.textures--,y.removeTextureSpec(t)}function C(e){const t=e.target;t.removeEventListener("dispose",C),function(e){var n=e.texture,t=g.get(e),r=g.get(n);if(e){if(void 0!==r.__webglTexture&&(m.deleteTexture(r.__webglTexture),y.memory.textures--),e.depthTexture&&e.depthTexture.dispose(),e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++)m.deleteFramebuffer(t.__webglFramebuffer[e]),t.__webglDepthbuffer&&m.deleteRenderbuffer(t.__webglDepthbuffer[e]);else m.deleteFramebuffer(t.__webglFramebuffer),t.__webglDepthbuffer&&m.deleteRenderbuffer(t.__webglDepthbuffer),t.__webglMultisampledFramebuffer&&m.deleteFramebuffer(t.__webglMultisampledFramebuffer),t.__webglColorRenderbuffer&&m.deleteRenderbuffer(t.__webglColorRenderbuffer),t.__webglDepthRenderbuffer&&m.deleteRenderbuffer(t.__webglDepthRenderbuffer);if(e.isWebGLMultipleRenderTargets)for(let e=0,t=n.length;e=t&&console.warn("v3d.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+t),d+=1,e},this.resetTextureUnits=function(){d=0},this.setTexture2D=h,this.setTexture2DArray=function(e,t){var n=g.get(e);0{e.isLight?(n.pushLight(e),e.castShadow&&n.pushShadow(e)):e.isCubeReflectionProbe?n.pushEnvMapProbe(e):e.isPlaneReflectionProbe&&n.pushPlaneReflProbe(e)}),n.setupLights(t),n.sortEnvMapProbes();let r=null;return null!==e.worldEnvMapProbe&&null!==e.worldEnvMapProbe.renderTarget&&(r=e.worldEnvMapProbe.renderTarget.texture),e.traverse(t=>{if(t.material){const e=Array.isArray(t.material)?t.material:[t.material];e.forEach(e=>{(e.isMeshStandardMaterial||e.isMeshPhysicalMaterial||e.isMeshNodeMaterial)&&(t.material.envMap=r,t.material.needsUpdate=!0)})}}),n},this.compile=function(i,e){const a=ce.get(i,h.length);this._compilePrepareRenderState(i,e,a);const o={};i.traverse(function(t){var n=t.material;if(n)if(Array.isArray(n))for(let e=0;ee.intersectsMesh(t))||null}function De(e,t,r,n){!0!==t.isScene&&(t=U),te.resetTextureUnits();var i=t.fog,a=r.isMeshStandardMaterial?t.environment:null,o=null===L?E.outputEncoding:L.texture.encoding;r.envMapAutoAssign&&(r.isMeshStandardMaterial||r.isMeshPhysicalMaterial||r.isMeshNodeMaterial)&&((d=C.state.envMapProbeArray.find(e=>{return null===e.influenceGroup?e.intersectsMesh(n):n.groupNames.includes(e.influenceGroup)^e.influenceGroupInv})||t.worldEnvMapProbe)&&(r.envMap=(null==(l=d.renderTarget)?void 0:l.texture)||null,c=d.parallaxDistance,r.envMapParallaxMatrix.copy(d.matrixWorldInverse).premultiply(H.makeScale(1/c,1/c,1/c)),r.envMapParallaxMatrixInv.copy(d.matrixWorld).multiply(H.makeScale(c,c,c)),r.envMapParallaxType=d.parallaxType));var s=ne.get(r.envMap||a),l=!0===r.vertexColors&&n.geometry&&n.geometry.attributes.color&&4===n.geometry.attributes.color.itemSize,c=r.side===Be;const u=ee.get(r);var d=C.state.lights;!0===F&&(!0!==B&&e===P||(p=e===P&&r.id===R,ue.setState(r,e,p)));var h,a=Ne(n,r,C),p=r.isMeshNodeMaterial&&r.canUseGTAO()&&E.gtaoMap;let f=!1,m=!1;if(r.version===u.__version)(!u.needsLights||u.lightsStateVersion===d.state.version)&&u.outputEncoding===o&&(!n.isInstancedMesh||!1!==u.instancing)&&(n.isInstancedMesh||!0!==u.instancing)&&(!n.isSkinnedMesh||!1!==u.skinning)&&(n.isSkinnedMesh||!0!==u.skinning)?u.envMap!==s?(f=!0,m=!0):(r.fog&&u.fog!==i||void 0!==u.numClippingPlanes&&(u.numClippingPlanes!==ue.numPlanes||u.numIntersection!==ue.numIntersection)||u.vertexAlphas!==l||u.planeReflProbe!==a||r.isMeshNormalMaterial&&u.flipSided!==c||u.useGTAO!==p)&&(f=!0):f=!0;else if(f=!0,u.__version=r.version,r.nodeRGBArr)for(let e=0;ee.far||t.push({distance:n,point:qs.clone(),uv:Hr.getUV(qs,tl,nl,rl,il,al,ol,new dn),face:null,object:this}))}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function ll(e,t,n,r,i,a){Js.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?($s.x=a*Js.x-i*Js.y,$s.y=i*Js.x+a*Js.y):$s.copy(Js),e.copy(t),e.x+=$s.x,e.y+=$s.y,e.applyMatrix4(el)}sl.prototype.isSprite=!0;const cl=new An,ul=new An;class dl extends Nr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);var n=e.levels;for(let e=0,t=n.length;e=r[e].distance;e++)r[e-1].object.visible=!1,r[e].object.visible=!0;for(this._currentLevel=e-1;en.far||r.push({distance:d,point:f.clone().applyMatrix4(this.matrixWorld),index:e,face:null,faceIndex:null,object:this}))}else for(let e=Math.max(0,a.start),t=Math.min(c.count,a.start+a.count)-1;en.far||r.push({distance:l,point:f.clone().applyMatrix4(this.matrixWorld),index:e,face:null,faceIndex:null,object:this}))}else e.isGeometry&&console.error("v3d.Line.raycast() no longer supports v3d.Geometry. Use v3d.BufferGeometry instead.")}}updateMorphTargets(){var e=this.geometry;if(e.isBufferGeometry){var t=e.morphAttributes,n=Object.keys(t);if(0i.far||a.push({distance:r,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:o})}}Hl.prototype.isPoints=!0;class jl extends vn{constructor(t,e,n,r,i,a,o,s,l){super(t,e,n,r,i,a,o,s,l),this.format=void 0!==o?o:Oe,this.minFilter=void 0!==a?a:Ie,this.magFilter=void 0!==i?i:Ie,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function e(){c.needsUpdate=!0,t.requestVideoFrameCallback(e)})}clone(){return new this.constructor(this.image).copy(this)}update(){var e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}jl.prototype.isVideoTexture=!0;class Yl extends vn{constructor(e,t,n,r,i,a,o,s,l,c,u,d){super(null,a,o,s,l,c,r,i,u,d),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}Yl.prototype.isCompressedTexture=!0;class Zl extends vn{constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r,i,a,o,s,l),this.needsUpdate=!0}}Zl.prototype.isCanvasTexture=!0;class ql extends vn{constructor(e,t,n,r,i,a,o,s,l,c){if((c=void 0!==c?c:Ye)!==Ye&&c!==Ze)throw new Error("DepthTexture format must be either v3d.DepthFormat or v3d.DepthStencilFormat");super(null,r,i,a,o,s,c,n=void 0===(n=void 0===n&&c===Ye?V:n)&&c===Ze?De:n,l),this.image={width:e,height:t},this.magFilter=void 0!==o?o:Ge,this.minFilter=void 0!==s?s:Ge,this.flipY=!1,this.generateMipmaps=!1}}ql.prototype.isDepthTexture=!0;class Ql extends Ti{constructor(n=1,r=8,i=0,a=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:n,segments:r,thetaStart:i,thetaLength:a},r=Math.max(3,r);const t=[],o=[],s=[],l=[],c=new An,u=new dn;o.push(0,0,0),s.push(0,0,1),l.push(.5,.5);for(let e=0,t=3;e<=r;e++,t+=3){var d=i+e/r*a;c.x=n*Math.cos(d),c.y=n*Math.sin(d),o.push(c.x,c.y,c.z),s.push(0,0,1),u.x=(o[t]/n+1)/2,u.y=(o[t+1]/n+1)/2,l.push(u.x,u.y)}for(let e=1;e<=r;e++)t.push(e,e+1,0);this.setIndex(t),this.setAttribute("position",new oi(o,3)),this.setAttribute("normal",new oi(s,3)),this.setAttribute("uv",new oi(l,2))}static fromJSON(e){return new Ql(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Kl extends Ti{constructor(m=1,v=1,g=1,_=8,x=1,e=!1,y=0,b=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:m,radiusBottom:v,height:g,radialSegments:_,heightSegments:x,openEnded:e,thetaStart:y,thetaLength:b};const M=this;_=Math.floor(_),x=Math.floor(x);const A=[],w=[],S=[],T=[];let C=0;const E=[],L=g/2;let R=0;function t(t){var n=C;const r=new dn,i=new An;let a=0;var o=!0===t?m:v,s=!0===t?1:-1;for(let e=1;e<=_;e++)w.push(0,L*s,0),S.push(0,s,0),T.push(.5,.5),C++;var l=C;for(let e=0;e<=_;e++){var c=e/_*b+y,u=Math.cos(c),c=Math.sin(c);i.x=o*c,i.y=L*s,i.z=o*u,w.push(i.x,i.y,i.z),S.push(0,s,0),r.x=.5*u+.5,r.y=.5*c*s+.5,T.push(r.x,r.y),C++}for(let e=0;e<_;e++){var d=n+e,h=l+e;!0===t?A.push(h,h+1,d):A.push(h+1,h,d),a+=3}M.addGroup(R,a,!0===t?1:2),R+=a}!function(){const t=new An,n=new An;let r=0;var i=(v-m)/g;for(let e=0;e<=x;e++){const f=[];var a=e/x,o=a*(v-m)+m;for(let e=0;e<=_;e++){var s=e/_,l=s*b+y,c=Math.sin(l),l=Math.cos(l);n.x=o*c,n.y=-a*g+L,n.z=o*l,w.push(n.x,n.y,n.z),t.set(c,i,l).normalize(),S.push(t.x,t.y,t.z),T.push(s,1-a),f.push(C++)}E.push(f)}for(let t=0;t<_;t++)for(let e=0;eNumber.EPSILON&&(o.normalize(),u=Math.acos(Zt(r[e-1].dot(r[e]),-1,1)),i[e].applyMatrix4(s.makeRotationAxis(o,u))),a[e].crossVectors(r[e],i[e]);if(!0===e){let t=Math.acos(Zt(i[0].dot(i[n]),-1,1));t/=n,0r;)i-=r;ir.length-2?r.length-1:a+1],a=r[a>r.length-3?r.length-1:a+2];return n.set(mc(o,t.x,e.x,i.x,a.x),mc(o,t.y,e.y,i.y,a.y)),n}copy(n){super.copy(n),this.points=[];for(let e=0,t=n.points.length;e=n.next.y&&n.next.y!==n.y){var s=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>a){if((a=s)===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x=n.x&&n.x>=c&&r!==n.x&&Ic(io.x||n.x===o.x&&function(e,t){return Nc(e.prev,e,t.prev)<0&&Nc(t.next,e,e.next)<0}(o,n)))&&(o=n,d=h)),n=n.next,n!==l;);return o}(e,t))&&(e=Vc(t,e),Ec(t,t.next),Ec(e,e.next))}(i[a],n),n=Ec(n,n.next);return n}(t,e,a,n)),t.length>80*n){s=c=t[0],l=u=t[1];for(let e=n;ec&&(c=d),h>u&&(u=h);p=Math.max(c-s,u-l),p=0!==p?1/p:0}return Lc(a,o,n,s,l,p),o}};function Cc(e,t,n,r,i){let a,o;if(i===0=t;a-=r)o=Uc(a,e[a],e[a+1],o);return o&&Dc(o,o.next)&&(Gc(o),o=o.next),o}function Ec(e,t){if(!e)return e;t=t||e;let n=e,r;do{if(r=!1,n.steiner||!Dc(n,n.next)&&0!==Nc(n.prev,n,n.next))n=n.next;else{if(Gc(n),n=t=n.prev,n===n.next)break;r=!0}}while(r||n!==t);return t}function Lc(r,i,a,o,s,l,c){if(r){!c&&l&&function(e,t,n,r){let i=e;for(;null===i.z&&(i.z=Pc(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next,i!==e;);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,a,o,s,l,c=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;ta.x?i.x>o.x?i:o:a.x>o.x?a:o).x,u=(i.y>a.y?i.y>o.y?i:o:a.y>o.y?a:o).y,d=Pc(s,l,t,n,r),h=Pc(c,u,t,n,r);let p=e.prevZ,f=e.nextZ;for(;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=Nc(p.prev,p,p.next))return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=Nc(f.prev,f,f.next))return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&0<=Nc(p.prev,p,p.next))return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&Ic(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&0<=Nc(f.prev,f,f.next))return!1;f=f.nextZ}return!0}(r,o,s,l):function(e){var t=e.prev,n=e,r=e.next;if(0<=Nc(t,n,r))return!1;let i=e.next.next;for(;i!==e.prev;){if(Ic(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&0<=Nc(i.prev,i,i.next))return!1;i=i.next}return!0}(r))i.push(t.i/a),i.push(r.i/a),i.push(n.i/a),Gc(r),r=n.next,e=n.next;else if((r=n)===e){c?1===c?Lc(r=function(e,t,n){let r=e;do{var i=r.prev,a=r.next.next;!Dc(i,a)&&Oc(i,r,r.next,a)&&zc(i,a)&&zc(a,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(a.i/n),Gc(r),Gc(r.next),r=e=a),r=r.next}while(r!==e);return Ec(r)}(Ec(r),i,a),i,a,o,s,l,2):2===c&&function(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&function(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&Oc(n,n.next,e,t))return!0}while(n=n.next,n!==e);return!1}(e,t)&&(zc(e,t)&&zc(t,e)&&function(e,t){let n=e,r=!1;var i=(e.x+t.x)/2,a=(e.y+t.y)/2;for(;n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next,n!==e;);return r}(e,t)&&(Nc(e.prev,e,t.prev)||Nc(e,t.prev,t))||Dc(e,t)&&0=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function Bc(e){return 0Number.EPSILON){var d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),p=t.x-s/d,d=t.y+o/d,h=((n.x-c/h-p)*c-(n.y+l/h-d)*l)/(o*c-s*l);r=p+o*h-e.x,i=d+s*h-e.y;e=r*r+i*i;if(e<=2)return new dn(r,i);a=Math.sqrt(e/2)}else{let e=!1;o>Number.EPSILON?l>Number.EPSILON&&(e=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),a=e?(r=-s,i=o,Math.sqrt(u)):(r=o,i=s,Math.sqrt(u/2))}return new dn(r/a,i/a)}const E=[];for(let e=0,t=M.length,n=t-1,r=e+1;e!(p[3*e]===p[3*t]&&p[3*e+1]===p[3*t+1]&&p[3*e+2]===p[3*t+2]||p[3*e]===p[3*n]&&p[3*e+1]===p[3*n+1]&&p[3*e+2]===p[3*n+2]||p[3*t]===p[3*n]&&p[3*t+1]===p[3*n+1]&&p[3*t+2]===p[3*n+2]);for(let e=0;e<3;e++)M[e]=new er;var H=t?32:28,X=n+1;let j=0,Y=0,Z=0,q=0,Q=0;for(let r=a?0:20;ru?1:-1,0):N.set(T.x,T.z,-T.y),p[Y++]=d*A[0],p[Y++]=d*(A[2]-u),p[Y++]=-d*A[1],f[Z++]=N.x,f[Z++]=N.y,f[Z++]=N.z,m[q++]=1-J,m[q++]=1-K}}for(let t=0;t=a)break e;var s=n[1];t=a)break t}e=r,r=0}for(;r>>1;t "+r[i]+";"}t+="}",console.log(t)},l.DiGraph=u;function n(e,t,n){this.v=e,this.w=t,this.weight=n}n.prototype.either=function(){return this.v},n.prototype.other=function(e){return e==this.v?this.w:this.v},n.prototype.from=function(){return this.v},n.prototype.to=function(){return this.w},n.prototype.copy=function(){var e,t=new n(0,0,0);for(e in this)this.hasOwnProperty(e)&&(t[e]=this[e]);return t},l.Edge=n;e=function(e,t){this.s=t;var n=e.V;this.marked=[],this.edgeTo=[];for(var r=0;r "+n);(i<1||1!=i&&"normal"==r)&&(a="mix("+r+","+a+","+we(i)+")","normal"==r&&(a="normalize("+a+")"));return a}($[0].name,$[0].type,J,ne,te)}):console.error("MeshNodeMaterial: wrong node connections")):ie?q.inputs.push({code:"normal"}):q.inputs.push({code:Ae(J,K)})}}function de(e,t,n){for(var r=e.findInEdges(t),i=0;i"+a+", please reexport your scene")}for(i=0;ia.tracks[e].times[0]&&(c=a.tracks[e].times[0]);for(let e=0;e=m.times[l]){var l=l*o+e,d=l+o-e;n=Zu.arraySlice(m.values,l,d)}else{const _=m.createInterpolant();d=e,o=o-e;_.evaluate(a),n=Zu.arraySlice(_.resultBuffer,d,o)}if("quaternion"===v){const x=(new Mn).fromArray(n).normalize().conjugate();x.toArray(n)}var h=g.times.length;for(let e=0;et;)--o;return++o,0===a&&o===i||(a>=o&&(o=Math.max(o,1),a=o-1),n=this.getValueSize(),this.times=Zu.arraySlice(r,a,o),this.values=Zu.arraySlice(this.values,a*n,o*n)),this}validate(){let n=!0;var e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("v3d.KeyframeTrack: Invalid value size in track.",this),n=!1);var t=this.times,r=this.values,i=t.length;0===i&&(console.error("v3d.KeyframeTrack: Track is empty.",this),n=!1);let a=null;for(let e=0;e!==i;e++){var o=t[e];if("number"==typeof o&&isNaN(o)){console.error("v3d.KeyframeTrack: Time is not a valid number.",this,e,o),n=!1;break}if(null!==a&&a>o){console.error("v3d.KeyframeTrack: Out of order keys.",this,e,o,a),n=!1;break}a=o}if(void 0!==r&&Zu.isTypedArray(r))for(let e=0,t=r.length;e!==t;++e){var s=r[e];if(isNaN(s)){console.error("v3d.KeyframeTrack: Value is not a valid number.",this,e,s),n=!1;break}}return n}optimize(){const n=Zu.arraySlice(this.times),r=Zu.arraySlice(this.values),i=this.getValueSize(),a=this.getInterpolation()===St,o=n.length-1;let s=1;for(let e=1;e=t){var i=n[r]-t;const o=this.curves[r];var a=o.getLength();return o.getPointAt(0===a?0:1-i/a)}r++}return null}getLength(){var e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const n=[];let r=0;for(let e=0,t=this.curves.length;eNumber.EPSILON){if(r<0&&(e=s[a],n=-n,t=s[i],r=-r),!(o.yt.y))if(o.y===e.y){if(o.x===e.x)return 1}else{var c=r*(o.x-e.x)-n*(o.y-e.y);if(0==c)return 1;c<0||(l=!l)}}else if(o.y===e.y&&(t.x<=o.x&&o.x<=e.x||e.x<=o.x&&o.x<=t.x))return 1}return l}(g.p,d[e].p)||(r!==e&&_.push({froms:r,tos:e,hole:n}),t?(t=!1,u[e].push(g)):i=!0);t&&u[r].push(g)}}0<_.length&&(i||(h=u))}for(let n=0,e=d.length;n=o){var u=o++,d=n[u];r[d.uuid]=c,n[c]=d,r[l]=u,n[u]=s;for(let e=0,t=a;e!==t;++e){const h=i[e],p=h[u],f=h[c];h[c]=p,h[u]=f}}}this.nCachedObjects_=o}uncache(){const n=this._objects,r=this._indicesByUUID,i=this._bindings,a=i.length;let o=this.nCachedObjects_,s=n.length;for(let e=0,t=arguments.length;e!==t;++e){var l=arguments[e].uuid,c=r[l];if(void 0!==c)if(delete r[l],cr.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1)))}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const r=this._timeScaleInterpolant;var n;null!==r&&(n=r.evaluate(e)[0],t*=n,e>r.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_loopIsPing(e){return 2202!==this.loop||(-1==e||0==(1&e)===this._pingIsEven)}_updateTime(e){if(0===e)return this.time;if(2200!==this.loop&&this.repetitions<=0)return this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1}),this.time;var t=this.timeStart,n=Math.max(t,this._clip.duration),r=n-t;if(2200===this.loop)return this.time+=e,-1===this._loopCount&&(this._loopCount=0,this._setEndings(!0,!0,!1)),(this.timen)&&(this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=Zt(this.time,t,n),this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})),this.time;var i=2202===this.loop,a=this._loopIsPing(this._loopCount)?1:-1;this.time+=a*e;var o,s=this.timen,l=!1;return-1===this._loopCount&&(this._loopCount=(l=s)?-1:0,this._pingIsEven=!l,0<=e?this._setEndings(!0,0===this.repetitions,i):this._setEndings(0===this.repetitions,!0,i)),s&&(a=Math.floor((this.time-t)/r),this._loopCount+=Math.abs(a),(s=this.repetitions-this._loopCount)<=0?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=Zt(this.time,t,n),this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})):(1==s?this._setEndings(o=e<0,!o,i):this._setEndings(!1,!1,i),(o=(this.time-t)%r)<0&&(o+=r),this.time=i?n-o:o+t,l||this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a}))),this.time}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Ct,r.endingEnd=Ct):(r.endingStart=e?this.zeroSlopeAtStart?Ct:Tt:Et,r.endingEnd=t?this.zeroSlopeAtEnd?Ct:Tt:Et)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}class wh extends t{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,n){const r=e._localRoot||this._root,i=e._clip.tracks,a=i.length,o=e._propertyBindings,s=e._interpolants,l=r.uuid,t=this._bindingsByRootAndName;let c=t[l];void 0===c&&(c={},t[l]=c);for(let t=0;t!==a;++t){const d=i[t],h=d.name;let e=c[h];if(void 0!==e)o[t]=e;else{if(e=o[t],void 0!==e){null===e._cacheIndex&&(++e.referenceCount,this._addInactiveBinding(e,l,h));continue}var u=n&&n._propertyBindings[t].binding.parsedPath;e=new fh(bh.create(r,h,u),d.ValueTypeName,d.getValueSize()),++e.referenceCount,this._addInactiveBinding(e,l,h),o[t]=e}s[t].resultBuffer=e.buffer}}_activateAction(e){if(!this._isActiveAction(e)){var t,n,r;null===e._cacheIndex&&(t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n],this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t));var i=e._propertyBindings;for(let e=0,t=i.length;e!==t;++e){const a=i[e];0==a.useCount++&&(this._lendBinding(a),a.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){var n=e._propertyBindings;for(let e=0,t=n.length;e!==t;++e){const r=n[e];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){e=e._cacheIndex;return null!==e&&ethis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){const t=Eh.copy(e).clamp(this.min,this.max);return t.sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Lh.prototype.isBox2=!0;const Rh=new An,Ph=new An;class Ih{constructor(e=new An,t=new An){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Rh.subVectors(e,this.start),Ph.subVectors(this.end,this.start);e=Ph.dot(Ph);let n=Ph.dot(Rh)/e;return t&&(n=Zt(n,0,1)),n}closestPointToPoint(e,t,n){t=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(t).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}class Nh extends Nr{constructor(e){super(),this.material=e,this.render=function(){},this.hasPositions=!1,this.hasNormals=!1,this.hasColors=!1,this.hasUvs=!1,this.positionArray=null,this.normalArray=null,this.colorArray=null,this.uvArray=null,this.count=0}}Nh.prototype.isImmediateRenderObject=!0;const Dh=new An;class Oh extends Nr{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new Ti,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1;e<32;e++,t++){var i=e/32*Math.PI*2,a=t/32*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(a),Math.sin(a),1)}n.setAttribute("position",new oi(r,3));t=new El({fog:!1,toneMapped:!1});this.cone=new Bl(n,t),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();var e=this.light.distance||1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Dh.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Dh),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Fh=new An,Bh=new er,zh=new er;class Vh extends Bl{constructor(e){var t=function t(n){const r=[];n&&n.isBone&&r.push(n);for(let e=0;e>16&32768,r=t>>12&2047;e=t>>23&255;return e<103||(142>114-e)+(r>>113-e&1)):(n|=e-112<<10|r>>1,n+=1&r)),n}}let up=256;const dp=[{relSize:1,sigma:0,origin:[0,0]},{relSize:.5,sigma:.025,origin:[0,2/3]},{relSize:.25,sigma:.07,origin:[.5,2/3]},{relSize:1/8,sigma:.18,origin:[.75,2/3]},{relSize:1/16,sigma:.24,origin:[.875,2/3]},{relSize:1/16,sigma:.3,origin:[.875,17/24]},{relSize:1/16,sigma:.36,origin:[.875,.75]},{relSize:1/16,sigma:.42,origin:[.875,19/24]},{relSize:1/16,sigma:.48,origin:[.875,20/24]},{relSize:1/16,sigma:.54,origin:[.875,.875]},{relSize:1/16,sigma:.6,origin:[.875,22/24]}];function hp(e){return dp[e].relSize*up}let pp=!1;const fp=20,mp={[Lt]:0,3001:1,3002:2,3004:3,3005:4,3006:5,3007:6},vp=new ys;let gp=null,_p=null,xp=null;const yp=dp.map(function(e,t){var n=1/(hp(t)-1),t=-n/2,n=1+n/2,r=[t,t,n,t,n,n,t,t,n,n,t,n];const i=new Float32Array(108),a=new Float32Array(72),o=new Float32Array(36);for(let e=0;e<6;e++){var s=e%3*2/3-1,l=2