diff --git a/experiment/aim.md b/experiment/aim.md
index 4bc1c54..6d367ad 100644
--- a/experiment/aim.md
+++ b/experiment/aim.md
@@ -1 +1,4 @@
### Aim of the experiment
+
+
+ The main objective of this experiment is to test and understand the properties and difference between how the data is stored in conventional database and blockchain .
diff --git a/experiment/contributors.md b/experiment/contributors.md
index 43e714a..00bae6f 100644
--- a/experiment/contributors.md
+++ b/experiment/contributors.md
@@ -1,11 +1,17 @@
EMPTY
+
+
### Subject Matter Experts
-| SNo. | Name | Email | Institute | ID |
-| :---: | :---: | :---: | :---: | :---: |
-| 1 | name | email | institute | id |
+
+| SNo. | Name | Email | Institute | ID |
+| :--: | :--: | :---: | :-------: | :-: |
+| 1 | name | email | institute | id |
### Developers
-| SNo. | Name | Email | Institute | ID |
-| :---: | :---: | :---: | :---: | :---: |
-| 1 | name | email | institute | id |
\ No newline at end of file
+
+| SNo. | Name | Email | Institute | ID |
+| :--: | :---------: | :----------------------: | :-------------------------------------: | :------: |
+| 1 | Aarsha | aarshavj@am.amrita.edu | amrita vishwa vidthyapeetham,amritapuri | 12230904 |
+| 2 | Anandi | anandik@am.amrita.edu | amrita vishwa vidthyapeetham,amritapuri | 12230912 |
+| 2 | Arun Prabhu | arunprabhu@am.amrita.edu | amrita vishwa vidthyapeetham,amritapuri | 12230517 |
diff --git a/experiment/images/addproduct.png b/experiment/images/addproduct.png
new file mode 100644
index 0000000..4250330
Binary files /dev/null and b/experiment/images/addproduct.png differ
diff --git a/experiment/images/block.png b/experiment/images/block.png
new file mode 100644
index 0000000..b9737c7
Binary files /dev/null and b/experiment/images/block.png differ
diff --git a/experiment/images/blockchain.png b/experiment/images/blockchain.png
new file mode 100644
index 0000000..7db5b08
Binary files /dev/null and b/experiment/images/blockchain.png differ
diff --git a/experiment/images/button.png b/experiment/images/button.png
new file mode 100644
index 0000000..b547911
Binary files /dev/null and b/experiment/images/button.png differ
diff --git a/experiment/images/conventional.png b/experiment/images/conventional.png
new file mode 100644
index 0000000..b7b0f8a
Binary files /dev/null and b/experiment/images/conventional.png differ
diff --git a/experiment/images/full.png b/experiment/images/full.png
new file mode 100644
index 0000000..d17f6c7
Binary files /dev/null and b/experiment/images/full.png differ
diff --git a/experiment/images/receipt.png b/experiment/images/receipt.png
new file mode 100644
index 0000000..ed32d11
Binary files /dev/null and b/experiment/images/receipt.png differ
diff --git a/experiment/images/table.png b/experiment/images/table.png
new file mode 100644
index 0000000..06d8c4a
Binary files /dev/null and b/experiment/images/table.png differ
diff --git a/experiment/images/traditional.png b/experiment/images/traditional.png
new file mode 100644
index 0000000..a608077
Binary files /dev/null and b/experiment/images/traditional.png differ
diff --git a/experiment/procedure.md b/experiment/procedure.md
index 37929cc..d591458 100644
--- a/experiment/procedure.md
+++ b/experiment/procedure.md
@@ -1 +1,29 @@
-### Procedure
\ No newline at end of file
+### Procedure
+
+
Experiment to Test the properties of Blockchain and understand how it is different from conventional databases.
+
+
Inorder to show the difference between conventional database and blockchain database we have developed a use case centered around product purchases where users input their purchase details, and upon completing the transaction, they receive a receipt Subsequently, users can view their transaction history in both conventional and blockchain databases,thus the user will be able to understand the difference and properties of both conventional and blockchain databases
+
+
+
+
Click the add button to create a new item by providing the product name and price
+
+
+
Click the buy button where the user can select product and proceed to purchase products
+
+
+
+
Successfull transaction end with generating a reciept
+
+
+
Click the transaction history link provided with reciept which will show two options to
view data
+
+
+
+
Clicking on conventional database will allow the user to view a table populated with data .
+
+
+
+
Clicking on blockchain database will allow the user to view how data is stored in blockchain database
+
+
diff --git a/experiment/references.md b/experiment/references.md
index b15b47e..57cb44e 100644
--- a/experiment/references.md
+++ b/experiment/references.md
@@ -1 +1 @@
-### Link your references in here
\ No newline at end of file
+### Link your references in here
diff --git a/experiment/simulation/css/main.5ef1ae1d.css b/experiment/simulation/css/main.5ef1ae1d.css
new file mode 100644
index 0000000..1ce04c2
--- /dev/null
+++ b/experiment/simulation/css/main.5ef1ae1d.css
@@ -0,0 +1,2 @@
+@import url(https://fonts.googleapis.com/css2?family=Roboto&display=swap);body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.App{text-align:center}.inputcard{background-color:#5c7586;margin-top:10%}.listcard{background-color:#ede4e0}.transaction-history-link{cursor:pointer;text-decoration:none}.my-custom-card{height:200px;width:200px}.qtytext{height:10%;width:30%}.qty{width:10%}.inputbtn{background-color:#3667a6}.inputbtn,.inputbtn:hover{color:#fff;font-family:Roboto,sans-serif}.inputbtn:hover{background-color:#173966}.card-title{font-weight:700px}.card-title,.title{font-family:Montserrat,sans-serif}.title{font-weight:700;margin-top:10px}.main-tilte{margin-bottom:20px}.addbtn{margin-right:-30px}.App{background-color:currentColor;height:100vh}.card-body-receipt{overflow:hidden;padding:0}.slick-slider{padding-left:38px;width:800px}.slick-dots{bottom:106px}input::-webkit-inner-spin-button{-webkit-appearance:none}.heading{margin-bottom:20px;margin-top:20px;text-align:center}.customWidth{margin:0 auto}.btn1{margin:10px}.table{margin-bottom:30px}
+/*# sourceMappingURL=main.5ef1ae1d.css.map*/
\ No newline at end of file
diff --git a/experiment/simulation/css/main.5ef1ae1d.css.map b/experiment/simulation/css/main.5ef1ae1d.css.map
new file mode 100644
index 0000000..0862de6
--- /dev/null
+++ b/experiment/simulation/css/main.5ef1ae1d.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/css/main.5ef1ae1d.css","mappings":"0EAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CCX4E,KAC1E,iBACF,CASA,WAEE,wBAAwB,CADxB,cAEF,CACA,UACE,wBACF,CASA,0BAEE,cAAe,CADf,oBAKF,CACA,gBAEE,YAAa,CADb,WAEF,CACA,SAEE,UAAS,CADT,SAEF,CAEA,KACE,SACF,CACA,UACG,wBAIH,CACA,0BAJG,UAAW,CACX,6BAOH,CAJA,gBACE,wBAGF,CACA,YAEA,iBACA,CACA,mBAHA,iCAQA,CALA,OAGE,eAAiB,CACjB,eACF,CACA,YACE,kBACF,CACA,QACA,kBACA,CACA,KACE,6BAA8B,CAC9B,YACF,CACA,mBACE,eAAgB,CAChB,SACF,CACA,cAEE,iBAAiB,CADjB,WAEF,CAAC,YACC,YACF,CACA,iCACE,uBACF,CCxFA,SAGI,kBAAmB,CADnB,eAAgB,CADhB,iBAKJ,CAEA,aACI,aACJ,CACA,MACI,WACJ,CACA,OACI,kBACJ","sources":["index.css","App.css","Table.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n","\n@import url('https://fonts.googleapis.com/css2?family=Roboto&display=swap');.App {\n text-align: center;\n}\n\n/* .inputbtn{\n margin-right: 5%;\n width:15%;\n margin-top: 10%;\n} */\n\n\n.inputcard{\n margin-top: 10%;\n background-color:#5c7586;\n}\n.listcard {\n background-color:#EDE4E0\n}\n/* .qty{\n width: 30%;\n \n} */\n/* .heading{\n margin: auto;\n} */\n\n.transaction-history-link{\n text-decoration: none;\n cursor: pointer;\n \n \n\n}\n.my-custom-card {\n width: 200px; \n height: 200px; \n}\n.qtytext{\n width: 30%;\n height:10%\n}\n\n.qty{\n width:10%;\n}\n.inputbtn{\n background-color:#3667A6;\n color:white;\n font-family: 'Roboto', sans-serif;\n \n}\n.inputbtn:hover{\n background-color:#173966;\n color:white;\n font-family: 'Roboto', sans-serif;\n}\n.card-title {\nfont-family: 'Montserrat', sans-serif;\nfont-weight:700px;\n}\n.title{\n \n font-family: 'Montserrat', sans-serif;\n font-weight: bold;\n margin-top: 10px;\n}\n.main-tilte{\n margin-bottom: 20px;\n}\n.addbtn {\nmargin-right: -30px;\n}\n.App{\n background-color: currentColor;\n height: 100vh;\n}\n.card-body-receipt{\n overflow: hidden;\n padding: 0;\n}\n.slick-slider{\n width: 800px;\n padding-left: 38px\n}.slick-dots{\n bottom: 106px;\n}\ninput::-webkit-inner-spin-button{\n -webkit-appearance: none;\n}","\r\n.heading{\r\n text-align: center;\r\n margin-top: 20px;\r\n margin-bottom: 20px;\r\n \r\n\r\n}\r\n\r\n.customWidth {\r\n margin: 0 auto; \r\n}\r\n.btn1{\r\n margin: 10px;\r\n}\r\n.table{\r\n margin-bottom: 30px;\r\n}\r\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/experiment/simulation/css/main.css b/experiment/simulation/css/main.css
deleted file mode 100644
index 20bf42b..0000000
--- a/experiment/simulation/css/main.css
+++ /dev/null
@@ -1 +0,0 @@
-/* You CSS goes in here */
\ No newline at end of file
diff --git a/experiment/simulation/images/cubeText1.bbf64f74ce5affdf17c6.jpg b/experiment/simulation/images/cubeText1.bbf64f74ce5affdf17c6.jpg
new file mode 100644
index 0000000..0c9159e
Binary files /dev/null and b/experiment/simulation/images/cubeText1.bbf64f74ce5affdf17c6.jpg differ
diff --git a/experiment/simulation/index.html b/experiment/simulation/index.html
index ee9be23..272b519 100644
--- a/experiment/simulation/index.html
+++ b/experiment/simulation/index.html
@@ -1,13 +1,45 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ React App
+
+
+
+
+
+
+
diff --git a/experiment/simulation/js/787.ceba7239.chunk.js b/experiment/simulation/js/787.ceba7239.chunk.js
new file mode 100644
index 0000000..9602e99
--- /dev/null
+++ b/experiment/simulation/js/787.ceba7239.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(self.webpackChunkproduct=self.webpackChunkproduct||[]).push([[787],{787:function(e,t,n){n.r(t),n.d(t,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return C},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},f=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){f((function(e){var t=e.timeStamp;v=t}),!0)},l=function(){return v<0&&(v=p(),d(),s((function(){setTimeout((function(){v=p(),d()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime-1&&e(t)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},p=c("layout-shift",v);p&&(n=m(i,r,t),f((function(){p.takeRecords().map(v),n(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,F(removeEventListener),S())},S=function(){if(r>=0&&r1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",n,E),addEventListener("pointercancel",i,E)}(t,e):L(t,e)}},F=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,b,E)}))},C=function(e,t){var n,a=l(),v=u("FID"),p=function(e){e.startTimeperformance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",(function(){return setTimeout(t,0)}))}}}]);
+//# sourceMappingURL=787.ceba7239.chunk.js.map
\ No newline at end of file
diff --git a/experiment/simulation/js/787.ceba7239.chunk.js.map b/experiment/simulation/js/787.ceba7239.chunk.js.map
new file mode 100644
index 0000000..28c06e5
--- /dev/null
+++ b/experiment/simulation/js/787.ceba7239.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/787.ceba7239.chunk.js","mappings":"mQAAA,IAAIA,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,SAASJ,EAAEC,GAAG,MAAM,CAACI,KAAKL,EAAEM,WAAM,IAASL,GAAG,EAAEA,EAAEM,MAAM,EAAEC,QAAQ,GAAGC,GAAG,MAAMC,OAAOC,KAAKC,MAAM,KAAKF,OAAOG,KAAKC,MAAM,cAAcD,KAAKE,UAAU,MAAM,EAAEC,EAAE,SAAShB,EAAEC,GAAG,IAAI,GAAGgB,oBAAoBC,oBAAoBC,SAASnB,GAAG,CAAC,GAAG,gBAAgBA,KAAK,2BAA2BoB,MAAM,OAAO,IAAIlB,EAAE,IAAIe,qBAAqB,SAASjB,GAAG,OAAOA,EAAEqB,aAAaC,IAAIrB,EAAE,IAAI,OAAOC,EAAEqB,QAAQ,CAACC,KAAKxB,EAAEyB,UAAS,IAAKvB,CAAC,CAAC,CAAC,MAAMF,GAAG,CAAC,EAAE0B,EAAE,SAAS1B,EAAEC,GAAG,IAAIC,EAAE,SAASA,EAAEC,GAAG,aAAaA,EAAEqB,MAAM,WAAWG,SAASC,kBAAkB5B,EAAEG,GAAGF,IAAI4B,oBAAoB,mBAAmB3B,GAAE,GAAI2B,oBAAoB,WAAW3B,GAAE,IAAK,EAAE4B,iBAAiB,mBAAmB5B,GAAE,GAAI4B,iBAAiB,WAAW5B,GAAE,EAAG,EAAE6B,EAAE,SAAS/B,GAAG8B,iBAAiB,YAAY,SAAS7B,GAAGA,EAAE+B,WAAWhC,EAAEC,EAAE,IAAG,EAAG,EAAEgC,EAAE,SAASjC,EAAEC,EAAEC,GAAG,IAAIC,EAAE,OAAO,SAASC,GAAGH,EAAEK,OAAO,IAAIF,GAAGF,KAAKD,EAAEM,MAAMN,EAAEK,OAAOH,GAAG,IAAIF,EAAEM,YAAO,IAASJ,KAAKA,EAAEF,EAAEK,MAAMN,EAAEC,IAAI,CAAC,EAAEiC,GAAG,EAAEC,EAAE,WAAW,MAAM,WAAWR,SAASC,gBAAgB,EAAE,GAAG,EAAEQ,EAAE,WAAWV,GAAG,SAAS1B,GAAG,IAAIC,EAAED,EAAEqC,UAAUH,EAAEjC,CAAC,IAAG,EAAG,EAAEqC,EAAE,WAAW,OAAOJ,EAAE,IAAIA,EAAEC,IAAIC,IAAIL,GAAG,WAAWQ,YAAY,WAAWL,EAAEC,IAAIC,GAAG,GAAG,EAAE,KAAK,CAAC,mBAAII,GAAkB,OAAON,CAAC,EAAE,EAAEO,EAAE,SAASzC,EAAEC,GAAG,IAAIC,EAAEC,EAAEmC,IAAIZ,EAAEtB,EAAE,OAAO8B,EAAE,SAASlC,GAAG,2BAA2BA,EAAEK,OAAO+B,GAAGA,EAAEM,aAAa1C,EAAE2C,UAAUxC,EAAEqC,kBAAkBd,EAAEpB,MAAMN,EAAE2C,UAAUjB,EAAElB,QAAQoC,KAAK5C,GAAGE,GAAE,IAAK,EAAEiC,EAAEU,OAAOC,aAAaA,YAAYC,kBAAkBD,YAAYC,iBAAiB,0BAA0B,GAAGX,EAAED,EAAE,KAAKnB,EAAE,QAAQkB,IAAIC,GAAGC,KAAKlC,EAAE+B,EAAEjC,EAAE0B,EAAEzB,GAAGkC,GAAGD,EAAEC,GAAGJ,GAAG,SAAS5B,GAAGuB,EAAEtB,EAAE,OAAOF,EAAE+B,EAAEjC,EAAE0B,EAAEzB,GAAG+C,uBAAuB,WAAWA,uBAAuB,WAAWtB,EAAEpB,MAAMwC,YAAYlC,MAAMT,EAAEkC,UAAUnC,GAAE,EAAG,GAAG,GAAG,IAAI,EAAE+C,GAAE,EAAGC,GAAG,EAAEC,EAAE,SAASnD,EAAEC,GAAGgD,IAAIR,GAAG,SAASzC,GAAGkD,EAAElD,EAAEM,KAAK,IAAI2C,GAAE,GAAI,IAAI/C,EAAEC,EAAE,SAASF,GAAGiD,GAAG,GAAGlD,EAAEC,EAAE,EAAEiC,EAAE9B,EAAE,MAAM,GAAG+B,EAAE,EAAEC,EAAE,GAAGE,EAAE,SAAStC,GAAG,IAAIA,EAAEoD,eAAe,CAAC,IAAInD,EAAEmC,EAAE,GAAGjC,EAAEiC,EAAEA,EAAEiB,OAAO,GAAGlB,GAAGnC,EAAE2C,UAAUxC,EAAEwC,UAAU,KAAK3C,EAAE2C,UAAU1C,EAAE0C,UAAU,KAAKR,GAAGnC,EAAEM,MAAM8B,EAAEQ,KAAK5C,KAAKmC,EAAEnC,EAAEM,MAAM8B,EAAE,CAACpC,IAAImC,EAAED,EAAE5B,QAAQ4B,EAAE5B,MAAM6B,EAAED,EAAE1B,QAAQ4B,EAAElC,IAAI,CAAC,EAAEiD,EAAEnC,EAAE,eAAesB,GAAGa,IAAIjD,EAAE+B,EAAE9B,EAAE+B,EAAEjC,GAAGyB,GAAG,WAAWyB,EAAEG,cAAchC,IAAIgB,GAAGpC,GAAE,EAAG,IAAI6B,GAAG,WAAWI,EAAE,EAAEe,GAAG,EAAEhB,EAAE9B,EAAE,MAAM,GAAGF,EAAE+B,EAAE9B,EAAE+B,EAAEjC,EAAE,IAAI,EAAEsD,EAAE,CAACC,SAAQ,EAAGC,SAAQ,GAAIC,EAAE,IAAI/C,KAAKgD,EAAE,SAASxD,EAAEC,GAAGJ,IAAIA,EAAEI,EAAEH,EAAEE,EAAED,EAAE,IAAIS,KAAKiD,EAAE/B,qBAAqBgC,IAAI,EAAEA,EAAE,WAAW,GAAG5D,GAAG,GAAGA,EAAEC,EAAEwD,EAAE,CAAC,IAAItD,EAAE,CAAC0D,UAAU,cAAczD,KAAKL,EAAEwB,KAAKuC,OAAO/D,EAAE+D,OAAOC,WAAWhE,EAAEgE,WAAWrB,UAAU3C,EAAEqC,UAAU4B,gBAAgBjE,EAAEqC,UAAUpC,GAAGE,EAAE+D,SAAS,SAASlE,GAAGA,EAAEI,EAAE,IAAID,EAAE,EAAE,CAAC,EAAEgE,EAAE,SAASnE,GAAG,GAAGA,EAAEgE,WAAW,CAAC,IAAI/D,GAAGD,EAAEqC,UAAU,KAAK,IAAI1B,KAAKmC,YAAYlC,OAAOZ,EAAEqC,UAAU,eAAerC,EAAEwB,KAAK,SAASxB,EAAEC,GAAG,IAAIC,EAAE,WAAWyD,EAAE3D,EAAEC,GAAGG,GAAG,EAAED,EAAE,WAAWC,GAAG,EAAEA,EAAE,WAAWyB,oBAAoB,YAAY3B,EAAEqD,GAAG1B,oBAAoB,gBAAgB1B,EAAEoD,EAAE,EAAEzB,iBAAiB,YAAY5B,EAAEqD,GAAGzB,iBAAiB,gBAAgB3B,EAAEoD,EAAE,CAAhO,CAAkOtD,EAAED,GAAG2D,EAAE1D,EAAED,EAAE,CAAC,EAAE4D,EAAE,SAAS5D,GAAG,CAAC,YAAY,UAAU,aAAa,eAAekE,SAAS,SAASjE,GAAG,OAAOD,EAAEC,EAAEkE,EAAEZ,EAAE,GAAG,EAAEa,EAAE,SAASlE,EAAEgC,GAAG,IAAIC,EAAEC,EAAEE,IAAIG,EAAErC,EAAE,OAAO6C,EAAE,SAASjD,GAAGA,EAAE2C,UAAUP,EAAEI,kBAAkBC,EAAEnC,MAAMN,EAAEiE,gBAAgBjE,EAAE2C,UAAUF,EAAEjC,QAAQoC,KAAK5C,GAAGmC,GAAE,GAAI,EAAEe,EAAElC,EAAE,cAAciC,GAAGd,EAAEF,EAAE/B,EAAEuC,EAAEP,GAAGgB,GAAGxB,GAAG,WAAWwB,EAAEI,cAAchC,IAAI2B,GAAGC,EAAER,YAAY,IAAG,GAAIQ,GAAGnB,GAAG,WAAW,IAAIf,EAAEyB,EAAErC,EAAE,OAAO+B,EAAEF,EAAE/B,EAAEuC,EAAEP,GAAG/B,EAAE,GAAGF,GAAG,EAAED,EAAE,KAAK4D,EAAE9B,kBAAkBd,EAAEiC,EAAE9C,EAAEyC,KAAK5B,GAAG6C,GAAG,GAAG,EAAEQ,EAAE,CAAC,EAAEC,EAAE,SAAStE,EAAEC,GAAG,IAAIC,EAAEC,EAAEmC,IAAIJ,EAAE9B,EAAE,OAAO+B,EAAE,SAASnC,GAAG,IAAIC,EAAED,EAAE2C,UAAU1C,EAAEE,EAAEqC,kBAAkBN,EAAE5B,MAAML,EAAEiC,EAAE1B,QAAQoC,KAAK5C,GAAGE,IAAI,EAAEkC,EAAEpB,EAAE,2BAA2BmB,GAAG,GAAGC,EAAE,CAAClC,EAAE+B,EAAEjC,EAAEkC,EAAEjC,GAAG,IAAIwC,EAAE,WAAW4B,EAAEnC,EAAEzB,MAAM2B,EAAEkB,cAAchC,IAAIa,GAAGC,EAAEM,aAAa2B,EAAEnC,EAAEzB,KAAI,EAAGP,GAAE,GAAI,EAAE,CAAC,UAAU,SAASgE,SAAS,SAASlE,GAAG8B,iBAAiB9B,EAAEyC,EAAE,CAAC8B,MAAK,EAAGd,SAAQ,GAAI,IAAI/B,EAAEe,GAAE,GAAIV,GAAG,SAAS5B,GAAG+B,EAAE9B,EAAE,OAAOF,EAAE+B,EAAEjC,EAAEkC,EAAEjC,GAAG+C,uBAAuB,WAAWA,uBAAuB,WAAWd,EAAE5B,MAAMwC,YAAYlC,MAAMT,EAAEkC,UAAUgC,EAAEnC,EAAEzB,KAAI,EAAGP,GAAE,EAAG,GAAG,GAAG,GAAG,CAAC,EAAEsE,EAAE,SAASxE,GAAG,IAAIC,EAAEC,EAAEE,EAAE,QAAQH,EAAE,WAAW,IAAI,IAAIA,EAAE6C,YAAY2B,iBAAiB,cAAc,IAAI,WAAW,IAAIzE,EAAE8C,YAAY4B,OAAOzE,EAAE,CAAC6D,UAAU,aAAanB,UAAU,GAAG,IAAI,IAAIzC,KAAKF,EAAE,oBAAoBE,GAAG,WAAWA,IAAID,EAAEC,GAAGW,KAAK8D,IAAI3E,EAAEE,GAAGF,EAAE4E,gBAAgB,IAAI,OAAO3E,CAAC,CAAjL,GAAqL,GAAGC,EAAEI,MAAMJ,EAAEK,MAAMN,EAAE4E,cAAc3E,EAAEI,MAAM,GAAGJ,EAAEI,MAAMwC,YAAYlC,MAAM,OAAOV,EAAEM,QAAQ,CAACP,GAAGD,EAAEE,EAAE,CAAC,MAAMF,GAAG,CAAC,EAAE,aAAa2B,SAASmD,WAAWvC,WAAWtC,EAAE,GAAG6B,iBAAiB,QAAQ,WAAW,OAAOS,WAAWtC,EAAE,EAAE,GAAG,C","sources":["../node_modules/web-vitals/dist/web-vitals.js"],"sourcesContent":["var e,t,n,i,r=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:\"v2-\".concat(Date.now(),\"-\").concat(Math.floor(8999999999999*Math.random())+1e12)}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(\"first-input\"===e&&!(\"PerformanceEventTiming\"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},o=function(e,t){var n=function n(i){\"pagehide\"!==i.type&&\"hidden\"!==document.visibilityState||(e(i),t&&(removeEventListener(\"visibilitychange\",n,!0),removeEventListener(\"pagehide\",n,!0)))};addEventListener(\"visibilitychange\",n,!0),addEventListener(\"pagehide\",n,!0)},u=function(e){addEventListener(\"pageshow\",(function(t){t.persisted&&e(t)}),!0)},c=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},f=-1,s=function(){return\"hidden\"===document.visibilityState?0:1/0},m=function(){o((function(e){var t=e.timeStamp;f=t}),!0)},v=function(){return f<0&&(f=s(),m(),u((function(){setTimeout((function(){f=s(),m()}),0)}))),{get firstHiddenTime(){return f}}},d=function(e,t){var n,i=v(),o=r(\"FCP\"),f=function(e){\"first-contentful-paint\"===e.name&&(m&&m.disconnect(),e.startTime-1&&e(t)},f=r(\"CLS\",0),s=0,m=[],v=function(e){if(!e.hadRecentInput){var t=m[0],i=m[m.length-1];s&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(s+=e.value,m.push(e)):(s=e.value,m=[e]),s>f.value&&(f.value=s,f.entries=m,n())}},h=a(\"layout-shift\",v);h&&(n=c(i,f,t),o((function(){h.takeRecords().map(v),n(!0)})),u((function(){s=0,l=-1,f=r(\"CLS\",0),n=c(i,f,t)})))},T={passive:!0,capture:!0},y=new Date,g=function(i,r){e||(e=r,t=i,n=new Date,w(removeEventListener),E())},E=function(){if(t>=0&&t1e12?new Date:performance.now())-e.timeStamp;\"pointerdown\"==e.type?function(e,t){var n=function(){g(e,t),r()},i=function(){r()},r=function(){removeEventListener(\"pointerup\",n,T),removeEventListener(\"pointercancel\",i,T)};addEventListener(\"pointerup\",n,T),addEventListener(\"pointercancel\",i,T)}(t,e):g(t,e)}},w=function(e){[\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"].forEach((function(t){return e(t,S,T)}))},L=function(n,f){var s,m=v(),d=r(\"FID\"),p=function(e){e.startTimeperformance.now())return;n.entries=[t],e(n)}catch(e){}},\"complete\"===document.readyState?setTimeout(t,0):addEventListener(\"load\",(function(){return setTimeout(t,0)}))};export{h as getCLS,d as getFCP,L as getFID,F as getLCP,P as getTTFB};\n"],"names":["e","t","n","i","r","name","value","delta","entries","id","concat","Date","now","Math","floor","random","a","PerformanceObserver","supportedEntryTypes","includes","self","getEntries","map","observe","type","buffered","o","document","visibilityState","removeEventListener","addEventListener","u","persisted","c","f","s","m","timeStamp","v","setTimeout","firstHiddenTime","d","disconnect","startTime","push","window","performance","getEntriesByName","requestAnimationFrame","p","l","h","hadRecentInput","length","takeRecords","T","passive","capture","y","g","w","E","entryType","target","cancelable","processingStart","forEach","S","L","b","F","once","P","getEntriesByType","timing","max","navigationStart","responseStart","readyState"],"sourceRoot":""}
\ No newline at end of file
diff --git a/experiment/simulation/js/main.1ede34af.js b/experiment/simulation/js/main.1ede34af.js
new file mode 100644
index 0000000..c4de090
--- /dev/null
+++ b/experiment/simulation/js/main.1ede34af.js
@@ -0,0 +1,143978 @@
+/*! For license information please see main.1ede34af.js.LICENSE.txt */
+(function () {
+ var e = {
+ 3361: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return ie;
+ },
+ });
+ var r = (function () {
+ function e(e) {
+ var t = this;
+ (this._insertTag = function (e) {
+ var n;
+ (n =
+ 0 === t.tags.length
+ ? t.insertionPoint
+ ? t.insertionPoint.nextSibling
+ : t.prepend
+ ? t.container.firstChild
+ : t.before
+ : t.tags[t.tags.length - 1].nextSibling),
+ t.container.insertBefore(e, n),
+ t.tags.push(e);
+ }),
+ (this.isSpeedy = void 0 === e.speedy || e.speedy),
+ (this.tags = []),
+ (this.ctr = 0),
+ (this.nonce = e.nonce),
+ (this.key = e.key),
+ (this.container = e.container),
+ (this.prepend = e.prepend),
+ (this.insertionPoint = e.insertionPoint),
+ (this.before = null);
+ }
+ var t = e.prototype;
+ return (
+ (t.hydrate = function (e) {
+ e.forEach(this._insertTag);
+ }),
+ (t.insert = function (e) {
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 &&
+ this._insertTag(
+ (function (e) {
+ var t = document.createElement("style");
+ return (
+ t.setAttribute("data-emotion", e.key),
+ void 0 !== e.nonce && t.setAttribute("nonce", e.nonce),
+ t.appendChild(document.createTextNode("")),
+ t.setAttribute("data-s", ""),
+ t
+ );
+ })(this)
+ );
+ var t = this.tags[this.tags.length - 1];
+ if (this.isSpeedy) {
+ var n = (function (e) {
+ if (e.sheet) return e.sheet;
+ for (var t = 0; t < document.styleSheets.length; t++)
+ if (document.styleSheets[t].ownerNode === e)
+ return document.styleSheets[t];
+ })(t);
+ try {
+ n.insertRule(e, n.cssRules.length);
+ } catch (r) {
+ 0;
+ }
+ } else t.appendChild(document.createTextNode(e));
+ this.ctr++;
+ }),
+ (t.flush = function () {
+ this.tags.forEach(function (e) {
+ return e.parentNode && e.parentNode.removeChild(e);
+ }),
+ (this.tags = []),
+ (this.ctr = 0);
+ }),
+ e
+ );
+ })(),
+ i = Math.abs,
+ a = String.fromCharCode,
+ o = Object.assign;
+ function s(e) {
+ return e.trim();
+ }
+ function l(e, t, n) {
+ return e.replace(t, n);
+ }
+ function u(e, t) {
+ return e.indexOf(t);
+ }
+ function c(e, t) {
+ return 0 | e.charCodeAt(t);
+ }
+ function f(e, t, n) {
+ return e.slice(t, n);
+ }
+ function d(e) {
+ return e.length;
+ }
+ function h(e) {
+ return e.length;
+ }
+ function p(e, t) {
+ return t.push(e), e;
+ }
+ var v = 1,
+ m = 1,
+ g = 0,
+ A = 0,
+ y = 0,
+ b = "";
+ function x(e, t, n, r, i, a, o) {
+ return {
+ value: e,
+ root: t,
+ parent: n,
+ type: r,
+ props: i,
+ children: a,
+ line: v,
+ column: m,
+ length: o,
+ return: "",
+ };
+ }
+ function S(e, t) {
+ return o(
+ x("", null, null, "", null, null, 0),
+ e,
+ { length: -e.length },
+ t
+ );
+ }
+ function E() {
+ return (
+ (y = A > 0 ? c(b, --A) : 0), m--, 10 === y && ((m = 1), v--), y
+ );
+ }
+ function _() {
+ return (
+ (y = A < g ? c(b, A++) : 0), m++, 10 === y && ((m = 1), v++), y
+ );
+ }
+ function C() {
+ return c(b, A);
+ }
+ function w() {
+ return A;
+ }
+ function T(e, t) {
+ return f(b, e, t);
+ }
+ function M(e) {
+ switch (e) {
+ case 0:
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ return 5;
+ case 33:
+ case 43:
+ case 44:
+ case 47:
+ case 62:
+ case 64:
+ case 126:
+ case 59:
+ case 123:
+ case 125:
+ return 4;
+ case 58:
+ return 3;
+ case 34:
+ case 39:
+ case 40:
+ case 91:
+ return 2;
+ case 41:
+ case 93:
+ return 1;
+ }
+ return 0;
+ }
+ function I(e) {
+ return (v = m = 1), (g = d((b = e))), (A = 0), [];
+ }
+ function k(e) {
+ return (b = ""), e;
+ }
+ function R(e) {
+ return s(T(A - 1, L(91 === e ? e + 2 : 40 === e ? e + 1 : e)));
+ }
+ function B(e) {
+ for (; (y = C()) && y < 33; ) _();
+ return M(e) > 2 || M(y) > 3 ? "" : " ";
+ }
+ function P(e, t) {
+ for (
+ ;
+ --t &&
+ _() &&
+ !(y < 48 || y > 102 || (y > 57 && y < 65) || (y > 70 && y < 97));
+
+ );
+ return T(e, w() + (t < 6 && 32 == C() && 32 == _()));
+ }
+ function L(e) {
+ for (; _(); )
+ switch (y) {
+ case e:
+ return A;
+ case 34:
+ case 39:
+ 34 !== e && 39 !== e && L(y);
+ break;
+ case 40:
+ 41 === e && L(e);
+ break;
+ case 92:
+ _();
+ }
+ return A;
+ }
+ function D(e, t) {
+ for (; _() && e + y !== 57 && (e + y !== 84 || 47 !== C()); );
+ return "/*" + T(t, A - 1) + "*" + a(47 === e ? e : _());
+ }
+ function U(e) {
+ for (; !M(C()); ) _();
+ return T(e, A);
+ }
+ var F = "-ms-",
+ O = "-moz-",
+ N = "-webkit-",
+ G = "comm",
+ Z = "rule",
+ z = "decl",
+ Q = "@keyframes";
+ function H(e, t) {
+ for (var n = "", r = h(e), i = 0; i < r; i++)
+ n += t(e[i], i, e, t) || "";
+ return n;
+ }
+ function V(e, t, n, r) {
+ switch (e.type) {
+ case "@layer":
+ if (e.children.length) break;
+ case "@import":
+ case z:
+ return (e.return = e.return || e.value);
+ case G:
+ return "";
+ case Q:
+ return (e.return = e.value + "{" + H(e.children, r) + "}");
+ case Z:
+ e.value = e.props.join(",");
+ }
+ return d((n = H(e.children, r)))
+ ? (e.return = e.value + "{" + n + "}")
+ : "";
+ }
+ function j(e) {
+ return k(W("", null, null, null, [""], (e = I(e)), 0, [0], e));
+ }
+ function W(e, t, n, r, i, o, s, f, h) {
+ for (
+ var v = 0,
+ m = 0,
+ g = s,
+ A = 0,
+ y = 0,
+ b = 0,
+ x = 1,
+ S = 1,
+ T = 1,
+ M = 0,
+ I = "",
+ k = i,
+ L = o,
+ F = r,
+ O = I;
+ S;
+
+ )
+ switch (((b = M), (M = _()))) {
+ case 40:
+ if (108 != b && 58 == c(O, g - 1)) {
+ -1 != u((O += l(R(M), "&", "&\f")), "&\f") && (T = -1);
+ break;
+ }
+ case 34:
+ case 39:
+ case 91:
+ O += R(M);
+ break;
+ case 9:
+ case 10:
+ case 13:
+ case 32:
+ O += B(b);
+ break;
+ case 92:
+ O += P(w() - 1, 7);
+ continue;
+ case 47:
+ switch (C()) {
+ case 42:
+ case 47:
+ p(Y(D(_(), w()), t, n), h);
+ break;
+ default:
+ O += "/";
+ }
+ break;
+ case 123 * x:
+ f[v++] = d(O) * T;
+ case 125 * x:
+ case 59:
+ case 0:
+ switch (M) {
+ case 0:
+ case 125:
+ S = 0;
+ case 59 + m:
+ -1 == T && (O = l(O, /\f/g, "")),
+ y > 0 &&
+ d(O) - g &&
+ p(
+ y > 32
+ ? q(O + ";", r, n, g - 1)
+ : q(l(O, " ", "") + ";", r, n, g - 2),
+ h
+ );
+ break;
+ case 59:
+ O += ";";
+ default:
+ if (
+ (p(
+ (F = X(O, t, n, v, m, i, f, I, (k = []), (L = []), g)),
+ o
+ ),
+ 123 === M)
+ )
+ if (0 === m) W(O, t, F, F, k, o, g, f, L);
+ else
+ switch (99 === A && 110 === c(O, 3) ? 100 : A) {
+ case 100:
+ case 108:
+ case 109:
+ case 115:
+ W(
+ e,
+ F,
+ F,
+ r &&
+ p(X(e, F, F, 0, 0, i, f, I, i, (k = []), g), L),
+ i,
+ L,
+ g,
+ f,
+ r ? k : L
+ );
+ break;
+ default:
+ W(O, F, F, F, [""], L, 0, f, L);
+ }
+ }
+ (v = m = y = 0), (x = T = 1), (I = O = ""), (g = s);
+ break;
+ case 58:
+ (g = 1 + d(O)), (y = b);
+ default:
+ if (x < 1)
+ if (123 == M) --x;
+ else if (125 == M && 0 == x++ && 125 == E()) continue;
+ switch (((O += a(M)), M * x)) {
+ case 38:
+ T = m > 0 ? 1 : ((O += "\f"), -1);
+ break;
+ case 44:
+ (f[v++] = (d(O) - 1) * T), (T = 1);
+ break;
+ case 64:
+ 45 === C() && (O += R(_())),
+ (A = C()),
+ (m = g = d((I = O += U(w())))),
+ M++;
+ break;
+ case 45:
+ 45 === b && 2 == d(O) && (x = 0);
+ }
+ }
+ return o;
+ }
+ function X(e, t, n, r, a, o, u, c, d, p, v) {
+ for (
+ var m = a - 1,
+ g = 0 === a ? o : [""],
+ A = h(g),
+ y = 0,
+ b = 0,
+ S = 0;
+ y < r;
+ ++y
+ )
+ for (
+ var E = 0, _ = f(e, m + 1, (m = i((b = u[y])))), C = e;
+ E < A;
+ ++E
+ )
+ (C = s(b > 0 ? g[E] + " " + _ : l(_, /&\f/g, g[E]))) &&
+ (d[S++] = C);
+ return x(e, t, n, 0 === a ? Z : c, d, p, v);
+ }
+ function Y(e, t, n) {
+ return x(e, t, n, G, a(y), f(e, 2, -2), 0);
+ }
+ function q(e, t, n, r) {
+ return x(e, t, n, z, f(e, 0, r), f(e, r + 1, -1), r);
+ }
+ var J = function (e, t, n) {
+ for (
+ var r = 0, i = 0;
+ (r = i), (i = C()), 38 === r && 12 === i && (t[n] = 1), !M(i);
+
+ )
+ _();
+ return T(e, A);
+ },
+ K = function (e, t) {
+ return k(
+ (function (e, t) {
+ var n = -1,
+ r = 44;
+ do {
+ switch (M(r)) {
+ case 0:
+ 38 === r && 12 === C() && (t[n] = 1),
+ (e[n] += J(A - 1, t, n));
+ break;
+ case 2:
+ e[n] += R(r);
+ break;
+ case 4:
+ if (44 === r) {
+ (e[++n] = 58 === C() ? "&\f" : ""),
+ (t[n] = e[n].length);
+ break;
+ }
+ default:
+ e[n] += a(r);
+ }
+ } while ((r = _()));
+ return e;
+ })(I(e), t)
+ );
+ },
+ $ = new WeakMap(),
+ ee = function (e) {
+ if ("rule" === e.type && e.parent && !(e.length < 1)) {
+ for (
+ var t = e.value,
+ n = e.parent,
+ r = e.column === n.column && e.line === n.line;
+ "rule" !== n.type;
+
+ )
+ if (!(n = n.parent)) return;
+ if (
+ (1 !== e.props.length || 58 === t.charCodeAt(0) || $.get(n)) &&
+ !r
+ ) {
+ $.set(e, !0);
+ for (
+ var i = [], a = K(t, i), o = n.props, s = 0, l = 0;
+ s < a.length;
+ s++
+ )
+ for (var u = 0; u < o.length; u++, l++)
+ e.props[l] = i[s]
+ ? a[s].replace(/&\f/g, o[u])
+ : o[u] + " " + a[s];
+ }
+ }
+ },
+ te = function (e) {
+ if ("decl" === e.type) {
+ var t = e.value;
+ 108 === t.charCodeAt(0) &&
+ 98 === t.charCodeAt(2) &&
+ ((e.return = ""), (e.value = ""));
+ }
+ };
+ function ne(e, t) {
+ switch (
+ (function (e, t) {
+ return 45 ^ c(e, 0)
+ ? (((((((t << 2) ^ c(e, 0)) << 2) ^ c(e, 1)) << 2) ^ c(e, 2)) <<
+ 2) ^
+ c(e, 3)
+ : 0;
+ })(e, t)
+ ) {
+ case 5103:
+ return N + "print-" + e + e;
+ case 5737:
+ case 4201:
+ case 3177:
+ case 3433:
+ case 1641:
+ case 4457:
+ case 2921:
+ case 5572:
+ case 6356:
+ case 5844:
+ case 3191:
+ case 6645:
+ case 3005:
+ case 6391:
+ case 5879:
+ case 5623:
+ case 6135:
+ case 4599:
+ case 4855:
+ case 4215:
+ case 6389:
+ case 5109:
+ case 5365:
+ case 5621:
+ case 3829:
+ return N + e + e;
+ case 5349:
+ case 4246:
+ case 4810:
+ case 6968:
+ case 2756:
+ return N + e + O + e + F + e + e;
+ case 6828:
+ case 4268:
+ return N + e + F + e + e;
+ case 6165:
+ return N + e + F + "flex-" + e + e;
+ case 5187:
+ return (
+ N +
+ e +
+ l(e, /(\w+).+(:[^]+)/, N + "box-$1$2" + F + "flex-$1$2") +
+ e
+ );
+ case 5443:
+ return N + e + F + "flex-item-" + l(e, /flex-|-self/, "") + e;
+ case 4675:
+ return (
+ N +
+ e +
+ F +
+ "flex-line-pack" +
+ l(e, /align-content|flex-|-self/, "") +
+ e
+ );
+ case 5548:
+ return N + e + F + l(e, "shrink", "negative") + e;
+ case 5292:
+ return N + e + F + l(e, "basis", "preferred-size") + e;
+ case 6060:
+ return (
+ N +
+ "box-" +
+ l(e, "-grow", "") +
+ N +
+ e +
+ F +
+ l(e, "grow", "positive") +
+ e
+ );
+ case 4554:
+ return N + l(e, /([^-])(transform)/g, "$1" + N + "$2") + e;
+ case 6187:
+ return (
+ l(
+ l(l(e, /(zoom-|grab)/, N + "$1"), /(image-set)/, N + "$1"),
+ e,
+ ""
+ ) + e
+ );
+ case 5495:
+ case 3959:
+ return l(e, /(image-set\([^]*)/, N + "$1$`$1");
+ case 4968:
+ return (
+ l(
+ l(
+ e,
+ /(.+:)(flex-)?(.*)/,
+ N + "box-pack:$3" + F + "flex-pack:$3"
+ ),
+ /s.+-b[^;]+/,
+ "justify"
+ ) +
+ N +
+ e +
+ e
+ );
+ case 4095:
+ case 3583:
+ case 4068:
+ case 2532:
+ return l(e, /(.+)-inline(.+)/, N + "$1$2") + e;
+ case 8116:
+ case 7059:
+ case 5753:
+ case 5535:
+ case 5445:
+ case 5701:
+ case 4933:
+ case 4677:
+ case 5533:
+ case 5789:
+ case 5021:
+ case 4765:
+ if (d(e) - 1 - t > 6)
+ switch (c(e, t + 1)) {
+ case 109:
+ if (45 !== c(e, t + 4)) break;
+ case 102:
+ return (
+ l(
+ e,
+ /(.+:)(.+)-([^]+)/,
+ "$1" +
+ N +
+ "$2-$3$1" +
+ O +
+ (108 == c(e, t + 3) ? "$3" : "$2-$3")
+ ) + e
+ );
+ case 115:
+ return ~u(e, "stretch")
+ ? ne(l(e, "stretch", "fill-available"), t) + e
+ : e;
+ }
+ break;
+ case 4949:
+ if (115 !== c(e, t + 1)) break;
+ case 6444:
+ switch (c(e, d(e) - 3 - (~u(e, "!important") && 10))) {
+ case 107:
+ return l(e, ":", ":" + N) + e;
+ case 101:
+ return (
+ l(
+ e,
+ /(.+:)([^;!]+)(;|!.+)?/,
+ "$1" +
+ N +
+ (45 === c(e, 14) ? "inline-" : "") +
+ "box$3$1" +
+ N +
+ "$2$3$1" +
+ F +
+ "$2box$3"
+ ) + e
+ );
+ }
+ break;
+ case 5936:
+ switch (c(e, t + 11)) {
+ case 114:
+ return N + e + F + l(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
+ case 108:
+ return N + e + F + l(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
+ case 45:
+ return N + e + F + l(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
+ }
+ return N + e + F + e + e;
+ }
+ return e;
+ }
+ var re = [
+ function (e, t, n, r) {
+ if (e.length > -1 && !e.return)
+ switch (e.type) {
+ case z:
+ e.return = ne(e.value, e.length);
+ break;
+ case Q:
+ return H([S(e, { value: l(e.value, "@", "@" + N) })], r);
+ case Z:
+ if (e.length)
+ return (function (e, t) {
+ return e.map(t).join("");
+ })(e.props, function (t) {
+ switch (
+ (function (e, t) {
+ return (e = t.exec(e)) ? e[0] : e;
+ })(t, /(::plac\w+|:read-\w+)/)
+ ) {
+ case ":read-only":
+ case ":read-write":
+ return H(
+ [
+ S(e, {
+ props: [l(t, /:(read-\w+)/, ":-moz-$1")],
+ }),
+ ],
+ r
+ );
+ case "::placeholder":
+ return H(
+ [
+ S(e, {
+ props: [
+ l(t, /:(plac\w+)/, ":" + N + "input-$1"),
+ ],
+ }),
+ S(e, {
+ props: [l(t, /:(plac\w+)/, ":-moz-$1")],
+ }),
+ S(e, {
+ props: [l(t, /:(plac\w+)/, F + "input-$1")],
+ }),
+ ],
+ r
+ );
+ }
+ return "";
+ });
+ }
+ },
+ ],
+ ie = function (e) {
+ var t = e.key;
+ if ("css" === t) {
+ var n = document.querySelectorAll(
+ "style[data-emotion]:not([data-s])"
+ );
+ Array.prototype.forEach.call(n, function (e) {
+ -1 !== e.getAttribute("data-emotion").indexOf(" ") &&
+ (document.head.appendChild(e), e.setAttribute("data-s", ""));
+ });
+ }
+ var i = e.stylisPlugins || re;
+ var a,
+ o,
+ s = {},
+ l = [];
+ (a = e.container || document.head),
+ Array.prototype.forEach.call(
+ document.querySelectorAll('style[data-emotion^="' + t + ' "]'),
+ function (e) {
+ for (
+ var t = e.getAttribute("data-emotion").split(" "), n = 1;
+ n < t.length;
+ n++
+ )
+ s[t[n]] = !0;
+ l.push(e);
+ }
+ );
+ var u,
+ c,
+ f = [
+ V,
+ ((c = function (e) {
+ u.insert(e);
+ }),
+ function (e) {
+ e.root || ((e = e.return) && c(e));
+ }),
+ ],
+ d = (function (e) {
+ var t = h(e);
+ return function (n, r, i, a) {
+ for (var o = "", s = 0; s < t; s++)
+ o += e[s](n, r, i, a) || "";
+ return o;
+ };
+ })([ee, te].concat(i, f));
+ o = function (e, t, n, r) {
+ (u = n),
+ H(j(e ? e + "{" + t.styles + "}" : t.styles), d),
+ r && (p.inserted[t.name] = !0);
+ };
+ var p = {
+ key: t,
+ sheet: new r({
+ key: t,
+ container: a,
+ nonce: e.nonce,
+ speedy: e.speedy,
+ prepend: e.prepend,
+ insertionPoint: e.insertionPoint,
+ }),
+ nonce: e.nonce,
+ inserted: s,
+ registered: {},
+ insert: o,
+ };
+ return p.sheet.hydrate(l), p;
+ };
+ },
+ 9791: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(9797),
+ i =
+ /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,
+ a = (0, r.Z)(function (e) {
+ return (
+ i.test(e) ||
+ (111 === e.charCodeAt(0) &&
+ 110 === e.charCodeAt(1) &&
+ e.charCodeAt(2) < 91)
+ );
+ });
+ },
+ 9797: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ var t = Object.create(null);
+ return function (n) {
+ return void 0 === t[n] && (t[n] = e(n)), t[n];
+ };
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 2564: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ T: function () {
+ return l;
+ },
+ i: function () {
+ return a;
+ },
+ w: function () {
+ return s;
+ },
+ });
+ var r = n(2791),
+ i = n(3361),
+ a = (n(9140), n(2561), !0),
+ o = r.createContext(
+ "undefined" !== typeof HTMLElement ? (0, i.Z)({ key: "css" }) : null
+ );
+ o.Provider;
+ var s = function (e) {
+ return (0, r.forwardRef)(function (t, n) {
+ var i = (0, r.useContext)(o);
+ return e(t, i, n);
+ });
+ };
+ a ||
+ (s = function (e) {
+ return function (t) {
+ var n = (0, r.useContext)(o);
+ return null === n
+ ? ((n = (0, i.Z)({ key: "css" })),
+ r.createElement(o.Provider, { value: n }, e(t, n)))
+ : e(t, n);
+ };
+ });
+ var l = r.createContext({});
+ },
+ 9140: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ O: function () {
+ return p;
+ },
+ });
+ var r = {
+ animationIterationCount: 1,
+ aspectRatio: 1,
+ borderImageOutset: 1,
+ borderImageSlice: 1,
+ borderImageWidth: 1,
+ boxFlex: 1,
+ boxFlexGroup: 1,
+ boxOrdinalGroup: 1,
+ columnCount: 1,
+ columns: 1,
+ flex: 1,
+ flexGrow: 1,
+ flexPositive: 1,
+ flexShrink: 1,
+ flexNegative: 1,
+ flexOrder: 1,
+ gridRow: 1,
+ gridRowEnd: 1,
+ gridRowSpan: 1,
+ gridRowStart: 1,
+ gridColumn: 1,
+ gridColumnEnd: 1,
+ gridColumnSpan: 1,
+ gridColumnStart: 1,
+ msGridRow: 1,
+ msGridRowSpan: 1,
+ msGridColumn: 1,
+ msGridColumnSpan: 1,
+ fontWeight: 1,
+ lineHeight: 1,
+ opacity: 1,
+ order: 1,
+ orphans: 1,
+ tabSize: 1,
+ widows: 1,
+ zIndex: 1,
+ zoom: 1,
+ WebkitLineClamp: 1,
+ fillOpacity: 1,
+ floodOpacity: 1,
+ stopOpacity: 1,
+ strokeDasharray: 1,
+ strokeDashoffset: 1,
+ strokeMiterlimit: 1,
+ strokeOpacity: 1,
+ strokeWidth: 1,
+ },
+ i = n(9797),
+ a = /[A-Z]|^ms/g,
+ o = /_EMO_([^_]+?)_([^]*?)_EMO_/g,
+ s = function (e) {
+ return 45 === e.charCodeAt(1);
+ },
+ l = function (e) {
+ return null != e && "boolean" !== typeof e;
+ },
+ u = (0, i.Z)(function (e) {
+ return s(e) ? e : e.replace(a, "-$&").toLowerCase();
+ }),
+ c = function (e, t) {
+ switch (e) {
+ case "animation":
+ case "animationName":
+ if ("string" === typeof t)
+ return t.replace(o, function (e, t, n) {
+ return (d = { name: t, styles: n, next: d }), t;
+ });
+ }
+ return 1 === r[e] || s(e) || "number" !== typeof t || 0 === t
+ ? t
+ : t + "px";
+ };
+ function f(e, t, n) {
+ if (null == n) return "";
+ if (void 0 !== n.__emotion_styles) return n;
+ switch (typeof n) {
+ case "boolean":
+ return "";
+ case "object":
+ if (1 === n.anim)
+ return (
+ (d = { name: n.name, styles: n.styles, next: d }), n.name
+ );
+ if (void 0 !== n.styles) {
+ var r = n.next;
+ if (void 0 !== r)
+ for (; void 0 !== r; )
+ (d = { name: r.name, styles: r.styles, next: d }),
+ (r = r.next);
+ return n.styles + ";";
+ }
+ return (function (e, t, n) {
+ var r = "";
+ if (Array.isArray(n))
+ for (var i = 0; i < n.length; i++) r += f(e, t, n[i]) + ";";
+ else
+ for (var a in n) {
+ var o = n[a];
+ if ("object" !== typeof o)
+ null != t && void 0 !== t[o]
+ ? (r += a + "{" + t[o] + "}")
+ : l(o) && (r += u(a) + ":" + c(a, o) + ";");
+ else if (
+ !Array.isArray(o) ||
+ "string" !== typeof o[0] ||
+ (null != t && void 0 !== t[o[0]])
+ ) {
+ var s = f(e, t, o);
+ switch (a) {
+ case "animation":
+ case "animationName":
+ r += u(a) + ":" + s + ";";
+ break;
+ default:
+ r += a + "{" + s + "}";
+ }
+ } else
+ for (var d = 0; d < o.length; d++)
+ l(o[d]) && (r += u(a) + ":" + c(a, o[d]) + ";");
+ }
+ return r;
+ })(e, t, n);
+ case "function":
+ if (void 0 !== e) {
+ var i = d,
+ a = n(e);
+ return (d = i), f(e, t, a);
+ }
+ }
+ if (null == t) return n;
+ var o = t[n];
+ return void 0 !== o ? o : n;
+ }
+ var d,
+ h = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
+ var p = function (e, t, n) {
+ if (
+ 1 === e.length &&
+ "object" === typeof e[0] &&
+ null !== e[0] &&
+ void 0 !== e[0].styles
+ )
+ return e[0];
+ var r = !0,
+ i = "";
+ d = void 0;
+ var a = e[0];
+ null == a || void 0 === a.raw
+ ? ((r = !1), (i += f(n, t, a)))
+ : (i += a[0]);
+ for (var o = 1; o < e.length; o++)
+ (i += f(n, t, e[o])), r && (i += a[o]);
+ h.lastIndex = 0;
+ for (var s, l = ""; null !== (s = h.exec(i)); ) l += "-" + s[1];
+ var u =
+ (function (e) {
+ for (var t, n = 0, r = 0, i = e.length; i >= 4; ++r, i -= 4)
+ (t =
+ 1540483477 *
+ (65535 &
+ (t =
+ (255 & e.charCodeAt(r)) |
+ ((255 & e.charCodeAt(++r)) << 8) |
+ ((255 & e.charCodeAt(++r)) << 16) |
+ ((255 & e.charCodeAt(++r)) << 24))) +
+ ((59797 * (t >>> 16)) << 16)),
+ (n =
+ (1540483477 * (65535 & (t ^= t >>> 24)) +
+ ((59797 * (t >>> 16)) << 16)) ^
+ (1540483477 * (65535 & n) + ((59797 * (n >>> 16)) << 16)));
+ switch (i) {
+ case 3:
+ n ^= (255 & e.charCodeAt(r + 2)) << 16;
+ case 2:
+ n ^= (255 & e.charCodeAt(r + 1)) << 8;
+ case 1:
+ n =
+ 1540483477 * (65535 & (n ^= 255 & e.charCodeAt(r))) +
+ ((59797 * (n >>> 16)) << 16);
+ }
+ return (
+ ((n =
+ 1540483477 * (65535 & (n ^= n >>> 13)) +
+ ((59797 * (n >>> 16)) << 16)) ^
+ (n >>> 15)) >>>
+ 0
+ ).toString(36);
+ })(i) + l;
+ return { name: u, styles: i, next: d };
+ };
+ },
+ 2561: function (e, t, n) {
+ "use strict";
+ var r;
+ n.d(t, {
+ L: function () {
+ return o;
+ },
+ j: function () {
+ return s;
+ },
+ });
+ var i = n(2791),
+ a =
+ !!(r || (r = n.t(i, 2))).useInsertionEffect &&
+ (r || (r = n.t(i, 2))).useInsertionEffect,
+ o =
+ a ||
+ function (e) {
+ return e();
+ },
+ s = a || i.useLayoutEffect;
+ },
+ 5438: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ My: function () {
+ return a;
+ },
+ fp: function () {
+ return r;
+ },
+ hC: function () {
+ return i;
+ },
+ });
+ function r(e, t, n) {
+ var r = "";
+ return (
+ n.split(" ").forEach(function (n) {
+ void 0 !== e[n] ? t.push(e[n] + ";") : (r += n + " ");
+ }),
+ r
+ );
+ }
+ var i = function (e, t, n) {
+ var r = e.key + "-" + t.name;
+ !1 === n &&
+ void 0 === e.registered[r] &&
+ (e.registered[r] = t.styles);
+ },
+ a = function (e, t, n) {
+ i(e, t, n);
+ var r = e.key + "-" + t.name;
+ if (void 0 === e.inserted[t.name]) {
+ var a = t;
+ do {
+ e.insert(t === a ? "." + r : "", a, e.sheet, !0), (a = a.next);
+ } while (void 0 !== a);
+ }
+ };
+ },
+ 9823: function (e, t, n) {
+ "use strict";
+ var r = n(4836);
+ t.Z = void 0;
+ var i = r(n(5649)),
+ a = n(184),
+ o = (0, i.default)(
+ (0, a.jsx)("path", {
+ d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",
+ }),
+ "Close"
+ );
+ t.Z = o;
+ },
+ 1981: function (e, t, n) {
+ "use strict";
+ var r = n(4836);
+ t.Z = void 0;
+ var i = r(n(5649)),
+ a = n(184),
+ o = (0, i.default)(
+ (0, a.jsx)("path", {
+ d: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z",
+ }),
+ "History"
+ );
+ t.Z = o;
+ },
+ 3950: function (e, t, n) {
+ "use strict";
+ var r = n(4836);
+ t.Z = void 0;
+ var i = r(n(5649)),
+ a = n(184),
+ o = (0, i.default)(
+ (0, a.jsx)("path", {
+ d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",
+ }),
+ "Refresh"
+ );
+ t.Z = o;
+ },
+ 5649: function (e, t, n) {
+ "use strict";
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ Object.defineProperty(t, "default", {
+ enumerable: !0,
+ get: function () {
+ return r.createSvgIcon;
+ },
+ });
+ var r = n(4421);
+ },
+ 4591: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return Z;
+ },
+ });
+ var r = n(7462),
+ i = n(3366),
+ a = n(6189),
+ o = n(2466),
+ s = n(5080),
+ l = n(7416),
+ u = n(104),
+ c = n(4942);
+ function f(e, t) {
+ var n;
+ return (0, r.Z)(
+ {
+ toolbar:
+ ((n = { minHeight: 56 }),
+ (0, c.Z)(n, e.up("xs"), {
+ "@media (orientation: landscape)": { minHeight: 48 },
+ }),
+ (0, c.Z)(n, e.up("sm"), { minHeight: 64 }),
+ n),
+ },
+ t
+ );
+ }
+ var d = n(2065),
+ h = { black: "#000", white: "#fff" },
+ p = {
+ 50: "#fafafa",
+ 100: "#f5f5f5",
+ 200: "#eeeeee",
+ 300: "#e0e0e0",
+ 400: "#bdbdbd",
+ 500: "#9e9e9e",
+ 600: "#757575",
+ 700: "#616161",
+ 800: "#424242",
+ 900: "#212121",
+ A100: "#f5f5f5",
+ A200: "#eeeeee",
+ A400: "#bdbdbd",
+ A700: "#616161",
+ },
+ v = {
+ 50: "#f3e5f5",
+ 100: "#e1bee7",
+ 200: "#ce93d8",
+ 300: "#ba68c8",
+ 400: "#ab47bc",
+ 500: "#9c27b0",
+ 600: "#8e24aa",
+ 700: "#7b1fa2",
+ 800: "#6a1b9a",
+ 900: "#4a148c",
+ A100: "#ea80fc",
+ A200: "#e040fb",
+ A400: "#d500f9",
+ A700: "#aa00ff",
+ },
+ m = {
+ 50: "#ffebee",
+ 100: "#ffcdd2",
+ 200: "#ef9a9a",
+ 300: "#e57373",
+ 400: "#ef5350",
+ 500: "#f44336",
+ 600: "#e53935",
+ 700: "#d32f2f",
+ 800: "#c62828",
+ 900: "#b71c1c",
+ A100: "#ff8a80",
+ A200: "#ff5252",
+ A400: "#ff1744",
+ A700: "#d50000",
+ },
+ g = {
+ 50: "#fff3e0",
+ 100: "#ffe0b2",
+ 200: "#ffcc80",
+ 300: "#ffb74d",
+ 400: "#ffa726",
+ 500: "#ff9800",
+ 600: "#fb8c00",
+ 700: "#f57c00",
+ 800: "#ef6c00",
+ 900: "#e65100",
+ A100: "#ffd180",
+ A200: "#ffab40",
+ A400: "#ff9100",
+ A700: "#ff6d00",
+ },
+ A = {
+ 50: "#e3f2fd",
+ 100: "#bbdefb",
+ 200: "#90caf9",
+ 300: "#64b5f6",
+ 400: "#42a5f5",
+ 500: "#2196f3",
+ 600: "#1e88e5",
+ 700: "#1976d2",
+ 800: "#1565c0",
+ 900: "#0d47a1",
+ A100: "#82b1ff",
+ A200: "#448aff",
+ A400: "#2979ff",
+ A700: "#2962ff",
+ },
+ y = {
+ 50: "#e1f5fe",
+ 100: "#b3e5fc",
+ 200: "#81d4fa",
+ 300: "#4fc3f7",
+ 400: "#29b6f6",
+ 500: "#03a9f4",
+ 600: "#039be5",
+ 700: "#0288d1",
+ 800: "#0277bd",
+ 900: "#01579b",
+ A100: "#80d8ff",
+ A200: "#40c4ff",
+ A400: "#00b0ff",
+ A700: "#0091ea",
+ },
+ b = {
+ 50: "#e8f5e9",
+ 100: "#c8e6c9",
+ 200: "#a5d6a7",
+ 300: "#81c784",
+ 400: "#66bb6a",
+ 500: "#4caf50",
+ 600: "#43a047",
+ 700: "#388e3c",
+ 800: "#2e7d32",
+ 900: "#1b5e20",
+ A100: "#b9f6ca",
+ A200: "#69f0ae",
+ A400: "#00e676",
+ A700: "#00c853",
+ },
+ x = ["mode", "contrastThreshold", "tonalOffset"],
+ S = {
+ text: {
+ primary: "rgba(0, 0, 0, 0.87)",
+ secondary: "rgba(0, 0, 0, 0.6)",
+ disabled: "rgba(0, 0, 0, 0.38)",
+ },
+ divider: "rgba(0, 0, 0, 0.12)",
+ background: { paper: h.white, default: h.white },
+ action: {
+ active: "rgba(0, 0, 0, 0.54)",
+ hover: "rgba(0, 0, 0, 0.04)",
+ hoverOpacity: 0.04,
+ selected: "rgba(0, 0, 0, 0.08)",
+ selectedOpacity: 0.08,
+ disabled: "rgba(0, 0, 0, 0.26)",
+ disabledBackground: "rgba(0, 0, 0, 0.12)",
+ disabledOpacity: 0.38,
+ focus: "rgba(0, 0, 0, 0.12)",
+ focusOpacity: 0.12,
+ activatedOpacity: 0.12,
+ },
+ },
+ E = {
+ text: {
+ primary: h.white,
+ secondary: "rgba(255, 255, 255, 0.7)",
+ disabled: "rgba(255, 255, 255, 0.5)",
+ icon: "rgba(255, 255, 255, 0.5)",
+ },
+ divider: "rgba(255, 255, 255, 0.12)",
+ background: { paper: "#121212", default: "#121212" },
+ action: {
+ active: h.white,
+ hover: "rgba(255, 255, 255, 0.08)",
+ hoverOpacity: 0.08,
+ selected: "rgba(255, 255, 255, 0.16)",
+ selectedOpacity: 0.16,
+ disabled: "rgba(255, 255, 255, 0.3)",
+ disabledBackground: "rgba(255, 255, 255, 0.12)",
+ disabledOpacity: 0.38,
+ focus: "rgba(255, 255, 255, 0.12)",
+ focusOpacity: 0.12,
+ activatedOpacity: 0.24,
+ },
+ };
+ function _(e, t, n, r) {
+ var i = r.light || r,
+ a = r.dark || 1.5 * r;
+ e[t] ||
+ (e.hasOwnProperty(n)
+ ? (e[t] = e[n])
+ : "light" === t
+ ? (e.light = (0, d.$n)(e.main, i))
+ : "dark" === t && (e.dark = (0, d._j)(e.main, a)));
+ }
+ function C(e) {
+ var t = e.mode,
+ n = void 0 === t ? "light" : t,
+ s = e.contrastThreshold,
+ l = void 0 === s ? 3 : s,
+ u = e.tonalOffset,
+ c = void 0 === u ? 0.2 : u,
+ f = (0, i.Z)(e, x),
+ C =
+ e.primary ||
+ (function () {
+ return "dark" ===
+ (arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : "light")
+ ? { main: A[200], light: A[50], dark: A[400] }
+ : { main: A[700], light: A[400], dark: A[800] };
+ })(n),
+ w =
+ e.secondary ||
+ (function () {
+ return "dark" ===
+ (arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : "light")
+ ? { main: v[200], light: v[50], dark: v[400] }
+ : { main: v[500], light: v[300], dark: v[700] };
+ })(n),
+ T =
+ e.error ||
+ (function () {
+ return "dark" ===
+ (arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : "light")
+ ? { main: m[500], light: m[300], dark: m[700] }
+ : { main: m[700], light: m[400], dark: m[800] };
+ })(n),
+ M =
+ e.info ||
+ (function () {
+ return "dark" ===
+ (arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : "light")
+ ? { main: y[400], light: y[300], dark: y[700] }
+ : { main: y[700], light: y[500], dark: y[900] };
+ })(n),
+ I =
+ e.success ||
+ (function () {
+ return "dark" ===
+ (arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : "light")
+ ? { main: b[400], light: b[300], dark: b[700] }
+ : { main: b[800], light: b[500], dark: b[900] };
+ })(n),
+ k =
+ e.warning ||
+ (function () {
+ return "dark" ===
+ (arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : "light")
+ ? { main: g[400], light: g[300], dark: g[700] }
+ : { main: "#ed6c02", light: g[500], dark: g[900] };
+ })(n);
+ function R(e) {
+ return (0, d.mi)(e, E.text.primary) >= l
+ ? E.text.primary
+ : S.text.primary;
+ }
+ var B = function (e) {
+ var t = e.color,
+ n = e.name,
+ i = e.mainShade,
+ o = void 0 === i ? 500 : i,
+ s = e.lightShade,
+ l = void 0 === s ? 300 : s,
+ u = e.darkShade,
+ f = void 0 === u ? 700 : u;
+ if (
+ (!(t = (0, r.Z)({}, t)).main && t[o] && (t.main = t[o]),
+ !t.hasOwnProperty("main"))
+ )
+ throw new Error((0, a.Z)(11, n ? " (".concat(n, ")") : "", o));
+ if ("string" !== typeof t.main)
+ throw new Error(
+ (0, a.Z)(
+ 12,
+ n ? " (".concat(n, ")") : "",
+ JSON.stringify(t.main)
+ )
+ );
+ return (
+ _(t, "light", l, c),
+ _(t, "dark", f, c),
+ t.contrastText || (t.contrastText = R(t.main)),
+ t
+ );
+ },
+ P = { dark: E, light: S };
+ return (0, o.Z)(
+ (0, r.Z)(
+ {
+ common: (0, r.Z)({}, h),
+ mode: n,
+ primary: B({ color: C, name: "primary" }),
+ secondary: B({
+ color: w,
+ name: "secondary",
+ mainShade: "A400",
+ lightShade: "A200",
+ darkShade: "A700",
+ }),
+ error: B({ color: T, name: "error" }),
+ warning: B({ color: k, name: "warning" }),
+ info: B({ color: M, name: "info" }),
+ success: B({ color: I, name: "success" }),
+ grey: p,
+ contrastThreshold: l,
+ getContrastText: R,
+ augmentColor: B,
+ tonalOffset: c,
+ },
+ P[n]
+ ),
+ f
+ );
+ }
+ var w = [
+ "fontFamily",
+ "fontSize",
+ "fontWeightLight",
+ "fontWeightRegular",
+ "fontWeightMedium",
+ "fontWeightBold",
+ "htmlFontSize",
+ "allVariants",
+ "pxToRem",
+ ];
+ var T = { textTransform: "uppercase" },
+ M = '"Roboto", "Helvetica", "Arial", sans-serif';
+ function I(e, t) {
+ var n = "function" === typeof t ? t(e) : t,
+ a = n.fontFamily,
+ s = void 0 === a ? M : a,
+ l = n.fontSize,
+ u = void 0 === l ? 14 : l,
+ c = n.fontWeightLight,
+ f = void 0 === c ? 300 : c,
+ d = n.fontWeightRegular,
+ h = void 0 === d ? 400 : d,
+ p = n.fontWeightMedium,
+ v = void 0 === p ? 500 : p,
+ m = n.fontWeightBold,
+ g = void 0 === m ? 700 : m,
+ A = n.htmlFontSize,
+ y = void 0 === A ? 16 : A,
+ b = n.allVariants,
+ x = n.pxToRem,
+ S = (0, i.Z)(n, w);
+ var E = u / 14,
+ _ =
+ x ||
+ function (e) {
+ return "".concat((e / y) * E, "rem");
+ },
+ C = function (e, t, n, i, a) {
+ return (0, r.Z)(
+ { fontFamily: s, fontWeight: e, fontSize: _(t), lineHeight: n },
+ s === M
+ ? {
+ letterSpacing: "".concat(
+ ((o = i / t), Math.round(1e5 * o) / 1e5),
+ "em"
+ ),
+ }
+ : {},
+ a,
+ b
+ );
+ var o;
+ },
+ I = {
+ h1: C(f, 96, 1.167, -1.5),
+ h2: C(f, 60, 1.2, -0.5),
+ h3: C(h, 48, 1.167, 0),
+ h4: C(h, 34, 1.235, 0.25),
+ h5: C(h, 24, 1.334, 0),
+ h6: C(v, 20, 1.6, 0.15),
+ subtitle1: C(h, 16, 1.75, 0.15),
+ subtitle2: C(v, 14, 1.57, 0.1),
+ body1: C(h, 16, 1.5, 0.15),
+ body2: C(h, 14, 1.43, 0.15),
+ button: C(v, 14, 1.75, 0.4, T),
+ caption: C(h, 12, 1.66, 0.4),
+ overline: C(h, 12, 2.66, 1, T),
+ inherit: {
+ fontFamily: "inherit",
+ fontWeight: "inherit",
+ fontSize: "inherit",
+ lineHeight: "inherit",
+ letterSpacing: "inherit",
+ },
+ };
+ return (0, o.Z)(
+ (0, r.Z)(
+ {
+ htmlFontSize: y,
+ pxToRem: _,
+ fontFamily: s,
+ fontSize: u,
+ fontWeightLight: f,
+ fontWeightRegular: h,
+ fontWeightMedium: v,
+ fontWeightBold: g,
+ },
+ I
+ ),
+ S,
+ { clone: !1 }
+ );
+ }
+ function k() {
+ return [
+ ""
+ .concat(arguments.length <= 0 ? void 0 : arguments[0], "px ")
+ .concat(arguments.length <= 1 ? void 0 : arguments[1], "px ")
+ .concat(arguments.length <= 2 ? void 0 : arguments[2], "px ")
+ .concat(
+ arguments.length <= 3 ? void 0 : arguments[3],
+ "px rgba(0,0,0,"
+ )
+ .concat(0.2, ")"),
+ ""
+ .concat(arguments.length <= 4 ? void 0 : arguments[4], "px ")
+ .concat(arguments.length <= 5 ? void 0 : arguments[5], "px ")
+ .concat(arguments.length <= 6 ? void 0 : arguments[6], "px ")
+ .concat(
+ arguments.length <= 7 ? void 0 : arguments[7],
+ "px rgba(0,0,0,"
+ )
+ .concat(0.14, ")"),
+ ""
+ .concat(arguments.length <= 8 ? void 0 : arguments[8], "px ")
+ .concat(arguments.length <= 9 ? void 0 : arguments[9], "px ")
+ .concat(arguments.length <= 10 ? void 0 : arguments[10], "px ")
+ .concat(
+ arguments.length <= 11 ? void 0 : arguments[11],
+ "px rgba(0,0,0,"
+ )
+ .concat(0.12, ")"),
+ ].join(",");
+ }
+ var R = [
+ "none",
+ k(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0),
+ k(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0),
+ k(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0),
+ k(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0),
+ k(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0),
+ k(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0),
+ k(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1),
+ k(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2),
+ k(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2),
+ k(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3),
+ k(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3),
+ k(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4),
+ k(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4),
+ k(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4),
+ k(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5),
+ k(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5),
+ k(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5),
+ k(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6),
+ k(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6),
+ k(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7),
+ k(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7),
+ k(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7),
+ k(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8),
+ k(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8),
+ ],
+ B = ["duration", "easing", "delay"],
+ P = {
+ easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
+ easeOut: "cubic-bezier(0.0, 0, 0.2, 1)",
+ easeIn: "cubic-bezier(0.4, 0, 1, 1)",
+ sharp: "cubic-bezier(0.4, 0, 0.6, 1)",
+ },
+ L = {
+ shortest: 150,
+ shorter: 200,
+ short: 250,
+ standard: 300,
+ complex: 375,
+ enteringScreen: 225,
+ leavingScreen: 195,
+ };
+ function D(e) {
+ return "".concat(Math.round(e), "ms");
+ }
+ function U(e) {
+ if (!e) return 0;
+ var t = e / 36;
+ return Math.round(10 * (4 + 15 * Math.pow(t, 0.25) + t / 5));
+ }
+ function F(e) {
+ var t = (0, r.Z)({}, P, e.easing),
+ n = (0, r.Z)({}, L, e.duration);
+ return (0, r.Z)(
+ {
+ getAutoHeightDuration: U,
+ create: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : ["all"],
+ r =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ a = r.duration,
+ o = void 0 === a ? n.standard : a,
+ s = r.easing,
+ l = void 0 === s ? t.easeInOut : s,
+ u = r.delay,
+ c = void 0 === u ? 0 : u;
+ (0, i.Z)(r, B);
+ return (Array.isArray(e) ? e : [e])
+ .map(function (e) {
+ return ""
+ .concat(e, " ")
+ .concat("string" === typeof o ? o : D(o), " ")
+ .concat(l, " ")
+ .concat("string" === typeof c ? c : D(c));
+ })
+ .join(",");
+ },
+ },
+ e,
+ { easing: t, duration: n }
+ );
+ }
+ var O = {
+ mobileStepper: 1e3,
+ fab: 1050,
+ speedDial: 1050,
+ appBar: 1100,
+ drawer: 1200,
+ modal: 1300,
+ snackbar: 1400,
+ tooltip: 1500,
+ },
+ N = [
+ "breakpoints",
+ "mixins",
+ "spacing",
+ "palette",
+ "transitions",
+ "typography",
+ "shape",
+ ];
+ function G() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {},
+ t = e.mixins,
+ n = void 0 === t ? {} : t,
+ c = e.palette,
+ d = void 0 === c ? {} : c,
+ h = e.transitions,
+ p = void 0 === h ? {} : h,
+ v = e.typography,
+ m = void 0 === v ? {} : v,
+ g = (0, i.Z)(e, N);
+ if (e.vars) throw new Error((0, a.Z)(18));
+ var A = C(d),
+ y = (0, s.Z)(e),
+ b = (0, o.Z)(y, {
+ mixins: f(y.breakpoints, n),
+ palette: A,
+ shadows: R.slice(),
+ typography: I(A, m),
+ transitions: F(p),
+ zIndex: (0, r.Z)({}, O),
+ });
+ b = (0, o.Z)(b, g);
+ for (
+ var x = arguments.length, S = new Array(x > 1 ? x - 1 : 0), E = 1;
+ E < x;
+ E++
+ )
+ S[E - 1] = arguments[E];
+ return (
+ ((b = S.reduce(function (e, t) {
+ return (0, o.Z)(e, t);
+ }, b)).unstable_sxConfig = (0, r.Z)(
+ {},
+ l.Z,
+ null == g ? void 0 : g.unstable_sxConfig
+ )),
+ (b.unstable_sx = function (e) {
+ return (0, u.Z)({ sx: e, theme: this });
+ }),
+ b
+ );
+ }
+ var Z = G();
+ },
+ 988: function (e, t) {
+ "use strict";
+ t.Z = "$$material";
+ },
+ 724: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ ZP: function () {
+ return O;
+ },
+ FO: function () {
+ return D;
+ },
+ Dz: function () {
+ return U;
+ },
+ });
+ var r = n(9439),
+ i = n(3433),
+ a = n(3366),
+ o = n(7462),
+ s = n(2791),
+ l = n(9791),
+ u = n(2564),
+ c = n(5438),
+ f = n(9140),
+ d = n(2561),
+ h = l.Z,
+ p = function (e) {
+ return "theme" !== e;
+ },
+ v = function (e) {
+ return "string" === typeof e && e.charCodeAt(0) > 96 ? h : p;
+ },
+ m = function (e, t, n) {
+ var r;
+ if (t) {
+ var i = t.shouldForwardProp;
+ r =
+ e.__emotion_forwardProp && i
+ ? function (t) {
+ return e.__emotion_forwardProp(t) && i(t);
+ }
+ : i;
+ }
+ return (
+ "function" !== typeof r && n && (r = e.__emotion_forwardProp), r
+ );
+ },
+ g = function (e) {
+ var t = e.cache,
+ n = e.serialized,
+ r = e.isStringTag;
+ return (
+ (0, c.hC)(t, n, r),
+ (0, d.L)(function () {
+ return (0, c.My)(t, n, r);
+ }),
+ null
+ );
+ },
+ A = function e(t, n) {
+ var r,
+ i,
+ a = t.__emotion_real === t,
+ l = (a && t.__emotion_base) || t;
+ void 0 !== n && ((r = n.label), (i = n.target));
+ var d = m(t, n, a),
+ h = d || v(l),
+ p = !h("as");
+ return function () {
+ var A = arguments,
+ y =
+ a && void 0 !== t.__emotion_styles
+ ? t.__emotion_styles.slice(0)
+ : [];
+ if (
+ (void 0 !== r && y.push("label:" + r + ";"),
+ null == A[0] || void 0 === A[0].raw)
+ )
+ y.push.apply(y, A);
+ else {
+ 0, y.push(A[0][0]);
+ for (var b = A.length, x = 1; x < b; x++) y.push(A[x], A[0][x]);
+ }
+ var S = (0, u.w)(function (e, t, n) {
+ var r = (p && e.as) || l,
+ a = "",
+ o = [],
+ m = e;
+ if (null == e.theme) {
+ for (var A in ((m = {}), e)) m[A] = e[A];
+ m.theme = s.useContext(u.T);
+ }
+ "string" === typeof e.className
+ ? (a = (0, c.fp)(t.registered, o, e.className))
+ : null != e.className && (a = e.className + " ");
+ var b = (0, f.O)(y.concat(o), t.registered, m);
+ (a += t.key + "-" + b.name), void 0 !== i && (a += " " + i);
+ var x = p && void 0 === d ? v(r) : h,
+ S = {};
+ for (var E in e) (p && "as" === E) || (x(E) && (S[E] = e[E]));
+ return (
+ (S.className = a),
+ (S.ref = n),
+ s.createElement(
+ s.Fragment,
+ null,
+ s.createElement(g, {
+ cache: t,
+ serialized: b,
+ isStringTag: "string" === typeof r,
+ }),
+ s.createElement(r, S)
+ )
+ );
+ });
+ return (
+ (S.displayName =
+ void 0 !== r
+ ? r
+ : "Styled(" +
+ ("string" === typeof l
+ ? l
+ : l.displayName || l.name || "Component") +
+ ")"),
+ (S.defaultProps = t.defaultProps),
+ (S.__emotion_real = S),
+ (S.__emotion_base = l),
+ (S.__emotion_styles = y),
+ (S.__emotion_forwardProp = d),
+ Object.defineProperty(S, "toString", {
+ value: function () {
+ return "." + i;
+ },
+ }),
+ (S.withComponent = function (t, r) {
+ return e(
+ t,
+ (0, o.Z)({}, n, r, { shouldForwardProp: m(S, r, !0) })
+ ).apply(void 0, y);
+ }),
+ S
+ );
+ };
+ }.bind();
+ [
+ "a",
+ "abbr",
+ "address",
+ "area",
+ "article",
+ "aside",
+ "audio",
+ "b",
+ "base",
+ "bdi",
+ "bdo",
+ "big",
+ "blockquote",
+ "body",
+ "br",
+ "button",
+ "canvas",
+ "caption",
+ "cite",
+ "code",
+ "col",
+ "colgroup",
+ "data",
+ "datalist",
+ "dd",
+ "del",
+ "details",
+ "dfn",
+ "dialog",
+ "div",
+ "dl",
+ "dt",
+ "em",
+ "embed",
+ "fieldset",
+ "figcaption",
+ "figure",
+ "footer",
+ "form",
+ "h1",
+ "h2",
+ "h3",
+ "h4",
+ "h5",
+ "h6",
+ "head",
+ "header",
+ "hgroup",
+ "hr",
+ "html",
+ "i",
+ "iframe",
+ "img",
+ "input",
+ "ins",
+ "kbd",
+ "keygen",
+ "label",
+ "legend",
+ "li",
+ "link",
+ "main",
+ "map",
+ "mark",
+ "marquee",
+ "menu",
+ "menuitem",
+ "meta",
+ "meter",
+ "nav",
+ "noscript",
+ "object",
+ "ol",
+ "optgroup",
+ "option",
+ "output",
+ "p",
+ "param",
+ "picture",
+ "pre",
+ "progress",
+ "q",
+ "rp",
+ "rt",
+ "ruby",
+ "s",
+ "samp",
+ "script",
+ "section",
+ "select",
+ "small",
+ "source",
+ "span",
+ "strong",
+ "style",
+ "sub",
+ "summary",
+ "sup",
+ "table",
+ "tbody",
+ "td",
+ "textarea",
+ "tfoot",
+ "th",
+ "thead",
+ "time",
+ "title",
+ "tr",
+ "track",
+ "u",
+ "ul",
+ "var",
+ "video",
+ "wbr",
+ "circle",
+ "clipPath",
+ "defs",
+ "ellipse",
+ "foreignObject",
+ "g",
+ "image",
+ "line",
+ "linearGradient",
+ "mask",
+ "path",
+ "pattern",
+ "polygon",
+ "polyline",
+ "radialGradient",
+ "rect",
+ "stop",
+ "svg",
+ "text",
+ "tspan",
+ ].forEach(function (e) {
+ A[e] = A(e);
+ });
+ var y = n(2466),
+ b = n(5080),
+ x = n(1122),
+ S = ["variant"];
+ function E(e) {
+ return 0 === e.length;
+ }
+ function _(e) {
+ var t = e.variant,
+ n = (0, a.Z)(e, S),
+ r = t || "";
+ return (
+ Object.keys(n)
+ .sort()
+ .forEach(function (t) {
+ r +=
+ "color" === t
+ ? E(r)
+ ? e[t]
+ : (0, x.Z)(e[t])
+ : ""
+ .concat(E(r) ? t : (0, x.Z)(t))
+ .concat((0, x.Z)(e[t].toString()));
+ }),
+ r
+ );
+ }
+ var C = n(104),
+ w = [
+ "name",
+ "slot",
+ "skipVariantsResolver",
+ "skipSx",
+ "overridesResolver",
+ ];
+ var T = function (e) {
+ var t = {};
+ return (
+ e &&
+ e.forEach(function (e) {
+ var n = _(e.props);
+ t[n] = e.style;
+ }),
+ t
+ );
+ },
+ M = function (e, t, n) {
+ var r = e.ownerState,
+ i = void 0 === r ? {} : r,
+ a = [];
+ return (
+ n &&
+ n.forEach(function (n) {
+ var r = !0;
+ Object.keys(n.props).forEach(function (t) {
+ i[t] !== n.props[t] && e[t] !== n.props[t] && (r = !1);
+ }),
+ r && a.push(t[_(n.props)]);
+ }),
+ a
+ );
+ };
+ function I(e) {
+ return (
+ "ownerState" !== e && "theme" !== e && "sx" !== e && "as" !== e
+ );
+ }
+ var k = (0, b.Z)();
+ function R(e) {
+ var t,
+ n = e.defaultTheme,
+ r = e.theme,
+ i = e.themeId;
+ return (t = r), 0 === Object.keys(t).length ? n : r[i] || r;
+ }
+ var B = function (e) {
+ var t,
+ n = e.styledArg,
+ r = e.props,
+ a = e.defaultTheme,
+ s = e.themeId,
+ l = n(
+ (0, o.Z)({}, r, {
+ theme: R((0, o.Z)({}, r, { defaultTheme: a, themeId: s })),
+ })
+ );
+ if ((l && l.variants && ((t = l.variants), delete l.variants), t)) {
+ var u = M(r, T(t), t);
+ return [l].concat((0, i.Z)(u));
+ }
+ return l;
+ };
+ var P = n(4591),
+ L = n(988),
+ D = function (e) {
+ return I(e) && "classes" !== e;
+ },
+ U = I,
+ F = (function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {},
+ t = e.themeId,
+ n = e.defaultTheme,
+ s = void 0 === n ? k : n,
+ l = e.rootShouldForwardProp,
+ u = void 0 === l ? I : l,
+ c = e.slotShouldForwardProp,
+ f = void 0 === c ? I : c,
+ d = function (e) {
+ return (0, C.Z)(
+ (0, o.Z)({}, e, {
+ theme: R((0, o.Z)({}, e, { defaultTheme: s, themeId: t })),
+ })
+ );
+ };
+ return (
+ (d.__mui_systemSx = !0),
+ function (e) {
+ var n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ !(function (e, t) {
+ Array.isArray(e.__emotion_styles) &&
+ (e.__emotion_styles = t(e.__emotion_styles));
+ })(e, function (e) {
+ return e.filter(function (e) {
+ return !(null != e && e.__mui_systemSx);
+ });
+ });
+ var l,
+ c,
+ h = n.name,
+ p = n.slot,
+ v = n.skipVariantsResolver,
+ m = n.skipSx,
+ g = n.overridesResolver,
+ b =
+ void 0 === g
+ ? (l = (c = p)
+ ? c.charAt(0).toLowerCase() + c.slice(1)
+ : c)
+ ? function (e, t) {
+ return t[l];
+ }
+ : null
+ : g,
+ x = (0, a.Z)(n, w),
+ S =
+ void 0 !== v
+ ? v
+ : (p && "Root" !== p && "root" !== p) || !1,
+ E = m || !1;
+ var _ = I;
+ "Root" === p || "root" === p
+ ? (_ = u)
+ : p
+ ? (_ = f)
+ : (function (e) {
+ return "string" === typeof e && e.charCodeAt(0) > 96;
+ })(e) && (_ = void 0);
+ var C = (function (e, t) {
+ return A(e, t);
+ })(
+ e,
+ (0, o.Z)({ shouldForwardProp: _, label: undefined }, x)
+ ),
+ k = function (n) {
+ for (
+ var a = arguments.length,
+ l = new Array(a > 1 ? a - 1 : 0),
+ u = 1;
+ u < a;
+ u++
+ )
+ l[u - 1] = arguments[u];
+ var c,
+ f = l
+ ? l.map(function (e) {
+ if (
+ "function" === typeof e &&
+ e.__emotion_real !== e
+ )
+ return function (n) {
+ return B({
+ styledArg: e,
+ props: n,
+ defaultTheme: s,
+ themeId: t,
+ });
+ };
+ if ((0, y.P)(e)) {
+ var n,
+ r = e;
+ return (
+ e &&
+ e.variants &&
+ ((n = e.variants),
+ delete r.variants,
+ (r = function (t) {
+ var r = e;
+ return (
+ M(t, T(n), n).forEach(function (e) {
+ r = (0, y.Z)(r, e);
+ }),
+ r
+ );
+ })),
+ r
+ );
+ }
+ return e;
+ })
+ : [],
+ p = n;
+ (0, y.P)(n)
+ ? n &&
+ n.variants &&
+ ((c = n.variants),
+ delete p.variants,
+ (p = function (e) {
+ var t = n;
+ return (
+ M(e, T(c), c).forEach(function (e) {
+ t = (0, y.Z)(t, e);
+ }),
+ t
+ );
+ }))
+ : "function" === typeof n &&
+ n.__emotion_real !== n &&
+ (p = function (e) {
+ return B({
+ styledArg: n,
+ props: e,
+ defaultTheme: s,
+ themeId: t,
+ });
+ });
+ h &&
+ b &&
+ f.push(function (e) {
+ var n = R(
+ (0, o.Z)({}, e, { defaultTheme: s, themeId: t })
+ ),
+ i = (function (e, t) {
+ return t.components &&
+ t.components[e] &&
+ t.components[e].styleOverrides
+ ? t.components[e].styleOverrides
+ : null;
+ })(h, n);
+ if (i) {
+ var a = {};
+ return (
+ Object.entries(i).forEach(function (t) {
+ var i = (0, r.Z)(t, 2),
+ s = i[0],
+ l = i[1];
+ a[s] =
+ "function" === typeof l
+ ? l((0, o.Z)({}, e, { theme: n }))
+ : l;
+ }),
+ b(e, a)
+ );
+ }
+ return null;
+ }),
+ h &&
+ !S &&
+ f.push(function (e) {
+ var n = R(
+ (0, o.Z)({}, e, { defaultTheme: s, themeId: t })
+ );
+ return (function (e, t, n, r) {
+ var i,
+ a =
+ null == n ||
+ null == (i = n.components) ||
+ null == (i = i[r])
+ ? void 0
+ : i.variants;
+ return M(e, t, a);
+ })(
+ e,
+ (function (e, t) {
+ var n = [];
+ return (
+ t &&
+ t.components &&
+ t.components[e] &&
+ t.components[e].variants &&
+ (n = t.components[e].variants),
+ T(n)
+ );
+ })(h, n),
+ n,
+ h
+ );
+ }),
+ E || f.push(d);
+ var v = f.length - l.length;
+ if (Array.isArray(n) && v > 0) {
+ var m = new Array(v).fill("");
+ (p = [].concat((0, i.Z)(n), (0, i.Z)(m))).raw = [].concat(
+ (0, i.Z)(n.raw),
+ (0, i.Z)(m)
+ );
+ }
+ var g = C.apply(void 0, [p].concat((0, i.Z)(f)));
+ return e.muiName && (g.muiName = e.muiName), g;
+ };
+ return C.withConfig && (k.withConfig = C.withConfig), k;
+ }
+ );
+ })({ themeId: L.Z, defaultTheme: P.Z, rootShouldForwardProp: D }),
+ O = F;
+ },
+ 1046: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return l;
+ },
+ });
+ var r = n(5735);
+ var i = n(418);
+ function a(e) {
+ var t = e.props,
+ n = e.name,
+ a = e.defaultTheme,
+ o = e.themeId,
+ s = (0, i.Z)(a);
+ o && (s = s[o] || s);
+ var l = (function (e) {
+ var t = e.theme,
+ n = e.name,
+ i = e.props;
+ return t &&
+ t.components &&
+ t.components[n] &&
+ t.components[n].defaultProps
+ ? (0, r.Z)(t.components[n].defaultProps, i)
+ : i;
+ })({ theme: s, name: n, props: t });
+ return l;
+ }
+ var o = n(4591),
+ s = n(988);
+ function l(e) {
+ return a({
+ props: e.props,
+ name: e.name,
+ defaultTheme: o.Z,
+ themeId: s.Z,
+ });
+ }
+ },
+ 4036: function (e, t, n) {
+ "use strict";
+ var r = n(1122);
+ t.Z = r.Z;
+ },
+ 9201: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return y;
+ },
+ });
+ var r = n(7462),
+ i = n(2791),
+ a = n(3366),
+ o = n(3733),
+ s = n(4419),
+ l = n(4036),
+ u = n(1046),
+ c = n(724),
+ f = n(5878),
+ d = n(1217);
+ function h(e) {
+ return (0, d.Z)("MuiSvgIcon", e);
+ }
+ (0, f.Z)("MuiSvgIcon", [
+ "root",
+ "colorPrimary",
+ "colorSecondary",
+ "colorAction",
+ "colorError",
+ "colorDisabled",
+ "fontSizeInherit",
+ "fontSizeSmall",
+ "fontSizeMedium",
+ "fontSizeLarge",
+ ]);
+ var p = n(184),
+ v = [
+ "children",
+ "className",
+ "color",
+ "component",
+ "fontSize",
+ "htmlColor",
+ "inheritViewBox",
+ "titleAccess",
+ "viewBox",
+ ],
+ m = (0, c.ZP)("svg", {
+ name: "MuiSvgIcon",
+ slot: "Root",
+ overridesResolver: function (e, t) {
+ var n = e.ownerState;
+ return [
+ t.root,
+ "inherit" !== n.color && t["color".concat((0, l.Z)(n.color))],
+ t["fontSize".concat((0, l.Z)(n.fontSize))],
+ ];
+ },
+ })(function (e) {
+ var t,
+ n,
+ r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p = e.theme,
+ v = e.ownerState;
+ return {
+ userSelect: "none",
+ width: "1em",
+ height: "1em",
+ display: "inline-block",
+ fill: v.hasSvgAsChild ? void 0 : "currentColor",
+ flexShrink: 0,
+ transition:
+ null == (t = p.transitions) || null == (n = t.create)
+ ? void 0
+ : n.call(t, "fill", {
+ duration:
+ null == (r = p.transitions) || null == (r = r.duration)
+ ? void 0
+ : r.shorter,
+ }),
+ fontSize: {
+ inherit: "inherit",
+ small:
+ (null == (i = p.typography) || null == (a = i.pxToRem)
+ ? void 0
+ : a.call(i, 20)) || "1.25rem",
+ medium:
+ (null == (o = p.typography) || null == (s = o.pxToRem)
+ ? void 0
+ : s.call(o, 24)) || "1.5rem",
+ large:
+ (null == (l = p.typography) || null == (u = l.pxToRem)
+ ? void 0
+ : u.call(l, 35)) || "2.1875rem",
+ }[v.fontSize],
+ color:
+ null !=
+ (c =
+ null == (f = (p.vars || p).palette) ||
+ null == (f = f[v.color])
+ ? void 0
+ : f.main)
+ ? c
+ : {
+ action:
+ null == (d = (p.vars || p).palette) ||
+ null == (d = d.action)
+ ? void 0
+ : d.active,
+ disabled:
+ null == (h = (p.vars || p).palette) ||
+ null == (h = h.action)
+ ? void 0
+ : h.disabled,
+ inherit: void 0,
+ }[v.color],
+ };
+ }),
+ g = i.forwardRef(function (e, t) {
+ var n = (0, u.Z)({ props: e, name: "MuiSvgIcon" }),
+ c = n.children,
+ f = n.className,
+ d = n.color,
+ g = void 0 === d ? "inherit" : d,
+ A = n.component,
+ y = void 0 === A ? "svg" : A,
+ b = n.fontSize,
+ x = void 0 === b ? "medium" : b,
+ S = n.htmlColor,
+ E = n.inheritViewBox,
+ _ = void 0 !== E && E,
+ C = n.titleAccess,
+ w = n.viewBox,
+ T = void 0 === w ? "0 0 24 24" : w,
+ M = (0, a.Z)(n, v),
+ I = i.isValidElement(c) && "svg" === c.type,
+ k = (0, r.Z)({}, n, {
+ color: g,
+ component: y,
+ fontSize: x,
+ instanceFontSize: e.fontSize,
+ inheritViewBox: _,
+ viewBox: T,
+ hasSvgAsChild: I,
+ }),
+ R = {};
+ _ || (R.viewBox = T);
+ var B = (function (e) {
+ var t = e.color,
+ n = e.fontSize,
+ r = e.classes,
+ i = {
+ root: [
+ "root",
+ "inherit" !== t && "color".concat((0, l.Z)(t)),
+ "fontSize".concat((0, l.Z)(n)),
+ ],
+ };
+ return (0, s.Z)(i, h, r);
+ })(k);
+ return (0,
+ p.jsxs)(m, (0, r.Z)({ as: y, className: (0, o.Z)(B.root, f), focusable: "false", color: S, "aria-hidden": !C || void 0, role: C ? "img" : void 0, ref: t }, R, M, I && c.props, { ownerState: k, children: [I ? c.props.children : c, C ? (0, p.jsx)("title", { children: C }) : null] }));
+ });
+ g.muiName = "SvgIcon";
+ var A = g;
+ function y(e, t) {
+ function n(n, i) {
+ return (0, p.jsx)(
+ A,
+ (0, r.Z)({ "data-testid": "".concat(t, "Icon"), ref: i }, n, {
+ children: e,
+ })
+ );
+ }
+ return (n.muiName = A.muiName), i.memo(i.forwardRef(n));
+ }
+ },
+ 3199: function (e, t, n) {
+ "use strict";
+ var r = n(2254);
+ t.Z = r.Z;
+ },
+ 4421: function (e, t, n) {
+ "use strict";
+ n.r(t),
+ n.d(t, {
+ capitalize: function () {
+ return i.Z;
+ },
+ createChainedFunction: function () {
+ return a;
+ },
+ createSvgIcon: function () {
+ return o.Z;
+ },
+ debounce: function () {
+ return s.Z;
+ },
+ deprecatedPropType: function () {
+ return l;
+ },
+ isMuiElement: function () {
+ return u.Z;
+ },
+ ownerDocument: function () {
+ return c.Z;
+ },
+ ownerWindow: function () {
+ return f.Z;
+ },
+ requirePropFactory: function () {
+ return d;
+ },
+ setRef: function () {
+ return h;
+ },
+ unstable_ClassNameGenerator: function () {
+ return x;
+ },
+ unstable_useEnhancedEffect: function () {
+ return p.Z;
+ },
+ unstable_useId: function () {
+ return v.Z;
+ },
+ unsupportedProp: function () {
+ return m;
+ },
+ useControlled: function () {
+ return g.Z;
+ },
+ useEventCallback: function () {
+ return A.Z;
+ },
+ useForkRef: function () {
+ return y.Z;
+ },
+ useIsFocusVisible: function () {
+ return b.Z;
+ },
+ });
+ var r = n(5902),
+ i = n(4036),
+ a = n(8949).Z,
+ o = n(9201),
+ s = n(3199);
+ var l = function (e, t) {
+ return function () {
+ return null;
+ };
+ },
+ u = n(9103),
+ c = n(8301),
+ f = n(7602);
+ n(7462);
+ var d = function (e, t) {
+ return function () {
+ return null;
+ };
+ },
+ h = n(2971).Z,
+ p = n(162),
+ v = n(7384);
+ var m = function (e, t, n, r, i) {
+ return null;
+ },
+ g = n(5158),
+ A = n(9683),
+ y = n(2071),
+ b = n(3031),
+ x = {
+ configure: function (e) {
+ r.Z.configure(e);
+ },
+ };
+ },
+ 9103: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(2791);
+ var i = function (e, t) {
+ var n, i;
+ return (
+ r.isValidElement(e) &&
+ -1 !==
+ t.indexOf(
+ null != (n = e.type.muiName)
+ ? n
+ : null == (i = e.type) ||
+ null == (i = i._payload) ||
+ null == (i = i.value)
+ ? void 0
+ : i.muiName
+ )
+ );
+ };
+ },
+ 8301: function (e, t, n) {
+ "use strict";
+ var r = n(4913);
+ t.Z = r.Z;
+ },
+ 7602: function (e, t, n) {
+ "use strict";
+ var r = n(5202);
+ t.Z = r.Z;
+ },
+ 5158: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(9439),
+ i = n(2791);
+ var a = function (e) {
+ var t = e.controlled,
+ n = e.default,
+ a = (e.name, e.state, i.useRef(void 0 !== t).current),
+ o = i.useState(n),
+ s = (0, r.Z)(o, 2),
+ l = s[0],
+ u = s[1];
+ return [
+ a ? t : l,
+ i.useCallback(function (e) {
+ a || u(e);
+ }, []),
+ ];
+ };
+ },
+ 162: function (e, t, n) {
+ "use strict";
+ var r = n(2876);
+ t.Z = r.Z;
+ },
+ 9683: function (e, t, n) {
+ "use strict";
+ var r = n(7054);
+ t.Z = r.Z;
+ },
+ 2071: function (e, t, n) {
+ "use strict";
+ var r = n(6117);
+ t.Z = r.Z;
+ },
+ 7384: function (e, t, n) {
+ "use strict";
+ var r = n(8252);
+ t.Z = r.Z;
+ },
+ 3031: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return d;
+ },
+ });
+ var r,
+ i = n(2791),
+ a = !0,
+ o = !1,
+ s = {
+ text: !0,
+ search: !0,
+ url: !0,
+ tel: !0,
+ email: !0,
+ password: !0,
+ number: !0,
+ date: !0,
+ month: !0,
+ week: !0,
+ time: !0,
+ datetime: !0,
+ "datetime-local": !0,
+ };
+ function l(e) {
+ e.metaKey || e.altKey || e.ctrlKey || (a = !0);
+ }
+ function u() {
+ a = !1;
+ }
+ function c() {
+ "hidden" === this.visibilityState && o && (a = !0);
+ }
+ function f(e) {
+ var t = e.target;
+ try {
+ return t.matches(":focus-visible");
+ } catch (n) {}
+ return (
+ a ||
+ (function (e) {
+ var t = e.type,
+ n = e.tagName;
+ return (
+ !("INPUT" !== n || !s[t] || e.readOnly) ||
+ ("TEXTAREA" === n && !e.readOnly) ||
+ !!e.isContentEditable
+ );
+ })(t)
+ );
+ }
+ var d = function () {
+ var e = i.useCallback(function (e) {
+ var t;
+ null != e &&
+ ((t = e.ownerDocument).addEventListener("keydown", l, !0),
+ t.addEventListener("mousedown", u, !0),
+ t.addEventListener("pointerdown", u, !0),
+ t.addEventListener("touchstart", u, !0),
+ t.addEventListener("visibilitychange", c, !0));
+ }, []),
+ t = i.useRef(!1);
+ return {
+ isFocusVisibleRef: t,
+ onFocus: function (e) {
+ return !!f(e) && ((t.current = !0), !0);
+ },
+ onBlur: function () {
+ return (
+ !!t.current &&
+ ((o = !0),
+ window.clearTimeout(r),
+ (r = window.setTimeout(function () {
+ o = !1;
+ }, 100)),
+ (t.current = !1),
+ !0)
+ );
+ },
+ ref: e,
+ };
+ };
+ },
+ 1184: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ L7: function () {
+ return s;
+ },
+ VO: function () {
+ return r;
+ },
+ W8: function () {
+ return o;
+ },
+ k9: function () {
+ return a;
+ },
+ });
+ var r = { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 },
+ i = {
+ keys: ["xs", "sm", "md", "lg", "xl"],
+ up: function (e) {
+ return "@media (min-width:".concat(r[e], "px)");
+ },
+ };
+ function a(e, t, n) {
+ var a = e.theme || {};
+ if (Array.isArray(t)) {
+ var o = a.breakpoints || i;
+ return t.reduce(function (e, r, i) {
+ return (e[o.up(o.keys[i])] = n(t[i])), e;
+ }, {});
+ }
+ if ("object" === typeof t) {
+ var s = a.breakpoints || i;
+ return Object.keys(t).reduce(function (e, i) {
+ if (-1 !== Object.keys(s.values || r).indexOf(i)) {
+ e[s.up(i)] = n(t[i], i);
+ } else {
+ var a = i;
+ e[a] = t[a];
+ }
+ return e;
+ }, {});
+ }
+ return n(t);
+ }
+ function o() {
+ var e,
+ t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {};
+ return (
+ (null == (e = t.keys)
+ ? void 0
+ : e.reduce(function (e, n) {
+ return (e[t.up(n)] = {}), e;
+ }, {})) || {}
+ );
+ }
+ function s(e, t) {
+ return e.reduce(function (e, t) {
+ var n = e[t];
+ return (!n || 0 === Object.keys(n).length) && delete e[t], e;
+ }, t);
+ }
+ },
+ 2065: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ $n: function () {
+ return f;
+ },
+ Fq: function () {
+ return u;
+ },
+ _j: function () {
+ return c;
+ },
+ mi: function () {
+ return l;
+ },
+ });
+ var r = n(6189);
+ function i(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1;
+ return Math.min(Math.max(t, e), n);
+ }
+ function a(e) {
+ if (e.type) return e;
+ if ("#" === e.charAt(0))
+ return a(
+ (function (e) {
+ e = e.slice(1);
+ var t = new RegExp(
+ ".{1,".concat(e.length >= 6 ? 2 : 1, "}"),
+ "g"
+ ),
+ n = e.match(t);
+ return (
+ n &&
+ 1 === n[0].length &&
+ (n = n.map(function (e) {
+ return e + e;
+ })),
+ n
+ ? "rgb".concat(4 === n.length ? "a" : "", "(").concat(
+ n
+ .map(function (e, t) {
+ return t < 3
+ ? parseInt(e, 16)
+ : Math.round((parseInt(e, 16) / 255) * 1e3) / 1e3;
+ })
+ .join(", "),
+ ")"
+ )
+ : ""
+ );
+ })(e)
+ );
+ var t = e.indexOf("("),
+ n = e.substring(0, t);
+ if (-1 === ["rgb", "rgba", "hsl", "hsla", "color"].indexOf(n))
+ throw new Error((0, r.Z)(9, e));
+ var i,
+ o = e.substring(t + 1, e.length - 1);
+ if ("color" === n) {
+ if (
+ ((i = (o = o.split(" ")).shift()),
+ 4 === o.length &&
+ "/" === o[3].charAt(0) &&
+ (o[3] = o[3].slice(1)),
+ -1 ===
+ [
+ "srgb",
+ "display-p3",
+ "a98-rgb",
+ "prophoto-rgb",
+ "rec-2020",
+ ].indexOf(i))
+ )
+ throw new Error((0, r.Z)(10, i));
+ } else o = o.split(",");
+ return {
+ type: n,
+ values: (o = o.map(function (e) {
+ return parseFloat(e);
+ })),
+ colorSpace: i,
+ };
+ }
+ function o(e) {
+ var t = e.type,
+ n = e.colorSpace,
+ r = e.values;
+ return (
+ -1 !== t.indexOf("rgb")
+ ? (r = r.map(function (e, t) {
+ return t < 3 ? parseInt(e, 10) : e;
+ }))
+ : -1 !== t.indexOf("hsl") &&
+ ((r[1] = "".concat(r[1], "%")), (r[2] = "".concat(r[2], "%"))),
+ (r =
+ -1 !== t.indexOf("color")
+ ? "".concat(n, " ").concat(r.join(" "))
+ : "".concat(r.join(", "))),
+ "".concat(t, "(").concat(r, ")")
+ );
+ }
+ function s(e) {
+ var t =
+ "hsl" === (e = a(e)).type || "hsla" === e.type
+ ? a(
+ (function (e) {
+ var t = (e = a(e)).values,
+ n = t[0],
+ r = t[1] / 100,
+ i = t[2] / 100,
+ s = r * Math.min(i, 1 - i),
+ l = function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : (e + n / 30) % 12;
+ return i - s * Math.max(Math.min(t - 3, 9 - t, 1), -1);
+ },
+ u = "rgb",
+ c = [
+ Math.round(255 * l(0)),
+ Math.round(255 * l(8)),
+ Math.round(255 * l(4)),
+ ];
+ return (
+ "hsla" === e.type && ((u += "a"), c.push(t[3])),
+ o({ type: u, values: c })
+ );
+ })(e)
+ ).values
+ : e.values;
+ return (
+ (t = t.map(function (t) {
+ return (
+ "color" !== e.type && (t /= 255),
+ t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4)
+ );
+ })),
+ Number((0.2126 * t[0] + 0.7152 * t[1] + 0.0722 * t[2]).toFixed(3))
+ );
+ }
+ function l(e, t) {
+ var n = s(e),
+ r = s(t);
+ return (Math.max(n, r) + 0.05) / (Math.min(n, r) + 0.05);
+ }
+ function u(e, t) {
+ return (
+ (e = a(e)),
+ (t = i(t)),
+ ("rgb" !== e.type && "hsl" !== e.type) || (e.type += "a"),
+ "color" === e.type
+ ? (e.values[3] = "/".concat(t))
+ : (e.values[3] = t),
+ o(e)
+ );
+ }
+ function c(e, t) {
+ if (((e = a(e)), (t = i(t)), -1 !== e.type.indexOf("hsl")))
+ e.values[2] *= 1 - t;
+ else if (
+ -1 !== e.type.indexOf("rgb") ||
+ -1 !== e.type.indexOf("color")
+ )
+ for (var n = 0; n < 3; n += 1) e.values[n] *= 1 - t;
+ return o(e);
+ }
+ function f(e, t) {
+ if (((e = a(e)), (t = i(t)), -1 !== e.type.indexOf("hsl")))
+ e.values[2] += (100 - e.values[2]) * t;
+ else if (-1 !== e.type.indexOf("rgb"))
+ for (var n = 0; n < 3; n += 1)
+ e.values[n] += (255 - e.values[n]) * t;
+ else if (-1 !== e.type.indexOf("color"))
+ for (var r = 0; r < 3; r += 1) e.values[r] += (1 - e.values[r]) * t;
+ return o(e);
+ }
+ },
+ 5080: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return p;
+ },
+ });
+ var r = n(7462),
+ i = n(3366),
+ a = n(2466),
+ o = n(4942),
+ s = ["values", "unit", "step"],
+ l = function (e) {
+ var t =
+ Object.keys(e).map(function (t) {
+ return { key: t, val: e[t] };
+ }) || [];
+ return (
+ t.sort(function (e, t) {
+ return e.val - t.val;
+ }),
+ t.reduce(function (e, t) {
+ return (0, r.Z)({}, e, (0, o.Z)({}, t.key, t.val));
+ }, {})
+ );
+ };
+ var u = { borderRadius: 4 },
+ c = n(5682);
+ var f = n(104),
+ d = n(7416),
+ h = ["breakpoints", "palette", "spacing", "shape"];
+ var p = function () {
+ for (
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {},
+ t = e.breakpoints,
+ n = void 0 === t ? {} : t,
+ o = e.palette,
+ p = void 0 === o ? {} : o,
+ v = e.spacing,
+ m = e.shape,
+ g = void 0 === m ? {} : m,
+ A = (0, i.Z)(e, h),
+ y = (function (e) {
+ var t = e.values,
+ n =
+ void 0 === t
+ ? { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }
+ : t,
+ a = e.unit,
+ o = void 0 === a ? "px" : a,
+ u = e.step,
+ c = void 0 === u ? 5 : u,
+ f = (0, i.Z)(e, s),
+ d = l(n),
+ h = Object.keys(d);
+ function p(e) {
+ var t = "number" === typeof n[e] ? n[e] : e;
+ return "@media (min-width:".concat(t).concat(o, ")");
+ }
+ function v(e) {
+ var t = "number" === typeof n[e] ? n[e] : e;
+ return "@media (max-width:"
+ .concat(t - c / 100)
+ .concat(o, ")");
+ }
+ function m(e, t) {
+ var r = h.indexOf(t);
+ return (
+ "@media (min-width:"
+ .concat("number" === typeof n[e] ? n[e] : e)
+ .concat(o, ") and ") +
+ "(max-width:"
+ .concat(
+ (-1 !== r && "number" === typeof n[h[r]]
+ ? n[h[r]]
+ : t) -
+ c / 100
+ )
+ .concat(o, ")")
+ );
+ }
+ return (0, r.Z)(
+ {
+ keys: h,
+ values: d,
+ up: p,
+ down: v,
+ between: m,
+ only: function (e) {
+ return h.indexOf(e) + 1 < h.length
+ ? m(e, h[h.indexOf(e) + 1])
+ : p(e);
+ },
+ not: function (e) {
+ var t = h.indexOf(e);
+ return 0 === t
+ ? p(h[1])
+ : t === h.length - 1
+ ? v(h[t])
+ : m(e, h[h.indexOf(e) + 1]).replace(
+ "@media",
+ "@media not all and"
+ );
+ },
+ unit: o,
+ },
+ f
+ );
+ })(n),
+ b = (function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 8;
+ if (e.mui) return e;
+ var t = (0, c.hB)({ spacing: e }),
+ n = function () {
+ for (
+ var e = arguments.length, n = new Array(e), r = 0;
+ r < e;
+ r++
+ )
+ n[r] = arguments[r];
+ return (0 === n.length ? [1] : n)
+ .map(function (e) {
+ var n = t(e);
+ return "number" === typeof n ? "".concat(n, "px") : n;
+ })
+ .join(" ");
+ };
+ return (n.mui = !0), n;
+ })(v),
+ x = (0, a.Z)(
+ {
+ breakpoints: y,
+ direction: "ltr",
+ components: {},
+ palette: (0, r.Z)({ mode: "light" }, p),
+ spacing: b,
+ shape: (0, r.Z)({}, u, g),
+ },
+ A
+ ),
+ S = arguments.length,
+ E = new Array(S > 1 ? S - 1 : 0),
+ _ = 1;
+ _ < S;
+ _++
+ )
+ E[_ - 1] = arguments[_];
+ return (
+ ((x = E.reduce(function (e, t) {
+ return (0, a.Z)(e, t);
+ }, x)).unstable_sxConfig = (0, r.Z)(
+ {},
+ d.Z,
+ null == A ? void 0 : A.unstable_sxConfig
+ )),
+ (x.unstable_sx = function (e) {
+ return (0, f.Z)({ sx: e, theme: this });
+ }),
+ x
+ );
+ };
+ },
+ 8247: function (e, t, n) {
+ "use strict";
+ var r = n(2466);
+ t.Z = function (e, t) {
+ return t ? (0, r.Z)(e, t, { clone: !1 }) : e;
+ };
+ },
+ 5682: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ hB: function () {
+ return v;
+ },
+ eI: function () {
+ return p;
+ },
+ NA: function () {
+ return m;
+ },
+ e6: function () {
+ return y;
+ },
+ o3: function () {
+ return b;
+ },
+ });
+ var r = n(9439),
+ i = n(1184),
+ a = n(8529),
+ o = n(8247);
+ var s = { m: "margin", p: "padding" },
+ l = {
+ t: "Top",
+ r: "Right",
+ b: "Bottom",
+ l: "Left",
+ x: ["Left", "Right"],
+ y: ["Top", "Bottom"],
+ },
+ u = { marginX: "mx", marginY: "my", paddingX: "px", paddingY: "py" },
+ c = (function (e) {
+ var t = {};
+ return function (n) {
+ return void 0 === t[n] && (t[n] = e(n)), t[n];
+ };
+ })(function (e) {
+ if (e.length > 2) {
+ if (!u[e]) return [e];
+ e = u[e];
+ }
+ var t = e.split(""),
+ n = (0, r.Z)(t, 2),
+ i = n[0],
+ a = n[1],
+ o = s[i],
+ c = l[a] || "";
+ return Array.isArray(c)
+ ? c.map(function (e) {
+ return o + e;
+ })
+ : [o + c];
+ }),
+ f = [
+ "m",
+ "mt",
+ "mr",
+ "mb",
+ "ml",
+ "mx",
+ "my",
+ "margin",
+ "marginTop",
+ "marginRight",
+ "marginBottom",
+ "marginLeft",
+ "marginX",
+ "marginY",
+ "marginInline",
+ "marginInlineStart",
+ "marginInlineEnd",
+ "marginBlock",
+ "marginBlockStart",
+ "marginBlockEnd",
+ ],
+ d = [
+ "p",
+ "pt",
+ "pr",
+ "pb",
+ "pl",
+ "px",
+ "py",
+ "padding",
+ "paddingTop",
+ "paddingRight",
+ "paddingBottom",
+ "paddingLeft",
+ "paddingX",
+ "paddingY",
+ "paddingInline",
+ "paddingInlineStart",
+ "paddingInlineEnd",
+ "paddingBlock",
+ "paddingBlockStart",
+ "paddingBlockEnd",
+ ],
+ h = [].concat(f, d);
+ function p(e, t, n, r) {
+ var i,
+ o = null != (i = (0, a.DW)(e, t, !1)) ? i : n;
+ return "number" === typeof o
+ ? function (e) {
+ return "string" === typeof e ? e : o * e;
+ }
+ : Array.isArray(o)
+ ? function (e) {
+ return "string" === typeof e ? e : o[e];
+ }
+ : "function" === typeof o
+ ? o
+ : function () {};
+ }
+ function v(e) {
+ return p(e, "spacing", 8);
+ }
+ function m(e, t) {
+ if ("string" === typeof t || null == t) return t;
+ var n = e(Math.abs(t));
+ return t >= 0 ? n : "number" === typeof n ? -n : "-".concat(n);
+ }
+ function g(e, t, n, r) {
+ if (-1 === t.indexOf(n)) return null;
+ var a = (function (e, t) {
+ return function (n) {
+ return e.reduce(function (e, r) {
+ return (e[r] = m(t, n)), e;
+ }, {});
+ };
+ })(c(n), r),
+ o = e[n];
+ return (0, i.k9)(e, o, a);
+ }
+ function A(e, t) {
+ var n = v(e.theme);
+ return Object.keys(e)
+ .map(function (r) {
+ return g(e, t, r, n);
+ })
+ .reduce(o.Z, {});
+ }
+ function y(e) {
+ return A(e, f);
+ }
+ function b(e) {
+ return A(e, d);
+ }
+ function x(e) {
+ return A(e, h);
+ }
+ (y.propTypes = {}),
+ (y.filterProps = f),
+ (b.propTypes = {}),
+ (b.filterProps = d),
+ (x.propTypes = {}),
+ (x.filterProps = h);
+ },
+ 8529: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ DW: function () {
+ return o;
+ },
+ Jq: function () {
+ return s;
+ },
+ });
+ var r = n(4942),
+ i = n(1122),
+ a = n(1184);
+ function o(e, t) {
+ var n =
+ !(arguments.length > 2 && void 0 !== arguments[2]) || arguments[2];
+ if (!t || "string" !== typeof t) return null;
+ if (e && e.vars && n) {
+ var r = "vars."
+ .concat(t)
+ .split(".")
+ .reduce(function (e, t) {
+ return e && e[t] ? e[t] : null;
+ }, e);
+ if (null != r) return r;
+ }
+ return t.split(".").reduce(function (e, t) {
+ return e && null != e[t] ? e[t] : null;
+ }, e);
+ }
+ function s(e, t, n) {
+ var r,
+ i =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : n;
+ return (
+ (r =
+ "function" === typeof e
+ ? e(n)
+ : Array.isArray(e)
+ ? e[n] || i
+ : o(e, n) || i),
+ t && (r = t(r, i, e)),
+ r
+ );
+ }
+ t.ZP = function (e) {
+ var t = e.prop,
+ n = e.cssProperty,
+ l = void 0 === n ? e.prop : n,
+ u = e.themeKey,
+ c = e.transform,
+ f = function (e) {
+ if (null == e[t]) return null;
+ var n = e[t],
+ f = o(e.theme, u) || {};
+ return (0, a.k9)(e, n, function (e) {
+ var n = s(f, c, e);
+ return (
+ e === n &&
+ "string" === typeof e &&
+ (n = s(
+ f,
+ c,
+ "".concat(t).concat("default" === e ? "" : (0, i.Z)(e)),
+ e
+ )),
+ !1 === l ? n : (0, r.Z)({}, l, n)
+ );
+ });
+ };
+ return (f.propTypes = {}), (f.filterProps = [t]), f;
+ };
+ },
+ 7416: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return R;
+ },
+ });
+ var r = n(5682),
+ i = n(8529),
+ a = n(8247);
+ var o = function () {
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
+ t[n] = arguments[n];
+ var r = t.reduce(function (e, t) {
+ return (
+ t.filterProps.forEach(function (n) {
+ e[n] = t;
+ }),
+ e
+ );
+ }, {}),
+ i = function (e) {
+ return Object.keys(e).reduce(function (t, n) {
+ return r[n] ? (0, a.Z)(t, r[n](e)) : t;
+ }, {});
+ };
+ return (
+ (i.propTypes = {}),
+ (i.filterProps = t.reduce(function (e, t) {
+ return e.concat(t.filterProps);
+ }, [])),
+ i
+ );
+ },
+ s = n(1184);
+ function l(e) {
+ return "number" !== typeof e ? e : "".concat(e, "px solid");
+ }
+ var u = (0, i.ZP)({
+ prop: "border",
+ themeKey: "borders",
+ transform: l,
+ }),
+ c = (0, i.ZP)({
+ prop: "borderTop",
+ themeKey: "borders",
+ transform: l,
+ }),
+ f = (0, i.ZP)({
+ prop: "borderRight",
+ themeKey: "borders",
+ transform: l,
+ }),
+ d = (0, i.ZP)({
+ prop: "borderBottom",
+ themeKey: "borders",
+ transform: l,
+ }),
+ h = (0, i.ZP)({
+ prop: "borderLeft",
+ themeKey: "borders",
+ transform: l,
+ }),
+ p = (0, i.ZP)({ prop: "borderColor", themeKey: "palette" }),
+ v = (0, i.ZP)({ prop: "borderTopColor", themeKey: "palette" }),
+ m = (0, i.ZP)({ prop: "borderRightColor", themeKey: "palette" }),
+ g = (0, i.ZP)({ prop: "borderBottomColor", themeKey: "palette" }),
+ A = (0, i.ZP)({ prop: "borderLeftColor", themeKey: "palette" }),
+ y = function (e) {
+ if (void 0 !== e.borderRadius && null !== e.borderRadius) {
+ var t = (0, r.eI)(
+ e.theme,
+ "shape.borderRadius",
+ 4,
+ "borderRadius"
+ );
+ return (0, s.k9)(e, e.borderRadius, function (e) {
+ return { borderRadius: (0, r.NA)(t, e) };
+ });
+ }
+ return null;
+ };
+ (y.propTypes = {}), (y.filterProps = ["borderRadius"]);
+ o(u, c, f, d, h, p, v, m, g, A, y);
+ var b = function (e) {
+ if (void 0 !== e.gap && null !== e.gap) {
+ var t = (0, r.eI)(e.theme, "spacing", 8, "gap");
+ return (0, s.k9)(e, e.gap, function (e) {
+ return { gap: (0, r.NA)(t, e) };
+ });
+ }
+ return null;
+ };
+ (b.propTypes = {}), (b.filterProps = ["gap"]);
+ var x = function (e) {
+ if (void 0 !== e.columnGap && null !== e.columnGap) {
+ var t = (0, r.eI)(e.theme, "spacing", 8, "columnGap");
+ return (0, s.k9)(e, e.columnGap, function (e) {
+ return { columnGap: (0, r.NA)(t, e) };
+ });
+ }
+ return null;
+ };
+ (x.propTypes = {}), (x.filterProps = ["columnGap"]);
+ var S = function (e) {
+ if (void 0 !== e.rowGap && null !== e.rowGap) {
+ var t = (0, r.eI)(e.theme, "spacing", 8, "rowGap");
+ return (0, s.k9)(e, e.rowGap, function (e) {
+ return { rowGap: (0, r.NA)(t, e) };
+ });
+ }
+ return null;
+ };
+ (S.propTypes = {}), (S.filterProps = ["rowGap"]);
+ o(
+ b,
+ x,
+ S,
+ (0, i.ZP)({ prop: "gridColumn" }),
+ (0, i.ZP)({ prop: "gridRow" }),
+ (0, i.ZP)({ prop: "gridAutoFlow" }),
+ (0, i.ZP)({ prop: "gridAutoColumns" }),
+ (0, i.ZP)({ prop: "gridAutoRows" }),
+ (0, i.ZP)({ prop: "gridTemplateColumns" }),
+ (0, i.ZP)({ prop: "gridTemplateRows" }),
+ (0, i.ZP)({ prop: "gridTemplateAreas" }),
+ (0, i.ZP)({ prop: "gridArea" })
+ );
+ function E(e, t) {
+ return "grey" === t ? t : e;
+ }
+ o(
+ (0, i.ZP)({ prop: "color", themeKey: "palette", transform: E }),
+ (0, i.ZP)({
+ prop: "bgcolor",
+ cssProperty: "backgroundColor",
+ themeKey: "palette",
+ transform: E,
+ }),
+ (0, i.ZP)({
+ prop: "backgroundColor",
+ themeKey: "palette",
+ transform: E,
+ })
+ );
+ function _(e) {
+ return e <= 1 && 0 !== e ? "".concat(100 * e, "%") : e;
+ }
+ var C = (0, i.ZP)({ prop: "width", transform: _ }),
+ w = function (e) {
+ if (void 0 !== e.maxWidth && null !== e.maxWidth) {
+ return (0, s.k9)(e, e.maxWidth, function (t) {
+ var n,
+ r,
+ i =
+ (null == (n = e.theme) ||
+ null == (n = n.breakpoints) ||
+ null == (n = n.values)
+ ? void 0
+ : n[t]) || s.VO[t];
+ return i
+ ? "px" !==
+ (null == (r = e.theme) || null == (r = r.breakpoints)
+ ? void 0
+ : r.unit)
+ ? {
+ maxWidth: "".concat(i).concat(e.theme.breakpoints.unit),
+ }
+ : { maxWidth: i }
+ : { maxWidth: _(t) };
+ });
+ }
+ return null;
+ };
+ w.filterProps = ["maxWidth"];
+ var T = (0, i.ZP)({ prop: "minWidth", transform: _ }),
+ M = (0, i.ZP)({ prop: "height", transform: _ }),
+ I = (0, i.ZP)({ prop: "maxHeight", transform: _ }),
+ k = (0, i.ZP)({ prop: "minHeight", transform: _ }),
+ R =
+ ((0, i.ZP)({ prop: "size", cssProperty: "width", transform: _ }),
+ (0, i.ZP)({ prop: "size", cssProperty: "height", transform: _ }),
+ o(C, w, T, M, I, k, (0, i.ZP)({ prop: "boxSizing" })),
+ {
+ border: { themeKey: "borders", transform: l },
+ borderTop: { themeKey: "borders", transform: l },
+ borderRight: { themeKey: "borders", transform: l },
+ borderBottom: { themeKey: "borders", transform: l },
+ borderLeft: { themeKey: "borders", transform: l },
+ borderColor: { themeKey: "palette" },
+ borderTopColor: { themeKey: "palette" },
+ borderRightColor: { themeKey: "palette" },
+ borderBottomColor: { themeKey: "palette" },
+ borderLeftColor: { themeKey: "palette" },
+ borderRadius: { themeKey: "shape.borderRadius", style: y },
+ color: { themeKey: "palette", transform: E },
+ bgcolor: {
+ themeKey: "palette",
+ cssProperty: "backgroundColor",
+ transform: E,
+ },
+ backgroundColor: { themeKey: "palette", transform: E },
+ p: { style: r.o3 },
+ pt: { style: r.o3 },
+ pr: { style: r.o3 },
+ pb: { style: r.o3 },
+ pl: { style: r.o3 },
+ px: { style: r.o3 },
+ py: { style: r.o3 },
+ padding: { style: r.o3 },
+ paddingTop: { style: r.o3 },
+ paddingRight: { style: r.o3 },
+ paddingBottom: { style: r.o3 },
+ paddingLeft: { style: r.o3 },
+ paddingX: { style: r.o3 },
+ paddingY: { style: r.o3 },
+ paddingInline: { style: r.o3 },
+ paddingInlineStart: { style: r.o3 },
+ paddingInlineEnd: { style: r.o3 },
+ paddingBlock: { style: r.o3 },
+ paddingBlockStart: { style: r.o3 },
+ paddingBlockEnd: { style: r.o3 },
+ m: { style: r.e6 },
+ mt: { style: r.e6 },
+ mr: { style: r.e6 },
+ mb: { style: r.e6 },
+ ml: { style: r.e6 },
+ mx: { style: r.e6 },
+ my: { style: r.e6 },
+ margin: { style: r.e6 },
+ marginTop: { style: r.e6 },
+ marginRight: { style: r.e6 },
+ marginBottom: { style: r.e6 },
+ marginLeft: { style: r.e6 },
+ marginX: { style: r.e6 },
+ marginY: { style: r.e6 },
+ marginInline: { style: r.e6 },
+ marginInlineStart: { style: r.e6 },
+ marginInlineEnd: { style: r.e6 },
+ marginBlock: { style: r.e6 },
+ marginBlockStart: { style: r.e6 },
+ marginBlockEnd: { style: r.e6 },
+ displayPrint: {
+ cssProperty: !1,
+ transform: function (e) {
+ return { "@media print": { display: e } };
+ },
+ },
+ display: {},
+ overflow: {},
+ textOverflow: {},
+ visibility: {},
+ whiteSpace: {},
+ flexBasis: {},
+ flexDirection: {},
+ flexWrap: {},
+ justifyContent: {},
+ alignItems: {},
+ alignContent: {},
+ order: {},
+ flex: {},
+ flexGrow: {},
+ flexShrink: {},
+ alignSelf: {},
+ justifyItems: {},
+ justifySelf: {},
+ gap: { style: b },
+ rowGap: { style: S },
+ columnGap: { style: x },
+ gridColumn: {},
+ gridRow: {},
+ gridAutoFlow: {},
+ gridAutoColumns: {},
+ gridAutoRows: {},
+ gridTemplateColumns: {},
+ gridTemplateRows: {},
+ gridTemplateAreas: {},
+ gridArea: {},
+ position: {},
+ zIndex: { themeKey: "zIndex" },
+ top: {},
+ right: {},
+ bottom: {},
+ left: {},
+ boxShadow: { themeKey: "shadows" },
+ width: { transform: _ },
+ maxWidth: { style: w },
+ minWidth: { transform: _ },
+ height: { transform: _ },
+ maxHeight: { transform: _ },
+ minHeight: { transform: _ },
+ boxSizing: {},
+ fontFamily: { themeKey: "typography" },
+ fontSize: { themeKey: "typography" },
+ fontStyle: { themeKey: "typography" },
+ fontWeight: { themeKey: "typography" },
+ letterSpacing: {},
+ textTransform: {},
+ lineHeight: {},
+ textAlign: {},
+ typography: { cssProperty: !1, themeKey: "typography" },
+ });
+ },
+ 104: function (e, t, n) {
+ "use strict";
+ var r = n(4942),
+ i = n(1122),
+ a = n(8247),
+ o = n(8529),
+ s = n(1184),
+ l = n(7416);
+ var u = (function () {
+ function e(e, t, n, a) {
+ var l,
+ u = ((l = {}), (0, r.Z)(l, e, t), (0, r.Z)(l, "theme", n), l),
+ c = a[e];
+ if (!c) return (0, r.Z)({}, e, t);
+ var f = c.cssProperty,
+ d = void 0 === f ? e : f,
+ h = c.themeKey,
+ p = c.transform,
+ v = c.style;
+ if (null == t) return null;
+ if ("typography" === h && "inherit" === t)
+ return (0, r.Z)({}, e, t);
+ var m = (0, o.DW)(n, h) || {};
+ if (v) return v(u);
+ return (0, s.k9)(u, t, function (t) {
+ var n = (0, o.Jq)(m, p, t);
+ return (
+ t === n &&
+ "string" === typeof t &&
+ (n = (0, o.Jq)(
+ m,
+ p,
+ "".concat(e).concat("default" === t ? "" : (0, i.Z)(t)),
+ t
+ )),
+ !1 === d ? n : (0, r.Z)({}, d, n)
+ );
+ });
+ }
+ return function t(n) {
+ var i,
+ o = n || {},
+ u = o.sx,
+ c = o.theme,
+ f = void 0 === c ? {} : c;
+ if (!u) return null;
+ var d = null != (i = f.unstable_sxConfig) ? i : l.Z;
+ function h(n) {
+ var i = n;
+ if ("function" === typeof n) i = n(f);
+ else if ("object" !== typeof n) return n;
+ if (!i) return null;
+ var o = (0, s.W8)(f.breakpoints),
+ l = Object.keys(o),
+ u = o;
+ return (
+ Object.keys(i).forEach(function (n) {
+ var o,
+ l,
+ c =
+ ((o = i[n]), (l = f), "function" === typeof o ? o(l) : o);
+ if (null !== c && void 0 !== c)
+ if ("object" === typeof c)
+ if (d[n]) u = (0, a.Z)(u, e(n, c, f, d));
+ else {
+ var h = (0, s.k9)({ theme: f }, c, function (e) {
+ return (0, r.Z)({}, n, e);
+ });
+ !(function () {
+ for (
+ var e = arguments.length, t = new Array(e), n = 0;
+ n < e;
+ n++
+ )
+ t[n] = arguments[n];
+ var r = t.reduce(function (e, t) {
+ return e.concat(Object.keys(t));
+ }, []),
+ i = new Set(r);
+ return t.every(function (e) {
+ return i.size === Object.keys(e).length;
+ });
+ })(h, c)
+ ? (u = (0, a.Z)(u, h))
+ : (u[n] = t({ sx: c, theme: f }));
+ }
+ else u = (0, a.Z)(u, e(n, c, f, d));
+ }),
+ (0, s.L7)(l, u)
+ );
+ }
+ return Array.isArray(u) ? u.map(h) : h(u);
+ };
+ })();
+ (u.filterProps = ["sx"]), (t.Z = u);
+ },
+ 418: function (e, t, n) {
+ "use strict";
+ var r = n(5080),
+ i = n(9120),
+ a = (0, r.Z)();
+ t.Z = function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : a;
+ return (0, i.Z)(e);
+ };
+ },
+ 9120: function (e, t, n) {
+ "use strict";
+ var r = n(2791),
+ i = n(2564);
+ t.Z = function () {
+ var e,
+ t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : null,
+ n = r.useContext(i.T);
+ return n && ((e = n), 0 !== Object.keys(e).length) ? n : t;
+ };
+ },
+ 5902: function (e, t) {
+ "use strict";
+ var n = function (e) {
+ return e;
+ },
+ r = (function () {
+ var e = n;
+ return {
+ configure: function (t) {
+ e = t;
+ },
+ generate: function (t) {
+ return e(t);
+ },
+ reset: function () {
+ e = n;
+ },
+ };
+ })();
+ t.Z = r;
+ },
+ 1122: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(6189);
+ function i(e) {
+ if ("string" !== typeof e) throw new Error((0, r.Z)(7));
+ return e.charAt(0).toUpperCase() + e.slice(1);
+ }
+ },
+ 4419: function (e, t, n) {
+ "use strict";
+ function r(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : void 0,
+ r = {};
+ return (
+ Object.keys(e).forEach(function (i) {
+ r[i] = e[i]
+ .reduce(function (e, r) {
+ if (r) {
+ var i = t(r);
+ "" !== i && e.push(i), n && n[r] && e.push(n[r]);
+ }
+ return e;
+ }, [])
+ .join(" ");
+ }),
+ r
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 8949: function (e, t, n) {
+ "use strict";
+ function r() {
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
+ t[n] = arguments[n];
+ return t.reduce(
+ function (e, t) {
+ return null == t
+ ? e
+ : function () {
+ for (
+ var n = arguments.length, r = new Array(n), i = 0;
+ i < n;
+ i++
+ )
+ r[i] = arguments[i];
+ e.apply(this, r), t.apply(this, r);
+ };
+ },
+ function () {}
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 2254: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ var t,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 166;
+ function r() {
+ for (
+ var r = this, i = arguments.length, a = new Array(i), o = 0;
+ o < i;
+ o++
+ )
+ a[o] = arguments[o];
+ clearTimeout(t),
+ (t = setTimeout(function () {
+ e.apply(r, a);
+ }, n));
+ }
+ return (
+ (r.clear = function () {
+ clearTimeout(t);
+ }),
+ r
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 2466: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ P: function () {
+ return i;
+ },
+ Z: function () {
+ return o;
+ },
+ });
+ var r = n(7462);
+ function i(e) {
+ return (
+ null !== e && "object" === typeof e && e.constructor === Object
+ );
+ }
+ function a(e) {
+ if (!i(e)) return e;
+ var t = {};
+ return (
+ Object.keys(e).forEach(function (n) {
+ t[n] = a(e[n]);
+ }),
+ t
+ );
+ }
+ function o(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : { clone: !0 },
+ s = n.clone ? (0, r.Z)({}, e) : e;
+ return (
+ i(e) &&
+ i(t) &&
+ Object.keys(t).forEach(function (r) {
+ "__proto__" !== r &&
+ (i(t[r]) && r in e && i(e[r])
+ ? (s[r] = o(e[r], t[r], n))
+ : n.clone
+ ? (s[r] = i(t[r]) ? a(t[r]) : t[r])
+ : (s[r] = t[r]));
+ }),
+ s
+ );
+ }
+ },
+ 6189: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ for (
+ var t = "https://mui.com/production-error/?code=" + e, n = 1;
+ n < arguments.length;
+ n += 1
+ )
+ t += "&args[]=" + encodeURIComponent(arguments[n]);
+ return (
+ "Minified MUI error #" +
+ e +
+ "; visit " +
+ t +
+ " for the full message."
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 1217: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(5902),
+ i = {
+ active: "active",
+ checked: "checked",
+ completed: "completed",
+ disabled: "disabled",
+ error: "error",
+ expanded: "expanded",
+ focused: "focused",
+ focusVisible: "focusVisible",
+ open: "open",
+ readOnly: "readOnly",
+ required: "required",
+ selected: "selected",
+ };
+ function a(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : "Mui",
+ a = i[t];
+ return a
+ ? "".concat(n, "-").concat(a)
+ : "".concat(r.Z.generate(e), "-").concat(t);
+ }
+ },
+ 5878: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(1217);
+ function i(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : "Mui",
+ i = {};
+ return (
+ t.forEach(function (t) {
+ i[t] = (0, r.Z)(e, t, n);
+ }),
+ i
+ );
+ }
+ },
+ 4913: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (e && e.ownerDocument) || document;
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 5202: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(4913);
+ function i(e) {
+ return (0, r.Z)(e).defaultView || window;
+ }
+ },
+ 5735: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(7462);
+ function i(e, t) {
+ var n = (0, r.Z)({}, t);
+ return (
+ Object.keys(e).forEach(function (a) {
+ if (a.toString().match(/^(components|slots)$/))
+ n[a] = (0, r.Z)({}, e[a], n[a]);
+ else if (a.toString().match(/^(componentsProps|slotProps)$/)) {
+ var o = e[a] || {},
+ s = t[a];
+ (n[a] = {}),
+ s && Object.keys(s)
+ ? o && Object.keys(o)
+ ? ((n[a] = (0, r.Z)({}, s)),
+ Object.keys(o).forEach(function (e) {
+ n[a][e] = i(o[e], s[e]);
+ }))
+ : (n[a] = s)
+ : (n[a] = o);
+ } else void 0 === n[a] && (n[a] = e[a]);
+ }),
+ n
+ );
+ }
+ },
+ 2971: function (e, t, n) {
+ "use strict";
+ function r(e, t) {
+ "function" === typeof e ? e(t) : e && (e.current = t);
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 2876: function (e, t, n) {
+ "use strict";
+ var r = n(2791),
+ i = "undefined" !== typeof window ? r.useLayoutEffect : r.useEffect;
+ t.Z = i;
+ },
+ 7054: function (e, t, n) {
+ "use strict";
+ var r = n(2791),
+ i = n(2876);
+ t.Z = function (e) {
+ var t = r.useRef(e);
+ return (
+ (0, i.Z)(function () {
+ t.current = e;
+ }),
+ r.useCallback(function () {
+ return t.current.apply(void 0, arguments);
+ }, [])
+ );
+ };
+ },
+ 6117: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(2791),
+ i = n(2971);
+ function a() {
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
+ t[n] = arguments[n];
+ return r.useMemo(function () {
+ return t.every(function (e) {
+ return null == e;
+ })
+ ? null
+ : function (e) {
+ t.forEach(function (t) {
+ (0, i.Z)(t, e);
+ });
+ };
+ }, t);
+ }
+ },
+ 8252: function (e, t, n) {
+ "use strict";
+ var r;
+ n.d(t, {
+ Z: function () {
+ return l;
+ },
+ });
+ var i = n(9439),
+ a = n(2791),
+ o = 0;
+ var s = (r || (r = n.t(a, 2)))["useId".toString()];
+ function l(e) {
+ if (void 0 !== s) {
+ var t = s();
+ return null != e ? e : t;
+ }
+ return (function (e) {
+ var t = a.useState(e),
+ n = (0, i.Z)(t, 2),
+ r = n[0],
+ s = n[1],
+ l = e || r;
+ return (
+ a.useEffect(
+ function () {
+ null == r && s("mui-".concat((o += 1)));
+ },
+ [r]
+ ),
+ l
+ );
+ })(e);
+ }
+ },
+ 1694: function (e, t) {
+ var n;
+ !(function () {
+ "use strict";
+ var r = {}.hasOwnProperty;
+ function i() {
+ for (var e = [], t = 0; t < arguments.length; t++) {
+ var n = arguments[t];
+ if (n) {
+ var a = typeof n;
+ if ("string" === a || "number" === a) e.push(n);
+ else if (Array.isArray(n)) {
+ if (n.length) {
+ var o = i.apply(null, n);
+ o && e.push(o);
+ }
+ } else if ("object" === a) {
+ if (
+ n.toString !== Object.prototype.toString &&
+ !n.toString.toString().includes("[native code]")
+ ) {
+ e.push(n.toString());
+ continue;
+ }
+ for (var s in n) r.call(n, s) && n[s] && e.push(s);
+ }
+ }
+ }
+ return e.join(" ");
+ }
+ e.exports
+ ? ((i.default = i), (e.exports = i))
+ : void 0 ===
+ (n = function () {
+ return i;
+ }.apply(t, [])) || (e.exports = n);
+ })();
+ },
+ 7494: function (e) {
+ function t(e, t, n) {
+ var r, i, a, o, s;
+ function l() {
+ var u = Date.now() - o;
+ u < t && u >= 0
+ ? (r = setTimeout(l, t - u))
+ : ((r = null), n || ((s = e.apply(a, i)), (a = i = null)));
+ }
+ null == t && (t = 100);
+ var u = function () {
+ (a = this), (i = arguments), (o = Date.now());
+ var u = n && !r;
+ return (
+ r || (r = setTimeout(l, t)),
+ u && ((s = e.apply(a, i)), (a = i = null)),
+ s
+ );
+ };
+ return (
+ (u.clear = function () {
+ r && (clearTimeout(r), (r = null));
+ }),
+ (u.flush = function () {
+ r &&
+ ((s = e.apply(a, i)),
+ (a = i = null),
+ clearTimeout(r),
+ (r = null));
+ }),
+ u
+ );
+ }
+ (t.debounce = t), (e.exports = t);
+ },
+ 2244: function (e, t, n) {
+ var r = n(7447),
+ i = n(8051).each;
+ function a(e, t) {
+ (this.query = e),
+ (this.isUnconditional = t),
+ (this.handlers = []),
+ (this.mql = window.matchMedia(e));
+ var n = this;
+ (this.listener = function (e) {
+ (n.mql = e.currentTarget || e), n.assess();
+ }),
+ this.mql.addListener(this.listener);
+ }
+ (a.prototype = {
+ constuctor: a,
+ addHandler: function (e) {
+ var t = new r(e);
+ this.handlers.push(t), this.matches() && t.on();
+ },
+ removeHandler: function (e) {
+ var t = this.handlers;
+ i(t, function (n, r) {
+ if (n.equals(e)) return n.destroy(), !t.splice(r, 1);
+ });
+ },
+ matches: function () {
+ return this.mql.matches || this.isUnconditional;
+ },
+ clear: function () {
+ i(this.handlers, function (e) {
+ e.destroy();
+ }),
+ this.mql.removeListener(this.listener),
+ (this.handlers.length = 0);
+ },
+ assess: function () {
+ var e = this.matches() ? "on" : "off";
+ i(this.handlers, function (t) {
+ t[e]();
+ });
+ },
+ }),
+ (e.exports = a);
+ },
+ 4e3: function (e, t, n) {
+ var r = n(2244),
+ i = n(8051),
+ a = i.each,
+ o = i.isFunction,
+ s = i.isArray;
+ function l() {
+ if (!window.matchMedia)
+ throw new Error(
+ "matchMedia not present, legacy browsers require a polyfill"
+ );
+ (this.queries = {}),
+ (this.browserIsIncapable = !window.matchMedia("only all").matches);
+ }
+ (l.prototype = {
+ constructor: l,
+ register: function (e, t, n) {
+ var i = this.queries,
+ l = n && this.browserIsIncapable;
+ return (
+ i[e] || (i[e] = new r(e, l)),
+ o(t) && (t = { match: t }),
+ s(t) || (t = [t]),
+ a(t, function (t) {
+ o(t) && (t = { match: t }), i[e].addHandler(t);
+ }),
+ this
+ );
+ },
+ unregister: function (e, t) {
+ var n = this.queries[e];
+ return (
+ n &&
+ (t ? n.removeHandler(t) : (n.clear(), delete this.queries[e])),
+ this
+ );
+ },
+ }),
+ (e.exports = l);
+ },
+ 7447: function (e) {
+ function t(e) {
+ (this.options = e), !e.deferSetup && this.setup();
+ }
+ (t.prototype = {
+ constructor: t,
+ setup: function () {
+ this.options.setup && this.options.setup(), (this.initialised = !0);
+ },
+ on: function () {
+ !this.initialised && this.setup(),
+ this.options.match && this.options.match();
+ },
+ off: function () {
+ this.options.unmatch && this.options.unmatch();
+ },
+ destroy: function () {
+ this.options.destroy ? this.options.destroy() : this.off();
+ },
+ equals: function (e) {
+ return this.options === e || this.options.match === e;
+ },
+ }),
+ (e.exports = t);
+ },
+ 8051: function (e) {
+ e.exports = {
+ isFunction: function (e) {
+ return "function" === typeof e;
+ },
+ isArray: function (e) {
+ return "[object Array]" === Object.prototype.toString.apply(e);
+ },
+ each: function (e, t) {
+ for (var n = 0, r = e.length; n < r && !1 !== t(e[n], n); n++);
+ },
+ };
+ },
+ 8153: function (e, t, n) {
+ var r = n(4e3);
+ e.exports = new r();
+ },
+ 2110: function (e, t, n) {
+ "use strict";
+ var r = n(8309),
+ i = {
+ childContextTypes: !0,
+ contextType: !0,
+ contextTypes: !0,
+ defaultProps: !0,
+ displayName: !0,
+ getDefaultProps: !0,
+ getDerivedStateFromError: !0,
+ getDerivedStateFromProps: !0,
+ mixins: !0,
+ propTypes: !0,
+ type: !0,
+ },
+ a = {
+ name: !0,
+ length: !0,
+ prototype: !0,
+ caller: !0,
+ callee: !0,
+ arguments: !0,
+ arity: !0,
+ },
+ o = {
+ $$typeof: !0,
+ compare: !0,
+ defaultProps: !0,
+ displayName: !0,
+ propTypes: !0,
+ type: !0,
+ },
+ s = {};
+ function l(e) {
+ return r.isMemo(e) ? o : s[e.$$typeof] || i;
+ }
+ (s[r.ForwardRef] = {
+ $$typeof: !0,
+ render: !0,
+ defaultProps: !0,
+ displayName: !0,
+ propTypes: !0,
+ }),
+ (s[r.Memo] = o);
+ var u = Object.defineProperty,
+ c = Object.getOwnPropertyNames,
+ f = Object.getOwnPropertySymbols,
+ d = Object.getOwnPropertyDescriptor,
+ h = Object.getPrototypeOf,
+ p = Object.prototype;
+ e.exports = function e(t, n, r) {
+ if ("string" !== typeof n) {
+ if (p) {
+ var i = h(n);
+ i && i !== p && e(t, i, r);
+ }
+ var o = c(n);
+ f && (o = o.concat(f(n)));
+ for (var s = l(t), v = l(n), m = 0; m < o.length; ++m) {
+ var g = o[m];
+ if (!a[g] && (!r || !r[g]) && (!v || !v[g]) && (!s || !s[g])) {
+ var A = d(n, g);
+ try {
+ u(t, g, A);
+ } catch (y) {}
+ }
+ }
+ }
+ return t;
+ };
+ },
+ 746: function (e, t) {
+ "use strict";
+ var n = "function" === typeof Symbol && Symbol.for,
+ r = n ? Symbol.for("react.element") : 60103,
+ i = n ? Symbol.for("react.portal") : 60106,
+ a = n ? Symbol.for("react.fragment") : 60107,
+ o = n ? Symbol.for("react.strict_mode") : 60108,
+ s = n ? Symbol.for("react.profiler") : 60114,
+ l = n ? Symbol.for("react.provider") : 60109,
+ u = n ? Symbol.for("react.context") : 60110,
+ c = n ? Symbol.for("react.async_mode") : 60111,
+ f = n ? Symbol.for("react.concurrent_mode") : 60111,
+ d = n ? Symbol.for("react.forward_ref") : 60112,
+ h = n ? Symbol.for("react.suspense") : 60113,
+ p = n ? Symbol.for("react.suspense_list") : 60120,
+ v = n ? Symbol.for("react.memo") : 60115,
+ m = n ? Symbol.for("react.lazy") : 60116,
+ g = n ? Symbol.for("react.block") : 60121,
+ A = n ? Symbol.for("react.fundamental") : 60117,
+ y = n ? Symbol.for("react.responder") : 60118,
+ b = n ? Symbol.for("react.scope") : 60119;
+ function x(e) {
+ if ("object" === typeof e && null !== e) {
+ var t = e.$$typeof;
+ switch (t) {
+ case r:
+ switch ((e = e.type)) {
+ case c:
+ case f:
+ case a:
+ case s:
+ case o:
+ case h:
+ return e;
+ default:
+ switch ((e = e && e.$$typeof)) {
+ case u:
+ case d:
+ case m:
+ case v:
+ case l:
+ return e;
+ default:
+ return t;
+ }
+ }
+ case i:
+ return t;
+ }
+ }
+ }
+ function S(e) {
+ return x(e) === f;
+ }
+ (t.AsyncMode = c),
+ (t.ConcurrentMode = f),
+ (t.ContextConsumer = u),
+ (t.ContextProvider = l),
+ (t.Element = r),
+ (t.ForwardRef = d),
+ (t.Fragment = a),
+ (t.Lazy = m),
+ (t.Memo = v),
+ (t.Portal = i),
+ (t.Profiler = s),
+ (t.StrictMode = o),
+ (t.Suspense = h),
+ (t.isAsyncMode = function (e) {
+ return S(e) || x(e) === c;
+ }),
+ (t.isConcurrentMode = S),
+ (t.isContextConsumer = function (e) {
+ return x(e) === u;
+ }),
+ (t.isContextProvider = function (e) {
+ return x(e) === l;
+ }),
+ (t.isElement = function (e) {
+ return "object" === typeof e && null !== e && e.$$typeof === r;
+ }),
+ (t.isForwardRef = function (e) {
+ return x(e) === d;
+ }),
+ (t.isFragment = function (e) {
+ return x(e) === a;
+ }),
+ (t.isLazy = function (e) {
+ return x(e) === m;
+ }),
+ (t.isMemo = function (e) {
+ return x(e) === v;
+ }),
+ (t.isPortal = function (e) {
+ return x(e) === i;
+ }),
+ (t.isProfiler = function (e) {
+ return x(e) === s;
+ }),
+ (t.isStrictMode = function (e) {
+ return x(e) === o;
+ }),
+ (t.isSuspense = function (e) {
+ return x(e) === h;
+ }),
+ (t.isValidElementType = function (e) {
+ return (
+ "string" === typeof e ||
+ "function" === typeof e ||
+ e === a ||
+ e === f ||
+ e === s ||
+ e === o ||
+ e === h ||
+ e === p ||
+ ("object" === typeof e &&
+ null !== e &&
+ (e.$$typeof === m ||
+ e.$$typeof === v ||
+ e.$$typeof === l ||
+ e.$$typeof === u ||
+ e.$$typeof === d ||
+ e.$$typeof === A ||
+ e.$$typeof === y ||
+ e.$$typeof === b ||
+ e.$$typeof === g))
+ );
+ }),
+ (t.typeOf = x);
+ },
+ 8309: function (e, t, n) {
+ "use strict";
+ e.exports = n(746);
+ },
+ 5477: function (e, t, n) {
+ var r = n(2806),
+ i = function (e) {
+ var t = "",
+ n = Object.keys(e);
+ return (
+ n.forEach(function (i, a) {
+ var o = e[i];
+ (function (e) {
+ return /[height|width]$/.test(e);
+ })((i = r(i))) &&
+ "number" === typeof o &&
+ (o += "px"),
+ (t +=
+ !0 === o
+ ? i
+ : !1 === o
+ ? "not " + i
+ : "(" + i + ": " + o + ")"),
+ a < n.length - 1 && (t += " and ");
+ }),
+ t
+ );
+ };
+ e.exports = function (e) {
+ var t = "";
+ return "string" === typeof e
+ ? e
+ : e instanceof Array
+ ? (e.forEach(function (n, r) {
+ (t += i(n)), r < e.length - 1 && (t += ", ");
+ }),
+ t)
+ : i(e);
+ };
+ },
+ 5095: function (e, t, n) {
+ var r = NaN,
+ i = "[object Symbol]",
+ a = /^\s+|\s+$/g,
+ o = /^[-+]0x[0-9a-f]+$/i,
+ s = /^0b[01]+$/i,
+ l = /^0o[0-7]+$/i,
+ u = parseInt,
+ c = "object" == typeof n.g && n.g && n.g.Object === Object && n.g,
+ f = "object" == typeof self && self && self.Object === Object && self,
+ d = c || f || Function("return this")(),
+ h = Object.prototype.toString,
+ p = Math.max,
+ v = Math.min,
+ m = function () {
+ return d.Date.now();
+ };
+ function g(e) {
+ var t = typeof e;
+ return !!e && ("object" == t || "function" == t);
+ }
+ function A(e) {
+ if ("number" == typeof e) return e;
+ if (
+ (function (e) {
+ return (
+ "symbol" == typeof e ||
+ ((function (e) {
+ return !!e && "object" == typeof e;
+ })(e) &&
+ h.call(e) == i)
+ );
+ })(e)
+ )
+ return r;
+ if (g(e)) {
+ var t = "function" == typeof e.valueOf ? e.valueOf() : e;
+ e = g(t) ? t + "" : t;
+ }
+ if ("string" != typeof e) return 0 === e ? e : +e;
+ e = e.replace(a, "");
+ var n = s.test(e);
+ return n || l.test(e) ? u(e.slice(2), n ? 2 : 8) : o.test(e) ? r : +e;
+ }
+ e.exports = function (e, t, n) {
+ var r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u = 0,
+ c = !1,
+ f = !1,
+ d = !0;
+ if ("function" != typeof e)
+ throw new TypeError("Expected a function");
+ function h(t) {
+ var n = r,
+ a = i;
+ return (r = i = void 0), (u = t), (o = e.apply(a, n));
+ }
+ function y(e) {
+ var n = e - l;
+ return void 0 === l || n >= t || n < 0 || (f && e - u >= a);
+ }
+ function b() {
+ var e = m();
+ if (y(e)) return x(e);
+ s = setTimeout(
+ b,
+ (function (e) {
+ var n = t - (e - l);
+ return f ? v(n, a - (e - u)) : n;
+ })(e)
+ );
+ }
+ function x(e) {
+ return (s = void 0), d && r ? h(e) : ((r = i = void 0), o);
+ }
+ function S() {
+ var e = m(),
+ n = y(e);
+ if (((r = arguments), (i = this), (l = e), n)) {
+ if (void 0 === s)
+ return (function (e) {
+ return (u = e), (s = setTimeout(b, t)), c ? h(e) : o;
+ })(l);
+ if (f) return (s = setTimeout(b, t)), h(l);
+ }
+ return void 0 === s && (s = setTimeout(b, t)), o;
+ }
+ return (
+ (t = A(t) || 0),
+ g(n) &&
+ ((c = !!n.leading),
+ (a = (f = "maxWait" in n) ? p(A(n.maxWait) || 0, t) : a),
+ (d = "trailing" in n ? !!n.trailing : d)),
+ (S.cancel = function () {
+ void 0 !== s && clearTimeout(s),
+ (u = 0),
+ (r = l = i = s = void 0);
+ }),
+ (S.flush = function () {
+ return void 0 === s ? o : x(m());
+ }),
+ S
+ );
+ };
+ },
+ 7235: function (e, t) {
+ !(function (e) {
+ "use strict";
+ function t() {}
+ function n(e, n) {
+ (this.dv = new DataView(e)),
+ (this.offset = 0),
+ (this.littleEndian = void 0 === n || n),
+ (this.encoder = new t());
+ }
+ function r() {}
+ function i() {}
+ (t.prototype.s2u = function (e) {
+ for (var t = this.s2uTable, n = "", r = 0; r < e.length; ) {
+ var i = e[r++];
+ if (
+ (!((i >= 0 && i <= 126) || (i >= 161 && i <= 223)) &&
+ r < e.length &&
+ (i = (i << 8) | e[r++]),
+ void 0 === t[i])
+ )
+ return console.error("unknown char code " + i + "."), n;
+ n += String.fromCharCode(t[i]);
+ }
+ return n;
+ }),
+ (t.prototype.s2uTable = {
+ 0: 0,
+ 1: 1,
+ 2: 2,
+ 3: 3,
+ 4: 4,
+ 5: 5,
+ 6: 6,
+ 7: 7,
+ 8: 8,
+ 9: 9,
+ 10: 10,
+ 11: 11,
+ 12: 12,
+ 13: 13,
+ 14: 14,
+ 15: 15,
+ 16: 16,
+ 17: 17,
+ 18: 18,
+ 19: 19,
+ 20: 20,
+ 21: 21,
+ 22: 22,
+ 23: 23,
+ 24: 24,
+ 25: 25,
+ 26: 26,
+ 27: 27,
+ 28: 28,
+ 29: 29,
+ 30: 30,
+ 31: 31,
+ 32: 32,
+ 33: 33,
+ 34: 34,
+ 35: 35,
+ 36: 36,
+ 37: 37,
+ 38: 38,
+ 39: 39,
+ 40: 40,
+ 41: 41,
+ 42: 42,
+ 43: 43,
+ 44: 44,
+ 45: 45,
+ 46: 46,
+ 47: 47,
+ 48: 48,
+ 49: 49,
+ 50: 50,
+ 51: 51,
+ 52: 52,
+ 53: 53,
+ 54: 54,
+ 55: 55,
+ 56: 56,
+ 57: 57,
+ 58: 58,
+ 59: 59,
+ 60: 60,
+ 61: 61,
+ 62: 62,
+ 63: 63,
+ 64: 64,
+ 65: 65,
+ 66: 66,
+ 67: 67,
+ 68: 68,
+ 69: 69,
+ 70: 70,
+ 71: 71,
+ 72: 72,
+ 73: 73,
+ 74: 74,
+ 75: 75,
+ 76: 76,
+ 77: 77,
+ 78: 78,
+ 79: 79,
+ 80: 80,
+ 81: 81,
+ 82: 82,
+ 83: 83,
+ 84: 84,
+ 85: 85,
+ 86: 86,
+ 87: 87,
+ 88: 88,
+ 89: 89,
+ 90: 90,
+ 91: 91,
+ 92: 92,
+ 93: 93,
+ 94: 94,
+ 95: 95,
+ 96: 96,
+ 97: 97,
+ 98: 98,
+ 99: 99,
+ 100: 100,
+ 101: 101,
+ 102: 102,
+ 103: 103,
+ 104: 104,
+ 105: 105,
+ 106: 106,
+ 107: 107,
+ 108: 108,
+ 109: 109,
+ 110: 110,
+ 111: 111,
+ 112: 112,
+ 113: 113,
+ 114: 114,
+ 115: 115,
+ 116: 116,
+ 117: 117,
+ 118: 118,
+ 119: 119,
+ 120: 120,
+ 121: 121,
+ 122: 122,
+ 123: 123,
+ 124: 124,
+ 125: 125,
+ 126: 126,
+ 161: 65377,
+ 162: 65378,
+ 163: 65379,
+ 164: 65380,
+ 165: 65381,
+ 166: 65382,
+ 167: 65383,
+ 168: 65384,
+ 169: 65385,
+ 170: 65386,
+ 171: 65387,
+ 172: 65388,
+ 173: 65389,
+ 174: 65390,
+ 175: 65391,
+ 176: 65392,
+ 177: 65393,
+ 178: 65394,
+ 179: 65395,
+ 180: 65396,
+ 181: 65397,
+ 182: 65398,
+ 183: 65399,
+ 184: 65400,
+ 185: 65401,
+ 186: 65402,
+ 187: 65403,
+ 188: 65404,
+ 189: 65405,
+ 190: 65406,
+ 191: 65407,
+ 192: 65408,
+ 193: 65409,
+ 194: 65410,
+ 195: 65411,
+ 196: 65412,
+ 197: 65413,
+ 198: 65414,
+ 199: 65415,
+ 200: 65416,
+ 201: 65417,
+ 202: 65418,
+ 203: 65419,
+ 204: 65420,
+ 205: 65421,
+ 206: 65422,
+ 207: 65423,
+ 208: 65424,
+ 209: 65425,
+ 210: 65426,
+ 211: 65427,
+ 212: 65428,
+ 213: 65429,
+ 214: 65430,
+ 215: 65431,
+ 216: 65432,
+ 217: 65433,
+ 218: 65434,
+ 219: 65435,
+ 220: 65436,
+ 221: 65437,
+ 222: 65438,
+ 223: 65439,
+ 33088: 12288,
+ 33089: 12289,
+ 33090: 12290,
+ 33091: 65292,
+ 33092: 65294,
+ 33093: 12539,
+ 33094: 65306,
+ 33095: 65307,
+ 33096: 65311,
+ 33097: 65281,
+ 33098: 12443,
+ 33099: 12444,
+ 33100: 180,
+ 33101: 65344,
+ 33102: 168,
+ 33103: 65342,
+ 33104: 65507,
+ 33105: 65343,
+ 33106: 12541,
+ 33107: 12542,
+ 33108: 12445,
+ 33109: 12446,
+ 33110: 12291,
+ 33111: 20189,
+ 33112: 12293,
+ 33113: 12294,
+ 33114: 12295,
+ 33115: 12540,
+ 33116: 8213,
+ 33117: 8208,
+ 33118: 65295,
+ 33119: 65340,
+ 33120: 65374,
+ 33121: 8741,
+ 33122: 65372,
+ 33123: 8230,
+ 33124: 8229,
+ 33125: 8216,
+ 33126: 8217,
+ 33127: 8220,
+ 33128: 8221,
+ 33129: 65288,
+ 33130: 65289,
+ 33131: 12308,
+ 33132: 12309,
+ 33133: 65339,
+ 33134: 65341,
+ 33135: 65371,
+ 33136: 65373,
+ 33137: 12296,
+ 33138: 12297,
+ 33139: 12298,
+ 33140: 12299,
+ 33141: 12300,
+ 33142: 12301,
+ 33143: 12302,
+ 33144: 12303,
+ 33145: 12304,
+ 33146: 12305,
+ 33147: 65291,
+ 33148: 65293,
+ 33149: 177,
+ 33150: 215,
+ 33152: 247,
+ 33153: 65309,
+ 33154: 8800,
+ 33155: 65308,
+ 33156: 65310,
+ 33157: 8806,
+ 33158: 8807,
+ 33159: 8734,
+ 33160: 8756,
+ 33161: 9794,
+ 33162: 9792,
+ 33163: 176,
+ 33164: 8242,
+ 33165: 8243,
+ 33166: 8451,
+ 33167: 65509,
+ 33168: 65284,
+ 33169: 65504,
+ 33170: 65505,
+ 33171: 65285,
+ 33172: 65283,
+ 33173: 65286,
+ 33174: 65290,
+ 33175: 65312,
+ 33176: 167,
+ 33177: 9734,
+ 33178: 9733,
+ 33179: 9675,
+ 33180: 9679,
+ 33181: 9678,
+ 33182: 9671,
+ 33183: 9670,
+ 33184: 9633,
+ 33185: 9632,
+ 33186: 9651,
+ 33187: 9650,
+ 33188: 9661,
+ 33189: 9660,
+ 33190: 8251,
+ 33191: 12306,
+ 33192: 8594,
+ 33193: 8592,
+ 33194: 8593,
+ 33195: 8595,
+ 33196: 12307,
+ 33208: 8712,
+ 33209: 8715,
+ 33210: 8838,
+ 33211: 8839,
+ 33212: 8834,
+ 33213: 8835,
+ 33214: 8746,
+ 33215: 8745,
+ 33224: 8743,
+ 33225: 8744,
+ 33226: 65506,
+ 33227: 8658,
+ 33228: 8660,
+ 33229: 8704,
+ 33230: 8707,
+ 33242: 8736,
+ 33243: 8869,
+ 33244: 8978,
+ 33245: 8706,
+ 33246: 8711,
+ 33247: 8801,
+ 33248: 8786,
+ 33249: 8810,
+ 33250: 8811,
+ 33251: 8730,
+ 33252: 8765,
+ 33253: 8733,
+ 33254: 8757,
+ 33255: 8747,
+ 33256: 8748,
+ 33264: 8491,
+ 33265: 8240,
+ 33266: 9839,
+ 33267: 9837,
+ 33268: 9834,
+ 33269: 8224,
+ 33270: 8225,
+ 33271: 182,
+ 33276: 9711,
+ 33359: 65296,
+ 33360: 65297,
+ 33361: 65298,
+ 33362: 65299,
+ 33363: 65300,
+ 33364: 65301,
+ 33365: 65302,
+ 33366: 65303,
+ 33367: 65304,
+ 33368: 65305,
+ 33376: 65313,
+ 33377: 65314,
+ 33378: 65315,
+ 33379: 65316,
+ 33380: 65317,
+ 33381: 65318,
+ 33382: 65319,
+ 33383: 65320,
+ 33384: 65321,
+ 33385: 65322,
+ 33386: 65323,
+ 33387: 65324,
+ 33388: 65325,
+ 33389: 65326,
+ 33390: 65327,
+ 33391: 65328,
+ 33392: 65329,
+ 33393: 65330,
+ 33394: 65331,
+ 33395: 65332,
+ 33396: 65333,
+ 33397: 65334,
+ 33398: 65335,
+ 33399: 65336,
+ 33400: 65337,
+ 33401: 65338,
+ 33409: 65345,
+ 33410: 65346,
+ 33411: 65347,
+ 33412: 65348,
+ 33413: 65349,
+ 33414: 65350,
+ 33415: 65351,
+ 33416: 65352,
+ 33417: 65353,
+ 33418: 65354,
+ 33419: 65355,
+ 33420: 65356,
+ 33421: 65357,
+ 33422: 65358,
+ 33423: 65359,
+ 33424: 65360,
+ 33425: 65361,
+ 33426: 65362,
+ 33427: 65363,
+ 33428: 65364,
+ 33429: 65365,
+ 33430: 65366,
+ 33431: 65367,
+ 33432: 65368,
+ 33433: 65369,
+ 33434: 65370,
+ 33439: 12353,
+ 33440: 12354,
+ 33441: 12355,
+ 33442: 12356,
+ 33443: 12357,
+ 33444: 12358,
+ 33445: 12359,
+ 33446: 12360,
+ 33447: 12361,
+ 33448: 12362,
+ 33449: 12363,
+ 33450: 12364,
+ 33451: 12365,
+ 33452: 12366,
+ 33453: 12367,
+ 33454: 12368,
+ 33455: 12369,
+ 33456: 12370,
+ 33457: 12371,
+ 33458: 12372,
+ 33459: 12373,
+ 33460: 12374,
+ 33461: 12375,
+ 33462: 12376,
+ 33463: 12377,
+ 33464: 12378,
+ 33465: 12379,
+ 33466: 12380,
+ 33467: 12381,
+ 33468: 12382,
+ 33469: 12383,
+ 33470: 12384,
+ 33471: 12385,
+ 33472: 12386,
+ 33473: 12387,
+ 33474: 12388,
+ 33475: 12389,
+ 33476: 12390,
+ 33477: 12391,
+ 33478: 12392,
+ 33479: 12393,
+ 33480: 12394,
+ 33481: 12395,
+ 33482: 12396,
+ 33483: 12397,
+ 33484: 12398,
+ 33485: 12399,
+ 33486: 12400,
+ 33487: 12401,
+ 33488: 12402,
+ 33489: 12403,
+ 33490: 12404,
+ 33491: 12405,
+ 33492: 12406,
+ 33493: 12407,
+ 33494: 12408,
+ 33495: 12409,
+ 33496: 12410,
+ 33497: 12411,
+ 33498: 12412,
+ 33499: 12413,
+ 33500: 12414,
+ 33501: 12415,
+ 33502: 12416,
+ 33503: 12417,
+ 33504: 12418,
+ 33505: 12419,
+ 33506: 12420,
+ 33507: 12421,
+ 33508: 12422,
+ 33509: 12423,
+ 33510: 12424,
+ 33511: 12425,
+ 33512: 12426,
+ 33513: 12427,
+ 33514: 12428,
+ 33515: 12429,
+ 33516: 12430,
+ 33517: 12431,
+ 33518: 12432,
+ 33519: 12433,
+ 33520: 12434,
+ 33521: 12435,
+ 33600: 12449,
+ 33601: 12450,
+ 33602: 12451,
+ 33603: 12452,
+ 33604: 12453,
+ 33605: 12454,
+ 33606: 12455,
+ 33607: 12456,
+ 33608: 12457,
+ 33609: 12458,
+ 33610: 12459,
+ 33611: 12460,
+ 33612: 12461,
+ 33613: 12462,
+ 33614: 12463,
+ 33615: 12464,
+ 33616: 12465,
+ 33617: 12466,
+ 33618: 12467,
+ 33619: 12468,
+ 33620: 12469,
+ 33621: 12470,
+ 33622: 12471,
+ 33623: 12472,
+ 33624: 12473,
+ 33625: 12474,
+ 33626: 12475,
+ 33627: 12476,
+ 33628: 12477,
+ 33629: 12478,
+ 33630: 12479,
+ 33631: 12480,
+ 33632: 12481,
+ 33633: 12482,
+ 33634: 12483,
+ 33635: 12484,
+ 33636: 12485,
+ 33637: 12486,
+ 33638: 12487,
+ 33639: 12488,
+ 33640: 12489,
+ 33641: 12490,
+ 33642: 12491,
+ 33643: 12492,
+ 33644: 12493,
+ 33645: 12494,
+ 33646: 12495,
+ 33647: 12496,
+ 33648: 12497,
+ 33649: 12498,
+ 33650: 12499,
+ 33651: 12500,
+ 33652: 12501,
+ 33653: 12502,
+ 33654: 12503,
+ 33655: 12504,
+ 33656: 12505,
+ 33657: 12506,
+ 33658: 12507,
+ 33659: 12508,
+ 33660: 12509,
+ 33661: 12510,
+ 33662: 12511,
+ 33664: 12512,
+ 33665: 12513,
+ 33666: 12514,
+ 33667: 12515,
+ 33668: 12516,
+ 33669: 12517,
+ 33670: 12518,
+ 33671: 12519,
+ 33672: 12520,
+ 33673: 12521,
+ 33674: 12522,
+ 33675: 12523,
+ 33676: 12524,
+ 33677: 12525,
+ 33678: 12526,
+ 33679: 12527,
+ 33680: 12528,
+ 33681: 12529,
+ 33682: 12530,
+ 33683: 12531,
+ 33684: 12532,
+ 33685: 12533,
+ 33686: 12534,
+ 33695: 913,
+ 33696: 914,
+ 33697: 915,
+ 33698: 916,
+ 33699: 917,
+ 33700: 918,
+ 33701: 919,
+ 33702: 920,
+ 33703: 921,
+ 33704: 922,
+ 33705: 923,
+ 33706: 924,
+ 33707: 925,
+ 33708: 926,
+ 33709: 927,
+ 33710: 928,
+ 33711: 929,
+ 33712: 931,
+ 33713: 932,
+ 33714: 933,
+ 33715: 934,
+ 33716: 935,
+ 33717: 936,
+ 33718: 937,
+ 33727: 945,
+ 33728: 946,
+ 33729: 947,
+ 33730: 948,
+ 33731: 949,
+ 33732: 950,
+ 33733: 951,
+ 33734: 952,
+ 33735: 953,
+ 33736: 954,
+ 33737: 955,
+ 33738: 956,
+ 33739: 957,
+ 33740: 958,
+ 33741: 959,
+ 33742: 960,
+ 33743: 961,
+ 33744: 963,
+ 33745: 964,
+ 33746: 965,
+ 33747: 966,
+ 33748: 967,
+ 33749: 968,
+ 33750: 969,
+ 33856: 1040,
+ 33857: 1041,
+ 33858: 1042,
+ 33859: 1043,
+ 33860: 1044,
+ 33861: 1045,
+ 33862: 1025,
+ 33863: 1046,
+ 33864: 1047,
+ 33865: 1048,
+ 33866: 1049,
+ 33867: 1050,
+ 33868: 1051,
+ 33869: 1052,
+ 33870: 1053,
+ 33871: 1054,
+ 33872: 1055,
+ 33873: 1056,
+ 33874: 1057,
+ 33875: 1058,
+ 33876: 1059,
+ 33877: 1060,
+ 33878: 1061,
+ 33879: 1062,
+ 33880: 1063,
+ 33881: 1064,
+ 33882: 1065,
+ 33883: 1066,
+ 33884: 1067,
+ 33885: 1068,
+ 33886: 1069,
+ 33887: 1070,
+ 33888: 1071,
+ 33904: 1072,
+ 33905: 1073,
+ 33906: 1074,
+ 33907: 1075,
+ 33908: 1076,
+ 33909: 1077,
+ 33910: 1105,
+ 33911: 1078,
+ 33912: 1079,
+ 33913: 1080,
+ 33914: 1081,
+ 33915: 1082,
+ 33916: 1083,
+ 33917: 1084,
+ 33918: 1085,
+ 33920: 1086,
+ 33921: 1087,
+ 33922: 1088,
+ 33923: 1089,
+ 33924: 1090,
+ 33925: 1091,
+ 33926: 1092,
+ 33927: 1093,
+ 33928: 1094,
+ 33929: 1095,
+ 33930: 1096,
+ 33931: 1097,
+ 33932: 1098,
+ 33933: 1099,
+ 33934: 1100,
+ 33935: 1101,
+ 33936: 1102,
+ 33937: 1103,
+ 33951: 9472,
+ 33952: 9474,
+ 33953: 9484,
+ 33954: 9488,
+ 33955: 9496,
+ 33956: 9492,
+ 33957: 9500,
+ 33958: 9516,
+ 33959: 9508,
+ 33960: 9524,
+ 33961: 9532,
+ 33962: 9473,
+ 33963: 9475,
+ 33964: 9487,
+ 33965: 9491,
+ 33966: 9499,
+ 33967: 9495,
+ 33968: 9507,
+ 33969: 9523,
+ 33970: 9515,
+ 33971: 9531,
+ 33972: 9547,
+ 33973: 9504,
+ 33974: 9519,
+ 33975: 9512,
+ 33976: 9527,
+ 33977: 9535,
+ 33978: 9501,
+ 33979: 9520,
+ 33980: 9509,
+ 33981: 9528,
+ 33982: 9538,
+ 34624: 9312,
+ 34625: 9313,
+ 34626: 9314,
+ 34627: 9315,
+ 34628: 9316,
+ 34629: 9317,
+ 34630: 9318,
+ 34631: 9319,
+ 34632: 9320,
+ 34633: 9321,
+ 34634: 9322,
+ 34635: 9323,
+ 34636: 9324,
+ 34637: 9325,
+ 34638: 9326,
+ 34639: 9327,
+ 34640: 9328,
+ 34641: 9329,
+ 34642: 9330,
+ 34643: 9331,
+ 34644: 8544,
+ 34645: 8545,
+ 34646: 8546,
+ 34647: 8547,
+ 34648: 8548,
+ 34649: 8549,
+ 34650: 8550,
+ 34651: 8551,
+ 34652: 8552,
+ 34653: 8553,
+ 34655: 13129,
+ 34656: 13076,
+ 34657: 13090,
+ 34658: 13133,
+ 34659: 13080,
+ 34660: 13095,
+ 34661: 13059,
+ 34662: 13110,
+ 34663: 13137,
+ 34664: 13143,
+ 34665: 13069,
+ 34666: 13094,
+ 34667: 13091,
+ 34668: 13099,
+ 34669: 13130,
+ 34670: 13115,
+ 34671: 13212,
+ 34672: 13213,
+ 34673: 13214,
+ 34674: 13198,
+ 34675: 13199,
+ 34676: 13252,
+ 34677: 13217,
+ 34686: 13179,
+ 34688: 12317,
+ 34689: 12319,
+ 34690: 8470,
+ 34691: 13261,
+ 34692: 8481,
+ 34693: 12964,
+ 34694: 12965,
+ 34695: 12966,
+ 34696: 12967,
+ 34697: 12968,
+ 34698: 12849,
+ 34699: 12850,
+ 34700: 12857,
+ 34701: 13182,
+ 34702: 13181,
+ 34703: 13180,
+ 34704: 8786,
+ 34705: 8801,
+ 34706: 8747,
+ 34707: 8750,
+ 34708: 8721,
+ 34709: 8730,
+ 34710: 8869,
+ 34711: 8736,
+ 34712: 8735,
+ 34713: 8895,
+ 34714: 8757,
+ 34715: 8745,
+ 34716: 8746,
+ 34975: 20124,
+ 34976: 21782,
+ 34977: 23043,
+ 34978: 38463,
+ 34979: 21696,
+ 34980: 24859,
+ 34981: 25384,
+ 34982: 23030,
+ 34983: 36898,
+ 34984: 33909,
+ 34985: 33564,
+ 34986: 31312,
+ 34987: 24746,
+ 34988: 25569,
+ 34989: 28197,
+ 34990: 26093,
+ 34991: 33894,
+ 34992: 33446,
+ 34993: 39925,
+ 34994: 26771,
+ 34995: 22311,
+ 34996: 26017,
+ 34997: 25201,
+ 34998: 23451,
+ 34999: 22992,
+ 35e3: 34427,
+ 35001: 39156,
+ 35002: 32098,
+ 35003: 32190,
+ 35004: 39822,
+ 35005: 25110,
+ 35006: 31903,
+ 35007: 34999,
+ 35008: 23433,
+ 35009: 24245,
+ 35010: 25353,
+ 35011: 26263,
+ 35012: 26696,
+ 35013: 38343,
+ 35014: 38797,
+ 35015: 26447,
+ 35016: 20197,
+ 35017: 20234,
+ 35018: 20301,
+ 35019: 20381,
+ 35020: 20553,
+ 35021: 22258,
+ 35022: 22839,
+ 35023: 22996,
+ 35024: 23041,
+ 35025: 23561,
+ 35026: 24799,
+ 35027: 24847,
+ 35028: 24944,
+ 35029: 26131,
+ 35030: 26885,
+ 35031: 28858,
+ 35032: 30031,
+ 35033: 30064,
+ 35034: 31227,
+ 35035: 32173,
+ 35036: 32239,
+ 35037: 32963,
+ 35038: 33806,
+ 35039: 34915,
+ 35040: 35586,
+ 35041: 36949,
+ 35042: 36986,
+ 35043: 21307,
+ 35044: 20117,
+ 35045: 20133,
+ 35046: 22495,
+ 35047: 32946,
+ 35048: 37057,
+ 35049: 30959,
+ 35050: 19968,
+ 35051: 22769,
+ 35052: 28322,
+ 35053: 36920,
+ 35054: 31282,
+ 35055: 33576,
+ 35056: 33419,
+ 35057: 39983,
+ 35058: 20801,
+ 35059: 21360,
+ 35060: 21693,
+ 35061: 21729,
+ 35062: 22240,
+ 35063: 23035,
+ 35064: 24341,
+ 35065: 39154,
+ 35066: 28139,
+ 35067: 32996,
+ 35068: 34093,
+ 35136: 38498,
+ 35137: 38512,
+ 35138: 38560,
+ 35139: 38907,
+ 35140: 21515,
+ 35141: 21491,
+ 35142: 23431,
+ 35143: 28879,
+ 35144: 32701,
+ 35145: 36802,
+ 35146: 38632,
+ 35147: 21359,
+ 35148: 40284,
+ 35149: 31418,
+ 35150: 19985,
+ 35151: 30867,
+ 35152: 33276,
+ 35153: 28198,
+ 35154: 22040,
+ 35155: 21764,
+ 35156: 27421,
+ 35157: 34074,
+ 35158: 39995,
+ 35159: 23013,
+ 35160: 21417,
+ 35161: 28006,
+ 35162: 29916,
+ 35163: 38287,
+ 35164: 22082,
+ 35165: 20113,
+ 35166: 36939,
+ 35167: 38642,
+ 35168: 33615,
+ 35169: 39180,
+ 35170: 21473,
+ 35171: 21942,
+ 35172: 23344,
+ 35173: 24433,
+ 35174: 26144,
+ 35175: 26355,
+ 35176: 26628,
+ 35177: 27704,
+ 35178: 27891,
+ 35179: 27945,
+ 35180: 29787,
+ 35181: 30408,
+ 35182: 31310,
+ 35183: 38964,
+ 35184: 33521,
+ 35185: 34907,
+ 35186: 35424,
+ 35187: 37613,
+ 35188: 28082,
+ 35189: 30123,
+ 35190: 30410,
+ 35191: 39365,
+ 35192: 24742,
+ 35193: 35585,
+ 35194: 36234,
+ 35195: 38322,
+ 35196: 27022,
+ 35197: 21421,
+ 35198: 20870,
+ 35200: 22290,
+ 35201: 22576,
+ 35202: 22852,
+ 35203: 23476,
+ 35204: 24310,
+ 35205: 24616,
+ 35206: 25513,
+ 35207: 25588,
+ 35208: 27839,
+ 35209: 28436,
+ 35210: 28814,
+ 35211: 28948,
+ 35212: 29017,
+ 35213: 29141,
+ 35214: 29503,
+ 35215: 32257,
+ 35216: 33398,
+ 35217: 33489,
+ 35218: 34199,
+ 35219: 36960,
+ 35220: 37467,
+ 35221: 40219,
+ 35222: 22633,
+ 35223: 26044,
+ 35224: 27738,
+ 35225: 29989,
+ 35226: 20985,
+ 35227: 22830,
+ 35228: 22885,
+ 35229: 24448,
+ 35230: 24540,
+ 35231: 25276,
+ 35232: 26106,
+ 35233: 27178,
+ 35234: 27431,
+ 35235: 27572,
+ 35236: 29579,
+ 35237: 32705,
+ 35238: 35158,
+ 35239: 40236,
+ 35240: 40206,
+ 35241: 40644,
+ 35242: 23713,
+ 35243: 27798,
+ 35244: 33659,
+ 35245: 20740,
+ 35246: 23627,
+ 35247: 25014,
+ 35248: 33222,
+ 35249: 26742,
+ 35250: 29281,
+ 35251: 20057,
+ 35252: 20474,
+ 35253: 21368,
+ 35254: 24681,
+ 35255: 28201,
+ 35256: 31311,
+ 35257: 38899,
+ 35258: 19979,
+ 35259: 21270,
+ 35260: 20206,
+ 35261: 20309,
+ 35262: 20285,
+ 35263: 20385,
+ 35264: 20339,
+ 35265: 21152,
+ 35266: 21487,
+ 35267: 22025,
+ 35268: 22799,
+ 35269: 23233,
+ 35270: 23478,
+ 35271: 23521,
+ 35272: 31185,
+ 35273: 26247,
+ 35274: 26524,
+ 35275: 26550,
+ 35276: 27468,
+ 35277: 27827,
+ 35278: 28779,
+ 35279: 29634,
+ 35280: 31117,
+ 35281: 31166,
+ 35282: 31292,
+ 35283: 31623,
+ 35284: 33457,
+ 35285: 33499,
+ 35286: 33540,
+ 35287: 33655,
+ 35288: 33775,
+ 35289: 33747,
+ 35290: 34662,
+ 35291: 35506,
+ 35292: 22057,
+ 35293: 36008,
+ 35294: 36838,
+ 35295: 36942,
+ 35296: 38686,
+ 35297: 34442,
+ 35298: 20420,
+ 35299: 23784,
+ 35300: 25105,
+ 35301: 29273,
+ 35302: 30011,
+ 35303: 33253,
+ 35304: 33469,
+ 35305: 34558,
+ 35306: 36032,
+ 35307: 38597,
+ 35308: 39187,
+ 35309: 39381,
+ 35310: 20171,
+ 35311: 20250,
+ 35312: 35299,
+ 35313: 22238,
+ 35314: 22602,
+ 35315: 22730,
+ 35316: 24315,
+ 35317: 24555,
+ 35318: 24618,
+ 35319: 24724,
+ 35320: 24674,
+ 35321: 25040,
+ 35322: 25106,
+ 35323: 25296,
+ 35324: 25913,
+ 35392: 39745,
+ 35393: 26214,
+ 35394: 26800,
+ 35395: 28023,
+ 35396: 28784,
+ 35397: 30028,
+ 35398: 30342,
+ 35399: 32117,
+ 35400: 33445,
+ 35401: 34809,
+ 35402: 38283,
+ 35403: 38542,
+ 35404: 35997,
+ 35405: 20977,
+ 35406: 21182,
+ 35407: 22806,
+ 35408: 21683,
+ 35409: 23475,
+ 35410: 23830,
+ 35411: 24936,
+ 35412: 27010,
+ 35413: 28079,
+ 35414: 30861,
+ 35415: 33995,
+ 35416: 34903,
+ 35417: 35442,
+ 35418: 37799,
+ 35419: 39608,
+ 35420: 28012,
+ 35421: 39336,
+ 35422: 34521,
+ 35423: 22435,
+ 35424: 26623,
+ 35425: 34510,
+ 35426: 37390,
+ 35427: 21123,
+ 35428: 22151,
+ 35429: 21508,
+ 35430: 24275,
+ 35431: 25313,
+ 35432: 25785,
+ 35433: 26684,
+ 35434: 26680,
+ 35435: 27579,
+ 35436: 29554,
+ 35437: 30906,
+ 35438: 31339,
+ 35439: 35226,
+ 35440: 35282,
+ 35441: 36203,
+ 35442: 36611,
+ 35443: 37101,
+ 35444: 38307,
+ 35445: 38548,
+ 35446: 38761,
+ 35447: 23398,
+ 35448: 23731,
+ 35449: 27005,
+ 35450: 38989,
+ 35451: 38990,
+ 35452: 25499,
+ 35453: 31520,
+ 35454: 27179,
+ 35456: 27263,
+ 35457: 26806,
+ 35458: 39949,
+ 35459: 28511,
+ 35460: 21106,
+ 35461: 21917,
+ 35462: 24688,
+ 35463: 25324,
+ 35464: 27963,
+ 35465: 28167,
+ 35466: 28369,
+ 35467: 33883,
+ 35468: 35088,
+ 35469: 36676,
+ 35470: 19988,
+ 35471: 39993,
+ 35472: 21494,
+ 35473: 26907,
+ 35474: 27194,
+ 35475: 38788,
+ 35476: 26666,
+ 35477: 20828,
+ 35478: 31427,
+ 35479: 33970,
+ 35480: 37340,
+ 35481: 37772,
+ 35482: 22107,
+ 35483: 40232,
+ 35484: 26658,
+ 35485: 33541,
+ 35486: 33841,
+ 35487: 31909,
+ 35488: 21e3,
+ 35489: 33477,
+ 35490: 29926,
+ 35491: 20094,
+ 35492: 20355,
+ 35493: 20896,
+ 35494: 23506,
+ 35495: 21002,
+ 35496: 21208,
+ 35497: 21223,
+ 35498: 24059,
+ 35499: 21914,
+ 35500: 22570,
+ 35501: 23014,
+ 35502: 23436,
+ 35503: 23448,
+ 35504: 23515,
+ 35505: 24178,
+ 35506: 24185,
+ 35507: 24739,
+ 35508: 24863,
+ 35509: 24931,
+ 35510: 25022,
+ 35511: 25563,
+ 35512: 25954,
+ 35513: 26577,
+ 35514: 26707,
+ 35515: 26874,
+ 35516: 27454,
+ 35517: 27475,
+ 35518: 27735,
+ 35519: 28450,
+ 35520: 28567,
+ 35521: 28485,
+ 35522: 29872,
+ 35523: 29976,
+ 35524: 30435,
+ 35525: 30475,
+ 35526: 31487,
+ 35527: 31649,
+ 35528: 31777,
+ 35529: 32233,
+ 35530: 32566,
+ 35531: 32752,
+ 35532: 32925,
+ 35533: 33382,
+ 35534: 33694,
+ 35535: 35251,
+ 35536: 35532,
+ 35537: 36011,
+ 35538: 36996,
+ 35539: 37969,
+ 35540: 38291,
+ 35541: 38289,
+ 35542: 38306,
+ 35543: 38501,
+ 35544: 38867,
+ 35545: 39208,
+ 35546: 33304,
+ 35547: 20024,
+ 35548: 21547,
+ 35549: 23736,
+ 35550: 24012,
+ 35551: 29609,
+ 35552: 30284,
+ 35553: 30524,
+ 35554: 23721,
+ 35555: 32747,
+ 35556: 36107,
+ 35557: 38593,
+ 35558: 38929,
+ 35559: 38996,
+ 35560: 39e3,
+ 35561: 20225,
+ 35562: 20238,
+ 35563: 21361,
+ 35564: 21916,
+ 35565: 22120,
+ 35566: 22522,
+ 35567: 22855,
+ 35568: 23305,
+ 35569: 23492,
+ 35570: 23696,
+ 35571: 24076,
+ 35572: 24190,
+ 35573: 24524,
+ 35574: 25582,
+ 35575: 26426,
+ 35576: 26071,
+ 35577: 26082,
+ 35578: 26399,
+ 35579: 26827,
+ 35580: 26820,
+ 35648: 27231,
+ 35649: 24112,
+ 35650: 27589,
+ 35651: 27671,
+ 35652: 27773,
+ 35653: 30079,
+ 35654: 31048,
+ 35655: 23395,
+ 35656: 31232,
+ 35657: 32e3,
+ 35658: 24509,
+ 35659: 35215,
+ 35660: 35352,
+ 35661: 36020,
+ 35662: 36215,
+ 35663: 36556,
+ 35664: 36637,
+ 35665: 39138,
+ 35666: 39438,
+ 35667: 39740,
+ 35668: 20096,
+ 35669: 20605,
+ 35670: 20736,
+ 35671: 22931,
+ 35672: 23452,
+ 35673: 25135,
+ 35674: 25216,
+ 35675: 25836,
+ 35676: 27450,
+ 35677: 29344,
+ 35678: 30097,
+ 35679: 31047,
+ 35680: 32681,
+ 35681: 34811,
+ 35682: 35516,
+ 35683: 35696,
+ 35684: 25516,
+ 35685: 33738,
+ 35686: 38816,
+ 35687: 21513,
+ 35688: 21507,
+ 35689: 21931,
+ 35690: 26708,
+ 35691: 27224,
+ 35692: 35440,
+ 35693: 30759,
+ 35694: 26485,
+ 35695: 40653,
+ 35696: 21364,
+ 35697: 23458,
+ 35698: 33050,
+ 35699: 34384,
+ 35700: 36870,
+ 35701: 19992,
+ 35702: 20037,
+ 35703: 20167,
+ 35704: 20241,
+ 35705: 21450,
+ 35706: 21560,
+ 35707: 23470,
+ 35708: 24339,
+ 35709: 24613,
+ 35710: 25937,
+ 35712: 26429,
+ 35713: 27714,
+ 35714: 27762,
+ 35715: 27875,
+ 35716: 28792,
+ 35717: 29699,
+ 35718: 31350,
+ 35719: 31406,
+ 35720: 31496,
+ 35721: 32026,
+ 35722: 31998,
+ 35723: 32102,
+ 35724: 26087,
+ 35725: 29275,
+ 35726: 21435,
+ 35727: 23621,
+ 35728: 24040,
+ 35729: 25298,
+ 35730: 25312,
+ 35731: 25369,
+ 35732: 28192,
+ 35733: 34394,
+ 35734: 35377,
+ 35735: 36317,
+ 35736: 37624,
+ 35737: 28417,
+ 35738: 31142,
+ 35739: 39770,
+ 35740: 20136,
+ 35741: 20139,
+ 35742: 20140,
+ 35743: 20379,
+ 35744: 20384,
+ 35745: 20689,
+ 35746: 20807,
+ 35747: 31478,
+ 35748: 20849,
+ 35749: 20982,
+ 35750: 21332,
+ 35751: 21281,
+ 35752: 21375,
+ 35753: 21483,
+ 35754: 21932,
+ 35755: 22659,
+ 35756: 23777,
+ 35757: 24375,
+ 35758: 24394,
+ 35759: 24623,
+ 35760: 24656,
+ 35761: 24685,
+ 35762: 25375,
+ 35763: 25945,
+ 35764: 27211,
+ 35765: 27841,
+ 35766: 29378,
+ 35767: 29421,
+ 35768: 30703,
+ 35769: 33016,
+ 35770: 33029,
+ 35771: 33288,
+ 35772: 34126,
+ 35773: 37111,
+ 35774: 37857,
+ 35775: 38911,
+ 35776: 39255,
+ 35777: 39514,
+ 35778: 20208,
+ 35779: 20957,
+ 35780: 23597,
+ 35781: 26241,
+ 35782: 26989,
+ 35783: 23616,
+ 35784: 26354,
+ 35785: 26997,
+ 35786: 29577,
+ 35787: 26704,
+ 35788: 31873,
+ 35789: 20677,
+ 35790: 21220,
+ 35791: 22343,
+ 35792: 24062,
+ 35793: 37670,
+ 35794: 26020,
+ 35795: 27427,
+ 35796: 27453,
+ 35797: 29748,
+ 35798: 31105,
+ 35799: 31165,
+ 35800: 31563,
+ 35801: 32202,
+ 35802: 33465,
+ 35803: 33740,
+ 35804: 34943,
+ 35805: 35167,
+ 35806: 35641,
+ 35807: 36817,
+ 35808: 37329,
+ 35809: 21535,
+ 35810: 37504,
+ 35811: 20061,
+ 35812: 20534,
+ 35813: 21477,
+ 35814: 21306,
+ 35815: 29399,
+ 35816: 29590,
+ 35817: 30697,
+ 35818: 33510,
+ 35819: 36527,
+ 35820: 39366,
+ 35821: 39368,
+ 35822: 39378,
+ 35823: 20855,
+ 35824: 24858,
+ 35825: 34398,
+ 35826: 21936,
+ 35827: 31354,
+ 35828: 20598,
+ 35829: 23507,
+ 35830: 36935,
+ 35831: 38533,
+ 35832: 20018,
+ 35833: 27355,
+ 35834: 37351,
+ 35835: 23633,
+ 35836: 23624,
+ 35904: 25496,
+ 35905: 31391,
+ 35906: 27795,
+ 35907: 38772,
+ 35908: 36705,
+ 35909: 31402,
+ 35910: 29066,
+ 35911: 38536,
+ 35912: 31874,
+ 35913: 26647,
+ 35914: 32368,
+ 35915: 26705,
+ 35916: 37740,
+ 35917: 21234,
+ 35918: 21531,
+ 35919: 34219,
+ 35920: 35347,
+ 35921: 32676,
+ 35922: 36557,
+ 35923: 37089,
+ 35924: 21350,
+ 35925: 34952,
+ 35926: 31041,
+ 35927: 20418,
+ 35928: 20670,
+ 35929: 21009,
+ 35930: 20804,
+ 35931: 21843,
+ 35932: 22317,
+ 35933: 29674,
+ 35934: 22411,
+ 35935: 22865,
+ 35936: 24418,
+ 35937: 24452,
+ 35938: 24693,
+ 35939: 24950,
+ 35940: 24935,
+ 35941: 25001,
+ 35942: 25522,
+ 35943: 25658,
+ 35944: 25964,
+ 35945: 26223,
+ 35946: 26690,
+ 35947: 28179,
+ 35948: 30054,
+ 35949: 31293,
+ 35950: 31995,
+ 35951: 32076,
+ 35952: 32153,
+ 35953: 32331,
+ 35954: 32619,
+ 35955: 33550,
+ 35956: 33610,
+ 35957: 34509,
+ 35958: 35336,
+ 35959: 35427,
+ 35960: 35686,
+ 35961: 36605,
+ 35962: 38938,
+ 35963: 40335,
+ 35964: 33464,
+ 35965: 36814,
+ 35966: 39912,
+ 35968: 21127,
+ 35969: 25119,
+ 35970: 25731,
+ 35971: 28608,
+ 35972: 38553,
+ 35973: 26689,
+ 35974: 20625,
+ 35975: 27424,
+ 35976: 27770,
+ 35977: 28500,
+ 35978: 31348,
+ 35979: 32080,
+ 35980: 34880,
+ 35981: 35363,
+ 35982: 26376,
+ 35983: 20214,
+ 35984: 20537,
+ 35985: 20518,
+ 35986: 20581,
+ 35987: 20860,
+ 35988: 21048,
+ 35989: 21091,
+ 35990: 21927,
+ 35991: 22287,
+ 35992: 22533,
+ 35993: 23244,
+ 35994: 24314,
+ 35995: 25010,
+ 35996: 25080,
+ 35997: 25331,
+ 35998: 25458,
+ 35999: 26908,
+ 36e3: 27177,
+ 36001: 29309,
+ 36002: 29356,
+ 36003: 29486,
+ 36004: 30740,
+ 36005: 30831,
+ 36006: 32121,
+ 36007: 30476,
+ 36008: 32937,
+ 36009: 35211,
+ 36010: 35609,
+ 36011: 36066,
+ 36012: 36562,
+ 36013: 36963,
+ 36014: 37749,
+ 36015: 38522,
+ 36016: 38997,
+ 36017: 39443,
+ 36018: 40568,
+ 36019: 20803,
+ 36020: 21407,
+ 36021: 21427,
+ 36022: 24187,
+ 36023: 24358,
+ 36024: 28187,
+ 36025: 28304,
+ 36026: 29572,
+ 36027: 29694,
+ 36028: 32067,
+ 36029: 33335,
+ 36030: 35328,
+ 36031: 35578,
+ 36032: 38480,
+ 36033: 20046,
+ 36034: 20491,
+ 36035: 21476,
+ 36036: 21628,
+ 36037: 22266,
+ 36038: 22993,
+ 36039: 23396,
+ 36040: 24049,
+ 36041: 24235,
+ 36042: 24359,
+ 36043: 25144,
+ 36044: 25925,
+ 36045: 26543,
+ 36046: 28246,
+ 36047: 29392,
+ 36048: 31946,
+ 36049: 34996,
+ 36050: 32929,
+ 36051: 32993,
+ 36052: 33776,
+ 36053: 34382,
+ 36054: 35463,
+ 36055: 36328,
+ 36056: 37431,
+ 36057: 38599,
+ 36058: 39015,
+ 36059: 40723,
+ 36060: 20116,
+ 36061: 20114,
+ 36062: 20237,
+ 36063: 21320,
+ 36064: 21577,
+ 36065: 21566,
+ 36066: 23087,
+ 36067: 24460,
+ 36068: 24481,
+ 36069: 24735,
+ 36070: 26791,
+ 36071: 27278,
+ 36072: 29786,
+ 36073: 30849,
+ 36074: 35486,
+ 36075: 35492,
+ 36076: 35703,
+ 36077: 37264,
+ 36078: 20062,
+ 36079: 39881,
+ 36080: 20132,
+ 36081: 20348,
+ 36082: 20399,
+ 36083: 20505,
+ 36084: 20502,
+ 36085: 20809,
+ 36086: 20844,
+ 36087: 21151,
+ 36088: 21177,
+ 36089: 21246,
+ 36090: 21402,
+ 36091: 21475,
+ 36092: 21521,
+ 36160: 21518,
+ 36161: 21897,
+ 36162: 22353,
+ 36163: 22434,
+ 36164: 22909,
+ 36165: 23380,
+ 36166: 23389,
+ 36167: 23439,
+ 36168: 24037,
+ 36169: 24039,
+ 36170: 24055,
+ 36171: 24184,
+ 36172: 24195,
+ 36173: 24218,
+ 36174: 24247,
+ 36175: 24344,
+ 36176: 24658,
+ 36177: 24908,
+ 36178: 25239,
+ 36179: 25304,
+ 36180: 25511,
+ 36181: 25915,
+ 36182: 26114,
+ 36183: 26179,
+ 36184: 26356,
+ 36185: 26477,
+ 36186: 26657,
+ 36187: 26775,
+ 36188: 27083,
+ 36189: 27743,
+ 36190: 27946,
+ 36191: 28009,
+ 36192: 28207,
+ 36193: 28317,
+ 36194: 30002,
+ 36195: 30343,
+ 36196: 30828,
+ 36197: 31295,
+ 36198: 31968,
+ 36199: 32005,
+ 36200: 32024,
+ 36201: 32094,
+ 36202: 32177,
+ 36203: 32789,
+ 36204: 32771,
+ 36205: 32943,
+ 36206: 32945,
+ 36207: 33108,
+ 36208: 33167,
+ 36209: 33322,
+ 36210: 33618,
+ 36211: 34892,
+ 36212: 34913,
+ 36213: 35611,
+ 36214: 36002,
+ 36215: 36092,
+ 36216: 37066,
+ 36217: 37237,
+ 36218: 37489,
+ 36219: 30783,
+ 36220: 37628,
+ 36221: 38308,
+ 36222: 38477,
+ 36224: 38917,
+ 36225: 39321,
+ 36226: 39640,
+ 36227: 40251,
+ 36228: 21083,
+ 36229: 21163,
+ 36230: 21495,
+ 36231: 21512,
+ 36232: 22741,
+ 36233: 25335,
+ 36234: 28640,
+ 36235: 35946,
+ 36236: 36703,
+ 36237: 40633,
+ 36238: 20811,
+ 36239: 21051,
+ 36240: 21578,
+ 36241: 22269,
+ 36242: 31296,
+ 36243: 37239,
+ 36244: 40288,
+ 36245: 40658,
+ 36246: 29508,
+ 36247: 28425,
+ 36248: 33136,
+ 36249: 29969,
+ 36250: 24573,
+ 36251: 24794,
+ 36252: 39592,
+ 36253: 29403,
+ 36254: 36796,
+ 36255: 27492,
+ 36256: 38915,
+ 36257: 20170,
+ 36258: 22256,
+ 36259: 22372,
+ 36260: 22718,
+ 36261: 23130,
+ 36262: 24680,
+ 36263: 25031,
+ 36264: 26127,
+ 36265: 26118,
+ 36266: 26681,
+ 36267: 26801,
+ 36268: 28151,
+ 36269: 30165,
+ 36270: 32058,
+ 36271: 33390,
+ 36272: 39746,
+ 36273: 20123,
+ 36274: 20304,
+ 36275: 21449,
+ 36276: 21766,
+ 36277: 23919,
+ 36278: 24038,
+ 36279: 24046,
+ 36280: 26619,
+ 36281: 27801,
+ 36282: 29811,
+ 36283: 30722,
+ 36284: 35408,
+ 36285: 37782,
+ 36286: 35039,
+ 36287: 22352,
+ 36288: 24231,
+ 36289: 25387,
+ 36290: 20661,
+ 36291: 20652,
+ 36292: 20877,
+ 36293: 26368,
+ 36294: 21705,
+ 36295: 22622,
+ 36296: 22971,
+ 36297: 23472,
+ 36298: 24425,
+ 36299: 25165,
+ 36300: 25505,
+ 36301: 26685,
+ 36302: 27507,
+ 36303: 28168,
+ 36304: 28797,
+ 36305: 37319,
+ 36306: 29312,
+ 36307: 30741,
+ 36308: 30758,
+ 36309: 31085,
+ 36310: 25998,
+ 36311: 32048,
+ 36312: 33756,
+ 36313: 35009,
+ 36314: 36617,
+ 36315: 38555,
+ 36316: 21092,
+ 36317: 22312,
+ 36318: 26448,
+ 36319: 32618,
+ 36320: 36001,
+ 36321: 20916,
+ 36322: 22338,
+ 36323: 38442,
+ 36324: 22586,
+ 36325: 27018,
+ 36326: 32948,
+ 36327: 21682,
+ 36328: 23822,
+ 36329: 22524,
+ 36330: 30869,
+ 36331: 40442,
+ 36332: 20316,
+ 36333: 21066,
+ 36334: 21643,
+ 36335: 25662,
+ 36336: 26152,
+ 36337: 26388,
+ 36338: 26613,
+ 36339: 31364,
+ 36340: 31574,
+ 36341: 32034,
+ 36342: 37679,
+ 36343: 26716,
+ 36344: 39853,
+ 36345: 31545,
+ 36346: 21273,
+ 36347: 20874,
+ 36348: 21047,
+ 36416: 23519,
+ 36417: 25334,
+ 36418: 25774,
+ 36419: 25830,
+ 36420: 26413,
+ 36421: 27578,
+ 36422: 34217,
+ 36423: 38609,
+ 36424: 30352,
+ 36425: 39894,
+ 36426: 25420,
+ 36427: 37638,
+ 36428: 39851,
+ 36429: 30399,
+ 36430: 26194,
+ 36431: 19977,
+ 36432: 20632,
+ 36433: 21442,
+ 36434: 23665,
+ 36435: 24808,
+ 36436: 25746,
+ 36437: 25955,
+ 36438: 26719,
+ 36439: 29158,
+ 36440: 29642,
+ 36441: 29987,
+ 36442: 31639,
+ 36443: 32386,
+ 36444: 34453,
+ 36445: 35715,
+ 36446: 36059,
+ 36447: 37240,
+ 36448: 39184,
+ 36449: 26028,
+ 36450: 26283,
+ 36451: 27531,
+ 36452: 20181,
+ 36453: 20180,
+ 36454: 20282,
+ 36455: 20351,
+ 36456: 21050,
+ 36457: 21496,
+ 36458: 21490,
+ 36459: 21987,
+ 36460: 22235,
+ 36461: 22763,
+ 36462: 22987,
+ 36463: 22985,
+ 36464: 23039,
+ 36465: 23376,
+ 36466: 23629,
+ 36467: 24066,
+ 36468: 24107,
+ 36469: 24535,
+ 36470: 24605,
+ 36471: 25351,
+ 36472: 25903,
+ 36473: 23388,
+ 36474: 26031,
+ 36475: 26045,
+ 36476: 26088,
+ 36477: 26525,
+ 36478: 27490,
+ 36480: 27515,
+ 36481: 27663,
+ 36482: 29509,
+ 36483: 31049,
+ 36484: 31169,
+ 36485: 31992,
+ 36486: 32025,
+ 36487: 32043,
+ 36488: 32930,
+ 36489: 33026,
+ 36490: 33267,
+ 36491: 35222,
+ 36492: 35422,
+ 36493: 35433,
+ 36494: 35430,
+ 36495: 35468,
+ 36496: 35566,
+ 36497: 36039,
+ 36498: 36060,
+ 36499: 38604,
+ 36500: 39164,
+ 36501: 27503,
+ 36502: 20107,
+ 36503: 20284,
+ 36504: 20365,
+ 36505: 20816,
+ 36506: 23383,
+ 36507: 23546,
+ 36508: 24904,
+ 36509: 25345,
+ 36510: 26178,
+ 36511: 27425,
+ 36512: 28363,
+ 36513: 27835,
+ 36514: 29246,
+ 36515: 29885,
+ 36516: 30164,
+ 36517: 30913,
+ 36518: 31034,
+ 36519: 32780,
+ 36520: 32819,
+ 36521: 33258,
+ 36522: 33940,
+ 36523: 36766,
+ 36524: 27728,
+ 36525: 40575,
+ 36526: 24335,
+ 36527: 35672,
+ 36528: 40235,
+ 36529: 31482,
+ 36530: 36600,
+ 36531: 23437,
+ 36532: 38635,
+ 36533: 19971,
+ 36534: 21489,
+ 36535: 22519,
+ 36536: 22833,
+ 36537: 23241,
+ 36538: 23460,
+ 36539: 24713,
+ 36540: 28287,
+ 36541: 28422,
+ 36542: 30142,
+ 36543: 36074,
+ 36544: 23455,
+ 36545: 34048,
+ 36546: 31712,
+ 36547: 20594,
+ 36548: 26612,
+ 36549: 33437,
+ 36550: 23649,
+ 36551: 34122,
+ 36552: 32286,
+ 36553: 33294,
+ 36554: 20889,
+ 36555: 23556,
+ 36556: 25448,
+ 36557: 36198,
+ 36558: 26012,
+ 36559: 29038,
+ 36560: 31038,
+ 36561: 32023,
+ 36562: 32773,
+ 36563: 35613,
+ 36564: 36554,
+ 36565: 36974,
+ 36566: 34503,
+ 36567: 37034,
+ 36568: 20511,
+ 36569: 21242,
+ 36570: 23610,
+ 36571: 26451,
+ 36572: 28796,
+ 36573: 29237,
+ 36574: 37196,
+ 36575: 37320,
+ 36576: 37675,
+ 36577: 33509,
+ 36578: 23490,
+ 36579: 24369,
+ 36580: 24825,
+ 36581: 20027,
+ 36582: 21462,
+ 36583: 23432,
+ 36584: 25163,
+ 36585: 26417,
+ 36586: 27530,
+ 36587: 29417,
+ 36588: 29664,
+ 36589: 31278,
+ 36590: 33131,
+ 36591: 36259,
+ 36592: 37202,
+ 36593: 39318,
+ 36594: 20754,
+ 36595: 21463,
+ 36596: 21610,
+ 36597: 23551,
+ 36598: 25480,
+ 36599: 27193,
+ 36600: 32172,
+ 36601: 38656,
+ 36602: 22234,
+ 36603: 21454,
+ 36604: 21608,
+ 36672: 23447,
+ 36673: 23601,
+ 36674: 24030,
+ 36675: 20462,
+ 36676: 24833,
+ 36677: 25342,
+ 36678: 27954,
+ 36679: 31168,
+ 36680: 31179,
+ 36681: 32066,
+ 36682: 32333,
+ 36683: 32722,
+ 36684: 33261,
+ 36685: 33311,
+ 36686: 33936,
+ 36687: 34886,
+ 36688: 35186,
+ 36689: 35728,
+ 36690: 36468,
+ 36691: 36655,
+ 36692: 36913,
+ 36693: 37195,
+ 36694: 37228,
+ 36695: 38598,
+ 36696: 37276,
+ 36697: 20160,
+ 36698: 20303,
+ 36699: 20805,
+ 36700: 21313,
+ 36701: 24467,
+ 36702: 25102,
+ 36703: 26580,
+ 36704: 27713,
+ 36705: 28171,
+ 36706: 29539,
+ 36707: 32294,
+ 36708: 37325,
+ 36709: 37507,
+ 36710: 21460,
+ 36711: 22809,
+ 36712: 23487,
+ 36713: 28113,
+ 36714: 31069,
+ 36715: 32302,
+ 36716: 31899,
+ 36717: 22654,
+ 36718: 29087,
+ 36719: 20986,
+ 36720: 34899,
+ 36721: 36848,
+ 36722: 20426,
+ 36723: 23803,
+ 36724: 26149,
+ 36725: 30636,
+ 36726: 31459,
+ 36727: 33308,
+ 36728: 39423,
+ 36729: 20934,
+ 36730: 24490,
+ 36731: 26092,
+ 36732: 26991,
+ 36733: 27529,
+ 36734: 28147,
+ 36736: 28310,
+ 36737: 28516,
+ 36738: 30462,
+ 36739: 32020,
+ 36740: 24033,
+ 36741: 36981,
+ 36742: 37255,
+ 36743: 38918,
+ 36744: 20966,
+ 36745: 21021,
+ 36746: 25152,
+ 36747: 26257,
+ 36748: 26329,
+ 36749: 28186,
+ 36750: 24246,
+ 36751: 32210,
+ 36752: 32626,
+ 36753: 26360,
+ 36754: 34223,
+ 36755: 34295,
+ 36756: 35576,
+ 36757: 21161,
+ 36758: 21465,
+ 36759: 22899,
+ 36760: 24207,
+ 36761: 24464,
+ 36762: 24661,
+ 36763: 37604,
+ 36764: 38500,
+ 36765: 20663,
+ 36766: 20767,
+ 36767: 21213,
+ 36768: 21280,
+ 36769: 21319,
+ 36770: 21484,
+ 36771: 21736,
+ 36772: 21830,
+ 36773: 21809,
+ 36774: 22039,
+ 36775: 22888,
+ 36776: 22974,
+ 36777: 23100,
+ 36778: 23477,
+ 36779: 23558,
+ 36780: 23567,
+ 36781: 23569,
+ 36782: 23578,
+ 36783: 24196,
+ 36784: 24202,
+ 36785: 24288,
+ 36786: 24432,
+ 36787: 25215,
+ 36788: 25220,
+ 36789: 25307,
+ 36790: 25484,
+ 36791: 25463,
+ 36792: 26119,
+ 36793: 26124,
+ 36794: 26157,
+ 36795: 26230,
+ 36796: 26494,
+ 36797: 26786,
+ 36798: 27167,
+ 36799: 27189,
+ 36800: 27836,
+ 36801: 28040,
+ 36802: 28169,
+ 36803: 28248,
+ 36804: 28988,
+ 36805: 28966,
+ 36806: 29031,
+ 36807: 30151,
+ 36808: 30465,
+ 36809: 30813,
+ 36810: 30977,
+ 36811: 31077,
+ 36812: 31216,
+ 36813: 31456,
+ 36814: 31505,
+ 36815: 31911,
+ 36816: 32057,
+ 36817: 32918,
+ 36818: 33750,
+ 36819: 33931,
+ 36820: 34121,
+ 36821: 34909,
+ 36822: 35059,
+ 36823: 35359,
+ 36824: 35388,
+ 36825: 35412,
+ 36826: 35443,
+ 36827: 35937,
+ 36828: 36062,
+ 36829: 37284,
+ 36830: 37478,
+ 36831: 37758,
+ 36832: 37912,
+ 36833: 38556,
+ 36834: 38808,
+ 36835: 19978,
+ 36836: 19976,
+ 36837: 19998,
+ 36838: 20055,
+ 36839: 20887,
+ 36840: 21104,
+ 36841: 22478,
+ 36842: 22580,
+ 36843: 22732,
+ 36844: 23330,
+ 36845: 24120,
+ 36846: 24773,
+ 36847: 25854,
+ 36848: 26465,
+ 36849: 26454,
+ 36850: 27972,
+ 36851: 29366,
+ 36852: 30067,
+ 36853: 31331,
+ 36854: 33976,
+ 36855: 35698,
+ 36856: 37304,
+ 36857: 37664,
+ 36858: 22065,
+ 36859: 22516,
+ 36860: 39166,
+ 36928: 25325,
+ 36929: 26893,
+ 36930: 27542,
+ 36931: 29165,
+ 36932: 32340,
+ 36933: 32887,
+ 36934: 33394,
+ 36935: 35302,
+ 36936: 39135,
+ 36937: 34645,
+ 36938: 36785,
+ 36939: 23611,
+ 36940: 20280,
+ 36941: 20449,
+ 36942: 20405,
+ 36943: 21767,
+ 36944: 23072,
+ 36945: 23517,
+ 36946: 23529,
+ 36947: 24515,
+ 36948: 24910,
+ 36949: 25391,
+ 36950: 26032,
+ 36951: 26187,
+ 36952: 26862,
+ 36953: 27035,
+ 36954: 28024,
+ 36955: 28145,
+ 36956: 30003,
+ 36957: 30137,
+ 36958: 30495,
+ 36959: 31070,
+ 36960: 31206,
+ 36961: 32051,
+ 36962: 33251,
+ 36963: 33455,
+ 36964: 34218,
+ 36965: 35242,
+ 36966: 35386,
+ 36967: 36523,
+ 36968: 36763,
+ 36969: 36914,
+ 36970: 37341,
+ 36971: 38663,
+ 36972: 20154,
+ 36973: 20161,
+ 36974: 20995,
+ 36975: 22645,
+ 36976: 22764,
+ 36977: 23563,
+ 36978: 29978,
+ 36979: 23613,
+ 36980: 33102,
+ 36981: 35338,
+ 36982: 36805,
+ 36983: 38499,
+ 36984: 38765,
+ 36985: 31525,
+ 36986: 35535,
+ 36987: 38920,
+ 36988: 37218,
+ 36989: 22259,
+ 36990: 21416,
+ 36992: 36887,
+ 36993: 21561,
+ 36994: 22402,
+ 36995: 24101,
+ 36996: 25512,
+ 36997: 27700,
+ 36998: 28810,
+ 36999: 30561,
+ 37e3: 31883,
+ 37001: 32736,
+ 37002: 34928,
+ 37003: 36930,
+ 37004: 37204,
+ 37005: 37648,
+ 37006: 37656,
+ 37007: 38543,
+ 37008: 29790,
+ 37009: 39620,
+ 37010: 23815,
+ 37011: 23913,
+ 37012: 25968,
+ 37013: 26530,
+ 37014: 36264,
+ 37015: 38619,
+ 37016: 25454,
+ 37017: 26441,
+ 37018: 26905,
+ 37019: 33733,
+ 37020: 38935,
+ 37021: 38592,
+ 37022: 35070,
+ 37023: 28548,
+ 37024: 25722,
+ 37025: 23544,
+ 37026: 19990,
+ 37027: 28716,
+ 37028: 30045,
+ 37029: 26159,
+ 37030: 20932,
+ 37031: 21046,
+ 37032: 21218,
+ 37033: 22995,
+ 37034: 24449,
+ 37035: 24615,
+ 37036: 25104,
+ 37037: 25919,
+ 37038: 25972,
+ 37039: 26143,
+ 37040: 26228,
+ 37041: 26866,
+ 37042: 26646,
+ 37043: 27491,
+ 37044: 28165,
+ 37045: 29298,
+ 37046: 29983,
+ 37047: 30427,
+ 37048: 31934,
+ 37049: 32854,
+ 37050: 22768,
+ 37051: 35069,
+ 37052: 35199,
+ 37053: 35488,
+ 37054: 35475,
+ 37055: 35531,
+ 37056: 36893,
+ 37057: 37266,
+ 37058: 38738,
+ 37059: 38745,
+ 37060: 25993,
+ 37061: 31246,
+ 37062: 33030,
+ 37063: 38587,
+ 37064: 24109,
+ 37065: 24796,
+ 37066: 25114,
+ 37067: 26021,
+ 37068: 26132,
+ 37069: 26512,
+ 37070: 30707,
+ 37071: 31309,
+ 37072: 31821,
+ 37073: 32318,
+ 37074: 33034,
+ 37075: 36012,
+ 37076: 36196,
+ 37077: 36321,
+ 37078: 36447,
+ 37079: 30889,
+ 37080: 20999,
+ 37081: 25305,
+ 37082: 25509,
+ 37083: 25666,
+ 37084: 25240,
+ 37085: 35373,
+ 37086: 31363,
+ 37087: 31680,
+ 37088: 35500,
+ 37089: 38634,
+ 37090: 32118,
+ 37091: 33292,
+ 37092: 34633,
+ 37093: 20185,
+ 37094: 20808,
+ 37095: 21315,
+ 37096: 21344,
+ 37097: 23459,
+ 37098: 23554,
+ 37099: 23574,
+ 37100: 24029,
+ 37101: 25126,
+ 37102: 25159,
+ 37103: 25776,
+ 37104: 26643,
+ 37105: 26676,
+ 37106: 27849,
+ 37107: 27973,
+ 37108: 27927,
+ 37109: 26579,
+ 37110: 28508,
+ 37111: 29006,
+ 37112: 29053,
+ 37113: 26059,
+ 37114: 31359,
+ 37115: 31661,
+ 37116: 32218,
+ 37184: 32330,
+ 37185: 32680,
+ 37186: 33146,
+ 37187: 33307,
+ 37188: 33337,
+ 37189: 34214,
+ 37190: 35438,
+ 37191: 36046,
+ 37192: 36341,
+ 37193: 36984,
+ 37194: 36983,
+ 37195: 37549,
+ 37196: 37521,
+ 37197: 38275,
+ 37198: 39854,
+ 37199: 21069,
+ 37200: 21892,
+ 37201: 28472,
+ 37202: 28982,
+ 37203: 20840,
+ 37204: 31109,
+ 37205: 32341,
+ 37206: 33203,
+ 37207: 31950,
+ 37208: 22092,
+ 37209: 22609,
+ 37210: 23720,
+ 37211: 25514,
+ 37212: 26366,
+ 37213: 26365,
+ 37214: 26970,
+ 37215: 29401,
+ 37216: 30095,
+ 37217: 30094,
+ 37218: 30990,
+ 37219: 31062,
+ 37220: 31199,
+ 37221: 31895,
+ 37222: 32032,
+ 37223: 32068,
+ 37224: 34311,
+ 37225: 35380,
+ 37226: 38459,
+ 37227: 36961,
+ 37228: 40736,
+ 37229: 20711,
+ 37230: 21109,
+ 37231: 21452,
+ 37232: 21474,
+ 37233: 20489,
+ 37234: 21930,
+ 37235: 22766,
+ 37236: 22863,
+ 37237: 29245,
+ 37238: 23435,
+ 37239: 23652,
+ 37240: 21277,
+ 37241: 24803,
+ 37242: 24819,
+ 37243: 25436,
+ 37244: 25475,
+ 37245: 25407,
+ 37246: 25531,
+ 37248: 25805,
+ 37249: 26089,
+ 37250: 26361,
+ 37251: 24035,
+ 37252: 27085,
+ 37253: 27133,
+ 37254: 28437,
+ 37255: 29157,
+ 37256: 20105,
+ 37257: 30185,
+ 37258: 30456,
+ 37259: 31379,
+ 37260: 31967,
+ 37261: 32207,
+ 37262: 32156,
+ 37263: 32865,
+ 37264: 33609,
+ 37265: 33624,
+ 37266: 33900,
+ 37267: 33980,
+ 37268: 34299,
+ 37269: 35013,
+ 37270: 36208,
+ 37271: 36865,
+ 37272: 36973,
+ 37273: 37783,
+ 37274: 38684,
+ 37275: 39442,
+ 37276: 20687,
+ 37277: 22679,
+ 37278: 24974,
+ 37279: 33235,
+ 37280: 34101,
+ 37281: 36104,
+ 37282: 36896,
+ 37283: 20419,
+ 37284: 20596,
+ 37285: 21063,
+ 37286: 21363,
+ 37287: 24687,
+ 37288: 25417,
+ 37289: 26463,
+ 37290: 28204,
+ 37291: 36275,
+ 37292: 36895,
+ 37293: 20439,
+ 37294: 23646,
+ 37295: 36042,
+ 37296: 26063,
+ 37297: 32154,
+ 37298: 21330,
+ 37299: 34966,
+ 37300: 20854,
+ 37301: 25539,
+ 37302: 23384,
+ 37303: 23403,
+ 37304: 23562,
+ 37305: 25613,
+ 37306: 26449,
+ 37307: 36956,
+ 37308: 20182,
+ 37309: 22810,
+ 37310: 22826,
+ 37311: 27760,
+ 37312: 35409,
+ 37313: 21822,
+ 37314: 22549,
+ 37315: 22949,
+ 37316: 24816,
+ 37317: 25171,
+ 37318: 26561,
+ 37319: 33333,
+ 37320: 26965,
+ 37321: 38464,
+ 37322: 39364,
+ 37323: 39464,
+ 37324: 20307,
+ 37325: 22534,
+ 37326: 23550,
+ 37327: 32784,
+ 37328: 23729,
+ 37329: 24111,
+ 37330: 24453,
+ 37331: 24608,
+ 37332: 24907,
+ 37333: 25140,
+ 37334: 26367,
+ 37335: 27888,
+ 37336: 28382,
+ 37337: 32974,
+ 37338: 33151,
+ 37339: 33492,
+ 37340: 34955,
+ 37341: 36024,
+ 37342: 36864,
+ 37343: 36910,
+ 37344: 38538,
+ 37345: 40667,
+ 37346: 39899,
+ 37347: 20195,
+ 37348: 21488,
+ 37349: 22823,
+ 37350: 31532,
+ 37351: 37261,
+ 37352: 38988,
+ 37353: 40441,
+ 37354: 28381,
+ 37355: 28711,
+ 37356: 21331,
+ 37357: 21828,
+ 37358: 23429,
+ 37359: 25176,
+ 37360: 25246,
+ 37361: 25299,
+ 37362: 27810,
+ 37363: 28655,
+ 37364: 29730,
+ 37365: 35351,
+ 37366: 37944,
+ 37367: 28609,
+ 37368: 35582,
+ 37369: 33592,
+ 37370: 20967,
+ 37371: 34552,
+ 37372: 21482,
+ 37440: 21481,
+ 37441: 20294,
+ 37442: 36948,
+ 37443: 36784,
+ 37444: 22890,
+ 37445: 33073,
+ 37446: 24061,
+ 37447: 31466,
+ 37448: 36799,
+ 37449: 26842,
+ 37450: 35895,
+ 37451: 29432,
+ 37452: 40008,
+ 37453: 27197,
+ 37454: 35504,
+ 37455: 20025,
+ 37456: 21336,
+ 37457: 22022,
+ 37458: 22374,
+ 37459: 25285,
+ 37460: 25506,
+ 37461: 26086,
+ 37462: 27470,
+ 37463: 28129,
+ 37464: 28251,
+ 37465: 28845,
+ 37466: 30701,
+ 37467: 31471,
+ 37468: 31658,
+ 37469: 32187,
+ 37470: 32829,
+ 37471: 32966,
+ 37472: 34507,
+ 37473: 35477,
+ 37474: 37723,
+ 37475: 22243,
+ 37476: 22727,
+ 37477: 24382,
+ 37478: 26029,
+ 37479: 26262,
+ 37480: 27264,
+ 37481: 27573,
+ 37482: 30007,
+ 37483: 35527,
+ 37484: 20516,
+ 37485: 30693,
+ 37486: 22320,
+ 37487: 24347,
+ 37488: 24677,
+ 37489: 26234,
+ 37490: 27744,
+ 37491: 30196,
+ 37492: 31258,
+ 37493: 32622,
+ 37494: 33268,
+ 37495: 34584,
+ 37496: 36933,
+ 37497: 39347,
+ 37498: 31689,
+ 37499: 30044,
+ 37500: 31481,
+ 37501: 31569,
+ 37502: 33988,
+ 37504: 36880,
+ 37505: 31209,
+ 37506: 31378,
+ 37507: 33590,
+ 37508: 23265,
+ 37509: 30528,
+ 37510: 20013,
+ 37511: 20210,
+ 37512: 23449,
+ 37513: 24544,
+ 37514: 25277,
+ 37515: 26172,
+ 37516: 26609,
+ 37517: 27880,
+ 37518: 34411,
+ 37519: 34935,
+ 37520: 35387,
+ 37521: 37198,
+ 37522: 37619,
+ 37523: 39376,
+ 37524: 27159,
+ 37525: 28710,
+ 37526: 29482,
+ 37527: 33511,
+ 37528: 33879,
+ 37529: 36015,
+ 37530: 19969,
+ 37531: 20806,
+ 37532: 20939,
+ 37533: 21899,
+ 37534: 23541,
+ 37535: 24086,
+ 37536: 24115,
+ 37537: 24193,
+ 37538: 24340,
+ 37539: 24373,
+ 37540: 24427,
+ 37541: 24500,
+ 37542: 25074,
+ 37543: 25361,
+ 37544: 26274,
+ 37545: 26397,
+ 37546: 28526,
+ 37547: 29266,
+ 37548: 30010,
+ 37549: 30522,
+ 37550: 32884,
+ 37551: 33081,
+ 37552: 33144,
+ 37553: 34678,
+ 37554: 35519,
+ 37555: 35548,
+ 37556: 36229,
+ 37557: 36339,
+ 37558: 37530,
+ 37559: 38263,
+ 37560: 38914,
+ 37561: 40165,
+ 37562: 21189,
+ 37563: 25431,
+ 37564: 30452,
+ 37565: 26389,
+ 37566: 27784,
+ 37567: 29645,
+ 37568: 36035,
+ 37569: 37806,
+ 37570: 38515,
+ 37571: 27941,
+ 37572: 22684,
+ 37573: 26894,
+ 37574: 27084,
+ 37575: 36861,
+ 37576: 37786,
+ 37577: 30171,
+ 37578: 36890,
+ 37579: 22618,
+ 37580: 26626,
+ 37581: 25524,
+ 37582: 27131,
+ 37583: 20291,
+ 37584: 28460,
+ 37585: 26584,
+ 37586: 36795,
+ 37587: 34086,
+ 37588: 32180,
+ 37589: 37716,
+ 37590: 26943,
+ 37591: 28528,
+ 37592: 22378,
+ 37593: 22775,
+ 37594: 23340,
+ 37595: 32044,
+ 37596: 29226,
+ 37597: 21514,
+ 37598: 37347,
+ 37599: 40372,
+ 37600: 20141,
+ 37601: 20302,
+ 37602: 20572,
+ 37603: 20597,
+ 37604: 21059,
+ 37605: 35998,
+ 37606: 21576,
+ 37607: 22564,
+ 37608: 23450,
+ 37609: 24093,
+ 37610: 24213,
+ 37611: 24237,
+ 37612: 24311,
+ 37613: 24351,
+ 37614: 24716,
+ 37615: 25269,
+ 37616: 25402,
+ 37617: 25552,
+ 37618: 26799,
+ 37619: 27712,
+ 37620: 30855,
+ 37621: 31118,
+ 37622: 31243,
+ 37623: 32224,
+ 37624: 33351,
+ 37625: 35330,
+ 37626: 35558,
+ 37627: 36420,
+ 37628: 36883,
+ 37696: 37048,
+ 37697: 37165,
+ 37698: 37336,
+ 37699: 40718,
+ 37700: 27877,
+ 37701: 25688,
+ 37702: 25826,
+ 37703: 25973,
+ 37704: 28404,
+ 37705: 30340,
+ 37706: 31515,
+ 37707: 36969,
+ 37708: 37841,
+ 37709: 28346,
+ 37710: 21746,
+ 37711: 24505,
+ 37712: 25764,
+ 37713: 36685,
+ 37714: 36845,
+ 37715: 37444,
+ 37716: 20856,
+ 37717: 22635,
+ 37718: 22825,
+ 37719: 23637,
+ 37720: 24215,
+ 37721: 28155,
+ 37722: 32399,
+ 37723: 29980,
+ 37724: 36028,
+ 37725: 36578,
+ 37726: 39003,
+ 37727: 28857,
+ 37728: 20253,
+ 37729: 27583,
+ 37730: 28593,
+ 37731: 3e4,
+ 37732: 38651,
+ 37733: 20814,
+ 37734: 21520,
+ 37735: 22581,
+ 37736: 22615,
+ 37737: 22956,
+ 37738: 23648,
+ 37739: 24466,
+ 37740: 26007,
+ 37741: 26460,
+ 37742: 28193,
+ 37743: 30331,
+ 37744: 33759,
+ 37745: 36077,
+ 37746: 36884,
+ 37747: 37117,
+ 37748: 37709,
+ 37749: 30757,
+ 37750: 30778,
+ 37751: 21162,
+ 37752: 24230,
+ 37753: 22303,
+ 37754: 22900,
+ 37755: 24594,
+ 37756: 20498,
+ 37757: 20826,
+ 37758: 20908,
+ 37760: 20941,
+ 37761: 20992,
+ 37762: 21776,
+ 37763: 22612,
+ 37764: 22616,
+ 37765: 22871,
+ 37766: 23445,
+ 37767: 23798,
+ 37768: 23947,
+ 37769: 24764,
+ 37770: 25237,
+ 37771: 25645,
+ 37772: 26481,
+ 37773: 26691,
+ 37774: 26812,
+ 37775: 26847,
+ 37776: 30423,
+ 37777: 28120,
+ 37778: 28271,
+ 37779: 28059,
+ 37780: 28783,
+ 37781: 29128,
+ 37782: 24403,
+ 37783: 30168,
+ 37784: 31095,
+ 37785: 31561,
+ 37786: 31572,
+ 37787: 31570,
+ 37788: 31958,
+ 37789: 32113,
+ 37790: 21040,
+ 37791: 33891,
+ 37792: 34153,
+ 37793: 34276,
+ 37794: 35342,
+ 37795: 35588,
+ 37796: 35910,
+ 37797: 36367,
+ 37798: 36867,
+ 37799: 36879,
+ 37800: 37913,
+ 37801: 38518,
+ 37802: 38957,
+ 37803: 39472,
+ 37804: 38360,
+ 37805: 20685,
+ 37806: 21205,
+ 37807: 21516,
+ 37808: 22530,
+ 37809: 23566,
+ 37810: 24999,
+ 37811: 25758,
+ 37812: 27934,
+ 37813: 30643,
+ 37814: 31461,
+ 37815: 33012,
+ 37816: 33796,
+ 37817: 36947,
+ 37818: 37509,
+ 37819: 23776,
+ 37820: 40199,
+ 37821: 21311,
+ 37822: 24471,
+ 37823: 24499,
+ 37824: 28060,
+ 37825: 29305,
+ 37826: 30563,
+ 37827: 31167,
+ 37828: 31716,
+ 37829: 27602,
+ 37830: 29420,
+ 37831: 35501,
+ 37832: 26627,
+ 37833: 27233,
+ 37834: 20984,
+ 37835: 31361,
+ 37836: 26932,
+ 37837: 23626,
+ 37838: 40182,
+ 37839: 33515,
+ 37840: 23493,
+ 37841: 37193,
+ 37842: 28702,
+ 37843: 22136,
+ 37844: 23663,
+ 37845: 24775,
+ 37846: 25958,
+ 37847: 27788,
+ 37848: 35930,
+ 37849: 36929,
+ 37850: 38931,
+ 37851: 21585,
+ 37852: 26311,
+ 37853: 37389,
+ 37854: 22856,
+ 37855: 37027,
+ 37856: 20869,
+ 37857: 20045,
+ 37858: 20970,
+ 37859: 34201,
+ 37860: 35598,
+ 37861: 28760,
+ 37862: 25466,
+ 37863: 37707,
+ 37864: 26978,
+ 37865: 39348,
+ 37866: 32260,
+ 37867: 30071,
+ 37868: 21335,
+ 37869: 26976,
+ 37870: 36575,
+ 37871: 38627,
+ 37872: 27741,
+ 37873: 20108,
+ 37874: 23612,
+ 37875: 24336,
+ 37876: 36841,
+ 37877: 21250,
+ 37878: 36049,
+ 37879: 32905,
+ 37880: 34425,
+ 37881: 24319,
+ 37882: 26085,
+ 37883: 20083,
+ 37884: 20837,
+ 37952: 22914,
+ 37953: 23615,
+ 37954: 38894,
+ 37955: 20219,
+ 37956: 22922,
+ 37957: 24525,
+ 37958: 35469,
+ 37959: 28641,
+ 37960: 31152,
+ 37961: 31074,
+ 37962: 23527,
+ 37963: 33905,
+ 37964: 29483,
+ 37965: 29105,
+ 37966: 24180,
+ 37967: 24565,
+ 37968: 25467,
+ 37969: 25754,
+ 37970: 29123,
+ 37971: 31896,
+ 37972: 20035,
+ 37973: 24316,
+ 37974: 20043,
+ 37975: 22492,
+ 37976: 22178,
+ 37977: 24745,
+ 37978: 28611,
+ 37979: 32013,
+ 37980: 33021,
+ 37981: 33075,
+ 37982: 33215,
+ 37983: 36786,
+ 37984: 35223,
+ 37985: 34468,
+ 37986: 24052,
+ 37987: 25226,
+ 37988: 25773,
+ 37989: 35207,
+ 37990: 26487,
+ 37991: 27874,
+ 37992: 27966,
+ 37993: 29750,
+ 37994: 30772,
+ 37995: 23110,
+ 37996: 32629,
+ 37997: 33453,
+ 37998: 39340,
+ 37999: 20467,
+ 38e3: 24259,
+ 38001: 25309,
+ 38002: 25490,
+ 38003: 25943,
+ 38004: 26479,
+ 38005: 30403,
+ 38006: 29260,
+ 38007: 32972,
+ 38008: 32954,
+ 38009: 36649,
+ 38010: 37197,
+ 38011: 20493,
+ 38012: 22521,
+ 38013: 23186,
+ 38014: 26757,
+ 38016: 26995,
+ 38017: 29028,
+ 38018: 29437,
+ 38019: 36023,
+ 38020: 22770,
+ 38021: 36064,
+ 38022: 38506,
+ 38023: 36889,
+ 38024: 34687,
+ 38025: 31204,
+ 38026: 30695,
+ 38027: 33833,
+ 38028: 20271,
+ 38029: 21093,
+ 38030: 21338,
+ 38031: 25293,
+ 38032: 26575,
+ 38033: 27850,
+ 38034: 30333,
+ 38035: 31636,
+ 38036: 31893,
+ 38037: 33334,
+ 38038: 34180,
+ 38039: 36843,
+ 38040: 26333,
+ 38041: 28448,
+ 38042: 29190,
+ 38043: 32283,
+ 38044: 33707,
+ 38045: 39361,
+ 38046: 40614,
+ 38047: 20989,
+ 38048: 31665,
+ 38049: 30834,
+ 38050: 31672,
+ 38051: 32903,
+ 38052: 31560,
+ 38053: 27368,
+ 38054: 24161,
+ 38055: 32908,
+ 38056: 30033,
+ 38057: 30048,
+ 38058: 20843,
+ 38059: 37474,
+ 38060: 28300,
+ 38061: 30330,
+ 38062: 37271,
+ 38063: 39658,
+ 38064: 20240,
+ 38065: 32624,
+ 38066: 25244,
+ 38067: 31567,
+ 38068: 38309,
+ 38069: 40169,
+ 38070: 22138,
+ 38071: 22617,
+ 38072: 34532,
+ 38073: 38588,
+ 38074: 20276,
+ 38075: 21028,
+ 38076: 21322,
+ 38077: 21453,
+ 38078: 21467,
+ 38079: 24070,
+ 38080: 25644,
+ 38081: 26001,
+ 38082: 26495,
+ 38083: 27710,
+ 38084: 27726,
+ 38085: 29256,
+ 38086: 29359,
+ 38087: 29677,
+ 38088: 30036,
+ 38089: 32321,
+ 38090: 33324,
+ 38091: 34281,
+ 38092: 36009,
+ 38093: 31684,
+ 38094: 37318,
+ 38095: 29033,
+ 38096: 38930,
+ 38097: 39151,
+ 38098: 25405,
+ 38099: 26217,
+ 38100: 30058,
+ 38101: 30436,
+ 38102: 30928,
+ 38103: 34115,
+ 38104: 34542,
+ 38105: 21290,
+ 38106: 21329,
+ 38107: 21542,
+ 38108: 22915,
+ 38109: 24199,
+ 38110: 24444,
+ 38111: 24754,
+ 38112: 25161,
+ 38113: 25209,
+ 38114: 25259,
+ 38115: 26e3,
+ 38116: 27604,
+ 38117: 27852,
+ 38118: 30130,
+ 38119: 30382,
+ 38120: 30865,
+ 38121: 31192,
+ 38122: 32203,
+ 38123: 32631,
+ 38124: 32933,
+ 38125: 34987,
+ 38126: 35513,
+ 38127: 36027,
+ 38128: 36991,
+ 38129: 38750,
+ 38130: 39131,
+ 38131: 27147,
+ 38132: 31800,
+ 38133: 20633,
+ 38134: 23614,
+ 38135: 24494,
+ 38136: 26503,
+ 38137: 27608,
+ 38138: 29749,
+ 38139: 30473,
+ 38140: 32654,
+ 38208: 40763,
+ 38209: 26570,
+ 38210: 31255,
+ 38211: 21305,
+ 38212: 30091,
+ 38213: 39661,
+ 38214: 24422,
+ 38215: 33181,
+ 38216: 33777,
+ 38217: 32920,
+ 38218: 24380,
+ 38219: 24517,
+ 38220: 30050,
+ 38221: 31558,
+ 38222: 36924,
+ 38223: 26727,
+ 38224: 23019,
+ 38225: 23195,
+ 38226: 32016,
+ 38227: 30334,
+ 38228: 35628,
+ 38229: 20469,
+ 38230: 24426,
+ 38231: 27161,
+ 38232: 27703,
+ 38233: 28418,
+ 38234: 29922,
+ 38235: 31080,
+ 38236: 34920,
+ 38237: 35413,
+ 38238: 35961,
+ 38239: 24287,
+ 38240: 25551,
+ 38241: 30149,
+ 38242: 31186,
+ 38243: 33495,
+ 38244: 37672,
+ 38245: 37618,
+ 38246: 33948,
+ 38247: 34541,
+ 38248: 39981,
+ 38249: 21697,
+ 38250: 24428,
+ 38251: 25996,
+ 38252: 27996,
+ 38253: 28693,
+ 38254: 36007,
+ 38255: 36051,
+ 38256: 38971,
+ 38257: 25935,
+ 38258: 29942,
+ 38259: 19981,
+ 38260: 20184,
+ 38261: 22496,
+ 38262: 22827,
+ 38263: 23142,
+ 38264: 23500,
+ 38265: 20904,
+ 38266: 24067,
+ 38267: 24220,
+ 38268: 24598,
+ 38269: 25206,
+ 38270: 25975,
+ 38272: 26023,
+ 38273: 26222,
+ 38274: 28014,
+ 38275: 29238,
+ 38276: 31526,
+ 38277: 33104,
+ 38278: 33178,
+ 38279: 33433,
+ 38280: 35676,
+ 38281: 36e3,
+ 38282: 36070,
+ 38283: 36212,
+ 38284: 38428,
+ 38285: 38468,
+ 38286: 20398,
+ 38287: 25771,
+ 38288: 27494,
+ 38289: 33310,
+ 38290: 33889,
+ 38291: 34154,
+ 38292: 37096,
+ 38293: 23553,
+ 38294: 26963,
+ 38295: 39080,
+ 38296: 33914,
+ 38297: 34135,
+ 38298: 20239,
+ 38299: 21103,
+ 38300: 24489,
+ 38301: 24133,
+ 38302: 26381,
+ 38303: 31119,
+ 38304: 33145,
+ 38305: 35079,
+ 38306: 35206,
+ 38307: 28149,
+ 38308: 24343,
+ 38309: 25173,
+ 38310: 27832,
+ 38311: 20175,
+ 38312: 29289,
+ 38313: 39826,
+ 38314: 20998,
+ 38315: 21563,
+ 38316: 22132,
+ 38317: 22707,
+ 38318: 24996,
+ 38319: 25198,
+ 38320: 28954,
+ 38321: 22894,
+ 38322: 31881,
+ 38323: 31966,
+ 38324: 32027,
+ 38325: 38640,
+ 38326: 25991,
+ 38327: 32862,
+ 38328: 19993,
+ 38329: 20341,
+ 38330: 20853,
+ 38331: 22592,
+ 38332: 24163,
+ 38333: 24179,
+ 38334: 24330,
+ 38335: 26564,
+ 38336: 20006,
+ 38337: 34109,
+ 38338: 38281,
+ 38339: 38491,
+ 38340: 31859,
+ 38341: 38913,
+ 38342: 20731,
+ 38343: 22721,
+ 38344: 30294,
+ 38345: 30887,
+ 38346: 21029,
+ 38347: 30629,
+ 38348: 34065,
+ 38349: 31622,
+ 38350: 20559,
+ 38351: 22793,
+ 38352: 29255,
+ 38353: 31687,
+ 38354: 32232,
+ 38355: 36794,
+ 38356: 36820,
+ 38357: 36941,
+ 38358: 20415,
+ 38359: 21193,
+ 38360: 23081,
+ 38361: 24321,
+ 38362: 38829,
+ 38363: 20445,
+ 38364: 33303,
+ 38365: 37610,
+ 38366: 22275,
+ 38367: 25429,
+ 38368: 27497,
+ 38369: 29995,
+ 38370: 35036,
+ 38371: 36628,
+ 38372: 31298,
+ 38373: 21215,
+ 38374: 22675,
+ 38375: 24917,
+ 38376: 25098,
+ 38377: 26286,
+ 38378: 27597,
+ 38379: 31807,
+ 38380: 33769,
+ 38381: 20515,
+ 38382: 20472,
+ 38383: 21253,
+ 38384: 21574,
+ 38385: 22577,
+ 38386: 22857,
+ 38387: 23453,
+ 38388: 23792,
+ 38389: 23791,
+ 38390: 23849,
+ 38391: 24214,
+ 38392: 25265,
+ 38393: 25447,
+ 38394: 25918,
+ 38395: 26041,
+ 38396: 26379,
+ 38464: 27861,
+ 38465: 27873,
+ 38466: 28921,
+ 38467: 30770,
+ 38468: 32299,
+ 38469: 32990,
+ 38470: 33459,
+ 38471: 33804,
+ 38472: 34028,
+ 38473: 34562,
+ 38474: 35090,
+ 38475: 35370,
+ 38476: 35914,
+ 38477: 37030,
+ 38478: 37586,
+ 38479: 39165,
+ 38480: 40179,
+ 38481: 40300,
+ 38482: 20047,
+ 38483: 20129,
+ 38484: 20621,
+ 38485: 21078,
+ 38486: 22346,
+ 38487: 22952,
+ 38488: 24125,
+ 38489: 24536,
+ 38490: 24537,
+ 38491: 25151,
+ 38492: 26292,
+ 38493: 26395,
+ 38494: 26576,
+ 38495: 26834,
+ 38496: 20882,
+ 38497: 32033,
+ 38498: 32938,
+ 38499: 33192,
+ 38500: 35584,
+ 38501: 35980,
+ 38502: 36031,
+ 38503: 37502,
+ 38504: 38450,
+ 38505: 21536,
+ 38506: 38956,
+ 38507: 21271,
+ 38508: 20693,
+ 38509: 21340,
+ 38510: 22696,
+ 38511: 25778,
+ 38512: 26420,
+ 38513: 29287,
+ 38514: 30566,
+ 38515: 31302,
+ 38516: 37350,
+ 38517: 21187,
+ 38518: 27809,
+ 38519: 27526,
+ 38520: 22528,
+ 38521: 24140,
+ 38522: 22868,
+ 38523: 26412,
+ 38524: 32763,
+ 38525: 20961,
+ 38526: 30406,
+ 38528: 25705,
+ 38529: 30952,
+ 38530: 39764,
+ 38531: 40635,
+ 38532: 22475,
+ 38533: 22969,
+ 38534: 26151,
+ 38535: 26522,
+ 38536: 27598,
+ 38537: 21737,
+ 38538: 27097,
+ 38539: 24149,
+ 38540: 33180,
+ 38541: 26517,
+ 38542: 39850,
+ 38543: 26622,
+ 38544: 40018,
+ 38545: 26717,
+ 38546: 20134,
+ 38547: 20451,
+ 38548: 21448,
+ 38549: 25273,
+ 38550: 26411,
+ 38551: 27819,
+ 38552: 36804,
+ 38553: 20397,
+ 38554: 32365,
+ 38555: 40639,
+ 38556: 19975,
+ 38557: 24930,
+ 38558: 28288,
+ 38559: 28459,
+ 38560: 34067,
+ 38561: 21619,
+ 38562: 26410,
+ 38563: 39749,
+ 38564: 24051,
+ 38565: 31637,
+ 38566: 23724,
+ 38567: 23494,
+ 38568: 34588,
+ 38569: 28234,
+ 38570: 34001,
+ 38571: 31252,
+ 38572: 33032,
+ 38573: 22937,
+ 38574: 31885,
+ 38575: 27665,
+ 38576: 30496,
+ 38577: 21209,
+ 38578: 22818,
+ 38579: 28961,
+ 38580: 29279,
+ 38581: 30683,
+ 38582: 38695,
+ 38583: 40289,
+ 38584: 26891,
+ 38585: 23167,
+ 38586: 23064,
+ 38587: 20901,
+ 38588: 21517,
+ 38589: 21629,
+ 38590: 26126,
+ 38591: 30431,
+ 38592: 36855,
+ 38593: 37528,
+ 38594: 40180,
+ 38595: 23018,
+ 38596: 29277,
+ 38597: 28357,
+ 38598: 20813,
+ 38599: 26825,
+ 38600: 32191,
+ 38601: 32236,
+ 38602: 38754,
+ 38603: 40634,
+ 38604: 25720,
+ 38605: 27169,
+ 38606: 33538,
+ 38607: 22916,
+ 38608: 23391,
+ 38609: 27611,
+ 38610: 29467,
+ 38611: 30450,
+ 38612: 32178,
+ 38613: 32791,
+ 38614: 33945,
+ 38615: 20786,
+ 38616: 26408,
+ 38617: 40665,
+ 38618: 30446,
+ 38619: 26466,
+ 38620: 21247,
+ 38621: 39173,
+ 38622: 23588,
+ 38623: 25147,
+ 38624: 31870,
+ 38625: 36016,
+ 38626: 21839,
+ 38627: 24758,
+ 38628: 32011,
+ 38629: 38272,
+ 38630: 21249,
+ 38631: 20063,
+ 38632: 20918,
+ 38633: 22812,
+ 38634: 29242,
+ 38635: 32822,
+ 38636: 37326,
+ 38637: 24357,
+ 38638: 30690,
+ 38639: 21380,
+ 38640: 24441,
+ 38641: 32004,
+ 38642: 34220,
+ 38643: 35379,
+ 38644: 36493,
+ 38645: 38742,
+ 38646: 26611,
+ 38647: 34222,
+ 38648: 37971,
+ 38649: 24841,
+ 38650: 24840,
+ 38651: 27833,
+ 38652: 30290,
+ 38720: 35565,
+ 38721: 36664,
+ 38722: 21807,
+ 38723: 20305,
+ 38724: 20778,
+ 38725: 21191,
+ 38726: 21451,
+ 38727: 23461,
+ 38728: 24189,
+ 38729: 24736,
+ 38730: 24962,
+ 38731: 25558,
+ 38732: 26377,
+ 38733: 26586,
+ 38734: 28263,
+ 38735: 28044,
+ 38736: 29494,
+ 38737: 29495,
+ 38738: 30001,
+ 38739: 31056,
+ 38740: 35029,
+ 38741: 35480,
+ 38742: 36938,
+ 38743: 37009,
+ 38744: 37109,
+ 38745: 38596,
+ 38746: 34701,
+ 38747: 22805,
+ 38748: 20104,
+ 38749: 20313,
+ 38750: 19982,
+ 38751: 35465,
+ 38752: 36671,
+ 38753: 38928,
+ 38754: 20653,
+ 38755: 24188,
+ 38756: 22934,
+ 38757: 23481,
+ 38758: 24248,
+ 38759: 25562,
+ 38760: 25594,
+ 38761: 25793,
+ 38762: 26332,
+ 38763: 26954,
+ 38764: 27096,
+ 38765: 27915,
+ 38766: 28342,
+ 38767: 29076,
+ 38768: 29992,
+ 38769: 31407,
+ 38770: 32650,
+ 38771: 32768,
+ 38772: 33865,
+ 38773: 33993,
+ 38774: 35201,
+ 38775: 35617,
+ 38776: 36362,
+ 38777: 36965,
+ 38778: 38525,
+ 38779: 39178,
+ 38780: 24958,
+ 38781: 25233,
+ 38782: 27442,
+ 38784: 27779,
+ 38785: 28020,
+ 38786: 32716,
+ 38787: 32764,
+ 38788: 28096,
+ 38789: 32645,
+ 38790: 34746,
+ 38791: 35064,
+ 38792: 26469,
+ 38793: 33713,
+ 38794: 38972,
+ 38795: 38647,
+ 38796: 27931,
+ 38797: 32097,
+ 38798: 33853,
+ 38799: 37226,
+ 38800: 20081,
+ 38801: 21365,
+ 38802: 23888,
+ 38803: 27396,
+ 38804: 28651,
+ 38805: 34253,
+ 38806: 34349,
+ 38807: 35239,
+ 38808: 21033,
+ 38809: 21519,
+ 38810: 23653,
+ 38811: 26446,
+ 38812: 26792,
+ 38813: 29702,
+ 38814: 29827,
+ 38815: 30178,
+ 38816: 35023,
+ 38817: 35041,
+ 38818: 37324,
+ 38819: 38626,
+ 38820: 38520,
+ 38821: 24459,
+ 38822: 29575,
+ 38823: 31435,
+ 38824: 33870,
+ 38825: 25504,
+ 38826: 30053,
+ 38827: 21129,
+ 38828: 27969,
+ 38829: 28316,
+ 38830: 29705,
+ 38831: 30041,
+ 38832: 30827,
+ 38833: 31890,
+ 38834: 38534,
+ 38835: 31452,
+ 38836: 40845,
+ 38837: 20406,
+ 38838: 24942,
+ 38839: 26053,
+ 38840: 34396,
+ 38841: 20102,
+ 38842: 20142,
+ 38843: 20698,
+ 38844: 20001,
+ 38845: 20940,
+ 38846: 23534,
+ 38847: 26009,
+ 38848: 26753,
+ 38849: 28092,
+ 38850: 29471,
+ 38851: 30274,
+ 38852: 30637,
+ 38853: 31260,
+ 38854: 31975,
+ 38855: 33391,
+ 38856: 35538,
+ 38857: 36988,
+ 38858: 37327,
+ 38859: 38517,
+ 38860: 38936,
+ 38861: 21147,
+ 38862: 32209,
+ 38863: 20523,
+ 38864: 21400,
+ 38865: 26519,
+ 38866: 28107,
+ 38867: 29136,
+ 38868: 29747,
+ 38869: 33256,
+ 38870: 36650,
+ 38871: 38563,
+ 38872: 40023,
+ 38873: 40607,
+ 38874: 29792,
+ 38875: 22593,
+ 38876: 28057,
+ 38877: 32047,
+ 38878: 39006,
+ 38879: 20196,
+ 38880: 20278,
+ 38881: 20363,
+ 38882: 20919,
+ 38883: 21169,
+ 38884: 23994,
+ 38885: 24604,
+ 38886: 29618,
+ 38887: 31036,
+ 38888: 33491,
+ 38889: 37428,
+ 38890: 38583,
+ 38891: 38646,
+ 38892: 38666,
+ 38893: 40599,
+ 38894: 40802,
+ 38895: 26278,
+ 38896: 27508,
+ 38897: 21015,
+ 38898: 21155,
+ 38899: 28872,
+ 38900: 35010,
+ 38901: 24265,
+ 38902: 24651,
+ 38903: 24976,
+ 38904: 28451,
+ 38905: 29001,
+ 38906: 31806,
+ 38907: 32244,
+ 38908: 32879,
+ 38976: 34030,
+ 38977: 36899,
+ 38978: 37676,
+ 38979: 21570,
+ 38980: 39791,
+ 38981: 27347,
+ 38982: 28809,
+ 38983: 36034,
+ 38984: 36335,
+ 38985: 38706,
+ 38986: 21172,
+ 38987: 23105,
+ 38988: 24266,
+ 38989: 24324,
+ 38990: 26391,
+ 38991: 27004,
+ 38992: 27028,
+ 38993: 28010,
+ 38994: 28431,
+ 38995: 29282,
+ 38996: 29436,
+ 38997: 31725,
+ 38998: 32769,
+ 38999: 32894,
+ 39e3: 34635,
+ 39001: 37070,
+ 39002: 20845,
+ 39003: 40595,
+ 39004: 31108,
+ 39005: 32907,
+ 39006: 37682,
+ 39007: 35542,
+ 39008: 20525,
+ 39009: 21644,
+ 39010: 35441,
+ 39011: 27498,
+ 39012: 36036,
+ 39013: 33031,
+ 39014: 24785,
+ 39015: 26528,
+ 39016: 40434,
+ 39017: 20121,
+ 39018: 20120,
+ 39019: 39952,
+ 39020: 35435,
+ 39021: 34241,
+ 39022: 34152,
+ 39023: 26880,
+ 39024: 28286,
+ 39025: 30871,
+ 39026: 33109,
+ 39071: 24332,
+ 39072: 19984,
+ 39073: 19989,
+ 39074: 20010,
+ 39075: 20017,
+ 39076: 20022,
+ 39077: 20028,
+ 39078: 20031,
+ 39079: 20034,
+ 39080: 20054,
+ 39081: 20056,
+ 39082: 20098,
+ 39083: 20101,
+ 39084: 35947,
+ 39085: 20106,
+ 39086: 33298,
+ 39087: 24333,
+ 39088: 20110,
+ 39089: 20126,
+ 39090: 20127,
+ 39091: 20128,
+ 39092: 20130,
+ 39093: 20144,
+ 39094: 20147,
+ 39095: 20150,
+ 39096: 20174,
+ 39097: 20173,
+ 39098: 20164,
+ 39099: 20166,
+ 39100: 20162,
+ 39101: 20183,
+ 39102: 20190,
+ 39103: 20205,
+ 39104: 20191,
+ 39105: 20215,
+ 39106: 20233,
+ 39107: 20314,
+ 39108: 20272,
+ 39109: 20315,
+ 39110: 20317,
+ 39111: 20311,
+ 39112: 20295,
+ 39113: 20342,
+ 39114: 20360,
+ 39115: 20367,
+ 39116: 20376,
+ 39117: 20347,
+ 39118: 20329,
+ 39119: 20336,
+ 39120: 20369,
+ 39121: 20335,
+ 39122: 20358,
+ 39123: 20374,
+ 39124: 20760,
+ 39125: 20436,
+ 39126: 20447,
+ 39127: 20430,
+ 39128: 20440,
+ 39129: 20443,
+ 39130: 20433,
+ 39131: 20442,
+ 39132: 20432,
+ 39133: 20452,
+ 39134: 20453,
+ 39135: 20506,
+ 39136: 20520,
+ 39137: 20500,
+ 39138: 20522,
+ 39139: 20517,
+ 39140: 20485,
+ 39141: 20252,
+ 39142: 20470,
+ 39143: 20513,
+ 39144: 20521,
+ 39145: 20524,
+ 39146: 20478,
+ 39147: 20463,
+ 39148: 20497,
+ 39149: 20486,
+ 39150: 20547,
+ 39151: 20551,
+ 39152: 26371,
+ 39153: 20565,
+ 39154: 20560,
+ 39155: 20552,
+ 39156: 20570,
+ 39157: 20566,
+ 39158: 20588,
+ 39159: 20600,
+ 39160: 20608,
+ 39161: 20634,
+ 39162: 20613,
+ 39163: 20660,
+ 39164: 20658,
+ 39232: 20681,
+ 39233: 20682,
+ 39234: 20659,
+ 39235: 20674,
+ 39236: 20694,
+ 39237: 20702,
+ 39238: 20709,
+ 39239: 20717,
+ 39240: 20707,
+ 39241: 20718,
+ 39242: 20729,
+ 39243: 20725,
+ 39244: 20745,
+ 39245: 20737,
+ 39246: 20738,
+ 39247: 20758,
+ 39248: 20757,
+ 39249: 20756,
+ 39250: 20762,
+ 39251: 20769,
+ 39252: 20794,
+ 39253: 20791,
+ 39254: 20796,
+ 39255: 20795,
+ 39256: 20799,
+ 39257: 20800,
+ 39258: 20818,
+ 39259: 20812,
+ 39260: 20820,
+ 39261: 20834,
+ 39262: 31480,
+ 39263: 20841,
+ 39264: 20842,
+ 39265: 20846,
+ 39266: 20864,
+ 39267: 20866,
+ 39268: 22232,
+ 39269: 20876,
+ 39270: 20873,
+ 39271: 20879,
+ 39272: 20881,
+ 39273: 20883,
+ 39274: 20885,
+ 39275: 20886,
+ 39276: 20900,
+ 39277: 20902,
+ 39278: 20898,
+ 39279: 20905,
+ 39280: 20906,
+ 39281: 20907,
+ 39282: 20915,
+ 39283: 20913,
+ 39284: 20914,
+ 39285: 20912,
+ 39286: 20917,
+ 39287: 20925,
+ 39288: 20933,
+ 39289: 20937,
+ 39290: 20955,
+ 39291: 20960,
+ 39292: 34389,
+ 39293: 20969,
+ 39294: 20973,
+ 39296: 20976,
+ 39297: 20981,
+ 39298: 20990,
+ 39299: 20996,
+ 39300: 21003,
+ 39301: 21012,
+ 39302: 21006,
+ 39303: 21031,
+ 39304: 21034,
+ 39305: 21038,
+ 39306: 21043,
+ 39307: 21049,
+ 39308: 21071,
+ 39309: 21060,
+ 39310: 21067,
+ 39311: 21068,
+ 39312: 21086,
+ 39313: 21076,
+ 39314: 21098,
+ 39315: 21108,
+ 39316: 21097,
+ 39317: 21107,
+ 39318: 21119,
+ 39319: 21117,
+ 39320: 21133,
+ 39321: 21140,
+ 39322: 21138,
+ 39323: 21105,
+ 39324: 21128,
+ 39325: 21137,
+ 39326: 36776,
+ 39327: 36775,
+ 39328: 21164,
+ 39329: 21165,
+ 39330: 21180,
+ 39331: 21173,
+ 39332: 21185,
+ 39333: 21197,
+ 39334: 21207,
+ 39335: 21214,
+ 39336: 21219,
+ 39337: 21222,
+ 39338: 39149,
+ 39339: 21216,
+ 39340: 21235,
+ 39341: 21237,
+ 39342: 21240,
+ 39343: 21241,
+ 39344: 21254,
+ 39345: 21256,
+ 39346: 30008,
+ 39347: 21261,
+ 39348: 21264,
+ 39349: 21263,
+ 39350: 21269,
+ 39351: 21274,
+ 39352: 21283,
+ 39353: 21295,
+ 39354: 21297,
+ 39355: 21299,
+ 39356: 21304,
+ 39357: 21312,
+ 39358: 21318,
+ 39359: 21317,
+ 39360: 19991,
+ 39361: 21321,
+ 39362: 21325,
+ 39363: 20950,
+ 39364: 21342,
+ 39365: 21353,
+ 39366: 21358,
+ 39367: 22808,
+ 39368: 21371,
+ 39369: 21367,
+ 39370: 21378,
+ 39371: 21398,
+ 39372: 21408,
+ 39373: 21414,
+ 39374: 21413,
+ 39375: 21422,
+ 39376: 21424,
+ 39377: 21430,
+ 39378: 21443,
+ 39379: 31762,
+ 39380: 38617,
+ 39381: 21471,
+ 39382: 26364,
+ 39383: 29166,
+ 39384: 21486,
+ 39385: 21480,
+ 39386: 21485,
+ 39387: 21498,
+ 39388: 21505,
+ 39389: 21565,
+ 39390: 21568,
+ 39391: 21548,
+ 39392: 21549,
+ 39393: 21564,
+ 39394: 21550,
+ 39395: 21558,
+ 39396: 21545,
+ 39397: 21533,
+ 39398: 21582,
+ 39399: 21647,
+ 39400: 21621,
+ 39401: 21646,
+ 39402: 21599,
+ 39403: 21617,
+ 39404: 21623,
+ 39405: 21616,
+ 39406: 21650,
+ 39407: 21627,
+ 39408: 21632,
+ 39409: 21622,
+ 39410: 21636,
+ 39411: 21648,
+ 39412: 21638,
+ 39413: 21703,
+ 39414: 21666,
+ 39415: 21688,
+ 39416: 21669,
+ 39417: 21676,
+ 39418: 21700,
+ 39419: 21704,
+ 39420: 21672,
+ 39488: 21675,
+ 39489: 21698,
+ 39490: 21668,
+ 39491: 21694,
+ 39492: 21692,
+ 39493: 21720,
+ 39494: 21733,
+ 39495: 21734,
+ 39496: 21775,
+ 39497: 21780,
+ 39498: 21757,
+ 39499: 21742,
+ 39500: 21741,
+ 39501: 21754,
+ 39502: 21730,
+ 39503: 21817,
+ 39504: 21824,
+ 39505: 21859,
+ 39506: 21836,
+ 39507: 21806,
+ 39508: 21852,
+ 39509: 21829,
+ 39510: 21846,
+ 39511: 21847,
+ 39512: 21816,
+ 39513: 21811,
+ 39514: 21853,
+ 39515: 21913,
+ 39516: 21888,
+ 39517: 21679,
+ 39518: 21898,
+ 39519: 21919,
+ 39520: 21883,
+ 39521: 21886,
+ 39522: 21912,
+ 39523: 21918,
+ 39524: 21934,
+ 39525: 21884,
+ 39526: 21891,
+ 39527: 21929,
+ 39528: 21895,
+ 39529: 21928,
+ 39530: 21978,
+ 39531: 21957,
+ 39532: 21983,
+ 39533: 21956,
+ 39534: 21980,
+ 39535: 21988,
+ 39536: 21972,
+ 39537: 22036,
+ 39538: 22007,
+ 39539: 22038,
+ 39540: 22014,
+ 39541: 22013,
+ 39542: 22043,
+ 39543: 22009,
+ 39544: 22094,
+ 39545: 22096,
+ 39546: 29151,
+ 39547: 22068,
+ 39548: 22070,
+ 39549: 22066,
+ 39550: 22072,
+ 39552: 22123,
+ 39553: 22116,
+ 39554: 22063,
+ 39555: 22124,
+ 39556: 22122,
+ 39557: 22150,
+ 39558: 22144,
+ 39559: 22154,
+ 39560: 22176,
+ 39561: 22164,
+ 39562: 22159,
+ 39563: 22181,
+ 39564: 22190,
+ 39565: 22198,
+ 39566: 22196,
+ 39567: 22210,
+ 39568: 22204,
+ 39569: 22209,
+ 39570: 22211,
+ 39571: 22208,
+ 39572: 22216,
+ 39573: 22222,
+ 39574: 22225,
+ 39575: 22227,
+ 39576: 22231,
+ 39577: 22254,
+ 39578: 22265,
+ 39579: 22272,
+ 39580: 22271,
+ 39581: 22276,
+ 39582: 22281,
+ 39583: 22280,
+ 39584: 22283,
+ 39585: 22285,
+ 39586: 22291,
+ 39587: 22296,
+ 39588: 22294,
+ 39589: 21959,
+ 39590: 22300,
+ 39591: 22310,
+ 39592: 22327,
+ 39593: 22328,
+ 39594: 22350,
+ 39595: 22331,
+ 39596: 22336,
+ 39597: 22351,
+ 39598: 22377,
+ 39599: 22464,
+ 39600: 22408,
+ 39601: 22369,
+ 39602: 22399,
+ 39603: 22409,
+ 39604: 22419,
+ 39605: 22432,
+ 39606: 22451,
+ 39607: 22436,
+ 39608: 22442,
+ 39609: 22448,
+ 39610: 22467,
+ 39611: 22470,
+ 39612: 22484,
+ 39613: 22482,
+ 39614: 22483,
+ 39615: 22538,
+ 39616: 22486,
+ 39617: 22499,
+ 39618: 22539,
+ 39619: 22553,
+ 39620: 22557,
+ 39621: 22642,
+ 39622: 22561,
+ 39623: 22626,
+ 39624: 22603,
+ 39625: 22640,
+ 39626: 27584,
+ 39627: 22610,
+ 39628: 22589,
+ 39629: 22649,
+ 39630: 22661,
+ 39631: 22713,
+ 39632: 22687,
+ 39633: 22699,
+ 39634: 22714,
+ 39635: 22750,
+ 39636: 22715,
+ 39637: 22712,
+ 39638: 22702,
+ 39639: 22725,
+ 39640: 22739,
+ 39641: 22737,
+ 39642: 22743,
+ 39643: 22745,
+ 39644: 22744,
+ 39645: 22757,
+ 39646: 22748,
+ 39647: 22756,
+ 39648: 22751,
+ 39649: 22767,
+ 39650: 22778,
+ 39651: 22777,
+ 39652: 22779,
+ 39653: 22780,
+ 39654: 22781,
+ 39655: 22786,
+ 39656: 22794,
+ 39657: 22800,
+ 39658: 22811,
+ 39659: 26790,
+ 39660: 22821,
+ 39661: 22828,
+ 39662: 22829,
+ 39663: 22834,
+ 39664: 22840,
+ 39665: 22846,
+ 39666: 31442,
+ 39667: 22869,
+ 39668: 22864,
+ 39669: 22862,
+ 39670: 22874,
+ 39671: 22872,
+ 39672: 22882,
+ 39673: 22880,
+ 39674: 22887,
+ 39675: 22892,
+ 39676: 22889,
+ 39744: 22904,
+ 39745: 22913,
+ 39746: 22941,
+ 39747: 20318,
+ 39748: 20395,
+ 39749: 22947,
+ 39750: 22962,
+ 39751: 22982,
+ 39752: 23016,
+ 39753: 23004,
+ 39754: 22925,
+ 39755: 23001,
+ 39756: 23002,
+ 39757: 23077,
+ 39758: 23071,
+ 39759: 23057,
+ 39760: 23068,
+ 39761: 23049,
+ 39762: 23066,
+ 39763: 23104,
+ 39764: 23148,
+ 39765: 23113,
+ 39766: 23093,
+ 39767: 23094,
+ 39768: 23138,
+ 39769: 23146,
+ 39770: 23194,
+ 39771: 23228,
+ 39772: 23230,
+ 39773: 23243,
+ 39774: 23234,
+ 39775: 23229,
+ 39776: 23267,
+ 39777: 23255,
+ 39778: 23270,
+ 39779: 23273,
+ 39780: 23254,
+ 39781: 23290,
+ 39782: 23291,
+ 39783: 23308,
+ 39784: 23307,
+ 39785: 23318,
+ 39786: 23346,
+ 39787: 23248,
+ 39788: 23338,
+ 39789: 23350,
+ 39790: 23358,
+ 39791: 23363,
+ 39792: 23365,
+ 39793: 23360,
+ 39794: 23377,
+ 39795: 23381,
+ 39796: 23386,
+ 39797: 23387,
+ 39798: 23397,
+ 39799: 23401,
+ 39800: 23408,
+ 39801: 23411,
+ 39802: 23413,
+ 39803: 23416,
+ 39804: 25992,
+ 39805: 23418,
+ 39806: 23424,
+ 39808: 23427,
+ 39809: 23462,
+ 39810: 23480,
+ 39811: 23491,
+ 39812: 23495,
+ 39813: 23497,
+ 39814: 23508,
+ 39815: 23504,
+ 39816: 23524,
+ 39817: 23526,
+ 39818: 23522,
+ 39819: 23518,
+ 39820: 23525,
+ 39821: 23531,
+ 39822: 23536,
+ 39823: 23542,
+ 39824: 23539,
+ 39825: 23557,
+ 39826: 23559,
+ 39827: 23560,
+ 39828: 23565,
+ 39829: 23571,
+ 39830: 23584,
+ 39831: 23586,
+ 39832: 23592,
+ 39833: 23608,
+ 39834: 23609,
+ 39835: 23617,
+ 39836: 23622,
+ 39837: 23630,
+ 39838: 23635,
+ 39839: 23632,
+ 39840: 23631,
+ 39841: 23409,
+ 39842: 23660,
+ 39843: 23662,
+ 39844: 20066,
+ 39845: 23670,
+ 39846: 23673,
+ 39847: 23692,
+ 39848: 23697,
+ 39849: 23700,
+ 39850: 22939,
+ 39851: 23723,
+ 39852: 23739,
+ 39853: 23734,
+ 39854: 23740,
+ 39855: 23735,
+ 39856: 23749,
+ 39857: 23742,
+ 39858: 23751,
+ 39859: 23769,
+ 39860: 23785,
+ 39861: 23805,
+ 39862: 23802,
+ 39863: 23789,
+ 39864: 23948,
+ 39865: 23786,
+ 39866: 23819,
+ 39867: 23829,
+ 39868: 23831,
+ 39869: 23900,
+ 39870: 23839,
+ 39871: 23835,
+ 39872: 23825,
+ 39873: 23828,
+ 39874: 23842,
+ 39875: 23834,
+ 39876: 23833,
+ 39877: 23832,
+ 39878: 23884,
+ 39879: 23890,
+ 39880: 23886,
+ 39881: 23883,
+ 39882: 23916,
+ 39883: 23923,
+ 39884: 23926,
+ 39885: 23943,
+ 39886: 23940,
+ 39887: 23938,
+ 39888: 23970,
+ 39889: 23965,
+ 39890: 23980,
+ 39891: 23982,
+ 39892: 23997,
+ 39893: 23952,
+ 39894: 23991,
+ 39895: 23996,
+ 39896: 24009,
+ 39897: 24013,
+ 39898: 24019,
+ 39899: 24018,
+ 39900: 24022,
+ 39901: 24027,
+ 39902: 24043,
+ 39903: 24050,
+ 39904: 24053,
+ 39905: 24075,
+ 39906: 24090,
+ 39907: 24089,
+ 39908: 24081,
+ 39909: 24091,
+ 39910: 24118,
+ 39911: 24119,
+ 39912: 24132,
+ 39913: 24131,
+ 39914: 24128,
+ 39915: 24142,
+ 39916: 24151,
+ 39917: 24148,
+ 39918: 24159,
+ 39919: 24162,
+ 39920: 24164,
+ 39921: 24135,
+ 39922: 24181,
+ 39923: 24182,
+ 39924: 24186,
+ 39925: 40636,
+ 39926: 24191,
+ 39927: 24224,
+ 39928: 24257,
+ 39929: 24258,
+ 39930: 24264,
+ 39931: 24272,
+ 39932: 24271,
+ 4e4: 24278,
+ 40001: 24291,
+ 40002: 24285,
+ 40003: 24282,
+ 40004: 24283,
+ 40005: 24290,
+ 40006: 24289,
+ 40007: 24296,
+ 40008: 24297,
+ 40009: 24300,
+ 40010: 24305,
+ 40011: 24307,
+ 40012: 24304,
+ 40013: 24308,
+ 40014: 24312,
+ 40015: 24318,
+ 40016: 24323,
+ 40017: 24329,
+ 40018: 24413,
+ 40019: 24412,
+ 40020: 24331,
+ 40021: 24337,
+ 40022: 24342,
+ 40023: 24361,
+ 40024: 24365,
+ 40025: 24376,
+ 40026: 24385,
+ 40027: 24392,
+ 40028: 24396,
+ 40029: 24398,
+ 40030: 24367,
+ 40031: 24401,
+ 40032: 24406,
+ 40033: 24407,
+ 40034: 24409,
+ 40035: 24417,
+ 40036: 24429,
+ 40037: 24435,
+ 40038: 24439,
+ 40039: 24451,
+ 40040: 24450,
+ 40041: 24447,
+ 40042: 24458,
+ 40043: 24456,
+ 40044: 24465,
+ 40045: 24455,
+ 40046: 24478,
+ 40047: 24473,
+ 40048: 24472,
+ 40049: 24480,
+ 40050: 24488,
+ 40051: 24493,
+ 40052: 24508,
+ 40053: 24534,
+ 40054: 24571,
+ 40055: 24548,
+ 40056: 24568,
+ 40057: 24561,
+ 40058: 24541,
+ 40059: 24755,
+ 40060: 24575,
+ 40061: 24609,
+ 40062: 24672,
+ 40064: 24601,
+ 40065: 24592,
+ 40066: 24617,
+ 40067: 24590,
+ 40068: 24625,
+ 40069: 24603,
+ 40070: 24597,
+ 40071: 24619,
+ 40072: 24614,
+ 40073: 24591,
+ 40074: 24634,
+ 40075: 24666,
+ 40076: 24641,
+ 40077: 24682,
+ 40078: 24695,
+ 40079: 24671,
+ 40080: 24650,
+ 40081: 24646,
+ 40082: 24653,
+ 40083: 24675,
+ 40084: 24643,
+ 40085: 24676,
+ 40086: 24642,
+ 40087: 24684,
+ 40088: 24683,
+ 40089: 24665,
+ 40090: 24705,
+ 40091: 24717,
+ 40092: 24807,
+ 40093: 24707,
+ 40094: 24730,
+ 40095: 24708,
+ 40096: 24731,
+ 40097: 24726,
+ 40098: 24727,
+ 40099: 24722,
+ 40100: 24743,
+ 40101: 24715,
+ 40102: 24801,
+ 40103: 24760,
+ 40104: 24800,
+ 40105: 24787,
+ 40106: 24756,
+ 40107: 24560,
+ 40108: 24765,
+ 40109: 24774,
+ 40110: 24757,
+ 40111: 24792,
+ 40112: 24909,
+ 40113: 24853,
+ 40114: 24838,
+ 40115: 24822,
+ 40116: 24823,
+ 40117: 24832,
+ 40118: 24820,
+ 40119: 24826,
+ 40120: 24835,
+ 40121: 24865,
+ 40122: 24827,
+ 40123: 24817,
+ 40124: 24845,
+ 40125: 24846,
+ 40126: 24903,
+ 40127: 24894,
+ 40128: 24872,
+ 40129: 24871,
+ 40130: 24906,
+ 40131: 24895,
+ 40132: 24892,
+ 40133: 24876,
+ 40134: 24884,
+ 40135: 24893,
+ 40136: 24898,
+ 40137: 24900,
+ 40138: 24947,
+ 40139: 24951,
+ 40140: 24920,
+ 40141: 24921,
+ 40142: 24922,
+ 40143: 24939,
+ 40144: 24948,
+ 40145: 24943,
+ 40146: 24933,
+ 40147: 24945,
+ 40148: 24927,
+ 40149: 24925,
+ 40150: 24915,
+ 40151: 24949,
+ 40152: 24985,
+ 40153: 24982,
+ 40154: 24967,
+ 40155: 25004,
+ 40156: 24980,
+ 40157: 24986,
+ 40158: 24970,
+ 40159: 24977,
+ 40160: 25003,
+ 40161: 25006,
+ 40162: 25036,
+ 40163: 25034,
+ 40164: 25033,
+ 40165: 25079,
+ 40166: 25032,
+ 40167: 25027,
+ 40168: 25030,
+ 40169: 25018,
+ 40170: 25035,
+ 40171: 32633,
+ 40172: 25037,
+ 40173: 25062,
+ 40174: 25059,
+ 40175: 25078,
+ 40176: 25082,
+ 40177: 25076,
+ 40178: 25087,
+ 40179: 25085,
+ 40180: 25084,
+ 40181: 25086,
+ 40182: 25088,
+ 40183: 25096,
+ 40184: 25097,
+ 40185: 25101,
+ 40186: 25100,
+ 40187: 25108,
+ 40188: 25115,
+ 40256: 25118,
+ 40257: 25121,
+ 40258: 25130,
+ 40259: 25134,
+ 40260: 25136,
+ 40261: 25138,
+ 40262: 25139,
+ 40263: 25153,
+ 40264: 25166,
+ 40265: 25182,
+ 40266: 25187,
+ 40267: 25179,
+ 40268: 25184,
+ 40269: 25192,
+ 40270: 25212,
+ 40271: 25218,
+ 40272: 25225,
+ 40273: 25214,
+ 40274: 25234,
+ 40275: 25235,
+ 40276: 25238,
+ 40277: 25300,
+ 40278: 25219,
+ 40279: 25236,
+ 40280: 25303,
+ 40281: 25297,
+ 40282: 25275,
+ 40283: 25295,
+ 40284: 25343,
+ 40285: 25286,
+ 40286: 25812,
+ 40287: 25288,
+ 40288: 25308,
+ 40289: 25292,
+ 40290: 25290,
+ 40291: 25282,
+ 40292: 25287,
+ 40293: 25243,
+ 40294: 25289,
+ 40295: 25356,
+ 40296: 25326,
+ 40297: 25329,
+ 40298: 25383,
+ 40299: 25346,
+ 40300: 25352,
+ 40301: 25327,
+ 40302: 25333,
+ 40303: 25424,
+ 40304: 25406,
+ 40305: 25421,
+ 40306: 25628,
+ 40307: 25423,
+ 40308: 25494,
+ 40309: 25486,
+ 40310: 25472,
+ 40311: 25515,
+ 40312: 25462,
+ 40313: 25507,
+ 40314: 25487,
+ 40315: 25481,
+ 40316: 25503,
+ 40317: 25525,
+ 40318: 25451,
+ 40320: 25449,
+ 40321: 25534,
+ 40322: 25577,
+ 40323: 25536,
+ 40324: 25542,
+ 40325: 25571,
+ 40326: 25545,
+ 40327: 25554,
+ 40328: 25590,
+ 40329: 25540,
+ 40330: 25622,
+ 40331: 25652,
+ 40332: 25606,
+ 40333: 25619,
+ 40334: 25638,
+ 40335: 25654,
+ 40336: 25885,
+ 40337: 25623,
+ 40338: 25640,
+ 40339: 25615,
+ 40340: 25703,
+ 40341: 25711,
+ 40342: 25718,
+ 40343: 25678,
+ 40344: 25898,
+ 40345: 25749,
+ 40346: 25747,
+ 40347: 25765,
+ 40348: 25769,
+ 40349: 25736,
+ 40350: 25788,
+ 40351: 25818,
+ 40352: 25810,
+ 40353: 25797,
+ 40354: 25799,
+ 40355: 25787,
+ 40356: 25816,
+ 40357: 25794,
+ 40358: 25841,
+ 40359: 25831,
+ 40360: 33289,
+ 40361: 25824,
+ 40362: 25825,
+ 40363: 25260,
+ 40364: 25827,
+ 40365: 25839,
+ 40366: 25900,
+ 40367: 25846,
+ 40368: 25844,
+ 40369: 25842,
+ 40370: 25850,
+ 40371: 25856,
+ 40372: 25853,
+ 40373: 25880,
+ 40374: 25884,
+ 40375: 25861,
+ 40376: 25892,
+ 40377: 25891,
+ 40378: 25899,
+ 40379: 25908,
+ 40380: 25909,
+ 40381: 25911,
+ 40382: 25910,
+ 40383: 25912,
+ 40384: 30027,
+ 40385: 25928,
+ 40386: 25942,
+ 40387: 25941,
+ 40388: 25933,
+ 40389: 25944,
+ 40390: 25950,
+ 40391: 25949,
+ 40392: 25970,
+ 40393: 25976,
+ 40394: 25986,
+ 40395: 25987,
+ 40396: 35722,
+ 40397: 26011,
+ 40398: 26015,
+ 40399: 26027,
+ 40400: 26039,
+ 40401: 26051,
+ 40402: 26054,
+ 40403: 26049,
+ 40404: 26052,
+ 40405: 26060,
+ 40406: 26066,
+ 40407: 26075,
+ 40408: 26073,
+ 40409: 26080,
+ 40410: 26081,
+ 40411: 26097,
+ 40412: 26482,
+ 40413: 26122,
+ 40414: 26115,
+ 40415: 26107,
+ 40416: 26483,
+ 40417: 26165,
+ 40418: 26166,
+ 40419: 26164,
+ 40420: 26140,
+ 40421: 26191,
+ 40422: 26180,
+ 40423: 26185,
+ 40424: 26177,
+ 40425: 26206,
+ 40426: 26205,
+ 40427: 26212,
+ 40428: 26215,
+ 40429: 26216,
+ 40430: 26207,
+ 40431: 26210,
+ 40432: 26224,
+ 40433: 26243,
+ 40434: 26248,
+ 40435: 26254,
+ 40436: 26249,
+ 40437: 26244,
+ 40438: 26264,
+ 40439: 26269,
+ 40440: 26305,
+ 40441: 26297,
+ 40442: 26313,
+ 40443: 26302,
+ 40444: 26300,
+ 40512: 26308,
+ 40513: 26296,
+ 40514: 26326,
+ 40515: 26330,
+ 40516: 26336,
+ 40517: 26175,
+ 40518: 26342,
+ 40519: 26345,
+ 40520: 26352,
+ 40521: 26357,
+ 40522: 26359,
+ 40523: 26383,
+ 40524: 26390,
+ 40525: 26398,
+ 40526: 26406,
+ 40527: 26407,
+ 40528: 38712,
+ 40529: 26414,
+ 40530: 26431,
+ 40531: 26422,
+ 40532: 26433,
+ 40533: 26424,
+ 40534: 26423,
+ 40535: 26438,
+ 40536: 26462,
+ 40537: 26464,
+ 40538: 26457,
+ 40539: 26467,
+ 40540: 26468,
+ 40541: 26505,
+ 40542: 26480,
+ 40543: 26537,
+ 40544: 26492,
+ 40545: 26474,
+ 40546: 26508,
+ 40547: 26507,
+ 40548: 26534,
+ 40549: 26529,
+ 40550: 26501,
+ 40551: 26551,
+ 40552: 26607,
+ 40553: 26548,
+ 40554: 26604,
+ 40555: 26547,
+ 40556: 26601,
+ 40557: 26552,
+ 40558: 26596,
+ 40559: 26590,
+ 40560: 26589,
+ 40561: 26594,
+ 40562: 26606,
+ 40563: 26553,
+ 40564: 26574,
+ 40565: 26566,
+ 40566: 26599,
+ 40567: 27292,
+ 40568: 26654,
+ 40569: 26694,
+ 40570: 26665,
+ 40571: 26688,
+ 40572: 26701,
+ 40573: 26674,
+ 40574: 26702,
+ 40576: 26803,
+ 40577: 26667,
+ 40578: 26713,
+ 40579: 26723,
+ 40580: 26743,
+ 40581: 26751,
+ 40582: 26783,
+ 40583: 26767,
+ 40584: 26797,
+ 40585: 26772,
+ 40586: 26781,
+ 40587: 26779,
+ 40588: 26755,
+ 40589: 27310,
+ 40590: 26809,
+ 40591: 26740,
+ 40592: 26805,
+ 40593: 26784,
+ 40594: 26810,
+ 40595: 26895,
+ 40596: 26765,
+ 40597: 26750,
+ 40598: 26881,
+ 40599: 26826,
+ 40600: 26888,
+ 40601: 26840,
+ 40602: 26914,
+ 40603: 26918,
+ 40604: 26849,
+ 40605: 26892,
+ 40606: 26829,
+ 40607: 26836,
+ 40608: 26855,
+ 40609: 26837,
+ 40610: 26934,
+ 40611: 26898,
+ 40612: 26884,
+ 40613: 26839,
+ 40614: 26851,
+ 40615: 26917,
+ 40616: 26873,
+ 40617: 26848,
+ 40618: 26863,
+ 40619: 26920,
+ 40620: 26922,
+ 40621: 26906,
+ 40622: 26915,
+ 40623: 26913,
+ 40624: 26822,
+ 40625: 27001,
+ 40626: 26999,
+ 40627: 26972,
+ 40628: 27e3,
+ 40629: 26987,
+ 40630: 26964,
+ 40631: 27006,
+ 40632: 26990,
+ 40633: 26937,
+ 40634: 26996,
+ 40635: 26941,
+ 40636: 26969,
+ 40637: 26928,
+ 40638: 26977,
+ 40639: 26974,
+ 40640: 26973,
+ 40641: 27009,
+ 40642: 26986,
+ 40643: 27058,
+ 40644: 27054,
+ 40645: 27088,
+ 40646: 27071,
+ 40647: 27073,
+ 40648: 27091,
+ 40649: 27070,
+ 40650: 27086,
+ 40651: 23528,
+ 40652: 27082,
+ 40653: 27101,
+ 40654: 27067,
+ 40655: 27075,
+ 40656: 27047,
+ 40657: 27182,
+ 40658: 27025,
+ 40659: 27040,
+ 40660: 27036,
+ 40661: 27029,
+ 40662: 27060,
+ 40663: 27102,
+ 40664: 27112,
+ 40665: 27138,
+ 40666: 27163,
+ 40667: 27135,
+ 40668: 27402,
+ 40669: 27129,
+ 40670: 27122,
+ 40671: 27111,
+ 40672: 27141,
+ 40673: 27057,
+ 40674: 27166,
+ 40675: 27117,
+ 40676: 27156,
+ 40677: 27115,
+ 40678: 27146,
+ 40679: 27154,
+ 40680: 27329,
+ 40681: 27171,
+ 40682: 27155,
+ 40683: 27204,
+ 40684: 27148,
+ 40685: 27250,
+ 40686: 27190,
+ 40687: 27256,
+ 40688: 27207,
+ 40689: 27234,
+ 40690: 27225,
+ 40691: 27238,
+ 40692: 27208,
+ 40693: 27192,
+ 40694: 27170,
+ 40695: 27280,
+ 40696: 27277,
+ 40697: 27296,
+ 40698: 27268,
+ 40699: 27298,
+ 40700: 27299,
+ 40768: 27287,
+ 40769: 34327,
+ 40770: 27323,
+ 40771: 27331,
+ 40772: 27330,
+ 40773: 27320,
+ 40774: 27315,
+ 40775: 27308,
+ 40776: 27358,
+ 40777: 27345,
+ 40778: 27359,
+ 40779: 27306,
+ 40780: 27354,
+ 40781: 27370,
+ 40782: 27387,
+ 40783: 27397,
+ 40784: 34326,
+ 40785: 27386,
+ 40786: 27410,
+ 40787: 27414,
+ 40788: 39729,
+ 40789: 27423,
+ 40790: 27448,
+ 40791: 27447,
+ 40792: 30428,
+ 40793: 27449,
+ 40794: 39150,
+ 40795: 27463,
+ 40796: 27459,
+ 40797: 27465,
+ 40798: 27472,
+ 40799: 27481,
+ 40800: 27476,
+ 40801: 27483,
+ 40802: 27487,
+ 40803: 27489,
+ 40804: 27512,
+ 40805: 27513,
+ 40806: 27519,
+ 40807: 27520,
+ 40808: 27524,
+ 40809: 27523,
+ 40810: 27533,
+ 40811: 27544,
+ 40812: 27541,
+ 40813: 27550,
+ 40814: 27556,
+ 40815: 27562,
+ 40816: 27563,
+ 40817: 27567,
+ 40818: 27570,
+ 40819: 27569,
+ 40820: 27571,
+ 40821: 27575,
+ 40822: 27580,
+ 40823: 27590,
+ 40824: 27595,
+ 40825: 27603,
+ 40826: 27615,
+ 40827: 27628,
+ 40828: 27627,
+ 40829: 27635,
+ 40830: 27631,
+ 40832: 40638,
+ 40833: 27656,
+ 40834: 27667,
+ 40835: 27668,
+ 40836: 27675,
+ 40837: 27684,
+ 40838: 27683,
+ 40839: 27742,
+ 40840: 27733,
+ 40841: 27746,
+ 40842: 27754,
+ 40843: 27778,
+ 40844: 27789,
+ 40845: 27802,
+ 40846: 27777,
+ 40847: 27803,
+ 40848: 27774,
+ 40849: 27752,
+ 40850: 27763,
+ 40851: 27794,
+ 40852: 27792,
+ 40853: 27844,
+ 40854: 27889,
+ 40855: 27859,
+ 40856: 27837,
+ 40857: 27863,
+ 40858: 27845,
+ 40859: 27869,
+ 40860: 27822,
+ 40861: 27825,
+ 40862: 27838,
+ 40863: 27834,
+ 40864: 27867,
+ 40865: 27887,
+ 40866: 27865,
+ 40867: 27882,
+ 40868: 27935,
+ 40869: 34893,
+ 40870: 27958,
+ 40871: 27947,
+ 40872: 27965,
+ 40873: 27960,
+ 40874: 27929,
+ 40875: 27957,
+ 40876: 27955,
+ 40877: 27922,
+ 40878: 27916,
+ 40879: 28003,
+ 40880: 28051,
+ 40881: 28004,
+ 40882: 27994,
+ 40883: 28025,
+ 40884: 27993,
+ 40885: 28046,
+ 40886: 28053,
+ 40887: 28644,
+ 40888: 28037,
+ 40889: 28153,
+ 40890: 28181,
+ 40891: 28170,
+ 40892: 28085,
+ 40893: 28103,
+ 40894: 28134,
+ 40895: 28088,
+ 40896: 28102,
+ 40897: 28140,
+ 40898: 28126,
+ 40899: 28108,
+ 40900: 28136,
+ 40901: 28114,
+ 40902: 28101,
+ 40903: 28154,
+ 40904: 28121,
+ 40905: 28132,
+ 40906: 28117,
+ 40907: 28138,
+ 40908: 28142,
+ 40909: 28205,
+ 40910: 28270,
+ 40911: 28206,
+ 40912: 28185,
+ 40913: 28274,
+ 40914: 28255,
+ 40915: 28222,
+ 40916: 28195,
+ 40917: 28267,
+ 40918: 28203,
+ 40919: 28278,
+ 40920: 28237,
+ 40921: 28191,
+ 40922: 28227,
+ 40923: 28218,
+ 40924: 28238,
+ 40925: 28196,
+ 40926: 28415,
+ 40927: 28189,
+ 40928: 28216,
+ 40929: 28290,
+ 40930: 28330,
+ 40931: 28312,
+ 40932: 28361,
+ 40933: 28343,
+ 40934: 28371,
+ 40935: 28349,
+ 40936: 28335,
+ 40937: 28356,
+ 40938: 28338,
+ 40939: 28372,
+ 40940: 28373,
+ 40941: 28303,
+ 40942: 28325,
+ 40943: 28354,
+ 40944: 28319,
+ 40945: 28481,
+ 40946: 28433,
+ 40947: 28748,
+ 40948: 28396,
+ 40949: 28408,
+ 40950: 28414,
+ 40951: 28479,
+ 40952: 28402,
+ 40953: 28465,
+ 40954: 28399,
+ 40955: 28466,
+ 40956: 28364,
+ 57408: 28478,
+ 57409: 28435,
+ 57410: 28407,
+ 57411: 28550,
+ 57412: 28538,
+ 57413: 28536,
+ 57414: 28545,
+ 57415: 28544,
+ 57416: 28527,
+ 57417: 28507,
+ 57418: 28659,
+ 57419: 28525,
+ 57420: 28546,
+ 57421: 28540,
+ 57422: 28504,
+ 57423: 28558,
+ 57424: 28561,
+ 57425: 28610,
+ 57426: 28518,
+ 57427: 28595,
+ 57428: 28579,
+ 57429: 28577,
+ 57430: 28580,
+ 57431: 28601,
+ 57432: 28614,
+ 57433: 28586,
+ 57434: 28639,
+ 57435: 28629,
+ 57436: 28652,
+ 57437: 28628,
+ 57438: 28632,
+ 57439: 28657,
+ 57440: 28654,
+ 57441: 28635,
+ 57442: 28681,
+ 57443: 28683,
+ 57444: 28666,
+ 57445: 28689,
+ 57446: 28673,
+ 57447: 28687,
+ 57448: 28670,
+ 57449: 28699,
+ 57450: 28698,
+ 57451: 28532,
+ 57452: 28701,
+ 57453: 28696,
+ 57454: 28703,
+ 57455: 28720,
+ 57456: 28734,
+ 57457: 28722,
+ 57458: 28753,
+ 57459: 28771,
+ 57460: 28825,
+ 57461: 28818,
+ 57462: 28847,
+ 57463: 28913,
+ 57464: 28844,
+ 57465: 28856,
+ 57466: 28851,
+ 57467: 28846,
+ 57468: 28895,
+ 57469: 28875,
+ 57470: 28893,
+ 57472: 28889,
+ 57473: 28937,
+ 57474: 28925,
+ 57475: 28956,
+ 57476: 28953,
+ 57477: 29029,
+ 57478: 29013,
+ 57479: 29064,
+ 57480: 29030,
+ 57481: 29026,
+ 57482: 29004,
+ 57483: 29014,
+ 57484: 29036,
+ 57485: 29071,
+ 57486: 29179,
+ 57487: 29060,
+ 57488: 29077,
+ 57489: 29096,
+ 57490: 29100,
+ 57491: 29143,
+ 57492: 29113,
+ 57493: 29118,
+ 57494: 29138,
+ 57495: 29129,
+ 57496: 29140,
+ 57497: 29134,
+ 57498: 29152,
+ 57499: 29164,
+ 57500: 29159,
+ 57501: 29173,
+ 57502: 29180,
+ 57503: 29177,
+ 57504: 29183,
+ 57505: 29197,
+ 57506: 29200,
+ 57507: 29211,
+ 57508: 29224,
+ 57509: 29229,
+ 57510: 29228,
+ 57511: 29232,
+ 57512: 29234,
+ 57513: 29243,
+ 57514: 29244,
+ 57515: 29247,
+ 57516: 29248,
+ 57517: 29254,
+ 57518: 29259,
+ 57519: 29272,
+ 57520: 29300,
+ 57521: 29310,
+ 57522: 29314,
+ 57523: 29313,
+ 57524: 29319,
+ 57525: 29330,
+ 57526: 29334,
+ 57527: 29346,
+ 57528: 29351,
+ 57529: 29369,
+ 57530: 29362,
+ 57531: 29379,
+ 57532: 29382,
+ 57533: 29380,
+ 57534: 29390,
+ 57535: 29394,
+ 57536: 29410,
+ 57537: 29408,
+ 57538: 29409,
+ 57539: 29433,
+ 57540: 29431,
+ 57541: 20495,
+ 57542: 29463,
+ 57543: 29450,
+ 57544: 29468,
+ 57545: 29462,
+ 57546: 29469,
+ 57547: 29492,
+ 57548: 29487,
+ 57549: 29481,
+ 57550: 29477,
+ 57551: 29502,
+ 57552: 29518,
+ 57553: 29519,
+ 57554: 40664,
+ 57555: 29527,
+ 57556: 29546,
+ 57557: 29544,
+ 57558: 29552,
+ 57559: 29560,
+ 57560: 29557,
+ 57561: 29563,
+ 57562: 29562,
+ 57563: 29640,
+ 57564: 29619,
+ 57565: 29646,
+ 57566: 29627,
+ 57567: 29632,
+ 57568: 29669,
+ 57569: 29678,
+ 57570: 29662,
+ 57571: 29858,
+ 57572: 29701,
+ 57573: 29807,
+ 57574: 29733,
+ 57575: 29688,
+ 57576: 29746,
+ 57577: 29754,
+ 57578: 29781,
+ 57579: 29759,
+ 57580: 29791,
+ 57581: 29785,
+ 57582: 29761,
+ 57583: 29788,
+ 57584: 29801,
+ 57585: 29808,
+ 57586: 29795,
+ 57587: 29802,
+ 57588: 29814,
+ 57589: 29822,
+ 57590: 29835,
+ 57591: 29854,
+ 57592: 29863,
+ 57593: 29898,
+ 57594: 29903,
+ 57595: 29908,
+ 57596: 29681,
+ 57664: 29920,
+ 57665: 29923,
+ 57666: 29927,
+ 57667: 29929,
+ 57668: 29934,
+ 57669: 29938,
+ 57670: 29936,
+ 57671: 29937,
+ 57672: 29944,
+ 57673: 29943,
+ 57674: 29956,
+ 57675: 29955,
+ 57676: 29957,
+ 57677: 29964,
+ 57678: 29966,
+ 57679: 29965,
+ 57680: 29973,
+ 57681: 29971,
+ 57682: 29982,
+ 57683: 29990,
+ 57684: 29996,
+ 57685: 30012,
+ 57686: 30020,
+ 57687: 30029,
+ 57688: 30026,
+ 57689: 30025,
+ 57690: 30043,
+ 57691: 30022,
+ 57692: 30042,
+ 57693: 30057,
+ 57694: 30052,
+ 57695: 30055,
+ 57696: 30059,
+ 57697: 30061,
+ 57698: 30072,
+ 57699: 30070,
+ 57700: 30086,
+ 57701: 30087,
+ 57702: 30068,
+ 57703: 30090,
+ 57704: 30089,
+ 57705: 30082,
+ 57706: 30100,
+ 57707: 30106,
+ 57708: 30109,
+ 57709: 30117,
+ 57710: 30115,
+ 57711: 30146,
+ 57712: 30131,
+ 57713: 30147,
+ 57714: 30133,
+ 57715: 30141,
+ 57716: 30136,
+ 57717: 30140,
+ 57718: 30129,
+ 57719: 30157,
+ 57720: 30154,
+ 57721: 30162,
+ 57722: 30169,
+ 57723: 30179,
+ 57724: 30174,
+ 57725: 30206,
+ 57726: 30207,
+ 57728: 30204,
+ 57729: 30209,
+ 57730: 30192,
+ 57731: 30202,
+ 57732: 30194,
+ 57733: 30195,
+ 57734: 30219,
+ 57735: 30221,
+ 57736: 30217,
+ 57737: 30239,
+ 57738: 30247,
+ 57739: 30240,
+ 57740: 30241,
+ 57741: 30242,
+ 57742: 30244,
+ 57743: 30260,
+ 57744: 30256,
+ 57745: 30267,
+ 57746: 30279,
+ 57747: 30280,
+ 57748: 30278,
+ 57749: 30300,
+ 57750: 30296,
+ 57751: 30305,
+ 57752: 30306,
+ 57753: 30312,
+ 57754: 30313,
+ 57755: 30314,
+ 57756: 30311,
+ 57757: 30316,
+ 57758: 30320,
+ 57759: 30322,
+ 57760: 30326,
+ 57761: 30328,
+ 57762: 30332,
+ 57763: 30336,
+ 57764: 30339,
+ 57765: 30344,
+ 57766: 30347,
+ 57767: 30350,
+ 57768: 30358,
+ 57769: 30355,
+ 57770: 30361,
+ 57771: 30362,
+ 57772: 30384,
+ 57773: 30388,
+ 57774: 30392,
+ 57775: 30393,
+ 57776: 30394,
+ 57777: 30402,
+ 57778: 30413,
+ 57779: 30422,
+ 57780: 30418,
+ 57781: 30430,
+ 57782: 30433,
+ 57783: 30437,
+ 57784: 30439,
+ 57785: 30442,
+ 57786: 34351,
+ 57787: 30459,
+ 57788: 30472,
+ 57789: 30471,
+ 57790: 30468,
+ 57791: 30505,
+ 57792: 30500,
+ 57793: 30494,
+ 57794: 30501,
+ 57795: 30502,
+ 57796: 30491,
+ 57797: 30519,
+ 57798: 30520,
+ 57799: 30535,
+ 57800: 30554,
+ 57801: 30568,
+ 57802: 30571,
+ 57803: 30555,
+ 57804: 30565,
+ 57805: 30591,
+ 57806: 30590,
+ 57807: 30585,
+ 57808: 30606,
+ 57809: 30603,
+ 57810: 30609,
+ 57811: 30624,
+ 57812: 30622,
+ 57813: 30640,
+ 57814: 30646,
+ 57815: 30649,
+ 57816: 30655,
+ 57817: 30652,
+ 57818: 30653,
+ 57819: 30651,
+ 57820: 30663,
+ 57821: 30669,
+ 57822: 30679,
+ 57823: 30682,
+ 57824: 30684,
+ 57825: 30691,
+ 57826: 30702,
+ 57827: 30716,
+ 57828: 30732,
+ 57829: 30738,
+ 57830: 31014,
+ 57831: 30752,
+ 57832: 31018,
+ 57833: 30789,
+ 57834: 30862,
+ 57835: 30836,
+ 57836: 30854,
+ 57837: 30844,
+ 57838: 30874,
+ 57839: 30860,
+ 57840: 30883,
+ 57841: 30901,
+ 57842: 30890,
+ 57843: 30895,
+ 57844: 30929,
+ 57845: 30918,
+ 57846: 30923,
+ 57847: 30932,
+ 57848: 30910,
+ 57849: 30908,
+ 57850: 30917,
+ 57851: 30922,
+ 57852: 30956,
+ 57920: 30951,
+ 57921: 30938,
+ 57922: 30973,
+ 57923: 30964,
+ 57924: 30983,
+ 57925: 30994,
+ 57926: 30993,
+ 57927: 31001,
+ 57928: 31020,
+ 57929: 31019,
+ 57930: 31040,
+ 57931: 31072,
+ 57932: 31063,
+ 57933: 31071,
+ 57934: 31066,
+ 57935: 31061,
+ 57936: 31059,
+ 57937: 31098,
+ 57938: 31103,
+ 57939: 31114,
+ 57940: 31133,
+ 57941: 31143,
+ 57942: 40779,
+ 57943: 31146,
+ 57944: 31150,
+ 57945: 31155,
+ 57946: 31161,
+ 57947: 31162,
+ 57948: 31177,
+ 57949: 31189,
+ 57950: 31207,
+ 57951: 31212,
+ 57952: 31201,
+ 57953: 31203,
+ 57954: 31240,
+ 57955: 31245,
+ 57956: 31256,
+ 57957: 31257,
+ 57958: 31264,
+ 57959: 31263,
+ 57960: 31104,
+ 57961: 31281,
+ 57962: 31291,
+ 57963: 31294,
+ 57964: 31287,
+ 57965: 31299,
+ 57966: 31319,
+ 57967: 31305,
+ 57968: 31329,
+ 57969: 31330,
+ 57970: 31337,
+ 57971: 40861,
+ 57972: 31344,
+ 57973: 31353,
+ 57974: 31357,
+ 57975: 31368,
+ 57976: 31383,
+ 57977: 31381,
+ 57978: 31384,
+ 57979: 31382,
+ 57980: 31401,
+ 57981: 31432,
+ 57982: 31408,
+ 57984: 31414,
+ 57985: 31429,
+ 57986: 31428,
+ 57987: 31423,
+ 57988: 36995,
+ 57989: 31431,
+ 57990: 31434,
+ 57991: 31437,
+ 57992: 31439,
+ 57993: 31445,
+ 57994: 31443,
+ 57995: 31449,
+ 57996: 31450,
+ 57997: 31453,
+ 57998: 31457,
+ 57999: 31458,
+ 58e3: 31462,
+ 58001: 31469,
+ 58002: 31472,
+ 58003: 31490,
+ 58004: 31503,
+ 58005: 31498,
+ 58006: 31494,
+ 58007: 31539,
+ 58008: 31512,
+ 58009: 31513,
+ 58010: 31518,
+ 58011: 31541,
+ 58012: 31528,
+ 58013: 31542,
+ 58014: 31568,
+ 58015: 31610,
+ 58016: 31492,
+ 58017: 31565,
+ 58018: 31499,
+ 58019: 31564,
+ 58020: 31557,
+ 58021: 31605,
+ 58022: 31589,
+ 58023: 31604,
+ 58024: 31591,
+ 58025: 31600,
+ 58026: 31601,
+ 58027: 31596,
+ 58028: 31598,
+ 58029: 31645,
+ 58030: 31640,
+ 58031: 31647,
+ 58032: 31629,
+ 58033: 31644,
+ 58034: 31642,
+ 58035: 31627,
+ 58036: 31634,
+ 58037: 31631,
+ 58038: 31581,
+ 58039: 31641,
+ 58040: 31691,
+ 58041: 31681,
+ 58042: 31692,
+ 58043: 31695,
+ 58044: 31668,
+ 58045: 31686,
+ 58046: 31709,
+ 58047: 31721,
+ 58048: 31761,
+ 58049: 31764,
+ 58050: 31718,
+ 58051: 31717,
+ 58052: 31840,
+ 58053: 31744,
+ 58054: 31751,
+ 58055: 31763,
+ 58056: 31731,
+ 58057: 31735,
+ 58058: 31767,
+ 58059: 31757,
+ 58060: 31734,
+ 58061: 31779,
+ 58062: 31783,
+ 58063: 31786,
+ 58064: 31775,
+ 58065: 31799,
+ 58066: 31787,
+ 58067: 31805,
+ 58068: 31820,
+ 58069: 31811,
+ 58070: 31828,
+ 58071: 31823,
+ 58072: 31808,
+ 58073: 31824,
+ 58074: 31832,
+ 58075: 31839,
+ 58076: 31844,
+ 58077: 31830,
+ 58078: 31845,
+ 58079: 31852,
+ 58080: 31861,
+ 58081: 31875,
+ 58082: 31888,
+ 58083: 31908,
+ 58084: 31917,
+ 58085: 31906,
+ 58086: 31915,
+ 58087: 31905,
+ 58088: 31912,
+ 58089: 31923,
+ 58090: 31922,
+ 58091: 31921,
+ 58092: 31918,
+ 58093: 31929,
+ 58094: 31933,
+ 58095: 31936,
+ 58096: 31941,
+ 58097: 31938,
+ 58098: 31960,
+ 58099: 31954,
+ 58100: 31964,
+ 58101: 31970,
+ 58102: 39739,
+ 58103: 31983,
+ 58104: 31986,
+ 58105: 31988,
+ 58106: 31990,
+ 58107: 31994,
+ 58108: 32006,
+ 58176: 32002,
+ 58177: 32028,
+ 58178: 32021,
+ 58179: 32010,
+ 58180: 32069,
+ 58181: 32075,
+ 58182: 32046,
+ 58183: 32050,
+ 58184: 32063,
+ 58185: 32053,
+ 58186: 32070,
+ 58187: 32115,
+ 58188: 32086,
+ 58189: 32078,
+ 58190: 32114,
+ 58191: 32104,
+ 58192: 32110,
+ 58193: 32079,
+ 58194: 32099,
+ 58195: 32147,
+ 58196: 32137,
+ 58197: 32091,
+ 58198: 32143,
+ 58199: 32125,
+ 58200: 32155,
+ 58201: 32186,
+ 58202: 32174,
+ 58203: 32163,
+ 58204: 32181,
+ 58205: 32199,
+ 58206: 32189,
+ 58207: 32171,
+ 58208: 32317,
+ 58209: 32162,
+ 58210: 32175,
+ 58211: 32220,
+ 58212: 32184,
+ 58213: 32159,
+ 58214: 32176,
+ 58215: 32216,
+ 58216: 32221,
+ 58217: 32228,
+ 58218: 32222,
+ 58219: 32251,
+ 58220: 32242,
+ 58221: 32225,
+ 58222: 32261,
+ 58223: 32266,
+ 58224: 32291,
+ 58225: 32289,
+ 58226: 32274,
+ 58227: 32305,
+ 58228: 32287,
+ 58229: 32265,
+ 58230: 32267,
+ 58231: 32290,
+ 58232: 32326,
+ 58233: 32358,
+ 58234: 32315,
+ 58235: 32309,
+ 58236: 32313,
+ 58237: 32323,
+ 58238: 32311,
+ 58240: 32306,
+ 58241: 32314,
+ 58242: 32359,
+ 58243: 32349,
+ 58244: 32342,
+ 58245: 32350,
+ 58246: 32345,
+ 58247: 32346,
+ 58248: 32377,
+ 58249: 32362,
+ 58250: 32361,
+ 58251: 32380,
+ 58252: 32379,
+ 58253: 32387,
+ 58254: 32213,
+ 58255: 32381,
+ 58256: 36782,
+ 58257: 32383,
+ 58258: 32392,
+ 58259: 32393,
+ 58260: 32396,
+ 58261: 32402,
+ 58262: 32400,
+ 58263: 32403,
+ 58264: 32404,
+ 58265: 32406,
+ 58266: 32398,
+ 58267: 32411,
+ 58268: 32412,
+ 58269: 32568,
+ 58270: 32570,
+ 58271: 32581,
+ 58272: 32588,
+ 58273: 32589,
+ 58274: 32590,
+ 58275: 32592,
+ 58276: 32593,
+ 58277: 32597,
+ 58278: 32596,
+ 58279: 32600,
+ 58280: 32607,
+ 58281: 32608,
+ 58282: 32616,
+ 58283: 32617,
+ 58284: 32615,
+ 58285: 32632,
+ 58286: 32642,
+ 58287: 32646,
+ 58288: 32643,
+ 58289: 32648,
+ 58290: 32647,
+ 58291: 32652,
+ 58292: 32660,
+ 58293: 32670,
+ 58294: 32669,
+ 58295: 32666,
+ 58296: 32675,
+ 58297: 32687,
+ 58298: 32690,
+ 58299: 32697,
+ 58300: 32686,
+ 58301: 32694,
+ 58302: 32696,
+ 58303: 35697,
+ 58304: 32709,
+ 58305: 32710,
+ 58306: 32714,
+ 58307: 32725,
+ 58308: 32724,
+ 58309: 32737,
+ 58310: 32742,
+ 58311: 32745,
+ 58312: 32755,
+ 58313: 32761,
+ 58314: 39132,
+ 58315: 32774,
+ 58316: 32772,
+ 58317: 32779,
+ 58318: 32786,
+ 58319: 32792,
+ 58320: 32793,
+ 58321: 32796,
+ 58322: 32801,
+ 58323: 32808,
+ 58324: 32831,
+ 58325: 32827,
+ 58326: 32842,
+ 58327: 32838,
+ 58328: 32850,
+ 58329: 32856,
+ 58330: 32858,
+ 58331: 32863,
+ 58332: 32866,
+ 58333: 32872,
+ 58334: 32883,
+ 58335: 32882,
+ 58336: 32880,
+ 58337: 32886,
+ 58338: 32889,
+ 58339: 32893,
+ 58340: 32895,
+ 58341: 32900,
+ 58342: 32902,
+ 58343: 32901,
+ 58344: 32923,
+ 58345: 32915,
+ 58346: 32922,
+ 58347: 32941,
+ 58348: 20880,
+ 58349: 32940,
+ 58350: 32987,
+ 58351: 32997,
+ 58352: 32985,
+ 58353: 32989,
+ 58354: 32964,
+ 58355: 32986,
+ 58356: 32982,
+ 58357: 33033,
+ 58358: 33007,
+ 58359: 33009,
+ 58360: 33051,
+ 58361: 33065,
+ 58362: 33059,
+ 58363: 33071,
+ 58364: 33099,
+ 58432: 38539,
+ 58433: 33094,
+ 58434: 33086,
+ 58435: 33107,
+ 58436: 33105,
+ 58437: 33020,
+ 58438: 33137,
+ 58439: 33134,
+ 58440: 33125,
+ 58441: 33126,
+ 58442: 33140,
+ 58443: 33155,
+ 58444: 33160,
+ 58445: 33162,
+ 58446: 33152,
+ 58447: 33154,
+ 58448: 33184,
+ 58449: 33173,
+ 58450: 33188,
+ 58451: 33187,
+ 58452: 33119,
+ 58453: 33171,
+ 58454: 33193,
+ 58455: 33200,
+ 58456: 33205,
+ 58457: 33214,
+ 58458: 33208,
+ 58459: 33213,
+ 58460: 33216,
+ 58461: 33218,
+ 58462: 33210,
+ 58463: 33225,
+ 58464: 33229,
+ 58465: 33233,
+ 58466: 33241,
+ 58467: 33240,
+ 58468: 33224,
+ 58469: 33242,
+ 58470: 33247,
+ 58471: 33248,
+ 58472: 33255,
+ 58473: 33274,
+ 58474: 33275,
+ 58475: 33278,
+ 58476: 33281,
+ 58477: 33282,
+ 58478: 33285,
+ 58479: 33287,
+ 58480: 33290,
+ 58481: 33293,
+ 58482: 33296,
+ 58483: 33302,
+ 58484: 33321,
+ 58485: 33323,
+ 58486: 33336,
+ 58487: 33331,
+ 58488: 33344,
+ 58489: 33369,
+ 58490: 33368,
+ 58491: 33373,
+ 58492: 33370,
+ 58493: 33375,
+ 58494: 33380,
+ 58496: 33378,
+ 58497: 33384,
+ 58498: 33386,
+ 58499: 33387,
+ 58500: 33326,
+ 58501: 33393,
+ 58502: 33399,
+ 58503: 33400,
+ 58504: 33406,
+ 58505: 33421,
+ 58506: 33426,
+ 58507: 33451,
+ 58508: 33439,
+ 58509: 33467,
+ 58510: 33452,
+ 58511: 33505,
+ 58512: 33507,
+ 58513: 33503,
+ 58514: 33490,
+ 58515: 33524,
+ 58516: 33523,
+ 58517: 33530,
+ 58518: 33683,
+ 58519: 33539,
+ 58520: 33531,
+ 58521: 33529,
+ 58522: 33502,
+ 58523: 33542,
+ 58524: 33500,
+ 58525: 33545,
+ 58526: 33497,
+ 58527: 33589,
+ 58528: 33588,
+ 58529: 33558,
+ 58530: 33586,
+ 58531: 33585,
+ 58532: 33600,
+ 58533: 33593,
+ 58534: 33616,
+ 58535: 33605,
+ 58536: 33583,
+ 58537: 33579,
+ 58538: 33559,
+ 58539: 33560,
+ 58540: 33669,
+ 58541: 33690,
+ 58542: 33706,
+ 58543: 33695,
+ 58544: 33698,
+ 58545: 33686,
+ 58546: 33571,
+ 58547: 33678,
+ 58548: 33671,
+ 58549: 33674,
+ 58550: 33660,
+ 58551: 33717,
+ 58552: 33651,
+ 58553: 33653,
+ 58554: 33696,
+ 58555: 33673,
+ 58556: 33704,
+ 58557: 33780,
+ 58558: 33811,
+ 58559: 33771,
+ 58560: 33742,
+ 58561: 33789,
+ 58562: 33795,
+ 58563: 33752,
+ 58564: 33803,
+ 58565: 33729,
+ 58566: 33783,
+ 58567: 33799,
+ 58568: 33760,
+ 58569: 33778,
+ 58570: 33805,
+ 58571: 33826,
+ 58572: 33824,
+ 58573: 33725,
+ 58574: 33848,
+ 58575: 34054,
+ 58576: 33787,
+ 58577: 33901,
+ 58578: 33834,
+ 58579: 33852,
+ 58580: 34138,
+ 58581: 33924,
+ 58582: 33911,
+ 58583: 33899,
+ 58584: 33965,
+ 58585: 33902,
+ 58586: 33922,
+ 58587: 33897,
+ 58588: 33862,
+ 58589: 33836,
+ 58590: 33903,
+ 58591: 33913,
+ 58592: 33845,
+ 58593: 33994,
+ 58594: 33890,
+ 58595: 33977,
+ 58596: 33983,
+ 58597: 33951,
+ 58598: 34009,
+ 58599: 33997,
+ 58600: 33979,
+ 58601: 34010,
+ 58602: 34e3,
+ 58603: 33985,
+ 58604: 33990,
+ 58605: 34006,
+ 58606: 33953,
+ 58607: 34081,
+ 58608: 34047,
+ 58609: 34036,
+ 58610: 34071,
+ 58611: 34072,
+ 58612: 34092,
+ 58613: 34079,
+ 58614: 34069,
+ 58615: 34068,
+ 58616: 34044,
+ 58617: 34112,
+ 58618: 34147,
+ 58619: 34136,
+ 58620: 34120,
+ 58688: 34113,
+ 58689: 34306,
+ 58690: 34123,
+ 58691: 34133,
+ 58692: 34176,
+ 58693: 34212,
+ 58694: 34184,
+ 58695: 34193,
+ 58696: 34186,
+ 58697: 34216,
+ 58698: 34157,
+ 58699: 34196,
+ 58700: 34203,
+ 58701: 34282,
+ 58702: 34183,
+ 58703: 34204,
+ 58704: 34167,
+ 58705: 34174,
+ 58706: 34192,
+ 58707: 34249,
+ 58708: 34234,
+ 58709: 34255,
+ 58710: 34233,
+ 58711: 34256,
+ 58712: 34261,
+ 58713: 34269,
+ 58714: 34277,
+ 58715: 34268,
+ 58716: 34297,
+ 58717: 34314,
+ 58718: 34323,
+ 58719: 34315,
+ 58720: 34302,
+ 58721: 34298,
+ 58722: 34310,
+ 58723: 34338,
+ 58724: 34330,
+ 58725: 34352,
+ 58726: 34367,
+ 58727: 34381,
+ 58728: 20053,
+ 58729: 34388,
+ 58730: 34399,
+ 58731: 34407,
+ 58732: 34417,
+ 58733: 34451,
+ 58734: 34467,
+ 58735: 34473,
+ 58736: 34474,
+ 58737: 34443,
+ 58738: 34444,
+ 58739: 34486,
+ 58740: 34479,
+ 58741: 34500,
+ 58742: 34502,
+ 58743: 34480,
+ 58744: 34505,
+ 58745: 34851,
+ 58746: 34475,
+ 58747: 34516,
+ 58748: 34526,
+ 58749: 34537,
+ 58750: 34540,
+ 58752: 34527,
+ 58753: 34523,
+ 58754: 34543,
+ 58755: 34578,
+ 58756: 34566,
+ 58757: 34568,
+ 58758: 34560,
+ 58759: 34563,
+ 58760: 34555,
+ 58761: 34577,
+ 58762: 34569,
+ 58763: 34573,
+ 58764: 34553,
+ 58765: 34570,
+ 58766: 34612,
+ 58767: 34623,
+ 58768: 34615,
+ 58769: 34619,
+ 58770: 34597,
+ 58771: 34601,
+ 58772: 34586,
+ 58773: 34656,
+ 58774: 34655,
+ 58775: 34680,
+ 58776: 34636,
+ 58777: 34638,
+ 58778: 34676,
+ 58779: 34647,
+ 58780: 34664,
+ 58781: 34670,
+ 58782: 34649,
+ 58783: 34643,
+ 58784: 34659,
+ 58785: 34666,
+ 58786: 34821,
+ 58787: 34722,
+ 58788: 34719,
+ 58789: 34690,
+ 58790: 34735,
+ 58791: 34763,
+ 58792: 34749,
+ 58793: 34752,
+ 58794: 34768,
+ 58795: 38614,
+ 58796: 34731,
+ 58797: 34756,
+ 58798: 34739,
+ 58799: 34759,
+ 58800: 34758,
+ 58801: 34747,
+ 58802: 34799,
+ 58803: 34802,
+ 58804: 34784,
+ 58805: 34831,
+ 58806: 34829,
+ 58807: 34814,
+ 58808: 34806,
+ 58809: 34807,
+ 58810: 34830,
+ 58811: 34770,
+ 58812: 34833,
+ 58813: 34838,
+ 58814: 34837,
+ 58815: 34850,
+ 58816: 34849,
+ 58817: 34865,
+ 58818: 34870,
+ 58819: 34873,
+ 58820: 34855,
+ 58821: 34875,
+ 58822: 34884,
+ 58823: 34882,
+ 58824: 34898,
+ 58825: 34905,
+ 58826: 34910,
+ 58827: 34914,
+ 58828: 34923,
+ 58829: 34945,
+ 58830: 34942,
+ 58831: 34974,
+ 58832: 34933,
+ 58833: 34941,
+ 58834: 34997,
+ 58835: 34930,
+ 58836: 34946,
+ 58837: 34967,
+ 58838: 34962,
+ 58839: 34990,
+ 58840: 34969,
+ 58841: 34978,
+ 58842: 34957,
+ 58843: 34980,
+ 58844: 34992,
+ 58845: 35007,
+ 58846: 34993,
+ 58847: 35011,
+ 58848: 35012,
+ 58849: 35028,
+ 58850: 35032,
+ 58851: 35033,
+ 58852: 35037,
+ 58853: 35065,
+ 58854: 35074,
+ 58855: 35068,
+ 58856: 35060,
+ 58857: 35048,
+ 58858: 35058,
+ 58859: 35076,
+ 58860: 35084,
+ 58861: 35082,
+ 58862: 35091,
+ 58863: 35139,
+ 58864: 35102,
+ 58865: 35109,
+ 58866: 35114,
+ 58867: 35115,
+ 58868: 35137,
+ 58869: 35140,
+ 58870: 35131,
+ 58871: 35126,
+ 58872: 35128,
+ 58873: 35148,
+ 58874: 35101,
+ 58875: 35168,
+ 58876: 35166,
+ 58944: 35174,
+ 58945: 35172,
+ 58946: 35181,
+ 58947: 35178,
+ 58948: 35183,
+ 58949: 35188,
+ 58950: 35191,
+ 58951: 35198,
+ 58952: 35203,
+ 58953: 35208,
+ 58954: 35210,
+ 58955: 35219,
+ 58956: 35224,
+ 58957: 35233,
+ 58958: 35241,
+ 58959: 35238,
+ 58960: 35244,
+ 58961: 35247,
+ 58962: 35250,
+ 58963: 35258,
+ 58964: 35261,
+ 58965: 35263,
+ 58966: 35264,
+ 58967: 35290,
+ 58968: 35292,
+ 58969: 35293,
+ 58970: 35303,
+ 58971: 35316,
+ 58972: 35320,
+ 58973: 35331,
+ 58974: 35350,
+ 58975: 35344,
+ 58976: 35340,
+ 58977: 35355,
+ 58978: 35357,
+ 58979: 35365,
+ 58980: 35382,
+ 58981: 35393,
+ 58982: 35419,
+ 58983: 35410,
+ 58984: 35398,
+ 58985: 35400,
+ 58986: 35452,
+ 58987: 35437,
+ 58988: 35436,
+ 58989: 35426,
+ 58990: 35461,
+ 58991: 35458,
+ 58992: 35460,
+ 58993: 35496,
+ 58994: 35489,
+ 58995: 35473,
+ 58996: 35493,
+ 58997: 35494,
+ 58998: 35482,
+ 58999: 35491,
+ 59e3: 35524,
+ 59001: 35533,
+ 59002: 35522,
+ 59003: 35546,
+ 59004: 35563,
+ 59005: 35571,
+ 59006: 35559,
+ 59008: 35556,
+ 59009: 35569,
+ 59010: 35604,
+ 59011: 35552,
+ 59012: 35554,
+ 59013: 35575,
+ 59014: 35550,
+ 59015: 35547,
+ 59016: 35596,
+ 59017: 35591,
+ 59018: 35610,
+ 59019: 35553,
+ 59020: 35606,
+ 59021: 35600,
+ 59022: 35607,
+ 59023: 35616,
+ 59024: 35635,
+ 59025: 38827,
+ 59026: 35622,
+ 59027: 35627,
+ 59028: 35646,
+ 59029: 35624,
+ 59030: 35649,
+ 59031: 35660,
+ 59032: 35663,
+ 59033: 35662,
+ 59034: 35657,
+ 59035: 35670,
+ 59036: 35675,
+ 59037: 35674,
+ 59038: 35691,
+ 59039: 35679,
+ 59040: 35692,
+ 59041: 35695,
+ 59042: 35700,
+ 59043: 35709,
+ 59044: 35712,
+ 59045: 35724,
+ 59046: 35726,
+ 59047: 35730,
+ 59048: 35731,
+ 59049: 35734,
+ 59050: 35737,
+ 59051: 35738,
+ 59052: 35898,
+ 59053: 35905,
+ 59054: 35903,
+ 59055: 35912,
+ 59056: 35916,
+ 59057: 35918,
+ 59058: 35920,
+ 59059: 35925,
+ 59060: 35938,
+ 59061: 35948,
+ 59062: 35960,
+ 59063: 35962,
+ 59064: 35970,
+ 59065: 35977,
+ 59066: 35973,
+ 59067: 35978,
+ 59068: 35981,
+ 59069: 35982,
+ 59070: 35988,
+ 59071: 35964,
+ 59072: 35992,
+ 59073: 25117,
+ 59074: 36013,
+ 59075: 36010,
+ 59076: 36029,
+ 59077: 36018,
+ 59078: 36019,
+ 59079: 36014,
+ 59080: 36022,
+ 59081: 36040,
+ 59082: 36033,
+ 59083: 36068,
+ 59084: 36067,
+ 59085: 36058,
+ 59086: 36093,
+ 59087: 36090,
+ 59088: 36091,
+ 59089: 36100,
+ 59090: 36101,
+ 59091: 36106,
+ 59092: 36103,
+ 59093: 36111,
+ 59094: 36109,
+ 59095: 36112,
+ 59096: 40782,
+ 59097: 36115,
+ 59098: 36045,
+ 59099: 36116,
+ 59100: 36118,
+ 59101: 36199,
+ 59102: 36205,
+ 59103: 36209,
+ 59104: 36211,
+ 59105: 36225,
+ 59106: 36249,
+ 59107: 36290,
+ 59108: 36286,
+ 59109: 36282,
+ 59110: 36303,
+ 59111: 36314,
+ 59112: 36310,
+ 59113: 36300,
+ 59114: 36315,
+ 59115: 36299,
+ 59116: 36330,
+ 59117: 36331,
+ 59118: 36319,
+ 59119: 36323,
+ 59120: 36348,
+ 59121: 36360,
+ 59122: 36361,
+ 59123: 36351,
+ 59124: 36381,
+ 59125: 36382,
+ 59126: 36368,
+ 59127: 36383,
+ 59128: 36418,
+ 59129: 36405,
+ 59130: 36400,
+ 59131: 36404,
+ 59132: 36426,
+ 59200: 36423,
+ 59201: 36425,
+ 59202: 36428,
+ 59203: 36432,
+ 59204: 36424,
+ 59205: 36441,
+ 59206: 36452,
+ 59207: 36448,
+ 59208: 36394,
+ 59209: 36451,
+ 59210: 36437,
+ 59211: 36470,
+ 59212: 36466,
+ 59213: 36476,
+ 59214: 36481,
+ 59215: 36487,
+ 59216: 36485,
+ 59217: 36484,
+ 59218: 36491,
+ 59219: 36490,
+ 59220: 36499,
+ 59221: 36497,
+ 59222: 36500,
+ 59223: 36505,
+ 59224: 36522,
+ 59225: 36513,
+ 59226: 36524,
+ 59227: 36528,
+ 59228: 36550,
+ 59229: 36529,
+ 59230: 36542,
+ 59231: 36549,
+ 59232: 36552,
+ 59233: 36555,
+ 59234: 36571,
+ 59235: 36579,
+ 59236: 36604,
+ 59237: 36603,
+ 59238: 36587,
+ 59239: 36606,
+ 59240: 36618,
+ 59241: 36613,
+ 59242: 36629,
+ 59243: 36626,
+ 59244: 36633,
+ 59245: 36627,
+ 59246: 36636,
+ 59247: 36639,
+ 59248: 36635,
+ 59249: 36620,
+ 59250: 36646,
+ 59251: 36659,
+ 59252: 36667,
+ 59253: 36665,
+ 59254: 36677,
+ 59255: 36674,
+ 59256: 36670,
+ 59257: 36684,
+ 59258: 36681,
+ 59259: 36678,
+ 59260: 36686,
+ 59261: 36695,
+ 59262: 36700,
+ 59264: 36706,
+ 59265: 36707,
+ 59266: 36708,
+ 59267: 36764,
+ 59268: 36767,
+ 59269: 36771,
+ 59270: 36781,
+ 59271: 36783,
+ 59272: 36791,
+ 59273: 36826,
+ 59274: 36837,
+ 59275: 36834,
+ 59276: 36842,
+ 59277: 36847,
+ 59278: 36999,
+ 59279: 36852,
+ 59280: 36869,
+ 59281: 36857,
+ 59282: 36858,
+ 59283: 36881,
+ 59284: 36885,
+ 59285: 36897,
+ 59286: 36877,
+ 59287: 36894,
+ 59288: 36886,
+ 59289: 36875,
+ 59290: 36903,
+ 59291: 36918,
+ 59292: 36917,
+ 59293: 36921,
+ 59294: 36856,
+ 59295: 36943,
+ 59296: 36944,
+ 59297: 36945,
+ 59298: 36946,
+ 59299: 36878,
+ 59300: 36937,
+ 59301: 36926,
+ 59302: 36950,
+ 59303: 36952,
+ 59304: 36958,
+ 59305: 36968,
+ 59306: 36975,
+ 59307: 36982,
+ 59308: 38568,
+ 59309: 36978,
+ 59310: 36994,
+ 59311: 36989,
+ 59312: 36993,
+ 59313: 36992,
+ 59314: 37002,
+ 59315: 37001,
+ 59316: 37007,
+ 59317: 37032,
+ 59318: 37039,
+ 59319: 37041,
+ 59320: 37045,
+ 59321: 37090,
+ 59322: 37092,
+ 59323: 25160,
+ 59324: 37083,
+ 59325: 37122,
+ 59326: 37138,
+ 59327: 37145,
+ 59328: 37170,
+ 59329: 37168,
+ 59330: 37194,
+ 59331: 37206,
+ 59332: 37208,
+ 59333: 37219,
+ 59334: 37221,
+ 59335: 37225,
+ 59336: 37235,
+ 59337: 37234,
+ 59338: 37259,
+ 59339: 37257,
+ 59340: 37250,
+ 59341: 37282,
+ 59342: 37291,
+ 59343: 37295,
+ 59344: 37290,
+ 59345: 37301,
+ 59346: 37300,
+ 59347: 37306,
+ 59348: 37312,
+ 59349: 37313,
+ 59350: 37321,
+ 59351: 37323,
+ 59352: 37328,
+ 59353: 37334,
+ 59354: 37343,
+ 59355: 37345,
+ 59356: 37339,
+ 59357: 37372,
+ 59358: 37365,
+ 59359: 37366,
+ 59360: 37406,
+ 59361: 37375,
+ 59362: 37396,
+ 59363: 37420,
+ 59364: 37397,
+ 59365: 37393,
+ 59366: 37470,
+ 59367: 37463,
+ 59368: 37445,
+ 59369: 37449,
+ 59370: 37476,
+ 59371: 37448,
+ 59372: 37525,
+ 59373: 37439,
+ 59374: 37451,
+ 59375: 37456,
+ 59376: 37532,
+ 59377: 37526,
+ 59378: 37523,
+ 59379: 37531,
+ 59380: 37466,
+ 59381: 37583,
+ 59382: 37561,
+ 59383: 37559,
+ 59384: 37609,
+ 59385: 37647,
+ 59386: 37626,
+ 59387: 37700,
+ 59388: 37678,
+ 59456: 37657,
+ 59457: 37666,
+ 59458: 37658,
+ 59459: 37667,
+ 59460: 37690,
+ 59461: 37685,
+ 59462: 37691,
+ 59463: 37724,
+ 59464: 37728,
+ 59465: 37756,
+ 59466: 37742,
+ 59467: 37718,
+ 59468: 37808,
+ 59469: 37804,
+ 59470: 37805,
+ 59471: 37780,
+ 59472: 37817,
+ 59473: 37846,
+ 59474: 37847,
+ 59475: 37864,
+ 59476: 37861,
+ 59477: 37848,
+ 59478: 37827,
+ 59479: 37853,
+ 59480: 37840,
+ 59481: 37832,
+ 59482: 37860,
+ 59483: 37914,
+ 59484: 37908,
+ 59485: 37907,
+ 59486: 37891,
+ 59487: 37895,
+ 59488: 37904,
+ 59489: 37942,
+ 59490: 37931,
+ 59491: 37941,
+ 59492: 37921,
+ 59493: 37946,
+ 59494: 37953,
+ 59495: 37970,
+ 59496: 37956,
+ 59497: 37979,
+ 59498: 37984,
+ 59499: 37986,
+ 59500: 37982,
+ 59501: 37994,
+ 59502: 37417,
+ 59503: 38e3,
+ 59504: 38005,
+ 59505: 38007,
+ 59506: 38013,
+ 59507: 37978,
+ 59508: 38012,
+ 59509: 38014,
+ 59510: 38017,
+ 59511: 38015,
+ 59512: 38274,
+ 59513: 38279,
+ 59514: 38282,
+ 59515: 38292,
+ 59516: 38294,
+ 59517: 38296,
+ 59518: 38297,
+ 59520: 38304,
+ 59521: 38312,
+ 59522: 38311,
+ 59523: 38317,
+ 59524: 38332,
+ 59525: 38331,
+ 59526: 38329,
+ 59527: 38334,
+ 59528: 38346,
+ 59529: 28662,
+ 59530: 38339,
+ 59531: 38349,
+ 59532: 38348,
+ 59533: 38357,
+ 59534: 38356,
+ 59535: 38358,
+ 59536: 38364,
+ 59537: 38369,
+ 59538: 38373,
+ 59539: 38370,
+ 59540: 38433,
+ 59541: 38440,
+ 59542: 38446,
+ 59543: 38447,
+ 59544: 38466,
+ 59545: 38476,
+ 59546: 38479,
+ 59547: 38475,
+ 59548: 38519,
+ 59549: 38492,
+ 59550: 38494,
+ 59551: 38493,
+ 59552: 38495,
+ 59553: 38502,
+ 59554: 38514,
+ 59555: 38508,
+ 59556: 38541,
+ 59557: 38552,
+ 59558: 38549,
+ 59559: 38551,
+ 59560: 38570,
+ 59561: 38567,
+ 59562: 38577,
+ 59563: 38578,
+ 59564: 38576,
+ 59565: 38580,
+ 59566: 38582,
+ 59567: 38584,
+ 59568: 38585,
+ 59569: 38606,
+ 59570: 38603,
+ 59571: 38601,
+ 59572: 38605,
+ 59573: 35149,
+ 59574: 38620,
+ 59575: 38669,
+ 59576: 38613,
+ 59577: 38649,
+ 59578: 38660,
+ 59579: 38662,
+ 59580: 38664,
+ 59581: 38675,
+ 59582: 38670,
+ 59583: 38673,
+ 59584: 38671,
+ 59585: 38678,
+ 59586: 38681,
+ 59587: 38692,
+ 59588: 38698,
+ 59589: 38704,
+ 59590: 38713,
+ 59591: 38717,
+ 59592: 38718,
+ 59593: 38724,
+ 59594: 38726,
+ 59595: 38728,
+ 59596: 38722,
+ 59597: 38729,
+ 59598: 38748,
+ 59599: 38752,
+ 59600: 38756,
+ 59601: 38758,
+ 59602: 38760,
+ 59603: 21202,
+ 59604: 38763,
+ 59605: 38769,
+ 59606: 38777,
+ 59607: 38789,
+ 59608: 38780,
+ 59609: 38785,
+ 59610: 38778,
+ 59611: 38790,
+ 59612: 38795,
+ 59613: 38799,
+ 59614: 38800,
+ 59615: 38812,
+ 59616: 38824,
+ 59617: 38822,
+ 59618: 38819,
+ 59619: 38835,
+ 59620: 38836,
+ 59621: 38851,
+ 59622: 38854,
+ 59623: 38856,
+ 59624: 38859,
+ 59625: 38876,
+ 59626: 38893,
+ 59627: 40783,
+ 59628: 38898,
+ 59629: 31455,
+ 59630: 38902,
+ 59631: 38901,
+ 59632: 38927,
+ 59633: 38924,
+ 59634: 38968,
+ 59635: 38948,
+ 59636: 38945,
+ 59637: 38967,
+ 59638: 38973,
+ 59639: 38982,
+ 59640: 38991,
+ 59641: 38987,
+ 59642: 39019,
+ 59643: 39023,
+ 59644: 39024,
+ 59712: 39025,
+ 59713: 39028,
+ 59714: 39027,
+ 59715: 39082,
+ 59716: 39087,
+ 59717: 39089,
+ 59718: 39094,
+ 59719: 39108,
+ 59720: 39107,
+ 59721: 39110,
+ 59722: 39145,
+ 59723: 39147,
+ 59724: 39171,
+ 59725: 39177,
+ 59726: 39186,
+ 59727: 39188,
+ 59728: 39192,
+ 59729: 39201,
+ 59730: 39197,
+ 59731: 39198,
+ 59732: 39204,
+ 59733: 39200,
+ 59734: 39212,
+ 59735: 39214,
+ 59736: 39229,
+ 59737: 39230,
+ 59738: 39234,
+ 59739: 39241,
+ 59740: 39237,
+ 59741: 39248,
+ 59742: 39243,
+ 59743: 39249,
+ 59744: 39250,
+ 59745: 39244,
+ 59746: 39253,
+ 59747: 39319,
+ 59748: 39320,
+ 59749: 39333,
+ 59750: 39341,
+ 59751: 39342,
+ 59752: 39356,
+ 59753: 39391,
+ 59754: 39387,
+ 59755: 39389,
+ 59756: 39384,
+ 59757: 39377,
+ 59758: 39405,
+ 59759: 39406,
+ 59760: 39409,
+ 59761: 39410,
+ 59762: 39419,
+ 59763: 39416,
+ 59764: 39425,
+ 59765: 39439,
+ 59766: 39429,
+ 59767: 39394,
+ 59768: 39449,
+ 59769: 39467,
+ 59770: 39479,
+ 59771: 39493,
+ 59772: 39490,
+ 59773: 39488,
+ 59774: 39491,
+ 59776: 39486,
+ 59777: 39509,
+ 59778: 39501,
+ 59779: 39515,
+ 59780: 39511,
+ 59781: 39519,
+ 59782: 39522,
+ 59783: 39525,
+ 59784: 39524,
+ 59785: 39529,
+ 59786: 39531,
+ 59787: 39530,
+ 59788: 39597,
+ 59789: 39600,
+ 59790: 39612,
+ 59791: 39616,
+ 59792: 39631,
+ 59793: 39633,
+ 59794: 39635,
+ 59795: 39636,
+ 59796: 39646,
+ 59797: 39647,
+ 59798: 39650,
+ 59799: 39651,
+ 59800: 39654,
+ 59801: 39663,
+ 59802: 39659,
+ 59803: 39662,
+ 59804: 39668,
+ 59805: 39665,
+ 59806: 39671,
+ 59807: 39675,
+ 59808: 39686,
+ 59809: 39704,
+ 59810: 39706,
+ 59811: 39711,
+ 59812: 39714,
+ 59813: 39715,
+ 59814: 39717,
+ 59815: 39719,
+ 59816: 39720,
+ 59817: 39721,
+ 59818: 39722,
+ 59819: 39726,
+ 59820: 39727,
+ 59821: 39730,
+ 59822: 39748,
+ 59823: 39747,
+ 59824: 39759,
+ 59825: 39757,
+ 59826: 39758,
+ 59827: 39761,
+ 59828: 39768,
+ 59829: 39796,
+ 59830: 39827,
+ 59831: 39811,
+ 59832: 39825,
+ 59833: 39830,
+ 59834: 39831,
+ 59835: 39839,
+ 59836: 39840,
+ 59837: 39848,
+ 59838: 39860,
+ 59839: 39872,
+ 59840: 39882,
+ 59841: 39865,
+ 59842: 39878,
+ 59843: 39887,
+ 59844: 39889,
+ 59845: 39890,
+ 59846: 39907,
+ 59847: 39906,
+ 59848: 39908,
+ 59849: 39892,
+ 59850: 39905,
+ 59851: 39994,
+ 59852: 39922,
+ 59853: 39921,
+ 59854: 39920,
+ 59855: 39957,
+ 59856: 39956,
+ 59857: 39945,
+ 59858: 39955,
+ 59859: 39948,
+ 59860: 39942,
+ 59861: 39944,
+ 59862: 39954,
+ 59863: 39946,
+ 59864: 39940,
+ 59865: 39982,
+ 59866: 39963,
+ 59867: 39973,
+ 59868: 39972,
+ 59869: 39969,
+ 59870: 39984,
+ 59871: 40007,
+ 59872: 39986,
+ 59873: 40006,
+ 59874: 39998,
+ 59875: 40026,
+ 59876: 40032,
+ 59877: 40039,
+ 59878: 40054,
+ 59879: 40056,
+ 59880: 40167,
+ 59881: 40172,
+ 59882: 40176,
+ 59883: 40201,
+ 59884: 40200,
+ 59885: 40171,
+ 59886: 40195,
+ 59887: 40198,
+ 59888: 40234,
+ 59889: 40230,
+ 59890: 40367,
+ 59891: 40227,
+ 59892: 40223,
+ 59893: 40260,
+ 59894: 40213,
+ 59895: 40210,
+ 59896: 40257,
+ 59897: 40255,
+ 59898: 40254,
+ 59899: 40262,
+ 59900: 40264,
+ 59968: 40285,
+ 59969: 40286,
+ 59970: 40292,
+ 59971: 40273,
+ 59972: 40272,
+ 59973: 40281,
+ 59974: 40306,
+ 59975: 40329,
+ 59976: 40327,
+ 59977: 40363,
+ 59978: 40303,
+ 59979: 40314,
+ 59980: 40346,
+ 59981: 40356,
+ 59982: 40361,
+ 59983: 40370,
+ 59984: 40388,
+ 59985: 40385,
+ 59986: 40379,
+ 59987: 40376,
+ 59988: 40378,
+ 59989: 40390,
+ 59990: 40399,
+ 59991: 40386,
+ 59992: 40409,
+ 59993: 40403,
+ 59994: 40440,
+ 59995: 40422,
+ 59996: 40429,
+ 59997: 40431,
+ 59998: 40445,
+ 59999: 40474,
+ 6e4: 40475,
+ 60001: 40478,
+ 60002: 40565,
+ 60003: 40569,
+ 60004: 40573,
+ 60005: 40577,
+ 60006: 40584,
+ 60007: 40587,
+ 60008: 40588,
+ 60009: 40594,
+ 60010: 40597,
+ 60011: 40593,
+ 60012: 40605,
+ 60013: 40613,
+ 60014: 40617,
+ 60015: 40632,
+ 60016: 40618,
+ 60017: 40621,
+ 60018: 38753,
+ 60019: 40652,
+ 60020: 40654,
+ 60021: 40655,
+ 60022: 40656,
+ 60023: 40660,
+ 60024: 40668,
+ 60025: 40670,
+ 60026: 40669,
+ 60027: 40672,
+ 60028: 40677,
+ 60029: 40680,
+ 60030: 40687,
+ 60032: 40692,
+ 60033: 40694,
+ 60034: 40695,
+ 60035: 40697,
+ 60036: 40699,
+ 60037: 40700,
+ 60038: 40701,
+ 60039: 40711,
+ 60040: 40712,
+ 60041: 30391,
+ 60042: 40725,
+ 60043: 40737,
+ 60044: 40748,
+ 60045: 40766,
+ 60046: 40778,
+ 60047: 40786,
+ 60048: 40788,
+ 60049: 40803,
+ 60050: 40799,
+ 60051: 40800,
+ 60052: 40801,
+ 60053: 40806,
+ 60054: 40807,
+ 60055: 40812,
+ 60056: 40810,
+ 60057: 40823,
+ 60058: 40818,
+ 60059: 40822,
+ 60060: 40853,
+ 60061: 40860,
+ 60062: 40864,
+ 60063: 22575,
+ 60064: 27079,
+ 60065: 36953,
+ 60066: 29796,
+ 60067: 20956,
+ 60068: 29081,
+ 60736: 32394,
+ 60737: 35100,
+ 60738: 37704,
+ 60739: 37512,
+ 60740: 34012,
+ 60741: 20425,
+ 60742: 28859,
+ 60743: 26161,
+ 60744: 26824,
+ 60745: 37625,
+ 60746: 26363,
+ 60747: 24389,
+ 60748: 20008,
+ 60749: 20193,
+ 60750: 20220,
+ 60751: 20224,
+ 60752: 20227,
+ 60753: 20281,
+ 60754: 20310,
+ 60755: 20370,
+ 60756: 20362,
+ 60757: 20378,
+ 60758: 20372,
+ 60759: 20429,
+ 60760: 20544,
+ 60761: 20514,
+ 60762: 20479,
+ 60763: 20510,
+ 60764: 20550,
+ 60765: 20592,
+ 60766: 20546,
+ 60767: 20628,
+ 60768: 20724,
+ 60769: 20696,
+ 60770: 20810,
+ 60771: 20836,
+ 60772: 20893,
+ 60773: 20926,
+ 60774: 20972,
+ 60775: 21013,
+ 60776: 21148,
+ 60777: 21158,
+ 60778: 21184,
+ 60779: 21211,
+ 60780: 21248,
+ 60781: 21255,
+ 60782: 21284,
+ 60783: 21362,
+ 60784: 21395,
+ 60785: 21426,
+ 60786: 21469,
+ 60787: 64014,
+ 60788: 21660,
+ 60789: 21642,
+ 60790: 21673,
+ 60791: 21759,
+ 60792: 21894,
+ 60793: 22361,
+ 60794: 22373,
+ 60795: 22444,
+ 60796: 22472,
+ 60797: 22471,
+ 60798: 64015,
+ 60800: 64016,
+ 60801: 22686,
+ 60802: 22706,
+ 60803: 22795,
+ 60804: 22867,
+ 60805: 22875,
+ 60806: 22877,
+ 60807: 22883,
+ 60808: 22948,
+ 60809: 22970,
+ 60810: 23382,
+ 60811: 23488,
+ 60812: 29999,
+ 60813: 23512,
+ 60814: 23532,
+ 60815: 23582,
+ 60816: 23718,
+ 60817: 23738,
+ 60818: 23797,
+ 60819: 23847,
+ 60820: 23891,
+ 60821: 64017,
+ 60822: 23874,
+ 60823: 23917,
+ 60824: 23992,
+ 60825: 23993,
+ 60826: 24016,
+ 60827: 24353,
+ 60828: 24372,
+ 60829: 24423,
+ 60830: 24503,
+ 60831: 24542,
+ 60832: 24669,
+ 60833: 24709,
+ 60834: 24714,
+ 60835: 24798,
+ 60836: 24789,
+ 60837: 24864,
+ 60838: 24818,
+ 60839: 24849,
+ 60840: 24887,
+ 60841: 24880,
+ 60842: 24984,
+ 60843: 25107,
+ 60844: 25254,
+ 60845: 25589,
+ 60846: 25696,
+ 60847: 25757,
+ 60848: 25806,
+ 60849: 25934,
+ 60850: 26112,
+ 60851: 26133,
+ 60852: 26171,
+ 60853: 26121,
+ 60854: 26158,
+ 60855: 26142,
+ 60856: 26148,
+ 60857: 26213,
+ 60858: 26199,
+ 60859: 26201,
+ 60860: 64018,
+ 60861: 26227,
+ 60862: 26265,
+ 60863: 26272,
+ 60864: 26290,
+ 60865: 26303,
+ 60866: 26362,
+ 60867: 26382,
+ 60868: 63785,
+ 60869: 26470,
+ 60870: 26555,
+ 60871: 26706,
+ 60872: 26560,
+ 60873: 26625,
+ 60874: 26692,
+ 60875: 26831,
+ 60876: 64019,
+ 60877: 26984,
+ 60878: 64020,
+ 60879: 27032,
+ 60880: 27106,
+ 60881: 27184,
+ 60882: 27243,
+ 60883: 27206,
+ 60884: 27251,
+ 60885: 27262,
+ 60886: 27362,
+ 60887: 27364,
+ 60888: 27606,
+ 60889: 27711,
+ 60890: 27740,
+ 60891: 27782,
+ 60892: 27759,
+ 60893: 27866,
+ 60894: 27908,
+ 60895: 28039,
+ 60896: 28015,
+ 60897: 28054,
+ 60898: 28076,
+ 60899: 28111,
+ 60900: 28152,
+ 60901: 28146,
+ 60902: 28156,
+ 60903: 28217,
+ 60904: 28252,
+ 60905: 28199,
+ 60906: 28220,
+ 60907: 28351,
+ 60908: 28552,
+ 60909: 28597,
+ 60910: 28661,
+ 60911: 28677,
+ 60912: 28679,
+ 60913: 28712,
+ 60914: 28805,
+ 60915: 28843,
+ 60916: 28943,
+ 60917: 28932,
+ 60918: 29020,
+ 60919: 28998,
+ 60920: 28999,
+ 60921: 64021,
+ 60922: 29121,
+ 60923: 29182,
+ 60924: 29361,
+ 60992: 29374,
+ 60993: 29476,
+ 60994: 64022,
+ 60995: 29559,
+ 60996: 29629,
+ 60997: 29641,
+ 60998: 29654,
+ 60999: 29667,
+ 61e3: 29650,
+ 61001: 29703,
+ 61002: 29685,
+ 61003: 29734,
+ 61004: 29738,
+ 61005: 29737,
+ 61006: 29742,
+ 61007: 29794,
+ 61008: 29833,
+ 61009: 29855,
+ 61010: 29953,
+ 61011: 30063,
+ 61012: 30338,
+ 61013: 30364,
+ 61014: 30366,
+ 61015: 30363,
+ 61016: 30374,
+ 61017: 64023,
+ 61018: 30534,
+ 61019: 21167,
+ 61020: 30753,
+ 61021: 30798,
+ 61022: 30820,
+ 61023: 30842,
+ 61024: 31024,
+ 61025: 64024,
+ 61026: 64025,
+ 61027: 64026,
+ 61028: 31124,
+ 61029: 64027,
+ 61030: 31131,
+ 61031: 31441,
+ 61032: 31463,
+ 61033: 64028,
+ 61034: 31467,
+ 61035: 31646,
+ 61036: 64029,
+ 61037: 32072,
+ 61038: 32092,
+ 61039: 32183,
+ 61040: 32160,
+ 61041: 32214,
+ 61042: 32338,
+ 61043: 32583,
+ 61044: 32673,
+ 61045: 64030,
+ 61046: 33537,
+ 61047: 33634,
+ 61048: 33663,
+ 61049: 33735,
+ 61050: 33782,
+ 61051: 33864,
+ 61052: 33972,
+ 61053: 34131,
+ 61054: 34137,
+ 61056: 34155,
+ 61057: 64031,
+ 61058: 34224,
+ 61059: 64032,
+ 61060: 64033,
+ 61061: 34823,
+ 61062: 35061,
+ 61063: 35346,
+ 61064: 35383,
+ 61065: 35449,
+ 61066: 35495,
+ 61067: 35518,
+ 61068: 35551,
+ 61069: 64034,
+ 61070: 35574,
+ 61071: 35667,
+ 61072: 35711,
+ 61073: 36080,
+ 61074: 36084,
+ 61075: 36114,
+ 61076: 36214,
+ 61077: 64035,
+ 61078: 36559,
+ 61079: 64036,
+ 61080: 64037,
+ 61081: 36967,
+ 61082: 37086,
+ 61083: 64038,
+ 61084: 37141,
+ 61085: 37159,
+ 61086: 37338,
+ 61087: 37335,
+ 61088: 37342,
+ 61089: 37357,
+ 61090: 37358,
+ 61091: 37348,
+ 61092: 37349,
+ 61093: 37382,
+ 61094: 37392,
+ 61095: 37386,
+ 61096: 37434,
+ 61097: 37440,
+ 61098: 37436,
+ 61099: 37454,
+ 61100: 37465,
+ 61101: 37457,
+ 61102: 37433,
+ 61103: 37479,
+ 61104: 37543,
+ 61105: 37495,
+ 61106: 37496,
+ 61107: 37607,
+ 61108: 37591,
+ 61109: 37593,
+ 61110: 37584,
+ 61111: 64039,
+ 61112: 37589,
+ 61113: 37600,
+ 61114: 37587,
+ 61115: 37669,
+ 61116: 37665,
+ 61117: 37627,
+ 61118: 64040,
+ 61119: 37662,
+ 61120: 37631,
+ 61121: 37661,
+ 61122: 37634,
+ 61123: 37744,
+ 61124: 37719,
+ 61125: 37796,
+ 61126: 37830,
+ 61127: 37854,
+ 61128: 37880,
+ 61129: 37937,
+ 61130: 37957,
+ 61131: 37960,
+ 61132: 38290,
+ 61133: 63964,
+ 61134: 64041,
+ 61135: 38557,
+ 61136: 38575,
+ 61137: 38707,
+ 61138: 38715,
+ 61139: 38723,
+ 61140: 38733,
+ 61141: 38735,
+ 61142: 38737,
+ 61143: 38741,
+ 61144: 38999,
+ 61145: 39013,
+ 61146: 64042,
+ 61147: 64043,
+ 61148: 39207,
+ 61149: 64044,
+ 61150: 39326,
+ 61151: 39502,
+ 61152: 39641,
+ 61153: 39644,
+ 61154: 39797,
+ 61155: 39794,
+ 61156: 39823,
+ 61157: 39857,
+ 61158: 39867,
+ 61159: 39936,
+ 61160: 40304,
+ 61161: 40299,
+ 61162: 64045,
+ 61163: 40473,
+ 61164: 40657,
+ 61167: 8560,
+ 61168: 8561,
+ 61169: 8562,
+ 61170: 8563,
+ 61171: 8564,
+ 61172: 8565,
+ 61173: 8566,
+ 61174: 8567,
+ 61175: 8568,
+ 61176: 8569,
+ 61177: 65506,
+ 61178: 65508,
+ 61179: 65287,
+ 61180: 65282,
+ 61504: 57344,
+ 61505: 57345,
+ 61506: 57346,
+ 61507: 57347,
+ 61508: 57348,
+ 61509: 57349,
+ 61510: 57350,
+ 61511: 57351,
+ 61512: 57352,
+ 61513: 57353,
+ 61514: 57354,
+ 61515: 57355,
+ 61516: 57356,
+ 61517: 57357,
+ 61518: 57358,
+ 61519: 57359,
+ 61520: 57360,
+ 61521: 57361,
+ 61522: 57362,
+ 61523: 57363,
+ 61524: 57364,
+ 61525: 57365,
+ 61526: 57366,
+ 61527: 57367,
+ 61528: 57368,
+ 61529: 57369,
+ 61530: 57370,
+ 61531: 57371,
+ 61532: 57372,
+ 61533: 57373,
+ 61534: 57374,
+ 61535: 57375,
+ 61536: 57376,
+ 61537: 57377,
+ 61538: 57378,
+ 61539: 57379,
+ 61540: 57380,
+ 61541: 57381,
+ 61542: 57382,
+ 61543: 57383,
+ 61544: 57384,
+ 61545: 57385,
+ 61546: 57386,
+ 61547: 57387,
+ 61548: 57388,
+ 61549: 57389,
+ 61550: 57390,
+ 61551: 57391,
+ 61552: 57392,
+ 61553: 57393,
+ 61554: 57394,
+ 61555: 57395,
+ 61556: 57396,
+ 61557: 57397,
+ 61558: 57398,
+ 61559: 57399,
+ 61560: 57400,
+ 61561: 57401,
+ 61562: 57402,
+ 61563: 57403,
+ 61564: 57404,
+ 61565: 57405,
+ 61566: 57406,
+ 61568: 57407,
+ 61569: 57408,
+ 61570: 57409,
+ 61571: 57410,
+ 61572: 57411,
+ 61573: 57412,
+ 61574: 57413,
+ 61575: 57414,
+ 61576: 57415,
+ 61577: 57416,
+ 61578: 57417,
+ 61579: 57418,
+ 61580: 57419,
+ 61581: 57420,
+ 61582: 57421,
+ 61583: 57422,
+ 61584: 57423,
+ 61585: 57424,
+ 61586: 57425,
+ 61587: 57426,
+ 61588: 57427,
+ 61589: 57428,
+ 61590: 57429,
+ 61591: 57430,
+ 61592: 57431,
+ 61593: 57432,
+ 61594: 57433,
+ 61595: 57434,
+ 61596: 57435,
+ 61597: 57436,
+ 61598: 57437,
+ 61599: 57438,
+ 61600: 57439,
+ 61601: 57440,
+ 61602: 57441,
+ 61603: 57442,
+ 61604: 57443,
+ 61605: 57444,
+ 61606: 57445,
+ 61607: 57446,
+ 61608: 57447,
+ 61609: 57448,
+ 61610: 57449,
+ 61611: 57450,
+ 61612: 57451,
+ 61613: 57452,
+ 61614: 57453,
+ 61615: 57454,
+ 61616: 57455,
+ 61617: 57456,
+ 61618: 57457,
+ 61619: 57458,
+ 61620: 57459,
+ 61621: 57460,
+ 61622: 57461,
+ 61623: 57462,
+ 61624: 57463,
+ 61625: 57464,
+ 61626: 57465,
+ 61627: 57466,
+ 61628: 57467,
+ 61629: 57468,
+ 61630: 57469,
+ 61631: 57470,
+ 61632: 57471,
+ 61633: 57472,
+ 61634: 57473,
+ 61635: 57474,
+ 61636: 57475,
+ 61637: 57476,
+ 61638: 57477,
+ 61639: 57478,
+ 61640: 57479,
+ 61641: 57480,
+ 61642: 57481,
+ 61643: 57482,
+ 61644: 57483,
+ 61645: 57484,
+ 61646: 57485,
+ 61647: 57486,
+ 61648: 57487,
+ 61649: 57488,
+ 61650: 57489,
+ 61651: 57490,
+ 61652: 57491,
+ 61653: 57492,
+ 61654: 57493,
+ 61655: 57494,
+ 61656: 57495,
+ 61657: 57496,
+ 61658: 57497,
+ 61659: 57498,
+ 61660: 57499,
+ 61661: 57500,
+ 61662: 57501,
+ 61663: 57502,
+ 61664: 57503,
+ 61665: 57504,
+ 61666: 57505,
+ 61667: 57506,
+ 61668: 57507,
+ 61669: 57508,
+ 61670: 57509,
+ 61671: 57510,
+ 61672: 57511,
+ 61673: 57512,
+ 61674: 57513,
+ 61675: 57514,
+ 61676: 57515,
+ 61677: 57516,
+ 61678: 57517,
+ 61679: 57518,
+ 61680: 57519,
+ 61681: 57520,
+ 61682: 57521,
+ 61683: 57522,
+ 61684: 57523,
+ 61685: 57524,
+ 61686: 57525,
+ 61687: 57526,
+ 61688: 57527,
+ 61689: 57528,
+ 61690: 57529,
+ 61691: 57530,
+ 61692: 57531,
+ 61760: 57532,
+ 61761: 57533,
+ 61762: 57534,
+ 61763: 57535,
+ 61764: 57536,
+ 61765: 57537,
+ 61766: 57538,
+ 61767: 57539,
+ 61768: 57540,
+ 61769: 57541,
+ 61770: 57542,
+ 61771: 57543,
+ 61772: 57544,
+ 61773: 57545,
+ 61774: 57546,
+ 61775: 57547,
+ 61776: 57548,
+ 61777: 57549,
+ 61778: 57550,
+ 61779: 57551,
+ 61780: 57552,
+ 61781: 57553,
+ 61782: 57554,
+ 61783: 57555,
+ 61784: 57556,
+ 61785: 57557,
+ 61786: 57558,
+ 61787: 57559,
+ 61788: 57560,
+ 61789: 57561,
+ 61790: 57562,
+ 61791: 57563,
+ 61792: 57564,
+ 61793: 57565,
+ 61794: 57566,
+ 61795: 57567,
+ 61796: 57568,
+ 61797: 57569,
+ 61798: 57570,
+ 61799: 57571,
+ 61800: 57572,
+ 61801: 57573,
+ 61802: 57574,
+ 61803: 57575,
+ 61804: 57576,
+ 61805: 57577,
+ 61806: 57578,
+ 61807: 57579,
+ 61808: 57580,
+ 61809: 57581,
+ 61810: 57582,
+ 61811: 57583,
+ 61812: 57584,
+ 61813: 57585,
+ 61814: 57586,
+ 61815: 57587,
+ 61816: 57588,
+ 61817: 57589,
+ 61818: 57590,
+ 61819: 57591,
+ 61820: 57592,
+ 61821: 57593,
+ 61822: 57594,
+ 61824: 57595,
+ 61825: 57596,
+ 61826: 57597,
+ 61827: 57598,
+ 61828: 57599,
+ 61829: 57600,
+ 61830: 57601,
+ 61831: 57602,
+ 61832: 57603,
+ 61833: 57604,
+ 61834: 57605,
+ 61835: 57606,
+ 61836: 57607,
+ 61837: 57608,
+ 61838: 57609,
+ 61839: 57610,
+ 61840: 57611,
+ 61841: 57612,
+ 61842: 57613,
+ 61843: 57614,
+ 61844: 57615,
+ 61845: 57616,
+ 61846: 57617,
+ 61847: 57618,
+ 61848: 57619,
+ 61849: 57620,
+ 61850: 57621,
+ 61851: 57622,
+ 61852: 57623,
+ 61853: 57624,
+ 61854: 57625,
+ 61855: 57626,
+ 61856: 57627,
+ 61857: 57628,
+ 61858: 57629,
+ 61859: 57630,
+ 61860: 57631,
+ 61861: 57632,
+ 61862: 57633,
+ 61863: 57634,
+ 61864: 57635,
+ 61865: 57636,
+ 61866: 57637,
+ 61867: 57638,
+ 61868: 57639,
+ 61869: 57640,
+ 61870: 57641,
+ 61871: 57642,
+ 61872: 57643,
+ 61873: 57644,
+ 61874: 57645,
+ 61875: 57646,
+ 61876: 57647,
+ 61877: 57648,
+ 61878: 57649,
+ 61879: 57650,
+ 61880: 57651,
+ 61881: 57652,
+ 61882: 57653,
+ 61883: 57654,
+ 61884: 57655,
+ 61885: 57656,
+ 61886: 57657,
+ 61887: 57658,
+ 61888: 57659,
+ 61889: 57660,
+ 61890: 57661,
+ 61891: 57662,
+ 61892: 57663,
+ 61893: 57664,
+ 61894: 57665,
+ 61895: 57666,
+ 61896: 57667,
+ 61897: 57668,
+ 61898: 57669,
+ 61899: 57670,
+ 61900: 57671,
+ 61901: 57672,
+ 61902: 57673,
+ 61903: 57674,
+ 61904: 57675,
+ 61905: 57676,
+ 61906: 57677,
+ 61907: 57678,
+ 61908: 57679,
+ 61909: 57680,
+ 61910: 57681,
+ 61911: 57682,
+ 61912: 57683,
+ 61913: 57684,
+ 61914: 57685,
+ 61915: 57686,
+ 61916: 57687,
+ 61917: 57688,
+ 61918: 57689,
+ 61919: 57690,
+ 61920: 57691,
+ 61921: 57692,
+ 61922: 57693,
+ 61923: 57694,
+ 61924: 57695,
+ 61925: 57696,
+ 61926: 57697,
+ 61927: 57698,
+ 61928: 57699,
+ 61929: 57700,
+ 61930: 57701,
+ 61931: 57702,
+ 61932: 57703,
+ 61933: 57704,
+ 61934: 57705,
+ 61935: 57706,
+ 61936: 57707,
+ 61937: 57708,
+ 61938: 57709,
+ 61939: 57710,
+ 61940: 57711,
+ 61941: 57712,
+ 61942: 57713,
+ 61943: 57714,
+ 61944: 57715,
+ 61945: 57716,
+ 61946: 57717,
+ 61947: 57718,
+ 61948: 57719,
+ 62016: 57720,
+ 62017: 57721,
+ 62018: 57722,
+ 62019: 57723,
+ 62020: 57724,
+ 62021: 57725,
+ 62022: 57726,
+ 62023: 57727,
+ 62024: 57728,
+ 62025: 57729,
+ 62026: 57730,
+ 62027: 57731,
+ 62028: 57732,
+ 62029: 57733,
+ 62030: 57734,
+ 62031: 57735,
+ 62032: 57736,
+ 62033: 57737,
+ 62034: 57738,
+ 62035: 57739,
+ 62036: 57740,
+ 62037: 57741,
+ 62038: 57742,
+ 62039: 57743,
+ 62040: 57744,
+ 62041: 57745,
+ 62042: 57746,
+ 62043: 57747,
+ 62044: 57748,
+ 62045: 57749,
+ 62046: 57750,
+ 62047: 57751,
+ 62048: 57752,
+ 62049: 57753,
+ 62050: 57754,
+ 62051: 57755,
+ 62052: 57756,
+ 62053: 57757,
+ 62054: 57758,
+ 62055: 57759,
+ 62056: 57760,
+ 62057: 57761,
+ 62058: 57762,
+ 62059: 57763,
+ 62060: 57764,
+ 62061: 57765,
+ 62062: 57766,
+ 62063: 57767,
+ 62064: 57768,
+ 62065: 57769,
+ 62066: 57770,
+ 62067: 57771,
+ 62068: 57772,
+ 62069: 57773,
+ 62070: 57774,
+ 62071: 57775,
+ 62072: 57776,
+ 62073: 57777,
+ 62074: 57778,
+ 62075: 57779,
+ 62076: 57780,
+ 62077: 57781,
+ 62078: 57782,
+ 62080: 57783,
+ 62081: 57784,
+ 62082: 57785,
+ 62083: 57786,
+ 62084: 57787,
+ 62085: 57788,
+ 62086: 57789,
+ 62087: 57790,
+ 62088: 57791,
+ 62089: 57792,
+ 62090: 57793,
+ 62091: 57794,
+ 62092: 57795,
+ 62093: 57796,
+ 62094: 57797,
+ 62095: 57798,
+ 62096: 57799,
+ 62097: 57800,
+ 62098: 57801,
+ 62099: 57802,
+ 62100: 57803,
+ 62101: 57804,
+ 62102: 57805,
+ 62103: 57806,
+ 62104: 57807,
+ 62105: 57808,
+ 62106: 57809,
+ 62107: 57810,
+ 62108: 57811,
+ 62109: 57812,
+ 62110: 57813,
+ 62111: 57814,
+ 62112: 57815,
+ 62113: 57816,
+ 62114: 57817,
+ 62115: 57818,
+ 62116: 57819,
+ 62117: 57820,
+ 62118: 57821,
+ 62119: 57822,
+ 62120: 57823,
+ 62121: 57824,
+ 62122: 57825,
+ 62123: 57826,
+ 62124: 57827,
+ 62125: 57828,
+ 62126: 57829,
+ 62127: 57830,
+ 62128: 57831,
+ 62129: 57832,
+ 62130: 57833,
+ 62131: 57834,
+ 62132: 57835,
+ 62133: 57836,
+ 62134: 57837,
+ 62135: 57838,
+ 62136: 57839,
+ 62137: 57840,
+ 62138: 57841,
+ 62139: 57842,
+ 62140: 57843,
+ 62141: 57844,
+ 62142: 57845,
+ 62143: 57846,
+ 62144: 57847,
+ 62145: 57848,
+ 62146: 57849,
+ 62147: 57850,
+ 62148: 57851,
+ 62149: 57852,
+ 62150: 57853,
+ 62151: 57854,
+ 62152: 57855,
+ 62153: 57856,
+ 62154: 57857,
+ 62155: 57858,
+ 62156: 57859,
+ 62157: 57860,
+ 62158: 57861,
+ 62159: 57862,
+ 62160: 57863,
+ 62161: 57864,
+ 62162: 57865,
+ 62163: 57866,
+ 62164: 57867,
+ 62165: 57868,
+ 62166: 57869,
+ 62167: 57870,
+ 62168: 57871,
+ 62169: 57872,
+ 62170: 57873,
+ 62171: 57874,
+ 62172: 57875,
+ 62173: 57876,
+ 62174: 57877,
+ 62175: 57878,
+ 62176: 57879,
+ 62177: 57880,
+ 62178: 57881,
+ 62179: 57882,
+ 62180: 57883,
+ 62181: 57884,
+ 62182: 57885,
+ 62183: 57886,
+ 62184: 57887,
+ 62185: 57888,
+ 62186: 57889,
+ 62187: 57890,
+ 62188: 57891,
+ 62189: 57892,
+ 62190: 57893,
+ 62191: 57894,
+ 62192: 57895,
+ 62193: 57896,
+ 62194: 57897,
+ 62195: 57898,
+ 62196: 57899,
+ 62197: 57900,
+ 62198: 57901,
+ 62199: 57902,
+ 62200: 57903,
+ 62201: 57904,
+ 62202: 57905,
+ 62203: 57906,
+ 62204: 57907,
+ 62272: 57908,
+ 62273: 57909,
+ 62274: 57910,
+ 62275: 57911,
+ 62276: 57912,
+ 62277: 57913,
+ 62278: 57914,
+ 62279: 57915,
+ 62280: 57916,
+ 62281: 57917,
+ 62282: 57918,
+ 62283: 57919,
+ 62284: 57920,
+ 62285: 57921,
+ 62286: 57922,
+ 62287: 57923,
+ 62288: 57924,
+ 62289: 57925,
+ 62290: 57926,
+ 62291: 57927,
+ 62292: 57928,
+ 62293: 57929,
+ 62294: 57930,
+ 62295: 57931,
+ 62296: 57932,
+ 62297: 57933,
+ 62298: 57934,
+ 62299: 57935,
+ 62300: 57936,
+ 62301: 57937,
+ 62302: 57938,
+ 62303: 57939,
+ 62304: 57940,
+ 62305: 57941,
+ 62306: 57942,
+ 62307: 57943,
+ 62308: 57944,
+ 62309: 57945,
+ 62310: 57946,
+ 62311: 57947,
+ 62312: 57948,
+ 62313: 57949,
+ 62314: 57950,
+ 62315: 57951,
+ 62316: 57952,
+ 62317: 57953,
+ 62318: 57954,
+ 62319: 57955,
+ 62320: 57956,
+ 62321: 57957,
+ 62322: 57958,
+ 62323: 57959,
+ 62324: 57960,
+ 62325: 57961,
+ 62326: 57962,
+ 62327: 57963,
+ 62328: 57964,
+ 62329: 57965,
+ 62330: 57966,
+ 62331: 57967,
+ 62332: 57968,
+ 62333: 57969,
+ 62334: 57970,
+ 62336: 57971,
+ 62337: 57972,
+ 62338: 57973,
+ 62339: 57974,
+ 62340: 57975,
+ 62341: 57976,
+ 62342: 57977,
+ 62343: 57978,
+ 62344: 57979,
+ 62345: 57980,
+ 62346: 57981,
+ 62347: 57982,
+ 62348: 57983,
+ 62349: 57984,
+ 62350: 57985,
+ 62351: 57986,
+ 62352: 57987,
+ 62353: 57988,
+ 62354: 57989,
+ 62355: 57990,
+ 62356: 57991,
+ 62357: 57992,
+ 62358: 57993,
+ 62359: 57994,
+ 62360: 57995,
+ 62361: 57996,
+ 62362: 57997,
+ 62363: 57998,
+ 62364: 57999,
+ 62365: 58e3,
+ 62366: 58001,
+ 62367: 58002,
+ 62368: 58003,
+ 62369: 58004,
+ 62370: 58005,
+ 62371: 58006,
+ 62372: 58007,
+ 62373: 58008,
+ 62374: 58009,
+ 62375: 58010,
+ 62376: 58011,
+ 62377: 58012,
+ 62378: 58013,
+ 62379: 58014,
+ 62380: 58015,
+ 62381: 58016,
+ 62382: 58017,
+ 62383: 58018,
+ 62384: 58019,
+ 62385: 58020,
+ 62386: 58021,
+ 62387: 58022,
+ 62388: 58023,
+ 62389: 58024,
+ 62390: 58025,
+ 62391: 58026,
+ 62392: 58027,
+ 62393: 58028,
+ 62394: 58029,
+ 62395: 58030,
+ 62396: 58031,
+ 62397: 58032,
+ 62398: 58033,
+ 62399: 58034,
+ 62400: 58035,
+ 62401: 58036,
+ 62402: 58037,
+ 62403: 58038,
+ 62404: 58039,
+ 62405: 58040,
+ 62406: 58041,
+ 62407: 58042,
+ 62408: 58043,
+ 62409: 58044,
+ 62410: 58045,
+ 62411: 58046,
+ 62412: 58047,
+ 62413: 58048,
+ 62414: 58049,
+ 62415: 58050,
+ 62416: 58051,
+ 62417: 58052,
+ 62418: 58053,
+ 62419: 58054,
+ 62420: 58055,
+ 62421: 58056,
+ 62422: 58057,
+ 62423: 58058,
+ 62424: 58059,
+ 62425: 58060,
+ 62426: 58061,
+ 62427: 58062,
+ 62428: 58063,
+ 62429: 58064,
+ 62430: 58065,
+ 62431: 58066,
+ 62432: 58067,
+ 62433: 58068,
+ 62434: 58069,
+ 62435: 58070,
+ 62436: 58071,
+ 62437: 58072,
+ 62438: 58073,
+ 62439: 58074,
+ 62440: 58075,
+ 62441: 58076,
+ 62442: 58077,
+ 62443: 58078,
+ 62444: 58079,
+ 62445: 58080,
+ 62446: 58081,
+ 62447: 58082,
+ 62448: 58083,
+ 62449: 58084,
+ 62450: 58085,
+ 62451: 58086,
+ 62452: 58087,
+ 62453: 58088,
+ 62454: 58089,
+ 62455: 58090,
+ 62456: 58091,
+ 62457: 58092,
+ 62458: 58093,
+ 62459: 58094,
+ 62460: 58095,
+ 62528: 58096,
+ 62529: 58097,
+ 62530: 58098,
+ 62531: 58099,
+ 62532: 58100,
+ 62533: 58101,
+ 62534: 58102,
+ 62535: 58103,
+ 62536: 58104,
+ 62537: 58105,
+ 62538: 58106,
+ 62539: 58107,
+ 62540: 58108,
+ 62541: 58109,
+ 62542: 58110,
+ 62543: 58111,
+ 62544: 58112,
+ 62545: 58113,
+ 62546: 58114,
+ 62547: 58115,
+ 62548: 58116,
+ 62549: 58117,
+ 62550: 58118,
+ 62551: 58119,
+ 62552: 58120,
+ 62553: 58121,
+ 62554: 58122,
+ 62555: 58123,
+ 62556: 58124,
+ 62557: 58125,
+ 62558: 58126,
+ 62559: 58127,
+ 62560: 58128,
+ 62561: 58129,
+ 62562: 58130,
+ 62563: 58131,
+ 62564: 58132,
+ 62565: 58133,
+ 62566: 58134,
+ 62567: 58135,
+ 62568: 58136,
+ 62569: 58137,
+ 62570: 58138,
+ 62571: 58139,
+ 62572: 58140,
+ 62573: 58141,
+ 62574: 58142,
+ 62575: 58143,
+ 62576: 58144,
+ 62577: 58145,
+ 62578: 58146,
+ 62579: 58147,
+ 62580: 58148,
+ 62581: 58149,
+ 62582: 58150,
+ 62583: 58151,
+ 62584: 58152,
+ 62585: 58153,
+ 62586: 58154,
+ 62587: 58155,
+ 62588: 58156,
+ 62589: 58157,
+ 62590: 58158,
+ 62592: 58159,
+ 62593: 58160,
+ 62594: 58161,
+ 62595: 58162,
+ 62596: 58163,
+ 62597: 58164,
+ 62598: 58165,
+ 62599: 58166,
+ 62600: 58167,
+ 62601: 58168,
+ 62602: 58169,
+ 62603: 58170,
+ 62604: 58171,
+ 62605: 58172,
+ 62606: 58173,
+ 62607: 58174,
+ 62608: 58175,
+ 62609: 58176,
+ 62610: 58177,
+ 62611: 58178,
+ 62612: 58179,
+ 62613: 58180,
+ 62614: 58181,
+ 62615: 58182,
+ 62616: 58183,
+ 62617: 58184,
+ 62618: 58185,
+ 62619: 58186,
+ 62620: 58187,
+ 62621: 58188,
+ 62622: 58189,
+ 62623: 58190,
+ 62624: 58191,
+ 62625: 58192,
+ 62626: 58193,
+ 62627: 58194,
+ 62628: 58195,
+ 62629: 58196,
+ 62630: 58197,
+ 62631: 58198,
+ 62632: 58199,
+ 62633: 58200,
+ 62634: 58201,
+ 62635: 58202,
+ 62636: 58203,
+ 62637: 58204,
+ 62638: 58205,
+ 62639: 58206,
+ 62640: 58207,
+ 62641: 58208,
+ 62642: 58209,
+ 62643: 58210,
+ 62644: 58211,
+ 62645: 58212,
+ 62646: 58213,
+ 62647: 58214,
+ 62648: 58215,
+ 62649: 58216,
+ 62650: 58217,
+ 62651: 58218,
+ 62652: 58219,
+ 62653: 58220,
+ 62654: 58221,
+ 62655: 58222,
+ 62656: 58223,
+ 62657: 58224,
+ 62658: 58225,
+ 62659: 58226,
+ 62660: 58227,
+ 62661: 58228,
+ 62662: 58229,
+ 62663: 58230,
+ 62664: 58231,
+ 62665: 58232,
+ 62666: 58233,
+ 62667: 58234,
+ 62668: 58235,
+ 62669: 58236,
+ 62670: 58237,
+ 62671: 58238,
+ 62672: 58239,
+ 62673: 58240,
+ 62674: 58241,
+ 62675: 58242,
+ 62676: 58243,
+ 62677: 58244,
+ 62678: 58245,
+ 62679: 58246,
+ 62680: 58247,
+ 62681: 58248,
+ 62682: 58249,
+ 62683: 58250,
+ 62684: 58251,
+ 62685: 58252,
+ 62686: 58253,
+ 62687: 58254,
+ 62688: 58255,
+ 62689: 58256,
+ 62690: 58257,
+ 62691: 58258,
+ 62692: 58259,
+ 62693: 58260,
+ 62694: 58261,
+ 62695: 58262,
+ 62696: 58263,
+ 62697: 58264,
+ 62698: 58265,
+ 62699: 58266,
+ 62700: 58267,
+ 62701: 58268,
+ 62702: 58269,
+ 62703: 58270,
+ 62704: 58271,
+ 62705: 58272,
+ 62706: 58273,
+ 62707: 58274,
+ 62708: 58275,
+ 62709: 58276,
+ 62710: 58277,
+ 62711: 58278,
+ 62712: 58279,
+ 62713: 58280,
+ 62714: 58281,
+ 62715: 58282,
+ 62716: 58283,
+ 62784: 58284,
+ 62785: 58285,
+ 62786: 58286,
+ 62787: 58287,
+ 62788: 58288,
+ 62789: 58289,
+ 62790: 58290,
+ 62791: 58291,
+ 62792: 58292,
+ 62793: 58293,
+ 62794: 58294,
+ 62795: 58295,
+ 62796: 58296,
+ 62797: 58297,
+ 62798: 58298,
+ 62799: 58299,
+ 62800: 58300,
+ 62801: 58301,
+ 62802: 58302,
+ 62803: 58303,
+ 62804: 58304,
+ 62805: 58305,
+ 62806: 58306,
+ 62807: 58307,
+ 62808: 58308,
+ 62809: 58309,
+ 62810: 58310,
+ 62811: 58311,
+ 62812: 58312,
+ 62813: 58313,
+ 62814: 58314,
+ 62815: 58315,
+ 62816: 58316,
+ 62817: 58317,
+ 62818: 58318,
+ 62819: 58319,
+ 62820: 58320,
+ 62821: 58321,
+ 62822: 58322,
+ 62823: 58323,
+ 62824: 58324,
+ 62825: 58325,
+ 62826: 58326,
+ 62827: 58327,
+ 62828: 58328,
+ 62829: 58329,
+ 62830: 58330,
+ 62831: 58331,
+ 62832: 58332,
+ 62833: 58333,
+ 62834: 58334,
+ 62835: 58335,
+ 62836: 58336,
+ 62837: 58337,
+ 62838: 58338,
+ 62839: 58339,
+ 62840: 58340,
+ 62841: 58341,
+ 62842: 58342,
+ 62843: 58343,
+ 62844: 58344,
+ 62845: 58345,
+ 62846: 58346,
+ 62848: 58347,
+ 62849: 58348,
+ 62850: 58349,
+ 62851: 58350,
+ 62852: 58351,
+ 62853: 58352,
+ 62854: 58353,
+ 62855: 58354,
+ 62856: 58355,
+ 62857: 58356,
+ 62858: 58357,
+ 62859: 58358,
+ 62860: 58359,
+ 62861: 58360,
+ 62862: 58361,
+ 62863: 58362,
+ 62864: 58363,
+ 62865: 58364,
+ 62866: 58365,
+ 62867: 58366,
+ 62868: 58367,
+ 62869: 58368,
+ 62870: 58369,
+ 62871: 58370,
+ 62872: 58371,
+ 62873: 58372,
+ 62874: 58373,
+ 62875: 58374,
+ 62876: 58375,
+ 62877: 58376,
+ 62878: 58377,
+ 62879: 58378,
+ 62880: 58379,
+ 62881: 58380,
+ 62882: 58381,
+ 62883: 58382,
+ 62884: 58383,
+ 62885: 58384,
+ 62886: 58385,
+ 62887: 58386,
+ 62888: 58387,
+ 62889: 58388,
+ 62890: 58389,
+ 62891: 58390,
+ 62892: 58391,
+ 62893: 58392,
+ 62894: 58393,
+ 62895: 58394,
+ 62896: 58395,
+ 62897: 58396,
+ 62898: 58397,
+ 62899: 58398,
+ 62900: 58399,
+ 62901: 58400,
+ 62902: 58401,
+ 62903: 58402,
+ 62904: 58403,
+ 62905: 58404,
+ 62906: 58405,
+ 62907: 58406,
+ 62908: 58407,
+ 62909: 58408,
+ 62910: 58409,
+ 62911: 58410,
+ 62912: 58411,
+ 62913: 58412,
+ 62914: 58413,
+ 62915: 58414,
+ 62916: 58415,
+ 62917: 58416,
+ 62918: 58417,
+ 62919: 58418,
+ 62920: 58419,
+ 62921: 58420,
+ 62922: 58421,
+ 62923: 58422,
+ 62924: 58423,
+ 62925: 58424,
+ 62926: 58425,
+ 62927: 58426,
+ 62928: 58427,
+ 62929: 58428,
+ 62930: 58429,
+ 62931: 58430,
+ 62932: 58431,
+ 62933: 58432,
+ 62934: 58433,
+ 62935: 58434,
+ 62936: 58435,
+ 62937: 58436,
+ 62938: 58437,
+ 62939: 58438,
+ 62940: 58439,
+ 62941: 58440,
+ 62942: 58441,
+ 62943: 58442,
+ 62944: 58443,
+ 62945: 58444,
+ 62946: 58445,
+ 62947: 58446,
+ 62948: 58447,
+ 62949: 58448,
+ 62950: 58449,
+ 62951: 58450,
+ 62952: 58451,
+ 62953: 58452,
+ 62954: 58453,
+ 62955: 58454,
+ 62956: 58455,
+ 62957: 58456,
+ 62958: 58457,
+ 62959: 58458,
+ 62960: 58459,
+ 62961: 58460,
+ 62962: 58461,
+ 62963: 58462,
+ 62964: 58463,
+ 62965: 58464,
+ 62966: 58465,
+ 62967: 58466,
+ 62968: 58467,
+ 62969: 58468,
+ 62970: 58469,
+ 62971: 58470,
+ 62972: 58471,
+ 63040: 58472,
+ 63041: 58473,
+ 63042: 58474,
+ 63043: 58475,
+ 63044: 58476,
+ 63045: 58477,
+ 63046: 58478,
+ 63047: 58479,
+ 63048: 58480,
+ 63049: 58481,
+ 63050: 58482,
+ 63051: 58483,
+ 63052: 58484,
+ 63053: 58485,
+ 63054: 58486,
+ 63055: 58487,
+ 63056: 58488,
+ 63057: 58489,
+ 63058: 58490,
+ 63059: 58491,
+ 63060: 58492,
+ 63061: 58493,
+ 63062: 58494,
+ 63063: 58495,
+ 63064: 58496,
+ 63065: 58497,
+ 63066: 58498,
+ 63067: 58499,
+ 63068: 58500,
+ 63069: 58501,
+ 63070: 58502,
+ 63071: 58503,
+ 63072: 58504,
+ 63073: 58505,
+ 63074: 58506,
+ 63075: 58507,
+ 63076: 58508,
+ 63077: 58509,
+ 63078: 58510,
+ 63079: 58511,
+ 63080: 58512,
+ 63081: 58513,
+ 63082: 58514,
+ 63083: 58515,
+ 63084: 58516,
+ 63085: 58517,
+ 63086: 58518,
+ 63087: 58519,
+ 63088: 58520,
+ 63089: 58521,
+ 63090: 58522,
+ 63091: 58523,
+ 63092: 58524,
+ 63093: 58525,
+ 63094: 58526,
+ 63095: 58527,
+ 63096: 58528,
+ 63097: 58529,
+ 63098: 58530,
+ 63099: 58531,
+ 63100: 58532,
+ 63101: 58533,
+ 63102: 58534,
+ 63104: 58535,
+ 63105: 58536,
+ 63106: 58537,
+ 63107: 58538,
+ 63108: 58539,
+ 63109: 58540,
+ 63110: 58541,
+ 63111: 58542,
+ 63112: 58543,
+ 63113: 58544,
+ 63114: 58545,
+ 63115: 58546,
+ 63116: 58547,
+ 63117: 58548,
+ 63118: 58549,
+ 63119: 58550,
+ 63120: 58551,
+ 63121: 58552,
+ 63122: 58553,
+ 63123: 58554,
+ 63124: 58555,
+ 63125: 58556,
+ 63126: 58557,
+ 63127: 58558,
+ 63128: 58559,
+ 63129: 58560,
+ 63130: 58561,
+ 63131: 58562,
+ 63132: 58563,
+ 63133: 58564,
+ 63134: 58565,
+ 63135: 58566,
+ 63136: 58567,
+ 63137: 58568,
+ 63138: 58569,
+ 63139: 58570,
+ 63140: 58571,
+ 63141: 58572,
+ 63142: 58573,
+ 63143: 58574,
+ 63144: 58575,
+ 63145: 58576,
+ 63146: 58577,
+ 63147: 58578,
+ 63148: 58579,
+ 63149: 58580,
+ 63150: 58581,
+ 63151: 58582,
+ 63152: 58583,
+ 63153: 58584,
+ 63154: 58585,
+ 63155: 58586,
+ 63156: 58587,
+ 63157: 58588,
+ 63158: 58589,
+ 63159: 58590,
+ 63160: 58591,
+ 63161: 58592,
+ 63162: 58593,
+ 63163: 58594,
+ 63164: 58595,
+ 63165: 58596,
+ 63166: 58597,
+ 63167: 58598,
+ 63168: 58599,
+ 63169: 58600,
+ 63170: 58601,
+ 63171: 58602,
+ 63172: 58603,
+ 63173: 58604,
+ 63174: 58605,
+ 63175: 58606,
+ 63176: 58607,
+ 63177: 58608,
+ 63178: 58609,
+ 63179: 58610,
+ 63180: 58611,
+ 63181: 58612,
+ 63182: 58613,
+ 63183: 58614,
+ 63184: 58615,
+ 63185: 58616,
+ 63186: 58617,
+ 63187: 58618,
+ 63188: 58619,
+ 63189: 58620,
+ 63190: 58621,
+ 63191: 58622,
+ 63192: 58623,
+ 63193: 58624,
+ 63194: 58625,
+ 63195: 58626,
+ 63196: 58627,
+ 63197: 58628,
+ 63198: 58629,
+ 63199: 58630,
+ 63200: 58631,
+ 63201: 58632,
+ 63202: 58633,
+ 63203: 58634,
+ 63204: 58635,
+ 63205: 58636,
+ 63206: 58637,
+ 63207: 58638,
+ 63208: 58639,
+ 63209: 58640,
+ 63210: 58641,
+ 63211: 58642,
+ 63212: 58643,
+ 63213: 58644,
+ 63214: 58645,
+ 63215: 58646,
+ 63216: 58647,
+ 63217: 58648,
+ 63218: 58649,
+ 63219: 58650,
+ 63220: 58651,
+ 63221: 58652,
+ 63222: 58653,
+ 63223: 58654,
+ 63224: 58655,
+ 63225: 58656,
+ 63226: 58657,
+ 63227: 58658,
+ 63228: 58659,
+ 63296: 58660,
+ 63297: 58661,
+ 63298: 58662,
+ 63299: 58663,
+ 63300: 58664,
+ 63301: 58665,
+ 63302: 58666,
+ 63303: 58667,
+ 63304: 58668,
+ 63305: 58669,
+ 63306: 58670,
+ 63307: 58671,
+ 63308: 58672,
+ 63309: 58673,
+ 63310: 58674,
+ 63311: 58675,
+ 63312: 58676,
+ 63313: 58677,
+ 63314: 58678,
+ 63315: 58679,
+ 63316: 58680,
+ 63317: 58681,
+ 63318: 58682,
+ 63319: 58683,
+ 63320: 58684,
+ 63321: 58685,
+ 63322: 58686,
+ 63323: 58687,
+ 63324: 58688,
+ 63325: 58689,
+ 63326: 58690,
+ 63327: 58691,
+ 63328: 58692,
+ 63329: 58693,
+ 63330: 58694,
+ 63331: 58695,
+ 63332: 58696,
+ 63333: 58697,
+ 63334: 58698,
+ 63335: 58699,
+ 63336: 58700,
+ 63337: 58701,
+ 63338: 58702,
+ 63339: 58703,
+ 63340: 58704,
+ 63341: 58705,
+ 63342: 58706,
+ 63343: 58707,
+ 63344: 58708,
+ 63345: 58709,
+ 63346: 58710,
+ 63347: 58711,
+ 63348: 58712,
+ 63349: 58713,
+ 63350: 58714,
+ 63351: 58715,
+ 63352: 58716,
+ 63353: 58717,
+ 63354: 58718,
+ 63355: 58719,
+ 63356: 58720,
+ 63357: 58721,
+ 63358: 58722,
+ 63360: 58723,
+ 63361: 58724,
+ 63362: 58725,
+ 63363: 58726,
+ 63364: 58727,
+ 63365: 58728,
+ 63366: 58729,
+ 63367: 58730,
+ 63368: 58731,
+ 63369: 58732,
+ 63370: 58733,
+ 63371: 58734,
+ 63372: 58735,
+ 63373: 58736,
+ 63374: 58737,
+ 63375: 58738,
+ 63376: 58739,
+ 63377: 58740,
+ 63378: 58741,
+ 63379: 58742,
+ 63380: 58743,
+ 63381: 58744,
+ 63382: 58745,
+ 63383: 58746,
+ 63384: 58747,
+ 63385: 58748,
+ 63386: 58749,
+ 63387: 58750,
+ 63388: 58751,
+ 63389: 58752,
+ 63390: 58753,
+ 63391: 58754,
+ 63392: 58755,
+ 63393: 58756,
+ 63394: 58757,
+ 63395: 58758,
+ 63396: 58759,
+ 63397: 58760,
+ 63398: 58761,
+ 63399: 58762,
+ 63400: 58763,
+ 63401: 58764,
+ 63402: 58765,
+ 63403: 58766,
+ 63404: 58767,
+ 63405: 58768,
+ 63406: 58769,
+ 63407: 58770,
+ 63408: 58771,
+ 63409: 58772,
+ 63410: 58773,
+ 63411: 58774,
+ 63412: 58775,
+ 63413: 58776,
+ 63414: 58777,
+ 63415: 58778,
+ 63416: 58779,
+ 63417: 58780,
+ 63418: 58781,
+ 63419: 58782,
+ 63420: 58783,
+ 63421: 58784,
+ 63422: 58785,
+ 63423: 58786,
+ 63424: 58787,
+ 63425: 58788,
+ 63426: 58789,
+ 63427: 58790,
+ 63428: 58791,
+ 63429: 58792,
+ 63430: 58793,
+ 63431: 58794,
+ 63432: 58795,
+ 63433: 58796,
+ 63434: 58797,
+ 63435: 58798,
+ 63436: 58799,
+ 63437: 58800,
+ 63438: 58801,
+ 63439: 58802,
+ 63440: 58803,
+ 63441: 58804,
+ 63442: 58805,
+ 63443: 58806,
+ 63444: 58807,
+ 63445: 58808,
+ 63446: 58809,
+ 63447: 58810,
+ 63448: 58811,
+ 63449: 58812,
+ 63450: 58813,
+ 63451: 58814,
+ 63452: 58815,
+ 63453: 58816,
+ 63454: 58817,
+ 63455: 58818,
+ 63456: 58819,
+ 63457: 58820,
+ 63458: 58821,
+ 63459: 58822,
+ 63460: 58823,
+ 63461: 58824,
+ 63462: 58825,
+ 63463: 58826,
+ 63464: 58827,
+ 63465: 58828,
+ 63466: 58829,
+ 63467: 58830,
+ 63468: 58831,
+ 63469: 58832,
+ 63470: 58833,
+ 63471: 58834,
+ 63472: 58835,
+ 63473: 58836,
+ 63474: 58837,
+ 63475: 58838,
+ 63476: 58839,
+ 63477: 58840,
+ 63478: 58841,
+ 63479: 58842,
+ 63480: 58843,
+ 63481: 58844,
+ 63482: 58845,
+ 63483: 58846,
+ 63484: 58847,
+ 63552: 58848,
+ 63553: 58849,
+ 63554: 58850,
+ 63555: 58851,
+ 63556: 58852,
+ 63557: 58853,
+ 63558: 58854,
+ 63559: 58855,
+ 63560: 58856,
+ 63561: 58857,
+ 63562: 58858,
+ 63563: 58859,
+ 63564: 58860,
+ 63565: 58861,
+ 63566: 58862,
+ 63567: 58863,
+ 63568: 58864,
+ 63569: 58865,
+ 63570: 58866,
+ 63571: 58867,
+ 63572: 58868,
+ 63573: 58869,
+ 63574: 58870,
+ 63575: 58871,
+ 63576: 58872,
+ 63577: 58873,
+ 63578: 58874,
+ 63579: 58875,
+ 63580: 58876,
+ 63581: 58877,
+ 63582: 58878,
+ 63583: 58879,
+ 63584: 58880,
+ 63585: 58881,
+ 63586: 58882,
+ 63587: 58883,
+ 63588: 58884,
+ 63589: 58885,
+ 63590: 58886,
+ 63591: 58887,
+ 63592: 58888,
+ 63593: 58889,
+ 63594: 58890,
+ 63595: 58891,
+ 63596: 58892,
+ 63597: 58893,
+ 63598: 58894,
+ 63599: 58895,
+ 63600: 58896,
+ 63601: 58897,
+ 63602: 58898,
+ 63603: 58899,
+ 63604: 58900,
+ 63605: 58901,
+ 63606: 58902,
+ 63607: 58903,
+ 63608: 58904,
+ 63609: 58905,
+ 63610: 58906,
+ 63611: 58907,
+ 63612: 58908,
+ 63613: 58909,
+ 63614: 58910,
+ 63616: 58911,
+ 63617: 58912,
+ 63618: 58913,
+ 63619: 58914,
+ 63620: 58915,
+ 63621: 58916,
+ 63622: 58917,
+ 63623: 58918,
+ 63624: 58919,
+ 63625: 58920,
+ 63626: 58921,
+ 63627: 58922,
+ 63628: 58923,
+ 63629: 58924,
+ 63630: 58925,
+ 63631: 58926,
+ 63632: 58927,
+ 63633: 58928,
+ 63634: 58929,
+ 63635: 58930,
+ 63636: 58931,
+ 63637: 58932,
+ 63638: 58933,
+ 63639: 58934,
+ 63640: 58935,
+ 63641: 58936,
+ 63642: 58937,
+ 63643: 58938,
+ 63644: 58939,
+ 63645: 58940,
+ 63646: 58941,
+ 63647: 58942,
+ 63648: 58943,
+ 63649: 58944,
+ 63650: 58945,
+ 63651: 58946,
+ 63652: 58947,
+ 63653: 58948,
+ 63654: 58949,
+ 63655: 58950,
+ 63656: 58951,
+ 63657: 58952,
+ 63658: 58953,
+ 63659: 58954,
+ 63660: 58955,
+ 63661: 58956,
+ 63662: 58957,
+ 63663: 58958,
+ 63664: 58959,
+ 63665: 58960,
+ 63666: 58961,
+ 63667: 58962,
+ 63668: 58963,
+ 63669: 58964,
+ 63670: 58965,
+ 63671: 58966,
+ 63672: 58967,
+ 63673: 58968,
+ 63674: 58969,
+ 63675: 58970,
+ 63676: 58971,
+ 63677: 58972,
+ 63678: 58973,
+ 63679: 58974,
+ 63680: 58975,
+ 63681: 58976,
+ 63682: 58977,
+ 63683: 58978,
+ 63684: 58979,
+ 63685: 58980,
+ 63686: 58981,
+ 63687: 58982,
+ 63688: 58983,
+ 63689: 58984,
+ 63690: 58985,
+ 63691: 58986,
+ 63692: 58987,
+ 63693: 58988,
+ 63694: 58989,
+ 63695: 58990,
+ 63696: 58991,
+ 63697: 58992,
+ 63698: 58993,
+ 63699: 58994,
+ 63700: 58995,
+ 63701: 58996,
+ 63702: 58997,
+ 63703: 58998,
+ 63704: 58999,
+ 63705: 59e3,
+ 63706: 59001,
+ 63707: 59002,
+ 63708: 59003,
+ 63709: 59004,
+ 63710: 59005,
+ 63711: 59006,
+ 63712: 59007,
+ 63713: 59008,
+ 63714: 59009,
+ 63715: 59010,
+ 63716: 59011,
+ 63717: 59012,
+ 63718: 59013,
+ 63719: 59014,
+ 63720: 59015,
+ 63721: 59016,
+ 63722: 59017,
+ 63723: 59018,
+ 63724: 59019,
+ 63725: 59020,
+ 63726: 59021,
+ 63727: 59022,
+ 63728: 59023,
+ 63729: 59024,
+ 63730: 59025,
+ 63731: 59026,
+ 63732: 59027,
+ 63733: 59028,
+ 63734: 59029,
+ 63735: 59030,
+ 63736: 59031,
+ 63737: 59032,
+ 63738: 59033,
+ 63739: 59034,
+ 63740: 59035,
+ 64064: 8560,
+ 64065: 8561,
+ 64066: 8562,
+ 64067: 8563,
+ 64068: 8564,
+ 64069: 8565,
+ 64070: 8566,
+ 64071: 8567,
+ 64072: 8568,
+ 64073: 8569,
+ 64074: 8544,
+ 64075: 8545,
+ 64076: 8546,
+ 64077: 8547,
+ 64078: 8548,
+ 64079: 8549,
+ 64080: 8550,
+ 64081: 8551,
+ 64082: 8552,
+ 64083: 8553,
+ 64084: 65506,
+ 64085: 65508,
+ 64086: 65287,
+ 64087: 65282,
+ 64088: 12849,
+ 64089: 8470,
+ 64090: 8481,
+ 64091: 8757,
+ 64092: 32394,
+ 64093: 35100,
+ 64094: 37704,
+ 64095: 37512,
+ 64096: 34012,
+ 64097: 20425,
+ 64098: 28859,
+ 64099: 26161,
+ 64100: 26824,
+ 64101: 37625,
+ 64102: 26363,
+ 64103: 24389,
+ 64104: 20008,
+ 64105: 20193,
+ 64106: 20220,
+ 64107: 20224,
+ 64108: 20227,
+ 64109: 20281,
+ 64110: 20310,
+ 64111: 20370,
+ 64112: 20362,
+ 64113: 20378,
+ 64114: 20372,
+ 64115: 20429,
+ 64116: 20544,
+ 64117: 20514,
+ 64118: 20479,
+ 64119: 20510,
+ 64120: 20550,
+ 64121: 20592,
+ 64122: 20546,
+ 64123: 20628,
+ 64124: 20724,
+ 64125: 20696,
+ 64126: 20810,
+ 64128: 20836,
+ 64129: 20893,
+ 64130: 20926,
+ 64131: 20972,
+ 64132: 21013,
+ 64133: 21148,
+ 64134: 21158,
+ 64135: 21184,
+ 64136: 21211,
+ 64137: 21248,
+ 64138: 21255,
+ 64139: 21284,
+ 64140: 21362,
+ 64141: 21395,
+ 64142: 21426,
+ 64143: 21469,
+ 64144: 64014,
+ 64145: 21660,
+ 64146: 21642,
+ 64147: 21673,
+ 64148: 21759,
+ 64149: 21894,
+ 64150: 22361,
+ 64151: 22373,
+ 64152: 22444,
+ 64153: 22472,
+ 64154: 22471,
+ 64155: 64015,
+ 64156: 64016,
+ 64157: 22686,
+ 64158: 22706,
+ 64159: 22795,
+ 64160: 22867,
+ 64161: 22875,
+ 64162: 22877,
+ 64163: 22883,
+ 64164: 22948,
+ 64165: 22970,
+ 64166: 23382,
+ 64167: 23488,
+ 64168: 29999,
+ 64169: 23512,
+ 64170: 23532,
+ 64171: 23582,
+ 64172: 23718,
+ 64173: 23738,
+ 64174: 23797,
+ 64175: 23847,
+ 64176: 23891,
+ 64177: 64017,
+ 64178: 23874,
+ 64179: 23917,
+ 64180: 23992,
+ 64181: 23993,
+ 64182: 24016,
+ 64183: 24353,
+ 64184: 24372,
+ 64185: 24423,
+ 64186: 24503,
+ 64187: 24542,
+ 64188: 24669,
+ 64189: 24709,
+ 64190: 24714,
+ 64191: 24798,
+ 64192: 24789,
+ 64193: 24864,
+ 64194: 24818,
+ 64195: 24849,
+ 64196: 24887,
+ 64197: 24880,
+ 64198: 24984,
+ 64199: 25107,
+ 64200: 25254,
+ 64201: 25589,
+ 64202: 25696,
+ 64203: 25757,
+ 64204: 25806,
+ 64205: 25934,
+ 64206: 26112,
+ 64207: 26133,
+ 64208: 26171,
+ 64209: 26121,
+ 64210: 26158,
+ 64211: 26142,
+ 64212: 26148,
+ 64213: 26213,
+ 64214: 26199,
+ 64215: 26201,
+ 64216: 64018,
+ 64217: 26227,
+ 64218: 26265,
+ 64219: 26272,
+ 64220: 26290,
+ 64221: 26303,
+ 64222: 26362,
+ 64223: 26382,
+ 64224: 63785,
+ 64225: 26470,
+ 64226: 26555,
+ 64227: 26706,
+ 64228: 26560,
+ 64229: 26625,
+ 64230: 26692,
+ 64231: 26831,
+ 64232: 64019,
+ 64233: 26984,
+ 64234: 64020,
+ 64235: 27032,
+ 64236: 27106,
+ 64237: 27184,
+ 64238: 27243,
+ 64239: 27206,
+ 64240: 27251,
+ 64241: 27262,
+ 64242: 27362,
+ 64243: 27364,
+ 64244: 27606,
+ 64245: 27711,
+ 64246: 27740,
+ 64247: 27782,
+ 64248: 27759,
+ 64249: 27866,
+ 64250: 27908,
+ 64251: 28039,
+ 64252: 28015,
+ 64320: 28054,
+ 64321: 28076,
+ 64322: 28111,
+ 64323: 28152,
+ 64324: 28146,
+ 64325: 28156,
+ 64326: 28217,
+ 64327: 28252,
+ 64328: 28199,
+ 64329: 28220,
+ 64330: 28351,
+ 64331: 28552,
+ 64332: 28597,
+ 64333: 28661,
+ 64334: 28677,
+ 64335: 28679,
+ 64336: 28712,
+ 64337: 28805,
+ 64338: 28843,
+ 64339: 28943,
+ 64340: 28932,
+ 64341: 29020,
+ 64342: 28998,
+ 64343: 28999,
+ 64344: 64021,
+ 64345: 29121,
+ 64346: 29182,
+ 64347: 29361,
+ 64348: 29374,
+ 64349: 29476,
+ 64350: 64022,
+ 64351: 29559,
+ 64352: 29629,
+ 64353: 29641,
+ 64354: 29654,
+ 64355: 29667,
+ 64356: 29650,
+ 64357: 29703,
+ 64358: 29685,
+ 64359: 29734,
+ 64360: 29738,
+ 64361: 29737,
+ 64362: 29742,
+ 64363: 29794,
+ 64364: 29833,
+ 64365: 29855,
+ 64366: 29953,
+ 64367: 30063,
+ 64368: 30338,
+ 64369: 30364,
+ 64370: 30366,
+ 64371: 30363,
+ 64372: 30374,
+ 64373: 64023,
+ 64374: 30534,
+ 64375: 21167,
+ 64376: 30753,
+ 64377: 30798,
+ 64378: 30820,
+ 64379: 30842,
+ 64380: 31024,
+ 64381: 64024,
+ 64382: 64025,
+ 64384: 64026,
+ 64385: 31124,
+ 64386: 64027,
+ 64387: 31131,
+ 64388: 31441,
+ 64389: 31463,
+ 64390: 64028,
+ 64391: 31467,
+ 64392: 31646,
+ 64393: 64029,
+ 64394: 32072,
+ 64395: 32092,
+ 64396: 32183,
+ 64397: 32160,
+ 64398: 32214,
+ 64399: 32338,
+ 64400: 32583,
+ 64401: 32673,
+ 64402: 64030,
+ 64403: 33537,
+ 64404: 33634,
+ 64405: 33663,
+ 64406: 33735,
+ 64407: 33782,
+ 64408: 33864,
+ 64409: 33972,
+ 64410: 34131,
+ 64411: 34137,
+ 64412: 34155,
+ 64413: 64031,
+ 64414: 34224,
+ 64415: 64032,
+ 64416: 64033,
+ 64417: 34823,
+ 64418: 35061,
+ 64419: 35346,
+ 64420: 35383,
+ 64421: 35449,
+ 64422: 35495,
+ 64423: 35518,
+ 64424: 35551,
+ 64425: 64034,
+ 64426: 35574,
+ 64427: 35667,
+ 64428: 35711,
+ 64429: 36080,
+ 64430: 36084,
+ 64431: 36114,
+ 64432: 36214,
+ 64433: 64035,
+ 64434: 36559,
+ 64435: 64036,
+ 64436: 64037,
+ 64437: 36967,
+ 64438: 37086,
+ 64439: 64038,
+ 64440: 37141,
+ 64441: 37159,
+ 64442: 37338,
+ 64443: 37335,
+ 64444: 37342,
+ 64445: 37357,
+ 64446: 37358,
+ 64447: 37348,
+ 64448: 37349,
+ 64449: 37382,
+ 64450: 37392,
+ 64451: 37386,
+ 64452: 37434,
+ 64453: 37440,
+ 64454: 37436,
+ 64455: 37454,
+ 64456: 37465,
+ 64457: 37457,
+ 64458: 37433,
+ 64459: 37479,
+ 64460: 37543,
+ 64461: 37495,
+ 64462: 37496,
+ 64463: 37607,
+ 64464: 37591,
+ 64465: 37593,
+ 64466: 37584,
+ 64467: 64039,
+ 64468: 37589,
+ 64469: 37600,
+ 64470: 37587,
+ 64471: 37669,
+ 64472: 37665,
+ 64473: 37627,
+ 64474: 64040,
+ 64475: 37662,
+ 64476: 37631,
+ 64477: 37661,
+ 64478: 37634,
+ 64479: 37744,
+ 64480: 37719,
+ 64481: 37796,
+ 64482: 37830,
+ 64483: 37854,
+ 64484: 37880,
+ 64485: 37937,
+ 64486: 37957,
+ 64487: 37960,
+ 64488: 38290,
+ 64489: 63964,
+ 64490: 64041,
+ 64491: 38557,
+ 64492: 38575,
+ 64493: 38707,
+ 64494: 38715,
+ 64495: 38723,
+ 64496: 38733,
+ 64497: 38735,
+ 64498: 38737,
+ 64499: 38741,
+ 64500: 38999,
+ 64501: 39013,
+ 64502: 64042,
+ 64503: 64043,
+ 64504: 39207,
+ 64505: 64044,
+ 64506: 39326,
+ 64507: 39502,
+ 64508: 39641,
+ 64576: 39644,
+ 64577: 39797,
+ 64578: 39794,
+ 64579: 39823,
+ 64580: 39857,
+ 64581: 39867,
+ 64582: 39936,
+ 64583: 40304,
+ 64584: 40299,
+ 64585: 64045,
+ 64586: 40473,
+ 64587: 40657,
+ }),
+ (n.prototype = {
+ constructor: n,
+ getInt8: function () {
+ var e = this.dv.getInt8(this.offset);
+ return (this.offset += 1), e;
+ },
+ getInt8Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getInt8());
+ return t;
+ },
+ getUint8: function () {
+ var e = this.dv.getUint8(this.offset);
+ return (this.offset += 1), e;
+ },
+ getUint8Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getUint8());
+ return t;
+ },
+ getInt16: function () {
+ var e = this.dv.getInt16(this.offset, this.littleEndian);
+ return (this.offset += 2), e;
+ },
+ getInt16Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getInt16());
+ return t;
+ },
+ getUint16: function () {
+ var e = this.dv.getUint16(this.offset, this.littleEndian);
+ return (this.offset += 2), e;
+ },
+ getUint16Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getUint16());
+ return t;
+ },
+ getInt32: function () {
+ var e = this.dv.getInt32(this.offset, this.littleEndian);
+ return (this.offset += 4), e;
+ },
+ getInt32Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getInt32());
+ return t;
+ },
+ getUint32: function () {
+ var e = this.dv.getUint32(this.offset, this.littleEndian);
+ return (this.offset += 4), e;
+ },
+ getUint32Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getUint32());
+ return t;
+ },
+ getFloat32: function () {
+ var e = this.dv.getFloat32(this.offset, this.littleEndian);
+ return (this.offset += 4), e;
+ },
+ getFloat32Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getFloat32());
+ return t;
+ },
+ getFloat64: function () {
+ var e = this.dv.getFloat64(this.offset, this.littleEndian);
+ return (this.offset += 8), e;
+ },
+ getFloat64Array: function (e) {
+ for (var t = [], n = 0; n < e; n++) t.push(this.getFloat64());
+ return t;
+ },
+ getIndex: function (e, t) {
+ switch (e) {
+ case 1:
+ return !0 === t ? this.getUint8() : this.getInt8();
+ case 2:
+ return !0 === t ? this.getUint16() : this.getInt16();
+ case 4:
+ return this.getInt32();
+ default:
+ throw "unknown number type " + e + " exception.";
+ }
+ },
+ getIndexArray: function (e, t, n) {
+ for (var r = [], i = 0; i < t; i++) r.push(this.getIndex(e, n));
+ return r;
+ },
+ getChars: function (e) {
+ for (var t = ""; e > 0; ) {
+ var n = this.getUint8();
+ if ((e--, 0 === n)) break;
+ t += String.fromCharCode(n);
+ }
+ for (; e > 0; ) this.getUint8(), e--;
+ return t;
+ },
+ getSjisStringsAsUnicode: function (e) {
+ for (var t = []; e > 0; ) {
+ var n = this.getUint8();
+ if ((e--, 0 === n)) break;
+ t.push(n);
+ }
+ for (; e > 0; ) this.getUint8(), e--;
+ return this.encoder.s2u(new Uint8Array(t));
+ },
+ getUnicodeStrings: function (e) {
+ for (var t = ""; e > 0; ) {
+ var n = this.getUint16();
+ if (((e -= 2), 0 === n)) break;
+ t += String.fromCharCode(n);
+ }
+ for (; e > 0; ) this.getUint8(), e--;
+ return t;
+ },
+ getTextBuffer: function () {
+ var e = this.getUint32();
+ return this.getUnicodeStrings(e);
+ },
+ }),
+ (r.prototype = {
+ constructor: r,
+ leftToRightVector3: function (e) {
+ e[2] = -e[2];
+ },
+ leftToRightQuaternion: function (e) {
+ (e[0] = -e[0]), (e[1] = -e[1]);
+ },
+ leftToRightEuler: function (e) {
+ (e[0] = -e[0]), (e[1] = -e[1]);
+ },
+ leftToRightIndexOrder: function (e) {
+ var t = e[2];
+ (e[2] = e[0]), (e[0] = t);
+ },
+ leftToRightVector3Range: function (e, t) {
+ var n = -t[2];
+ (t[2] = -e[2]), (e[2] = n);
+ },
+ leftToRightEulerRange: function (e, t) {
+ var n = -t[0],
+ r = -t[1];
+ (t[0] = -e[0]), (t[1] = -e[1]), (e[0] = n), (e[1] = r);
+ },
+ }),
+ (i.prototype.parsePmd = function (e, t) {
+ var r = {},
+ i = new n(e);
+ (r.metadata = {}),
+ (r.metadata.format = "pmd"),
+ (r.metadata.coordinateSystem = "left");
+ var a = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.position = i.getFloat32Array(3)),
+ (e.normal = i.getFloat32Array(3)),
+ (e.uv = i.getFloat32Array(2)),
+ (e.skinIndices = i.getUint16Array(2)),
+ (e.skinWeights = [i.getUint8() / 100]),
+ e.skinWeights.push(1 - e.skinWeights[0]),
+ (e.edgeFlag = i.getUint8()),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.vertexCount = i.getUint32()), (r.vertices = []);
+ for (var n = 0; n < t.vertexCount; n++) r.vertices.push(e());
+ },
+ o = function () {
+ var e = function () {
+ var e = {};
+ return (e.indices = i.getUint16Array(3)), e;
+ },
+ t = r.metadata;
+ (t.faceCount = i.getUint32() / 3), (r.faces = []);
+ for (var n = 0; n < t.faceCount; n++) r.faces.push(e());
+ },
+ s = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.diffuse = i.getFloat32Array(4)),
+ (e.shininess = i.getFloat32()),
+ (e.specular = i.getFloat32Array(3)),
+ (e.ambient = i.getFloat32Array(3)),
+ (e.toonIndex = i.getInt8()),
+ (e.edgeFlag = i.getUint8()),
+ (e.faceCount = i.getUint32() / 3),
+ (e.fileName = i.getSjisStringsAsUnicode(20)),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.materialCount = i.getUint32()), (r.materials = []);
+ for (var n = 0; n < t.materialCount; n++)
+ r.materials.push(e());
+ },
+ l = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.name = i.getSjisStringsAsUnicode(20)),
+ (e.parentIndex = i.getInt16()),
+ (e.tailIndex = i.getInt16()),
+ (e.type = i.getUint8()),
+ (e.ikIndex = i.getInt16()),
+ (e.position = i.getFloat32Array(3)),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.boneCount = i.getUint16()), (r.bones = []);
+ for (var n = 0; n < t.boneCount; n++) r.bones.push(e());
+ },
+ u = function () {
+ var e = function () {
+ var e = {};
+ (e.target = i.getUint16()),
+ (e.effector = i.getUint16()),
+ (e.linkCount = i.getUint8()),
+ (e.iteration = i.getUint16()),
+ (e.maxAngle = i.getFloat32()),
+ (e.links = []);
+ for (var t = 0; t < e.linkCount; t++) {
+ var n = {};
+ (n.index = i.getUint16()), e.links.push(n);
+ }
+ return e;
+ },
+ t = r.metadata;
+ (t.ikCount = i.getUint16()), (r.iks = []);
+ for (var n = 0; n < t.ikCount; n++) r.iks.push(e());
+ },
+ c = function () {
+ var e = function () {
+ var e = {};
+ (e.name = i.getSjisStringsAsUnicode(20)),
+ (e.elementCount = i.getUint32()),
+ (e.type = i.getUint8()),
+ (e.elements = []);
+ for (var t = 0; t < e.elementCount; t++)
+ e.elements.push({
+ index: i.getUint32(),
+ position: i.getFloat32Array(3),
+ });
+ return e;
+ },
+ t = r.metadata;
+ (t.morphCount = i.getUint16()), (r.morphs = []);
+ for (var n = 0; n < t.morphCount; n++) r.morphs.push(e());
+ },
+ f = function () {
+ var e = function () {
+ var e = {};
+ return (e.index = i.getUint16()), e;
+ },
+ t = r.metadata;
+ (t.morphFrameCount = i.getUint8()), (r.morphFrames = []);
+ for (var n = 0; n < t.morphFrameCount; n++)
+ r.morphFrames.push(e());
+ },
+ d = function () {
+ var e = function () {
+ var e = {};
+ return (e.name = i.getSjisStringsAsUnicode(50)), e;
+ },
+ t = r.metadata;
+ (t.boneFrameNameCount = i.getUint8()),
+ (r.boneFrameNames = []);
+ for (var n = 0; n < t.boneFrameNameCount; n++)
+ r.boneFrameNames.push(e());
+ },
+ h = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.boneIndex = i.getInt16()),
+ (e.frameIndex = i.getUint8()),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.boneFrameCount = i.getUint32()), (r.boneFrames = []);
+ for (var n = 0; n < t.boneFrameCount; n++)
+ r.boneFrames.push(e());
+ },
+ p = function () {
+ var e = r.metadata;
+ (e.englishCompatibility = i.getUint8()),
+ e.englishCompatibility > 0 &&
+ ((e.englishModelName = i.getSjisStringsAsUnicode(20)),
+ (e.englishComment = i.getSjisStringsAsUnicode(256)));
+ },
+ v = function () {
+ var e = function () {
+ var e = {};
+ return (e.name = i.getSjisStringsAsUnicode(20)), e;
+ },
+ t = r.metadata;
+ if (0 !== t.englishCompatibility) {
+ r.englishBoneNames = [];
+ for (var n = 0; n < t.boneCount; n++)
+ r.englishBoneNames.push(e());
+ }
+ },
+ m = function () {
+ var e = function () {
+ var e = {};
+ return (e.name = i.getSjisStringsAsUnicode(20)), e;
+ },
+ t = r.metadata;
+ if (0 !== t.englishCompatibility) {
+ r.englishMorphNames = [];
+ for (var n = 0; n < t.morphCount - 1; n++)
+ r.englishMorphNames.push(e());
+ }
+ },
+ g = function () {
+ var e = function () {
+ var e = {};
+ return (e.name = i.getSjisStringsAsUnicode(50)), e;
+ },
+ t = r.metadata;
+ if (0 !== t.englishCompatibility) {
+ r.englishBoneFrameNames = [];
+ for (var n = 0; n < t.boneFrameNameCount; n++)
+ r.englishBoneFrameNames.push(e());
+ }
+ },
+ A = function () {
+ var e = function () {
+ var e = {};
+ return (e.fileName = i.getSjisStringsAsUnicode(100)), e;
+ };
+ r.toonTextures = [];
+ for (var t = 0; t < 10; t++) r.toonTextures.push(e());
+ },
+ y = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.name = i.getSjisStringsAsUnicode(20)),
+ (e.boneIndex = i.getInt16()),
+ (e.groupIndex = i.getUint8()),
+ (e.groupTarget = i.getUint16()),
+ (e.shapeType = i.getUint8()),
+ (e.width = i.getFloat32()),
+ (e.height = i.getFloat32()),
+ (e.depth = i.getFloat32()),
+ (e.position = i.getFloat32Array(3)),
+ (e.rotation = i.getFloat32Array(3)),
+ (e.weight = i.getFloat32()),
+ (e.positionDamping = i.getFloat32()),
+ (e.rotationDamping = i.getFloat32()),
+ (e.restitution = i.getFloat32()),
+ (e.friction = i.getFloat32()),
+ (e.type = i.getUint8()),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.rigidBodyCount = i.getUint32()), (r.rigidBodies = []);
+ for (var n = 0; n < t.rigidBodyCount; n++)
+ r.rigidBodies.push(e());
+ },
+ b = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.name = i.getSjisStringsAsUnicode(20)),
+ (e.rigidBodyIndex1 = i.getUint32()),
+ (e.rigidBodyIndex2 = i.getUint32()),
+ (e.position = i.getFloat32Array(3)),
+ (e.rotation = i.getFloat32Array(3)),
+ (e.translationLimitation1 = i.getFloat32Array(3)),
+ (e.translationLimitation2 = i.getFloat32Array(3)),
+ (e.rotationLimitation1 = i.getFloat32Array(3)),
+ (e.rotationLimitation2 = i.getFloat32Array(3)),
+ (e.springPosition = i.getFloat32Array(3)),
+ (e.springRotation = i.getFloat32Array(3)),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.constraintCount = i.getUint32()), (r.constraints = []);
+ for (var n = 0; n < t.constraintCount; n++)
+ r.constraints.push(e());
+ };
+ return (
+ (function () {
+ var e = r.metadata;
+ if (((e.magic = i.getChars(3)), "Pmd" !== e.magic))
+ throw "PMD file magic is not Pmd, but " + e.magic;
+ (e.version = i.getFloat32()),
+ (e.modelName = i.getSjisStringsAsUnicode(20)),
+ (e.comment = i.getSjisStringsAsUnicode(256));
+ })(),
+ a(),
+ o(),
+ s(),
+ l(),
+ u(),
+ c(),
+ f(),
+ d(),
+ h(),
+ p(),
+ v(),
+ m(),
+ g(),
+ A(),
+ y(),
+ b(),
+ !0 === t && this.leftToRightModel(r),
+ r
+ );
+ }),
+ (i.prototype.parsePmx = function (e, t) {
+ var r = {},
+ i = new n(e);
+ (r.metadata = {}),
+ (r.metadata.format = "pmx"),
+ (r.metadata.coordinateSystem = "left");
+ var a = function () {
+ var e = function () {
+ var e = {};
+ (e.position = i.getFloat32Array(3)),
+ (e.normal = i.getFloat32Array(3)),
+ (e.uv = i.getFloat32Array(2)),
+ (e.auvs = []);
+ for (var n = 0; n < r.metadata.additionalUvNum; n++)
+ e.auvs.push(i.getFloat32Array(4));
+ e.type = i.getUint8();
+ var a = t.boneIndexSize;
+ if (0 === e.type)
+ (e.skinIndices = i.getIndexArray(a, 1)),
+ (e.skinWeights = [1]);
+ else if (1 === e.type)
+ (e.skinIndices = i.getIndexArray(a, 2)),
+ (e.skinWeights = i.getFloat32Array(1)),
+ e.skinWeights.push(1 - e.skinWeights[0]);
+ else if (2 === e.type)
+ (e.skinIndices = i.getIndexArray(a, 4)),
+ (e.skinWeights = i.getFloat32Array(4));
+ else {
+ if (3 !== e.type)
+ throw "unsupport bone type " + e.type + " exception.";
+ (e.skinIndices = i.getIndexArray(a, 2)),
+ (e.skinWeights = i.getFloat32Array(1)),
+ e.skinWeights.push(1 - e.skinWeights[0]),
+ (e.skinC = i.getFloat32Array(3)),
+ (e.skinR0 = i.getFloat32Array(3)),
+ (e.skinR1 = i.getFloat32Array(3)),
+ (e.type = 1);
+ }
+ return (e.edgeRatio = i.getFloat32()), e;
+ },
+ t = r.metadata;
+ (t.vertexCount = i.getUint32()), (r.vertices = []);
+ for (var n = 0; n < t.vertexCount; n++) r.vertices.push(e());
+ },
+ o = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.indices = i.getIndexArray(t.vertexIndexSize, 3, !0)),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.faceCount = i.getUint32() / 3), (r.faces = []);
+ for (var n = 0; n < t.faceCount; n++) r.faces.push(e());
+ },
+ s = function () {
+ var e = function () {
+ return i.getTextBuffer();
+ },
+ t = r.metadata;
+ (t.textureCount = i.getUint32()), (r.textures = []);
+ for (var n = 0; n < t.textureCount; n++) r.textures.push(e());
+ },
+ l = function () {
+ var e = function () {
+ var e = {};
+ if (
+ ((e.name = i.getTextBuffer()),
+ (e.englishName = i.getTextBuffer()),
+ (e.diffuse = i.getFloat32Array(4)),
+ (e.specular = i.getFloat32Array(3)),
+ (e.shininess = i.getFloat32()),
+ (e.ambient = i.getFloat32Array(3)),
+ (e.flag = i.getUint8()),
+ (e.edgeColor = i.getFloat32Array(4)),
+ (e.edgeSize = i.getFloat32()),
+ (e.textureIndex = i.getIndex(
+ r.metadata.textureIndexSize
+ )),
+ (e.envTextureIndex = i.getIndex(
+ r.metadata.textureIndexSize
+ )),
+ (e.envFlag = i.getUint8()),
+ (e.toonFlag = i.getUint8()),
+ 0 === e.toonFlag)
+ )
+ e.toonIndex = i.getIndex(r.metadata.textureIndexSize);
+ else {
+ if (1 !== e.toonFlag)
+ throw (
+ "unknown toon flag " + e.toonFlag + " exception."
+ );
+ e.toonIndex = i.getInt8();
+ }
+ return (
+ (e.comment = i.getTextBuffer()),
+ (e.faceCount = i.getUint32() / 3),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.materialCount = i.getUint32()), (r.materials = []);
+ for (var n = 0; n < t.materialCount; n++)
+ r.materials.push(e());
+ },
+ u = function () {
+ var e = function () {
+ var e = {};
+ if (
+ ((e.name = i.getTextBuffer()),
+ (e.englishName = i.getTextBuffer()),
+ (e.position = i.getFloat32Array(3)),
+ (e.parentIndex = i.getIndex(r.metadata.boneIndexSize)),
+ (e.transformationClass = i.getUint32()),
+ (e.flag = i.getUint16()),
+ 1 & e.flag
+ ? (e.connectIndex = i.getIndex(
+ r.metadata.boneIndexSize
+ ))
+ : (e.offsetPosition = i.getFloat32Array(3)),
+ 256 & e.flag || 512 & e.flag)
+ ) {
+ var t = {};
+ (t.isLocal = 0 !== (128 & e.flag)),
+ (t.affectRotation = 0 !== (256 & e.flag)),
+ (t.affectPosition = 0 !== (512 & e.flag)),
+ (t.parentIndex = i.getIndex(
+ r.metadata.boneIndexSize
+ )),
+ (t.ratio = i.getFloat32()),
+ (e.grant = t);
+ }
+ if (
+ (1024 & e.flag && (e.fixAxis = i.getFloat32Array(3)),
+ 2048 & e.flag &&
+ ((e.localXVector = i.getFloat32Array(3)),
+ (e.localZVector = i.getFloat32Array(3))),
+ 8192 & e.flag && (e.key = i.getUint32()),
+ 32 & e.flag)
+ ) {
+ var n = {};
+ (n.effector = i.getIndex(r.metadata.boneIndexSize)),
+ (n.target = null),
+ (n.iteration = i.getUint32()),
+ (n.maxAngle = i.getFloat32()),
+ (n.linkCount = i.getUint32()),
+ (n.links = []);
+ for (var a = 0; a < n.linkCount; a++) {
+ var o = {};
+ (o.index = i.getIndex(r.metadata.boneIndexSize)),
+ (o.angleLimitation = i.getUint8()),
+ 1 === o.angleLimitation &&
+ ((o.lowerLimitationAngle = i.getFloat32Array(3)),
+ (o.upperLimitationAngle = i.getFloat32Array(3))),
+ n.links.push(o);
+ }
+ e.ik = n;
+ }
+ return e;
+ },
+ t = r.metadata;
+ (t.boneCount = i.getUint32()), (r.bones = []);
+ for (var n = 0; n < t.boneCount; n++) r.bones.push(e());
+ },
+ c = function () {
+ var e = function () {
+ var e = {};
+ (e.name = i.getTextBuffer()),
+ (e.englishName = i.getTextBuffer()),
+ (e.panel = i.getUint8()),
+ (e.type = i.getUint8()),
+ (e.elementCount = i.getUint32()),
+ (e.elements = []);
+ for (var t = 0; t < e.elementCount; t++)
+ if (0 === e.type)
+ ((n = {}).index = i.getIndex(
+ r.metadata.morphIndexSize
+ )),
+ (n.ratio = i.getFloat32()),
+ e.elements.push(n);
+ else if (1 === e.type)
+ ((n = {}).index = i.getIndex(
+ r.metadata.vertexIndexSize,
+ !0
+ )),
+ (n.position = i.getFloat32Array(3)),
+ e.elements.push(n);
+ else if (2 === e.type)
+ ((n = {}).index = i.getIndex(
+ r.metadata.boneIndexSize
+ )),
+ (n.position = i.getFloat32Array(3)),
+ (n.rotation = i.getFloat32Array(4)),
+ e.elements.push(n);
+ else if (3 === e.type)
+ ((n = {}).index = i.getIndex(
+ r.metadata.vertexIndexSize,
+ !0
+ )),
+ (n.uv = i.getFloat32Array(4)),
+ e.elements.push(n);
+ else if (4 === e.type);
+ else if (5 === e.type);
+ else if (6 === e.type);
+ else if (7 === e.type);
+ else if (8 === e.type) {
+ var n;
+ ((n = {}).index = i.getIndex(
+ r.metadata.materialIndexSize
+ )),
+ (n.type = i.getUint8()),
+ (n.diffuse = i.getFloat32Array(4)),
+ (n.specular = i.getFloat32Array(3)),
+ (n.shininess = i.getFloat32()),
+ (n.ambient = i.getFloat32Array(3)),
+ (n.edgeColor = i.getFloat32Array(4)),
+ (n.edgeSize = i.getFloat32()),
+ (n.textureColor = i.getFloat32Array(4)),
+ (n.sphereTextureColor = i.getFloat32Array(4)),
+ (n.toonColor = i.getFloat32Array(4)),
+ e.elements.push(n);
+ }
+ return e;
+ },
+ t = r.metadata;
+ (t.morphCount = i.getUint32()), (r.morphs = []);
+ for (var n = 0; n < t.morphCount; n++) r.morphs.push(e());
+ },
+ f = function () {
+ var e = function () {
+ var e = {};
+ (e.name = i.getTextBuffer()),
+ (e.englishName = i.getTextBuffer()),
+ (e.type = i.getUint8()),
+ (e.elementCount = i.getUint32()),
+ (e.elements = []);
+ for (var t = 0; t < e.elementCount; t++) {
+ var n = {};
+ (n.target = i.getUint8()),
+ (n.index =
+ 0 === n.target
+ ? i.getIndex(r.metadata.boneIndexSize)
+ : i.getIndex(r.metadata.morphIndexSize)),
+ e.elements.push(n);
+ }
+ return e;
+ },
+ t = r.metadata;
+ (t.frameCount = i.getUint32()), (r.frames = []);
+ for (var n = 0; n < t.frameCount; n++) r.frames.push(e());
+ },
+ d = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.name = i.getTextBuffer()),
+ (e.englishName = i.getTextBuffer()),
+ (e.boneIndex = i.getIndex(r.metadata.boneIndexSize)),
+ (e.groupIndex = i.getUint8()),
+ (e.groupTarget = i.getUint16()),
+ (e.shapeType = i.getUint8()),
+ (e.width = i.getFloat32()),
+ (e.height = i.getFloat32()),
+ (e.depth = i.getFloat32()),
+ (e.position = i.getFloat32Array(3)),
+ (e.rotation = i.getFloat32Array(3)),
+ (e.weight = i.getFloat32()),
+ (e.positionDamping = i.getFloat32()),
+ (e.rotationDamping = i.getFloat32()),
+ (e.restitution = i.getFloat32()),
+ (e.friction = i.getFloat32()),
+ (e.type = i.getUint8()),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.rigidBodyCount = i.getUint32()), (r.rigidBodies = []);
+ for (var n = 0; n < t.rigidBodyCount; n++)
+ r.rigidBodies.push(e());
+ },
+ h = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.name = i.getTextBuffer()),
+ (e.englishName = i.getTextBuffer()),
+ (e.type = i.getUint8()),
+ (e.rigidBodyIndex1 = i.getIndex(
+ r.metadata.rigidBodyIndexSize
+ )),
+ (e.rigidBodyIndex2 = i.getIndex(
+ r.metadata.rigidBodyIndexSize
+ )),
+ (e.position = i.getFloat32Array(3)),
+ (e.rotation = i.getFloat32Array(3)),
+ (e.translationLimitation1 = i.getFloat32Array(3)),
+ (e.translationLimitation2 = i.getFloat32Array(3)),
+ (e.rotationLimitation1 = i.getFloat32Array(3)),
+ (e.rotationLimitation2 = i.getFloat32Array(3)),
+ (e.springPosition = i.getFloat32Array(3)),
+ (e.springRotation = i.getFloat32Array(3)),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.constraintCount = i.getUint32()), (r.constraints = []);
+ for (var n = 0; n < t.constraintCount; n++)
+ r.constraints.push(e());
+ };
+ return (
+ (function () {
+ var e = r.metadata;
+ if (((e.magic = i.getChars(4)), "PMX " !== e.magic))
+ throw "PMX file magic is not PMX , but " + e.magic;
+ if (
+ ((e.version = i.getFloat32()),
+ 2 !== e.version && 2.1 !== e.version)
+ )
+ throw "PMX version " + e.version + " is not supported.";
+ (e.headerSize = i.getUint8()),
+ (e.encoding = i.getUint8()),
+ (e.additionalUvNum = i.getUint8()),
+ (e.vertexIndexSize = i.getUint8()),
+ (e.textureIndexSize = i.getUint8()),
+ (e.materialIndexSize = i.getUint8()),
+ (e.boneIndexSize = i.getUint8()),
+ (e.morphIndexSize = i.getUint8()),
+ (e.rigidBodyIndexSize = i.getUint8()),
+ (e.modelName = i.getTextBuffer()),
+ (e.englishModelName = i.getTextBuffer()),
+ (e.comment = i.getTextBuffer()),
+ (e.englishComment = i.getTextBuffer());
+ })(),
+ a(),
+ o(),
+ s(),
+ l(),
+ u(),
+ c(),
+ f(),
+ d(),
+ h(),
+ !0 === t && this.leftToRightModel(r),
+ r
+ );
+ }),
+ (i.prototype.parseVmd = function (e, t) {
+ var r = {},
+ i = new n(e);
+ (r.metadata = {}), (r.metadata.coordinateSystem = "left");
+ var a = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.boneName = i.getSjisStringsAsUnicode(15)),
+ (e.frameNum = i.getUint32()),
+ (e.position = i.getFloat32Array(3)),
+ (e.rotation = i.getFloat32Array(4)),
+ (e.interpolation = i.getUint8Array(64)),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.motionCount = i.getUint32()), (r.motions = []);
+ for (var n = 0; n < t.motionCount; n++) r.motions.push(e());
+ },
+ o = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.morphName = i.getSjisStringsAsUnicode(15)),
+ (e.frameNum = i.getUint32()),
+ (e.weight = i.getFloat32()),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.morphCount = i.getUint32()), (r.morphs = []);
+ for (var n = 0; n < t.morphCount; n++) r.morphs.push(e());
+ },
+ s = function () {
+ var e = function () {
+ var e = {};
+ return (
+ (e.frameNum = i.getUint32()),
+ (e.distance = i.getFloat32()),
+ (e.position = i.getFloat32Array(3)),
+ (e.rotation = i.getFloat32Array(3)),
+ (e.interpolation = i.getUint8Array(24)),
+ (e.fov = i.getUint32()),
+ (e.perspective = i.getUint8()),
+ e
+ );
+ },
+ t = r.metadata;
+ (t.cameraCount = i.getUint32()), (r.cameras = []);
+ for (var n = 0; n < t.cameraCount; n++) r.cameras.push(e());
+ };
+ return (
+ (function () {
+ var e = r.metadata;
+ if (
+ ((e.magic = i.getChars(30)),
+ "Vocaloid Motion Data 0002" !== e.magic)
+ )
+ throw (
+ "VMD file magic is not Vocaloid Motion Data 0002, but " +
+ e.magic
+ );
+ e.name = i.getSjisStringsAsUnicode(20);
+ })(),
+ a(),
+ o(),
+ s(),
+ !0 === t && this.leftToRightVmd(r),
+ r
+ );
+ }),
+ (i.prototype.parseVpd = function (e, t) {
+ var n = { metadata: {} };
+ (n.metadata.coordinateSystem = "left"), (n.bones = []);
+ var r = /\/\/\w*(\r|\n|\r\n)/g,
+ i = /\r|\n|\r\n/,
+ a = e.replace(r, "").split(i);
+ function o() {
+ throw "the file seems not vpd file.";
+ }
+ function s() {
+ "Vocaloid Pose Data file" !== a[0] && o();
+ }
+ function l() {
+ a.length < 4 && o(),
+ (n.metadata.parentFile = a[2]),
+ (n.metadata.boneCount = parseInt(a[3]));
+ }
+ function u() {
+ for (
+ var e = /^\s*(Bone[0-9]+)\s*\{\s*(.*)$/,
+ t =
+ /^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/,
+ r =
+ /^\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*,\s*(-?[0-9]+\.[0-9]+)\s*;/,
+ i = /^\s*}/,
+ s = n.bones,
+ l = null,
+ u = null,
+ c = null,
+ f = 4;
+ f < a.length;
+ f++
+ ) {
+ var d,
+ h = a[f];
+ null !== (d = h.match(e)) && (null !== l && o(), (l = d[2])),
+ null !== (d = h.match(t)) &&
+ (null !== u && o(),
+ (u = [
+ parseFloat(d[1]),
+ parseFloat(d[2]),
+ parseFloat(d[3]),
+ ])),
+ null !== (d = h.match(r)) &&
+ (null !== c && o(),
+ (c = [
+ parseFloat(d[1]),
+ parseFloat(d[2]),
+ parseFloat(d[3]),
+ parseFloat(d[4]),
+ ])),
+ null !== (d = h.match(i)) &&
+ ((null !== l && null !== u && null !== c) || o(),
+ s.push({ name: l, translation: u, quaternion: c }),
+ (l = null),
+ (u = null),
+ (c = null));
+ }
+ (null === l && null === u && null === c) || o();
+ }
+ return s(), l(), u(), !0 === t && this.leftToRightVpd(n), n;
+ }),
+ (i.prototype.mergeVmds = function (e) {
+ var t = { metadata: {} };
+ (t.metadata.name = e[0].metadata.name),
+ (t.metadata.coordinateSystem = e[0].metadata.coordinateSystem),
+ (t.metadata.motionCount = 0),
+ (t.metadata.morphCount = 0),
+ (t.metadata.cameraCount = 0),
+ (t.motions = []),
+ (t.morphs = []),
+ (t.cameras = []);
+ for (var n = 0; n < e.length; n++) {
+ var r = e[n];
+ (t.metadata.motionCount += r.metadata.motionCount),
+ (t.metadata.morphCount += r.metadata.morphCount),
+ (t.metadata.cameraCount += r.metadata.cameraCount);
+ for (var i = 0; i < r.metadata.motionCount; i++)
+ t.motions.push(r.motions[i]);
+ for (i = 0; i < r.metadata.morphCount; i++)
+ t.morphs.push(r.morphs[i]);
+ for (i = 0; i < r.metadata.cameraCount; i++)
+ t.cameras.push(r.cameras[i]);
+ }
+ return t;
+ }),
+ (i.prototype.leftToRightModel = function (e) {
+ if ("right" !== e.metadata.coordinateSystem) {
+ e.metadata.coordinateSystem = "right";
+ for (var t = new r(), n = 0; n < e.metadata.vertexCount; n++)
+ t.leftToRightVector3(e.vertices[n].position),
+ t.leftToRightVector3(e.vertices[n].normal);
+ for (n = 0; n < e.metadata.faceCount; n++)
+ t.leftToRightIndexOrder(e.faces[n].indices);
+ for (n = 0; n < e.metadata.boneCount; n++)
+ t.leftToRightVector3(e.bones[n].position);
+ for (n = 0; n < e.metadata.morphCount; n++) {
+ var i = e.morphs[n];
+ if ("pmx" !== e.metadata.format || 1 === i.type)
+ for (var a = 0; a < i.elements.length; a++)
+ t.leftToRightVector3(i.elements[a].position);
+ }
+ for (n = 0; n < e.metadata.rigidBodyCount; n++)
+ t.leftToRightVector3(e.rigidBodies[n].position),
+ t.leftToRightEuler(e.rigidBodies[n].rotation);
+ for (n = 0; n < e.metadata.constraintCount; n++)
+ t.leftToRightVector3(e.constraints[n].position),
+ t.leftToRightEuler(e.constraints[n].rotation),
+ t.leftToRightVector3Range(
+ e.constraints[n].translationLimitation1,
+ e.constraints[n].translationLimitation2
+ ),
+ t.leftToRightEulerRange(
+ e.constraints[n].rotationLimitation1,
+ e.constraints[n].rotationLimitation2
+ );
+ }
+ }),
+ (i.prototype.leftToRightVmd = function (e) {
+ if ("right" !== e.metadata.coordinateSystem) {
+ e.metadata.coordinateSystem = "right";
+ for (var t = new r(), n = 0; n < e.metadata.motionCount; n++)
+ t.leftToRightVector3(e.motions[n].position),
+ t.leftToRightQuaternion(e.motions[n].rotation);
+ for (n = 0; n < e.metadata.cameraCount; n++)
+ t.leftToRightVector3(e.cameras[n].position),
+ t.leftToRightEuler(e.cameras[n].rotation);
+ }
+ }),
+ (i.prototype.leftToRightVpd = function (e) {
+ if ("right" !== e.metadata.coordinateSystem) {
+ e.metadata.coordinateSystem = "right";
+ for (var t = new r(), n = 0; n < e.bones.length; n++)
+ t.leftToRightVector3(e.bones[n].translation),
+ t.leftToRightQuaternion(e.bones[n].quaternion);
+ }
+ });
+ var a = { CharsetEncoder: t, Parser: i };
+ (e.MMDParser = a),
+ (e.CharsetEncoder = t),
+ (e.Parser = i),
+ Object.defineProperty(e, "__esModule", { value: !0 });
+ })(t);
+ },
+ 4463: function (e, t, n) {
+ "use strict";
+ var r = n(2791),
+ i = n(5585);
+ function a(e) {
+ for (
+ var t =
+ "https://reactjs.org/docs/error-decoder.html?invariant=" + e,
+ n = 1;
+ n < arguments.length;
+ n++
+ )
+ t += "&args[]=" + encodeURIComponent(arguments[n]);
+ return (
+ "Minified React error #" +
+ e +
+ "; visit " +
+ t +
+ " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
+ );
+ }
+ var o = new Set(),
+ s = {};
+ function l(e, t) {
+ u(e, t), u(e + "Capture", t);
+ }
+ function u(e, t) {
+ for (s[e] = t, e = 0; e < t.length; e++) o.add(t[e]);
+ }
+ var c = !(
+ "undefined" === typeof window ||
+ "undefined" === typeof window.document ||
+ "undefined" === typeof window.document.createElement
+ ),
+ f = Object.prototype.hasOwnProperty,
+ d =
+ /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
+ h = {},
+ p = {};
+ function v(e, t, n, r, i, a, o) {
+ (this.acceptsBooleans = 2 === t || 3 === t || 4 === t),
+ (this.attributeName = r),
+ (this.attributeNamespace = i),
+ (this.mustUseProperty = n),
+ (this.propertyName = e),
+ (this.type = t),
+ (this.sanitizeURL = a),
+ (this.removeEmptyString = o);
+ }
+ var m = {};
+ "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style"
+ .split(" ")
+ .forEach(function (e) {
+ m[e] = new v(e, 0, !1, e, null, !1, !1);
+ }),
+ [
+ ["acceptCharset", "accept-charset"],
+ ["className", "class"],
+ ["htmlFor", "for"],
+ ["httpEquiv", "http-equiv"],
+ ].forEach(function (e) {
+ var t = e[0];
+ m[t] = new v(t, 1, !1, e[1], null, !1, !1);
+ }),
+ ["contentEditable", "draggable", "spellCheck", "value"].forEach(
+ function (e) {
+ m[e] = new v(e, 2, !1, e.toLowerCase(), null, !1, !1);
+ }
+ ),
+ [
+ "autoReverse",
+ "externalResourcesRequired",
+ "focusable",
+ "preserveAlpha",
+ ].forEach(function (e) {
+ m[e] = new v(e, 2, !1, e, null, !1, !1);
+ }),
+ "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope"
+ .split(" ")
+ .forEach(function (e) {
+ m[e] = new v(e, 3, !1, e.toLowerCase(), null, !1, !1);
+ }),
+ ["checked", "multiple", "muted", "selected"].forEach(function (e) {
+ m[e] = new v(e, 3, !0, e, null, !1, !1);
+ }),
+ ["capture", "download"].forEach(function (e) {
+ m[e] = new v(e, 4, !1, e, null, !1, !1);
+ }),
+ ["cols", "rows", "size", "span"].forEach(function (e) {
+ m[e] = new v(e, 6, !1, e, null, !1, !1);
+ }),
+ ["rowSpan", "start"].forEach(function (e) {
+ m[e] = new v(e, 5, !1, e.toLowerCase(), null, !1, !1);
+ });
+ var g = /[\-:]([a-z])/g;
+ function A(e) {
+ return e[1].toUpperCase();
+ }
+ function y(e, t, n, r) {
+ var i = m.hasOwnProperty(t) ? m[t] : null;
+ (null !== i
+ ? 0 !== i.type
+ : r ||
+ !(2 < t.length) ||
+ ("o" !== t[0] && "O" !== t[0]) ||
+ ("n" !== t[1] && "N" !== t[1])) &&
+ ((function (e, t, n, r) {
+ if (
+ null === t ||
+ "undefined" === typeof t ||
+ (function (e, t, n, r) {
+ if (null !== n && 0 === n.type) return !1;
+ switch (typeof t) {
+ case "function":
+ case "symbol":
+ return !0;
+ case "boolean":
+ return (
+ !r &&
+ (null !== n
+ ? !n.acceptsBooleans
+ : "data-" !== (e = e.toLowerCase().slice(0, 5)) &&
+ "aria-" !== e)
+ );
+ default:
+ return !1;
+ }
+ })(e, t, n, r)
+ )
+ return !0;
+ if (r) return !1;
+ if (null !== n)
+ switch (n.type) {
+ case 3:
+ return !t;
+ case 4:
+ return !1 === t;
+ case 5:
+ return isNaN(t);
+ case 6:
+ return isNaN(t) || 1 > t;
+ }
+ return !1;
+ })(t, n, i, r) && (n = null),
+ r || null === i
+ ? (function (e) {
+ return (
+ !!f.call(p, e) ||
+ (!f.call(h, e) &&
+ (d.test(e) ? (p[e] = !0) : ((h[e] = !0), !1)))
+ );
+ })(t) &&
+ (null === n ? e.removeAttribute(t) : e.setAttribute(t, "" + n))
+ : i.mustUseProperty
+ ? (e[i.propertyName] = null === n ? 3 !== i.type && "" : n)
+ : ((t = i.attributeName),
+ (r = i.attributeNamespace),
+ null === n
+ ? e.removeAttribute(t)
+ : ((n =
+ 3 === (i = i.type) || (4 === i && !0 === n)
+ ? ""
+ : "" + n),
+ r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))));
+ }
+ "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height"
+ .split(" ")
+ .forEach(function (e) {
+ var t = e.replace(g, A);
+ m[t] = new v(t, 1, !1, e, null, !1, !1);
+ }),
+ "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type"
+ .split(" ")
+ .forEach(function (e) {
+ var t = e.replace(g, A);
+ m[t] = new v(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
+ }),
+ ["xml:base", "xml:lang", "xml:space"].forEach(function (e) {
+ var t = e.replace(g, A);
+ m[t] = new v(
+ t,
+ 1,
+ !1,
+ e,
+ "http://www.w3.org/XML/1998/namespace",
+ !1,
+ !1
+ );
+ }),
+ ["tabIndex", "crossOrigin"].forEach(function (e) {
+ m[e] = new v(e, 1, !1, e.toLowerCase(), null, !1, !1);
+ }),
+ (m.xlinkHref = new v(
+ "xlinkHref",
+ 1,
+ !1,
+ "xlink:href",
+ "http://www.w3.org/1999/xlink",
+ !0,
+ !1
+ )),
+ ["src", "href", "action", "formAction"].forEach(function (e) {
+ m[e] = new v(e, 1, !1, e.toLowerCase(), null, !0, !0);
+ });
+ var b = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
+ x = Symbol.for("react.element"),
+ S = Symbol.for("react.portal"),
+ E = Symbol.for("react.fragment"),
+ _ = Symbol.for("react.strict_mode"),
+ C = Symbol.for("react.profiler"),
+ w = Symbol.for("react.provider"),
+ T = Symbol.for("react.context"),
+ M = Symbol.for("react.forward_ref"),
+ I = Symbol.for("react.suspense"),
+ k = Symbol.for("react.suspense_list"),
+ R = Symbol.for("react.memo"),
+ B = Symbol.for("react.lazy");
+ Symbol.for("react.scope"), Symbol.for("react.debug_trace_mode");
+ var P = Symbol.for("react.offscreen");
+ Symbol.for("react.legacy_hidden"),
+ Symbol.for("react.cache"),
+ Symbol.for("react.tracing_marker");
+ var L = Symbol.iterator;
+ function D(e) {
+ return null === e || "object" !== typeof e
+ ? null
+ : "function" === typeof (e = (L && e[L]) || e["@@iterator"])
+ ? e
+ : null;
+ }
+ var U,
+ F = Object.assign;
+ function O(e) {
+ if (void 0 === U)
+ try {
+ throw Error();
+ } catch (n) {
+ var t = n.stack.trim().match(/\n( *(at )?)/);
+ U = (t && t[1]) || "";
+ }
+ return "\n" + U + e;
+ }
+ var N = !1;
+ function G(e, t) {
+ if (!e || N) return "";
+ N = !0;
+ var n = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ try {
+ if (t)
+ if (
+ ((t = function () {
+ throw Error();
+ }),
+ Object.defineProperty(t.prototype, "props", {
+ set: function () {
+ throw Error();
+ },
+ }),
+ "object" === typeof Reflect && Reflect.construct)
+ ) {
+ try {
+ Reflect.construct(t, []);
+ } catch (u) {
+ var r = u;
+ }
+ Reflect.construct(e, [], t);
+ } else {
+ try {
+ t.call();
+ } catch (u) {
+ r = u;
+ }
+ e.call(t.prototype);
+ }
+ else {
+ try {
+ throw Error();
+ } catch (u) {
+ r = u;
+ }
+ e();
+ }
+ } catch (u) {
+ if (u && r && "string" === typeof u.stack) {
+ for (
+ var i = u.stack.split("\n"),
+ a = r.stack.split("\n"),
+ o = i.length - 1,
+ s = a.length - 1;
+ 1 <= o && 0 <= s && i[o] !== a[s];
+
+ )
+ s--;
+ for (; 1 <= o && 0 <= s; o--, s--)
+ if (i[o] !== a[s]) {
+ if (1 !== o || 1 !== s)
+ do {
+ if ((o--, 0 > --s || i[o] !== a[s])) {
+ var l = "\n" + i[o].replace(" at new ", " at ");
+ return (
+ e.displayName &&
+ l.includes("") &&
+ (l = l.replace("", e.displayName)),
+ l
+ );
+ }
+ } while (1 <= o && 0 <= s);
+ break;
+ }
+ }
+ } finally {
+ (N = !1), (Error.prepareStackTrace = n);
+ }
+ return (e = e ? e.displayName || e.name : "") ? O(e) : "";
+ }
+ function Z(e) {
+ switch (e.tag) {
+ case 5:
+ return O(e.type);
+ case 16:
+ return O("Lazy");
+ case 13:
+ return O("Suspense");
+ case 19:
+ return O("SuspenseList");
+ case 0:
+ case 2:
+ case 15:
+ return (e = G(e.type, !1));
+ case 11:
+ return (e = G(e.type.render, !1));
+ case 1:
+ return (e = G(e.type, !0));
+ default:
+ return "";
+ }
+ }
+ function z(e) {
+ if (null == e) return null;
+ if ("function" === typeof e) return e.displayName || e.name || null;
+ if ("string" === typeof e) return e;
+ switch (e) {
+ case E:
+ return "Fragment";
+ case S:
+ return "Portal";
+ case C:
+ return "Profiler";
+ case _:
+ return "StrictMode";
+ case I:
+ return "Suspense";
+ case k:
+ return "SuspenseList";
+ }
+ if ("object" === typeof e)
+ switch (e.$$typeof) {
+ case T:
+ return (e.displayName || "Context") + ".Consumer";
+ case w:
+ return (e._context.displayName || "Context") + ".Provider";
+ case M:
+ var t = e.render;
+ return (
+ (e = e.displayName) ||
+ (e =
+ "" !== (e = t.displayName || t.name || "")
+ ? "ForwardRef(" + e + ")"
+ : "ForwardRef"),
+ e
+ );
+ case R:
+ return null !== (t = e.displayName || null)
+ ? t
+ : z(e.type) || "Memo";
+ case B:
+ (t = e._payload), (e = e._init);
+ try {
+ return z(e(t));
+ } catch (n) {}
+ }
+ return null;
+ }
+ function Q(e) {
+ var t = e.type;
+ switch (e.tag) {
+ case 24:
+ return "Cache";
+ case 9:
+ return (t.displayName || "Context") + ".Consumer";
+ case 10:
+ return (t._context.displayName || "Context") + ".Provider";
+ case 18:
+ return "DehydratedFragment";
+ case 11:
+ return (
+ (e = (e = t.render).displayName || e.name || ""),
+ t.displayName ||
+ ("" !== e ? "ForwardRef(" + e + ")" : "ForwardRef")
+ );
+ case 7:
+ return "Fragment";
+ case 5:
+ return t;
+ case 4:
+ return "Portal";
+ case 3:
+ return "Root";
+ case 6:
+ return "Text";
+ case 16:
+ return z(t);
+ case 8:
+ return t === _ ? "StrictMode" : "Mode";
+ case 22:
+ return "Offscreen";
+ case 12:
+ return "Profiler";
+ case 21:
+ return "Scope";
+ case 13:
+ return "Suspense";
+ case 19:
+ return "SuspenseList";
+ case 25:
+ return "TracingMarker";
+ case 1:
+ case 0:
+ case 17:
+ case 2:
+ case 14:
+ case 15:
+ if ("function" === typeof t)
+ return t.displayName || t.name || null;
+ if ("string" === typeof t) return t;
+ }
+ return null;
+ }
+ function H(e) {
+ switch (typeof e) {
+ case "boolean":
+ case "number":
+ case "string":
+ case "undefined":
+ case "object":
+ return e;
+ default:
+ return "";
+ }
+ }
+ function V(e) {
+ var t = e.type;
+ return (
+ (e = e.nodeName) &&
+ "input" === e.toLowerCase() &&
+ ("checkbox" === t || "radio" === t)
+ );
+ }
+ function j(e) {
+ e._valueTracker ||
+ (e._valueTracker = (function (e) {
+ var t = V(e) ? "checked" : "value",
+ n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t),
+ r = "" + e[t];
+ if (
+ !e.hasOwnProperty(t) &&
+ "undefined" !== typeof n &&
+ "function" === typeof n.get &&
+ "function" === typeof n.set
+ ) {
+ var i = n.get,
+ a = n.set;
+ return (
+ Object.defineProperty(e, t, {
+ configurable: !0,
+ get: function () {
+ return i.call(this);
+ },
+ set: function (e) {
+ (r = "" + e), a.call(this, e);
+ },
+ }),
+ Object.defineProperty(e, t, { enumerable: n.enumerable }),
+ {
+ getValue: function () {
+ return r;
+ },
+ setValue: function (e) {
+ r = "" + e;
+ },
+ stopTracking: function () {
+ (e._valueTracker = null), delete e[t];
+ },
+ }
+ );
+ }
+ })(e));
+ }
+ function W(e) {
+ if (!e) return !1;
+ var t = e._valueTracker;
+ if (!t) return !0;
+ var n = t.getValue(),
+ r = "";
+ return (
+ e && (r = V(e) ? (e.checked ? "true" : "false") : e.value),
+ (e = r) !== n && (t.setValue(e), !0)
+ );
+ }
+ function X(e) {
+ if (
+ "undefined" ===
+ typeof (e =
+ e || ("undefined" !== typeof document ? document : void 0))
+ )
+ return null;
+ try {
+ return e.activeElement || e.body;
+ } catch (t) {
+ return e.body;
+ }
+ }
+ function Y(e, t) {
+ var n = t.checked;
+ return F({}, t, {
+ defaultChecked: void 0,
+ defaultValue: void 0,
+ value: void 0,
+ checked: null != n ? n : e._wrapperState.initialChecked,
+ });
+ }
+ function q(e, t) {
+ var n = null == t.defaultValue ? "" : t.defaultValue,
+ r = null != t.checked ? t.checked : t.defaultChecked;
+ (n = H(null != t.value ? t.value : n)),
+ (e._wrapperState = {
+ initialChecked: r,
+ initialValue: n,
+ controlled:
+ "checkbox" === t.type || "radio" === t.type
+ ? null != t.checked
+ : null != t.value,
+ });
+ }
+ function J(e, t) {
+ null != (t = t.checked) && y(e, "checked", t, !1);
+ }
+ function K(e, t) {
+ J(e, t);
+ var n = H(t.value),
+ r = t.type;
+ if (null != n)
+ "number" === r
+ ? ((0 === n && "" === e.value) || e.value != n) &&
+ (e.value = "" + n)
+ : e.value !== "" + n && (e.value = "" + n);
+ else if ("submit" === r || "reset" === r)
+ return void e.removeAttribute("value");
+ t.hasOwnProperty("value")
+ ? ee(e, t.type, n)
+ : t.hasOwnProperty("defaultValue") &&
+ ee(e, t.type, H(t.defaultValue)),
+ null == t.checked &&
+ null != t.defaultChecked &&
+ (e.defaultChecked = !!t.defaultChecked);
+ }
+ function $(e, t, n) {
+ if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
+ var r = t.type;
+ if (
+ !(
+ ("submit" !== r && "reset" !== r) ||
+ (void 0 !== t.value && null !== t.value)
+ )
+ )
+ return;
+ (t = "" + e._wrapperState.initialValue),
+ n || t === e.value || (e.value = t),
+ (e.defaultValue = t);
+ }
+ "" !== (n = e.name) && (e.name = ""),
+ (e.defaultChecked = !!e._wrapperState.initialChecked),
+ "" !== n && (e.name = n);
+ }
+ function ee(e, t, n) {
+ ("number" === t && X(e.ownerDocument) === e) ||
+ (null == n
+ ? (e.defaultValue = "" + e._wrapperState.initialValue)
+ : e.defaultValue !== "" + n && (e.defaultValue = "" + n));
+ }
+ var te = Array.isArray;
+ function ne(e, t, n, r) {
+ if (((e = e.options), t)) {
+ t = {};
+ for (var i = 0; i < n.length; i++) t["$" + n[i]] = !0;
+ for (n = 0; n < e.length; n++)
+ (i = t.hasOwnProperty("$" + e[n].value)),
+ e[n].selected !== i && (e[n].selected = i),
+ i && r && (e[n].defaultSelected = !0);
+ } else {
+ for (n = "" + H(n), t = null, i = 0; i < e.length; i++) {
+ if (e[i].value === n)
+ return (
+ (e[i].selected = !0), void (r && (e[i].defaultSelected = !0))
+ );
+ null !== t || e[i].disabled || (t = e[i]);
+ }
+ null !== t && (t.selected = !0);
+ }
+ }
+ function re(e, t) {
+ if (null != t.dangerouslySetInnerHTML) throw Error(a(91));
+ return F({}, t, {
+ value: void 0,
+ defaultValue: void 0,
+ children: "" + e._wrapperState.initialValue,
+ });
+ }
+ function ie(e, t) {
+ var n = t.value;
+ if (null == n) {
+ if (((n = t.children), (t = t.defaultValue), null != n)) {
+ if (null != t) throw Error(a(92));
+ if (te(n)) {
+ if (1 < n.length) throw Error(a(93));
+ n = n[0];
+ }
+ t = n;
+ }
+ null == t && (t = ""), (n = t);
+ }
+ e._wrapperState = { initialValue: H(n) };
+ }
+ function ae(e, t) {
+ var n = H(t.value),
+ r = H(t.defaultValue);
+ null != n &&
+ ((n = "" + n) !== e.value && (e.value = n),
+ null == t.defaultValue &&
+ e.defaultValue !== n &&
+ (e.defaultValue = n)),
+ null != r && (e.defaultValue = "" + r);
+ }
+ function oe(e) {
+ var t = e.textContent;
+ t === e._wrapperState.initialValue &&
+ "" !== t &&
+ null !== t &&
+ (e.value = t);
+ }
+ function se(e) {
+ switch (e) {
+ case "svg":
+ return "http://www.w3.org/2000/svg";
+ case "math":
+ return "http://www.w3.org/1998/Math/MathML";
+ default:
+ return "http://www.w3.org/1999/xhtml";
+ }
+ }
+ function le(e, t) {
+ return null == e || "http://www.w3.org/1999/xhtml" === e
+ ? se(t)
+ : "http://www.w3.org/2000/svg" === e && "foreignObject" === t
+ ? "http://www.w3.org/1999/xhtml"
+ : e;
+ }
+ var ue,
+ ce,
+ fe =
+ ((ce = function (e, t) {
+ if (
+ "http://www.w3.org/2000/svg" !== e.namespaceURI ||
+ "innerHTML" in e
+ )
+ e.innerHTML = t;
+ else {
+ for (
+ (ue = ue || document.createElement("div")).innerHTML =
+ "",
+ t = ue.firstChild;
+ e.firstChild;
+
+ )
+ e.removeChild(e.firstChild);
+ for (; t.firstChild; ) e.appendChild(t.firstChild);
+ }
+ }),
+ "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction
+ ? function (e, t, n, r) {
+ MSApp.execUnsafeLocalFunction(function () {
+ return ce(e, t);
+ });
+ }
+ : ce);
+ function de(e, t) {
+ if (t) {
+ var n = e.firstChild;
+ if (n && n === e.lastChild && 3 === n.nodeType)
+ return void (n.nodeValue = t);
+ }
+ e.textContent = t;
+ }
+ var he = {
+ animationIterationCount: !0,
+ aspectRatio: !0,
+ borderImageOutset: !0,
+ borderImageSlice: !0,
+ borderImageWidth: !0,
+ boxFlex: !0,
+ boxFlexGroup: !0,
+ boxOrdinalGroup: !0,
+ columnCount: !0,
+ columns: !0,
+ flex: !0,
+ flexGrow: !0,
+ flexPositive: !0,
+ flexShrink: !0,
+ flexNegative: !0,
+ flexOrder: !0,
+ gridArea: !0,
+ gridRow: !0,
+ gridRowEnd: !0,
+ gridRowSpan: !0,
+ gridRowStart: !0,
+ gridColumn: !0,
+ gridColumnEnd: !0,
+ gridColumnSpan: !0,
+ gridColumnStart: !0,
+ fontWeight: !0,
+ lineClamp: !0,
+ lineHeight: !0,
+ opacity: !0,
+ order: !0,
+ orphans: !0,
+ tabSize: !0,
+ widows: !0,
+ zIndex: !0,
+ zoom: !0,
+ fillOpacity: !0,
+ floodOpacity: !0,
+ stopOpacity: !0,
+ strokeDasharray: !0,
+ strokeDashoffset: !0,
+ strokeMiterlimit: !0,
+ strokeOpacity: !0,
+ strokeWidth: !0,
+ },
+ pe = ["Webkit", "ms", "Moz", "O"];
+ function ve(e, t, n) {
+ return null == t || "boolean" === typeof t || "" === t
+ ? ""
+ : n ||
+ "number" !== typeof t ||
+ 0 === t ||
+ (he.hasOwnProperty(e) && he[e])
+ ? ("" + t).trim()
+ : t + "px";
+ }
+ function me(e, t) {
+ for (var n in ((e = e.style), t))
+ if (t.hasOwnProperty(n)) {
+ var r = 0 === n.indexOf("--"),
+ i = ve(n, t[n], r);
+ "float" === n && (n = "cssFloat"),
+ r ? e.setProperty(n, i) : (e[n] = i);
+ }
+ }
+ Object.keys(he).forEach(function (e) {
+ pe.forEach(function (t) {
+ (t = t + e.charAt(0).toUpperCase() + e.substring(1)),
+ (he[t] = he[e]);
+ });
+ });
+ var ge = F(
+ { menuitem: !0 },
+ {
+ area: !0,
+ base: !0,
+ br: !0,
+ col: !0,
+ embed: !0,
+ hr: !0,
+ img: !0,
+ input: !0,
+ keygen: !0,
+ link: !0,
+ meta: !0,
+ param: !0,
+ source: !0,
+ track: !0,
+ wbr: !0,
+ }
+ );
+ function Ae(e, t) {
+ if (t) {
+ if (
+ ge[e] &&
+ (null != t.children || null != t.dangerouslySetInnerHTML)
+ )
+ throw Error(a(137, e));
+ if (null != t.dangerouslySetInnerHTML) {
+ if (null != t.children) throw Error(a(60));
+ if (
+ "object" !== typeof t.dangerouslySetInnerHTML ||
+ !("__html" in t.dangerouslySetInnerHTML)
+ )
+ throw Error(a(61));
+ }
+ if (null != t.style && "object" !== typeof t.style)
+ throw Error(a(62));
+ }
+ }
+ function ye(e, t) {
+ if (-1 === e.indexOf("-")) return "string" === typeof t.is;
+ switch (e) {
+ case "annotation-xml":
+ case "color-profile":
+ case "font-face":
+ case "font-face-src":
+ case "font-face-uri":
+ case "font-face-format":
+ case "font-face-name":
+ case "missing-glyph":
+ return !1;
+ default:
+ return !0;
+ }
+ }
+ var be = null;
+ function xe(e) {
+ return (
+ (e = e.target || e.srcElement || window).correspondingUseElement &&
+ (e = e.correspondingUseElement),
+ 3 === e.nodeType ? e.parentNode : e
+ );
+ }
+ var Se = null,
+ Ee = null,
+ _e = null;
+ function Ce(e) {
+ if ((e = yi(e))) {
+ if ("function" !== typeof Se) throw Error(a(280));
+ var t = e.stateNode;
+ t && ((t = xi(t)), Se(e.stateNode, e.type, t));
+ }
+ }
+ function we(e) {
+ Ee ? (_e ? _e.push(e) : (_e = [e])) : (Ee = e);
+ }
+ function Te() {
+ if (Ee) {
+ var e = Ee,
+ t = _e;
+ if (((_e = Ee = null), Ce(e), t))
+ for (e = 0; e < t.length; e++) Ce(t[e]);
+ }
+ }
+ function Me(e, t) {
+ return e(t);
+ }
+ function Ie() {}
+ var ke = !1;
+ function Re(e, t, n) {
+ if (ke) return e(t, n);
+ ke = !0;
+ try {
+ return Me(e, t, n);
+ } finally {
+ (ke = !1), (null !== Ee || null !== _e) && (Ie(), Te());
+ }
+ }
+ function Be(e, t) {
+ var n = e.stateNode;
+ if (null === n) return null;
+ var r = xi(n);
+ if (null === r) return null;
+ n = r[t];
+ e: switch (t) {
+ case "onClick":
+ case "onClickCapture":
+ case "onDoubleClick":
+ case "onDoubleClickCapture":
+ case "onMouseDown":
+ case "onMouseDownCapture":
+ case "onMouseMove":
+ case "onMouseMoveCapture":
+ case "onMouseUp":
+ case "onMouseUpCapture":
+ case "onMouseEnter":
+ (r = !r.disabled) ||
+ (r = !(
+ "button" === (e = e.type) ||
+ "input" === e ||
+ "select" === e ||
+ "textarea" === e
+ )),
+ (e = !r);
+ break e;
+ default:
+ e = !1;
+ }
+ if (e) return null;
+ if (n && "function" !== typeof n) throw Error(a(231, t, typeof n));
+ return n;
+ }
+ var Pe = !1;
+ if (c)
+ try {
+ var Le = {};
+ Object.defineProperty(Le, "passive", {
+ get: function () {
+ Pe = !0;
+ },
+ }),
+ window.addEventListener("test", Le, Le),
+ window.removeEventListener("test", Le, Le);
+ } catch (ce) {
+ Pe = !1;
+ }
+ function De(e, t, n, r, i, a, o, s, l) {
+ var u = Array.prototype.slice.call(arguments, 3);
+ try {
+ t.apply(n, u);
+ } catch (c) {
+ this.onError(c);
+ }
+ }
+ var Ue = !1,
+ Fe = null,
+ Oe = !1,
+ Ne = null,
+ Ge = {
+ onError: function (e) {
+ (Ue = !0), (Fe = e);
+ },
+ };
+ function Ze(e, t, n, r, i, a, o, s, l) {
+ (Ue = !1), (Fe = null), De.apply(Ge, arguments);
+ }
+ function ze(e) {
+ var t = e,
+ n = e;
+ if (e.alternate) for (; t.return; ) t = t.return;
+ else {
+ e = t;
+ do {
+ 0 !== (4098 & (t = e).flags) && (n = t.return), (e = t.return);
+ } while (e);
+ }
+ return 3 === t.tag ? n : null;
+ }
+ function Qe(e) {
+ if (13 === e.tag) {
+ var t = e.memoizedState;
+ if (
+ (null === t &&
+ null !== (e = e.alternate) &&
+ (t = e.memoizedState),
+ null !== t)
+ )
+ return t.dehydrated;
+ }
+ return null;
+ }
+ function He(e) {
+ if (ze(e) !== e) throw Error(a(188));
+ }
+ function Ve(e) {
+ return null !==
+ (e = (function (e) {
+ var t = e.alternate;
+ if (!t) {
+ if (null === (t = ze(e))) throw Error(a(188));
+ return t !== e ? null : e;
+ }
+ for (var n = e, r = t; ; ) {
+ var i = n.return;
+ if (null === i) break;
+ var o = i.alternate;
+ if (null === o) {
+ if (null !== (r = i.return)) {
+ n = r;
+ continue;
+ }
+ break;
+ }
+ if (i.child === o.child) {
+ for (o = i.child; o; ) {
+ if (o === n) return He(i), e;
+ if (o === r) return He(i), t;
+ o = o.sibling;
+ }
+ throw Error(a(188));
+ }
+ if (n.return !== r.return) (n = i), (r = o);
+ else {
+ for (var s = !1, l = i.child; l; ) {
+ if (l === n) {
+ (s = !0), (n = i), (r = o);
+ break;
+ }
+ if (l === r) {
+ (s = !0), (r = i), (n = o);
+ break;
+ }
+ l = l.sibling;
+ }
+ if (!s) {
+ for (l = o.child; l; ) {
+ if (l === n) {
+ (s = !0), (n = o), (r = i);
+ break;
+ }
+ if (l === r) {
+ (s = !0), (r = o), (n = i);
+ break;
+ }
+ l = l.sibling;
+ }
+ if (!s) throw Error(a(189));
+ }
+ }
+ if (n.alternate !== r) throw Error(a(190));
+ }
+ if (3 !== n.tag) throw Error(a(188));
+ return n.stateNode.current === n ? e : t;
+ })(e))
+ ? je(e)
+ : null;
+ }
+ function je(e) {
+ if (5 === e.tag || 6 === e.tag) return e;
+ for (e = e.child; null !== e; ) {
+ var t = je(e);
+ if (null !== t) return t;
+ e = e.sibling;
+ }
+ return null;
+ }
+ var We = i.unstable_scheduleCallback,
+ Xe = i.unstable_cancelCallback,
+ Ye = i.unstable_shouldYield,
+ qe = i.unstable_requestPaint,
+ Je = i.unstable_now,
+ Ke = i.unstable_getCurrentPriorityLevel,
+ $e = i.unstable_ImmediatePriority,
+ et = i.unstable_UserBlockingPriority,
+ tt = i.unstable_NormalPriority,
+ nt = i.unstable_LowPriority,
+ rt = i.unstable_IdlePriority,
+ it = null,
+ at = null;
+ var ot = Math.clz32
+ ? Math.clz32
+ : function (e) {
+ return (e >>>= 0), 0 === e ? 32 : (31 - ((st(e) / lt) | 0)) | 0;
+ },
+ st = Math.log,
+ lt = Math.LN2;
+ var ut = 64,
+ ct = 4194304;
+ function ft(e) {
+ switch (e & -e) {
+ case 1:
+ return 1;
+ case 2:
+ return 2;
+ case 4:
+ return 4;
+ case 8:
+ return 8;
+ case 16:
+ return 16;
+ case 32:
+ return 32;
+ case 64:
+ case 128:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ case 4096:
+ case 8192:
+ case 16384:
+ case 32768:
+ case 65536:
+ case 131072:
+ case 262144:
+ case 524288:
+ case 1048576:
+ case 2097152:
+ return 4194240 & e;
+ case 4194304:
+ case 8388608:
+ case 16777216:
+ case 33554432:
+ case 67108864:
+ return 130023424 & e;
+ case 134217728:
+ return 134217728;
+ case 268435456:
+ return 268435456;
+ case 536870912:
+ return 536870912;
+ case 1073741824:
+ return 1073741824;
+ default:
+ return e;
+ }
+ }
+ function dt(e, t) {
+ var n = e.pendingLanes;
+ if (0 === n) return 0;
+ var r = 0,
+ i = e.suspendedLanes,
+ a = e.pingedLanes,
+ o = 268435455 & n;
+ if (0 !== o) {
+ var s = o & ~i;
+ 0 !== s ? (r = ft(s)) : 0 !== (a &= o) && (r = ft(a));
+ } else 0 !== (o = n & ~i) ? (r = ft(o)) : 0 !== a && (r = ft(a));
+ if (0 === r) return 0;
+ if (
+ 0 !== t &&
+ t !== r &&
+ 0 === (t & i) &&
+ ((i = r & -r) >= (a = t & -t) || (16 === i && 0 !== (4194240 & a)))
+ )
+ return t;
+ if ((0 !== (4 & r) && (r |= 16 & n), 0 !== (t = e.entangledLanes)))
+ for (e = e.entanglements, t &= r; 0 < t; )
+ (i = 1 << (n = 31 - ot(t))), (r |= e[n]), (t &= ~i);
+ return r;
+ }
+ function ht(e, t) {
+ switch (e) {
+ case 1:
+ case 2:
+ case 4:
+ return t + 250;
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ case 4096:
+ case 8192:
+ case 16384:
+ case 32768:
+ case 65536:
+ case 131072:
+ case 262144:
+ case 524288:
+ case 1048576:
+ case 2097152:
+ return t + 5e3;
+ default:
+ return -1;
+ }
+ }
+ function pt(e) {
+ return 0 !== (e = -1073741825 & e.pendingLanes)
+ ? e
+ : 1073741824 & e
+ ? 1073741824
+ : 0;
+ }
+ function vt() {
+ var e = ut;
+ return 0 === (4194240 & (ut <<= 1)) && (ut = 64), e;
+ }
+ function mt(e) {
+ for (var t = [], n = 0; 31 > n; n++) t.push(e);
+ return t;
+ }
+ function gt(e, t, n) {
+ (e.pendingLanes |= t),
+ 536870912 !== t && ((e.suspendedLanes = 0), (e.pingedLanes = 0)),
+ ((e = e.eventTimes)[(t = 31 - ot(t))] = n);
+ }
+ function At(e, t) {
+ var n = (e.entangledLanes |= t);
+ for (e = e.entanglements; n; ) {
+ var r = 31 - ot(n),
+ i = 1 << r;
+ (i & t) | (e[r] & t) && (e[r] |= t), (n &= ~i);
+ }
+ }
+ var yt = 0;
+ function bt(e) {
+ return 1 < (e &= -e)
+ ? 4 < e
+ ? 0 !== (268435455 & e)
+ ? 16
+ : 536870912
+ : 4
+ : 1;
+ }
+ var xt,
+ St,
+ Et,
+ _t,
+ Ct,
+ wt = !1,
+ Tt = [],
+ Mt = null,
+ It = null,
+ kt = null,
+ Rt = new Map(),
+ Bt = new Map(),
+ Pt = [],
+ Lt =
+ "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(
+ " "
+ );
+ function Dt(e, t) {
+ switch (e) {
+ case "focusin":
+ case "focusout":
+ Mt = null;
+ break;
+ case "dragenter":
+ case "dragleave":
+ It = null;
+ break;
+ case "mouseover":
+ case "mouseout":
+ kt = null;
+ break;
+ case "pointerover":
+ case "pointerout":
+ Rt.delete(t.pointerId);
+ break;
+ case "gotpointercapture":
+ case "lostpointercapture":
+ Bt.delete(t.pointerId);
+ }
+ }
+ function Ut(e, t, n, r, i, a) {
+ return null === e || e.nativeEvent !== a
+ ? ((e = {
+ blockedOn: t,
+ domEventName: n,
+ eventSystemFlags: r,
+ nativeEvent: a,
+ targetContainers: [i],
+ }),
+ null !== t && null !== (t = yi(t)) && St(t),
+ e)
+ : ((e.eventSystemFlags |= r),
+ (t = e.targetContainers),
+ null !== i && -1 === t.indexOf(i) && t.push(i),
+ e);
+ }
+ function Ft(e) {
+ var t = Ai(e.target);
+ if (null !== t) {
+ var n = ze(t);
+ if (null !== n)
+ if (13 === (t = n.tag)) {
+ if (null !== (t = Qe(n)))
+ return (
+ (e.blockedOn = t),
+ void Ct(e.priority, function () {
+ Et(n);
+ })
+ );
+ } else if (
+ 3 === t &&
+ n.stateNode.current.memoizedState.isDehydrated
+ )
+ return void (e.blockedOn =
+ 3 === n.tag ? n.stateNode.containerInfo : null);
+ }
+ e.blockedOn = null;
+ }
+ function Ot(e) {
+ if (null !== e.blockedOn) return !1;
+ for (var t = e.targetContainers; 0 < t.length; ) {
+ var n = Yt(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent);
+ if (null !== n)
+ return null !== (t = yi(n)) && St(t), (e.blockedOn = n), !1;
+ var r = new (n = e.nativeEvent).constructor(n.type, n);
+ (be = r), n.target.dispatchEvent(r), (be = null), t.shift();
+ }
+ return !0;
+ }
+ function Nt(e, t, n) {
+ Ot(e) && n.delete(t);
+ }
+ function Gt() {
+ (wt = !1),
+ null !== Mt && Ot(Mt) && (Mt = null),
+ null !== It && Ot(It) && (It = null),
+ null !== kt && Ot(kt) && (kt = null),
+ Rt.forEach(Nt),
+ Bt.forEach(Nt);
+ }
+ function Zt(e, t) {
+ e.blockedOn === t &&
+ ((e.blockedOn = null),
+ wt ||
+ ((wt = !0),
+ i.unstable_scheduleCallback(i.unstable_NormalPriority, Gt)));
+ }
+ function zt(e) {
+ function t(t) {
+ return Zt(t, e);
+ }
+ if (0 < Tt.length) {
+ Zt(Tt[0], e);
+ for (var n = 1; n < Tt.length; n++) {
+ var r = Tt[n];
+ r.blockedOn === e && (r.blockedOn = null);
+ }
+ }
+ for (
+ null !== Mt && Zt(Mt, e),
+ null !== It && Zt(It, e),
+ null !== kt && Zt(kt, e),
+ Rt.forEach(t),
+ Bt.forEach(t),
+ n = 0;
+ n < Pt.length;
+ n++
+ )
+ (r = Pt[n]).blockedOn === e && (r.blockedOn = null);
+ for (; 0 < Pt.length && null === (n = Pt[0]).blockedOn; )
+ Ft(n), null === n.blockedOn && Pt.shift();
+ }
+ var Qt = b.ReactCurrentBatchConfig,
+ Ht = !0;
+ function Vt(e, t, n, r) {
+ var i = yt,
+ a = Qt.transition;
+ Qt.transition = null;
+ try {
+ (yt = 1), Wt(e, t, n, r);
+ } finally {
+ (yt = i), (Qt.transition = a);
+ }
+ }
+ function jt(e, t, n, r) {
+ var i = yt,
+ a = Qt.transition;
+ Qt.transition = null;
+ try {
+ (yt = 4), Wt(e, t, n, r);
+ } finally {
+ (yt = i), (Qt.transition = a);
+ }
+ }
+ function Wt(e, t, n, r) {
+ if (Ht) {
+ var i = Yt(e, t, n, r);
+ if (null === i) Hr(e, t, r, Xt, n), Dt(e, r);
+ else if (
+ (function (e, t, n, r, i) {
+ switch (t) {
+ case "focusin":
+ return (Mt = Ut(Mt, e, t, n, r, i)), !0;
+ case "dragenter":
+ return (It = Ut(It, e, t, n, r, i)), !0;
+ case "mouseover":
+ return (kt = Ut(kt, e, t, n, r, i)), !0;
+ case "pointerover":
+ var a = i.pointerId;
+ return Rt.set(a, Ut(Rt.get(a) || null, e, t, n, r, i)), !0;
+ case "gotpointercapture":
+ return (
+ (a = i.pointerId),
+ Bt.set(a, Ut(Bt.get(a) || null, e, t, n, r, i)),
+ !0
+ );
+ }
+ return !1;
+ })(i, e, t, n, r)
+ )
+ r.stopPropagation();
+ else if ((Dt(e, r), 4 & t && -1 < Lt.indexOf(e))) {
+ for (; null !== i; ) {
+ var a = yi(i);
+ if (
+ (null !== a && xt(a),
+ null === (a = Yt(e, t, n, r)) && Hr(e, t, r, Xt, n),
+ a === i)
+ )
+ break;
+ i = a;
+ }
+ null !== i && r.stopPropagation();
+ } else Hr(e, t, r, null, n);
+ }
+ }
+ var Xt = null;
+ function Yt(e, t, n, r) {
+ if (((Xt = null), null !== (e = Ai((e = xe(r))))))
+ if (null === (t = ze(e))) e = null;
+ else if (13 === (n = t.tag)) {
+ if (null !== (e = Qe(t))) return e;
+ e = null;
+ } else if (3 === n) {
+ if (t.stateNode.current.memoizedState.isDehydrated)
+ return 3 === t.tag ? t.stateNode.containerInfo : null;
+ e = null;
+ } else t !== e && (e = null);
+ return (Xt = e), null;
+ }
+ function qt(e) {
+ switch (e) {
+ case "cancel":
+ case "click":
+ case "close":
+ case "contextmenu":
+ case "copy":
+ case "cut":
+ case "auxclick":
+ case "dblclick":
+ case "dragend":
+ case "dragstart":
+ case "drop":
+ case "focusin":
+ case "focusout":
+ case "input":
+ case "invalid":
+ case "keydown":
+ case "keypress":
+ case "keyup":
+ case "mousedown":
+ case "mouseup":
+ case "paste":
+ case "pause":
+ case "play":
+ case "pointercancel":
+ case "pointerdown":
+ case "pointerup":
+ case "ratechange":
+ case "reset":
+ case "resize":
+ case "seeked":
+ case "submit":
+ case "touchcancel":
+ case "touchend":
+ case "touchstart":
+ case "volumechange":
+ case "change":
+ case "selectionchange":
+ case "textInput":
+ case "compositionstart":
+ case "compositionend":
+ case "compositionupdate":
+ case "beforeblur":
+ case "afterblur":
+ case "beforeinput":
+ case "blur":
+ case "fullscreenchange":
+ case "focus":
+ case "hashchange":
+ case "popstate":
+ case "select":
+ case "selectstart":
+ return 1;
+ case "drag":
+ case "dragenter":
+ case "dragexit":
+ case "dragleave":
+ case "dragover":
+ case "mousemove":
+ case "mouseout":
+ case "mouseover":
+ case "pointermove":
+ case "pointerout":
+ case "pointerover":
+ case "scroll":
+ case "toggle":
+ case "touchmove":
+ case "wheel":
+ case "mouseenter":
+ case "mouseleave":
+ case "pointerenter":
+ case "pointerleave":
+ return 4;
+ case "message":
+ switch (Ke()) {
+ case $e:
+ return 1;
+ case et:
+ return 4;
+ case tt:
+ case nt:
+ return 16;
+ case rt:
+ return 536870912;
+ default:
+ return 16;
+ }
+ default:
+ return 16;
+ }
+ }
+ var Jt = null,
+ Kt = null,
+ $t = null;
+ function en() {
+ if ($t) return $t;
+ var e,
+ t,
+ n = Kt,
+ r = n.length,
+ i = "value" in Jt ? Jt.value : Jt.textContent,
+ a = i.length;
+ for (e = 0; e < r && n[e] === i[e]; e++);
+ var o = r - e;
+ for (t = 1; t <= o && n[r - t] === i[a - t]; t++);
+ return ($t = i.slice(e, 1 < t ? 1 - t : void 0));
+ }
+ function tn(e) {
+ var t = e.keyCode;
+ return (
+ "charCode" in e
+ ? 0 === (e = e.charCode) && 13 === t && (e = 13)
+ : (e = t),
+ 10 === e && (e = 13),
+ 32 <= e || 13 === e ? e : 0
+ );
+ }
+ function nn() {
+ return !0;
+ }
+ function rn() {
+ return !1;
+ }
+ function an(e) {
+ function t(t, n, r, i, a) {
+ for (var o in ((this._reactName = t),
+ (this._targetInst = r),
+ (this.type = n),
+ (this.nativeEvent = i),
+ (this.target = a),
+ (this.currentTarget = null),
+ e))
+ e.hasOwnProperty(o) && ((t = e[o]), (this[o] = t ? t(i) : i[o]));
+ return (
+ (this.isDefaultPrevented = (
+ null != i.defaultPrevented
+ ? i.defaultPrevented
+ : !1 === i.returnValue
+ )
+ ? nn
+ : rn),
+ (this.isPropagationStopped = rn),
+ this
+ );
+ }
+ return (
+ F(t.prototype, {
+ preventDefault: function () {
+ this.defaultPrevented = !0;
+ var e = this.nativeEvent;
+ e &&
+ (e.preventDefault
+ ? e.preventDefault()
+ : "unknown" !== typeof e.returnValue &&
+ (e.returnValue = !1),
+ (this.isDefaultPrevented = nn));
+ },
+ stopPropagation: function () {
+ var e = this.nativeEvent;
+ e &&
+ (e.stopPropagation
+ ? e.stopPropagation()
+ : "unknown" !== typeof e.cancelBubble &&
+ (e.cancelBubble = !0),
+ (this.isPropagationStopped = nn));
+ },
+ persist: function () {},
+ isPersistent: nn,
+ }),
+ t
+ );
+ }
+ var on,
+ sn,
+ ln,
+ un = {
+ eventPhase: 0,
+ bubbles: 0,
+ cancelable: 0,
+ timeStamp: function (e) {
+ return e.timeStamp || Date.now();
+ },
+ defaultPrevented: 0,
+ isTrusted: 0,
+ },
+ cn = an(un),
+ fn = F({}, un, { view: 0, detail: 0 }),
+ dn = an(fn),
+ hn = F({}, fn, {
+ screenX: 0,
+ screenY: 0,
+ clientX: 0,
+ clientY: 0,
+ pageX: 0,
+ pageY: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ getModifierState: Cn,
+ button: 0,
+ buttons: 0,
+ relatedTarget: function (e) {
+ return void 0 === e.relatedTarget
+ ? e.fromElement === e.srcElement
+ ? e.toElement
+ : e.fromElement
+ : e.relatedTarget;
+ },
+ movementX: function (e) {
+ return "movementX" in e
+ ? e.movementX
+ : (e !== ln &&
+ (ln && "mousemove" === e.type
+ ? ((on = e.screenX - ln.screenX),
+ (sn = e.screenY - ln.screenY))
+ : (sn = on = 0),
+ (ln = e)),
+ on);
+ },
+ movementY: function (e) {
+ return "movementY" in e ? e.movementY : sn;
+ },
+ }),
+ pn = an(hn),
+ vn = an(F({}, hn, { dataTransfer: 0 })),
+ mn = an(F({}, fn, { relatedTarget: 0 })),
+ gn = an(
+ F({}, un, { animationName: 0, elapsedTime: 0, pseudoElement: 0 })
+ ),
+ An = F({}, un, {
+ clipboardData: function (e) {
+ return "clipboardData" in e
+ ? e.clipboardData
+ : window.clipboardData;
+ },
+ }),
+ yn = an(An),
+ bn = an(F({}, un, { data: 0 })),
+ xn = {
+ Esc: "Escape",
+ Spacebar: " ",
+ Left: "ArrowLeft",
+ Up: "ArrowUp",
+ Right: "ArrowRight",
+ Down: "ArrowDown",
+ Del: "Delete",
+ Win: "OS",
+ Menu: "ContextMenu",
+ Apps: "ContextMenu",
+ Scroll: "ScrollLock",
+ MozPrintableKey: "Unidentified",
+ },
+ Sn = {
+ 8: "Backspace",
+ 9: "Tab",
+ 12: "Clear",
+ 13: "Enter",
+ 16: "Shift",
+ 17: "Control",
+ 18: "Alt",
+ 19: "Pause",
+ 20: "CapsLock",
+ 27: "Escape",
+ 32: " ",
+ 33: "PageUp",
+ 34: "PageDown",
+ 35: "End",
+ 36: "Home",
+ 37: "ArrowLeft",
+ 38: "ArrowUp",
+ 39: "ArrowRight",
+ 40: "ArrowDown",
+ 45: "Insert",
+ 46: "Delete",
+ 112: "F1",
+ 113: "F2",
+ 114: "F3",
+ 115: "F4",
+ 116: "F5",
+ 117: "F6",
+ 118: "F7",
+ 119: "F8",
+ 120: "F9",
+ 121: "F10",
+ 122: "F11",
+ 123: "F12",
+ 144: "NumLock",
+ 145: "ScrollLock",
+ 224: "Meta",
+ },
+ En = {
+ Alt: "altKey",
+ Control: "ctrlKey",
+ Meta: "metaKey",
+ Shift: "shiftKey",
+ };
+ function _n(e) {
+ var t = this.nativeEvent;
+ return t.getModifierState
+ ? t.getModifierState(e)
+ : !!(e = En[e]) && !!t[e];
+ }
+ function Cn() {
+ return _n;
+ }
+ var wn = F({}, fn, {
+ key: function (e) {
+ if (e.key) {
+ var t = xn[e.key] || e.key;
+ if ("Unidentified" !== t) return t;
+ }
+ return "keypress" === e.type
+ ? 13 === (e = tn(e))
+ ? "Enter"
+ : String.fromCharCode(e)
+ : "keydown" === e.type || "keyup" === e.type
+ ? Sn[e.keyCode] || "Unidentified"
+ : "";
+ },
+ code: 0,
+ location: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ altKey: 0,
+ metaKey: 0,
+ repeat: 0,
+ locale: 0,
+ getModifierState: Cn,
+ charCode: function (e) {
+ return "keypress" === e.type ? tn(e) : 0;
+ },
+ keyCode: function (e) {
+ return "keydown" === e.type || "keyup" === e.type ? e.keyCode : 0;
+ },
+ which: function (e) {
+ return "keypress" === e.type
+ ? tn(e)
+ : "keydown" === e.type || "keyup" === e.type
+ ? e.keyCode
+ : 0;
+ },
+ }),
+ Tn = an(wn),
+ Mn = an(
+ F({}, hn, {
+ pointerId: 0,
+ width: 0,
+ height: 0,
+ pressure: 0,
+ tangentialPressure: 0,
+ tiltX: 0,
+ tiltY: 0,
+ twist: 0,
+ pointerType: 0,
+ isPrimary: 0,
+ })
+ ),
+ In = an(
+ F({}, fn, {
+ touches: 0,
+ targetTouches: 0,
+ changedTouches: 0,
+ altKey: 0,
+ metaKey: 0,
+ ctrlKey: 0,
+ shiftKey: 0,
+ getModifierState: Cn,
+ })
+ ),
+ kn = an(
+ F({}, un, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 })
+ ),
+ Rn = F({}, hn, {
+ deltaX: function (e) {
+ return "deltaX" in e
+ ? e.deltaX
+ : "wheelDeltaX" in e
+ ? -e.wheelDeltaX
+ : 0;
+ },
+ deltaY: function (e) {
+ return "deltaY" in e
+ ? e.deltaY
+ : "wheelDeltaY" in e
+ ? -e.wheelDeltaY
+ : "wheelDelta" in e
+ ? -e.wheelDelta
+ : 0;
+ },
+ deltaZ: 0,
+ deltaMode: 0,
+ }),
+ Bn = an(Rn),
+ Pn = [9, 13, 27, 32],
+ Ln = c && "CompositionEvent" in window,
+ Dn = null;
+ c && "documentMode" in document && (Dn = document.documentMode);
+ var Un = c && "TextEvent" in window && !Dn,
+ Fn = c && (!Ln || (Dn && 8 < Dn && 11 >= Dn)),
+ On = String.fromCharCode(32),
+ Nn = !1;
+ function Gn(e, t) {
+ switch (e) {
+ case "keyup":
+ return -1 !== Pn.indexOf(t.keyCode);
+ case "keydown":
+ return 229 !== t.keyCode;
+ case "keypress":
+ case "mousedown":
+ case "focusout":
+ return !0;
+ default:
+ return !1;
+ }
+ }
+ function Zn(e) {
+ return "object" === typeof (e = e.detail) && "data" in e
+ ? e.data
+ : null;
+ }
+ var zn = !1;
+ var Qn = {
+ color: !0,
+ date: !0,
+ datetime: !0,
+ "datetime-local": !0,
+ email: !0,
+ month: !0,
+ number: !0,
+ password: !0,
+ range: !0,
+ search: !0,
+ tel: !0,
+ text: !0,
+ time: !0,
+ url: !0,
+ week: !0,
+ };
+ function Hn(e) {
+ var t = e && e.nodeName && e.nodeName.toLowerCase();
+ return "input" === t ? !!Qn[e.type] : "textarea" === t;
+ }
+ function Vn(e, t, n, r) {
+ we(r),
+ 0 < (t = jr(t, "onChange")).length &&
+ ((n = new cn("onChange", "change", null, n, r)),
+ e.push({ event: n, listeners: t }));
+ }
+ var jn = null,
+ Wn = null;
+ function Xn(e) {
+ Or(e, 0);
+ }
+ function Yn(e) {
+ if (W(bi(e))) return e;
+ }
+ function qn(e, t) {
+ if ("change" === e) return t;
+ }
+ var Jn = !1;
+ if (c) {
+ var Kn;
+ if (c) {
+ var $n = "oninput" in document;
+ if (!$n) {
+ var er = document.createElement("div");
+ er.setAttribute("oninput", "return;"),
+ ($n = "function" === typeof er.oninput);
+ }
+ Kn = $n;
+ } else Kn = !1;
+ Jn = Kn && (!document.documentMode || 9 < document.documentMode);
+ }
+ function tr() {
+ jn && (jn.detachEvent("onpropertychange", nr), (Wn = jn = null));
+ }
+ function nr(e) {
+ if ("value" === e.propertyName && Yn(Wn)) {
+ var t = [];
+ Vn(t, Wn, e, xe(e)), Re(Xn, t);
+ }
+ }
+ function rr(e, t, n) {
+ "focusin" === e
+ ? (tr(), (Wn = n), (jn = t).attachEvent("onpropertychange", nr))
+ : "focusout" === e && tr();
+ }
+ function ir(e) {
+ if ("selectionchange" === e || "keyup" === e || "keydown" === e)
+ return Yn(Wn);
+ }
+ function ar(e, t) {
+ if ("click" === e) return Yn(t);
+ }
+ function or(e, t) {
+ if ("input" === e || "change" === e) return Yn(t);
+ }
+ var sr =
+ "function" === typeof Object.is
+ ? Object.is
+ : function (e, t) {
+ return (
+ (e === t && (0 !== e || 1 / e === 1 / t)) ||
+ (e !== e && t !== t)
+ );
+ };
+ function lr(e, t) {
+ if (sr(e, t)) return !0;
+ if (
+ "object" !== typeof e ||
+ null === e ||
+ "object" !== typeof t ||
+ null === t
+ )
+ return !1;
+ var n = Object.keys(e),
+ r = Object.keys(t);
+ if (n.length !== r.length) return !1;
+ for (r = 0; r < n.length; r++) {
+ var i = n[r];
+ if (!f.call(t, i) || !sr(e[i], t[i])) return !1;
+ }
+ return !0;
+ }
+ function ur(e) {
+ for (; e && e.firstChild; ) e = e.firstChild;
+ return e;
+ }
+ function cr(e, t) {
+ var n,
+ r = ur(e);
+ for (e = 0; r; ) {
+ if (3 === r.nodeType) {
+ if (((n = e + r.textContent.length), e <= t && n >= t))
+ return { node: r, offset: t - e };
+ e = n;
+ }
+ e: {
+ for (; r; ) {
+ if (r.nextSibling) {
+ r = r.nextSibling;
+ break e;
+ }
+ r = r.parentNode;
+ }
+ r = void 0;
+ }
+ r = ur(r);
+ }
+ }
+ function fr(e, t) {
+ return (
+ !(!e || !t) &&
+ (e === t ||
+ ((!e || 3 !== e.nodeType) &&
+ (t && 3 === t.nodeType
+ ? fr(e, t.parentNode)
+ : "contains" in e
+ ? e.contains(t)
+ : !!e.compareDocumentPosition &&
+ !!(16 & e.compareDocumentPosition(t)))))
+ );
+ }
+ function dr() {
+ for (var e = window, t = X(); t instanceof e.HTMLIFrameElement; ) {
+ try {
+ var n = "string" === typeof t.contentWindow.location.href;
+ } catch (r) {
+ n = !1;
+ }
+ if (!n) break;
+ t = X((e = t.contentWindow).document);
+ }
+ return t;
+ }
+ function hr(e) {
+ var t = e && e.nodeName && e.nodeName.toLowerCase();
+ return (
+ t &&
+ (("input" === t &&
+ ("text" === e.type ||
+ "search" === e.type ||
+ "tel" === e.type ||
+ "url" === e.type ||
+ "password" === e.type)) ||
+ "textarea" === t ||
+ "true" === e.contentEditable)
+ );
+ }
+ function pr(e) {
+ var t = dr(),
+ n = e.focusedElem,
+ r = e.selectionRange;
+ if (
+ t !== n &&
+ n &&
+ n.ownerDocument &&
+ fr(n.ownerDocument.documentElement, n)
+ ) {
+ if (null !== r && hr(n))
+ if (
+ ((t = r.start),
+ void 0 === (e = r.end) && (e = t),
+ "selectionStart" in n)
+ )
+ (n.selectionStart = t),
+ (n.selectionEnd = Math.min(e, n.value.length));
+ else if (
+ (e =
+ ((t = n.ownerDocument || document) && t.defaultView) ||
+ window).getSelection
+ ) {
+ e = e.getSelection();
+ var i = n.textContent.length,
+ a = Math.min(r.start, i);
+ (r = void 0 === r.end ? a : Math.min(r.end, i)),
+ !e.extend && a > r && ((i = r), (r = a), (a = i)),
+ (i = cr(n, a));
+ var o = cr(n, r);
+ i &&
+ o &&
+ (1 !== e.rangeCount ||
+ e.anchorNode !== i.node ||
+ e.anchorOffset !== i.offset ||
+ e.focusNode !== o.node ||
+ e.focusOffset !== o.offset) &&
+ ((t = t.createRange()).setStart(i.node, i.offset),
+ e.removeAllRanges(),
+ a > r
+ ? (e.addRange(t), e.extend(o.node, o.offset))
+ : (t.setEnd(o.node, o.offset), e.addRange(t)));
+ }
+ for (t = [], e = n; (e = e.parentNode); )
+ 1 === e.nodeType &&
+ t.push({ element: e, left: e.scrollLeft, top: e.scrollTop });
+ for (
+ "function" === typeof n.focus && n.focus(), n = 0;
+ n < t.length;
+ n++
+ )
+ ((e = t[n]).element.scrollLeft = e.left),
+ (e.element.scrollTop = e.top);
+ }
+ }
+ var vr = c && "documentMode" in document && 11 >= document.documentMode,
+ mr = null,
+ gr = null,
+ Ar = null,
+ yr = !1;
+ function br(e, t, n) {
+ var r =
+ n.window === n
+ ? n.document
+ : 9 === n.nodeType
+ ? n
+ : n.ownerDocument;
+ yr ||
+ null == mr ||
+ mr !== X(r) ||
+ ("selectionStart" in (r = mr) && hr(r)
+ ? (r = { start: r.selectionStart, end: r.selectionEnd })
+ : (r = {
+ anchorNode: (r = (
+ (r.ownerDocument && r.ownerDocument.defaultView) ||
+ window
+ ).getSelection()).anchorNode,
+ anchorOffset: r.anchorOffset,
+ focusNode: r.focusNode,
+ focusOffset: r.focusOffset,
+ }),
+ (Ar && lr(Ar, r)) ||
+ ((Ar = r),
+ 0 < (r = jr(gr, "onSelect")).length &&
+ ((t = new cn("onSelect", "select", null, t, n)),
+ e.push({ event: t, listeners: r }),
+ (t.target = mr))));
+ }
+ function xr(e, t) {
+ var n = {};
+ return (
+ (n[e.toLowerCase()] = t.toLowerCase()),
+ (n["Webkit" + e] = "webkit" + t),
+ (n["Moz" + e] = "moz" + t),
+ n
+ );
+ }
+ var Sr = {
+ animationend: xr("Animation", "AnimationEnd"),
+ animationiteration: xr("Animation", "AnimationIteration"),
+ animationstart: xr("Animation", "AnimationStart"),
+ transitionend: xr("Transition", "TransitionEnd"),
+ },
+ Er = {},
+ _r = {};
+ function Cr(e) {
+ if (Er[e]) return Er[e];
+ if (!Sr[e]) return e;
+ var t,
+ n = Sr[e];
+ for (t in n)
+ if (n.hasOwnProperty(t) && t in _r) return (Er[e] = n[t]);
+ return e;
+ }
+ c &&
+ ((_r = document.createElement("div").style),
+ "AnimationEvent" in window ||
+ (delete Sr.animationend.animation,
+ delete Sr.animationiteration.animation,
+ delete Sr.animationstart.animation),
+ "TransitionEvent" in window || delete Sr.transitionend.transition);
+ var wr = Cr("animationend"),
+ Tr = Cr("animationiteration"),
+ Mr = Cr("animationstart"),
+ Ir = Cr("transitionend"),
+ kr = new Map(),
+ Rr =
+ "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(
+ " "
+ );
+ function Br(e, t) {
+ kr.set(e, t), l(t, [e]);
+ }
+ for (var Pr = 0; Pr < Rr.length; Pr++) {
+ var Lr = Rr[Pr];
+ Br(Lr.toLowerCase(), "on" + (Lr[0].toUpperCase() + Lr.slice(1)));
+ }
+ Br(wr, "onAnimationEnd"),
+ Br(Tr, "onAnimationIteration"),
+ Br(Mr, "onAnimationStart"),
+ Br("dblclick", "onDoubleClick"),
+ Br("focusin", "onFocus"),
+ Br("focusout", "onBlur"),
+ Br(Ir, "onTransitionEnd"),
+ u("onMouseEnter", ["mouseout", "mouseover"]),
+ u("onMouseLeave", ["mouseout", "mouseover"]),
+ u("onPointerEnter", ["pointerout", "pointerover"]),
+ u("onPointerLeave", ["pointerout", "pointerover"]),
+ l(
+ "onChange",
+ "change click focusin focusout input keydown keyup selectionchange".split(
+ " "
+ )
+ ),
+ l(
+ "onSelect",
+ "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
+ " "
+ )
+ ),
+ l("onBeforeInput", [
+ "compositionend",
+ "keypress",
+ "textInput",
+ "paste",
+ ]),
+ l(
+ "onCompositionEnd",
+ "compositionend focusout keydown keypress keyup mousedown".split(
+ " "
+ )
+ ),
+ l(
+ "onCompositionStart",
+ "compositionstart focusout keydown keypress keyup mousedown".split(
+ " "
+ )
+ ),
+ l(
+ "onCompositionUpdate",
+ "compositionupdate focusout keydown keypress keyup mousedown".split(
+ " "
+ )
+ );
+ var Dr =
+ "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(
+ " "
+ ),
+ Ur = new Set(
+ "cancel close invalid load scroll toggle".split(" ").concat(Dr)
+ );
+ function Fr(e, t, n) {
+ var r = e.type || "unknown-event";
+ (e.currentTarget = n),
+ (function (e, t, n, r, i, o, s, l, u) {
+ if ((Ze.apply(this, arguments), Ue)) {
+ if (!Ue) throw Error(a(198));
+ var c = Fe;
+ (Ue = !1), (Fe = null), Oe || ((Oe = !0), (Ne = c));
+ }
+ })(r, t, void 0, e),
+ (e.currentTarget = null);
+ }
+ function Or(e, t) {
+ t = 0 !== (4 & t);
+ for (var n = 0; n < e.length; n++) {
+ var r = e[n],
+ i = r.event;
+ r = r.listeners;
+ e: {
+ var a = void 0;
+ if (t)
+ for (var o = r.length - 1; 0 <= o; o--) {
+ var s = r[o],
+ l = s.instance,
+ u = s.currentTarget;
+ if (((s = s.listener), l !== a && i.isPropagationStopped()))
+ break e;
+ Fr(i, s, u), (a = l);
+ }
+ else
+ for (o = 0; o < r.length; o++) {
+ if (
+ ((l = (s = r[o]).instance),
+ (u = s.currentTarget),
+ (s = s.listener),
+ l !== a && i.isPropagationStopped())
+ )
+ break e;
+ Fr(i, s, u), (a = l);
+ }
+ }
+ }
+ if (Oe) throw ((e = Ne), (Oe = !1), (Ne = null), e);
+ }
+ function Nr(e, t) {
+ var n = t[vi];
+ void 0 === n && (n = t[vi] = new Set());
+ var r = e + "__bubble";
+ n.has(r) || (Qr(t, e, 2, !1), n.add(r));
+ }
+ function Gr(e, t, n) {
+ var r = 0;
+ t && (r |= 4), Qr(n, e, r, t);
+ }
+ var Zr = "_reactListening" + Math.random().toString(36).slice(2);
+ function zr(e) {
+ if (!e[Zr]) {
+ (e[Zr] = !0),
+ o.forEach(function (t) {
+ "selectionchange" !== t &&
+ (Ur.has(t) || Gr(t, !1, e), Gr(t, !0, e));
+ });
+ var t = 9 === e.nodeType ? e : e.ownerDocument;
+ null === t || t[Zr] || ((t[Zr] = !0), Gr("selectionchange", !1, t));
+ }
+ }
+ function Qr(e, t, n, r) {
+ switch (qt(t)) {
+ case 1:
+ var i = Vt;
+ break;
+ case 4:
+ i = jt;
+ break;
+ default:
+ i = Wt;
+ }
+ (n = i.bind(null, t, n, e)),
+ (i = void 0),
+ !Pe ||
+ ("touchstart" !== t && "touchmove" !== t && "wheel" !== t) ||
+ (i = !0),
+ r
+ ? void 0 !== i
+ ? e.addEventListener(t, n, { capture: !0, passive: i })
+ : e.addEventListener(t, n, !0)
+ : void 0 !== i
+ ? e.addEventListener(t, n, { passive: i })
+ : e.addEventListener(t, n, !1);
+ }
+ function Hr(e, t, n, r, i) {
+ var a = r;
+ if (0 === (1 & t) && 0 === (2 & t) && null !== r)
+ e: for (;;) {
+ if (null === r) return;
+ var o = r.tag;
+ if (3 === o || 4 === o) {
+ var s = r.stateNode.containerInfo;
+ if (s === i || (8 === s.nodeType && s.parentNode === i)) break;
+ if (4 === o)
+ for (o = r.return; null !== o; ) {
+ var l = o.tag;
+ if (
+ (3 === l || 4 === l) &&
+ ((l = o.stateNode.containerInfo) === i ||
+ (8 === l.nodeType && l.parentNode === i))
+ )
+ return;
+ o = o.return;
+ }
+ for (; null !== s; ) {
+ if (null === (o = Ai(s))) return;
+ if (5 === (l = o.tag) || 6 === l) {
+ r = a = o;
+ continue e;
+ }
+ s = s.parentNode;
+ }
+ }
+ r = r.return;
+ }
+ Re(function () {
+ var r = a,
+ i = xe(n),
+ o = [];
+ e: {
+ var s = kr.get(e);
+ if (void 0 !== s) {
+ var l = cn,
+ u = e;
+ switch (e) {
+ case "keypress":
+ if (0 === tn(n)) break e;
+ case "keydown":
+ case "keyup":
+ l = Tn;
+ break;
+ case "focusin":
+ (u = "focus"), (l = mn);
+ break;
+ case "focusout":
+ (u = "blur"), (l = mn);
+ break;
+ case "beforeblur":
+ case "afterblur":
+ l = mn;
+ break;
+ case "click":
+ if (2 === n.button) break e;
+ case "auxclick":
+ case "dblclick":
+ case "mousedown":
+ case "mousemove":
+ case "mouseup":
+ case "mouseout":
+ case "mouseover":
+ case "contextmenu":
+ l = pn;
+ break;
+ case "drag":
+ case "dragend":
+ case "dragenter":
+ case "dragexit":
+ case "dragleave":
+ case "dragover":
+ case "dragstart":
+ case "drop":
+ l = vn;
+ break;
+ case "touchcancel":
+ case "touchend":
+ case "touchmove":
+ case "touchstart":
+ l = In;
+ break;
+ case wr:
+ case Tr:
+ case Mr:
+ l = gn;
+ break;
+ case Ir:
+ l = kn;
+ break;
+ case "scroll":
+ l = dn;
+ break;
+ case "wheel":
+ l = Bn;
+ break;
+ case "copy":
+ case "cut":
+ case "paste":
+ l = yn;
+ break;
+ case "gotpointercapture":
+ case "lostpointercapture":
+ case "pointercancel":
+ case "pointerdown":
+ case "pointermove":
+ case "pointerout":
+ case "pointerover":
+ case "pointerup":
+ l = Mn;
+ }
+ var c = 0 !== (4 & t),
+ f = !c && "scroll" === e,
+ d = c ? (null !== s ? s + "Capture" : null) : s;
+ c = [];
+ for (var h, p = r; null !== p; ) {
+ var v = (h = p).stateNode;
+ if (
+ (5 === h.tag &&
+ null !== v &&
+ ((h = v),
+ null !== d &&
+ null != (v = Be(p, d)) &&
+ c.push(Vr(p, v, h))),
+ f)
+ )
+ break;
+ p = p.return;
+ }
+ 0 < c.length &&
+ ((s = new l(s, u, null, n, i)),
+ o.push({ event: s, listeners: c }));
+ }
+ }
+ if (0 === (7 & t)) {
+ if (
+ ((l = "mouseout" === e || "pointerout" === e),
+ (!(s = "mouseover" === e || "pointerover" === e) ||
+ n === be ||
+ !(u = n.relatedTarget || n.fromElement) ||
+ (!Ai(u) && !u[pi])) &&
+ (l || s) &&
+ ((s =
+ i.window === i
+ ? i
+ : (s = i.ownerDocument)
+ ? s.defaultView || s.parentWindow
+ : window),
+ l
+ ? ((l = r),
+ null !==
+ (u = (u = n.relatedTarget || n.toElement)
+ ? Ai(u)
+ : null) &&
+ (u !== (f = ze(u)) || (5 !== u.tag && 6 !== u.tag)) &&
+ (u = null))
+ : ((l = null), (u = r)),
+ l !== u))
+ ) {
+ if (
+ ((c = pn),
+ (v = "onMouseLeave"),
+ (d = "onMouseEnter"),
+ (p = "mouse"),
+ ("pointerout" !== e && "pointerover" !== e) ||
+ ((c = Mn),
+ (v = "onPointerLeave"),
+ (d = "onPointerEnter"),
+ (p = "pointer")),
+ (f = null == l ? s : bi(l)),
+ (h = null == u ? s : bi(u)),
+ ((s = new c(v, p + "leave", l, n, i)).target = f),
+ (s.relatedTarget = h),
+ (v = null),
+ Ai(i) === r &&
+ (((c = new c(d, p + "enter", u, n, i)).target = h),
+ (c.relatedTarget = f),
+ (v = c)),
+ (f = v),
+ l && u)
+ )
+ e: {
+ for (d = u, p = 0, h = c = l; h; h = Wr(h)) p++;
+ for (h = 0, v = d; v; v = Wr(v)) h++;
+ for (; 0 < p - h; ) (c = Wr(c)), p--;
+ for (; 0 < h - p; ) (d = Wr(d)), h--;
+ for (; p--; ) {
+ if (c === d || (null !== d && c === d.alternate)) break e;
+ (c = Wr(c)), (d = Wr(d));
+ }
+ c = null;
+ }
+ else c = null;
+ null !== l && Xr(o, s, l, c, !1),
+ null !== u && null !== f && Xr(o, f, u, c, !0);
+ }
+ if (
+ "select" ===
+ (l =
+ (s = r ? bi(r) : window).nodeName &&
+ s.nodeName.toLowerCase()) ||
+ ("input" === l && "file" === s.type)
+ )
+ var m = qn;
+ else if (Hn(s))
+ if (Jn) m = or;
+ else {
+ m = ir;
+ var g = rr;
+ }
+ else
+ (l = s.nodeName) &&
+ "input" === l.toLowerCase() &&
+ ("checkbox" === s.type || "radio" === s.type) &&
+ (m = ar);
+ switch (
+ (m && (m = m(e, r))
+ ? Vn(o, m, n, i)
+ : (g && g(e, s, r),
+ "focusout" === e &&
+ (g = s._wrapperState) &&
+ g.controlled &&
+ "number" === s.type &&
+ ee(s, "number", s.value)),
+ (g = r ? bi(r) : window),
+ e)
+ ) {
+ case "focusin":
+ (Hn(g) || "true" === g.contentEditable) &&
+ ((mr = g), (gr = r), (Ar = null));
+ break;
+ case "focusout":
+ Ar = gr = mr = null;
+ break;
+ case "mousedown":
+ yr = !0;
+ break;
+ case "contextmenu":
+ case "mouseup":
+ case "dragend":
+ (yr = !1), br(o, n, i);
+ break;
+ case "selectionchange":
+ if (vr) break;
+ case "keydown":
+ case "keyup":
+ br(o, n, i);
+ }
+ var A;
+ if (Ln)
+ e: {
+ switch (e) {
+ case "compositionstart":
+ var y = "onCompositionStart";
+ break e;
+ case "compositionend":
+ y = "onCompositionEnd";
+ break e;
+ case "compositionupdate":
+ y = "onCompositionUpdate";
+ break e;
+ }
+ y = void 0;
+ }
+ else
+ zn
+ ? Gn(e, n) && (y = "onCompositionEnd")
+ : "keydown" === e &&
+ 229 === n.keyCode &&
+ (y = "onCompositionStart");
+ y &&
+ (Fn &&
+ "ko" !== n.locale &&
+ (zn || "onCompositionStart" !== y
+ ? "onCompositionEnd" === y && zn && (A = en())
+ : ((Kt = "value" in (Jt = i) ? Jt.value : Jt.textContent),
+ (zn = !0))),
+ 0 < (g = jr(r, y)).length &&
+ ((y = new bn(y, e, null, n, i)),
+ o.push({ event: y, listeners: g }),
+ A ? (y.data = A) : null !== (A = Zn(n)) && (y.data = A))),
+ (A = Un
+ ? (function (e, t) {
+ switch (e) {
+ case "compositionend":
+ return Zn(t);
+ case "keypress":
+ return 32 !== t.which ? null : ((Nn = !0), On);
+ case "textInput":
+ return (e = t.data) === On && Nn ? null : e;
+ default:
+ return null;
+ }
+ })(e, n)
+ : (function (e, t) {
+ if (zn)
+ return "compositionend" === e || (!Ln && Gn(e, t))
+ ? ((e = en()), ($t = Kt = Jt = null), (zn = !1), e)
+ : null;
+ switch (e) {
+ case "paste":
+ default:
+ return null;
+ case "keypress":
+ if (
+ !(t.ctrlKey || t.altKey || t.metaKey) ||
+ (t.ctrlKey && t.altKey)
+ ) {
+ if (t.char && 1 < t.char.length) return t.char;
+ if (t.which) return String.fromCharCode(t.which);
+ }
+ return null;
+ case "compositionend":
+ return Fn && "ko" !== t.locale ? null : t.data;
+ }
+ })(e, n)) &&
+ 0 < (r = jr(r, "onBeforeInput")).length &&
+ ((i = new bn("onBeforeInput", "beforeinput", null, n, i)),
+ o.push({ event: i, listeners: r }),
+ (i.data = A));
+ }
+ Or(o, t);
+ });
+ }
+ function Vr(e, t, n) {
+ return { instance: e, listener: t, currentTarget: n };
+ }
+ function jr(e, t) {
+ for (var n = t + "Capture", r = []; null !== e; ) {
+ var i = e,
+ a = i.stateNode;
+ 5 === i.tag &&
+ null !== a &&
+ ((i = a),
+ null != (a = Be(e, n)) && r.unshift(Vr(e, a, i)),
+ null != (a = Be(e, t)) && r.push(Vr(e, a, i))),
+ (e = e.return);
+ }
+ return r;
+ }
+ function Wr(e) {
+ if (null === e) return null;
+ do {
+ e = e.return;
+ } while (e && 5 !== e.tag);
+ return e || null;
+ }
+ function Xr(e, t, n, r, i) {
+ for (var a = t._reactName, o = []; null !== n && n !== r; ) {
+ var s = n,
+ l = s.alternate,
+ u = s.stateNode;
+ if (null !== l && l === r) break;
+ 5 === s.tag &&
+ null !== u &&
+ ((s = u),
+ i
+ ? null != (l = Be(n, a)) && o.unshift(Vr(n, l, s))
+ : i || (null != (l = Be(n, a)) && o.push(Vr(n, l, s)))),
+ (n = n.return);
+ }
+ 0 !== o.length && e.push({ event: t, listeners: o });
+ }
+ var Yr = /\r\n?/g,
+ qr = /\u0000|\uFFFD/g;
+ function Jr(e) {
+ return ("string" === typeof e ? e : "" + e)
+ .replace(Yr, "\n")
+ .replace(qr, "");
+ }
+ function Kr(e, t, n) {
+ if (((t = Jr(t)), Jr(e) !== t && n)) throw Error(a(425));
+ }
+ function $r() {}
+ var ei = null,
+ ti = null;
+ function ni(e, t) {
+ return (
+ "textarea" === e ||
+ "noscript" === e ||
+ "string" === typeof t.children ||
+ "number" === typeof t.children ||
+ ("object" === typeof t.dangerouslySetInnerHTML &&
+ null !== t.dangerouslySetInnerHTML &&
+ null != t.dangerouslySetInnerHTML.__html)
+ );
+ }
+ var ri = "function" === typeof setTimeout ? setTimeout : void 0,
+ ii = "function" === typeof clearTimeout ? clearTimeout : void 0,
+ ai = "function" === typeof Promise ? Promise : void 0,
+ oi =
+ "function" === typeof queueMicrotask
+ ? queueMicrotask
+ : "undefined" !== typeof ai
+ ? function (e) {
+ return ai.resolve(null).then(e).catch(si);
+ }
+ : ri;
+ function si(e) {
+ setTimeout(function () {
+ throw e;
+ });
+ }
+ function li(e, t) {
+ var n = t,
+ r = 0;
+ do {
+ var i = n.nextSibling;
+ if ((e.removeChild(n), i && 8 === i.nodeType))
+ if ("/$" === (n = i.data)) {
+ if (0 === r) return e.removeChild(i), void zt(t);
+ r--;
+ } else ("$" !== n && "$?" !== n && "$!" !== n) || r++;
+ n = i;
+ } while (n);
+ zt(t);
+ }
+ function ui(e) {
+ for (; null != e; e = e.nextSibling) {
+ var t = e.nodeType;
+ if (1 === t || 3 === t) break;
+ if (8 === t) {
+ if ("$" === (t = e.data) || "$!" === t || "$?" === t) break;
+ if ("/$" === t) return null;
+ }
+ }
+ return e;
+ }
+ function ci(e) {
+ e = e.previousSibling;
+ for (var t = 0; e; ) {
+ if (8 === e.nodeType) {
+ var n = e.data;
+ if ("$" === n || "$!" === n || "$?" === n) {
+ if (0 === t) return e;
+ t--;
+ } else "/$" === n && t++;
+ }
+ e = e.previousSibling;
+ }
+ return null;
+ }
+ var fi = Math.random().toString(36).slice(2),
+ di = "__reactFiber$" + fi,
+ hi = "__reactProps$" + fi,
+ pi = "__reactContainer$" + fi,
+ vi = "__reactEvents$" + fi,
+ mi = "__reactListeners$" + fi,
+ gi = "__reactHandles$" + fi;
+ function Ai(e) {
+ var t = e[di];
+ if (t) return t;
+ for (var n = e.parentNode; n; ) {
+ if ((t = n[pi] || n[di])) {
+ if (
+ ((n = t.alternate),
+ null !== t.child || (null !== n && null !== n.child))
+ )
+ for (e = ci(e); null !== e; ) {
+ if ((n = e[di])) return n;
+ e = ci(e);
+ }
+ return t;
+ }
+ n = (e = n).parentNode;
+ }
+ return null;
+ }
+ function yi(e) {
+ return !(e = e[di] || e[pi]) ||
+ (5 !== e.tag && 6 !== e.tag && 13 !== e.tag && 3 !== e.tag)
+ ? null
+ : e;
+ }
+ function bi(e) {
+ if (5 === e.tag || 6 === e.tag) return e.stateNode;
+ throw Error(a(33));
+ }
+ function xi(e) {
+ return e[hi] || null;
+ }
+ var Si = [],
+ Ei = -1;
+ function _i(e) {
+ return { current: e };
+ }
+ function Ci(e) {
+ 0 > Ei || ((e.current = Si[Ei]), (Si[Ei] = null), Ei--);
+ }
+ function wi(e, t) {
+ Ei++, (Si[Ei] = e.current), (e.current = t);
+ }
+ var Ti = {},
+ Mi = _i(Ti),
+ Ii = _i(!1),
+ ki = Ti;
+ function Ri(e, t) {
+ var n = e.type.contextTypes;
+ if (!n) return Ti;
+ var r = e.stateNode;
+ if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
+ return r.__reactInternalMemoizedMaskedChildContext;
+ var i,
+ a = {};
+ for (i in n) a[i] = t[i];
+ return (
+ r &&
+ (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext =
+ t),
+ (e.__reactInternalMemoizedMaskedChildContext = a)),
+ a
+ );
+ }
+ function Bi(e) {
+ return null !== (e = e.childContextTypes) && void 0 !== e;
+ }
+ function Pi() {
+ Ci(Ii), Ci(Mi);
+ }
+ function Li(e, t, n) {
+ if (Mi.current !== Ti) throw Error(a(168));
+ wi(Mi, t), wi(Ii, n);
+ }
+ function Di(e, t, n) {
+ var r = e.stateNode;
+ if (
+ ((t = t.childContextTypes), "function" !== typeof r.getChildContext)
+ )
+ return n;
+ for (var i in (r = r.getChildContext()))
+ if (!(i in t)) throw Error(a(108, Q(e) || "Unknown", i));
+ return F({}, n, r);
+ }
+ function Ui(e) {
+ return (
+ (e =
+ ((e = e.stateNode) &&
+ e.__reactInternalMemoizedMergedChildContext) ||
+ Ti),
+ (ki = Mi.current),
+ wi(Mi, e),
+ wi(Ii, Ii.current),
+ !0
+ );
+ }
+ function Fi(e, t, n) {
+ var r = e.stateNode;
+ if (!r) throw Error(a(169));
+ n
+ ? ((e = Di(e, t, ki)),
+ (r.__reactInternalMemoizedMergedChildContext = e),
+ Ci(Ii),
+ Ci(Mi),
+ wi(Mi, e))
+ : Ci(Ii),
+ wi(Ii, n);
+ }
+ var Oi = null,
+ Ni = !1,
+ Gi = !1;
+ function Zi(e) {
+ null === Oi ? (Oi = [e]) : Oi.push(e);
+ }
+ function zi() {
+ if (!Gi && null !== Oi) {
+ Gi = !0;
+ var e = 0,
+ t = yt;
+ try {
+ var n = Oi;
+ for (yt = 1; e < n.length; e++) {
+ var r = n[e];
+ do {
+ r = r(!0);
+ } while (null !== r);
+ }
+ (Oi = null), (Ni = !1);
+ } catch (i) {
+ throw (null !== Oi && (Oi = Oi.slice(e + 1)), We($e, zi), i);
+ } finally {
+ (yt = t), (Gi = !1);
+ }
+ }
+ return null;
+ }
+ var Qi = [],
+ Hi = 0,
+ Vi = null,
+ ji = 0,
+ Wi = [],
+ Xi = 0,
+ Yi = null,
+ qi = 1,
+ Ji = "";
+ function Ki(e, t) {
+ (Qi[Hi++] = ji), (Qi[Hi++] = Vi), (Vi = e), (ji = t);
+ }
+ function $i(e, t, n) {
+ (Wi[Xi++] = qi), (Wi[Xi++] = Ji), (Wi[Xi++] = Yi), (Yi = e);
+ var r = qi;
+ e = Ji;
+ var i = 32 - ot(r) - 1;
+ (r &= ~(1 << i)), (n += 1);
+ var a = 32 - ot(t) + i;
+ if (30 < a) {
+ var o = i - (i % 5);
+ (a = (r & ((1 << o) - 1)).toString(32)),
+ (r >>= o),
+ (i -= o),
+ (qi = (1 << (32 - ot(t) + i)) | (n << i) | r),
+ (Ji = a + e);
+ } else (qi = (1 << a) | (n << i) | r), (Ji = e);
+ }
+ function ea(e) {
+ null !== e.return && (Ki(e, 1), $i(e, 1, 0));
+ }
+ function ta(e) {
+ for (; e === Vi; )
+ (Vi = Qi[--Hi]), (Qi[Hi] = null), (ji = Qi[--Hi]), (Qi[Hi] = null);
+ for (; e === Yi; )
+ (Yi = Wi[--Xi]),
+ (Wi[Xi] = null),
+ (Ji = Wi[--Xi]),
+ (Wi[Xi] = null),
+ (qi = Wi[--Xi]),
+ (Wi[Xi] = null);
+ }
+ var na = null,
+ ra = null,
+ ia = !1,
+ aa = null;
+ function oa(e, t) {
+ var n = Bu(5, null, null, 0);
+ (n.elementType = "DELETED"),
+ (n.stateNode = t),
+ (n.return = e),
+ null === (t = e.deletions)
+ ? ((e.deletions = [n]), (e.flags |= 16))
+ : t.push(n);
+ }
+ function sa(e, t) {
+ switch (e.tag) {
+ case 5:
+ var n = e.type;
+ return (
+ null !==
+ (t =
+ 1 !== t.nodeType ||
+ n.toLowerCase() !== t.nodeName.toLowerCase()
+ ? null
+ : t) &&
+ ((e.stateNode = t), (na = e), (ra = ui(t.firstChild)), !0)
+ );
+ case 6:
+ return (
+ null !==
+ (t = "" === e.pendingProps || 3 !== t.nodeType ? null : t) &&
+ ((e.stateNode = t), (na = e), (ra = null), !0)
+ );
+ case 13:
+ return (
+ null !== (t = 8 !== t.nodeType ? null : t) &&
+ ((n = null !== Yi ? { id: qi, overflow: Ji } : null),
+ (e.memoizedState = {
+ dehydrated: t,
+ treeContext: n,
+ retryLane: 1073741824,
+ }),
+ ((n = Bu(18, null, null, 0)).stateNode = t),
+ (n.return = e),
+ (e.child = n),
+ (na = e),
+ (ra = null),
+ !0)
+ );
+ default:
+ return !1;
+ }
+ }
+ function la(e) {
+ return 0 !== (1 & e.mode) && 0 === (128 & e.flags);
+ }
+ function ua(e) {
+ if (ia) {
+ var t = ra;
+ if (t) {
+ var n = t;
+ if (!sa(e, t)) {
+ if (la(e)) throw Error(a(418));
+ t = ui(n.nextSibling);
+ var r = na;
+ t && sa(e, t)
+ ? oa(r, n)
+ : ((e.flags = (-4097 & e.flags) | 2), (ia = !1), (na = e));
+ }
+ } else {
+ if (la(e)) throw Error(a(418));
+ (e.flags = (-4097 & e.flags) | 2), (ia = !1), (na = e);
+ }
+ }
+ }
+ function ca(e) {
+ for (
+ e = e.return;
+ null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag;
+
+ )
+ e = e.return;
+ na = e;
+ }
+ function fa(e) {
+ if (e !== na) return !1;
+ if (!ia) return ca(e), (ia = !0), !1;
+ var t;
+ if (
+ ((t = 3 !== e.tag) &&
+ !(t = 5 !== e.tag) &&
+ (t =
+ "head" !== (t = e.type) &&
+ "body" !== t &&
+ !ni(e.type, e.memoizedProps)),
+ t && (t = ra))
+ ) {
+ if (la(e)) throw (da(), Error(a(418)));
+ for (; t; ) oa(e, t), (t = ui(t.nextSibling));
+ }
+ if ((ca(e), 13 === e.tag)) {
+ if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null))
+ throw Error(a(317));
+ e: {
+ for (e = e.nextSibling, t = 0; e; ) {
+ if (8 === e.nodeType) {
+ var n = e.data;
+ if ("/$" === n) {
+ if (0 === t) {
+ ra = ui(e.nextSibling);
+ break e;
+ }
+ t--;
+ } else ("$" !== n && "$!" !== n && "$?" !== n) || t++;
+ }
+ e = e.nextSibling;
+ }
+ ra = null;
+ }
+ } else ra = na ? ui(e.stateNode.nextSibling) : null;
+ return !0;
+ }
+ function da() {
+ for (var e = ra; e; ) e = ui(e.nextSibling);
+ }
+ function ha() {
+ (ra = na = null), (ia = !1);
+ }
+ function pa(e) {
+ null === aa ? (aa = [e]) : aa.push(e);
+ }
+ var va = b.ReactCurrentBatchConfig;
+ function ma(e, t) {
+ if (e && e.defaultProps) {
+ for (var n in ((t = F({}, t)), (e = e.defaultProps)))
+ void 0 === t[n] && (t[n] = e[n]);
+ return t;
+ }
+ return t;
+ }
+ var ga = _i(null),
+ Aa = null,
+ ya = null,
+ ba = null;
+ function xa() {
+ ba = ya = Aa = null;
+ }
+ function Sa(e) {
+ var t = ga.current;
+ Ci(ga), (e._currentValue = t);
+ }
+ function Ea(e, t, n) {
+ for (; null !== e; ) {
+ var r = e.alternate;
+ if (
+ ((e.childLanes & t) !== t
+ ? ((e.childLanes |= t), null !== r && (r.childLanes |= t))
+ : null !== r && (r.childLanes & t) !== t && (r.childLanes |= t),
+ e === n)
+ )
+ break;
+ e = e.return;
+ }
+ }
+ function _a(e, t) {
+ (Aa = e),
+ (ba = ya = null),
+ null !== (e = e.dependencies) &&
+ null !== e.firstContext &&
+ (0 !== (e.lanes & t) && (bs = !0), (e.firstContext = null));
+ }
+ function Ca(e) {
+ var t = e._currentValue;
+ if (ba !== e)
+ if (
+ ((e = { context: e, memoizedValue: t, next: null }), null === ya)
+ ) {
+ if (null === Aa) throw Error(a(308));
+ (ya = e), (Aa.dependencies = { lanes: 0, firstContext: e });
+ } else ya = ya.next = e;
+ return t;
+ }
+ var wa = null;
+ function Ta(e) {
+ null === wa ? (wa = [e]) : wa.push(e);
+ }
+ function Ma(e, t, n, r) {
+ var i = t.interleaved;
+ return (
+ null === i
+ ? ((n.next = n), Ta(t))
+ : ((n.next = i.next), (i.next = n)),
+ (t.interleaved = n),
+ Ia(e, r)
+ );
+ }
+ function Ia(e, t) {
+ e.lanes |= t;
+ var n = e.alternate;
+ for (null !== n && (n.lanes |= t), n = e, e = e.return; null !== e; )
+ (e.childLanes |= t),
+ null !== (n = e.alternate) && (n.childLanes |= t),
+ (n = e),
+ (e = e.return);
+ return 3 === n.tag ? n.stateNode : null;
+ }
+ var ka = !1;
+ function Ra(e) {
+ e.updateQueue = {
+ baseState: e.memoizedState,
+ firstBaseUpdate: null,
+ lastBaseUpdate: null,
+ shared: { pending: null, interleaved: null, lanes: 0 },
+ effects: null,
+ };
+ }
+ function Ba(e, t) {
+ (e = e.updateQueue),
+ t.updateQueue === e &&
+ (t.updateQueue = {
+ baseState: e.baseState,
+ firstBaseUpdate: e.firstBaseUpdate,
+ lastBaseUpdate: e.lastBaseUpdate,
+ shared: e.shared,
+ effects: e.effects,
+ });
+ }
+ function Pa(e, t) {
+ return {
+ eventTime: e,
+ lane: t,
+ tag: 0,
+ payload: null,
+ callback: null,
+ next: null,
+ };
+ }
+ function La(e, t, n) {
+ var r = e.updateQueue;
+ if (null === r) return null;
+ if (((r = r.shared), 0 !== (2 & Il))) {
+ var i = r.pending;
+ return (
+ null === i ? (t.next = t) : ((t.next = i.next), (i.next = t)),
+ (r.pending = t),
+ Ia(e, n)
+ );
+ }
+ return (
+ null === (i = r.interleaved)
+ ? ((t.next = t), Ta(r))
+ : ((t.next = i.next), (i.next = t)),
+ (r.interleaved = t),
+ Ia(e, n)
+ );
+ }
+ function Da(e, t, n) {
+ if (
+ null !== (t = t.updateQueue) &&
+ ((t = t.shared), 0 !== (4194240 & n))
+ ) {
+ var r = t.lanes;
+ (n |= r &= e.pendingLanes), (t.lanes = n), At(e, n);
+ }
+ }
+ function Ua(e, t) {
+ var n = e.updateQueue,
+ r = e.alternate;
+ if (null !== r && n === (r = r.updateQueue)) {
+ var i = null,
+ a = null;
+ if (null !== (n = n.firstBaseUpdate)) {
+ do {
+ var o = {
+ eventTime: n.eventTime,
+ lane: n.lane,
+ tag: n.tag,
+ payload: n.payload,
+ callback: n.callback,
+ next: null,
+ };
+ null === a ? (i = a = o) : (a = a.next = o), (n = n.next);
+ } while (null !== n);
+ null === a ? (i = a = t) : (a = a.next = t);
+ } else i = a = t;
+ return (
+ (n = {
+ baseState: r.baseState,
+ firstBaseUpdate: i,
+ lastBaseUpdate: a,
+ shared: r.shared,
+ effects: r.effects,
+ }),
+ void (e.updateQueue = n)
+ );
+ }
+ null === (e = n.lastBaseUpdate)
+ ? (n.firstBaseUpdate = t)
+ : (e.next = t),
+ (n.lastBaseUpdate = t);
+ }
+ function Fa(e, t, n, r) {
+ var i = e.updateQueue;
+ ka = !1;
+ var a = i.firstBaseUpdate,
+ o = i.lastBaseUpdate,
+ s = i.shared.pending;
+ if (null !== s) {
+ i.shared.pending = null;
+ var l = s,
+ u = l.next;
+ (l.next = null), null === o ? (a = u) : (o.next = u), (o = l);
+ var c = e.alternate;
+ null !== c &&
+ (s = (c = c.updateQueue).lastBaseUpdate) !== o &&
+ (null === s ? (c.firstBaseUpdate = u) : (s.next = u),
+ (c.lastBaseUpdate = l));
+ }
+ if (null !== a) {
+ var f = i.baseState;
+ for (o = 0, c = u = l = null, s = a; ; ) {
+ var d = s.lane,
+ h = s.eventTime;
+ if ((r & d) === d) {
+ null !== c &&
+ (c = c.next =
+ {
+ eventTime: h,
+ lane: 0,
+ tag: s.tag,
+ payload: s.payload,
+ callback: s.callback,
+ next: null,
+ });
+ e: {
+ var p = e,
+ v = s;
+ switch (((d = t), (h = n), v.tag)) {
+ case 1:
+ if ("function" === typeof (p = v.payload)) {
+ f = p.call(h, f, d);
+ break e;
+ }
+ f = p;
+ break e;
+ case 3:
+ p.flags = (-65537 & p.flags) | 128;
+ case 0:
+ if (
+ null ===
+ (d =
+ "function" === typeof (p = v.payload)
+ ? p.call(h, f, d)
+ : p) ||
+ void 0 === d
+ )
+ break e;
+ f = F({}, f, d);
+ break e;
+ case 2:
+ ka = !0;
+ }
+ }
+ null !== s.callback &&
+ 0 !== s.lane &&
+ ((e.flags |= 64),
+ null === (d = i.effects) ? (i.effects = [s]) : d.push(s));
+ } else
+ (h = {
+ eventTime: h,
+ lane: d,
+ tag: s.tag,
+ payload: s.payload,
+ callback: s.callback,
+ next: null,
+ }),
+ null === c ? ((u = c = h), (l = f)) : (c = c.next = h),
+ (o |= d);
+ if (null === (s = s.next)) {
+ if (null === (s = i.shared.pending)) break;
+ (s = (d = s).next),
+ (d.next = null),
+ (i.lastBaseUpdate = d),
+ (i.shared.pending = null);
+ }
+ }
+ if (
+ (null === c && (l = f),
+ (i.baseState = l),
+ (i.firstBaseUpdate = u),
+ (i.lastBaseUpdate = c),
+ null !== (t = i.shared.interleaved))
+ ) {
+ i = t;
+ do {
+ (o |= i.lane), (i = i.next);
+ } while (i !== t);
+ } else null === a && (i.shared.lanes = 0);
+ (Fl |= o), (e.lanes = o), (e.memoizedState = f);
+ }
+ }
+ function Oa(e, t, n) {
+ if (((e = t.effects), (t.effects = null), null !== e))
+ for (t = 0; t < e.length; t++) {
+ var r = e[t],
+ i = r.callback;
+ if (null !== i) {
+ if (((r.callback = null), (r = n), "function" !== typeof i))
+ throw Error(a(191, i));
+ i.call(r);
+ }
+ }
+ }
+ var Na = new r.Component().refs;
+ function Ga(e, t, n, r) {
+ (n =
+ null === (n = n(r, (t = e.memoizedState))) || void 0 === n
+ ? t
+ : F({}, t, n)),
+ (e.memoizedState = n),
+ 0 === e.lanes && (e.updateQueue.baseState = n);
+ }
+ var Za = {
+ isMounted: function (e) {
+ return !!(e = e._reactInternals) && ze(e) === e;
+ },
+ enqueueSetState: function (e, t, n) {
+ e = e._reactInternals;
+ var r = tu(),
+ i = nu(e),
+ a = Pa(r, i);
+ (a.payload = t),
+ void 0 !== n && null !== n && (a.callback = n),
+ null !== (t = La(e, a, i)) && (ru(t, e, i, r), Da(t, e, i));
+ },
+ enqueueReplaceState: function (e, t, n) {
+ e = e._reactInternals;
+ var r = tu(),
+ i = nu(e),
+ a = Pa(r, i);
+ (a.tag = 1),
+ (a.payload = t),
+ void 0 !== n && null !== n && (a.callback = n),
+ null !== (t = La(e, a, i)) && (ru(t, e, i, r), Da(t, e, i));
+ },
+ enqueueForceUpdate: function (e, t) {
+ e = e._reactInternals;
+ var n = tu(),
+ r = nu(e),
+ i = Pa(n, r);
+ (i.tag = 2),
+ void 0 !== t && null !== t && (i.callback = t),
+ null !== (t = La(e, i, r)) && (ru(t, e, r, n), Da(t, e, r));
+ },
+ };
+ function za(e, t, n, r, i, a, o) {
+ return "function" === typeof (e = e.stateNode).shouldComponentUpdate
+ ? e.shouldComponentUpdate(r, a, o)
+ : !t.prototype ||
+ !t.prototype.isPureReactComponent ||
+ !lr(n, r) ||
+ !lr(i, a);
+ }
+ function Qa(e, t, n) {
+ var r = !1,
+ i = Ti,
+ a = t.contextType;
+ return (
+ "object" === typeof a && null !== a
+ ? (a = Ca(a))
+ : ((i = Bi(t) ? ki : Mi.current),
+ (a = (r = null !== (r = t.contextTypes) && void 0 !== r)
+ ? Ri(e, i)
+ : Ti)),
+ (t = new t(n, a)),
+ (e.memoizedState =
+ null !== t.state && void 0 !== t.state ? t.state : null),
+ (t.updater = Za),
+ (e.stateNode = t),
+ (t._reactInternals = e),
+ r &&
+ (((e = e.stateNode).__reactInternalMemoizedUnmaskedChildContext =
+ i),
+ (e.__reactInternalMemoizedMaskedChildContext = a)),
+ t
+ );
+ }
+ function Ha(e, t, n, r) {
+ (e = t.state),
+ "function" === typeof t.componentWillReceiveProps &&
+ t.componentWillReceiveProps(n, r),
+ "function" === typeof t.UNSAFE_componentWillReceiveProps &&
+ t.UNSAFE_componentWillReceiveProps(n, r),
+ t.state !== e && Za.enqueueReplaceState(t, t.state, null);
+ }
+ function Va(e, t, n, r) {
+ var i = e.stateNode;
+ (i.props = n), (i.state = e.memoizedState), (i.refs = Na), Ra(e);
+ var a = t.contextType;
+ "object" === typeof a && null !== a
+ ? (i.context = Ca(a))
+ : ((a = Bi(t) ? ki : Mi.current), (i.context = Ri(e, a))),
+ (i.state = e.memoizedState),
+ "function" === typeof (a = t.getDerivedStateFromProps) &&
+ (Ga(e, t, a, n), (i.state = e.memoizedState)),
+ "function" === typeof t.getDerivedStateFromProps ||
+ "function" === typeof i.getSnapshotBeforeUpdate ||
+ ("function" !== typeof i.UNSAFE_componentWillMount &&
+ "function" !== typeof i.componentWillMount) ||
+ ((t = i.state),
+ "function" === typeof i.componentWillMount &&
+ i.componentWillMount(),
+ "function" === typeof i.UNSAFE_componentWillMount &&
+ i.UNSAFE_componentWillMount(),
+ t !== i.state && Za.enqueueReplaceState(i, i.state, null),
+ Fa(e, n, i, r),
+ (i.state = e.memoizedState)),
+ "function" === typeof i.componentDidMount && (e.flags |= 4194308);
+ }
+ function ja(e, t, n) {
+ if (
+ null !== (e = n.ref) &&
+ "function" !== typeof e &&
+ "object" !== typeof e
+ ) {
+ if (n._owner) {
+ if ((n = n._owner)) {
+ if (1 !== n.tag) throw Error(a(309));
+ var r = n.stateNode;
+ }
+ if (!r) throw Error(a(147, e));
+ var i = r,
+ o = "" + e;
+ return null !== t &&
+ null !== t.ref &&
+ "function" === typeof t.ref &&
+ t.ref._stringRef === o
+ ? t.ref
+ : ((t = function (e) {
+ var t = i.refs;
+ t === Na && (t = i.refs = {}),
+ null === e ? delete t[o] : (t[o] = e);
+ }),
+ (t._stringRef = o),
+ t);
+ }
+ if ("string" !== typeof e) throw Error(a(284));
+ if (!n._owner) throw Error(a(290, e));
+ }
+ return e;
+ }
+ function Wa(e, t) {
+ throw (
+ ((e = Object.prototype.toString.call(t)),
+ Error(
+ a(
+ 31,
+ "[object Object]" === e
+ ? "object with keys {" + Object.keys(t).join(", ") + "}"
+ : e
+ )
+ ))
+ );
+ }
+ function Xa(e) {
+ return (0, e._init)(e._payload);
+ }
+ function Ya(e) {
+ function t(t, n) {
+ if (e) {
+ var r = t.deletions;
+ null === r ? ((t.deletions = [n]), (t.flags |= 16)) : r.push(n);
+ }
+ }
+ function n(n, r) {
+ if (!e) return null;
+ for (; null !== r; ) t(n, r), (r = r.sibling);
+ return null;
+ }
+ function r(e, t) {
+ for (e = new Map(); null !== t; )
+ null !== t.key ? e.set(t.key, t) : e.set(t.index, t),
+ (t = t.sibling);
+ return e;
+ }
+ function i(e, t) {
+ return ((e = Lu(e, t)).index = 0), (e.sibling = null), e;
+ }
+ function o(t, n, r) {
+ return (
+ (t.index = r),
+ e
+ ? null !== (r = t.alternate)
+ ? (r = r.index) < n
+ ? ((t.flags |= 2), n)
+ : r
+ : ((t.flags |= 2), n)
+ : ((t.flags |= 1048576), n)
+ );
+ }
+ function s(t) {
+ return e && null === t.alternate && (t.flags |= 2), t;
+ }
+ function l(e, t, n, r) {
+ return null === t || 6 !== t.tag
+ ? (((t = Ou(n, e.mode, r)).return = e), t)
+ : (((t = i(t, n)).return = e), t);
+ }
+ function u(e, t, n, r) {
+ var a = n.type;
+ return a === E
+ ? f(e, t, n.props.children, r, n.key)
+ : null !== t &&
+ (t.elementType === a ||
+ ("object" === typeof a &&
+ null !== a &&
+ a.$$typeof === B &&
+ Xa(a) === t.type))
+ ? (((r = i(t, n.props)).ref = ja(e, t, n)), (r.return = e), r)
+ : (((r = Du(n.type, n.key, n.props, null, e.mode, r)).ref = ja(
+ e,
+ t,
+ n
+ )),
+ (r.return = e),
+ r);
+ }
+ function c(e, t, n, r) {
+ return null === t ||
+ 4 !== t.tag ||
+ t.stateNode.containerInfo !== n.containerInfo ||
+ t.stateNode.implementation !== n.implementation
+ ? (((t = Nu(n, e.mode, r)).return = e), t)
+ : (((t = i(t, n.children || [])).return = e), t);
+ }
+ function f(e, t, n, r, a) {
+ return null === t || 7 !== t.tag
+ ? (((t = Uu(n, e.mode, r, a)).return = e), t)
+ : (((t = i(t, n)).return = e), t);
+ }
+ function d(e, t, n) {
+ if (("string" === typeof t && "" !== t) || "number" === typeof t)
+ return ((t = Ou("" + t, e.mode, n)).return = e), t;
+ if ("object" === typeof t && null !== t) {
+ switch (t.$$typeof) {
+ case x:
+ return (
+ ((n = Du(t.type, t.key, t.props, null, e.mode, n)).ref = ja(
+ e,
+ null,
+ t
+ )),
+ (n.return = e),
+ n
+ );
+ case S:
+ return ((t = Nu(t, e.mode, n)).return = e), t;
+ case B:
+ return d(e, (0, t._init)(t._payload), n);
+ }
+ if (te(t) || D(t))
+ return ((t = Uu(t, e.mode, n, null)).return = e), t;
+ Wa(e, t);
+ }
+ return null;
+ }
+ function h(e, t, n, r) {
+ var i = null !== t ? t.key : null;
+ if (("string" === typeof n && "" !== n) || "number" === typeof n)
+ return null !== i ? null : l(e, t, "" + n, r);
+ if ("object" === typeof n && null !== n) {
+ switch (n.$$typeof) {
+ case x:
+ return n.key === i ? u(e, t, n, r) : null;
+ case S:
+ return n.key === i ? c(e, t, n, r) : null;
+ case B:
+ return h(e, t, (i = n._init)(n._payload), r);
+ }
+ if (te(n) || D(n)) return null !== i ? null : f(e, t, n, r, null);
+ Wa(e, n);
+ }
+ return null;
+ }
+ function p(e, t, n, r, i) {
+ if (("string" === typeof r && "" !== r) || "number" === typeof r)
+ return l(t, (e = e.get(n) || null), "" + r, i);
+ if ("object" === typeof r && null !== r) {
+ switch (r.$$typeof) {
+ case x:
+ return u(
+ t,
+ (e = e.get(null === r.key ? n : r.key) || null),
+ r,
+ i
+ );
+ case S:
+ return c(
+ t,
+ (e = e.get(null === r.key ? n : r.key) || null),
+ r,
+ i
+ );
+ case B:
+ return p(e, t, n, (0, r._init)(r._payload), i);
+ }
+ if (te(r) || D(r))
+ return f(t, (e = e.get(n) || null), r, i, null);
+ Wa(t, r);
+ }
+ return null;
+ }
+ function v(i, a, s, l) {
+ for (
+ var u = null, c = null, f = a, v = (a = 0), m = null;
+ null !== f && v < s.length;
+ v++
+ ) {
+ f.index > v ? ((m = f), (f = null)) : (m = f.sibling);
+ var g = h(i, f, s[v], l);
+ if (null === g) {
+ null === f && (f = m);
+ break;
+ }
+ e && f && null === g.alternate && t(i, f),
+ (a = o(g, a, v)),
+ null === c ? (u = g) : (c.sibling = g),
+ (c = g),
+ (f = m);
+ }
+ if (v === s.length) return n(i, f), ia && Ki(i, v), u;
+ if (null === f) {
+ for (; v < s.length; v++)
+ null !== (f = d(i, s[v], l)) &&
+ ((a = o(f, a, v)),
+ null === c ? (u = f) : (c.sibling = f),
+ (c = f));
+ return ia && Ki(i, v), u;
+ }
+ for (f = r(i, f); v < s.length; v++)
+ null !== (m = p(f, i, v, s[v], l)) &&
+ (e &&
+ null !== m.alternate &&
+ f.delete(null === m.key ? v : m.key),
+ (a = o(m, a, v)),
+ null === c ? (u = m) : (c.sibling = m),
+ (c = m));
+ return (
+ e &&
+ f.forEach(function (e) {
+ return t(i, e);
+ }),
+ ia && Ki(i, v),
+ u
+ );
+ }
+ function m(i, s, l, u) {
+ var c = D(l);
+ if ("function" !== typeof c) throw Error(a(150));
+ if (null == (l = c.call(l))) throw Error(a(151));
+ for (
+ var f = (c = null), v = s, m = (s = 0), g = null, A = l.next();
+ null !== v && !A.done;
+ m++, A = l.next()
+ ) {
+ v.index > m ? ((g = v), (v = null)) : (g = v.sibling);
+ var y = h(i, v, A.value, u);
+ if (null === y) {
+ null === v && (v = g);
+ break;
+ }
+ e && v && null === y.alternate && t(i, v),
+ (s = o(y, s, m)),
+ null === f ? (c = y) : (f.sibling = y),
+ (f = y),
+ (v = g);
+ }
+ if (A.done) return n(i, v), ia && Ki(i, m), c;
+ if (null === v) {
+ for (; !A.done; m++, A = l.next())
+ null !== (A = d(i, A.value, u)) &&
+ ((s = o(A, s, m)),
+ null === f ? (c = A) : (f.sibling = A),
+ (f = A));
+ return ia && Ki(i, m), c;
+ }
+ for (v = r(i, v); !A.done; m++, A = l.next())
+ null !== (A = p(v, i, m, A.value, u)) &&
+ (e &&
+ null !== A.alternate &&
+ v.delete(null === A.key ? m : A.key),
+ (s = o(A, s, m)),
+ null === f ? (c = A) : (f.sibling = A),
+ (f = A));
+ return (
+ e &&
+ v.forEach(function (e) {
+ return t(i, e);
+ }),
+ ia && Ki(i, m),
+ c
+ );
+ }
+ return function e(r, a, o, l) {
+ if (
+ ("object" === typeof o &&
+ null !== o &&
+ o.type === E &&
+ null === o.key &&
+ (o = o.props.children),
+ "object" === typeof o && null !== o)
+ ) {
+ switch (o.$$typeof) {
+ case x:
+ e: {
+ for (var u = o.key, c = a; null !== c; ) {
+ if (c.key === u) {
+ if ((u = o.type) === E) {
+ if (7 === c.tag) {
+ n(r, c.sibling),
+ ((a = i(c, o.props.children)).return = r),
+ (r = a);
+ break e;
+ }
+ } else if (
+ c.elementType === u ||
+ ("object" === typeof u &&
+ null !== u &&
+ u.$$typeof === B &&
+ Xa(u) === c.type)
+ ) {
+ n(r, c.sibling),
+ ((a = i(c, o.props)).ref = ja(r, c, o)),
+ (a.return = r),
+ (r = a);
+ break e;
+ }
+ n(r, c);
+ break;
+ }
+ t(r, c), (c = c.sibling);
+ }
+ o.type === E
+ ? (((a = Uu(o.props.children, r.mode, l, o.key)).return =
+ r),
+ (r = a))
+ : (((l = Du(
+ o.type,
+ o.key,
+ o.props,
+ null,
+ r.mode,
+ l
+ )).ref = ja(r, a, o)),
+ (l.return = r),
+ (r = l));
+ }
+ return s(r);
+ case S:
+ e: {
+ for (c = o.key; null !== a; ) {
+ if (a.key === c) {
+ if (
+ 4 === a.tag &&
+ a.stateNode.containerInfo === o.containerInfo &&
+ a.stateNode.implementation === o.implementation
+ ) {
+ n(r, a.sibling),
+ ((a = i(a, o.children || [])).return = r),
+ (r = a);
+ break e;
+ }
+ n(r, a);
+ break;
+ }
+ t(r, a), (a = a.sibling);
+ }
+ ((a = Nu(o, r.mode, l)).return = r), (r = a);
+ }
+ return s(r);
+ case B:
+ return e(r, a, (c = o._init)(o._payload), l);
+ }
+ if (te(o)) return v(r, a, o, l);
+ if (D(o)) return m(r, a, o, l);
+ Wa(r, o);
+ }
+ return ("string" === typeof o && "" !== o) || "number" === typeof o
+ ? ((o = "" + o),
+ null !== a && 6 === a.tag
+ ? (n(r, a.sibling), ((a = i(a, o)).return = r), (r = a))
+ : (n(r, a), ((a = Ou(o, r.mode, l)).return = r), (r = a)),
+ s(r))
+ : n(r, a);
+ };
+ }
+ var qa = Ya(!0),
+ Ja = Ya(!1),
+ Ka = {},
+ $a = _i(Ka),
+ eo = _i(Ka),
+ to = _i(Ka);
+ function no(e) {
+ if (e === Ka) throw Error(a(174));
+ return e;
+ }
+ function ro(e, t) {
+ switch ((wi(to, t), wi(eo, e), wi($a, Ka), (e = t.nodeType))) {
+ case 9:
+ case 11:
+ t = (t = t.documentElement) ? t.namespaceURI : le(null, "");
+ break;
+ default:
+ t = le(
+ (t = (e = 8 === e ? t.parentNode : t).namespaceURI || null),
+ (e = e.tagName)
+ );
+ }
+ Ci($a), wi($a, t);
+ }
+ function io() {
+ Ci($a), Ci(eo), Ci(to);
+ }
+ function ao(e) {
+ no(to.current);
+ var t = no($a.current),
+ n = le(t, e.type);
+ t !== n && (wi(eo, e), wi($a, n));
+ }
+ function oo(e) {
+ eo.current === e && (Ci($a), Ci(eo));
+ }
+ var so = _i(0);
+ function lo(e) {
+ for (var t = e; null !== t; ) {
+ if (13 === t.tag) {
+ var n = t.memoizedState;
+ if (
+ null !== n &&
+ (null === (n = n.dehydrated) ||
+ "$?" === n.data ||
+ "$!" === n.data)
+ )
+ return t;
+ } else if (19 === t.tag && void 0 !== t.memoizedProps.revealOrder) {
+ if (0 !== (128 & t.flags)) return t;
+ } else if (null !== t.child) {
+ (t.child.return = t), (t = t.child);
+ continue;
+ }
+ if (t === e) break;
+ for (; null === t.sibling; ) {
+ if (null === t.return || t.return === e) return null;
+ t = t.return;
+ }
+ (t.sibling.return = t.return), (t = t.sibling);
+ }
+ return null;
+ }
+ var uo = [];
+ function co() {
+ for (var e = 0; e < uo.length; e++)
+ uo[e]._workInProgressVersionPrimary = null;
+ uo.length = 0;
+ }
+ var fo = b.ReactCurrentDispatcher,
+ ho = b.ReactCurrentBatchConfig,
+ po = 0,
+ vo = null,
+ mo = null,
+ go = null,
+ Ao = !1,
+ yo = !1,
+ bo = 0,
+ xo = 0;
+ function So() {
+ throw Error(a(321));
+ }
+ function Eo(e, t) {
+ if (null === t) return !1;
+ for (var n = 0; n < t.length && n < e.length; n++)
+ if (!sr(e[n], t[n])) return !1;
+ return !0;
+ }
+ function _o(e, t, n, r, i, o) {
+ if (
+ ((po = o),
+ (vo = t),
+ (t.memoizedState = null),
+ (t.updateQueue = null),
+ (t.lanes = 0),
+ (fo.current = null === e || null === e.memoizedState ? ss : ls),
+ (e = n(r, i)),
+ yo)
+ ) {
+ o = 0;
+ do {
+ if (((yo = !1), (bo = 0), 25 <= o)) throw Error(a(301));
+ (o += 1),
+ (go = mo = null),
+ (t.updateQueue = null),
+ (fo.current = us),
+ (e = n(r, i));
+ } while (yo);
+ }
+ if (
+ ((fo.current = os),
+ (t = null !== mo && null !== mo.next),
+ (po = 0),
+ (go = mo = vo = null),
+ (Ao = !1),
+ t)
+ )
+ throw Error(a(300));
+ return e;
+ }
+ function Co() {
+ var e = 0 !== bo;
+ return (bo = 0), e;
+ }
+ function wo() {
+ var e = {
+ memoizedState: null,
+ baseState: null,
+ baseQueue: null,
+ queue: null,
+ next: null,
+ };
+ return (
+ null === go ? (vo.memoizedState = go = e) : (go = go.next = e), go
+ );
+ }
+ function To() {
+ if (null === mo) {
+ var e = vo.alternate;
+ e = null !== e ? e.memoizedState : null;
+ } else e = mo.next;
+ var t = null === go ? vo.memoizedState : go.next;
+ if (null !== t) (go = t), (mo = e);
+ else {
+ if (null === e) throw Error(a(310));
+ (e = {
+ memoizedState: (mo = e).memoizedState,
+ baseState: mo.baseState,
+ baseQueue: mo.baseQueue,
+ queue: mo.queue,
+ next: null,
+ }),
+ null === go ? (vo.memoizedState = go = e) : (go = go.next = e);
+ }
+ return go;
+ }
+ function Mo(e, t) {
+ return "function" === typeof t ? t(e) : t;
+ }
+ function Io(e) {
+ var t = To(),
+ n = t.queue;
+ if (null === n) throw Error(a(311));
+ n.lastRenderedReducer = e;
+ var r = mo,
+ i = r.baseQueue,
+ o = n.pending;
+ if (null !== o) {
+ if (null !== i) {
+ var s = i.next;
+ (i.next = o.next), (o.next = s);
+ }
+ (r.baseQueue = i = o), (n.pending = null);
+ }
+ if (null !== i) {
+ (o = i.next), (r = r.baseState);
+ var l = (s = null),
+ u = null,
+ c = o;
+ do {
+ var f = c.lane;
+ if ((po & f) === f)
+ null !== u &&
+ (u = u.next =
+ {
+ lane: 0,
+ action: c.action,
+ hasEagerState: c.hasEagerState,
+ eagerState: c.eagerState,
+ next: null,
+ }),
+ (r = c.hasEagerState ? c.eagerState : e(r, c.action));
+ else {
+ var d = {
+ lane: f,
+ action: c.action,
+ hasEagerState: c.hasEagerState,
+ eagerState: c.eagerState,
+ next: null,
+ };
+ null === u ? ((l = u = d), (s = r)) : (u = u.next = d),
+ (vo.lanes |= f),
+ (Fl |= f);
+ }
+ c = c.next;
+ } while (null !== c && c !== o);
+ null === u ? (s = r) : (u.next = l),
+ sr(r, t.memoizedState) || (bs = !0),
+ (t.memoizedState = r),
+ (t.baseState = s),
+ (t.baseQueue = u),
+ (n.lastRenderedState = r);
+ }
+ if (null !== (e = n.interleaved)) {
+ i = e;
+ do {
+ (o = i.lane), (vo.lanes |= o), (Fl |= o), (i = i.next);
+ } while (i !== e);
+ } else null === i && (n.lanes = 0);
+ return [t.memoizedState, n.dispatch];
+ }
+ function ko(e) {
+ var t = To(),
+ n = t.queue;
+ if (null === n) throw Error(a(311));
+ n.lastRenderedReducer = e;
+ var r = n.dispatch,
+ i = n.pending,
+ o = t.memoizedState;
+ if (null !== i) {
+ n.pending = null;
+ var s = (i = i.next);
+ do {
+ (o = e(o, s.action)), (s = s.next);
+ } while (s !== i);
+ sr(o, t.memoizedState) || (bs = !0),
+ (t.memoizedState = o),
+ null === t.baseQueue && (t.baseState = o),
+ (n.lastRenderedState = o);
+ }
+ return [o, r];
+ }
+ function Ro() {}
+ function Bo(e, t) {
+ var n = vo,
+ r = To(),
+ i = t(),
+ o = !sr(r.memoizedState, i);
+ if (
+ (o && ((r.memoizedState = i), (bs = !0)),
+ (r = r.queue),
+ Ho(Do.bind(null, n, r, e), [e]),
+ r.getSnapshot !== t ||
+ o ||
+ (null !== go && 1 & go.memoizedState.tag))
+ ) {
+ if (
+ ((n.flags |= 2048),
+ No(9, Lo.bind(null, n, r, i, t), void 0, null),
+ null === kl)
+ )
+ throw Error(a(349));
+ 0 !== (30 & po) || Po(n, t, i);
+ }
+ return i;
+ }
+ function Po(e, t, n) {
+ (e.flags |= 16384),
+ (e = { getSnapshot: t, value: n }),
+ null === (t = vo.updateQueue)
+ ? ((t = { lastEffect: null, stores: null }),
+ (vo.updateQueue = t),
+ (t.stores = [e]))
+ : null === (n = t.stores)
+ ? (t.stores = [e])
+ : n.push(e);
+ }
+ function Lo(e, t, n, r) {
+ (t.value = n), (t.getSnapshot = r), Uo(t) && Fo(e);
+ }
+ function Do(e, t, n) {
+ return n(function () {
+ Uo(t) && Fo(e);
+ });
+ }
+ function Uo(e) {
+ var t = e.getSnapshot;
+ e = e.value;
+ try {
+ var n = t();
+ return !sr(e, n);
+ } catch (r) {
+ return !0;
+ }
+ }
+ function Fo(e) {
+ var t = Ia(e, 1);
+ null !== t && ru(t, e, 1, -1);
+ }
+ function Oo(e) {
+ var t = wo();
+ return (
+ "function" === typeof e && (e = e()),
+ (t.memoizedState = t.baseState = e),
+ (e = {
+ pending: null,
+ interleaved: null,
+ lanes: 0,
+ dispatch: null,
+ lastRenderedReducer: Mo,
+ lastRenderedState: e,
+ }),
+ (t.queue = e),
+ (e = e.dispatch = ns.bind(null, vo, e)),
+ [t.memoizedState, e]
+ );
+ }
+ function No(e, t, n, r) {
+ return (
+ (e = { tag: e, create: t, destroy: n, deps: r, next: null }),
+ null === (t = vo.updateQueue)
+ ? ((t = { lastEffect: null, stores: null }),
+ (vo.updateQueue = t),
+ (t.lastEffect = e.next = e))
+ : null === (n = t.lastEffect)
+ ? (t.lastEffect = e.next = e)
+ : ((r = n.next), (n.next = e), (e.next = r), (t.lastEffect = e)),
+ e
+ );
+ }
+ function Go() {
+ return To().memoizedState;
+ }
+ function Zo(e, t, n, r) {
+ var i = wo();
+ (vo.flags |= e),
+ (i.memoizedState = No(1 | t, n, void 0, void 0 === r ? null : r));
+ }
+ function zo(e, t, n, r) {
+ var i = To();
+ r = void 0 === r ? null : r;
+ var a = void 0;
+ if (null !== mo) {
+ var o = mo.memoizedState;
+ if (((a = o.destroy), null !== r && Eo(r, o.deps)))
+ return void (i.memoizedState = No(t, n, a, r));
+ }
+ (vo.flags |= e), (i.memoizedState = No(1 | t, n, a, r));
+ }
+ function Qo(e, t) {
+ return Zo(8390656, 8, e, t);
+ }
+ function Ho(e, t) {
+ return zo(2048, 8, e, t);
+ }
+ function Vo(e, t) {
+ return zo(4, 2, e, t);
+ }
+ function jo(e, t) {
+ return zo(4, 4, e, t);
+ }
+ function Wo(e, t) {
+ return "function" === typeof t
+ ? ((e = e()),
+ t(e),
+ function () {
+ t(null);
+ })
+ : null !== t && void 0 !== t
+ ? ((e = e()),
+ (t.current = e),
+ function () {
+ t.current = null;
+ })
+ : void 0;
+ }
+ function Xo(e, t, n) {
+ return (
+ (n = null !== n && void 0 !== n ? n.concat([e]) : null),
+ zo(4, 4, Wo.bind(null, t, e), n)
+ );
+ }
+ function Yo() {}
+ function qo(e, t) {
+ var n = To();
+ t = void 0 === t ? null : t;
+ var r = n.memoizedState;
+ return null !== r && null !== t && Eo(t, r[1])
+ ? r[0]
+ : ((n.memoizedState = [e, t]), e);
+ }
+ function Jo(e, t) {
+ var n = To();
+ t = void 0 === t ? null : t;
+ var r = n.memoizedState;
+ return null !== r && null !== t && Eo(t, r[1])
+ ? r[0]
+ : ((e = e()), (n.memoizedState = [e, t]), e);
+ }
+ function Ko(e, t, n) {
+ return 0 === (21 & po)
+ ? (e.baseState && ((e.baseState = !1), (bs = !0)),
+ (e.memoizedState = n))
+ : (sr(n, t) ||
+ ((n = vt()), (vo.lanes |= n), (Fl |= n), (e.baseState = !0)),
+ t);
+ }
+ function $o(e, t) {
+ var n = yt;
+ (yt = 0 !== n && 4 > n ? n : 4), e(!0);
+ var r = ho.transition;
+ ho.transition = {};
+ try {
+ e(!1), t();
+ } finally {
+ (yt = n), (ho.transition = r);
+ }
+ }
+ function es() {
+ return To().memoizedState;
+ }
+ function ts(e, t, n) {
+ var r = nu(e);
+ if (
+ ((n = {
+ lane: r,
+ action: n,
+ hasEagerState: !1,
+ eagerState: null,
+ next: null,
+ }),
+ rs(e))
+ )
+ is(t, n);
+ else if (null !== (n = Ma(e, t, n, r))) {
+ ru(n, e, r, tu()), as(n, t, r);
+ }
+ }
+ function ns(e, t, n) {
+ var r = nu(e),
+ i = {
+ lane: r,
+ action: n,
+ hasEagerState: !1,
+ eagerState: null,
+ next: null,
+ };
+ if (rs(e)) is(t, i);
+ else {
+ var a = e.alternate;
+ if (
+ 0 === e.lanes &&
+ (null === a || 0 === a.lanes) &&
+ null !== (a = t.lastRenderedReducer)
+ )
+ try {
+ var o = t.lastRenderedState,
+ s = a(o, n);
+ if (((i.hasEagerState = !0), (i.eagerState = s), sr(s, o))) {
+ var l = t.interleaved;
+ return (
+ null === l
+ ? ((i.next = i), Ta(t))
+ : ((i.next = l.next), (l.next = i)),
+ void (t.interleaved = i)
+ );
+ }
+ } catch (u) {}
+ null !== (n = Ma(e, t, i, r)) &&
+ (ru(n, e, r, (i = tu())), as(n, t, r));
+ }
+ }
+ function rs(e) {
+ var t = e.alternate;
+ return e === vo || (null !== t && t === vo);
+ }
+ function is(e, t) {
+ yo = Ao = !0;
+ var n = e.pending;
+ null === n ? (t.next = t) : ((t.next = n.next), (n.next = t)),
+ (e.pending = t);
+ }
+ function as(e, t, n) {
+ if (0 !== (4194240 & n)) {
+ var r = t.lanes;
+ (n |= r &= e.pendingLanes), (t.lanes = n), At(e, n);
+ }
+ }
+ var os = {
+ readContext: Ca,
+ useCallback: So,
+ useContext: So,
+ useEffect: So,
+ useImperativeHandle: So,
+ useInsertionEffect: So,
+ useLayoutEffect: So,
+ useMemo: So,
+ useReducer: So,
+ useRef: So,
+ useState: So,
+ useDebugValue: So,
+ useDeferredValue: So,
+ useTransition: So,
+ useMutableSource: So,
+ useSyncExternalStore: So,
+ useId: So,
+ unstable_isNewReconciler: !1,
+ },
+ ss = {
+ readContext: Ca,
+ useCallback: function (e, t) {
+ return (wo().memoizedState = [e, void 0 === t ? null : t]), e;
+ },
+ useContext: Ca,
+ useEffect: Qo,
+ useImperativeHandle: function (e, t, n) {
+ return (
+ (n = null !== n && void 0 !== n ? n.concat([e]) : null),
+ Zo(4194308, 4, Wo.bind(null, t, e), n)
+ );
+ },
+ useLayoutEffect: function (e, t) {
+ return Zo(4194308, 4, e, t);
+ },
+ useInsertionEffect: function (e, t) {
+ return Zo(4, 2, e, t);
+ },
+ useMemo: function (e, t) {
+ var n = wo();
+ return (
+ (t = void 0 === t ? null : t),
+ (e = e()),
+ (n.memoizedState = [e, t]),
+ e
+ );
+ },
+ useReducer: function (e, t, n) {
+ var r = wo();
+ return (
+ (t = void 0 !== n ? n(t) : t),
+ (r.memoizedState = r.baseState = t),
+ (e = {
+ pending: null,
+ interleaved: null,
+ lanes: 0,
+ dispatch: null,
+ lastRenderedReducer: e,
+ lastRenderedState: t,
+ }),
+ (r.queue = e),
+ (e = e.dispatch = ts.bind(null, vo, e)),
+ [r.memoizedState, e]
+ );
+ },
+ useRef: function (e) {
+ return (e = { current: e }), (wo().memoizedState = e);
+ },
+ useState: Oo,
+ useDebugValue: Yo,
+ useDeferredValue: function (e) {
+ return (wo().memoizedState = e);
+ },
+ useTransition: function () {
+ var e = Oo(!1),
+ t = e[0];
+ return (
+ (e = $o.bind(null, e[1])), (wo().memoizedState = e), [t, e]
+ );
+ },
+ useMutableSource: function () {},
+ useSyncExternalStore: function (e, t, n) {
+ var r = vo,
+ i = wo();
+ if (ia) {
+ if (void 0 === n) throw Error(a(407));
+ n = n();
+ } else {
+ if (((n = t()), null === kl)) throw Error(a(349));
+ 0 !== (30 & po) || Po(r, t, n);
+ }
+ i.memoizedState = n;
+ var o = { value: n, getSnapshot: t };
+ return (
+ (i.queue = o),
+ Qo(Do.bind(null, r, o, e), [e]),
+ (r.flags |= 2048),
+ No(9, Lo.bind(null, r, o, n, t), void 0, null),
+ n
+ );
+ },
+ useId: function () {
+ var e = wo(),
+ t = kl.identifierPrefix;
+ if (ia) {
+ var n = Ji;
+ (t =
+ ":" +
+ t +
+ "R" +
+ (n = (qi & ~(1 << (32 - ot(qi) - 1))).toString(32) + n)),
+ 0 < (n = bo++) && (t += "H" + n.toString(32)),
+ (t += ":");
+ } else t = ":" + t + "r" + (n = xo++).toString(32) + ":";
+ return (e.memoizedState = t);
+ },
+ unstable_isNewReconciler: !1,
+ },
+ ls = {
+ readContext: Ca,
+ useCallback: qo,
+ useContext: Ca,
+ useEffect: Ho,
+ useImperativeHandle: Xo,
+ useInsertionEffect: Vo,
+ useLayoutEffect: jo,
+ useMemo: Jo,
+ useReducer: Io,
+ useRef: Go,
+ useState: function () {
+ return Io(Mo);
+ },
+ useDebugValue: Yo,
+ useDeferredValue: function (e) {
+ return Ko(To(), mo.memoizedState, e);
+ },
+ useTransition: function () {
+ return [Io(Mo)[0], To().memoizedState];
+ },
+ useMutableSource: Ro,
+ useSyncExternalStore: Bo,
+ useId: es,
+ unstable_isNewReconciler: !1,
+ },
+ us = {
+ readContext: Ca,
+ useCallback: qo,
+ useContext: Ca,
+ useEffect: Ho,
+ useImperativeHandle: Xo,
+ useInsertionEffect: Vo,
+ useLayoutEffect: jo,
+ useMemo: Jo,
+ useReducer: ko,
+ useRef: Go,
+ useState: function () {
+ return ko(Mo);
+ },
+ useDebugValue: Yo,
+ useDeferredValue: function (e) {
+ var t = To();
+ return null === mo
+ ? (t.memoizedState = e)
+ : Ko(t, mo.memoizedState, e);
+ },
+ useTransition: function () {
+ return [ko(Mo)[0], To().memoizedState];
+ },
+ useMutableSource: Ro,
+ useSyncExternalStore: Bo,
+ useId: es,
+ unstable_isNewReconciler: !1,
+ };
+ function cs(e, t) {
+ try {
+ var n = "",
+ r = t;
+ do {
+ (n += Z(r)), (r = r.return);
+ } while (r);
+ var i = n;
+ } catch (a) {
+ i = "\nError generating stack: " + a.message + "\n" + a.stack;
+ }
+ return { value: e, source: t, stack: i, digest: null };
+ }
+ function fs(e, t, n) {
+ return {
+ value: e,
+ source: null,
+ stack: null != n ? n : null,
+ digest: null != t ? t : null,
+ };
+ }
+ function ds(e, t) {
+ try {
+ console.error(t.value);
+ } catch (n) {
+ setTimeout(function () {
+ throw n;
+ });
+ }
+ }
+ var hs = "function" === typeof WeakMap ? WeakMap : Map;
+ function ps(e, t, n) {
+ ((n = Pa(-1, n)).tag = 3), (n.payload = { element: null });
+ var r = t.value;
+ return (
+ (n.callback = function () {
+ Vl || ((Vl = !0), (jl = r)), ds(0, t);
+ }),
+ n
+ );
+ }
+ function vs(e, t, n) {
+ (n = Pa(-1, n)).tag = 3;
+ var r = e.type.getDerivedStateFromError;
+ if ("function" === typeof r) {
+ var i = t.value;
+ (n.payload = function () {
+ return r(i);
+ }),
+ (n.callback = function () {
+ ds(0, t);
+ });
+ }
+ var a = e.stateNode;
+ return (
+ null !== a &&
+ "function" === typeof a.componentDidCatch &&
+ (n.callback = function () {
+ ds(0, t),
+ "function" !== typeof r &&
+ (null === Wl ? (Wl = new Set([this])) : Wl.add(this));
+ var e = t.stack;
+ this.componentDidCatch(t.value, {
+ componentStack: null !== e ? e : "",
+ });
+ }),
+ n
+ );
+ }
+ function ms(e, t, n) {
+ var r = e.pingCache;
+ if (null === r) {
+ r = e.pingCache = new hs();
+ var i = new Set();
+ r.set(t, i);
+ } else void 0 === (i = r.get(t)) && ((i = new Set()), r.set(t, i));
+ i.has(n) || (i.add(n), (e = wu.bind(null, e, t, n)), t.then(e, e));
+ }
+ function gs(e) {
+ do {
+ var t;
+ if (
+ ((t = 13 === e.tag) &&
+ (t = null === (t = e.memoizedState) || null !== t.dehydrated),
+ t)
+ )
+ return e;
+ e = e.return;
+ } while (null !== e);
+ return null;
+ }
+ function As(e, t, n, r, i) {
+ return 0 === (1 & e.mode)
+ ? (e === t
+ ? (e.flags |= 65536)
+ : ((e.flags |= 128),
+ (n.flags |= 131072),
+ (n.flags &= -52805),
+ 1 === n.tag &&
+ (null === n.alternate
+ ? (n.tag = 17)
+ : (((t = Pa(-1, 1)).tag = 2), La(n, t, 1))),
+ (n.lanes |= 1)),
+ e)
+ : ((e.flags |= 65536), (e.lanes = i), e);
+ }
+ var ys = b.ReactCurrentOwner,
+ bs = !1;
+ function xs(e, t, n, r) {
+ t.child = null === e ? Ja(t, null, n, r) : qa(t, e.child, n, r);
+ }
+ function Ss(e, t, n, r, i) {
+ n = n.render;
+ var a = t.ref;
+ return (
+ _a(t, i),
+ (r = _o(e, t, n, r, a, i)),
+ (n = Co()),
+ null === e || bs
+ ? (ia && n && ea(t), (t.flags |= 1), xs(e, t, r, i), t.child)
+ : ((t.updateQueue = e.updateQueue),
+ (t.flags &= -2053),
+ (e.lanes &= ~i),
+ Vs(e, t, i))
+ );
+ }
+ function Es(e, t, n, r, i) {
+ if (null === e) {
+ var a = n.type;
+ return "function" !== typeof a ||
+ Pu(a) ||
+ void 0 !== a.defaultProps ||
+ null !== n.compare ||
+ void 0 !== n.defaultProps
+ ? (((e = Du(n.type, null, r, t, t.mode, i)).ref = t.ref),
+ (e.return = t),
+ (t.child = e))
+ : ((t.tag = 15), (t.type = a), _s(e, t, a, r, i));
+ }
+ if (((a = e.child), 0 === (e.lanes & i))) {
+ var o = a.memoizedProps;
+ if (
+ (n = null !== (n = n.compare) ? n : lr)(o, r) &&
+ e.ref === t.ref
+ )
+ return Vs(e, t, i);
+ }
+ return (
+ (t.flags |= 1),
+ ((e = Lu(a, r)).ref = t.ref),
+ (e.return = t),
+ (t.child = e)
+ );
+ }
+ function _s(e, t, n, r, i) {
+ if (null !== e) {
+ var a = e.memoizedProps;
+ if (lr(a, r) && e.ref === t.ref) {
+ if (((bs = !1), (t.pendingProps = r = a), 0 === (e.lanes & i)))
+ return (t.lanes = e.lanes), Vs(e, t, i);
+ 0 !== (131072 & e.flags) && (bs = !0);
+ }
+ }
+ return Ts(e, t, n, r, i);
+ }
+ function Cs(e, t, n) {
+ var r = t.pendingProps,
+ i = r.children,
+ a = null !== e ? e.memoizedState : null;
+ if ("hidden" === r.mode)
+ if (0 === (1 & t.mode))
+ (t.memoizedState = {
+ baseLanes: 0,
+ cachePool: null,
+ transitions: null,
+ }),
+ wi(Ll, Pl),
+ (Pl |= n);
+ else {
+ if (0 === (1073741824 & n))
+ return (
+ (e = null !== a ? a.baseLanes | n : n),
+ (t.lanes = t.childLanes = 1073741824),
+ (t.memoizedState = {
+ baseLanes: e,
+ cachePool: null,
+ transitions: null,
+ }),
+ (t.updateQueue = null),
+ wi(Ll, Pl),
+ (Pl |= e),
+ null
+ );
+ (t.memoizedState = {
+ baseLanes: 0,
+ cachePool: null,
+ transitions: null,
+ }),
+ (r = null !== a ? a.baseLanes : n),
+ wi(Ll, Pl),
+ (Pl |= r);
+ }
+ else
+ null !== a
+ ? ((r = a.baseLanes | n), (t.memoizedState = null))
+ : (r = n),
+ wi(Ll, Pl),
+ (Pl |= r);
+ return xs(e, t, i, n), t.child;
+ }
+ function ws(e, t) {
+ var n = t.ref;
+ ((null === e && null !== n) || (null !== e && e.ref !== n)) &&
+ ((t.flags |= 512), (t.flags |= 2097152));
+ }
+ function Ts(e, t, n, r, i) {
+ var a = Bi(n) ? ki : Mi.current;
+ return (
+ (a = Ri(t, a)),
+ _a(t, i),
+ (n = _o(e, t, n, r, a, i)),
+ (r = Co()),
+ null === e || bs
+ ? (ia && r && ea(t), (t.flags |= 1), xs(e, t, n, i), t.child)
+ : ((t.updateQueue = e.updateQueue),
+ (t.flags &= -2053),
+ (e.lanes &= ~i),
+ Vs(e, t, i))
+ );
+ }
+ function Ms(e, t, n, r, i) {
+ if (Bi(n)) {
+ var a = !0;
+ Ui(t);
+ } else a = !1;
+ if ((_a(t, i), null === t.stateNode))
+ Hs(e, t), Qa(t, n, r), Va(t, n, r, i), (r = !0);
+ else if (null === e) {
+ var o = t.stateNode,
+ s = t.memoizedProps;
+ o.props = s;
+ var l = o.context,
+ u = n.contextType;
+ "object" === typeof u && null !== u
+ ? (u = Ca(u))
+ : (u = Ri(t, (u = Bi(n) ? ki : Mi.current)));
+ var c = n.getDerivedStateFromProps,
+ f =
+ "function" === typeof c ||
+ "function" === typeof o.getSnapshotBeforeUpdate;
+ f ||
+ ("function" !== typeof o.UNSAFE_componentWillReceiveProps &&
+ "function" !== typeof o.componentWillReceiveProps) ||
+ ((s !== r || l !== u) && Ha(t, o, r, u)),
+ (ka = !1);
+ var d = t.memoizedState;
+ (o.state = d),
+ Fa(t, r, o, i),
+ (l = t.memoizedState),
+ s !== r || d !== l || Ii.current || ka
+ ? ("function" === typeof c &&
+ (Ga(t, n, c, r), (l = t.memoizedState)),
+ (s = ka || za(t, n, s, r, d, l, u))
+ ? (f ||
+ ("function" !== typeof o.UNSAFE_componentWillMount &&
+ "function" !== typeof o.componentWillMount) ||
+ ("function" === typeof o.componentWillMount &&
+ o.componentWillMount(),
+ "function" === typeof o.UNSAFE_componentWillMount &&
+ o.UNSAFE_componentWillMount()),
+ "function" === typeof o.componentDidMount &&
+ (t.flags |= 4194308))
+ : ("function" === typeof o.componentDidMount &&
+ (t.flags |= 4194308),
+ (t.memoizedProps = r),
+ (t.memoizedState = l)),
+ (o.props = r),
+ (o.state = l),
+ (o.context = u),
+ (r = s))
+ : ("function" === typeof o.componentDidMount &&
+ (t.flags |= 4194308),
+ (r = !1));
+ } else {
+ (o = t.stateNode),
+ Ba(e, t),
+ (s = t.memoizedProps),
+ (u = t.type === t.elementType ? s : ma(t.type, s)),
+ (o.props = u),
+ (f = t.pendingProps),
+ (d = o.context),
+ "object" === typeof (l = n.contextType) && null !== l
+ ? (l = Ca(l))
+ : (l = Ri(t, (l = Bi(n) ? ki : Mi.current)));
+ var h = n.getDerivedStateFromProps;
+ (c =
+ "function" === typeof h ||
+ "function" === typeof o.getSnapshotBeforeUpdate) ||
+ ("function" !== typeof o.UNSAFE_componentWillReceiveProps &&
+ "function" !== typeof o.componentWillReceiveProps) ||
+ ((s !== f || d !== l) && Ha(t, o, r, l)),
+ (ka = !1),
+ (d = t.memoizedState),
+ (o.state = d),
+ Fa(t, r, o, i);
+ var p = t.memoizedState;
+ s !== f || d !== p || Ii.current || ka
+ ? ("function" === typeof h &&
+ (Ga(t, n, h, r), (p = t.memoizedState)),
+ (u = ka || za(t, n, u, r, d, p, l) || !1)
+ ? (c ||
+ ("function" !== typeof o.UNSAFE_componentWillUpdate &&
+ "function" !== typeof o.componentWillUpdate) ||
+ ("function" === typeof o.componentWillUpdate &&
+ o.componentWillUpdate(r, p, l),
+ "function" === typeof o.UNSAFE_componentWillUpdate &&
+ o.UNSAFE_componentWillUpdate(r, p, l)),
+ "function" === typeof o.componentDidUpdate &&
+ (t.flags |= 4),
+ "function" === typeof o.getSnapshotBeforeUpdate &&
+ (t.flags |= 1024))
+ : ("function" !== typeof o.componentDidUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 4),
+ "function" !== typeof o.getSnapshotBeforeUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 1024),
+ (t.memoizedProps = r),
+ (t.memoizedState = p)),
+ (o.props = r),
+ (o.state = p),
+ (o.context = l),
+ (r = u))
+ : ("function" !== typeof o.componentDidUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 4),
+ "function" !== typeof o.getSnapshotBeforeUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 1024),
+ (r = !1));
+ }
+ return Is(e, t, n, r, a, i);
+ }
+ function Is(e, t, n, r, i, a) {
+ ws(e, t);
+ var o = 0 !== (128 & t.flags);
+ if (!r && !o) return i && Fi(t, n, !1), Vs(e, t, a);
+ (r = t.stateNode), (ys.current = t);
+ var s =
+ o && "function" !== typeof n.getDerivedStateFromError
+ ? null
+ : r.render();
+ return (
+ (t.flags |= 1),
+ null !== e && o
+ ? ((t.child = qa(t, e.child, null, a)),
+ (t.child = qa(t, null, s, a)))
+ : xs(e, t, s, a),
+ (t.memoizedState = r.state),
+ i && Fi(t, n, !0),
+ t.child
+ );
+ }
+ function ks(e) {
+ var t = e.stateNode;
+ t.pendingContext
+ ? Li(0, t.pendingContext, t.pendingContext !== t.context)
+ : t.context && Li(0, t.context, !1),
+ ro(e, t.containerInfo);
+ }
+ function Rs(e, t, n, r, i) {
+ return ha(), pa(i), (t.flags |= 256), xs(e, t, n, r), t.child;
+ }
+ var Bs,
+ Ps,
+ Ls,
+ Ds,
+ Us = { dehydrated: null, treeContext: null, retryLane: 0 };
+ function Fs(e) {
+ return { baseLanes: e, cachePool: null, transitions: null };
+ }
+ function Os(e, t, n) {
+ var r,
+ i = t.pendingProps,
+ o = so.current,
+ s = !1,
+ l = 0 !== (128 & t.flags);
+ if (
+ ((r = l) ||
+ (r = (null === e || null !== e.memoizedState) && 0 !== (2 & o)),
+ r
+ ? ((s = !0), (t.flags &= -129))
+ : (null !== e && null === e.memoizedState) || (o |= 1),
+ wi(so, 1 & o),
+ null === e)
+ )
+ return (
+ ua(t),
+ null !== (e = t.memoizedState) && null !== (e = e.dehydrated)
+ ? (0 === (1 & t.mode)
+ ? (t.lanes = 1)
+ : "$!" === e.data
+ ? (t.lanes = 8)
+ : (t.lanes = 1073741824),
+ null)
+ : ((l = i.children),
+ (e = i.fallback),
+ s
+ ? ((i = t.mode),
+ (s = t.child),
+ (l = { mode: "hidden", children: l }),
+ 0 === (1 & i) && null !== s
+ ? ((s.childLanes = 0), (s.pendingProps = l))
+ : (s = Fu(l, i, 0, null)),
+ (e = Uu(e, i, n, null)),
+ (s.return = t),
+ (e.return = t),
+ (s.sibling = e),
+ (t.child = s),
+ (t.child.memoizedState = Fs(n)),
+ (t.memoizedState = Us),
+ e)
+ : Ns(t, l))
+ );
+ if (null !== (o = e.memoizedState) && null !== (r = o.dehydrated))
+ return (function (e, t, n, r, i, o, s) {
+ if (n)
+ return 256 & t.flags
+ ? ((t.flags &= -257), Gs(e, t, s, (r = fs(Error(a(422))))))
+ : null !== t.memoizedState
+ ? ((t.child = e.child), (t.flags |= 128), null)
+ : ((o = r.fallback),
+ (i = t.mode),
+ (r = Fu(
+ { mode: "visible", children: r.children },
+ i,
+ 0,
+ null
+ )),
+ ((o = Uu(o, i, s, null)).flags |= 2),
+ (r.return = t),
+ (o.return = t),
+ (r.sibling = o),
+ (t.child = r),
+ 0 !== (1 & t.mode) && qa(t, e.child, null, s),
+ (t.child.memoizedState = Fs(s)),
+ (t.memoizedState = Us),
+ o);
+ if (0 === (1 & t.mode)) return Gs(e, t, s, null);
+ if ("$!" === i.data) {
+ if ((r = i.nextSibling && i.nextSibling.dataset))
+ var l = r.dgst;
+ return (
+ (r = l), Gs(e, t, s, (r = fs((o = Error(a(419))), r, void 0)))
+ );
+ }
+ if (((l = 0 !== (s & e.childLanes)), bs || l)) {
+ if (null !== (r = kl)) {
+ switch (s & -s) {
+ case 4:
+ i = 2;
+ break;
+ case 16:
+ i = 8;
+ break;
+ case 64:
+ case 128:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ case 4096:
+ case 8192:
+ case 16384:
+ case 32768:
+ case 65536:
+ case 131072:
+ case 262144:
+ case 524288:
+ case 1048576:
+ case 2097152:
+ case 4194304:
+ case 8388608:
+ case 16777216:
+ case 33554432:
+ case 67108864:
+ i = 32;
+ break;
+ case 536870912:
+ i = 268435456;
+ break;
+ default:
+ i = 0;
+ }
+ 0 !== (i = 0 !== (i & (r.suspendedLanes | s)) ? 0 : i) &&
+ i !== o.retryLane &&
+ ((o.retryLane = i), Ia(e, i), ru(r, e, i, -1));
+ }
+ return mu(), Gs(e, t, s, (r = fs(Error(a(421)))));
+ }
+ return "$?" === i.data
+ ? ((t.flags |= 128),
+ (t.child = e.child),
+ (t = Mu.bind(null, e)),
+ (i._reactRetry = t),
+ null)
+ : ((e = o.treeContext),
+ (ra = ui(i.nextSibling)),
+ (na = t),
+ (ia = !0),
+ (aa = null),
+ null !== e &&
+ ((Wi[Xi++] = qi),
+ (Wi[Xi++] = Ji),
+ (Wi[Xi++] = Yi),
+ (qi = e.id),
+ (Ji = e.overflow),
+ (Yi = t)),
+ (t = Ns(t, r.children)),
+ (t.flags |= 4096),
+ t);
+ })(e, t, l, i, r, o, n);
+ if (s) {
+ (s = i.fallback), (l = t.mode), (r = (o = e.child).sibling);
+ var u = { mode: "hidden", children: i.children };
+ return (
+ 0 === (1 & l) && t.child !== o
+ ? (((i = t.child).childLanes = 0),
+ (i.pendingProps = u),
+ (t.deletions = null))
+ : ((i = Lu(o, u)).subtreeFlags = 14680064 & o.subtreeFlags),
+ null !== r
+ ? (s = Lu(r, s))
+ : ((s = Uu(s, l, n, null)).flags |= 2),
+ (s.return = t),
+ (i.return = t),
+ (i.sibling = s),
+ (t.child = i),
+ (i = s),
+ (s = t.child),
+ (l =
+ null === (l = e.child.memoizedState)
+ ? Fs(n)
+ : {
+ baseLanes: l.baseLanes | n,
+ cachePool: null,
+ transitions: l.transitions,
+ }),
+ (s.memoizedState = l),
+ (s.childLanes = e.childLanes & ~n),
+ (t.memoizedState = Us),
+ i
+ );
+ }
+ return (
+ (e = (s = e.child).sibling),
+ (i = Lu(s, { mode: "visible", children: i.children })),
+ 0 === (1 & t.mode) && (i.lanes = n),
+ (i.return = t),
+ (i.sibling = null),
+ null !== e &&
+ (null === (n = t.deletions)
+ ? ((t.deletions = [e]), (t.flags |= 16))
+ : n.push(e)),
+ (t.child = i),
+ (t.memoizedState = null),
+ i
+ );
+ }
+ function Ns(e, t) {
+ return (
+ ((t = Fu(
+ { mode: "visible", children: t },
+ e.mode,
+ 0,
+ null
+ )).return = e),
+ (e.child = t)
+ );
+ }
+ function Gs(e, t, n, r) {
+ return (
+ null !== r && pa(r),
+ qa(t, e.child, null, n),
+ ((e = Ns(t, t.pendingProps.children)).flags |= 2),
+ (t.memoizedState = null),
+ e
+ );
+ }
+ function Zs(e, t, n) {
+ e.lanes |= t;
+ var r = e.alternate;
+ null !== r && (r.lanes |= t), Ea(e.return, t, n);
+ }
+ function zs(e, t, n, r, i) {
+ var a = e.memoizedState;
+ null === a
+ ? (e.memoizedState = {
+ isBackwards: t,
+ rendering: null,
+ renderingStartTime: 0,
+ last: r,
+ tail: n,
+ tailMode: i,
+ })
+ : ((a.isBackwards = t),
+ (a.rendering = null),
+ (a.renderingStartTime = 0),
+ (a.last = r),
+ (a.tail = n),
+ (a.tailMode = i));
+ }
+ function Qs(e, t, n) {
+ var r = t.pendingProps,
+ i = r.revealOrder,
+ a = r.tail;
+ if ((xs(e, t, r.children, n), 0 !== (2 & (r = so.current))))
+ (r = (1 & r) | 2), (t.flags |= 128);
+ else {
+ if (null !== e && 0 !== (128 & e.flags))
+ e: for (e = t.child; null !== e; ) {
+ if (13 === e.tag) null !== e.memoizedState && Zs(e, n, t);
+ else if (19 === e.tag) Zs(e, n, t);
+ else if (null !== e.child) {
+ (e.child.return = e), (e = e.child);
+ continue;
+ }
+ if (e === t) break e;
+ for (; null === e.sibling; ) {
+ if (null === e.return || e.return === t) break e;
+ e = e.return;
+ }
+ (e.sibling.return = e.return), (e = e.sibling);
+ }
+ r &= 1;
+ }
+ if ((wi(so, r), 0 === (1 & t.mode))) t.memoizedState = null;
+ else
+ switch (i) {
+ case "forwards":
+ for (n = t.child, i = null; null !== n; )
+ null !== (e = n.alternate) && null === lo(e) && (i = n),
+ (n = n.sibling);
+ null === (n = i)
+ ? ((i = t.child), (t.child = null))
+ : ((i = n.sibling), (n.sibling = null)),
+ zs(t, !1, i, n, a);
+ break;
+ case "backwards":
+ for (n = null, i = t.child, t.child = null; null !== i; ) {
+ if (null !== (e = i.alternate) && null === lo(e)) {
+ t.child = i;
+ break;
+ }
+ (e = i.sibling), (i.sibling = n), (n = i), (i = e);
+ }
+ zs(t, !0, n, null, a);
+ break;
+ case "together":
+ zs(t, !1, null, null, void 0);
+ break;
+ default:
+ t.memoizedState = null;
+ }
+ return t.child;
+ }
+ function Hs(e, t) {
+ 0 === (1 & t.mode) &&
+ null !== e &&
+ ((e.alternate = null), (t.alternate = null), (t.flags |= 2));
+ }
+ function Vs(e, t, n) {
+ if (
+ (null !== e && (t.dependencies = e.dependencies),
+ (Fl |= t.lanes),
+ 0 === (n & t.childLanes))
+ )
+ return null;
+ if (null !== e && t.child !== e.child) throw Error(a(153));
+ if (null !== t.child) {
+ for (
+ n = Lu((e = t.child), e.pendingProps), t.child = n, n.return = t;
+ null !== e.sibling;
+
+ )
+ (e = e.sibling),
+ ((n = n.sibling = Lu(e, e.pendingProps)).return = t);
+ n.sibling = null;
+ }
+ return t.child;
+ }
+ function js(e, t) {
+ if (!ia)
+ switch (e.tailMode) {
+ case "hidden":
+ t = e.tail;
+ for (var n = null; null !== t; )
+ null !== t.alternate && (n = t), (t = t.sibling);
+ null === n ? (e.tail = null) : (n.sibling = null);
+ break;
+ case "collapsed":
+ n = e.tail;
+ for (var r = null; null !== n; )
+ null !== n.alternate && (r = n), (n = n.sibling);
+ null === r
+ ? t || null === e.tail
+ ? (e.tail = null)
+ : (e.tail.sibling = null)
+ : (r.sibling = null);
+ }
+ }
+ function Ws(e) {
+ var t = null !== e.alternate && e.alternate.child === e.child,
+ n = 0,
+ r = 0;
+ if (t)
+ for (var i = e.child; null !== i; )
+ (n |= i.lanes | i.childLanes),
+ (r |= 14680064 & i.subtreeFlags),
+ (r |= 14680064 & i.flags),
+ (i.return = e),
+ (i = i.sibling);
+ else
+ for (i = e.child; null !== i; )
+ (n |= i.lanes | i.childLanes),
+ (r |= i.subtreeFlags),
+ (r |= i.flags),
+ (i.return = e),
+ (i = i.sibling);
+ return (e.subtreeFlags |= r), (e.childLanes = n), t;
+ }
+ function Xs(e, t, n) {
+ var r = t.pendingProps;
+ switch ((ta(t), t.tag)) {
+ case 2:
+ case 16:
+ case 15:
+ case 0:
+ case 11:
+ case 7:
+ case 8:
+ case 12:
+ case 9:
+ case 14:
+ return Ws(t), null;
+ case 1:
+ case 17:
+ return Bi(t.type) && Pi(), Ws(t), null;
+ case 3:
+ return (
+ (r = t.stateNode),
+ io(),
+ Ci(Ii),
+ Ci(Mi),
+ co(),
+ r.pendingContext &&
+ ((r.context = r.pendingContext), (r.pendingContext = null)),
+ (null !== e && null !== e.child) ||
+ (fa(t)
+ ? (t.flags |= 4)
+ : null === e ||
+ (e.memoizedState.isDehydrated && 0 === (256 & t.flags)) ||
+ ((t.flags |= 1024),
+ null !== aa && (su(aa), (aa = null)))),
+ Ps(e, t),
+ Ws(t),
+ null
+ );
+ case 5:
+ oo(t);
+ var i = no(to.current);
+ if (((n = t.type), null !== e && null != t.stateNode))
+ Ls(e, t, n, r, i),
+ e.ref !== t.ref && ((t.flags |= 512), (t.flags |= 2097152));
+ else {
+ if (!r) {
+ if (null === t.stateNode) throw Error(a(166));
+ return Ws(t), null;
+ }
+ if (((e = no($a.current)), fa(t))) {
+ (r = t.stateNode), (n = t.type);
+ var o = t.memoizedProps;
+ switch (
+ ((r[di] = t), (r[hi] = o), (e = 0 !== (1 & t.mode)), n)
+ ) {
+ case "dialog":
+ Nr("cancel", r), Nr("close", r);
+ break;
+ case "iframe":
+ case "object":
+ case "embed":
+ Nr("load", r);
+ break;
+ case "video":
+ case "audio":
+ for (i = 0; i < Dr.length; i++) Nr(Dr[i], r);
+ break;
+ case "source":
+ Nr("error", r);
+ break;
+ case "img":
+ case "image":
+ case "link":
+ Nr("error", r), Nr("load", r);
+ break;
+ case "details":
+ Nr("toggle", r);
+ break;
+ case "input":
+ q(r, o), Nr("invalid", r);
+ break;
+ case "select":
+ (r._wrapperState = { wasMultiple: !!o.multiple }),
+ Nr("invalid", r);
+ break;
+ case "textarea":
+ ie(r, o), Nr("invalid", r);
+ }
+ for (var l in (Ae(n, o), (i = null), o))
+ if (o.hasOwnProperty(l)) {
+ var u = o[l];
+ "children" === l
+ ? "string" === typeof u
+ ? r.textContent !== u &&
+ (!0 !== o.suppressHydrationWarning &&
+ Kr(r.textContent, u, e),
+ (i = ["children", u]))
+ : "number" === typeof u &&
+ r.textContent !== "" + u &&
+ (!0 !== o.suppressHydrationWarning &&
+ Kr(r.textContent, u, e),
+ (i = ["children", "" + u]))
+ : s.hasOwnProperty(l) &&
+ null != u &&
+ "onScroll" === l &&
+ Nr("scroll", r);
+ }
+ switch (n) {
+ case "input":
+ j(r), $(r, o, !0);
+ break;
+ case "textarea":
+ j(r), oe(r);
+ break;
+ case "select":
+ case "option":
+ break;
+ default:
+ "function" === typeof o.onClick && (r.onclick = $r);
+ }
+ (r = i), (t.updateQueue = r), null !== r && (t.flags |= 4);
+ } else {
+ (l = 9 === i.nodeType ? i : i.ownerDocument),
+ "http://www.w3.org/1999/xhtml" === e && (e = se(n)),
+ "http://www.w3.org/1999/xhtml" === e
+ ? "script" === n
+ ? (((e = l.createElement("div")).innerHTML =
+ ""),
+ (e = e.removeChild(e.firstChild)))
+ : "string" === typeof r.is
+ ? (e = l.createElement(n, { is: r.is }))
+ : ((e = l.createElement(n)),
+ "select" === n &&
+ ((l = e),
+ r.multiple
+ ? (l.multiple = !0)
+ : r.size && (l.size = r.size)))
+ : (e = l.createElementNS(e, n)),
+ (e[di] = t),
+ (e[hi] = r),
+ Bs(e, t, !1, !1),
+ (t.stateNode = e);
+ e: {
+ switch (((l = ye(n, r)), n)) {
+ case "dialog":
+ Nr("cancel", e), Nr("close", e), (i = r);
+ break;
+ case "iframe":
+ case "object":
+ case "embed":
+ Nr("load", e), (i = r);
+ break;
+ case "video":
+ case "audio":
+ for (i = 0; i < Dr.length; i++) Nr(Dr[i], e);
+ i = r;
+ break;
+ case "source":
+ Nr("error", e), (i = r);
+ break;
+ case "img":
+ case "image":
+ case "link":
+ Nr("error", e), Nr("load", e), (i = r);
+ break;
+ case "details":
+ Nr("toggle", e), (i = r);
+ break;
+ case "input":
+ q(e, r), (i = Y(e, r)), Nr("invalid", e);
+ break;
+ case "option":
+ default:
+ i = r;
+ break;
+ case "select":
+ (e._wrapperState = { wasMultiple: !!r.multiple }),
+ (i = F({}, r, { value: void 0 })),
+ Nr("invalid", e);
+ break;
+ case "textarea":
+ ie(e, r), (i = re(e, r)), Nr("invalid", e);
+ }
+ for (o in (Ae(n, i), (u = i)))
+ if (u.hasOwnProperty(o)) {
+ var c = u[o];
+ "style" === o
+ ? me(e, c)
+ : "dangerouslySetInnerHTML" === o
+ ? null != (c = c ? c.__html : void 0) && fe(e, c)
+ : "children" === o
+ ? "string" === typeof c
+ ? ("textarea" !== n || "" !== c) && de(e, c)
+ : "number" === typeof c && de(e, "" + c)
+ : "suppressContentEditableWarning" !== o &&
+ "suppressHydrationWarning" !== o &&
+ "autoFocus" !== o &&
+ (s.hasOwnProperty(o)
+ ? null != c && "onScroll" === o && Nr("scroll", e)
+ : null != c && y(e, o, c, l));
+ }
+ switch (n) {
+ case "input":
+ j(e), $(e, r, !1);
+ break;
+ case "textarea":
+ j(e), oe(e);
+ break;
+ case "option":
+ null != r.value &&
+ e.setAttribute("value", "" + H(r.value));
+ break;
+ case "select":
+ (e.multiple = !!r.multiple),
+ null != (o = r.value)
+ ? ne(e, !!r.multiple, o, !1)
+ : null != r.defaultValue &&
+ ne(e, !!r.multiple, r.defaultValue, !0);
+ break;
+ default:
+ "function" === typeof i.onClick && (e.onclick = $r);
+ }
+ switch (n) {
+ case "button":
+ case "input":
+ case "select":
+ case "textarea":
+ r = !!r.autoFocus;
+ break e;
+ case "img":
+ r = !0;
+ break e;
+ default:
+ r = !1;
+ }
+ }
+ r && (t.flags |= 4);
+ }
+ null !== t.ref && ((t.flags |= 512), (t.flags |= 2097152));
+ }
+ return Ws(t), null;
+ case 6:
+ if (e && null != t.stateNode) Ds(e, t, e.memoizedProps, r);
+ else {
+ if ("string" !== typeof r && null === t.stateNode)
+ throw Error(a(166));
+ if (((n = no(to.current)), no($a.current), fa(t))) {
+ if (
+ ((r = t.stateNode),
+ (n = t.memoizedProps),
+ (r[di] = t),
+ (o = r.nodeValue !== n) && null !== (e = na))
+ )
+ switch (e.tag) {
+ case 3:
+ Kr(r.nodeValue, n, 0 !== (1 & e.mode));
+ break;
+ case 5:
+ !0 !== e.memoizedProps.suppressHydrationWarning &&
+ Kr(r.nodeValue, n, 0 !== (1 & e.mode));
+ }
+ o && (t.flags |= 4);
+ } else
+ ((r = (9 === n.nodeType ? n : n.ownerDocument).createTextNode(
+ r
+ ))[di] = t),
+ (t.stateNode = r);
+ }
+ return Ws(t), null;
+ case 13:
+ if (
+ (Ci(so),
+ (r = t.memoizedState),
+ null === e ||
+ (null !== e.memoizedState &&
+ null !== e.memoizedState.dehydrated))
+ ) {
+ if (
+ ia &&
+ null !== ra &&
+ 0 !== (1 & t.mode) &&
+ 0 === (128 & t.flags)
+ )
+ da(), ha(), (t.flags |= 98560), (o = !1);
+ else if (((o = fa(t)), null !== r && null !== r.dehydrated)) {
+ if (null === e) {
+ if (!o) throw Error(a(318));
+ if (
+ !(o =
+ null !== (o = t.memoizedState) ? o.dehydrated : null)
+ )
+ throw Error(a(317));
+ o[di] = t;
+ } else
+ ha(),
+ 0 === (128 & t.flags) && (t.memoizedState = null),
+ (t.flags |= 4);
+ Ws(t), (o = !1);
+ } else null !== aa && (su(aa), (aa = null)), (o = !0);
+ if (!o) return 65536 & t.flags ? t : null;
+ }
+ return 0 !== (128 & t.flags)
+ ? ((t.lanes = n), t)
+ : ((r = null !== r) !==
+ (null !== e && null !== e.memoizedState) &&
+ r &&
+ ((t.child.flags |= 8192),
+ 0 !== (1 & t.mode) &&
+ (null === e || 0 !== (1 & so.current)
+ ? 0 === Dl && (Dl = 3)
+ : mu())),
+ null !== t.updateQueue && (t.flags |= 4),
+ Ws(t),
+ null);
+ case 4:
+ return (
+ io(),
+ Ps(e, t),
+ null === e && zr(t.stateNode.containerInfo),
+ Ws(t),
+ null
+ );
+ case 10:
+ return Sa(t.type._context), Ws(t), null;
+ case 19:
+ if ((Ci(so), null === (o = t.memoizedState))) return Ws(t), null;
+ if (((r = 0 !== (128 & t.flags)), null === (l = o.rendering)))
+ if (r) js(o, !1);
+ else {
+ if (0 !== Dl || (null !== e && 0 !== (128 & e.flags)))
+ for (e = t.child; null !== e; ) {
+ if (null !== (l = lo(e))) {
+ for (
+ t.flags |= 128,
+ js(o, !1),
+ null !== (r = l.updateQueue) &&
+ ((t.updateQueue = r), (t.flags |= 4)),
+ t.subtreeFlags = 0,
+ r = n,
+ n = t.child;
+ null !== n;
+
+ )
+ (e = r),
+ ((o = n).flags &= 14680066),
+ null === (l = o.alternate)
+ ? ((o.childLanes = 0),
+ (o.lanes = e),
+ (o.child = null),
+ (o.subtreeFlags = 0),
+ (o.memoizedProps = null),
+ (o.memoizedState = null),
+ (o.updateQueue = null),
+ (o.dependencies = null),
+ (o.stateNode = null))
+ : ((o.childLanes = l.childLanes),
+ (o.lanes = l.lanes),
+ (o.child = l.child),
+ (o.subtreeFlags = 0),
+ (o.deletions = null),
+ (o.memoizedProps = l.memoizedProps),
+ (o.memoizedState = l.memoizedState),
+ (o.updateQueue = l.updateQueue),
+ (o.type = l.type),
+ (e = l.dependencies),
+ (o.dependencies =
+ null === e
+ ? null
+ : {
+ lanes: e.lanes,
+ firstContext: e.firstContext,
+ })),
+ (n = n.sibling);
+ return wi(so, (1 & so.current) | 2), t.child;
+ }
+ e = e.sibling;
+ }
+ null !== o.tail &&
+ Je() > Ql &&
+ ((t.flags |= 128),
+ (r = !0),
+ js(o, !1),
+ (t.lanes = 4194304));
+ }
+ else {
+ if (!r)
+ if (null !== (e = lo(l))) {
+ if (
+ ((t.flags |= 128),
+ (r = !0),
+ null !== (n = e.updateQueue) &&
+ ((t.updateQueue = n), (t.flags |= 4)),
+ js(o, !0),
+ null === o.tail &&
+ "hidden" === o.tailMode &&
+ !l.alternate &&
+ !ia)
+ )
+ return Ws(t), null;
+ } else
+ 2 * Je() - o.renderingStartTime > Ql &&
+ 1073741824 !== n &&
+ ((t.flags |= 128),
+ (r = !0),
+ js(o, !1),
+ (t.lanes = 4194304));
+ o.isBackwards
+ ? ((l.sibling = t.child), (t.child = l))
+ : (null !== (n = o.last) ? (n.sibling = l) : (t.child = l),
+ (o.last = l));
+ }
+ return null !== o.tail
+ ? ((t = o.tail),
+ (o.rendering = t),
+ (o.tail = t.sibling),
+ (o.renderingStartTime = Je()),
+ (t.sibling = null),
+ (n = so.current),
+ wi(so, r ? (1 & n) | 2 : 1 & n),
+ t)
+ : (Ws(t), null);
+ case 22:
+ case 23:
+ return (
+ du(),
+ (r = null !== t.memoizedState),
+ null !== e &&
+ (null !== e.memoizedState) !== r &&
+ (t.flags |= 8192),
+ r && 0 !== (1 & t.mode)
+ ? 0 !== (1073741824 & Pl) &&
+ (Ws(t), 6 & t.subtreeFlags && (t.flags |= 8192))
+ : Ws(t),
+ null
+ );
+ case 24:
+ case 25:
+ return null;
+ }
+ throw Error(a(156, t.tag));
+ }
+ function Ys(e, t) {
+ switch ((ta(t), t.tag)) {
+ case 1:
+ return (
+ Bi(t.type) && Pi(),
+ 65536 & (e = t.flags)
+ ? ((t.flags = (-65537 & e) | 128), t)
+ : null
+ );
+ case 3:
+ return (
+ io(),
+ Ci(Ii),
+ Ci(Mi),
+ co(),
+ 0 !== (65536 & (e = t.flags)) && 0 === (128 & e)
+ ? ((t.flags = (-65537 & e) | 128), t)
+ : null
+ );
+ case 5:
+ return oo(t), null;
+ case 13:
+ if (
+ (Ci(so),
+ null !== (e = t.memoizedState) && null !== e.dehydrated)
+ ) {
+ if (null === t.alternate) throw Error(a(340));
+ ha();
+ }
+ return 65536 & (e = t.flags)
+ ? ((t.flags = (-65537 & e) | 128), t)
+ : null;
+ case 19:
+ return Ci(so), null;
+ case 4:
+ return io(), null;
+ case 10:
+ return Sa(t.type._context), null;
+ case 22:
+ case 23:
+ return du(), null;
+ default:
+ return null;
+ }
+ }
+ (Bs = function (e, t) {
+ for (var n = t.child; null !== n; ) {
+ if (5 === n.tag || 6 === n.tag) e.appendChild(n.stateNode);
+ else if (4 !== n.tag && null !== n.child) {
+ (n.child.return = n), (n = n.child);
+ continue;
+ }
+ if (n === t) break;
+ for (; null === n.sibling; ) {
+ if (null === n.return || n.return === t) return;
+ n = n.return;
+ }
+ (n.sibling.return = n.return), (n = n.sibling);
+ }
+ }),
+ (Ps = function () {}),
+ (Ls = function (e, t, n, r) {
+ var i = e.memoizedProps;
+ if (i !== r) {
+ (e = t.stateNode), no($a.current);
+ var a,
+ o = null;
+ switch (n) {
+ case "input":
+ (i = Y(e, i)), (r = Y(e, r)), (o = []);
+ break;
+ case "select":
+ (i = F({}, i, { value: void 0 })),
+ (r = F({}, r, { value: void 0 })),
+ (o = []);
+ break;
+ case "textarea":
+ (i = re(e, i)), (r = re(e, r)), (o = []);
+ break;
+ default:
+ "function" !== typeof i.onClick &&
+ "function" === typeof r.onClick &&
+ (e.onclick = $r);
+ }
+ for (c in (Ae(n, r), (n = null), i))
+ if (!r.hasOwnProperty(c) && i.hasOwnProperty(c) && null != i[c])
+ if ("style" === c) {
+ var l = i[c];
+ for (a in l)
+ l.hasOwnProperty(a) && (n || (n = {}), (n[a] = ""));
+ } else
+ "dangerouslySetInnerHTML" !== c &&
+ "children" !== c &&
+ "suppressContentEditableWarning" !== c &&
+ "suppressHydrationWarning" !== c &&
+ "autoFocus" !== c &&
+ (s.hasOwnProperty(c)
+ ? o || (o = [])
+ : (o = o || []).push(c, null));
+ for (c in r) {
+ var u = r[c];
+ if (
+ ((l = null != i ? i[c] : void 0),
+ r.hasOwnProperty(c) && u !== l && (null != u || null != l))
+ )
+ if ("style" === c)
+ if (l) {
+ for (a in l)
+ !l.hasOwnProperty(a) ||
+ (u && u.hasOwnProperty(a)) ||
+ (n || (n = {}), (n[a] = ""));
+ for (a in u)
+ u.hasOwnProperty(a) &&
+ l[a] !== u[a] &&
+ (n || (n = {}), (n[a] = u[a]));
+ } else n || (o || (o = []), o.push(c, n)), (n = u);
+ else
+ "dangerouslySetInnerHTML" === c
+ ? ((u = u ? u.__html : void 0),
+ (l = l ? l.__html : void 0),
+ null != u && l !== u && (o = o || []).push(c, u))
+ : "children" === c
+ ? ("string" !== typeof u && "number" !== typeof u) ||
+ (o = o || []).push(c, "" + u)
+ : "suppressContentEditableWarning" !== c &&
+ "suppressHydrationWarning" !== c &&
+ (s.hasOwnProperty(c)
+ ? (null != u && "onScroll" === c && Nr("scroll", e),
+ o || l === u || (o = []))
+ : (o = o || []).push(c, u));
+ }
+ n && (o = o || []).push("style", n);
+ var c = o;
+ (t.updateQueue = c) && (t.flags |= 4);
+ }
+ }),
+ (Ds = function (e, t, n, r) {
+ n !== r && (t.flags |= 4);
+ });
+ var qs = !1,
+ Js = !1,
+ Ks = "function" === typeof WeakSet ? WeakSet : Set,
+ $s = null;
+ function el(e, t) {
+ var n = e.ref;
+ if (null !== n)
+ if ("function" === typeof n)
+ try {
+ n(null);
+ } catch (r) {
+ Cu(e, t, r);
+ }
+ else n.current = null;
+ }
+ function tl(e, t, n) {
+ try {
+ n();
+ } catch (r) {
+ Cu(e, t, r);
+ }
+ }
+ var nl = !1;
+ function rl(e, t, n) {
+ var r = t.updateQueue;
+ if (null !== (r = null !== r ? r.lastEffect : null)) {
+ var i = (r = r.next);
+ do {
+ if ((i.tag & e) === e) {
+ var a = i.destroy;
+ (i.destroy = void 0), void 0 !== a && tl(t, n, a);
+ }
+ i = i.next;
+ } while (i !== r);
+ }
+ }
+ function il(e, t) {
+ if (
+ null !== (t = null !== (t = t.updateQueue) ? t.lastEffect : null)
+ ) {
+ var n = (t = t.next);
+ do {
+ if ((n.tag & e) === e) {
+ var r = n.create;
+ n.destroy = r();
+ }
+ n = n.next;
+ } while (n !== t);
+ }
+ }
+ function al(e) {
+ var t = e.ref;
+ if (null !== t) {
+ var n = e.stateNode;
+ e.tag, (e = n), "function" === typeof t ? t(e) : (t.current = e);
+ }
+ }
+ function ol(e) {
+ var t = e.alternate;
+ null !== t && ((e.alternate = null), ol(t)),
+ (e.child = null),
+ (e.deletions = null),
+ (e.sibling = null),
+ 5 === e.tag &&
+ null !== (t = e.stateNode) &&
+ (delete t[di],
+ delete t[hi],
+ delete t[vi],
+ delete t[mi],
+ delete t[gi]),
+ (e.stateNode = null),
+ (e.return = null),
+ (e.dependencies = null),
+ (e.memoizedProps = null),
+ (e.memoizedState = null),
+ (e.pendingProps = null),
+ (e.stateNode = null),
+ (e.updateQueue = null);
+ }
+ function sl(e) {
+ return 5 === e.tag || 3 === e.tag || 4 === e.tag;
+ }
+ function ll(e) {
+ e: for (;;) {
+ for (; null === e.sibling; ) {
+ if (null === e.return || sl(e.return)) return null;
+ e = e.return;
+ }
+ for (
+ e.sibling.return = e.return, e = e.sibling;
+ 5 !== e.tag && 6 !== e.tag && 18 !== e.tag;
+
+ ) {
+ if (2 & e.flags) continue e;
+ if (null === e.child || 4 === e.tag) continue e;
+ (e.child.return = e), (e = e.child);
+ }
+ if (!(2 & e.flags)) return e.stateNode;
+ }
+ }
+ function ul(e, t, n) {
+ var r = e.tag;
+ if (5 === r || 6 === r)
+ (e = e.stateNode),
+ t
+ ? 8 === n.nodeType
+ ? n.parentNode.insertBefore(e, t)
+ : n.insertBefore(e, t)
+ : (8 === n.nodeType
+ ? (t = n.parentNode).insertBefore(e, n)
+ : (t = n).appendChild(e),
+ (null !== (n = n._reactRootContainer) && void 0 !== n) ||
+ null !== t.onclick ||
+ (t.onclick = $r));
+ else if (4 !== r && null !== (e = e.child))
+ for (ul(e, t, n), e = e.sibling; null !== e; )
+ ul(e, t, n), (e = e.sibling);
+ }
+ function cl(e, t, n) {
+ var r = e.tag;
+ if (5 === r || 6 === r)
+ (e = e.stateNode), t ? n.insertBefore(e, t) : n.appendChild(e);
+ else if (4 !== r && null !== (e = e.child))
+ for (cl(e, t, n), e = e.sibling; null !== e; )
+ cl(e, t, n), (e = e.sibling);
+ }
+ var fl = null,
+ dl = !1;
+ function hl(e, t, n) {
+ for (n = n.child; null !== n; ) pl(e, t, n), (n = n.sibling);
+ }
+ function pl(e, t, n) {
+ if (at && "function" === typeof at.onCommitFiberUnmount)
+ try {
+ at.onCommitFiberUnmount(it, n);
+ } catch (s) {}
+ switch (n.tag) {
+ case 5:
+ Js || el(n, t);
+ case 6:
+ var r = fl,
+ i = dl;
+ (fl = null),
+ hl(e, t, n),
+ (dl = i),
+ null !== (fl = r) &&
+ (dl
+ ? ((e = fl),
+ (n = n.stateNode),
+ 8 === e.nodeType
+ ? e.parentNode.removeChild(n)
+ : e.removeChild(n))
+ : fl.removeChild(n.stateNode));
+ break;
+ case 18:
+ null !== fl &&
+ (dl
+ ? ((e = fl),
+ (n = n.stateNode),
+ 8 === e.nodeType
+ ? li(e.parentNode, n)
+ : 1 === e.nodeType && li(e, n),
+ zt(e))
+ : li(fl, n.stateNode));
+ break;
+ case 4:
+ (r = fl),
+ (i = dl),
+ (fl = n.stateNode.containerInfo),
+ (dl = !0),
+ hl(e, t, n),
+ (fl = r),
+ (dl = i);
+ break;
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ if (
+ !Js &&
+ null !== (r = n.updateQueue) &&
+ null !== (r = r.lastEffect)
+ ) {
+ i = r = r.next;
+ do {
+ var a = i,
+ o = a.destroy;
+ (a = a.tag),
+ void 0 !== o &&
+ (0 !== (2 & a) || 0 !== (4 & a)) &&
+ tl(n, t, o),
+ (i = i.next);
+ } while (i !== r);
+ }
+ hl(e, t, n);
+ break;
+ case 1:
+ if (
+ !Js &&
+ (el(n, t),
+ "function" === typeof (r = n.stateNode).componentWillUnmount)
+ )
+ try {
+ (r.props = n.memoizedProps),
+ (r.state = n.memoizedState),
+ r.componentWillUnmount();
+ } catch (s) {
+ Cu(n, t, s);
+ }
+ hl(e, t, n);
+ break;
+ case 21:
+ hl(e, t, n);
+ break;
+ case 22:
+ 1 & n.mode
+ ? ((Js = (r = Js) || null !== n.memoizedState),
+ hl(e, t, n),
+ (Js = r))
+ : hl(e, t, n);
+ break;
+ default:
+ hl(e, t, n);
+ }
+ }
+ function vl(e) {
+ var t = e.updateQueue;
+ if (null !== t) {
+ e.updateQueue = null;
+ var n = e.stateNode;
+ null === n && (n = e.stateNode = new Ks()),
+ t.forEach(function (t) {
+ var r = Iu.bind(null, e, t);
+ n.has(t) || (n.add(t), t.then(r, r));
+ });
+ }
+ }
+ function ml(e, t) {
+ var n = t.deletions;
+ if (null !== n)
+ for (var r = 0; r < n.length; r++) {
+ var i = n[r];
+ try {
+ var o = e,
+ s = t,
+ l = s;
+ e: for (; null !== l; ) {
+ switch (l.tag) {
+ case 5:
+ (fl = l.stateNode), (dl = !1);
+ break e;
+ case 3:
+ case 4:
+ (fl = l.stateNode.containerInfo), (dl = !0);
+ break e;
+ }
+ l = l.return;
+ }
+ if (null === fl) throw Error(a(160));
+ pl(o, s, i), (fl = null), (dl = !1);
+ var u = i.alternate;
+ null !== u && (u.return = null), (i.return = null);
+ } catch (c) {
+ Cu(i, t, c);
+ }
+ }
+ if (12854 & t.subtreeFlags)
+ for (t = t.child; null !== t; ) gl(t, e), (t = t.sibling);
+ }
+ function gl(e, t) {
+ var n = e.alternate,
+ r = e.flags;
+ switch (e.tag) {
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ if ((ml(t, e), Al(e), 4 & r)) {
+ try {
+ rl(3, e, e.return), il(3, e);
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ try {
+ rl(5, e, e.return);
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ }
+ break;
+ case 1:
+ ml(t, e), Al(e), 512 & r && null !== n && el(n, n.return);
+ break;
+ case 5:
+ if (
+ (ml(t, e),
+ Al(e),
+ 512 & r && null !== n && el(n, n.return),
+ 32 & e.flags)
+ ) {
+ var i = e.stateNode;
+ try {
+ de(i, "");
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ }
+ if (4 & r && null != (i = e.stateNode)) {
+ var o = e.memoizedProps,
+ s = null !== n ? n.memoizedProps : o,
+ l = e.type,
+ u = e.updateQueue;
+ if (((e.updateQueue = null), null !== u))
+ try {
+ "input" === l &&
+ "radio" === o.type &&
+ null != o.name &&
+ J(i, o),
+ ye(l, s);
+ var c = ye(l, o);
+ for (s = 0; s < u.length; s += 2) {
+ var f = u[s],
+ d = u[s + 1];
+ "style" === f
+ ? me(i, d)
+ : "dangerouslySetInnerHTML" === f
+ ? fe(i, d)
+ : "children" === f
+ ? de(i, d)
+ : y(i, f, d, c);
+ }
+ switch (l) {
+ case "input":
+ K(i, o);
+ break;
+ case "textarea":
+ ae(i, o);
+ break;
+ case "select":
+ var h = i._wrapperState.wasMultiple;
+ i._wrapperState.wasMultiple = !!o.multiple;
+ var p = o.value;
+ null != p
+ ? ne(i, !!o.multiple, p, !1)
+ : h !== !!o.multiple &&
+ (null != o.defaultValue
+ ? ne(i, !!o.multiple, o.defaultValue, !0)
+ : ne(i, !!o.multiple, o.multiple ? [] : "", !1));
+ }
+ i[hi] = o;
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ }
+ break;
+ case 6:
+ if ((ml(t, e), Al(e), 4 & r)) {
+ if (null === e.stateNode) throw Error(a(162));
+ (i = e.stateNode), (o = e.memoizedProps);
+ try {
+ i.nodeValue = o;
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ }
+ break;
+ case 3:
+ if (
+ (ml(t, e),
+ Al(e),
+ 4 & r && null !== n && n.memoizedState.isDehydrated)
+ )
+ try {
+ zt(t.containerInfo);
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ break;
+ case 4:
+ default:
+ ml(t, e), Al(e);
+ break;
+ case 13:
+ ml(t, e),
+ Al(e),
+ 8192 & (i = e.child).flags &&
+ ((o = null !== i.memoizedState),
+ (i.stateNode.isHidden = o),
+ !o ||
+ (null !== i.alternate &&
+ null !== i.alternate.memoizedState) ||
+ (zl = Je())),
+ 4 & r && vl(e);
+ break;
+ case 22:
+ if (
+ ((f = null !== n && null !== n.memoizedState),
+ 1 & e.mode
+ ? ((Js = (c = Js) || f), ml(t, e), (Js = c))
+ : ml(t, e),
+ Al(e),
+ 8192 & r)
+ ) {
+ if (
+ ((c = null !== e.memoizedState),
+ (e.stateNode.isHidden = c) && !f && 0 !== (1 & e.mode))
+ )
+ for ($s = e, f = e.child; null !== f; ) {
+ for (d = $s = f; null !== $s; ) {
+ switch (((p = (h = $s).child), h.tag)) {
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ rl(4, h, h.return);
+ break;
+ case 1:
+ el(h, h.return);
+ var v = h.stateNode;
+ if ("function" === typeof v.componentWillUnmount) {
+ (r = h), (n = h.return);
+ try {
+ (t = r),
+ (v.props = t.memoizedProps),
+ (v.state = t.memoizedState),
+ v.componentWillUnmount();
+ } catch (m) {
+ Cu(r, n, m);
+ }
+ }
+ break;
+ case 5:
+ el(h, h.return);
+ break;
+ case 22:
+ if (null !== h.memoizedState) {
+ Sl(d);
+ continue;
+ }
+ }
+ null !== p ? ((p.return = h), ($s = p)) : Sl(d);
+ }
+ f = f.sibling;
+ }
+ e: for (f = null, d = e; ; ) {
+ if (5 === d.tag) {
+ if (null === f) {
+ f = d;
+ try {
+ (i = d.stateNode),
+ c
+ ? "function" === typeof (o = i.style).setProperty
+ ? o.setProperty("display", "none", "important")
+ : (o.display = "none")
+ : ((l = d.stateNode),
+ (s =
+ void 0 !== (u = d.memoizedProps.style) &&
+ null !== u &&
+ u.hasOwnProperty("display")
+ ? u.display
+ : null),
+ (l.style.display = ve("display", s)));
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ }
+ } else if (6 === d.tag) {
+ if (null === f)
+ try {
+ d.stateNode.nodeValue = c ? "" : d.memoizedProps;
+ } catch (m) {
+ Cu(e, e.return, m);
+ }
+ } else if (
+ ((22 !== d.tag && 23 !== d.tag) ||
+ null === d.memoizedState ||
+ d === e) &&
+ null !== d.child
+ ) {
+ (d.child.return = d), (d = d.child);
+ continue;
+ }
+ if (d === e) break e;
+ for (; null === d.sibling; ) {
+ if (null === d.return || d.return === e) break e;
+ f === d && (f = null), (d = d.return);
+ }
+ f === d && (f = null),
+ (d.sibling.return = d.return),
+ (d = d.sibling);
+ }
+ }
+ break;
+ case 19:
+ ml(t, e), Al(e), 4 & r && vl(e);
+ case 21:
+ }
+ }
+ function Al(e) {
+ var t = e.flags;
+ if (2 & t) {
+ try {
+ e: {
+ for (var n = e.return; null !== n; ) {
+ if (sl(n)) {
+ var r = n;
+ break e;
+ }
+ n = n.return;
+ }
+ throw Error(a(160));
+ }
+ switch (r.tag) {
+ case 5:
+ var i = r.stateNode;
+ 32 & r.flags && (de(i, ""), (r.flags &= -33)),
+ cl(e, ll(e), i);
+ break;
+ case 3:
+ case 4:
+ var o = r.stateNode.containerInfo;
+ ul(e, ll(e), o);
+ break;
+ default:
+ throw Error(a(161));
+ }
+ } catch (s) {
+ Cu(e, e.return, s);
+ }
+ e.flags &= -3;
+ }
+ 4096 & t && (e.flags &= -4097);
+ }
+ function yl(e, t, n) {
+ ($s = e), bl(e, t, n);
+ }
+ function bl(e, t, n) {
+ for (var r = 0 !== (1 & e.mode); null !== $s; ) {
+ var i = $s,
+ a = i.child;
+ if (22 === i.tag && r) {
+ var o = null !== i.memoizedState || qs;
+ if (!o) {
+ var s = i.alternate,
+ l = (null !== s && null !== s.memoizedState) || Js;
+ s = qs;
+ var u = Js;
+ if (((qs = o), (Js = l) && !u))
+ for ($s = i; null !== $s; )
+ (l = (o = $s).child),
+ 22 === o.tag && null !== o.memoizedState
+ ? El(i)
+ : null !== l
+ ? ((l.return = o), ($s = l))
+ : El(i);
+ for (; null !== a; ) ($s = a), bl(a, t, n), (a = a.sibling);
+ ($s = i), (qs = s), (Js = u);
+ }
+ xl(e);
+ } else
+ 0 !== (8772 & i.subtreeFlags) && null !== a
+ ? ((a.return = i), ($s = a))
+ : xl(e);
+ }
+ }
+ function xl(e) {
+ for (; null !== $s; ) {
+ var t = $s;
+ if (0 !== (8772 & t.flags)) {
+ var n = t.alternate;
+ try {
+ if (0 !== (8772 & t.flags))
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 15:
+ Js || il(5, t);
+ break;
+ case 1:
+ var r = t.stateNode;
+ if (4 & t.flags && !Js)
+ if (null === n) r.componentDidMount();
+ else {
+ var i =
+ t.elementType === t.type
+ ? n.memoizedProps
+ : ma(t.type, n.memoizedProps);
+ r.componentDidUpdate(
+ i,
+ n.memoizedState,
+ r.__reactInternalSnapshotBeforeUpdate
+ );
+ }
+ var o = t.updateQueue;
+ null !== o && Oa(t, o, r);
+ break;
+ case 3:
+ var s = t.updateQueue;
+ if (null !== s) {
+ if (((n = null), null !== t.child))
+ switch (t.child.tag) {
+ case 5:
+ case 1:
+ n = t.child.stateNode;
+ }
+ Oa(t, s, n);
+ }
+ break;
+ case 5:
+ var l = t.stateNode;
+ if (null === n && 4 & t.flags) {
+ n = l;
+ var u = t.memoizedProps;
+ switch (t.type) {
+ case "button":
+ case "input":
+ case "select":
+ case "textarea":
+ u.autoFocus && n.focus();
+ break;
+ case "img":
+ u.src && (n.src = u.src);
+ }
+ }
+ break;
+ case 6:
+ case 4:
+ case 12:
+ case 19:
+ case 17:
+ case 21:
+ case 22:
+ case 23:
+ case 25:
+ break;
+ case 13:
+ if (null === t.memoizedState) {
+ var c = t.alternate;
+ if (null !== c) {
+ var f = c.memoizedState;
+ if (null !== f) {
+ var d = f.dehydrated;
+ null !== d && zt(d);
+ }
+ }
+ }
+ break;
+ default:
+ throw Error(a(163));
+ }
+ Js || (512 & t.flags && al(t));
+ } catch (h) {
+ Cu(t, t.return, h);
+ }
+ }
+ if (t === e) {
+ $s = null;
+ break;
+ }
+ if (null !== (n = t.sibling)) {
+ (n.return = t.return), ($s = n);
+ break;
+ }
+ $s = t.return;
+ }
+ }
+ function Sl(e) {
+ for (; null !== $s; ) {
+ var t = $s;
+ if (t === e) {
+ $s = null;
+ break;
+ }
+ var n = t.sibling;
+ if (null !== n) {
+ (n.return = t.return), ($s = n);
+ break;
+ }
+ $s = t.return;
+ }
+ }
+ function El(e) {
+ for (; null !== $s; ) {
+ var t = $s;
+ try {
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 15:
+ var n = t.return;
+ try {
+ il(4, t);
+ } catch (l) {
+ Cu(t, n, l);
+ }
+ break;
+ case 1:
+ var r = t.stateNode;
+ if ("function" === typeof r.componentDidMount) {
+ var i = t.return;
+ try {
+ r.componentDidMount();
+ } catch (l) {
+ Cu(t, i, l);
+ }
+ }
+ var a = t.return;
+ try {
+ al(t);
+ } catch (l) {
+ Cu(t, a, l);
+ }
+ break;
+ case 5:
+ var o = t.return;
+ try {
+ al(t);
+ } catch (l) {
+ Cu(t, o, l);
+ }
+ }
+ } catch (l) {
+ Cu(t, t.return, l);
+ }
+ if (t === e) {
+ $s = null;
+ break;
+ }
+ var s = t.sibling;
+ if (null !== s) {
+ (s.return = t.return), ($s = s);
+ break;
+ }
+ $s = t.return;
+ }
+ }
+ var _l,
+ Cl = Math.ceil,
+ wl = b.ReactCurrentDispatcher,
+ Tl = b.ReactCurrentOwner,
+ Ml = b.ReactCurrentBatchConfig,
+ Il = 0,
+ kl = null,
+ Rl = null,
+ Bl = 0,
+ Pl = 0,
+ Ll = _i(0),
+ Dl = 0,
+ Ul = null,
+ Fl = 0,
+ Ol = 0,
+ Nl = 0,
+ Gl = null,
+ Zl = null,
+ zl = 0,
+ Ql = 1 / 0,
+ Hl = null,
+ Vl = !1,
+ jl = null,
+ Wl = null,
+ Xl = !1,
+ Yl = null,
+ ql = 0,
+ Jl = 0,
+ Kl = null,
+ $l = -1,
+ eu = 0;
+ function tu() {
+ return 0 !== (6 & Il) ? Je() : -1 !== $l ? $l : ($l = Je());
+ }
+ function nu(e) {
+ return 0 === (1 & e.mode)
+ ? 1
+ : 0 !== (2 & Il) && 0 !== Bl
+ ? Bl & -Bl
+ : null !== va.transition
+ ? (0 === eu && (eu = vt()), eu)
+ : 0 !== (e = yt)
+ ? e
+ : (e = void 0 === (e = window.event) ? 16 : qt(e.type));
+ }
+ function ru(e, t, n, r) {
+ if (50 < Jl) throw ((Jl = 0), (Kl = null), Error(a(185)));
+ gt(e, n, r),
+ (0 !== (2 & Il) && e === kl) ||
+ (e === kl && (0 === (2 & Il) && (Ol |= n), 4 === Dl && lu(e, Bl)),
+ iu(e, r),
+ 1 === n &&
+ 0 === Il &&
+ 0 === (1 & t.mode) &&
+ ((Ql = Je() + 500), Ni && zi()));
+ }
+ function iu(e, t) {
+ var n = e.callbackNode;
+ !(function (e, t) {
+ for (
+ var n = e.suspendedLanes,
+ r = e.pingedLanes,
+ i = e.expirationTimes,
+ a = e.pendingLanes;
+ 0 < a;
+
+ ) {
+ var o = 31 - ot(a),
+ s = 1 << o,
+ l = i[o];
+ -1 === l
+ ? (0 !== (s & n) && 0 === (s & r)) || (i[o] = ht(s, t))
+ : l <= t && (e.expiredLanes |= s),
+ (a &= ~s);
+ }
+ })(e, t);
+ var r = dt(e, e === kl ? Bl : 0);
+ if (0 === r)
+ null !== n && Xe(n),
+ (e.callbackNode = null),
+ (e.callbackPriority = 0);
+ else if (((t = r & -r), e.callbackPriority !== t)) {
+ if ((null != n && Xe(n), 1 === t))
+ 0 === e.tag
+ ? (function (e) {
+ (Ni = !0), Zi(e);
+ })(uu.bind(null, e))
+ : Zi(uu.bind(null, e)),
+ oi(function () {
+ 0 === (6 & Il) && zi();
+ }),
+ (n = null);
+ else {
+ switch (bt(r)) {
+ case 1:
+ n = $e;
+ break;
+ case 4:
+ n = et;
+ break;
+ case 16:
+ default:
+ n = tt;
+ break;
+ case 536870912:
+ n = rt;
+ }
+ n = ku(n, au.bind(null, e));
+ }
+ (e.callbackPriority = t), (e.callbackNode = n);
+ }
+ }
+ function au(e, t) {
+ if ((($l = -1), (eu = 0), 0 !== (6 & Il))) throw Error(a(327));
+ var n = e.callbackNode;
+ if (Eu() && e.callbackNode !== n) return null;
+ var r = dt(e, e === kl ? Bl : 0);
+ if (0 === r) return null;
+ if (0 !== (30 & r) || 0 !== (r & e.expiredLanes) || t) t = gu(e, r);
+ else {
+ t = r;
+ var i = Il;
+ Il |= 2;
+ var o = vu();
+ for (
+ (kl === e && Bl === t) ||
+ ((Hl = null), (Ql = Je() + 500), hu(e, t));
+ ;
+
+ )
+ try {
+ yu();
+ break;
+ } catch (l) {
+ pu(e, l);
+ }
+ xa(),
+ (wl.current = o),
+ (Il = i),
+ null !== Rl ? (t = 0) : ((kl = null), (Bl = 0), (t = Dl));
+ }
+ if (0 !== t) {
+ if (
+ (2 === t && 0 !== (i = pt(e)) && ((r = i), (t = ou(e, i))),
+ 1 === t)
+ )
+ throw ((n = Ul), hu(e, 0), lu(e, r), iu(e, Je()), n);
+ if (6 === t) lu(e, r);
+ else {
+ if (
+ ((i = e.current.alternate),
+ 0 === (30 & r) &&
+ !(function (e) {
+ for (var t = e; ; ) {
+ if (16384 & t.flags) {
+ var n = t.updateQueue;
+ if (null !== n && null !== (n = n.stores))
+ for (var r = 0; r < n.length; r++) {
+ var i = n[r],
+ a = i.getSnapshot;
+ i = i.value;
+ try {
+ if (!sr(a(), i)) return !1;
+ } catch (s) {
+ return !1;
+ }
+ }
+ }
+ if (((n = t.child), 16384 & t.subtreeFlags && null !== n))
+ (n.return = t), (t = n);
+ else {
+ if (t === e) break;
+ for (; null === t.sibling; ) {
+ if (null === t.return || t.return === e) return !0;
+ t = t.return;
+ }
+ (t.sibling.return = t.return), (t = t.sibling);
+ }
+ }
+ return !0;
+ })(i) &&
+ (2 === (t = gu(e, r)) &&
+ 0 !== (o = pt(e)) &&
+ ((r = o), (t = ou(e, o))),
+ 1 === t))
+ )
+ throw ((n = Ul), hu(e, 0), lu(e, r), iu(e, Je()), n);
+ switch (((e.finishedWork = i), (e.finishedLanes = r), t)) {
+ case 0:
+ case 1:
+ throw Error(a(345));
+ case 2:
+ case 5:
+ Su(e, Zl, Hl);
+ break;
+ case 3:
+ if (
+ (lu(e, r),
+ (130023424 & r) === r && 10 < (t = zl + 500 - Je()))
+ ) {
+ if (0 !== dt(e, 0)) break;
+ if (((i = e.suspendedLanes) & r) !== r) {
+ tu(), (e.pingedLanes |= e.suspendedLanes & i);
+ break;
+ }
+ e.timeoutHandle = ri(Su.bind(null, e, Zl, Hl), t);
+ break;
+ }
+ Su(e, Zl, Hl);
+ break;
+ case 4:
+ if ((lu(e, r), (4194240 & r) === r)) break;
+ for (t = e.eventTimes, i = -1; 0 < r; ) {
+ var s = 31 - ot(r);
+ (o = 1 << s), (s = t[s]) > i && (i = s), (r &= ~o);
+ }
+ if (
+ ((r = i),
+ 10 <
+ (r =
+ (120 > (r = Je() - r)
+ ? 120
+ : 480 > r
+ ? 480
+ : 1080 > r
+ ? 1080
+ : 1920 > r
+ ? 1920
+ : 3e3 > r
+ ? 3e3
+ : 4320 > r
+ ? 4320
+ : 1960 * Cl(r / 1960)) - r))
+ ) {
+ e.timeoutHandle = ri(Su.bind(null, e, Zl, Hl), r);
+ break;
+ }
+ Su(e, Zl, Hl);
+ break;
+ default:
+ throw Error(a(329));
+ }
+ }
+ }
+ return iu(e, Je()), e.callbackNode === n ? au.bind(null, e) : null;
+ }
+ function ou(e, t) {
+ var n = Gl;
+ return (
+ e.current.memoizedState.isDehydrated && (hu(e, t).flags |= 256),
+ 2 !== (e = gu(e, t)) && ((t = Zl), (Zl = n), null !== t && su(t)),
+ e
+ );
+ }
+ function su(e) {
+ null === Zl ? (Zl = e) : Zl.push.apply(Zl, e);
+ }
+ function lu(e, t) {
+ for (
+ t &= ~Nl,
+ t &= ~Ol,
+ e.suspendedLanes |= t,
+ e.pingedLanes &= ~t,
+ e = e.expirationTimes;
+ 0 < t;
+
+ ) {
+ var n = 31 - ot(t),
+ r = 1 << n;
+ (e[n] = -1), (t &= ~r);
+ }
+ }
+ function uu(e) {
+ if (0 !== (6 & Il)) throw Error(a(327));
+ Eu();
+ var t = dt(e, 0);
+ if (0 === (1 & t)) return iu(e, Je()), null;
+ var n = gu(e, t);
+ if (0 !== e.tag && 2 === n) {
+ var r = pt(e);
+ 0 !== r && ((t = r), (n = ou(e, r)));
+ }
+ if (1 === n) throw ((n = Ul), hu(e, 0), lu(e, t), iu(e, Je()), n);
+ if (6 === n) throw Error(a(345));
+ return (
+ (e.finishedWork = e.current.alternate),
+ (e.finishedLanes = t),
+ Su(e, Zl, Hl),
+ iu(e, Je()),
+ null
+ );
+ }
+ function cu(e, t) {
+ var n = Il;
+ Il |= 1;
+ try {
+ return e(t);
+ } finally {
+ 0 === (Il = n) && ((Ql = Je() + 500), Ni && zi());
+ }
+ }
+ function fu(e) {
+ null !== Yl && 0 === Yl.tag && 0 === (6 & Il) && Eu();
+ var t = Il;
+ Il |= 1;
+ var n = Ml.transition,
+ r = yt;
+ try {
+ if (((Ml.transition = null), (yt = 1), e)) return e();
+ } finally {
+ (yt = r), (Ml.transition = n), 0 === (6 & (Il = t)) && zi();
+ }
+ }
+ function du() {
+ (Pl = Ll.current), Ci(Ll);
+ }
+ function hu(e, t) {
+ (e.finishedWork = null), (e.finishedLanes = 0);
+ var n = e.timeoutHandle;
+ if ((-1 !== n && ((e.timeoutHandle = -1), ii(n)), null !== Rl))
+ for (n = Rl.return; null !== n; ) {
+ var r = n;
+ switch ((ta(r), r.tag)) {
+ case 1:
+ null !== (r = r.type.childContextTypes) &&
+ void 0 !== r &&
+ Pi();
+ break;
+ case 3:
+ io(), Ci(Ii), Ci(Mi), co();
+ break;
+ case 5:
+ oo(r);
+ break;
+ case 4:
+ io();
+ break;
+ case 13:
+ case 19:
+ Ci(so);
+ break;
+ case 10:
+ Sa(r.type._context);
+ break;
+ case 22:
+ case 23:
+ du();
+ }
+ n = n.return;
+ }
+ if (
+ ((kl = e),
+ (Rl = e = Lu(e.current, null)),
+ (Bl = Pl = t),
+ (Dl = 0),
+ (Ul = null),
+ (Nl = Ol = Fl = 0),
+ (Zl = Gl = null),
+ null !== wa)
+ ) {
+ for (t = 0; t < wa.length; t++)
+ if (null !== (r = (n = wa[t]).interleaved)) {
+ n.interleaved = null;
+ var i = r.next,
+ a = n.pending;
+ if (null !== a) {
+ var o = a.next;
+ (a.next = i), (r.next = o);
+ }
+ n.pending = r;
+ }
+ wa = null;
+ }
+ return e;
+ }
+ function pu(e, t) {
+ for (;;) {
+ var n = Rl;
+ try {
+ if ((xa(), (fo.current = os), Ao)) {
+ for (var r = vo.memoizedState; null !== r; ) {
+ var i = r.queue;
+ null !== i && (i.pending = null), (r = r.next);
+ }
+ Ao = !1;
+ }
+ if (
+ ((po = 0),
+ (go = mo = vo = null),
+ (yo = !1),
+ (bo = 0),
+ (Tl.current = null),
+ null === n || null === n.return)
+ ) {
+ (Dl = 1), (Ul = t), (Rl = null);
+ break;
+ }
+ e: {
+ var o = e,
+ s = n.return,
+ l = n,
+ u = t;
+ if (
+ ((t = Bl),
+ (l.flags |= 32768),
+ null !== u &&
+ "object" === typeof u &&
+ "function" === typeof u.then)
+ ) {
+ var c = u,
+ f = l,
+ d = f.tag;
+ if (0 === (1 & f.mode) && (0 === d || 11 === d || 15 === d)) {
+ var h = f.alternate;
+ h
+ ? ((f.updateQueue = h.updateQueue),
+ (f.memoizedState = h.memoizedState),
+ (f.lanes = h.lanes))
+ : ((f.updateQueue = null), (f.memoizedState = null));
+ }
+ var p = gs(s);
+ if (null !== p) {
+ (p.flags &= -257),
+ As(p, s, l, 0, t),
+ 1 & p.mode && ms(o, c, t),
+ (u = c);
+ var v = (t = p).updateQueue;
+ if (null === v) {
+ var m = new Set();
+ m.add(u), (t.updateQueue = m);
+ } else v.add(u);
+ break e;
+ }
+ if (0 === (1 & t)) {
+ ms(o, c, t), mu();
+ break e;
+ }
+ u = Error(a(426));
+ } else if (ia && 1 & l.mode) {
+ var g = gs(s);
+ if (null !== g) {
+ 0 === (65536 & g.flags) && (g.flags |= 256),
+ As(g, s, l, 0, t),
+ pa(cs(u, l));
+ break e;
+ }
+ }
+ (o = u = cs(u, l)),
+ 4 !== Dl && (Dl = 2),
+ null === Gl ? (Gl = [o]) : Gl.push(o),
+ (o = s);
+ do {
+ switch (o.tag) {
+ case 3:
+ (o.flags |= 65536),
+ (t &= -t),
+ (o.lanes |= t),
+ Ua(o, ps(0, u, t));
+ break e;
+ case 1:
+ l = u;
+ var A = o.type,
+ y = o.stateNode;
+ if (
+ 0 === (128 & o.flags) &&
+ ("function" === typeof A.getDerivedStateFromError ||
+ (null !== y &&
+ "function" === typeof y.componentDidCatch &&
+ (null === Wl || !Wl.has(y))))
+ ) {
+ (o.flags |= 65536),
+ (t &= -t),
+ (o.lanes |= t),
+ Ua(o, vs(o, l, t));
+ break e;
+ }
+ }
+ o = o.return;
+ } while (null !== o);
+ }
+ xu(n);
+ } catch (b) {
+ (t = b), Rl === n && null !== n && (Rl = n = n.return);
+ continue;
+ }
+ break;
+ }
+ }
+ function vu() {
+ var e = wl.current;
+ return (wl.current = os), null === e ? os : e;
+ }
+ function mu() {
+ (0 !== Dl && 3 !== Dl && 2 !== Dl) || (Dl = 4),
+ null === kl ||
+ (0 === (268435455 & Fl) && 0 === (268435455 & Ol)) ||
+ lu(kl, Bl);
+ }
+ function gu(e, t) {
+ var n = Il;
+ Il |= 2;
+ var r = vu();
+ for ((kl === e && Bl === t) || ((Hl = null), hu(e, t)); ; )
+ try {
+ Au();
+ break;
+ } catch (i) {
+ pu(e, i);
+ }
+ if ((xa(), (Il = n), (wl.current = r), null !== Rl))
+ throw Error(a(261));
+ return (kl = null), (Bl = 0), Dl;
+ }
+ function Au() {
+ for (; null !== Rl; ) bu(Rl);
+ }
+ function yu() {
+ for (; null !== Rl && !Ye(); ) bu(Rl);
+ }
+ function bu(e) {
+ var t = _l(e.alternate, e, Pl);
+ (e.memoizedProps = e.pendingProps),
+ null === t ? xu(e) : (Rl = t),
+ (Tl.current = null);
+ }
+ function xu(e) {
+ var t = e;
+ do {
+ var n = t.alternate;
+ if (((e = t.return), 0 === (32768 & t.flags))) {
+ if (null !== (n = Xs(n, t, Pl))) return void (Rl = n);
+ } else {
+ if (null !== (n = Ys(n, t)))
+ return (n.flags &= 32767), void (Rl = n);
+ if (null === e) return (Dl = 6), void (Rl = null);
+ (e.flags |= 32768), (e.subtreeFlags = 0), (e.deletions = null);
+ }
+ if (null !== (t = t.sibling)) return void (Rl = t);
+ Rl = t = e;
+ } while (null !== t);
+ 0 === Dl && (Dl = 5);
+ }
+ function Su(e, t, n) {
+ var r = yt,
+ i = Ml.transition;
+ try {
+ (Ml.transition = null),
+ (yt = 1),
+ (function (e, t, n, r) {
+ do {
+ Eu();
+ } while (null !== Yl);
+ if (0 !== (6 & Il)) throw Error(a(327));
+ n = e.finishedWork;
+ var i = e.finishedLanes;
+ if (null === n) return null;
+ if (
+ ((e.finishedWork = null),
+ (e.finishedLanes = 0),
+ n === e.current)
+ )
+ throw Error(a(177));
+ (e.callbackNode = null), (e.callbackPriority = 0);
+ var o = n.lanes | n.childLanes;
+ if (
+ ((function (e, t) {
+ var n = e.pendingLanes & ~t;
+ (e.pendingLanes = t),
+ (e.suspendedLanes = 0),
+ (e.pingedLanes = 0),
+ (e.expiredLanes &= t),
+ (e.mutableReadLanes &= t),
+ (e.entangledLanes &= t),
+ (t = e.entanglements);
+ var r = e.eventTimes;
+ for (e = e.expirationTimes; 0 < n; ) {
+ var i = 31 - ot(n),
+ a = 1 << i;
+ (t[i] = 0), (r[i] = -1), (e[i] = -1), (n &= ~a);
+ }
+ })(e, o),
+ e === kl && ((Rl = kl = null), (Bl = 0)),
+ (0 === (2064 & n.subtreeFlags) && 0 === (2064 & n.flags)) ||
+ Xl ||
+ ((Xl = !0),
+ ku(tt, function () {
+ return Eu(), null;
+ })),
+ (o = 0 !== (15990 & n.flags)),
+ 0 !== (15990 & n.subtreeFlags) || o)
+ ) {
+ (o = Ml.transition), (Ml.transition = null);
+ var s = yt;
+ yt = 1;
+ var l = Il;
+ (Il |= 4),
+ (Tl.current = null),
+ (function (e, t) {
+ if (((ei = Ht), hr((e = dr())))) {
+ if ("selectionStart" in e)
+ var n = {
+ start: e.selectionStart,
+ end: e.selectionEnd,
+ };
+ else
+ e: {
+ var r =
+ (n =
+ ((n = e.ownerDocument) && n.defaultView) ||
+ window).getSelection && n.getSelection();
+ if (r && 0 !== r.rangeCount) {
+ n = r.anchorNode;
+ var i = r.anchorOffset,
+ o = r.focusNode;
+ r = r.focusOffset;
+ try {
+ n.nodeType, o.nodeType;
+ } catch (x) {
+ n = null;
+ break e;
+ }
+ var s = 0,
+ l = -1,
+ u = -1,
+ c = 0,
+ f = 0,
+ d = e,
+ h = null;
+ t: for (;;) {
+ for (
+ var p;
+ d !== n ||
+ (0 !== i && 3 !== d.nodeType) ||
+ (l = s + i),
+ d !== o ||
+ (0 !== r && 3 !== d.nodeType) ||
+ (u = s + r),
+ 3 === d.nodeType &&
+ (s += d.nodeValue.length),
+ null !== (p = d.firstChild);
+
+ )
+ (h = d), (d = p);
+ for (;;) {
+ if (d === e) break t;
+ if (
+ (h === n && ++c === i && (l = s),
+ h === o && ++f === r && (u = s),
+ null !== (p = d.nextSibling))
+ )
+ break;
+ h = (d = h).parentNode;
+ }
+ d = p;
+ }
+ n =
+ -1 === l || -1 === u
+ ? null
+ : { start: l, end: u };
+ } else n = null;
+ }
+ n = n || { start: 0, end: 0 };
+ } else n = null;
+ for (
+ ti = { focusedElem: e, selectionRange: n },
+ Ht = !1,
+ $s = t;
+ null !== $s;
+
+ )
+ if (
+ ((e = (t = $s).child),
+ 0 !== (1028 & t.subtreeFlags) && null !== e)
+ )
+ (e.return = t), ($s = e);
+ else
+ for (; null !== $s; ) {
+ t = $s;
+ try {
+ var v = t.alternate;
+ if (0 !== (1024 & t.flags))
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 15:
+ case 5:
+ case 6:
+ case 4:
+ case 17:
+ break;
+ case 1:
+ if (null !== v) {
+ var m = v.memoizedProps,
+ g = v.memoizedState,
+ A = t.stateNode,
+ y = A.getSnapshotBeforeUpdate(
+ t.elementType === t.type
+ ? m
+ : ma(t.type, m),
+ g
+ );
+ A.__reactInternalSnapshotBeforeUpdate = y;
+ }
+ break;
+ case 3:
+ var b = t.stateNode.containerInfo;
+ 1 === b.nodeType
+ ? (b.textContent = "")
+ : 9 === b.nodeType &&
+ b.documentElement &&
+ b.removeChild(b.documentElement);
+ break;
+ default:
+ throw Error(a(163));
+ }
+ } catch (x) {
+ Cu(t, t.return, x);
+ }
+ if (null !== (e = t.sibling)) {
+ (e.return = t.return), ($s = e);
+ break;
+ }
+ $s = t.return;
+ }
+ (v = nl), (nl = !1);
+ })(e, n),
+ gl(n, e),
+ pr(ti),
+ (Ht = !!ei),
+ (ti = ei = null),
+ (e.current = n),
+ yl(n, e, i),
+ qe(),
+ (Il = l),
+ (yt = s),
+ (Ml.transition = o);
+ } else e.current = n;
+ if (
+ (Xl && ((Xl = !1), (Yl = e), (ql = i)),
+ (o = e.pendingLanes),
+ 0 === o && (Wl = null),
+ (function (e) {
+ if (at && "function" === typeof at.onCommitFiberRoot)
+ try {
+ at.onCommitFiberRoot(
+ it,
+ e,
+ void 0,
+ 128 === (128 & e.current.flags)
+ );
+ } catch (t) {}
+ })(n.stateNode),
+ iu(e, Je()),
+ null !== t)
+ )
+ for (r = e.onRecoverableError, n = 0; n < t.length; n++)
+ (i = t[n]),
+ r(i.value, { componentStack: i.stack, digest: i.digest });
+ if (Vl) throw ((Vl = !1), (e = jl), (jl = null), e);
+ 0 !== (1 & ql) && 0 !== e.tag && Eu(),
+ (o = e.pendingLanes),
+ 0 !== (1 & o)
+ ? e === Kl
+ ? Jl++
+ : ((Jl = 0), (Kl = e))
+ : (Jl = 0),
+ zi();
+ })(e, t, n, r);
+ } finally {
+ (Ml.transition = i), (yt = r);
+ }
+ return null;
+ }
+ function Eu() {
+ if (null !== Yl) {
+ var e = bt(ql),
+ t = Ml.transition,
+ n = yt;
+ try {
+ if (((Ml.transition = null), (yt = 16 > e ? 16 : e), null === Yl))
+ var r = !1;
+ else {
+ if (((e = Yl), (Yl = null), (ql = 0), 0 !== (6 & Il)))
+ throw Error(a(331));
+ var i = Il;
+ for (Il |= 4, $s = e.current; null !== $s; ) {
+ var o = $s,
+ s = o.child;
+ if (0 !== (16 & $s.flags)) {
+ var l = o.deletions;
+ if (null !== l) {
+ for (var u = 0; u < l.length; u++) {
+ var c = l[u];
+ for ($s = c; null !== $s; ) {
+ var f = $s;
+ switch (f.tag) {
+ case 0:
+ case 11:
+ case 15:
+ rl(8, f, o);
+ }
+ var d = f.child;
+ if (null !== d) (d.return = f), ($s = d);
+ else
+ for (; null !== $s; ) {
+ var h = (f = $s).sibling,
+ p = f.return;
+ if ((ol(f), f === c)) {
+ $s = null;
+ break;
+ }
+ if (null !== h) {
+ (h.return = p), ($s = h);
+ break;
+ }
+ $s = p;
+ }
+ }
+ }
+ var v = o.alternate;
+ if (null !== v) {
+ var m = v.child;
+ if (null !== m) {
+ v.child = null;
+ do {
+ var g = m.sibling;
+ (m.sibling = null), (m = g);
+ } while (null !== m);
+ }
+ }
+ $s = o;
+ }
+ }
+ if (0 !== (2064 & o.subtreeFlags) && null !== s)
+ (s.return = o), ($s = s);
+ else
+ e: for (; null !== $s; ) {
+ if (0 !== (2048 & (o = $s).flags))
+ switch (o.tag) {
+ case 0:
+ case 11:
+ case 15:
+ rl(9, o, o.return);
+ }
+ var A = o.sibling;
+ if (null !== A) {
+ (A.return = o.return), ($s = A);
+ break e;
+ }
+ $s = o.return;
+ }
+ }
+ var y = e.current;
+ for ($s = y; null !== $s; ) {
+ var b = (s = $s).child;
+ if (0 !== (2064 & s.subtreeFlags) && null !== b)
+ (b.return = s), ($s = b);
+ else
+ e: for (s = y; null !== $s; ) {
+ if (0 !== (2048 & (l = $s).flags))
+ try {
+ switch (l.tag) {
+ case 0:
+ case 11:
+ case 15:
+ il(9, l);
+ }
+ } catch (S) {
+ Cu(l, l.return, S);
+ }
+ if (l === s) {
+ $s = null;
+ break e;
+ }
+ var x = l.sibling;
+ if (null !== x) {
+ (x.return = l.return), ($s = x);
+ break e;
+ }
+ $s = l.return;
+ }
+ }
+ if (
+ ((Il = i),
+ zi(),
+ at && "function" === typeof at.onPostCommitFiberRoot)
+ )
+ try {
+ at.onPostCommitFiberRoot(it, e);
+ } catch (S) {}
+ r = !0;
+ }
+ return r;
+ } finally {
+ (yt = n), (Ml.transition = t);
+ }
+ }
+ return !1;
+ }
+ function _u(e, t, n) {
+ (e = La(e, (t = ps(0, (t = cs(n, t)), 1)), 1)),
+ (t = tu()),
+ null !== e && (gt(e, 1, t), iu(e, t));
+ }
+ function Cu(e, t, n) {
+ if (3 === e.tag) _u(e, e, n);
+ else
+ for (; null !== t; ) {
+ if (3 === t.tag) {
+ _u(t, e, n);
+ break;
+ }
+ if (1 === t.tag) {
+ var r = t.stateNode;
+ if (
+ "function" === typeof t.type.getDerivedStateFromError ||
+ ("function" === typeof r.componentDidCatch &&
+ (null === Wl || !Wl.has(r)))
+ ) {
+ (t = La(t, (e = vs(t, (e = cs(n, e)), 1)), 1)),
+ (e = tu()),
+ null !== t && (gt(t, 1, e), iu(t, e));
+ break;
+ }
+ }
+ t = t.return;
+ }
+ }
+ function wu(e, t, n) {
+ var r = e.pingCache;
+ null !== r && r.delete(t),
+ (t = tu()),
+ (e.pingedLanes |= e.suspendedLanes & n),
+ kl === e &&
+ (Bl & n) === n &&
+ (4 === Dl ||
+ (3 === Dl && (130023424 & Bl) === Bl && 500 > Je() - zl)
+ ? hu(e, 0)
+ : (Nl |= n)),
+ iu(e, t);
+ }
+ function Tu(e, t) {
+ 0 === t &&
+ (0 === (1 & e.mode)
+ ? (t = 1)
+ : ((t = ct), 0 === (130023424 & (ct <<= 1)) && (ct = 4194304)));
+ var n = tu();
+ null !== (e = Ia(e, t)) && (gt(e, t, n), iu(e, n));
+ }
+ function Mu(e) {
+ var t = e.memoizedState,
+ n = 0;
+ null !== t && (n = t.retryLane), Tu(e, n);
+ }
+ function Iu(e, t) {
+ var n = 0;
+ switch (e.tag) {
+ case 13:
+ var r = e.stateNode,
+ i = e.memoizedState;
+ null !== i && (n = i.retryLane);
+ break;
+ case 19:
+ r = e.stateNode;
+ break;
+ default:
+ throw Error(a(314));
+ }
+ null !== r && r.delete(t), Tu(e, n);
+ }
+ function ku(e, t) {
+ return We(e, t);
+ }
+ function Ru(e, t, n, r) {
+ (this.tag = e),
+ (this.key = n),
+ (this.sibling =
+ this.child =
+ this.return =
+ this.stateNode =
+ this.type =
+ this.elementType =
+ null),
+ (this.index = 0),
+ (this.ref = null),
+ (this.pendingProps = t),
+ (this.dependencies =
+ this.memoizedState =
+ this.updateQueue =
+ this.memoizedProps =
+ null),
+ (this.mode = r),
+ (this.subtreeFlags = this.flags = 0),
+ (this.deletions = null),
+ (this.childLanes = this.lanes = 0),
+ (this.alternate = null);
+ }
+ function Bu(e, t, n, r) {
+ return new Ru(e, t, n, r);
+ }
+ function Pu(e) {
+ return !(!(e = e.prototype) || !e.isReactComponent);
+ }
+ function Lu(e, t) {
+ var n = e.alternate;
+ return (
+ null === n
+ ? (((n = Bu(e.tag, t, e.key, e.mode)).elementType =
+ e.elementType),
+ (n.type = e.type),
+ (n.stateNode = e.stateNode),
+ (n.alternate = e),
+ (e.alternate = n))
+ : ((n.pendingProps = t),
+ (n.type = e.type),
+ (n.flags = 0),
+ (n.subtreeFlags = 0),
+ (n.deletions = null)),
+ (n.flags = 14680064 & e.flags),
+ (n.childLanes = e.childLanes),
+ (n.lanes = e.lanes),
+ (n.child = e.child),
+ (n.memoizedProps = e.memoizedProps),
+ (n.memoizedState = e.memoizedState),
+ (n.updateQueue = e.updateQueue),
+ (t = e.dependencies),
+ (n.dependencies =
+ null === t
+ ? null
+ : { lanes: t.lanes, firstContext: t.firstContext }),
+ (n.sibling = e.sibling),
+ (n.index = e.index),
+ (n.ref = e.ref),
+ n
+ );
+ }
+ function Du(e, t, n, r, i, o) {
+ var s = 2;
+ if (((r = e), "function" === typeof e)) Pu(e) && (s = 1);
+ else if ("string" === typeof e) s = 5;
+ else
+ e: switch (e) {
+ case E:
+ return Uu(n.children, i, o, t);
+ case _:
+ (s = 8), (i |= 8);
+ break;
+ case C:
+ return (
+ ((e = Bu(12, n, t, 2 | i)).elementType = C), (e.lanes = o), e
+ );
+ case I:
+ return (
+ ((e = Bu(13, n, t, i)).elementType = I), (e.lanes = o), e
+ );
+ case k:
+ return (
+ ((e = Bu(19, n, t, i)).elementType = k), (e.lanes = o), e
+ );
+ case P:
+ return Fu(n, i, o, t);
+ default:
+ if ("object" === typeof e && null !== e)
+ switch (e.$$typeof) {
+ case w:
+ s = 10;
+ break e;
+ case T:
+ s = 9;
+ break e;
+ case M:
+ s = 11;
+ break e;
+ case R:
+ s = 14;
+ break e;
+ case B:
+ (s = 16), (r = null);
+ break e;
+ }
+ throw Error(a(130, null == e ? e : typeof e, ""));
+ }
+ return (
+ ((t = Bu(s, n, t, i)).elementType = e),
+ (t.type = r),
+ (t.lanes = o),
+ t
+ );
+ }
+ function Uu(e, t, n, r) {
+ return ((e = Bu(7, e, r, t)).lanes = n), e;
+ }
+ function Fu(e, t, n, r) {
+ return (
+ ((e = Bu(22, e, r, t)).elementType = P),
+ (e.lanes = n),
+ (e.stateNode = { isHidden: !1 }),
+ e
+ );
+ }
+ function Ou(e, t, n) {
+ return ((e = Bu(6, e, null, t)).lanes = n), e;
+ }
+ function Nu(e, t, n) {
+ return (
+ ((t = Bu(
+ 4,
+ null !== e.children ? e.children : [],
+ e.key,
+ t
+ )).lanes = n),
+ (t.stateNode = {
+ containerInfo: e.containerInfo,
+ pendingChildren: null,
+ implementation: e.implementation,
+ }),
+ t
+ );
+ }
+ function Gu(e, t, n, r, i) {
+ (this.tag = t),
+ (this.containerInfo = e),
+ (this.finishedWork =
+ this.pingCache =
+ this.current =
+ this.pendingChildren =
+ null),
+ (this.timeoutHandle = -1),
+ (this.callbackNode = this.pendingContext = this.context = null),
+ (this.callbackPriority = 0),
+ (this.eventTimes = mt(0)),
+ (this.expirationTimes = mt(-1)),
+ (this.entangledLanes =
+ this.finishedLanes =
+ this.mutableReadLanes =
+ this.expiredLanes =
+ this.pingedLanes =
+ this.suspendedLanes =
+ this.pendingLanes =
+ 0),
+ (this.entanglements = mt(0)),
+ (this.identifierPrefix = r),
+ (this.onRecoverableError = i),
+ (this.mutableSourceEagerHydrationData = null);
+ }
+ function Zu(e, t, n, r, i, a, o, s, l) {
+ return (
+ (e = new Gu(e, t, n, s, l)),
+ 1 === t ? ((t = 1), !0 === a && (t |= 8)) : (t = 0),
+ (a = Bu(3, null, null, t)),
+ (e.current = a),
+ (a.stateNode = e),
+ (a.memoizedState = {
+ element: r,
+ isDehydrated: n,
+ cache: null,
+ transitions: null,
+ pendingSuspenseBoundaries: null,
+ }),
+ Ra(a),
+ e
+ );
+ }
+ function zu(e) {
+ if (!e) return Ti;
+ e: {
+ if (ze((e = e._reactInternals)) !== e || 1 !== e.tag)
+ throw Error(a(170));
+ var t = e;
+ do {
+ switch (t.tag) {
+ case 3:
+ t = t.stateNode.context;
+ break e;
+ case 1:
+ if (Bi(t.type)) {
+ t = t.stateNode.__reactInternalMemoizedMergedChildContext;
+ break e;
+ }
+ }
+ t = t.return;
+ } while (null !== t);
+ throw Error(a(171));
+ }
+ if (1 === e.tag) {
+ var n = e.type;
+ if (Bi(n)) return Di(e, n, t);
+ }
+ return t;
+ }
+ function Qu(e, t, n, r, i, a, o, s, l) {
+ return (
+ ((e = Zu(n, r, !0, e, 0, a, 0, s, l)).context = zu(null)),
+ (n = e.current),
+ ((a = Pa((r = tu()), (i = nu(n)))).callback =
+ void 0 !== t && null !== t ? t : null),
+ La(n, a, i),
+ (e.current.lanes = i),
+ gt(e, i, r),
+ iu(e, r),
+ e
+ );
+ }
+ function Hu(e, t, n, r) {
+ var i = t.current,
+ a = tu(),
+ o = nu(i);
+ return (
+ (n = zu(n)),
+ null === t.context ? (t.context = n) : (t.pendingContext = n),
+ ((t = Pa(a, o)).payload = { element: e }),
+ null !== (r = void 0 === r ? null : r) && (t.callback = r),
+ null !== (e = La(i, t, o)) && (ru(e, i, o, a), Da(e, i, o)),
+ o
+ );
+ }
+ function Vu(e) {
+ return (e = e.current).child
+ ? (e.child.tag, e.child.stateNode)
+ : null;
+ }
+ function ju(e, t) {
+ if (null !== (e = e.memoizedState) && null !== e.dehydrated) {
+ var n = e.retryLane;
+ e.retryLane = 0 !== n && n < t ? n : t;
+ }
+ }
+ function Wu(e, t) {
+ ju(e, t), (e = e.alternate) && ju(e, t);
+ }
+ _l = function (e, t, n) {
+ if (null !== e)
+ if (e.memoizedProps !== t.pendingProps || Ii.current) bs = !0;
+ else {
+ if (0 === (e.lanes & n) && 0 === (128 & t.flags))
+ return (
+ (bs = !1),
+ (function (e, t, n) {
+ switch (t.tag) {
+ case 3:
+ ks(t), ha();
+ break;
+ case 5:
+ ao(t);
+ break;
+ case 1:
+ Bi(t.type) && Ui(t);
+ break;
+ case 4:
+ ro(t, t.stateNode.containerInfo);
+ break;
+ case 10:
+ var r = t.type._context,
+ i = t.memoizedProps.value;
+ wi(ga, r._currentValue), (r._currentValue = i);
+ break;
+ case 13:
+ if (null !== (r = t.memoizedState))
+ return null !== r.dehydrated
+ ? (wi(so, 1 & so.current), (t.flags |= 128), null)
+ : 0 !== (n & t.child.childLanes)
+ ? Os(e, t, n)
+ : (wi(so, 1 & so.current),
+ null !== (e = Vs(e, t, n)) ? e.sibling : null);
+ wi(so, 1 & so.current);
+ break;
+ case 19:
+ if (
+ ((r = 0 !== (n & t.childLanes)),
+ 0 !== (128 & e.flags))
+ ) {
+ if (r) return Qs(e, t, n);
+ t.flags |= 128;
+ }
+ if (
+ (null !== (i = t.memoizedState) &&
+ ((i.rendering = null),
+ (i.tail = null),
+ (i.lastEffect = null)),
+ wi(so, so.current),
+ r)
+ )
+ break;
+ return null;
+ case 22:
+ case 23:
+ return (t.lanes = 0), Cs(e, t, n);
+ }
+ return Vs(e, t, n);
+ })(e, t, n)
+ );
+ bs = 0 !== (131072 & e.flags);
+ }
+ else (bs = !1), ia && 0 !== (1048576 & t.flags) && $i(t, ji, t.index);
+ switch (((t.lanes = 0), t.tag)) {
+ case 2:
+ var r = t.type;
+ Hs(e, t), (e = t.pendingProps);
+ var i = Ri(t, Mi.current);
+ _a(t, n), (i = _o(null, t, r, e, i, n));
+ var o = Co();
+ return (
+ (t.flags |= 1),
+ "object" === typeof i &&
+ null !== i &&
+ "function" === typeof i.render &&
+ void 0 === i.$$typeof
+ ? ((t.tag = 1),
+ (t.memoizedState = null),
+ (t.updateQueue = null),
+ Bi(r) ? ((o = !0), Ui(t)) : (o = !1),
+ (t.memoizedState =
+ null !== i.state && void 0 !== i.state ? i.state : null),
+ Ra(t),
+ (i.updater = Za),
+ (t.stateNode = i),
+ (i._reactInternals = t),
+ Va(t, r, e, n),
+ (t = Is(null, t, r, !0, o, n)))
+ : ((t.tag = 0),
+ ia && o && ea(t),
+ xs(null, t, i, n),
+ (t = t.child)),
+ t
+ );
+ case 16:
+ r = t.elementType;
+ e: {
+ switch (
+ (Hs(e, t),
+ (e = t.pendingProps),
+ (r = (i = r._init)(r._payload)),
+ (t.type = r),
+ (i = t.tag =
+ (function (e) {
+ if ("function" === typeof e) return Pu(e) ? 1 : 0;
+ if (void 0 !== e && null !== e) {
+ if ((e = e.$$typeof) === M) return 11;
+ if (e === R) return 14;
+ }
+ return 2;
+ })(r)),
+ (e = ma(r, e)),
+ i)
+ ) {
+ case 0:
+ t = Ts(null, t, r, e, n);
+ break e;
+ case 1:
+ t = Ms(null, t, r, e, n);
+ break e;
+ case 11:
+ t = Ss(null, t, r, e, n);
+ break e;
+ case 14:
+ t = Es(null, t, r, ma(r.type, e), n);
+ break e;
+ }
+ throw Error(a(306, r, ""));
+ }
+ return t;
+ case 0:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ Ts(e, t, r, (i = t.elementType === r ? i : ma(r, i)), n)
+ );
+ case 1:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ Ms(e, t, r, (i = t.elementType === r ? i : ma(r, i)), n)
+ );
+ case 3:
+ e: {
+ if ((ks(t), null === e)) throw Error(a(387));
+ (r = t.pendingProps),
+ (i = (o = t.memoizedState).element),
+ Ba(e, t),
+ Fa(t, r, null, n);
+ var s = t.memoizedState;
+ if (((r = s.element), o.isDehydrated)) {
+ if (
+ ((o = {
+ element: r,
+ isDehydrated: !1,
+ cache: s.cache,
+ pendingSuspenseBoundaries: s.pendingSuspenseBoundaries,
+ transitions: s.transitions,
+ }),
+ (t.updateQueue.baseState = o),
+ (t.memoizedState = o),
+ 256 & t.flags)
+ ) {
+ t = Rs(e, t, r, n, (i = cs(Error(a(423)), t)));
+ break e;
+ }
+ if (r !== i) {
+ t = Rs(e, t, r, n, (i = cs(Error(a(424)), t)));
+ break e;
+ }
+ for (
+ ra = ui(t.stateNode.containerInfo.firstChild),
+ na = t,
+ ia = !0,
+ aa = null,
+ n = Ja(t, null, r, n),
+ t.child = n;
+ n;
+
+ )
+ (n.flags = (-3 & n.flags) | 4096), (n = n.sibling);
+ } else {
+ if ((ha(), r === i)) {
+ t = Vs(e, t, n);
+ break e;
+ }
+ xs(e, t, r, n);
+ }
+ t = t.child;
+ }
+ return t;
+ case 5:
+ return (
+ ao(t),
+ null === e && ua(t),
+ (r = t.type),
+ (i = t.pendingProps),
+ (o = null !== e ? e.memoizedProps : null),
+ (s = i.children),
+ ni(r, i)
+ ? (s = null)
+ : null !== o && ni(r, o) && (t.flags |= 32),
+ ws(e, t),
+ xs(e, t, s, n),
+ t.child
+ );
+ case 6:
+ return null === e && ua(t), null;
+ case 13:
+ return Os(e, t, n);
+ case 4:
+ return (
+ ro(t, t.stateNode.containerInfo),
+ (r = t.pendingProps),
+ null === e ? (t.child = qa(t, null, r, n)) : xs(e, t, r, n),
+ t.child
+ );
+ case 11:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ Ss(e, t, r, (i = t.elementType === r ? i : ma(r, i)), n)
+ );
+ case 7:
+ return xs(e, t, t.pendingProps, n), t.child;
+ case 8:
+ case 12:
+ return xs(e, t, t.pendingProps.children, n), t.child;
+ case 10:
+ e: {
+ if (
+ ((r = t.type._context),
+ (i = t.pendingProps),
+ (o = t.memoizedProps),
+ (s = i.value),
+ wi(ga, r._currentValue),
+ (r._currentValue = s),
+ null !== o)
+ )
+ if (sr(o.value, s)) {
+ if (o.children === i.children && !Ii.current) {
+ t = Vs(e, t, n);
+ break e;
+ }
+ } else
+ for (
+ null !== (o = t.child) && (o.return = t);
+ null !== o;
+
+ ) {
+ var l = o.dependencies;
+ if (null !== l) {
+ s = o.child;
+ for (var u = l.firstContext; null !== u; ) {
+ if (u.context === r) {
+ if (1 === o.tag) {
+ (u = Pa(-1, n & -n)).tag = 2;
+ var c = o.updateQueue;
+ if (null !== c) {
+ var f = (c = c.shared).pending;
+ null === f
+ ? (u.next = u)
+ : ((u.next = f.next), (f.next = u)),
+ (c.pending = u);
+ }
+ }
+ (o.lanes |= n),
+ null !== (u = o.alternate) && (u.lanes |= n),
+ Ea(o.return, n, t),
+ (l.lanes |= n);
+ break;
+ }
+ u = u.next;
+ }
+ } else if (10 === o.tag)
+ s = o.type === t.type ? null : o.child;
+ else if (18 === o.tag) {
+ if (null === (s = o.return)) throw Error(a(341));
+ (s.lanes |= n),
+ null !== (l = s.alternate) && (l.lanes |= n),
+ Ea(s, n, t),
+ (s = o.sibling);
+ } else s = o.child;
+ if (null !== s) s.return = o;
+ else
+ for (s = o; null !== s; ) {
+ if (s === t) {
+ s = null;
+ break;
+ }
+ if (null !== (o = s.sibling)) {
+ (o.return = s.return), (s = o);
+ break;
+ }
+ s = s.return;
+ }
+ o = s;
+ }
+ xs(e, t, i.children, n), (t = t.child);
+ }
+ return t;
+ case 9:
+ return (
+ (i = t.type),
+ (r = t.pendingProps.children),
+ _a(t, n),
+ (r = r((i = Ca(i)))),
+ (t.flags |= 1),
+ xs(e, t, r, n),
+ t.child
+ );
+ case 14:
+ return (
+ (i = ma((r = t.type), t.pendingProps)),
+ Es(e, t, r, (i = ma(r.type, i)), n)
+ );
+ case 15:
+ return _s(e, t, t.type, t.pendingProps, n);
+ case 17:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ (i = t.elementType === r ? i : ma(r, i)),
+ Hs(e, t),
+ (t.tag = 1),
+ Bi(r) ? ((e = !0), Ui(t)) : (e = !1),
+ _a(t, n),
+ Qa(t, r, i),
+ Va(t, r, i, n),
+ Is(null, t, r, !0, e, n)
+ );
+ case 19:
+ return Qs(e, t, n);
+ case 22:
+ return Cs(e, t, n);
+ }
+ throw Error(a(156, t.tag));
+ };
+ var Xu =
+ "function" === typeof reportError
+ ? reportError
+ : function (e) {
+ console.error(e);
+ };
+ function Yu(e) {
+ this._internalRoot = e;
+ }
+ function qu(e) {
+ this._internalRoot = e;
+ }
+ function Ju(e) {
+ return !(
+ !e ||
+ (1 !== e.nodeType && 9 !== e.nodeType && 11 !== e.nodeType)
+ );
+ }
+ function Ku(e) {
+ return !(
+ !e ||
+ (1 !== e.nodeType &&
+ 9 !== e.nodeType &&
+ 11 !== e.nodeType &&
+ (8 !== e.nodeType ||
+ " react-mount-point-unstable " !== e.nodeValue))
+ );
+ }
+ function $u() {}
+ function ec(e, t, n, r, i) {
+ var a = n._reactRootContainer;
+ if (a) {
+ var o = a;
+ if ("function" === typeof i) {
+ var s = i;
+ i = function () {
+ var e = Vu(o);
+ s.call(e);
+ };
+ }
+ Hu(t, o, e, i);
+ } else
+ o = (function (e, t, n, r, i) {
+ if (i) {
+ if ("function" === typeof r) {
+ var a = r;
+ r = function () {
+ var e = Vu(o);
+ a.call(e);
+ };
+ }
+ var o = Qu(t, r, e, 0, null, !1, 0, "", $u);
+ return (
+ (e._reactRootContainer = o),
+ (e[pi] = o.current),
+ zr(8 === e.nodeType ? e.parentNode : e),
+ fu(),
+ o
+ );
+ }
+ for (; (i = e.lastChild); ) e.removeChild(i);
+ if ("function" === typeof r) {
+ var s = r;
+ r = function () {
+ var e = Vu(l);
+ s.call(e);
+ };
+ }
+ var l = Zu(e, 0, !1, null, 0, !1, 0, "", $u);
+ return (
+ (e._reactRootContainer = l),
+ (e[pi] = l.current),
+ zr(8 === e.nodeType ? e.parentNode : e),
+ fu(function () {
+ Hu(t, l, n, r);
+ }),
+ l
+ );
+ })(n, t, e, i, r);
+ return Vu(o);
+ }
+ (qu.prototype.render = Yu.prototype.render =
+ function (e) {
+ var t = this._internalRoot;
+ if (null === t) throw Error(a(409));
+ Hu(e, t, null, null);
+ }),
+ (qu.prototype.unmount = Yu.prototype.unmount =
+ function () {
+ var e = this._internalRoot;
+ if (null !== e) {
+ this._internalRoot = null;
+ var t = e.containerInfo;
+ fu(function () {
+ Hu(null, e, null, null);
+ }),
+ (t[pi] = null);
+ }
+ }),
+ (qu.prototype.unstable_scheduleHydration = function (e) {
+ if (e) {
+ var t = _t();
+ e = { blockedOn: null, target: e, priority: t };
+ for (
+ var n = 0;
+ n < Pt.length && 0 !== t && t < Pt[n].priority;
+ n++
+ );
+ Pt.splice(n, 0, e), 0 === n && Ft(e);
+ }
+ }),
+ (xt = function (e) {
+ switch (e.tag) {
+ case 3:
+ var t = e.stateNode;
+ if (t.current.memoizedState.isDehydrated) {
+ var n = ft(t.pendingLanes);
+ 0 !== n &&
+ (At(t, 1 | n),
+ iu(t, Je()),
+ 0 === (6 & Il) && ((Ql = Je() + 500), zi()));
+ }
+ break;
+ case 13:
+ fu(function () {
+ var t = Ia(e, 1);
+ if (null !== t) {
+ var n = tu();
+ ru(t, e, 1, n);
+ }
+ }),
+ Wu(e, 1);
+ }
+ }),
+ (St = function (e) {
+ if (13 === e.tag) {
+ var t = Ia(e, 134217728);
+ if (null !== t) ru(t, e, 134217728, tu());
+ Wu(e, 134217728);
+ }
+ }),
+ (Et = function (e) {
+ if (13 === e.tag) {
+ var t = nu(e),
+ n = Ia(e, t);
+ if (null !== n) ru(n, e, t, tu());
+ Wu(e, t);
+ }
+ }),
+ (_t = function () {
+ return yt;
+ }),
+ (Ct = function (e, t) {
+ var n = yt;
+ try {
+ return (yt = e), t();
+ } finally {
+ yt = n;
+ }
+ }),
+ (Se = function (e, t, n) {
+ switch (t) {
+ case "input":
+ if ((K(e, n), (t = n.name), "radio" === n.type && null != t)) {
+ for (n = e; n.parentNode; ) n = n.parentNode;
+ for (
+ n = n.querySelectorAll(
+ "input[name=" + JSON.stringify("" + t) + '][type="radio"]'
+ ),
+ t = 0;
+ t < n.length;
+ t++
+ ) {
+ var r = n[t];
+ if (r !== e && r.form === e.form) {
+ var i = xi(r);
+ if (!i) throw Error(a(90));
+ W(r), K(r, i);
+ }
+ }
+ }
+ break;
+ case "textarea":
+ ae(e, n);
+ break;
+ case "select":
+ null != (t = n.value) && ne(e, !!n.multiple, t, !1);
+ }
+ }),
+ (Me = cu),
+ (Ie = fu);
+ var tc = {
+ usingClientEntryPoint: !1,
+ Events: [yi, bi, xi, we, Te, cu],
+ },
+ nc = {
+ findFiberByHostInstance: Ai,
+ bundleType: 0,
+ version: "18.2.0",
+ rendererPackageName: "react-dom",
+ },
+ rc = {
+ bundleType: nc.bundleType,
+ version: nc.version,
+ rendererPackageName: nc.rendererPackageName,
+ rendererConfig: nc.rendererConfig,
+ overrideHookState: null,
+ overrideHookStateDeletePath: null,
+ overrideHookStateRenamePath: null,
+ overrideProps: null,
+ overridePropsDeletePath: null,
+ overridePropsRenamePath: null,
+ setErrorHandler: null,
+ setSuspenseHandler: null,
+ scheduleUpdate: null,
+ currentDispatcherRef: b.ReactCurrentDispatcher,
+ findHostInstanceByFiber: function (e) {
+ return null === (e = Ve(e)) ? null : e.stateNode;
+ },
+ findFiberByHostInstance:
+ nc.findFiberByHostInstance ||
+ function () {
+ return null;
+ },
+ findHostInstancesForRefresh: null,
+ scheduleRefresh: null,
+ scheduleRoot: null,
+ setRefreshHandler: null,
+ getCurrentFiber: null,
+ reconcilerVersion: "18.2.0-next-9e3b772b8-20220608",
+ };
+ if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
+ var ic = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ if (!ic.isDisabled && ic.supportsFiber)
+ try {
+ (it = ic.inject(rc)), (at = ic);
+ } catch (ce) {}
+ }
+ (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = tc),
+ (t.createPortal = function (e, t) {
+ var n =
+ 2 < arguments.length && void 0 !== arguments[2]
+ ? arguments[2]
+ : null;
+ if (!Ju(t)) throw Error(a(200));
+ return (function (e, t, n) {
+ var r =
+ 3 < arguments.length && void 0 !== arguments[3]
+ ? arguments[3]
+ : null;
+ return {
+ $$typeof: S,
+ key: null == r ? null : "" + r,
+ children: e,
+ containerInfo: t,
+ implementation: n,
+ };
+ })(e, t, null, n);
+ }),
+ (t.createRoot = function (e, t) {
+ if (!Ju(e)) throw Error(a(299));
+ var n = !1,
+ r = "",
+ i = Xu;
+ return (
+ null !== t &&
+ void 0 !== t &&
+ (!0 === t.unstable_strictMode && (n = !0),
+ void 0 !== t.identifierPrefix && (r = t.identifierPrefix),
+ void 0 !== t.onRecoverableError && (i = t.onRecoverableError)),
+ (t = Zu(e, 1, !1, null, 0, n, 0, r, i)),
+ (e[pi] = t.current),
+ zr(8 === e.nodeType ? e.parentNode : e),
+ new Yu(t)
+ );
+ }),
+ (t.findDOMNode = function (e) {
+ if (null == e) return null;
+ if (1 === e.nodeType) return e;
+ var t = e._reactInternals;
+ if (void 0 === t) {
+ if ("function" === typeof e.render) throw Error(a(188));
+ throw ((e = Object.keys(e).join(",")), Error(a(268, e)));
+ }
+ return (e = null === (e = Ve(t)) ? null : e.stateNode);
+ }),
+ (t.flushSync = function (e) {
+ return fu(e);
+ }),
+ (t.hydrate = function (e, t, n) {
+ if (!Ku(t)) throw Error(a(200));
+ return ec(null, e, t, !0, n);
+ }),
+ (t.hydrateRoot = function (e, t, n) {
+ if (!Ju(e)) throw Error(a(405));
+ var r = (null != n && n.hydratedSources) || null,
+ i = !1,
+ o = "",
+ s = Xu;
+ if (
+ (null !== n &&
+ void 0 !== n &&
+ (!0 === n.unstable_strictMode && (i = !0),
+ void 0 !== n.identifierPrefix && (o = n.identifierPrefix),
+ void 0 !== n.onRecoverableError && (s = n.onRecoverableError)),
+ (t = Qu(t, null, e, 1, null != n ? n : null, i, 0, o, s)),
+ (e[pi] = t.current),
+ zr(e),
+ r)
+ )
+ for (e = 0; e < r.length; e++)
+ (i = (i = (n = r[e])._getVersion)(n._source)),
+ null == t.mutableSourceEagerHydrationData
+ ? (t.mutableSourceEagerHydrationData = [n, i])
+ : t.mutableSourceEagerHydrationData.push(n, i);
+ return new qu(t);
+ }),
+ (t.render = function (e, t, n) {
+ if (!Ku(t)) throw Error(a(200));
+ return ec(null, e, t, !1, n);
+ }),
+ (t.unmountComponentAtNode = function (e) {
+ if (!Ku(e)) throw Error(a(40));
+ return (
+ !!e._reactRootContainer &&
+ (fu(function () {
+ ec(null, null, e, !1, function () {
+ (e._reactRootContainer = null), (e[pi] = null);
+ });
+ }),
+ !0)
+ );
+ }),
+ (t.unstable_batchedUpdates = cu),
+ (t.unstable_renderSubtreeIntoContainer = function (e, t, n, r) {
+ if (!Ku(n)) throw Error(a(200));
+ if (null == e || void 0 === e._reactInternals) throw Error(a(38));
+ return ec(e, t, n, !1, r);
+ }),
+ (t.version = "18.2.0-next-9e3b772b8-20220608");
+ },
+ 1250: function (e, t, n) {
+ "use strict";
+ var r = n(4164);
+ (t.createRoot = r.createRoot), (t.hydrateRoot = r.hydrateRoot);
+ },
+ 4164: function (e, t, n) {
+ "use strict";
+ !(function e() {
+ if (
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
+ "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE
+ )
+ try {
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e);
+ } catch (t) {
+ console.error(t);
+ }
+ })(),
+ (e.exports = n(4463));
+ },
+ 67: function (e, t) {
+ "use strict";
+ function n(e, t) {
+ var n = e.length;
+ e.push(t);
+ e: for (; 0 < n; ) {
+ var r = (n - 1) >>> 1,
+ i = e[r];
+ if (!(0 < a(i, t))) break e;
+ (e[r] = t), (e[n] = i), (n = r);
+ }
+ }
+ function r(e) {
+ return 0 === e.length ? null : e[0];
+ }
+ function i(e) {
+ if (0 === e.length) return null;
+ var t = e[0],
+ n = e.pop();
+ if (n !== t) {
+ e[0] = n;
+ e: for (var r = 0, i = e.length, o = i >>> 1; r < o; ) {
+ var s = 2 * (r + 1) - 1,
+ l = e[s],
+ u = s + 1,
+ c = e[u];
+ if (0 > a(l, n))
+ u < i && 0 > a(c, l)
+ ? ((e[r] = c), (e[u] = n), (r = u))
+ : ((e[r] = l), (e[s] = n), (r = s));
+ else {
+ if (!(u < i && 0 > a(c, n))) break e;
+ (e[r] = c), (e[u] = n), (r = u);
+ }
+ }
+ }
+ return t;
+ }
+ function a(e, t) {
+ var n = e.sortIndex - t.sortIndex;
+ return 0 !== n ? n : e.id - t.id;
+ }
+ if (
+ "object" === typeof performance &&
+ "function" === typeof performance.now
+ ) {
+ var o = performance;
+ t.unstable_now = function () {
+ return o.now();
+ };
+ } else {
+ var s = Date,
+ l = s.now();
+ t.unstable_now = function () {
+ return s.now() - l;
+ };
+ }
+ var u = [],
+ c = [],
+ f = 1,
+ d = null,
+ h = 3,
+ p = !1,
+ v = !1,
+ m = !1,
+ g = "function" === typeof setTimeout ? setTimeout : null,
+ A = "function" === typeof clearTimeout ? clearTimeout : null,
+ y = "undefined" !== typeof setImmediate ? setImmediate : null;
+ function b(e) {
+ for (var t = r(c); null !== t; ) {
+ if (null === t.callback) i(c);
+ else {
+ if (!(t.startTime <= e)) break;
+ i(c), (t.sortIndex = t.expirationTime), n(u, t);
+ }
+ t = r(c);
+ }
+ }
+ function x(e) {
+ if (((m = !1), b(e), !v))
+ if (null !== r(u)) (v = !0), P(S);
+ else {
+ var t = r(c);
+ null !== t && L(x, t.startTime - e);
+ }
+ }
+ function S(e, n) {
+ (v = !1), m && ((m = !1), A(w), (w = -1)), (p = !0);
+ var a = h;
+ try {
+ for (
+ b(n), d = r(u);
+ null !== d && (!(d.expirationTime > n) || (e && !I()));
+
+ ) {
+ var o = d.callback;
+ if ("function" === typeof o) {
+ (d.callback = null), (h = d.priorityLevel);
+ var s = o(d.expirationTime <= n);
+ (n = t.unstable_now()),
+ "function" === typeof s
+ ? (d.callback = s)
+ : d === r(u) && i(u),
+ b(n);
+ } else i(u);
+ d = r(u);
+ }
+ if (null !== d) var l = !0;
+ else {
+ var f = r(c);
+ null !== f && L(x, f.startTime - n), (l = !1);
+ }
+ return l;
+ } finally {
+ (d = null), (h = a), (p = !1);
+ }
+ }
+ "undefined" !== typeof navigator &&
+ void 0 !== navigator.scheduling &&
+ void 0 !== navigator.scheduling.isInputPending &&
+ navigator.scheduling.isInputPending.bind(navigator.scheduling);
+ var E,
+ _ = !1,
+ C = null,
+ w = -1,
+ T = 5,
+ M = -1;
+ function I() {
+ return !(t.unstable_now() - M < T);
+ }
+ function k() {
+ if (null !== C) {
+ var e = t.unstable_now();
+ M = e;
+ var n = !0;
+ try {
+ n = C(!0, e);
+ } finally {
+ n ? E() : ((_ = !1), (C = null));
+ }
+ } else _ = !1;
+ }
+ if ("function" === typeof y)
+ E = function () {
+ y(k);
+ };
+ else if ("undefined" !== typeof MessageChannel) {
+ var R = new MessageChannel(),
+ B = R.port2;
+ (R.port1.onmessage = k),
+ (E = function () {
+ B.postMessage(null);
+ });
+ } else
+ E = function () {
+ g(k, 0);
+ };
+ function P(e) {
+ (C = e), _ || ((_ = !0), E());
+ }
+ function L(e, n) {
+ w = g(function () {
+ e(t.unstable_now());
+ }, n);
+ }
+ (t.unstable_IdlePriority = 5),
+ (t.unstable_ImmediatePriority = 1),
+ (t.unstable_LowPriority = 4),
+ (t.unstable_NormalPriority = 3),
+ (t.unstable_Profiling = null),
+ (t.unstable_UserBlockingPriority = 2),
+ (t.unstable_cancelCallback = function (e) {
+ e.callback = null;
+ }),
+ (t.unstable_continueExecution = function () {
+ v || p || ((v = !0), P(S));
+ }),
+ (t.unstable_forceFrameRate = function (e) {
+ 0 > e || 125 < e
+ ? console.error(
+ "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
+ )
+ : (T = 0 < e ? Math.floor(1e3 / e) : 5);
+ }),
+ (t.unstable_getCurrentPriorityLevel = function () {
+ return h;
+ }),
+ (t.unstable_getFirstCallbackNode = function () {
+ return r(u);
+ }),
+ (t.unstable_next = function (e) {
+ switch (h) {
+ case 1:
+ case 2:
+ case 3:
+ var t = 3;
+ break;
+ default:
+ t = h;
+ }
+ var n = h;
+ h = t;
+ try {
+ return e();
+ } finally {
+ h = n;
+ }
+ }),
+ (t.unstable_pauseExecution = function () {}),
+ (t.unstable_requestPaint = function () {}),
+ (t.unstable_runWithPriority = function (e, t) {
+ switch (e) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ break;
+ default:
+ e = 3;
+ }
+ var n = h;
+ h = e;
+ try {
+ return t();
+ } finally {
+ h = n;
+ }
+ }),
+ (t.unstable_scheduleCallback = function (e, i, a) {
+ var o = t.unstable_now();
+ switch (
+ ("object" === typeof a && null !== a
+ ? (a = "number" === typeof (a = a.delay) && 0 < a ? o + a : o)
+ : (a = o),
+ e)
+ ) {
+ case 1:
+ var s = -1;
+ break;
+ case 2:
+ s = 250;
+ break;
+ case 5:
+ s = 1073741823;
+ break;
+ case 4:
+ s = 1e4;
+ break;
+ default:
+ s = 5e3;
+ }
+ return (
+ (e = {
+ id: f++,
+ callback: i,
+ priorityLevel: e,
+ startTime: a,
+ expirationTime: (s = a + s),
+ sortIndex: -1,
+ }),
+ a > o
+ ? ((e.sortIndex = a),
+ n(c, e),
+ null === r(u) &&
+ e === r(c) &&
+ (m ? (A(w), (w = -1)) : (m = !0), L(x, a - o)))
+ : ((e.sortIndex = s), n(u, e), v || p || ((v = !0), P(S))),
+ e
+ );
+ }),
+ (t.unstable_shouldYield = I),
+ (t.unstable_wrapCallback = function (e) {
+ var t = h;
+ return function () {
+ var n = h;
+ h = t;
+ try {
+ return e.apply(this, arguments);
+ } finally {
+ h = n;
+ }
+ };
+ });
+ },
+ 5585: function (e, t, n) {
+ "use strict";
+ e.exports = n(67);
+ },
+ 1372: function (e, t) {
+ "use strict";
+ var n,
+ r = Symbol.for("react.element"),
+ i = Symbol.for("react.portal"),
+ a = Symbol.for("react.fragment"),
+ o = Symbol.for("react.strict_mode"),
+ s = Symbol.for("react.profiler"),
+ l = Symbol.for("react.provider"),
+ u = Symbol.for("react.context"),
+ c = Symbol.for("react.server_context"),
+ f = Symbol.for("react.forward_ref"),
+ d = Symbol.for("react.suspense"),
+ h = Symbol.for("react.suspense_list"),
+ p = Symbol.for("react.memo"),
+ v = Symbol.for("react.lazy"),
+ m = Symbol.for("react.offscreen");
+ function g(e) {
+ if ("object" === typeof e && null !== e) {
+ var t = e.$$typeof;
+ switch (t) {
+ case r:
+ switch ((e = e.type)) {
+ case a:
+ case s:
+ case o:
+ case d:
+ case h:
+ return e;
+ default:
+ switch ((e = e && e.$$typeof)) {
+ case c:
+ case u:
+ case f:
+ case v:
+ case p:
+ case l:
+ return e;
+ default:
+ return t;
+ }
+ }
+ case i:
+ return t;
+ }
+ }
+ }
+ (n = Symbol.for("react.module.reference")),
+ (t.isValidElementType = function (e) {
+ return (
+ "string" === typeof e ||
+ "function" === typeof e ||
+ e === a ||
+ e === s ||
+ e === o ||
+ e === d ||
+ e === h ||
+ e === m ||
+ ("object" === typeof e &&
+ null !== e &&
+ (e.$$typeof === v ||
+ e.$$typeof === p ||
+ e.$$typeof === l ||
+ e.$$typeof === u ||
+ e.$$typeof === f ||
+ e.$$typeof === n ||
+ void 0 !== e.getModuleId))
+ );
+ }),
+ (t.typeOf = g);
+ },
+ 7441: function (e, t, n) {
+ "use strict";
+ e.exports = n(1372);
+ },
+ 4976: function (e, t) {
+ "use strict";
+ (t.ConcurrentRoot = 1),
+ (t.ContinuousEventPriority = 4),
+ (t.DefaultEventPriority = 16),
+ (t.DiscreteEventPriority = 1);
+ },
+ 3721: function (e, t, n) {
+ e.exports = function (e) {
+ var t = {},
+ r = n(2791),
+ i = n(5296),
+ a = Object.assign;
+ function o(e) {
+ for (
+ var t =
+ "https://reactjs.org/docs/error-decoder.html?invariant=" + e,
+ n = 1;
+ n < arguments.length;
+ n++
+ )
+ t += "&args[]=" + encodeURIComponent(arguments[n]);
+ return (
+ "Minified React error #" +
+ e +
+ "; visit " +
+ t +
+ " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
+ );
+ }
+ var s = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,
+ l = Symbol.for("react.element"),
+ u = Symbol.for("react.portal"),
+ c = Symbol.for("react.fragment"),
+ f = Symbol.for("react.strict_mode"),
+ d = Symbol.for("react.profiler"),
+ h = Symbol.for("react.provider"),
+ p = Symbol.for("react.context"),
+ v = Symbol.for("react.forward_ref"),
+ m = Symbol.for("react.suspense"),
+ g = Symbol.for("react.suspense_list"),
+ A = Symbol.for("react.memo"),
+ y = Symbol.for("react.lazy");
+ Symbol.for("react.scope"), Symbol.for("react.debug_trace_mode");
+ var b = Symbol.for("react.offscreen");
+ Symbol.for("react.legacy_hidden"),
+ Symbol.for("react.cache"),
+ Symbol.for("react.tracing_marker");
+ var x = Symbol.iterator;
+ function S(e) {
+ return null === e || "object" !== typeof e
+ ? null
+ : "function" === typeof (e = (x && e[x]) || e["@@iterator"])
+ ? e
+ : null;
+ }
+ function E(e) {
+ if (null == e) return null;
+ if ("function" === typeof e) return e.displayName || e.name || null;
+ if ("string" === typeof e) return e;
+ switch (e) {
+ case c:
+ return "Fragment";
+ case u:
+ return "Portal";
+ case d:
+ return "Profiler";
+ case f:
+ return "StrictMode";
+ case m:
+ return "Suspense";
+ case g:
+ return "SuspenseList";
+ }
+ if ("object" === typeof e)
+ switch (e.$$typeof) {
+ case p:
+ return (e.displayName || "Context") + ".Consumer";
+ case h:
+ return (e._context.displayName || "Context") + ".Provider";
+ case v:
+ var t = e.render;
+ return (
+ (e = e.displayName) ||
+ (e =
+ "" !== (e = t.displayName || t.name || "")
+ ? "ForwardRef(" + e + ")"
+ : "ForwardRef"),
+ e
+ );
+ case A:
+ return null !== (t = e.displayName || null)
+ ? t
+ : E(e.type) || "Memo";
+ case y:
+ (t = e._payload), (e = e._init);
+ try {
+ return E(e(t));
+ } catch (n) {}
+ }
+ return null;
+ }
+ function _(e) {
+ var t = e.type;
+ switch (e.tag) {
+ case 24:
+ return "Cache";
+ case 9:
+ return (t.displayName || "Context") + ".Consumer";
+ case 10:
+ return (t._context.displayName || "Context") + ".Provider";
+ case 18:
+ return "DehydratedFragment";
+ case 11:
+ return (
+ (e = (e = t.render).displayName || e.name || ""),
+ t.displayName ||
+ ("" !== e ? "ForwardRef(" + e + ")" : "ForwardRef")
+ );
+ case 7:
+ return "Fragment";
+ case 5:
+ return t;
+ case 4:
+ return "Portal";
+ case 3:
+ return "Root";
+ case 6:
+ return "Text";
+ case 16:
+ return E(t);
+ case 8:
+ return t === f ? "StrictMode" : "Mode";
+ case 22:
+ return "Offscreen";
+ case 12:
+ return "Profiler";
+ case 21:
+ return "Scope";
+ case 13:
+ return "Suspense";
+ case 19:
+ return "SuspenseList";
+ case 25:
+ return "TracingMarker";
+ case 1:
+ case 0:
+ case 17:
+ case 2:
+ case 14:
+ case 15:
+ if ("function" === typeof t)
+ return t.displayName || t.name || null;
+ if ("string" === typeof t) return t;
+ }
+ return null;
+ }
+ function C(e) {
+ var t = e,
+ n = e;
+ if (e.alternate) for (; t.return; ) t = t.return;
+ else {
+ e = t;
+ do {
+ 0 !== (4098 & (t = e).flags) && (n = t.return), (e = t.return);
+ } while (e);
+ }
+ return 3 === t.tag ? n : null;
+ }
+ function w(e) {
+ if (C(e) !== e) throw Error(o(188));
+ }
+ function T(e) {
+ var t = e.alternate;
+ if (!t) {
+ if (null === (t = C(e))) throw Error(o(188));
+ return t !== e ? null : e;
+ }
+ for (var n = e, r = t; ; ) {
+ var i = n.return;
+ if (null === i) break;
+ var a = i.alternate;
+ if (null === a) {
+ if (null !== (r = i.return)) {
+ n = r;
+ continue;
+ }
+ break;
+ }
+ if (i.child === a.child) {
+ for (a = i.child; a; ) {
+ if (a === n) return w(i), e;
+ if (a === r) return w(i), t;
+ a = a.sibling;
+ }
+ throw Error(o(188));
+ }
+ if (n.return !== r.return) (n = i), (r = a);
+ else {
+ for (var s = !1, l = i.child; l; ) {
+ if (l === n) {
+ (s = !0), (n = i), (r = a);
+ break;
+ }
+ if (l === r) {
+ (s = !0), (r = i), (n = a);
+ break;
+ }
+ l = l.sibling;
+ }
+ if (!s) {
+ for (l = a.child; l; ) {
+ if (l === n) {
+ (s = !0), (n = a), (r = i);
+ break;
+ }
+ if (l === r) {
+ (s = !0), (r = a), (n = i);
+ break;
+ }
+ l = l.sibling;
+ }
+ if (!s) throw Error(o(189));
+ }
+ }
+ if (n.alternate !== r) throw Error(o(190));
+ }
+ if (3 !== n.tag) throw Error(o(188));
+ return n.stateNode.current === n ? e : t;
+ }
+ function M(e) {
+ return null !== (e = T(e)) ? I(e) : null;
+ }
+ function I(e) {
+ if (5 === e.tag || 6 === e.tag) return e;
+ for (e = e.child; null !== e; ) {
+ var t = I(e);
+ if (null !== t) return t;
+ e = e.sibling;
+ }
+ return null;
+ }
+ function k(e) {
+ if (5 === e.tag || 6 === e.tag) return e;
+ for (e = e.child; null !== e; ) {
+ if (4 !== e.tag) {
+ var t = k(e);
+ if (null !== t) return t;
+ }
+ e = e.sibling;
+ }
+ return null;
+ }
+ var R,
+ B = Array.isArray,
+ P = e.getPublicInstance,
+ L = e.getRootHostContext,
+ D = e.getChildHostContext,
+ U = e.prepareForCommit,
+ F = e.resetAfterCommit,
+ O = e.createInstance,
+ N = e.appendInitialChild,
+ G = e.finalizeInitialChildren,
+ Z = e.prepareUpdate,
+ z = e.shouldSetTextContent,
+ Q = e.createTextInstance,
+ H = e.scheduleTimeout,
+ V = e.cancelTimeout,
+ j = e.noTimeout,
+ W = e.isPrimaryRenderer,
+ X = e.supportsMutation,
+ Y = e.supportsPersistence,
+ q = e.supportsHydration,
+ J = e.getInstanceFromNode,
+ K = e.preparePortalMount,
+ $ = e.getCurrentEventPriority,
+ ee = e.detachDeletedInstance,
+ te = e.supportsMicrotasks,
+ ne = e.scheduleMicrotask,
+ re = e.supportsTestSelectors,
+ ie = e.findFiberRoot,
+ ae = e.getBoundingRect,
+ oe = e.getTextContent,
+ se = e.isHiddenSubtree,
+ le = e.matchAccessibilityRole,
+ ue = e.setFocusIfFocusable,
+ ce = e.setupIntersectionObserver,
+ fe = e.appendChild,
+ de = e.appendChildToContainer,
+ he = e.commitTextUpdate,
+ pe = e.commitMount,
+ ve = e.commitUpdate,
+ me = e.insertBefore,
+ ge = e.insertInContainerBefore,
+ Ae = e.removeChild,
+ ye = e.removeChildFromContainer,
+ be = e.resetTextContent,
+ xe = e.hideInstance,
+ Se = e.hideTextInstance,
+ Ee = e.unhideInstance,
+ _e = e.unhideTextInstance,
+ Ce = e.clearContainer,
+ we = e.cloneInstance,
+ Te = e.createContainerChildSet,
+ Me = e.appendChildToContainerChildSet,
+ Ie = e.finalizeContainerChildren,
+ ke = e.replaceContainerChildren,
+ Re = e.cloneHiddenInstance,
+ Be = e.cloneHiddenTextInstance,
+ Pe = e.canHydrateInstance,
+ Le = e.canHydrateTextInstance,
+ De = e.canHydrateSuspenseInstance,
+ Ue = e.isSuspenseInstancePending,
+ Fe = e.isSuspenseInstanceFallback,
+ Oe = e.registerSuspenseInstanceRetry,
+ Ne = e.getNextHydratableSibling,
+ Ge = e.getFirstHydratableChild,
+ Ze = e.getFirstHydratableChildWithinContainer,
+ ze = e.getFirstHydratableChildWithinSuspenseInstance,
+ Qe = e.hydrateInstance,
+ He = e.hydrateTextInstance,
+ Ve = e.hydrateSuspenseInstance,
+ je = e.getNextHydratableInstanceAfterSuspenseInstance,
+ We = e.commitHydratedContainer,
+ Xe = e.commitHydratedSuspenseInstance,
+ Ye = e.clearSuspenseBoundary,
+ qe = e.clearSuspenseBoundaryFromContainer,
+ Je = e.shouldDeleteUnhydratedTailInstances,
+ Ke = e.didNotMatchHydratedContainerTextInstance,
+ $e = e.didNotMatchHydratedTextInstance;
+ function et(e) {
+ if (void 0 === R)
+ try {
+ throw Error();
+ } catch (n) {
+ var t = n.stack.trim().match(/\n( *(at )?)/);
+ R = (t && t[1]) || "";
+ }
+ return "\n" + R + e;
+ }
+ var tt = !1;
+ function nt(e, t) {
+ if (!e || tt) return "";
+ tt = !0;
+ var n = Error.prepareStackTrace;
+ Error.prepareStackTrace = void 0;
+ try {
+ if (t)
+ if (
+ ((t = function () {
+ throw Error();
+ }),
+ Object.defineProperty(t.prototype, "props", {
+ set: function () {
+ throw Error();
+ },
+ }),
+ "object" === typeof Reflect && Reflect.construct)
+ ) {
+ try {
+ Reflect.construct(t, []);
+ } catch (u) {
+ var r = u;
+ }
+ Reflect.construct(e, [], t);
+ } else {
+ try {
+ t.call();
+ } catch (u) {
+ r = u;
+ }
+ e.call(t.prototype);
+ }
+ else {
+ try {
+ throw Error();
+ } catch (u) {
+ r = u;
+ }
+ e();
+ }
+ } catch (u) {
+ if (u && r && "string" === typeof u.stack) {
+ for (
+ var i = u.stack.split("\n"),
+ a = r.stack.split("\n"),
+ o = i.length - 1,
+ s = a.length - 1;
+ 1 <= o && 0 <= s && i[o] !== a[s];
+
+ )
+ s--;
+ for (; 1 <= o && 0 <= s; o--, s--)
+ if (i[o] !== a[s]) {
+ if (1 !== o || 1 !== s)
+ do {
+ if ((o--, 0 > --s || i[o] !== a[s])) {
+ var l = "\n" + i[o].replace(" at new ", " at ");
+ return (
+ e.displayName &&
+ l.includes("") &&
+ (l = l.replace("", e.displayName)),
+ l
+ );
+ }
+ } while (1 <= o && 0 <= s);
+ break;
+ }
+ }
+ } finally {
+ (tt = !1), (Error.prepareStackTrace = n);
+ }
+ return (e = e ? e.displayName || e.name : "") ? et(e) : "";
+ }
+ var rt = Object.prototype.hasOwnProperty,
+ it = [],
+ at = -1;
+ function ot(e) {
+ return { current: e };
+ }
+ function st(e) {
+ 0 > at || ((e.current = it[at]), (it[at] = null), at--);
+ }
+ function lt(e, t) {
+ at++, (it[at] = e.current), (e.current = t);
+ }
+ var ut = {},
+ ct = ot(ut),
+ ft = ot(!1),
+ dt = ut;
+ function ht(e, t) {
+ var n = e.type.contextTypes;
+ if (!n) return ut;
+ var r = e.stateNode;
+ if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
+ return r.__reactInternalMemoizedMaskedChildContext;
+ var i,
+ a = {};
+ for (i in n) a[i] = t[i];
+ return (
+ r &&
+ (((e =
+ e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t),
+ (e.__reactInternalMemoizedMaskedChildContext = a)),
+ a
+ );
+ }
+ function pt(e) {
+ return null !== (e = e.childContextTypes) && void 0 !== e;
+ }
+ function vt() {
+ st(ft), st(ct);
+ }
+ function mt(e, t, n) {
+ if (ct.current !== ut) throw Error(o(168));
+ lt(ct, t), lt(ft, n);
+ }
+ function gt(e, t, n) {
+ var r = e.stateNode;
+ if (
+ ((t = t.childContextTypes),
+ "function" !== typeof r.getChildContext)
+ )
+ return n;
+ for (var i in (r = r.getChildContext()))
+ if (!(i in t)) throw Error(o(108, _(e) || "Unknown", i));
+ return a({}, n, r);
+ }
+ function At(e) {
+ return (
+ (e =
+ ((e = e.stateNode) &&
+ e.__reactInternalMemoizedMergedChildContext) ||
+ ut),
+ (dt = ct.current),
+ lt(ct, e),
+ lt(ft, ft.current),
+ !0
+ );
+ }
+ function yt(e, t, n) {
+ var r = e.stateNode;
+ if (!r) throw Error(o(169));
+ n
+ ? ((e = gt(e, t, dt)),
+ (r.__reactInternalMemoizedMergedChildContext = e),
+ st(ft),
+ st(ct),
+ lt(ct, e))
+ : st(ft),
+ lt(ft, n);
+ }
+ var bt = Math.clz32
+ ? Math.clz32
+ : function (e) {
+ return 0 === (e >>>= 0) ? 32 : (31 - ((xt(e) / St) | 0)) | 0;
+ },
+ xt = Math.log,
+ St = Math.LN2;
+ var Et = 64,
+ _t = 4194304;
+ function Ct(e) {
+ switch (e & -e) {
+ case 1:
+ return 1;
+ case 2:
+ return 2;
+ case 4:
+ return 4;
+ case 8:
+ return 8;
+ case 16:
+ return 16;
+ case 32:
+ return 32;
+ case 64:
+ case 128:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ case 4096:
+ case 8192:
+ case 16384:
+ case 32768:
+ case 65536:
+ case 131072:
+ case 262144:
+ case 524288:
+ case 1048576:
+ case 2097152:
+ return 4194240 & e;
+ case 4194304:
+ case 8388608:
+ case 16777216:
+ case 33554432:
+ case 67108864:
+ return 130023424 & e;
+ case 134217728:
+ return 134217728;
+ case 268435456:
+ return 268435456;
+ case 536870912:
+ return 536870912;
+ case 1073741824:
+ return 1073741824;
+ default:
+ return e;
+ }
+ }
+ function wt(e, t) {
+ var n = e.pendingLanes;
+ if (0 === n) return 0;
+ var r = 0,
+ i = e.suspendedLanes,
+ a = e.pingedLanes,
+ o = 268435455 & n;
+ if (0 !== o) {
+ var s = o & ~i;
+ 0 !== s ? (r = Ct(s)) : 0 !== (a &= o) && (r = Ct(a));
+ } else 0 !== (o = n & ~i) ? (r = Ct(o)) : 0 !== a && (r = Ct(a));
+ if (0 === r) return 0;
+ if (
+ 0 !== t &&
+ t !== r &&
+ 0 === (t & i) &&
+ ((i = r & -r) >= (a = t & -t) ||
+ (16 === i && 0 !== (4194240 & a)))
+ )
+ return t;
+ if ((0 !== (4 & r) && (r |= 16 & n), 0 !== (t = e.entangledLanes)))
+ for (e = e.entanglements, t &= r; 0 < t; )
+ (i = 1 << (n = 31 - bt(t))), (r |= e[n]), (t &= ~i);
+ return r;
+ }
+ function Tt(e, t) {
+ switch (e) {
+ case 1:
+ case 2:
+ case 4:
+ return t + 250;
+ case 8:
+ case 16:
+ case 32:
+ case 64:
+ case 128:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ case 4096:
+ case 8192:
+ case 16384:
+ case 32768:
+ case 65536:
+ case 131072:
+ case 262144:
+ case 524288:
+ case 1048576:
+ case 2097152:
+ return t + 5e3;
+ default:
+ return -1;
+ }
+ }
+ function Mt(e) {
+ return 0 !== (e = -1073741825 & e.pendingLanes)
+ ? e
+ : 1073741824 & e
+ ? 1073741824
+ : 0;
+ }
+ function It(e) {
+ for (var t = [], n = 0; 31 > n; n++) t.push(e);
+ return t;
+ }
+ function kt(e, t, n) {
+ (e.pendingLanes |= t),
+ 536870912 !== t && ((e.suspendedLanes = 0), (e.pingedLanes = 0)),
+ ((e = e.eventTimes)[(t = 31 - bt(t))] = n);
+ }
+ function Rt(e, t) {
+ var n = (e.entangledLanes |= t);
+ for (e = e.entanglements; n; ) {
+ var r = 31 - bt(n),
+ i = 1 << r;
+ (i & t) | (e[r] & t) && (e[r] |= t), (n &= ~i);
+ }
+ }
+ var Bt = 0;
+ function Pt(e) {
+ return 1 < (e &= -e)
+ ? 4 < e
+ ? 0 !== (268435455 & e)
+ ? 16
+ : 536870912
+ : 4
+ : 1;
+ }
+ var Lt = i.unstable_scheduleCallback,
+ Dt = i.unstable_cancelCallback,
+ Ut = i.unstable_shouldYield,
+ Ft = i.unstable_requestPaint,
+ Ot = i.unstable_now,
+ Nt = i.unstable_ImmediatePriority,
+ Gt = i.unstable_UserBlockingPriority,
+ Zt = i.unstable_NormalPriority,
+ zt = i.unstable_IdlePriority,
+ Qt = null,
+ Ht = null;
+ var Vt =
+ "function" === typeof Object.is
+ ? Object.is
+ : function (e, t) {
+ return (
+ (e === t && (0 !== e || 1 / e === 1 / t)) ||
+ (e !== e && t !== t)
+ );
+ },
+ jt = null,
+ Wt = !1,
+ Xt = !1;
+ function Yt(e) {
+ null === jt ? (jt = [e]) : jt.push(e);
+ }
+ function qt() {
+ if (!Xt && null !== jt) {
+ Xt = !0;
+ var e = 0,
+ t = Bt;
+ try {
+ var n = jt;
+ for (Bt = 1; e < n.length; e++) {
+ var r = n[e];
+ do {
+ r = r(!0);
+ } while (null !== r);
+ }
+ (jt = null), (Wt = !1);
+ } catch (i) {
+ throw (null !== jt && (jt = jt.slice(e + 1)), Lt(Nt, qt), i);
+ } finally {
+ (Bt = t), (Xt = !1);
+ }
+ }
+ return null;
+ }
+ var Jt = s.ReactCurrentBatchConfig;
+ function Kt(e, t) {
+ if (Vt(e, t)) return !0;
+ if (
+ "object" !== typeof e ||
+ null === e ||
+ "object" !== typeof t ||
+ null === t
+ )
+ return !1;
+ var n = Object.keys(e),
+ r = Object.keys(t);
+ if (n.length !== r.length) return !1;
+ for (r = 0; r < n.length; r++) {
+ var i = n[r];
+ if (!rt.call(t, i) || !Vt(e[i], t[i])) return !1;
+ }
+ return !0;
+ }
+ function $t(e) {
+ switch (e.tag) {
+ case 5:
+ return et(e.type);
+ case 16:
+ return et("Lazy");
+ case 13:
+ return et("Suspense");
+ case 19:
+ return et("SuspenseList");
+ case 0:
+ case 2:
+ case 15:
+ return (e = nt(e.type, !1));
+ case 11:
+ return (e = nt(e.type.render, !1));
+ case 1:
+ return (e = nt(e.type, !0));
+ default:
+ return "";
+ }
+ }
+ function en(e, t) {
+ if (e && e.defaultProps) {
+ for (var n in ((t = a({}, t)), (e = e.defaultProps)))
+ void 0 === t[n] && (t[n] = e[n]);
+ return t;
+ }
+ return t;
+ }
+ var tn = ot(null),
+ nn = null,
+ rn = null,
+ an = null;
+ function on() {
+ an = rn = nn = null;
+ }
+ function sn(e, t, n) {
+ W
+ ? (lt(tn, t._currentValue), (t._currentValue = n))
+ : (lt(tn, t._currentValue2), (t._currentValue2 = n));
+ }
+ function ln(e) {
+ var t = tn.current;
+ st(tn), W ? (e._currentValue = t) : (e._currentValue2 = t);
+ }
+ function un(e, t, n) {
+ for (; null !== e; ) {
+ var r = e.alternate;
+ if (
+ ((e.childLanes & t) !== t
+ ? ((e.childLanes |= t), null !== r && (r.childLanes |= t))
+ : null !== r &&
+ (r.childLanes & t) !== t &&
+ (r.childLanes |= t),
+ e === n)
+ )
+ break;
+ e = e.return;
+ }
+ }
+ function cn(e, t) {
+ (nn = e),
+ (an = rn = null),
+ null !== (e = e.dependencies) &&
+ null !== e.firstContext &&
+ (0 !== (e.lanes & t) && (Ui = !0), (e.firstContext = null));
+ }
+ function fn(e) {
+ var t = W ? e._currentValue : e._currentValue2;
+ if (an !== e)
+ if (
+ ((e = { context: e, memoizedValue: t, next: null }),
+ null === rn)
+ ) {
+ if (null === nn) throw Error(o(308));
+ (rn = e), (nn.dependencies = { lanes: 0, firstContext: e });
+ } else rn = rn.next = e;
+ return t;
+ }
+ var dn = null,
+ hn = !1;
+ function pn(e) {
+ e.updateQueue = {
+ baseState: e.memoizedState,
+ firstBaseUpdate: null,
+ lastBaseUpdate: null,
+ shared: { pending: null, interleaved: null, lanes: 0 },
+ effects: null,
+ };
+ }
+ function vn(e, t) {
+ (e = e.updateQueue),
+ t.updateQueue === e &&
+ (t.updateQueue = {
+ baseState: e.baseState,
+ firstBaseUpdate: e.firstBaseUpdate,
+ lastBaseUpdate: e.lastBaseUpdate,
+ shared: e.shared,
+ effects: e.effects,
+ });
+ }
+ function mn(e, t) {
+ return {
+ eventTime: e,
+ lane: t,
+ tag: 0,
+ payload: null,
+ callback: null,
+ next: null,
+ };
+ }
+ function gn(e, t) {
+ var n = e.updateQueue;
+ null !== n &&
+ ((n = n.shared),
+ null !== Xa && 0 !== (1 & e.mode) && 0 === (2 & Wa)
+ ? (null === (e = n.interleaved)
+ ? ((t.next = t), null === dn ? (dn = [n]) : dn.push(n))
+ : ((t.next = e.next), (e.next = t)),
+ (n.interleaved = t))
+ : (null === (e = n.pending)
+ ? (t.next = t)
+ : ((t.next = e.next), (e.next = t)),
+ (n.pending = t)));
+ }
+ function An(e, t, n) {
+ if (
+ null !== (t = t.updateQueue) &&
+ ((t = t.shared), 0 !== (4194240 & n))
+ ) {
+ var r = t.lanes;
+ (n |= r &= e.pendingLanes), (t.lanes = n), Rt(e, n);
+ }
+ }
+ function yn(e, t) {
+ var n = e.updateQueue,
+ r = e.alternate;
+ if (null !== r && n === (r = r.updateQueue)) {
+ var i = null,
+ a = null;
+ if (null !== (n = n.firstBaseUpdate)) {
+ do {
+ var o = {
+ eventTime: n.eventTime,
+ lane: n.lane,
+ tag: n.tag,
+ payload: n.payload,
+ callback: n.callback,
+ next: null,
+ };
+ null === a ? (i = a = o) : (a = a.next = o), (n = n.next);
+ } while (null !== n);
+ null === a ? (i = a = t) : (a = a.next = t);
+ } else i = a = t;
+ return (
+ (n = {
+ baseState: r.baseState,
+ firstBaseUpdate: i,
+ lastBaseUpdate: a,
+ shared: r.shared,
+ effects: r.effects,
+ }),
+ void (e.updateQueue = n)
+ );
+ }
+ null === (e = n.lastBaseUpdate)
+ ? (n.firstBaseUpdate = t)
+ : (e.next = t),
+ (n.lastBaseUpdate = t);
+ }
+ function bn(e, t, n, r) {
+ var i = e.updateQueue;
+ hn = !1;
+ var o = i.firstBaseUpdate,
+ s = i.lastBaseUpdate,
+ l = i.shared.pending;
+ if (null !== l) {
+ i.shared.pending = null;
+ var u = l,
+ c = u.next;
+ (u.next = null), null === s ? (o = c) : (s.next = c), (s = u);
+ var f = e.alternate;
+ null !== f &&
+ (l = (f = f.updateQueue).lastBaseUpdate) !== s &&
+ (null === l ? (f.firstBaseUpdate = c) : (l.next = c),
+ (f.lastBaseUpdate = u));
+ }
+ if (null !== o) {
+ var d = i.baseState;
+ for (s = 0, f = c = u = null, l = o; ; ) {
+ var h = l.lane,
+ p = l.eventTime;
+ if ((r & h) === h) {
+ null !== f &&
+ (f = f.next =
+ {
+ eventTime: p,
+ lane: 0,
+ tag: l.tag,
+ payload: l.payload,
+ callback: l.callback,
+ next: null,
+ });
+ e: {
+ var v = e,
+ m = l;
+ switch (((h = t), (p = n), m.tag)) {
+ case 1:
+ if ("function" === typeof (v = m.payload)) {
+ d = v.call(p, d, h);
+ break e;
+ }
+ d = v;
+ break e;
+ case 3:
+ v.flags = (-65537 & v.flags) | 128;
+ case 0:
+ if (
+ null ===
+ (h =
+ "function" === typeof (v = m.payload)
+ ? v.call(p, d, h)
+ : v) ||
+ void 0 === h
+ )
+ break e;
+ d = a({}, d, h);
+ break e;
+ case 2:
+ hn = !0;
+ }
+ }
+ null !== l.callback &&
+ 0 !== l.lane &&
+ ((e.flags |= 64),
+ null === (h = i.effects) ? (i.effects = [l]) : h.push(l));
+ } else
+ (p = {
+ eventTime: p,
+ lane: h,
+ tag: l.tag,
+ payload: l.payload,
+ callback: l.callback,
+ next: null,
+ }),
+ null === f ? ((c = f = p), (u = d)) : (f = f.next = p),
+ (s |= h);
+ if (null === (l = l.next)) {
+ if (null === (l = i.shared.pending)) break;
+ (l = (h = l).next),
+ (h.next = null),
+ (i.lastBaseUpdate = h),
+ (i.shared.pending = null);
+ }
+ }
+ if (
+ (null === f && (u = d),
+ (i.baseState = u),
+ (i.firstBaseUpdate = c),
+ (i.lastBaseUpdate = f),
+ null !== (t = i.shared.interleaved))
+ ) {
+ i = t;
+ do {
+ (s |= i.lane), (i = i.next);
+ } while (i !== t);
+ } else null === o && (i.shared.lanes = 0);
+ (to |= s), (e.lanes = s), (e.memoizedState = d);
+ }
+ }
+ function xn(e, t, n) {
+ if (((e = t.effects), (t.effects = null), null !== e))
+ for (t = 0; t < e.length; t++) {
+ var r = e[t],
+ i = r.callback;
+ if (null !== i) {
+ if (((r.callback = null), (r = n), "function" !== typeof i))
+ throw Error(o(191, i));
+ i.call(r);
+ }
+ }
+ }
+ var Sn = new r.Component().refs;
+ function En(e, t, n, r) {
+ (n =
+ null === (n = n(r, (t = e.memoizedState))) || void 0 === n
+ ? t
+ : a({}, t, n)),
+ (e.memoizedState = n),
+ 0 === e.lanes && (e.updateQueue.baseState = n);
+ }
+ var _n = {
+ isMounted: function (e) {
+ return !!(e = e._reactInternals) && C(e) === e;
+ },
+ enqueueSetState: function (e, t, n) {
+ e = e._reactInternals;
+ var r = xo(),
+ i = So(e),
+ a = mn(r, i);
+ (a.payload = t),
+ void 0 !== n && null !== n && (a.callback = n),
+ gn(e, a),
+ null !== (t = Eo(e, i, r)) && An(t, e, i);
+ },
+ enqueueReplaceState: function (e, t, n) {
+ e = e._reactInternals;
+ var r = xo(),
+ i = So(e),
+ a = mn(r, i);
+ (a.tag = 1),
+ (a.payload = t),
+ void 0 !== n && null !== n && (a.callback = n),
+ gn(e, a),
+ null !== (t = Eo(e, i, r)) && An(t, e, i);
+ },
+ enqueueForceUpdate: function (e, t) {
+ e = e._reactInternals;
+ var n = xo(),
+ r = So(e),
+ i = mn(n, r);
+ (i.tag = 2),
+ void 0 !== t && null !== t && (i.callback = t),
+ gn(e, i),
+ null !== (t = Eo(e, r, n)) && An(t, e, r);
+ },
+ };
+ function Cn(e, t, n, r, i, a, o) {
+ return "function" === typeof (e = e.stateNode).shouldComponentUpdate
+ ? e.shouldComponentUpdate(r, a, o)
+ : !t.prototype ||
+ !t.prototype.isPureReactComponent ||
+ !Kt(n, r) ||
+ !Kt(i, a);
+ }
+ function wn(e, t, n) {
+ var r = !1,
+ i = ut,
+ a = t.contextType;
+ return (
+ "object" === typeof a && null !== a
+ ? (a = fn(a))
+ : ((i = pt(t) ? dt : ct.current),
+ (a = (r = null !== (r = t.contextTypes) && void 0 !== r)
+ ? ht(e, i)
+ : ut)),
+ (t = new t(n, a)),
+ (e.memoizedState =
+ null !== t.state && void 0 !== t.state ? t.state : null),
+ (t.updater = _n),
+ (e.stateNode = t),
+ (t._reactInternals = e),
+ r &&
+ (((e =
+ e.stateNode).__reactInternalMemoizedUnmaskedChildContext = i),
+ (e.__reactInternalMemoizedMaskedChildContext = a)),
+ t
+ );
+ }
+ function Tn(e, t, n, r) {
+ (e = t.state),
+ "function" === typeof t.componentWillReceiveProps &&
+ t.componentWillReceiveProps(n, r),
+ "function" === typeof t.UNSAFE_componentWillReceiveProps &&
+ t.UNSAFE_componentWillReceiveProps(n, r),
+ t.state !== e && _n.enqueueReplaceState(t, t.state, null);
+ }
+ function Mn(e, t, n, r) {
+ var i = e.stateNode;
+ (i.props = n), (i.state = e.memoizedState), (i.refs = Sn), pn(e);
+ var a = t.contextType;
+ "object" === typeof a && null !== a
+ ? (i.context = fn(a))
+ : ((a = pt(t) ? dt : ct.current), (i.context = ht(e, a))),
+ (i.state = e.memoizedState),
+ "function" === typeof (a = t.getDerivedStateFromProps) &&
+ (En(e, t, a, n), (i.state = e.memoizedState)),
+ "function" === typeof t.getDerivedStateFromProps ||
+ "function" === typeof i.getSnapshotBeforeUpdate ||
+ ("function" !== typeof i.UNSAFE_componentWillMount &&
+ "function" !== typeof i.componentWillMount) ||
+ ((t = i.state),
+ "function" === typeof i.componentWillMount &&
+ i.componentWillMount(),
+ "function" === typeof i.UNSAFE_componentWillMount &&
+ i.UNSAFE_componentWillMount(),
+ t !== i.state && _n.enqueueReplaceState(i, i.state, null),
+ bn(e, n, i, r),
+ (i.state = e.memoizedState)),
+ "function" === typeof i.componentDidMount && (e.flags |= 4194308);
+ }
+ var In = [],
+ kn = 0,
+ Rn = null,
+ Bn = 0,
+ Pn = [],
+ Ln = 0,
+ Dn = null,
+ Un = 1,
+ Fn = "";
+ function On(e, t) {
+ (In[kn++] = Bn), (In[kn++] = Rn), (Rn = e), (Bn = t);
+ }
+ function Nn(e, t, n) {
+ (Pn[Ln++] = Un), (Pn[Ln++] = Fn), (Pn[Ln++] = Dn), (Dn = e);
+ var r = Un;
+ e = Fn;
+ var i = 32 - bt(r) - 1;
+ (r &= ~(1 << i)), (n += 1);
+ var a = 32 - bt(t) + i;
+ if (30 < a) {
+ var o = i - (i % 5);
+ (a = (r & ((1 << o) - 1)).toString(32)),
+ (r >>= o),
+ (i -= o),
+ (Un = (1 << (32 - bt(t) + i)) | (n << i) | r),
+ (Fn = a + e);
+ } else (Un = (1 << a) | (n << i) | r), (Fn = e);
+ }
+ function Gn(e) {
+ null !== e.return && (On(e, 1), Nn(e, 1, 0));
+ }
+ function Zn(e) {
+ for (; e === Rn; )
+ (Rn = In[--kn]),
+ (In[kn] = null),
+ (Bn = In[--kn]),
+ (In[kn] = null);
+ for (; e === Dn; )
+ (Dn = Pn[--Ln]),
+ (Pn[Ln] = null),
+ (Fn = Pn[--Ln]),
+ (Pn[Ln] = null),
+ (Un = Pn[--Ln]),
+ (Pn[Ln] = null);
+ }
+ var zn = null,
+ Qn = null,
+ Hn = !1,
+ Vn = !1,
+ jn = null;
+ function Wn(e, t) {
+ var n = Ko(5, null, null, 0);
+ (n.elementType = "DELETED"),
+ (n.stateNode = t),
+ (n.return = e),
+ null === (t = e.deletions)
+ ? ((e.deletions = [n]), (e.flags |= 16))
+ : t.push(n);
+ }
+ function Xn(e, t) {
+ switch (e.tag) {
+ case 5:
+ return (
+ null !== (t = Pe(t, e.type, e.pendingProps)) &&
+ ((e.stateNode = t), (zn = e), (Qn = Ge(t)), !0)
+ );
+ case 6:
+ return (
+ null !== (t = Le(t, e.pendingProps)) &&
+ ((e.stateNode = t), (zn = e), (Qn = null), !0)
+ );
+ case 13:
+ if (null !== (t = De(t))) {
+ var n = null !== Dn ? { id: Un, overflow: Fn } : null;
+ return (
+ (e.memoizedState = {
+ dehydrated: t,
+ treeContext: n,
+ retryLane: 1073741824,
+ }),
+ ((n = Ko(18, null, null, 0)).stateNode = t),
+ (n.return = e),
+ (e.child = n),
+ (zn = e),
+ (Qn = null),
+ !0
+ );
+ }
+ return !1;
+ default:
+ return !1;
+ }
+ }
+ function Yn(e) {
+ return 0 !== (1 & e.mode) && 0 === (128 & e.flags);
+ }
+ function qn(e) {
+ if (Hn) {
+ var t = Qn;
+ if (t) {
+ var n = t;
+ if (!Xn(e, t)) {
+ if (Yn(e)) throw Error(o(418));
+ t = Ne(n);
+ var r = zn;
+ t && Xn(e, t)
+ ? Wn(r, n)
+ : ((e.flags = (-4097 & e.flags) | 2), (Hn = !1), (zn = e));
+ }
+ } else {
+ if (Yn(e)) throw Error(o(418));
+ (e.flags = (-4097 & e.flags) | 2), (Hn = !1), (zn = e);
+ }
+ }
+ }
+ function Jn(e) {
+ for (
+ e = e.return;
+ null !== e && 5 !== e.tag && 3 !== e.tag && 13 !== e.tag;
+
+ )
+ e = e.return;
+ zn = e;
+ }
+ function Kn(e) {
+ if (!q || e !== zn) return !1;
+ if (!Hn) return Jn(e), (Hn = !0), !1;
+ if (
+ 3 !== e.tag &&
+ (5 !== e.tag || (Je(e.type) && !z(e.type, e.memoizedProps)))
+ ) {
+ var t = Qn;
+ if (t) {
+ if (Yn(e)) {
+ for (e = Qn; e; ) e = Ne(e);
+ throw Error(o(418));
+ }
+ for (; t; ) Wn(e, t), (t = Ne(t));
+ }
+ }
+ if ((Jn(e), 13 === e.tag)) {
+ if (!q) throw Error(o(316));
+ if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null))
+ throw Error(o(317));
+ Qn = je(e);
+ } else Qn = zn ? Ne(e.stateNode) : null;
+ return !0;
+ }
+ function $n() {
+ q && ((Qn = zn = null), (Vn = Hn = !1));
+ }
+ function er(e) {
+ null === jn ? (jn = [e]) : jn.push(e);
+ }
+ function tr(e, t, n) {
+ if (
+ null !== (e = n.ref) &&
+ "function" !== typeof e &&
+ "object" !== typeof e
+ ) {
+ if (n._owner) {
+ if ((n = n._owner)) {
+ if (1 !== n.tag) throw Error(o(309));
+ var r = n.stateNode;
+ }
+ if (!r) throw Error(o(147, e));
+ var i = r,
+ a = "" + e;
+ return null !== t &&
+ null !== t.ref &&
+ "function" === typeof t.ref &&
+ t.ref._stringRef === a
+ ? t.ref
+ : ((t = function (e) {
+ var t = i.refs;
+ t === Sn && (t = i.refs = {}),
+ null === e ? delete t[a] : (t[a] = e);
+ }),
+ (t._stringRef = a),
+ t);
+ }
+ if ("string" !== typeof e) throw Error(o(284));
+ if (!n._owner) throw Error(o(290, e));
+ }
+ return e;
+ }
+ function nr(e, t) {
+ throw (
+ ((e = Object.prototype.toString.call(t)),
+ Error(
+ o(
+ 31,
+ "[object Object]" === e
+ ? "object with keys {" + Object.keys(t).join(", ") + "}"
+ : e
+ )
+ ))
+ );
+ }
+ function rr(e) {
+ return (0, e._init)(e._payload);
+ }
+ function ir(e) {
+ function t(t, n) {
+ if (e) {
+ var r = t.deletions;
+ null === r ? ((t.deletions = [n]), (t.flags |= 16)) : r.push(n);
+ }
+ }
+ function n(n, r) {
+ if (!e) return null;
+ for (; null !== r; ) t(n, r), (r = r.sibling);
+ return null;
+ }
+ function r(e, t) {
+ for (e = new Map(); null !== t; )
+ null !== t.key ? e.set(t.key, t) : e.set(t.index, t),
+ (t = t.sibling);
+ return e;
+ }
+ function i(e, t) {
+ return ((e = es(e, t)).index = 0), (e.sibling = null), e;
+ }
+ function a(t, n, r) {
+ return (
+ (t.index = r),
+ e
+ ? null !== (r = t.alternate)
+ ? (r = r.index) < n
+ ? ((t.flags |= 2), n)
+ : r
+ : ((t.flags |= 2), n)
+ : ((t.flags |= 1048576), n)
+ );
+ }
+ function s(t) {
+ return e && null === t.alternate && (t.flags |= 2), t;
+ }
+ function f(e, t, n, r) {
+ return null === t || 6 !== t.tag
+ ? (((t = is(n, e.mode, r)).return = e), t)
+ : (((t = i(t, n)).return = e), t);
+ }
+ function d(e, t, n, r) {
+ var a = n.type;
+ return a === c
+ ? p(e, t, n.props.children, r, n.key)
+ : null !== t &&
+ (t.elementType === a ||
+ ("object" === typeof a &&
+ null !== a &&
+ a.$$typeof === y &&
+ rr(a) === t.type))
+ ? (((r = i(t, n.props)).ref = tr(e, t, n)), (r.return = e), r)
+ : (((r = ts(n.type, n.key, n.props, null, e.mode, r)).ref = tr(
+ e,
+ t,
+ n
+ )),
+ (r.return = e),
+ r);
+ }
+ function h(e, t, n, r) {
+ return null === t ||
+ 4 !== t.tag ||
+ t.stateNode.containerInfo !== n.containerInfo ||
+ t.stateNode.implementation !== n.implementation
+ ? (((t = as(n, e.mode, r)).return = e), t)
+ : (((t = i(t, n.children || [])).return = e), t);
+ }
+ function p(e, t, n, r, a) {
+ return null === t || 7 !== t.tag
+ ? (((t = ns(n, e.mode, r, a)).return = e), t)
+ : (((t = i(t, n)).return = e), t);
+ }
+ function v(e, t, n) {
+ if (("string" === typeof t && "" !== t) || "number" === typeof t)
+ return ((t = is("" + t, e.mode, n)).return = e), t;
+ if ("object" === typeof t && null !== t) {
+ switch (t.$$typeof) {
+ case l:
+ return (
+ ((n = ts(t.type, t.key, t.props, null, e.mode, n)).ref =
+ tr(e, null, t)),
+ (n.return = e),
+ n
+ );
+ case u:
+ return ((t = as(t, e.mode, n)).return = e), t;
+ case y:
+ return v(e, (0, t._init)(t._payload), n);
+ }
+ if (B(t) || S(t))
+ return ((t = ns(t, e.mode, n, null)).return = e), t;
+ nr(e, t);
+ }
+ return null;
+ }
+ function m(e, t, n, r) {
+ var i = null !== t ? t.key : null;
+ if (("string" === typeof n && "" !== n) || "number" === typeof n)
+ return null !== i ? null : f(e, t, "" + n, r);
+ if ("object" === typeof n && null !== n) {
+ switch (n.$$typeof) {
+ case l:
+ return n.key === i ? d(e, t, n, r) : null;
+ case u:
+ return n.key === i ? h(e, t, n, r) : null;
+ case y:
+ return m(e, t, (i = n._init)(n._payload), r);
+ }
+ if (B(n) || S(n))
+ return null !== i ? null : p(e, t, n, r, null);
+ nr(e, n);
+ }
+ return null;
+ }
+ function g(e, t, n, r, i) {
+ if (("string" === typeof r && "" !== r) || "number" === typeof r)
+ return f(t, (e = e.get(n) || null), "" + r, i);
+ if ("object" === typeof r && null !== r) {
+ switch (r.$$typeof) {
+ case l:
+ return d(
+ t,
+ (e = e.get(null === r.key ? n : r.key) || null),
+ r,
+ i
+ );
+ case u:
+ return h(
+ t,
+ (e = e.get(null === r.key ? n : r.key) || null),
+ r,
+ i
+ );
+ case y:
+ return g(e, t, n, (0, r._init)(r._payload), i);
+ }
+ if (B(r) || S(r))
+ return p(t, (e = e.get(n) || null), r, i, null);
+ nr(t, r);
+ }
+ return null;
+ }
+ function A(i, o, s, l) {
+ for (
+ var u = null, c = null, f = o, d = (o = 0), h = null;
+ null !== f && d < s.length;
+ d++
+ ) {
+ f.index > d ? ((h = f), (f = null)) : (h = f.sibling);
+ var p = m(i, f, s[d], l);
+ if (null === p) {
+ null === f && (f = h);
+ break;
+ }
+ e && f && null === p.alternate && t(i, f),
+ (o = a(p, o, d)),
+ null === c ? (u = p) : (c.sibling = p),
+ (c = p),
+ (f = h);
+ }
+ if (d === s.length) return n(i, f), Hn && On(i, d), u;
+ if (null === f) {
+ for (; d < s.length; d++)
+ null !== (f = v(i, s[d], l)) &&
+ ((o = a(f, o, d)),
+ null === c ? (u = f) : (c.sibling = f),
+ (c = f));
+ return Hn && On(i, d), u;
+ }
+ for (f = r(i, f); d < s.length; d++)
+ null !== (h = g(f, i, d, s[d], l)) &&
+ (e &&
+ null !== h.alternate &&
+ f.delete(null === h.key ? d : h.key),
+ (o = a(h, o, d)),
+ null === c ? (u = h) : (c.sibling = h),
+ (c = h));
+ return (
+ e &&
+ f.forEach(function (e) {
+ return t(i, e);
+ }),
+ Hn && On(i, d),
+ u
+ );
+ }
+ function b(i, s, l, u) {
+ var c = S(l);
+ if ("function" !== typeof c) throw Error(o(150));
+ if (null == (l = c.call(l))) throw Error(o(151));
+ for (
+ var f = (c = null), d = s, h = (s = 0), p = null, A = l.next();
+ null !== d && !A.done;
+ h++, A = l.next()
+ ) {
+ d.index > h ? ((p = d), (d = null)) : (p = d.sibling);
+ var y = m(i, d, A.value, u);
+ if (null === y) {
+ null === d && (d = p);
+ break;
+ }
+ e && d && null === y.alternate && t(i, d),
+ (s = a(y, s, h)),
+ null === f ? (c = y) : (f.sibling = y),
+ (f = y),
+ (d = p);
+ }
+ if (A.done) return n(i, d), Hn && On(i, h), c;
+ if (null === d) {
+ for (; !A.done; h++, A = l.next())
+ null !== (A = v(i, A.value, u)) &&
+ ((s = a(A, s, h)),
+ null === f ? (c = A) : (f.sibling = A),
+ (f = A));
+ return Hn && On(i, h), c;
+ }
+ for (d = r(i, d); !A.done; h++, A = l.next())
+ null !== (A = g(d, i, h, A.value, u)) &&
+ (e &&
+ null !== A.alternate &&
+ d.delete(null === A.key ? h : A.key),
+ (s = a(A, s, h)),
+ null === f ? (c = A) : (f.sibling = A),
+ (f = A));
+ return (
+ e &&
+ d.forEach(function (e) {
+ return t(i, e);
+ }),
+ Hn && On(i, h),
+ c
+ );
+ }
+ return function e(r, a, o, f) {
+ if (
+ ("object" === typeof o &&
+ null !== o &&
+ o.type === c &&
+ null === o.key &&
+ (o = o.props.children),
+ "object" === typeof o && null !== o)
+ ) {
+ switch (o.$$typeof) {
+ case l:
+ e: {
+ for (var d = o.key, h = a; null !== h; ) {
+ if (h.key === d) {
+ if ((d = o.type) === c) {
+ if (7 === h.tag) {
+ n(r, h.sibling),
+ ((a = i(h, o.props.children)).return = r),
+ (r = a);
+ break e;
+ }
+ } else if (
+ h.elementType === d ||
+ ("object" === typeof d &&
+ null !== d &&
+ d.$$typeof === y &&
+ rr(d) === h.type)
+ ) {
+ n(r, h.sibling),
+ ((a = i(h, o.props)).ref = tr(r, h, o)),
+ (a.return = r),
+ (r = a);
+ break e;
+ }
+ n(r, h);
+ break;
+ }
+ t(r, h), (h = h.sibling);
+ }
+ o.type === c
+ ? (((a = ns(
+ o.props.children,
+ r.mode,
+ f,
+ o.key
+ )).return = r),
+ (r = a))
+ : (((f = ts(
+ o.type,
+ o.key,
+ o.props,
+ null,
+ r.mode,
+ f
+ )).ref = tr(r, a, o)),
+ (f.return = r),
+ (r = f));
+ }
+ return s(r);
+ case u:
+ e: {
+ for (h = o.key; null !== a; ) {
+ if (a.key === h) {
+ if (
+ 4 === a.tag &&
+ a.stateNode.containerInfo === o.containerInfo &&
+ a.stateNode.implementation === o.implementation
+ ) {
+ n(r, a.sibling),
+ ((a = i(a, o.children || [])).return = r),
+ (r = a);
+ break e;
+ }
+ n(r, a);
+ break;
+ }
+ t(r, a), (a = a.sibling);
+ }
+ ((a = as(o, r.mode, f)).return = r), (r = a);
+ }
+ return s(r);
+ case y:
+ return e(r, a, (h = o._init)(o._payload), f);
+ }
+ if (B(o)) return A(r, a, o, f);
+ if (S(o)) return b(r, a, o, f);
+ nr(r, o);
+ }
+ return ("string" === typeof o && "" !== o) ||
+ "number" === typeof o
+ ? ((o = "" + o),
+ null !== a && 6 === a.tag
+ ? (n(r, a.sibling), ((a = i(a, o)).return = r), (r = a))
+ : (n(r, a), ((a = is(o, r.mode, f)).return = r), (r = a)),
+ s(r))
+ : n(r, a);
+ };
+ }
+ var ar = ir(!0),
+ or = ir(!1),
+ sr = {},
+ lr = ot(sr),
+ ur = ot(sr),
+ cr = ot(sr);
+ function fr(e) {
+ if (e === sr) throw Error(o(174));
+ return e;
+ }
+ function dr(e, t) {
+ lt(cr, t), lt(ur, e), lt(lr, sr), (e = L(t)), st(lr), lt(lr, e);
+ }
+ function hr() {
+ st(lr), st(ur), st(cr);
+ }
+ function pr(e) {
+ var t = fr(cr.current),
+ n = fr(lr.current);
+ n !== (t = D(n, e.type, t)) && (lt(ur, e), lt(lr, t));
+ }
+ function vr(e) {
+ ur.current === e && (st(lr), st(ur));
+ }
+ var mr = ot(0);
+ function gr(e) {
+ for (var t = e; null !== t; ) {
+ if (13 === t.tag) {
+ var n = t.memoizedState;
+ if (
+ null !== n &&
+ (null === (n = n.dehydrated) || Ue(n) || Fe(n))
+ )
+ return t;
+ } else if (
+ 19 === t.tag &&
+ void 0 !== t.memoizedProps.revealOrder
+ ) {
+ if (0 !== (128 & t.flags)) return t;
+ } else if (null !== t.child) {
+ (t.child.return = t), (t = t.child);
+ continue;
+ }
+ if (t === e) break;
+ for (; null === t.sibling; ) {
+ if (null === t.return || t.return === e) return null;
+ t = t.return;
+ }
+ (t.sibling.return = t.return), (t = t.sibling);
+ }
+ return null;
+ }
+ var Ar = [];
+ function yr() {
+ for (var e = 0; e < Ar.length; e++) {
+ var t = Ar[e];
+ W
+ ? (t._workInProgressVersionPrimary = null)
+ : (t._workInProgressVersionSecondary = null);
+ }
+ Ar.length = 0;
+ }
+ var br = s.ReactCurrentDispatcher,
+ xr = s.ReactCurrentBatchConfig,
+ Sr = 0,
+ Er = null,
+ _r = null,
+ Cr = null,
+ wr = !1,
+ Tr = !1,
+ Mr = 0,
+ Ir = 0;
+ function kr() {
+ throw Error(o(321));
+ }
+ function Rr(e, t) {
+ if (null === t) return !1;
+ for (var n = 0; n < t.length && n < e.length; n++)
+ if (!Vt(e[n], t[n])) return !1;
+ return !0;
+ }
+ function Br(e, t, n, r, i, a) {
+ if (
+ ((Sr = a),
+ (Er = t),
+ (t.memoizedState = null),
+ (t.updateQueue = null),
+ (t.lanes = 0),
+ (br.current = null === e || null === e.memoizedState ? pi : vi),
+ (e = n(r, i)),
+ Tr)
+ ) {
+ a = 0;
+ do {
+ if (((Tr = !1), (Mr = 0), 25 <= a)) throw Error(o(301));
+ (a += 1),
+ (Cr = _r = null),
+ (t.updateQueue = null),
+ (br.current = mi),
+ (e = n(r, i));
+ } while (Tr);
+ }
+ if (
+ ((br.current = hi),
+ (t = null !== _r && null !== _r.next),
+ (Sr = 0),
+ (Cr = _r = Er = null),
+ (wr = !1),
+ t)
+ )
+ throw Error(o(300));
+ return e;
+ }
+ function Pr() {
+ var e = 0 !== Mr;
+ return (Mr = 0), e;
+ }
+ function Lr() {
+ var e = {
+ memoizedState: null,
+ baseState: null,
+ baseQueue: null,
+ queue: null,
+ next: null,
+ };
+ return (
+ null === Cr ? (Er.memoizedState = Cr = e) : (Cr = Cr.next = e), Cr
+ );
+ }
+ function Dr() {
+ if (null === _r) {
+ var e = Er.alternate;
+ e = null !== e ? e.memoizedState : null;
+ } else e = _r.next;
+ var t = null === Cr ? Er.memoizedState : Cr.next;
+ if (null !== t) (Cr = t), (_r = e);
+ else {
+ if (null === e) throw Error(o(310));
+ (e = {
+ memoizedState: (_r = e).memoizedState,
+ baseState: _r.baseState,
+ baseQueue: _r.baseQueue,
+ queue: _r.queue,
+ next: null,
+ }),
+ null === Cr ? (Er.memoizedState = Cr = e) : (Cr = Cr.next = e);
+ }
+ return Cr;
+ }
+ function Ur(e, t) {
+ return "function" === typeof t ? t(e) : t;
+ }
+ function Fr(e) {
+ var t = Dr(),
+ n = t.queue;
+ if (null === n) throw Error(o(311));
+ n.lastRenderedReducer = e;
+ var r = _r,
+ i = r.baseQueue,
+ a = n.pending;
+ if (null !== a) {
+ if (null !== i) {
+ var s = i.next;
+ (i.next = a.next), (a.next = s);
+ }
+ (r.baseQueue = i = a), (n.pending = null);
+ }
+ if (null !== i) {
+ (a = i.next), (r = r.baseState);
+ var l = (s = null),
+ u = null,
+ c = a;
+ do {
+ var f = c.lane;
+ if ((Sr & f) === f)
+ null !== u &&
+ (u = u.next =
+ {
+ lane: 0,
+ action: c.action,
+ hasEagerState: c.hasEagerState,
+ eagerState: c.eagerState,
+ next: null,
+ }),
+ (r = c.hasEagerState ? c.eagerState : e(r, c.action));
+ else {
+ var d = {
+ lane: f,
+ action: c.action,
+ hasEagerState: c.hasEagerState,
+ eagerState: c.eagerState,
+ next: null,
+ };
+ null === u ? ((l = u = d), (s = r)) : (u = u.next = d),
+ (Er.lanes |= f),
+ (to |= f);
+ }
+ c = c.next;
+ } while (null !== c && c !== a);
+ null === u ? (s = r) : (u.next = l),
+ Vt(r, t.memoizedState) || (Ui = !0),
+ (t.memoizedState = r),
+ (t.baseState = s),
+ (t.baseQueue = u),
+ (n.lastRenderedState = r);
+ }
+ if (null !== (e = n.interleaved)) {
+ i = e;
+ do {
+ (a = i.lane), (Er.lanes |= a), (to |= a), (i = i.next);
+ } while (i !== e);
+ } else null === i && (n.lanes = 0);
+ return [t.memoizedState, n.dispatch];
+ }
+ function Or(e) {
+ var t = Dr(),
+ n = t.queue;
+ if (null === n) throw Error(o(311));
+ n.lastRenderedReducer = e;
+ var r = n.dispatch,
+ i = n.pending,
+ a = t.memoizedState;
+ if (null !== i) {
+ n.pending = null;
+ var s = (i = i.next);
+ do {
+ (a = e(a, s.action)), (s = s.next);
+ } while (s !== i);
+ Vt(a, t.memoizedState) || (Ui = !0),
+ (t.memoizedState = a),
+ null === t.baseQueue && (t.baseState = a),
+ (n.lastRenderedState = a);
+ }
+ return [a, r];
+ }
+ function Nr() {}
+ function Gr(e, t) {
+ var n = Er,
+ r = Dr(),
+ i = t(),
+ a = !Vt(r.memoizedState, i);
+ if (
+ (a && ((r.memoizedState = i), (Ui = !0)),
+ (r = r.queue),
+ Jr(Qr.bind(null, n, r, e), [e]),
+ r.getSnapshot !== t ||
+ a ||
+ (null !== Cr && 1 & Cr.memoizedState.tag))
+ ) {
+ if (
+ ((n.flags |= 2048),
+ jr(9, zr.bind(null, n, r, i, t), void 0, null),
+ null === Xa)
+ )
+ throw Error(o(349));
+ 0 !== (30 & Sr) || Zr(n, t, i);
+ }
+ return i;
+ }
+ function Zr(e, t, n) {
+ (e.flags |= 16384),
+ (e = { getSnapshot: t, value: n }),
+ null === (t = Er.updateQueue)
+ ? ((t = { lastEffect: null, stores: null }),
+ (Er.updateQueue = t),
+ (t.stores = [e]))
+ : null === (n = t.stores)
+ ? (t.stores = [e])
+ : n.push(e);
+ }
+ function zr(e, t, n, r) {
+ (t.value = n), (t.getSnapshot = r), Hr(t) && Eo(e, 1, -1);
+ }
+ function Qr(e, t, n) {
+ return n(function () {
+ Hr(t) && Eo(e, 1, -1);
+ });
+ }
+ function Hr(e) {
+ var t = e.getSnapshot;
+ e = e.value;
+ try {
+ var n = t();
+ return !Vt(e, n);
+ } catch (r) {
+ return !0;
+ }
+ }
+ function Vr(e) {
+ var t = Lr();
+ return (
+ "function" === typeof e && (e = e()),
+ (t.memoizedState = t.baseState = e),
+ (e = {
+ pending: null,
+ interleaved: null,
+ lanes: 0,
+ dispatch: null,
+ lastRenderedReducer: Ur,
+ lastRenderedState: e,
+ }),
+ (t.queue = e),
+ (e = e.dispatch = li.bind(null, Er, e)),
+ [t.memoizedState, e]
+ );
+ }
+ function jr(e, t, n, r) {
+ return (
+ (e = { tag: e, create: t, destroy: n, deps: r, next: null }),
+ null === (t = Er.updateQueue)
+ ? ((t = { lastEffect: null, stores: null }),
+ (Er.updateQueue = t),
+ (t.lastEffect = e.next = e))
+ : null === (n = t.lastEffect)
+ ? (t.lastEffect = e.next = e)
+ : ((r = n.next),
+ (n.next = e),
+ (e.next = r),
+ (t.lastEffect = e)),
+ e
+ );
+ }
+ function Wr() {
+ return Dr().memoizedState;
+ }
+ function Xr(e, t, n, r) {
+ var i = Lr();
+ (Er.flags |= e),
+ (i.memoizedState = jr(1 | t, n, void 0, void 0 === r ? null : r));
+ }
+ function Yr(e, t, n, r) {
+ var i = Dr();
+ r = void 0 === r ? null : r;
+ var a = void 0;
+ if (null !== _r) {
+ var o = _r.memoizedState;
+ if (((a = o.destroy), null !== r && Rr(r, o.deps)))
+ return void (i.memoizedState = jr(t, n, a, r));
+ }
+ (Er.flags |= e), (i.memoizedState = jr(1 | t, n, a, r));
+ }
+ function qr(e, t) {
+ return Xr(8390656, 8, e, t);
+ }
+ function Jr(e, t) {
+ return Yr(2048, 8, e, t);
+ }
+ function Kr(e, t) {
+ return Yr(4, 2, e, t);
+ }
+ function $r(e, t) {
+ return Yr(4, 4, e, t);
+ }
+ function ei(e, t) {
+ return "function" === typeof t
+ ? ((e = e()),
+ t(e),
+ function () {
+ t(null);
+ })
+ : null !== t && void 0 !== t
+ ? ((e = e()),
+ (t.current = e),
+ function () {
+ t.current = null;
+ })
+ : void 0;
+ }
+ function ti(e, t, n) {
+ return (
+ (n = null !== n && void 0 !== n ? n.concat([e]) : null),
+ Yr(4, 4, ei.bind(null, t, e), n)
+ );
+ }
+ function ni() {}
+ function ri(e, t) {
+ var n = Dr();
+ t = void 0 === t ? null : t;
+ var r = n.memoizedState;
+ return null !== r && null !== t && Rr(t, r[1])
+ ? r[0]
+ : ((n.memoizedState = [e, t]), e);
+ }
+ function ii(e, t) {
+ var n = Dr();
+ t = void 0 === t ? null : t;
+ var r = n.memoizedState;
+ return null !== r && null !== t && Rr(t, r[1])
+ ? r[0]
+ : ((e = e()), (n.memoizedState = [e, t]), e);
+ }
+ function ai(e, t) {
+ var n = Bt;
+ (Bt = 0 !== n && 4 > n ? n : 4), e(!0);
+ var r = xr.transition;
+ xr.transition = {};
+ try {
+ e(!1), t();
+ } finally {
+ (Bt = n), (xr.transition = r);
+ }
+ }
+ function oi() {
+ return Dr().memoizedState;
+ }
+ function si(e, t, n) {
+ var r = So(e);
+ (n = {
+ lane: r,
+ action: n,
+ hasEagerState: !1,
+ eagerState: null,
+ next: null,
+ }),
+ ui(e)
+ ? ci(t, n)
+ : (fi(e, t, n),
+ null !== (e = Eo(e, r, (n = xo()))) && di(e, t, r));
+ }
+ function li(e, t, n) {
+ var r = So(e),
+ i = {
+ lane: r,
+ action: n,
+ hasEagerState: !1,
+ eagerState: null,
+ next: null,
+ };
+ if (ui(e)) ci(t, i);
+ else {
+ fi(e, t, i);
+ var a = e.alternate;
+ if (
+ 0 === e.lanes &&
+ (null === a || 0 === a.lanes) &&
+ null !== (a = t.lastRenderedReducer)
+ )
+ try {
+ var o = t.lastRenderedState,
+ s = a(o, n);
+ if (((i.hasEagerState = !0), (i.eagerState = s), Vt(s, o)))
+ return;
+ } catch (l) {}
+ null !== (e = Eo(e, r, (n = xo()))) && di(e, t, r);
+ }
+ }
+ function ui(e) {
+ var t = e.alternate;
+ return e === Er || (null !== t && t === Er);
+ }
+ function ci(e, t) {
+ Tr = wr = !0;
+ var n = e.pending;
+ null === n ? (t.next = t) : ((t.next = n.next), (n.next = t)),
+ (e.pending = t);
+ }
+ function fi(e, t, n) {
+ null !== Xa && 0 !== (1 & e.mode) && 0 === (2 & Wa)
+ ? (null === (e = t.interleaved)
+ ? ((n.next = n), null === dn ? (dn = [t]) : dn.push(t))
+ : ((n.next = e.next), (e.next = n)),
+ (t.interleaved = n))
+ : (null === (e = t.pending)
+ ? (n.next = n)
+ : ((n.next = e.next), (e.next = n)),
+ (t.pending = n));
+ }
+ function di(e, t, n) {
+ if (0 !== (4194240 & n)) {
+ var r = t.lanes;
+ (n |= r &= e.pendingLanes), (t.lanes = n), Rt(e, n);
+ }
+ }
+ var hi = {
+ readContext: fn,
+ useCallback: kr,
+ useContext: kr,
+ useEffect: kr,
+ useImperativeHandle: kr,
+ useInsertionEffect: kr,
+ useLayoutEffect: kr,
+ useMemo: kr,
+ useReducer: kr,
+ useRef: kr,
+ useState: kr,
+ useDebugValue: kr,
+ useDeferredValue: kr,
+ useTransition: kr,
+ useMutableSource: kr,
+ useSyncExternalStore: kr,
+ useId: kr,
+ unstable_isNewReconciler: !1,
+ },
+ pi = {
+ readContext: fn,
+ useCallback: function (e, t) {
+ return (Lr().memoizedState = [e, void 0 === t ? null : t]), e;
+ },
+ useContext: fn,
+ useEffect: qr,
+ useImperativeHandle: function (e, t, n) {
+ return (
+ (n = null !== n && void 0 !== n ? n.concat([e]) : null),
+ Xr(4194308, 4, ei.bind(null, t, e), n)
+ );
+ },
+ useLayoutEffect: function (e, t) {
+ return Xr(4194308, 4, e, t);
+ },
+ useInsertionEffect: function (e, t) {
+ return Xr(4, 2, e, t);
+ },
+ useMemo: function (e, t) {
+ var n = Lr();
+ return (
+ (t = void 0 === t ? null : t),
+ (e = e()),
+ (n.memoizedState = [e, t]),
+ e
+ );
+ },
+ useReducer: function (e, t, n) {
+ var r = Lr();
+ return (
+ (t = void 0 !== n ? n(t) : t),
+ (r.memoizedState = r.baseState = t),
+ (e = {
+ pending: null,
+ interleaved: null,
+ lanes: 0,
+ dispatch: null,
+ lastRenderedReducer: e,
+ lastRenderedState: t,
+ }),
+ (r.queue = e),
+ (e = e.dispatch = si.bind(null, Er, e)),
+ [r.memoizedState, e]
+ );
+ },
+ useRef: function (e) {
+ return (e = { current: e }), (Lr().memoizedState = e);
+ },
+ useState: Vr,
+ useDebugValue: ni,
+ useDeferredValue: function (e) {
+ var t = Vr(e),
+ n = t[0],
+ r = t[1];
+ return (
+ qr(
+ function () {
+ var t = xr.transition;
+ xr.transition = {};
+ try {
+ r(e);
+ } finally {
+ xr.transition = t;
+ }
+ },
+ [e]
+ ),
+ n
+ );
+ },
+ useTransition: function () {
+ var e = Vr(!1),
+ t = e[0];
+ return (
+ (e = ai.bind(null, e[1])), (Lr().memoizedState = e), [t, e]
+ );
+ },
+ useMutableSource: function () {},
+ useSyncExternalStore: function (e, t, n) {
+ var r = Er,
+ i = Lr();
+ if (Hn) {
+ if (void 0 === n) throw Error(o(407));
+ n = n();
+ } else {
+ if (((n = t()), null === Xa)) throw Error(o(349));
+ 0 !== (30 & Sr) || Zr(r, t, n);
+ }
+ i.memoizedState = n;
+ var a = { value: n, getSnapshot: t };
+ return (
+ (i.queue = a),
+ qr(Qr.bind(null, r, a, e), [e]),
+ (r.flags |= 2048),
+ jr(9, zr.bind(null, r, a, n, t), void 0, null),
+ n
+ );
+ },
+ useId: function () {
+ var e = Lr(),
+ t = Xa.identifierPrefix;
+ if (Hn) {
+ var n = Fn;
+ (t =
+ ":" +
+ t +
+ "R" +
+ (n = (Un & ~(1 << (32 - bt(Un) - 1))).toString(32) + n)),
+ 0 < (n = Mr++) && (t += "H" + n.toString(32)),
+ (t += ":");
+ } else t = ":" + t + "r" + (n = Ir++).toString(32) + ":";
+ return (e.memoizedState = t);
+ },
+ unstable_isNewReconciler: !1,
+ },
+ vi = {
+ readContext: fn,
+ useCallback: ri,
+ useContext: fn,
+ useEffect: Jr,
+ useImperativeHandle: ti,
+ useInsertionEffect: Kr,
+ useLayoutEffect: $r,
+ useMemo: ii,
+ useReducer: Fr,
+ useRef: Wr,
+ useState: function () {
+ return Fr(Ur);
+ },
+ useDebugValue: ni,
+ useDeferredValue: function (e) {
+ var t = Fr(Ur),
+ n = t[0],
+ r = t[1];
+ return (
+ Jr(
+ function () {
+ var t = xr.transition;
+ xr.transition = {};
+ try {
+ r(e);
+ } finally {
+ xr.transition = t;
+ }
+ },
+ [e]
+ ),
+ n
+ );
+ },
+ useTransition: function () {
+ return [Fr(Ur)[0], Dr().memoizedState];
+ },
+ useMutableSource: Nr,
+ useSyncExternalStore: Gr,
+ useId: oi,
+ unstable_isNewReconciler: !1,
+ },
+ mi = {
+ readContext: fn,
+ useCallback: ri,
+ useContext: fn,
+ useEffect: Jr,
+ useImperativeHandle: ti,
+ useInsertionEffect: Kr,
+ useLayoutEffect: $r,
+ useMemo: ii,
+ useReducer: Or,
+ useRef: Wr,
+ useState: function () {
+ return Or(Ur);
+ },
+ useDebugValue: ni,
+ useDeferredValue: function (e) {
+ var t = Or(Ur),
+ n = t[0],
+ r = t[1];
+ return (
+ Jr(
+ function () {
+ var t = xr.transition;
+ xr.transition = {};
+ try {
+ r(e);
+ } finally {
+ xr.transition = t;
+ }
+ },
+ [e]
+ ),
+ n
+ );
+ },
+ useTransition: function () {
+ return [Or(Ur)[0], Dr().memoizedState];
+ },
+ useMutableSource: Nr,
+ useSyncExternalStore: Gr,
+ useId: oi,
+ unstable_isNewReconciler: !1,
+ };
+ function gi(e, t) {
+ try {
+ var n = "",
+ r = t;
+ do {
+ (n += $t(r)), (r = r.return);
+ } while (r);
+ var i = n;
+ } catch (a) {
+ i = "\nError generating stack: " + a.message + "\n" + a.stack;
+ }
+ return { value: e, source: t, stack: i };
+ }
+ function Ai(e, t) {
+ try {
+ console.error(t.value);
+ } catch (n) {
+ setTimeout(function () {
+ throw n;
+ });
+ }
+ }
+ var yi,
+ bi,
+ xi,
+ Si,
+ Ei = "function" === typeof WeakMap ? WeakMap : Map;
+ function _i(e, t, n) {
+ ((n = mn(-1, n)).tag = 3), (n.payload = { element: null });
+ var r = t.value;
+ return (
+ (n.callback = function () {
+ co || ((co = !0), (fo = r)), Ai(0, t);
+ }),
+ n
+ );
+ }
+ function Ci(e, t, n) {
+ (n = mn(-1, n)).tag = 3;
+ var r = e.type.getDerivedStateFromError;
+ if ("function" === typeof r) {
+ var i = t.value;
+ (n.payload = function () {
+ return r(i);
+ }),
+ (n.callback = function () {
+ Ai(0, t);
+ });
+ }
+ var a = e.stateNode;
+ return (
+ null !== a &&
+ "function" === typeof a.componentDidCatch &&
+ (n.callback = function () {
+ Ai(0, t),
+ "function" !== typeof r &&
+ (null === ho ? (ho = new Set([this])) : ho.add(this));
+ var e = t.stack;
+ this.componentDidCatch(t.value, {
+ componentStack: null !== e ? e : "",
+ });
+ }),
+ n
+ );
+ }
+ function wi(e, t, n) {
+ var r = e.pingCache;
+ if (null === r) {
+ r = e.pingCache = new Ei();
+ var i = new Set();
+ r.set(t, i);
+ } else void 0 === (i = r.get(t)) && ((i = new Set()), r.set(t, i));
+ i.has(n) || (i.add(n), (e = jo.bind(null, e, t, n)), t.then(e, e));
+ }
+ function Ti(e) {
+ do {
+ var t;
+ if (
+ ((t = 13 === e.tag) &&
+ (t = null === (t = e.memoizedState) || null !== t.dehydrated),
+ t)
+ )
+ return e;
+ e = e.return;
+ } while (null !== e);
+ return null;
+ }
+ function Mi(e, t, n, r, i) {
+ return 0 === (1 & e.mode)
+ ? (e === t
+ ? (e.flags |= 65536)
+ : ((e.flags |= 128),
+ (n.flags |= 131072),
+ (n.flags &= -52805),
+ 1 === n.tag &&
+ (null === n.alternate
+ ? (n.tag = 17)
+ : (((t = mn(-1, 1)).tag = 2), gn(n, t))),
+ (n.lanes |= 1)),
+ e)
+ : ((e.flags |= 65536), (e.lanes = i), e);
+ }
+ function Ii(e) {
+ e.flags |= 4;
+ }
+ function ki(e, t) {
+ if (null !== e && e.child === t.child) return !0;
+ if (0 !== (16 & t.flags)) return !1;
+ for (e = t.child; null !== e; ) {
+ if (0 !== (12854 & e.flags) || 0 !== (12854 & e.subtreeFlags))
+ return !1;
+ e = e.sibling;
+ }
+ return !0;
+ }
+ if (X)
+ (yi = function (e, t) {
+ for (var n = t.child; null !== n; ) {
+ if (5 === n.tag || 6 === n.tag) N(e, n.stateNode);
+ else if (4 !== n.tag && null !== n.child) {
+ (n.child.return = n), (n = n.child);
+ continue;
+ }
+ if (n === t) break;
+ for (; null === n.sibling; ) {
+ if (null === n.return || n.return === t) return;
+ n = n.return;
+ }
+ (n.sibling.return = n.return), (n = n.sibling);
+ }
+ }),
+ (bi = function () {}),
+ (xi = function (e, t, n, r, i) {
+ if ((e = e.memoizedProps) !== r) {
+ var a = t.stateNode,
+ o = fr(lr.current);
+ (n = Z(a, n, e, r, i, o)), (t.updateQueue = n) && Ii(t);
+ }
+ }),
+ (Si = function (e, t, n, r) {
+ n !== r && Ii(t);
+ });
+ else if (Y) {
+ yi = function (e, t, n, r) {
+ for (var i = t.child; null !== i; ) {
+ if (5 === i.tag) {
+ var a = i.stateNode;
+ n && r && (a = Re(a, i.type, i.memoizedProps, i)), N(e, a);
+ } else if (6 === i.tag)
+ (a = i.stateNode),
+ n && r && (a = Be(a, i.memoizedProps, i)),
+ N(e, a);
+ else if (4 !== i.tag)
+ if (22 === i.tag && null !== i.memoizedState)
+ null !== (a = i.child) && (a.return = i), yi(e, i, !0, !0);
+ else if (null !== i.child) {
+ (i.child.return = i), (i = i.child);
+ continue;
+ }
+ if (i === t) break;
+ for (; null === i.sibling; ) {
+ if (null === i.return || i.return === t) return;
+ i = i.return;
+ }
+ (i.sibling.return = i.return), (i = i.sibling);
+ }
+ };
+ var Ri = function e(t, n, r, i) {
+ for (var a = n.child; null !== a; ) {
+ if (5 === a.tag) {
+ var o = a.stateNode;
+ r && i && (o = Re(o, a.type, a.memoizedProps, a)), Me(t, o);
+ } else if (6 === a.tag)
+ (o = a.stateNode),
+ r && i && (o = Be(o, a.memoizedProps, a)),
+ Me(t, o);
+ else if (4 !== a.tag)
+ if (22 === a.tag && null !== a.memoizedState)
+ null !== (o = a.child) && (o.return = a), e(t, a, !0, !0);
+ else if (null !== a.child) {
+ (a.child.return = a), (a = a.child);
+ continue;
+ }
+ if (a === n) break;
+ for (; null === a.sibling; ) {
+ if (null === a.return || a.return === n) return;
+ a = a.return;
+ }
+ (a.sibling.return = a.return), (a = a.sibling);
+ }
+ };
+ (bi = function (e, t) {
+ var n = t.stateNode;
+ if (!ki(e, t)) {
+ e = n.containerInfo;
+ var r = Te(e);
+ Ri(r, t, !1, !1), (n.pendingChildren = r), Ii(t), Ie(e, r);
+ }
+ }),
+ (xi = function (e, t, n, r, i) {
+ var a = e.stateNode,
+ o = e.memoizedProps;
+ if ((e = ki(e, t)) && o === r) t.stateNode = a;
+ else {
+ var s = t.stateNode,
+ l = fr(lr.current),
+ u = null;
+ o !== r && (u = Z(s, n, o, r, i, l)),
+ e && null === u
+ ? (t.stateNode = a)
+ : ((a = we(a, u, n, o, r, t, e, s)),
+ G(a, n, r, i, l) && Ii(t),
+ (t.stateNode = a),
+ e ? Ii(t) : yi(a, t, !1, !1));
+ }
+ }),
+ (Si = function (e, t, n, r) {
+ n !== r
+ ? ((e = fr(cr.current)),
+ (n = fr(lr.current)),
+ (t.stateNode = Q(r, e, n, t)),
+ Ii(t))
+ : (t.stateNode = e.stateNode);
+ });
+ } else
+ (bi = function () {}), (xi = function () {}), (Si = function () {});
+ function Bi(e, t) {
+ if (!Hn)
+ switch (e.tailMode) {
+ case "hidden":
+ t = e.tail;
+ for (var n = null; null !== t; )
+ null !== t.alternate && (n = t), (t = t.sibling);
+ null === n ? (e.tail = null) : (n.sibling = null);
+ break;
+ case "collapsed":
+ n = e.tail;
+ for (var r = null; null !== n; )
+ null !== n.alternate && (r = n), (n = n.sibling);
+ null === r
+ ? t || null === e.tail
+ ? (e.tail = null)
+ : (e.tail.sibling = null)
+ : (r.sibling = null);
+ }
+ }
+ function Pi(e) {
+ var t = null !== e.alternate && e.alternate.child === e.child,
+ n = 0,
+ r = 0;
+ if (t)
+ for (var i = e.child; null !== i; )
+ (n |= i.lanes | i.childLanes),
+ (r |= 14680064 & i.subtreeFlags),
+ (r |= 14680064 & i.flags),
+ (i.return = e),
+ (i = i.sibling);
+ else
+ for (i = e.child; null !== i; )
+ (n |= i.lanes | i.childLanes),
+ (r |= i.subtreeFlags),
+ (r |= i.flags),
+ (i.return = e),
+ (i = i.sibling);
+ return (e.subtreeFlags |= r), (e.childLanes = n), t;
+ }
+ function Li(e, t, n) {
+ var r = t.pendingProps;
+ switch ((Zn(t), t.tag)) {
+ case 2:
+ case 16:
+ case 15:
+ case 0:
+ case 11:
+ case 7:
+ case 8:
+ case 12:
+ case 9:
+ case 14:
+ return Pi(t), null;
+ case 1:
+ case 17:
+ return pt(t.type) && vt(), Pi(t), null;
+ case 3:
+ return (
+ (r = t.stateNode),
+ hr(),
+ st(ft),
+ st(ct),
+ yr(),
+ r.pendingContext &&
+ ((r.context = r.pendingContext), (r.pendingContext = null)),
+ (null !== e && null !== e.child) ||
+ (Kn(t)
+ ? Ii(t)
+ : null === e ||
+ (e.memoizedState.isDehydrated &&
+ 0 === (256 & t.flags)) ||
+ ((t.flags |= 1024),
+ null !== jn && (Mo(jn), (jn = null)))),
+ bi(e, t),
+ Pi(t),
+ null
+ );
+ case 5:
+ vr(t), (n = fr(cr.current));
+ var i = t.type;
+ if (null !== e && null != t.stateNode)
+ xi(e, t, i, r, n),
+ e.ref !== t.ref && ((t.flags |= 512), (t.flags |= 2097152));
+ else {
+ if (!r) {
+ if (null === t.stateNode) throw Error(o(166));
+ return Pi(t), null;
+ }
+ if (((e = fr(lr.current)), Kn(t))) {
+ if (!q) throw Error(o(175));
+ (e = Qe(
+ t.stateNode,
+ t.type,
+ t.memoizedProps,
+ n,
+ e,
+ t,
+ !Vn
+ )),
+ (t.updateQueue = e),
+ null !== e && Ii(t);
+ } else {
+ var a = O(i, r, n, e, t);
+ yi(a, t, !1, !1),
+ (t.stateNode = a),
+ G(a, i, r, n, e) && Ii(t);
+ }
+ null !== t.ref && ((t.flags |= 512), (t.flags |= 2097152));
+ }
+ return Pi(t), null;
+ case 6:
+ if (e && null != t.stateNode) Si(e, t, e.memoizedProps, r);
+ else {
+ if ("string" !== typeof r && null === t.stateNode)
+ throw Error(o(166));
+ if (((e = fr(cr.current)), (n = fr(lr.current)), Kn(t))) {
+ if (!q) throw Error(o(176));
+ if (
+ ((e = t.stateNode),
+ (r = t.memoizedProps),
+ (n = He(e, r, t, !Vn)) && null !== (i = zn))
+ )
+ switch (((a = 0 !== (1 & i.mode)), i.tag)) {
+ case 3:
+ Ke(i.stateNode.containerInfo, e, r, a);
+ break;
+ case 5:
+ $e(i.type, i.memoizedProps, i.stateNode, e, r, a);
+ }
+ n && Ii(t);
+ } else t.stateNode = Q(r, e, n, t);
+ }
+ return Pi(t), null;
+ case 13:
+ if (
+ (st(mr),
+ (r = t.memoizedState),
+ Hn &&
+ null !== Qn &&
+ 0 !== (1 & t.mode) &&
+ 0 === (128 & t.flags))
+ ) {
+ for (e = Qn; e; ) e = Ne(e);
+ return $n(), (t.flags |= 98560), t;
+ }
+ if (null !== r && null !== r.dehydrated) {
+ if (((r = Kn(t)), null === e)) {
+ if (!r) throw Error(o(318));
+ if (!q) throw Error(o(344));
+ if (
+ !(e =
+ null !== (e = t.memoizedState) ? e.dehydrated : null)
+ )
+ throw Error(o(317));
+ Ve(e, t);
+ } else
+ $n(),
+ 0 === (128 & t.flags) && (t.memoizedState = null),
+ (t.flags |= 4);
+ return Pi(t), null;
+ }
+ return (
+ null !== jn && (Mo(jn), (jn = null)),
+ 0 !== (128 & t.flags)
+ ? ((t.lanes = n), t)
+ : ((r = null !== r),
+ (n = !1),
+ null === e ? Kn(t) : (n = null !== e.memoizedState),
+ r &&
+ !n &&
+ ((t.child.flags |= 8192),
+ 0 !== (1 & t.mode) &&
+ (null === e || 0 !== (1 & mr.current)
+ ? 0 === $a && ($a = 3)
+ : Uo())),
+ null !== t.updateQueue && (t.flags |= 4),
+ Pi(t),
+ null)
+ );
+ case 4:
+ return (
+ hr(),
+ bi(e, t),
+ null === e && K(t.stateNode.containerInfo),
+ Pi(t),
+ null
+ );
+ case 10:
+ return ln(t.type._context), Pi(t), null;
+ case 19:
+ if ((st(mr), null === (i = t.memoizedState)))
+ return Pi(t), null;
+ if (((r = 0 !== (128 & t.flags)), null === (a = i.rendering)))
+ if (r) Bi(i, !1);
+ else {
+ if (0 !== $a || (null !== e && 0 !== (128 & e.flags)))
+ for (e = t.child; null !== e; ) {
+ if (null !== (a = gr(e))) {
+ for (
+ t.flags |= 128,
+ Bi(i, !1),
+ null !== (e = a.updateQueue) &&
+ ((t.updateQueue = e), (t.flags |= 4)),
+ t.subtreeFlags = 0,
+ e = n,
+ r = t.child;
+ null !== r;
+
+ )
+ (i = e),
+ ((n = r).flags &= 14680066),
+ null === (a = n.alternate)
+ ? ((n.childLanes = 0),
+ (n.lanes = i),
+ (n.child = null),
+ (n.subtreeFlags = 0),
+ (n.memoizedProps = null),
+ (n.memoizedState = null),
+ (n.updateQueue = null),
+ (n.dependencies = null),
+ (n.stateNode = null))
+ : ((n.childLanes = a.childLanes),
+ (n.lanes = a.lanes),
+ (n.child = a.child),
+ (n.subtreeFlags = 0),
+ (n.deletions = null),
+ (n.memoizedProps = a.memoizedProps),
+ (n.memoizedState = a.memoizedState),
+ (n.updateQueue = a.updateQueue),
+ (n.type = a.type),
+ (i = a.dependencies),
+ (n.dependencies =
+ null === i
+ ? null
+ : {
+ lanes: i.lanes,
+ firstContext: i.firstContext,
+ })),
+ (r = r.sibling);
+ return lt(mr, (1 & mr.current) | 2), t.child;
+ }
+ e = e.sibling;
+ }
+ null !== i.tail &&
+ Ot() > so &&
+ ((t.flags |= 128),
+ (r = !0),
+ Bi(i, !1),
+ (t.lanes = 4194304));
+ }
+ else {
+ if (!r)
+ if (null !== (e = gr(a))) {
+ if (
+ ((t.flags |= 128),
+ (r = !0),
+ null !== (e = e.updateQueue) &&
+ ((t.updateQueue = e), (t.flags |= 4)),
+ Bi(i, !0),
+ null === i.tail &&
+ "hidden" === i.tailMode &&
+ !a.alternate &&
+ !Hn)
+ )
+ return Pi(t), null;
+ } else
+ 2 * Ot() - i.renderingStartTime > so &&
+ 1073741824 !== n &&
+ ((t.flags |= 128),
+ (r = !0),
+ Bi(i, !1),
+ (t.lanes = 4194304));
+ i.isBackwards
+ ? ((a.sibling = t.child), (t.child = a))
+ : (null !== (e = i.last) ? (e.sibling = a) : (t.child = a),
+ (i.last = a));
+ }
+ return null !== i.tail
+ ? ((t = i.tail),
+ (i.rendering = t),
+ (i.tail = t.sibling),
+ (i.renderingStartTime = Ot()),
+ (t.sibling = null),
+ (e = mr.current),
+ lt(mr, r ? (1 & e) | 2 : 1 & e),
+ t)
+ : (Pi(t), null);
+ case 22:
+ case 23:
+ return (
+ Bo(),
+ (r = null !== t.memoizedState),
+ null !== e &&
+ (null !== e.memoizedState) !== r &&
+ (t.flags |= 8192),
+ r && 0 !== (1 & t.mode)
+ ? 0 !== (1073741824 & Ja) &&
+ (Pi(t), X && 6 & t.subtreeFlags && (t.flags |= 8192))
+ : Pi(t),
+ null
+ );
+ case 24:
+ case 25:
+ return null;
+ }
+ throw Error(o(156, t.tag));
+ }
+ var Di = s.ReactCurrentOwner,
+ Ui = !1;
+ function Fi(e, t, n, r) {
+ t.child = null === e ? or(t, null, n, r) : ar(t, e.child, n, r);
+ }
+ function Oi(e, t, n, r, i) {
+ n = n.render;
+ var a = t.ref;
+ return (
+ cn(t, i),
+ (r = Br(e, t, n, r, a, i)),
+ (n = Pr()),
+ null === e || Ui
+ ? (Hn && n && Gn(t), (t.flags |= 1), Fi(e, t, r, i), t.child)
+ : ((t.updateQueue = e.updateQueue),
+ (t.flags &= -2053),
+ (e.lanes &= ~i),
+ ia(e, t, i))
+ );
+ }
+ function Ni(e, t, n, r, i) {
+ if (null === e) {
+ var a = n.type;
+ return "function" !== typeof a ||
+ $o(a) ||
+ void 0 !== a.defaultProps ||
+ null !== n.compare ||
+ void 0 !== n.defaultProps
+ ? (((e = ts(n.type, null, r, t, t.mode, i)).ref = t.ref),
+ (e.return = t),
+ (t.child = e))
+ : ((t.tag = 15), (t.type = a), Gi(e, t, a, r, i));
+ }
+ if (((a = e.child), 0 === (e.lanes & i))) {
+ var o = a.memoizedProps;
+ if (
+ (n = null !== (n = n.compare) ? n : Kt)(o, r) &&
+ e.ref === t.ref
+ )
+ return ia(e, t, i);
+ }
+ return (
+ (t.flags |= 1),
+ ((e = es(a, r)).ref = t.ref),
+ (e.return = t),
+ (t.child = e)
+ );
+ }
+ function Gi(e, t, n, r, i) {
+ if (null !== e && Kt(e.memoizedProps, r) && e.ref === t.ref) {
+ if (((Ui = !1), 0 === (e.lanes & i)))
+ return (t.lanes = e.lanes), ia(e, t, i);
+ 0 !== (131072 & e.flags) && (Ui = !0);
+ }
+ return Qi(e, t, n, r, i);
+ }
+ function Zi(e, t, n) {
+ var r = t.pendingProps,
+ i = r.children,
+ a = null !== e ? e.memoizedState : null;
+ if ("hidden" === r.mode)
+ if (0 === (1 & t.mode))
+ (t.memoizedState = { baseLanes: 0, cachePool: null }),
+ lt(Ka, Ja),
+ (Ja |= n);
+ else {
+ if (0 === (1073741824 & n))
+ return (
+ (e = null !== a ? a.baseLanes | n : n),
+ (t.lanes = t.childLanes = 1073741824),
+ (t.memoizedState = { baseLanes: e, cachePool: null }),
+ (t.updateQueue = null),
+ lt(Ka, Ja),
+ (Ja |= e),
+ null
+ );
+ (t.memoizedState = { baseLanes: 0, cachePool: null }),
+ (r = null !== a ? a.baseLanes : n),
+ lt(Ka, Ja),
+ (Ja |= r);
+ }
+ else
+ null !== a
+ ? ((r = a.baseLanes | n), (t.memoizedState = null))
+ : (r = n),
+ lt(Ka, Ja),
+ (Ja |= r);
+ return Fi(e, t, i, n), t.child;
+ }
+ function zi(e, t) {
+ var n = t.ref;
+ ((null === e && null !== n) || (null !== e && e.ref !== n)) &&
+ ((t.flags |= 512), (t.flags |= 2097152));
+ }
+ function Qi(e, t, n, r, i) {
+ var a = pt(n) ? dt : ct.current;
+ return (
+ (a = ht(t, a)),
+ cn(t, i),
+ (n = Br(e, t, n, r, a, i)),
+ (r = Pr()),
+ null === e || Ui
+ ? (Hn && r && Gn(t), (t.flags |= 1), Fi(e, t, n, i), t.child)
+ : ((t.updateQueue = e.updateQueue),
+ (t.flags &= -2053),
+ (e.lanes &= ~i),
+ ia(e, t, i))
+ );
+ }
+ function Hi(e, t, n, r, i) {
+ if (pt(n)) {
+ var a = !0;
+ At(t);
+ } else a = !1;
+ if ((cn(t, i), null === t.stateNode))
+ null !== e &&
+ ((e.alternate = null), (t.alternate = null), (t.flags |= 2)),
+ wn(t, n, r),
+ Mn(t, n, r, i),
+ (r = !0);
+ else if (null === e) {
+ var o = t.stateNode,
+ s = t.memoizedProps;
+ o.props = s;
+ var l = o.context,
+ u = n.contextType;
+ "object" === typeof u && null !== u
+ ? (u = fn(u))
+ : (u = ht(t, (u = pt(n) ? dt : ct.current)));
+ var c = n.getDerivedStateFromProps,
+ f =
+ "function" === typeof c ||
+ "function" === typeof o.getSnapshotBeforeUpdate;
+ f ||
+ ("function" !== typeof o.UNSAFE_componentWillReceiveProps &&
+ "function" !== typeof o.componentWillReceiveProps) ||
+ ((s !== r || l !== u) && Tn(t, o, r, u)),
+ (hn = !1);
+ var d = t.memoizedState;
+ (o.state = d),
+ bn(t, r, o, i),
+ (l = t.memoizedState),
+ s !== r || d !== l || ft.current || hn
+ ? ("function" === typeof c &&
+ (En(t, n, c, r), (l = t.memoizedState)),
+ (s = hn || Cn(t, n, s, r, d, l, u))
+ ? (f ||
+ ("function" !== typeof o.UNSAFE_componentWillMount &&
+ "function" !== typeof o.componentWillMount) ||
+ ("function" === typeof o.componentWillMount &&
+ o.componentWillMount(),
+ "function" === typeof o.UNSAFE_componentWillMount &&
+ o.UNSAFE_componentWillMount()),
+ "function" === typeof o.componentDidMount &&
+ (t.flags |= 4194308))
+ : ("function" === typeof o.componentDidMount &&
+ (t.flags |= 4194308),
+ (t.memoizedProps = r),
+ (t.memoizedState = l)),
+ (o.props = r),
+ (o.state = l),
+ (o.context = u),
+ (r = s))
+ : ("function" === typeof o.componentDidMount &&
+ (t.flags |= 4194308),
+ (r = !1));
+ } else {
+ (o = t.stateNode),
+ vn(e, t),
+ (s = t.memoizedProps),
+ (u = t.type === t.elementType ? s : en(t.type, s)),
+ (o.props = u),
+ (f = t.pendingProps),
+ (d = o.context),
+ "object" === typeof (l = n.contextType) && null !== l
+ ? (l = fn(l))
+ : (l = ht(t, (l = pt(n) ? dt : ct.current)));
+ var h = n.getDerivedStateFromProps;
+ (c =
+ "function" === typeof h ||
+ "function" === typeof o.getSnapshotBeforeUpdate) ||
+ ("function" !== typeof o.UNSAFE_componentWillReceiveProps &&
+ "function" !== typeof o.componentWillReceiveProps) ||
+ ((s !== f || d !== l) && Tn(t, o, r, l)),
+ (hn = !1),
+ (d = t.memoizedState),
+ (o.state = d),
+ bn(t, r, o, i);
+ var p = t.memoizedState;
+ s !== f || d !== p || ft.current || hn
+ ? ("function" === typeof h &&
+ (En(t, n, h, r), (p = t.memoizedState)),
+ (u = hn || Cn(t, n, u, r, d, p, l) || !1)
+ ? (c ||
+ ("function" !== typeof o.UNSAFE_componentWillUpdate &&
+ "function" !== typeof o.componentWillUpdate) ||
+ ("function" === typeof o.componentWillUpdate &&
+ o.componentWillUpdate(r, p, l),
+ "function" === typeof o.UNSAFE_componentWillUpdate &&
+ o.UNSAFE_componentWillUpdate(r, p, l)),
+ "function" === typeof o.componentDidUpdate &&
+ (t.flags |= 4),
+ "function" === typeof o.getSnapshotBeforeUpdate &&
+ (t.flags |= 1024))
+ : ("function" !== typeof o.componentDidUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 4),
+ "function" !== typeof o.getSnapshotBeforeUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 1024),
+ (t.memoizedProps = r),
+ (t.memoizedState = p)),
+ (o.props = r),
+ (o.state = p),
+ (o.context = l),
+ (r = u))
+ : ("function" !== typeof o.componentDidUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 4),
+ "function" !== typeof o.getSnapshotBeforeUpdate ||
+ (s === e.memoizedProps && d === e.memoizedState) ||
+ (t.flags |= 1024),
+ (r = !1));
+ }
+ return Vi(e, t, n, r, a, i);
+ }
+ function Vi(e, t, n, r, i, a) {
+ zi(e, t);
+ var o = 0 !== (128 & t.flags);
+ if (!r && !o) return i && yt(t, n, !1), ia(e, t, a);
+ (r = t.stateNode), (Di.current = t);
+ var s =
+ o && "function" !== typeof n.getDerivedStateFromError
+ ? null
+ : r.render();
+ return (
+ (t.flags |= 1),
+ null !== e && o
+ ? ((t.child = ar(t, e.child, null, a)),
+ (t.child = ar(t, null, s, a)))
+ : Fi(e, t, s, a),
+ (t.memoizedState = r.state),
+ i && yt(t, n, !0),
+ t.child
+ );
+ }
+ function ji(e) {
+ var t = e.stateNode;
+ t.pendingContext
+ ? mt(0, t.pendingContext, t.pendingContext !== t.context)
+ : t.context && mt(0, t.context, !1),
+ dr(e, t.containerInfo);
+ }
+ function Wi(e, t, n, r, i) {
+ return $n(), er(i), (t.flags |= 256), Fi(e, t, n, r), t.child;
+ }
+ var Xi = { dehydrated: null, treeContext: null, retryLane: 0 };
+ function Yi(e) {
+ return { baseLanes: e, cachePool: null };
+ }
+ function qi(e, t, n) {
+ var r,
+ i = t.pendingProps,
+ a = mr.current,
+ s = !1,
+ l = 0 !== (128 & t.flags);
+ if (
+ ((r = l) ||
+ (r = (null === e || null !== e.memoizedState) && 0 !== (2 & a)),
+ r
+ ? ((s = !0), (t.flags &= -129))
+ : (null !== e && null === e.memoizedState) || (a |= 1),
+ lt(mr, 1 & a),
+ null === e)
+ )
+ return (
+ qn(t),
+ null !== (e = t.memoizedState) && null !== (e = e.dehydrated)
+ ? (0 === (1 & t.mode)
+ ? (t.lanes = 1)
+ : Fe(e)
+ ? (t.lanes = 8)
+ : (t.lanes = 1073741824),
+ null)
+ : ((a = i.children),
+ (e = i.fallback),
+ s
+ ? ((i = t.mode),
+ (s = t.child),
+ (a = { mode: "hidden", children: a }),
+ 0 === (1 & i) && null !== s
+ ? ((s.childLanes = 0), (s.pendingProps = a))
+ : (s = rs(a, i, 0, null)),
+ (e = ns(e, i, n, null)),
+ (s.return = t),
+ (e.return = t),
+ (s.sibling = e),
+ (t.child = s),
+ (t.child.memoizedState = Yi(n)),
+ (t.memoizedState = Xi),
+ e)
+ : Ji(t, a))
+ );
+ if (null !== (a = e.memoizedState)) {
+ if (null !== (r = a.dehydrated)) {
+ if (l)
+ return 256 & t.flags
+ ? ((t.flags &= -257), ea(e, t, n, Error(o(422))))
+ : null !== t.memoizedState
+ ? ((t.child = e.child), (t.flags |= 128), null)
+ : ((s = i.fallback),
+ (a = t.mode),
+ (i = rs(
+ { mode: "visible", children: i.children },
+ a,
+ 0,
+ null
+ )),
+ ((s = ns(s, a, n, null)).flags |= 2),
+ (i.return = t),
+ (s.return = t),
+ (i.sibling = s),
+ (t.child = i),
+ 0 !== (1 & t.mode) && ar(t, e.child, null, n),
+ (t.child.memoizedState = Yi(n)),
+ (t.memoizedState = Xi),
+ s);
+ if (0 === (1 & t.mode)) t = ea(e, t, n, null);
+ else if (Fe(r)) t = ea(e, t, n, Error(o(419)));
+ else if (((i = 0 !== (n & e.childLanes)), Ui || i)) {
+ if (null !== (i = Xa)) {
+ switch (n & -n) {
+ case 4:
+ s = 2;
+ break;
+ case 16:
+ s = 8;
+ break;
+ case 64:
+ case 128:
+ case 256:
+ case 512:
+ case 1024:
+ case 2048:
+ case 4096:
+ case 8192:
+ case 16384:
+ case 32768:
+ case 65536:
+ case 131072:
+ case 262144:
+ case 524288:
+ case 1048576:
+ case 2097152:
+ case 4194304:
+ case 8388608:
+ case 16777216:
+ case 33554432:
+ case 67108864:
+ s = 32;
+ break;
+ case 536870912:
+ s = 268435456;
+ break;
+ default:
+ s = 0;
+ }
+ 0 !== (i = 0 !== (s & (i.suspendedLanes | n)) ? 0 : s) &&
+ i !== a.retryLane &&
+ ((a.retryLane = i), Eo(e, i, -1));
+ }
+ Uo(), (t = ea(e, t, n, Error(o(421))));
+ } else
+ Ue(r)
+ ? ((t.flags |= 128),
+ (t.child = e.child),
+ (t = Xo.bind(null, e)),
+ Oe(r, t),
+ (t = null))
+ : ((n = a.treeContext),
+ q &&
+ ((Qn = ze(r)),
+ (zn = t),
+ (Hn = !0),
+ (jn = null),
+ (Vn = !1),
+ null !== n &&
+ ((Pn[Ln++] = Un),
+ (Pn[Ln++] = Fn),
+ (Pn[Ln++] = Dn),
+ (Un = n.id),
+ (Fn = n.overflow),
+ (Dn = t))),
+ ((t = Ji(t, t.pendingProps.children)).flags |= 4096));
+ return t;
+ }
+ return s
+ ? ((i = $i(e, t, i.children, i.fallback, n)),
+ (s = t.child),
+ (a = e.child.memoizedState),
+ (s.memoizedState =
+ null === a
+ ? Yi(n)
+ : { baseLanes: a.baseLanes | n, cachePool: null }),
+ (s.childLanes = e.childLanes & ~n),
+ (t.memoizedState = Xi),
+ i)
+ : ((n = Ki(e, t, i.children, n)), (t.memoizedState = null), n);
+ }
+ return s
+ ? ((i = $i(e, t, i.children, i.fallback, n)),
+ (s = t.child),
+ (a = e.child.memoizedState),
+ (s.memoizedState =
+ null === a
+ ? Yi(n)
+ : { baseLanes: a.baseLanes | n, cachePool: null }),
+ (s.childLanes = e.childLanes & ~n),
+ (t.memoizedState = Xi),
+ i)
+ : ((n = Ki(e, t, i.children, n)), (t.memoizedState = null), n);
+ }
+ function Ji(e, t) {
+ return (
+ ((t = rs(
+ { mode: "visible", children: t },
+ e.mode,
+ 0,
+ null
+ )).return = e),
+ (e.child = t)
+ );
+ }
+ function Ki(e, t, n, r) {
+ var i = e.child;
+ return (
+ (e = i.sibling),
+ (n = es(i, { mode: "visible", children: n })),
+ 0 === (1 & t.mode) && (n.lanes = r),
+ (n.return = t),
+ (n.sibling = null),
+ null !== e &&
+ (null === (r = t.deletions)
+ ? ((t.deletions = [e]), (t.flags |= 16))
+ : r.push(e)),
+ (t.child = n)
+ );
+ }
+ function $i(e, t, n, r, i) {
+ var a = t.mode,
+ o = (e = e.child).sibling,
+ s = { mode: "hidden", children: n };
+ return (
+ 0 === (1 & a) && t.child !== e
+ ? (((n = t.child).childLanes = 0),
+ (n.pendingProps = s),
+ (t.deletions = null))
+ : ((n = es(e, s)).subtreeFlags = 14680064 & e.subtreeFlags),
+ null !== o
+ ? (r = es(o, r))
+ : ((r = ns(r, a, i, null)).flags |= 2),
+ (r.return = t),
+ (n.return = t),
+ (n.sibling = r),
+ (t.child = n),
+ r
+ );
+ }
+ function ea(e, t, n, r) {
+ return (
+ null !== r && er(r),
+ ar(t, e.child, null, n),
+ ((e = Ji(t, t.pendingProps.children)).flags |= 2),
+ (t.memoizedState = null),
+ e
+ );
+ }
+ function ta(e, t, n) {
+ e.lanes |= t;
+ var r = e.alternate;
+ null !== r && (r.lanes |= t), un(e.return, t, n);
+ }
+ function na(e, t, n, r, i) {
+ var a = e.memoizedState;
+ null === a
+ ? (e.memoizedState = {
+ isBackwards: t,
+ rendering: null,
+ renderingStartTime: 0,
+ last: r,
+ tail: n,
+ tailMode: i,
+ })
+ : ((a.isBackwards = t),
+ (a.rendering = null),
+ (a.renderingStartTime = 0),
+ (a.last = r),
+ (a.tail = n),
+ (a.tailMode = i));
+ }
+ function ra(e, t, n) {
+ var r = t.pendingProps,
+ i = r.revealOrder,
+ a = r.tail;
+ if ((Fi(e, t, r.children, n), 0 !== (2 & (r = mr.current))))
+ (r = (1 & r) | 2), (t.flags |= 128);
+ else {
+ if (null !== e && 0 !== (128 & e.flags))
+ e: for (e = t.child; null !== e; ) {
+ if (13 === e.tag) null !== e.memoizedState && ta(e, n, t);
+ else if (19 === e.tag) ta(e, n, t);
+ else if (null !== e.child) {
+ (e.child.return = e), (e = e.child);
+ continue;
+ }
+ if (e === t) break e;
+ for (; null === e.sibling; ) {
+ if (null === e.return || e.return === t) break e;
+ e = e.return;
+ }
+ (e.sibling.return = e.return), (e = e.sibling);
+ }
+ r &= 1;
+ }
+ if ((lt(mr, r), 0 === (1 & t.mode))) t.memoizedState = null;
+ else
+ switch (i) {
+ case "forwards":
+ for (n = t.child, i = null; null !== n; )
+ null !== (e = n.alternate) && null === gr(e) && (i = n),
+ (n = n.sibling);
+ null === (n = i)
+ ? ((i = t.child), (t.child = null))
+ : ((i = n.sibling), (n.sibling = null)),
+ na(t, !1, i, n, a);
+ break;
+ case "backwards":
+ for (n = null, i = t.child, t.child = null; null !== i; ) {
+ if (null !== (e = i.alternate) && null === gr(e)) {
+ t.child = i;
+ break;
+ }
+ (e = i.sibling), (i.sibling = n), (n = i), (i = e);
+ }
+ na(t, !0, n, null, a);
+ break;
+ case "together":
+ na(t, !1, null, null, void 0);
+ break;
+ default:
+ t.memoizedState = null;
+ }
+ return t.child;
+ }
+ function ia(e, t, n) {
+ if (
+ (null !== e && (t.dependencies = e.dependencies),
+ (to |= t.lanes),
+ 0 === (n & t.childLanes))
+ )
+ return null;
+ if (null !== e && t.child !== e.child) throw Error(o(153));
+ if (null !== t.child) {
+ for (
+ n = es((e = t.child), e.pendingProps),
+ t.child = n,
+ n.return = t;
+ null !== e.sibling;
+
+ )
+ (e = e.sibling),
+ ((n = n.sibling = es(e, e.pendingProps)).return = t);
+ n.sibling = null;
+ }
+ return t.child;
+ }
+ function aa(e, t) {
+ switch ((Zn(t), t.tag)) {
+ case 1:
+ return (
+ pt(t.type) && vt(),
+ 65536 & (e = t.flags)
+ ? ((t.flags = (-65537 & e) | 128), t)
+ : null
+ );
+ case 3:
+ return (
+ hr(),
+ st(ft),
+ st(ct),
+ yr(),
+ 0 !== (65536 & (e = t.flags)) && 0 === (128 & e)
+ ? ((t.flags = (-65537 & e) | 128), t)
+ : null
+ );
+ case 5:
+ return vr(t), null;
+ case 13:
+ if (
+ (st(mr),
+ null !== (e = t.memoizedState) && null !== e.dehydrated)
+ ) {
+ if (null === t.alternate) throw Error(o(340));
+ $n();
+ }
+ return 65536 & (e = t.flags)
+ ? ((t.flags = (-65537 & e) | 128), t)
+ : null;
+ case 19:
+ return st(mr), null;
+ case 4:
+ return hr(), null;
+ case 10:
+ return ln(t.type._context), null;
+ case 22:
+ case 23:
+ return Bo(), null;
+ default:
+ return null;
+ }
+ }
+ var oa = !1,
+ sa = !1,
+ la = "function" === typeof WeakSet ? WeakSet : Set,
+ ua = null;
+ function ca(e, t) {
+ var n = e.ref;
+ if (null !== n)
+ if ("function" === typeof n)
+ try {
+ n(null);
+ } catch (r) {
+ Vo(e, t, r);
+ }
+ else n.current = null;
+ }
+ function fa(e, t, n) {
+ try {
+ n();
+ } catch (r) {
+ Vo(e, t, r);
+ }
+ }
+ var da = !1;
+ function ha(e, t, n) {
+ var r = t.updateQueue;
+ if (null !== (r = null !== r ? r.lastEffect : null)) {
+ var i = (r = r.next);
+ do {
+ if ((i.tag & e) === e) {
+ var a = i.destroy;
+ (i.destroy = void 0), void 0 !== a && fa(t, n, a);
+ }
+ i = i.next;
+ } while (i !== r);
+ }
+ }
+ function pa(e, t) {
+ if (
+ null !== (t = null !== (t = t.updateQueue) ? t.lastEffect : null)
+ ) {
+ var n = (t = t.next);
+ do {
+ if ((n.tag & e) === e) {
+ var r = n.create;
+ n.destroy = r();
+ }
+ n = n.next;
+ } while (n !== t);
+ }
+ }
+ function va(e) {
+ var t = e.ref;
+ if (null !== t) {
+ var n = e.stateNode;
+ if (5 === e.tag) e = P(n);
+ else e = n;
+ "function" === typeof t ? t(e) : (t.current = e);
+ }
+ }
+ function ma(e, t, n) {
+ if (Ht && "function" === typeof Ht.onCommitFiberUnmount)
+ try {
+ Ht.onCommitFiberUnmount(Qt, t);
+ } catch (o) {}
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ if (
+ null !== (e = t.updateQueue) &&
+ null !== (e = e.lastEffect)
+ ) {
+ var r = (e = e.next);
+ do {
+ var i = r,
+ a = i.destroy;
+ (i = i.tag),
+ void 0 !== a &&
+ (0 !== (2 & i) || 0 !== (4 & i)) &&
+ fa(t, n, a),
+ (r = r.next);
+ } while (r !== e);
+ }
+ break;
+ case 1:
+ if (
+ (ca(t, n),
+ "function" === typeof (e = t.stateNode).componentWillUnmount)
+ )
+ try {
+ (e.props = t.memoizedProps),
+ (e.state = t.memoizedState),
+ e.componentWillUnmount();
+ } catch (o) {
+ Vo(t, n, o);
+ }
+ break;
+ case 5:
+ ca(t, n);
+ break;
+ case 4:
+ X
+ ? _a(e, t, n)
+ : Y &&
+ Y &&
+ ((t = t.stateNode.containerInfo), (n = Te(t)), ke(t, n));
+ }
+ }
+ function ga(e, t, n) {
+ for (var r = t; ; )
+ if ((ma(e, r, n), null === r.child || (X && 4 === r.tag))) {
+ if (r === t) break;
+ for (; null === r.sibling; ) {
+ if (null === r.return || r.return === t) return;
+ r = r.return;
+ }
+ (r.sibling.return = r.return), (r = r.sibling);
+ } else (r.child.return = r), (r = r.child);
+ }
+ function Aa(e) {
+ var t = e.alternate;
+ null !== t && ((e.alternate = null), Aa(t)),
+ (e.child = null),
+ (e.deletions = null),
+ (e.sibling = null),
+ 5 === e.tag && null !== (t = e.stateNode) && ee(t),
+ (e.stateNode = null),
+ (e.return = null),
+ (e.dependencies = null),
+ (e.memoizedProps = null),
+ (e.memoizedState = null),
+ (e.pendingProps = null),
+ (e.stateNode = null),
+ (e.updateQueue = null);
+ }
+ function ya(e) {
+ return 5 === e.tag || 3 === e.tag || 4 === e.tag;
+ }
+ function ba(e) {
+ e: for (;;) {
+ for (; null === e.sibling; ) {
+ if (null === e.return || ya(e.return)) return null;
+ e = e.return;
+ }
+ for (
+ e.sibling.return = e.return, e = e.sibling;
+ 5 !== e.tag && 6 !== e.tag && 18 !== e.tag;
+
+ ) {
+ if (2 & e.flags) continue e;
+ if (null === e.child || 4 === e.tag) continue e;
+ (e.child.return = e), (e = e.child);
+ }
+ if (!(2 & e.flags)) return e.stateNode;
+ }
+ }
+ function xa(e) {
+ if (X) {
+ e: {
+ for (var t = e.return; null !== t; ) {
+ if (ya(t)) break e;
+ t = t.return;
+ }
+ throw Error(o(160));
+ }
+ var n = t;
+ switch (n.tag) {
+ case 5:
+ (t = n.stateNode),
+ 32 & n.flags && (be(t), (n.flags &= -33)),
+ Ea(e, (n = ba(e)), t);
+ break;
+ case 3:
+ case 4:
+ (t = n.stateNode.containerInfo), Sa(e, (n = ba(e)), t);
+ break;
+ default:
+ throw Error(o(161));
+ }
+ }
+ }
+ function Sa(e, t, n) {
+ var r = e.tag;
+ if (5 === r || 6 === r)
+ (e = e.stateNode), t ? ge(n, e, t) : de(n, e);
+ else if (4 !== r && null !== (e = e.child))
+ for (Sa(e, t, n), e = e.sibling; null !== e; )
+ Sa(e, t, n), (e = e.sibling);
+ }
+ function Ea(e, t, n) {
+ var r = e.tag;
+ if (5 === r || 6 === r)
+ (e = e.stateNode), t ? me(n, e, t) : fe(n, e);
+ else if (4 !== r && null !== (e = e.child))
+ for (Ea(e, t, n), e = e.sibling; null !== e; )
+ Ea(e, t, n), (e = e.sibling);
+ }
+ function _a(e, t, n) {
+ for (var r, i, a = t, s = !1; ; ) {
+ if (!s) {
+ s = a.return;
+ e: for (;;) {
+ if (null === s) throw Error(o(160));
+ switch (((r = s.stateNode), s.tag)) {
+ case 5:
+ i = !1;
+ break e;
+ case 3:
+ case 4:
+ (r = r.containerInfo), (i = !0);
+ break e;
+ }
+ s = s.return;
+ }
+ s = !0;
+ }
+ if (5 === a.tag || 6 === a.tag)
+ ga(e, a, n), i ? ye(r, a.stateNode) : Ae(r, a.stateNode);
+ else if (18 === a.tag)
+ i ? qe(r, a.stateNode) : Ye(r, a.stateNode);
+ else if (4 === a.tag) {
+ if (null !== a.child) {
+ (r = a.stateNode.containerInfo),
+ (i = !0),
+ (a.child.return = a),
+ (a = a.child);
+ continue;
+ }
+ } else if ((ma(e, a, n), null !== a.child)) {
+ (a.child.return = a), (a = a.child);
+ continue;
+ }
+ if (a === t) break;
+ for (; null === a.sibling; ) {
+ if (null === a.return || a.return === t) return;
+ 4 === (a = a.return).tag && (s = !1);
+ }
+ (a.sibling.return = a.return), (a = a.sibling);
+ }
+ }
+ function Ca(e, t) {
+ if (X) {
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ return ha(3, t, t.return), pa(3, t), void ha(5, t, t.return);
+ case 1:
+ case 12:
+ case 17:
+ return;
+ case 5:
+ var n = t.stateNode;
+ if (null != n) {
+ var r = t.memoizedProps;
+ e = null !== e ? e.memoizedProps : r;
+ var i = t.type,
+ a = t.updateQueue;
+ (t.updateQueue = null), null !== a && ve(n, a, i, e, r, t);
+ }
+ return;
+ case 6:
+ if (null === t.stateNode) throw Error(o(162));
+ return (
+ (n = t.memoizedProps),
+ void he(t.stateNode, null !== e ? e.memoizedProps : n, n)
+ );
+ case 3:
+ return void (
+ q &&
+ null !== e &&
+ e.memoizedState.isDehydrated &&
+ We(t.stateNode.containerInfo)
+ );
+ case 13:
+ case 19:
+ return void wa(t);
+ }
+ throw Error(o(163));
+ }
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ return ha(3, t, t.return), pa(3, t), void ha(5, t, t.return);
+ case 12:
+ case 22:
+ case 23:
+ return;
+ case 13:
+ case 19:
+ return void wa(t);
+ case 3:
+ q &&
+ null !== e &&
+ e.memoizedState.isDehydrated &&
+ We(t.stateNode.containerInfo);
+ }
+ e: if (Y) {
+ switch (t.tag) {
+ case 1:
+ case 5:
+ case 6:
+ break e;
+ case 3:
+ case 4:
+ (t = t.stateNode), ke(t.containerInfo, t.pendingChildren);
+ break e;
+ }
+ throw Error(o(163));
+ }
+ }
+ function wa(e) {
+ var t = e.updateQueue;
+ if (null !== t) {
+ e.updateQueue = null;
+ var n = e.stateNode;
+ null === n && (n = e.stateNode = new la()),
+ t.forEach(function (t) {
+ var r = Yo.bind(null, e, t);
+ n.has(t) || (n.add(t), t.then(r, r));
+ });
+ }
+ }
+ function Ta(e, t, n) {
+ (ua = e), Ma(e, t, n);
+ }
+ function Ma(e, t, n) {
+ for (var r = 0 !== (1 & e.mode); null !== ua; ) {
+ var i = ua,
+ a = i.child;
+ if (22 === i.tag && r) {
+ var o = null !== i.memoizedState || oa;
+ if (!o) {
+ var s = i.alternate,
+ l = (null !== s && null !== s.memoizedState) || sa;
+ s = oa;
+ var u = sa;
+ if (((oa = o), (sa = l) && !u))
+ for (ua = i; null !== ua; )
+ (l = (o = ua).child),
+ 22 === o.tag && null !== o.memoizedState
+ ? Ra(i)
+ : null !== l
+ ? ((l.return = o), (ua = l))
+ : Ra(i);
+ for (; null !== a; ) (ua = a), Ma(a, t, n), (a = a.sibling);
+ (ua = i), (oa = s), (sa = u);
+ }
+ Ia(e);
+ } else
+ 0 !== (8772 & i.subtreeFlags) && null !== a
+ ? ((a.return = i), (ua = a))
+ : Ia(e);
+ }
+ }
+ function Ia(e) {
+ for (; null !== ua; ) {
+ var t = ua;
+ if (0 !== (8772 & t.flags)) {
+ var n = t.alternate;
+ try {
+ if (0 !== (8772 & t.flags))
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 15:
+ sa || pa(5, t);
+ break;
+ case 1:
+ var r = t.stateNode;
+ if (4 & t.flags && !sa)
+ if (null === n) r.componentDidMount();
+ else {
+ var i =
+ t.elementType === t.type
+ ? n.memoizedProps
+ : en(t.type, n.memoizedProps);
+ r.componentDidUpdate(
+ i,
+ n.memoizedState,
+ r.__reactInternalSnapshotBeforeUpdate
+ );
+ }
+ var a = t.updateQueue;
+ null !== a && xn(t, a, r);
+ break;
+ case 3:
+ var s = t.updateQueue;
+ if (null !== s) {
+ if (((n = null), null !== t.child))
+ switch (t.child.tag) {
+ case 5:
+ n = P(t.child.stateNode);
+ break;
+ case 1:
+ n = t.child.stateNode;
+ }
+ xn(t, s, n);
+ }
+ break;
+ case 5:
+ var l = t.stateNode;
+ null === n &&
+ 4 & t.flags &&
+ pe(l, t.type, t.memoizedProps, t);
+ break;
+ case 6:
+ case 4:
+ case 12:
+ case 19:
+ case 17:
+ case 21:
+ case 22:
+ case 23:
+ break;
+ case 13:
+ if (q && null === t.memoizedState) {
+ var u = t.alternate;
+ if (null !== u) {
+ var c = u.memoizedState;
+ if (null !== c) {
+ var f = c.dehydrated;
+ null !== f && Xe(f);
+ }
+ }
+ }
+ break;
+ default:
+ throw Error(o(163));
+ }
+ sa || (512 & t.flags && va(t));
+ } catch (d) {
+ Vo(t, t.return, d);
+ }
+ }
+ if (t === e) {
+ ua = null;
+ break;
+ }
+ if (null !== (n = t.sibling)) {
+ (n.return = t.return), (ua = n);
+ break;
+ }
+ ua = t.return;
+ }
+ }
+ function ka(e) {
+ for (; null !== ua; ) {
+ var t = ua;
+ if (t === e) {
+ ua = null;
+ break;
+ }
+ var n = t.sibling;
+ if (null !== n) {
+ (n.return = t.return), (ua = n);
+ break;
+ }
+ ua = t.return;
+ }
+ }
+ function Ra(e) {
+ for (; null !== ua; ) {
+ var t = ua;
+ try {
+ switch (t.tag) {
+ case 0:
+ case 11:
+ case 15:
+ var n = t.return;
+ try {
+ pa(4, t);
+ } catch (l) {
+ Vo(t, n, l);
+ }
+ break;
+ case 1:
+ var r = t.stateNode;
+ if ("function" === typeof r.componentDidMount) {
+ var i = t.return;
+ try {
+ r.componentDidMount();
+ } catch (l) {
+ Vo(t, i, l);
+ }
+ }
+ var a = t.return;
+ try {
+ va(t);
+ } catch (l) {
+ Vo(t, a, l);
+ }
+ break;
+ case 5:
+ var o = t.return;
+ try {
+ va(t);
+ } catch (l) {
+ Vo(t, o, l);
+ }
+ }
+ } catch (l) {
+ Vo(t, t.return, l);
+ }
+ if (t === e) {
+ ua = null;
+ break;
+ }
+ var s = t.sibling;
+ if (null !== s) {
+ (s.return = t.return), (ua = s);
+ break;
+ }
+ ua = t.return;
+ }
+ }
+ var Ba = 0,
+ Pa = 1,
+ La = 2,
+ Da = 3,
+ Ua = 4;
+ if ("function" === typeof Symbol && Symbol.for) {
+ var Fa = Symbol.for;
+ (Ba = Fa("selector.component")),
+ (Pa = Fa("selector.has_pseudo_class")),
+ (La = Fa("selector.role")),
+ (Da = Fa("selector.test_id")),
+ (Ua = Fa("selector.text"));
+ }
+ function Oa(e) {
+ var t = J(e);
+ if (null != t) {
+ if ("string" !== typeof t.memoizedProps["data-testname"])
+ throw Error(o(364));
+ return t;
+ }
+ if (null === (e = ie(e))) throw Error(o(362));
+ return e.stateNode.current;
+ }
+ function Na(e, t) {
+ switch (t.$$typeof) {
+ case Ba:
+ if (e.type === t.value) return !0;
+ break;
+ case Pa:
+ e: {
+ (t = t.value), (e = [e, 0]);
+ for (var n = 0; n < e.length; ) {
+ var r = e[n++],
+ i = e[n++],
+ a = t[i];
+ if (5 !== r.tag || !se(r)) {
+ for (; null != a && Na(r, a); ) a = t[++i];
+ if (i === t.length) {
+ t = !0;
+ break e;
+ }
+ for (r = r.child; null !== r; )
+ e.push(r, i), (r = r.sibling);
+ }
+ }
+ t = !1;
+ }
+ return t;
+ case La:
+ if (5 === e.tag && le(e.stateNode, t.value)) return !0;
+ break;
+ case Ua:
+ if (
+ (5 === e.tag || 6 === e.tag) &&
+ null !== (e = oe(e)) &&
+ 0 <= e.indexOf(t.value)
+ )
+ return !0;
+ break;
+ case Da:
+ if (
+ 5 === e.tag &&
+ "string" === typeof (e = e.memoizedProps["data-testname"]) &&
+ e.toLowerCase() === t.value.toLowerCase()
+ )
+ return !0;
+ break;
+ default:
+ throw Error(o(365));
+ }
+ return !1;
+ }
+ function Ga(e) {
+ switch (e.$$typeof) {
+ case Ba:
+ return "<" + (E(e.value) || "Unknown") + ">";
+ case Pa:
+ return ":has(" + (Ga(e) || "") + ")";
+ case La:
+ return '[role="' + e.value + '"]';
+ case Ua:
+ return '"' + e.value + '"';
+ case Da:
+ return '[data-testname="' + e.value + '"]';
+ default:
+ throw Error(o(365));
+ }
+ }
+ function Za(e, t) {
+ var n = [];
+ e = [e, 0];
+ for (var r = 0; r < e.length; ) {
+ var i = e[r++],
+ a = e[r++],
+ o = t[a];
+ if (5 !== i.tag || !se(i)) {
+ for (; null != o && Na(i, o); ) o = t[++a];
+ if (a === t.length) n.push(i);
+ else
+ for (i = i.child; null !== i; ) e.push(i, a), (i = i.sibling);
+ }
+ }
+ return n;
+ }
+ function za(e, t) {
+ if (!re) throw Error(o(363));
+ (e = Za((e = Oa(e)), t)), (t = []), (e = Array.from(e));
+ for (var n = 0; n < e.length; ) {
+ var r = e[n++];
+ if (5 === r.tag) se(r) || t.push(r.stateNode);
+ else for (r = r.child; null !== r; ) e.push(r), (r = r.sibling);
+ }
+ return t;
+ }
+ var Qa = Math.ceil,
+ Ha = s.ReactCurrentDispatcher,
+ Va = s.ReactCurrentOwner,
+ ja = s.ReactCurrentBatchConfig,
+ Wa = 0,
+ Xa = null,
+ Ya = null,
+ qa = 0,
+ Ja = 0,
+ Ka = ot(0),
+ $a = 0,
+ eo = null,
+ to = 0,
+ no = 0,
+ ro = 0,
+ io = null,
+ ao = null,
+ oo = 0,
+ so = 1 / 0;
+ function lo() {
+ so = Ot() + 500;
+ }
+ var uo,
+ co = !1,
+ fo = null,
+ ho = null,
+ po = !1,
+ vo = null,
+ mo = 0,
+ go = 0,
+ Ao = null,
+ yo = -1,
+ bo = 0;
+ function xo() {
+ return 0 !== (6 & Wa) ? Ot() : -1 !== yo ? yo : (yo = Ot());
+ }
+ function So(e) {
+ return 0 === (1 & e.mode)
+ ? 1
+ : 0 !== (2 & Wa) && 0 !== qa
+ ? qa & -qa
+ : null !== Jt.transition
+ ? (0 === bo &&
+ ((e = Et),
+ 0 === (4194240 & (Et <<= 1)) && (Et = 64),
+ (bo = e)),
+ bo)
+ : 0 !== (e = Bt)
+ ? e
+ : $();
+ }
+ function Eo(e, t, n) {
+ if (50 < go) throw ((go = 0), (Ao = null), Error(o(185)));
+ var r = _o(e, t);
+ return null === r
+ ? null
+ : (kt(r, t, n),
+ (0 !== (2 & Wa) && r === Xa) ||
+ (r === Xa &&
+ (0 === (2 & Wa) && (no |= t), 4 === $a && Io(r, qa)),
+ Co(r, n),
+ 1 === t &&
+ 0 === Wa &&
+ 0 === (1 & e.mode) &&
+ (lo(), Wt && qt())),
+ r);
+ }
+ function _o(e, t) {
+ e.lanes |= t;
+ var n = e.alternate;
+ for (
+ null !== n && (n.lanes |= t), n = e, e = e.return;
+ null !== e;
+
+ )
+ (e.childLanes |= t),
+ null !== (n = e.alternate) && (n.childLanes |= t),
+ (n = e),
+ (e = e.return);
+ return 3 === n.tag ? n.stateNode : null;
+ }
+ function Co(e, t) {
+ var n = e.callbackNode;
+ !(function (e, t) {
+ for (
+ var n = e.suspendedLanes,
+ r = e.pingedLanes,
+ i = e.expirationTimes,
+ a = e.pendingLanes;
+ 0 < a;
+
+ ) {
+ var o = 31 - bt(a),
+ s = 1 << o,
+ l = i[o];
+ -1 === l
+ ? (0 !== (s & n) && 0 === (s & r)) || (i[o] = Tt(s, t))
+ : l <= t && (e.expiredLanes |= s),
+ (a &= ~s);
+ }
+ })(e, t);
+ var r = wt(e, e === Xa ? qa : 0);
+ if (0 === r)
+ null !== n && Dt(n),
+ (e.callbackNode = null),
+ (e.callbackPriority = 0);
+ else if (((t = r & -r), e.callbackPriority !== t)) {
+ if ((null != n && Dt(n), 1 === t))
+ 0 === e.tag
+ ? (function (e) {
+ (Wt = !0), Yt(e);
+ })(ko.bind(null, e))
+ : Yt(ko.bind(null, e)),
+ te
+ ? ne(function () {
+ 0 === Wa && qt();
+ })
+ : Lt(Nt, qt),
+ (n = null);
+ else {
+ switch (Pt(r)) {
+ case 1:
+ n = Nt;
+ break;
+ case 4:
+ n = Gt;
+ break;
+ case 16:
+ default:
+ n = Zt;
+ break;
+ case 536870912:
+ n = zt;
+ }
+ n = qo(n, wo.bind(null, e));
+ }
+ (e.callbackPriority = t), (e.callbackNode = n);
+ }
+ }
+ function wo(e, t) {
+ if (((yo = -1), (bo = 0), 0 !== (6 & Wa))) throw Error(o(327));
+ var n = e.callbackNode;
+ if (Qo() && e.callbackNode !== n) return null;
+ var r = wt(e, e === Xa ? qa : 0);
+ if (0 === r) return null;
+ if (0 !== (30 & r) || 0 !== (r & e.expiredLanes) || t) t = Fo(e, r);
+ else {
+ t = r;
+ var i = Wa;
+ Wa |= 2;
+ var a = Do();
+ for ((Xa === e && qa === t) || (lo(), Po(e, t)); ; )
+ try {
+ No();
+ break;
+ } catch (l) {
+ Lo(e, l);
+ }
+ on(),
+ (Ha.current = a),
+ (Wa = i),
+ null !== Ya ? (t = 0) : ((Xa = null), (qa = 0), (t = $a));
+ }
+ if (0 !== t) {
+ if (
+ (2 === t && 0 !== (i = Mt(e)) && ((r = i), (t = To(e, i))),
+ 1 === t)
+ )
+ throw ((n = eo), Po(e, 0), Io(e, r), Co(e, Ot()), n);
+ if (6 === t) Io(e, r);
+ else {
+ if (
+ ((i = e.current.alternate),
+ 0 === (30 & r) &&
+ !(function (e) {
+ for (var t = e; ; ) {
+ if (16384 & t.flags) {
+ var n = t.updateQueue;
+ if (null !== n && null !== (n = n.stores))
+ for (var r = 0; r < n.length; r++) {
+ var i = n[r],
+ a = i.getSnapshot;
+ i = i.value;
+ try {
+ if (!Vt(a(), i)) return !1;
+ } catch (s) {
+ return !1;
+ }
+ }
+ }
+ if (
+ ((n = t.child), 16384 & t.subtreeFlags && null !== n)
+ )
+ (n.return = t), (t = n);
+ else {
+ if (t === e) break;
+ for (; null === t.sibling; ) {
+ if (null === t.return || t.return === e) return !0;
+ t = t.return;
+ }
+ (t.sibling.return = t.return), (t = t.sibling);
+ }
+ }
+ return !0;
+ })(i) &&
+ (2 === (t = Fo(e, r)) &&
+ 0 !== (a = Mt(e)) &&
+ ((r = a), (t = To(e, a))),
+ 1 === t))
+ )
+ throw ((n = eo), Po(e, 0), Io(e, r), Co(e, Ot()), n);
+ switch (((e.finishedWork = i), (e.finishedLanes = r), t)) {
+ case 0:
+ case 1:
+ throw Error(o(345));
+ case 2:
+ case 5:
+ zo(e, ao);
+ break;
+ case 3:
+ if (
+ (Io(e, r),
+ (130023424 & r) === r && 10 < (t = oo + 500 - Ot()))
+ ) {
+ if (0 !== wt(e, 0)) break;
+ if (((i = e.suspendedLanes) & r) !== r) {
+ xo(), (e.pingedLanes |= e.suspendedLanes & i);
+ break;
+ }
+ e.timeoutHandle = H(zo.bind(null, e, ao), t);
+ break;
+ }
+ zo(e, ao);
+ break;
+ case 4:
+ if ((Io(e, r), (4194240 & r) === r)) break;
+ for (t = e.eventTimes, i = -1; 0 < r; ) {
+ var s = 31 - bt(r);
+ (a = 1 << s), (s = t[s]) > i && (i = s), (r &= ~a);
+ }
+ if (
+ ((r = i),
+ 10 <
+ (r =
+ (120 > (r = Ot() - r)
+ ? 120
+ : 480 > r
+ ? 480
+ : 1080 > r
+ ? 1080
+ : 1920 > r
+ ? 1920
+ : 3e3 > r
+ ? 3e3
+ : 4320 > r
+ ? 4320
+ : 1960 * Qa(r / 1960)) - r))
+ ) {
+ e.timeoutHandle = H(zo.bind(null, e, ao), r);
+ break;
+ }
+ zo(e, ao);
+ break;
+ default:
+ throw Error(o(329));
+ }
+ }
+ }
+ return Co(e, Ot()), e.callbackNode === n ? wo.bind(null, e) : null;
+ }
+ function To(e, t) {
+ var n = io;
+ return (
+ e.current.memoizedState.isDehydrated && (Po(e, t).flags |= 256),
+ 2 !== (e = Fo(e, t)) && ((t = ao), (ao = n), null !== t && Mo(t)),
+ e
+ );
+ }
+ function Mo(e) {
+ null === ao ? (ao = e) : ao.push.apply(ao, e);
+ }
+ function Io(e, t) {
+ for (
+ t &= ~ro,
+ t &= ~no,
+ e.suspendedLanes |= t,
+ e.pingedLanes &= ~t,
+ e = e.expirationTimes;
+ 0 < t;
+
+ ) {
+ var n = 31 - bt(t),
+ r = 1 << n;
+ (e[n] = -1), (t &= ~r);
+ }
+ }
+ function ko(e) {
+ if (0 !== (6 & Wa)) throw Error(o(327));
+ Qo();
+ var t = wt(e, 0);
+ if (0 === (1 & t)) return Co(e, Ot()), null;
+ var n = Fo(e, t);
+ if (0 !== e.tag && 2 === n) {
+ var r = Mt(e);
+ 0 !== r && ((t = r), (n = To(e, r)));
+ }
+ if (1 === n) throw ((n = eo), Po(e, 0), Io(e, t), Co(e, Ot()), n);
+ if (6 === n) throw Error(o(345));
+ return (
+ (e.finishedWork = e.current.alternate),
+ (e.finishedLanes = t),
+ zo(e, ao),
+ Co(e, Ot()),
+ null
+ );
+ }
+ function Ro(e) {
+ null !== vo && 0 === vo.tag && 0 === (6 & Wa) && Qo();
+ var t = Wa;
+ Wa |= 1;
+ var n = ja.transition,
+ r = Bt;
+ try {
+ if (((ja.transition = null), (Bt = 1), e)) return e();
+ } finally {
+ (Bt = r), (ja.transition = n), 0 === (6 & (Wa = t)) && qt();
+ }
+ }
+ function Bo() {
+ (Ja = Ka.current), st(Ka);
+ }
+ function Po(e, t) {
+ (e.finishedWork = null), (e.finishedLanes = 0);
+ var n = e.timeoutHandle;
+ if ((n !== j && ((e.timeoutHandle = j), V(n)), null !== Ya))
+ for (n = Ya.return; null !== n; ) {
+ var r = n;
+ switch ((Zn(r), r.tag)) {
+ case 1:
+ null !== (r = r.type.childContextTypes) &&
+ void 0 !== r &&
+ vt();
+ break;
+ case 3:
+ hr(), st(ft), st(ct), yr();
+ break;
+ case 5:
+ vr(r);
+ break;
+ case 4:
+ hr();
+ break;
+ case 13:
+ case 19:
+ st(mr);
+ break;
+ case 10:
+ ln(r.type._context);
+ break;
+ case 22:
+ case 23:
+ Bo();
+ }
+ n = n.return;
+ }
+ if (
+ ((Xa = e),
+ (Ya = e = es(e.current, null)),
+ (qa = Ja = t),
+ ($a = 0),
+ (eo = null),
+ (ro = no = to = 0),
+ (ao = io = null),
+ null !== dn)
+ ) {
+ for (t = 0; t < dn.length; t++)
+ if (null !== (r = (n = dn[t]).interleaved)) {
+ n.interleaved = null;
+ var i = r.next,
+ a = n.pending;
+ if (null !== a) {
+ var o = a.next;
+ (a.next = i), (r.next = o);
+ }
+ n.pending = r;
+ }
+ dn = null;
+ }
+ return e;
+ }
+ function Lo(e, t) {
+ for (;;) {
+ var n = Ya;
+ try {
+ if ((on(), (br.current = hi), wr)) {
+ for (var r = Er.memoizedState; null !== r; ) {
+ var i = r.queue;
+ null !== i && (i.pending = null), (r = r.next);
+ }
+ wr = !1;
+ }
+ if (
+ ((Sr = 0),
+ (Cr = _r = Er = null),
+ (Tr = !1),
+ (Mr = 0),
+ (Va.current = null),
+ null === n || null === n.return)
+ ) {
+ ($a = 1), (eo = t), (Ya = null);
+ break;
+ }
+ e: {
+ var a = e,
+ s = n.return,
+ l = n,
+ u = t;
+ if (
+ ((t = qa),
+ (l.flags |= 32768),
+ null !== u &&
+ "object" === typeof u &&
+ "function" === typeof u.then)
+ ) {
+ var c = u,
+ f = l,
+ d = f.tag;
+ if (
+ 0 === (1 & f.mode) &&
+ (0 === d || 11 === d || 15 === d)
+ ) {
+ var h = f.alternate;
+ h
+ ? ((f.updateQueue = h.updateQueue),
+ (f.memoizedState = h.memoizedState),
+ (f.lanes = h.lanes))
+ : ((f.updateQueue = null), (f.memoizedState = null));
+ }
+ var p = Ti(s);
+ if (null !== p) {
+ (p.flags &= -257),
+ Mi(p, s, l, 0, t),
+ 1 & p.mode && wi(a, c, t),
+ (u = c);
+ var v = (t = p).updateQueue;
+ if (null === v) {
+ var m = new Set();
+ m.add(u), (t.updateQueue = m);
+ } else v.add(u);
+ break e;
+ }
+ if (0 === (1 & t)) {
+ wi(a, c, t), Uo();
+ break e;
+ }
+ u = Error(o(426));
+ } else if (Hn && 1 & l.mode) {
+ var g = Ti(s);
+ if (null !== g) {
+ 0 === (65536 & g.flags) && (g.flags |= 256),
+ Mi(g, s, l, 0, t),
+ er(u);
+ break e;
+ }
+ }
+ (a = u),
+ 4 !== $a && ($a = 2),
+ null === io ? (io = [a]) : io.push(a),
+ (u = gi(u, l)),
+ (l = s);
+ do {
+ switch (l.tag) {
+ case 3:
+ (l.flags |= 65536),
+ (t &= -t),
+ (l.lanes |= t),
+ yn(l, _i(0, u, t));
+ break e;
+ case 1:
+ a = u;
+ var A = l.type,
+ y = l.stateNode;
+ if (
+ 0 === (128 & l.flags) &&
+ ("function" === typeof A.getDerivedStateFromError ||
+ (null !== y &&
+ "function" === typeof y.componentDidCatch &&
+ (null === ho || !ho.has(y))))
+ ) {
+ (l.flags |= 65536),
+ (t &= -t),
+ (l.lanes |= t),
+ yn(l, Ci(l, a, t));
+ break e;
+ }
+ }
+ l = l.return;
+ } while (null !== l);
+ }
+ Zo(n);
+ } catch (b) {
+ (t = b), Ya === n && null !== n && (Ya = n = n.return);
+ continue;
+ }
+ break;
+ }
+ }
+ function Do() {
+ var e = Ha.current;
+ return (Ha.current = hi), null === e ? hi : e;
+ }
+ function Uo() {
+ (0 !== $a && 3 !== $a && 2 !== $a) || ($a = 4),
+ null === Xa ||
+ (0 === (268435455 & to) && 0 === (268435455 & no)) ||
+ Io(Xa, qa);
+ }
+ function Fo(e, t) {
+ var n = Wa;
+ Wa |= 2;
+ var r = Do();
+ for ((Xa === e && qa === t) || Po(e, t); ; )
+ try {
+ Oo();
+ break;
+ } catch (i) {
+ Lo(e, i);
+ }
+ if ((on(), (Wa = n), (Ha.current = r), null !== Ya))
+ throw Error(o(261));
+ return (Xa = null), (qa = 0), $a;
+ }
+ function Oo() {
+ for (; null !== Ya; ) Go(Ya);
+ }
+ function No() {
+ for (; null !== Ya && !Ut(); ) Go(Ya);
+ }
+ function Go(e) {
+ var t = uo(e.alternate, e, Ja);
+ (e.memoizedProps = e.pendingProps),
+ null === t ? Zo(e) : (Ya = t),
+ (Va.current = null);
+ }
+ function Zo(e) {
+ var t = e;
+ do {
+ var n = t.alternate;
+ if (((e = t.return), 0 === (32768 & t.flags))) {
+ if (null !== (n = Li(n, t, Ja))) return void (Ya = n);
+ } else {
+ if (null !== (n = aa(n, t)))
+ return (n.flags &= 32767), void (Ya = n);
+ if (null === e) return ($a = 6), void (Ya = null);
+ (e.flags |= 32768), (e.subtreeFlags = 0), (e.deletions = null);
+ }
+ if (null !== (t = t.sibling)) return void (Ya = t);
+ Ya = t = e;
+ } while (null !== t);
+ 0 === $a && ($a = 5);
+ }
+ function zo(e, t) {
+ var n = Bt,
+ r = ja.transition;
+ try {
+ (ja.transition = null),
+ (Bt = 1),
+ (function (e, t, n) {
+ do {
+ Qo();
+ } while (null !== vo);
+ if (0 !== (6 & Wa)) throw Error(o(327));
+ var r = e.finishedWork,
+ i = e.finishedLanes;
+ if (null === r) return null;
+ if (
+ ((e.finishedWork = null),
+ (e.finishedLanes = 0),
+ r === e.current)
+ )
+ throw Error(o(177));
+ (e.callbackNode = null), (e.callbackPriority = 0);
+ var a = r.lanes | r.childLanes;
+ if (
+ ((function (e, t) {
+ var n = e.pendingLanes & ~t;
+ (e.pendingLanes = t),
+ (e.suspendedLanes = 0),
+ (e.pingedLanes = 0),
+ (e.expiredLanes &= t),
+ (e.mutableReadLanes &= t),
+ (e.entangledLanes &= t),
+ (t = e.entanglements);
+ var r = e.eventTimes;
+ for (e = e.expirationTimes; 0 < n; ) {
+ var i = 31 - bt(n),
+ a = 1 << i;
+ (t[i] = 0), (r[i] = -1), (e[i] = -1), (n &= ~a);
+ }
+ })(e, a),
+ e === Xa && ((Ya = Xa = null), (qa = 0)),
+ (0 === (2064 & r.subtreeFlags) && 0 === (2064 & r.flags)) ||
+ po ||
+ ((po = !0),
+ qo(Zt, function () {
+ return Qo(), null;
+ })),
+ (a = 0 !== (15990 & r.flags)),
+ 0 !== (15990 & r.subtreeFlags) || a)
+ ) {
+ (a = ja.transition), (ja.transition = null);
+ var s = Bt;
+ Bt = 1;
+ var l = Wa;
+ (Wa |= 4),
+ (Va.current = null),
+ (function (e, t) {
+ for (U(e.containerInfo), ua = t; null !== ua; )
+ if (
+ ((t = (e = ua).child),
+ 0 !== (1028 & e.subtreeFlags) && null !== t)
+ )
+ (t.return = e), (ua = t);
+ else
+ for (; null !== ua; ) {
+ e = ua;
+ try {
+ var n = e.alternate;
+ if (0 !== (1024 & e.flags))
+ switch (e.tag) {
+ case 0:
+ case 11:
+ case 15:
+ case 5:
+ case 6:
+ case 4:
+ case 17:
+ break;
+ case 1:
+ if (null !== n) {
+ var r = n.memoizedProps,
+ i = n.memoizedState,
+ a = e.stateNode,
+ s = a.getSnapshotBeforeUpdate(
+ e.elementType === e.type
+ ? r
+ : en(e.type, r),
+ i
+ );
+ a.__reactInternalSnapshotBeforeUpdate =
+ s;
+ }
+ break;
+ case 3:
+ X && Ce(e.stateNode.containerInfo);
+ break;
+ default:
+ throw Error(o(163));
+ }
+ } catch (l) {
+ Vo(e, e.return, l);
+ }
+ if (null !== (t = e.sibling)) {
+ (t.return = e.return), (ua = t);
+ break;
+ }
+ ua = e.return;
+ }
+ (n = da), (da = !1);
+ })(e, r),
+ (function (e, t) {
+ for (ua = t; null !== ua; ) {
+ var n = (t = ua).deletions;
+ if (null !== n)
+ for (var r = 0; r < n.length; r++) {
+ var i = n[r];
+ try {
+ var a = e;
+ X ? _a(a, i, t) : ga(a, i, t);
+ var o = i.alternate;
+ null !== o && (o.return = null),
+ (i.return = null);
+ } catch (x) {
+ Vo(i, t, x);
+ }
+ }
+ if (
+ ((n = t.child),
+ 0 !== (12854 & t.subtreeFlags) && null !== n)
+ )
+ (n.return = t), (ua = n);
+ else
+ for (; null !== ua; ) {
+ t = ua;
+ try {
+ var s = t.flags;
+ if ((32 & s && X && be(t.stateNode), 512 & s)) {
+ var l = t.alternate;
+ if (null !== l) {
+ var u = l.ref;
+ null !== u &&
+ ("function" === typeof u
+ ? u(null)
+ : (u.current = null));
+ }
+ }
+ if (8192 & s)
+ switch (t.tag) {
+ case 13:
+ if (null !== t.memoizedState) {
+ var c = t.alternate;
+ (null !== c &&
+ null !== c.memoizedState) ||
+ (oo = Ot());
+ }
+ break;
+ case 22:
+ var f = null !== t.memoizedState,
+ d = t.alternate,
+ h =
+ null !== d &&
+ null !== d.memoizedState;
+ if (((n = t), X))
+ e: if (
+ ((r = n), (i = f), (a = null), X)
+ )
+ for (var p = r; ; ) {
+ if (5 === p.tag) {
+ if (null === a) {
+ a = p;
+ var v = p.stateNode;
+ i
+ ? xe(v)
+ : Ee(
+ p.stateNode,
+ p.memoizedProps
+ );
+ }
+ } else if (6 === p.tag) {
+ if (null === a) {
+ var m = p.stateNode;
+ i
+ ? Se(m)
+ : _e(m, p.memoizedProps);
+ }
+ } else if (
+ ((22 !== p.tag && 23 !== p.tag) ||
+ null === p.memoizedState ||
+ p === r) &&
+ null !== p.child
+ ) {
+ (p.child.return = p),
+ (p = p.child);
+ continue;
+ }
+ if (p === r) break;
+ for (; null === p.sibling; ) {
+ if (
+ null === p.return ||
+ p.return === r
+ )
+ break e;
+ a === p && (a = null),
+ (p = p.return);
+ }
+ a === p && (a = null),
+ (p.sibling.return = p.return),
+ (p = p.sibling);
+ }
+ if (f && !h && 0 !== (1 & n.mode)) {
+ ua = n;
+ for (var g = n.child; null !== g; ) {
+ for (n = ua = g; null !== ua; ) {
+ var A = (r = ua).child;
+ switch (r.tag) {
+ case 0:
+ case 11:
+ case 14:
+ case 15:
+ ha(4, r, r.return);
+ break;
+ case 1:
+ ca(r, r.return);
+ var y = r.stateNode;
+ if (
+ "function" ===
+ typeof y.componentWillUnmount
+ ) {
+ var b = r.return;
+ try {
+ (y.props = r.memoizedProps),
+ (y.state =
+ r.memoizedState),
+ y.componentWillUnmount();
+ } catch (x) {
+ Vo(r, b, x);
+ }
+ }
+ break;
+ case 5:
+ ca(r, r.return);
+ break;
+ case 22:
+ if (null !== r.memoizedState) {
+ ka(n);
+ continue;
+ }
+ }
+ null !== A
+ ? ((A.return = r), (ua = A))
+ : ka(n);
+ }
+ g = g.sibling;
+ }
+ }
+ }
+ switch (4102 & s) {
+ case 2:
+ xa(t), (t.flags &= -3);
+ break;
+ case 6:
+ xa(t), (t.flags &= -3), Ca(t.alternate, t);
+ break;
+ case 4096:
+ t.flags &= -4097;
+ break;
+ case 4100:
+ (t.flags &= -4097), Ca(t.alternate, t);
+ break;
+ case 4:
+ Ca(t.alternate, t);
+ }
+ } catch (x) {
+ Vo(t, t.return, x);
+ }
+ if (null !== (n = t.sibling)) {
+ (n.return = t.return), (ua = n);
+ break;
+ }
+ ua = t.return;
+ }
+ }
+ })(e, r),
+ F(e.containerInfo),
+ (e.current = r),
+ Ta(r, e, i),
+ Ft(),
+ (Wa = l),
+ (Bt = s),
+ (ja.transition = a);
+ } else e.current = r;
+ if (
+ (po && ((po = !1), (vo = e), (mo = i)),
+ (a = e.pendingLanes),
+ 0 === a && (ho = null),
+ (function (e) {
+ if (Ht && "function" === typeof Ht.onCommitFiberRoot)
+ try {
+ Ht.onCommitFiberRoot(
+ Qt,
+ e,
+ void 0,
+ 128 === (128 & e.current.flags)
+ );
+ } catch (t) {}
+ })(r.stateNode),
+ Co(e, Ot()),
+ null !== t)
+ )
+ for (n = e.onRecoverableError, r = 0; r < t.length; r++)
+ n(t[r]);
+ if (co) throw ((co = !1), (e = fo), (fo = null), e);
+ 0 !== (1 & mo) && 0 !== e.tag && Qo(),
+ (a = e.pendingLanes),
+ 0 !== (1 & a)
+ ? e === Ao
+ ? go++
+ : ((go = 0), (Ao = e))
+ : (go = 0),
+ qt();
+ })(e, t, n);
+ } finally {
+ (ja.transition = r), (Bt = n);
+ }
+ return null;
+ }
+ function Qo() {
+ if (null !== vo) {
+ var e = Pt(mo),
+ t = ja.transition,
+ n = Bt;
+ try {
+ if (
+ ((ja.transition = null), (Bt = 16 > e ? 16 : e), null === vo)
+ )
+ var r = !1;
+ else {
+ if (((e = vo), (vo = null), (mo = 0), 0 !== (6 & Wa)))
+ throw Error(o(331));
+ var i = Wa;
+ for (Wa |= 4, ua = e.current; null !== ua; ) {
+ var a = ua,
+ s = a.child;
+ if (0 !== (16 & ua.flags)) {
+ var l = a.deletions;
+ if (null !== l) {
+ for (var u = 0; u < l.length; u++) {
+ var c = l[u];
+ for (ua = c; null !== ua; ) {
+ var f = ua;
+ switch (f.tag) {
+ case 0:
+ case 11:
+ case 15:
+ ha(8, f, a);
+ }
+ var d = f.child;
+ if (null !== d) (d.return = f), (ua = d);
+ else
+ for (; null !== ua; ) {
+ var h = (f = ua).sibling,
+ p = f.return;
+ if ((Aa(f), f === c)) {
+ ua = null;
+ break;
+ }
+ if (null !== h) {
+ (h.return = p), (ua = h);
+ break;
+ }
+ ua = p;
+ }
+ }
+ }
+ var v = a.alternate;
+ if (null !== v) {
+ var m = v.child;
+ if (null !== m) {
+ v.child = null;
+ do {
+ var g = m.sibling;
+ (m.sibling = null), (m = g);
+ } while (null !== m);
+ }
+ }
+ ua = a;
+ }
+ }
+ if (0 !== (2064 & a.subtreeFlags) && null !== s)
+ (s.return = a), (ua = s);
+ else
+ e: for (; null !== ua; ) {
+ if (0 !== (2048 & (a = ua).flags))
+ switch (a.tag) {
+ case 0:
+ case 11:
+ case 15:
+ ha(9, a, a.return);
+ }
+ var A = a.sibling;
+ if (null !== A) {
+ (A.return = a.return), (ua = A);
+ break e;
+ }
+ ua = a.return;
+ }
+ }
+ var y = e.current;
+ for (ua = y; null !== ua; ) {
+ var b = (s = ua).child;
+ if (0 !== (2064 & s.subtreeFlags) && null !== b)
+ (b.return = s), (ua = b);
+ else
+ e: for (s = y; null !== ua; ) {
+ if (0 !== (2048 & (l = ua).flags))
+ try {
+ switch (l.tag) {
+ case 0:
+ case 11:
+ case 15:
+ pa(9, l);
+ }
+ } catch (S) {
+ Vo(l, l.return, S);
+ }
+ if (l === s) {
+ ua = null;
+ break e;
+ }
+ var x = l.sibling;
+ if (null !== x) {
+ (x.return = l.return), (ua = x);
+ break e;
+ }
+ ua = l.return;
+ }
+ }
+ if (
+ ((Wa = i),
+ qt(),
+ Ht && "function" === typeof Ht.onPostCommitFiberRoot)
+ )
+ try {
+ Ht.onPostCommitFiberRoot(Qt, e);
+ } catch (S) {}
+ r = !0;
+ }
+ return r;
+ } finally {
+ (Bt = n), (ja.transition = t);
+ }
+ }
+ return !1;
+ }
+ function Ho(e, t, n) {
+ gn(e, (t = _i(0, (t = gi(n, t)), 1))),
+ (t = xo()),
+ null !== (e = _o(e, 1)) && (kt(e, 1, t), Co(e, t));
+ }
+ function Vo(e, t, n) {
+ if (3 === e.tag) Ho(e, e, n);
+ else
+ for (; null !== t; ) {
+ if (3 === t.tag) {
+ Ho(t, e, n);
+ break;
+ }
+ if (1 === t.tag) {
+ var r = t.stateNode;
+ if (
+ "function" === typeof t.type.getDerivedStateFromError ||
+ ("function" === typeof r.componentDidCatch &&
+ (null === ho || !ho.has(r)))
+ ) {
+ gn(t, (e = Ci(t, (e = gi(n, e)), 1))),
+ (e = xo()),
+ null !== (t = _o(t, 1)) && (kt(t, 1, e), Co(t, e));
+ break;
+ }
+ }
+ t = t.return;
+ }
+ }
+ function jo(e, t, n) {
+ var r = e.pingCache;
+ null !== r && r.delete(t),
+ (t = xo()),
+ (e.pingedLanes |= e.suspendedLanes & n),
+ Xa === e &&
+ (qa & n) === n &&
+ (4 === $a ||
+ (3 === $a && (130023424 & qa) === qa && 500 > Ot() - oo)
+ ? Po(e, 0)
+ : (ro |= n)),
+ Co(e, t);
+ }
+ function Wo(e, t) {
+ 0 === t &&
+ (0 === (1 & e.mode)
+ ? (t = 1)
+ : ((t = _t), 0 === (130023424 & (_t <<= 1)) && (_t = 4194304)));
+ var n = xo();
+ null !== (e = _o(e, t)) && (kt(e, t, n), Co(e, n));
+ }
+ function Xo(e) {
+ var t = e.memoizedState,
+ n = 0;
+ null !== t && (n = t.retryLane), Wo(e, n);
+ }
+ function Yo(e, t) {
+ var n = 0;
+ switch (e.tag) {
+ case 13:
+ var r = e.stateNode,
+ i = e.memoizedState;
+ null !== i && (n = i.retryLane);
+ break;
+ case 19:
+ r = e.stateNode;
+ break;
+ default:
+ throw Error(o(314));
+ }
+ null !== r && r.delete(t), Wo(e, n);
+ }
+ function qo(e, t) {
+ return Lt(e, t);
+ }
+ function Jo(e, t, n, r) {
+ (this.tag = e),
+ (this.key = n),
+ (this.sibling =
+ this.child =
+ this.return =
+ this.stateNode =
+ this.type =
+ this.elementType =
+ null),
+ (this.index = 0),
+ (this.ref = null),
+ (this.pendingProps = t),
+ (this.dependencies =
+ this.memoizedState =
+ this.updateQueue =
+ this.memoizedProps =
+ null),
+ (this.mode = r),
+ (this.subtreeFlags = this.flags = 0),
+ (this.deletions = null),
+ (this.childLanes = this.lanes = 0),
+ (this.alternate = null);
+ }
+ function Ko(e, t, n, r) {
+ return new Jo(e, t, n, r);
+ }
+ function $o(e) {
+ return !(!(e = e.prototype) || !e.isReactComponent);
+ }
+ function es(e, t) {
+ var n = e.alternate;
+ return (
+ null === n
+ ? (((n = Ko(e.tag, t, e.key, e.mode)).elementType =
+ e.elementType),
+ (n.type = e.type),
+ (n.stateNode = e.stateNode),
+ (n.alternate = e),
+ (e.alternate = n))
+ : ((n.pendingProps = t),
+ (n.type = e.type),
+ (n.flags = 0),
+ (n.subtreeFlags = 0),
+ (n.deletions = null)),
+ (n.flags = 14680064 & e.flags),
+ (n.childLanes = e.childLanes),
+ (n.lanes = e.lanes),
+ (n.child = e.child),
+ (n.memoizedProps = e.memoizedProps),
+ (n.memoizedState = e.memoizedState),
+ (n.updateQueue = e.updateQueue),
+ (t = e.dependencies),
+ (n.dependencies =
+ null === t
+ ? null
+ : { lanes: t.lanes, firstContext: t.firstContext }),
+ (n.sibling = e.sibling),
+ (n.index = e.index),
+ (n.ref = e.ref),
+ n
+ );
+ }
+ function ts(e, t, n, r, i, a) {
+ var s = 2;
+ if (((r = e), "function" === typeof e)) $o(e) && (s = 1);
+ else if ("string" === typeof e) s = 5;
+ else
+ e: switch (e) {
+ case c:
+ return ns(n.children, i, a, t);
+ case f:
+ (s = 8), (i |= 8);
+ break;
+ case d:
+ return (
+ ((e = Ko(12, n, t, 2 | i)).elementType = d),
+ (e.lanes = a),
+ e
+ );
+ case m:
+ return (
+ ((e = Ko(13, n, t, i)).elementType = m), (e.lanes = a), e
+ );
+ case g:
+ return (
+ ((e = Ko(19, n, t, i)).elementType = g), (e.lanes = a), e
+ );
+ case b:
+ return rs(n, i, a, t);
+ default:
+ if ("object" === typeof e && null !== e)
+ switch (e.$$typeof) {
+ case h:
+ s = 10;
+ break e;
+ case p:
+ s = 9;
+ break e;
+ case v:
+ s = 11;
+ break e;
+ case A:
+ s = 14;
+ break e;
+ case y:
+ (s = 16), (r = null);
+ break e;
+ }
+ throw Error(o(130, null == e ? e : typeof e, ""));
+ }
+ return (
+ ((t = Ko(s, n, t, i)).elementType = e),
+ (t.type = r),
+ (t.lanes = a),
+ t
+ );
+ }
+ function ns(e, t, n, r) {
+ return ((e = Ko(7, e, r, t)).lanes = n), e;
+ }
+ function rs(e, t, n, r) {
+ return (
+ ((e = Ko(22, e, r, t)).elementType = b),
+ (e.lanes = n),
+ (e.stateNode = {}),
+ e
+ );
+ }
+ function is(e, t, n) {
+ return ((e = Ko(6, e, null, t)).lanes = n), e;
+ }
+ function as(e, t, n) {
+ return (
+ ((t = Ko(
+ 4,
+ null !== e.children ? e.children : [],
+ e.key,
+ t
+ )).lanes = n),
+ (t.stateNode = {
+ containerInfo: e.containerInfo,
+ pendingChildren: null,
+ implementation: e.implementation,
+ }),
+ t
+ );
+ }
+ function os(e, t, n, r, i) {
+ (this.tag = t),
+ (this.containerInfo = e),
+ (this.finishedWork =
+ this.pingCache =
+ this.current =
+ this.pendingChildren =
+ null),
+ (this.timeoutHandle = j),
+ (this.callbackNode = this.pendingContext = this.context = null),
+ (this.callbackPriority = 0),
+ (this.eventTimes = It(0)),
+ (this.expirationTimes = It(-1)),
+ (this.entangledLanes =
+ this.finishedLanes =
+ this.mutableReadLanes =
+ this.expiredLanes =
+ this.pingedLanes =
+ this.suspendedLanes =
+ this.pendingLanes =
+ 0),
+ (this.entanglements = It(0)),
+ (this.identifierPrefix = r),
+ (this.onRecoverableError = i),
+ q && (this.mutableSourceEagerHydrationData = null);
+ }
+ function ss(e, t, n, r, i, a, o, s, l) {
+ return (
+ (e = new os(e, t, n, s, l)),
+ 1 === t ? ((t = 1), !0 === a && (t |= 8)) : (t = 0),
+ (a = Ko(3, null, null, t)),
+ (e.current = a),
+ (a.stateNode = e),
+ (a.memoizedState = {
+ element: r,
+ isDehydrated: n,
+ cache: null,
+ transitions: null,
+ }),
+ pn(a),
+ e
+ );
+ }
+ function ls(e) {
+ if (!e) return ut;
+ e: {
+ if (C((e = e._reactInternals)) !== e || 1 !== e.tag)
+ throw Error(o(170));
+ var t = e;
+ do {
+ switch (t.tag) {
+ case 3:
+ t = t.stateNode.context;
+ break e;
+ case 1:
+ if (pt(t.type)) {
+ t = t.stateNode.__reactInternalMemoizedMergedChildContext;
+ break e;
+ }
+ }
+ t = t.return;
+ } while (null !== t);
+ throw Error(o(171));
+ }
+ if (1 === e.tag) {
+ var n = e.type;
+ if (pt(n)) return gt(e, n, t);
+ }
+ return t;
+ }
+ function us(e) {
+ var t = e._reactInternals;
+ if (void 0 === t) {
+ if ("function" === typeof e.render) throw Error(o(188));
+ throw ((e = Object.keys(e).join(",")), Error(o(268, e)));
+ }
+ return null === (e = M(t)) ? null : e.stateNode;
+ }
+ function cs(e, t) {
+ if (null !== (e = e.memoizedState) && null !== e.dehydrated) {
+ var n = e.retryLane;
+ e.retryLane = 0 !== n && n < t ? n : t;
+ }
+ }
+ function fs(e, t) {
+ cs(e, t), (e = e.alternate) && cs(e, t);
+ }
+ function ds(e) {
+ return null === (e = M(e)) ? null : e.stateNode;
+ }
+ function hs() {
+ return null;
+ }
+ return (
+ (uo = function (e, t, n) {
+ if (null !== e)
+ if (e.memoizedProps !== t.pendingProps || ft.current) Ui = !0;
+ else {
+ if (0 === (e.lanes & n) && 0 === (128 & t.flags))
+ return (
+ (Ui = !1),
+ (function (e, t, n) {
+ switch (t.tag) {
+ case 3:
+ ji(t), $n();
+ break;
+ case 5:
+ pr(t);
+ break;
+ case 1:
+ pt(t.type) && At(t);
+ break;
+ case 4:
+ dr(t, t.stateNode.containerInfo);
+ break;
+ case 10:
+ sn(0, t.type._context, t.memoizedProps.value);
+ break;
+ case 13:
+ var r = t.memoizedState;
+ if (null !== r)
+ return null !== r.dehydrated
+ ? (lt(mr, 1 & mr.current),
+ (t.flags |= 128),
+ null)
+ : 0 !== (n & t.child.childLanes)
+ ? qi(e, t, n)
+ : (lt(mr, 1 & mr.current),
+ null !== (e = ia(e, t, n))
+ ? e.sibling
+ : null);
+ lt(mr, 1 & mr.current);
+ break;
+ case 19:
+ if (
+ ((r = 0 !== (n & t.childLanes)),
+ 0 !== (128 & e.flags))
+ ) {
+ if (r) return ra(e, t, n);
+ t.flags |= 128;
+ }
+ var i = t.memoizedState;
+ if (
+ (null !== i &&
+ ((i.rendering = null),
+ (i.tail = null),
+ (i.lastEffect = null)),
+ lt(mr, mr.current),
+ r)
+ )
+ break;
+ return null;
+ case 22:
+ case 23:
+ return (t.lanes = 0), Zi(e, t, n);
+ }
+ return ia(e, t, n);
+ })(e, t, n)
+ );
+ Ui = 0 !== (131072 & e.flags);
+ }
+ else
+ (Ui = !1),
+ Hn && 0 !== (1048576 & t.flags) && Nn(t, Bn, t.index);
+ switch (((t.lanes = 0), t.tag)) {
+ case 2:
+ var r = t.type;
+ null !== e &&
+ ((e.alternate = null),
+ (t.alternate = null),
+ (t.flags |= 2)),
+ (e = t.pendingProps);
+ var i = ht(t, ct.current);
+ cn(t, n), (i = Br(null, t, r, e, i, n));
+ var a = Pr();
+ return (
+ (t.flags |= 1),
+ "object" === typeof i &&
+ null !== i &&
+ "function" === typeof i.render &&
+ void 0 === i.$$typeof
+ ? ((t.tag = 1),
+ (t.memoizedState = null),
+ (t.updateQueue = null),
+ pt(r) ? ((a = !0), At(t)) : (a = !1),
+ (t.memoizedState =
+ null !== i.state && void 0 !== i.state
+ ? i.state
+ : null),
+ pn(t),
+ (i.updater = _n),
+ (t.stateNode = i),
+ (i._reactInternals = t),
+ Mn(t, r, e, n),
+ (t = Vi(null, t, r, !0, a, n)))
+ : ((t.tag = 0),
+ Hn && a && Gn(t),
+ Fi(null, t, i, n),
+ (t = t.child)),
+ t
+ );
+ case 16:
+ r = t.elementType;
+ e: {
+ switch (
+ (null !== e &&
+ ((e.alternate = null),
+ (t.alternate = null),
+ (t.flags |= 2)),
+ (e = t.pendingProps),
+ (r = (i = r._init)(r._payload)),
+ (t.type = r),
+ (i = t.tag =
+ (function (e) {
+ if ("function" === typeof e) return $o(e) ? 1 : 0;
+ if (void 0 !== e && null !== e) {
+ if ((e = e.$$typeof) === v) return 11;
+ if (e === A) return 14;
+ }
+ return 2;
+ })(r)),
+ (e = en(r, e)),
+ i)
+ ) {
+ case 0:
+ t = Qi(null, t, r, e, n);
+ break e;
+ case 1:
+ t = Hi(null, t, r, e, n);
+ break e;
+ case 11:
+ t = Oi(null, t, r, e, n);
+ break e;
+ case 14:
+ t = Ni(null, t, r, en(r.type, e), n);
+ break e;
+ }
+ throw Error(o(306, r, ""));
+ }
+ return t;
+ case 0:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ Qi(e, t, r, (i = t.elementType === r ? i : en(r, i)), n)
+ );
+ case 1:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ Hi(e, t, r, (i = t.elementType === r ? i : en(r, i)), n)
+ );
+ case 3:
+ e: {
+ if ((ji(t), null === e)) throw Error(o(387));
+ (r = t.pendingProps),
+ (i = (a = t.memoizedState).element),
+ vn(e, t),
+ bn(t, r, null, n);
+ var s = t.memoizedState;
+ if (((r = s.element), q && a.isDehydrated)) {
+ if (
+ ((a = {
+ element: r,
+ isDehydrated: !1,
+ cache: s.cache,
+ transitions: s.transitions,
+ }),
+ (t.updateQueue.baseState = a),
+ (t.memoizedState = a),
+ 256 & t.flags)
+ ) {
+ t = Wi(e, t, r, n, (i = Error(o(423))));
+ break e;
+ }
+ if (r !== i) {
+ t = Wi(e, t, r, n, (i = Error(o(424))));
+ break e;
+ }
+ for (
+ q &&
+ ((Qn = Ze(t.stateNode.containerInfo)),
+ (zn = t),
+ (Hn = !0),
+ (jn = null),
+ (Vn = !1)),
+ n = or(t, null, r, n),
+ t.child = n;
+ n;
+
+ )
+ (n.flags = (-3 & n.flags) | 4096), (n = n.sibling);
+ } else {
+ if (($n(), r === i)) {
+ t = ia(e, t, n);
+ break e;
+ }
+ Fi(e, t, r, n);
+ }
+ t = t.child;
+ }
+ return t;
+ case 5:
+ return (
+ pr(t),
+ null === e && qn(t),
+ (r = t.type),
+ (i = t.pendingProps),
+ (a = null !== e ? e.memoizedProps : null),
+ (s = i.children),
+ z(r, i)
+ ? (s = null)
+ : null !== a && z(r, a) && (t.flags |= 32),
+ zi(e, t),
+ Fi(e, t, s, n),
+ t.child
+ );
+ case 6:
+ return null === e && qn(t), null;
+ case 13:
+ return qi(e, t, n);
+ case 4:
+ return (
+ dr(t, t.stateNode.containerInfo),
+ (r = t.pendingProps),
+ null === e ? (t.child = ar(t, null, r, n)) : Fi(e, t, r, n),
+ t.child
+ );
+ case 11:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ Oi(e, t, r, (i = t.elementType === r ? i : en(r, i)), n)
+ );
+ case 7:
+ return Fi(e, t, t.pendingProps, n), t.child;
+ case 8:
+ case 12:
+ return Fi(e, t, t.pendingProps.children, n), t.child;
+ case 10:
+ e: {
+ if (
+ ((r = t.type._context),
+ (i = t.pendingProps),
+ (a = t.memoizedProps),
+ sn(0, r, (s = i.value)),
+ null !== a)
+ )
+ if (Vt(a.value, s)) {
+ if (a.children === i.children && !ft.current) {
+ t = ia(e, t, n);
+ break e;
+ }
+ } else
+ for (
+ null !== (a = t.child) && (a.return = t);
+ null !== a;
+
+ ) {
+ var l = a.dependencies;
+ if (null !== l) {
+ s = a.child;
+ for (var u = l.firstContext; null !== u; ) {
+ if (u.context === r) {
+ if (1 === a.tag) {
+ (u = mn(-1, n & -n)).tag = 2;
+ var c = a.updateQueue;
+ if (null !== c) {
+ var f = (c = c.shared).pending;
+ null === f
+ ? (u.next = u)
+ : ((u.next = f.next), (f.next = u)),
+ (c.pending = u);
+ }
+ }
+ (a.lanes |= n),
+ null !== (u = a.alternate) && (u.lanes |= n),
+ un(a.return, n, t),
+ (l.lanes |= n);
+ break;
+ }
+ u = u.next;
+ }
+ } else if (10 === a.tag)
+ s = a.type === t.type ? null : a.child;
+ else if (18 === a.tag) {
+ if (null === (s = a.return)) throw Error(o(341));
+ (s.lanes |= n),
+ null !== (l = s.alternate) && (l.lanes |= n),
+ un(s, n, t),
+ (s = a.sibling);
+ } else s = a.child;
+ if (null !== s) s.return = a;
+ else
+ for (s = a; null !== s; ) {
+ if (s === t) {
+ s = null;
+ break;
+ }
+ if (null !== (a = s.sibling)) {
+ (a.return = s.return), (s = a);
+ break;
+ }
+ s = s.return;
+ }
+ a = s;
+ }
+ Fi(e, t, i.children, n), (t = t.child);
+ }
+ return t;
+ case 9:
+ return (
+ (i = t.type),
+ (r = t.pendingProps.children),
+ cn(t, n),
+ (r = r((i = fn(i)))),
+ (t.flags |= 1),
+ Fi(e, t, r, n),
+ t.child
+ );
+ case 14:
+ return (
+ (i = en((r = t.type), t.pendingProps)),
+ Ni(e, t, r, (i = en(r.type, i)), n)
+ );
+ case 15:
+ return Gi(e, t, t.type, t.pendingProps, n);
+ case 17:
+ return (
+ (r = t.type),
+ (i = t.pendingProps),
+ (i = t.elementType === r ? i : en(r, i)),
+ null !== e &&
+ ((e.alternate = null),
+ (t.alternate = null),
+ (t.flags |= 2)),
+ (t.tag = 1),
+ pt(r) ? ((e = !0), At(t)) : (e = !1),
+ cn(t, n),
+ wn(t, r, i),
+ Mn(t, r, i, n),
+ Vi(null, t, r, !0, e, n)
+ );
+ case 19:
+ return ra(e, t, n);
+ case 22:
+ return Zi(e, t, n);
+ }
+ throw Error(o(156, t.tag));
+ }),
+ (t.attemptContinuousHydration = function (e) {
+ 13 === e.tag && (Eo(e, 134217728, xo()), fs(e, 134217728));
+ }),
+ (t.attemptHydrationAtCurrentPriority = function (e) {
+ if (13 === e.tag) {
+ var t = xo(),
+ n = So(e);
+ Eo(e, n, t), fs(e, n);
+ }
+ }),
+ (t.attemptSynchronousHydration = function (e) {
+ switch (e.tag) {
+ case 3:
+ var t = e.stateNode;
+ if (t.current.memoizedState.isDehydrated) {
+ var n = Ct(t.pendingLanes);
+ 0 !== n &&
+ (Rt(t, 1 | n),
+ Co(t, Ot()),
+ 0 === (6 & Wa) && (lo(), qt()));
+ }
+ break;
+ case 13:
+ var r = xo();
+ Ro(function () {
+ return Eo(e, 1, r);
+ }),
+ fs(e, 1);
+ }
+ }),
+ (t.batchedUpdates = function (e, t) {
+ var n = Wa;
+ Wa |= 1;
+ try {
+ return e(t);
+ } finally {
+ 0 === (Wa = n) && (lo(), Wt && qt());
+ }
+ }),
+ (t.createComponentSelector = function (e) {
+ return { $$typeof: Ba, value: e };
+ }),
+ (t.createContainer = function (e, t, n, r, i, a, o) {
+ return ss(e, t, !1, null, 0, r, 0, a, o);
+ }),
+ (t.createHasPseudoClassSelector = function (e) {
+ return { $$typeof: Pa, value: e };
+ }),
+ (t.createHydrationContainer = function (e, t, n, r, i, a, o, s, l) {
+ return (
+ ((e = ss(n, r, !0, e, 0, a, 0, s, l)).context = ls(null)),
+ (n = e.current),
+ ((a = mn((r = xo()), (i = So(n)))).callback =
+ void 0 !== t && null !== t ? t : null),
+ gn(n, a),
+ (e.current.lanes = i),
+ kt(e, i, r),
+ Co(e, r),
+ e
+ );
+ }),
+ (t.createPortal = function (e, t, n) {
+ var r =
+ 3 < arguments.length && void 0 !== arguments[3]
+ ? arguments[3]
+ : null;
+ return {
+ $$typeof: u,
+ key: null == r ? null : "" + r,
+ children: e,
+ containerInfo: t,
+ implementation: n,
+ };
+ }),
+ (t.createRoleSelector = function (e) {
+ return { $$typeof: La, value: e };
+ }),
+ (t.createTestNameSelector = function (e) {
+ return { $$typeof: Da, value: e };
+ }),
+ (t.createTextSelector = function (e) {
+ return { $$typeof: Ua, value: e };
+ }),
+ (t.deferredUpdates = function (e) {
+ var t = Bt,
+ n = ja.transition;
+ try {
+ return (ja.transition = null), (Bt = 16), e();
+ } finally {
+ (Bt = t), (ja.transition = n);
+ }
+ }),
+ (t.discreteUpdates = function (e, t, n, r, i) {
+ var a = Bt,
+ o = ja.transition;
+ try {
+ return (ja.transition = null), (Bt = 1), e(t, n, r, i);
+ } finally {
+ (Bt = a), (ja.transition = o), 0 === Wa && lo();
+ }
+ }),
+ (t.findAllNodes = za),
+ (t.findBoundingRects = function (e, t) {
+ if (!re) throw Error(o(363));
+ (t = za(e, t)), (e = []);
+ for (var n = 0; n < t.length; n++) e.push(ae(t[n]));
+ for (t = e.length - 1; 0 < t; t--)
+ for (
+ var r = (n = e[t]).x,
+ i = r + n.width,
+ a = n.y,
+ s = a + n.height,
+ l = t - 1;
+ 0 <= l;
+ l--
+ )
+ if (t !== l) {
+ var u = e[l],
+ c = u.x,
+ f = c + u.width,
+ d = u.y,
+ h = d + u.height;
+ if (r >= c && a >= d && i <= f && s <= h) {
+ e.splice(t, 1);
+ break;
+ }
+ if (!(r !== c || n.width !== u.width || h < a || d > s)) {
+ d > a && ((u.height += d - a), (u.y = a)),
+ h < s && (u.height = s - d),
+ e.splice(t, 1);
+ break;
+ }
+ if (!(a !== d || n.height !== u.height || f < r || c > i)) {
+ c > r && ((u.width += c - r), (u.x = r)),
+ f < i && (u.width = i - c),
+ e.splice(t, 1);
+ break;
+ }
+ }
+ return e;
+ }),
+ (t.findHostInstance = us),
+ (t.findHostInstanceWithNoPortals = function (e) {
+ return null === (e = null !== (e = T(e)) ? k(e) : null)
+ ? null
+ : e.stateNode;
+ }),
+ (t.findHostInstanceWithWarning = function (e) {
+ return us(e);
+ }),
+ (t.flushControlled = function (e) {
+ var t = Wa;
+ Wa |= 1;
+ var n = ja.transition,
+ r = Bt;
+ try {
+ (ja.transition = null), (Bt = 1), e();
+ } finally {
+ (Bt = r), (ja.transition = n), 0 === (Wa = t) && (lo(), qt());
+ }
+ }),
+ (t.flushPassiveEffects = Qo),
+ (t.flushSync = Ro),
+ (t.focusWithin = function (e, t) {
+ if (!re) throw Error(o(363));
+ for (
+ t = Za((e = Oa(e)), t), t = Array.from(t), e = 0;
+ e < t.length;
+
+ ) {
+ var n = t[e++];
+ if (!se(n)) {
+ if (5 === n.tag && ue(n.stateNode)) return !0;
+ for (n = n.child; null !== n; ) t.push(n), (n = n.sibling);
+ }
+ }
+ return !1;
+ }),
+ (t.getCurrentUpdatePriority = function () {
+ return Bt;
+ }),
+ (t.getFindAllNodesFailureDescription = function (e, t) {
+ if (!re) throw Error(o(363));
+ var n = 0,
+ r = [];
+ e = [Oa(e), 0];
+ for (var i = 0; i < e.length; ) {
+ var a = e[i++],
+ s = e[i++],
+ l = t[s];
+ if (
+ (5 !== a.tag || !se(a)) &&
+ (Na(a, l) && (r.push(Ga(l)), ++s > n && (n = s)),
+ s < t.length)
+ )
+ for (a = a.child; null !== a; ) e.push(a, s), (a = a.sibling);
+ }
+ if (n < t.length) {
+ for (e = []; n < t.length; n++) e.push(Ga(t[n]));
+ return (
+ "findAllNodes was able to match part of the selector:\n " +
+ r.join(" > ") +
+ "\n\nNo matching component was found for:\n " +
+ e.join(" > ")
+ );
+ }
+ return null;
+ }),
+ (t.getPublicRootInstance = function (e) {
+ return (e = e.current).child
+ ? 5 === e.child.tag
+ ? P(e.child.stateNode)
+ : e.child.stateNode
+ : null;
+ }),
+ (t.injectIntoDevTools = function (e) {
+ if (
+ ((e = {
+ bundleType: e.bundleType,
+ version: e.version,
+ rendererPackageName: e.rendererPackageName,
+ rendererConfig: e.rendererConfig,
+ overrideHookState: null,
+ overrideHookStateDeletePath: null,
+ overrideHookStateRenamePath: null,
+ overrideProps: null,
+ overridePropsDeletePath: null,
+ overridePropsRenamePath: null,
+ setErrorHandler: null,
+ setSuspenseHandler: null,
+ scheduleUpdate: null,
+ currentDispatcherRef: s.ReactCurrentDispatcher,
+ findHostInstanceByFiber: ds,
+ findFiberByHostInstance: e.findFiberByHostInstance || hs,
+ findHostInstancesForRefresh: null,
+ scheduleRefresh: null,
+ scheduleRoot: null,
+ setRefreshHandler: null,
+ getCurrentFiber: null,
+ reconcilerVersion: "18.0.0-fc46dba67-20220329",
+ }),
+ "undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)
+ )
+ e = !1;
+ else {
+ var t = __REACT_DEVTOOLS_GLOBAL_HOOK__;
+ if (t.isDisabled || !t.supportsFiber) e = !0;
+ else {
+ try {
+ (Qt = t.inject(e)), (Ht = t);
+ } catch (n) {}
+ e = !!t.checkDCE;
+ }
+ }
+ return e;
+ }),
+ (t.isAlreadyRendering = function () {
+ return !1;
+ }),
+ (t.observeVisibleRects = function (e, t, n, r) {
+ if (!re) throw Error(o(363));
+ e = za(e, t);
+ var i = ce(e, n, r).disconnect;
+ return {
+ disconnect: function () {
+ i();
+ },
+ };
+ }),
+ (t.registerMutableSourceForHydration = function (e, t) {
+ var n = t._getVersion;
+ (n = n(t._source)),
+ null == e.mutableSourceEagerHydrationData
+ ? (e.mutableSourceEagerHydrationData = [t, n])
+ : e.mutableSourceEagerHydrationData.push(t, n);
+ }),
+ (t.runWithPriority = function (e, t) {
+ var n = Bt;
+ try {
+ return (Bt = e), t();
+ } finally {
+ Bt = n;
+ }
+ }),
+ (t.shouldError = function () {
+ return null;
+ }),
+ (t.shouldSuspend = function () {
+ return !1;
+ }),
+ (t.updateContainer = function (e, t, n, r) {
+ var i = t.current,
+ a = xo(),
+ o = So(i);
+ return (
+ (n = ls(n)),
+ null === t.context ? (t.context = n) : (t.pendingContext = n),
+ ((t = mn(a, o)).payload = { element: e }),
+ null !== (r = void 0 === r ? null : r) && (t.callback = r),
+ gn(i, t),
+ null !== (e = Eo(i, o, a)) && An(e, i, o),
+ o
+ );
+ }),
+ t
+ );
+ };
+ },
+ 4585: function (e, t, n) {
+ "use strict";
+ e.exports = n(4976);
+ },
+ 258: function (e, t, n) {
+ "use strict";
+ e.exports = n(3721);
+ },
+ 8436: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (
+ (r =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ r(e)
+ );
+ }
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.PrevArrow = t.NextArrow = void 0);
+ var i = s(n(2791)),
+ a = s(n(1694)),
+ o = n(8026);
+ function s(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function l() {
+ return (
+ (l =
+ Object.assign ||
+ function (e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n)
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }),
+ l.apply(this, arguments)
+ );
+ }
+ function u(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function c(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? u(Object(n), !0).forEach(function (t) {
+ f(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
+ : u(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ }
+ function f(e, t, n) {
+ return (
+ t in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ function d(e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ }
+ function h(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ (r.enumerable = r.enumerable || !1),
+ (r.configurable = !0),
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(e, r.key, r);
+ }
+ }
+ function p(e, t, n) {
+ return (
+ t && h(e.prototype, t),
+ n && h(e, n),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ e
+ );
+ }
+ function v(e, t) {
+ if ("function" !== typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ (e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && m(e, t);
+ }
+ function m(e, t) {
+ return (
+ (m =
+ Object.setPrototypeOf ||
+ function (e, t) {
+ return (e.__proto__ = t), e;
+ }),
+ m(e, t)
+ );
+ }
+ function g(e) {
+ var t = (function () {
+ if ("undefined" === typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" === typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {})
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ })();
+ return function () {
+ var n,
+ i = A(e);
+ if (t) {
+ var a = A(this).constructor;
+ n = Reflect.construct(i, arguments, a);
+ } else n = i.apply(this, arguments);
+ return (function (e, t) {
+ if (t && ("object" === r(t) || "function" === typeof t)) return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined"
+ );
+ return (function (e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return e;
+ })(e);
+ })(this, n);
+ };
+ }
+ function A(e) {
+ return (
+ (A = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ A(e)
+ );
+ }
+ var y = (function (e) {
+ v(n, e);
+ var t = g(n);
+ function n() {
+ return d(this, n), t.apply(this, arguments);
+ }
+ return (
+ p(n, [
+ {
+ key: "clickHandler",
+ value: function (e, t) {
+ t && t.preventDefault(), this.props.clickHandler(e, t);
+ },
+ },
+ {
+ key: "render",
+ value: function () {
+ var e = { "slick-arrow": !0, "slick-prev": !0 },
+ t = this.clickHandler.bind(this, { message: "previous" });
+ !this.props.infinite &&
+ (0 === this.props.currentSlide ||
+ this.props.slideCount <= this.props.slidesToShow) &&
+ ((e["slick-disabled"] = !0), (t = null));
+ var n = {
+ key: "0",
+ "data-role": "none",
+ className: (0, a.default)(e),
+ style: { display: "block" },
+ onClick: t,
+ },
+ r = {
+ currentSlide: this.props.currentSlide,
+ slideCount: this.props.slideCount,
+ };
+ return this.props.prevArrow
+ ? i.default.cloneElement(
+ this.props.prevArrow,
+ c(c({}, n), r)
+ )
+ : i.default.createElement(
+ "button",
+ l({ key: "0", type: "button" }, n),
+ " ",
+ "Previous"
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(i.default.PureComponent);
+ t.PrevArrow = y;
+ var b = (function (e) {
+ v(n, e);
+ var t = g(n);
+ function n() {
+ return d(this, n), t.apply(this, arguments);
+ }
+ return (
+ p(n, [
+ {
+ key: "clickHandler",
+ value: function (e, t) {
+ t && t.preventDefault(), this.props.clickHandler(e, t);
+ },
+ },
+ {
+ key: "render",
+ value: function () {
+ var e = { "slick-arrow": !0, "slick-next": !0 },
+ t = this.clickHandler.bind(this, { message: "next" });
+ (0, o.canGoNext)(this.props) ||
+ ((e["slick-disabled"] = !0), (t = null));
+ var n = {
+ key: "1",
+ "data-role": "none",
+ className: (0, a.default)(e),
+ style: { display: "block" },
+ onClick: t,
+ },
+ r = {
+ currentSlide: this.props.currentSlide,
+ slideCount: this.props.slideCount,
+ };
+ return this.props.nextArrow
+ ? i.default.cloneElement(
+ this.props.nextArrow,
+ c(c({}, n), r)
+ )
+ : i.default.createElement(
+ "button",
+ l({ key: "1", type: "button" }, n),
+ " ",
+ "Next"
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(i.default.PureComponent);
+ t.NextArrow = b;
+ },
+ 5484: function (e, t, n) {
+ "use strict";
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.default = void 0);
+ var r,
+ i = (r = n(2791)) && r.__esModule ? r : { default: r };
+ var a = {
+ accessibility: !0,
+ adaptiveHeight: !1,
+ afterChange: null,
+ appendDots: function (e) {
+ return i.default.createElement(
+ "ul",
+ { style: { display: "block" } },
+ e
+ );
+ },
+ arrows: !0,
+ autoplay: !1,
+ autoplaySpeed: 3e3,
+ beforeChange: null,
+ centerMode: !1,
+ centerPadding: "50px",
+ className: "",
+ cssEase: "ease",
+ customPaging: function (e) {
+ return i.default.createElement("button", null, e + 1);
+ },
+ dots: !1,
+ dotsClass: "slick-dots",
+ draggable: !0,
+ easing: "linear",
+ edgeFriction: 0.35,
+ fade: !1,
+ focusOnSelect: !1,
+ infinite: !0,
+ initialSlide: 0,
+ lazyLoad: null,
+ nextArrow: null,
+ onEdge: null,
+ onInit: null,
+ onLazyLoadError: null,
+ onReInit: null,
+ pauseOnDotsHover: !1,
+ pauseOnFocus: !1,
+ pauseOnHover: !0,
+ prevArrow: null,
+ responsive: null,
+ rows: 1,
+ rtl: !1,
+ slide: "div",
+ slidesPerRow: 1,
+ slidesToScroll: 1,
+ slidesToShow: 1,
+ speed: 500,
+ swipe: !0,
+ swipeEvent: null,
+ swipeToSlide: !1,
+ touchMove: !0,
+ touchThreshold: 5,
+ useCSS: !0,
+ useTransform: !0,
+ variableWidth: !1,
+ vertical: !1,
+ waitForAnimate: !0,
+ };
+ t.default = a;
+ },
+ 3800: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (
+ (r =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ r(e)
+ );
+ }
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.Dots = void 0);
+ var i = s(n(2791)),
+ a = s(n(1694)),
+ o = n(8026);
+ function s(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function l(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function u(e, t, n) {
+ return (
+ t in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ function c(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ (r.enumerable = r.enumerable || !1),
+ (r.configurable = !0),
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(e, r.key, r);
+ }
+ }
+ function f(e, t) {
+ return (
+ (f =
+ Object.setPrototypeOf ||
+ function (e, t) {
+ return (e.__proto__ = t), e;
+ }),
+ f(e, t)
+ );
+ }
+ function d(e) {
+ var t = (function () {
+ if ("undefined" === typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" === typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {})
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ })();
+ return function () {
+ var n,
+ i = h(e);
+ if (t) {
+ var a = h(this).constructor;
+ n = Reflect.construct(i, arguments, a);
+ } else n = i.apply(this, arguments);
+ return (function (e, t) {
+ if (t && ("object" === r(t) || "function" === typeof t)) return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined"
+ );
+ return (function (e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return e;
+ })(e);
+ })(this, n);
+ };
+ }
+ function h(e) {
+ return (
+ (h = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ h(e)
+ );
+ }
+ var p = (function (e) {
+ !(function (e, t) {
+ if ("function" !== typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ (e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && f(e, t);
+ })(h, e);
+ var t,
+ n,
+ r,
+ s = d(h);
+ function h() {
+ return (
+ (function (e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ })(this, h),
+ s.apply(this, arguments)
+ );
+ }
+ return (
+ (t = h),
+ (n = [
+ {
+ key: "clickHandler",
+ value: function (e, t) {
+ t.preventDefault(), this.props.clickHandler(e);
+ },
+ },
+ {
+ key: "render",
+ value: function () {
+ for (
+ var e,
+ t = this.props,
+ n = t.onMouseEnter,
+ r = t.onMouseOver,
+ s = t.onMouseLeave,
+ c = t.infinite,
+ f = t.slidesToScroll,
+ d = t.slidesToShow,
+ h = t.slideCount,
+ p = t.currentSlide,
+ v = (e = {
+ slideCount: h,
+ slidesToScroll: f,
+ slidesToShow: d,
+ infinite: c,
+ }).infinite
+ ? Math.ceil(e.slideCount / e.slidesToScroll)
+ : Math.ceil(
+ (e.slideCount - e.slidesToShow) / e.slidesToScroll
+ ) + 1,
+ m = { onMouseEnter: n, onMouseOver: r, onMouseLeave: s },
+ g = [],
+ A = 0;
+ A < v;
+ A++
+ ) {
+ var y = (A + 1) * f - 1,
+ b = c ? y : (0, o.clamp)(y, 0, h - 1),
+ x = b - (f - 1),
+ S = c ? x : (0, o.clamp)(x, 0, h - 1),
+ E = (0, a.default)({
+ "slick-active": c ? p >= S && p <= b : p === S,
+ }),
+ _ = {
+ message: "dots",
+ index: A,
+ slidesToScroll: f,
+ currentSlide: p,
+ },
+ C = this.clickHandler.bind(this, _);
+ g = g.concat(
+ i.default.createElement(
+ "li",
+ { key: A, className: E },
+ i.default.cloneElement(this.props.customPaging(A), {
+ onClick: C,
+ })
+ )
+ );
+ }
+ return i.default.cloneElement(
+ this.props.appendDots(g),
+ (function (e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? l(Object(n), !0).forEach(function (t) {
+ u(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(
+ e,
+ Object.getOwnPropertyDescriptors(n)
+ )
+ : l(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ })({ className: this.props.dotsClass }, m)
+ );
+ },
+ },
+ ]),
+ n && c(t.prototype, n),
+ r && c(t, r),
+ Object.defineProperty(t, "prototype", { writable: !1 }),
+ h
+ );
+ })(i.default.PureComponent);
+ t.Dots = p;
+ },
+ 5717: function (e, t, n) {
+ "use strict";
+ var r;
+ t.Z = void 0;
+ var i = ((r = n(3178)) && r.__esModule ? r : { default: r }).default;
+ t.Z = i;
+ },
+ 1382: function (e, t) {
+ "use strict";
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.default = void 0);
+ var n = {
+ animating: !1,
+ autoplaying: null,
+ currentDirection: 0,
+ currentLeft: null,
+ currentSlide: 0,
+ direction: 1,
+ dragging: !1,
+ edgeDragged: !1,
+ initialized: !1,
+ lazyLoadedList: [],
+ listHeight: null,
+ listWidth: null,
+ scrolling: !1,
+ slideCount: null,
+ slideHeight: null,
+ slideWidth: null,
+ swipeLeft: null,
+ swiped: !1,
+ swiping: !1,
+ touchObject: { startX: 0, startY: 0, curX: 0, curY: 0 },
+ trackStyle: {},
+ trackWidth: 0,
+ targetSlide: 0,
+ };
+ t.default = n;
+ },
+ 8293: function (e, t, n) {
+ "use strict";
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.InnerSlider = void 0);
+ var r = d(n(2791)),
+ i = d(n(1382)),
+ a = d(n(5095)),
+ o = d(n(1694)),
+ s = n(8026),
+ l = n(4931),
+ u = n(3800),
+ c = n(8436),
+ f = d(n(474));
+ function d(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function h(e) {
+ return (
+ (h =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ h(e)
+ );
+ }
+ function p() {
+ return (
+ (p =
+ Object.assign ||
+ function (e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n)
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }),
+ p.apply(this, arguments)
+ );
+ }
+ function v(e, t) {
+ if (null == e) return {};
+ var n,
+ r,
+ i = (function (e, t) {
+ if (null == e) return {};
+ var n,
+ r,
+ i = {},
+ a = Object.keys(e);
+ for (r = 0; r < a.length; r++)
+ (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]);
+ return i;
+ })(e, t);
+ if (Object.getOwnPropertySymbols) {
+ var a = Object.getOwnPropertySymbols(e);
+ for (r = 0; r < a.length; r++)
+ (n = a[r]),
+ t.indexOf(n) >= 0 ||
+ (Object.prototype.propertyIsEnumerable.call(e, n) &&
+ (i[n] = e[n]));
+ }
+ return i;
+ }
+ function m(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function g(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? m(Object(n), !0).forEach(function (t) {
+ E(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
+ : m(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ }
+ function A(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ (r.enumerable = r.enumerable || !1),
+ (r.configurable = !0),
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(e, r.key, r);
+ }
+ }
+ function y(e, t) {
+ return (
+ (y =
+ Object.setPrototypeOf ||
+ function (e, t) {
+ return (e.__proto__ = t), e;
+ }),
+ y(e, t)
+ );
+ }
+ function b(e) {
+ var t = (function () {
+ if ("undefined" === typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" === typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {})
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ })();
+ return function () {
+ var n,
+ r = S(e);
+ if (t) {
+ var i = S(this).constructor;
+ n = Reflect.construct(r, arguments, i);
+ } else n = r.apply(this, arguments);
+ return (function (e, t) {
+ if (t && ("object" === h(t) || "function" === typeof t)) return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined"
+ );
+ return x(e);
+ })(this, n);
+ };
+ }
+ function x(e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return e;
+ }
+ function S(e) {
+ return (
+ (S = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ S(e)
+ );
+ }
+ function E(e, t, n) {
+ return (
+ t in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ var _ = (function (e) {
+ !(function (e, t) {
+ if ("function" !== typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ (e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && y(e, t);
+ })(S, e);
+ var t,
+ n,
+ d,
+ m = b(S);
+ function S(e) {
+ var t;
+ !(function (e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ })(this, S),
+ E(x((t = m.call(this, e))), "listRefHandler", function (e) {
+ return (t.list = e);
+ }),
+ E(x(t), "trackRefHandler", function (e) {
+ return (t.track = e);
+ }),
+ E(x(t), "adaptHeight", function () {
+ if (t.props.adaptiveHeight && t.list) {
+ var e = t.list.querySelector(
+ '[data-index="'.concat(t.state.currentSlide, '"]')
+ );
+ t.list.style.height = (0, s.getHeight)(e) + "px";
+ }
+ }),
+ E(x(t), "componentDidMount", function () {
+ if ((t.props.onInit && t.props.onInit(), t.props.lazyLoad)) {
+ var e = (0, s.getOnDemandLazySlides)(
+ g(g({}, t.props), t.state)
+ );
+ e.length > 0 &&
+ (t.setState(function (t) {
+ return { lazyLoadedList: t.lazyLoadedList.concat(e) };
+ }),
+ t.props.onLazyLoad && t.props.onLazyLoad(e));
+ }
+ var n = g({ listRef: t.list, trackRef: t.track }, t.props);
+ t.updateState(n, !0, function () {
+ t.adaptHeight(), t.props.autoplay && t.autoPlay("update");
+ }),
+ "progressive" === t.props.lazyLoad &&
+ (t.lazyLoadTimer = setInterval(t.progressiveLazyLoad, 1e3)),
+ (t.ro = new f.default(function () {
+ t.state.animating
+ ? (t.onWindowResized(!1),
+ t.callbackTimers.push(
+ setTimeout(function () {
+ return t.onWindowResized();
+ }, t.props.speed)
+ ))
+ : t.onWindowResized();
+ })),
+ t.ro.observe(t.list),
+ document.querySelectorAll &&
+ Array.prototype.forEach.call(
+ document.querySelectorAll(".slick-slide"),
+ function (e) {
+ (e.onfocus = t.props.pauseOnFocus
+ ? t.onSlideFocus
+ : null),
+ (e.onblur = t.props.pauseOnFocus
+ ? t.onSlideBlur
+ : null);
+ }
+ ),
+ window.addEventListener
+ ? window.addEventListener("resize", t.onWindowResized)
+ : window.attachEvent("onresize", t.onWindowResized);
+ }),
+ E(x(t), "componentWillUnmount", function () {
+ t.animationEndCallback && clearTimeout(t.animationEndCallback),
+ t.lazyLoadTimer && clearInterval(t.lazyLoadTimer),
+ t.callbackTimers.length &&
+ (t.callbackTimers.forEach(function (e) {
+ return clearTimeout(e);
+ }),
+ (t.callbackTimers = [])),
+ window.addEventListener
+ ? window.removeEventListener("resize", t.onWindowResized)
+ : window.detachEvent("onresize", t.onWindowResized),
+ t.autoplayTimer && clearInterval(t.autoplayTimer),
+ t.ro.disconnect();
+ }),
+ E(x(t), "componentDidUpdate", function (e) {
+ if (
+ (t.checkImagesLoad(),
+ t.props.onReInit && t.props.onReInit(),
+ t.props.lazyLoad)
+ ) {
+ var n = (0, s.getOnDemandLazySlides)(
+ g(g({}, t.props), t.state)
+ );
+ n.length > 0 &&
+ (t.setState(function (e) {
+ return { lazyLoadedList: e.lazyLoadedList.concat(n) };
+ }),
+ t.props.onLazyLoad && t.props.onLazyLoad(n));
+ }
+ t.adaptHeight();
+ var i = g(
+ g({ listRef: t.list, trackRef: t.track }, t.props),
+ t.state
+ ),
+ a = t.didPropsChange(e);
+ a &&
+ t.updateState(i, a, function () {
+ t.state.currentSlide >=
+ r.default.Children.count(t.props.children) &&
+ t.changeSlide({
+ message: "index",
+ index:
+ r.default.Children.count(t.props.children) -
+ t.props.slidesToShow,
+ currentSlide: t.state.currentSlide,
+ }),
+ t.props.autoplay
+ ? t.autoPlay("update")
+ : t.pause("paused");
+ });
+ }),
+ E(x(t), "onWindowResized", function (e) {
+ t.debouncedResize && t.debouncedResize.cancel(),
+ (t.debouncedResize = (0, a.default)(function () {
+ return t.resizeWindow(e);
+ }, 50)),
+ t.debouncedResize();
+ }),
+ E(x(t), "resizeWindow", function () {
+ var e =
+ !(arguments.length > 0 && void 0 !== arguments[0]) ||
+ arguments[0];
+ if (Boolean(t.track && t.track.node)) {
+ var n = g(
+ g({ listRef: t.list, trackRef: t.track }, t.props),
+ t.state
+ );
+ t.updateState(n, e, function () {
+ t.props.autoplay ? t.autoPlay("update") : t.pause("paused");
+ }),
+ t.setState({ animating: !1 }),
+ clearTimeout(t.animationEndCallback),
+ delete t.animationEndCallback;
+ }
+ }),
+ E(x(t), "updateState", function (e, n, i) {
+ var a = (0, s.initializedState)(e);
+ e = g(g(g({}, e), a), {}, { slideIndex: a.currentSlide });
+ var o = (0, s.getTrackLeft)(e);
+ e = g(g({}, e), {}, { left: o });
+ var l = (0, s.getTrackCSS)(e);
+ (n ||
+ r.default.Children.count(t.props.children) !==
+ r.default.Children.count(e.children)) &&
+ (a.trackStyle = l),
+ t.setState(a, i);
+ }),
+ E(x(t), "ssrInit", function () {
+ if (t.props.variableWidth) {
+ var e = 0,
+ n = 0,
+ i = [],
+ a = (0, s.getPreClones)(
+ g(
+ g(g({}, t.props), t.state),
+ {},
+ { slideCount: t.props.children.length }
+ )
+ ),
+ o = (0, s.getPostClones)(
+ g(
+ g(g({}, t.props), t.state),
+ {},
+ { slideCount: t.props.children.length }
+ )
+ );
+ t.props.children.forEach(function (t) {
+ i.push(t.props.style.width), (e += t.props.style.width);
+ });
+ for (var l = 0; l < a; l++)
+ (n += i[i.length - 1 - l]), (e += i[i.length - 1 - l]);
+ for (var u = 0; u < o; u++) e += i[u];
+ for (var c = 0; c < t.state.currentSlide; c++) n += i[c];
+ var f = { width: e + "px", left: -n + "px" };
+ if (t.props.centerMode) {
+ var d = "".concat(i[t.state.currentSlide], "px");
+ f.left = "calc("
+ .concat(f.left, " + (100% - ")
+ .concat(d, ") / 2 ) ");
+ }
+ return { trackStyle: f };
+ }
+ var h = r.default.Children.count(t.props.children),
+ p = g(g(g({}, t.props), t.state), {}, { slideCount: h }),
+ v = (0, s.getPreClones)(p) + (0, s.getPostClones)(p) + h,
+ m = (100 / t.props.slidesToShow) * v,
+ A = 100 / v,
+ y =
+ (-A * ((0, s.getPreClones)(p) + t.state.currentSlide) * m) /
+ 100;
+ return (
+ t.props.centerMode && (y += (100 - (A * m) / 100) / 2),
+ {
+ slideWidth: A + "%",
+ trackStyle: { width: m + "%", left: y + "%" },
+ }
+ );
+ }),
+ E(x(t), "checkImagesLoad", function () {
+ var e =
+ (t.list &&
+ t.list.querySelectorAll &&
+ t.list.querySelectorAll(".slick-slide img")) ||
+ [],
+ n = e.length,
+ r = 0;
+ Array.prototype.forEach.call(e, function (e) {
+ var i = function () {
+ return ++r && r >= n && t.onWindowResized();
+ };
+ if (e.onclick) {
+ var a = e.onclick;
+ e.onclick = function () {
+ a(), e.parentNode.focus();
+ };
+ } else
+ e.onclick = function () {
+ return e.parentNode.focus();
+ };
+ e.onload ||
+ (t.props.lazyLoad
+ ? (e.onload = function () {
+ t.adaptHeight(),
+ t.callbackTimers.push(
+ setTimeout(t.onWindowResized, t.props.speed)
+ );
+ })
+ : ((e.onload = i),
+ (e.onerror = function () {
+ i(),
+ t.props.onLazyLoadError &&
+ t.props.onLazyLoadError();
+ })));
+ });
+ }),
+ E(x(t), "progressiveLazyLoad", function () {
+ for (
+ var e = [],
+ n = g(g({}, t.props), t.state),
+ r = t.state.currentSlide;
+ r < t.state.slideCount + (0, s.getPostClones)(n);
+ r++
+ )
+ if (t.state.lazyLoadedList.indexOf(r) < 0) {
+ e.push(r);
+ break;
+ }
+ for (
+ var i = t.state.currentSlide - 1;
+ i >= -(0, s.getPreClones)(n);
+ i--
+ )
+ if (t.state.lazyLoadedList.indexOf(i) < 0) {
+ e.push(i);
+ break;
+ }
+ e.length > 0
+ ? (t.setState(function (t) {
+ return { lazyLoadedList: t.lazyLoadedList.concat(e) };
+ }),
+ t.props.onLazyLoad && t.props.onLazyLoad(e))
+ : t.lazyLoadTimer &&
+ (clearInterval(t.lazyLoadTimer), delete t.lazyLoadTimer);
+ }),
+ E(x(t), "slideHandler", function (e) {
+ var n =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1],
+ r = t.props,
+ i = r.asNavFor,
+ a = r.beforeChange,
+ o = r.onLazyLoad,
+ l = r.speed,
+ u = r.afterChange,
+ c = t.state.currentSlide,
+ f = (0, s.slideHandler)(
+ g(
+ g(g({ index: e }, t.props), t.state),
+ {},
+ { trackRef: t.track, useCSS: t.props.useCSS && !n }
+ )
+ ),
+ d = f.state,
+ h = f.nextState;
+ if (d) {
+ a && a(c, d.currentSlide);
+ var p = d.lazyLoadedList.filter(function (e) {
+ return t.state.lazyLoadedList.indexOf(e) < 0;
+ });
+ o && p.length > 0 && o(p),
+ !t.props.waitForAnimate &&
+ t.animationEndCallback &&
+ (clearTimeout(t.animationEndCallback),
+ u && u(c),
+ delete t.animationEndCallback),
+ t.setState(d, function () {
+ i &&
+ t.asNavForIndex !== e &&
+ ((t.asNavForIndex = e), i.innerSlider.slideHandler(e)),
+ h &&
+ (t.animationEndCallback = setTimeout(function () {
+ var e = h.animating,
+ n = v(h, ["animating"]);
+ t.setState(n, function () {
+ t.callbackTimers.push(
+ setTimeout(function () {
+ return t.setState({ animating: e });
+ }, 10)
+ ),
+ u && u(d.currentSlide),
+ delete t.animationEndCallback;
+ });
+ }, l));
+ });
+ }
+ }),
+ E(x(t), "changeSlide", function (e) {
+ var n =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1],
+ r = g(g({}, t.props), t.state),
+ i = (0, s.changeSlide)(r, e);
+ if (
+ (0 === i || i) &&
+ (!0 === n ? t.slideHandler(i, n) : t.slideHandler(i),
+ t.props.autoplay && t.autoPlay("update"),
+ t.props.focusOnSelect)
+ ) {
+ var a = t.list.querySelectorAll(".slick-current");
+ a[0] && a[0].focus();
+ }
+ }),
+ E(x(t), "clickHandler", function (e) {
+ !1 === t.clickable && (e.stopPropagation(), e.preventDefault()),
+ (t.clickable = !0);
+ }),
+ E(x(t), "keyHandler", function (e) {
+ var n = (0, s.keyHandler)(
+ e,
+ t.props.accessibility,
+ t.props.rtl
+ );
+ "" !== n && t.changeSlide({ message: n });
+ }),
+ E(x(t), "selectHandler", function (e) {
+ t.changeSlide(e);
+ }),
+ E(x(t), "disableBodyScroll", function () {
+ window.ontouchmove = function (e) {
+ (e = e || window.event).preventDefault && e.preventDefault(),
+ (e.returnValue = !1);
+ };
+ }),
+ E(x(t), "enableBodyScroll", function () {
+ window.ontouchmove = null;
+ }),
+ E(x(t), "swipeStart", function (e) {
+ t.props.verticalSwiping && t.disableBodyScroll();
+ var n = (0, s.swipeStart)(e, t.props.swipe, t.props.draggable);
+ "" !== n && t.setState(n);
+ }),
+ E(x(t), "swipeMove", function (e) {
+ var n = (0, s.swipeMove)(
+ e,
+ g(
+ g(g({}, t.props), t.state),
+ {},
+ {
+ trackRef: t.track,
+ listRef: t.list,
+ slideIndex: t.state.currentSlide,
+ }
+ )
+ );
+ n && (n.swiping && (t.clickable = !1), t.setState(n));
+ }),
+ E(x(t), "swipeEnd", function (e) {
+ var n = (0, s.swipeEnd)(
+ e,
+ g(
+ g(g({}, t.props), t.state),
+ {},
+ {
+ trackRef: t.track,
+ listRef: t.list,
+ slideIndex: t.state.currentSlide,
+ }
+ )
+ );
+ if (n) {
+ var r = n.triggerSlideHandler;
+ delete n.triggerSlideHandler,
+ t.setState(n),
+ void 0 !== r &&
+ (t.slideHandler(r),
+ t.props.verticalSwiping && t.enableBodyScroll());
+ }
+ }),
+ E(x(t), "touchEnd", function (e) {
+ t.swipeEnd(e), (t.clickable = !0);
+ }),
+ E(x(t), "slickPrev", function () {
+ t.callbackTimers.push(
+ setTimeout(function () {
+ return t.changeSlide({ message: "previous" });
+ }, 0)
+ );
+ }),
+ E(x(t), "slickNext", function () {
+ t.callbackTimers.push(
+ setTimeout(function () {
+ return t.changeSlide({ message: "next" });
+ }, 0)
+ );
+ }),
+ E(x(t), "slickGoTo", function (e) {
+ var n =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1];
+ if (((e = Number(e)), isNaN(e))) return "";
+ t.callbackTimers.push(
+ setTimeout(function () {
+ return t.changeSlide(
+ {
+ message: "index",
+ index: e,
+ currentSlide: t.state.currentSlide,
+ },
+ n
+ );
+ }, 0)
+ );
+ }),
+ E(x(t), "play", function () {
+ var e;
+ if (t.props.rtl)
+ e = t.state.currentSlide - t.props.slidesToScroll;
+ else {
+ if (!(0, s.canGoNext)(g(g({}, t.props), t.state))) return !1;
+ e = t.state.currentSlide + t.props.slidesToScroll;
+ }
+ t.slideHandler(e);
+ }),
+ E(x(t), "autoPlay", function (e) {
+ t.autoplayTimer && clearInterval(t.autoplayTimer);
+ var n = t.state.autoplaying;
+ if ("update" === e) {
+ if ("hovered" === n || "focused" === n || "paused" === n)
+ return;
+ } else if ("leave" === e) {
+ if ("paused" === n || "focused" === n) return;
+ } else if ("blur" === e && ("paused" === n || "hovered" === n))
+ return;
+ (t.autoplayTimer = setInterval(
+ t.play,
+ t.props.autoplaySpeed + 50
+ )),
+ t.setState({ autoplaying: "playing" });
+ }),
+ E(x(t), "pause", function (e) {
+ t.autoplayTimer &&
+ (clearInterval(t.autoplayTimer), (t.autoplayTimer = null));
+ var n = t.state.autoplaying;
+ "paused" === e
+ ? t.setState({ autoplaying: "paused" })
+ : "focused" === e
+ ? ("hovered" !== n && "playing" !== n) ||
+ t.setState({ autoplaying: "focused" })
+ : "playing" === n && t.setState({ autoplaying: "hovered" });
+ }),
+ E(x(t), "onDotsOver", function () {
+ return t.props.autoplay && t.pause("hovered");
+ }),
+ E(x(t), "onDotsLeave", function () {
+ return (
+ t.props.autoplay &&
+ "hovered" === t.state.autoplaying &&
+ t.autoPlay("leave")
+ );
+ }),
+ E(x(t), "onTrackOver", function () {
+ return t.props.autoplay && t.pause("hovered");
+ }),
+ E(x(t), "onTrackLeave", function () {
+ return (
+ t.props.autoplay &&
+ "hovered" === t.state.autoplaying &&
+ t.autoPlay("leave")
+ );
+ }),
+ E(x(t), "onSlideFocus", function () {
+ return t.props.autoplay && t.pause("focused");
+ }),
+ E(x(t), "onSlideBlur", function () {
+ return (
+ t.props.autoplay &&
+ "focused" === t.state.autoplaying &&
+ t.autoPlay("blur")
+ );
+ }),
+ E(x(t), "render", function () {
+ var e,
+ n,
+ i,
+ a = (0, o.default)("slick-slider", t.props.className, {
+ "slick-vertical": t.props.vertical,
+ "slick-initialized": !0,
+ }),
+ f = g(g({}, t.props), t.state),
+ d = (0, s.extractObject)(f, [
+ "fade",
+ "cssEase",
+ "speed",
+ "infinite",
+ "centerMode",
+ "focusOnSelect",
+ "currentSlide",
+ "lazyLoad",
+ "lazyLoadedList",
+ "rtl",
+ "slideWidth",
+ "slideHeight",
+ "listHeight",
+ "vertical",
+ "slidesToShow",
+ "slidesToScroll",
+ "slideCount",
+ "trackStyle",
+ "variableWidth",
+ "unslick",
+ "centerPadding",
+ "targetSlide",
+ "useCSS",
+ ]),
+ h = t.props.pauseOnHover;
+ if (
+ ((d = g(
+ g({}, d),
+ {},
+ {
+ onMouseEnter: h ? t.onTrackOver : null,
+ onMouseLeave: h ? t.onTrackLeave : null,
+ onMouseOver: h ? t.onTrackOver : null,
+ focusOnSelect:
+ t.props.focusOnSelect && t.clickable
+ ? t.selectHandler
+ : null,
+ }
+ )),
+ !0 === t.props.dots &&
+ t.state.slideCount >= t.props.slidesToShow)
+ ) {
+ var v = (0, s.extractObject)(f, [
+ "dotsClass",
+ "slideCount",
+ "slidesToShow",
+ "currentSlide",
+ "slidesToScroll",
+ "clickHandler",
+ "children",
+ "customPaging",
+ "infinite",
+ "appendDots",
+ ]),
+ m = t.props.pauseOnDotsHover;
+ (v = g(
+ g({}, v),
+ {},
+ {
+ clickHandler: t.changeSlide,
+ onMouseEnter: m ? t.onDotsLeave : null,
+ onMouseOver: m ? t.onDotsOver : null,
+ onMouseLeave: m ? t.onDotsLeave : null,
+ }
+ )),
+ (e = r.default.createElement(u.Dots, v));
+ }
+ var A = (0, s.extractObject)(f, [
+ "infinite",
+ "centerMode",
+ "currentSlide",
+ "slideCount",
+ "slidesToShow",
+ "prevArrow",
+ "nextArrow",
+ ]);
+ (A.clickHandler = t.changeSlide),
+ t.props.arrows &&
+ ((n = r.default.createElement(c.PrevArrow, A)),
+ (i = r.default.createElement(c.NextArrow, A)));
+ var y = null;
+ t.props.vertical && (y = { height: t.state.listHeight });
+ var b = null;
+ !1 === t.props.vertical
+ ? !0 === t.props.centerMode &&
+ (b = { padding: "0px " + t.props.centerPadding })
+ : !0 === t.props.centerMode &&
+ (b = { padding: t.props.centerPadding + " 0px" });
+ var x = g(g({}, y), b),
+ S = t.props.touchMove,
+ E = {
+ className: "slick-list",
+ style: x,
+ onClick: t.clickHandler,
+ onMouseDown: S ? t.swipeStart : null,
+ onMouseMove: t.state.dragging && S ? t.swipeMove : null,
+ onMouseUp: S ? t.swipeEnd : null,
+ onMouseLeave: t.state.dragging && S ? t.swipeEnd : null,
+ onTouchStart: S ? t.swipeStart : null,
+ onTouchMove: t.state.dragging && S ? t.swipeMove : null,
+ onTouchEnd: S ? t.touchEnd : null,
+ onTouchCancel: t.state.dragging && S ? t.swipeEnd : null,
+ onKeyDown: t.props.accessibility ? t.keyHandler : null,
+ },
+ _ = { className: a, dir: "ltr", style: t.props.style };
+ return (
+ t.props.unslick &&
+ ((E = { className: "slick-list" }), (_ = { className: a })),
+ r.default.createElement(
+ "div",
+ _,
+ t.props.unslick ? "" : n,
+ r.default.createElement(
+ "div",
+ p({ ref: t.listRefHandler }, E),
+ r.default.createElement(
+ l.Track,
+ p({ ref: t.trackRefHandler }, d),
+ t.props.children
+ )
+ ),
+ t.props.unslick ? "" : i,
+ t.props.unslick ? "" : e
+ )
+ );
+ }),
+ (t.list = null),
+ (t.track = null),
+ (t.state = g(
+ g({}, i.default),
+ {},
+ {
+ currentSlide: t.props.initialSlide,
+ slideCount: r.default.Children.count(t.props.children),
+ }
+ )),
+ (t.callbackTimers = []),
+ (t.clickable = !0),
+ (t.debouncedResize = null);
+ var n = t.ssrInit();
+ return (t.state = g(g({}, t.state), n)), t;
+ }
+ return (
+ (t = S),
+ (n = [
+ {
+ key: "didPropsChange",
+ value: function (e) {
+ for (
+ var t = !1, n = 0, i = Object.keys(this.props);
+ n < i.length;
+ n++
+ ) {
+ var a = i[n];
+ if (!e.hasOwnProperty(a)) {
+ t = !0;
+ break;
+ }
+ if (
+ "object" !== h(e[a]) &&
+ "function" !== typeof e[a] &&
+ e[a] !== this.props[a]
+ ) {
+ t = !0;
+ break;
+ }
+ }
+ return (
+ t ||
+ r.default.Children.count(this.props.children) !==
+ r.default.Children.count(e.children)
+ );
+ },
+ },
+ ]) && A(t.prototype, n),
+ d && A(t, d),
+ Object.defineProperty(t, "prototype", { writable: !1 }),
+ S
+ );
+ })(r.default.Component);
+ t.InnerSlider = _;
+ },
+ 3178: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (
+ (r =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ r(e)
+ );
+ }
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.default = void 0);
+ var i = u(n(2791)),
+ a = n(8293),
+ o = u(n(5477)),
+ s = u(n(5484)),
+ l = n(8026);
+ function u(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function c() {
+ return (
+ (c =
+ Object.assign ||
+ function (e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n)
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }),
+ c.apply(this, arguments)
+ );
+ }
+ function f(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function d(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? f(Object(n), !0).forEach(function (t) {
+ A(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
+ : f(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ }
+ function h(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ (r.enumerable = r.enumerable || !1),
+ (r.configurable = !0),
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(e, r.key, r);
+ }
+ }
+ function p(e, t) {
+ return (
+ (p =
+ Object.setPrototypeOf ||
+ function (e, t) {
+ return (e.__proto__ = t), e;
+ }),
+ p(e, t)
+ );
+ }
+ function v(e) {
+ var t = (function () {
+ if ("undefined" === typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" === typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {})
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ })();
+ return function () {
+ var n,
+ i = g(e);
+ if (t) {
+ var a = g(this).constructor;
+ n = Reflect.construct(i, arguments, a);
+ } else n = i.apply(this, arguments);
+ return (function (e, t) {
+ if (t && ("object" === r(t) || "function" === typeof t)) return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined"
+ );
+ return m(e);
+ })(this, n);
+ };
+ }
+ function m(e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return e;
+ }
+ function g(e) {
+ return (
+ (g = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ g(e)
+ );
+ }
+ function A(e, t, n) {
+ return (
+ t in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ var y = (0, l.canUseDOM)() && n(8153),
+ b = (function (e) {
+ !(function (e, t) {
+ if ("function" !== typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ (e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && p(e, t);
+ })(f, e);
+ var t,
+ n,
+ r,
+ u = v(f);
+ function f(e) {
+ var t;
+ return (
+ (function (e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ })(this, f),
+ A(
+ m((t = u.call(this, e))),
+ "innerSliderRefHandler",
+ function (e) {
+ return (t.innerSlider = e);
+ }
+ ),
+ A(m(t), "slickPrev", function () {
+ return t.innerSlider.slickPrev();
+ }),
+ A(m(t), "slickNext", function () {
+ return t.innerSlider.slickNext();
+ }),
+ A(m(t), "slickGoTo", function (e) {
+ var n =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1];
+ return t.innerSlider.slickGoTo(e, n);
+ }),
+ A(m(t), "slickPause", function () {
+ return t.innerSlider.pause("paused");
+ }),
+ A(m(t), "slickPlay", function () {
+ return t.innerSlider.autoPlay("play");
+ }),
+ (t.state = { breakpoint: null }),
+ (t._responsiveMediaHandlers = []),
+ t
+ );
+ }
+ return (
+ (t = f),
+ (n = [
+ {
+ key: "media",
+ value: function (e, t) {
+ y.register(e, t),
+ this._responsiveMediaHandlers.push({
+ query: e,
+ handler: t,
+ });
+ },
+ },
+ {
+ key: "componentDidMount",
+ value: function () {
+ var e = this;
+ if (this.props.responsive) {
+ var t = this.props.responsive.map(function (e) {
+ return e.breakpoint;
+ });
+ t.sort(function (e, t) {
+ return e - t;
+ }),
+ t.forEach(function (n, r) {
+ var i;
+ (i =
+ 0 === r
+ ? (0, o.default)({ minWidth: 0, maxWidth: n })
+ : (0, o.default)({
+ minWidth: t[r - 1] + 1,
+ maxWidth: n,
+ })),
+ (0, l.canUseDOM)() &&
+ e.media(i, function () {
+ e.setState({ breakpoint: n });
+ });
+ });
+ var n = (0, o.default)({ minWidth: t.slice(-1)[0] });
+ (0, l.canUseDOM)() &&
+ this.media(n, function () {
+ e.setState({ breakpoint: null });
+ });
+ }
+ },
+ },
+ {
+ key: "componentWillUnmount",
+ value: function () {
+ this._responsiveMediaHandlers.forEach(function (e) {
+ y.unregister(e.query, e.handler);
+ });
+ },
+ },
+ {
+ key: "render",
+ value: function () {
+ var e,
+ t,
+ n = this;
+ (e = this.state.breakpoint
+ ? "unslick" ===
+ (t = this.props.responsive.filter(function (e) {
+ return e.breakpoint === n.state.breakpoint;
+ }))[0].settings
+ ? "unslick"
+ : d(d(d({}, s.default), this.props), t[0].settings)
+ : d(d({}, s.default), this.props)).centerMode &&
+ (e.slidesToScroll, (e.slidesToScroll = 1)),
+ e.fade &&
+ (e.slidesToShow,
+ e.slidesToScroll,
+ (e.slidesToShow = 1),
+ (e.slidesToScroll = 1));
+ var r = i.default.Children.toArray(this.props.children);
+ (r = r.filter(function (e) {
+ return "string" === typeof e ? !!e.trim() : !!e;
+ })),
+ e.variableWidth &&
+ (e.rows > 1 || e.slidesPerRow > 1) &&
+ (console.warn(
+ "variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"
+ ),
+ (e.variableWidth = !1));
+ for (
+ var o = [], l = null, u = 0;
+ u < r.length;
+ u += e.rows * e.slidesPerRow
+ ) {
+ for (
+ var f = [], h = u;
+ h < u + e.rows * e.slidesPerRow;
+ h += e.slidesPerRow
+ ) {
+ for (
+ var p = [], v = h;
+ v < h + e.slidesPerRow &&
+ (e.variableWidth &&
+ r[v].props.style &&
+ (l = r[v].props.style.width),
+ !(v >= r.length));
+ v += 1
+ )
+ p.push(
+ i.default.cloneElement(r[v], {
+ key: 100 * u + 10 * h + v,
+ tabIndex: -1,
+ style: {
+ width: "".concat(100 / e.slidesPerRow, "%"),
+ display: "inline-block",
+ },
+ })
+ );
+ f.push(
+ i.default.createElement("div", { key: 10 * u + h }, p)
+ );
+ }
+ e.variableWidth
+ ? o.push(
+ i.default.createElement(
+ "div",
+ { key: u, style: { width: l } },
+ f
+ )
+ )
+ : o.push(i.default.createElement("div", { key: u }, f));
+ }
+ if ("unslick" === e) {
+ var m = "regular slider " + (this.props.className || "");
+ return i.default.createElement(
+ "div",
+ { className: m },
+ r
+ );
+ }
+ return (
+ o.length <= e.slidesToShow && (e.unslick = !0),
+ i.default.createElement(
+ a.InnerSlider,
+ c(
+ {
+ style: this.props.style,
+ ref: this.innerSliderRefHandler,
+ },
+ e
+ ),
+ o
+ )
+ );
+ },
+ },
+ ]) && h(t.prototype, n),
+ r && h(t, r),
+ Object.defineProperty(t, "prototype", { writable: !1 }),
+ f
+ );
+ })(i.default.Component);
+ t.default = b;
+ },
+ 4931: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (
+ (r =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ r(e)
+ );
+ }
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.Track = void 0);
+ var i = s(n(2791)),
+ a = s(n(1694)),
+ o = n(8026);
+ function s(e) {
+ return e && e.__esModule ? e : { default: e };
+ }
+ function l() {
+ return (
+ (l =
+ Object.assign ||
+ function (e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n)
+ Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
+ }
+ return e;
+ }),
+ l.apply(this, arguments)
+ );
+ }
+ function u(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ (r.enumerable = r.enumerable || !1),
+ (r.configurable = !0),
+ "value" in r && (r.writable = !0),
+ Object.defineProperty(e, r.key, r);
+ }
+ }
+ function c(e, t) {
+ return (
+ (c =
+ Object.setPrototypeOf ||
+ function (e, t) {
+ return (e.__proto__ = t), e;
+ }),
+ c(e, t)
+ );
+ }
+ function f(e) {
+ var t = (function () {
+ if ("undefined" === typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" === typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {})
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ })();
+ return function () {
+ var n,
+ i = h(e);
+ if (t) {
+ var a = h(this).constructor;
+ n = Reflect.construct(i, arguments, a);
+ } else n = i.apply(this, arguments);
+ return (function (e, t) {
+ if (t && ("object" === r(t) || "function" === typeof t)) return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined"
+ );
+ return d(e);
+ })(this, n);
+ };
+ }
+ function d(e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return e;
+ }
+ function h(e) {
+ return (
+ (h = Object.setPrototypeOf
+ ? Object.getPrototypeOf
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ h(e)
+ );
+ }
+ function p(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function v(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? p(Object(n), !0).forEach(function (t) {
+ m(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
+ : p(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ }
+ function m(e, t, n) {
+ return (
+ t in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ var g = function (e) {
+ var t, n, r, i, a;
+ return (
+ (r =
+ (a = e.rtl ? e.slideCount - 1 - e.index : e.index) < 0 ||
+ a >= e.slideCount),
+ e.centerMode
+ ? ((i = Math.floor(e.slidesToShow / 2)),
+ (n = (a - e.currentSlide) % e.slideCount === 0),
+ a > e.currentSlide - i - 1 &&
+ a <= e.currentSlide + i &&
+ (t = !0))
+ : (t =
+ e.currentSlide <= a && a < e.currentSlide + e.slidesToShow),
+ {
+ "slick-slide": !0,
+ "slick-active": t,
+ "slick-center": n,
+ "slick-cloned": r,
+ "slick-current":
+ a ===
+ (e.targetSlide < 0
+ ? e.targetSlide + e.slideCount
+ : e.targetSlide >= e.slideCount
+ ? e.targetSlide - e.slideCount
+ : e.targetSlide),
+ }
+ );
+ },
+ A = function (e, t) {
+ return e.key || t;
+ },
+ y = function (e) {
+ var t,
+ n = [],
+ r = [],
+ s = [],
+ l = i.default.Children.count(e.children),
+ u = (0, o.lazyStartIndex)(e),
+ c = (0, o.lazyEndIndex)(e);
+ return (
+ i.default.Children.forEach(e.children, function (f, d) {
+ var h,
+ p = {
+ message: "children",
+ index: d,
+ slidesToScroll: e.slidesToScroll,
+ currentSlide: e.currentSlide,
+ };
+ h =
+ !e.lazyLoad ||
+ (e.lazyLoad && e.lazyLoadedList.indexOf(d) >= 0)
+ ? f
+ : i.default.createElement("div", null);
+ var m = (function (e) {
+ var t = {};
+ return (
+ (void 0 !== e.variableWidth && !1 !== e.variableWidth) ||
+ (t.width = e.slideWidth),
+ e.fade &&
+ ((t.position = "relative"),
+ e.vertical
+ ? (t.top = -e.index * parseInt(e.slideHeight))
+ : (t.left = -e.index * parseInt(e.slideWidth)),
+ (t.opacity = e.currentSlide === e.index ? 1 : 0),
+ e.useCSS &&
+ (t.transition =
+ "opacity " +
+ e.speed +
+ "ms " +
+ e.cssEase +
+ ", visibility " +
+ e.speed +
+ "ms " +
+ e.cssEase)),
+ t
+ );
+ })(v(v({}, e), {}, { index: d })),
+ y = h.props.className || "",
+ b = g(v(v({}, e), {}, { index: d }));
+ if (
+ (n.push(
+ i.default.cloneElement(h, {
+ key: "original" + A(h, d),
+ "data-index": d,
+ className: (0, a.default)(b, y),
+ tabIndex: "-1",
+ "aria-hidden": !b["slick-active"],
+ style: v(v({ outline: "none" }, h.props.style || {}), m),
+ onClick: function (t) {
+ h.props && h.props.onClick && h.props.onClick(t),
+ e.focusOnSelect && e.focusOnSelect(p);
+ },
+ })
+ ),
+ e.infinite && !1 === e.fade)
+ ) {
+ var x = l - d;
+ x <= (0, o.getPreClones)(e) &&
+ l !== e.slidesToShow &&
+ ((t = -x) >= u && (h = f),
+ (b = g(v(v({}, e), {}, { index: t }))),
+ r.push(
+ i.default.cloneElement(h, {
+ key: "precloned" + A(h, t),
+ "data-index": t,
+ tabIndex: "-1",
+ className: (0, a.default)(b, y),
+ "aria-hidden": !b["slick-active"],
+ style: v(v({}, h.props.style || {}), m),
+ onClick: function (t) {
+ h.props && h.props.onClick && h.props.onClick(t),
+ e.focusOnSelect && e.focusOnSelect(p);
+ },
+ })
+ )),
+ l !== e.slidesToShow &&
+ ((t = l + d) < c && (h = f),
+ (b = g(v(v({}, e), {}, { index: t }))),
+ s.push(
+ i.default.cloneElement(h, {
+ key: "postcloned" + A(h, t),
+ "data-index": t,
+ tabIndex: "-1",
+ className: (0, a.default)(b, y),
+ "aria-hidden": !b["slick-active"],
+ style: v(v({}, h.props.style || {}), m),
+ onClick: function (t) {
+ h.props && h.props.onClick && h.props.onClick(t),
+ e.focusOnSelect && e.focusOnSelect(p);
+ },
+ })
+ ));
+ }
+ }),
+ e.rtl ? r.concat(n, s).reverse() : r.concat(n, s)
+ );
+ },
+ b = (function (e) {
+ !(function (e, t) {
+ if ("function" !== typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ (e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && c(e, t);
+ })(o, e);
+ var t,
+ n,
+ r,
+ a = f(o);
+ function o() {
+ var e;
+ !(function (e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ })(this, o);
+ for (
+ var t = arguments.length, n = new Array(t), r = 0;
+ r < t;
+ r++
+ )
+ n[r] = arguments[r];
+ return (
+ m(d((e = a.call.apply(a, [this].concat(n)))), "node", null),
+ m(d(e), "handleRef", function (t) {
+ e.node = t;
+ }),
+ e
+ );
+ }
+ return (
+ (t = o),
+ (n = [
+ {
+ key: "render",
+ value: function () {
+ var e = y(this.props),
+ t = this.props,
+ n = {
+ onMouseEnter: t.onMouseEnter,
+ onMouseOver: t.onMouseOver,
+ onMouseLeave: t.onMouseLeave,
+ };
+ return i.default.createElement(
+ "div",
+ l(
+ {
+ ref: this.handleRef,
+ className: "slick-track",
+ style: this.props.trackStyle,
+ },
+ n
+ ),
+ e
+ );
+ },
+ },
+ ]) && u(t.prototype, n),
+ r && u(t, r),
+ Object.defineProperty(t, "prototype", { writable: !1 }),
+ o
+ );
+ })(i.default.PureComponent);
+ t.Track = b;
+ },
+ 8026: function (e, t, n) {
+ "use strict";
+ Object.defineProperty(t, "__esModule", { value: !0 }),
+ (t.checkSpecKeys =
+ t.checkNavigable =
+ t.changeSlide =
+ t.canUseDOM =
+ t.canGoNext =
+ void 0),
+ (t.clamp = l),
+ (t.swipeStart =
+ t.swipeMove =
+ t.swipeEnd =
+ t.slidesOnRight =
+ t.slidesOnLeft =
+ t.slideHandler =
+ t.siblingDirection =
+ t.safePreventDefault =
+ t.lazyStartIndex =
+ t.lazySlidesOnRight =
+ t.lazySlidesOnLeft =
+ t.lazyEndIndex =
+ t.keyHandler =
+ t.initializedState =
+ t.getWidth =
+ t.getTrackLeft =
+ t.getTrackCSS =
+ t.getTrackAnimateCSS =
+ t.getTotalSlides =
+ t.getSwipeDirection =
+ t.getSlideCount =
+ t.getRequiredLazySlides =
+ t.getPreClones =
+ t.getPostClones =
+ t.getOnDemandLazySlides =
+ t.getNavigableIndexes =
+ t.getHeight =
+ t.extractObject =
+ void 0);
+ var r,
+ i = (r = n(2791)) && r.__esModule ? r : { default: r };
+ function a(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function o(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? a(Object(n), !0).forEach(function (t) {
+ s(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
+ : a(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ }
+ function s(e, t, n) {
+ return (
+ t in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ function l(e, t, n) {
+ return Math.max(t, Math.min(e, n));
+ }
+ var u = function (e) {
+ ["onTouchStart", "onTouchMove", "onWheel"].includes(e._reactName) ||
+ e.preventDefault();
+ };
+ t.safePreventDefault = u;
+ var c = function (e) {
+ for (var t = [], n = f(e), r = d(e), i = n; i < r; i++)
+ e.lazyLoadedList.indexOf(i) < 0 && t.push(i);
+ return t;
+ };
+ t.getOnDemandLazySlides = c;
+ t.getRequiredLazySlides = function (e) {
+ for (var t = [], n = f(e), r = d(e), i = n; i < r; i++) t.push(i);
+ return t;
+ };
+ var f = function (e) {
+ return e.currentSlide - h(e);
+ };
+ t.lazyStartIndex = f;
+ var d = function (e) {
+ return e.currentSlide + p(e);
+ };
+ t.lazyEndIndex = d;
+ var h = function (e) {
+ return e.centerMode
+ ? Math.floor(e.slidesToShow / 2) +
+ (parseInt(e.centerPadding) > 0 ? 1 : 0)
+ : 0;
+ };
+ t.lazySlidesOnLeft = h;
+ var p = function (e) {
+ return e.centerMode
+ ? Math.floor((e.slidesToShow - 1) / 2) +
+ 1 +
+ (parseInt(e.centerPadding) > 0 ? 1 : 0)
+ : e.slidesToShow;
+ };
+ t.lazySlidesOnRight = p;
+ var v = function (e) {
+ return (e && e.offsetWidth) || 0;
+ };
+ t.getWidth = v;
+ var m = function (e) {
+ return (e && e.offsetHeight) || 0;
+ };
+ t.getHeight = m;
+ var g = function (e) {
+ var t,
+ n,
+ r,
+ i,
+ a = arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
+ return (
+ (t = e.startX - e.curX),
+ (n = e.startY - e.curY),
+ (r = Math.atan2(n, t)),
+ (i = Math.round((180 * r) / Math.PI)) < 0 &&
+ (i = 360 - Math.abs(i)),
+ (i <= 45 && i >= 0) || (i <= 360 && i >= 315)
+ ? "left"
+ : i >= 135 && i <= 225
+ ? "right"
+ : !0 === a
+ ? i >= 35 && i <= 135
+ ? "up"
+ : "down"
+ : "vertical"
+ );
+ };
+ t.getSwipeDirection = g;
+ var A = function (e) {
+ var t = !0;
+ return (
+ e.infinite ||
+ (((e.centerMode && e.currentSlide >= e.slideCount - 1) ||
+ e.slideCount <= e.slidesToShow ||
+ e.currentSlide >= e.slideCount - e.slidesToShow) &&
+ (t = !1)),
+ t
+ );
+ };
+ t.canGoNext = A;
+ t.extractObject = function (e, t) {
+ var n = {};
+ return (
+ t.forEach(function (t) {
+ return (n[t] = e[t]);
+ }),
+ n
+ );
+ };
+ t.initializedState = function (e) {
+ var t,
+ n = i.default.Children.count(e.children),
+ r = e.listRef,
+ a = Math.ceil(v(r)),
+ s = e.trackRef && e.trackRef.node,
+ l = Math.ceil(v(s));
+ if (e.vertical) t = a;
+ else {
+ var u = e.centerMode && 2 * parseInt(e.centerPadding);
+ "string" === typeof e.centerPadding &&
+ "%" === e.centerPadding.slice(-1) &&
+ (u *= a / 100),
+ (t = Math.ceil((a - u) / e.slidesToShow));
+ }
+ var f = r && m(r.querySelector('[data-index="0"]')),
+ d = f * e.slidesToShow,
+ h = void 0 === e.currentSlide ? e.initialSlide : e.currentSlide;
+ e.rtl && void 0 === e.currentSlide && (h = n - 1 - e.initialSlide);
+ var p = e.lazyLoadedList || [],
+ g = c(o(o({}, e), {}, { currentSlide: h, lazyLoadedList: p })),
+ A = {
+ slideCount: n,
+ slideWidth: t,
+ listWidth: a,
+ trackWidth: l,
+ currentSlide: h,
+ slideHeight: f,
+ listHeight: d,
+ lazyLoadedList: (p = p.concat(g)),
+ };
+ return (
+ null === e.autoplaying && e.autoplay && (A.autoplaying = "playing"),
+ A
+ );
+ };
+ t.slideHandler = function (e) {
+ var t = e.waitForAnimate,
+ n = e.animating,
+ r = e.fade,
+ i = e.infinite,
+ a = e.index,
+ s = e.slideCount,
+ u = e.lazyLoad,
+ f = e.currentSlide,
+ d = e.centerMode,
+ h = e.slidesToScroll,
+ p = e.slidesToShow,
+ v = e.useCSS,
+ m = e.lazyLoadedList;
+ if (t && n) return {};
+ var g,
+ y,
+ b,
+ x = a,
+ S = {},
+ w = {},
+ T = i ? a : l(a, 0, s - 1);
+ if (r) {
+ if (!i && (a < 0 || a >= s)) return {};
+ a < 0 ? (x = a + s) : a >= s && (x = a - s),
+ u && m.indexOf(x) < 0 && (m = m.concat(x)),
+ (S = {
+ animating: !0,
+ currentSlide: x,
+ lazyLoadedList: m,
+ targetSlide: x,
+ }),
+ (w = { animating: !1, targetSlide: x });
+ } else
+ (g = x),
+ x < 0
+ ? ((g = x + s), i ? s % h !== 0 && (g = s - (s % h)) : (g = 0))
+ : !A(e) && x > f
+ ? (x = g = f)
+ : d && x >= s
+ ? ((x = i ? s : s - 1), (g = i ? 0 : s - 1))
+ : x >= s &&
+ ((g = x - s), i ? s % h !== 0 && (g = 0) : (g = s - p)),
+ !i && x + p >= s && (g = s - p),
+ (y = C(o(o({}, e), {}, { slideIndex: x }))),
+ (b = C(o(o({}, e), {}, { slideIndex: g }))),
+ i || (y === b && (x = g), (y = b)),
+ u && (m = m.concat(c(o(o({}, e), {}, { currentSlide: x })))),
+ v
+ ? ((S = {
+ animating: !0,
+ currentSlide: g,
+ trackStyle: _(o(o({}, e), {}, { left: y })),
+ lazyLoadedList: m,
+ targetSlide: T,
+ }),
+ (w = {
+ animating: !1,
+ currentSlide: g,
+ trackStyle: E(o(o({}, e), {}, { left: b })),
+ swipeLeft: null,
+ targetSlide: T,
+ }))
+ : (S = {
+ currentSlide: g,
+ trackStyle: E(o(o({}, e), {}, { left: b })),
+ lazyLoadedList: m,
+ targetSlide: T,
+ });
+ return { state: S, nextState: w };
+ };
+ t.changeSlide = function (e, t) {
+ var n,
+ r,
+ i,
+ a,
+ s = e.slidesToScroll,
+ l = e.slidesToShow,
+ u = e.slideCount,
+ c = e.currentSlide,
+ f = e.targetSlide,
+ d = e.lazyLoad,
+ h = e.infinite;
+ if (((n = u % s !== 0 ? 0 : (u - c) % s), "previous" === t.message))
+ (a = c - (i = 0 === n ? s : l - n)),
+ d && !h && (a = -1 === (r = c - i) ? u - 1 : r),
+ h || (a = f - s);
+ else if ("next" === t.message)
+ (a = c + (i = 0 === n ? s : n)),
+ d && !h && (a = ((c + s) % u) + n),
+ h || (a = f + s);
+ else if ("dots" === t.message) a = t.index * t.slidesToScroll;
+ else if ("children" === t.message) {
+ if (((a = t.index), h)) {
+ var p = I(o(o({}, e), {}, { targetSlide: a }));
+ a > t.currentSlide && "left" === p
+ ? (a -= u)
+ : a < t.currentSlide && "right" === p && (a += u);
+ }
+ } else "index" === t.message && (a = Number(t.index));
+ return a;
+ };
+ t.keyHandler = function (e, t, n) {
+ return e.target.tagName.match("TEXTAREA|INPUT|SELECT") || !t
+ ? ""
+ : 37 === e.keyCode
+ ? n
+ ? "next"
+ : "previous"
+ : 39 === e.keyCode
+ ? n
+ ? "previous"
+ : "next"
+ : "";
+ };
+ t.swipeStart = function (e, t, n) {
+ return (
+ "IMG" === e.target.tagName && u(e),
+ !t || (!n && -1 !== e.type.indexOf("mouse"))
+ ? ""
+ : {
+ dragging: !0,
+ touchObject: {
+ startX: e.touches ? e.touches[0].pageX : e.clientX,
+ startY: e.touches ? e.touches[0].pageY : e.clientY,
+ curX: e.touches ? e.touches[0].pageX : e.clientX,
+ curY: e.touches ? e.touches[0].pageY : e.clientY,
+ },
+ }
+ );
+ };
+ t.swipeMove = function (e, t) {
+ var n = t.scrolling,
+ r = t.animating,
+ i = t.vertical,
+ a = t.swipeToSlide,
+ s = t.verticalSwiping,
+ l = t.rtl,
+ c = t.currentSlide,
+ f = t.edgeFriction,
+ d = t.edgeDragged,
+ h = t.onEdge,
+ p = t.swiped,
+ v = t.swiping,
+ m = t.slideCount,
+ y = t.slidesToScroll,
+ b = t.infinite,
+ x = t.touchObject,
+ S = t.swipeEvent,
+ _ = t.listHeight,
+ w = t.listWidth;
+ if (!n) {
+ if (r) return u(e);
+ i && a && s && u(e);
+ var T,
+ M = {},
+ I = C(t);
+ (x.curX = e.touches ? e.touches[0].pageX : e.clientX),
+ (x.curY = e.touches ? e.touches[0].pageY : e.clientY),
+ (x.swipeLength = Math.round(
+ Math.sqrt(Math.pow(x.curX - x.startX, 2))
+ ));
+ var k = Math.round(Math.sqrt(Math.pow(x.curY - x.startY, 2)));
+ if (!s && !v && k > 10) return { scrolling: !0 };
+ s && (x.swipeLength = k);
+ var R = (l ? -1 : 1) * (x.curX > x.startX ? 1 : -1);
+ s && (R = x.curY > x.startY ? 1 : -1);
+ var B = Math.ceil(m / y),
+ P = g(t.touchObject, s),
+ L = x.swipeLength;
+ return (
+ b ||
+ (((0 === c && ("right" === P || "down" === P)) ||
+ (c + 1 >= B && ("left" === P || "up" === P)) ||
+ (!A(t) && ("left" === P || "up" === P))) &&
+ ((L = x.swipeLength * f),
+ !1 === d && h && (h(P), (M.edgeDragged = !0)))),
+ !p && S && (S(P), (M.swiped = !0)),
+ (T = i ? I + L * (_ / w) * R : l ? I - L * R : I + L * R),
+ s && (T = I + L * R),
+ (M = o(
+ o({}, M),
+ {},
+ {
+ touchObject: x,
+ swipeLeft: T,
+ trackStyle: E(o(o({}, t), {}, { left: T })),
+ }
+ )),
+ Math.abs(x.curX - x.startX) < 0.8 * Math.abs(x.curY - x.startY)
+ ? M
+ : (x.swipeLength > 10 && ((M.swiping = !0), u(e)), M)
+ );
+ }
+ };
+ t.swipeEnd = function (e, t) {
+ var n = t.dragging,
+ r = t.swipe,
+ i = t.touchObject,
+ a = t.listWidth,
+ s = t.touchThreshold,
+ l = t.verticalSwiping,
+ c = t.listHeight,
+ f = t.swipeToSlide,
+ d = t.scrolling,
+ h = t.onSwipe,
+ p = t.targetSlide,
+ v = t.currentSlide,
+ m = t.infinite;
+ if (!n) return r && u(e), {};
+ var A = l ? c / s : a / s,
+ y = g(i, l),
+ S = {
+ dragging: !1,
+ edgeDragged: !1,
+ scrolling: !1,
+ swiping: !1,
+ swiped: !1,
+ swipeLeft: null,
+ touchObject: {},
+ };
+ if (d) return S;
+ if (!i.swipeLength) return S;
+ if (i.swipeLength > A) {
+ var E, w;
+ u(e), h && h(y);
+ var T = m ? v : p;
+ switch (y) {
+ case "left":
+ case "up":
+ (w = T + x(t)), (E = f ? b(t, w) : w), (S.currentDirection = 0);
+ break;
+ case "right":
+ case "down":
+ (w = T - x(t)), (E = f ? b(t, w) : w), (S.currentDirection = 1);
+ break;
+ default:
+ E = T;
+ }
+ S.triggerSlideHandler = E;
+ } else {
+ var M = C(t);
+ S.trackStyle = _(o(o({}, t), {}, { left: M }));
+ }
+ return S;
+ };
+ var y = function (e) {
+ for (
+ var t = e.infinite ? 2 * e.slideCount : e.slideCount,
+ n = e.infinite ? -1 * e.slidesToShow : 0,
+ r = e.infinite ? -1 * e.slidesToShow : 0,
+ i = [];
+ n < t;
+
+ )
+ i.push(n),
+ (n = r + e.slidesToScroll),
+ (r += Math.min(e.slidesToScroll, e.slidesToShow));
+ return i;
+ };
+ t.getNavigableIndexes = y;
+ var b = function (e, t) {
+ var n = y(e),
+ r = 0;
+ if (t > n[n.length - 1]) t = n[n.length - 1];
+ else
+ for (var i in n) {
+ if (t < n[i]) {
+ t = r;
+ break;
+ }
+ r = n[i];
+ }
+ return t;
+ };
+ t.checkNavigable = b;
+ var x = function (e) {
+ var t = e.centerMode
+ ? e.slideWidth * Math.floor(e.slidesToShow / 2)
+ : 0;
+ if (e.swipeToSlide) {
+ var n,
+ r = e.listRef,
+ i =
+ (r.querySelectorAll && r.querySelectorAll(".slick-slide")) ||
+ [];
+ if (
+ (Array.from(i).every(function (r) {
+ if (e.vertical) {
+ if (r.offsetTop + m(r) / 2 > -1 * e.swipeLeft)
+ return (n = r), !1;
+ } else if (r.offsetLeft - t + v(r) / 2 > -1 * e.swipeLeft) return (n = r), !1;
+ return !0;
+ }),
+ !n)
+ )
+ return 0;
+ var a =
+ !0 === e.rtl ? e.slideCount - e.currentSlide : e.currentSlide;
+ return Math.abs(n.dataset.index - a) || 1;
+ }
+ return e.slidesToScroll;
+ };
+ t.getSlideCount = x;
+ var S = function (e, t) {
+ return t.reduce(function (t, n) {
+ return t && e.hasOwnProperty(n);
+ }, !0)
+ ? null
+ : console.error("Keys Missing:", e);
+ };
+ t.checkSpecKeys = S;
+ var E = function (e) {
+ var t, n;
+ S(e, [
+ "left",
+ "variableWidth",
+ "slideCount",
+ "slidesToShow",
+ "slideWidth",
+ ]);
+ var r = e.slideCount + 2 * e.slidesToShow;
+ e.vertical ? (n = r * e.slideHeight) : (t = M(e) * e.slideWidth);
+ var i = { opacity: 1, transition: "", WebkitTransition: "" };
+ if (e.useTransform) {
+ var a = e.vertical
+ ? "translate3d(0px, " + e.left + "px, 0px)"
+ : "translate3d(" + e.left + "px, 0px, 0px)",
+ s = e.vertical
+ ? "translate3d(0px, " + e.left + "px, 0px)"
+ : "translate3d(" + e.left + "px, 0px, 0px)",
+ l = e.vertical
+ ? "translateY(" + e.left + "px)"
+ : "translateX(" + e.left + "px)";
+ i = o(
+ o({}, i),
+ {},
+ { WebkitTransform: a, transform: s, msTransform: l }
+ );
+ } else e.vertical ? (i.top = e.left) : (i.left = e.left);
+ return (
+ e.fade && (i = { opacity: 1 }),
+ t && (i.width = t),
+ n && (i.height = n),
+ window &&
+ !window.addEventListener &&
+ window.attachEvent &&
+ (e.vertical
+ ? (i.marginTop = e.left + "px")
+ : (i.marginLeft = e.left + "px")),
+ i
+ );
+ };
+ t.getTrackCSS = E;
+ var _ = function (e) {
+ S(e, [
+ "left",
+ "variableWidth",
+ "slideCount",
+ "slidesToShow",
+ "slideWidth",
+ "speed",
+ "cssEase",
+ ]);
+ var t = E(e);
+ return (
+ e.useTransform
+ ? ((t.WebkitTransition =
+ "-webkit-transform " + e.speed + "ms " + e.cssEase),
+ (t.transition = "transform " + e.speed + "ms " + e.cssEase))
+ : e.vertical
+ ? (t.transition = "top " + e.speed + "ms " + e.cssEase)
+ : (t.transition = "left " + e.speed + "ms " + e.cssEase),
+ t
+ );
+ };
+ t.getTrackAnimateCSS = _;
+ var C = function (e) {
+ if (e.unslick) return 0;
+ S(e, [
+ "slideIndex",
+ "trackRef",
+ "infinite",
+ "centerMode",
+ "slideCount",
+ "slidesToShow",
+ "slidesToScroll",
+ "slideWidth",
+ "listWidth",
+ "variableWidth",
+ "slideHeight",
+ ]);
+ var t,
+ n,
+ r = e.slideIndex,
+ i = e.trackRef,
+ a = e.infinite,
+ o = e.centerMode,
+ s = e.slideCount,
+ l = e.slidesToShow,
+ u = e.slidesToScroll,
+ c = e.slideWidth,
+ f = e.listWidth,
+ d = e.variableWidth,
+ h = e.slideHeight,
+ p = e.fade,
+ v = e.vertical;
+ if (p || 1 === e.slideCount) return 0;
+ var m = 0;
+ if (
+ (a
+ ? ((m = -w(e)),
+ s % u !== 0 &&
+ r + u > s &&
+ (m = -(r > s ? l - (r - s) : s % u)),
+ o && (m += parseInt(l / 2)))
+ : (s % u !== 0 && r + u > s && (m = l - (s % u)),
+ o && (m = parseInt(l / 2))),
+ (t = v ? r * h * -1 + m * h : r * c * -1 + m * c),
+ !0 === d)
+ ) {
+ var g,
+ A = i && i.node;
+ if (
+ ((g = r + w(e)),
+ (t = (n = A && A.childNodes[g]) ? -1 * n.offsetLeft : 0),
+ !0 === o)
+ ) {
+ (g = a ? r + w(e) : r), (n = A && A.children[g]), (t = 0);
+ for (var y = 0; y < g; y++)
+ t -= A && A.children[y] && A.children[y].offsetWidth;
+ (t -= parseInt(e.centerPadding)),
+ (t += n && (f - n.offsetWidth) / 2);
+ }
+ }
+ return t;
+ };
+ t.getTrackLeft = C;
+ var w = function (e) {
+ return e.unslick || !e.infinite
+ ? 0
+ : e.variableWidth
+ ? e.slideCount
+ : e.slidesToShow + (e.centerMode ? 1 : 0);
+ };
+ t.getPreClones = w;
+ var T = function (e) {
+ return e.unslick || !e.infinite ? 0 : e.slideCount;
+ };
+ t.getPostClones = T;
+ var M = function (e) {
+ return 1 === e.slideCount ? 1 : w(e) + e.slideCount + T(e);
+ };
+ t.getTotalSlides = M;
+ var I = function (e) {
+ return e.targetSlide > e.currentSlide
+ ? e.targetSlide > e.currentSlide + k(e)
+ ? "left"
+ : "right"
+ : e.targetSlide < e.currentSlide - R(e)
+ ? "right"
+ : "left";
+ };
+ t.siblingDirection = I;
+ var k = function (e) {
+ var t = e.slidesToShow,
+ n = e.centerMode,
+ r = e.rtl,
+ i = e.centerPadding;
+ if (n) {
+ var a = (t - 1) / 2 + 1;
+ return parseInt(i) > 0 && (a += 1), r && t % 2 === 0 && (a += 1), a;
+ }
+ return r ? 0 : t - 1;
+ };
+ t.slidesOnRight = k;
+ var R = function (e) {
+ var t = e.slidesToShow,
+ n = e.centerMode,
+ r = e.rtl,
+ i = e.centerPadding;
+ if (n) {
+ var a = (t - 1) / 2 + 1;
+ return parseInt(i) > 0 && (a += 1), r || t % 2 !== 0 || (a += 1), a;
+ }
+ return r ? t - 1 : 0;
+ };
+ t.slidesOnLeft = R;
+ t.canUseDOM = function () {
+ return !(
+ "undefined" === typeof window ||
+ !window.document ||
+ !window.document.createElement
+ );
+ };
+ },
+ 6374: function (e, t, n) {
+ "use strict";
+ var r = n(2791),
+ i = Symbol.for("react.element"),
+ a = Symbol.for("react.fragment"),
+ o = Object.prototype.hasOwnProperty,
+ s =
+ r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
+ .ReactCurrentOwner,
+ l = { key: !0, ref: !0, __self: !0, __source: !0 };
+ function u(e, t, n) {
+ var r,
+ a = {},
+ u = null,
+ c = null;
+ for (r in (void 0 !== n && (u = "" + n),
+ void 0 !== t.key && (u = "" + t.key),
+ void 0 !== t.ref && (c = t.ref),
+ t))
+ o.call(t, r) && !l.hasOwnProperty(r) && (a[r] = t[r]);
+ if (e && e.defaultProps)
+ for (r in (t = e.defaultProps)) void 0 === a[r] && (a[r] = t[r]);
+ return {
+ $$typeof: i,
+ type: e,
+ key: u,
+ ref: c,
+ props: a,
+ _owner: s.current,
+ };
+ }
+ (t.Fragment = a), (t.jsx = u), (t.jsxs = u);
+ },
+ 9117: function (e, t) {
+ "use strict";
+ var n = Symbol.for("react.element"),
+ r = Symbol.for("react.portal"),
+ i = Symbol.for("react.fragment"),
+ a = Symbol.for("react.strict_mode"),
+ o = Symbol.for("react.profiler"),
+ s = Symbol.for("react.provider"),
+ l = Symbol.for("react.context"),
+ u = Symbol.for("react.forward_ref"),
+ c = Symbol.for("react.suspense"),
+ f = Symbol.for("react.memo"),
+ d = Symbol.for("react.lazy"),
+ h = Symbol.iterator;
+ var p = {
+ isMounted: function () {
+ return !1;
+ },
+ enqueueForceUpdate: function () {},
+ enqueueReplaceState: function () {},
+ enqueueSetState: function () {},
+ },
+ v = Object.assign,
+ m = {};
+ function g(e, t, n) {
+ (this.props = e),
+ (this.context = t),
+ (this.refs = m),
+ (this.updater = n || p);
+ }
+ function A() {}
+ function y(e, t, n) {
+ (this.props = e),
+ (this.context = t),
+ (this.refs = m),
+ (this.updater = n || p);
+ }
+ (g.prototype.isReactComponent = {}),
+ (g.prototype.setState = function (e, t) {
+ if ("object" !== typeof e && "function" !== typeof e && null != e)
+ throw Error(
+ "setState(...): takes an object of state variables to update or a function which returns an object of state variables."
+ );
+ this.updater.enqueueSetState(this, e, t, "setState");
+ }),
+ (g.prototype.forceUpdate = function (e) {
+ this.updater.enqueueForceUpdate(this, e, "forceUpdate");
+ }),
+ (A.prototype = g.prototype);
+ var b = (y.prototype = new A());
+ (b.constructor = y), v(b, g.prototype), (b.isPureReactComponent = !0);
+ var x = Array.isArray,
+ S = Object.prototype.hasOwnProperty,
+ E = { current: null },
+ _ = { key: !0, ref: !0, __self: !0, __source: !0 };
+ function C(e, t, r) {
+ var i,
+ a = {},
+ o = null,
+ s = null;
+ if (null != t)
+ for (i in (void 0 !== t.ref && (s = t.ref),
+ void 0 !== t.key && (o = "" + t.key),
+ t))
+ S.call(t, i) && !_.hasOwnProperty(i) && (a[i] = t[i]);
+ var l = arguments.length - 2;
+ if (1 === l) a.children = r;
+ else if (1 < l) {
+ for (var u = Array(l), c = 0; c < l; c++) u[c] = arguments[c + 2];
+ a.children = u;
+ }
+ if (e && e.defaultProps)
+ for (i in (l = e.defaultProps)) void 0 === a[i] && (a[i] = l[i]);
+ return {
+ $$typeof: n,
+ type: e,
+ key: o,
+ ref: s,
+ props: a,
+ _owner: E.current,
+ };
+ }
+ function w(e) {
+ return "object" === typeof e && null !== e && e.$$typeof === n;
+ }
+ var T = /\/+/g;
+ function M(e, t) {
+ return "object" === typeof e && null !== e && null != e.key
+ ? (function (e) {
+ var t = { "=": "=0", ":": "=2" };
+ return (
+ "$" +
+ e.replace(/[=:]/g, function (e) {
+ return t[e];
+ })
+ );
+ })("" + e.key)
+ : t.toString(36);
+ }
+ function I(e, t, i, a, o) {
+ var s = typeof e;
+ ("undefined" !== s && "boolean" !== s) || (e = null);
+ var l = !1;
+ if (null === e) l = !0;
+ else
+ switch (s) {
+ case "string":
+ case "number":
+ l = !0;
+ break;
+ case "object":
+ switch (e.$$typeof) {
+ case n:
+ case r:
+ l = !0;
+ }
+ }
+ if (l)
+ return (
+ (o = o((l = e))),
+ (e = "" === a ? "." + M(l, 0) : a),
+ x(o)
+ ? ((i = ""),
+ null != e && (i = e.replace(T, "$&/") + "/"),
+ I(o, t, i, "", function (e) {
+ return e;
+ }))
+ : null != o &&
+ (w(o) &&
+ (o = (function (e, t) {
+ return {
+ $$typeof: n,
+ type: e.type,
+ key: t,
+ ref: e.ref,
+ props: e.props,
+ _owner: e._owner,
+ };
+ })(
+ o,
+ i +
+ (!o.key || (l && l.key === o.key)
+ ? ""
+ : ("" + o.key).replace(T, "$&/") + "/") +
+ e
+ )),
+ t.push(o)),
+ 1
+ );
+ if (((l = 0), (a = "" === a ? "." : a + ":"), x(e)))
+ for (var u = 0; u < e.length; u++) {
+ var c = a + M((s = e[u]), u);
+ l += I(s, t, i, c, o);
+ }
+ else if (
+ ((c = (function (e) {
+ return null === e || "object" !== typeof e
+ ? null
+ : "function" === typeof (e = (h && e[h]) || e["@@iterator"])
+ ? e
+ : null;
+ })(e)),
+ "function" === typeof c)
+ )
+ for (e = c.call(e), u = 0; !(s = e.next()).done; )
+ l += I((s = s.value), t, i, (c = a + M(s, u++)), o);
+ else if ("object" === s)
+ throw (
+ ((t = String(e)),
+ Error(
+ "Objects are not valid as a React child (found: " +
+ ("[object Object]" === t
+ ? "object with keys {" + Object.keys(e).join(", ") + "}"
+ : t) +
+ "). If you meant to render a collection of children, use an array instead."
+ ))
+ );
+ return l;
+ }
+ function k(e, t, n) {
+ if (null == e) return e;
+ var r = [],
+ i = 0;
+ return (
+ I(e, r, "", "", function (e) {
+ return t.call(n, e, i++);
+ }),
+ r
+ );
+ }
+ function R(e) {
+ if (-1 === e._status) {
+ var t = e._result;
+ (t = t()).then(
+ function (t) {
+ (0 !== e._status && -1 !== e._status) ||
+ ((e._status = 1), (e._result = t));
+ },
+ function (t) {
+ (0 !== e._status && -1 !== e._status) ||
+ ((e._status = 2), (e._result = t));
+ }
+ ),
+ -1 === e._status && ((e._status = 0), (e._result = t));
+ }
+ if (1 === e._status) return e._result.default;
+ throw e._result;
+ }
+ var B = { current: null },
+ P = { transition: null },
+ L = {
+ ReactCurrentDispatcher: B,
+ ReactCurrentBatchConfig: P,
+ ReactCurrentOwner: E,
+ };
+ (t.Children = {
+ map: k,
+ forEach: function (e, t, n) {
+ k(
+ e,
+ function () {
+ t.apply(this, arguments);
+ },
+ n
+ );
+ },
+ count: function (e) {
+ var t = 0;
+ return (
+ k(e, function () {
+ t++;
+ }),
+ t
+ );
+ },
+ toArray: function (e) {
+ return (
+ k(e, function (e) {
+ return e;
+ }) || []
+ );
+ },
+ only: function (e) {
+ if (!w(e))
+ throw Error(
+ "React.Children.only expected to receive a single React element child."
+ );
+ return e;
+ },
+ }),
+ (t.Component = g),
+ (t.Fragment = i),
+ (t.Profiler = o),
+ (t.PureComponent = y),
+ (t.StrictMode = a),
+ (t.Suspense = c),
+ (t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = L),
+ (t.cloneElement = function (e, t, r) {
+ if (null === e || void 0 === e)
+ throw Error(
+ "React.cloneElement(...): The argument must be a React element, but you passed " +
+ e +
+ "."
+ );
+ var i = v({}, e.props),
+ a = e.key,
+ o = e.ref,
+ s = e._owner;
+ if (null != t) {
+ if (
+ (void 0 !== t.ref && ((o = t.ref), (s = E.current)),
+ void 0 !== t.key && (a = "" + t.key),
+ e.type && e.type.defaultProps)
+ )
+ var l = e.type.defaultProps;
+ for (u in t)
+ S.call(t, u) &&
+ !_.hasOwnProperty(u) &&
+ (i[u] = void 0 === t[u] && void 0 !== l ? l[u] : t[u]);
+ }
+ var u = arguments.length - 2;
+ if (1 === u) i.children = r;
+ else if (1 < u) {
+ l = Array(u);
+ for (var c = 0; c < u; c++) l[c] = arguments[c + 2];
+ i.children = l;
+ }
+ return {
+ $$typeof: n,
+ type: e.type,
+ key: a,
+ ref: o,
+ props: i,
+ _owner: s,
+ };
+ }),
+ (t.createContext = function (e) {
+ return (
+ ((e = {
+ $$typeof: l,
+ _currentValue: e,
+ _currentValue2: e,
+ _threadCount: 0,
+ Provider: null,
+ Consumer: null,
+ _defaultValue: null,
+ _globalName: null,
+ }).Provider = { $$typeof: s, _context: e }),
+ (e.Consumer = e)
+ );
+ }),
+ (t.createElement = C),
+ (t.createFactory = function (e) {
+ var t = C.bind(null, e);
+ return (t.type = e), t;
+ }),
+ (t.createRef = function () {
+ return { current: null };
+ }),
+ (t.forwardRef = function (e) {
+ return { $$typeof: u, render: e };
+ }),
+ (t.isValidElement = w),
+ (t.lazy = function (e) {
+ return {
+ $$typeof: d,
+ _payload: { _status: -1, _result: e },
+ _init: R,
+ };
+ }),
+ (t.memo = function (e, t) {
+ return { $$typeof: f, type: e, compare: void 0 === t ? null : t };
+ }),
+ (t.startTransition = function (e) {
+ var t = P.transition;
+ P.transition = {};
+ try {
+ e();
+ } finally {
+ P.transition = t;
+ }
+ }),
+ (t.unstable_act = function () {
+ throw Error(
+ "act(...) is not supported in production builds of React."
+ );
+ }),
+ (t.useCallback = function (e, t) {
+ return B.current.useCallback(e, t);
+ }),
+ (t.useContext = function (e) {
+ return B.current.useContext(e);
+ }),
+ (t.useDebugValue = function () {}),
+ (t.useDeferredValue = function (e) {
+ return B.current.useDeferredValue(e);
+ }),
+ (t.useEffect = function (e, t) {
+ return B.current.useEffect(e, t);
+ }),
+ (t.useId = function () {
+ return B.current.useId();
+ }),
+ (t.useImperativeHandle = function (e, t, n) {
+ return B.current.useImperativeHandle(e, t, n);
+ }),
+ (t.useInsertionEffect = function (e, t) {
+ return B.current.useInsertionEffect(e, t);
+ }),
+ (t.useLayoutEffect = function (e, t) {
+ return B.current.useLayoutEffect(e, t);
+ }),
+ (t.useMemo = function (e, t) {
+ return B.current.useMemo(e, t);
+ }),
+ (t.useReducer = function (e, t, n) {
+ return B.current.useReducer(e, t, n);
+ }),
+ (t.useRef = function (e) {
+ return B.current.useRef(e);
+ }),
+ (t.useState = function (e) {
+ return B.current.useState(e);
+ }),
+ (t.useSyncExternalStore = function (e, t, n) {
+ return B.current.useSyncExternalStore(e, t, n);
+ }),
+ (t.useTransition = function () {
+ return B.current.useTransition();
+ }),
+ (t.version = "18.2.0");
+ },
+ 2791: function (e, t, n) {
+ "use strict";
+ e.exports = n(9117);
+ },
+ 184: function (e, t, n) {
+ "use strict";
+ e.exports = n(6374);
+ },
+ 474: function (e, t, n) {
+ "use strict";
+ n.r(t);
+ var r = (function () {
+ if ("undefined" !== typeof Map) return Map;
+ function e(e, t) {
+ var n = -1;
+ return (
+ e.some(function (e, r) {
+ return e[0] === t && ((n = r), !0);
+ }),
+ n
+ );
+ }
+ return (function () {
+ function t() {
+ this.__entries__ = [];
+ }
+ return (
+ Object.defineProperty(t.prototype, "size", {
+ get: function () {
+ return this.__entries__.length;
+ },
+ enumerable: !0,
+ configurable: !0,
+ }),
+ (t.prototype.get = function (t) {
+ var n = e(this.__entries__, t),
+ r = this.__entries__[n];
+ return r && r[1];
+ }),
+ (t.prototype.set = function (t, n) {
+ var r = e(this.__entries__, t);
+ ~r
+ ? (this.__entries__[r][1] = n)
+ : this.__entries__.push([t, n]);
+ }),
+ (t.prototype.delete = function (t) {
+ var n = this.__entries__,
+ r = e(n, t);
+ ~r && n.splice(r, 1);
+ }),
+ (t.prototype.has = function (t) {
+ return !!~e(this.__entries__, t);
+ }),
+ (t.prototype.clear = function () {
+ this.__entries__.splice(0);
+ }),
+ (t.prototype.forEach = function (e, t) {
+ void 0 === t && (t = null);
+ for (var n = 0, r = this.__entries__; n < r.length; n++) {
+ var i = r[n];
+ e.call(t, i[1], i[0]);
+ }
+ }),
+ t
+ );
+ })();
+ })(),
+ i =
+ "undefined" !== typeof window &&
+ "undefined" !== typeof document &&
+ window.document === document,
+ a =
+ "undefined" !== typeof n.g && n.g.Math === Math
+ ? n.g
+ : "undefined" !== typeof self && self.Math === Math
+ ? self
+ : "undefined" !== typeof window && window.Math === Math
+ ? window
+ : Function("return this")(),
+ o =
+ "function" === typeof requestAnimationFrame
+ ? requestAnimationFrame.bind(a)
+ : function (e) {
+ return setTimeout(function () {
+ return e(Date.now());
+ }, 1e3 / 60);
+ };
+ var s = [
+ "top",
+ "right",
+ "bottom",
+ "left",
+ "width",
+ "height",
+ "size",
+ "weight",
+ ],
+ l = "undefined" !== typeof MutationObserver,
+ u = (function () {
+ function e() {
+ (this.connected_ = !1),
+ (this.mutationEventsAdded_ = !1),
+ (this.mutationsObserver_ = null),
+ (this.observers_ = []),
+ (this.onTransitionEnd_ = this.onTransitionEnd_.bind(this)),
+ (this.refresh = (function (e, t) {
+ var n = !1,
+ r = !1,
+ i = 0;
+ function a() {
+ n && ((n = !1), e()), r && l();
+ }
+ function s() {
+ o(a);
+ }
+ function l() {
+ var e = Date.now();
+ if (n) {
+ if (e - i < 2) return;
+ r = !0;
+ } else (n = !0), (r = !1), setTimeout(s, t);
+ i = e;
+ }
+ return l;
+ })(this.refresh.bind(this), 20));
+ }
+ return (
+ (e.prototype.addObserver = function (e) {
+ ~this.observers_.indexOf(e) || this.observers_.push(e),
+ this.connected_ || this.connect_();
+ }),
+ (e.prototype.removeObserver = function (e) {
+ var t = this.observers_,
+ n = t.indexOf(e);
+ ~n && t.splice(n, 1),
+ !t.length && this.connected_ && this.disconnect_();
+ }),
+ (e.prototype.refresh = function () {
+ this.updateObservers_() && this.refresh();
+ }),
+ (e.prototype.updateObservers_ = function () {
+ var e = this.observers_.filter(function (e) {
+ return e.gatherActive(), e.hasActive();
+ });
+ return (
+ e.forEach(function (e) {
+ return e.broadcastActive();
+ }),
+ e.length > 0
+ );
+ }),
+ (e.prototype.connect_ = function () {
+ i &&
+ !this.connected_ &&
+ (document.addEventListener(
+ "transitionend",
+ this.onTransitionEnd_
+ ),
+ window.addEventListener("resize", this.refresh),
+ l
+ ? ((this.mutationsObserver_ = new MutationObserver(
+ this.refresh
+ )),
+ this.mutationsObserver_.observe(document, {
+ attributes: !0,
+ childList: !0,
+ characterData: !0,
+ subtree: !0,
+ }))
+ : (document.addEventListener(
+ "DOMSubtreeModified",
+ this.refresh
+ ),
+ (this.mutationEventsAdded_ = !0)),
+ (this.connected_ = !0));
+ }),
+ (e.prototype.disconnect_ = function () {
+ i &&
+ this.connected_ &&
+ (document.removeEventListener(
+ "transitionend",
+ this.onTransitionEnd_
+ ),
+ window.removeEventListener("resize", this.refresh),
+ this.mutationsObserver_ &&
+ this.mutationsObserver_.disconnect(),
+ this.mutationEventsAdded_ &&
+ document.removeEventListener(
+ "DOMSubtreeModified",
+ this.refresh
+ ),
+ (this.mutationsObserver_ = null),
+ (this.mutationEventsAdded_ = !1),
+ (this.connected_ = !1));
+ }),
+ (e.prototype.onTransitionEnd_ = function (e) {
+ var t = e.propertyName,
+ n = void 0 === t ? "" : t;
+ s.some(function (e) {
+ return !!~n.indexOf(e);
+ }) && this.refresh();
+ }),
+ (e.getInstance = function () {
+ return (
+ this.instance_ || (this.instance_ = new e()), this.instance_
+ );
+ }),
+ (e.instance_ = null),
+ e
+ );
+ })(),
+ c = function (e, t) {
+ for (var n = 0, r = Object.keys(t); n < r.length; n++) {
+ var i = r[n];
+ Object.defineProperty(e, i, {
+ value: t[i],
+ enumerable: !1,
+ writable: !1,
+ configurable: !0,
+ });
+ }
+ return e;
+ },
+ f = function (e) {
+ return (e && e.ownerDocument && e.ownerDocument.defaultView) || a;
+ },
+ d = A(0, 0, 0, 0);
+ function h(e) {
+ return parseFloat(e) || 0;
+ }
+ function p(e) {
+ for (var t = [], n = 1; n < arguments.length; n++)
+ t[n - 1] = arguments[n];
+ return t.reduce(function (t, n) {
+ return t + h(e["border-" + n + "-width"]);
+ }, 0);
+ }
+ function v(e) {
+ var t = e.clientWidth,
+ n = e.clientHeight;
+ if (!t && !n) return d;
+ var r = f(e).getComputedStyle(e),
+ i = (function (e) {
+ for (
+ var t = {}, n = 0, r = ["top", "right", "bottom", "left"];
+ n < r.length;
+ n++
+ ) {
+ var i = r[n],
+ a = e["padding-" + i];
+ t[i] = h(a);
+ }
+ return t;
+ })(r),
+ a = i.left + i.right,
+ o = i.top + i.bottom,
+ s = h(r.width),
+ l = h(r.height);
+ if (
+ ("border-box" === r.boxSizing &&
+ (Math.round(s + a) !== t && (s -= p(r, "left", "right") + a),
+ Math.round(l + o) !== n && (l -= p(r, "top", "bottom") + o)),
+ !(function (e) {
+ return e === f(e).document.documentElement;
+ })(e))
+ ) {
+ var u = Math.round(s + a) - t,
+ c = Math.round(l + o) - n;
+ 1 !== Math.abs(u) && (s -= u), 1 !== Math.abs(c) && (l -= c);
+ }
+ return A(i.left, i.top, s, l);
+ }
+ var m =
+ "undefined" !== typeof SVGGraphicsElement
+ ? function (e) {
+ return e instanceof f(e).SVGGraphicsElement;
+ }
+ : function (e) {
+ return (
+ e instanceof f(e).SVGElement &&
+ "function" === typeof e.getBBox
+ );
+ };
+ function g(e) {
+ return i
+ ? m(e)
+ ? (function (e) {
+ var t = e.getBBox();
+ return A(0, 0, t.width, t.height);
+ })(e)
+ : v(e)
+ : d;
+ }
+ function A(e, t, n, r) {
+ return { x: e, y: t, width: n, height: r };
+ }
+ var y = (function () {
+ function e(e) {
+ (this.broadcastWidth = 0),
+ (this.broadcastHeight = 0),
+ (this.contentRect_ = A(0, 0, 0, 0)),
+ (this.target = e);
+ }
+ return (
+ (e.prototype.isActive = function () {
+ var e = g(this.target);
+ return (
+ (this.contentRect_ = e),
+ e.width !== this.broadcastWidth ||
+ e.height !== this.broadcastHeight
+ );
+ }),
+ (e.prototype.broadcastRect = function () {
+ var e = this.contentRect_;
+ return (
+ (this.broadcastWidth = e.width),
+ (this.broadcastHeight = e.height),
+ e
+ );
+ }),
+ e
+ );
+ })(),
+ b = function (e, t) {
+ var n = (function (e) {
+ var t = e.x,
+ n = e.y,
+ r = e.width,
+ i = e.height,
+ a =
+ "undefined" !== typeof DOMRectReadOnly
+ ? DOMRectReadOnly
+ : Object,
+ o = Object.create(a.prototype);
+ return (
+ c(o, {
+ x: t,
+ y: n,
+ width: r,
+ height: i,
+ top: n,
+ right: t + r,
+ bottom: i + n,
+ left: t,
+ }),
+ o
+ );
+ })(t);
+ c(this, { target: e, contentRect: n });
+ },
+ x = (function () {
+ function e(e, t, n) {
+ if (
+ ((this.activeObservations_ = []),
+ (this.observations_ = new r()),
+ "function" !== typeof e)
+ )
+ throw new TypeError(
+ "The callback provided as parameter 1 is not a function."
+ );
+ (this.callback_ = e),
+ (this.controller_ = t),
+ (this.callbackCtx_ = n);
+ }
+ return (
+ (e.prototype.observe = function (e) {
+ if (!arguments.length)
+ throw new TypeError(
+ "1 argument required, but only 0 present."
+ );
+ if (
+ "undefined" !== typeof Element &&
+ Element instanceof Object
+ ) {
+ if (!(e instanceof f(e).Element))
+ throw new TypeError(
+ 'parameter 1 is not of type "Element".'
+ );
+ var t = this.observations_;
+ t.has(e) ||
+ (t.set(e, new y(e)),
+ this.controller_.addObserver(this),
+ this.controller_.refresh());
+ }
+ }),
+ (e.prototype.unobserve = function (e) {
+ if (!arguments.length)
+ throw new TypeError(
+ "1 argument required, but only 0 present."
+ );
+ if (
+ "undefined" !== typeof Element &&
+ Element instanceof Object
+ ) {
+ if (!(e instanceof f(e).Element))
+ throw new TypeError(
+ 'parameter 1 is not of type "Element".'
+ );
+ var t = this.observations_;
+ t.has(e) &&
+ (t.delete(e),
+ t.size || this.controller_.removeObserver(this));
+ }
+ }),
+ (e.prototype.disconnect = function () {
+ this.clearActive(),
+ this.observations_.clear(),
+ this.controller_.removeObserver(this);
+ }),
+ (e.prototype.gatherActive = function () {
+ var e = this;
+ this.clearActive(),
+ this.observations_.forEach(function (t) {
+ t.isActive() && e.activeObservations_.push(t);
+ });
+ }),
+ (e.prototype.broadcastActive = function () {
+ if (this.hasActive()) {
+ var e = this.callbackCtx_,
+ t = this.activeObservations_.map(function (e) {
+ return new b(e.target, e.broadcastRect());
+ });
+ this.callback_.call(e, t, e), this.clearActive();
+ }
+ }),
+ (e.prototype.clearActive = function () {
+ this.activeObservations_.splice(0);
+ }),
+ (e.prototype.hasActive = function () {
+ return this.activeObservations_.length > 0;
+ }),
+ e
+ );
+ })(),
+ S = "undefined" !== typeof WeakMap ? new WeakMap() : new r(),
+ E = function e(t) {
+ if (!(this instanceof e))
+ throw new TypeError("Cannot call a class as a function.");
+ if (!arguments.length)
+ throw new TypeError("1 argument required, but only 0 present.");
+ var n = u.getInstance(),
+ r = new x(t, n, this);
+ S.set(this, r);
+ };
+ ["observe", "unobserve", "disconnect"].forEach(function (e) {
+ E.prototype[e] = function () {
+ var t;
+ return (t = S.get(this))[e].apply(t, arguments);
+ };
+ });
+ var _ = "undefined" !== typeof a.ResizeObserver ? a.ResizeObserver : E;
+ t.default = _;
+ },
+ 6813: function (e, t) {
+ "use strict";
+ function n(e, t) {
+ var n = e.length;
+ e.push(t);
+ e: for (; 0 < n; ) {
+ var r = (n - 1) >>> 1,
+ i = e[r];
+ if (!(0 < a(i, t))) break e;
+ (e[r] = t), (e[n] = i), (n = r);
+ }
+ }
+ function r(e) {
+ return 0 === e.length ? null : e[0];
+ }
+ function i(e) {
+ if (0 === e.length) return null;
+ var t = e[0],
+ n = e.pop();
+ if (n !== t) {
+ e[0] = n;
+ e: for (var r = 0, i = e.length, o = i >>> 1; r < o; ) {
+ var s = 2 * (r + 1) - 1,
+ l = e[s],
+ u = s + 1,
+ c = e[u];
+ if (0 > a(l, n))
+ u < i && 0 > a(c, l)
+ ? ((e[r] = c), (e[u] = n), (r = u))
+ : ((e[r] = l), (e[s] = n), (r = s));
+ else {
+ if (!(u < i && 0 > a(c, n))) break e;
+ (e[r] = c), (e[u] = n), (r = u);
+ }
+ }
+ }
+ return t;
+ }
+ function a(e, t) {
+ var n = e.sortIndex - t.sortIndex;
+ return 0 !== n ? n : e.id - t.id;
+ }
+ if (
+ "object" === typeof performance &&
+ "function" === typeof performance.now
+ ) {
+ var o = performance;
+ t.unstable_now = function () {
+ return o.now();
+ };
+ } else {
+ var s = Date,
+ l = s.now();
+ t.unstable_now = function () {
+ return s.now() - l;
+ };
+ }
+ var u = [],
+ c = [],
+ f = 1,
+ d = null,
+ h = 3,
+ p = !1,
+ v = !1,
+ m = !1,
+ g = "function" === typeof setTimeout ? setTimeout : null,
+ A = "function" === typeof clearTimeout ? clearTimeout : null,
+ y = "undefined" !== typeof setImmediate ? setImmediate : null;
+ function b(e) {
+ for (var t = r(c); null !== t; ) {
+ if (null === t.callback) i(c);
+ else {
+ if (!(t.startTime <= e)) break;
+ i(c), (t.sortIndex = t.expirationTime), n(u, t);
+ }
+ t = r(c);
+ }
+ }
+ function x(e) {
+ if (((m = !1), b(e), !v))
+ if (null !== r(u)) (v = !0), P(S);
+ else {
+ var t = r(c);
+ null !== t && L(x, t.startTime - e);
+ }
+ }
+ function S(e, n) {
+ (v = !1), m && ((m = !1), A(w), (w = -1)), (p = !0);
+ var a = h;
+ try {
+ for (
+ b(n), d = r(u);
+ null !== d && (!(d.expirationTime > n) || (e && !I()));
+
+ ) {
+ var o = d.callback;
+ if ("function" === typeof o) {
+ (d.callback = null), (h = d.priorityLevel);
+ var s = o(d.expirationTime <= n);
+ (n = t.unstable_now()),
+ "function" === typeof s
+ ? (d.callback = s)
+ : d === r(u) && i(u),
+ b(n);
+ } else i(u);
+ d = r(u);
+ }
+ if (null !== d) var l = !0;
+ else {
+ var f = r(c);
+ null !== f && L(x, f.startTime - n), (l = !1);
+ }
+ return l;
+ } finally {
+ (d = null), (h = a), (p = !1);
+ }
+ }
+ "undefined" !== typeof navigator &&
+ void 0 !== navigator.scheduling &&
+ void 0 !== navigator.scheduling.isInputPending &&
+ navigator.scheduling.isInputPending.bind(navigator.scheduling);
+ var E,
+ _ = !1,
+ C = null,
+ w = -1,
+ T = 5,
+ M = -1;
+ function I() {
+ return !(t.unstable_now() - M < T);
+ }
+ function k() {
+ if (null !== C) {
+ var e = t.unstable_now();
+ M = e;
+ var n = !0;
+ try {
+ n = C(!0, e);
+ } finally {
+ n ? E() : ((_ = !1), (C = null));
+ }
+ } else _ = !1;
+ }
+ if ("function" === typeof y)
+ E = function () {
+ y(k);
+ };
+ else if ("undefined" !== typeof MessageChannel) {
+ var R = new MessageChannel(),
+ B = R.port2;
+ (R.port1.onmessage = k),
+ (E = function () {
+ B.postMessage(null);
+ });
+ } else
+ E = function () {
+ g(k, 0);
+ };
+ function P(e) {
+ (C = e), _ || ((_ = !0), E());
+ }
+ function L(e, n) {
+ w = g(function () {
+ e(t.unstable_now());
+ }, n);
+ }
+ (t.unstable_IdlePriority = 5),
+ (t.unstable_ImmediatePriority = 1),
+ (t.unstable_LowPriority = 4),
+ (t.unstable_NormalPriority = 3),
+ (t.unstable_Profiling = null),
+ (t.unstable_UserBlockingPriority = 2),
+ (t.unstable_cancelCallback = function (e) {
+ e.callback = null;
+ }),
+ (t.unstable_continueExecution = function () {
+ v || p || ((v = !0), P(S));
+ }),
+ (t.unstable_forceFrameRate = function (e) {
+ 0 > e || 125 < e
+ ? console.error(
+ "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
+ )
+ : (T = 0 < e ? Math.floor(1e3 / e) : 5);
+ }),
+ (t.unstable_getCurrentPriorityLevel = function () {
+ return h;
+ }),
+ (t.unstable_getFirstCallbackNode = function () {
+ return r(u);
+ }),
+ (t.unstable_next = function (e) {
+ switch (h) {
+ case 1:
+ case 2:
+ case 3:
+ var t = 3;
+ break;
+ default:
+ t = h;
+ }
+ var n = h;
+ h = t;
+ try {
+ return e();
+ } finally {
+ h = n;
+ }
+ }),
+ (t.unstable_pauseExecution = function () {}),
+ (t.unstable_requestPaint = function () {}),
+ (t.unstable_runWithPriority = function (e, t) {
+ switch (e) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ break;
+ default:
+ e = 3;
+ }
+ var n = h;
+ h = e;
+ try {
+ return t();
+ } finally {
+ h = n;
+ }
+ }),
+ (t.unstable_scheduleCallback = function (e, i, a) {
+ var o = t.unstable_now();
+ switch (
+ ("object" === typeof a && null !== a
+ ? (a = "number" === typeof (a = a.delay) && 0 < a ? o + a : o)
+ : (a = o),
+ e)
+ ) {
+ case 1:
+ var s = -1;
+ break;
+ case 2:
+ s = 250;
+ break;
+ case 5:
+ s = 1073741823;
+ break;
+ case 4:
+ s = 1e4;
+ break;
+ default:
+ s = 5e3;
+ }
+ return (
+ (e = {
+ id: f++,
+ callback: i,
+ priorityLevel: e,
+ startTime: a,
+ expirationTime: (s = a + s),
+ sortIndex: -1,
+ }),
+ a > o
+ ? ((e.sortIndex = a),
+ n(c, e),
+ null === r(u) &&
+ e === r(c) &&
+ (m ? (A(w), (w = -1)) : (m = !0), L(x, a - o)))
+ : ((e.sortIndex = s), n(u, e), v || p || ((v = !0), P(S))),
+ e
+ );
+ }),
+ (t.unstable_shouldYield = I),
+ (t.unstable_wrapCallback = function (e) {
+ var t = h;
+ return function () {
+ var n = h;
+ h = t;
+ try {
+ return e.apply(this, arguments);
+ } finally {
+ h = n;
+ }
+ };
+ });
+ },
+ 5296: function (e, t, n) {
+ "use strict";
+ e.exports = n(6813);
+ },
+ 9613: function (e) {
+ e.exports = function (e, t, n, r) {
+ var i = n ? n.call(r, e, t) : void 0;
+ if (void 0 !== i) return !!i;
+ if (e === t) return !0;
+ if ("object" !== typeof e || !e || "object" !== typeof t || !t)
+ return !1;
+ var a = Object.keys(e),
+ o = Object.keys(t);
+ if (a.length !== o.length) return !1;
+ for (
+ var s = Object.prototype.hasOwnProperty.bind(t), l = 0;
+ l < a.length;
+ l++
+ ) {
+ var u = a[l];
+ if (!s(u)) return !1;
+ var c = e[u],
+ f = t[u];
+ if (
+ !1 === (i = n ? n.call(r, c, f, u) : void 0) ||
+ (void 0 === i && c !== f)
+ )
+ return !1;
+ }
+ return !0;
+ };
+ },
+ 2806: function (e) {
+ e.exports = function (e) {
+ return e
+ .replace(/[A-Z]/g, function (e) {
+ return "-" + e.toLowerCase();
+ })
+ .toLowerCase();
+ };
+ },
+ 1561: function (e, t, n) {
+ "use strict";
+ var r = n(2791);
+ var i =
+ "function" === typeof Object.is
+ ? Object.is
+ : function (e, t) {
+ return (
+ (e === t && (0 !== e || 1 / e === 1 / t)) ||
+ (e !== e && t !== t)
+ );
+ },
+ a = r.useState,
+ o = r.useEffect,
+ s = r.useLayoutEffect,
+ l = r.useDebugValue;
+ function u(e) {
+ var t = e.getSnapshot;
+ e = e.value;
+ try {
+ var n = t();
+ return !i(e, n);
+ } catch (r) {
+ return !0;
+ }
+ }
+ var c =
+ "undefined" === typeof window ||
+ "undefined" === typeof window.document ||
+ "undefined" === typeof window.document.createElement
+ ? function (e, t) {
+ return t();
+ }
+ : function (e, t) {
+ var n = t(),
+ r = a({ inst: { value: n, getSnapshot: t } }),
+ i = r[0].inst,
+ c = r[1];
+ return (
+ s(
+ function () {
+ (i.value = n),
+ (i.getSnapshot = t),
+ u(i) && c({ inst: i });
+ },
+ [e, n, t]
+ ),
+ o(
+ function () {
+ return (
+ u(i) && c({ inst: i }),
+ e(function () {
+ u(i) && c({ inst: i });
+ })
+ );
+ },
+ [e]
+ ),
+ l(n),
+ n
+ );
+ };
+ t.useSyncExternalStore =
+ void 0 !== r.useSyncExternalStore ? r.useSyncExternalStore : c;
+ },
+ 7595: function (e, t, n) {
+ "use strict";
+ var r = n(2791),
+ i = n(7248);
+ var a =
+ "function" === typeof Object.is
+ ? Object.is
+ : function (e, t) {
+ return (
+ (e === t && (0 !== e || 1 / e === 1 / t)) ||
+ (e !== e && t !== t)
+ );
+ },
+ o = i.useSyncExternalStore,
+ s = r.useRef,
+ l = r.useEffect,
+ u = r.useMemo,
+ c = r.useDebugValue;
+ t.useSyncExternalStoreWithSelector = function (e, t, n, r, i) {
+ var f = s(null);
+ if (null === f.current) {
+ var d = { hasValue: !1, value: null };
+ f.current = d;
+ } else d = f.current;
+ f = u(
+ function () {
+ function e(e) {
+ if (!l) {
+ if (
+ ((l = !0), (o = e), (e = r(e)), void 0 !== i && d.hasValue)
+ ) {
+ var t = d.value;
+ if (i(t, e)) return (s = t);
+ }
+ return (s = e);
+ }
+ if (((t = s), a(o, e))) return t;
+ var n = r(e);
+ return void 0 !== i && i(t, n) ? t : ((o = e), (s = n));
+ }
+ var o,
+ s,
+ l = !1,
+ u = void 0 === n ? null : n;
+ return [
+ function () {
+ return e(t());
+ },
+ null === u
+ ? void 0
+ : function () {
+ return e(u());
+ },
+ ];
+ },
+ [t, n, r, i]
+ );
+ var h = o(e, f[0], f[1]);
+ return (
+ l(
+ function () {
+ (d.hasValue = !0), (d.value = h);
+ },
+ [h]
+ ),
+ c(h),
+ h
+ );
+ };
+ },
+ 7248: function (e, t, n) {
+ "use strict";
+ e.exports = n(1561);
+ },
+ 327: function (e, t, n) {
+ "use strict";
+ e.exports = n(7595);
+ },
+ 7864: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ L: function () {
+ return u;
+ },
+ });
+ var r,
+ i,
+ a,
+ o = n(5671),
+ s = n(3144),
+ l = {
+ env: {
+ emscripten_notify_memory_growth: function (e) {
+ a = new Uint8Array(i.exports.memory.buffer);
+ },
+ },
+ },
+ u = (function () {
+ function e() {
+ (0, o.Z)(this, e);
+ }
+ return (
+ (0, s.Z)(e, [
+ {
+ key: "init",
+ value: function () {
+ return (
+ r ||
+ (r =
+ "undefined" != typeof fetch
+ ? fetch("data:application/wasm;base64," + c)
+ .then(function (e) {
+ return e.arrayBuffer();
+ })
+ .then(function (e) {
+ return WebAssembly.instantiate(e, l);
+ })
+ .then(this._init)
+ : WebAssembly.instantiate(
+ Buffer.from(c, "base64"),
+ l
+ ).then(this._init))
+ );
+ },
+ },
+ {
+ key: "_init",
+ value: function (e) {
+ (i = e.instance), l.env.emscripten_notify_memory_growth(0);
+ },
+ },
+ {
+ key: "decode",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ if (!i)
+ throw new Error(
+ "ZSTDDecoder: Await .init() before decoding."
+ );
+ var n = e.byteLength,
+ r = i.exports.malloc(n);
+ a.set(e, r),
+ (t =
+ t || Number(i.exports.ZSTD_findDecompressedSize(r, n)));
+ var o = i.exports.malloc(t),
+ s = i.exports.ZSTD_decompress(o, t, r, n),
+ l = a.slice(o, o + s);
+ return i.exports.free(r), i.exports.free(o), l;
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ c =
+ "AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWtFBEAgACABLQACQRB0IANyIgM2AgALIAAgAS0AAUEIdCADajYCAAsgASACakF/ai0AACIBRQRAIABBADYCBEFsDwsgAEEoIAEQFCACQQN0ams2AgQgAgsWACAAIAEpAAA3AAAgACABKQAINwAICy8BAX8gAUECdEGgHWooAgAgACgCAEEgIAEgACgCBGprQR9xdnEhAiAAIAEQASACCyEAIAFCz9bTvtLHq9lCfiAAfEIfiUKHla+vmLbem55/fgsdAQF/IAAoAgggACgCDEYEfyAAKAIEQSBGBUEACwuCBAEDfyACQYDAAE8EQCAAIAEgAhBnIAAPCyAAIAJqIQMCQCAAIAFzQQNxRQRAAkAgAkEBSARAIAAhAgwBCyAAQQNxRQRAIAAhAgwBCyAAIQIDQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADTw0BIAJBA3ENAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiByAPSw0EIAVBAmohBQNAIAIgB0kEQCANIAJBAXRqQQA7AQAgAkEBaiECDAELCyAGIA5LQQAgBiAFQQN1aiIHIAxLG0UEQCAHKAAAIAVBB3EiBXYhBAwCCyAEQQJ2IQQLIAYhBwsCfyALQX9qIAQgAEF/anEiBiAAQQF0QX9qIgggCWsiEUkNABogBCAIcSIEQQAgESAEIABIG2shBiALCyEIIA0gAkEBdGogBkF/aiIEOwEAIAlBASAGayAEIAZBAUgbayEJA0AgCSAASARAIABBAXUhACALQX9qIQsMAQsLAn8gByAOS0EAIAcgBSAIaiIFQQN1aiIGIAxLG0UEQCAFQQdxDAELIAUgDCIGIAdrQQN0awshBSACQQFqIQIgBEUhCCAGKAAAIAVBH3F2IQQMAQsLQWwgCUEBRyAFQSBKcg0BGiABIAJBf2o2AgAgBiAFQQdqQQN1aiADawwBC0FQCyEAIApBEGokACAACwkAQQFBBSAAGwsMACAAIAEoAAA2AAALqgMBCn8jAEHwAGsiCiQAIAJBAWohDiAAQQhqIQtBgIAEIAVBf2p0QRB1IQxBACECQQEhBkEBIAV0IglBf2oiDyEIA0AgAiAORkUEQAJAIAEgAkEBdCINai8BACIHQf//A0YEQCALIAhBA3RqIAI2AgQgCEF/aiEIQQEhBwwBCyAGQQAgDCAHQRB0QRB1ShshBgsgCiANaiAHOwEAIAJBAWohAgwBCwsgACAFNgIEIAAgBjYCACAJQQN2IAlBAXZqQQNqIQxBACEAQQAhBkEAIQIDQCAGIA5GBEADQAJAIAAgCUYNACAKIAsgAEEDdGoiASgCBCIGQQF0aiICIAIvAQAiAkEBajsBACABIAUgAhAUayIIOgADIAEgAiAIQf8BcXQgCWs7AQAgASAEIAZBAnQiAmooAgA6AAIgASACIANqKAIANgIEIABBAWohAAwBCwsFIAEgBkEBdGouAQAhDUEAIQcDQCAHIA1ORQRAIAsgAkEDdGogBjYCBANAIAIgDGogD3EiAiAISw0ACyAHQQFqIQcMAQsLIAZBAWohBgwBCwsgCkHwAGokAAsjAEIAIAEQCSAAhUKHla+vmLbem55/fkLj3MqV/M7y9YV/fAsQACAAQn43AwggACABNgIACyQBAX8gAARAIAEoAgQiAgRAIAEoAgggACACEQEADwsgABAmCwsfACAAIAEgAi8BABAINgIAIAEQBBogACACQQRqNgIEC0oBAX9BoCAoAgAiASAAaiIAQX9MBEBBiCBBMDYCAEF/DwsCQCAAPwBBEHRNDQAgABBmDQBBiCBBMDYCAEF/DwtBoCAgADYCACABC9cBAQh/Qbp/IQoCQCACKAIEIgggAigCACIJaiIOIAEgAGtLDQBBbCEKIAkgBCADKAIAIgtrSw0AIAAgCWoiBCACKAIIIgxrIQ0gACABQWBqIg8gCyAJQQAQKSADIAkgC2o2AgACQAJAIAwgBCAFa00EQCANIQUMAQsgDCAEIAZrSw0CIAcgDSAFayIAaiIBIAhqIAdNBEAgBCABIAgQDxoMAgsgBCABQQAgAGsQDyEBIAIgACAIaiIINgIEIAEgAGshBAsgBCAPIAUgCEEBECkLIA4hCgsgCgubAgEBfyMAQYABayINJAAgDSADNgJ8AkAgAkEDSwRAQX8hCQwBCwJAAkACQAJAIAJBAWsOAwADAgELIAZFBEBBuH8hCQwEC0FsIQkgBS0AACICIANLDQMgACAHIAJBAnQiAmooAgAgAiAIaigCABA7IAEgADYCAEEBIQkMAwsgASAJNgIAQQAhCQwCCyAKRQRAQWwhCQwCC0EAIQkgC0UgDEEZSHINAUEIIAR0QQhqIQBBACECA0AgAiAATw0CIAJBQGshAgwAAAsAC0FsIQkgDSANQfwAaiANQfgAaiAFIAYQFSICEAMNACANKAJ4IgMgBEsNACAAIA0gDSgCfCAHIAggAxAYIAEgADYCACACIQkLIA1BgAFqJAAgCQsLACAAIAEgAhALGgsQACAALwAAIAAtAAJBEHRyCy8AAn9BuH8gAUEISQ0AGkFyIAAoAAQiAEF3Sw0AGkG4fyAAQQhqIgAgACABSxsLCwkAIAAgATsAAAsDAAELigYBBX8gACAAKAIAIgVBfnE2AgBBACAAIAVBAXZqQYQgKAIAIgQgAEYbIQECQAJAIAAoAgQiAkUNACACKAIAIgNBAXENACACQQhqIgUgA0EBdkF4aiIDQQggA0EISxtnQR9zQQJ0QYAfaiIDKAIARgRAIAMgAigCDDYCAAsgAigCCCIDBEAgAyACKAIMNgIECyACKAIMIgMEQCADIAIoAgg2AgALIAIgAigCACAAKAIAQX5xajYCAEGEICEAAkACQCABRQ0AIAEgAjYCBCABKAIAIgNBAXENASADQQF2QXhqIgNBCCADQQhLG2dBH3NBAnRBgB9qIgMoAgAgAUEIakYEQCADIAEoAgw2AgALIAEoAggiAwRAIAMgASgCDDYCBAsgASgCDCIDBEAgAyABKAIINgIAQYQgKAIAIQQLIAIgAigCACABKAIAQX5xajYCACABIARGDQAgASABKAIAQQF2akEEaiEACyAAIAI2AgALIAIoAgBBAXZBeGoiAEEIIABBCEsbZ0Efc0ECdEGAH2oiASgCACEAIAEgBTYCACACIAA2AgwgAkEANgIIIABFDQEgACAFNgIADwsCQCABRQ0AIAEoAgAiAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAigCACABQQhqRgRAIAIgASgCDDYCAAsgASgCCCICBEAgAiABKAIMNgIECyABKAIMIgIEQCACIAEoAgg2AgBBhCAoAgAhBAsgACAAKAIAIAEoAgBBfnFqIgI2AgACQCABIARHBEAgASABKAIAQQF2aiAANgIEIAAoAgAhAgwBC0GEICAANgIACyACQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgIoAgAhASACIABBCGoiAjYCACAAIAE2AgwgAEEANgIIIAFFDQEgASACNgIADwsgBUEBdkF4aiIBQQggAUEISxtnQR9zQQJ0QYAfaiICKAIAIQEgAiAAQQhqIgI2AgAgACABNgIMIABBADYCCCABRQ0AIAEgAjYCAAsLDgAgAARAIABBeGoQJQsLgAIBA38CQCAAQQ9qQXhxQYQgKAIAKAIAQQF2ayICEB1Bf0YNAAJAQYQgKAIAIgAoAgAiAUEBcQ0AIAFBAXZBeGoiAUEIIAFBCEsbZ0Efc0ECdEGAH2oiASgCACAAQQhqRgRAIAEgACgCDDYCAAsgACgCCCIBBEAgASAAKAIMNgIECyAAKAIMIgFFDQAgASAAKAIINgIAC0EBIQEgACAAKAIAIAJBAXRqIgI2AgAgAkEBcQ0AIAJBAXZBeGoiAkEIIAJBCEsbZ0Efc0ECdEGAH2oiAygCACECIAMgAEEIaiIDNgIAIAAgAjYCDCAAQQA2AgggAkUNACACIAM2AgALIAELtwIBA38CQAJAIABBASAAGyICEDgiAA0AAkACQEGEICgCACIARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqMQAADAMLIAEgBGovAACtQoACfAwCCyABIARqKAAArQwBCyABIARqKQAACyEHIAAgBTYCICAAIAI2AhwgACAHNwMAQQAhAyAAQQA2AhQgACAHIAggBhsiBzcDCCAAIAdCgIAIIAdCgIAIVBs+AhALIAMLWwEBf0G4fyEDIAIQFiICIAFNBH8gACACakF/ai0AACIAQQNxQQJ0QaAeaigCACACaiAAQQZ2IgFBAnRBsB5qKAIAaiAAQSBxIgBFaiABRSAAQQV2cWoFQbh/CwsdACAAKAKQ4gEQWiAAQQA2AqDiASAAQgA3A5DiAQu1AwEFfyMAQZACayIKJABBuH8hBgJAIAVFDQAgBCwAACIIQf8BcSEHAkAgCEF/TARAIAdBgn9qQQF2IgggBU8NAkFsIQYgB0GBf2oiBUGAAk8NAiAEQQFqIQdBACEGA0AgBiAFTwRAIAUhBiAIIQcMAwUgACAGaiAHIAZBAXZqIgQtAABBBHY6AAAgACAGQQFyaiAELQAAQQ9xOgAAIAZBAmohBgwBCwAACwALIAcgBU8NASAAIARBAWogByAKEFMiBhADDQELIAYhBEEAIQYgAUEAQTQQECEJQQAhBQNAIAQgBkcEQCAAIAZqIggtAAAiAUELSwRAQWwhBgwDBSAJIAFBAnRqIgEgASgCAEEBajYCACAGQQFqIQZBASAILQAAdEEBdSAFaiEFDAILAAsLQWwhBiAFRQ0AIAUQFEEBaiIBQQxLDQAgAyABNgIAQQFBASABdCAFayIDEBQiAXQgA0cNACAAIARqIAFBAWoiADoAACAJIABBAnRqIgAgACgCAEEBajYCACAJKAIEIgBBAkkgAEEBcXINACACIARBAWo2AgAgB0EBaiEGCyAKQZACaiQAIAYLxhEBDH8jAEHwAGsiBSQAQWwhCwJAIANBCkkNACACLwAAIQogAi8AAiEJIAIvAAQhByAFQQhqIAQQDgJAIAMgByAJIApqakEGaiIMSQ0AIAUtAAohCCAFQdgAaiACQQZqIgIgChAGIgsQAw0BIAVBQGsgAiAKaiICIAkQBiILEAMNASAFQShqIAIgCWoiAiAHEAYiCxADDQEgBUEQaiACIAdqIAMgDGsQBiILEAMNASAAIAFqIg9BfWohECAEQQRqIQZBASELIAAgAUEDakECdiIDaiIMIANqIgIgA2oiDiEDIAIhBCAMIQcDQCALIAMgEElxBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgCS0AAyELIAcgBiAFQUBrIAgQAkECdGoiCS8BADsAACAFQUBrIAktAAIQASAJLQADIQogBCAGIAVBKGogCBACQQJ0aiIJLwEAOwAAIAVBKGogCS0AAhABIAktAAMhCSADIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgDS0AAyENIAAgC2oiCyAGIAVB2ABqIAgQAkECdGoiAC8BADsAACAFQdgAaiAALQACEAEgAC0AAyEAIAcgCmoiCiAGIAVBQGsgCBACQQJ0aiIHLwEAOwAAIAVBQGsgBy0AAhABIActAAMhByAEIAlqIgkgBiAFQShqIAgQAkECdGoiBC8BADsAACAFQShqIAQtAAIQASAELQADIQQgAyANaiIDIAYgBUEQaiAIEAJBAnRqIg0vAQA7AAAgBUEQaiANLQACEAEgACALaiEAIAcgCmohByAEIAlqIQQgAyANLQADaiEDIAVB2ABqEA0gBUFAaxANciAFQShqEA1yIAVBEGoQDXJFIQsMAQsLIAQgDksgByACS3INAEFsIQsgACAMSw0BIAxBfWohCQNAQQAgACAJSSAFQdgAahAEGwRAIAAgBiAFQdgAaiAIEAJBAnRqIgovAQA7AAAgBUHYAGogCi0AAhABIAAgCi0AA2oiACAGIAVB2ABqIAgQAkECdGoiCi8BADsAACAFQdgAaiAKLQACEAEgACAKLQADaiEADAEFIAxBfmohCgNAIAVB2ABqEAQgACAKS3JFBEAgACAGIAVB2ABqIAgQAkECdGoiCS8BADsAACAFQdgAaiAJLQACEAEgACAJLQADaiEADAELCwNAIAAgCk0EQCAAIAYgBUHYAGogCBACQQJ0aiIJLwEAOwAAIAVB2ABqIAktAAIQASAAIAktAANqIQAMAQsLAkAgACAMTw0AIAAgBiAFQdgAaiAIEAIiAEECdGoiDC0AADoAACAMLQADQQFGBEAgBUHYAGogDC0AAhABDAELIAUoAlxBH0sNACAFQdgAaiAGIABBAnRqLQACEAEgBSgCXEEhSQ0AIAVBIDYCXAsgAkF9aiEMA0BBACAHIAxJIAVBQGsQBBsEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiIAIAYgBUFAayAIEAJBAnRqIgcvAQA7AAAgBUFAayAHLQACEAEgACAHLQADaiEHDAEFIAJBfmohDANAIAVBQGsQBCAHIAxLckUEQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwNAIAcgDE0EQCAHIAYgBUFAayAIEAJBAnRqIgAvAQA7AAAgBUFAayAALQACEAEgByAALQADaiEHDAELCwJAIAcgAk8NACAHIAYgBUFAayAIEAIiAEECdGoiAi0AADoAACACLQADQQFGBEAgBUFAayACLQACEAEMAQsgBSgCREEfSw0AIAVBQGsgBiAAQQJ0ai0AAhABIAUoAkRBIUkNACAFQSA2AkQLIA5BfWohAgNAQQAgBCACSSAFQShqEAQbBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2oiACAGIAVBKGogCBACQQJ0aiIELwEAOwAAIAVBKGogBC0AAhABIAAgBC0AA2ohBAwBBSAOQX5qIQIDQCAFQShqEAQgBCACS3JFBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsDQCAEIAJNBEAgBCAGIAVBKGogCBACQQJ0aiIALwEAOwAAIAVBKGogAC0AAhABIAQgAC0AA2ohBAwBCwsCQCAEIA5PDQAgBCAGIAVBKGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBKGogAi0AAhABDAELIAUoAixBH0sNACAFQShqIAYgAEECdGotAAIQASAFKAIsQSFJDQAgBUEgNgIsCwNAQQAgAyAQSSAFQRBqEAQbBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2oiACAGIAVBEGogCBACQQJ0aiICLwEAOwAAIAVBEGogAi0AAhABIAAgAi0AA2ohAwwBBSAPQX5qIQIDQCAFQRBqEAQgAyACS3JFBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsDQCADIAJNBEAgAyAGIAVBEGogCBACQQJ0aiIALwEAOwAAIAVBEGogAC0AAhABIAMgAC0AA2ohAwwBCwsCQCADIA9PDQAgAyAGIAVBEGogCBACIgBBAnRqIgItAAA6AAAgAi0AA0EBRgRAIAVBEGogAi0AAhABDAELIAUoAhRBH0sNACAFQRBqIAYgAEECdGotAAIQASAFKAIUQSFJDQAgBUEgNgIUCyABQWwgBUHYAGoQCiAFQUBrEApxIAVBKGoQCnEgBUEQahAKcRshCwwJCwAACwALAAALAAsAAAsACwAACwALQWwhCwsgBUHwAGokACALC7UEAQ5/IwBBEGsiBiQAIAZBBGogABAOQVQhBQJAIARB3AtJDQAgBi0ABCEHIANB8ARqQQBB7AAQECEIIAdBDEsNACADQdwJaiIJIAggBkEIaiAGQQxqIAEgAhAxIhAQA0UEQCAGKAIMIgQgB0sNASADQdwFaiEPIANBpAVqIREgAEEEaiESIANBqAVqIQEgBCEFA0AgBSICQX9qIQUgCCACQQJ0aigCAEUNAAsgAkEBaiEOQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgASALaiAKNgIAIAVBAWohBSAKIAxqIQoMAQsLIAEgCjYCAEEAIQUgBigCCCELA0AgBSALRkUEQCABIAUgCWotAAAiDEECdGoiDSANKAIAIg1BAWo2AgAgDyANQQF0aiINIAw6AAEgDSAFOgAAIAVBAWohBQwBCwtBACEBIANBADYCqAUgBEF/cyAHaiEJQQEhBQNAIAUgDk9FBEAgCCAFQQJ0IgtqKAIAIQwgAyALaiABNgIAIAwgBSAJanQgAWohASAFQQFqIQUMAQsLIAcgBEEBaiIBIAJrIgRrQQFqIQgDQEEBIQUgBCAIT0UEQANAIAUgDk9FBEAgBUECdCIJIAMgBEE0bGpqIAMgCWooAgAgBHY2AgAgBUEBaiEFDAELCyAEQQFqIQQMAQsLIBIgByAPIAogESADIAIgARBkIAZBAToABSAGIAc6AAYgACAGKAIENgIACyAQIQULIAZBEGokACAFC8ENAQt/IwBB8ABrIgUkAEFsIQkCQCADQQpJDQAgAi8AACEKIAIvAAIhDCACLwAEIQYgBUEIaiAEEA4CQCADIAYgCiAMampBBmoiDUkNACAFLQAKIQcgBUHYAGogAkEGaiICIAoQBiIJEAMNASAFQUBrIAIgCmoiAiAMEAYiCRADDQEgBUEoaiACIAxqIgIgBhAGIgkQAw0BIAVBEGogAiAGaiADIA1rEAYiCRADDQEgACABaiIOQX1qIQ8gBEEEaiEGQQEhCSAAIAFBA2pBAnYiAmoiCiACaiIMIAJqIg0hAyAMIQQgCiECA0AgCSADIA9JcQRAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAACAGIAVBQGsgBxACQQF0aiIILQAAIQsgBUFAayAILQABEAEgAiALOgAAIAYgBUEoaiAHEAJBAXRqIggtAAAhCyAFQShqIAgtAAEQASAEIAs6AAAgBiAFQRBqIAcQAkEBdGoiCC0AACELIAVBEGogCC0AARABIAMgCzoAACAGIAVB2ABqIAcQAkEBdGoiCC0AACELIAVB2ABqIAgtAAEQASAAIAs6AAEgBiAFQUBrIAcQAkEBdGoiCC0AACELIAVBQGsgCC0AARABIAIgCzoAASAGIAVBKGogBxACQQF0aiIILQAAIQsgBUEoaiAILQABEAEgBCALOgABIAYgBUEQaiAHEAJBAXRqIggtAAAhCyAFQRBqIAgtAAEQASADIAs6AAEgA0ECaiEDIARBAmohBCACQQJqIQIgAEECaiEAIAkgBUHYAGoQDUVxIAVBQGsQDUVxIAVBKGoQDUVxIAVBEGoQDUVxIQkMAQsLIAQgDUsgAiAMS3INAEFsIQkgACAKSw0BIApBfWohCQNAIAVB2ABqEAQgACAJT3JFBEAgBiAFQdgAaiAHEAJBAXRqIggtAAAhCyAFQdgAaiAILQABEAEgACALOgAAIAYgBUHYAGogBxACQQF0aiIILQAAIQsgBUHYAGogCC0AARABIAAgCzoAASAAQQJqIQAMAQsLA0AgBUHYAGoQBCAAIApPckUEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCwNAIAAgCkkEQCAGIAVB2ABqIAcQAkEBdGoiCS0AACEIIAVB2ABqIAktAAEQASAAIAg6AAAgAEEBaiEADAELCyAMQX1qIQADQCAFQUBrEAQgAiAAT3JFBEAgBiAFQUBrIAcQAkEBdGoiCi0AACEJIAVBQGsgCi0AARABIAIgCToAACAGIAVBQGsgBxACQQF0aiIKLQAAIQkgBUFAayAKLQABEAEgAiAJOgABIAJBAmohAgwBCwsDQCAFQUBrEAQgAiAMT3JFBEAgBiAFQUBrIAcQAkEBdGoiAC0AACEKIAVBQGsgAC0AARABIAIgCjoAACACQQFqIQIMAQsLA0AgAiAMSQRAIAYgBUFAayAHEAJBAXRqIgAtAAAhCiAFQUBrIAAtAAEQASACIAo6AAAgAkEBaiECDAELCyANQX1qIQADQCAFQShqEAQgBCAAT3JFBEAgBiAFQShqIAcQAkEBdGoiAi0AACEKIAVBKGogAi0AARABIAQgCjoAACAGIAVBKGogBxACQQF0aiICLQAAIQogBUEoaiACLQABEAEgBCAKOgABIARBAmohBAwBCwsDQCAFQShqEAQgBCANT3JFBEAgBiAFQShqIAcQAkEBdGoiAC0AACECIAVBKGogAC0AARABIAQgAjoAACAEQQFqIQQMAQsLA0AgBCANSQRAIAYgBUEoaiAHEAJBAXRqIgAtAAAhAiAFQShqIAAtAAEQASAEIAI6AAAgBEEBaiEEDAELCwNAIAVBEGoQBCADIA9PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIAYgBUEQaiAHEAJBAXRqIgAtAAAhAiAFQRBqIAAtAAEQASADIAI6AAEgA0ECaiEDDAELCwNAIAVBEGoQBCADIA5PckUEQCAGIAVBEGogBxACQQF0aiIALQAAIQIgBUEQaiAALQABEAEgAyACOgAAIANBAWohAwwBCwsDQCADIA5JBEAgBiAFQRBqIAcQAkEBdGoiAC0AACECIAVBEGogAC0AARABIAMgAjoAACADQQFqIQMMAQsLIAFBbCAFQdgAahAKIAVBQGsQCnEgBUEoahAKcSAFQRBqEApxGyEJDAELQWwhCQsgBUHwAGokACAJC8oCAQR/IwBBIGsiBSQAIAUgBBAOIAUtAAIhByAFQQhqIAIgAxAGIgIQA0UEQCAEQQRqIQIgACABaiIDQX1qIQQDQCAFQQhqEAQgACAET3JFBEAgAiAFQQhqIAcQAkEBdGoiBi0AACEIIAVBCGogBi0AARABIAAgCDoAACACIAVBCGogBxACQQF0aiIGLQAAIQggBUEIaiAGLQABEAEgACAIOgABIABBAmohAAwBCwsDQCAFQQhqEAQgACADT3JFBEAgAiAFQQhqIAcQAkEBdGoiBC0AACEGIAVBCGogBC0AARABIAAgBjoAACAAQQFqIQAMAQsLA0AgACADT0UEQCACIAVBCGogBxACQQF0aiIELQAAIQYgBUEIaiAELQABEAEgACAGOgAAIABBAWohAAwBCwsgAUFsIAVBCGoQChshAgsgBUEgaiQAIAILtgMBCX8jAEEQayIGJAAgBkEANgIMIAZBADYCCEFUIQQCQAJAIANBQGsiDCADIAZBCGogBkEMaiABIAIQMSICEAMNACAGQQRqIAAQDiAGKAIMIgcgBi0ABEEBaksNASAAQQRqIQogBkEAOgAFIAYgBzoABiAAIAYoAgQ2AgAgB0EBaiEJQQEhBANAIAQgCUkEQCADIARBAnRqIgEoAgAhACABIAU2AgAgACAEQX9qdCAFaiEFIARBAWohBAwBCwsgB0EBaiEHQQAhBSAGKAIIIQkDQCAFIAlGDQEgAyAFIAxqLQAAIgRBAnRqIgBBASAEdEEBdSILIAAoAgAiAWoiADYCACAHIARrIQhBACEEAkAgC0EDTQRAA0AgBCALRg0CIAogASAEakEBdGoiACAIOgABIAAgBToAACAEQQFqIQQMAAALAAsDQCABIABPDQEgCiABQQF0aiIEIAg6AAEgBCAFOgAAIAQgCDoAAyAEIAU6AAIgBCAIOgAFIAQgBToABCAEIAg6AAcgBCAFOgAGIAFBBGohAQwAAAsACyAFQQFqIQUMAAALAAsgAiEECyAGQRBqJAAgBAutAQECfwJAQYQgKAIAIABHIAAoAgBBAXYiAyABa0F4aiICQXhxQQhHcgR/IAIFIAMQJ0UNASACQQhqC0EQSQ0AIAAgACgCACICQQFxIAAgAWpBD2pBeHEiASAAa0EBdHI2AgAgASAANgIEIAEgASgCAEEBcSAAIAJBAXZqIAFrIgJBAXRyNgIAQYQgIAEgAkH/////B3FqQQRqQYQgKAIAIABGGyABNgIAIAEQJQsLygIBBX8CQAJAAkAgAEEIIABBCEsbZ0EfcyAAaUEBR2oiAUEESSAAIAF2cg0AIAFBAnRB/B5qKAIAIgJFDQADQCACQXhqIgMoAgBBAXZBeGoiBSAATwRAIAIgBUEIIAVBCEsbZ0Efc0ECdEGAH2oiASgCAEYEQCABIAIoAgQ2AgALDAMLIARBHksNASAEQQFqIQQgAigCBCICDQALC0EAIQMgAUEgTw0BA0AgAUECdEGAH2ooAgAiAkUEQCABQR5LIQIgAUEBaiEBIAJFDQEMAwsLIAIgAkF4aiIDKAIAQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgBGBEAgASACKAIENgIACwsgAigCACIBBEAgASACKAIENgIECyACKAIEIgEEQCABIAIoAgA2AgALIAMgAygCAEEBcjYCACADIAAQNwsgAwvhCwINfwV+IwBB8ABrIgckACAHIAAoAvDhASIINgJcIAEgAmohDSAIIAAoAoDiAWohDwJAAkAgBUUEQCABIQQMAQsgACgCxOABIRAgACgCwOABIREgACgCvOABIQ4gAEEBNgKM4QFBACEIA0AgCEEDRwRAIAcgCEECdCICaiAAIAJqQazQAWooAgA2AkQgCEEBaiEIDAELC0FsIQwgB0EYaiADIAQQBhADDQEgB0EsaiAHQRhqIAAoAgAQEyAHQTRqIAdBGGogACgCCBATIAdBPGogB0EYaiAAKAIEEBMgDUFgaiESIAEhBEEAIQwDQCAHKAIwIAcoAixBA3RqKQIAIhRCEIinQf8BcSEIIAcoAkAgBygCPEEDdGopAgAiFUIQiKdB/wFxIQsgBygCOCAHKAI0QQN0aikCACIWQiCIpyEJIBVCIIghFyAUQiCIpyECAkAgFkIQiKdB/wFxIgNBAk8EQAJAIAZFIANBGUlyRQRAIAkgB0EYaiADQSAgBygCHGsiCiAKIANLGyIKEAUgAyAKayIDdGohCSAHQRhqEAQaIANFDQEgB0EYaiADEAUgCWohCQwBCyAHQRhqIAMQBSAJaiEJIAdBGGoQBBoLIAcpAkQhGCAHIAk2AkQgByAYNwNIDAELAkAgA0UEQCACBEAgBygCRCEJDAMLIAcoAkghCQwBCwJAAkAgB0EYakEBEAUgCSACRWpqIgNBA0YEQCAHKAJEQX9qIgMgA0VqIQkMAQsgA0ECdCAHaigCRCIJIAlFaiEJIANBAUYNAQsgByAHKAJINgJMCwsgByAHKAJENgJIIAcgCTYCRAsgF6chAyALBEAgB0EYaiALEAUgA2ohAwsgCCALakEUTwRAIAdBGGoQBBoLIAgEQCAHQRhqIAgQBSACaiECCyAHQRhqEAQaIAcgB0EYaiAUQhiIp0H/AXEQCCAUp0H//wNxajYCLCAHIAdBGGogFUIYiKdB/wFxEAggFadB//8DcWo2AjwgB0EYahAEGiAHIAdBGGogFkIYiKdB/wFxEAggFqdB//8DcWo2AjQgByACNgJgIAcoAlwhCiAHIAk2AmggByADNgJkAkACQAJAIAQgAiADaiILaiASSw0AIAIgCmoiEyAPSw0AIA0gBGsgC0Egak8NAQsgByAHKQNoNwMQIAcgBykDYDcDCCAEIA0gB0EIaiAHQdwAaiAPIA4gESAQEB4hCwwBCyACIARqIQggBCAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogB0EoaiAfQhiIp0H/AXEQCCEOIAdB8ABqIARBBHRqIgsgCSANaiAIazYCDCALIAg2AgggCyADNgIEIAsgAjYCACAHIA4gH6dB//8DcWo2AkQgBEEBaiEEDAELCyAEIBdIDQEgEkFgaiEYIAdB4ABqIRogB0HkAGohGyABIQMDQCAHQShqEARBAksgBCAFTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEIIAcoAkggBygCREEDdGopAgAiH0IgiKchCSAeQiCIISAgHUIgiKchDAJAIB9CEIinQf8BcSICQQJPBEACQCAGRSACQRlJckUEQCAJIAdBKGogAkEgIAcoAixrIgogCiACSxsiChAFIAIgCmsiAnRqIQkgB0EoahAEGiACRQ0BIAdBKGogAhAFIAlqIQkMAQsgB0EoaiACEAUgCWohCSAHQShqEAQaCyAHKQJUISEgByAJNgJUIAcgITcDWAwBCwJAIAJFBEAgDARAIAcoAlQhCQwDCyAHKAJYIQkMAQsCQAJAIAdBKGpBARAFIAkgDEVqaiICQQNGBEAgBygCVEF/aiICIAJFaiEJDAELIAJBAnQgB2ooAlQiCSAJRWohCSACQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAk2AlQLICCnIRQgCARAIAdBKGogCBAFIBRqIRQLIAggC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgDGohDAsgB0EoahAEGiAHIAcoAmggDGoiGSAUajYCaCAbIBogCSAZSxsoAgAhHCAHIAdBKGogHUIYiKdB/wFxEAggHadB//8DcWo2AjwgByAHQShqIB5CGIinQf8BcRAIIB6nQf//A3FqNgJMIAdBKGoQBBogByAHQShqIB9CGIinQf8BcRAIIB+nQf//A3FqNgJEIAcgB0HwAGogBEEDcUEEdGoiDSkDCCIdNwPIASAHIA0pAwAiHjcDwAECQAJAAkAgBygCvAEiDiAepyICaiIWIBNLDQAgAyAHKALEASIKIAJqIgtqIBhLDQAgEiADayALQSBqTw0BCyAHIAcpA8gBNwMQIAcgBykDwAE3AwggAyASIAdBCGogB0G8AWogEyAPIBUgERAeIQsMAQsgAiADaiEIIAMgDhAHIAJBEU8EQCADQRBqIQIDQCACIA5BEGoiDhAHIAJBEGoiAiAISQ0ACwsgCCAdpyIOayECIAcgFjYCvAEgDiAIIA9rSwRAIA4gCCAVa0sEQEFsIQsMAgsgESACIA9rIgJqIhYgCmogEU0EQCAIIBYgChAPGgwCCyAIIBZBACACaxAPIQggByACIApqIgo2AsQBIAggAmshCCAPIQILIA5BEE8EQCAIIApqIQoDQCAIIAIQByACQRBqIQIgCEEQaiIIIApJDQALDAELAkAgDkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgDkECdCIKQcAeaigCAGoiAhAXIAIgCkHgHmooAgBrIQIgBygCxAEhCgwBCyAIIAIQDAsgCkEJSQ0AIAggCmohCiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAKSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAKSQ0ACwsgCxADBEAgCyEQDAQFIA0gDDYCACANIBkgHGogCWs2AgwgDSAJNgIIIA0gFDYCBCAEQQFqIQQgAyALaiEDDAILAAsLIAQgBUgNASAEIBdrIQtBACEEA0AgCyAFSARAIAcgB0HwAGogC0EDcUEEdGoiAikDCCIdNwPIASAHIAIpAwAiHjcDwAECQAJAAkAgBygCvAEiDCAepyICaiIKIBNLDQAgAyAHKALEASIJIAJqIhBqIBhLDQAgEiADayAQQSBqTw0BCyAHIAcpA8gBNwMgIAcgBykDwAE3AxggAyASIAdBGGogB0G8AWogEyAPIBUgERAeIRAMAQsgAiADaiEIIAMgDBAHIAJBEU8EQCADQRBqIQIDQCACIAxBEGoiDBAHIAJBEGoiAiAISQ0ACwsgCCAdpyIGayECIAcgCjYCvAEgBiAIIA9rSwRAIAYgCCAVa0sEQEFsIRAMAgsgESACIA9rIgJqIgwgCWogEU0EQCAIIAwgCRAPGgwCCyAIIAxBACACaxAPIQggByACIAlqIgk2AsQBIAggAmshCCAPIQILIAZBEE8EQCAIIAlqIQYDQCAIIAIQByACQRBqIQIgCEEQaiIIIAZJDQALDAELAkAgBkEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgBkECdCIGQcAeaigCAGoiAhAXIAIgBkHgHmooAgBrIQIgBygCxAEhCQwBCyAIIAIQDAsgCUEJSQ0AIAggCWohBiAIQQhqIgggAkEIaiICa0EPTARAA0AgCCACEAwgAkEIaiECIAhBCGoiCCAGSQ0ADAIACwALA0AgCCACEAcgAkEQaiECIAhBEGoiCCAGSQ0ACwsgEBADDQMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqIAQgBCAFaiAGGyIEIAEgAmoiAiAEaxAVIgUQAw0AIAMoAnwiBkEfSw0AIAMoAngiB0EJTw0AIABBiCBqIAMgBkGAC0GADCAHEBggA0E0NgJ8IAMgA0H8AGogA0H4AGogBCAFaiIEIAIgBGsQFSIFEAMNACADKAJ8IgZBNEsNACADKAJ4IgdBCk8NACAAQZAwaiADIAZBgA1B4A4gBxAYIANBIzYCfCADIANB/ABqIANB+ABqIAQgBWoiBCACIARrEBUiBRADDQAgAygCfCIGQSNLDQAgAygCeCIHQQpPDQAgACADIAZBwBBB0BEgBxAYIAQgBWoiBEEMaiIFIAJLDQAgAiAFayEFQQAhAgNAIAJBA0cEQCAEKAAAIgZBf2ogBU8NAiAAIAJBAnRqQZzQAWogBjYCACACQQFqIQIgBEEEaiEEDAELCyAEIAFrIQgLIANBgAFqJAAgCAtGAQN/IABBCGohAyAAKAIEIQJBACEAA0AgACACdkUEQCABIAMgAEEDdGotAAJBFktqIQEgAEEBaiEADAELCyABQQggAmt0C4YDAQV/Qbh/IQcCQCADRQ0AIAItAAAiBEUEQCABQQA2AgBBAUG4fyADQQFGGw8LAn8gAkEBaiIFIARBGHRBGHUiBkF/Sg0AGiAGQX9GBEAgA0EDSA0CIAUvAABBgP4BaiEEIAJBA2oMAQsgA0ECSA0BIAItAAEgBEEIdHJBgIB+aiEEIAJBAmoLIQUgASAENgIAIAVBAWoiASACIANqIgNLDQBBbCEHIABBEGogACAFLQAAIgVBBnZBI0EJIAEgAyABa0HAEEHQEUHwEiAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBmCBqIABBCGogBUEEdkEDcUEfQQggASABIAZqIAgbIgEgAyABa0GAC0GADEGAFyAAKAKM4QEgACgCnOIBIAQQHyIGEAMiCA0AIABBoDBqIABBBGogBUECdkEDcUE0QQkgASABIAZqIAgbIgEgAyABa0GADUHgDkGQGSAAKAKM4QEgACgCnOIBIAQQHyIAEAMNACAAIAFqIAJrIQcLIAcLrQMBCn8jAEGABGsiCCQAAn9BUiACQf8BSw0AGkFUIANBDEsNABogAkEBaiELIABBBGohCUGAgAQgA0F/anRBEHUhCkEAIQJBASEEQQEgA3QiB0F/aiIMIQUDQCACIAtGRQRAAkAgASACQQF0Ig1qLwEAIgZB//8DRgRAIAkgBUECdGogAjoAAiAFQX9qIQVBASEGDAELIARBACAKIAZBEHRBEHVKGyEECyAIIA1qIAY7AQAgAkEBaiECDAELCyAAIAQ7AQIgACADOwEAIAdBA3YgB0EBdmpBA2ohBkEAIQRBACECA0AgBCALRkUEQCABIARBAXRqLgEAIQpBACEAA0AgACAKTkUEQCAJIAJBAnRqIAQ6AAIDQCACIAZqIAxxIgIgBUsNAAsgAEEBaiEADAELCyAEQQFqIQQMAQsLQX8gAg0AGkEAIQIDfyACIAdGBH9BAAUgCCAJIAJBAnRqIgAtAAJBAXRqIgEgAS8BACIBQQFqOwEAIAAgAyABEBRrIgU6AAMgACABIAVB/wFxdCAHazsBACACQQFqIQIMAQsLCyEFIAhBgARqJAAgBQvjBgEIf0FsIQcCQCACQQNJDQACQAJAAkACQCABLQAAIgNBA3EiCUEBaw4DAwEAAgsgACgCiOEBDQBBYg8LIAJBBUkNAkEDIQYgASgAACEFAn8CQAJAIANBAnZBA3EiCEF+aiIEQQFNBEAgBEEBaw0BDAILIAVBDnZB/wdxIQQgBUEEdkH/B3EhAyAIRQwCCyAFQRJ2IQRBBCEGIAVBBHZB//8AcSEDQQAMAQsgBUEEdkH//w9xIgNBgIAISw0DIAEtAARBCnQgBUEWdnIhBEEFIQZBAAshBSAEIAZqIgogAksNAgJAIANBgQZJDQAgACgCnOIBRQ0AQQAhAgNAIAJBg4ABSw0BIAJBQGshAgwAAAsACwJ/IAlBA0YEQCABIAZqIQEgAEHw4gFqIQIgACgCDCEGIAUEQCACIAMgASAEIAYQXwwCCyACIAMgASAEIAYQXQwBCyAAQbjQAWohAiABIAZqIQEgAEHw4gFqIQYgAEGo0ABqIQggBQRAIAggBiADIAEgBCACEF4MAQsgCCAGIAMgASAEIAIQXAsQAw0CIAAgAzYCgOIBIABBATYCiOEBIAAgAEHw4gFqNgLw4QEgCUECRgRAIAAgAEGo0ABqNgIMCyAAIANqIgBBiOMBakIANwAAIABBgOMBakIANwAAIABB+OIBakIANwAAIABB8OIBakIANwAAIAoPCwJ/AkACQAJAIANBAnZBA3FBf2oiBEECSw0AIARBAWsOAgACAQtBASEEIANBA3YMAgtBAiEEIAEvAABBBHYMAQtBAyEEIAEQIUEEdgsiAyAEaiIFQSBqIAJLBEAgBSACSw0CIABB8OIBaiABIARqIAMQCyEBIAAgAzYCgOIBIAAgATYC8OEBIAEgA2oiAEIANwAYIABCADcAECAAQgA3AAggAEIANwAAIAUPCyAAIAM2AoDiASAAIAEgBGo2AvDhASAFDwsCfwJAAkACQCADQQJ2QQNxQX9qIgRBAksNACAEQQFrDgIAAgELQQEhByADQQN2DAILQQIhByABLwAAQQR2DAELIAJBBEkgARAhIgJBj4CAAUtyDQFBAyEHIAJBBHYLIQIgAEHw4gFqIAEgB2otAAAgAkEgahAQIQEgACACNgKA4gEgACABNgLw4QEgB0EBaiEHCyAHC0sAIABC+erQ0OfJoeThADcDICAAQgA3AxggAELP1tO+0ser2UI3AxAgAELW64Lu6v2J9eAANwMIIABCADcDACAAQShqQQBBKBAQGgviAgICfwV+IABBKGoiASAAKAJIaiECAn4gACkDACIDQiBaBEAgACkDECIEQgeJIAApAwgiBUIBiXwgACkDGCIGQgyJfCAAKQMgIgdCEol8IAUQGSAEEBkgBhAZIAcQGQwBCyAAKQMYQsXP2bLx5brqJ3wLIAN8IQMDQCABQQhqIgAgAk0EQEIAIAEpAAAQCSADhUIbiUKHla+vmLbem55/fkLj3MqV/M7y9YV/fCEDIAAhAQwBCwsCQCABQQRqIgAgAksEQCABIQAMAQsgASgAAK1Ch5Wvr5i23puef34gA4VCF4lCz9bTvtLHq9lCfkL5893xmfaZqxZ8IQMLA0AgACACSQRAIAAxAABCxc/ZsvHluuonfiADhUILiUKHla+vmLbem55/fiEDIABBAWohAAwBCwsgA0IhiCADhULP1tO+0ser2UJ+IgNCHYggA4VC+fPd8Zn2masWfiIDQiCIIAOFC+8CAgJ/BH4gACAAKQMAIAKtfDcDAAJAAkAgACgCSCIDIAJqIgRBH00EQCABRQ0BIAAgA2pBKGogASACECAgACgCSCACaiEEDAELIAEgAmohAgJ/IAMEQCAAQShqIgQgA2ogAUEgIANrECAgACAAKQMIIAQpAAAQCTcDCCAAIAApAxAgACkAMBAJNwMQIAAgACkDGCAAKQA4EAk3AxggACAAKQMgIABBQGspAAAQCTcDICAAKAJIIQMgAEEANgJIIAEgA2tBIGohAQsgAUEgaiACTQsEQCACQWBqIQMgACkDICEFIAApAxghBiAAKQMQIQcgACkDCCEIA0AgCCABKQAAEAkhCCAHIAEpAAgQCSEHIAYgASkAEBAJIQYgBSABKQAYEAkhBSABQSBqIgEgA00NAAsgACAFNwMgIAAgBjcDGCAAIAc3AxAgACAINwMICyABIAJPDQEgAEEoaiABIAIgAWsiBBAgCyAAIAQ2AkgLCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQEBogAwVBun8LCy8BAX8gAEUEQEG2f0EAIAMbDwtBun8hBCADIAFNBH8gACACIAMQCxogAwVBun8LC6gCAQZ/IwBBEGsiByQAIABB2OABaikDAEKAgIAQViEIQbh/IQUCQCAEQf//B0sNACAAIAMgBBBCIgUQAyIGDQAgACgCnOIBIQkgACAHQQxqIAMgAyAFaiAGGyIKIARBACAFIAYbayIGEEAiAxADBEAgAyEFDAELIAcoAgwhBCABRQRAQbp/IQUgBEEASg0BCyAGIANrIQUgAyAKaiEDAkAgCQRAIABBADYCnOIBDAELAkACQAJAIARBBUgNACAAQdjgAWopAwBCgICACFgNAAwBCyAAQQA2ApziAQwBCyAAKAIIED8hBiAAQQA2ApziASAGQRRPDQELIAAgASACIAMgBSAEIAgQOSEFDAELIAAgASACIAMgBSAEIAgQOiEFCyAHQRBqJAAgBQtnACAAQdDgAWogASACIAAoAuzhARAuIgEQAwRAIAEPC0G4fyECAkAgAQ0AIABB7OABaigCACIBBEBBYCECIAAoApjiASABRw0BC0EAIQIgAEHw4AFqKAIARQ0AIABBkOEBahBDCyACCycBAX8QVyIERQRAQUAPCyAEIAAgASACIAMgBBBLEE8hACAEEFYgAAs/AQF/AkACQAJAIAAoAqDiAUEBaiIBQQJLDQAgAUEBaw4CAAECCyAAEDBBAA8LIABBADYCoOIBCyAAKAKU4gELvAMCB38BfiMAQRBrIgkkAEG4fyEGAkAgBCgCACIIQQVBCSAAKALs4QEiBRtJDQAgAygCACIHQQFBBSAFGyAFEC8iBRADBEAgBSEGDAELIAggBUEDakkNACAAIAcgBRBJIgYQAw0AIAEgAmohCiAAQZDhAWohCyAIIAVrIQIgBSAHaiEHIAEhBQNAIAcgAiAJECwiBhADDQEgAkF9aiICIAZJBEBBuH8hBgwCCyAJKAIAIghBAksEQEFsIQYMAgsgB0EDaiEHAn8CQAJAAkAgCEEBaw4CAgABCyAAIAUgCiAFayAHIAYQSAwCCyAFIAogBWsgByAGEEcMAQsgBSAKIAVrIActAAAgCSgCCBBGCyIIEAMEQCAIIQYMAgsgACgC8OABBEAgCyAFIAgQRQsgAiAGayECIAYgB2ohByAFIAhqIQUgCSgCBEUNAAsgACkD0OABIgxCf1IEQEFsIQYgDCAFIAFrrFINAQsgACgC8OABBEBBaiEGIAJBBEkNASALEEQhDCAHKAAAIAynRw0BIAdBBGohByACQXxqIQILIAMgBzYCACAEIAI2AgAgBSABayEGCyAJQRBqJAAgBgsuACAAECsCf0EAQQAQAw0AGiABRSACRXJFBEBBYiAAIAEgAhA9EAMNARoLQQALCzcAIAEEQCAAIAAoAsTgASABKAIEIAEoAghqRzYCnOIBCyAAECtBABADIAFFckUEQCAAIAEQWwsL0QIBB38jAEEQayIGJAAgBiAENgIIIAYgAzYCDCAFBEAgBSgCBCEKIAUoAgghCQsgASEIAkACQANAIAAoAuzhARAWIQsCQANAIAQgC0kNASADKAAAQXBxQdDUtMIBRgRAIAMgBBAiIgcQAw0EIAQgB2shBCADIAdqIQMMAQsLIAYgAzYCDCAGIAQ2AggCQCAFBEAgACAFEE5BACEHQQAQA0UNAQwFCyAAIAogCRBNIgcQAw0ECyAAIAgQUCAMQQFHQQAgACAIIAIgBkEMaiAGQQhqEEwiByIDa0EAIAMQAxtBCkdyRQRAQbh/IQcMBAsgBxADDQMgAiAHayECIAcgCGohCEEBIQwgBigCDCEDIAYoAgghBAwBCwsgBiADNgIMIAYgBDYCCEG4fyEHIAQNASAIIAFrIQcMAQsgBiADNgIMIAYgBDYCCAsgBkEQaiQAIAcLRgECfyABIAAoArjgASICRwRAIAAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEAMEQCAFDwsgBSAESQR/IAEgAiADIAVqIAQgBWsgABA1BUG4fwsLRgEBfyMAQRBrIgUkACAFQQhqIAQQDgJ/IAUtAAkEQCAAIAEgAiADIAQQYgwBCyAAIAEgAiADIAQQNQshACAFQRBqJAAgAAtZAQF/QQ8hAiABIABJBEAgAUEEdCAAbiECCyAAQQh2IgEgAkEYbCIAQYwIaigCAGwgAEGICGooAgBqIgJBA3YgAmogAEGACGooAgAgAEGECGooAgAgAWxqSQs3ACAAIAMgBCAFQYAQEDMiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQMgVBuH8LC78DAQN/IwBBIGsiBSQAIAVBCGogAiADEAYiAhADRQRAIAAgAWoiB0F9aiEGIAUgBBAOIARBBGohAiAFLQACIQMDQEEAIAAgBkkgBUEIahAEGwRAIAAgAiAFQQhqIAMQAkECdGoiBC8BADsAACAFQQhqIAQtAAIQASAAIAQtAANqIgQgAiAFQQhqIAMQAkECdGoiAC8BADsAACAFQQhqIAAtAAIQASAEIAAtAANqIQAMAQUgB0F+aiEEA0AgBUEIahAEIAAgBEtyRQRAIAAgAiAFQQhqIAMQAkECdGoiBi8BADsAACAFQQhqIAYtAAIQASAAIAYtAANqIQAMAQsLA0AgACAES0UEQCAAIAIgBUEIaiADEAJBAnRqIgYvAQA7AAAgBUEIaiAGLQACEAEgACAGLQADaiEADAELCwJAIAAgB08NACAAIAIgBUEIaiADEAIiA0ECdGoiAC0AADoAACAALQADQQFGBEAgBUEIaiAALQACEAEMAQsgBSgCDEEfSw0AIAVBCGogAiADQQJ0ai0AAhABIAUoAgxBIUkNACAFQSA2AgwLIAFBbCAFQQhqEAobIQILCwsgBUEgaiQAIAILkgIBBH8jAEFAaiIJJAAgCSADQTQQCyEDAkAgBEECSA0AIAMgBEECdGooAgAhCSADQTxqIAgQIyADQQE6AD8gAyACOgA+QQAhBCADKAI8IQoDQCAEIAlGDQEgACAEQQJ0aiAKNgEAIARBAWohBAwAAAsAC0EAIQkDQCAGIAlGRQRAIAMgBSAJQQF0aiIKLQABIgtBAnRqIgwoAgAhBCADQTxqIAotAABBCHQgCGpB//8DcRAjIANBAjoAPyADIAcgC2siCiACajoAPiAEQQEgASAKa3RqIQogAygCPCELA0AgACAEQQJ0aiALNgEAIARBAWoiBCAKSQ0ACyAMIAo2AgAgCUEBaiEJDAELCyADQUBrJAALowIBCX8jAEHQAGsiCSQAIAlBEGogBUE0EAsaIAcgBmshDyAHIAFrIRADQAJAIAMgCkcEQEEBIAEgByACIApBAXRqIgYtAAEiDGsiCGsiC3QhDSAGLQAAIQ4gCUEQaiAMQQJ0aiIMKAIAIQYgCyAPTwRAIAAgBkECdGogCyAIIAUgCEE0bGogCCAQaiIIQQEgCEEBShsiCCACIAQgCEECdGooAgAiCEEBdGogAyAIayAHIA4QYyAGIA1qIQgMAgsgCUEMaiAOECMgCUEBOgAPIAkgCDoADiAGIA1qIQggCSgCDCELA0AgBiAITw0CIAAgBkECdGogCzYBACAGQQFqIQYMAAALAAsgCUHQAGokAA8LIAwgCDYCACAKQQFqIQoMAAALAAs0ACAAIAMgBCAFEDYiBRADBEAgBQ8LIAUgBEkEfyABIAIgAyAFaiAEIAVrIAAQNAVBuH8LCyMAIAA/AEEQdGtB//8DakEQdkAAQX9GBEBBAA8LQQAQAEEBCzsBAX8gAgRAA0AgACABIAJBgCAgAkGAIEkbIgMQCyEAIAFBgCBqIQEgAEGAIGohACACIANrIgINAAsLCwYAIAAQAwsLqBUJAEGICAsNAQAAAAEAAAACAAAAAgBBoAgLswYBAAAAAQAAAAIAAAACAAAAJgAAAIIAAAAhBQAASgAAAGcIAAAmAAAAwAEAAIAAAABJBQAASgAAAL4IAAApAAAALAIAAIAAAABJBQAASgAAAL4IAAAvAAAAygIAAIAAAACKBQAASgAAAIQJAAA1AAAAcwMAAIAAAACdBQAASgAAAKAJAAA9AAAAgQMAAIAAAADrBQAASwAAAD4KAABEAAAAngMAAIAAAABNBgAASwAAAKoKAABLAAAAswMAAIAAAADBBgAATQAAAB8NAABNAAAAUwQAAIAAAAAjCAAAUQAAAKYPAABUAAAAmQQAAIAAAABLCQAAVwAAALESAABYAAAA2gQAAIAAAABvCQAAXQAAACMUAABUAAAARQUAAIAAAABUCgAAagAAAIwUAABqAAAArwUAAIAAAAB2CQAAfAAAAE4QAAB8AAAA0gIAAIAAAABjBwAAkQAAAJAHAACSAAAAAAAAAAEAAAABAAAABQAAAA0AAAAdAAAAPQAAAH0AAAD9AAAA/QEAAP0DAAD9BwAA/Q8AAP0fAAD9PwAA/X8AAP3/AAD9/wEA/f8DAP3/BwD9/w8A/f8fAP3/PwD9/38A/f//AP3//wH9//8D/f//B/3//w/9//8f/f//P/3//38AAAAAAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAeAAAAHwAAAAMAAAAEAAAABQAAAAYAAAAHAAAACAAAAAkAAAAKAAAACwAAAAwAAAANAAAADgAAAA8AAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAIwAAACUAAAAnAAAAKQAAACsAAAAvAAAAMwAAADsAAABDAAAAUwAAAGMAAACDAAAAAwEAAAMCAAADBAAAAwgAAAMQAAADIAAAA0AAAAOAAAADAAEAQeAPC1EBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAEAAAABQAAAAcAAAAIAAAACQAAAAoAAAALAAAADAAAAA0AAAAOAAAADwAAABAAQcQQC4sBAQAAAAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAABIAAAAUAAAAFgAAABgAAAAcAAAAIAAAACgAAAAwAAAAQAAAAIAAAAAAAQAAAAIAAAAEAAAACAAAABAAAAAgAAAAQAAAAIAAAAAAAQBBkBIL5gQBAAAAAQAAAAEAAAABAAAAAgAAAAIAAAADAAAAAwAAAAQAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAAEAAAAAEAAAAEAAAACAAAAAAAAAABAAEBBgAAAAAAAAQAAAAAEAAABAAAAAAgAAAFAQAAAAAAAAUDAAAAAAAABQQAAAAAAAAFBgAAAAAAAAUHAAAAAAAABQkAAAAAAAAFCgAAAAAAAAUMAAAAAAAABg4AAAAAAAEFEAAAAAAAAQUUAAAAAAABBRYAAAAAAAIFHAAAAAAAAwUgAAAAAAAEBTAAAAAgAAYFQAAAAAAABwWAAAAAAAAIBgABAAAAAAoGAAQAAAAADAYAEAAAIAAABAAAAAAAAAAEAQAAAAAAAAUCAAAAIAAABQQAAAAAAAAFBQAAACAAAAUHAAAAAAAABQgAAAAgAAAFCgAAAAAAAAULAAAAAAAABg0AAAAgAAEFEAAAAAAAAQUSAAAAIAABBRYAAAAAAAIFGAAAACAAAwUgAAAAAAADBSgAAAAAAAYEQAAAABAABgRAAAAAIAAHBYAAAAAAAAkGAAIAAAAACwYACAAAMAAABAAAAAAQAAAEAQAAACAAAAUCAAAAIAAABQMAAAAgAAAFBQAAACAAAAUGAAAAIAAABQgAAAAgAAAFCQAAACAAAAULAAAAIAAABQwAAAAAAAAGDwAAACAAAQUSAAAAIAABBRQAAAAgAAIFGAAAACAAAgUcAAAAIAADBSgAAAAgAAQFMAAAAAAAEAYAAAEAAAAPBgCAAAAAAA4GAEAAAAAADQYAIABBgBcLhwIBAAEBBQAAAAAAAAUAAAAAAAAGBD0AAAAAAAkF/QEAAAAADwX9fwAAAAAVBf3/HwAAAAMFBQAAAAAABwR9AAAAAAAMBf0PAAAAABIF/f8DAAAAFwX9/38AAAAFBR0AAAAAAAgE/QAAAAAADgX9PwAAAAAUBf3/DwAAAAIFAQAAABAABwR9AAAAAAALBf0HAAAAABEF/f8BAAAAFgX9/z8AAAAEBQ0AAAAQAAgE/QAAAAAADQX9HwAAAAATBf3/BwAAAAEFAQAAABAABgQ9AAAAAAAKBf0DAAAAABAF/f8AAAAAHAX9//8PAAAbBf3//wcAABoF/f//AwAAGQX9//8BAAAYBf3//wBBkBkLhgQBAAEBBgAAAAAAAAYDAAAAAAAABAQAAAAgAAAFBQAAAAAAAAUGAAAAAAAABQgAAAAAAAAFCQAAAAAAAAULAAAAAAAABg0AAAAAAAAGEAAAAAAAAAYTAAAAAAAABhYAAAAAAAAGGQAAAAAAAAYcAAAAAAAABh8AAAAAAAAGIgAAAAAAAQYlAAAAAAABBikAAAAAAAIGLwAAAAAAAwY7AAAAAAAEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ";
+ },
+ 4836: function (e) {
+ (e.exports = function (e) {
+ return e && e.__esModule ? e : { default: e };
+ }),
+ (e.exports.__esModule = !0),
+ (e.exports.default = e.exports);
+ },
+ 907: function (e, t, n) {
+ "use strict";
+ function r(e, t) {
+ (null == t || t > e.length) && (t = e.length);
+ for (var n = 0, r = new Array(t); n < t; n++) r[n] = e[n];
+ return r;
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 3878: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ if (Array.isArray(e)) return e;
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 7326: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ if (void 0 === e)
+ throw new ReferenceError(
+ "this hasn't been initialised - super() hasn't been called"
+ );
+ return e;
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 5861: function (e, t, n) {
+ "use strict";
+ function r(e, t, n, r, i, a, o) {
+ try {
+ var s = e[a](o),
+ l = s.value;
+ } catch (u) {
+ return void n(u);
+ }
+ s.done ? t(l) : Promise.resolve(l).then(r, i);
+ }
+ function i(e) {
+ return function () {
+ var t = this,
+ n = arguments;
+ return new Promise(function (i, a) {
+ var o = e.apply(t, n);
+ function s(e) {
+ r(o, i, a, s, l, "next", e);
+ }
+ function l(e) {
+ r(o, i, a, s, l, "throw", e);
+ }
+ s(void 0);
+ });
+ };
+ }
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ },
+ 5671: function (e, t, n) {
+ "use strict";
+ function r(e, t) {
+ if (!(e instanceof t))
+ throw new TypeError("Cannot call a class as a function");
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 5647: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(9611),
+ i = n(8814);
+ function a(e, t, n) {
+ return (
+ (a = (0, i.Z)()
+ ? Reflect.construct.bind()
+ : function (e, t, n) {
+ var i = [null];
+ i.push.apply(i, t);
+ var a = new (Function.bind.apply(e, i))();
+ return n && (0, r.Z)(a, n.prototype), a;
+ }),
+ a.apply(null, arguments)
+ );
+ }
+ },
+ 3144: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(9142);
+ function i(e, t) {
+ for (var n = 0; n < t.length; n++) {
+ var i = t[n];
+ (i.enumerable = i.enumerable || !1),
+ (i.configurable = !0),
+ "value" in i && (i.writable = !0),
+ Object.defineProperty(e, (0, r.Z)(i.key), i);
+ }
+ }
+ function a(e, t, n) {
+ return (
+ t && i(e.prototype, t),
+ n && i(e, n),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ e
+ );
+ }
+ },
+ 7762: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(181);
+ function i(e, t) {
+ var n =
+ ("undefined" !== typeof Symbol && e[Symbol.iterator]) ||
+ e["@@iterator"];
+ if (!n) {
+ if (
+ Array.isArray(e) ||
+ (n = (0, r.Z)(e)) ||
+ (t && e && "number" === typeof e.length)
+ ) {
+ n && (e = n);
+ var i = 0,
+ a = function () {};
+ return {
+ s: a,
+ n: function () {
+ return i >= e.length
+ ? { done: !0 }
+ : { done: !1, value: e[i++] };
+ },
+ e: function (e) {
+ throw e;
+ },
+ f: a,
+ };
+ }
+ throw new TypeError(
+ "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ }
+ var o,
+ s = !0,
+ l = !1;
+ return {
+ s: function () {
+ n = n.call(e);
+ },
+ n: function () {
+ var e = n.next();
+ return (s = e.done), e;
+ },
+ e: function (e) {
+ (l = !0), (o = e);
+ },
+ f: function () {
+ try {
+ s || null == n.return || n.return();
+ } finally {
+ if (l) throw o;
+ }
+ },
+ };
+ }
+ },
+ 9388: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return o;
+ },
+ });
+ var r = n(1120),
+ i = n(8814),
+ a = n(2963);
+ function o(e) {
+ var t = (0, i.Z)();
+ return function () {
+ var n,
+ i = (0, r.Z)(e);
+ if (t) {
+ var o = (0, r.Z)(this).constructor;
+ n = Reflect.construct(i, arguments, o);
+ } else n = i.apply(this, arguments);
+ return (0, a.Z)(this, n);
+ };
+ }
+ },
+ 4942: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(9142);
+ function i(e, t, n) {
+ return (
+ (t = (0, r.Z)(t)) in e
+ ? Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ })
+ : (e[t] = n),
+ e
+ );
+ }
+ },
+ 7462: function (e, t, n) {
+ "use strict";
+ function r() {
+ return (
+ (r = Object.assign
+ ? Object.assign.bind()
+ : function (e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = arguments[t];
+ for (var r in n)
+ Object.prototype.hasOwnProperty.call(n, r) &&
+ (e[r] = n[r]);
+ }
+ return e;
+ }),
+ r.apply(this, arguments)
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 1752: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(1120);
+ function i() {
+ return (
+ (i =
+ "undefined" !== typeof Reflect && Reflect.get
+ ? Reflect.get.bind()
+ : function (e, t, n) {
+ var i = (function (e, t) {
+ for (
+ ;
+ !Object.prototype.hasOwnProperty.call(e, t) &&
+ null !== (e = (0, r.Z)(e));
+
+ );
+ return e;
+ })(e, t);
+ if (i) {
+ var a = Object.getOwnPropertyDescriptor(i, t);
+ return a.get
+ ? a.get.call(arguments.length < 3 ? e : n)
+ : a.value;
+ }
+ }),
+ i.apply(this, arguments)
+ );
+ }
+ },
+ 1120: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (
+ (r = Object.setPrototypeOf
+ ? Object.getPrototypeOf.bind()
+ : function (e) {
+ return e.__proto__ || Object.getPrototypeOf(e);
+ }),
+ r(e)
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 136: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(9611);
+ function i(e, t) {
+ if ("function" !== typeof t && null !== t)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ (e.prototype = Object.create(t && t.prototype, {
+ constructor: { value: e, writable: !0, configurable: !0 },
+ })),
+ Object.defineProperty(e, "prototype", { writable: !1 }),
+ t && (0, r.Z)(e, t);
+ }
+ },
+ 8814: function (e, t, n) {
+ "use strict";
+ function r() {
+ if ("undefined" === typeof Reflect || !Reflect.construct) return !1;
+ if (Reflect.construct.sham) return !1;
+ if ("function" === typeof Proxy) return !0;
+ try {
+ return (
+ Boolean.prototype.valueOf.call(
+ Reflect.construct(Boolean, [], function () {})
+ ),
+ !0
+ );
+ } catch (e) {
+ return !1;
+ }
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 9199: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ if (
+ ("undefined" !== typeof Symbol && null != e[Symbol.iterator]) ||
+ null != e["@@iterator"]
+ )
+ return Array.from(e);
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 5267: function (e, t, n) {
+ "use strict";
+ function r() {
+ throw new TypeError(
+ "Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 1413: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(4942);
+ function i(e, t) {
+ var n = Object.keys(e);
+ if (Object.getOwnPropertySymbols) {
+ var r = Object.getOwnPropertySymbols(e);
+ t &&
+ (r = r.filter(function (t) {
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
+ })),
+ n.push.apply(n, r);
+ }
+ return n;
+ }
+ function a(e) {
+ for (var t = 1; t < arguments.length; t++) {
+ var n = null != arguments[t] ? arguments[t] : {};
+ t % 2
+ ? i(Object(n), !0).forEach(function (t) {
+ (0, r.Z)(e, t, n[t]);
+ })
+ : Object.getOwnPropertyDescriptors
+ ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n))
+ : i(Object(n)).forEach(function (t) {
+ Object.defineProperty(
+ e,
+ t,
+ Object.getOwnPropertyDescriptor(n, t)
+ );
+ });
+ }
+ return e;
+ }
+ },
+ 3366: function (e, t, n) {
+ "use strict";
+ function r(e, t) {
+ if (null == e) return {};
+ var n,
+ r,
+ i = {},
+ a = Object.keys(e);
+ for (r = 0; r < a.length; r++)
+ (n = a[r]), t.indexOf(n) >= 0 || (i[n] = e[n]);
+ return i;
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 2963: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return a;
+ },
+ });
+ var r = n(1002),
+ i = n(7326);
+ function a(e, t) {
+ if (t && ("object" === (0, r.Z)(t) || "function" === typeof t))
+ return t;
+ if (void 0 !== t)
+ throw new TypeError(
+ "Derived constructors may only return object or undefined"
+ );
+ return (0, i.Z)(e);
+ }
+ },
+ 4165: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(1002);
+ function i() {
+ i = function () {
+ return t;
+ };
+ var e,
+ t = {},
+ n = Object.prototype,
+ a = n.hasOwnProperty,
+ o =
+ Object.defineProperty ||
+ function (e, t, n) {
+ e[t] = n.value;
+ },
+ s = "function" == typeof Symbol ? Symbol : {},
+ l = s.iterator || "@@iterator",
+ u = s.asyncIterator || "@@asyncIterator",
+ c = s.toStringTag || "@@toStringTag";
+ function f(e, t, n) {
+ return (
+ Object.defineProperty(e, t, {
+ value: n,
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ }),
+ e[t]
+ );
+ }
+ try {
+ f({}, "");
+ } catch (e) {
+ f = function (e, t, n) {
+ return (e[t] = n);
+ };
+ }
+ function d(e, t, n, r) {
+ var i = t && t.prototype instanceof y ? t : y,
+ a = Object.create(i.prototype),
+ s = new B(r || []);
+ return o(a, "_invoke", { value: M(e, n, s) }), a;
+ }
+ function h(e, t, n) {
+ try {
+ return { type: "normal", arg: e.call(t, n) };
+ } catch (e) {
+ return { type: "throw", arg: e };
+ }
+ }
+ t.wrap = d;
+ var p = "suspendedStart",
+ v = "suspendedYield",
+ m = "executing",
+ g = "completed",
+ A = {};
+ function y() {}
+ function b() {}
+ function x() {}
+ var S = {};
+ f(S, l, function () {
+ return this;
+ });
+ var E = Object.getPrototypeOf,
+ _ = E && E(E(P([])));
+ _ && _ !== n && a.call(_, l) && (S = _);
+ var C = (x.prototype = y.prototype = Object.create(S));
+ function w(e) {
+ ["next", "throw", "return"].forEach(function (t) {
+ f(e, t, function (e) {
+ return this._invoke(t, e);
+ });
+ });
+ }
+ function T(e, t) {
+ function n(i, o, s, l) {
+ var u = h(e[i], e, o);
+ if ("throw" !== u.type) {
+ var c = u.arg,
+ f = c.value;
+ return f && "object" == (0, r.Z)(f) && a.call(f, "__await")
+ ? t.resolve(f.__await).then(
+ function (e) {
+ n("next", e, s, l);
+ },
+ function (e) {
+ n("throw", e, s, l);
+ }
+ )
+ : t.resolve(f).then(
+ function (e) {
+ (c.value = e), s(c);
+ },
+ function (e) {
+ return n("throw", e, s, l);
+ }
+ );
+ }
+ l(u.arg);
+ }
+ var i;
+ o(this, "_invoke", {
+ value: function (e, r) {
+ function a() {
+ return new t(function (t, i) {
+ n(e, r, t, i);
+ });
+ }
+ return (i = i ? i.then(a, a) : a());
+ },
+ });
+ }
+ function M(t, n, r) {
+ var i = p;
+ return function (a, o) {
+ if (i === m) throw new Error("Generator is already running");
+ if (i === g) {
+ if ("throw" === a) throw o;
+ return { value: e, done: !0 };
+ }
+ for (r.method = a, r.arg = o; ; ) {
+ var s = r.delegate;
+ if (s) {
+ var l = I(s, r);
+ if (l) {
+ if (l === A) continue;
+ return l;
+ }
+ }
+ if ("next" === r.method) r.sent = r._sent = r.arg;
+ else if ("throw" === r.method) {
+ if (i === p) throw ((i = g), r.arg);
+ r.dispatchException(r.arg);
+ } else "return" === r.method && r.abrupt("return", r.arg);
+ i = m;
+ var u = h(t, n, r);
+ if ("normal" === u.type) {
+ if (((i = r.done ? g : v), u.arg === A)) continue;
+ return { value: u.arg, done: r.done };
+ }
+ "throw" === u.type &&
+ ((i = g), (r.method = "throw"), (r.arg = u.arg));
+ }
+ };
+ }
+ function I(t, n) {
+ var r = n.method,
+ i = t.iterator[r];
+ if (i === e)
+ return (
+ (n.delegate = null),
+ ("throw" === r &&
+ t.iterator.return &&
+ ((n.method = "return"),
+ (n.arg = e),
+ I(t, n),
+ "throw" === n.method)) ||
+ ("return" !== r &&
+ ((n.method = "throw"),
+ (n.arg = new TypeError(
+ "The iterator does not provide a '" + r + "' method"
+ )))),
+ A
+ );
+ var a = h(i, t.iterator, n.arg);
+ if ("throw" === a.type)
+ return (
+ (n.method = "throw"), (n.arg = a.arg), (n.delegate = null), A
+ );
+ var o = a.arg;
+ return o
+ ? o.done
+ ? ((n[t.resultName] = o.value),
+ (n.next = t.nextLoc),
+ "return" !== n.method && ((n.method = "next"), (n.arg = e)),
+ (n.delegate = null),
+ A)
+ : o
+ : ((n.method = "throw"),
+ (n.arg = new TypeError("iterator result is not an object")),
+ (n.delegate = null),
+ A);
+ }
+ function k(e) {
+ var t = { tryLoc: e[0] };
+ 1 in e && (t.catchLoc = e[1]),
+ 2 in e && ((t.finallyLoc = e[2]), (t.afterLoc = e[3])),
+ this.tryEntries.push(t);
+ }
+ function R(e) {
+ var t = e.completion || {};
+ (t.type = "normal"), delete t.arg, (e.completion = t);
+ }
+ function B(e) {
+ (this.tryEntries = [{ tryLoc: "root" }]),
+ e.forEach(k, this),
+ this.reset(!0);
+ }
+ function P(t) {
+ if (t || "" === t) {
+ var n = t[l];
+ if (n) return n.call(t);
+ if ("function" == typeof t.next) return t;
+ if (!isNaN(t.length)) {
+ var i = -1,
+ o = function n() {
+ for (; ++i < t.length; )
+ if (a.call(t, i))
+ return (n.value = t[i]), (n.done = !1), n;
+ return (n.value = e), (n.done = !0), n;
+ };
+ return (o.next = o);
+ }
+ }
+ throw new TypeError((0, r.Z)(t) + " is not iterable");
+ }
+ return (
+ (b.prototype = x),
+ o(C, "constructor", { value: x, configurable: !0 }),
+ o(x, "constructor", { value: b, configurable: !0 }),
+ (b.displayName = f(x, c, "GeneratorFunction")),
+ (t.isGeneratorFunction = function (e) {
+ var t = "function" == typeof e && e.constructor;
+ return (
+ !!t &&
+ (t === b || "GeneratorFunction" === (t.displayName || t.name))
+ );
+ }),
+ (t.mark = function (e) {
+ return (
+ Object.setPrototypeOf
+ ? Object.setPrototypeOf(e, x)
+ : ((e.__proto__ = x), f(e, c, "GeneratorFunction")),
+ (e.prototype = Object.create(C)),
+ e
+ );
+ }),
+ (t.awrap = function (e) {
+ return { __await: e };
+ }),
+ w(T.prototype),
+ f(T.prototype, u, function () {
+ return this;
+ }),
+ (t.AsyncIterator = T),
+ (t.async = function (e, n, r, i, a) {
+ void 0 === a && (a = Promise);
+ var o = new T(d(e, n, r, i), a);
+ return t.isGeneratorFunction(n)
+ ? o
+ : o.next().then(function (e) {
+ return e.done ? e.value : o.next();
+ });
+ }),
+ w(C),
+ f(C, c, "Generator"),
+ f(C, l, function () {
+ return this;
+ }),
+ f(C, "toString", function () {
+ return "[object Generator]";
+ }),
+ (t.keys = function (e) {
+ var t = Object(e),
+ n = [];
+ for (var r in t) n.push(r);
+ return (
+ n.reverse(),
+ function e() {
+ for (; n.length; ) {
+ var r = n.pop();
+ if (r in t) return (e.value = r), (e.done = !1), e;
+ }
+ return (e.done = !0), e;
+ }
+ );
+ }),
+ (t.values = P),
+ (B.prototype = {
+ constructor: B,
+ reset: function (t) {
+ if (
+ ((this.prev = 0),
+ (this.next = 0),
+ (this.sent = this._sent = e),
+ (this.done = !1),
+ (this.delegate = null),
+ (this.method = "next"),
+ (this.arg = e),
+ this.tryEntries.forEach(R),
+ !t)
+ )
+ for (var n in this)
+ "t" === n.charAt(0) &&
+ a.call(this, n) &&
+ !isNaN(+n.slice(1)) &&
+ (this[n] = e);
+ },
+ stop: function () {
+ this.done = !0;
+ var e = this.tryEntries[0].completion;
+ if ("throw" === e.type) throw e.arg;
+ return this.rval;
+ },
+ dispatchException: function (t) {
+ if (this.done) throw t;
+ var n = this;
+ function r(r, i) {
+ return (
+ (s.type = "throw"),
+ (s.arg = t),
+ (n.next = r),
+ i && ((n.method = "next"), (n.arg = e)),
+ !!i
+ );
+ }
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var o = this.tryEntries[i],
+ s = o.completion;
+ if ("root" === o.tryLoc) return r("end");
+ if (o.tryLoc <= this.prev) {
+ var l = a.call(o, "catchLoc"),
+ u = a.call(o, "finallyLoc");
+ if (l && u) {
+ if (this.prev < o.catchLoc) return r(o.catchLoc, !0);
+ if (this.prev < o.finallyLoc) return r(o.finallyLoc);
+ } else if (l) {
+ if (this.prev < o.catchLoc) return r(o.catchLoc, !0);
+ } else {
+ if (!u)
+ throw new Error(
+ "try statement without catch or finally"
+ );
+ if (this.prev < o.finallyLoc) return r(o.finallyLoc);
+ }
+ }
+ }
+ },
+ abrupt: function (e, t) {
+ for (var n = this.tryEntries.length - 1; n >= 0; --n) {
+ var r = this.tryEntries[n];
+ if (
+ r.tryLoc <= this.prev &&
+ a.call(r, "finallyLoc") &&
+ this.prev < r.finallyLoc
+ ) {
+ var i = r;
+ break;
+ }
+ }
+ i &&
+ ("break" === e || "continue" === e) &&
+ i.tryLoc <= t &&
+ t <= i.finallyLoc &&
+ (i = null);
+ var o = i ? i.completion : {};
+ return (
+ (o.type = e),
+ (o.arg = t),
+ i
+ ? ((this.method = "next"), (this.next = i.finallyLoc), A)
+ : this.complete(o)
+ );
+ },
+ complete: function (e, t) {
+ if ("throw" === e.type) throw e.arg;
+ return (
+ "break" === e.type || "continue" === e.type
+ ? (this.next = e.arg)
+ : "return" === e.type
+ ? ((this.rval = this.arg = e.arg),
+ (this.method = "return"),
+ (this.next = "end"))
+ : "normal" === e.type && t && (this.next = t),
+ A
+ );
+ },
+ finish: function (e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.finallyLoc === e)
+ return this.complete(n.completion, n.afterLoc), R(n), A;
+ }
+ },
+ catch: function (e) {
+ for (var t = this.tryEntries.length - 1; t >= 0; --t) {
+ var n = this.tryEntries[t];
+ if (n.tryLoc === e) {
+ var r = n.completion;
+ if ("throw" === r.type) {
+ var i = r.arg;
+ R(n);
+ }
+ return i;
+ }
+ }
+ throw new Error("illegal catch attempt");
+ },
+ delegateYield: function (t, n, r) {
+ return (
+ (this.delegate = {
+ iterator: P(t),
+ resultName: n,
+ nextLoc: r,
+ }),
+ "next" === this.method && (this.arg = e),
+ A
+ );
+ },
+ }),
+ t
+ );
+ }
+ },
+ 9611: function (e, t, n) {
+ "use strict";
+ function r(e, t) {
+ return (
+ (r = Object.setPrototypeOf
+ ? Object.setPrototypeOf.bind()
+ : function (e, t) {
+ return (e.__proto__ = t), e;
+ }),
+ r(e, t)
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 9439: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return o;
+ },
+ });
+ var r = n(3878);
+ var i = n(181),
+ a = n(5267);
+ function o(e, t) {
+ return (
+ (0, r.Z)(e) ||
+ (function (e, t) {
+ var n =
+ null == e
+ ? null
+ : ("undefined" != typeof Symbol && e[Symbol.iterator]) ||
+ e["@@iterator"];
+ if (null != n) {
+ var r,
+ i,
+ a,
+ o,
+ s = [],
+ l = !0,
+ u = !1;
+ try {
+ if (((a = (n = n.call(e)).next), 0 === t)) {
+ if (Object(n) !== n) return;
+ l = !1;
+ } else
+ for (
+ ;
+ !(l = (r = a.call(n)).done) &&
+ (s.push(r.value), s.length !== t);
+ l = !0
+ );
+ } catch (e) {
+ (u = !0), (i = e);
+ } finally {
+ try {
+ if (
+ !l &&
+ null != n.return &&
+ ((o = n.return()), Object(o) !== o)
+ )
+ return;
+ } finally {
+ if (u) throw i;
+ }
+ }
+ return s;
+ }
+ })(e, t) ||
+ (0, i.Z)(e, t) ||
+ (0, a.Z)()
+ );
+ }
+ },
+ 3433: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return o;
+ },
+ });
+ var r = n(907);
+ var i = n(9199),
+ a = n(181);
+ function o(e) {
+ return (
+ (function (e) {
+ if (Array.isArray(e)) return (0, r.Z)(e);
+ })(e) ||
+ (0, i.Z)(e) ||
+ (0, a.Z)(e) ||
+ (function () {
+ throw new TypeError(
+ "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."
+ );
+ })()
+ );
+ }
+ },
+ 9142: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(1002);
+ function i(e) {
+ var t = (function (e, t) {
+ if ("object" !== (0, r.Z)(e) || null === e) return e;
+ var n = e[Symbol.toPrimitive];
+ if (void 0 !== n) {
+ var i = n.call(e, t || "default");
+ if ("object" !== (0, r.Z)(i)) return i;
+ throw new TypeError(
+ "@@toPrimitive must return a primitive value."
+ );
+ }
+ return ("string" === t ? String : Number)(e);
+ })(e, "string");
+ return "symbol" === (0, r.Z)(t) ? t : String(t);
+ }
+ },
+ 1002: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ return (
+ (r =
+ "function" == typeof Symbol && "symbol" == typeof Symbol.iterator
+ ? function (e) {
+ return typeof e;
+ }
+ : function (e) {
+ return e &&
+ "function" == typeof Symbol &&
+ e.constructor === Symbol &&
+ e !== Symbol.prototype
+ ? "symbol"
+ : typeof e;
+ }),
+ r(e)
+ );
+ }
+ n.d(t, {
+ Z: function () {
+ return r;
+ },
+ });
+ },
+ 181: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return i;
+ },
+ });
+ var r = n(907);
+ function i(e, t) {
+ if (e) {
+ if ("string" === typeof e) return (0, r.Z)(e, t);
+ var n = Object.prototype.toString.call(e).slice(8, -1);
+ return (
+ "Object" === n && e.constructor && (n = e.constructor.name),
+ "Map" === n || "Set" === n
+ ? Array.from(e)
+ : "Arguments" === n ||
+ /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)
+ ? (0, r.Z)(e, t)
+ : void 0
+ );
+ }
+ }
+ },
+ 8664: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ Z: function () {
+ return o;
+ },
+ });
+ var r = n(1120),
+ i = n(9611);
+ var a = n(5647);
+ function o(e) {
+ var t = "function" === typeof Map ? new Map() : void 0;
+ return (
+ (o = function (e) {
+ if (
+ null === e ||
+ ((n = e),
+ -1 === Function.toString.call(n).indexOf("[native code]"))
+ )
+ return e;
+ var n;
+ if ("function" !== typeof e)
+ throw new TypeError(
+ "Super expression must either be null or a function"
+ );
+ if ("undefined" !== typeof t) {
+ if (t.has(e)) return t.get(e);
+ t.set(e, o);
+ }
+ function o() {
+ return (0, a.Z)(e, arguments, (0, r.Z)(this).constructor);
+ }
+ return (
+ (o.prototype = Object.create(e.prototype, {
+ constructor: {
+ value: o,
+ enumerable: !1,
+ writable: !0,
+ configurable: !0,
+ },
+ })),
+ (0, i.Z)(o, e)
+ );
+ }),
+ o(e)
+ );
+ }
+ },
+ 3733: function (e, t, n) {
+ "use strict";
+ function r(e) {
+ var t,
+ n,
+ i = "";
+ if ("string" == typeof e || "number" == typeof e) i += e;
+ else if ("object" == typeof e)
+ if (Array.isArray(e))
+ for (t = 0; t < e.length; t++)
+ e[t] && (n = r(e[t])) && (i && (i += " "), (i += n));
+ else for (t in e) e[t] && (i && (i += " "), (i += t));
+ return i;
+ }
+ t.Z = function () {
+ for (var e, t, n = 0, i = ""; n < arguments.length; )
+ (e = arguments[n++]) && (t = r(e)) && (i && (i += " "), (i += t));
+ return i;
+ };
+ },
+ 2187: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ FVZ: function () {
+ return l;
+ },
+ IJq: function () {
+ return p;
+ },
+ IgZ: function () {
+ return y;
+ },
+ LR2: function () {
+ return A;
+ },
+ MCP: function () {
+ return v;
+ },
+ Oi: function () {
+ return a;
+ },
+ OmG: function () {
+ return m;
+ },
+ bWS: function () {
+ return x;
+ },
+ c6w: function () {
+ return o;
+ },
+ e1Y: function () {
+ return d;
+ },
+ eQx: function () {
+ return b;
+ },
+ gJS: function () {
+ return h;
+ },
+ ij3: function () {
+ return T;
+ },
+ kXg: function () {
+ return c;
+ },
+ qHj: function () {
+ return s;
+ },
+ qfi: function () {
+ return S;
+ },
+ tLr: function () {
+ return f;
+ },
+ wOb: function () {
+ return g;
+ },
+ });
+ var r = n(3144),
+ i = n(5671),
+ a = 0,
+ o = 2,
+ s = 1,
+ l = 2,
+ u = 64,
+ c = 0,
+ f = 9,
+ d = 15,
+ h = 16,
+ p = 22,
+ v = 37,
+ m = 43,
+ g = 76,
+ A = 83,
+ y = 97,
+ b = 100,
+ x = 103,
+ S = 109,
+ E = (0, r.Z)(function e() {
+ (0, i.Z)(this, e),
+ (this.vkFormat = c),
+ (this.typeSize = 1),
+ (this.pixelWidth = 0),
+ (this.pixelHeight = 0),
+ (this.pixelDepth = 0),
+ (this.layerCount = 0),
+ (this.faceCount = 1),
+ (this.supercompressionScheme = a),
+ (this.levels = []),
+ (this.dataFormatDescriptor = [
+ {
+ vendorId: 0,
+ descriptorType: 0,
+ descriptorBlockSize: 0,
+ versionNumber: 2,
+ colorModel: 0,
+ colorPrimaries: 1,
+ transferFunction: l,
+ flags: 0,
+ texelBlockDimension: [0, 0, 0, 0],
+ bytesPlane: [0, 0, 0, 0, 0, 0, 0, 0],
+ samples: [],
+ },
+ ]),
+ (this.keyValue = {}),
+ (this.globalData = null);
+ }),
+ _ = (function () {
+ function e(t, n, r, a) {
+ (0, i.Z)(this, e),
+ (this._dataView = void 0),
+ (this._littleEndian = void 0),
+ (this._offset = void 0),
+ (this._dataView = new DataView(t.buffer, t.byteOffset + n, r)),
+ (this._littleEndian = a),
+ (this._offset = 0);
+ }
+ return (
+ (0, r.Z)(e, [
+ {
+ key: "_nextUint8",
+ value: function () {
+ var e = this._dataView.getUint8(this._offset);
+ return (this._offset += 1), e;
+ },
+ },
+ {
+ key: "_nextUint16",
+ value: function () {
+ var e = this._dataView.getUint16(
+ this._offset,
+ this._littleEndian
+ );
+ return (this._offset += 2), e;
+ },
+ },
+ {
+ key: "_nextUint32",
+ value: function () {
+ var e = this._dataView.getUint32(
+ this._offset,
+ this._littleEndian
+ );
+ return (this._offset += 4), e;
+ },
+ },
+ {
+ key: "_nextUint64",
+ value: function () {
+ var e = this._dataView.getUint32(
+ this._offset,
+ this._littleEndian
+ ),
+ t = this._dataView.getUint32(
+ this._offset + 4,
+ this._littleEndian
+ ),
+ n = e + Math.pow(2, 32) * t;
+ return (this._offset += 8), n;
+ },
+ },
+ {
+ key: "_nextInt32",
+ value: function () {
+ var e = this._dataView.getInt32(
+ this._offset,
+ this._littleEndian
+ );
+ return (this._offset += 4), e;
+ },
+ },
+ {
+ key: "_skip",
+ value: function (e) {
+ return (this._offset += e), this;
+ },
+ },
+ {
+ key: "_scan",
+ value: function (e) {
+ for (
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = this._offset,
+ r = 0;
+ this._dataView.getUint8(this._offset) !== t && r < e;
+
+ )
+ r++, this._offset++;
+ return (
+ r < e && this._offset++,
+ new Uint8Array(
+ this._dataView.buffer,
+ this._dataView.byteOffset + n,
+ r
+ )
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ C =
+ ("KTX-Parse v".concat("0.4.5"),
+ new Uint8Array([0]),
+ [171, 75, 84, 88, 32, 50, 48, 187, 13, 10, 26, 10]);
+ function w(e) {
+ return "undefined" !== typeof TextDecoder
+ ? new TextDecoder().decode(e)
+ : Buffer.from(e).toString("utf8");
+ }
+ function T(e) {
+ var t = new Uint8Array(e.buffer, e.byteOffset, C.length);
+ if (
+ t[0] !== C[0] ||
+ t[1] !== C[1] ||
+ t[2] !== C[2] ||
+ t[3] !== C[3] ||
+ t[4] !== C[4] ||
+ t[5] !== C[5] ||
+ t[6] !== C[6] ||
+ t[7] !== C[7] ||
+ t[8] !== C[8] ||
+ t[9] !== C[9] ||
+ t[10] !== C[10] ||
+ t[11] !== C[11]
+ )
+ throw new Error("Missing KTX 2.0 identifier.");
+ var n = new E(),
+ r = 17 * Uint32Array.BYTES_PER_ELEMENT,
+ i = new _(e, C.length, r, !0);
+ (n.vkFormat = i._nextUint32()),
+ (n.typeSize = i._nextUint32()),
+ (n.pixelWidth = i._nextUint32()),
+ (n.pixelHeight = i._nextUint32()),
+ (n.pixelDepth = i._nextUint32()),
+ (n.layerCount = i._nextUint32()),
+ (n.faceCount = i._nextUint32());
+ var a = i._nextUint32();
+ n.supercompressionScheme = i._nextUint32();
+ for (
+ var o = i._nextUint32(),
+ s = i._nextUint32(),
+ l = i._nextUint32(),
+ c = i._nextUint32(),
+ f = i._nextUint64(),
+ d = i._nextUint64(),
+ h = 3 * a * 8,
+ p = new _(e, C.length + r, h, !0),
+ v = 0;
+ v < a;
+ v++
+ )
+ n.levels.push({
+ levelData: new Uint8Array(
+ e.buffer,
+ e.byteOffset + p._nextUint64(),
+ p._nextUint64()
+ ),
+ uncompressedByteLength: p._nextUint64(),
+ });
+ for (
+ var m = new _(e, o, s, !0),
+ g = {
+ vendorId: m._skip(4)._nextUint16(),
+ descriptorType: m._nextUint16(),
+ versionNumber: m._nextUint16(),
+ descriptorBlockSize: m._nextUint16(),
+ colorModel: m._nextUint8(),
+ colorPrimaries: m._nextUint8(),
+ transferFunction: m._nextUint8(),
+ flags: m._nextUint8(),
+ texelBlockDimension: [
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ ],
+ bytesPlane: [
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ ],
+ samples: [],
+ },
+ A = (g.descriptorBlockSize / 4 - 6) / 4,
+ y = 0;
+ y < A;
+ y++
+ ) {
+ var b = {
+ bitOffset: m._nextUint16(),
+ bitLength: m._nextUint8(),
+ channelType: m._nextUint8(),
+ samplePosition: [
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ m._nextUint8(),
+ ],
+ sampleLower: -1 / 0,
+ sampleUpper: 1 / 0,
+ };
+ b.channelType & u
+ ? ((b.sampleLower = m._nextInt32()),
+ (b.sampleUpper = m._nextInt32()))
+ : ((b.sampleLower = m._nextUint32()),
+ (b.sampleUpper = m._nextUint32())),
+ (g.samples[y] = b);
+ }
+ (n.dataFormatDescriptor.length = 0), n.dataFormatDescriptor.push(g);
+ for (var x = new _(e, l, c, !0); x._offset < c; ) {
+ var S = x._nextUint32(),
+ T = x._scan(S),
+ M = w(T),
+ I = x._scan(S - T.byteLength);
+ (n.keyValue[M] = M.match(/^ktx/i) ? w(I) : I),
+ x._offset % 4 && x._skip(4 - (x._offset % 4));
+ }
+ if (d <= 0) return n;
+ for (
+ var k = new _(e, f, d, !0),
+ R = k._nextUint16(),
+ B = k._nextUint16(),
+ P = k._nextUint32(),
+ L = k._nextUint32(),
+ D = k._nextUint32(),
+ U = k._nextUint32(),
+ F = [],
+ O = 0;
+ O < a;
+ O++
+ )
+ F.push({
+ imageFlags: k._nextUint32(),
+ rgbSliceByteOffset: k._nextUint32(),
+ rgbSliceByteLength: k._nextUint32(),
+ alphaSliceByteOffset: k._nextUint32(),
+ alphaSliceByteLength: k._nextUint32(),
+ });
+ var N = f + k._offset,
+ G = N + P,
+ Z = G + L,
+ z = Z + D,
+ Q = new Uint8Array(e.buffer, e.byteOffset + N, P),
+ H = new Uint8Array(e.buffer, e.byteOffset + G, L),
+ V = new Uint8Array(e.buffer, e.byteOffset + Z, D),
+ j = new Uint8Array(e.buffer, e.byteOffset + z, U);
+ return (
+ (n.globalData = {
+ endpointCount: R,
+ selectorCount: B,
+ imageDescs: F,
+ endpointsData: Q,
+ selectorsData: H,
+ tablesData: V,
+ extendedData: j,
+ }),
+ n
+ );
+ }
+ },
+ 3037: function (e, t, n) {
+ "use strict";
+ n.d(t, {
+ L1_: function () {
+ return Xp;
+ },
+ YRm: function () {
+ return Yp;
+ },
+ wUb: function () {
+ return yv;
+ },
+ w_R: function () {
+ return bv;
+ },
+ zOz: function () {
+ return Wp;
+ },
+ zxs: function () {
+ return ga;
+ },
+ });
+ var r = n(3433),
+ i = n(8664),
+ a = n(9439),
+ o = n(2963),
+ s = n(1413),
+ l = n(4942),
+ u = n(4165),
+ c = n(5861),
+ f = n(7326),
+ d = n(1752),
+ h = n(1120),
+ p = n(5671),
+ v = n(3144),
+ m = n(136),
+ g = n(9388),
+ A = n(7760),
+ y = n(7235),
+ b = n(2187),
+ x = n(7864),
+ S,
+ E,
+ _,
+ C = null,
+ w = Object.defineProperty,
+ T = function (e, t, n) {
+ return t in e
+ ? w(e, t, {
+ enumerable: !0,
+ configurable: !0,
+ writable: !0,
+ value: n,
+ })
+ : (e[t] = n);
+ },
+ M = function (e, t, n) {
+ return T(e, "symbol" !== typeof t ? t + "" : t, n), n;
+ },
+ I = null,
+ k = null,
+ R = null,
+ B = null,
+ P = 0,
+ L = 1,
+ D = new A.Vector3(),
+ U = new A.Line3(),
+ F = new A.Plane(),
+ O = new A.Vector3(),
+ N = new A.Triangle(),
+ G = null,
+ Z = null,
+ z = null,
+ Q = null,
+ H = null,
+ V = null,
+ j = new A.Vector3(),
+ W = null,
+ X = null,
+ Y = new A.Vector3(),
+ q = new A.Quaternion(),
+ J = new A.Vector3(),
+ K = new A.Vector3(),
+ $ = new A.Quaternion(),
+ ee = new A.Vector3(),
+ te = null,
+ ne = null,
+ re = null,
+ ie = null,
+ ae = null,
+ oe = null,
+ se = null,
+ le = null,
+ ue,
+ ce;
+ function fe() {
+ !1 === document.hidden && this.reset();
+ }
+ function de() {
+ var e;
+ if (void 0 !== ue) return ue;
+ try {
+ var t,
+ n = document.createElement("canvas");
+ return (
+ (ue = !(
+ !window.WebGLRenderingContext || !(t = n.getContext("webgl"))
+ )),
+ t &&
+ (null == (e = t.getExtension("WEBGL_lose_context")) ||
+ e.loseContext()),
+ ue
+ );
+ } catch (r) {
+ return (ue = !1);
+ }
+ }
+ function he() {
+ var e;
+ if (void 0 !== ce) return ce;
+ try {
+ var t,
+ n = document.createElement("canvas");
+ return (
+ (ce = !(
+ !window.WebGL2RenderingContext || !(t = n.getContext("webgl2"))
+ )),
+ t &&
+ (null == (e = t.getExtension("WEBGL_lose_context")) ||
+ e.loseContext()),
+ ce
+ );
+ } catch (r) {
+ return (ce = !1);
+ }
+ }
+ function pe() {
+ return me(1);
+ }
+ function ve() {
+ return me(2);
+ }
+ function me(e) {
+ var t = {
+ 1: window.WebGLRenderingContext,
+ 2: window.WebGL2RenderingContext,
+ },
+ n = document.createElement("div");
+ (n.id = "webglmessage"),
+ (n.style.fontFamily = "monospace"),
+ (n.style.fontSize = "13px"),
+ (n.style.fontWeight = "normal"),
+ (n.style.textAlign = "center"),
+ (n.style.background = "#fff"),
+ (n.style.color = "#000"),
+ (n.style.padding = "1.5em"),
+ (n.style.width = "400px"),
+ (n.style.margin = "5em auto 0");
+ var r =
+ 'Your $0 does not seem to support $1';
+ return (
+ (r = (r = t[e]
+ ? r.replace("$0", "graphics card")
+ : r.replace("$0", "browser")).replace(
+ "$1",
+ { 1: "WebGL", 2: "WebGL 2" }[e]
+ )),
+ (n.innerHTML = r),
+ n
+ );
+ }
+ var ge = null,
+ Ae = null;
+ function ye() {
+ var e = 3e6,
+ t = new BufferAttribute(new Float32Array(e), 3);
+ t.usage = DynamicDrawUsage;
+ var n = new BufferAttribute(new Float32Array(e), 3);
+ n.usage = DynamicDrawUsage;
+ var r = new BufferAttribute(new Float32Array(e), 3);
+ r.usage = DynamicDrawUsage;
+ var i = new BufferGeometry();
+ i.setAttribute("position", t),
+ i.setAttribute("normal", n),
+ i.setAttribute("color", r),
+ (i.drawRange.count = 0);
+ var a = new MeshStandardMaterial({ vertexColors: !0 }),
+ o = new Mesh(i, a);
+ o.frustumCulled = !1;
+ var s = new Vector3(),
+ l = new Vector3(),
+ u = new Vector3(),
+ c = new Vector3(),
+ f = new Color(16777215),
+ d = 1;
+ function h(e, a, o, h) {
+ if (0 !== e.distanceToSquared(a)) {
+ for (
+ var p = i.drawRange.count,
+ v = (function (e) {
+ for (
+ var t = 2 * Math.PI, n = [], r = 0.01 * e, i = 0;
+ i < 10;
+ i++
+ ) {
+ var a = (i / 10) * t;
+ n.push(new Vector3(Math.sin(a) * r, Math.cos(a) * r, 0));
+ }
+ return n;
+ })(d),
+ m = 0,
+ g = v.length;
+ m < g;
+ m++
+ ) {
+ var A = v[m],
+ y = v[(m + 1) % g];
+ s.copy(A).applyMatrix4(h).add(a),
+ l.copy(y).applyMatrix4(h).add(a),
+ u.copy(y).applyMatrix4(o).add(e),
+ c.copy(A).applyMatrix4(o).add(e),
+ s.toArray(t.array, 3 * (p + 0)),
+ l.toArray(t.array, 3 * (p + 1)),
+ c.toArray(t.array, 3 * (p + 2)),
+ l.toArray(t.array, 3 * (p + 3)),
+ u.toArray(t.array, 3 * (p + 4)),
+ c.toArray(t.array, 3 * (p + 5)),
+ s.copy(A).applyMatrix4(h).normalize(),
+ l.copy(y).applyMatrix4(h).normalize(),
+ u.copy(y).applyMatrix4(o).normalize(),
+ c.copy(A).applyMatrix4(o).normalize(),
+ s.toArray(n.array, 3 * (p + 0)),
+ l.toArray(n.array, 3 * (p + 1)),
+ c.toArray(n.array, 3 * (p + 2)),
+ l.toArray(n.array, 3 * (p + 3)),
+ u.toArray(n.array, 3 * (p + 4)),
+ c.toArray(n.array, 3 * (p + 5)),
+ f.toArray(r.array, 3 * (p + 0)),
+ f.toArray(r.array, 3 * (p + 1)),
+ f.toArray(r.array, 3 * (p + 2)),
+ f.toArray(r.array, 3 * (p + 3)),
+ f.toArray(r.array, 3 * (p + 4)),
+ f.toArray(r.array, 3 * (p + 5)),
+ (p += 6);
+ }
+ i.drawRange.count = p;
+ }
+ }
+ var p = new Vector3(0, 1, 0),
+ v = new Vector3(),
+ m = new Vector3(),
+ g = new Matrix4(),
+ A = new Matrix4();
+ var y = 0;
+ return {
+ mesh: o,
+ moveTo: function (e) {
+ v.copy(e), g.lookAt(m, v, p), m.copy(e), A.copy(g);
+ },
+ lineTo: function (e) {
+ v.copy(e), g.lookAt(m, v, p), h(v, m, g, A), m.copy(v), A.copy(g);
+ },
+ setSize: function (e) {
+ d = e;
+ },
+ update: function () {
+ var e = y,
+ a = i.drawRange.count;
+ e !== a &&
+ ((t.updateRange.offset = 3 * e),
+ (t.updateRange.count = 3 * (a - e)),
+ (t.needsUpdate = !0),
+ (n.updateRange.offset = 3 * e),
+ (n.updateRange.count = 3 * (a - e)),
+ (n.needsUpdate = !0),
+ (r.updateRange.offset = 3 * e),
+ (r.updateRange.count = 3 * (a - e)),
+ (r.needsUpdate = !0),
+ (y = i.drawRange.count));
+ },
+ };
+ }
+ var be = null,
+ xe = null,
+ Se = null,
+ Ee = new A.Vector3(),
+ _e = new A.Matrix4(),
+ Ce = new A.Matrix4(),
+ we = new A.Vector3(),
+ Te = new A.Vector3(),
+ Me = null,
+ Ie = new A.Vector3(),
+ ke = new A.Quaternion(),
+ Re = new A.Vector3(),
+ Be = null,
+ Pe = null,
+ Le = new A.Matrix4(),
+ De = new A.Matrix4(),
+ Ue = null,
+ Fe = null,
+ Oe = null,
+ Ne = null,
+ Ge = null,
+ Ze = null,
+ ze = null,
+ Qe = null,
+ He = null,
+ Ve = null,
+ je = 4,
+ We = 1024,
+ Xe = 4,
+ Ye = function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ t = new Float32Array(We * Xe * e * je),
+ n = new DataTexture(t, We, Xe * e, RGBAFormat, FloatType);
+ return (
+ (n.wrapS = RepeatWrapping),
+ (n.wrapT = RepeatWrapping),
+ (n.magFilter = NearestFilter),
+ (n.needsUpdate = !0),
+ n
+ );
+ },
+ qe = function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0,
+ r = Math.floor(We * (Xe / 4));
+ (t.arcLengthDivisions = r / 2), t.updateArcLengths();
+ for (
+ var i = t.getSpacedPoints(r),
+ a = t.computeFrenetFrames(r, !0),
+ o = 0;
+ o < r;
+ o++
+ ) {
+ var s = Math.floor(o / We),
+ l = o % We,
+ u = i[o];
+ Je(e, l, u.x, u.y, u.z, 0 + s + Xe * n),
+ (u = a.tangents[o]),
+ Je(e, l, u.x, u.y, u.z, 1 + s + Xe * n),
+ (u = a.normals[o]),
+ Je(e, l, u.x, u.y, u.z, 2 + s + Xe * n),
+ (u = a.binormals[o]),
+ Je(e, l, u.x, u.y, u.z, 3 + s + Xe * n);
+ }
+ e.needsUpdate = !0;
+ },
+ Je = function (e, t, n, r, i, a) {
+ var o = e.image.data,
+ s = je * We * a;
+ (o[t * je + s + 0] = n),
+ (o[t * je + s + 1] = r),
+ (o[t * je + s + 2] = i),
+ (o[t * je + s + 3] = 1);
+ },
+ Ke = function (e) {
+ return {
+ spineTexture: { value: e },
+ pathOffset: { type: "f", value: 0 },
+ pathSegment: { type: "f", value: 1 },
+ spineOffset: { type: "f", value: 161 },
+ spineLength: { type: "f", value: 400 },
+ flow: { type: "i", value: 1 },
+ };
+ };
+ function $e(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 1;
+ e.__ok ||
+ ((e.__ok = !0),
+ (e.onBeforeCompile = function (e) {
+ if (!e.__modified) {
+ (e.__modified = !0), Object.assign(e.uniforms, t);
+ var r =
+ "\n\t\tuniform sampler2D spineTexture;\n\t\tuniform float pathOffset;\n\t\tuniform float pathSegment;\n\t\tuniform float spineOffset;\n\t\tuniform float spineLength;\n\t\tuniform int flow;\n\n\t\tfloat textureLayers = "
+ .concat(Xe * n, ".;\n\t\tfloat textureStacks = ")
+ .concat(Xe / 4, ".;\n\n\t\t")
+ .concat(e.vertexShader, "\n\t\t")
+ .replace("#include ", "")
+ .replace("#include ", "")
+ .replace("#include ", "")
+ .replace(
+ /void\s*main\s*\(\)\s*\{/,
+ "\n void main() {\n #include \n\n vec4 worldPos = modelMatrix * vec4(position, 1.);\n\n bool bend = flow > 0;\n float xWeight = bend ? 0. : 1.;\n\n #ifdef USE_INSTANCING\n float pathOffsetFromInstanceMatrix = instanceMatrix[3][2];\n float spineLengthFromInstanceMatrix = instanceMatrix[3][0];\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLengthFromInstanceMatrix : 0.;\n float mt = (spinePortion * pathSegment + pathOffset + pathOffsetFromInstanceMatrix)*textureStacks;\n #else\n float spinePortion = bend ? (worldPos.x + spineOffset) / spineLength : 0.;\n float mt = (spinePortion * pathSegment + pathOffset)*textureStacks;\n #endif\n\n mt = mod(mt, textureStacks);\n float rowOffset = floor(mt);\n\n #ifdef USE_INSTANCING\n rowOffset += instanceMatrix[3][1] * ".concat(
+ Xe,
+ ".;\n #endif\n\n vec3 spinePos = texture2D(spineTexture, vec2(mt, (0. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 a = texture2D(spineTexture, vec2(mt, (1. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 b = texture2D(spineTexture, vec2(mt, (2. + rowOffset + 0.5) / textureLayers)).xyz;\n vec3 c = texture2D(spineTexture, vec2(mt, (3. + rowOffset + 0.5) / textureLayers)).xyz;\n mat3 basis = mat3(a, b, c);\n\n vec3 transformed = basis\n * vec3(worldPos.x * xWeight, worldPos.y * 1., worldPos.z * 1.)\n + spinePos;\n\n vec3 transformedNormal = normalMatrix * (basis * objectNormal);\n\t\t\t"
+ )
+ )
+ .replace(
+ "#include ",
+ "vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;"
+ );
+ e.vertexShader = r;
+ }
+ }));
+ }
+ var et = null,
+ tt = new A.Matrix4(),
+ nt = null,
+ rt = function (e, t) {
+ return e[t];
+ },
+ it = function (e, t) {
+ var n = null !== e[0].index,
+ r = new Set(Object.keys(e[0].attributes)),
+ i = new Set(Object.keys(e[0].morphAttributes)),
+ a = {},
+ o = {},
+ s = e[0].morphTargetsRelative,
+ l = new A.BufferGeometry(),
+ u = 0;
+ if (
+ (e.forEach(function (e, c) {
+ var f = 0;
+ if (n !== (null !== e.index))
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " +
+ c +
+ ". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."
+ ),
+ null
+ );
+ for (var d in e.attributes) {
+ if (!r.has(d))
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " +
+ c +
+ '. All geometries must have compatible attributes; make sure "' +
+ d +
+ '" attribute exists among all geometries, or in none of them.'
+ ),
+ null
+ );
+ void 0 === a[d] && (a[d] = []),
+ a[d].push(e.attributes[d]),
+ f++;
+ }
+ if (f !== r.size)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " +
+ c +
+ ". Make sure all geometries have the same number of attributes."
+ ),
+ null
+ );
+ if (s !== e.morphTargetsRelative)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " +
+ c +
+ ". .morphTargetsRelative must be consistent throughout all geometries."
+ ),
+ null
+ );
+ for (var h in e.morphAttributes) {
+ if (!i.has(h))
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " +
+ c +
+ ". .morphAttributes must be consistent throughout all geometries."
+ ),
+ null
+ );
+ void 0 === o[h] && (o[h] = []),
+ o[h].push(e.morphAttributes[h]);
+ }
+ if (
+ ((l.userData.mergedUserData =
+ l.userData.mergedUserData || []),
+ l.userData.mergedUserData.push(e.userData),
+ t)
+ ) {
+ var p;
+ if (e.index) p = e.index.count;
+ else {
+ if (void 0 === e.attributes.position)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed with geometry at index " +
+ c +
+ ". The geometry must have either an index or a position attribute"
+ ),
+ null
+ );
+ p = e.attributes.position.count;
+ }
+ l.addGroup(u, p, c), (u += p);
+ }
+ }),
+ n)
+ ) {
+ var c = 0,
+ f = [];
+ e.forEach(function (e) {
+ for (var t = e.index, n = 0; n < t.count; ++n)
+ f.push(t.getX(n) + c);
+ c += e.attributes.position.count;
+ }),
+ l.setIndex(f);
+ }
+ for (var d in a) {
+ var h = at(a[d]);
+ if (!h)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " +
+ d +
+ " attribute."
+ ),
+ null
+ );
+ l.setAttribute(d, h);
+ }
+ for (var p in o) {
+ var v = o[p][0].length;
+ if (0 === v) break;
+ (l.morphAttributes = l.morphAttributes || {}),
+ (l.morphAttributes[p] = []);
+ for (var m = 0; m < v; ++m) {
+ for (var g = [], y = 0; y < o[p].length; ++y)
+ g.push(o[p][y][m]);
+ var b = at(g);
+ if (!b)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferGeometries() failed while trying to merge the " +
+ p +
+ " morphAttribute."
+ ),
+ null
+ );
+ l.morphAttributes[p].push(b);
+ }
+ }
+ return l;
+ },
+ at = function (e) {
+ var t = void 0,
+ n = void 0,
+ r = void 0,
+ i = 0;
+ if (
+ (e.forEach(function (e) {
+ return (
+ void 0 === t && (t = e.array.constructor),
+ t !== e.array.constructor
+ ? (console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."
+ ),
+ null)
+ : (void 0 === n && (n = e.itemSize),
+ n !== e.itemSize
+ ? (console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."
+ ),
+ null)
+ : (void 0 === r && (r = e.normalized),
+ r !== e.normalized
+ ? (console.error(
+ "THREE.BufferGeometryUtils: .mergeBufferAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."
+ ),
+ null)
+ : void (i += e.array.length)))
+ );
+ }),
+ t && n)
+ ) {
+ var a = new t(i),
+ o = 0;
+ return (
+ e.forEach(function (e) {
+ a.set(e.array, o), (o += e.array.length);
+ }),
+ new A.BufferAttribute(a, n, r)
+ );
+ }
+ },
+ ot = function (e) {
+ for (
+ var t = void 0, n = 0, r = 0, i = 0, a = e.length;
+ i < a;
+ ++i
+ ) {
+ var o = e[i];
+ if (
+ (void 0 === t && (t = o.array.constructor),
+ t !== o.array.constructor)
+ )
+ return (
+ console.error(
+ "AttributeBuffers of different types cannot be interleaved"
+ ),
+ null
+ );
+ (n += o.array.length), (r += o.itemSize);
+ }
+ for (
+ var s = new A.InterleavedBuffer(new t(n), r),
+ l = 0,
+ u = [],
+ c = ["getX", "getY", "getZ", "getW"],
+ f = ["setX", "setY", "setZ", "setW"],
+ d = 0,
+ h = e.length;
+ d < h;
+ d++
+ ) {
+ var p = e[d],
+ v = p.itemSize,
+ m = p.count,
+ g = new A.InterleavedBufferAttribute(s, v, l, p.normalized);
+ u.push(g), (l += v);
+ for (var y = 0; y < m; y++)
+ for (var b = 0; b < v; b++) {
+ rt(g, f[b])(y, rt(p, c[b])(y));
+ }
+ }
+ return u;
+ };
+ function st(e) {
+ var t = 0;
+ for (var n in e.attributes) {
+ var r = e.getAttribute(n);
+ t += r.count * r.itemSize * r.array.BYTES_PER_ELEMENT;
+ }
+ var i = e.getIndex();
+ return (t += i
+ ? i.count * i.itemSize * i.array.BYTES_PER_ELEMENT
+ : 0);
+ }
+ function lt(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1e-4;
+ t = Math.max(t, Number.EPSILON);
+ for (
+ var n = {},
+ r = e.getIndex(),
+ i = e.getAttribute("position"),
+ a = r ? r.count : i.count,
+ o = 0,
+ s = Object.keys(e.attributes),
+ l = {},
+ u = {},
+ c = [],
+ f = ["getX", "getY", "getZ", "getW"],
+ d = 0,
+ h = s.length;
+ d < h;
+ d++
+ ) {
+ var p = s[d];
+ l[p] = [];
+ var v = e.morphAttributes[p];
+ v &&
+ (u[p] = new Array(v.length).fill(0).map(function () {
+ return [];
+ }));
+ }
+ for (
+ var m = Math.log10(1 / t), g = Math.pow(10, m), y = 0;
+ y < a;
+ y++
+ ) {
+ for (
+ var b = r ? r.getX(y) : y, x = "", S = 0, E = s.length;
+ S < E;
+ S++
+ )
+ for (
+ var _ = s[S], C = e.getAttribute(_), w = C.itemSize, T = 0;
+ T < w;
+ T++
+ )
+ x += "".concat(~~(C[f[T]](b) * g), ",");
+ if (x in n) c.push(n[x]);
+ else {
+ for (var M = 0, I = s.length; M < I; M++)
+ for (
+ var k = s[M],
+ R = e.getAttribute(k),
+ B = e.morphAttributes[k],
+ P = R.itemSize,
+ L = l[k],
+ D = u[k],
+ U = 0;
+ U < P;
+ U++
+ ) {
+ var F = f[U];
+ if ((L.push(R[F](b)), B))
+ for (var O = 0, N = B.length; O < N; O++)
+ D[O].push(B[O][F](b));
+ }
+ (n[x] = o), c.push(o), o++;
+ }
+ }
+ for (var G = e.clone(), Z = 0, z = s.length; Z < z; Z++) {
+ var Q = s[Z],
+ H = e.getAttribute(Q),
+ V = new H.array.constructor(l[Q]),
+ j = new A.BufferAttribute(V, H.itemSize, H.normalized);
+ if ((G.setAttribute(Q, j), Q in u))
+ for (var W = 0; W < u[Q].length; W++) {
+ var X = e.morphAttributes[Q][W],
+ Y = new X.array.constructor(u[Q][W]),
+ q = new A.BufferAttribute(Y, X.itemSize, X.normalized);
+ G.morphAttributes[Q][W] = q;
+ }
+ }
+ return G.setIndex(c), G;
+ }
+ function ut(e, t) {
+ if (t === A.TrianglesDrawMode)
+ return (
+ console.warn(
+ "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."
+ ),
+ e
+ );
+ if (t === A.TriangleFanDrawMode || t === A.TriangleStripDrawMode) {
+ var n = e.getIndex();
+ if (null === n) {
+ var r = [],
+ i = e.getAttribute("position");
+ if (void 0 === i)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."
+ ),
+ e
+ );
+ for (var a = 0; a < i.count; a++) r.push(a);
+ e.setIndex(r), (n = e.getIndex());
+ }
+ var o = n.count - 2,
+ s = [];
+ if (n)
+ if (t === A.TriangleFanDrawMode)
+ for (var l = 1; l <= o; l++)
+ s.push(n.getX(0)), s.push(n.getX(l)), s.push(n.getX(l + 1));
+ else
+ for (var u = 0; u < o; u++)
+ u % 2 === 0
+ ? (s.push(n.getX(u)),
+ s.push(n.getX(u + 1)),
+ s.push(n.getX(u + 2)))
+ : (s.push(n.getX(u + 2)),
+ s.push(n.getX(u + 1)),
+ s.push(n.getX(u)));
+ s.length / 3 !== o &&
+ console.error(
+ "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles."
+ );
+ var c = e.clone();
+ return c.setIndex(s), c.clearGroups(), c;
+ }
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",
+ t
+ ),
+ e
+ );
+ }
+ function ct(e) {
+ if (!0 !== e.geometry.isBufferGeometry)
+ return (
+ console.error(
+ "THREE.BufferGeometryUtils: Geometry is not of type BufferGeometry."
+ ),
+ null
+ );
+ var t = new A.Vector3(),
+ n = new A.Vector3(),
+ r = new A.Vector3(),
+ i = new A.Vector3(),
+ a = new A.Vector3(),
+ o = new A.Vector3(),
+ s = new A.Vector3(),
+ l = new A.Vector3(),
+ u = new A.Vector3();
+ function c(e, c, f, d, h, p, v, m, g) {
+ t.fromBufferAttribute(f, p),
+ n.fromBufferAttribute(f, v),
+ r.fromBufferAttribute(f, m);
+ var A = e.morphTargetInfluences;
+ if (c.morphTargets && d && A) {
+ s.set(0, 0, 0), l.set(0, 0, 0), u.set(0, 0, 0);
+ for (var y = 0, b = d.length; y < b; y++) {
+ var x = A[y],
+ S = d[y];
+ 0 !== x &&
+ (i.fromBufferAttribute(S, p),
+ a.fromBufferAttribute(S, v),
+ o.fromBufferAttribute(S, m),
+ h
+ ? (s.addScaledVector(i, x),
+ l.addScaledVector(a, x),
+ u.addScaledVector(o, x))
+ : (s.addScaledVector(i.sub(t), x),
+ l.addScaledVector(a.sub(n), x),
+ u.addScaledVector(o.sub(r), x)));
+ }
+ t.add(s), n.add(l), r.add(u);
+ }
+ e.isSkinnedMesh &&
+ (e.boneTransform(p, t),
+ e.boneTransform(v, n),
+ e.boneTransform(m, r)),
+ (g[3 * p + 0] = t.x),
+ (g[3 * p + 1] = t.y),
+ (g[3 * p + 2] = t.z),
+ (g[3 * v + 0] = n.x),
+ (g[3 * v + 1] = n.y),
+ (g[3 * v + 2] = n.z),
+ (g[3 * m + 0] = r.x),
+ (g[3 * m + 1] = r.y),
+ (g[3 * m + 2] = r.z);
+ }
+ var f,
+ d,
+ h,
+ p,
+ v,
+ m,
+ g,
+ y,
+ b,
+ x = e.geometry,
+ S = e.material,
+ E = x.index,
+ _ = x.attributes.position,
+ C = x.morphAttributes.position,
+ w = x.morphTargetsRelative,
+ T = x.attributes.normal,
+ M = x.morphAttributes.position,
+ I = x.groups,
+ k = x.drawRange,
+ R = new Float32Array(_.count * _.itemSize),
+ B = new Float32Array(T.count * T.itemSize);
+ if (null !== E)
+ if (Array.isArray(S))
+ for (p = 0, m = I.length; p < m; p++)
+ for (
+ b = S[(y = I[p]).materialIndex],
+ v = Math.max(y.start, k.start),
+ g = Math.min(y.start + y.count, k.start + k.count);
+ v < g;
+ v += 3
+ )
+ c(
+ e,
+ b,
+ _,
+ C,
+ w,
+ (f = E.getX(v)),
+ (d = E.getX(v + 1)),
+ (h = E.getX(v + 2)),
+ R
+ ),
+ c(e, b, T, M, w, f, d, h, B);
+ else
+ for (
+ p = Math.max(0, k.start),
+ m = Math.min(E.count, k.start + k.count);
+ p < m;
+ p += 3
+ )
+ c(
+ e,
+ S,
+ _,
+ C,
+ w,
+ (f = E.getX(p)),
+ (d = E.getX(p + 1)),
+ (h = E.getX(p + 2)),
+ R
+ ),
+ c(e, S, T, M, w, f, d, h, B);
+ else if (void 0 !== _)
+ if (Array.isArray(S))
+ for (p = 0, m = I.length; p < m; p++)
+ for (
+ b = S[(y = I[p]).materialIndex],
+ v = Math.max(y.start, k.start),
+ g = Math.min(y.start + y.count, k.start + k.count);
+ v < g;
+ v += 3
+ )
+ c(e, b, _, C, w, (f = v), (d = v + 1), (h = v + 2), R),
+ c(e, b, T, M, w, f, d, h, B);
+ else
+ for (
+ p = Math.max(0, k.start),
+ m = Math.min(_.count, k.start + k.count);
+ p < m;
+ p += 3
+ )
+ c(e, S, _, C, w, (f = p), (d = p + 1), (h = p + 2), R),
+ c(e, S, T, M, w, f, d, h, B);
+ return {
+ positionAttribute: _,
+ normalAttribute: T,
+ morphedPositionAttribute: new A.Float32BufferAttribute(R, 3),
+ morphedNormalAttribute: new A.Float32BufferAttribute(B, 3),
+ };
+ }
+ function ft(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Math.PI / 3,
+ n = Math.cos(t),
+ r = 100 * (1 + 1e-10),
+ i = [new A.Vector3(), new A.Vector3(), new A.Vector3()],
+ a = new A.Vector3(),
+ o = new A.Vector3(),
+ s = new A.Vector3(),
+ l = new A.Vector3();
+ function u(e) {
+ var t = ~~(e.x * r),
+ n = ~~(e.y * r),
+ i = ~~(e.z * r);
+ return "".concat(t, ",").concat(n, ",").concat(i);
+ }
+ for (
+ var c = e.index ? e.toNonIndexed() : e,
+ f = c.attributes.position,
+ d = {},
+ h = 0,
+ p = f.count / 3;
+ h < p;
+ h++
+ ) {
+ var v = 3 * h,
+ m = i[0].fromBufferAttribute(f, v + 0),
+ g = i[1].fromBufferAttribute(f, v + 1),
+ y = i[2].fromBufferAttribute(f, v + 2);
+ a.subVectors(y, g), o.subVectors(m, g);
+ for (
+ var b = new A.Vector3().crossVectors(a, o).normalize(), x = 0;
+ x < 3;
+ x++
+ ) {
+ var S = u(i[x]);
+ S in d || (d[S] = []), d[S].push(b);
+ }
+ }
+ for (
+ var E = new Float32Array(3 * f.count),
+ _ = new A.BufferAttribute(E, 3, !1),
+ C = 0,
+ w = f.count / 3;
+ C < w;
+ C++
+ ) {
+ var T = 3 * C,
+ M = i[0].fromBufferAttribute(f, T + 0),
+ I = i[1].fromBufferAttribute(f, T + 1),
+ k = i[2].fromBufferAttribute(f, T + 2);
+ a.subVectors(k, I),
+ o.subVectors(M, I),
+ s.crossVectors(a, o).normalize();
+ for (var R = 0; R < 3; R++) {
+ var B = d[u(i[R])];
+ l.set(0, 0, 0);
+ for (var P = 0, L = B.length; P < L; P++) {
+ var D = B[P];
+ s.dot(D) > n && l.add(D);
+ }
+ l.normalize(), _.setXYZ(T + R, l.x, l.y, l.z);
+ }
+ }
+ return c.setAttribute("normal", _), c;
+ }
+ var dt = Object.freeze(
+ Object.defineProperty(
+ {
+ __proto__: null,
+ computeMorphedAttributes: ct,
+ estimateBytesUsed: st,
+ interleaveAttributes: ot,
+ mergeBufferAttributes: at,
+ mergeBufferGeometries: it,
+ mergeVertices: lt,
+ toCreasedNormals: ft,
+ toTrianglesDrawMode: ut,
+ },
+ Symbol.toStringTag,
+ { value: "Module" }
+ )
+ ),
+ ht = new A.Vector3(),
+ pt = new A.Vector3();
+ function vt(e, t) {
+ -1 === e.indexOf(t) && e.push(t);
+ }
+ function mt(e, t) {
+ var n = e.indexOf(t);
+ n > -1 && e.splice(n, 1);
+ }
+ var gt = null,
+ At = null,
+ yt = null,
+ bt = null,
+ xt = null,
+ St,
+ Et,
+ _t,
+ Ct;
+ function wt(e) {
+ return Tt.apply(this, arguments);
+ }
+ function Tt() {
+ return (Tt = (0, c.Z)(
+ (0, u.Z)().mark(function e(t) {
+ var n, i;
+ return (0, u.Z)().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), t.arrayBuffer();
+ case 2:
+ return (
+ (n = e.sent),
+ (i = btoa(
+ String.fromCharCode.apply(
+ String,
+ (0, r.Z)(new Uint8Array(n))
+ )
+ )),
+ e.abrupt(
+ "return",
+ "data:".concat(t.type || "", ";base64,").concat(i)
+ )
+ );
+ case 5:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ )).apply(this, arguments);
+ }
+ function Mt(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1 / 0,
+ n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : null;
+ Et || (Et = new A.PlaneGeometry(2, 2, 1, 1)),
+ _t ||
+ (_t = new A.ShaderMaterial({
+ uniforms: { blitTexture: new A.Uniform(e) },
+ vertexShader:
+ "\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = vec4(position.xy * 1.0,0.,.999999);\n }\n ",
+ fragmentShader:
+ "\n uniform sampler2D blitTexture; \n varying vec2 vUv;\n\n void main(){ \n gl_FragColor = vec4(vUv.xy, 0, 1);\n \n #ifdef IS_SRGB\n gl_FragColor = LinearTosRGB( texture2D( blitTexture, vUv) );\n #else\n gl_FragColor = texture2D( blitTexture, vUv);\n #endif\n }\n ",
+ })),
+ (_t.uniforms.blitTexture.value = e),
+ (_t.defines.IS_SRGB =
+ "colorSpace" in e
+ ? "srgb" === e.colorSpace
+ : 3001 === e.encoding),
+ (_t.needsUpdate = !0),
+ Ct || ((Ct = new A.Mesh(Et, _t)).frustrumCulled = !1);
+ var r = new A.PerspectiveCamera(),
+ i = new A.Scene();
+ i.add(Ct),
+ n || (n = St = new A.WebGLRenderer({ antialias: !1 })),
+ n.setSize(Math.min(e.image.width, t), Math.min(e.image.height, t)),
+ n.clear(),
+ n.render(i, r);
+ var a = new A.Texture(n.domElement);
+ return (
+ (a.minFilter = e.minFilter),
+ (a.magFilter = e.magFilter),
+ (a.wrapS = e.wrapS),
+ (a.wrapT = e.wrapT),
+ (a.name = e.name),
+ St && (St.dispose(), (St = null)),
+ a
+ );
+ }
+ var It = {
+ POSITION: [
+ "byte",
+ "byte normalized",
+ "unsigned byte",
+ "unsigned byte normalized",
+ "short",
+ "short normalized",
+ "unsigned short",
+ "unsigned short normalized",
+ ],
+ NORMAL: ["byte normalized", "short normalized"],
+ TANGENT: ["byte normalized", "short normalized"],
+ TEXCOORD: [
+ "byte",
+ "byte normalized",
+ "unsigned byte",
+ "short",
+ "short normalized",
+ "unsigned short",
+ ],
+ },
+ kt = (function () {
+ function e() {
+ (0, p.Z)(this, e),
+ (this.pluginCallbacks = []),
+ this.register(function (e) {
+ return new Jt(e);
+ }),
+ this.register(function (e) {
+ return new Kt(e);
+ }),
+ this.register(function (e) {
+ return new tn(e);
+ }),
+ this.register(function (e) {
+ return new nn(e);
+ }),
+ this.register(function (e) {
+ return new rn(e);
+ }),
+ this.register(function (e) {
+ return new an(e);
+ }),
+ this.register(function (e) {
+ return new $t(e);
+ }),
+ this.register(function (e) {
+ return new en(e);
+ }),
+ this.register(function (e) {
+ return new on(e);
+ }),
+ this.register(function (e) {
+ return new sn(e);
+ }),
+ this.register(function (e) {
+ return new ln(e);
+ });
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "register",
+ value: function (e) {
+ return (
+ -1 === this.pluginCallbacks.indexOf(e) &&
+ this.pluginCallbacks.push(e),
+ this
+ );
+ },
+ },
+ {
+ key: "unregister",
+ value: function (e) {
+ return (
+ -1 !== this.pluginCallbacks.indexOf(e) &&
+ this.pluginCallbacks.splice(
+ this.pluginCallbacks.indexOf(e),
+ 1
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "parse",
+ value: function (e, t, n, r) {
+ for (
+ var i = new qt(),
+ a = [],
+ o = 0,
+ s = this.pluginCallbacks.length;
+ o < s;
+ o++
+ )
+ a.push(this.pluginCallbacks[o](i));
+ i.setPlugins(a), i.write(e, t, r).catch(n);
+ },
+ },
+ {
+ key: "parseAsync",
+ value: function (e, t) {
+ var n = this;
+ return new Promise(function (r, i) {
+ n.parse(e, r, i, t);
+ });
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Rt = {
+ POINTS: 0,
+ LINES: 1,
+ LINE_LOOP: 2,
+ LINE_STRIP: 3,
+ TRIANGLES: 4,
+ TRIANGLE_STRIP: 5,
+ TRIANGLE_FAN: 6,
+ BYTE: 5120,
+ UNSIGNED_BYTE: 5121,
+ SHORT: 5122,
+ UNSIGNED_SHORT: 5123,
+ INT: 5124,
+ UNSIGNED_INT: 5125,
+ FLOAT: 5126,
+ ARRAY_BUFFER: 34962,
+ ELEMENT_ARRAY_BUFFER: 34963,
+ NEAREST: 9728,
+ LINEAR: 9729,
+ NEAREST_MIPMAP_NEAREST: 9984,
+ LINEAR_MIPMAP_NEAREST: 9985,
+ NEAREST_MIPMAP_LINEAR: 9986,
+ LINEAR_MIPMAP_LINEAR: 9987,
+ CLAMP_TO_EDGE: 33071,
+ MIRRORED_REPEAT: 33648,
+ REPEAT: 10497,
+ },
+ Bt = "KHR_mesh_quantization",
+ Pt = {};
+ (Pt[A.NearestFilter] = Rt.NEAREST),
+ (Pt[A.NearestMipmapNearestFilter] = Rt.NEAREST_MIPMAP_NEAREST),
+ (Pt[A.NearestMipmapLinearFilter] = Rt.NEAREST_MIPMAP_LINEAR),
+ (Pt[A.LinearFilter] = Rt.LINEAR),
+ (Pt[A.LinearMipmapNearestFilter] = Rt.LINEAR_MIPMAP_NEAREST),
+ (Pt[A.LinearMipmapLinearFilter] = Rt.LINEAR_MIPMAP_LINEAR),
+ (Pt[A.ClampToEdgeWrapping] = Rt.CLAMP_TO_EDGE),
+ (Pt[A.RepeatWrapping] = Rt.REPEAT),
+ (Pt[A.MirroredRepeatWrapping] = Rt.MIRRORED_REPEAT);
+ var Lt = {
+ scale: "scale",
+ position: "translation",
+ quaternion: "rotation",
+ morphTargetInfluences: "weights",
+ },
+ Dt = new A.Color(),
+ Ut = 12,
+ Ft = 1179937895,
+ Ot = 2,
+ Nt = 8,
+ Gt = 1313821514,
+ Zt = 5130562;
+ function zt(e, t) {
+ return (
+ e.length === t.length &&
+ e.every(function (e, n) {
+ return e === t[n];
+ })
+ );
+ }
+ function Qt(e) {
+ return new TextEncoder().encode(e).buffer;
+ }
+ function Ht(e) {
+ return zt(
+ e.elements,
+ [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
+ );
+ }
+ function Vt(e, t, n) {
+ for (
+ var r = {
+ min: new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),
+ max: new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY),
+ },
+ i = t;
+ i < t + n;
+ i++
+ )
+ for (var a = 0; a < e.itemSize; a++) {
+ var o = void 0;
+ e.itemSize > 4
+ ? (o = e.array[i * e.itemSize + a])
+ : (0 === a
+ ? (o = e.getX(i))
+ : 1 === a
+ ? (o = e.getY(i))
+ : 2 === a
+ ? (o = e.getZ(i))
+ : 3 === a && (o = e.getW(i)),
+ !0 === e.normalized &&
+ (o = A.MathUtils.normalize(o, e.array))),
+ (r.min[a] = Math.min(r.min[a], o)),
+ (r.max[a] = Math.max(r.max[a], o));
+ }
+ return r;
+ }
+ function jt(e) {
+ return 4 * Math.ceil(e / 4);
+ }
+ function Wt(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = jt(e.byteLength);
+ if (n !== e.byteLength) {
+ var r = new Uint8Array(n);
+ if ((r.set(new Uint8Array(e)), 0 !== t))
+ for (var i = e.byteLength; i < n; i++) r[i] = t;
+ return r.buffer;
+ }
+ return e;
+ }
+ function Xt() {
+ return "undefined" === typeof document &&
+ "undefined" !== typeof OffscreenCanvas
+ ? new OffscreenCanvas(1, 1)
+ : document.createElement("canvas");
+ }
+ function Yt(e, t) {
+ return void 0 !== e.toBlob
+ ? new Promise(function (n) {
+ return e.toBlob(n, t);
+ })
+ : ("image/jpeg" === t
+ ? (n = 0.92)
+ : "image/webp" === t && (n = 0.8),
+ e.convertToBlob({ type: t, quality: n }));
+ var n;
+ }
+ var qt = (function () {
+ function e() {
+ (0, p.Z)(this, e),
+ (this.plugins = []),
+ (this.options = {}),
+ (this.pending = []),
+ (this.buffers = []),
+ (this.byteOffset = 0),
+ (this.buffers = []),
+ (this.nodeMap = new Map()),
+ (this.skins = []),
+ (this.extensionsUsed = {}),
+ (this.extensionsRequired = {}),
+ (this.uids = new Map()),
+ (this.uid = 0),
+ (this.json = {
+ asset: { version: "2.0", generator: "THREE.GLTFExporter" },
+ }),
+ (this.cache = {
+ meshes: new Map(),
+ attributes: new Map(),
+ attributesNormalized: new Map(),
+ materials: new Map(),
+ textures: new Map(),
+ images: new Map(),
+ });
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "setPlugins",
+ value: function (e) {
+ this.plugins = e;
+ },
+ },
+ {
+ key: "write",
+ value: (function () {
+ var e = (0, c.Z)(
+ (0, u.Z)().mark(function e(t, n) {
+ var r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ c,
+ f,
+ d,
+ h = arguments;
+ return (0, u.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (
+ (r =
+ h.length > 2 && void 0 !== h[2]
+ ? h[2]
+ : {}),
+ (this.options = Object.assign(
+ {
+ binary: !1,
+ trs: !1,
+ onlyVisible: !0,
+ maxTextureSize: 1 / 0,
+ animations: [],
+ includeCustomExtensions: !1,
+ },
+ r
+ )),
+ this.options.animations.length > 0 &&
+ (this.options.trs = !0),
+ this.processInput(t),
+ (e.next = 6),
+ Promise.all(this.pending)
+ );
+ case 6:
+ (a = (i = this).buffers),
+ (o = i.json),
+ (r = i.options),
+ (s = i.extensionsUsed),
+ (l = i.extensionsRequired),
+ (c = new Blob(a, {
+ type: "application/octet-stream",
+ })),
+ (f = Object.keys(s)),
+ (d = Object.keys(l)),
+ f.length > 0 && (o.extensionsUsed = f),
+ d.length > 0 && (o.extensionsRequired = d),
+ o.buffers &&
+ o.buffers.length > 0 &&
+ (o.buffers[0].byteLength = c.size),
+ !0 === r.binary
+ ? c.arrayBuffer().then(function (e) {
+ var t = Wt(e),
+ r = new DataView(
+ new ArrayBuffer(Nt)
+ );
+ r.setUint32(0, t.byteLength, !0),
+ r.setUint32(4, Zt, !0);
+ var i = Wt(Qt(JSON.stringify(o)), 32),
+ a = new DataView(
+ new ArrayBuffer(Nt)
+ );
+ a.setUint32(0, i.byteLength, !0),
+ a.setUint32(4, Gt, !0);
+ var s = new ArrayBuffer(Ut),
+ l = new DataView(s);
+ l.setUint32(0, Ft, !0),
+ l.setUint32(4, Ot, !0);
+ var u =
+ Ut +
+ a.byteLength +
+ i.byteLength +
+ r.byteLength +
+ t.byteLength;
+ l.setUint32(8, u, !0),
+ new Blob([s, a, i, r, t], {
+ type: "application/octet-stream",
+ })
+ .arrayBuffer()
+ .then(n);
+ })
+ : (o.buffers &&
+ o.buffers.length > 0 &&
+ wt(c).then(function (e) {
+ o.buffers[0].uri = e;
+ }),
+ n(o));
+ case 19:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ })
+ );
+ return function (t, n) {
+ return e.apply(this, arguments);
+ };
+ })(),
+ },
+ {
+ key: "serializeUserData",
+ value: function (e, t) {
+ if (0 !== Object.keys(e.userData).length) {
+ var n = this.options,
+ r = this.extensionsUsed;
+ try {
+ var i = JSON.parse(JSON.stringify(e.userData));
+ if (n.includeCustomExtensions && i.gltfExtensions) {
+ for (var a in (void 0 === t.extensions &&
+ (t.extensions = {}),
+ i.gltfExtensions))
+ (t.extensions[a] = i.gltfExtensions[a]),
+ (r[a] = !0);
+ delete i.gltfExtensions;
+ }
+ Object.keys(i).length > 0 && (t.extras = i);
+ } catch (o) {
+ console.warn(
+ "THREE.GLTFExporter: userData of '" +
+ e.name +
+ "' won't be serialized because of JSON.stringify error - " +
+ o.message
+ );
+ }
+ }
+ },
+ },
+ {
+ key: "getUID",
+ value: function (e) {
+ var t =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1];
+ if (!1 === this.uids.has(e)) {
+ var n = new Map();
+ n.set(!0, this.uid++),
+ n.set(!1, this.uid++),
+ this.uids.set(e, n);
+ }
+ return this.uids.get(e).get(t);
+ },
+ },
+ {
+ key: "isNormalizedNormalAttribute",
+ value: function (e) {
+ if (this.cache.attributesNormalized.has(e)) return !1;
+ for (
+ var t = new A.Vector3(), n = 0, r = e.count;
+ n < r;
+ n++
+ )
+ if (
+ Math.abs(t.fromBufferAttribute(e, n).length() - 1) >
+ 5e-4
+ )
+ return !1;
+ return !0;
+ },
+ },
+ {
+ key: "createNormalizedNormalAttribute",
+ value: function (e) {
+ var t = this.cache;
+ if (t.attributesNormalized.has(e))
+ return t.attributesNormalized.get(e);
+ for (
+ var n = e.clone(),
+ r = new A.Vector3(),
+ i = 0,
+ a = n.count;
+ i < a;
+ i++
+ )
+ r.fromBufferAttribute(n, i),
+ 0 === r.x && 0 === r.y && 0 === r.z
+ ? r.setX(1)
+ : r.normalize(),
+ n.setXYZ(i, r.x, r.y, r.z);
+ return t.attributesNormalized.set(e, n), n;
+ },
+ },
+ {
+ key: "applyTextureTransform",
+ value: function (e, t) {
+ var n = !1,
+ r = {};
+ (0 === t.offset.x && 0 === t.offset.y) ||
+ ((r.offset = t.offset.toArray()), (n = !0)),
+ 0 !== t.rotation && ((r.rotation = t.rotation), (n = !0)),
+ (1 === t.repeat.x && 1 === t.repeat.y) ||
+ ((r.scale = t.repeat.toArray()), (n = !0)),
+ n &&
+ ((e.extensions = e.extensions || {}),
+ (e.extensions.KHR_texture_transform = r),
+ (this.extensionsUsed.KHR_texture_transform = !0));
+ },
+ },
+ {
+ key: "buildMetalRoughTexture",
+ value: function (e, t) {
+ if (e === t) return e;
+ function n(e) {
+ return (
+ "colorSpace" in e
+ ? "srgb" === e.colorSpace
+ : 3001 === e.encoding
+ )
+ ? function (e) {
+ return e < 0.04045
+ ? 0.0773993808 * e
+ : Math.pow(0.9478672986 * e + 0.0521327014, 2.4);
+ }
+ : function (e) {
+ return e;
+ };
+ }
+ console.warn(
+ "THREE.GLTFExporter: Merged metalnessMap and roughnessMap textures."
+ ),
+ e instanceof A.CompressedTexture && (e = Mt(e)),
+ t instanceof A.CompressedTexture && (t = Mt(t));
+ var r = e ? e.image : null,
+ i = t ? t.image : null,
+ a = Math.max(r ? r.width : 0, i ? i.width : 0),
+ o = Math.max(r ? r.height : 0, i ? i.height : 0),
+ s = Xt();
+ (s.width = a), (s.height = o);
+ var l = s.getContext("2d");
+ (l.fillStyle = "#00ffff"), l.fillRect(0, 0, a, o);
+ var u = l.getImageData(0, 0, a, o);
+ if (r) {
+ l.drawImage(r, 0, 0, a, o);
+ for (
+ var c = n(e),
+ f = l.getImageData(0, 0, a, o).data,
+ d = 2;
+ d < f.length;
+ d += 4
+ )
+ u.data[d] = 256 * c(f[d] / 256);
+ }
+ if (i) {
+ l.drawImage(i, 0, 0, a, o);
+ for (
+ var h = n(t),
+ p = l.getImageData(0, 0, a, o).data,
+ v = 1;
+ v < p.length;
+ v += 4
+ )
+ u.data[v] = 256 * h(p[v] / 256);
+ }
+ l.putImageData(u, 0, 0);
+ var m = (e || t).clone();
+ return (
+ (m.source = new A.Texture(s).source),
+ "colorSpace" in m
+ ? (m.colorSpace = "")
+ : (m.encoding = 3e3),
+ (m.channel = (e || t).channel),
+ e &&
+ t &&
+ e.channel !== t.channel &&
+ console.warn(
+ "THREE.GLTFExporter: UV channels for metalnessMap and roughnessMap textures must match."
+ ),
+ m
+ );
+ },
+ },
+ {
+ key: "processBuffer",
+ value: function (e) {
+ var t = this.json,
+ n = this.buffers;
+ return (
+ t.buffers || (t.buffers = [{ byteLength: 0 }]),
+ n.push(e),
+ 0
+ );
+ },
+ },
+ {
+ key: "processBufferView",
+ value: function (e, t, n, r, i) {
+ var a,
+ o = this.json;
+ switch ((o.bufferViews || (o.bufferViews = []), t)) {
+ case Rt.BYTE:
+ case Rt.UNSIGNED_BYTE:
+ a = 1;
+ break;
+ case Rt.SHORT:
+ case Rt.UNSIGNED_SHORT:
+ a = 2;
+ break;
+ default:
+ a = 4;
+ }
+ for (
+ var s = jt(r * e.itemSize * a),
+ l = new DataView(new ArrayBuffer(s)),
+ u = 0,
+ c = n;
+ c < n + r;
+ c++
+ )
+ for (var f = 0; f < e.itemSize; f++) {
+ var d = void 0;
+ e.itemSize > 4
+ ? (d = e.array[c * e.itemSize + f])
+ : (0 === f
+ ? (d = e.getX(c))
+ : 1 === f
+ ? (d = e.getY(c))
+ : 2 === f
+ ? (d = e.getZ(c))
+ : 3 === f && (d = e.getW(c)),
+ !0 === e.normalized &&
+ (d = A.MathUtils.normalize(d, e.array))),
+ t === Rt.FLOAT
+ ? l.setFloat32(u, d, !0)
+ : t === Rt.INT
+ ? l.setInt32(u, d, !0)
+ : t === Rt.UNSIGNED_INT
+ ? l.setUint32(u, d, !0)
+ : t === Rt.SHORT
+ ? l.setInt16(u, d, !0)
+ : t === Rt.UNSIGNED_SHORT
+ ? l.setUint16(u, d, !0)
+ : t === Rt.BYTE
+ ? l.setInt8(u, d)
+ : t === Rt.UNSIGNED_BYTE && l.setUint8(u, d),
+ (u += a);
+ }
+ var h = {
+ buffer: this.processBuffer(l.buffer),
+ byteOffset: this.byteOffset,
+ byteLength: s,
+ };
+ return (
+ void 0 !== i && (h.target = i),
+ i === Rt.ARRAY_BUFFER && (h.byteStride = e.itemSize * a),
+ (this.byteOffset += s),
+ o.bufferViews.push(h),
+ { id: o.bufferViews.length - 1, byteLength: 0 }
+ );
+ },
+ },
+ {
+ key: "processBufferViewImage",
+ value: function (e) {
+ var t = this,
+ n = t.json;
+ return (
+ n.bufferViews || (n.bufferViews = []),
+ e.arrayBuffer().then(function (e) {
+ var r = Wt(e),
+ i = {
+ buffer: t.processBuffer(r),
+ byteOffset: t.byteOffset,
+ byteLength: r.byteLength,
+ };
+ return (
+ (t.byteOffset += r.byteLength),
+ n.bufferViews.push(i) - 1
+ );
+ })
+ );
+ },
+ },
+ {
+ key: "processAccessor",
+ value: function (e, t, n, r) {
+ var i,
+ a = this.json;
+ if (e.array.constructor === Float32Array) i = Rt.FLOAT;
+ else if (e.array.constructor === Int32Array) i = Rt.INT;
+ else if (e.array.constructor === Uint32Array)
+ i = Rt.UNSIGNED_INT;
+ else if (e.array.constructor === Int16Array) i = Rt.SHORT;
+ else if (e.array.constructor === Uint16Array)
+ i = Rt.UNSIGNED_SHORT;
+ else if (e.array.constructor === Int8Array) i = Rt.BYTE;
+ else {
+ if (e.array.constructor !== Uint8Array)
+ throw new Error(
+ "THREE.GLTFExporter: Unsupported bufferAttribute component type: " +
+ e.array.constructor.name
+ );
+ i = Rt.UNSIGNED_BYTE;
+ }
+ if (
+ (void 0 === n && (n = 0),
+ void 0 === r && (r = e.count),
+ 0 === r)
+ )
+ return null;
+ var o,
+ s = Vt(e, n, r);
+ void 0 !== t &&
+ (o =
+ e === t.index
+ ? Rt.ELEMENT_ARRAY_BUFFER
+ : Rt.ARRAY_BUFFER);
+ var l = this.processBufferView(e, i, n, r, o),
+ u = {
+ bufferView: l.id,
+ byteOffset: l.byteOffset,
+ componentType: i,
+ count: r,
+ max: s.max,
+ min: s.min,
+ type: {
+ 1: "SCALAR",
+ 2: "VEC2",
+ 3: "VEC3",
+ 4: "VEC4",
+ 9: "MAT3",
+ 16: "MAT4",
+ }[e.itemSize],
+ };
+ return (
+ !0 === e.normalized && (u.normalized = !0),
+ a.accessors || (a.accessors = []),
+ a.accessors.push(u) - 1
+ );
+ },
+ },
+ {
+ key: "processImage",
+ value: function (e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : "image/png";
+ if (null !== e) {
+ var i = this,
+ a = i.cache,
+ o = i.json,
+ s = i.options,
+ l = i.pending;
+ a.images.has(e) || a.images.set(e, {});
+ var u = a.images.get(e),
+ c = r + ":flipY/" + n.toString();
+ if (void 0 !== u[c]) return u[c];
+ o.images || (o.images = []);
+ var f = { mimeType: r },
+ d = Xt();
+ (d.width = Math.min(e.width, s.maxTextureSize)),
+ (d.height = Math.min(e.height, s.maxTextureSize));
+ var h = d.getContext("2d");
+ if (
+ (!0 === n && (h.translate(0, d.height), h.scale(1, -1)),
+ void 0 !== e.data)
+ ) {
+ t !== A.RGBAFormat &&
+ console.error(
+ "GLTFExporter: Only RGBAFormat is supported.",
+ t
+ ),
+ (e.width > s.maxTextureSize ||
+ e.height > s.maxTextureSize) &&
+ console.warn(
+ "GLTFExporter: Image size is bigger than maxTextureSize",
+ e
+ );
+ for (
+ var p = new Uint8ClampedArray(e.height * e.width * 4),
+ v = 0;
+ v < p.length;
+ v += 4
+ )
+ (p[v + 0] = e.data[v + 0]),
+ (p[v + 1] = e.data[v + 1]),
+ (p[v + 2] = e.data[v + 2]),
+ (p[v + 3] = e.data[v + 3]);
+ h.putImageData(
+ new ImageData(p, e.width, e.height),
+ 0,
+ 0
+ );
+ } else h.drawImage(e, 0, 0, d.width, d.height);
+ !0 === s.binary
+ ? l.push(
+ Yt(d, r)
+ .then(function (e) {
+ return i.processBufferViewImage(e);
+ })
+ .then(function (e) {
+ f.bufferView = e;
+ })
+ )
+ : void 0 !== d.toDataURL
+ ? (f.uri = d.toDataURL(r))
+ : l.push(
+ Yt(d, r)
+ .then(wt)
+ .then(function (e) {
+ f.uri = e;
+ })
+ );
+ var m = o.images.push(f) - 1;
+ return (u[c] = m), m;
+ }
+ throw new Error(
+ "THREE.GLTFExporter: No valid image data found. Unable to process texture."
+ );
+ },
+ },
+ {
+ key: "processSampler",
+ value: function (e) {
+ var t = this.json;
+ t.samplers || (t.samplers = []);
+ var n = {
+ magFilter: Pt[e.magFilter],
+ minFilter: Pt[e.minFilter],
+ wrapS: Pt[e.wrapS],
+ wrapT: Pt[e.wrapT],
+ };
+ return t.samplers.push(n) - 1;
+ },
+ },
+ {
+ key: "processTexture",
+ value: function (e) {
+ var t = this.options,
+ n = this.cache,
+ r = this.json;
+ if (n.textures.has(e)) return n.textures.get(e);
+ r.textures || (r.textures = []),
+ e instanceof A.CompressedTexture &&
+ (e = Mt(e, t.maxTextureSize));
+ var i = e.userData.mimeType;
+ "image/webp" === i && (i = "image/png");
+ var a = {
+ sampler: this.processSampler(e),
+ source: this.processImage(e.image, e.format, e.flipY, i),
+ };
+ e.name && (a.name = e.name),
+ this._invokeAll(function (t) {
+ t.writeTexture && t.writeTexture(e, a);
+ });
+ var o = r.textures.push(a) - 1;
+ return n.textures.set(e, o), o;
+ },
+ },
+ {
+ key: "processMaterial",
+ value: function (e) {
+ var t = this.cache,
+ n = this.json;
+ if (t.materials.has(e)) return t.materials.get(e);
+ if (e.isShaderMaterial)
+ return (
+ console.warn(
+ "GLTFExporter: THREE.ShaderMaterial not supported."
+ ),
+ null
+ );
+ n.materials || (n.materials = []);
+ var r = { pbrMetallicRoughness: {} };
+ !0 !== e.isMeshStandardMaterial &&
+ !0 !== e.isMeshBasicMaterial &&
+ console.warn(
+ "GLTFExporter: Use MeshStandardMaterial or MeshBasicMaterial for best results."
+ );
+ var i = e.color.toArray().concat([e.opacity]);
+ if (
+ (zt(i, [1, 1, 1, 1]) ||
+ (r.pbrMetallicRoughness.baseColorFactor = i),
+ e.isMeshStandardMaterial
+ ? ((r.pbrMetallicRoughness.metallicFactor =
+ e.metalness),
+ (r.pbrMetallicRoughness.roughnessFactor =
+ e.roughness))
+ : ((r.pbrMetallicRoughness.metallicFactor = 0.5),
+ (r.pbrMetallicRoughness.roughnessFactor = 0.5)),
+ e.metalnessMap || e.roughnessMap)
+ ) {
+ var a = this.buildMetalRoughTexture(
+ e.metalnessMap,
+ e.roughnessMap
+ ),
+ o = {
+ index: this.processTexture(a),
+ channel: a.channel,
+ };
+ this.applyTextureTransform(o, a),
+ (r.pbrMetallicRoughness.metallicRoughnessTexture = o);
+ }
+ if (e.map) {
+ var s = {
+ index: this.processTexture(e.map),
+ texCoord: e.map.channel,
+ };
+ this.applyTextureTransform(s, e.map),
+ (r.pbrMetallicRoughness.baseColorTexture = s);
+ }
+ if (e.emissive) {
+ var l = e.emissive;
+ if (
+ (Math.max(l.r, l.g, l.b) > 0 &&
+ (r.emissiveFactor = e.emissive.toArray()),
+ e.emissiveMap)
+ ) {
+ var u = {
+ index: this.processTexture(e.emissiveMap),
+ texCoord: e.emissiveMap.channel,
+ };
+ this.applyTextureTransform(u, e.emissiveMap),
+ (r.emissiveTexture = u);
+ }
+ }
+ if (e.normalMap) {
+ var c = {
+ index: this.processTexture(e.normalMap),
+ texCoord: e.normalMap.channel,
+ };
+ e.normalScale &&
+ 1 !== e.normalScale.x &&
+ (c.scale = e.normalScale.x),
+ this.applyTextureTransform(c, e.normalMap),
+ (r.normalTexture = c);
+ }
+ if (e.aoMap) {
+ var f = {
+ index: this.processTexture(e.aoMap),
+ texCoord: e.aoMap.channel,
+ };
+ 1 !== e.aoMapIntensity && (f.strength = e.aoMapIntensity),
+ this.applyTextureTransform(f, e.aoMap),
+ (r.occlusionTexture = f);
+ }
+ e.transparent
+ ? (r.alphaMode = "BLEND")
+ : e.alphaTest > 0 &&
+ ((r.alphaMode = "MASK"), (r.alphaCutoff = e.alphaTest)),
+ e.side === A.DoubleSide && (r.doubleSided = !0),
+ "" !== e.name && (r.name = e.name),
+ this.serializeUserData(e, r),
+ this._invokeAll(function (t) {
+ t.writeMaterial && t.writeMaterial(e, r);
+ });
+ var d = n.materials.push(r) - 1;
+ return t.materials.set(e, d), d;
+ },
+ },
+ {
+ key: "processMesh",
+ value: function (e) {
+ var t,
+ n = this.cache,
+ r = this.json,
+ i = [e.geometry.uuid];
+ if (Array.isArray(e.material))
+ for (var a = 0, o = e.material.length; a < o; a++)
+ i.push(e.material[a].uuid);
+ else i.push(e.material.uuid);
+ var s = i.join(":");
+ if (n.meshes.has(s)) return n.meshes.get(s);
+ var u,
+ c = e.geometry;
+ u = e.isLineSegments
+ ? Rt.LINES
+ : e.isLineLoop
+ ? Rt.LINE_LOOP
+ : e.isLine
+ ? Rt.LINE_STRIP
+ : e.isPoints
+ ? Rt.POINTS
+ : e.material.wireframe
+ ? Rt.LINES
+ : Rt.TRIANGLES;
+ var f = {},
+ d = {},
+ h = [],
+ p = [],
+ v =
+ ((t = { uv: "TEXCOORD_0" }),
+ (0, l.Z)(
+ t,
+ A.REVISION.replace(/\D+/g, "") >= 152 ? "uv1" : "uv2",
+ "TEXCOORD_1"
+ ),
+ (0, l.Z)(t, "color", "COLOR_0"),
+ (0, l.Z)(t, "skinWeight", "WEIGHTS_0"),
+ (0, l.Z)(t, "skinIndex", "JOINTS_0"),
+ t),
+ m = c.getAttribute("normal");
+ void 0 === m ||
+ this.isNormalizedNormalAttribute(m) ||
+ (console.warn(
+ "THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."
+ ),
+ c.setAttribute(
+ "normal",
+ this.createNormalizedNormalAttribute(m)
+ ));
+ var g = null;
+ for (var y in c.attributes)
+ if ("morph" !== y.slice(0, 5)) {
+ var b = c.attributes[y];
+ y = v[y] || y.toUpperCase();
+ if (
+ (/^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/.test(
+ y
+ ) || (y = "_" + y),
+ n.attributes.has(this.getUID(b)))
+ )
+ d[y] = n.attributes.get(this.getUID(b));
+ else {
+ g = null;
+ var x = b.array;
+ "JOINTS_0" !== y ||
+ x instanceof Uint16Array ||
+ x instanceof Uint8Array ||
+ (console.warn(
+ 'GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'
+ ),
+ (g = new A.BufferAttribute(
+ new Uint16Array(x),
+ b.itemSize,
+ b.normalized
+ )));
+ var S = this.processAccessor(g || b, c);
+ null !== S &&
+ (y.startsWith("_") ||
+ this.detectMeshQuantization(y, b),
+ (d[y] = S),
+ n.attributes.set(this.getUID(b), S));
+ }
+ }
+ if (
+ (void 0 !== m && c.setAttribute("normal", m),
+ 0 === Object.keys(d).length)
+ )
+ return null;
+ if (
+ void 0 !== e.morphTargetInfluences &&
+ e.morphTargetInfluences.length > 0
+ ) {
+ var E = [],
+ _ = [],
+ C = {};
+ if (void 0 !== e.morphTargetDictionary)
+ for (var w in e.morphTargetDictionary)
+ C[e.morphTargetDictionary[w]] = w;
+ for (var T = 0; T < e.morphTargetInfluences.length; ++T) {
+ var M = {},
+ I = !1;
+ for (var k in c.morphAttributes)
+ if ("position" === k || "normal" === k) {
+ var R = c.morphAttributes[k][T],
+ B = k.toUpperCase(),
+ P = c.attributes[k];
+ if (n.attributes.has(this.getUID(R, !0)))
+ M[B] = n.attributes.get(this.getUID(R, !0));
+ else {
+ var L = R.clone();
+ if (!c.morphTargetsRelative)
+ for (var D = 0, U = R.count; D < U; D++)
+ for (var F = 0; F < R.itemSize; F++)
+ 0 === F && L.setX(D, R.getX(D) - P.getX(D)),
+ 1 === F &&
+ L.setY(D, R.getY(D) - P.getY(D)),
+ 2 === F &&
+ L.setZ(D, R.getZ(D) - P.getZ(D)),
+ 3 === F &&
+ L.setW(D, R.getW(D) - P.getW(D));
+ (M[B] = this.processAccessor(L, c)),
+ n.attributes.set(this.getUID(P, !0), M[B]);
+ }
+ } else
+ I ||
+ (console.warn(
+ "GLTFExporter: Only POSITION and NORMAL morph are supported."
+ ),
+ (I = !0));
+ p.push(M),
+ E.push(e.morphTargetInfluences[T]),
+ void 0 !== e.morphTargetDictionary && _.push(C[T]);
+ }
+ (f.weights = E),
+ _.length > 0 &&
+ ((f.extras = {}), (f.extras.targetNames = _));
+ }
+ var O = Array.isArray(e.material);
+ if (O && 0 === c.groups.length) return null;
+ for (
+ var N = O ? e.material : [e.material],
+ G = O
+ ? c.groups
+ : [
+ {
+ materialIndex: 0,
+ start: void 0,
+ count: void 0,
+ },
+ ],
+ Z = 0,
+ z = G.length;
+ Z < z;
+ Z++
+ ) {
+ var Q = { mode: u, attributes: d };
+ if (
+ (this.serializeUserData(c, Q),
+ p.length > 0 && (Q.targets = p),
+ null !== c.index)
+ ) {
+ var H = this.getUID(c.index);
+ (void 0 === G[Z].start && void 0 === G[Z].count) ||
+ (H += ":" + G[Z].start + ":" + G[Z].count),
+ n.attributes.has(H)
+ ? (Q.indices = n.attributes.get(H))
+ : ((Q.indices = this.processAccessor(
+ c.index,
+ c,
+ G[Z].start,
+ G[Z].count
+ )),
+ n.attributes.set(H, Q.indices)),
+ null === Q.indices && delete Q.indices;
+ }
+ var V = this.processMaterial(N[G[Z].materialIndex]);
+ null !== V && (Q.material = V), h.push(Q);
+ }
+ (f.primitives = h),
+ r.meshes || (r.meshes = []),
+ this._invokeAll(function (t) {
+ t.writeMesh && t.writeMesh(e, f);
+ });
+ var j = r.meshes.push(f) - 1;
+ return n.meshes.set(s, j), j;
+ },
+ },
+ {
+ key: "detectMeshQuantization",
+ value: function (e, t) {
+ if (!this.extensionsUsed[Bt]) {
+ var n = void 0;
+ switch (t.array.constructor) {
+ case Int8Array:
+ n = "byte";
+ break;
+ case Uint8Array:
+ n = "unsigned byte";
+ break;
+ case Int16Array:
+ n = "short";
+ break;
+ case Uint16Array:
+ n = "unsigned short";
+ break;
+ default:
+ return;
+ }
+ t.normalized && (n += " normalized");
+ var r = e.split("_", 1)[0];
+ It[r] &&
+ It[r].includes(n) &&
+ ((this.extensionsUsed[Bt] = !0),
+ (this.extensionsRequired[Bt] = !0));
+ }
+ },
+ },
+ {
+ key: "processCamera",
+ value: function (e) {
+ var t = this.json;
+ t.cameras || (t.cameras = []);
+ var n = e.isOrthographicCamera,
+ r = { type: n ? "orthographic" : "perspective" };
+ return (
+ n
+ ? (r.orthographic = {
+ xmag: 2 * e.right,
+ ymag: 2 * e.top,
+ zfar: e.far <= 0 ? 0.001 : e.far,
+ znear: e.near < 0 ? 0 : e.near,
+ })
+ : (r.perspective = {
+ aspectRatio: e.aspect,
+ yfov: A.MathUtils.degToRad(e.fov),
+ zfar: e.far <= 0 ? 0.001 : e.far,
+ znear: e.near < 0 ? 0 : e.near,
+ }),
+ "" !== e.name && (r.name = e.type),
+ t.cameras.push(r) - 1
+ );
+ },
+ },
+ {
+ key: "processAnimation",
+ value: function (e, t) {
+ var n = this.json,
+ r = this.nodeMap;
+ n.animations || (n.animations = []);
+ for (
+ var i = (e = kt.Utils.mergeMorphTargetTracks(
+ e.clone(),
+ t
+ )).tracks,
+ a = [],
+ o = [],
+ s = 0;
+ s < i.length;
+ ++s
+ ) {
+ var l = i[s],
+ u = A.PropertyBinding.parseTrackName(l.name),
+ c = A.PropertyBinding.findNode(t, u.nodeName),
+ f = Lt[u.propertyName];
+ if (
+ ("bones" === u.objectName &&
+ (c =
+ !0 === c.isSkinnedMesh
+ ? c.skeleton.getBoneByName(u.objectIndex)
+ : void 0),
+ !c || !f)
+ )
+ return (
+ console.warn(
+ 'THREE.GLTFExporter: Could not export animation track "%s".',
+ l.name
+ ),
+ null
+ );
+ var d = l.values.length / l.times.length;
+ f === Lt.morphTargetInfluences &&
+ (d /= c.morphTargetInfluences.length);
+ var h = void 0;
+ !0 ===
+ l.createInterpolant
+ .isInterpolantFactoryMethodGLTFCubicSpline
+ ? ((h = "CUBICSPLINE"), (d /= 3))
+ : (h =
+ l.getInterpolation() === A.InterpolateDiscrete
+ ? "STEP"
+ : "LINEAR"),
+ o.push({
+ input: this.processAccessor(
+ new A.BufferAttribute(l.times, 1)
+ ),
+ output: this.processAccessor(
+ new A.BufferAttribute(l.values, d)
+ ),
+ interpolation: h,
+ }),
+ a.push({
+ sampler: o.length - 1,
+ target: { node: r.get(c), path: f },
+ });
+ }
+ return (
+ n.animations.push({
+ name: e.name || "clip_" + n.animations.length,
+ samplers: o,
+ channels: a,
+ }),
+ n.animations.length - 1
+ );
+ },
+ },
+ {
+ key: "processSkin",
+ value: function (e) {
+ var t = this.json,
+ n = this.nodeMap,
+ r = t.nodes[n.get(e)],
+ i = e.skeleton;
+ if (void 0 === i) return null;
+ var a = e.skeleton.bones[0];
+ if (void 0 === a) return null;
+ for (
+ var o = [],
+ s = new Float32Array(16 * i.bones.length),
+ l = new A.Matrix4(),
+ u = 0;
+ u < i.bones.length;
+ ++u
+ )
+ o.push(n.get(i.bones[u])),
+ l.copy(i.boneInverses[u]),
+ l.multiply(e.bindMatrix).toArray(s, 16 * u);
+ return (
+ void 0 === t.skins && (t.skins = []),
+ t.skins.push({
+ inverseBindMatrices: this.processAccessor(
+ new A.BufferAttribute(s, 16)
+ ),
+ joints: o,
+ skeleton: n.get(a),
+ }),
+ (r.skin = t.skins.length - 1)
+ );
+ },
+ },
+ {
+ key: "processNode",
+ value: function (e) {
+ var t = this.json,
+ n = this.options,
+ r = this.nodeMap;
+ t.nodes || (t.nodes = []);
+ var i = {};
+ if (n.trs) {
+ var a = e.quaternion.toArray(),
+ o = e.position.toArray(),
+ s = e.scale.toArray();
+ zt(a, [0, 0, 0, 1]) || (i.rotation = a),
+ zt(o, [0, 0, 0]) || (i.translation = o),
+ zt(s, [1, 1, 1]) || (i.scale = s);
+ } else
+ e.matrixAutoUpdate && e.updateMatrix(),
+ !1 === Ht(e.matrix) && (i.matrix = e.matrix.elements);
+ if (
+ ("" !== e.name && (i.name = String(e.name)),
+ this.serializeUserData(e, i),
+ e.isMesh || e.isLine || e.isPoints)
+ ) {
+ var l = this.processMesh(e);
+ null !== l && (i.mesh = l);
+ } else e.isCamera && (i.camera = this.processCamera(e));
+ if (
+ (e.isSkinnedMesh && this.skins.push(e),
+ e.children.length > 0)
+ ) {
+ for (
+ var u = [], c = 0, f = e.children.length;
+ c < f;
+ c++
+ ) {
+ var d = e.children[c];
+ if (d.visible || !1 === n.onlyVisible) {
+ var h = this.processNode(d);
+ null !== h && u.push(h);
+ }
+ }
+ u.length > 0 && (i.children = u);
+ }
+ this._invokeAll(function (t) {
+ t.writeNode && t.writeNode(e, i);
+ });
+ var p = t.nodes.push(i) - 1;
+ return r.set(e, p), p;
+ },
+ },
+ {
+ key: "processScene",
+ value: function (e) {
+ var t = this.json,
+ n = this.options;
+ t.scenes || ((t.scenes = []), (t.scene = 0));
+ var r = {};
+ "" !== e.name && (r.name = e.name), t.scenes.push(r);
+ for (var i = [], a = 0, o = e.children.length; a < o; a++) {
+ var s = e.children[a];
+ if (s.visible || !1 === n.onlyVisible) {
+ var l = this.processNode(s);
+ null !== l && i.push(l);
+ }
+ }
+ i.length > 0 && (r.nodes = i), this.serializeUserData(e, r);
+ },
+ },
+ {
+ key: "processObjects",
+ value: function (e) {
+ var t = new A.Scene();
+ t.name = "AuxScene";
+ for (var n = 0; n < e.length; n++) t.children.push(e[n]);
+ this.processScene(t);
+ },
+ },
+ {
+ key: "processInput",
+ value: function (e) {
+ var t = this.options;
+ (e = e instanceof Array ? e : [e]),
+ this._invokeAll(function (t) {
+ t.beforeParse && t.beforeParse(e);
+ });
+ for (var n = [], r = 0; r < e.length; r++)
+ e[r] instanceof A.Scene
+ ? this.processScene(e[r])
+ : n.push(e[r]);
+ n.length > 0 && this.processObjects(n);
+ for (var i = 0; i < this.skins.length; ++i)
+ this.processSkin(this.skins[i]);
+ for (var a = 0; a < t.animations.length; ++a)
+ this.processAnimation(t.animations[a], e[0]);
+ this._invokeAll(function (t) {
+ t.afterParse && t.afterParse(e);
+ });
+ },
+ },
+ {
+ key: "_invokeAll",
+ value: function (e) {
+ for (var t = 0, n = this.plugins.length; t < n; t++)
+ e(this.plugins[t]);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Jt = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_lights_punctual");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeNode",
+ value: function (e, t) {
+ if (e.isLight)
+ if (
+ e.isDirectionalLight ||
+ e.isPointLight ||
+ e.isSpotLight
+ ) {
+ var n = this.writer,
+ r = n.json,
+ i = n.extensionsUsed,
+ a = {};
+ e.name && (a.name = e.name),
+ (a.color = e.color.toArray()),
+ (a.intensity = e.intensity),
+ e.isDirectionalLight
+ ? (a.type = "directional")
+ : e.isPointLight
+ ? ((a.type = "point"),
+ e.distance > 0 && (a.range = e.distance))
+ : e.isSpotLight &&
+ ((a.type = "spot"),
+ e.distance > 0 && (a.range = e.distance),
+ (a.spot = {}),
+ (a.spot.innerConeAngle =
+ (e.penumbra - 1) * e.angle * -1),
+ (a.spot.outerConeAngle = e.angle)),
+ void 0 !== e.decay &&
+ 2 !== e.decay &&
+ console.warn(
+ "THREE.GLTFExporter: Light decay may be lost. glTF is physically-based, and expects light.decay=2."
+ ),
+ !e.target ||
+ (e.target.parent === e &&
+ 0 === e.target.position.x &&
+ 0 === e.target.position.y &&
+ -1 === e.target.position.z) ||
+ console.warn(
+ "THREE.GLTFExporter: Light direction may be lost. For best results, make light.target a child of the light with position 0,0,-1."
+ ),
+ i[this.name] ||
+ ((r.extensions = r.extensions || {}),
+ (r.extensions[this.name] = { lights: [] }),
+ (i[this.name] = !0));
+ var o = r.extensions[this.name].lights;
+ o.push(a),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = { light: o.length - 1 });
+ } else
+ console.warn(
+ "THREE.GLTFExporter: Only directional, point, and spot lights are supported.",
+ e
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Kt = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_unlit");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshBasicMaterial) {
+ var n = this.writer.extensionsUsed;
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = {}),
+ (n[this.name] = !0),
+ (t.pbrMetallicRoughness.metallicFactor = 0),
+ (t.pbrMetallicRoughness.roughnessFactor = 0.9);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ $t = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_clearcoat");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 0 !== e.clearcoat) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (((i.clearcoatFactor = e.clearcoat), e.clearcoatMap)) {
+ var a = {
+ index: n.processTexture(e.clearcoatMap),
+ texCoord: e.clearcoatMap.channel,
+ };
+ n.applyTextureTransform(a, e.clearcoatMap),
+ (i.clearcoatTexture = a);
+ }
+ if (
+ ((i.clearcoatRoughnessFactor = e.clearcoatRoughness),
+ e.clearcoatRoughnessMap)
+ ) {
+ var o = {
+ index: n.processTexture(e.clearcoatRoughnessMap),
+ texCoord: e.clearcoatRoughnessMap.channel,
+ };
+ n.applyTextureTransform(o, e.clearcoatRoughnessMap),
+ (i.clearcoatRoughnessTexture = o);
+ }
+ if (e.clearcoatNormalMap) {
+ var s = {
+ index: n.processTexture(e.clearcoatNormalMap),
+ texCoord: e.clearcoatNormalMap.channel,
+ };
+ n.applyTextureTransform(s, e.clearcoatNormalMap),
+ (i.clearcoatNormalTexture = s);
+ }
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ en = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_iridescence");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 0 !== e.iridescence) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (
+ ((i.iridescenceFactor = e.iridescence),
+ e.iridescenceMap)
+ ) {
+ var a = {
+ index: n.processTexture(e.iridescenceMap),
+ texCoord: e.iridescenceMap.channel,
+ };
+ n.applyTextureTransform(a, e.iridescenceMap),
+ (i.iridescenceTexture = a);
+ }
+ if (
+ ((i.iridescenceIor = e.iridescenceIOR),
+ (i.iridescenceThicknessMinimum =
+ e.iridescenceThicknessRange[0]),
+ (i.iridescenceThicknessMaximum =
+ e.iridescenceThicknessRange[1]),
+ e.iridescenceThicknessMap)
+ ) {
+ var o = {
+ index: n.processTexture(e.iridescenceThicknessMap),
+ texCoord: e.iridescenceThicknessMap.channel,
+ };
+ n.applyTextureTransform(o, e.iridescenceThicknessMap),
+ (i.iridescenceThicknessTexture = o);
+ }
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ tn = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_transmission");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 0 !== e.transmission) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (
+ ((i.transmissionFactor = e.transmission),
+ e.transmissionMap)
+ ) {
+ var a = {
+ index: n.processTexture(e.transmissionMap),
+ texCoord: e.transmissionMap.channel,
+ };
+ n.applyTextureTransform(a, e.transmissionMap),
+ (i.transmissionTexture = a);
+ }
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ nn = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_volume");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 0 !== e.transmission) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (((i.thicknessFactor = e.thickness), e.thicknessMap)) {
+ var a = {
+ index: n.processTexture(e.thicknessMap),
+ texCoord: e.thicknessMap.channel,
+ };
+ n.applyTextureTransform(a, e.thicknessMap),
+ (i.thicknessTexture = a);
+ }
+ (i.attenuationDistance = e.attenuationDistance),
+ (i.attenuationColor = e.attenuationColor.toArray()),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ rn = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_ior");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 1.5 !== e.ior) {
+ var n = this.writer.extensionsUsed,
+ r = {};
+ (r.ior = e.ior),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = r),
+ (n[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ an = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_specular");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (
+ e.isMeshPhysicalMaterial &&
+ (1 !== e.specularIntensity ||
+ !e.specularColor.equals(Dt) ||
+ e.specularIntensityMap ||
+ e.specularColorTexture)
+ ) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (e.specularIntensityMap) {
+ var a = {
+ index: n.processTexture(e.specularIntensityMap),
+ texCoord: e.specularIntensityMap.channel,
+ };
+ n.applyTextureTransform(a, e.specularIntensityMap),
+ (i.specularTexture = a);
+ }
+ if (e.specularColorMap) {
+ var o = {
+ index: n.processTexture(e.specularColorMap),
+ texCoord: e.specularColorMap.channel,
+ };
+ n.applyTextureTransform(o, e.specularColorMap),
+ (i.specularColorTexture = o);
+ }
+ (i.specularFactor = e.specularIntensity),
+ (i.specularColorFactor = e.specularColor.toArray()),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ on = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_sheen");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 0 != e.sheen) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (e.sheenRoughnessMap) {
+ var a = {
+ index: n.processTexture(e.sheenRoughnessMap),
+ texCoord: e.sheenRoughnessMap.channel,
+ };
+ n.applyTextureTransform(a, e.sheenRoughnessMap),
+ (i.sheenRoughnessTexture = a);
+ }
+ if (e.sheenColorMap) {
+ var o = {
+ index: n.processTexture(e.sheenColorMap),
+ texCoord: e.sheenColorMap.channel,
+ };
+ n.applyTextureTransform(o, e.sheenColorMap),
+ (i.sheenColorTexture = o);
+ }
+ (i.sheenRoughnessFactor = e.sheenRoughness),
+ (i.sheenColorFactor = e.sheenColor.toArray()),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ sn = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_anisotropy");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshPhysicalMaterial && 0 != e.anisotropy) {
+ var n = this.writer,
+ r = n.extensionsUsed,
+ i = {};
+ if (e.anisotropyMap) {
+ var a = { index: n.processTexture(e.anisotropyMap) };
+ n.applyTextureTransform(a, e.anisotropyMap),
+ (i.anisotropyTexture = a);
+ }
+ (i.anisotropyStrength = e.anisotropy),
+ (i.anisotropyRotation = e.anisotropyRotation),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = i),
+ (r[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ ln = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.writer = t),
+ (this.name = "KHR_materials_emissive_strength");
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "writeMaterial",
+ value: function (e, t) {
+ if (e.isMeshStandardMaterial && 1 !== e.emissiveIntensity) {
+ var n = this.writer.extensionsUsed,
+ r = {};
+ (r.emissiveStrength = e.emissiveIntensity),
+ (t.extensions = t.extensions || {}),
+ (t.extensions[this.name] = r),
+ (n[this.name] = !0);
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ un = null,
+ cn = null,
+ fn = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "parse",
+ value: function (t) {
+ var n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {
+ decodeSpeed: 5,
+ encodeSpeed: 5,
+ encoderMethod: e.MESH_EDGEBREAKER_ENCODING,
+ quantization: [16, 8, 8, 8, 8],
+ exportUvs: !0,
+ exportNormals: !0,
+ exportColor: !1,
+ };
+ if (t instanceof A.BufferGeometry && t.isBufferGeometry)
+ throw new Error(
+ "DRACOExporter: The first parameter of parse() is now an instance of Mesh or Points."
+ );
+ if (void 0 === DracoEncoderModule)
+ throw new Error(
+ "THREE.DRACOExporter: required the draco_encoder to work."
+ );
+ var r,
+ i,
+ a = t.geometry,
+ o = DracoEncoderModule(),
+ s = new o.Encoder();
+ if (!a.isBufferGeometry)
+ throw new Error(
+ "THREE.DRACOExporter.parse(geometry, options): geometry is not a THREE.BufferGeometry instance."
+ );
+ if (t instanceof A.Mesh && t.isMesh) {
+ (r = new o.MeshBuilder()), (i = new o.Mesh());
+ var l = a.getAttribute("position");
+ r.AddFloatAttributeToMesh(
+ i,
+ o.POSITION,
+ l.count,
+ l.itemSize,
+ l.array
+ );
+ var u = a.getIndex();
+ if (null !== u) r.AddFacesToMesh(i, u.count / 3, u.array);
+ else {
+ for (
+ var c = new (
+ l.count > 65535 ? Uint32Array : Uint16Array
+ )(l.count),
+ f = 0;
+ f < c.length;
+ f++
+ )
+ c[f] = f;
+ r.AddFacesToMesh(i, l.count, c);
+ }
+ if (n.exportNormals) {
+ var d = a.getAttribute("normal");
+ void 0 !== d &&
+ r.AddFloatAttributeToMesh(
+ i,
+ o.NORMAL,
+ d.count,
+ d.itemSize,
+ d.array
+ );
+ }
+ if (n.exportUvs) {
+ var h = a.getAttribute("uv");
+ void 0 !== h &&
+ r.AddFloatAttributeToMesh(
+ i,
+ o.TEX_COORD,
+ h.count,
+ h.itemSize,
+ h.array
+ );
+ }
+ if (n.exportColor) {
+ var p = a.getAttribute("color");
+ void 0 !== p &&
+ r.AddFloatAttributeToMesh(
+ i,
+ o.COLOR,
+ p.count,
+ p.itemSize,
+ p.array
+ );
+ }
+ } else {
+ if (!(t instanceof A.Points && t.isPoints))
+ throw new Error(
+ "DRACOExporter: Unsupported object type."
+ );
+ (r = new o.PointCloudBuilder()), (i = new o.PointCloud());
+ var v = a.getAttribute("position");
+ if (
+ (r.AddFloatAttribute(
+ i,
+ o.POSITION,
+ v.count,
+ v.itemSize,
+ v.array
+ ),
+ n.exportColor)
+ ) {
+ var m = a.getAttribute("color");
+ void 0 !== m &&
+ r.AddFloatAttribute(
+ i,
+ o.COLOR,
+ m.count,
+ m.itemSize,
+ m.array
+ );
+ }
+ }
+ var g,
+ y = new o.DracoInt8Array(),
+ b = void 0 !== n.encodeSpeed ? n.encodeSpeed : 5,
+ x = void 0 !== n.decodeSpeed ? n.decodeSpeed : 5;
+ if (
+ (s.SetSpeedOptions(b, x),
+ void 0 !== n.encoderMethod &&
+ s.SetEncodingMethod(n.encoderMethod),
+ void 0 !== n.quantization)
+ )
+ for (var S = 0; S < 5; S++)
+ void 0 !== n.quantization[S] &&
+ s.SetAttributeQuantization(S, n.quantization[S]);
+ if (
+ ((g =
+ t instanceof A.Mesh && t.isMesh
+ ? s.EncodeMeshToDracoBuffer(i, y)
+ : s.EncodePointCloudToDracoBuffer(i, !0, y)),
+ o.destroy(i),
+ 0 === g)
+ )
+ throw new Error(
+ "THREE.DRACOExporter: Draco encoding failed."
+ );
+ for (
+ var E = new Int8Array(new ArrayBuffer(g)), _ = 0;
+ _ < g;
+ _++
+ )
+ E[_] = y.GetValue(_);
+ return o.destroy(y), o.destroy(s), o.destroy(r), E;
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ dn = fn,
+ hn = null,
+ pn = null,
+ vn = null,
+ mn = null;
+ function gn() {
+ var e = new THREE.Scene(),
+ t = new THREE.BoxGeometry();
+ t.deleteAttribute("uv");
+ var n = new THREE.MeshStandardMaterial({ side: THREE.BackSide }),
+ r = new THREE.MeshStandardMaterial(),
+ i = new THREE.PointLight(16777215, 5, 28, 2);
+ i.position.set(0.418, 16.199, 0.3), e.add(i);
+ var a = new THREE.Mesh(t, n);
+ a.position.set(-0.757, 13.219, 0.717),
+ a.scale.set(31.713, 28.305, 28.591),
+ e.add(a);
+ var o = new THREE.Mesh(t, r);
+ o.position.set(-10.906, 2.009, 1.846),
+ o.rotation.set(0, -0.195, 0),
+ o.scale.set(2.328, 7.905, 4.651),
+ e.add(o);
+ var s = new THREE.Mesh(t, r);
+ s.position.set(-5.607, -0.754, -0.758),
+ s.rotation.set(0, 0.994, 0),
+ s.scale.set(1.97, 1.534, 3.955),
+ e.add(s);
+ var l = new THREE.Mesh(t, r);
+ l.position.set(6.167, 0.857, 7.803),
+ l.rotation.set(0, 0.561, 0),
+ l.scale.set(3.927, 6.285, 3.687),
+ e.add(l);
+ var u = new THREE.Mesh(t, r);
+ u.position.set(-2.017, 0.018, 6.124),
+ u.rotation.set(0, 0.333, 0),
+ u.scale.set(2.002, 4.566, 2.064),
+ e.add(u);
+ var c = new THREE.Mesh(t, r);
+ c.position.set(2.291, -0.756, -2.621),
+ c.rotation.set(0, -0.286, 0),
+ c.scale.set(1.546, 1.552, 1.496),
+ e.add(c);
+ var f = new THREE.Mesh(t, r);
+ f.position.set(-2.193, -0.369, -5.547),
+ f.rotation.set(0, 0.516, 0),
+ f.scale.set(3.875, 3.487, 2.986),
+ e.add(f);
+ var d = new THREE.Mesh(t, A(50));
+ d.position.set(-16.116, 14.37, 8.208),
+ d.scale.set(0.1, 2.428, 2.739),
+ e.add(d);
+ var h = new THREE.Mesh(t, A(50));
+ h.position.set(-16.109, 18.021, -8.207),
+ h.scale.set(0.1, 2.425, 2.751),
+ e.add(h);
+ var p = new THREE.Mesh(t, A(17));
+ p.position.set(14.904, 12.198, -1.832),
+ p.scale.set(0.15, 4.265, 6.331),
+ e.add(p);
+ var v = new THREE.Mesh(t, A(43));
+ v.position.set(-0.462, 8.89, 14.52),
+ v.scale.set(4.38, 5.441, 0.088),
+ e.add(v);
+ var m = new THREE.Mesh(t, A(20));
+ m.position.set(3.235, 11.486, -12.541),
+ m.scale.set(2.5, 2, 0.1),
+ e.add(m);
+ var g = new THREE.Mesh(t, A(100));
+ function A(e) {
+ var t = new THREE.MeshBasicMaterial();
+ return t.color.setScalar(e), t;
+ }
+ return g.position.set(0, 20, 0), g.scale.set(1, 0.1, 1), e.add(g), e;
+ }
+ var An = null,
+ yn = new A.Quaternion(),
+ bn = new A.Vector3(),
+ xn = new A.Vector3(),
+ Sn = new A.Vector3(),
+ En = new A.Vector3(),
+ _n = new A.Vector3(),
+ Cn = new A.Quaternion(),
+ wn = new A.Vector3(),
+ Tn = new A.Vector3(),
+ Mn = new A.Vector3(),
+ In = new A.Matrix4(),
+ kn = null;
+ function Rn(e, t) {
+ return Mn.setFromMatrixPosition(e.matrixWorld).applyMatrix4(t);
+ }
+ function Bn(e, t, n, r) {
+ var i = Rn(n, r);
+ (e[3 * t + 0] = i.x), (e[3 * t + 1] = i.y), (e[3 * t + 2] = i.z);
+ }
+ var Pn = null,
+ Ln = null,
+ Dn = null,
+ Un = null,
+ Fn = null,
+ On = null,
+ Nn = new A.Vector3(),
+ Gn = new A.Quaternion(),
+ Zn = new A.Vector3(),
+ zn = new A.Matrix4(),
+ Qn = null,
+ Hn = null,
+ Vn = null,
+ jn = 0;
+ function Wn() {
+ return jn >= Vn.length && Vn.push(new Quaternion()), Vn[jn++];
+ }
+ var Xn = new Map();
+ function Yn(e, t, n, r) {
+ var i = e.skeleton.bones,
+ a = e.geometry.userData.MMD.bones[t],
+ o = i[t];
+ if (!Xn.has(t)) {
+ var s = Wn();
+ if (
+ (Xn.set(t, s.copy(o.quaternion)),
+ r && a.grant && !a.grant.isLocal && a.grant.affectRotation)
+ ) {
+ var l = a.grant.parentIndex,
+ u = a.grant.ratio;
+ Xn.has(l) || Yn(e, l, n, r), r.addGrantRotation(o, Xn.get(l), u);
+ }
+ if (n && a.ik) {
+ e.updateMatrixWorld(!0), n.updateOne(a.ik);
+ for (var c = a.ik.links, f = 0, d = c.length; f < d; f++) {
+ var h = c[f];
+ if (!1 !== h.enabled) {
+ var p = h.index;
+ Xn.has(p) && Xn.set(p, Xn.get(p).copy(i[p].quaternion));
+ }
+ }
+ }
+ s.copy(o.quaternion);
+ }
+ }
+ var qn = null,
+ Jn = new A.Quaternion(),
+ Kn = null,
+ $n = parseInt(A.REVISION.replace(/\D+/g, "")),
+ er = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e)).isReflector = !0),
+ (r.type = "Reflector"),
+ (r.camera = new A.PerspectiveCamera());
+ var a = (0, f.Z)(r),
+ o =
+ void 0 !== i.color
+ ? new A.Color(i.color)
+ : new A.Color(8355711),
+ s = i.textureWidth || 512,
+ l = i.textureHeight || 512,
+ u = i.clipBias || 0,
+ c = i.shader || n.ReflectorShader,
+ d = void 0 !== i.multisample ? i.multisample : 4,
+ h = new A.Plane(),
+ v = new A.Vector3(),
+ m = new A.Vector3(),
+ g = new A.Vector3(),
+ y = new A.Matrix4(),
+ b = new A.Vector3(0, 0, -1),
+ x = new A.Vector4(),
+ S = new A.Vector3(),
+ E = new A.Vector3(),
+ _ = new A.Vector4(),
+ C = new A.Matrix4(),
+ w = r.camera,
+ T = new A.WebGLRenderTarget(s, l, {
+ samples: d,
+ type: A.HalfFloatType,
+ }),
+ M = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(c.uniforms),
+ fragmentShader: c.fragmentShader,
+ vertexShader: c.vertexShader,
+ });
+ return (
+ (M.uniforms.tDiffuse.value = T.texture),
+ (M.uniforms.color.value = o),
+ (M.uniforms.textureMatrix.value = C),
+ (r.material = M),
+ (r.onBeforeRender = function (e, t, n) {
+ if (
+ (m.setFromMatrixPosition(a.matrixWorld),
+ g.setFromMatrixPosition(n.matrixWorld),
+ y.extractRotation(a.matrixWorld),
+ v.set(0, 0, 1),
+ v.applyMatrix4(y),
+ S.subVectors(m, g),
+ !(S.dot(v) > 0))
+ ) {
+ S.reflect(v).negate(),
+ S.add(m),
+ y.extractRotation(n.matrixWorld),
+ b.set(0, 0, -1),
+ b.applyMatrix4(y),
+ b.add(g),
+ E.subVectors(m, b),
+ E.reflect(v).negate(),
+ E.add(m),
+ w.position.copy(S),
+ w.up.set(0, 1, 0),
+ w.up.applyMatrix4(y),
+ w.up.reflect(v),
+ w.lookAt(E),
+ (w.far = n.far),
+ w.updateMatrixWorld(),
+ w.projectionMatrix.copy(n.projectionMatrix),
+ C.set(
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0.5,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ C.multiply(w.projectionMatrix),
+ C.multiply(w.matrixWorldInverse),
+ C.multiply(a.matrixWorld),
+ h.setFromNormalAndCoplanarPoint(v, m),
+ h.applyMatrix4(w.matrixWorldInverse),
+ x.set(h.normal.x, h.normal.y, h.normal.z, h.constant);
+ var r = w.projectionMatrix;
+ (_.x = (Math.sign(x.x) + r.elements[8]) / r.elements[0]),
+ (_.y = (Math.sign(x.y) + r.elements[9]) / r.elements[5]),
+ (_.z = -1),
+ (_.w = (1 + r.elements[10]) / r.elements[14]),
+ x.multiplyScalar(2 / x.dot(_)),
+ (r.elements[2] = x.x),
+ (r.elements[6] = x.y),
+ (r.elements[10] = x.z + 1 - u),
+ (r.elements[14] = x.w),
+ (a.visible = !1);
+ var i = e.getRenderTarget(),
+ o = e.xr.enabled,
+ s = e.shadowMap.autoUpdate,
+ l = e.toneMapping,
+ c = !1;
+ (c =
+ "outputColorSpace" in e
+ ? "srgb" === e.outputColorSpace
+ : 3001 === e.outputEncoding),
+ (e.xr.enabled = !1),
+ (e.shadowMap.autoUpdate = !1),
+ "outputColorSpace" in e
+ ? (e.outputColorSpace = "linear-srgb")
+ : (e.outputEncoding = 3e3),
+ (e.toneMapping = A.NoToneMapping),
+ e.setRenderTarget(T),
+ e.state.buffers.depth.setMask(!0),
+ !1 === e.autoClear && e.clear(),
+ e.render(t, w),
+ (e.xr.enabled = o),
+ (e.shadowMap.autoUpdate = s),
+ (e.toneMapping = l),
+ "outputColorSpace" in e
+ ? (e.outputColorSpace = c ? "srgb" : "srgb-linear")
+ : (e.outputEncoding = c ? 3001 : 3e3),
+ e.setRenderTarget(i);
+ var f = n.viewport;
+ void 0 !== f && e.state.viewport(f), (a.visible = !0);
+ }
+ }),
+ (r.getRenderTarget = function () {
+ return T;
+ }),
+ (r.dispose = function () {
+ T.dispose(), a.material.dispose();
+ }),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Mesh),
+ tr = er;
+ "\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\t\tvarying vec4 vUv;\n\n\t\t#include \n\n\t\tfloat blendOverlay( float base, float blend ) {\n\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\n\t\t}\n\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\n\t\t\t#include \n\t\t\t#include <".concat(
+ $n >= 154 ? "colorspace_fragment" : "encodings_fragment",
+ ">\n\n\t\t}"
+ );
+ var nr = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e)).isRefractor = !0),
+ (r.type = "Refractor"),
+ (r.camera = new A.PerspectiveCamera());
+ var a = (0, f.Z)(r),
+ o =
+ void 0 !== i.color
+ ? new A.Color(i.color)
+ : new A.Color(8355711),
+ s = i.textureWidth || 512,
+ l = i.textureHeight || 512,
+ u = i.clipBias || 0,
+ c = i.shader || n.RefractorShader,
+ d = void 0 !== i.multisample ? i.multisample : 4,
+ h = r.camera;
+ (h.matrixAutoUpdate = !1), (h.userData.refractor = !0);
+ var v = new A.Plane(),
+ m = new A.Matrix4(),
+ g = new A.WebGLRenderTarget(s, l, {
+ samples: d,
+ type: A.HalfFloatType,
+ });
+ (r.material = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(c.uniforms),
+ vertexShader: c.vertexShader,
+ fragmentShader: c.fragmentShader,
+ transparent: !0,
+ })),
+ (r.material.uniforms.color.value = o),
+ (r.material.uniforms.tDiffuse.value = g.texture),
+ (r.material.uniforms.textureMatrix.value = m);
+ var y = (function () {
+ var e = new A.Vector3(),
+ t = new A.Vector3(),
+ n = new A.Matrix4(),
+ r = new A.Vector3(),
+ i = new A.Vector3();
+ return function (o) {
+ return (
+ e.setFromMatrixPosition(a.matrixWorld),
+ t.setFromMatrixPosition(o.matrixWorld),
+ r.subVectors(e, t),
+ n.extractRotation(a.matrixWorld),
+ i.set(0, 0, 1),
+ i.applyMatrix4(n),
+ r.dot(i) < 0
+ );
+ };
+ })(),
+ b = (function () {
+ var e = new A.Vector3(),
+ t = new A.Vector3(),
+ n = new A.Quaternion(),
+ r = new A.Vector3();
+ return function () {
+ a.matrixWorld.decompose(t, n, r),
+ e.set(0, 0, 1).applyQuaternion(n).normalize(),
+ e.negate(),
+ v.setFromNormalAndCoplanarPoint(e, t);
+ };
+ })(),
+ x = (function () {
+ var e = new A.Plane(),
+ t = new A.Vector4(),
+ n = new A.Vector4();
+ return function (r) {
+ h.matrixWorld.copy(r.matrixWorld),
+ h.matrixWorldInverse.copy(h.matrixWorld).invert(),
+ h.projectionMatrix.copy(r.projectionMatrix),
+ (h.far = r.far),
+ e.copy(v),
+ e.applyMatrix4(h.matrixWorldInverse),
+ t.set(e.normal.x, e.normal.y, e.normal.z, e.constant);
+ var i = h.projectionMatrix;
+ (n.x = (Math.sign(t.x) + i.elements[8]) / i.elements[0]),
+ (n.y = (Math.sign(t.y) + i.elements[9]) / i.elements[5]),
+ (n.z = -1),
+ (n.w = (1 + i.elements[10]) / i.elements[14]),
+ t.multiplyScalar(2 / t.dot(n)),
+ (i.elements[2] = t.x),
+ (i.elements[6] = t.y),
+ (i.elements[10] = t.z + 1 - u),
+ (i.elements[14] = t.w);
+ };
+ })();
+ return (
+ (r.onBeforeRender = function (e, t, n) {
+ !0 !== n.userData.refractor &&
+ !0 !== !y(n) &&
+ (b(),
+ (function (e) {
+ m.set(
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0.5,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ m.multiply(e.projectionMatrix),
+ m.multiply(e.matrixWorldInverse),
+ m.multiply(a.matrixWorld);
+ })(n),
+ x(n),
+ (function (e, t, n) {
+ a.visible = !1;
+ var r = e.getRenderTarget(),
+ i = e.xr.enabled,
+ o = e.shadowMap.autoUpdate,
+ s = e.toneMapping,
+ l = !1;
+ (l =
+ "outputColorSpace" in e
+ ? "srgb" === e.outputColorSpace
+ : 3001 === e.outputEncoding),
+ (e.xr.enabled = !1),
+ (e.shadowMap.autoUpdate = !1),
+ "outputColorSpace" in e
+ ? (e.outputColorSpace = "linear-srgb")
+ : (e.outputEncoding = 3e3),
+ (e.toneMapping = A.NoToneMapping),
+ e.setRenderTarget(g),
+ !1 === e.autoClear && e.clear(),
+ e.render(t, h),
+ (e.xr.enabled = i),
+ (e.shadowMap.autoUpdate = o),
+ (e.toneMapping = s),
+ e.setRenderTarget(r),
+ "outputColorSpace" in e
+ ? (e.outputColorSpace = l ? "srgb" : "srgb-linear")
+ : (e.outputEncoding = l ? 3001 : 3e3);
+ var u = n.viewport;
+ void 0 !== u && e.state.viewport(u), (a.visible = !0);
+ })(e, t, n));
+ }),
+ (r.getRenderTarget = function () {
+ return g;
+ }),
+ (r.dispose = function () {
+ g.dispose(), a.material.dispose();
+ }),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Mesh),
+ rr = nr;
+ "\n\n\t\tuniform vec3 color;\n\t\tuniform sampler2D tDiffuse;\n\n\t\tvarying vec4 vUv;\n\n\t\tfloat blendOverlay( float base, float blend ) {\n\n\t\t\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );\n\n\t\t}\n\n\t\tvec3 blendOverlay( vec3 base, vec3 blend ) {\n\n\t\t\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvec4 base = texture2DProj( tDiffuse, vUv );\n\t\t\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );\n\n\t\t\t#include \n\t\t\t#include <".concat(
+ $n >= 154 ? "colorspace_fragment" : "encodings_fragment",
+ ">\n\n\t\t}"
+ );
+ var ir = new A.Matrix4(),
+ ar = null,
+ or = new A.BufferGeometry(),
+ sr = new Float32Array([
+ -1, -1, 0, 0, 0, 1, -1, 0, 1, 0, 1, 1, 0, 1, 1, -1, 1, 0, 0, 1,
+ ]),
+ lr = new A.InterleavedBuffer(sr, 5),
+ ur = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ (0, p.Z)(this, n),
+ ((e = t.call(
+ this,
+ n.Geometry,
+ new A.MeshBasicMaterial({ opacity: 0, transparent: !0 })
+ )).isLensflare = !0),
+ (e.type = "Lensflare"),
+ (e.frustumCulled = !1),
+ (e.renderOrder = 1 / 0);
+ var r = new A.Vector3(),
+ i = new A.Vector3(),
+ a = new A.DataTexture(
+ new Uint8Array(768),
+ 16,
+ 16,
+ A.RGBAFormat
+ );
+ (a.minFilter = A.NearestFilter),
+ (a.magFilter = A.NearestFilter),
+ (a.wrapS = A.ClampToEdgeWrapping),
+ (a.wrapT = A.ClampToEdgeWrapping);
+ var o = new A.DataTexture(
+ new Uint8Array(768),
+ 16,
+ 16,
+ A.RGBAFormat
+ );
+ (o.minFilter = A.NearestFilter),
+ (o.magFilter = A.NearestFilter),
+ (o.wrapS = A.ClampToEdgeWrapping),
+ (o.wrapT = A.ClampToEdgeWrapping);
+ var s = n.Geometry,
+ l = new A.RawShaderMaterial({
+ uniforms: {
+ scale: { value: null },
+ screenPosition: { value: null },
+ },
+ vertexShader:
+ "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform vec3 screenPosition;\n\t\t\t\tuniform vec2 scale;\n\n\t\t\t\tattribute vec3 position;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );\n\n\t\t\t\t}",
+ fragmentShader:
+ "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 );\n\n\t\t\t\t}",
+ depthTest: !0,
+ depthWrite: !1,
+ transparent: !1,
+ }),
+ u = new A.RawShaderMaterial({
+ uniforms: {
+ map: { value: a },
+ scale: { value: null },
+ screenPosition: { value: null },
+ },
+ vertexShader:
+ "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform vec3 screenPosition;\n\t\t\t\tuniform vec2 scale;\n\n\t\t\t\tattribute vec3 position;\n\t\t\t\tattribute vec2 uv;\n\n\t\t\t\tvarying vec2 vUV;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvUV = uv;\n\n\t\t\t\t\tgl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );\n\n\t\t\t\t}",
+ fragmentShader:
+ "\n\n\t\t\t\tprecision highp float;\n\n\t\t\t\tuniform sampler2D map;\n\n\t\t\t\tvarying vec2 vUV;\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tgl_FragColor = texture2D( map, vUV );\n\n\t\t\t\t}",
+ depthTest: !1,
+ depthWrite: !1,
+ transparent: !1,
+ }),
+ c = new A.Mesh(s, l),
+ f = [],
+ d = fr.Shader,
+ h = new A.RawShaderMaterial({
+ uniforms: {
+ map: { value: null },
+ occlusionMap: { value: o },
+ color: { value: new A.Color(16777215) },
+ scale: { value: new A.Vector2() },
+ screenPosition: { value: new A.Vector3() },
+ },
+ vertexShader: d.vertexShader,
+ fragmentShader: d.fragmentShader,
+ blending: A.AdditiveBlending,
+ transparent: !0,
+ depthWrite: !1,
+ }),
+ v = new A.Mesh(s, h);
+ e.addElement = function (e) {
+ f.push(e);
+ };
+ var m = new A.Vector2(),
+ g = new A.Vector2(),
+ y = new A.Box2(),
+ b = new A.Vector4();
+ return (
+ (e.onBeforeRender = function (e, t, n) {
+ e.getCurrentViewport(b);
+ var d = b.w / b.z,
+ p = b.z / 2,
+ A = b.w / 2,
+ x = 16 / b.w;
+ if (
+ (m.set(x * d, x),
+ y.min.set(b.x, b.y),
+ y.max.set(b.x + (b.z - 16), b.y + (b.w - 16)),
+ i.setFromMatrixPosition(this.matrixWorld),
+ i.applyMatrix4(n.matrixWorldInverse),
+ !(i.z > 0) &&
+ (r.copy(i).applyMatrix4(n.projectionMatrix),
+ (g.x = b.x + r.x * p + p - 8),
+ (g.y = b.y + r.y * A + A - 8),
+ y.containsPoint(g)))
+ ) {
+ e.copyFramebufferToTexture(g, a);
+ var S = l.uniforms;
+ (S.scale.value = m),
+ (S.screenPosition.value = r),
+ e.renderBufferDirect(n, null, s, l, c, null),
+ e.copyFramebufferToTexture(g, o),
+ ((S = u.uniforms).scale.value = m),
+ (S.screenPosition.value = r),
+ e.renderBufferDirect(n, null, s, u, c, null);
+ for (
+ var E = 2 * -r.x, _ = 2 * -r.y, C = 0, w = f.length;
+ C < w;
+ C++
+ ) {
+ var T = f[C],
+ M = h.uniforms;
+ M.color.value.copy(T.color),
+ (M.map.value = T.texture),
+ (M.screenPosition.value.x = r.x + E * T.distance),
+ (M.screenPosition.value.y = r.y + _ * T.distance),
+ (x = T.size / b.w);
+ var I = b.w / b.z;
+ M.scale.value.set(x * I, x),
+ (h.uniformsNeedUpdate = !0),
+ e.renderBufferDirect(n, null, s, h, v, null);
+ }
+ }
+ }),
+ (e.dispose = function () {
+ l.dispose(),
+ u.dispose(),
+ h.dispose(),
+ a.dispose(),
+ o.dispose();
+ for (var e = 0, t = f.length; e < t; e++)
+ f[e].texture.dispose();
+ }),
+ e
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Mesh),
+ cr = ur,
+ fr = (0, v.Z)(function e(t) {
+ var n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0,
+ i =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : new A.Color(16777215);
+ (0, p.Z)(this, e),
+ (this.texture = t),
+ (this.size = n),
+ (this.distance = r),
+ (this.color = i);
+ }),
+ dr = null,
+ hr = null,
+ pr = new Int32Array([
+ 0, 265, 515, 778, 1030, 1295, 1541, 1804, 2060, 2309, 2575, 2822,
+ 3082, 3331, 3593, 3840, 400, 153, 915, 666, 1430, 1183, 1941, 1692,
+ 2460, 2197, 2975, 2710, 3482, 3219, 3993, 3728, 560, 825, 51, 314,
+ 1590, 1855, 1077, 1340, 2620, 2869, 2111, 2358, 3642, 3891, 3129,
+ 3376, 928, 681, 419, 170, 1958, 1711, 1445, 1196, 2988, 2725, 2479,
+ 2214, 4010, 3747, 3497, 3232, 1120, 1385, 1635, 1898, 102, 367, 613,
+ 876, 3180, 3429, 3695, 3942, 2154, 2403, 2665, 2912, 1520, 1273,
+ 2035, 1786, 502, 255, 1013, 764, 3580, 3317, 4095, 3830, 2554, 2291,
+ 3065, 2800, 1616, 1881, 1107, 1370, 598, 863, 85, 348, 3676, 3925,
+ 3167, 3414, 2650, 2899, 2137, 2384, 1984, 1737, 1475, 1226, 966,
+ 719, 453, 204, 4044, 3781, 3535, 3270, 3018, 2755, 2505, 2240, 2240,
+ 2505, 2755, 3018, 3270, 3535, 3781, 4044, 204, 453, 719, 966, 1226,
+ 1475, 1737, 1984, 2384, 2137, 2899, 2650, 3414, 3167, 3925, 3676,
+ 348, 85, 863, 598, 1370, 1107, 1881, 1616, 2800, 3065, 2291, 2554,
+ 3830, 4095, 3317, 3580, 764, 1013, 255, 502, 1786, 2035, 1273, 1520,
+ 2912, 2665, 2403, 2154, 3942, 3695, 3429, 3180, 876, 613, 367, 102,
+ 1898, 1635, 1385, 1120, 3232, 3497, 3747, 4010, 2214, 2479, 2725,
+ 2988, 1196, 1445, 1711, 1958, 170, 419, 681, 928, 3376, 3129, 3891,
+ 3642, 2358, 2111, 2869, 2620, 1340, 1077, 1855, 1590, 314, 51, 825,
+ 560, 3728, 3993, 3219, 3482, 2710, 2975, 2197, 2460, 1692, 1941,
+ 1183, 1430, 666, 915, 153, 400, 3840, 3593, 3331, 3082, 2822, 2575,
+ 2309, 2060, 1804, 1541, 1295, 1030, 778, 515, 265, 0,
+ ]),
+ vr = new Int32Array([
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+ 8, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 9,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 8, 3, 9, 8,
+ 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 10, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 8, 3, 1, 2, 10, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 9, 2, 10, 0, 2, 9, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 2, 8, 3, 2, 10, 8, 10, 9, 8, -1, -1, -1, -1, -1,
+ -1, -1, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 0, 11, 2, 8, 11, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1,
+ 9, 0, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 11, 2, 1,
+ 9, 11, 9, 8, 11, -1, -1, -1, -1, -1, -1, -1, 3, 10, 1, 11, 10, 3,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 10, 1, 0, 8, 10, 8, 11,
+ 10, -1, -1, -1, -1, -1, -1, -1, 3, 9, 0, 3, 11, 9, 11, 10, 9, -1,
+ -1, -1, -1, -1, -1, -1, 9, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4, 3, 0, 7, 3, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+ 1, 9, 8, 4, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 1, 9, 4,
+ 7, 1, 7, 3, 1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 10, 8, 4, 7, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 4, 7, 3, 0, 4, 1, 2, 10, -1,
+ -1, -1, -1, -1, -1, -1, 9, 2, 10, 9, 0, 2, 8, 4, 7, -1, -1, -1, -1,
+ -1, -1, -1, 2, 10, 9, 2, 9, 7, 2, 7, 3, 7, 9, 4, -1, -1, -1, -1, 8,
+ 4, 7, 3, 11, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 4, 7,
+ 11, 2, 4, 2, 0, 4, -1, -1, -1, -1, -1, -1, -1, 9, 0, 1, 8, 4, 7, 2,
+ 3, 11, -1, -1, -1, -1, -1, -1, -1, 4, 7, 11, 9, 4, 11, 9, 11, 2, 9,
+ 2, 1, -1, -1, -1, -1, 3, 10, 1, 3, 11, 10, 7, 8, 4, -1, -1, -1, -1,
+ -1, -1, -1, 1, 11, 10, 1, 4, 11, 1, 0, 4, 7, 11, 4, -1, -1, -1, -1,
+ 4, 7, 8, 9, 0, 11, 9, 11, 10, 11, 0, 3, -1, -1, -1, -1, 4, 7, 11, 4,
+ 11, 9, 9, 11, 10, -1, -1, -1, -1, -1, -1, -1, 9, 5, 4, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 5, 4, 0, 8, 3, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 0, 5, 4, 1, 5, 0, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 8, 5, 4, 8, 3, 5, 3, 1, 5, -1, -1, -1, -1,
+ -1, -1, -1, 1, 2, 10, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 3, 0, 8, 1, 2, 10, 4, 9, 5, -1, -1, -1, -1, -1, -1, -1, 5, 2,
+ 10, 5, 4, 2, 4, 0, 2, -1, -1, -1, -1, -1, -1, -1, 2, 10, 5, 3, 2, 5,
+ 3, 5, 4, 3, 4, 8, -1, -1, -1, -1, 9, 5, 4, 2, 3, 11, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 0, 11, 2, 0, 8, 11, 4, 9, 5, -1, -1, -1, -1,
+ -1, -1, -1, 0, 5, 4, 0, 1, 5, 2, 3, 11, -1, -1, -1, -1, -1, -1, -1,
+ 2, 1, 5, 2, 5, 8, 2, 8, 11, 4, 8, 5, -1, -1, -1, -1, 10, 3, 11, 10,
+ 1, 3, 9, 5, 4, -1, -1, -1, -1, -1, -1, -1, 4, 9, 5, 0, 8, 1, 8, 10,
+ 1, 8, 11, 10, -1, -1, -1, -1, 5, 4, 0, 5, 0, 11, 5, 11, 10, 11, 0,
+ 3, -1, -1, -1, -1, 5, 4, 8, 5, 8, 10, 10, 8, 11, -1, -1, -1, -1, -1,
+ -1, -1, 9, 7, 8, 5, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9,
+ 3, 0, 9, 5, 3, 5, 7, 3, -1, -1, -1, -1, -1, -1, -1, 0, 7, 8, 0, 1,
+ 7, 1, 5, 7, -1, -1, -1, -1, -1, -1, -1, 1, 5, 3, 3, 5, 7, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 9, 7, 8, 9, 5, 7, 10, 1, 2, -1, -1,
+ -1, -1, -1, -1, -1, 10, 1, 2, 9, 5, 0, 5, 3, 0, 5, 7, 3, -1, -1, -1,
+ -1, 8, 0, 2, 8, 2, 5, 8, 5, 7, 10, 5, 2, -1, -1, -1, -1, 2, 10, 5,
+ 2, 5, 3, 3, 5, 7, -1, -1, -1, -1, -1, -1, -1, 7, 9, 5, 7, 8, 9, 3,
+ 11, 2, -1, -1, -1, -1, -1, -1, -1, 9, 5, 7, 9, 7, 2, 9, 2, 0, 2, 7,
+ 11, -1, -1, -1, -1, 2, 3, 11, 0, 1, 8, 1, 7, 8, 1, 5, 7, -1, -1, -1,
+ -1, 11, 2, 1, 11, 1, 7, 7, 1, 5, -1, -1, -1, -1, -1, -1, -1, 9, 5,
+ 8, 8, 5, 7, 10, 1, 3, 10, 3, 11, -1, -1, -1, -1, 5, 7, 0, 5, 0, 9,
+ 7, 11, 0, 1, 0, 10, 11, 10, 0, -1, 11, 10, 0, 11, 0, 3, 10, 5, 0, 8,
+ 0, 7, 5, 7, 0, -1, 11, 10, 5, 7, 11, 5, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 0, 8, 3, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 9, 0, 1, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 8, 3,
+ 1, 9, 8, 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, 1, 6, 5, 2, 6, 1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 6, 5, 1, 2, 6, 3, 0, 8, -1,
+ -1, -1, -1, -1, -1, -1, 9, 6, 5, 9, 0, 6, 0, 2, 6, -1, -1, -1, -1,
+ -1, -1, -1, 5, 9, 8, 5, 8, 2, 5, 2, 6, 3, 2, 8, -1, -1, -1, -1, 2,
+ 3, 11, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 0, 8,
+ 11, 2, 0, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, 0, 1, 9, 2, 3, 11,
+ 5, 10, 6, -1, -1, -1, -1, -1, -1, -1, 5, 10, 6, 1, 9, 2, 9, 11, 2,
+ 9, 8, 11, -1, -1, -1, -1, 6, 3, 11, 6, 5, 3, 5, 1, 3, -1, -1, -1,
+ -1, -1, -1, -1, 0, 8, 11, 0, 11, 5, 0, 5, 1, 5, 11, 6, -1, -1, -1,
+ -1, 3, 11, 6, 0, 3, 6, 0, 6, 5, 0, 5, 9, -1, -1, -1, -1, 6, 5, 9, 6,
+ 9, 11, 11, 9, 8, -1, -1, -1, -1, -1, -1, -1, 5, 10, 6, 4, 7, 8, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 3, 0, 4, 7, 3, 6, 5, 10, -1,
+ -1, -1, -1, -1, -1, -1, 1, 9, 0, 5, 10, 6, 8, 4, 7, -1, -1, -1, -1,
+ -1, -1, -1, 10, 6, 5, 1, 9, 7, 1, 7, 3, 7, 9, 4, -1, -1, -1, -1, 6,
+ 1, 2, 6, 5, 1, 4, 7, 8, -1, -1, -1, -1, -1, -1, -1, 1, 2, 5, 5, 2,
+ 6, 3, 0, 4, 3, 4, 7, -1, -1, -1, -1, 8, 4, 7, 9, 0, 5, 0, 6, 5, 0,
+ 2, 6, -1, -1, -1, -1, 7, 3, 9, 7, 9, 4, 3, 2, 9, 5, 9, 6, 2, 6, 9,
+ -1, 3, 11, 2, 7, 8, 4, 10, 6, 5, -1, -1, -1, -1, -1, -1, -1, 5, 10,
+ 6, 4, 7, 2, 4, 2, 0, 2, 7, 11, -1, -1, -1, -1, 0, 1, 9, 4, 7, 8, 2,
+ 3, 11, 5, 10, 6, -1, -1, -1, -1, 9, 2, 1, 9, 11, 2, 9, 4, 11, 7, 11,
+ 4, 5, 10, 6, -1, 8, 4, 7, 3, 11, 5, 3, 5, 1, 5, 11, 6, -1, -1, -1,
+ -1, 5, 1, 11, 5, 11, 6, 1, 0, 11, 7, 11, 4, 0, 4, 11, -1, 0, 5, 9,
+ 0, 6, 5, 0, 3, 6, 11, 6, 3, 8, 4, 7, -1, 6, 5, 9, 6, 9, 11, 4, 7, 9,
+ 7, 11, 9, -1, -1, -1, -1, 10, 4, 9, 6, 4, 10, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 4, 10, 6, 4, 9, 10, 0, 8, 3, -1, -1, -1, -1, -1,
+ -1, -1, 10, 0, 1, 10, 6, 0, 6, 4, 0, -1, -1, -1, -1, -1, -1, -1, 8,
+ 3, 1, 8, 1, 6, 8, 6, 4, 6, 1, 10, -1, -1, -1, -1, 1, 4, 9, 1, 2, 4,
+ 2, 6, 4, -1, -1, -1, -1, -1, -1, -1, 3, 0, 8, 1, 2, 9, 2, 4, 9, 2,
+ 6, 4, -1, -1, -1, -1, 0, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 8, 3, 2, 8, 2, 4, 4, 2, 6, -1, -1, -1, -1, -1, -1, -1,
+ 10, 4, 9, 10, 6, 4, 11, 2, 3, -1, -1, -1, -1, -1, -1, -1, 0, 8, 2,
+ 2, 8, 11, 4, 9, 10, 4, 10, 6, -1, -1, -1, -1, 3, 11, 2, 0, 1, 6, 0,
+ 6, 4, 6, 1, 10, -1, -1, -1, -1, 6, 4, 1, 6, 1, 10, 4, 8, 1, 2, 1,
+ 11, 8, 11, 1, -1, 9, 6, 4, 9, 3, 6, 9, 1, 3, 11, 6, 3, -1, -1, -1,
+ -1, 8, 11, 1, 8, 1, 0, 11, 6, 1, 9, 1, 4, 6, 4, 1, -1, 3, 11, 6, 3,
+ 6, 0, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1, 6, 4, 8, 11, 6, 8, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 10, 6, 7, 8, 10, 8, 9, 10,
+ -1, -1, -1, -1, -1, -1, -1, 0, 7, 3, 0, 10, 7, 0, 9, 10, 6, 7, 10,
+ -1, -1, -1, -1, 10, 6, 7, 1, 10, 7, 1, 7, 8, 1, 8, 0, -1, -1, -1,
+ -1, 10, 6, 7, 10, 7, 1, 1, 7, 3, -1, -1, -1, -1, -1, -1, -1, 1, 2,
+ 6, 1, 6, 8, 1, 8, 9, 8, 6, 7, -1, -1, -1, -1, 2, 6, 9, 2, 9, 1, 6,
+ 7, 9, 0, 9, 3, 7, 3, 9, -1, 7, 8, 0, 7, 0, 6, 6, 0, 2, -1, -1, -1,
+ -1, -1, -1, -1, 7, 3, 2, 6, 7, 2, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 2, 3, 11, 10, 6, 8, 10, 8, 9, 8, 6, 7, -1, -1, -1, -1, 2, 0,
+ 7, 2, 7, 11, 0, 9, 7, 6, 7, 10, 9, 10, 7, -1, 1, 8, 0, 1, 7, 8, 1,
+ 10, 7, 6, 7, 10, 2, 3, 11, -1, 11, 2, 1, 11, 1, 7, 10, 6, 1, 6, 7,
+ 1, -1, -1, -1, -1, 8, 9, 6, 8, 6, 7, 9, 1, 6, 11, 6, 3, 1, 3, 6, -1,
+ 0, 9, 1, 11, 6, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 8, 0,
+ 7, 0, 6, 3, 11, 0, 11, 6, 0, -1, -1, -1, -1, 7, 11, 6, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 7, 6, 11, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 0, 8, 11, 7, 6, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 0, 1, 9, 11, 7, 6, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 8, 1, 9, 8, 3, 1, 11, 7, 6, -1, -1, -1, -1, -1,
+ -1, -1, 10, 1, 2, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 1, 2, 10, 3, 0, 8, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, 2, 9, 0, 2,
+ 10, 9, 6, 11, 7, -1, -1, -1, -1, -1, -1, -1, 6, 11, 7, 2, 10, 3, 10,
+ 8, 3, 10, 9, 8, -1, -1, -1, -1, 7, 2, 3, 6, 2, 7, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 7, 0, 8, 7, 6, 0, 6, 2, 0, -1, -1, -1, -1,
+ -1, -1, -1, 2, 7, 6, 2, 3, 7, 0, 1, 9, -1, -1, -1, -1, -1, -1, -1,
+ 1, 6, 2, 1, 8, 6, 1, 9, 8, 8, 7, 6, -1, -1, -1, -1, 10, 7, 6, 10, 1,
+ 7, 1, 3, 7, -1, -1, -1, -1, -1, -1, -1, 10, 7, 6, 1, 7, 10, 1, 8, 7,
+ 1, 0, 8, -1, -1, -1, -1, 0, 3, 7, 0, 7, 10, 0, 10, 9, 6, 10, 7, -1,
+ -1, -1, -1, 7, 6, 10, 7, 10, 8, 8, 10, 9, -1, -1, -1, -1, -1, -1,
+ -1, 6, 8, 4, 11, 8, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 6,
+ 11, 3, 0, 6, 0, 4, 6, -1, -1, -1, -1, -1, -1, -1, 8, 6, 11, 8, 4, 6,
+ 9, 0, 1, -1, -1, -1, -1, -1, -1, -1, 9, 4, 6, 9, 6, 3, 9, 3, 1, 11,
+ 3, 6, -1, -1, -1, -1, 6, 8, 4, 6, 11, 8, 2, 10, 1, -1, -1, -1, -1,
+ -1, -1, -1, 1, 2, 10, 3, 0, 11, 0, 6, 11, 0, 4, 6, -1, -1, -1, -1,
+ 4, 11, 8, 4, 6, 11, 0, 2, 9, 2, 10, 9, -1, -1, -1, -1, 10, 9, 3, 10,
+ 3, 2, 9, 4, 3, 11, 3, 6, 4, 6, 3, -1, 8, 2, 3, 8, 4, 2, 4, 6, 2, -1,
+ -1, -1, -1, -1, -1, -1, 0, 4, 2, 4, 6, 2, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1, 9, 0, 2, 3, 4, 2, 4, 6, 4, 3, 8, -1, -1, -1, -1,
+ 1, 9, 4, 1, 4, 2, 2, 4, 6, -1, -1, -1, -1, -1, -1, -1, 8, 1, 3, 8,
+ 6, 1, 8, 4, 6, 6, 10, 1, -1, -1, -1, -1, 10, 1, 0, 10, 0, 6, 6, 0,
+ 4, -1, -1, -1, -1, -1, -1, -1, 4, 6, 3, 4, 3, 8, 6, 10, 3, 0, 3, 9,
+ 10, 9, 3, -1, 10, 9, 4, 6, 10, 4, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 4, 9, 5, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 8, 3, 4, 9, 5, 11, 7, 6, -1, -1, -1, -1, -1, -1, -1, 5, 0, 1, 5,
+ 4, 0, 7, 6, 11, -1, -1, -1, -1, -1, -1, -1, 11, 7, 6, 8, 3, 4, 3, 5,
+ 4, 3, 1, 5, -1, -1, -1, -1, 9, 5, 4, 10, 1, 2, 7, 6, 11, -1, -1, -1,
+ -1, -1, -1, -1, 6, 11, 7, 1, 2, 10, 0, 8, 3, 4, 9, 5, -1, -1, -1,
+ -1, 7, 6, 11, 5, 4, 10, 4, 2, 10, 4, 0, 2, -1, -1, -1, -1, 3, 4, 8,
+ 3, 5, 4, 3, 2, 5, 10, 5, 2, 11, 7, 6, -1, 7, 2, 3, 7, 6, 2, 5, 4, 9,
+ -1, -1, -1, -1, -1, -1, -1, 9, 5, 4, 0, 8, 6, 0, 6, 2, 6, 8, 7, -1,
+ -1, -1, -1, 3, 6, 2, 3, 7, 6, 1, 5, 0, 5, 4, 0, -1, -1, -1, -1, 6,
+ 2, 8, 6, 8, 7, 2, 1, 8, 4, 8, 5, 1, 5, 8, -1, 9, 5, 4, 10, 1, 6, 1,
+ 7, 6, 1, 3, 7, -1, -1, -1, -1, 1, 6, 10, 1, 7, 6, 1, 0, 7, 8, 7, 0,
+ 9, 5, 4, -1, 4, 0, 10, 4, 10, 5, 0, 3, 10, 6, 10, 7, 3, 7, 10, -1,
+ 7, 6, 10, 7, 10, 8, 5, 4, 10, 4, 8, 10, -1, -1, -1, -1, 6, 9, 5, 6,
+ 11, 9, 11, 8, 9, -1, -1, -1, -1, -1, -1, -1, 3, 6, 11, 0, 6, 3, 0,
+ 5, 6, 0, 9, 5, -1, -1, -1, -1, 0, 11, 8, 0, 5, 11, 0, 1, 5, 5, 6,
+ 11, -1, -1, -1, -1, 6, 11, 3, 6, 3, 5, 5, 3, 1, -1, -1, -1, -1, -1,
+ -1, -1, 1, 2, 10, 9, 5, 11, 9, 11, 8, 11, 5, 6, -1, -1, -1, -1, 0,
+ 11, 3, 0, 6, 11, 0, 9, 6, 5, 6, 9, 1, 2, 10, -1, 11, 8, 5, 11, 5, 6,
+ 8, 0, 5, 10, 5, 2, 0, 2, 5, -1, 6, 11, 3, 6, 3, 5, 2, 10, 3, 10, 5,
+ 3, -1, -1, -1, -1, 5, 8, 9, 5, 2, 8, 5, 6, 2, 3, 8, 2, -1, -1, -1,
+ -1, 9, 5, 6, 9, 6, 0, 0, 6, 2, -1, -1, -1, -1, -1, -1, -1, 1, 5, 8,
+ 1, 8, 0, 5, 6, 8, 3, 8, 2, 6, 2, 8, -1, 1, 5, 6, 2, 1, 6, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 1, 3, 6, 1, 6, 10, 3, 8, 6, 5, 6, 9,
+ 8, 9, 6, -1, 10, 1, 0, 10, 0, 6, 9, 5, 0, 5, 6, 0, -1, -1, -1, -1,
+ 0, 3, 8, 5, 6, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 5, 6,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 5, 10, 7, 5,
+ 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 5, 10, 11, 7, 5, 8,
+ 3, 0, -1, -1, -1, -1, -1, -1, -1, 5, 11, 7, 5, 10, 11, 1, 9, 0, -1,
+ -1, -1, -1, -1, -1, -1, 10, 7, 5, 10, 11, 7, 9, 8, 1, 8, 3, 1, -1,
+ -1, -1, -1, 11, 1, 2, 11, 7, 1, 7, 5, 1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 8, 3, 1, 2, 7, 1, 7, 5, 7, 2, 11, -1, -1, -1, -1, 9, 7, 5, 9, 2,
+ 7, 9, 0, 2, 2, 11, 7, -1, -1, -1, -1, 7, 5, 2, 7, 2, 11, 5, 9, 2, 3,
+ 2, 8, 9, 8, 2, -1, 2, 5, 10, 2, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1,
+ -1, -1, 8, 2, 0, 8, 5, 2, 8, 7, 5, 10, 2, 5, -1, -1, -1, -1, 9, 0,
+ 1, 5, 10, 3, 5, 3, 7, 3, 10, 2, -1, -1, -1, -1, 9, 8, 2, 9, 2, 1, 8,
+ 7, 2, 10, 2, 5, 7, 5, 2, -1, 1, 3, 5, 3, 7, 5, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, 0, 8, 7, 0, 7, 1, 1, 7, 5, -1, -1, -1, -1, -1,
+ -1, -1, 9, 0, 3, 9, 3, 5, 5, 3, 7, -1, -1, -1, -1, -1, -1, -1, 9, 8,
+ 7, 5, 9, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 5, 8, 4, 5, 10,
+ 8, 10, 11, 8, -1, -1, -1, -1, -1, -1, -1, 5, 0, 4, 5, 11, 0, 5, 10,
+ 11, 11, 3, 0, -1, -1, -1, -1, 0, 1, 9, 8, 4, 10, 8, 10, 11, 10, 4,
+ 5, -1, -1, -1, -1, 10, 11, 4, 10, 4, 5, 11, 3, 4, 9, 4, 1, 3, 1, 4,
+ -1, 2, 5, 1, 2, 8, 5, 2, 11, 8, 4, 5, 8, -1, -1, -1, -1, 0, 4, 11,
+ 0, 11, 3, 4, 5, 11, 2, 11, 1, 5, 1, 11, -1, 0, 2, 5, 0, 5, 9, 2, 11,
+ 5, 4, 5, 8, 11, 8, 5, -1, 9, 4, 5, 2, 11, 3, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 2, 5, 10, 3, 5, 2, 3, 4, 5, 3, 8, 4, -1, -1, -1, -1,
+ 5, 10, 2, 5, 2, 4, 4, 2, 0, -1, -1, -1, -1, -1, -1, -1, 3, 10, 2, 3,
+ 5, 10, 3, 8, 5, 4, 5, 8, 0, 1, 9, -1, 5, 10, 2, 5, 2, 4, 1, 9, 2, 9,
+ 4, 2, -1, -1, -1, -1, 8, 4, 5, 8, 5, 3, 3, 5, 1, -1, -1, -1, -1, -1,
+ -1, -1, 0, 4, 5, 1, 0, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 8,
+ 4, 5, 8, 5, 3, 9, 0, 5, 0, 3, 5, -1, -1, -1, -1, 9, 4, 5, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 11, 7, 4, 9, 11, 9,
+ 10, 11, -1, -1, -1, -1, -1, -1, -1, 0, 8, 3, 4, 9, 7, 9, 11, 7, 9,
+ 10, 11, -1, -1, -1, -1, 1, 10, 11, 1, 11, 4, 1, 4, 0, 7, 4, 11, -1,
+ -1, -1, -1, 3, 1, 4, 3, 4, 8, 1, 10, 4, 7, 4, 11, 10, 11, 4, -1, 4,
+ 11, 7, 9, 11, 4, 9, 2, 11, 9, 1, 2, -1, -1, -1, -1, 9, 7, 4, 9, 11,
+ 7, 9, 1, 11, 2, 11, 1, 0, 8, 3, -1, 11, 7, 4, 11, 4, 2, 2, 4, 0, -1,
+ -1, -1, -1, -1, -1, -1, 11, 7, 4, 11, 4, 2, 8, 3, 4, 3, 2, 4, -1,
+ -1, -1, -1, 2, 9, 10, 2, 7, 9, 2, 3, 7, 7, 4, 9, -1, -1, -1, -1, 9,
+ 10, 7, 9, 7, 4, 10, 2, 7, 8, 7, 0, 2, 0, 7, -1, 3, 7, 10, 3, 10, 2,
+ 7, 4, 10, 1, 10, 0, 4, 0, 10, -1, 1, 10, 2, 8, 7, 4, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 4, 9, 1, 4, 1, 7, 7, 1, 3, -1, -1, -1, -1,
+ -1, -1, -1, 4, 9, 1, 4, 1, 7, 0, 8, 1, 8, 7, 1, -1, -1, -1, -1, 4,
+ 0, 3, 7, 4, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, 8, 7, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 10, 8, 10, 11, 8,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 0, 9, 3, 9, 11, 11, 9,
+ 10, -1, -1, -1, -1, -1, -1, -1, 0, 1, 10, 0, 10, 8, 8, 10, 11, -1,
+ -1, -1, -1, -1, -1, -1, 3, 1, 10, 11, 3, 10, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 1, 2, 11, 1, 11, 9, 9, 11, 8, -1, -1, -1, -1, -1,
+ -1, -1, 3, 0, 9, 3, 9, 11, 1, 2, 9, 2, 11, 9, -1, -1, -1, -1, 0, 2,
+ 11, 8, 0, 11, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 3, 2, 11, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 2, 3, 8, 2, 8, 10,
+ 10, 8, 9, -1, -1, -1, -1, -1, -1, -1, 9, 10, 2, 0, 9, 2, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, 2, 3, 8, 2, 8, 10, 0, 1, 8, 1, 10, 8,
+ -1, -1, -1, -1, 1, 10, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 1, 3, 8, 9, 1, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 0, 9, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+ 3, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ ]),
+ mr = (0, v.Z)(function e() {
+ var t = this,
+ n =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : Math;
+ (0, p.Z)(this, e),
+ M(this, "grad3", [
+ [1, 1, 0],
+ [-1, 1, 0],
+ [1, -1, 0],
+ [-1, -1, 0],
+ [1, 0, 1],
+ [-1, 0, 1],
+ [1, 0, -1],
+ [-1, 0, -1],
+ [0, 1, 1],
+ [0, -1, 1],
+ [0, 1, -1],
+ [0, -1, -1],
+ ]),
+ M(this, "grad4", [
+ [0, 1, 1, 1],
+ [0, 1, 1, -1],
+ [0, 1, -1, 1],
+ [0, 1, -1, -1],
+ [0, -1, 1, 1],
+ [0, -1, 1, -1],
+ [0, -1, -1, 1],
+ [0, -1, -1, -1],
+ [1, 0, 1, 1],
+ [1, 0, 1, -1],
+ [1, 0, -1, 1],
+ [1, 0, -1, -1],
+ [-1, 0, 1, 1],
+ [-1, 0, 1, -1],
+ [-1, 0, -1, 1],
+ [-1, 0, -1, -1],
+ [1, 1, 0, 1],
+ [1, 1, 0, -1],
+ [1, -1, 0, 1],
+ [1, -1, 0, -1],
+ [-1, 1, 0, 1],
+ [-1, 1, 0, -1],
+ [-1, -1, 0, 1],
+ [-1, -1, 0, -1],
+ [1, 1, 1, 0],
+ [1, 1, -1, 0],
+ [1, -1, 1, 0],
+ [1, -1, -1, 0],
+ [-1, 1, 1, 0],
+ [-1, 1, -1, 0],
+ [-1, -1, 1, 0],
+ [-1, -1, -1, 0],
+ ]),
+ M(this, "p", []),
+ M(this, "perm", []),
+ M(this, "simplex", [
+ [0, 1, 2, 3],
+ [0, 1, 3, 2],
+ [0, 0, 0, 0],
+ [0, 2, 3, 1],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [1, 2, 3, 0],
+ [0, 2, 1, 3],
+ [0, 0, 0, 0],
+ [0, 3, 1, 2],
+ [0, 3, 2, 1],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [1, 3, 2, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [1, 2, 0, 3],
+ [0, 0, 0, 0],
+ [1, 3, 0, 2],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [2, 3, 0, 1],
+ [2, 3, 1, 0],
+ [1, 0, 2, 3],
+ [1, 0, 3, 2],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [2, 0, 3, 1],
+ [0, 0, 0, 0],
+ [2, 1, 3, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [2, 0, 1, 3],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [3, 0, 1, 2],
+ [3, 0, 2, 1],
+ [0, 0, 0, 0],
+ [3, 1, 2, 0],
+ [2, 1, 0, 3],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [0, 0, 0, 0],
+ [3, 1, 0, 2],
+ [0, 0, 0, 0],
+ [3, 2, 0, 1],
+ [3, 2, 1, 0],
+ ]),
+ M(this, "dot", function (e, t, n) {
+ return e[0] * t + e[1] * n;
+ }),
+ M(this, "dot3", function (e, t, n, r) {
+ return e[0] * t + e[1] * n + e[2] * r;
+ }),
+ M(this, "dot4", function (e, t, n, r, i) {
+ return e[0] * t + e[1] * n + e[2] * r + e[3] * i;
+ }),
+ M(this, "noise", function (e, n) {
+ var r = (e + n) * (0.5 * (Math.sqrt(3) - 1)),
+ i = Math.floor(e + r),
+ a = Math.floor(n + r),
+ o = (3 - Math.sqrt(3)) / 6,
+ s = (i + a) * o,
+ l = e - (i - s),
+ u = n - (a - s),
+ c = 0,
+ f = 1;
+ l > u && ((c = 1), (f = 0));
+ var d = l - c + o,
+ h = u - f + o,
+ p = l - 1 + 2 * o,
+ v = u - 1 + 2 * o,
+ m = 255 & i,
+ g = 255 & a,
+ A = t.perm[m + t.perm[g]] % 12,
+ y = t.perm[m + c + t.perm[g + f]] % 12,
+ b = t.perm[m + 1 + t.perm[g + 1]] % 12,
+ x = 0.5 - l * l - u * u,
+ S = 0.5 - d * d - h * h,
+ E = 0.5 - p * p - v * v;
+ return (
+ 70 *
+ ((x < 0 ? 0 : (x *= x) * x * t.dot(t.grad3[A], l, u)) +
+ (S < 0 ? 0 : (S *= S) * S * t.dot(t.grad3[y], d, h)) +
+ (E < 0 ? 0 : (E *= E) * E * t.dot(t.grad3[b], p, v)))
+ );
+ }),
+ M(this, "noise3d", function (e, n, r) {
+ var i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c = (e + n + r) * (1 / 3),
+ f = Math.floor(e + c),
+ d = Math.floor(n + c),
+ h = Math.floor(r + c),
+ p = 1 / 6,
+ v = (f + d + h) * p,
+ m = e - (f - v),
+ g = n - (d - v),
+ A = r - (h - v);
+ m >= g
+ ? g >= A
+ ? ((i = 1), (a = 0), (o = 0), (s = 1), (l = 1), (u = 0))
+ : m >= A
+ ? ((i = 1), (a = 0), (o = 0), (s = 1), (l = 0), (u = 1))
+ : ((i = 0), (a = 0), (o = 1), (s = 1), (l = 0), (u = 1))
+ : g < A
+ ? ((i = 0), (a = 0), (o = 1), (s = 0), (l = 1), (u = 1))
+ : m < A
+ ? ((i = 0), (a = 1), (o = 0), (s = 0), (l = 1), (u = 1))
+ : ((i = 0), (a = 1), (o = 0), (s = 1), (l = 1), (u = 0));
+ var y = m - i + p,
+ b = g - a + p,
+ x = A - o + p,
+ S = m - s + 2 * p,
+ E = g - l + 2 * p,
+ _ = A - u + 2 * p,
+ C = m - 1 + 0.5,
+ w = g - 1 + 0.5,
+ T = A - 1 + 0.5,
+ M = 255 & f,
+ I = 255 & d,
+ k = 255 & h,
+ R = t.perm[M + t.perm[I + t.perm[k]]] % 12,
+ B = t.perm[M + i + t.perm[I + a + t.perm[k + o]]] % 12,
+ P = t.perm[M + s + t.perm[I + l + t.perm[k + u]]] % 12,
+ L = t.perm[M + 1 + t.perm[I + 1 + t.perm[k + 1]]] % 12,
+ D = 0.6 - m * m - g * g - A * A,
+ U = 0.6 - y * y - b * b - x * x,
+ F = 0.6 - S * S - E * E - _ * _,
+ O = 0.6 - C * C - w * w - T * T;
+ return (
+ 32 *
+ ((D < 0 ? 0 : (D *= D) * D * t.dot3(t.grad3[R], m, g, A)) +
+ (U < 0 ? 0 : (U *= U) * U * t.dot3(t.grad3[B], y, b, x)) +
+ (F < 0 ? 0 : (F *= F) * F * t.dot3(t.grad3[P], S, E, _)) +
+ (O < 0 ? 0 : (O *= O) * O * t.dot3(t.grad3[L], C, w, T)))
+ );
+ }),
+ M(this, "noise4d", function (e, n, r, i) {
+ var a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p,
+ v,
+ m,
+ g = t.grad4,
+ A = t.simplex,
+ y = t.perm,
+ b = (Math.sqrt(5) - 1) / 4,
+ x = (5 - Math.sqrt(5)) / 20,
+ S = (e + n + r + i) * b,
+ E = Math.floor(e + S),
+ _ = Math.floor(n + S),
+ C = Math.floor(r + S),
+ w = Math.floor(i + S),
+ T = (E + _ + C + w) * x,
+ M = e - (E - T),
+ I = n - (_ - T),
+ k = r - (C - T),
+ R = i - (w - T),
+ B =
+ (M > I ? 32 : 0) +
+ (M > k ? 16 : 0) +
+ (I > k ? 8 : 0) +
+ (M > R ? 4 : 0) +
+ (I > R ? 2 : 0) +
+ (k > R ? 1 : 0),
+ P = M - (a = A[B][0] >= 3 ? 1 : 0) + x,
+ L = I - (o = A[B][1] >= 3 ? 1 : 0) + x,
+ D = k - (s = A[B][2] >= 3 ? 1 : 0) + x,
+ U = R - (l = A[B][3] >= 3 ? 1 : 0) + x,
+ F = M - (u = A[B][0] >= 2 ? 1 : 0) + 2 * x,
+ O = I - (c = A[B][1] >= 2 ? 1 : 0) + 2 * x,
+ N = k - (f = A[B][2] >= 2 ? 1 : 0) + 2 * x,
+ G = R - (d = A[B][3] >= 2 ? 1 : 0) + 2 * x,
+ Z = M - (h = A[B][0] >= 1 ? 1 : 0) + 3 * x,
+ z = I - (p = A[B][1] >= 1 ? 1 : 0) + 3 * x,
+ Q = k - (v = A[B][2] >= 1 ? 1 : 0) + 3 * x,
+ H = R - (m = A[B][3] >= 1 ? 1 : 0) + 3 * x,
+ V = M - 1 + 4 * x,
+ j = I - 1 + 4 * x,
+ W = k - 1 + 4 * x,
+ X = R - 1 + 4 * x,
+ Y = 255 & E,
+ q = 255 & _,
+ J = 255 & C,
+ K = 255 & w,
+ $ = y[Y + y[q + y[J + y[K]]]] % 32,
+ ee = y[Y + a + y[q + o + y[J + s + y[K + l]]]] % 32,
+ te = y[Y + u + y[q + c + y[J + f + y[K + d]]]] % 32,
+ ne = y[Y + h + y[q + p + y[J + v + y[K + m]]]] % 32,
+ re = y[Y + 1 + y[q + 1 + y[J + 1 + y[K + 1]]]] % 32,
+ ie = 0.6 - M * M - I * I - k * k - R * R,
+ ae = 0.6 - P * P - L * L - D * D - U * U,
+ oe = 0.6 - F * F - O * O - N * N - G * G,
+ se = 0.6 - Z * Z - z * z - Q * Q - H * H,
+ le = 0.6 - V * V - j * j - W * W - X * X;
+ return (
+ 27 *
+ ((ie < 0 ? 0 : (ie *= ie) * ie * t.dot4(g[$], M, I, k, R)) +
+ (ae < 0 ? 0 : (ae *= ae) * ae * t.dot4(g[ee], P, L, D, U)) +
+ (oe < 0 ? 0 : (oe *= oe) * oe * t.dot4(g[te], F, O, N, G)) +
+ (se < 0 ? 0 : (se *= se) * se * t.dot4(g[ne], Z, z, Q, H)) +
+ (le < 0 ? 0 : (le *= le) * le * t.dot4(g[re], V, j, W, X)))
+ );
+ });
+ for (var r = 0; r < 256; r++)
+ this.p[r] = Math.floor(256 * n.random());
+ for (var i = 0; i < 512; i++) this.perm[i] = this.p[255 & i];
+ }),
+ gr = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {};
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.call(this)).isLightningStrike = !0),
+ (e.type = "LightningStrike"),
+ e.init(n.copyParameters(r, r)),
+ e.createMesh(),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(
+ n,
+ [
+ {
+ key: "update",
+ value: function (e) {
+ this.isStatic ||
+ (this.rayParameters.isEternal ||
+ (this.rayParameters.birthTime <= e &&
+ e <= this.rayParameters.deathTime)
+ ? (this.updateMesh(e),
+ e < this.subrays[0].endPropagationTime
+ ? (this.state = n.RAY_PROPAGATING)
+ : e > this.subrays[0].beginVanishingTime
+ ? (this.state = n.RAY_VANISHING)
+ : (this.state = n.RAY_STEADY),
+ (this.visible = !0))
+ : ((this.visible = !1),
+ e < this.rayParameters.birthTime
+ ? (this.state = n.RAY_UNBORN)
+ : (this.state = n.RAY_EXTINGUISHED)));
+ },
+ },
+ {
+ key: "init",
+ value: function (e) {
+ (this.rayParameters = e),
+ (this.maxIterations =
+ void 0 !== e.maxIterations
+ ? Math.floor(e.maxIterations)
+ : 9),
+ (e.maxIterations = this.maxIterations),
+ (this.isStatic = void 0 !== e.isStatic && e.isStatic),
+ (e.isStatic = this.isStatic),
+ (this.ramification =
+ void 0 !== e.ramification
+ ? Math.floor(e.ramification)
+ : 5),
+ (e.ramification = this.ramification),
+ (this.maxSubrayRecursion =
+ void 0 !== e.maxSubrayRecursion
+ ? Math.floor(e.maxSubrayRecursion)
+ : 3),
+ (e.maxSubrayRecursion = this.maxSubrayRecursion),
+ (this.recursionProbability =
+ void 0 !== e.recursionProbability
+ ? e.recursionProbability
+ : 0.6),
+ (e.recursionProbability = this.recursionProbability),
+ (this.generateUVs =
+ void 0 !== e.generateUVs && e.generateUVs),
+ (e.generateUVs = this.generateUVs),
+ void 0 !== e.randomGenerator
+ ? ((this.randomGenerator = e.randomGenerator),
+ (this.seedGenerator = e.randomGenerator),
+ void 0 !== e.noiseSeed &&
+ this.seedGenerator.setSeed(e.noiseSeed))
+ : ((this.randomGenerator = n.createRandomGenerator()),
+ (this.seedGenerator = Math)),
+ void 0 !== e.onDecideSubrayCreation
+ ? (this.onDecideSubrayCreation =
+ e.onDecideSubrayCreation)
+ : (this.createDefaultSubrayCreationCallbacks(),
+ void 0 !== e.onSubrayCreation &&
+ (this.onSubrayCreation = e.onSubrayCreation)),
+ (this.state = n.RAY_INITIALIZED),
+ (this.maxSubrays = Math.ceil(
+ 1 +
+ Math.pow(
+ this.ramification,
+ Math.max(0, this.maxSubrayRecursion - 1)
+ )
+ )),
+ (e.maxSubrays = this.maxSubrays),
+ (this.maxRaySegments = 2 * (1 << this.maxIterations)),
+ (this.subrays = []);
+ for (var t = 0; t < this.maxSubrays; t++)
+ this.subrays.push(this.createSubray());
+ this.raySegments = [];
+ for (var r = 0; r < this.maxRaySegments; r++)
+ this.raySegments.push(this.createSegment());
+ (this.time = 0),
+ (this.timeFraction = 0),
+ (this.currentSegmentCallback = null),
+ (this.currentCreateTriangleVertices = this.generateUVs
+ ? this.createTriangleVerticesWithUVs
+ : this.createTriangleVerticesWithoutUVs),
+ (this.numSubrays = 0),
+ (this.currentSubray = null),
+ (this.currentSegmentIndex = 0),
+ (this.isInitialSegment = !1),
+ (this.subrayProbability = 0),
+ (this.currentVertex = 0),
+ (this.currentIndex = 0),
+ (this.currentCoordinate = 0),
+ (this.currentUVCoordinate = 0),
+ (this.vertices = null),
+ (this.uvs = null),
+ (this.indices = null),
+ (this.positionAttribute = null),
+ (this.uvsAttribute = null),
+ (this.simplexX = new mr(this.seedGenerator)),
+ (this.simplexY = new mr(this.seedGenerator)),
+ (this.simplexZ = new mr(this.seedGenerator)),
+ (this.forwards = new A.Vector3()),
+ (this.forwardsFill = new A.Vector3()),
+ (this.side = new A.Vector3()),
+ (this.down = new A.Vector3()),
+ (this.middlePos = new A.Vector3()),
+ (this.middleLinPos = new A.Vector3()),
+ (this.newPos = new A.Vector3()),
+ (this.vPos = new A.Vector3()),
+ (this.cross1 = new A.Vector3());
+ },
+ },
+ {
+ key: "createMesh",
+ value: function () {
+ var e = 1 << this.maxIterations,
+ t = 3 * (e + 1) * this.maxSubrays,
+ n = 18 * e * this.maxSubrays;
+ (this.vertices = new Float32Array(3 * t)),
+ (this.indices = new Uint32Array(n)),
+ this.generateUVs &&
+ (this.uvs = new Float32Array(2 * t)),
+ this.fillMesh(0),
+ this.setIndex(
+ new A.Uint32BufferAttribute(this.indices, 1)
+ ),
+ (this.positionAttribute = new A.Float32BufferAttribute(
+ this.vertices,
+ 3
+ )),
+ this.setAttribute("position", this.positionAttribute),
+ this.generateUVs &&
+ ((this.uvsAttribute = new A.Float32BufferAttribute(
+ new Float32Array(this.uvs),
+ 2
+ )),
+ this.setAttribute("uv", this.uvsAttribute)),
+ this.isStatic ||
+ ((this.index.usage = A.DynamicDrawUsage),
+ (this.positionAttribute.usage = A.DynamicDrawUsage),
+ this.generateUVs &&
+ (this.uvsAttribute.usage = A.DynamicDrawUsage)),
+ (this.vertices = this.positionAttribute.array),
+ (this.indices = this.index.array),
+ this.generateUVs &&
+ (this.uvs = this.uvsAttribute.array);
+ },
+ },
+ {
+ key: "updateMesh",
+ value: function (e) {
+ this.fillMesh(e),
+ (this.drawRange.count = this.currentIndex),
+ (this.index.needsUpdate = !0),
+ (this.positionAttribute.needsUpdate = !0),
+ this.generateUVs &&
+ (this.uvsAttribute.needsUpdate = !0);
+ },
+ },
+ {
+ key: "fillMesh",
+ value: function (e) {
+ var t = this;
+ (this.currentVertex = 0),
+ (this.currentIndex = 0),
+ (this.currentCoordinate = 0),
+ (this.currentUVCoordinate = 0),
+ this.fractalRay(e, function (n) {
+ var r = t.currentSubray;
+ e < r.birthTime ||
+ (this.rayParameters.isEternal &&
+ 0 == t.currentSubray.recursion
+ ? (t.createPrism(n),
+ t.onDecideSubrayCreation(n, t))
+ : e < r.endPropagationTime
+ ? t.timeFraction >=
+ n.fraction0 * r.propagationTimeFactor &&
+ (t.createPrism(n),
+ t.onDecideSubrayCreation(n, t))
+ : e < r.beginVanishingTime
+ ? (t.createPrism(n),
+ t.onDecideSubrayCreation(n, t))
+ : (t.timeFraction <=
+ r.vanishingTimeFactor +
+ n.fraction1 * (1 - r.vanishingTimeFactor) &&
+ t.createPrism(n),
+ t.onDecideSubrayCreation(n, t)));
+ });
+ },
+ },
+ {
+ key: "addNewSubray",
+ value: function () {
+ return this.subrays[this.numSubrays++];
+ },
+ },
+ {
+ key: "initSubray",
+ value: function (e, t) {
+ e.pos0.copy(t.sourceOffset),
+ e.pos1.copy(t.destOffset),
+ e.up0.copy(t.up0),
+ e.up1.copy(t.up1),
+ (e.radius0 = t.radius0),
+ (e.radius1 = t.radius1),
+ (e.birthTime = t.birthTime),
+ (e.deathTime = t.deathTime),
+ (e.timeScale = t.timeScale),
+ (e.roughness = t.roughness),
+ (e.straightness = t.straightness),
+ (e.propagationTimeFactor = t.propagationTimeFactor),
+ (e.vanishingTimeFactor = t.vanishingTimeFactor),
+ (e.maxIterations = this.maxIterations),
+ (e.seed = void 0 !== t.noiseSeed ? t.noiseSeed : 0),
+ (e.recursion = 0);
+ },
+ },
+ {
+ key: "fractalRay",
+ value: function (e, t) {
+ (this.time = e),
+ (this.currentSegmentCallback = t),
+ (this.numSubrays = 0),
+ this.initSubray(
+ this.addNewSubray(),
+ this.rayParameters
+ );
+ for (var n = 0; n < this.numSubrays; n++) {
+ var r = this.subrays[n];
+ (this.currentSubray = r),
+ this.randomGenerator.setSeed(r.seed),
+ (r.endPropagationTime = A.MathUtils.lerp(
+ r.birthTime,
+ r.deathTime,
+ r.propagationTimeFactor
+ )),
+ (r.beginVanishingTime = A.MathUtils.lerp(
+ r.deathTime,
+ r.birthTime,
+ 1 - r.vanishingTimeFactor
+ ));
+ var i = this.randomGenerator.random;
+ r.linPos0.set(i(), i(), i()).multiplyScalar(1e3),
+ r.linPos1.set(i(), i(), i()).multiplyScalar(1e3),
+ (this.timeFraction =
+ (e - r.birthTime) / (r.deathTime - r.birthTime)),
+ (this.currentSegmentIndex = 0),
+ (this.isInitialSegment = !0);
+ var a = this.getNewSegment();
+ (a.iteration = 0),
+ a.pos0.copy(r.pos0),
+ a.pos1.copy(r.pos1),
+ a.linPos0.copy(r.linPos0),
+ a.linPos1.copy(r.linPos1),
+ a.up0.copy(r.up0),
+ a.up1.copy(r.up1),
+ (a.radius0 = r.radius0),
+ (a.radius1 = r.radius1),
+ (a.fraction0 = 0),
+ (a.fraction1 = 1),
+ (a.positionVariationFactor = 1 - r.straightness),
+ (this.subrayProbability =
+ (this.ramification *
+ Math.pow(
+ this.recursionProbability,
+ r.recursion
+ )) /
+ (1 << r.maxIterations)),
+ this.fractalRayRecursive(a);
+ }
+ (this.currentSegmentCallback = null),
+ (this.currentSubray = null);
+ },
+ },
+ {
+ key: "fractalRayRecursive",
+ value: function (e) {
+ if (e.iteration >= this.currentSubray.maxIterations)
+ this.currentSegmentCallback(e);
+ else {
+ this.forwards.subVectors(e.pos1, e.pos0);
+ var t = this.forwards.length();
+ t < 1e-6 &&
+ (this.forwards.set(0, 0, 0.01),
+ (t = this.forwards.length()));
+ var n = 0.5 * (e.radius0 + e.radius1),
+ r = 0.5 * (e.fraction0 + e.fraction1),
+ i =
+ this.time *
+ this.currentSubray.timeScale *
+ Math.pow(2, e.iteration);
+ this.middlePos.lerpVectors(e.pos0, e.pos1, 0.5),
+ this.middleLinPos.lerpVectors(
+ e.linPos0,
+ e.linPos1,
+ 0.5
+ );
+ var a = this.middleLinPos;
+ this.newPos.set(
+ this.simplexX.noise4d(a.x, a.y, a.z, i),
+ this.simplexY.noise4d(a.x, a.y, a.z, i),
+ this.simplexZ.noise4d(a.x, a.y, a.z, i)
+ ),
+ this.newPos.multiplyScalar(
+ e.positionVariationFactor * t
+ ),
+ this.newPos.add(this.middlePos);
+ var o = this.getNewSegment();
+ o.pos0.copy(e.pos0),
+ o.pos1.copy(this.newPos),
+ o.linPos0.copy(e.linPos0),
+ o.linPos1.copy(this.middleLinPos),
+ o.up0.copy(e.up0),
+ o.up1.copy(e.up1),
+ (o.radius0 = e.radius0),
+ (o.radius1 = n),
+ (o.fraction0 = e.fraction0),
+ (o.fraction1 = r),
+ (o.positionVariationFactor =
+ e.positionVariationFactor *
+ this.currentSubray.roughness),
+ (o.iteration = e.iteration + 1);
+ var s = this.getNewSegment();
+ s.pos0.copy(this.newPos),
+ s.pos1.copy(e.pos1),
+ s.linPos0.copy(this.middleLinPos),
+ s.linPos1.copy(e.linPos1),
+ this.cross1.crossVectors(
+ e.up0,
+ this.forwards.normalize()
+ ),
+ s.up0
+ .crossVectors(this.forwards, this.cross1)
+ .normalize(),
+ s.up1.copy(e.up1),
+ (s.radius0 = n),
+ (s.radius1 = e.radius1),
+ (s.fraction0 = r),
+ (s.fraction1 = e.fraction1),
+ (s.positionVariationFactor =
+ e.positionVariationFactor *
+ this.currentSubray.roughness),
+ (s.iteration = e.iteration + 1),
+ this.fractalRayRecursive(o),
+ this.fractalRayRecursive(s);
+ }
+ },
+ },
+ {
+ key: "createPrism",
+ value: function (e) {
+ this.forwardsFill.subVectors(e.pos1, e.pos0).normalize(),
+ this.isInitialSegment &&
+ (this.currentCreateTriangleVertices(
+ e.pos0,
+ e.up0,
+ this.forwardsFill,
+ e.radius0,
+ 0
+ ),
+ (this.isInitialSegment = !1)),
+ this.currentCreateTriangleVertices(
+ e.pos1,
+ e.up0,
+ this.forwardsFill,
+ e.radius1,
+ e.fraction1
+ ),
+ this.createPrismFaces();
+ },
+ },
+ {
+ key: "createTriangleVerticesWithoutUVs",
+ value: function (e, t, r, i) {
+ this.side
+ .crossVectors(t, r)
+ .multiplyScalar(i * n.COS30DEG),
+ this.down.copy(t).multiplyScalar(-i * n.SIN30DEG);
+ var a = this.vPos,
+ o = this.vertices;
+ a.copy(e).sub(this.side).add(this.down),
+ (o[this.currentCoordinate++] = a.x),
+ (o[this.currentCoordinate++] = a.y),
+ (o[this.currentCoordinate++] = a.z),
+ a.copy(e).add(this.side).add(this.down),
+ (o[this.currentCoordinate++] = a.x),
+ (o[this.currentCoordinate++] = a.y),
+ (o[this.currentCoordinate++] = a.z),
+ a.copy(t).multiplyScalar(i).add(e),
+ (o[this.currentCoordinate++] = a.x),
+ (o[this.currentCoordinate++] = a.y),
+ (o[this.currentCoordinate++] = a.z),
+ (this.currentVertex += 3);
+ },
+ },
+ {
+ key: "createTriangleVerticesWithUVs",
+ value: function (e, t, r, i, a) {
+ this.side
+ .crossVectors(t, r)
+ .multiplyScalar(i * n.COS30DEG),
+ this.down.copy(t).multiplyScalar(-i * n.SIN30DEG);
+ var o = this.vPos,
+ s = this.vertices,
+ l = this.uvs;
+ o.copy(e).sub(this.side).add(this.down),
+ (s[this.currentCoordinate++] = o.x),
+ (s[this.currentCoordinate++] = o.y),
+ (s[this.currentCoordinate++] = o.z),
+ (l[this.currentUVCoordinate++] = a),
+ (l[this.currentUVCoordinate++] = 0),
+ o.copy(e).add(this.side).add(this.down),
+ (s[this.currentCoordinate++] = o.x),
+ (s[this.currentCoordinate++] = o.y),
+ (s[this.currentCoordinate++] = o.z),
+ (l[this.currentUVCoordinate++] = a),
+ (l[this.currentUVCoordinate++] = 0.5),
+ o.copy(t).multiplyScalar(i).add(e),
+ (s[this.currentCoordinate++] = o.x),
+ (s[this.currentCoordinate++] = o.y),
+ (s[this.currentCoordinate++] = o.z),
+ (l[this.currentUVCoordinate++] = a),
+ (l[this.currentUVCoordinate++] = 1),
+ (this.currentVertex += 3);
+ },
+ },
+ {
+ key: "createPrismFaces",
+ value: function (e) {
+ var t = this.indices;
+ (e = this.currentVertex - 6),
+ (t[this.currentIndex++] = e + 1),
+ (t[this.currentIndex++] = e + 2),
+ (t[this.currentIndex++] = e + 5),
+ (t[this.currentIndex++] = e + 1),
+ (t[this.currentIndex++] = e + 5),
+ (t[this.currentIndex++] = e + 4),
+ (t[this.currentIndex++] = e + 0),
+ (t[this.currentIndex++] = e + 1),
+ (t[this.currentIndex++] = e + 4),
+ (t[this.currentIndex++] = e + 0),
+ (t[this.currentIndex++] = e + 4),
+ (t[this.currentIndex++] = e + 3),
+ (t[this.currentIndex++] = e + 2),
+ (t[this.currentIndex++] = e + 0),
+ (t[this.currentIndex++] = e + 3),
+ (t[this.currentIndex++] = e + 2),
+ (t[this.currentIndex++] = e + 3),
+ (t[this.currentIndex++] = e + 5);
+ },
+ },
+ {
+ key: "createDefaultSubrayCreationCallbacks",
+ value: function () {
+ var e = this.randomGenerator.random;
+ this.onDecideSubrayCreation = function (t, n) {
+ var r = n.currentSubray,
+ i = n.rayParameters.subrayPeriod,
+ a = n.rayParameters.subrayDutyCycle,
+ o =
+ n.rayParameters.isEternal && 0 == r.recursion
+ ? -e() * i
+ : A.MathUtils.lerp(
+ r.birthTime,
+ r.endPropagationTime,
+ t.fraction0
+ ) -
+ e() * i,
+ s = n.time - o,
+ l = Math.floor(s / i),
+ u = e() * (l + 1),
+ c = 0;
+ if (
+ (s % i <= a * i && (c = n.subrayProbability),
+ r.recursion < n.maxSubrayRecursion &&
+ n.numSubrays < n.maxSubrays &&
+ e() < c)
+ ) {
+ var f = n.addNewSubray(),
+ d = n.randomGenerator.getSeed();
+ (f.seed = u),
+ n.randomGenerator.setSeed(u),
+ (f.recursion = r.recursion + 1),
+ (f.maxIterations = Math.max(
+ 1,
+ r.maxIterations - 1
+ )),
+ f.linPos0.set(e(), e(), e()).multiplyScalar(1e3),
+ f.linPos1.set(e(), e(), e()).multiplyScalar(1e3),
+ f.up0.copy(r.up0),
+ f.up1.copy(r.up1),
+ (f.radius0 =
+ t.radius0 * n.rayParameters.radius0Factor),
+ (f.radius1 = Math.min(
+ n.rayParameters.minRadius,
+ t.radius1 * n.rayParameters.radius1Factor
+ )),
+ (f.birthTime = o + l * i),
+ (f.deathTime = f.birthTime + i * a),
+ n.rayParameters.isEternal ||
+ 0 != r.recursion ||
+ ((f.birthTime = Math.max(
+ f.birthTime,
+ r.birthTime
+ )),
+ (f.deathTime = Math.min(
+ f.deathTime,
+ r.deathTime
+ ))),
+ (f.timeScale = 2 * r.timeScale),
+ (f.roughness = r.roughness),
+ (f.straightness = r.straightness),
+ (f.propagationTimeFactor = r.propagationTimeFactor),
+ (f.vanishingTimeFactor = r.vanishingTimeFactor),
+ n.onSubrayCreation(t, r, f, n),
+ n.randomGenerator.setSeed(d);
+ }
+ };
+ var t = new A.Vector3(),
+ n = new A.Vector3(),
+ r = new A.Vector3(),
+ i = new A.Vector3();
+ (this.onSubrayCreation = function (e, t, n, r) {
+ r.subrayCylinderPosition(e, t, n, 0.5, 0.6, 0.2);
+ }),
+ (this.subrayConePosition = function (a, o, s, l, u, c) {
+ s.pos0.copy(a.pos0),
+ t.subVectors(o.pos1, o.pos0),
+ n.copy(t).normalize(),
+ t.multiplyScalar(
+ a.fraction0 + (1 - a.fraction0) * (e() * l)
+ );
+ var f = t.length();
+ r.crossVectors(o.up0, n);
+ var d = 2 * Math.PI * e();
+ r.multiplyScalar(Math.cos(d)),
+ i.copy(o.up0).multiplyScalar(Math.sin(d)),
+ s.pos1
+ .copy(r)
+ .add(i)
+ .multiplyScalar(f * u * (c + e() * (1 - c)))
+ .add(t)
+ .add(o.pos0);
+ }),
+ (this.subrayCylinderPosition = function (
+ a,
+ o,
+ s,
+ l,
+ u,
+ c
+ ) {
+ s.pos0.copy(a.pos0),
+ t.subVectors(o.pos1, o.pos0),
+ n.copy(t).normalize(),
+ t.multiplyScalar(
+ a.fraction0 +
+ (1 - a.fraction0) * ((2 * e() - 1) * l)
+ );
+ var f = t.length();
+ r.crossVectors(o.up0, n);
+ var d = 2 * Math.PI * e();
+ r.multiplyScalar(Math.cos(d)),
+ i.copy(o.up0).multiplyScalar(Math.sin(d)),
+ s.pos1
+ .copy(r)
+ .add(i)
+ .multiplyScalar(f * u * (c + e() * (1 - c)))
+ .add(t)
+ .add(o.pos0);
+ });
+ },
+ },
+ {
+ key: "createSubray",
+ value: function () {
+ return {
+ seed: 0,
+ maxIterations: 0,
+ recursion: 0,
+ pos0: new A.Vector3(),
+ pos1: new A.Vector3(),
+ linPos0: new A.Vector3(),
+ linPos1: new A.Vector3(),
+ up0: new A.Vector3(),
+ up1: new A.Vector3(),
+ radius0: 0,
+ radius1: 0,
+ birthTime: 0,
+ deathTime: 0,
+ timeScale: 0,
+ roughness: 0,
+ straightness: 0,
+ propagationTimeFactor: 0,
+ vanishingTimeFactor: 0,
+ endPropagationTime: 0,
+ beginVanishingTime: 0,
+ };
+ },
+ },
+ {
+ key: "createSegment",
+ value: function () {
+ return {
+ iteration: 0,
+ pos0: new A.Vector3(),
+ pos1: new A.Vector3(),
+ linPos0: new A.Vector3(),
+ linPos1: new A.Vector3(),
+ up0: new A.Vector3(),
+ up1: new A.Vector3(),
+ radius0: 0,
+ radius1: 0,
+ fraction0: 0,
+ fraction1: 0,
+ positionVariationFactor: 0,
+ };
+ },
+ },
+ {
+ key: "getNewSegment",
+ value: function () {
+ return this.raySegments[this.currentSegmentIndex++];
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (0, d.Z)((0, h.Z)(n.prototype), "copy", this).call(
+ this,
+ e
+ ),
+ this.init(n.copyParameters({}, e.rayParameters)),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(
+ n.copyParameters({}, this.rayParameters)
+ );
+ },
+ },
+ ],
+ [
+ {
+ key: "createRandomGenerator",
+ value: function () {
+ for (var e = 2053, t = [], n = 0; n < e; n++)
+ t.push(Math.random());
+ var r = {
+ currentSeed: 0,
+ random: function () {
+ var n = t[r.currentSeed];
+ return (r.currentSeed = (r.currentSeed + 1) % e), n;
+ },
+ getSeed: function () {
+ return r.currentSeed / e;
+ },
+ setSeed: function (t) {
+ r.currentSeed = Math.floor(t * e) % e;
+ },
+ };
+ return r;
+ },
+ },
+ {
+ key: "copyParameters",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : {},
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ n = function (n) {
+ return t === e ? n : n.clone();
+ };
+ return (
+ (e.sourceOffset =
+ void 0 !== t.sourceOffset
+ ? n(t.sourceOffset)
+ : new A.Vector3(0, 100, 0)),
+ (e.destOffset =
+ void 0 !== t.destOffset
+ ? n(t.destOffset)
+ : new A.Vector3(0, 0, 0)),
+ (e.timeScale =
+ void 0 !== t.timeScale ? t.timeScale : 1),
+ (e.roughness =
+ void 0 !== t.roughness ? t.roughness : 0.9),
+ (e.straightness =
+ void 0 !== t.straightness ? t.straightness : 0.7),
+ (e.up0 =
+ void 0 !== t.up0 ? n(t.up0) : new A.Vector3(0, 0, 1)),
+ (e.up1 =
+ void 0 !== t.up1 ? n(t.up1) : new A.Vector3(0, 0, 1)),
+ (e.radius0 = void 0 !== t.radius0 ? t.radius0 : 1),
+ (e.radius1 = void 0 !== t.radius1 ? t.radius1 : 1),
+ (e.radius0Factor =
+ void 0 !== t.radius0Factor ? t.radius0Factor : 0.5),
+ (e.radius1Factor =
+ void 0 !== t.radius1Factor ? t.radius1Factor : 0.2),
+ (e.minRadius =
+ void 0 !== t.minRadius ? t.minRadius : 0.2),
+ (e.isEternal =
+ void 0 !== t.isEternal
+ ? t.isEternal
+ : void 0 === t.birthTime || void 0 === t.deathTime),
+ (e.birthTime = t.birthTime),
+ (e.deathTime = t.deathTime),
+ (e.propagationTimeFactor =
+ void 0 !== t.propagationTimeFactor
+ ? t.propagationTimeFactor
+ : 0.1),
+ (e.vanishingTimeFactor =
+ void 0 !== t.vanishingTimeFactor
+ ? t.vanishingTimeFactor
+ : 0.9),
+ (e.subrayPeriod =
+ void 0 !== t.subrayPeriod ? t.subrayPeriod : 4),
+ (e.subrayDutyCycle =
+ void 0 !== t.subrayDutyCycle
+ ? t.subrayDutyCycle
+ : 0.6),
+ (e.maxIterations =
+ void 0 !== t.maxIterations ? t.maxIterations : 9),
+ (e.isStatic = void 0 !== t.isStatic && t.isStatic),
+ (e.ramification =
+ void 0 !== t.ramification ? t.ramification : 5),
+ (e.maxSubrayRecursion =
+ void 0 !== t.maxSubrayRecursion
+ ? t.maxSubrayRecursion
+ : 3),
+ (e.recursionProbability =
+ void 0 !== t.recursionProbability
+ ? t.recursionProbability
+ : 0.6),
+ (e.generateUVs =
+ void 0 !== t.generateUVs && t.generateUVs),
+ (e.randomGenerator = t.randomGenerator),
+ (e.noiseSeed = t.noiseSeed),
+ (e.onDecideSubrayCreation = t.onDecideSubrayCreation),
+ (e.onSubrayCreation = t.onSubrayCreation),
+ e
+ );
+ },
+ },
+ ]
+ ),
+ n
+ );
+ })(A.BufferGeometry),
+ Ar = gr;
+ Math.PI, Math.PI;
+ var yr = null,
+ br = null,
+ xr = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e)).isReflectorForSSRPass = !0),
+ (r.type = "ReflectorForSSRPass");
+ var a = (0, f.Z)(r),
+ o =
+ void 0 !== i.color
+ ? new A.Color(i.color)
+ : new A.Color(8355711),
+ s = i.textureWidth || 512,
+ l = i.textureHeight || 512,
+ u = i.clipBias || 0,
+ c = i.shader || n.ReflectorShader,
+ d = !0 === i.useDepthTexture,
+ h = new A.Vector3(0, 1, 0),
+ v = new A.Vector3(),
+ m = new A.Vector3();
+ (a.needsUpdate = !1),
+ (a.maxDistance = n.ReflectorShader.uniforms.maxDistance.value),
+ (a.opacity = n.ReflectorShader.uniforms.opacity.value),
+ (a.color = o),
+ (a.resolution =
+ i.resolution ||
+ new A.Vector2(window.innerWidth, window.innerHeight)),
+ (a._distanceAttenuation =
+ n.ReflectorShader.defines.DISTANCE_ATTENUATION),
+ Object.defineProperty(a, "distanceAttenuation", {
+ get: function () {
+ return a._distanceAttenuation;
+ },
+ set: function (e) {
+ a._distanceAttenuation !== e &&
+ ((a._distanceAttenuation = e),
+ (a.material.defines.DISTANCE_ATTENUATION = e),
+ (a.material.needsUpdate = !0));
+ },
+ }),
+ (a._fresnel = n.ReflectorShader.defines.FRESNEL),
+ Object.defineProperty(a, "fresnel", {
+ get: function () {
+ return a._fresnel;
+ },
+ set: function (e) {
+ a._fresnel !== e &&
+ ((a._fresnel = e),
+ (a.material.defines.FRESNEL = e),
+ (a.material.needsUpdate = !0));
+ },
+ });
+ var g,
+ y = new A.Vector3(),
+ b = new A.Vector3(),
+ x = new A.Vector3(),
+ S = new A.Matrix4(),
+ E = new A.Vector3(0, 0, -1),
+ _ = new A.Vector3(),
+ C = new A.Vector3(),
+ w = new A.Matrix4(),
+ T = new A.PerspectiveCamera();
+ d &&
+ (((g = new A.DepthTexture()).type = A.UnsignedShortType),
+ (g.minFilter = A.NearestFilter),
+ (g.magFilter = A.NearestFilter));
+ var M = { depthTexture: d ? g : null, type: A.HalfFloatType },
+ I = new A.WebGLRenderTarget(s, l, M),
+ k = new A.ShaderMaterial({
+ transparent: d,
+ defines: Object.assign({}, n.ReflectorShader.defines, {
+ useDepthTexture: d,
+ }),
+ uniforms: A.UniformsUtils.clone(c.uniforms),
+ fragmentShader: c.fragmentShader,
+ vertexShader: c.vertexShader,
+ });
+ (k.uniforms.tDiffuse.value = I.texture),
+ (k.uniforms.color.value = a.color),
+ (k.uniforms.textureMatrix.value = w),
+ d && (k.uniforms.tDepth.value = I.depthTexture),
+ (r.material = k);
+ var R = [new A.Plane(new A.Vector3(0, 1, 0), u)];
+ return (
+ (r.doRender = function (e, t, n) {
+ if (
+ ((k.uniforms.maxDistance.value = a.maxDistance),
+ (k.uniforms.color.value = a.color),
+ (k.uniforms.opacity.value = a.opacity),
+ v.copy(n.position).normalize(),
+ m.copy(v).reflect(h),
+ (k.uniforms.fresnelCoe.value = (v.dot(m) + 1) / 2),
+ b.setFromMatrixPosition(a.matrixWorld),
+ x.setFromMatrixPosition(n.matrixWorld),
+ S.extractRotation(a.matrixWorld),
+ y.set(0, 0, 1),
+ y.applyMatrix4(S),
+ _.subVectors(b, x),
+ !(_.dot(y) > 0))
+ ) {
+ _.reflect(y).negate(),
+ _.add(b),
+ S.extractRotation(n.matrixWorld),
+ E.set(0, 0, -1),
+ E.applyMatrix4(S),
+ E.add(x),
+ C.subVectors(b, E),
+ C.reflect(y).negate(),
+ C.add(b),
+ T.position.copy(_),
+ T.up.set(0, 1, 0),
+ T.up.applyMatrix4(S),
+ T.up.reflect(y),
+ T.lookAt(C),
+ (T.far = n.far),
+ T.updateMatrixWorld(),
+ T.projectionMatrix.copy(n.projectionMatrix),
+ (k.uniforms.virtualCameraNear.value = n.near),
+ (k.uniforms.virtualCameraFar.value = n.far),
+ (k.uniforms.virtualCameraMatrixWorld.value =
+ T.matrixWorld),
+ (k.uniforms.virtualCameraProjectionMatrix.value =
+ n.projectionMatrix),
+ (k.uniforms.virtualCameraProjectionMatrixInverse.value =
+ n.projectionMatrixInverse),
+ (k.uniforms.resolution.value = a.resolution),
+ w.set(
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0.5,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ w.multiply(T.projectionMatrix),
+ w.multiply(T.matrixWorldInverse),
+ w.multiply(a.matrixWorld);
+ var r = e.getRenderTarget(),
+ i = e.xr.enabled,
+ o = e.shadowMap.autoUpdate,
+ s = e.clippingPlanes;
+ (e.xr.enabled = !1),
+ (e.shadowMap.autoUpdate = !1),
+ (e.clippingPlanes = R),
+ e.setRenderTarget(I),
+ e.state.buffers.depth.setMask(!0),
+ !1 === e.autoClear && e.clear(),
+ e.render(t, T),
+ (e.xr.enabled = i),
+ (e.shadowMap.autoUpdate = o),
+ (e.clippingPlanes = s),
+ e.setRenderTarget(r);
+ var l = n.viewport;
+ void 0 !== l && e.state.viewport(l);
+ }
+ }),
+ (r.getRenderTarget = function () {
+ return I;
+ }),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Mesh),
+ Sr = xr,
+ Er = {
+ uniforms: {
+ turbidity: { value: 2 },
+ rayleigh: { value: 1 },
+ mieCoefficient: { value: 0.005 },
+ mieDirectionalG: { value: 0.8 },
+ sunPosition: { value: new A.Vector3() },
+ up: { value: new A.Vector3(0, 1, 0) },
+ },
+ vertexShader:
+ "\n uniform vec3 sunPosition;\n uniform float rayleigh;\n uniform float turbidity;\n uniform float mieCoefficient;\n uniform vec3 up;\n\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n // constants for atmospheric scattering\n const float e = 2.71828182845904523536028747135266249775724709369995957;\n const float pi = 3.141592653589793238462643383279502884197169;\n\n // wavelength of used primaries, according to preetham\n const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );\n // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function:\n // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))\n const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );\n\n // mie stuff\n // K coefficient for the primaries\n const float v = 4.0;\n const vec3 K = vec3( 0.686, 0.678, 0.666 );\n // MieConst = pi * pow( ( 2.0 * pi ) / lambda, vec3( v - 2.0 ) ) * K\n const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );\n\n // earth shadow hack\n // cutoffAngle = pi / 1.95;\n const float cutoffAngle = 1.6110731556870734;\n const float steepness = 1.5;\n const float EE = 1000.0;\n\n float sunIntensity( float zenithAngleCos ) {\n zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );\n return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );\n }\n\n vec3 totalMie( float T ) {\n float c = ( 0.2 * T ) * 10E-18;\n return 0.434 * c * MieConst;\n }\n\n void main() {\n\n vec4 worldPosition = modelMatrix * vec4( position, 1.0 );\n vWorldPosition = worldPosition.xyz;\n\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n gl_Position.z = gl_Position.w; // set z to camera.far\n\n vSunDirection = normalize( sunPosition );\n\n vSunE = sunIntensity( dot( vSunDirection, up ) );\n\n vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );\n\n float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );\n\n // extinction (absorbtion + out scattering)\n // rayleigh coefficients\n vBetaR = totalRayleigh * rayleighCoefficient;\n\n // mie coefficients\n vBetaM = totalMie( turbidity ) * mieCoefficient;\n\n }\n ",
+ fragmentShader:
+ "\n varying vec3 vWorldPosition;\n varying vec3 vSunDirection;\n varying float vSunfade;\n varying vec3 vBetaR;\n varying vec3 vBetaM;\n varying float vSunE;\n\n uniform float mieDirectionalG;\n uniform vec3 up;\n\n const vec3 cameraPos = vec3( 0.0, 0.0, 0.0 );\n\n // constants for atmospheric scattering\n const float pi = 3.141592653589793238462643383279502884197169;\n\n const float n = 1.0003; // refractive index of air\n const float N = 2.545E25; // number of molecules per unit volume for air at 288.15K and 1013mb (sea level -45 celsius)\n\n // optical length at zenith for molecules\n const float rayleighZenithLength = 8.4E3;\n const float mieZenithLength = 1.25E3;\n // 66 arc seconds -> degrees, and the cosine of that\n const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;\n\n // 3.0 / ( 16.0 * pi )\n const float THREE_OVER_SIXTEENPI = 0.05968310365946075;\n // 1.0 / ( 4.0 * pi )\n const float ONE_OVER_FOURPI = 0.07957747154594767;\n\n float rayleighPhase( float cosTheta ) {\n return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );\n }\n\n float hgPhase( float cosTheta, float g ) {\n float g2 = pow( g, 2.0 );\n float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );\n return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );\n }\n\n void main() {\n\n vec3 direction = normalize( vWorldPosition - cameraPos );\n\n // optical length\n // cutoff angle at 90 to avoid singularity in next formula.\n float zenithAngle = acos( max( 0.0, dot( up, direction ) ) );\n float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );\n float sR = rayleighZenithLength * inverse;\n float sM = mieZenithLength * inverse;\n\n // combined extinction factor\n vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );\n\n // in scattering\n float cosTheta = dot( direction, vSunDirection );\n\n float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );\n vec3 betaRTheta = vBetaR * rPhase;\n\n float mPhase = hgPhase( cosTheta, mieDirectionalG );\n vec3 betaMTheta = vBetaM * mPhase;\n\n vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );\n Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );\n\n // nightsky\n float theta = acos( direction.y ); // elevation --\x3e y-axis, [-pi/2, pi/2]\n float phi = atan( direction.z, direction.x ); // azimuth --\x3e x-axis [-pi/2, pi/2]\n vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );\n vec3 L0 = vec3( 0.1 ) * Fex;\n\n // composition + solar disc\n float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );\n L0 += ( vSunE * 19000.0 * Fex ) * sundisk;\n\n vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );\n\n vec3 retColor = pow( texColor, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );\n\n gl_FragColor = vec4( retColor, 1.0 );\n\n #include \n #include <".concat(
+ $n >= 154 ? "colorspace_fragment" : "encodings_fragment",
+ ">\n\n }\n "
+ ),
+ },
+ _r = new A.ShaderMaterial({
+ name: "SkyShader",
+ fragmentShader: Er.fragmentShader,
+ vertexShader: Er.vertexShader,
+ uniforms: A.UniformsUtils.clone(Er.uniforms),
+ side: A.BackSide,
+ depthWrite: !1,
+ }),
+ Cr = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ return (
+ (0, p.Z)(this, n), t.call(this, new A.BoxGeometry(1, 1, 1), _r)
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Mesh),
+ wr = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e)).isWater = !0),
+ (r.type = "Water");
+ var a = (0, f.Z)(r),
+ s =
+ void 0 !== i.color
+ ? new A.Color(i.color)
+ : new A.Color(16777215),
+ l = i.textureWidth || 512,
+ u = i.textureHeight || 512,
+ c = i.clipBias || 0,
+ d = i.flowDirection || new A.Vector2(1, 0),
+ h = i.flowSpeed || 0.03,
+ v = i.reflectivity || 0.02,
+ m = i.scale || 1,
+ g = i.shader || n.WaterShader,
+ y = void 0 !== i.encoding ? i.encoding : 3e3,
+ b = i.flowMap || void 0,
+ x = i.normalMap0,
+ S = i.normalMap1,
+ E = 0.15,
+ _ = 0.075,
+ C = new A.Matrix4(),
+ w = new A.Clock();
+ if (void 0 === tr)
+ return (
+ console.error(
+ "THREE.Water: Required component Reflector not found."
+ ),
+ (0, o.Z)(r)
+ );
+ if (void 0 === rr)
+ return (
+ console.error(
+ "THREE.Water: Required component Refractor not found."
+ ),
+ (0, o.Z)(r)
+ );
+ var T = new tr(e, {
+ textureWidth: l,
+ textureHeight: u,
+ clipBias: c,
+ encoding: y,
+ }),
+ M = new rr(e, {
+ textureWidth: l,
+ textureHeight: u,
+ clipBias: c,
+ encoding: y,
+ });
+ return (
+ (T.matrixAutoUpdate = !1),
+ (M.matrixAutoUpdate = !1),
+ (r.material = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.merge([
+ A.UniformsLib.fog,
+ g.uniforms,
+ ]),
+ vertexShader: g.vertexShader,
+ fragmentShader: g.fragmentShader,
+ transparent: !0,
+ fog: !0,
+ })),
+ void 0 !== b
+ ? ((r.material.defines.USE_FLOWMAP = ""),
+ (r.material.uniforms.tFlowMap = { type: "t", value: b }))
+ : (r.material.uniforms.flowDirection = {
+ type: "v2",
+ value: d,
+ }),
+ (x.wrapS = x.wrapT = A.RepeatWrapping),
+ (S.wrapS = S.wrapT = A.RepeatWrapping),
+ (r.material.uniforms.tReflectionMap.value =
+ T.getRenderTarget().texture),
+ (r.material.uniforms.tRefractionMap.value =
+ M.getRenderTarget().texture),
+ (r.material.uniforms.tNormalMap0.value = x),
+ (r.material.uniforms.tNormalMap1.value = S),
+ (r.material.uniforms.color.value = s),
+ (r.material.uniforms.reflectivity.value = v),
+ (r.material.uniforms.textureMatrix.value = C),
+ (r.material.uniforms.config.value.x = 0),
+ (r.material.uniforms.config.value.y = _),
+ (r.material.uniforms.config.value.z = _),
+ (r.material.uniforms.config.value.w = m),
+ (r.onBeforeRender = function (e, t, n) {
+ !(function (e) {
+ C.set(
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0.5,
+ 0,
+ 0,
+ 0.5,
+ 0.5,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ C.multiply(e.projectionMatrix),
+ C.multiply(e.matrixWorldInverse),
+ C.multiply(a.matrixWorld);
+ })(n),
+ (function () {
+ var e = w.getDelta(),
+ t = a.material.uniforms.config;
+ (t.value.x += h * e),
+ (t.value.y = t.value.x + _),
+ t.value.x >= E
+ ? ((t.value.x = 0), (t.value.y = _))
+ : t.value.y >= E && (t.value.y = t.value.y - E);
+ })(),
+ (a.visible = !1),
+ T.matrixWorld.copy(a.matrixWorld),
+ M.matrixWorld.copy(a.matrixWorld),
+ T.onBeforeRender(e, t, n),
+ M.onBeforeRender(e, t, n),
+ (a.visible = !0);
+ }),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Mesh),
+ Tr = wr;
+ "\n\n\t\t#include \n\t\t#include \n\t\t#include \n\n\t\tuniform sampler2D tReflectionMap;\n\t\tuniform sampler2D tRefractionMap;\n\t\tuniform sampler2D tNormalMap0;\n\t\tuniform sampler2D tNormalMap1;\n\n\t\t#ifdef USE_FLOWMAP\n\t\t\tuniform sampler2D tFlowMap;\n\t\t#else\n\t\t\tuniform vec2 flowDirection;\n\t\t#endif\n\n\t\tuniform vec3 color;\n\t\tuniform float reflectivity;\n\t\tuniform vec4 config;\n\n\t\tvarying vec4 vCoord;\n\t\tvarying vec2 vUv;\n\t\tvarying vec3 vToEye;\n\n\t\tvoid main() {\n\n\t\t\t#include \n\n\t\t\tfloat flowMapOffset0 = config.x;\n\t\t\tfloat flowMapOffset1 = config.y;\n\t\t\tfloat halfCycle = config.z;\n\t\t\tfloat scale = config.w;\n\n\t\t\tvec3 toEye = normalize( vToEye );\n\n\t\t\t// determine flow direction\n\t\t\tvec2 flow;\n\t\t\t#ifdef USE_FLOWMAP\n\t\t\t\tflow = texture2D( tFlowMap, vUv ).rg * 2.0 - 1.0;\n\t\t\t#else\n\t\t\t\tflow = flowDirection;\n\t\t\t#endif\n\t\t\tflow.x *= - 1.0;\n\n\t\t\t// sample normal maps (distort uvs with flowdata)\n\t\t\tvec4 normalColor0 = texture2D( tNormalMap0, ( vUv * scale ) + flow * flowMapOffset0 );\n\t\t\tvec4 normalColor1 = texture2D( tNormalMap1, ( vUv * scale ) + flow * flowMapOffset1 );\n\n\t\t\t// linear interpolate to get the final normal color\n\t\t\tfloat flowLerp = abs( halfCycle - flowMapOffset0 ) / halfCycle;\n\t\t\tvec4 normalColor = mix( normalColor0, normalColor1, flowLerp );\n\n\t\t\t// calculate normal vector\n\t\t\tvec3 normal = normalize( vec3( normalColor.r * 2.0 - 1.0, normalColor.b, normalColor.g * 2.0 - 1.0 ) );\n\n\t\t\t// calculate the fresnel term to blend reflection and refraction maps\n\t\t\tfloat theta = max( dot( toEye, normal ), 0.0 );\n\t\t\tfloat reflectance = reflectivity + ( 1.0 - reflectivity ) * pow( ( 1.0 - theta ), 5.0 );\n\n\t\t\t// calculate final uv coords\n\t\t\tvec3 coord = vCoord.xyz / vCoord.w;\n\t\t\tvec2 uv = coord.xy + coord.z * normal.xz * 0.05;\n\n\t\t\tvec4 reflectColor = texture2D( tReflectionMap, vec2( 1.0 - uv.x, uv.y ) );\n\t\t\tvec4 refractColor = texture2D( tRefractionMap, uv );\n\n\t\t\t// multiply water color with the mix of both textures\n\t\t\tgl_FragColor = vec4( color, 1.0 ) * mix( refractColor, reflectColor, reflectance );\n\n\t\t\t#include \n\t\t\t#include <".concat(
+ $n >= 154 ? "colorspace_fragment" : "encodings_fragment",
+ ">\n\t\t\t#include \n\n\t\t}"
+ );
+ var Mr = function (e) {
+ return e && e.isCubeTexture;
+ },
+ Ir = null,
+ kr = {
+ createMeshesFromInstancedMesh: function (e) {
+ for (
+ var t = new A.Group(),
+ n = e.count,
+ r = e.geometry,
+ i = e.material,
+ a = 0;
+ a < n;
+ a++
+ ) {
+ var o = new A.Mesh(r, i);
+ e.getMatrixAt(a, o.matrix),
+ o.matrix.decompose(o.position, o.quaternion, o.scale),
+ t.add(o);
+ }
+ return t.copy(e), t.updateMatrixWorld(), t;
+ },
+ createMultiMaterialObject: function (e, t) {
+ for (var n = new A.Group(), r = 0, i = t.length; r < i; r++)
+ n.add(new A.Mesh(e, t[r]));
+ return n;
+ },
+ detach: function (e, t, n) {
+ console.warn(
+ "THREE.SceneUtils: detach() has been deprecated. Use scene.attach( child ) instead."
+ ),
+ n.attach(e);
+ },
+ attach: function (e, t, n) {
+ console.warn(
+ "THREE.SceneUtils: attach() has been deprecated. Use parent.attach( child ) instead."
+ ),
+ n.attach(e);
+ },
+ };
+ function Rr(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1024,
+ n = new Vector2(),
+ r = new Vector2(),
+ i = [new Vector2(), new Vector2(), new Vector2()],
+ a = [],
+ o = document.createElement("canvas"),
+ s = t,
+ l = t;
+ (o.width = s), (o.height = l);
+ var u = o.getContext("2d");
+ (u.lineWidth = 1),
+ (u.strokeStyle = "rgb( 63, 63, 63 )"),
+ (u.textAlign = "center"),
+ (u.fillStyle = "rgb( 255, 255, 255 )"),
+ u.fillRect(0, 0, s, l);
+ var c = e.index,
+ f = e.attributes.uv;
+ if (c)
+ for (var d = 0, h = c.count; d < h; d += 3)
+ (a[0] = c.getX(d)),
+ (a[1] = c.getX(d + 1)),
+ (a[2] = c.getX(d + 2)),
+ i[0].fromBufferAttribute(f, a[0]),
+ i[1].fromBufferAttribute(f, a[1]),
+ i[2].fromBufferAttribute(f, a[2]),
+ m(a, i, d / 3);
+ else
+ for (var p = 0, v = f.count; p < v; p += 3)
+ (a[0] = p),
+ (a[1] = p + 1),
+ (a[2] = p + 2),
+ i[0].fromBufferAttribute(f, a[0]),
+ i[1].fromBufferAttribute(f, a[1]),
+ i[2].fromBufferAttribute(f, a[2]),
+ m(a, i, p / 3);
+ return o;
+ function m(e, t, i) {
+ u.beginPath(), n.set(0, 0);
+ for (var a = 0, o = t.length; a < o; a++) {
+ var c = t[a];
+ (n.x += c.x),
+ (n.y += c.y),
+ 0 === a
+ ? u.moveTo(c.x * (s - 2) + 0.5, (1 - c.y) * (l - 2) + 0.5)
+ : u.lineTo(c.x * (s - 2) + 0.5, (1 - c.y) * (l - 2) + 0.5);
+ }
+ u.closePath(),
+ u.stroke(),
+ n.divideScalar(t.length),
+ (u.font = "18px Arial"),
+ (u.fillStyle = "rgb( 63, 63, 63 )"),
+ u.fillText(i, n.x * s, (1 - n.y) * l),
+ n.x > 0.95 && u.fillText(i, (n.x % 1) * s, (1 - n.y) * l),
+ (u.font = "12px Arial"),
+ (u.fillStyle = "rgb( 191, 191, 191 )");
+ for (var f = 0, d = t.length; f < d; f++) {
+ var h = t[f];
+ r.addVectors(n, h).divideScalar(2);
+ var p = e[f];
+ u.fillText("abc"[f] + p, r.x * s, (1 - r.y) * l),
+ r.x > 0.95 &&
+ u.fillText("abc"[f] + p, (r.x % 1) * s, (1 - r.y) * l);
+ }
+ }
+ }
+ var Br = function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new A.Vector3(0, 0, 0),
+ n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 0,
+ i =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : 1,
+ a =
+ arguments.length > 5 && void 0 !== arguments[5]
+ ? arguments[5]
+ : 2,
+ o =
+ arguments.length > 6 && void 0 !== arguments[6]
+ ? arguments[6]
+ : 3,
+ s =
+ (arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 10) / 2,
+ l = [
+ new A.Vector3(t.x - s, t.y, t.z - s),
+ new A.Vector3(t.x - s, t.y, t.z + s),
+ new A.Vector3(t.x + s, t.y, t.z + s),
+ new A.Vector3(t.x + s, t.y, t.z - s),
+ ],
+ u = [l[r], l[i], l[a], l[o]];
+ if (0 <= --n) {
+ var c = [];
+ return (
+ Array.prototype.push.apply(c, e(u[0], s, n, r, o, a, i)),
+ Array.prototype.push.apply(c, e(u[1], s, n, r, i, a, o)),
+ Array.prototype.push.apply(c, e(u[2], s, n, r, i, a, o)),
+ Array.prototype.push.apply(c, e(u[3], s, n, a, i, r, o)),
+ c
+ );
+ }
+ return u;
+ },
+ Pr = function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new A.Vector3(0, 0, 0),
+ n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 0,
+ i =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : 1,
+ a =
+ arguments.length > 5 && void 0 !== arguments[5]
+ ? arguments[5]
+ : 2,
+ o =
+ arguments.length > 6 && void 0 !== arguments[6]
+ ? arguments[6]
+ : 3,
+ s =
+ arguments.length > 7 && void 0 !== arguments[7]
+ ? arguments[7]
+ : 4,
+ l =
+ arguments.length > 8 && void 0 !== arguments[8]
+ ? arguments[8]
+ : 5,
+ u =
+ arguments.length > 9 && void 0 !== arguments[9]
+ ? arguments[9]
+ : 6,
+ c =
+ arguments.length > 10 && void 0 !== arguments[10]
+ ? arguments[10]
+ : 7,
+ f =
+ (arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 10) / 2,
+ d = [
+ new A.Vector3(t.x - f, t.y + f, t.z - f),
+ new A.Vector3(t.x - f, t.y + f, t.z + f),
+ new A.Vector3(t.x - f, t.y - f, t.z + f),
+ new A.Vector3(t.x - f, t.y - f, t.z - f),
+ new A.Vector3(t.x + f, t.y - f, t.z - f),
+ new A.Vector3(t.x + f, t.y - f, t.z + f),
+ new A.Vector3(t.x + f, t.y + f, t.z + f),
+ new A.Vector3(t.x + f, t.y + f, t.z - f),
+ ],
+ h = [d[r], d[i], d[a], d[o], d[s], d[l], d[u], d[c]];
+ if (--n >= 0) {
+ var p = [];
+ return (
+ Array.prototype.push.apply(
+ p,
+ e(h[0], f, n, r, o, s, c, u, l, a, i)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[1], f, n, r, c, u, i, a, l, s, o)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[2], f, n, r, c, u, i, a, l, s, o)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[3], f, n, a, o, r, i, u, c, s, l)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[4], f, n, a, o, r, i, u, c, s, l)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[5], f, n, s, o, a, l, u, i, r, c)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[6], f, n, s, o, a, l, u, i, r, c)
+ ),
+ Array.prototype.push.apply(
+ p,
+ e(h[7], f, n, u, l, a, i, r, o, s, c)
+ ),
+ p
+ );
+ }
+ return h;
+ },
+ Lr = function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1;
+ return (function (e) {
+ for (
+ var t = 0,
+ n = 0,
+ r = 0,
+ i = [0, 0, 0],
+ a = e.fractal,
+ o = 0,
+ s = a.length;
+ o < s;
+ o++
+ ) {
+ var l = a[o];
+ "+" === l
+ ? (r += e.angle)
+ : "-" === l
+ ? (r -= e.angle)
+ : "F" === l &&
+ ((t += e.size * Math.cos(r)),
+ (n += -e.size * Math.sin(r)),
+ i.push(t, n, 0));
+ }
+ return i;
+ })({
+ fractal: (function (e) {
+ for (
+ var t = "", n = e.axiom, r = 0, i = e.steps;
+ 0 <= i ? r < i : r > i;
+ 0 <= i ? r++ : r--
+ ) {
+ t = "";
+ for (var a = 0, o = n.length; a < o; a++) {
+ var s = n[a];
+ s in e.rules ? (t += e.rules[s]) : (t += s);
+ }
+ n = t;
+ }
+ return t;
+ })({
+ axiom: "A",
+ steps: 4,
+ rules: {
+ A: "A+BF++BF-FA--FAFA-BF+",
+ B: "-FA+BFBF++BF+FA--FA-B",
+ },
+ }),
+ size: e,
+ angle: Math.PI / 3,
+ });
+ },
+ Dr = { hilbert3D: Pr, gosper: Lr, hilbert2D: Br },
+ Ur = Zr(),
+ Fr = new A.Mesh(new A.PlaneGeometry(2, 2), Ur),
+ Or = new A.OrthographicCamera(0, 1, 0, 1, 0, 1),
+ Nr = null,
+ Gr = null;
+ function Zr() {
+ var e = new A.RawShaderMaterial({
+ uniforms: {
+ roughnessMap: { value: null },
+ normalMap: { value: null },
+ texelSize: { value: new A.Vector2(1, 1) },
+ },
+ vertexShader:
+ "\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tattribute vec3 position;\n\t\t\tattribute vec2 uv;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t\t}\n\t\t",
+ fragmentShader:
+ "\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec2 vUv;\n\n\t\t\tuniform sampler2D roughnessMap;\n\t\t\tuniform sampler2D normalMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\n\t\t\tvec4 envMapTexelToLinear( vec4 a ) { return a; }\n\n\t\t\t#include \n\n\t\t\tfloat roughnessToVariance( float roughness ) {\n\n\t\t\t\tfloat variance = 0.0;\n\n\t\t\t\tif ( roughness >= r1 ) {\n\n\t\t\t\t\tvariance = ( r0 - roughness ) * ( v1 - v0 ) / ( r0 - r1 ) + v0;\n\n\t\t\t\t} else if ( roughness >= r4 ) {\n\n\t\t\t\t\tvariance = ( r1 - roughness ) * ( v4 - v1 ) / ( r1 - r4 ) + v1;\n\n\t\t\t\t} else if ( roughness >= r5 ) {\n\n\t\t\t\t\tvariance = ( r4 - roughness ) * ( v5 - v4 ) / ( r4 - r5 ) + v4;\n\n\t\t\t\t} else {\n\n\t\t\t\t\tfloat roughness2 = roughness * roughness;\n\n\t\t\t\t\tvariance = 1.79 * roughness2 * roughness2;\n\n\t\t\t\t}\n\n\t\t\t\treturn variance;\n\n\t\t\t}\n\n\t\t\tfloat varianceToRoughness( float variance ) {\n\n\t\t\t\tfloat roughness = 0.0;\n\n\t\t\t\tif ( variance >= v1 ) {\n\n\t\t\t\t\troughness = ( v0 - variance ) * ( r1 - r0 ) / ( v0 - v1 ) + r0;\n\n\t\t\t\t} else if ( variance >= v4 ) {\n\n\t\t\t\t\troughness = ( v1 - variance ) * ( r4 - r1 ) / ( v1 - v4 ) + r1;\n\n\t\t\t\t} else if ( variance >= v5 ) {\n\n\t\t\t\t\troughness = ( v4 - variance ) * ( r5 - r4 ) / ( v4 - v5 ) + r4;\n\n\t\t\t\t} else {\n\n\t\t\t\t\troughness = pow( 0.559 * variance, 0.25 ); // 0.559 = 1.0 / 1.79\n\n\t\t\t\t}\n\n\t\t\t\treturn roughness;\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = texture2D( roughnessMap, vUv, - 1.0 );\n\n\t\t\t\tif ( texelSize.x == 0.0 ) return;\n\n\t\t\t\tfloat roughness = gl_FragColor.g;\n\n\t\t\t\tfloat variance = roughnessToVariance( roughness );\n\n\t\t\t\tvec3 avgNormal;\n\n\t\t\t\tfor ( float x = - 1.0; x < 2.0; x += 2.0 ) {\n\n\t\t\t\t\tfor ( float y = - 1.0; y < 2.0; y += 2.0 ) {\n\n\t\t\t\t\t\tvec2 uv = vUv + vec2( x, y ) * 0.25 * texelSize;\n\n\t\t\t\t\t\tavgNormal += normalize( texture2D( normalMap, uv, - 1.0 ).xyz - 0.5 );\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tvariance += 1.0 - 0.25 * length( avgNormal );\n\n\t\t\t\tgl_FragColor.g = varianceToRoughness( variance );\n\n\t\t\t}\n\t\t",
+ blending: A.NoBlending,
+ depthTest: !1,
+ depthWrite: !1,
+ });
+ return (e.type = "RoughnessMipmapper"), e;
+ }
+ function zr(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : {},
+ r = new A.Vector3(),
+ i = new A.Quaternion(),
+ a = new A.Vector3(),
+ o = new A.Matrix4(),
+ s = new A.Matrix4(),
+ l = new A.Matrix4();
+ (n.preserveMatrix = void 0 === n.preserveMatrix || n.preserveMatrix),
+ (n.preservePosition =
+ void 0 === n.preservePosition || n.preservePosition),
+ (n.preserveHipPosition =
+ void 0 !== n.preserveHipPosition && n.preserveHipPosition),
+ (n.useTargetMatrix =
+ void 0 !== n.useTargetMatrix && n.useTargetMatrix),
+ (n.hip = void 0 !== n.hip ? n.hip : "hip"),
+ (n.names = n.names || {});
+ var u,
+ c,
+ f,
+ d,
+ h,
+ p = t.isObject3D ? t.skeleton.bones : jr(t),
+ v = e.isObject3D ? e.skeleton.bones : jr(e);
+ if (
+ (e.isObject3D
+ ? e.skeleton.pose()
+ : ((n.useTargetMatrix = !0), (n.preserveMatrix = !1)),
+ n.preservePosition)
+ ) {
+ h = [];
+ for (var m = 0; m < v.length; m++) h.push(v[m].position.clone());
+ }
+ if (n.preserveMatrix) {
+ e.updateMatrixWorld(), e.matrixWorld.identity();
+ for (var g = 0; g < e.children.length; ++g)
+ e.children[g].updateMatrixWorld(!0);
+ }
+ if (n.offsets) {
+ u = [];
+ for (var y = 0; y < v.length; ++y)
+ (c = v[y]),
+ (f = n.names[c.name] || c.name),
+ n.offsets[f] &&
+ (c.matrix.multiply(n.offsets[f]),
+ c.matrix.decompose(c.position, c.quaternion, c.scale),
+ c.updateMatrixWorld()),
+ u.push(c.matrixWorld.clone());
+ }
+ for (var b = 0; b < v.length; ++b) {
+ if (
+ ((c = v[b]),
+ (d = Vr((f = n.names[c.name] || c.name), p)),
+ l.copy(c.matrixWorld),
+ d)
+ ) {
+ if (
+ (d.updateMatrixWorld(),
+ n.useTargetMatrix
+ ? s.copy(d.matrixWorld)
+ : (s.copy(e.matrixWorld).invert(), s.multiply(d.matrixWorld)),
+ a.setFromMatrixScale(s),
+ s.scale(a.set(1 / a.x, 1 / a.y, 1 / a.z)),
+ l.makeRotationFromQuaternion(i.setFromRotationMatrix(s)),
+ e.isObject3D)
+ ) {
+ var x = v.indexOf(c),
+ S = u ? u[x] : o.copy(e.skeleton.boneInverses[x]).invert();
+ l.multiply(S);
+ }
+ l.copyPosition(s);
+ }
+ c.parent && c.parent.isBone
+ ? (c.matrix.copy(c.parent.matrixWorld).invert(),
+ c.matrix.multiply(l))
+ : c.matrix.copy(l),
+ n.preserveHipPosition &&
+ f === n.hip &&
+ c.matrix.setPosition(r.set(0, c.position.y, 0)),
+ c.matrix.decompose(c.position, c.quaternion, c.scale),
+ c.updateMatrixWorld();
+ }
+ if (n.preservePosition)
+ for (var E = 0; E < v.length; ++E)
+ (c = v[E]),
+ (f = n.names[c.name] || c.name) !== n.hip &&
+ c.position.copy(h[E]);
+ n.preserveMatrix && e.updateMatrixWorld(!0);
+ }
+ function Qr(e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3] ? arguments[3] : {};
+ (r.useFirstFramePosition =
+ void 0 !== r.useFirstFramePosition && r.useFirstFramePosition),
+ (r.fps = void 0 !== r.fps ? r.fps : 30),
+ (r.names = r.names || []),
+ t.isObject3D || (t = Wr(t));
+ var i,
+ a,
+ o,
+ s,
+ l = Math.round(n.duration * (r.fps / 1e3) * 1e3),
+ u = 1 / r.fps,
+ c = [],
+ f = new A.AnimationMixer(t),
+ d = jr(e.skeleton),
+ h = [];
+ f.clipAction(n).play(), f.update(0), t.updateMatrixWorld();
+ for (var p = 0; p < l; ++p) {
+ var v = p * u;
+ zr(e, t, r);
+ for (var m = 0; m < d.length; ++m)
+ Vr((s = r.names[d[m].name] || d[m].name), t.skeleton) &&
+ ((a = d[m]),
+ (o = h[m] = h[m] || { bone: a }),
+ r.hip === s &&
+ (o.pos ||
+ (o.pos = {
+ times: new Float32Array(l),
+ values: new Float32Array(3 * l),
+ }),
+ r.useFirstFramePosition &&
+ (0 === p && (i = a.position.clone()), a.position.sub(i)),
+ (o.pos.times[p] = v),
+ a.position.toArray(o.pos.values, 3 * p)),
+ o.quat ||
+ (o.quat = {
+ times: new Float32Array(l),
+ values: new Float32Array(4 * l),
+ }),
+ (o.quat.times[p] = v),
+ a.quaternion.toArray(o.quat.values, 4 * p));
+ f.update(u), t.updateMatrixWorld();
+ }
+ for (var g = 0; g < h.length; ++g)
+ (o = h[g]) &&
+ (o.pos &&
+ c.push(
+ new A.VectorKeyframeTrack(
+ ".bones[" + o.bone.name + "].position",
+ o.pos.times,
+ o.pos.values
+ )
+ ),
+ c.push(
+ new A.QuaternionKeyframeTrack(
+ ".bones[" + o.bone.name + "].quaternion",
+ o.quat.times,
+ o.quat.values
+ )
+ ));
+ return f.uncacheAction(n), new A.AnimationClip(n.name, -1, c);
+ }
+ function Hr(e) {
+ var t = new Map(),
+ n = new Map(),
+ r = e.clone();
+ return (
+ Xr(e, r, function (e, r) {
+ t.set(r, e), n.set(e, r);
+ }),
+ r.traverse(function (e) {
+ if (e.isSkinnedMesh) {
+ var r = e,
+ i = t.get(e),
+ a = i.skeleton.bones;
+ (r.skeleton = i.skeleton.clone()),
+ r.bindMatrix.copy(i.bindMatrix),
+ (r.skeleton.bones = a.map(function (e) {
+ return n.get(e);
+ })),
+ r.bind(r.skeleton, r.bindMatrix);
+ }
+ }),
+ r
+ );
+ }
+ function Vr(e, t) {
+ for (var n = 0, r = jr(t); n < r.length; n++)
+ if (e === r[n].name) return r[n];
+ }
+ function jr(e) {
+ return Array.isArray(e) ? e : e.bones;
+ }
+ function Wr(e) {
+ var t = new A.SkeletonHelper(e.bones[0]);
+ return (t.skeleton = e), t;
+ }
+ function Xr(e, t, n) {
+ n(e, t);
+ for (var r = 0; r < e.children.length; r++)
+ Xr(e.children[r], t.children[r], n);
+ }
+ var Yr = { retarget: zr, retargetClip: Qr, clone: Hr },
+ qr = {
+ uniforms: { tDiffuse: { value: null }, opacity: { value: 1 } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float opacity;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "#include ",
+ "void main() {",
+ "\tfloat depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );",
+ "\tgl_FragColor = vec4( vec3( depth ), opacity );",
+ "}",
+ ].join("\n"),
+ },
+ Jr = null,
+ Kr = {
+ compressNormals: function (e, t) {
+ e.geometry || console.error("Mesh must contain geometry. ");
+ var n = e.geometry.attributes.normal;
+ if (
+ (n || console.error("Geometry must contain normal attribute. "),
+ !n.isPacked)
+ ) {
+ 3 != n.itemSize &&
+ console.error(
+ "normal.itemSize is not 3, which cannot be encoded. "
+ );
+ var r,
+ i = n.array,
+ a = n.count;
+ if ("DEFAULT" == t) {
+ r = new Uint8Array(3 * a);
+ for (var o = 0; o < i.length; o += 3) {
+ var s = this.EncodingFuncs.defaultEncode(
+ i[o],
+ i[o + 1],
+ i[o + 2],
+ 1
+ );
+ (r[o + 0] = s[0]), (r[o + 1] = s[1]), (r[o + 2] = s[2]);
+ }
+ e.geometry.setAttribute(
+ "normal",
+ new A.BufferAttribute(r, 3, !0)
+ ),
+ (e.geometry.attributes.normal.bytes = 1 * r.length);
+ } else if ("OCT1Byte" == t) {
+ r = new Int8Array(2 * a);
+ for (var l = 0; l < i.length; l += 3) {
+ var u = this.EncodingFuncs.octEncodeBest(
+ i[l],
+ i[l + 1],
+ i[l + 2],
+ 1
+ );
+ (r[(l / 3) * 2 + 0] = u[0]), (r[(l / 3) * 2 + 1] = u[1]);
+ }
+ e.geometry.setAttribute(
+ "normal",
+ new A.BufferAttribute(r, 2, !0)
+ ),
+ (e.geometry.attributes.normal.bytes = 1 * r.length);
+ } else if ("OCT2Byte" == t) {
+ r = new Int16Array(2 * a);
+ for (var c = 0; c < i.length; c += 3) {
+ var f = this.EncodingFuncs.octEncodeBest(
+ i[c],
+ i[c + 1],
+ i[c + 2],
+ 2
+ );
+ (r[(c / 3) * 2 + 0] = f[0]), (r[(c / 3) * 2 + 1] = f[1]);
+ }
+ e.geometry.setAttribute(
+ "normal",
+ new A.BufferAttribute(r, 2, !0)
+ ),
+ (e.geometry.attributes.normal.bytes = 2 * r.length);
+ } else if ("ANGLES" == t) {
+ r = new Uint16Array(2 * a);
+ for (var d = 0; d < i.length; d += 3) {
+ var h = this.EncodingFuncs.anglesEncode(
+ i[d],
+ i[d + 1],
+ i[d + 2]
+ );
+ (r[(d / 3) * 2 + 0] = h[0]), (r[(d / 3) * 2 + 1] = h[1]);
+ }
+ e.geometry.setAttribute(
+ "normal",
+ new A.BufferAttribute(r, 2, !0)
+ ),
+ (e.geometry.attributes.normal.bytes = 2 * r.length);
+ } else
+ console.error(
+ "Unrecognized encoding method, should be `DEFAULT` or `ANGLES` or `OCT`. "
+ );
+ (e.geometry.attributes.normal.needsUpdate = !0),
+ (e.geometry.attributes.normal.isPacked = !0),
+ (e.geometry.attributes.normal.packingMethod = t),
+ e.material instanceof $r ||
+ (e.material = new $r().copy(e.material)),
+ "ANGLES" == t && (e.material.defines.USE_PACKED_NORMAL = 0),
+ "OCT1Byte" == t && (e.material.defines.USE_PACKED_NORMAL = 1),
+ "OCT2Byte" == t && (e.material.defines.USE_PACKED_NORMAL = 1),
+ "DEFAULT" == t && (e.material.defines.USE_PACKED_NORMAL = 2);
+ }
+ },
+ compressPositions: function (e) {
+ e.geometry || console.error("Mesh must contain geometry. ");
+ var t = e.geometry.attributes.position;
+ if (
+ (t ||
+ console.error("Geometry must contain position attribute. "),
+ !t.isPacked)
+ ) {
+ 3 != t.itemSize &&
+ console.error(
+ "position.itemSize is not 3, which cannot be packed. "
+ );
+ var n = t.array,
+ r = this.EncodingFuncs.quantizedEncode(n, 2),
+ i = r.quantized,
+ a = r.decodeMat;
+ null == e.geometry.boundingBox &&
+ e.geometry.computeBoundingBox(),
+ null == e.geometry.boundingSphere &&
+ e.geometry.computeBoundingSphere(),
+ e.geometry.setAttribute(
+ "position",
+ new A.BufferAttribute(i, 3)
+ ),
+ (e.geometry.attributes.position.isPacked = !0),
+ (e.geometry.attributes.position.needsUpdate = !0),
+ (e.geometry.attributes.position.bytes = 2 * i.length),
+ e.material instanceof $r ||
+ (e.material = new $r().copy(e.material)),
+ (e.material.defines.USE_PACKED_POSITION = 0),
+ (e.material.uniforms.quantizeMatPos.value = a),
+ (e.material.uniforms.quantizeMatPos.needsUpdate = !0);
+ }
+ },
+ compressUvs: function (e) {
+ e.geometry ||
+ console.error("Mesh must contain geometry property. ");
+ var t = e.geometry.attributes.uv;
+ if (
+ (t || console.error("Geometry must contain uv attribute. "),
+ !t.isPacked)
+ ) {
+ for (
+ var n, r = { min: 1 / 0, max: -1 / 0 }, i = t.array, a = 0;
+ a < i.length;
+ a++
+ )
+ (r.min = Math.min(r.min, i[a])),
+ (r.max = Math.max(r.max, i[a]));
+ if (r.min >= -1 && r.max <= 1) {
+ n = new Uint16Array(i.length);
+ for (var o = 0; o < i.length; o += 2) {
+ var s = this.EncodingFuncs.defaultEncode(
+ i[o],
+ i[o + 1],
+ 0,
+ 2
+ );
+ (n[o] = s[0]), (n[o + 1] = s[1]);
+ }
+ e.geometry.setAttribute(
+ "uv",
+ new A.BufferAttribute(n, 2, !0)
+ ),
+ (e.geometry.attributes.uv.isPacked = !0),
+ (e.geometry.attributes.uv.needsUpdate = !0),
+ (e.geometry.attributes.uv.bytes = 2 * n.length),
+ e.material instanceof $r ||
+ (e.material = new $r().copy(e.material)),
+ (e.material.defines.USE_PACKED_UV = 0);
+ } else
+ (n = this.EncodingFuncs.quantizedEncodeUV(i, 2)),
+ e.geometry.setAttribute(
+ "uv",
+ new A.BufferAttribute(n.quantized, 2)
+ ),
+ (e.geometry.attributes.uv.isPacked = !0),
+ (e.geometry.attributes.uv.needsUpdate = !0),
+ (e.geometry.attributes.uv.bytes = 2 * n.quantized.length),
+ e.material instanceof $r ||
+ (e.material = new $r().copy(e.material)),
+ (e.material.defines.USE_PACKED_UV = 1),
+ (e.material.uniforms.quantizeMatUV.value = n.decodeMat),
+ (e.material.uniforms.quantizeMatUV.needsUpdate = !0);
+ }
+ },
+ EncodingFuncs: {
+ defaultEncode: function (e, t, n, r) {
+ if (1 == r) {
+ var i = Math.round(0.5 * (e + 1) * 255),
+ a = Math.round(0.5 * (t + 1) * 255),
+ o = Math.round(0.5 * (n + 1) * 255);
+ return new Uint8Array([i, a, o]);
+ }
+ if (2 == r) {
+ var s = Math.round(0.5 * (e + 1) * 65535),
+ l = Math.round(0.5 * (t + 1) * 65535),
+ u = Math.round(0.5 * (n + 1) * 65535);
+ return new Uint16Array([s, l, u]);
+ }
+ console.error("number of bytes must be 1 or 2");
+ },
+ defaultDecode: function (e, t) {
+ return 1 == t
+ ? [
+ (e[0] / 255) * 2 - 1,
+ (e[1] / 255) * 2 - 1,
+ (e[2] / 255) * 2 - 1,
+ ]
+ : 2 == t
+ ? [
+ (e[0] / 65535) * 2 - 1,
+ (e[1] / 65535) * 2 - 1,
+ (e[2] / 65535) * 2 - 1,
+ ]
+ : void console.error("number of bytes must be 1 or 2");
+ },
+ anglesEncode: function (e, t, n) {
+ var r = parseInt(
+ 0.5 * (1 + Math.atan2(t, e) / Math.PI) * 65535
+ ),
+ i = parseInt(0.5 * (1 + n) * 65535);
+ return new Uint16Array([r, i]);
+ },
+ octEncodeBest: function (e, t, n, r) {
+ var i, a, o, s, l;
+ return (
+ (o = i = u(e, t, n, "floor", "floor")),
+ (a = c(i)),
+ (l = f(e, t, n, a)),
+ (a = c((i = u(e, t, n, "ceil", "floor")))),
+ (s = f(e, t, n, a)) > l && ((o = i), (l = s)),
+ (a = c((i = u(e, t, n, "floor", "ceil")))),
+ (s = f(e, t, n, a)) > l && ((o = i), (l = s)),
+ (a = c((i = u(e, t, n, "ceil", "ceil")))),
+ (s = f(e, t, n, a)) > l && (o = i),
+ o
+ );
+ function u(e, t, i, a, o) {
+ var s = e / (Math.abs(e) + Math.abs(t) + Math.abs(i)),
+ l = t / (Math.abs(e) + Math.abs(t) + Math.abs(i));
+ if (n < 0) {
+ var u = (1 - Math.abs(l)) * (s >= 0 ? 1 : -1),
+ c = (1 - Math.abs(s)) * (l >= 0 ? 1 : -1);
+ (s = u), (l = c);
+ var f = 1 - Math.abs(s) - Math.abs(l);
+ f > 0 &&
+ ((f += 0.001),
+ (s += s > 0 ? f / 2 : -f / 2),
+ (l += l > 0 ? f / 2 : -f / 2));
+ }
+ return 1 == r
+ ? new Int8Array([
+ Math[a](127.5 * s + (s < 0 ? 1 : 0)),
+ Math[o](127.5 * l + (l < 0 ? 1 : 0)),
+ ])
+ : 2 == r
+ ? new Int16Array([
+ Math[a](32767.5 * s + (s < 0 ? 1 : 0)),
+ Math[o](32767.5 * l + (l < 0 ? 1 : 0)),
+ ])
+ : void 0;
+ }
+ function c(e) {
+ var t = e[0],
+ n = e[1];
+ 1 == r
+ ? ((t /= t < 0 ? 127 : 128), (n /= n < 0 ? 127 : 128))
+ : 2 == r &&
+ ((t /= t < 0 ? 32767 : 32768),
+ (n /= n < 0 ? 32767 : 32768));
+ var i = 1 - Math.abs(t) - Math.abs(n);
+ if (i < 0) {
+ var a = t;
+ (t = (1 - Math.abs(n)) * (t >= 0 ? 1 : -1)),
+ (n = (1 - Math.abs(a)) * (n >= 0 ? 1 : -1));
+ }
+ var o = Math.sqrt(t * t + n * n + i * i);
+ return [t / o, n / o, i / o];
+ }
+ function f(e, t, n, r) {
+ return e * r[0] + t * r[1] + n * r[2];
+ }
+ },
+ quantizedEncode: function (e, t) {
+ var n, r;
+ 1 == t
+ ? ((n = new Uint8Array(e.length)), (r = 255))
+ : 2 == t
+ ? ((n = new Uint16Array(e.length)), (r = 65535))
+ : console.error("number of bytes error! ");
+ var i = new A.Matrix4(),
+ a = new Float32Array(3),
+ o = new Float32Array(3);
+ (a[0] = a[1] = a[2] = Number.MAX_VALUE),
+ (o[0] = o[1] = o[2] = -Number.MAX_VALUE);
+ for (var s = 0; s < e.length; s += 3)
+ (a[0] = Math.min(a[0], e[s + 0])),
+ (a[1] = Math.min(a[1], e[s + 1])),
+ (a[2] = Math.min(a[2], e[s + 2])),
+ (o[0] = Math.max(o[0], e[s + 0])),
+ (o[1] = Math.max(o[1], e[s + 1])),
+ (o[2] = Math.max(o[2], e[s + 2]));
+ i.scale(
+ new A.Vector3(
+ (o[0] - a[0]) / r,
+ (o[1] - a[1]) / r,
+ (o[2] - a[2]) / r
+ )
+ ),
+ (i.elements[12] = a[0]),
+ (i.elements[13] = a[1]),
+ (i.elements[14] = a[2]),
+ i.transpose();
+ for (
+ var l = new Float32Array([
+ o[0] !== a[0] ? r / (o[0] - a[0]) : 0,
+ o[1] !== a[1] ? r / (o[1] - a[1]) : 0,
+ o[2] !== a[2] ? r / (o[2] - a[2]) : 0,
+ ]),
+ u = 0;
+ u < e.length;
+ u += 3
+ )
+ (n[u + 0] = Math.floor((e[u + 0] - a[0]) * l[0])),
+ (n[u + 1] = Math.floor((e[u + 1] - a[1]) * l[1])),
+ (n[u + 2] = Math.floor((e[u + 2] - a[2]) * l[2]));
+ return { quantized: n, decodeMat: i };
+ },
+ quantizedEncodeUV: function (e, t) {
+ var n, r;
+ 1 == t
+ ? ((n = new Uint8Array(e.length)), (r = 255))
+ : 2 == t
+ ? ((n = new Uint16Array(e.length)), (r = 65535))
+ : console.error("number of bytes error! ");
+ var i = new A.Matrix3(),
+ a = new Float32Array(2),
+ o = new Float32Array(2);
+ (a[0] = a[1] = Number.MAX_VALUE),
+ (o[0] = o[1] = -Number.MAX_VALUE);
+ for (var s = 0; s < e.length; s += 2)
+ (a[0] = Math.min(a[0], e[s + 0])),
+ (a[1] = Math.min(a[1], e[s + 1])),
+ (o[0] = Math.max(o[0], e[s + 0])),
+ (o[1] = Math.max(o[1], e[s + 1]));
+ i.scale((o[0] - a[0]) / r, (o[1] - a[1]) / r),
+ (i.elements[6] = a[0]),
+ (i.elements[7] = a[1]),
+ i.transpose();
+ for (
+ var l = new Float32Array([
+ o[0] !== a[0] ? r / (o[0] - a[0]) : 0,
+ o[1] !== a[1] ? r / (o[1] - a[1]) : 0,
+ ]),
+ u = 0;
+ u < e.length;
+ u += 2
+ )
+ (n[u + 0] = Math.floor((e[u + 0] - a[0]) * l[0])),
+ (n[u + 1] = Math.floor((e[u + 1] - a[1]) * l[1]));
+ return { quantized: n, decodeMat: i };
+ },
+ },
+ },
+ $r = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this)).defines = {}),
+ (r.type = "PackedPhongMaterial"),
+ (r.uniforms = A.UniformsUtils.merge([
+ A.ShaderLib.phong.uniforms,
+ {
+ quantizeMatPos: { value: null },
+ quantizeMatUV: { value: null },
+ },
+ ])),
+ (r.vertexShader = [
+ "#define PHONG",
+ "varying vec3 vViewPosition;",
+ "#ifndef FLAT_SHADED",
+ "varying vec3 vNormal;",
+ "#endif",
+ A.ShaderChunk.common,
+ A.ShaderChunk.uv_pars_vertex,
+ A.ShaderChunk.uv2_pars_vertex,
+ A.ShaderChunk.displacementmap_pars_vertex,
+ A.ShaderChunk.envmap_pars_vertex,
+ A.ShaderChunk.color_pars_vertex,
+ A.ShaderChunk.fog_pars_vertex,
+ A.ShaderChunk.morphtarget_pars_vertex,
+ A.ShaderChunk.skinning_pars_vertex,
+ A.ShaderChunk.shadowmap_pars_vertex,
+ A.ShaderChunk.logdepthbuf_pars_vertex,
+ A.ShaderChunk.clipping_planes_pars_vertex,
+ "#ifdef USE_PACKED_NORMAL\n\t\t\t\t\t#if USE_PACKED_NORMAL == 0\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfloat x = packedNormal.x * 2.0 - 1.0;\n\t\t\t\t\t\t\tfloat y = packedNormal.y * 2.0 - 1.0;\n\t\t\t\t\t\t\tvec2 scth = vec2(sin(x * PI), cos(x * PI));\n\t\t\t\t\t\t\tvec2 scphi = vec2(sqrt(1.0 - y * y), y);\n\t\t\t\t\t\t\treturn normalize( vec3(scth.y * scphi.x, scth.x * scphi.x, scphi.y) );\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_NORMAL == 1\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec3 v = vec3(packedNormal.xy, 1.0 - abs(packedNormal.x) - abs(packedNormal.y));\n\t\t\t\t\t\t\tif (v.z < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tv.xy = (1.0 - abs(v.yx)) * vec2((v.x >= 0.0) ? +1.0 : -1.0, (v.y >= 0.0) ? +1.0 : -1.0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn normalize(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_NORMAL == 2\n\t\t\t\t\t\tvec3 decodeNormal(vec3 packedNormal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec3 v = (packedNormal * 2.0) - 1.0;\n\t\t\t\t\t\t\treturn normalize(v);\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\t\t\t\t#endif",
+ "#ifdef USE_PACKED_POSITION\n\t\t\t\t\t#if USE_PACKED_POSITION == 0\n\t\t\t\t\t\tuniform mat4 quantizeMatPos;\n\t\t\t\t\t#endif\n\t\t\t\t#endif",
+ "#ifdef USE_PACKED_UV\n\t\t\t\t\t#if USE_PACKED_UV == 1\n\t\t\t\t\t\tuniform mat3 quantizeMatUV;\n\t\t\t\t\t#endif\n\t\t\t\t#endif",
+ "#ifdef USE_PACKED_UV\n\t\t\t\t\t#if USE_PACKED_UV == 0\n\t\t\t\t\t\tvec2 decodeUV(vec2 packedUV)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec2 uv = (packedUV * 2.0) - 1.0;\n\t\t\t\t\t\t\treturn uv;\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#if USE_PACKED_UV == 1\n\t\t\t\t\t\tvec2 decodeUV(vec2 packedUV)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tvec2 uv = ( vec3(packedUV, 1.0) * quantizeMatUV ).xy;\n\t\t\t\t\t\t\treturn uv;\n\t\t\t\t\t\t}\n\t\t\t\t\t#endif\n\t\t\t\t#endif",
+ "void main() {",
+ A.ShaderChunk.uv_vertex,
+ "#ifdef USE_UV\n\t\t\t\t\t#ifdef USE_PACKED_UV\n\t\t\t\t\t\tvUv = decodeUV(vUv);\n\t\t\t\t\t#endif\n\t\t\t\t#endif",
+ A.ShaderChunk.uv2_vertex,
+ A.ShaderChunk.color_vertex,
+ A.ShaderChunk.beginnormal_vertex,
+ "#ifdef USE_PACKED_NORMAL\n\t\t\t\t\tobjectNormal = decodeNormal(objectNormal);\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_TANGENT\n\t\t\t\t\tvec3 objectTangent = vec3( tangent.xyz );\n\t\t\t\t#endif\n\t\t\t\t",
+ A.ShaderChunk.morphnormal_vertex,
+ A.ShaderChunk.skinbase_vertex,
+ A.ShaderChunk.skinnormal_vertex,
+ A.ShaderChunk.defaultnormal_vertex,
+ "#ifndef FLAT_SHADED",
+ "\tvNormal = normalize( transformedNormal );",
+ "#endif",
+ A.ShaderChunk.begin_vertex,
+ "#ifdef USE_PACKED_POSITION\n\t\t\t\t\t#if USE_PACKED_POSITION == 0\n\t\t\t\t\t\ttransformed = ( vec4(transformed, 1.0) * quantizeMatPos ).xyz;\n\t\t\t\t\t#endif\n\t\t\t\t#endif",
+ A.ShaderChunk.morphtarget_vertex,
+ A.ShaderChunk.skinning_vertex,
+ A.ShaderChunk.displacementmap_vertex,
+ A.ShaderChunk.project_vertex,
+ A.ShaderChunk.logdepthbuf_vertex,
+ A.ShaderChunk.clipping_planes_vertex,
+ "vViewPosition = - mvPosition.xyz;",
+ A.ShaderChunk.worldpos_vertex,
+ A.ShaderChunk.envmap_vertex,
+ A.ShaderChunk.shadowmap_vertex,
+ A.ShaderChunk.fog_vertex,
+ "}",
+ ].join("\n")),
+ (r.fragmentShader = [
+ "#define PHONG",
+ "uniform vec3 diffuse;",
+ "uniform vec3 emissive;",
+ "uniform vec3 specular;",
+ "uniform float shininess;",
+ "uniform float opacity;",
+ A.ShaderChunk.common,
+ A.ShaderChunk.packing,
+ A.ShaderChunk.dithering_pars_fragment,
+ A.ShaderChunk.color_pars_fragment,
+ A.ShaderChunk.uv_pars_fragment,
+ A.ShaderChunk.uv2_pars_fragment,
+ A.ShaderChunk.map_pars_fragment,
+ A.ShaderChunk.alphamap_pars_fragment,
+ A.ShaderChunk.aomap_pars_fragment,
+ A.ShaderChunk.lightmap_pars_fragment,
+ A.ShaderChunk.emissivemap_pars_fragment,
+ A.ShaderChunk.envmap_common_pars_fragment,
+ A.ShaderChunk.envmap_pars_fragment,
+ A.ShaderChunk.cube_uv_reflection_fragment,
+ A.ShaderChunk.fog_pars_fragment,
+ A.ShaderChunk.bsdfs,
+ A.ShaderChunk.lights_pars_begin,
+ A.ShaderChunk.lights_phong_pars_fragment,
+ A.ShaderChunk.shadowmap_pars_fragment,
+ A.ShaderChunk.bumpmap_pars_fragment,
+ A.ShaderChunk.normalmap_pars_fragment,
+ A.ShaderChunk.specularmap_pars_fragment,
+ A.ShaderChunk.logdepthbuf_pars_fragment,
+ A.ShaderChunk.clipping_planes_pars_fragment,
+ "void main() {",
+ A.ShaderChunk.clipping_planes_fragment,
+ "vec4 diffuseColor = vec4( diffuse, opacity );",
+ "ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );",
+ "vec3 totalEmissiveRadiance = emissive;",
+ A.ShaderChunk.logdepthbuf_fragment,
+ A.ShaderChunk.map_fragment,
+ A.ShaderChunk.color_fragment,
+ A.ShaderChunk.alphamap_fragment,
+ A.ShaderChunk.alphatest_fragment,
+ A.ShaderChunk.specularmap_fragment,
+ A.ShaderChunk.normal_fragment_begin,
+ A.ShaderChunk.normal_fragment_maps,
+ A.ShaderChunk.emissivemap_fragment,
+ A.ShaderChunk.lights_phong_fragment,
+ A.ShaderChunk.lights_fragment_begin,
+ A.ShaderChunk.lights_fragment_maps,
+ A.ShaderChunk.lights_fragment_end,
+ A.ShaderChunk.aomap_fragment,
+ "vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;",
+ A.ShaderChunk.envmap_fragment,
+ "gl_FragColor = vec4( outgoingLight, diffuseColor.a );",
+ A.ShaderChunk.tonemapping_fragment,
+ parseInt(A.REVISION.replace(/\D+/g, "")) >= 154
+ ? A.ShaderChunk.colorspace_fragment
+ : A.ShaderChunk.encodings_fragment,
+ A.ShaderChunk.fog_fragment,
+ A.ShaderChunk.premultiplied_alpha_fragment,
+ A.ShaderChunk.dithering_fragment,
+ "}",
+ ].join("\n")),
+ r.setValues(e),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.MeshPhongMaterial),
+ ei = {
+ uniforms: {
+ textureWidth: { value: 1 },
+ textureHeight: { value: 1 },
+ focalDepth: { value: 1 },
+ focalLength: { value: 24 },
+ fstop: { value: 0.9 },
+ tColor: { value: null },
+ tDepth: { value: null },
+ maxblur: { value: 1 },
+ showFocus: { value: 0 },
+ manualdof: { value: 0 },
+ vignetting: { value: 0 },
+ depthblur: { value: 0 },
+ threshold: { value: 0.5 },
+ gain: { value: 2 },
+ bias: { value: 0.5 },
+ fringe: { value: 0.7 },
+ znear: { value: 0.1 },
+ zfar: { value: 100 },
+ noise: { value: 1 },
+ dithering: { value: 1e-4 },
+ pentagon: { value: 0 },
+ shaderFocus: { value: 1 },
+ focusCoords: { value: new A.Vector2() },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "varying vec2 vUv;",
+ "uniform sampler2D tColor;",
+ "uniform sampler2D tDepth;",
+ "uniform float textureWidth;",
+ "uniform float textureHeight;",
+ "uniform float focalDepth; //focal distance value in meters, but you may use autofocus option below",
+ "uniform float focalLength; //focal length in mm",
+ "uniform float fstop; //f-stop value",
+ "uniform bool showFocus; //show debug focus point and focal range (red = focal point, green = focal range)",
+ "/*",
+ "make sure that these two values are the same for your camera, otherwise distances will be wrong.",
+ "*/",
+ "uniform float znear; // camera clipping start",
+ "uniform float zfar; // camera clipping end",
+ "//------------------------------------------",
+ "//user variables",
+ "const int samples = SAMPLES; //samples on the first ring",
+ "const int rings = RINGS; //ring count",
+ "const int maxringsamples = rings * samples;",
+ "uniform bool manualdof; // manual dof calculation",
+ "float ndofstart = 1.0; // near dof blur start",
+ "float ndofdist = 2.0; // near dof blur falloff distance",
+ "float fdofstart = 1.0; // far dof blur start",
+ "float fdofdist = 3.0; // far dof blur falloff distance",
+ "float CoC = 0.03; //circle of confusion size in mm (35mm film = 0.03mm)",
+ "uniform bool vignetting; // use optical lens vignetting",
+ "float vignout = 1.3; // vignetting outer border",
+ "float vignin = 0.0; // vignetting inner border",
+ "float vignfade = 22.0; // f-stops till vignete fades",
+ "uniform bool shaderFocus;",
+ "// disable if you use external focalDepth value",
+ "uniform vec2 focusCoords;",
+ "// autofocus point on screen (0.0,0.0 - left lower corner, 1.0,1.0 - upper right)",
+ "// if center of screen use vec2(0.5, 0.5);",
+ "uniform float maxblur;",
+ "//clamp value of max blur (0.0 = no blur, 1.0 default)",
+ "uniform float threshold; // highlight threshold;",
+ "uniform float gain; // highlight gain;",
+ "uniform float bias; // bokeh edge bias",
+ "uniform float fringe; // bokeh chromatic aberration / fringing",
+ "uniform bool noise; //use noise instead of pattern for sample dithering",
+ "uniform float dithering;",
+ "uniform bool depthblur; // blur the depth buffer",
+ "float dbsize = 1.25; // depth blur size",
+ "/*",
+ "next part is experimental",
+ "not looking good with small sample and ring count",
+ "looks okay starting from samples = 4, rings = 4",
+ "*/",
+ "uniform bool pentagon; //use pentagon as bokeh shape?",
+ "float feather = 0.4; //pentagon shape feather",
+ "//------------------------------------------",
+ "float penta(vec2 coords) {",
+ "\t//pentagonal shape",
+ "\tfloat scale = float(rings) - 1.3;",
+ "\tvec4 HS0 = vec4( 1.0, 0.0, 0.0, 1.0);",
+ "\tvec4 HS1 = vec4( 0.309016994, 0.951056516, 0.0, 1.0);",
+ "\tvec4 HS2 = vec4(-0.809016994, 0.587785252, 0.0, 1.0);",
+ "\tvec4 HS3 = vec4(-0.809016994,-0.587785252, 0.0, 1.0);",
+ "\tvec4 HS4 = vec4( 0.309016994,-0.951056516, 0.0, 1.0);",
+ "\tvec4 HS5 = vec4( 0.0 ,0.0 , 1.0, 1.0);",
+ "\tvec4 one = vec4( 1.0 );",
+ "\tvec4 P = vec4((coords),vec2(scale, scale));",
+ "\tvec4 dist = vec4(0.0);",
+ "\tfloat inorout = -4.0;",
+ "\tdist.x = dot( P, HS0 );",
+ "\tdist.y = dot( P, HS1 );",
+ "\tdist.z = dot( P, HS2 );",
+ "\tdist.w = dot( P, HS3 );",
+ "\tdist = smoothstep( -feather, feather, dist );",
+ "\tinorout += dot( dist, one );",
+ "\tdist.x = dot( P, HS4 );",
+ "\tdist.y = HS5.w - abs( P.z );",
+ "\tdist = smoothstep( -feather, feather, dist );",
+ "\tinorout += dist.x;",
+ "\treturn clamp( inorout, 0.0, 1.0 );",
+ "}",
+ "float bdepth(vec2 coords) {",
+ "\t// Depth buffer blur",
+ "\tfloat d = 0.0;",
+ "\tfloat kernel[9];",
+ "\tvec2 offset[9];",
+ "\tvec2 wh = vec2(1.0/textureWidth,1.0/textureHeight) * dbsize;",
+ "\toffset[0] = vec2(-wh.x,-wh.y);",
+ "\toffset[1] = vec2( 0.0, -wh.y);",
+ "\toffset[2] = vec2( wh.x -wh.y);",
+ "\toffset[3] = vec2(-wh.x, 0.0);",
+ "\toffset[4] = vec2( 0.0, 0.0);",
+ "\toffset[5] = vec2( wh.x, 0.0);",
+ "\toffset[6] = vec2(-wh.x, wh.y);",
+ "\toffset[7] = vec2( 0.0, wh.y);",
+ "\toffset[8] = vec2( wh.x, wh.y);",
+ "\tkernel[0] = 1.0/16.0; kernel[1] = 2.0/16.0; kernel[2] = 1.0/16.0;",
+ "\tkernel[3] = 2.0/16.0; kernel[4] = 4.0/16.0; kernel[5] = 2.0/16.0;",
+ "\tkernel[6] = 1.0/16.0; kernel[7] = 2.0/16.0; kernel[8] = 1.0/16.0;",
+ "\tfor( int i=0; i<9; i++ ) {",
+ "\t\tfloat tmp = texture2D(tDepth, coords + offset[i]).r;",
+ "\t\td += tmp * kernel[i];",
+ "\t}",
+ "\treturn d;",
+ "}",
+ "vec3 color(vec2 coords,float blur) {",
+ "\t//processing the sample",
+ "\tvec3 col = vec3(0.0);",
+ "\tvec2 texel = vec2(1.0/textureWidth,1.0/textureHeight);",
+ "\tcol.r = texture2D(tColor,coords + vec2(0.0,1.0)*texel*fringe*blur).r;",
+ "\tcol.g = texture2D(tColor,coords + vec2(-0.866,-0.5)*texel*fringe*blur).g;",
+ "\tcol.b = texture2D(tColor,coords + vec2(0.866,-0.5)*texel*fringe*blur).b;",
+ "\tvec3 lumcoeff = vec3(0.299,0.587,0.114);",
+ "\tfloat lum = dot(col.rgb, lumcoeff);",
+ "\tfloat thresh = max((lum-threshold)*gain, 0.0);",
+ "\treturn col+mix(vec3(0.0),col,thresh*blur);",
+ "}",
+ "vec3 debugFocus(vec3 col, float blur, float depth) {",
+ "\tfloat edge = 0.002*depth; //distance based edge smoothing",
+ "\tfloat m = clamp(smoothstep(0.0,edge,blur),0.0,1.0);",
+ "\tfloat e = clamp(smoothstep(1.0-edge,1.0,blur),0.0,1.0);",
+ "\tcol = mix(col,vec3(1.0,0.5,0.0),(1.0-m)*0.6);",
+ "\tcol = mix(col,vec3(0.0,0.5,1.0),((1.0-e)-(1.0-m))*0.2);",
+ "\treturn col;",
+ "}",
+ "float linearize(float depth) {",
+ "\treturn -zfar * znear / (depth * (zfar - znear) - zfar);",
+ "}",
+ "float vignette() {",
+ "\tfloat dist = distance(vUv.xy, vec2(0.5,0.5));",
+ "\tdist = smoothstep(vignout+(fstop/vignfade), vignin+(fstop/vignfade), dist);",
+ "\treturn clamp(dist,0.0,1.0);",
+ "}",
+ "float gather(float i, float j, int ringsamples, inout vec3 col, float w, float h, float blur) {",
+ "\tfloat rings2 = float(rings);",
+ "\tfloat step = PI*2.0 / float(ringsamples);",
+ "\tfloat pw = cos(j*step)*i;",
+ "\tfloat ph = sin(j*step)*i;",
+ "\tfloat p = 1.0;",
+ "\tif (pentagon) {",
+ "\t\tp = penta(vec2(pw,ph));",
+ "\t}",
+ "\tcol += color(vUv.xy + vec2(pw*w,ph*h), blur) * mix(1.0, i/rings2, bias) * p;",
+ "\treturn 1.0 * mix(1.0, i /rings2, bias) * p;",
+ "}",
+ "void main() {",
+ "\t//scene depth calculation",
+ "\tfloat depth = linearize(texture2D(tDepth,vUv.xy).x);",
+ "\t// Blur depth?",
+ "\tif ( depthblur ) {",
+ "\t\tdepth = linearize(bdepth(vUv.xy));",
+ "\t}",
+ "\t//focal plane calculation",
+ "\tfloat fDepth = focalDepth;",
+ "\tif (shaderFocus) {",
+ "\t\tfDepth = linearize(texture2D(tDepth,focusCoords).x);",
+ "\t}",
+ "\t// dof blur factor calculation",
+ "\tfloat blur = 0.0;",
+ "\tif (manualdof) {",
+ "\t\tfloat a = depth-fDepth; // Focal plane",
+ "\t\tfloat b = (a-fdofstart)/fdofdist; // Far DoF",
+ "\t\tfloat c = (-a-ndofstart)/ndofdist; // Near Dof",
+ "\t\tblur = (a>0.0) ? b : c;",
+ "\t} else {",
+ "\t\tfloat f = focalLength; // focal length in mm",
+ "\t\tfloat d = fDepth*1000.0; // focal plane in mm",
+ "\t\tfloat o = depth*1000.0; // depth in mm",
+ "\t\tfloat a = (o*f)/(o-f);",
+ "\t\tfloat b = (d*f)/(d-f);",
+ "\t\tfloat c = (d-f)/(d*fstop*CoC);",
+ "\t\tblur = abs(a-b)*c;",
+ "\t}",
+ "\tblur = clamp(blur,0.0,1.0);",
+ "\t// calculation of pattern for dithering",
+ "\tvec2 noise = vec2(rand(vUv.xy), rand( vUv.xy + vec2( 0.4, 0.6 ) ) )*dithering*blur;",
+ "\t// getting blur x and y step factor",
+ "\tfloat w = (1.0/textureWidth)*blur*maxblur+noise.x;",
+ "\tfloat h = (1.0/textureHeight)*blur*maxblur+noise.y;",
+ "\t// calculation of final color",
+ "\tvec3 col = vec3(0.0);",
+ "\tif(blur < 0.05) {",
+ "\t\t//some optimization thingy",
+ "\t\tcol = texture2D(tColor, vUv.xy).rgb;",
+ "\t} else {",
+ "\t\tcol = texture2D(tColor, vUv.xy).rgb;",
+ "\t\tfloat s = 1.0;",
+ "\t\tint ringsamples;",
+ "\t\tfor (int i = 1; i <= rings; i++) {",
+ "\t\t\t/*unboxstart*/",
+ "\t\t\tringsamples = i * samples;",
+ "\t\t\tfor (int j = 0 ; j < maxringsamples ; j++) {",
+ "\t\t\t\tif (j >= ringsamples) break;",
+ "\t\t\t\ts += gather(float(i), float(j), ringsamples, col, w, h, blur);",
+ "\t\t\t}",
+ "\t\t\t/*unboxend*/",
+ "\t\t}",
+ "\t\tcol /= s; //divide by sample count",
+ "\t}",
+ "\tif (showFocus) {",
+ "\t\tcol = debugFocus(col, blur, depth);",
+ "\t}",
+ "\tif (vignetting) {",
+ "\t\tcol *= vignette();",
+ "\t}",
+ "\tgl_FragColor.rgb = col;",
+ "\tgl_FragColor.a = 1.0;",
+ "} ",
+ ].join("\n"),
+ },
+ ti = {
+ uniforms: { mNear: { value: 1 }, mFar: { value: 1e3 } },
+ vertexShader: [
+ "varying float vViewZDepth;",
+ "void main() {",
+ "\t#include ",
+ "\t#include ",
+ "\tvViewZDepth = - mvPosition.z;",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float mNear;",
+ "uniform float mFar;",
+ "varying float vViewZDepth;",
+ "void main() {",
+ "\tfloat color = 1.0 - smoothstep( mNear, mFar, vViewZDepth );",
+ "\tgl_FragColor = vec4( vec3( color ), 1.0 );",
+ "} ",
+ ].join("\n"),
+ },
+ ni = null,
+ ri = new A.Triangle(),
+ ii = new A.Vector3(),
+ ai = null,
+ oi = {
+ c: null,
+ u: [new A.Vector3(), new A.Vector3(), new A.Vector3()],
+ e: [],
+ },
+ si = {
+ c: null,
+ u: [new A.Vector3(), new A.Vector3(), new A.Vector3()],
+ e: [],
+ },
+ li = [[], [], []],
+ ui = [[], [], []],
+ ci = [],
+ fi = new A.Vector3(),
+ di = new A.Vector3(),
+ hi = new A.Vector3(),
+ pi = new A.Vector3(),
+ vi = new A.Vector3(),
+ mi = new A.Vector3(),
+ gi = new A.Matrix3(),
+ Ai = new A.Box3(),
+ yi = new A.Matrix4(),
+ bi = new A.Matrix4(),
+ xi = new A.Ray(),
+ Si = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new A.Vector3(),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new A.Vector3(),
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : new A.Matrix3();
+ (0, p.Z)(this, e),
+ (this.center = t),
+ (this.halfSize = n),
+ (this.rotation = r);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t, n) {
+ return (
+ (this.center = e),
+ (this.halfSize = t),
+ (this.rotation = n),
+ this
+ );
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ this.center.copy(e.center),
+ this.halfSize.copy(e.halfSize),
+ this.rotation.copy(e.rotation),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "getSize",
+ value: function (e) {
+ return e.copy(this.halfSize).multiplyScalar(2);
+ },
+ },
+ {
+ key: "clampPoint",
+ value: function (e, t) {
+ var n = this.halfSize;
+ pi.subVectors(e, this.center),
+ this.rotation.extractBasis(fi, di, hi),
+ t.copy(this.center);
+ var r = A.MathUtils.clamp(pi.dot(fi), -n.x, n.x);
+ t.add(fi.multiplyScalar(r));
+ var i = A.MathUtils.clamp(pi.dot(di), -n.y, n.y);
+ t.add(di.multiplyScalar(i));
+ var a = A.MathUtils.clamp(pi.dot(hi), -n.z, n.z);
+ return t.add(hi.multiplyScalar(a)), t;
+ },
+ },
+ {
+ key: "containsPoint",
+ value: function (e) {
+ return (
+ pi.subVectors(e, this.center),
+ this.rotation.extractBasis(fi, di, hi),
+ Math.abs(pi.dot(fi)) <= this.halfSize.x &&
+ Math.abs(pi.dot(di)) <= this.halfSize.y &&
+ Math.abs(pi.dot(hi)) <= this.halfSize.z
+ );
+ },
+ },
+ {
+ key: "intersectsBox3",
+ value: function (e) {
+ return this.intersectsOBB(Ei.fromBox3(e));
+ },
+ },
+ {
+ key: "intersectsSphere",
+ value: function (e) {
+ return (
+ this.clampPoint(e.center, mi),
+ mi.distanceToSquared(e.center) <= e.radius * e.radius
+ );
+ },
+ },
+ {
+ key: "intersectsOBB",
+ value: function (e) {
+ var t,
+ n,
+ r =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Number.EPSILON;
+ (oi.c = this.center),
+ (oi.e[0] = this.halfSize.x),
+ (oi.e[1] = this.halfSize.y),
+ (oi.e[2] = this.halfSize.z),
+ this.rotation.extractBasis(oi.u[0], oi.u[1], oi.u[2]),
+ (si.c = e.center),
+ (si.e[0] = e.halfSize.x),
+ (si.e[1] = e.halfSize.y),
+ (si.e[2] = e.halfSize.z),
+ e.rotation.extractBasis(si.u[0], si.u[1], si.u[2]);
+ for (var i = 0; i < 3; i++)
+ for (var a = 0; a < 3; a++)
+ li[i][a] = oi.u[i].dot(si.u[a]);
+ pi.subVectors(si.c, oi.c),
+ (ci[0] = pi.dot(oi.u[0])),
+ (ci[1] = pi.dot(oi.u[1])),
+ (ci[2] = pi.dot(oi.u[2]));
+ for (var o = 0; o < 3; o++)
+ for (var s = 0; s < 3; s++)
+ ui[o][s] = Math.abs(li[o][s]) + r;
+ for (var l = 0; l < 3; l++)
+ if (
+ ((t = oi.e[l]),
+ (n =
+ si.e[0] * ui[l][0] +
+ si.e[1] * ui[l][1] +
+ si.e[2] * ui[l][2]),
+ Math.abs(ci[l]) > t + n)
+ )
+ return !1;
+ for (var u = 0; u < 3; u++)
+ if (
+ ((t =
+ oi.e[0] * ui[0][u] +
+ oi.e[1] * ui[1][u] +
+ oi.e[2] * ui[2][u]),
+ (n = si.e[u]),
+ Math.abs(
+ ci[0] * li[0][u] + ci[1] * li[1][u] + ci[2] * li[2][u]
+ ) >
+ t + n)
+ )
+ return !1;
+ return (
+ (t = oi.e[1] * ui[2][0] + oi.e[2] * ui[1][0]),
+ (n = si.e[1] * ui[0][2] + si.e[2] * ui[0][1]),
+ !(
+ Math.abs(ci[2] * li[1][0] - ci[1] * li[2][0]) >
+ t + n
+ ) &&
+ ((t = oi.e[1] * ui[2][1] + oi.e[2] * ui[1][1]),
+ (n = si.e[0] * ui[0][2] + si.e[2] * ui[0][0]),
+ !(
+ Math.abs(ci[2] * li[1][1] - ci[1] * li[2][1]) >
+ t + n
+ ) &&
+ ((t = oi.e[1] * ui[2][2] + oi.e[2] * ui[1][2]),
+ (n = si.e[0] * ui[0][1] + si.e[1] * ui[0][0]),
+ !(
+ Math.abs(ci[2] * li[1][2] - ci[1] * li[2][2]) >
+ t + n
+ ) &&
+ ((t = oi.e[0] * ui[2][0] + oi.e[2] * ui[0][0]),
+ (n = si.e[1] * ui[1][2] + si.e[2] * ui[1][1]),
+ !(
+ Math.abs(ci[0] * li[2][0] - ci[2] * li[0][0]) >
+ t + n
+ ) &&
+ ((t = oi.e[0] * ui[2][1] + oi.e[2] * ui[0][1]),
+ (n = si.e[0] * ui[1][2] + si.e[2] * ui[1][0]),
+ !(
+ Math.abs(ci[0] * li[2][1] - ci[2] * li[0][1]) >
+ t + n
+ ) &&
+ ((t = oi.e[0] * ui[2][2] + oi.e[2] * ui[0][2]),
+ (n = si.e[0] * ui[1][1] + si.e[1] * ui[1][0]),
+ !(
+ Math.abs(
+ ci[0] * li[2][2] - ci[2] * li[0][2]
+ ) >
+ t + n
+ ) &&
+ ((t =
+ oi.e[0] * ui[1][0] + oi.e[1] * ui[0][0]),
+ (n = si.e[1] * ui[2][2] + si.e[2] * ui[2][1]),
+ !(
+ Math.abs(
+ ci[1] * li[0][0] - ci[0] * li[1][0]
+ ) >
+ t + n
+ ) &&
+ ((t =
+ oi.e[0] * ui[1][1] + oi.e[1] * ui[0][1]),
+ (n =
+ si.e[0] * ui[2][2] + si.e[2] * ui[2][0]),
+ !(
+ Math.abs(
+ ci[1] * li[0][1] - ci[0] * li[1][1]
+ ) >
+ t + n
+ ) &&
+ ((t =
+ oi.e[0] * ui[1][2] +
+ oi.e[1] * ui[0][2]),
+ (n =
+ si.e[0] * ui[2][1] +
+ si.e[1] * ui[2][0]),
+ !(
+ Math.abs(
+ ci[1] * li[0][2] - ci[0] * li[1][2]
+ ) >
+ t + n
+ )))))))))
+ );
+ },
+ },
+ {
+ key: "intersectsPlane",
+ value: function (e) {
+ this.rotation.extractBasis(fi, di, hi);
+ var t =
+ this.halfSize.x * Math.abs(e.normal.dot(fi)) +
+ this.halfSize.y * Math.abs(e.normal.dot(di)) +
+ this.halfSize.z * Math.abs(e.normal.dot(hi)),
+ n = e.normal.dot(this.center) - e.constant;
+ return Math.abs(n) <= t;
+ },
+ },
+ {
+ key: "intersectRay",
+ value: function (e, t) {
+ return (
+ this.getSize(vi),
+ Ai.setFromCenterAndSize(pi.set(0, 0, 0), vi),
+ yi.setFromMatrix3(this.rotation),
+ yi.setPosition(this.center),
+ bi.copy(yi).invert(),
+ xi.copy(e).applyMatrix4(bi),
+ xi.intersectBox(Ai, t) ? t.applyMatrix4(yi) : null
+ );
+ },
+ },
+ {
+ key: "intersectsRay",
+ value: function (e) {
+ return null !== this.intersectRay(e, pi);
+ },
+ },
+ {
+ key: "fromBox3",
+ value: function (e) {
+ return (
+ e.getCenter(this.center),
+ e.getSize(this.halfSize).multiplyScalar(0.5),
+ this.rotation.identity(),
+ this
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e.center.equals(this.center) &&
+ e.halfSize.equals(this.halfSize) &&
+ e.rotation.equals(this.rotation)
+ );
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ var t = e.elements,
+ n = pi.set(t[0], t[1], t[2]).length(),
+ r = pi.set(t[4], t[5], t[6]).length(),
+ i = pi.set(t[8], t[9], t[10]).length();
+ e.determinant() < 0 && (n = -n), gi.setFromMatrix4(e);
+ var a = 1 / n,
+ o = 1 / r,
+ s = 1 / i;
+ return (
+ (gi.elements[0] *= a),
+ (gi.elements[1] *= a),
+ (gi.elements[2] *= a),
+ (gi.elements[3] *= o),
+ (gi.elements[4] *= o),
+ (gi.elements[5] *= o),
+ (gi.elements[6] *= s),
+ (gi.elements[7] *= s),
+ (gi.elements[8] *= s),
+ this.rotation.multiply(gi),
+ (this.halfSize.x *= n),
+ (this.halfSize.y *= r),
+ (this.halfSize.z *= i),
+ pi.setFromMatrixPosition(e),
+ this.center.add(pi),
+ this
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Ei = new Si(),
+ _i = new A.Vector3(),
+ Ci = new A.Vector3(),
+ wi = new A.Vector3(),
+ Ti = 1e-10,
+ Mi = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new A.Vector3(0, 0, 0),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new A.Vector3(0, 1, 0),
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1;
+ (0, p.Z)(this, e),
+ (this.start = t),
+ (this.end = n),
+ (this.radius = r);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "clone",
+ value: function () {
+ return new e(
+ this.start.clone(),
+ this.end.clone(),
+ this.radius
+ );
+ },
+ },
+ {
+ key: "set",
+ value: function (e, t, n) {
+ this.start.copy(e), this.end.copy(t), (this.radius = n);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ this.start.copy(e.start),
+ this.end.copy(e.end),
+ (this.radius = e.radius);
+ },
+ },
+ {
+ key: "getCenter",
+ value: function (e) {
+ return e.copy(this.end).add(this.start).multiplyScalar(0.5);
+ },
+ },
+ {
+ key: "translate",
+ value: function (e) {
+ this.start.add(e), this.end.add(e);
+ },
+ },
+ {
+ key: "checkAABBAxis",
+ value: function (e, t, n, r, i, a, o, s, l) {
+ return (
+ (i - e < l || i - n < l) &&
+ (e - a < l || n - a < l) &&
+ (o - t < l || o - r < l) &&
+ (t - s < l || r - s < l)
+ );
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ return (
+ this.checkAABBAxis(
+ this.start.x,
+ this.start.y,
+ this.end.x,
+ this.end.y,
+ e.min.x,
+ e.max.x,
+ e.min.y,
+ e.max.y,
+ this.radius
+ ) &&
+ this.checkAABBAxis(
+ this.start.x,
+ this.start.z,
+ this.end.x,
+ this.end.z,
+ e.min.x,
+ e.max.x,
+ e.min.z,
+ e.max.z,
+ this.radius
+ ) &&
+ this.checkAABBAxis(
+ this.start.y,
+ this.start.z,
+ this.end.y,
+ this.end.z,
+ e.min.y,
+ e.max.y,
+ e.min.z,
+ e.max.z,
+ this.radius
+ )
+ );
+ },
+ },
+ {
+ key: "lineLineMinimumPoints",
+ value: function (e, t) {
+ var n,
+ r,
+ i = _i.copy(e.end).sub(e.start),
+ a = Ci.copy(t.end).sub(t.start),
+ o = wi.copy(t.start).sub(e.start),
+ s = i.dot(a),
+ l = i.dot(i),
+ u = a.dot(a),
+ c = a.dot(o),
+ f = i.dot(o),
+ d = l * u - s * s;
+ if (Math.abs(d) < Ti) {
+ var h = -c / u,
+ p = (s - c) / u;
+ Math.abs(h - 0.5) < Math.abs(p - 0.5)
+ ? ((n = 0), (r = h))
+ : ((n = 1), (r = p));
+ } else r = ((n = (c * s + f * u) / d) * s - c) / u;
+ return (
+ (r = Math.max(0, Math.min(1, r))),
+ (n = Math.max(0, Math.min(1, n))),
+ [
+ i.multiplyScalar(n).add(e.start),
+ a.multiplyScalar(r).add(t.start),
+ ]
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Ii = {},
+ ki = null;
+ function Ri() {
+ for (
+ var e = [
+ 151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233,
+ 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23,
+ 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219,
+ 203, 117, 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, 87, 174,
+ 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27,
+ 166, 77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230,
+ 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54, 65, 25,
+ 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169,
+ 200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173,
+ 186, 3, 64, 52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118,
+ 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182,
+ 189, 28, 42, 223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163,
+ 70, 221, 153, 101, 155, 167, 43, 172, 9, 129, 22, 39, 253, 19,
+ 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246,
+ 97, 228, 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162,
+ 241, 81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181,
+ 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150,
+ 254, 138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128,
+ 195, 78, 66, 215, 61, 156, 180,
+ ],
+ t = 0;
+ t < 256;
+ t++
+ )
+ e[256 + t] = e[t];
+ return e;
+ }
+ var Bi = null;
+ function Pi(e) {
+ return e * e * e * (e * (6 * e - 15) + 10);
+ }
+ function Li(e, t, n) {
+ return t + e * (n - t);
+ }
+ function Di(e, t, n, r) {
+ var i = 15 & e,
+ a = i < 8 ? t : n,
+ o = i < 4 ? n : 12 == i || 14 == i ? t : r;
+ return (0 == (1 & i) ? a : -a) + (0 == (2 & i) ? o : -o);
+ }
+ var Ui = null,
+ Fi = new A.Vector3(),
+ Oi = new A.Vector3(),
+ Ni = new A.Plane(),
+ Gi = new A.Line3(),
+ Zi = new A.Line3(),
+ zi = new A.Sphere(),
+ Qi = new Mi(),
+ Hi = null,
+ Vi = null,
+ ji = {
+ rainbow: [
+ [0, 255],
+ [0.2, 65535],
+ [0.5, 65280],
+ [0.8, 16776960],
+ [1, 16711680],
+ ],
+ cooltowarm: [
+ [0, 3952322],
+ [0.2, 10206463],
+ [0.5, 14474460],
+ [0.8, 16163717],
+ [1, 11797542],
+ ],
+ blackbody: [
+ [0, 0],
+ [0.2, 7864320],
+ [0.5, 15086080],
+ [0.8, 16776960],
+ [1, 16777215],
+ ],
+ grayscale: [
+ [0, 0],
+ [0.2, 4210752],
+ [0.5, 8355712],
+ [0.8, 12566463],
+ [1, 16777215],
+ ],
+ },
+ Wi = {
+ NONE: -1,
+ ROTATE: 0,
+ DOLLY: 1,
+ PAN: 2,
+ TOUCH_ROTATE: 3,
+ TOUCH_PAN: 4,
+ TOUCH_DOLLY_PAN: 5,
+ TOUCH_DOLLY_ROTATE: 6,
+ },
+ Xi = null,
+ Yi = null,
+ qi = null,
+ Ji = null,
+ Ki = new A.Vector3(),
+ $i = null,
+ ea = null,
+ ta = null,
+ na = null,
+ ra = null,
+ ia = new A.Euler(0, 0, 0, "YXZ"),
+ aa = new A.Vector3(),
+ oa = { type: "change" },
+ sa = { type: "lock" },
+ la = { type: "unlock" },
+ ua = Math.PI / 2,
+ ca = null,
+ fa = null,
+ da = null,
+ ha = new A.Ray(),
+ pa = new A.Plane(),
+ va = Math.cos((Math.PI / 180) * 70),
+ ma = function (e, t) {
+ return ((e % t) + t) % t;
+ },
+ ga = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ (0, p.Z)(this, n),
+ (i = t.call(this)),
+ M((0, f.Z)(i), "object"),
+ M((0, f.Z)(i), "domElement"),
+ M((0, f.Z)(i), "enabled", !0),
+ M((0, f.Z)(i), "target", new A.Vector3()),
+ M((0, f.Z)(i), "minDistance", 0),
+ M((0, f.Z)(i), "maxDistance", 1 / 0),
+ M((0, f.Z)(i), "minZoom", 0),
+ M((0, f.Z)(i), "maxZoom", 1 / 0),
+ M((0, f.Z)(i), "minPolarAngle", 0),
+ M((0, f.Z)(i), "maxPolarAngle", Math.PI),
+ M((0, f.Z)(i), "minAzimuthAngle", -1 / 0),
+ M((0, f.Z)(i), "maxAzimuthAngle", 1 / 0),
+ M((0, f.Z)(i), "enableDamping", !1),
+ M((0, f.Z)(i), "dampingFactor", 0.05),
+ M((0, f.Z)(i), "enableZoom", !0),
+ M((0, f.Z)(i), "zoomSpeed", 1),
+ M((0, f.Z)(i), "enableRotate", !0),
+ M((0, f.Z)(i), "rotateSpeed", 1),
+ M((0, f.Z)(i), "enablePan", !0),
+ M((0, f.Z)(i), "panSpeed", 1),
+ M((0, f.Z)(i), "screenSpacePanning", !0),
+ M((0, f.Z)(i), "keyPanSpeed", 7),
+ M((0, f.Z)(i), "zoomToCursor", !1),
+ M((0, f.Z)(i), "autoRotate", !1),
+ M((0, f.Z)(i), "autoRotateSpeed", 2),
+ M((0, f.Z)(i), "reverseOrbit", !1),
+ M((0, f.Z)(i), "reverseHorizontalOrbit", !1),
+ M((0, f.Z)(i), "reverseVerticalOrbit", !1),
+ M((0, f.Z)(i), "keys", {
+ LEFT: "ArrowLeft",
+ UP: "ArrowUp",
+ RIGHT: "ArrowRight",
+ BOTTOM: "ArrowDown",
+ }),
+ M((0, f.Z)(i), "mouseButtons", {
+ LEFT: A.MOUSE.ROTATE,
+ MIDDLE: A.MOUSE.DOLLY,
+ RIGHT: A.MOUSE.PAN,
+ }),
+ M((0, f.Z)(i), "touches", {
+ ONE: A.TOUCH.ROTATE,
+ TWO: A.TOUCH.DOLLY_PAN,
+ }),
+ M((0, f.Z)(i), "target0"),
+ M((0, f.Z)(i), "position0"),
+ M((0, f.Z)(i), "zoom0"),
+ M((0, f.Z)(i), "_domElementKeyEvents", null),
+ M((0, f.Z)(i), "getPolarAngle"),
+ M((0, f.Z)(i), "getAzimuthalAngle"),
+ M((0, f.Z)(i), "setPolarAngle"),
+ M((0, f.Z)(i), "setAzimuthalAngle"),
+ M((0, f.Z)(i), "getDistance"),
+ M((0, f.Z)(i), "listenToKeyEvents"),
+ M((0, f.Z)(i), "stopListenToKeyEvents"),
+ M((0, f.Z)(i), "saveState"),
+ M((0, f.Z)(i), "reset"),
+ M((0, f.Z)(i), "update"),
+ M((0, f.Z)(i), "connect"),
+ M((0, f.Z)(i), "dispose"),
+ (i.object = e),
+ (i.domElement = r),
+ (i.target0 = i.target.clone()),
+ (i.position0 = i.object.position.clone()),
+ (i.zoom0 = i.object.zoom),
+ (i.getPolarAngle = function () {
+ return h.phi;
+ }),
+ (i.getAzimuthalAngle = function () {
+ return h.theta;
+ }),
+ (i.setPolarAngle = function (e) {
+ var t = ma(e, 2 * Math.PI),
+ n = h.phi;
+ n < 0 && (n += 2 * Math.PI), t < 0 && (t += 2 * Math.PI);
+ var r = Math.abs(t - n);
+ 2 * Math.PI - r < r &&
+ (t < n ? (t += 2 * Math.PI) : (n += 2 * Math.PI)),
+ (v.phi = t - n),
+ a.update();
+ }),
+ (i.setAzimuthalAngle = function (e) {
+ var t = ma(e, 2 * Math.PI),
+ n = h.theta;
+ n < 0 && (n += 2 * Math.PI), t < 0 && (t += 2 * Math.PI);
+ var r = Math.abs(t - n);
+ 2 * Math.PI - r < r &&
+ (t < n ? (t += 2 * Math.PI) : (n += 2 * Math.PI)),
+ (v.theta = t - n),
+ a.update();
+ }),
+ (i.getDistance = function () {
+ return a.object.position.distanceTo(a.target);
+ }),
+ (i.listenToKeyEvents = function (e) {
+ e.addEventListener("keydown", re),
+ (i._domElementKeyEvents = e);
+ }),
+ (i.stopListenToKeyEvents = function () {
+ i._domElementKeyEvents.removeEventListener("keydown", re),
+ (i._domElementKeyEvents = null);
+ }),
+ (i.saveState = function () {
+ a.target0.copy(a.target),
+ a.position0.copy(a.object.position),
+ (a.zoom0 = a.object.zoom);
+ }),
+ (i.reset = function () {
+ a.target.copy(a.target0),
+ a.object.position.copy(a.position0),
+ (a.object.zoom = a.zoom0),
+ a.object.updateProjectionMatrix(),
+ a.dispatchEvent(o),
+ a.update(),
+ (c = u.NONE);
+ }),
+ (i.update = (function () {
+ var t = new A.Vector3(),
+ n = new A.Vector3(0, 1, 0),
+ r = new A.Quaternion().setFromUnitVectors(e.up, n),
+ i = r.clone().invert(),
+ s = new A.Vector3(),
+ l = new A.Quaternion(),
+ f = 2 * Math.PI;
+ return function () {
+ var p = a.object.position;
+ r.setFromUnitVectors(e.up, n),
+ i.copy(r).invert(),
+ t.copy(p).sub(a.target),
+ t.applyQuaternion(r),
+ h.setFromVector3(t),
+ a.autoRotate &&
+ c === u.NONE &&
+ D(((2 * Math.PI) / 60 / 60) * a.autoRotateSpeed),
+ a.enableDamping
+ ? ((h.theta += v.theta * a.dampingFactor),
+ (h.phi += v.phi * a.dampingFactor))
+ : ((h.theta += v.theta), (h.phi += v.phi));
+ var y = a.minAzimuthAngle,
+ b = a.maxAzimuthAngle;
+ isFinite(y) &&
+ isFinite(b) &&
+ (y < -Math.PI ? (y += f) : y > Math.PI && (y -= f),
+ b < -Math.PI ? (b += f) : b > Math.PI && (b -= f),
+ (h.theta =
+ y <= b
+ ? Math.max(y, Math.min(b, h.theta))
+ : h.theta > (y + b) / 2
+ ? Math.max(y, h.theta)
+ : Math.min(b, h.theta))),
+ (h.phi = Math.max(
+ a.minPolarAngle,
+ Math.min(a.maxPolarAngle, h.phi)
+ )),
+ h.makeSafe(),
+ !0 === a.enableDamping
+ ? a.target.addScaledVector(g, a.dampingFactor)
+ : a.target.add(g),
+ (a.zoomToCursor && R) || a.object.isOrthographicCamera
+ ? (h.radius = Q(h.radius))
+ : (h.radius = Q(h.radius * m)),
+ t.setFromSpherical(h),
+ t.applyQuaternion(i),
+ p.copy(a.target).add(t),
+ a.object.lookAt(a.target),
+ !0 === a.enableDamping
+ ? ((v.theta *= 1 - a.dampingFactor),
+ (v.phi *= 1 - a.dampingFactor),
+ g.multiplyScalar(1 - a.dampingFactor))
+ : (v.set(0, 0, 0), g.set(0, 0, 0));
+ var x = !1;
+ if (a.zoomToCursor && R) {
+ var S = null;
+ if (
+ a.object instanceof A.PerspectiveCamera &&
+ a.object.isPerspectiveCamera
+ ) {
+ var E = t.length(),
+ _ = E - (S = Q(E * m));
+ a.object.position.addScaledVector(I, _),
+ a.object.updateMatrixWorld();
+ } else if (a.object.isOrthographicCamera) {
+ var C = new A.Vector3(k.x, k.y, 0);
+ C.unproject(a.object),
+ (a.object.zoom = Math.max(
+ a.minZoom,
+ Math.min(a.maxZoom, a.object.zoom / m)
+ )),
+ a.object.updateProjectionMatrix(),
+ (x = !0);
+ var w = new A.Vector3(k.x, k.y, 0);
+ w.unproject(a.object),
+ a.object.position.sub(w).add(C),
+ a.object.updateMatrixWorld(),
+ (S = t.length());
+ } else
+ console.warn(
+ "WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."
+ ),
+ (a.zoomToCursor = !1);
+ null !== S &&
+ (a.screenSpacePanning
+ ? a.target
+ .set(0, 0, -1)
+ .transformDirection(a.object.matrix)
+ .multiplyScalar(S)
+ .add(a.object.position)
+ : (ha.origin.copy(a.object.position),
+ ha.direction
+ .set(0, 0, -1)
+ .transformDirection(a.object.matrix),
+ Math.abs(a.object.up.dot(ha.direction)) < va
+ ? e.lookAt(a.target)
+ : (pa.setFromNormalAndCoplanarPoint(
+ a.object.up,
+ a.target
+ ),
+ ha.intersectPlane(pa, a.target))));
+ } else
+ a.object instanceof A.OrthographicCamera &&
+ a.object.isOrthographicCamera &&
+ ((a.object.zoom = Math.max(
+ a.minZoom,
+ Math.min(a.maxZoom, a.object.zoom / m)
+ )),
+ a.object.updateProjectionMatrix(),
+ (x = !0));
+ return (
+ (m = 1),
+ (R = !1),
+ !!(
+ x ||
+ s.distanceToSquared(a.object.position) > d ||
+ 8 * (1 - l.dot(a.object.quaternion)) > d
+ ) &&
+ (a.dispatchEvent(o),
+ s.copy(a.object.position),
+ l.copy(a.object.quaternion),
+ (x = !1),
+ !0)
+ );
+ };
+ })()),
+ (i.connect = function (e) {
+ e === document &&
+ console.error(
+ 'THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'
+ ),
+ (a.domElement = e),
+ (a.domElement.style.touchAction = "none"),
+ a.domElement.addEventListener("contextmenu", ie),
+ a.domElement.addEventListener("pointerdown", K),
+ a.domElement.addEventListener("pointercancel", te),
+ a.domElement.addEventListener("wheel", ne);
+ }),
+ (i.dispose = function () {
+ var e, t, n, r, i, o;
+ null == (e = a.domElement) ||
+ e.removeEventListener("contextmenu", ie),
+ null == (t = a.domElement) ||
+ t.removeEventListener("pointerdown", K),
+ null == (n = a.domElement) ||
+ n.removeEventListener("pointercancel", te),
+ null == (r = a.domElement) ||
+ r.removeEventListener("wheel", ne),
+ null == (i = a.domElement) ||
+ i.removeEventListener("pointermove", $),
+ null == (o = a.domElement) ||
+ o.removeEventListener("pointerup", ee),
+ null !== a._domElementKeyEvents &&
+ a._domElementKeyEvents.removeEventListener("keydown", re);
+ });
+ var a = (0, f.Z)(i),
+ o = { type: "change" },
+ s = { type: "start" },
+ l = { type: "end" },
+ u = {
+ NONE: -1,
+ ROTATE: 0,
+ DOLLY: 1,
+ PAN: 2,
+ TOUCH_ROTATE: 3,
+ TOUCH_PAN: 4,
+ TOUCH_DOLLY_PAN: 5,
+ TOUCH_DOLLY_ROTATE: 6,
+ },
+ c = u.NONE,
+ d = 1e-6,
+ h = new A.Spherical(),
+ v = new A.Spherical(),
+ m = 1,
+ g = new A.Vector3(),
+ y = new A.Vector2(),
+ b = new A.Vector2(),
+ x = new A.Vector2(),
+ S = new A.Vector2(),
+ E = new A.Vector2(),
+ _ = new A.Vector2(),
+ C = new A.Vector2(),
+ w = new A.Vector2(),
+ T = new A.Vector2(),
+ I = new A.Vector3(),
+ k = new A.Vector2(),
+ R = !1,
+ B = [],
+ P = {};
+ function L() {
+ return Math.pow(0.95, a.zoomSpeed);
+ }
+ function D(e) {
+ a.reverseOrbit || a.reverseHorizontalOrbit
+ ? (v.theta += e)
+ : (v.theta -= e);
+ }
+ function U(e) {
+ a.reverseOrbit || a.reverseVerticalOrbit
+ ? (v.phi += e)
+ : (v.phi -= e);
+ }
+ var F = (function () {
+ var e = new A.Vector3();
+ return function (t, n) {
+ e.setFromMatrixColumn(n, 0), e.multiplyScalar(-t), g.add(e);
+ };
+ })(),
+ O = (function () {
+ var e = new A.Vector3();
+ return function (t, n) {
+ !0 === a.screenSpacePanning
+ ? e.setFromMatrixColumn(n, 1)
+ : (e.setFromMatrixColumn(n, 0),
+ e.crossVectors(a.object.up, e)),
+ e.multiplyScalar(t),
+ g.add(e);
+ };
+ })(),
+ N = (function () {
+ var e = new A.Vector3();
+ return function (t, n) {
+ var r = a.domElement;
+ if (
+ r &&
+ a.object instanceof A.PerspectiveCamera &&
+ a.object.isPerspectiveCamera
+ ) {
+ var i = a.object.position;
+ e.copy(i).sub(a.target);
+ var o = e.length();
+ (o *= Math.tan(((a.object.fov / 2) * Math.PI) / 180)),
+ F((2 * t * o) / r.clientHeight, a.object.matrix),
+ O((2 * n * o) / r.clientHeight, a.object.matrix);
+ } else
+ r &&
+ a.object instanceof A.OrthographicCamera &&
+ a.object.isOrthographicCamera
+ ? (F(
+ (t * (a.object.right - a.object.left)) /
+ a.object.zoom /
+ r.clientWidth,
+ a.object.matrix
+ ),
+ O(
+ (n * (a.object.top - a.object.bottom)) /
+ a.object.zoom /
+ r.clientHeight,
+ a.object.matrix
+ ))
+ : (console.warn(
+ "WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."
+ ),
+ (a.enablePan = !1));
+ };
+ })();
+ function G(e) {
+ (a.object instanceof A.PerspectiveCamera &&
+ a.object.isPerspectiveCamera) ||
+ (a.object instanceof A.OrthographicCamera &&
+ a.object.isOrthographicCamera)
+ ? (m /= e)
+ : (console.warn(
+ "WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."
+ ),
+ (a.enableZoom = !1));
+ }
+ function Z(e) {
+ (a.object instanceof A.PerspectiveCamera &&
+ a.object.isPerspectiveCamera) ||
+ (a.object instanceof A.OrthographicCamera &&
+ a.object.isOrthographicCamera)
+ ? (m *= e)
+ : (console.warn(
+ "WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."
+ ),
+ (a.enableZoom = !1));
+ }
+ function z(e) {
+ if (a.zoomToCursor && a.domElement) {
+ R = !0;
+ var t = a.domElement.getBoundingClientRect(),
+ n = e.clientX - t.left,
+ r = e.clientY - t.top,
+ i = t.width,
+ o = t.height;
+ (k.x = (n / i) * 2 - 1),
+ (k.y = (-r / o) * 2 + 1),
+ I.set(k.x, k.y, 1)
+ .unproject(a.object)
+ .sub(a.object.position)
+ .normalize();
+ }
+ }
+ function Q(e) {
+ return Math.max(a.minDistance, Math.min(a.maxDistance, e));
+ }
+ function H(e) {
+ y.set(e.clientX, e.clientY);
+ }
+ function V(e) {
+ S.set(e.clientX, e.clientY);
+ }
+ function j() {
+ if (1 == B.length) y.set(B[0].pageX, B[0].pageY);
+ else {
+ var e = 0.5 * (B[0].pageX + B[1].pageX),
+ t = 0.5 * (B[0].pageY + B[1].pageY);
+ y.set(e, t);
+ }
+ }
+ function W() {
+ if (1 == B.length) S.set(B[0].pageX, B[0].pageY);
+ else {
+ var e = 0.5 * (B[0].pageX + B[1].pageX),
+ t = 0.5 * (B[0].pageY + B[1].pageY);
+ S.set(e, t);
+ }
+ }
+ function X() {
+ var e = B[0].pageX - B[1].pageX,
+ t = B[0].pageY - B[1].pageY,
+ n = Math.sqrt(e * e + t * t);
+ C.set(0, n);
+ }
+ function Y(e) {
+ if (1 == B.length) b.set(e.pageX, e.pageY);
+ else {
+ var t = se(e),
+ n = 0.5 * (e.pageX + t.x),
+ r = 0.5 * (e.pageY + t.y);
+ b.set(n, r);
+ }
+ x.subVectors(b, y).multiplyScalar(a.rotateSpeed);
+ var i = a.domElement;
+ i &&
+ (D((2 * Math.PI * x.x) / i.clientHeight),
+ U((2 * Math.PI * x.y) / i.clientHeight)),
+ y.copy(b);
+ }
+ function q(e) {
+ if (1 == B.length) E.set(e.pageX, e.pageY);
+ else {
+ var t = se(e),
+ n = 0.5 * (e.pageX + t.x),
+ r = 0.5 * (e.pageY + t.y);
+ E.set(n, r);
+ }
+ _.subVectors(E, S).multiplyScalar(a.panSpeed),
+ N(_.x, _.y),
+ S.copy(E);
+ }
+ function J(e) {
+ var t = se(e),
+ n = e.pageX - t.x,
+ r = e.pageY - t.y,
+ i = Math.sqrt(n * n + r * r);
+ w.set(0, i),
+ T.set(0, Math.pow(w.y / C.y, a.zoomSpeed)),
+ G(T.y),
+ C.copy(w);
+ }
+ function K(e) {
+ var t, n, r;
+ !1 !== a.enabled &&
+ (0 === B.length &&
+ (null == (t = a.domElement) ||
+ t.setPointerCapture(e.pointerId),
+ null == (n = a.domElement) ||
+ n.addEventListener("pointermove", $),
+ null == (r = a.domElement) ||
+ r.addEventListener("pointerup", ee)),
+ (function (e) {
+ B.push(e);
+ })(e),
+ "touch" === e.pointerType
+ ? (function (e) {
+ switch ((oe(e), B.length)) {
+ case 1:
+ switch (a.touches.ONE) {
+ case A.TOUCH.ROTATE:
+ if (!1 === a.enableRotate) return;
+ j(), (c = u.TOUCH_ROTATE);
+ break;
+ case A.TOUCH.PAN:
+ if (!1 === a.enablePan) return;
+ W(), (c = u.TOUCH_PAN);
+ break;
+ default:
+ c = u.NONE;
+ }
+ break;
+ case 2:
+ switch (a.touches.TWO) {
+ case A.TOUCH.DOLLY_PAN:
+ if (!1 === a.enableZoom && !1 === a.enablePan)
+ return;
+ a.enableZoom && X(),
+ a.enablePan && W(),
+ (c = u.TOUCH_DOLLY_PAN);
+ break;
+ case A.TOUCH.DOLLY_ROTATE:
+ if (
+ !1 === a.enableZoom &&
+ !1 === a.enableRotate
+ )
+ return;
+ a.enableZoom && X(),
+ a.enableRotate && j(),
+ (c = u.TOUCH_DOLLY_ROTATE);
+ break;
+ default:
+ c = u.NONE;
+ }
+ break;
+ default:
+ c = u.NONE;
+ }
+ c !== u.NONE && a.dispatchEvent(s);
+ })(e)
+ : (function (e) {
+ var t;
+ switch (e.button) {
+ case 0:
+ t = a.mouseButtons.LEFT;
+ break;
+ case 1:
+ t = a.mouseButtons.MIDDLE;
+ break;
+ case 2:
+ t = a.mouseButtons.RIGHT;
+ break;
+ default:
+ t = -1;
+ }
+ switch (t) {
+ case A.MOUSE.DOLLY:
+ if (!1 === a.enableZoom) return;
+ !(function (e) {
+ z(e), C.set(e.clientX, e.clientY);
+ })(e),
+ (c = u.DOLLY);
+ break;
+ case A.MOUSE.ROTATE:
+ if (e.ctrlKey || e.metaKey || e.shiftKey) {
+ if (!1 === a.enablePan) return;
+ V(e), (c = u.PAN);
+ } else {
+ if (!1 === a.enableRotate) return;
+ H(e), (c = u.ROTATE);
+ }
+ break;
+ case A.MOUSE.PAN:
+ if (e.ctrlKey || e.metaKey || e.shiftKey) {
+ if (!1 === a.enableRotate) return;
+ H(e), (c = u.ROTATE);
+ } else {
+ if (!1 === a.enablePan) return;
+ V(e), (c = u.PAN);
+ }
+ break;
+ default:
+ c = u.NONE;
+ }
+ c !== u.NONE && a.dispatchEvent(s);
+ })(e));
+ }
+ function $(e) {
+ !1 !== a.enabled &&
+ ("touch" === e.pointerType
+ ? (function (e) {
+ switch ((oe(e), c)) {
+ case u.TOUCH_ROTATE:
+ if (!1 === a.enableRotate) return;
+ Y(e), a.update();
+ break;
+ case u.TOUCH_PAN:
+ if (!1 === a.enablePan) return;
+ q(e), a.update();
+ break;
+ case u.TOUCH_DOLLY_PAN:
+ if (!1 === a.enableZoom && !1 === a.enablePan)
+ return;
+ !(function (e) {
+ a.enableZoom && J(e), a.enablePan && q(e);
+ })(e),
+ a.update();
+ break;
+ case u.TOUCH_DOLLY_ROTATE:
+ if (!1 === a.enableZoom && !1 === a.enableRotate)
+ return;
+ !(function (e) {
+ a.enableZoom && J(e), a.enableRotate && Y(e);
+ })(e),
+ a.update();
+ break;
+ default:
+ c = u.NONE;
+ }
+ })(e)
+ : (function (e) {
+ if (!1 === a.enabled) return;
+ switch (c) {
+ case u.ROTATE:
+ if (!1 === a.enableRotate) return;
+ !(function (e) {
+ b.set(e.clientX, e.clientY),
+ x
+ .subVectors(b, y)
+ .multiplyScalar(a.rotateSpeed);
+ var t = a.domElement;
+ t &&
+ (D((2 * Math.PI * x.x) / t.clientHeight),
+ U((2 * Math.PI * x.y) / t.clientHeight)),
+ y.copy(b),
+ a.update();
+ })(e);
+ break;
+ case u.DOLLY:
+ if (!1 === a.enableZoom) return;
+ !(function (e) {
+ w.set(e.clientX, e.clientY),
+ T.subVectors(w, C),
+ T.y > 0 ? G(L()) : T.y < 0 && Z(L()),
+ C.copy(w),
+ a.update();
+ })(e);
+ break;
+ case u.PAN:
+ if (!1 === a.enablePan) return;
+ !(function (e) {
+ E.set(e.clientX, e.clientY),
+ _.subVectors(E, S).multiplyScalar(a.panSpeed),
+ N(_.x, _.y),
+ S.copy(E),
+ a.update();
+ })(e);
+ }
+ })(e));
+ }
+ function ee(e) {
+ var t, n, r;
+ ae(e),
+ 0 === B.length &&
+ (null == (t = a.domElement) ||
+ t.releasePointerCapture(e.pointerId),
+ null == (n = a.domElement) ||
+ n.removeEventListener("pointermove", $),
+ null == (r = a.domElement) ||
+ r.removeEventListener("pointerup", ee)),
+ a.dispatchEvent(l),
+ (c = u.NONE);
+ }
+ function te(e) {
+ ae(e);
+ }
+ function ne(e) {
+ !1 === a.enabled ||
+ !1 === a.enableZoom ||
+ (c !== u.NONE && c !== u.ROTATE) ||
+ (e.preventDefault(),
+ a.dispatchEvent(s),
+ (function (e) {
+ z(e),
+ e.deltaY < 0 ? Z(L()) : e.deltaY > 0 && G(L()),
+ a.update();
+ })(e),
+ a.dispatchEvent(l));
+ }
+ function re(e) {
+ !1 !== a.enabled &&
+ !1 !== a.enablePan &&
+ (function (e) {
+ var t = !1;
+ switch (e.code) {
+ case a.keys.UP:
+ N(0, a.keyPanSpeed), (t = !0);
+ break;
+ case a.keys.BOTTOM:
+ N(0, -a.keyPanSpeed), (t = !0);
+ break;
+ case a.keys.LEFT:
+ N(a.keyPanSpeed, 0), (t = !0);
+ break;
+ case a.keys.RIGHT:
+ N(-a.keyPanSpeed, 0), (t = !0);
+ }
+ t && (e.preventDefault(), a.update());
+ })(e);
+ }
+ function ie(e) {
+ !1 !== a.enabled && e.preventDefault();
+ }
+ function ae(e) {
+ delete P[e.pointerId];
+ for (var t = 0; t < B.length; t++)
+ if (B[t].pointerId == e.pointerId) return void B.splice(t, 1);
+ }
+ function oe(e) {
+ var t = P[e.pointerId];
+ void 0 === t && ((t = new A.Vector2()), (P[e.pointerId] = t)),
+ t.set(e.pageX, e.pageY);
+ }
+ function se(e) {
+ var t = e.pointerId === B[0].pointerId ? B[1] : B[0];
+ return P[t.pointerId];
+ }
+ return void 0 !== r && i.connect(r), i.update(), i;
+ }
+ return (0, v.Z)(n);
+ })(A.EventDispatcher),
+ Aa = null,
+ ya = {
+ IDLE: Symbol(),
+ ROTATE: Symbol(),
+ PAN: Symbol(),
+ SCALE: Symbol(),
+ FOV: Symbol(),
+ FOCUS: Symbol(),
+ ZROTATE: Symbol(),
+ TOUCH_MULTI: Symbol(),
+ ANIMATION_FOCUS: Symbol(),
+ ANIMATION_ROTATE: Symbol(),
+ },
+ ba = {
+ NONE: Symbol(),
+ ONE_FINGER: Symbol(),
+ ONE_FINGER_SWITCHED: Symbol(),
+ TWO_FINGER: Symbol(),
+ MULT_FINGER: Symbol(),
+ CURSOR: Symbol(),
+ },
+ xa = { x: 0, y: 0 },
+ Sa = { camera: new A.Matrix4(), gizmos: new A.Matrix4() },
+ Ea = { type: "change" },
+ _a = { type: "start" },
+ Ca = { type: "end" },
+ wa = null;
+ function Ta(e) {
+ e.preventDefault();
+ }
+ var Ma = null,
+ Ia = (function () {
+ function e() {
+ (0, p.Z)(this, e),
+ M(this, "enabled", !0),
+ M(this, "needsSwap", !0),
+ M(this, "clear", !1),
+ M(this, "renderToScreen", !1);
+ }
+ return (
+ (0, v.Z)(e, [
+ { key: "setSize", value: function (e, t) {} },
+ {
+ key: "render",
+ value: function (e, t, n, r, i) {
+ console.error(
+ "THREE.Pass: .render() must be implemented in derived pass."
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ ka = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ M(this, "camera", new A.OrthographicCamera(-1, 1, 1, -1, 0, 1)),
+ M(this, "geometry", new A.PlaneGeometry(2, 2)),
+ M(this, "mesh"),
+ (this.mesh = new A.Mesh(this.geometry, t));
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "material",
+ get: function () {
+ return this.mesh.material;
+ },
+ set: function (e) {
+ this.mesh.material = e;
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.mesh.geometry.dispose();
+ },
+ },
+ {
+ key: "render",
+ value: function (e) {
+ e.render(this.mesh, this.camera);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Ra = null,
+ Ba = {
+ defines: { USE_3DTEXTURE: 1 },
+ uniforms: {
+ lut3d: { value: null },
+ lut: { value: null },
+ lutSize: { value: 0 },
+ tDiffuse: { value: null },
+ intensity: { value: 1 },
+ },
+ vertexShader:
+ "\n\n\t\tvarying vec2 vUv;\n\n\t\tvoid main() {\n\n\t\t\tvUv = uv;\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n\t\t}\n\n\t",
+ fragmentShader:
+ "\n\n\t\tuniform float lutSize;\n\t\t#if USE_3DTEXTURE\n\t\tprecision highp sampler3D;\n\t\tuniform sampler3D lut3d;\n\t\t#else\n\t\tuniform sampler2D lut;\n\n\t\tvec3 lutLookup( sampler2D tex, float size, vec3 rgb ) {\n\n\t\t\tfloat sliceHeight = 1.0 / size;\n\t\t\tfloat yPixelHeight = 1.0 / ( size * size );\n\n\t\t\t// Get the slices on either side of the sample\n\t\t\tfloat slice = rgb.b * size;\n\t\t\tfloat interp = fract( slice );\n\t\t\tfloat slice0 = slice - interp;\n\t\t\tfloat centeredInterp = interp - 0.5;\n\n\t\t\tfloat slice1 = slice0 + sign( centeredInterp );\n\n\t\t\t// Pull y sample in by half a pixel in each direction to avoid color\n\t\t\t// bleeding from adjacent slices.\n\t\t\tfloat greenOffset = clamp( rgb.g * sliceHeight, yPixelHeight * 0.5, sliceHeight - yPixelHeight * 0.5 );\n\n\t\t\tvec2 uv0 = vec2(\n\t\t\t\trgb.r,\n\t\t\t\tslice0 * sliceHeight + greenOffset\n\t\t\t);\n\t\t\tvec2 uv1 = vec2(\n\t\t\t\trgb.r,\n\t\t\t\tslice1 * sliceHeight + greenOffset\n\t\t\t);\n\n\t\t\tvec3 sample0 = texture2D( tex, uv0 ).rgb;\n\t\t\tvec3 sample1 = texture2D( tex, uv1 ).rgb;\n\n\t\t\treturn mix( sample0, sample1, abs( centeredInterp ) );\n\n\t\t}\n\t\t#endif\n\n\t\tvarying vec2 vUv;\n\t\tuniform float intensity;\n\t\tuniform sampler2D tDiffuse;\n\t\tvoid main() {\n\n\t\t\tvec4 val = texture2D( tDiffuse, vUv );\n\t\t\tvec4 lutVal;\n\n\t\t\t// pull the sample in by half a pixel so the sample begins\n\t\t\t// at the center of the edge pixels.\n\t\t\tfloat pixelWidth = 1.0 / lutSize;\n\t\t\tfloat halfPixelWidth = 0.5 / lutSize;\n\t\t\tvec3 uvw = vec3( halfPixelWidth ) + val.rgb * ( 1.0 - pixelWidth );\n\n\t\t\t#if USE_3DTEXTURE\n\n\t\t\tlutVal = vec4( texture( lut3d, uvw ).rgb, val.a );\n\n\t\t\t#else\n\n\t\t\tlutVal = vec4( lutLookup( lut, lutSize, uvw ), val.a );\n\n\t\t\t#endif\n\n\t\t\tgl_FragColor = vec4( mix( val, lutVal, intensity ) );\n\n\t\t}\n\n\t",
+ },
+ Pa = null,
+ La = null,
+ Da = {
+ uniforms: {
+ tDiffuse: { value: null },
+ tDisp: { value: null },
+ byp: { value: 0 },
+ amount: { value: 0.08 },
+ angle: { value: 0.02 },
+ seed: { value: 0.02 },
+ seed_x: { value: 0.02 },
+ seed_y: { value: 0.02 },
+ distortion_x: { value: 0.5 },
+ distortion_y: { value: 0.6 },
+ col_s: { value: 0.05 },
+ },
+ vertexShader:
+ "varying vec2 vUv;\n void main() {\n \t vUv = uv;\n \t gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",
+ fragmentShader:
+ "uniform int byp; //should we apply the glitch ?\n uniform sampler2D tDiffuse;\n uniform sampler2D tDisp;\n uniform float amount;\n uniform float angle;\n uniform float seed;\n uniform float seed_x;\n uniform float seed_y;\n uniform float distortion_x;\n uniform float distortion_y;\n uniform float col_s;\n\n varying vec2 vUv;\n\n float rand(vec2 co){\n \t return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);\n }\n\n void main() {\n \tif(byp<1) {\n \t\tvec2 p = vUv;\n \t\tfloat xs = floor(gl_FragCoord.x / 0.5);\n \t\tfloat ys = floor(gl_FragCoord.y / 0.5);\n //based on staffantans glitch shader for unity https://github.com/staffantan/unityglitch\n \t\tvec4 normal = texture2D (tDisp, p*seed*seed);\n \t\tif(p.ydistortion_x-col_s*seed) {\n \t\t\tif(seed_x>0.){\n \t\t\t\tp.y = 1. - (p.y + distortion_y);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tp.y = distortion_y;\n \t\t\t}\n \t\t}\n \t\tif(p.xdistortion_y-col_s*seed) {\n \t\t\tif(seed_y>0.){\n \t\t\t\tp.x=distortion_x;\n \t\t\t}\n \t\t\telse {\n \t\t\t\tp.x = 1. - (p.x + distortion_x);\n \t\t\t}\n \t\t}\n \t\tp.x+=normal.x*seed_x*(seed/5.);\n \t\tp.y+=normal.y*seed_y*(seed/5.);\n //base from RGB shift shader\n \t\tvec2 offset = amount * vec2( cos(angle), sin(angle));\n \t\tvec4 cr = texture2D(tDiffuse, p + offset);\n \t\tvec4 cga = texture2D(tDiffuse, p);\n \t\tvec4 cb = texture2D(tDiffuse, p - offset);\n \t\tgl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);\n //add noise\n \t\tvec4 snow = 200.*amount*vec4(rand(vec2(xs * seed,ys * seed*50.))*0.2);\n \t\tgl_FragColor = gl_FragColor+ snow;\n \t}\n \telse {\n \t\tgl_FragColor=texture2D (tDiffuse, vUv);\n \t}\n }",
+ },
+ Ua = null,
+ Fa = {
+ uniforms: {
+ tDiffuse: { value: null },
+ shape: { value: 1 },
+ radius: { value: 4 },
+ rotateR: { value: (Math.PI / 12) * 1 },
+ rotateG: { value: (Math.PI / 12) * 2 },
+ rotateB: { value: (Math.PI / 12) * 3 },
+ scatter: { value: 0 },
+ width: { value: 1 },
+ height: { value: 1 },
+ blending: { value: 1 },
+ blendingMode: { value: 1 },
+ greyscale: { value: !1 },
+ disable: { value: !1 },
+ },
+ vertexShader: [
+ "varying vec2 vUV;",
+ "void main() {",
+ "\tvUV = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#define SQRT2_MINUS_ONE 0.41421356",
+ "#define SQRT2_HALF_MINUS_ONE 0.20710678",
+ "#define PI2 6.28318531",
+ "#define SHAPE_DOT 1",
+ "#define SHAPE_ELLIPSE 2",
+ "#define SHAPE_LINE 3",
+ "#define SHAPE_SQUARE 4",
+ "#define BLENDING_LINEAR 1",
+ "#define BLENDING_MULTIPLY 2",
+ "#define BLENDING_ADD 3",
+ "#define BLENDING_LIGHTER 4",
+ "#define BLENDING_DARKER 5",
+ "uniform sampler2D tDiffuse;",
+ "uniform float radius;",
+ "uniform float rotateR;",
+ "uniform float rotateG;",
+ "uniform float rotateB;",
+ "uniform float scatter;",
+ "uniform float width;",
+ "uniform float height;",
+ "uniform int shape;",
+ "uniform bool disable;",
+ "uniform float blending;",
+ "uniform int blendingMode;",
+ "varying vec2 vUV;",
+ "uniform bool greyscale;",
+ "const int samples = 8;",
+ "float blend( float a, float b, float t ) {",
+ "\treturn a * ( 1.0 - t ) + b * t;",
+ "}",
+ "float hypot( float x, float y ) {",
+ "\treturn sqrt( x * x + y * y );",
+ "}",
+ "float rand( vec2 seed ){",
+ "return fract( sin( dot( seed.xy, vec2( 12.9898, 78.233 ) ) ) * 43758.5453 );",
+ "}",
+ "float distanceToDotRadius( float channel, vec2 coord, vec2 normal, vec2 p, float angle, float rad_max ) {",
+ "\tfloat dist = hypot( coord.x - p.x, coord.y - p.y );",
+ "\tfloat rad = channel;",
+ "\tif ( shape == SHAPE_DOT ) {",
+ "\t\trad = pow( abs( rad ), 1.125 ) * rad_max;",
+ "\t} else if ( shape == SHAPE_ELLIPSE ) {",
+ "\t\trad = pow( abs( rad ), 1.125 ) * rad_max;",
+ "\t\tif ( dist != 0.0 ) {",
+ "\t\t\tfloat dot_p = abs( ( p.x - coord.x ) / dist * normal.x + ( p.y - coord.y ) / dist * normal.y );",
+ "\t\t\tdist = ( dist * ( 1.0 - SQRT2_HALF_MINUS_ONE ) ) + dot_p * dist * SQRT2_MINUS_ONE;",
+ "\t\t}",
+ "\t} else if ( shape == SHAPE_LINE ) {",
+ "\t\trad = pow( abs( rad ), 1.5) * rad_max;",
+ "\t\tfloat dot_p = ( p.x - coord.x ) * normal.x + ( p.y - coord.y ) * normal.y;",
+ "\t\tdist = hypot( normal.x * dot_p, normal.y * dot_p );",
+ "\t} else if ( shape == SHAPE_SQUARE ) {",
+ "\t\tfloat theta = atan( p.y - coord.y, p.x - coord.x ) - angle;",
+ "\t\tfloat sin_t = abs( sin( theta ) );",
+ "\t\tfloat cos_t = abs( cos( theta ) );",
+ "\t\trad = pow( abs( rad ), 1.4 );",
+ "\t\trad = rad_max * ( rad + ( ( sin_t > cos_t ) ? rad - sin_t * rad : rad - cos_t * rad ) );",
+ "\t}",
+ "\treturn rad - dist;",
+ "}",
+ "struct Cell {",
+ "\tvec2 normal;",
+ "\tvec2 p1;",
+ "\tvec2 p2;",
+ "\tvec2 p3;",
+ "\tvec2 p4;",
+ "\tfloat samp2;",
+ "\tfloat samp1;",
+ "\tfloat samp3;",
+ "\tfloat samp4;",
+ "};",
+ "vec4 getSample( vec2 point ) {",
+ "\tvec4 tex = texture2D( tDiffuse, vec2( point.x / width, point.y / height ) );",
+ "\tfloat base = rand( vec2( floor( point.x ), floor( point.y ) ) ) * PI2;",
+ "\tfloat step = PI2 / float( samples );",
+ "\tfloat dist = radius * 0.66;",
+ "\tfor ( int i = 0; i < samples; ++i ) {",
+ "\t\tfloat r = base + step * float( i );",
+ "\t\tvec2 coord = point + vec2( cos( r ) * dist, sin( r ) * dist );",
+ "\t\ttex += texture2D( tDiffuse, vec2( coord.x / width, coord.y / height ) );",
+ "\t}",
+ "\ttex /= float( samples ) + 1.0;",
+ "\treturn tex;",
+ "}",
+ "float getDotColour( Cell c, vec2 p, int channel, float angle, float aa ) {",
+ "\tfloat dist_c_1, dist_c_2, dist_c_3, dist_c_4, res;",
+ "\tif ( channel == 0 ) {",
+ "\t\tc.samp1 = getSample( c.p1 ).r;",
+ "\t\tc.samp2 = getSample( c.p2 ).r;",
+ "\t\tc.samp3 = getSample( c.p3 ).r;",
+ "\t\tc.samp4 = getSample( c.p4 ).r;",
+ "\t} else if (channel == 1) {",
+ "\t\tc.samp1 = getSample( c.p1 ).g;",
+ "\t\tc.samp2 = getSample( c.p2 ).g;",
+ "\t\tc.samp3 = getSample( c.p3 ).g;",
+ "\t\tc.samp4 = getSample( c.p4 ).g;",
+ "\t} else {",
+ "\t\tc.samp1 = getSample( c.p1 ).b;",
+ "\t\tc.samp3 = getSample( c.p3 ).b;",
+ "\t\tc.samp2 = getSample( c.p2 ).b;",
+ "\t\tc.samp4 = getSample( c.p4 ).b;",
+ "\t}",
+ "\tdist_c_1 = distanceToDotRadius( c.samp1, c.p1, c.normal, p, angle, radius );",
+ "\tdist_c_2 = distanceToDotRadius( c.samp2, c.p2, c.normal, p, angle, radius );",
+ "\tdist_c_3 = distanceToDotRadius( c.samp3, c.p3, c.normal, p, angle, radius );",
+ "\tdist_c_4 = distanceToDotRadius( c.samp4, c.p4, c.normal, p, angle, radius );",
+ "\tres = ( dist_c_1 > 0.0 ) ? clamp( dist_c_1 / aa, 0.0, 1.0 ) : 0.0;",
+ "\tres += ( dist_c_2 > 0.0 ) ? clamp( dist_c_2 / aa, 0.0, 1.0 ) : 0.0;",
+ "\tres += ( dist_c_3 > 0.0 ) ? clamp( dist_c_3 / aa, 0.0, 1.0 ) : 0.0;",
+ "\tres += ( dist_c_4 > 0.0 ) ? clamp( dist_c_4 / aa, 0.0, 1.0 ) : 0.0;",
+ "\tres = clamp( res, 0.0, 1.0 );",
+ "\treturn res;",
+ "}",
+ "Cell getReferenceCell( vec2 p, vec2 origin, float grid_angle, float step ) {",
+ "\tCell c;",
+ "\tvec2 n = vec2( cos( grid_angle ), sin( grid_angle ) );",
+ "\tfloat threshold = step * 0.5;",
+ "\tfloat dot_normal = n.x * ( p.x - origin.x ) + n.y * ( p.y - origin.y );",
+ "\tfloat dot_line = -n.y * ( p.x - origin.x ) + n.x * ( p.y - origin.y );",
+ "\tvec2 offset = vec2( n.x * dot_normal, n.y * dot_normal );",
+ "\tfloat offset_normal = mod( hypot( offset.x, offset.y ), step );",
+ "\tfloat normal_dir = ( dot_normal < 0.0 ) ? 1.0 : -1.0;",
+ "\tfloat normal_scale = ( ( offset_normal < threshold ) ? -offset_normal : step - offset_normal ) * normal_dir;",
+ "\tfloat offset_line = mod( hypot( ( p.x - offset.x ) - origin.x, ( p.y - offset.y ) - origin.y ), step );",
+ "\tfloat line_dir = ( dot_line < 0.0 ) ? 1.0 : -1.0;",
+ "\tfloat line_scale = ( ( offset_line < threshold ) ? -offset_line : step - offset_line ) * line_dir;",
+ "\tc.normal = n;",
+ "\tc.p1.x = p.x - n.x * normal_scale + n.y * line_scale;",
+ "\tc.p1.y = p.y - n.y * normal_scale - n.x * line_scale;",
+ "\tif ( scatter != 0.0 ) {",
+ "\t\tfloat off_mag = scatter * threshold * 0.5;",
+ "\t\tfloat off_angle = rand( vec2( floor( c.p1.x ), floor( c.p1.y ) ) ) * PI2;",
+ "\t\tc.p1.x += cos( off_angle ) * off_mag;",
+ "\t\tc.p1.y += sin( off_angle ) * off_mag;",
+ "\t}",
+ "\tfloat normal_step = normal_dir * ( ( offset_normal < threshold ) ? step : -step );",
+ "\tfloat line_step = line_dir * ( ( offset_line < threshold ) ? step : -step );",
+ "\tc.p2.x = c.p1.x - n.x * normal_step;",
+ "\tc.p2.y = c.p1.y - n.y * normal_step;",
+ "\tc.p3.x = c.p1.x + n.y * line_step;",
+ "\tc.p3.y = c.p1.y - n.x * line_step;",
+ "\tc.p4.x = c.p1.x - n.x * normal_step + n.y * line_step;",
+ "\tc.p4.y = c.p1.y - n.y * normal_step - n.x * line_step;",
+ "\treturn c;",
+ "}",
+ "float blendColour( float a, float b, float t ) {",
+ "\tif ( blendingMode == BLENDING_LINEAR ) {",
+ "\t\treturn blend( a, b, 1.0 - t );",
+ "\t} else if ( blendingMode == BLENDING_ADD ) {",
+ "\t\treturn blend( a, min( 1.0, a + b ), t );",
+ "\t} else if ( blendingMode == BLENDING_MULTIPLY ) {",
+ "\t\treturn blend( a, max( 0.0, a * b ), t );",
+ "\t} else if ( blendingMode == BLENDING_LIGHTER ) {",
+ "\t\treturn blend( a, max( a, b ), t );",
+ "\t} else if ( blendingMode == BLENDING_DARKER ) {",
+ "\t\treturn blend( a, min( a, b ), t );",
+ "\t} else {",
+ "\t\treturn blend( a, b, 1.0 - t );",
+ "\t}",
+ "}",
+ "void main() {",
+ "\tif ( ! disable ) {",
+ "\t\tvec2 p = vec2( vUV.x * width, vUV.y * height );",
+ "\t\tvec2 origin = vec2( 0, 0 );",
+ "\t\tfloat aa = ( radius < 2.5 ) ? radius * 0.5 : 1.25;",
+ "\t\tCell cell_r = getReferenceCell( p, origin, rotateR, radius );",
+ "\t\tCell cell_g = getReferenceCell( p, origin, rotateG, radius );",
+ "\t\tCell cell_b = getReferenceCell( p, origin, rotateB, radius );",
+ "\t\tfloat r = getDotColour( cell_r, p, 0, rotateR, aa );",
+ "\t\tfloat g = getDotColour( cell_g, p, 1, rotateG, aa );",
+ "\t\tfloat b = getDotColour( cell_b, p, 2, rotateB, aa );",
+ "\t\tvec4 colour = texture2D( tDiffuse, vUV );",
+ "\t\tr = blendColour( r, colour.r, blending );",
+ "\t\tg = blendColour( g, colour.g, blending );",
+ "\t\tb = blendColour( b, colour.b, blending );",
+ "\t\tif ( greyscale ) {",
+ "\t\t\tr = g = b = (r + b + g) / 3.0;",
+ "\t\t}",
+ "\t\tgl_FragColor = vec4( r, g, b, 1.0 );",
+ "\t} else {",
+ "\t\tgl_FragColor = texture2D( tDiffuse, vUV );",
+ "\t}",
+ "}",
+ ].join("\n"),
+ },
+ Oa = null,
+ Na = {
+ defines: { SMAA_THRESHOLD: "0.1" },
+ uniforms: {
+ tDiffuse: { value: null },
+ resolution: { value: new A.Vector2(1 / 1024, 1 / 512) },
+ },
+ vertexShader: [
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "varying vec4 vOffset[ 3 ];",
+ "void SMAAEdgeDetectionVS( vec2 texcoord ) {",
+ "\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );",
+ "\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );",
+ "\tvOffset[ 2 ] = texcoord.xyxy + resolution.xyxy * vec4( -2.0, 0.0, 0.0, 2.0 );",
+ "}",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tSMAAEdgeDetectionVS( vUv );",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "varying vec4 vOffset[ 3 ];",
+ "vec4 SMAAColorEdgeDetectionPS( vec2 texcoord, vec4 offset[3], sampler2D colorTex ) {",
+ "\tvec2 threshold = vec2( SMAA_THRESHOLD, SMAA_THRESHOLD );",
+ "\tvec4 delta;",
+ "\tvec3 C = texture2D( colorTex, texcoord ).rgb;",
+ "\tvec3 Cleft = texture2D( colorTex, offset[0].xy ).rgb;",
+ "\tvec3 t = abs( C - Cleft );",
+ "\tdelta.x = max( max( t.r, t.g ), t.b );",
+ "\tvec3 Ctop = texture2D( colorTex, offset[0].zw ).rgb;",
+ "\tt = abs( C - Ctop );",
+ "\tdelta.y = max( max( t.r, t.g ), t.b );",
+ "\tvec2 edges = step( threshold, delta.xy );",
+ "\tif ( dot( edges, vec2( 1.0, 1.0 ) ) == 0.0 )",
+ "\t\tdiscard;",
+ "\tvec3 Cright = texture2D( colorTex, offset[1].xy ).rgb;",
+ "\tt = abs( C - Cright );",
+ "\tdelta.z = max( max( t.r, t.g ), t.b );",
+ "\tvec3 Cbottom = texture2D( colorTex, offset[1].zw ).rgb;",
+ "\tt = abs( C - Cbottom );",
+ "\tdelta.w = max( max( t.r, t.g ), t.b );",
+ "\tfloat maxDelta = max( max( max( delta.x, delta.y ), delta.z ), delta.w );",
+ "\tvec3 Cleftleft = texture2D( colorTex, offset[2].xy ).rgb;",
+ "\tt = abs( C - Cleftleft );",
+ "\tdelta.z = max( max( t.r, t.g ), t.b );",
+ "\tvec3 Ctoptop = texture2D( colorTex, offset[2].zw ).rgb;",
+ "\tt = abs( C - Ctoptop );",
+ "\tdelta.w = max( max( t.r, t.g ), t.b );",
+ "\tmaxDelta = max( max( maxDelta, delta.z ), delta.w );",
+ "\tedges.xy *= step( 0.5 * maxDelta, delta.xy );",
+ "\treturn vec4( edges, 0.0, 0.0 );",
+ "}",
+ "void main() {",
+ "\tgl_FragColor = SMAAColorEdgeDetectionPS( vUv, vOffset, tDiffuse );",
+ "}",
+ ].join("\n"),
+ },
+ Ga = {
+ defines: {
+ SMAA_MAX_SEARCH_STEPS: "8",
+ SMAA_AREATEX_MAX_DISTANCE: "16",
+ SMAA_AREATEX_PIXEL_SIZE: "( 1.0 / vec2( 160.0, 560.0 ) )",
+ SMAA_AREATEX_SUBTEX_SIZE: "( 1.0 / 7.0 )",
+ },
+ uniforms: {
+ tDiffuse: { value: null },
+ tArea: { value: null },
+ tSearch: { value: null },
+ resolution: { value: new A.Vector2(1 / 1024, 1 / 512) },
+ },
+ vertexShader: [
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "varying vec4 vOffset[ 3 ];",
+ "varying vec2 vPixcoord;",
+ "void SMAABlendingWeightCalculationVS( vec2 texcoord ) {",
+ "\tvPixcoord = texcoord / resolution;",
+ "\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.25, 0.125, 1.25, 0.125 );",
+ "\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( -0.125, 0.25, -0.125, -1.25 );",
+ "\tvOffset[ 2 ] = vec4( vOffset[ 0 ].xz, vOffset[ 1 ].yw ) + vec4( -2.0, 2.0, -2.0, 2.0 ) * resolution.xxyy * float( SMAA_MAX_SEARCH_STEPS );",
+ "}",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tSMAABlendingWeightCalculationVS( vUv );",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#define SMAASampleLevelZeroOffset( tex, coord, offset ) texture2D( tex, coord + float( offset ) * resolution, 0.0 )",
+ "uniform sampler2D tDiffuse;",
+ "uniform sampler2D tArea;",
+ "uniform sampler2D tSearch;",
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "varying vec4 vOffset[3];",
+ "varying vec2 vPixcoord;",
+ "#if __VERSION__ == 100",
+ "vec2 round( vec2 x ) {",
+ "\treturn sign( x ) * floor( abs( x ) + 0.5 );",
+ "}",
+ "#endif",
+ "float SMAASearchLength( sampler2D searchTex, vec2 e, float bias, float scale ) {",
+ "\te.r = bias + e.r * scale;",
+ "\treturn 255.0 * texture2D( searchTex, e, 0.0 ).r;",
+ "}",
+ "float SMAASearchXLeft( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {",
+ "\tvec2 e = vec2( 0.0, 1.0 );",
+ "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {",
+ "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;",
+ "\t\ttexcoord -= vec2( 2.0, 0.0 ) * resolution;",
+ "\t\tif ( ! ( texcoord.x > end && e.g > 0.8281 && e.r == 0.0 ) ) break;",
+ "\t}",
+ "\ttexcoord.x += 0.25 * resolution.x;",
+ "\ttexcoord.x += resolution.x;",
+ "\ttexcoord.x += 2.0 * resolution.x;",
+ "\ttexcoord.x -= resolution.x * SMAASearchLength(searchTex, e, 0.0, 0.5);",
+ "\treturn texcoord.x;",
+ "}",
+ "float SMAASearchXRight( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {",
+ "\tvec2 e = vec2( 0.0, 1.0 );",
+ "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {",
+ "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;",
+ "\t\ttexcoord += vec2( 2.0, 0.0 ) * resolution;",
+ "\t\tif ( ! ( texcoord.x < end && e.g > 0.8281 && e.r == 0.0 ) ) break;",
+ "\t}",
+ "\ttexcoord.x -= 0.25 * resolution.x;",
+ "\ttexcoord.x -= resolution.x;",
+ "\ttexcoord.x -= 2.0 * resolution.x;",
+ "\ttexcoord.x += resolution.x * SMAASearchLength( searchTex, e, 0.5, 0.5 );",
+ "\treturn texcoord.x;",
+ "}",
+ "float SMAASearchYUp( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {",
+ "\tvec2 e = vec2( 1.0, 0.0 );",
+ "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {",
+ "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;",
+ "\t\ttexcoord += vec2( 0.0, 2.0 ) * resolution;",
+ "\t\tif ( ! ( texcoord.y > end && e.r > 0.8281 && e.g == 0.0 ) ) break;",
+ "\t}",
+ "\ttexcoord.y -= 0.25 * resolution.y;",
+ "\ttexcoord.y -= resolution.y;",
+ "\ttexcoord.y -= 2.0 * resolution.y;",
+ "\ttexcoord.y += resolution.y * SMAASearchLength( searchTex, e.gr, 0.0, 0.5 );",
+ "\treturn texcoord.y;",
+ "}",
+ "float SMAASearchYDown( sampler2D edgesTex, sampler2D searchTex, vec2 texcoord, float end ) {",
+ "\tvec2 e = vec2( 1.0, 0.0 );",
+ "\tfor ( int i = 0; i < SMAA_MAX_SEARCH_STEPS; i ++ ) {",
+ "\t\te = texture2D( edgesTex, texcoord, 0.0 ).rg;",
+ "\t\ttexcoord -= vec2( 0.0, 2.0 ) * resolution;",
+ "\t\tif ( ! ( texcoord.y < end && e.r > 0.8281 && e.g == 0.0 ) ) break;",
+ "\t}",
+ "\ttexcoord.y += 0.25 * resolution.y;",
+ "\ttexcoord.y += resolution.y;",
+ "\ttexcoord.y += 2.0 * resolution.y;",
+ "\ttexcoord.y -= resolution.y * SMAASearchLength( searchTex, e.gr, 0.5, 0.5 );",
+ "\treturn texcoord.y;",
+ "}",
+ "vec2 SMAAArea( sampler2D areaTex, vec2 dist, float e1, float e2, float offset ) {",
+ "\tvec2 texcoord = float( SMAA_AREATEX_MAX_DISTANCE ) * round( 4.0 * vec2( e1, e2 ) ) + dist;",
+ "\ttexcoord = SMAA_AREATEX_PIXEL_SIZE * texcoord + ( 0.5 * SMAA_AREATEX_PIXEL_SIZE );",
+ "\ttexcoord.y += SMAA_AREATEX_SUBTEX_SIZE * offset;",
+ "\treturn texture2D( areaTex, texcoord, 0.0 ).rg;",
+ "}",
+ "vec4 SMAABlendingWeightCalculationPS( vec2 texcoord, vec2 pixcoord, vec4 offset[ 3 ], sampler2D edgesTex, sampler2D areaTex, sampler2D searchTex, ivec4 subsampleIndices ) {",
+ "\tvec4 weights = vec4( 0.0, 0.0, 0.0, 0.0 );",
+ "\tvec2 e = texture2D( edgesTex, texcoord ).rg;",
+ "\tif ( e.g > 0.0 ) {",
+ "\t\tvec2 d;",
+ "\t\tvec2 coords;",
+ "\t\tcoords.x = SMAASearchXLeft( edgesTex, searchTex, offset[ 0 ].xy, offset[ 2 ].x );",
+ "\t\tcoords.y = offset[ 1 ].y;",
+ "\t\td.x = coords.x;",
+ "\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).r;",
+ "\t\tcoords.x = SMAASearchXRight( edgesTex, searchTex, offset[ 0 ].zw, offset[ 2 ].y );",
+ "\t\td.y = coords.x;",
+ "\t\td = d / resolution.x - pixcoord.x;",
+ "\t\tvec2 sqrt_d = sqrt( abs( d ) );",
+ "\t\tcoords.y -= 1.0 * resolution.y;",
+ "\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 1, 0 ) ).r;",
+ "\t\tweights.rg = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.y ) );",
+ "\t}",
+ "\tif ( e.r > 0.0 ) {",
+ "\t\tvec2 d;",
+ "\t\tvec2 coords;",
+ "\t\tcoords.y = SMAASearchYUp( edgesTex, searchTex, offset[ 1 ].xy, offset[ 2 ].z );",
+ "\t\tcoords.x = offset[ 0 ].x;",
+ "\t\td.x = coords.y;",
+ "\t\tfloat e1 = texture2D( edgesTex, coords, 0.0 ).g;",
+ "\t\tcoords.y = SMAASearchYDown( edgesTex, searchTex, offset[ 1 ].zw, offset[ 2 ].w );",
+ "\t\td.y = coords.y;",
+ "\t\td = d / resolution.y - pixcoord.y;",
+ "\t\tvec2 sqrt_d = sqrt( abs( d ) );",
+ "\t\tcoords.y -= 1.0 * resolution.y;",
+ "\t\tfloat e2 = SMAASampleLevelZeroOffset( edgesTex, coords, ivec2( 0, 1 ) ).g;",
+ "\t\tweights.ba = SMAAArea( areaTex, sqrt_d, e1, e2, float( subsampleIndices.x ) );",
+ "\t}",
+ "\treturn weights;",
+ "}",
+ "void main() {",
+ "\tgl_FragColor = SMAABlendingWeightCalculationPS( vUv, vPixcoord, vOffset, tDiffuse, tArea, tSearch, ivec4( 0.0 ) );",
+ "}",
+ ].join("\n"),
+ },
+ Za = {
+ uniforms: {
+ tDiffuse: { value: null },
+ tColor: { value: null },
+ resolution: { value: new A.Vector2(1 / 1024, 1 / 512) },
+ },
+ vertexShader: [
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "varying vec4 vOffset[ 2 ];",
+ "void SMAANeighborhoodBlendingVS( vec2 texcoord ) {",
+ "\tvOffset[ 0 ] = texcoord.xyxy + resolution.xyxy * vec4( -1.0, 0.0, 0.0, 1.0 );",
+ "\tvOffset[ 1 ] = texcoord.xyxy + resolution.xyxy * vec4( 1.0, 0.0, 0.0, -1.0 );",
+ "}",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tSMAANeighborhoodBlendingVS( vUv );",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform sampler2D tColor;",
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "varying vec4 vOffset[ 2 ];",
+ "vec4 SMAANeighborhoodBlendingPS( vec2 texcoord, vec4 offset[ 2 ], sampler2D colorTex, sampler2D blendTex ) {",
+ "\tvec4 a;",
+ "\ta.xz = texture2D( blendTex, texcoord ).xz;",
+ "\ta.y = texture2D( blendTex, offset[ 1 ].zw ).g;",
+ "\ta.w = texture2D( blendTex, offset[ 1 ].xy ).a;",
+ "\tif ( dot(a, vec4( 1.0, 1.0, 1.0, 1.0 )) < 1e-5 ) {",
+ "\t\treturn texture2D( colorTex, texcoord, 0.0 );",
+ "\t} else {",
+ "\t\tvec2 offset;",
+ "\t\toffset.x = a.a > a.b ? a.a : -a.b;",
+ "\t\toffset.y = a.g > a.r ? -a.g : a.r;",
+ "\t\tif ( abs( offset.x ) > abs( offset.y )) {",
+ "\t\t\toffset.y = 0.0;",
+ "\t\t} else {",
+ "\t\t\toffset.x = 0.0;",
+ "\t\t}",
+ "\t\tvec4 C = texture2D( colorTex, texcoord, 0.0 );",
+ "\t\ttexcoord += sign( offset ) * resolution;",
+ "\t\tvec4 Cop = texture2D( colorTex, texcoord, 0.0 );",
+ "\t\tfloat s = abs( offset.x ) > abs( offset.y ) ? abs( offset.x ) : abs( offset.y );",
+ "\t\tC.xyz = pow(C.xyz, vec3(2.2));",
+ "\t\tCop.xyz = pow(Cop.xyz, vec3(2.2));",
+ "\t\tvec4 mixed = mix(C, Cop, s);",
+ "\t\tmixed.xyz = pow(mixed.xyz, vec3(1.0 / 2.2));",
+ "\t\treturn mixed;",
+ "\t}",
+ "}",
+ "void main() {",
+ "\tgl_FragColor = SMAANeighborhoodBlendingPS( vUv, vOffset, tColor, tDiffuse );",
+ "}",
+ ].join("\n"),
+ },
+ za = null,
+ Qa = {
+ uniforms: {
+ tDiffuse: { value: null },
+ time: { value: 0 },
+ nIntensity: { value: 0.5 },
+ sIntensity: { value: 0.05 },
+ sCount: { value: 4096 },
+ grayscale: { value: 1 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "uniform float time;",
+ "uniform bool grayscale;",
+ "uniform float nIntensity;",
+ "uniform float sIntensity;",
+ "uniform float sCount;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 cTextureScreen = texture2D( tDiffuse, vUv );",
+ "\tfloat dx = rand( vUv + time );",
+ "\tvec3 cResult = cTextureScreen.rgb + cTextureScreen.rgb * clamp( 0.1 + dx, 0.0, 1.0 );",
+ "\tvec2 sc = vec2( sin( vUv.y * sCount ), cos( vUv.y * sCount ) );",
+ "\tcResult += cTextureScreen.rgb * vec3( sc.x, sc.y, sc.x ) * sIntensity;",
+ "\tcResult = cTextureScreen.rgb + clamp( nIntensity, 0.0,1.0 ) * ( cResult - cTextureScreen.rgb );",
+ "\tif( grayscale ) {",
+ "\t\tcResult = vec3( cResult.r * 0.3 + cResult.g * 0.59 + cResult.b * 0.11 );",
+ "\t}",
+ "\tgl_FragColor = vec4( cResult, cTextureScreen.a );",
+ "}",
+ ].join("\n"),
+ },
+ Ha = null,
+ Va = {
+ uniforms: { tDiffuse: { value: null }, opacity: { value: 1 } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float opacity;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 texel = texture2D( tDiffuse, vUv );",
+ "\tgl_FragColor = opacity * texel;",
+ "}",
+ ].join("\n"),
+ },
+ ja = null,
+ Wa = {
+ defines: { PERSPECTIVE_CAMERA: 1, KERNEL_SIZE: 32 },
+ uniforms: {
+ tDiffuse: { value: null },
+ tNormal: { value: null },
+ tDepth: { value: null },
+ tNoise: { value: null },
+ kernel: { value: null },
+ cameraNear: { value: null },
+ cameraFar: { value: null },
+ resolution: { value: new A.Vector2() },
+ cameraProjectionMatrix: { value: new A.Matrix4() },
+ cameraInverseProjectionMatrix: { value: new A.Matrix4() },
+ kernelRadius: { value: 8 },
+ minDistance: { value: 0.005 },
+ maxDistance: { value: 0.05 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform sampler2D tNormal;",
+ "uniform sampler2D tDepth;",
+ "uniform sampler2D tNoise;",
+ "uniform vec3 kernel[ KERNEL_SIZE ];",
+ "uniform vec2 resolution;",
+ "uniform float cameraNear;",
+ "uniform float cameraFar;",
+ "uniform mat4 cameraProjectionMatrix;",
+ "uniform mat4 cameraInverseProjectionMatrix;",
+ "uniform float kernelRadius;",
+ "uniform float minDistance;",
+ "uniform float maxDistance;",
+ "varying vec2 vUv;",
+ "#include ",
+ "float getDepth( const in vec2 screenPosition ) {",
+ "\treturn texture2D( tDepth, screenPosition ).x;",
+ "}",
+ "float getLinearDepth( const in vec2 screenPosition ) {",
+ "\t#if PERSPECTIVE_CAMERA == 1",
+ "\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;",
+ "\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );",
+ "\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );",
+ "\t#else",
+ "\t\treturn texture2D( tDepth, screenPosition ).x;",
+ "\t#endif",
+ "}",
+ "float getViewZ( const in float depth ) {",
+ "\t#if PERSPECTIVE_CAMERA == 1",
+ "\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );",
+ "\t#else",
+ "\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );",
+ "\t#endif",
+ "}",
+ "vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {",
+ "\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];",
+ "\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );",
+ "\tclipPosition *= clipW; // unprojection.",
+ "\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;",
+ "}",
+ "vec3 getViewNormal( const in vec2 screenPosition ) {",
+ "\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );",
+ "}",
+ "void main() {",
+ "\tfloat depth = getDepth( vUv );",
+ "\tfloat viewZ = getViewZ( depth );",
+ "\tvec3 viewPosition = getViewPosition( vUv, depth, viewZ );",
+ "\tvec3 viewNormal = getViewNormal( vUv );",
+ " vec2 noiseScale = vec2( resolution.x / 4.0, resolution.y / 4.0 );",
+ "\tvec3 random = texture2D( tNoise, vUv * noiseScale ).xyz;",
+ "\tvec3 tangent = normalize( random - viewNormal * dot( random, viewNormal ) );",
+ "\tvec3 bitangent = cross( viewNormal, tangent );",
+ "\tmat3 kernelMatrix = mat3( tangent, bitangent, viewNormal );",
+ " float occlusion = 0.0;",
+ " for ( int i = 0; i < KERNEL_SIZE; i ++ ) {",
+ "\t\tvec3 sampleVector = kernelMatrix * kernel[ i ];",
+ "\t\tvec3 samplePoint = viewPosition + ( sampleVector * kernelRadius );",
+ "\t\tvec4 samplePointNDC = cameraProjectionMatrix * vec4( samplePoint, 1.0 );",
+ "\t\tsamplePointNDC /= samplePointNDC.w;",
+ "\t\tvec2 samplePointUv = samplePointNDC.xy * 0.5 + 0.5;",
+ "\t\tfloat realDepth = getLinearDepth( samplePointUv );",
+ "\t\tfloat sampleDepth = viewZToOrthographicDepth( samplePoint.z, cameraNear, cameraFar );",
+ "\t\tfloat delta = sampleDepth - realDepth;",
+ "\t\tif ( delta > minDistance && delta < maxDistance ) {",
+ "\t\t\tocclusion += 1.0;",
+ "\t\t}",
+ "\t}",
+ "\tocclusion = clamp( occlusion / float( KERNEL_SIZE ), 0.0, 1.0 );",
+ "\tgl_FragColor = vec4( vec3( 1.0 - occlusion ), 1.0 );",
+ "}",
+ ].join("\n"),
+ },
+ Xa = {
+ defines: { PERSPECTIVE_CAMERA: 1 },
+ uniforms: {
+ tDepth: { value: null },
+ cameraNear: { value: null },
+ cameraFar: { value: null },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDepth;",
+ "uniform float cameraNear;",
+ "uniform float cameraFar;",
+ "varying vec2 vUv;",
+ "#include ",
+ "float getLinearDepth( const in vec2 screenPosition ) {",
+ "\t#if PERSPECTIVE_CAMERA == 1",
+ "\t\tfloat fragCoordZ = texture2D( tDepth, screenPosition ).x;",
+ "\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );",
+ "\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );",
+ "\t#else",
+ "\t\treturn texture2D( tDepth, screenPosition ).x;",
+ "\t#endif",
+ "}",
+ "void main() {",
+ "\tfloat depth = getLinearDepth( vUv );",
+ "\tgl_FragColor = vec4( vec3( 1.0 - depth ), 1.0 );",
+ "}",
+ ].join("\n"),
+ },
+ Ya = {
+ uniforms: {
+ tDiffuse: { value: null },
+ resolution: { value: new A.Vector2() },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec2 texelSize = ( 1.0 / resolution );",
+ "\tfloat result = 0.0;",
+ "\tfor ( int i = - 2; i <= 2; i ++ ) {",
+ "\t\tfor ( int j = - 2; j <= 2; j ++ ) {",
+ "\t\t\tvec2 offset = ( vec2( float( i ), float( j ) ) ) * texelSize;",
+ "\t\t\tresult += texture2D( tDiffuse, vUv + offset ).r;",
+ "\t\t}",
+ "\t}",
+ "\tgl_FragColor = vec4( vec3( result / ( 5.0 * 5.0 ) ), 1.0 );",
+ "}",
+ ].join("\n"),
+ },
+ qa = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i, a) {
+ var o;
+ (0, p.Z)(this, n),
+ ((o = t.call(this)).width = void 0 !== i ? i : 512),
+ (o.height = void 0 !== a ? a : 512),
+ (o.clear = !0),
+ (o.camera = r),
+ (o.scene = e),
+ (o.kernelRadius = 8),
+ (o.kernelSize = 32),
+ (o.kernel = []),
+ (o.noiseTexture = null),
+ (o.output = 0),
+ (o.minDistance = 0.005),
+ (o.maxDistance = 0.1),
+ (o._visibilityCache = new Map()),
+ o.generateSampleKernel(),
+ o.generateRandomKernelRotations();
+ var s = new A.DepthTexture();
+ return (
+ (s.format = A.DepthStencilFormat),
+ (s.type = A.UnsignedInt248Type),
+ (o.beautyRenderTarget = new A.WebGLRenderTarget(
+ o.width,
+ o.height
+ )),
+ (o.normalRenderTarget = new A.WebGLRenderTarget(
+ o.width,
+ o.height,
+ {
+ minFilter: A.NearestFilter,
+ magFilter: A.NearestFilter,
+ depthTexture: s,
+ }
+ )),
+ (o.ssaoRenderTarget = new A.WebGLRenderTarget(
+ o.width,
+ o.height
+ )),
+ (o.blurRenderTarget = o.ssaoRenderTarget.clone()),
+ void 0 === Wa &&
+ console.error(
+ "THREE.SSAOPass: The pass relies on SSAOShader."
+ ),
+ (o.ssaoMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, Wa.defines),
+ uniforms: A.UniformsUtils.clone(Wa.uniforms),
+ vertexShader: Wa.vertexShader,
+ fragmentShader: Wa.fragmentShader,
+ blending: A.NoBlending,
+ })),
+ (o.ssaoMaterial.uniforms.tDiffuse.value =
+ o.beautyRenderTarget.texture),
+ (o.ssaoMaterial.uniforms.tNormal.value =
+ o.normalRenderTarget.texture),
+ (o.ssaoMaterial.uniforms.tDepth.value =
+ o.normalRenderTarget.depthTexture),
+ (o.ssaoMaterial.uniforms.tNoise.value = o.noiseTexture),
+ (o.ssaoMaterial.uniforms.kernel.value = o.kernel),
+ (o.ssaoMaterial.uniforms.cameraNear.value = o.camera.near),
+ (o.ssaoMaterial.uniforms.cameraFar.value = o.camera.far),
+ o.ssaoMaterial.uniforms.resolution.value.set(o.width, o.height),
+ o.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(
+ o.camera.projectionMatrix
+ ),
+ o.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(
+ o.camera.projectionMatrixInverse
+ ),
+ (o.normalMaterial = new A.MeshNormalMaterial()),
+ (o.normalMaterial.blending = A.NoBlending),
+ (o.blurMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, Ya.defines),
+ uniforms: A.UniformsUtils.clone(Ya.uniforms),
+ vertexShader: Ya.vertexShader,
+ fragmentShader: Ya.fragmentShader,
+ })),
+ (o.blurMaterial.uniforms.tDiffuse.value =
+ o.ssaoRenderTarget.texture),
+ o.blurMaterial.uniforms.resolution.value.set(o.width, o.height),
+ (o.depthRenderMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, Xa.defines),
+ uniforms: A.UniformsUtils.clone(Xa.uniforms),
+ vertexShader: Xa.vertexShader,
+ fragmentShader: Xa.fragmentShader,
+ blending: A.NoBlending,
+ })),
+ (o.depthRenderMaterial.uniforms.tDepth.value =
+ o.normalRenderTarget.depthTexture),
+ (o.depthRenderMaterial.uniforms.cameraNear.value =
+ o.camera.near),
+ (o.depthRenderMaterial.uniforms.cameraFar.value = o.camera.far),
+ (o.copyMaterial = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(Va.uniforms),
+ vertexShader: Va.vertexShader,
+ fragmentShader: Va.fragmentShader,
+ transparent: !0,
+ depthTest: !1,
+ depthWrite: !1,
+ blendSrc: A.DstColorFactor,
+ blendDst: A.ZeroFactor,
+ blendEquation: A.AddEquation,
+ blendSrcAlpha: A.DstAlphaFactor,
+ blendDstAlpha: A.ZeroFactor,
+ blendEquationAlpha: A.AddEquation,
+ })),
+ (o.fsQuad = new ka(null)),
+ (o.originalClearColor = new A.Color()),
+ o
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "dispose",
+ value: function () {
+ this.beautyRenderTarget.dispose(),
+ this.normalRenderTarget.dispose(),
+ this.ssaoRenderTarget.dispose(),
+ this.blurRenderTarget.dispose(),
+ this.normalMaterial.dispose(),
+ this.blurMaterial.dispose(),
+ this.copyMaterial.dispose(),
+ this.depthRenderMaterial.dispose(),
+ this.fsQuad.dispose();
+ },
+ },
+ {
+ key: "render",
+ value: function (e, t) {
+ switch (
+ (!1 === e.capabilities.isWebGL2 &&
+ (this.noiseTexture.format = A.LuminanceFormat),
+ e.setRenderTarget(this.beautyRenderTarget),
+ e.clear(),
+ e.render(this.scene, this.camera),
+ this.overrideVisibility(),
+ this.renderOverride(
+ e,
+ this.normalMaterial,
+ this.normalRenderTarget,
+ 7829503,
+ 1
+ ),
+ this.restoreVisibility(),
+ (this.ssaoMaterial.uniforms.kernelRadius.value =
+ this.kernelRadius),
+ (this.ssaoMaterial.uniforms.minDistance.value =
+ this.minDistance),
+ (this.ssaoMaterial.uniforms.maxDistance.value =
+ this.maxDistance),
+ this.renderPass(
+ e,
+ this.ssaoMaterial,
+ this.ssaoRenderTarget
+ ),
+ this.renderPass(
+ e,
+ this.blurMaterial,
+ this.blurRenderTarget
+ ),
+ this.output)
+ ) {
+ case n.OUTPUT.SSAO:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.ssaoRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Blur:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.blurRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Beauty:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Depth:
+ this.renderPass(
+ e,
+ this.depthRenderMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Normal:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.normalRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Default:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ ),
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.blurRenderTarget.texture),
+ (this.copyMaterial.blending = A.CustomBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ default:
+ console.warn("THREE.SSAOPass: Unknown output type.");
+ }
+ },
+ },
+ {
+ key: "renderPass",
+ value: function (e, t, n, r, i) {
+ e.getClearColor(this.originalClearColor);
+ var a = e.getClearAlpha(),
+ o = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ (this.fsQuad.material = t),
+ this.fsQuad.render(e),
+ (e.autoClear = o),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(a);
+ },
+ },
+ {
+ key: "renderOverride",
+ value: function (e, t, n, r, i) {
+ e.getClearColor(this.originalClearColor);
+ var a = e.getClearAlpha(),
+ o = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ (r = t.clearColor || r),
+ (i = t.clearAlpha || i),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ (this.scene.overrideMaterial = t),
+ e.render(this.scene, this.camera),
+ (this.scene.overrideMaterial = null),
+ (e.autoClear = o),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(a);
+ },
+ },
+ {
+ key: "setSize",
+ value: function (e, t) {
+ (this.width = e),
+ (this.height = t),
+ this.beautyRenderTarget.setSize(e, t),
+ this.ssaoRenderTarget.setSize(e, t),
+ this.normalRenderTarget.setSize(e, t),
+ this.blurRenderTarget.setSize(e, t),
+ this.ssaoMaterial.uniforms.resolution.value.set(e, t),
+ this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(
+ this.camera.projectionMatrix
+ ),
+ this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(
+ this.camera.projectionMatrixInverse
+ ),
+ this.blurMaterial.uniforms.resolution.value.set(e, t);
+ },
+ },
+ {
+ key: "generateSampleKernel",
+ value: function () {
+ for (
+ var e = this.kernelSize, t = this.kernel, n = 0;
+ n < e;
+ n++
+ ) {
+ var r = new A.Vector3();
+ (r.x = 2 * Math.random() - 1),
+ (r.y = 2 * Math.random() - 1),
+ (r.z = Math.random()),
+ r.normalize();
+ var i = n / e;
+ (i = A.MathUtils.lerp(0.1, 1, i * i)),
+ r.multiplyScalar(i),
+ t.push(r);
+ }
+ },
+ },
+ {
+ key: "generateRandomKernelRotations",
+ value: function () {
+ void 0 === mr &&
+ console.error(
+ "THREE.SSAOPass: The pass relies on SimplexNoise."
+ );
+ for (
+ var e = new mr(), t = new Float32Array(16), n = 0;
+ n < 16;
+ n++
+ ) {
+ var r = 2 * Math.random() - 1,
+ i = 2 * Math.random() - 1;
+ t[n] = e.noise3d(r, i, 0);
+ }
+ (this.noiseTexture = new A.DataTexture(
+ t,
+ 4,
+ 4,
+ A.RedFormat,
+ A.FloatType
+ )),
+ (this.noiseTexture.wrapS = A.RepeatWrapping),
+ (this.noiseTexture.wrapT = A.RepeatWrapping),
+ (this.noiseTexture.needsUpdate = !0);
+ },
+ },
+ {
+ key: "overrideVisibility",
+ value: function () {
+ var e = this.scene,
+ t = this._visibilityCache;
+ e.traverse(function (e) {
+ t.set(e, e.visible),
+ (e.isPoints || e.isLine) && (e.visible = !1);
+ });
+ },
+ },
+ {
+ key: "restoreVisibility",
+ value: function () {
+ var e = this.scene,
+ t = this._visibilityCache;
+ e.traverse(function (e) {
+ var n = t.get(e);
+ e.visible = n;
+ }),
+ t.clear();
+ },
+ },
+ ]),
+ n
+ );
+ })(Ia),
+ Ja = qa,
+ Ka = null,
+ $a = {
+ defines: { DEPTH_PACKING: 1, PERSPECTIVE_CAMERA: 1 },
+ uniforms: {
+ tColor: { value: null },
+ tDepth: { value: null },
+ focus: { value: 1 },
+ aspect: { value: 1 },
+ aperture: { value: 0.025 },
+ maxblur: { value: 0.01 },
+ nearClip: { value: 1 },
+ farClip: { value: 1e3 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "varying vec2 vUv;",
+ "uniform sampler2D tColor;",
+ "uniform sampler2D tDepth;",
+ "uniform float maxblur;",
+ "uniform float aperture;",
+ "uniform float nearClip;",
+ "uniform float farClip;",
+ "uniform float focus;",
+ "uniform float aspect;",
+ "#include ",
+ "float getDepth( const in vec2 screenPosition ) {",
+ "\t#if DEPTH_PACKING == 1",
+ "\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );",
+ "\t#else",
+ "\treturn texture2D( tDepth, screenPosition ).x;",
+ "\t#endif",
+ "}",
+ "float getViewZ( const in float depth ) {",
+ "\t#if PERSPECTIVE_CAMERA == 1",
+ "\treturn perspectiveDepthToViewZ( depth, nearClip, farClip );",
+ "\t#else",
+ "\treturn orthographicDepthToViewZ( depth, nearClip, farClip );",
+ "\t#endif",
+ "}",
+ "void main() {",
+ "\tvec2 aspectcorrect = vec2( 1.0, aspect );",
+ "\tfloat viewZ = getViewZ( getDepth( vUv ) );",
+ "\tfloat factor = ( focus + viewZ );",
+ "\tvec2 dofblur = vec2 ( clamp( factor * aperture, -maxblur, maxblur ) );",
+ "\tvec2 dofblur9 = dofblur * 0.9;",
+ "\tvec2 dofblur7 = dofblur * 0.7;",
+ "\tvec2 dofblur4 = dofblur * 0.4;",
+ "\tvec4 col = vec4( 0.0 );",
+ "\tcol += texture2D( tColor, vUv.xy );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, 0.37 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, 0.15 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.15, 0.37 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.37, 0.15 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.37, -0.15 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.15, -0.37 ) * aspectcorrect ) * dofblur9 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.40, 0.0 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur7 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, 0.29 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.4, 0.0 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, -0.4 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, 0.29 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.4, 0.0 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( -0.29, -0.29 ) * aspectcorrect ) * dofblur4 );",
+ "\tcol += texture2D( tColor, vUv.xy + ( vec2( 0.0, 0.4 ) * aspectcorrect ) * dofblur4 );",
+ "\tgl_FragColor = col / 41.0;",
+ "\tgl_FragColor.a = 1.0;",
+ "}",
+ ].join("\n"),
+ },
+ eo = null,
+ to = null,
+ no = {
+ uniforms: { tDiffuse: { value: null } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 texel = texture2D( tDiffuse, vUv );",
+ "\tfloat l = linearToRelativeLuminance( texel.rgb );",
+ "\tgl_FragColor = vec4( l, l, l, texel.w );",
+ "}",
+ ].join("\n"),
+ },
+ ro = {
+ uniforms: {
+ tDiffuse: { value: null },
+ averageLuminance: { value: 1 },
+ luminanceMap: { value: null },
+ maxLuminance: { value: 16 },
+ minLuminance: { value: 0.01 },
+ middleGrey: { value: 0.6 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "uniform float middleGrey;",
+ "uniform float minLuminance;",
+ "uniform float maxLuminance;",
+ "#ifdef ADAPTED_LUMINANCE",
+ "\tuniform sampler2D luminanceMap;",
+ "#else",
+ "\tuniform float averageLuminance;",
+ "#endif",
+ "vec3 ToneMap( vec3 vColor ) {",
+ "\t#ifdef ADAPTED_LUMINANCE",
+ "\t\tfloat fLumAvg = texture2D(luminanceMap, vec2(0.5, 0.5)).r;",
+ "\t#else",
+ "\t\tfloat fLumAvg = averageLuminance;",
+ "\t#endif",
+ "\tfloat fLumPixel = linearToRelativeLuminance( vColor );",
+ "\tfloat fLumScaled = (fLumPixel * middleGrey) / max( minLuminance, fLumAvg );",
+ "\tfloat fLumCompressed = (fLumScaled * (1.0 + (fLumScaled / (maxLuminance * maxLuminance)))) / (1.0 + fLumScaled);",
+ "\treturn fLumCompressed * vColor;",
+ "}",
+ "void main() {",
+ "\tvec4 texel = texture2D( tDiffuse, vUv );",
+ "\tgl_FragColor = vec4( ToneMap( texel.xyz ), texel.w );",
+ "}",
+ ].join("\n"),
+ },
+ io = null,
+ ao = {
+ shaderID: "luminosityHighPass",
+ uniforms: {
+ tDiffuse: { value: null },
+ luminosityThreshold: { value: 1 },
+ smoothWidth: { value: 1 },
+ defaultColor: { value: new A.Color(0) },
+ defaultOpacity: { value: 0 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform vec3 defaultColor;",
+ "uniform float defaultOpacity;",
+ "uniform float luminosityThreshold;",
+ "uniform float smoothWidth;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 texel = texture2D( tDiffuse, vUv );",
+ "\tvec3 luma = vec3( 0.299, 0.587, 0.114 );",
+ "\tfloat v = dot( texel.xyz, luma );",
+ "\tvec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );",
+ "\tfloat alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );",
+ "\tgl_FragColor = mix( outputColor, texel, alpha );",
+ "}",
+ ].join("\n"),
+ },
+ oo = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i, a) {
+ var o;
+ (0, p.Z)(this, n),
+ ((o = t.call(this)).strength = void 0 !== r ? r : 1),
+ (o.radius = i),
+ (o.threshold = a),
+ (o.resolution =
+ void 0 !== e
+ ? new A.Vector2(e.x, e.y)
+ : new A.Vector2(256, 256)),
+ (o.clearColor = new A.Color(0, 0, 0)),
+ (o.renderTargetsHorizontal = []),
+ (o.renderTargetsVertical = []),
+ (o.nMips = 5);
+ var s = Math.round(o.resolution.x / 2),
+ l = Math.round(o.resolution.y / 2);
+ (o.renderTargetBright = new A.WebGLRenderTarget(s, l, {
+ type: A.HalfFloatType,
+ })),
+ (o.renderTargetBright.texture.name = "UnrealBloomPass.bright"),
+ (o.renderTargetBright.texture.generateMipmaps = !1);
+ for (var u = 0; u < o.nMips; u++) {
+ var c = new A.WebGLRenderTarget(s, l, {
+ type: A.HalfFloatType,
+ });
+ (c.texture.name = "UnrealBloomPass.h" + u),
+ (c.texture.generateMipmaps = !1),
+ o.renderTargetsHorizontal.push(c);
+ var f = new A.WebGLRenderTarget(s, l, {
+ type: A.HalfFloatType,
+ });
+ (f.texture.name = "UnrealBloomPass.v" + u),
+ (f.texture.generateMipmaps = !1),
+ o.renderTargetsVertical.push(f),
+ (s = Math.round(s / 2)),
+ (l = Math.round(l / 2));
+ }
+ var d = ao;
+ (o.highPassUniforms = A.UniformsUtils.clone(d.uniforms)),
+ (o.highPassUniforms.luminosityThreshold.value = a),
+ (o.highPassUniforms.smoothWidth.value = 0.01),
+ (o.materialHighPassFilter = new A.ShaderMaterial({
+ uniforms: o.highPassUniforms,
+ vertexShader: d.vertexShader,
+ fragmentShader: d.fragmentShader,
+ defines: {},
+ })),
+ (o.separableBlurMaterials = []);
+ var h = [3, 5, 7, 9, 11];
+ (s = Math.round(o.resolution.x / 2)),
+ (l = Math.round(o.resolution.y / 2));
+ for (var v = 0; v < o.nMips; v++)
+ o.separableBlurMaterials.push(o.getSeperableBlurMaterial(h[v])),
+ (o.separableBlurMaterials[v].uniforms.texSize.value =
+ new A.Vector2(s, l)),
+ (s = Math.round(s / 2)),
+ (l = Math.round(l / 2));
+ (o.compositeMaterial = o.getCompositeMaterial(o.nMips)),
+ (o.compositeMaterial.uniforms.blurTexture1.value =
+ o.renderTargetsVertical[0].texture),
+ (o.compositeMaterial.uniforms.blurTexture2.value =
+ o.renderTargetsVertical[1].texture),
+ (o.compositeMaterial.uniforms.blurTexture3.value =
+ o.renderTargetsVertical[2].texture),
+ (o.compositeMaterial.uniforms.blurTexture4.value =
+ o.renderTargetsVertical[3].texture),
+ (o.compositeMaterial.uniforms.blurTexture5.value =
+ o.renderTargetsVertical[4].texture),
+ (o.compositeMaterial.uniforms.bloomStrength.value = r),
+ (o.compositeMaterial.uniforms.bloomRadius.value = 0.1),
+ (o.compositeMaterial.needsUpdate = !0);
+ (o.compositeMaterial.uniforms.bloomFactors.value = [
+ 1, 0.8, 0.6, 0.4, 0.2,
+ ]),
+ (o.bloomTintColors = [
+ new A.Vector3(1, 1, 1),
+ new A.Vector3(1, 1, 1),
+ new A.Vector3(1, 1, 1),
+ new A.Vector3(1, 1, 1),
+ new A.Vector3(1, 1, 1),
+ ]),
+ (o.compositeMaterial.uniforms.bloomTintColors.value =
+ o.bloomTintColors);
+ var m = Va;
+ return (
+ (o.copyUniforms = A.UniformsUtils.clone(m.uniforms)),
+ (o.copyUniforms.opacity.value = 1),
+ (o.materialCopy = new A.ShaderMaterial({
+ uniforms: o.copyUniforms,
+ vertexShader: m.vertexShader,
+ fragmentShader: m.fragmentShader,
+ blending: A.AdditiveBlending,
+ depthTest: !1,
+ depthWrite: !1,
+ transparent: !0,
+ })),
+ (o.enabled = !0),
+ (o.needsSwap = !1),
+ (o._oldClearColor = new A.Color()),
+ (o.oldClearAlpha = 1),
+ (o.basic = new A.MeshBasicMaterial()),
+ (o.fsQuad = new ka(null)),
+ o
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "dispose",
+ value: function () {
+ for (
+ var e = 0;
+ e < this.renderTargetsHorizontal.length;
+ e++
+ )
+ this.renderTargetsHorizontal[e].dispose();
+ for (var t = 0; t < this.renderTargetsVertical.length; t++)
+ this.renderTargetsVertical[t].dispose();
+ this.renderTargetBright.dispose();
+ for (var n = 0; n < this.separableBlurMaterials.length; n++)
+ this.separableBlurMaterials[n].dispose();
+ this.compositeMaterial.dispose(),
+ this.materialCopy.dispose(),
+ this.basic.dispose(),
+ this.fsQuad.dispose();
+ },
+ },
+ {
+ key: "setSize",
+ value: function (e, t) {
+ var n = Math.round(e / 2),
+ r = Math.round(t / 2);
+ this.renderTargetBright.setSize(n, r);
+ for (var i = 0; i < this.nMips; i++)
+ this.renderTargetsHorizontal[i].setSize(n, r),
+ this.renderTargetsVertical[i].setSize(n, r),
+ (this.separableBlurMaterials[i].uniforms.texSize.value =
+ new A.Vector2(n, r)),
+ (n = Math.round(n / 2)),
+ (r = Math.round(r / 2));
+ },
+ },
+ {
+ key: "render",
+ value: function (e, t, r, i, a) {
+ e.getClearColor(this._oldClearColor),
+ (this.oldClearAlpha = e.getClearAlpha());
+ var o = e.autoClear;
+ (e.autoClear = !1),
+ e.setClearColor(this.clearColor, 0),
+ a && e.state.buffers.stencil.setTest(!1),
+ this.renderToScreen &&
+ ((this.fsQuad.material = this.basic),
+ (this.basic.map = r.texture),
+ e.setRenderTarget(null),
+ e.clear(),
+ this.fsQuad.render(e)),
+ (this.highPassUniforms.tDiffuse.value = r.texture),
+ (this.highPassUniforms.luminosityThreshold.value =
+ this.threshold),
+ (this.fsQuad.material = this.materialHighPassFilter),
+ e.setRenderTarget(this.renderTargetBright),
+ e.clear(),
+ this.fsQuad.render(e);
+ for (
+ var s = this.renderTargetBright, l = 0;
+ l < this.nMips;
+ l++
+ )
+ (this.fsQuad.material = this.separableBlurMaterials[l]),
+ (this.separableBlurMaterials[
+ l
+ ].uniforms.colorTexture.value = s.texture),
+ (this.separableBlurMaterials[
+ l
+ ].uniforms.direction.value = n.BlurDirectionX),
+ e.setRenderTarget(this.renderTargetsHorizontal[l]),
+ e.clear(),
+ this.fsQuad.render(e),
+ (this.separableBlurMaterials[
+ l
+ ].uniforms.colorTexture.value =
+ this.renderTargetsHorizontal[l].texture),
+ (this.separableBlurMaterials[
+ l
+ ].uniforms.direction.value = n.BlurDirectionY),
+ e.setRenderTarget(this.renderTargetsVertical[l]),
+ e.clear(),
+ this.fsQuad.render(e),
+ (s = this.renderTargetsVertical[l]);
+ (this.fsQuad.material = this.compositeMaterial),
+ (this.compositeMaterial.uniforms.bloomStrength.value =
+ this.strength),
+ (this.compositeMaterial.uniforms.bloomRadius.value =
+ this.radius),
+ (this.compositeMaterial.uniforms.bloomTintColors.value =
+ this.bloomTintColors),
+ e.setRenderTarget(this.renderTargetsHorizontal[0]),
+ e.clear(),
+ this.fsQuad.render(e),
+ (this.fsQuad.material = this.materialCopy),
+ (this.copyUniforms.tDiffuse.value =
+ this.renderTargetsHorizontal[0].texture),
+ a && e.state.buffers.stencil.setTest(!0),
+ this.renderToScreen
+ ? (e.setRenderTarget(null), this.fsQuad.render(e))
+ : (e.setRenderTarget(r), this.fsQuad.render(e)),
+ e.setClearColor(this._oldClearColor, this.oldClearAlpha),
+ (e.autoClear = o);
+ },
+ },
+ {
+ key: "getSeperableBlurMaterial",
+ value: function (e) {
+ return new A.ShaderMaterial({
+ defines: { KERNEL_RADIUS: e, SIGMA: e },
+ uniforms: {
+ colorTexture: { value: null },
+ texSize: { value: new A.Vector2(0.5, 0.5) },
+ direction: { value: new A.Vector2(0.5, 0.5) },
+ },
+ vertexShader:
+ "varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",
+ fragmentShader:
+ "#include \n\t\t\t\tvarying vec2 vUv;\n\t\t\t\tuniform sampler2D colorTexture;\n\t\t\t\tuniform vec2 texSize;\n\t\t\t\tuniform vec2 direction;\n\n\t\t\t\tfloat gaussianPdf(in float x, in float sigma) {\n\t\t\t\t\treturn 0.39894 * exp( -0.5 * x * x/( sigma * sigma))/sigma;\n\t\t\t\t}\n\t\t\t\tvoid main() {\n\t\t\t\t\tvec2 invSize = 1.0 / texSize;\n\t\t\t\t\tfloat fSigma = float(SIGMA);\n\t\t\t\t\tfloat weightSum = gaussianPdf(0.0, fSigma);\n\t\t\t\t\tvec3 diffuseSum = texture2D( colorTexture, vUv).rgb * weightSum;\n\t\t\t\t\tfor( int i = 1; i < KERNEL_RADIUS; i ++ ) {\n\t\t\t\t\t\tfloat x = float(i);\n\t\t\t\t\t\tfloat w = gaussianPdf(x, fSigma);\n\t\t\t\t\t\tvec2 uvOffset = direction * invSize * x;\n\t\t\t\t\t\tvec3 sample1 = texture2D( colorTexture, vUv + uvOffset).rgb;\n\t\t\t\t\t\tvec3 sample2 = texture2D( colorTexture, vUv - uvOffset).rgb;\n\t\t\t\t\t\tdiffuseSum += (sample1 + sample2) * w;\n\t\t\t\t\t\tweightSum += 2.0 * w;\n\t\t\t\t\t}\n\t\t\t\t\tgl_FragColor = vec4(diffuseSum/weightSum, 1.0);\n\t\t\t\t}",
+ });
+ },
+ },
+ {
+ key: "getCompositeMaterial",
+ value: function (e) {
+ return new A.ShaderMaterial({
+ defines: { NUM_MIPS: e },
+ uniforms: {
+ blurTexture1: { value: null },
+ blurTexture2: { value: null },
+ blurTexture3: { value: null },
+ blurTexture4: { value: null },
+ blurTexture5: { value: null },
+ bloomStrength: { value: 1 },
+ bloomFactors: { value: null },
+ bloomTintColors: { value: null },
+ bloomRadius: { value: 0 },
+ },
+ vertexShader:
+ "varying vec2 vUv;\n\t\t\t\tvoid main() {\n\t\t\t\t\tvUv = uv;\n\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t}",
+ fragmentShader:
+ "varying vec2 vUv;\n\t\t\t\tuniform sampler2D blurTexture1;\n\t\t\t\tuniform sampler2D blurTexture2;\n\t\t\t\tuniform sampler2D blurTexture3;\n\t\t\t\tuniform sampler2D blurTexture4;\n\t\t\t\tuniform sampler2D blurTexture5;\n\t\t\t\tuniform float bloomStrength;\n\t\t\t\tuniform float bloomRadius;\n\t\t\t\tuniform float bloomFactors[NUM_MIPS];\n\t\t\t\tuniform vec3 bloomTintColors[NUM_MIPS];\n\n\t\t\t\tfloat lerpBloomFactor(const in float factor) {\n\t\t\t\t\tfloat mirrorFactor = 1.2 - factor;\n\t\t\t\t\treturn mix(factor, mirrorFactor, bloomRadius);\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_FragColor = bloomStrength * ( lerpBloomFactor(bloomFactors[0]) * vec4(bloomTintColors[0], 1.0) * texture2D(blurTexture1, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[1]) * vec4(bloomTintColors[1], 1.0) * texture2D(blurTexture2, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[2]) * vec4(bloomTintColors[2], 1.0) * texture2D(blurTexture3, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[3]) * vec4(bloomTintColors[3], 1.0) * texture2D(blurTexture4, vUv) +\n\t\t\t\t\t\tlerpBloomFactor(bloomFactors[4]) * vec4(bloomTintColors[4], 1.0) * texture2D(blurTexture5, vUv) );\n\t\t\t\t}",
+ });
+ },
+ },
+ ]),
+ n
+ );
+ })(Ia),
+ so = oo,
+ lo = null,
+ uo = {
+ defines: {
+ NUM_SAMPLES: 7,
+ NUM_RINGS: 4,
+ NORMAL_TEXTURE: 0,
+ DIFFUSE_TEXTURE: 0,
+ DEPTH_PACKING: 1,
+ PERSPECTIVE_CAMERA: 1,
+ },
+ uniforms: {
+ tDepth: { value: null },
+ tDiffuse: { value: null },
+ tNormal: { value: null },
+ size: { value: new A.Vector2(512, 512) },
+ cameraNear: { value: 1 },
+ cameraFar: { value: 100 },
+ cameraProjectionMatrix: { value: new A.Matrix4() },
+ cameraInverseProjectionMatrix: { value: new A.Matrix4() },
+ scale: { value: 1 },
+ intensity: { value: 0.1 },
+ bias: { value: 0.5 },
+ minResolution: { value: 0 },
+ kernelRadius: { value: 100 },
+ randomSeed: { value: 0 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "varying vec2 vUv;",
+ "#if DIFFUSE_TEXTURE == 1",
+ "uniform sampler2D tDiffuse;",
+ "#endif",
+ "uniform sampler2D tDepth;",
+ "#if NORMAL_TEXTURE == 1",
+ "uniform sampler2D tNormal;",
+ "#endif",
+ "uniform float cameraNear;",
+ "uniform float cameraFar;",
+ "uniform mat4 cameraProjectionMatrix;",
+ "uniform mat4 cameraInverseProjectionMatrix;",
+ "uniform float scale;",
+ "uniform float intensity;",
+ "uniform float bias;",
+ "uniform float kernelRadius;",
+ "uniform float minResolution;",
+ "uniform vec2 size;",
+ "uniform float randomSeed;",
+ "// RGBA depth",
+ "#include ",
+ "vec4 getDefaultColor( const in vec2 screenPosition ) {",
+ "\t#if DIFFUSE_TEXTURE == 1",
+ "\treturn texture2D( tDiffuse, vUv );",
+ "\t#else",
+ "\treturn vec4( 1.0 );",
+ "\t#endif",
+ "}",
+ "float getDepth( const in vec2 screenPosition ) {",
+ "\t#if DEPTH_PACKING == 1",
+ "\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );",
+ "\t#else",
+ "\treturn texture2D( tDepth, screenPosition ).x;",
+ "\t#endif",
+ "}",
+ "float getViewZ( const in float depth ) {",
+ "\t#if PERSPECTIVE_CAMERA == 1",
+ "\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );",
+ "\t#else",
+ "\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );",
+ "\t#endif",
+ "}",
+ "vec3 getViewPosition( const in vec2 screenPosition, const in float depth, const in float viewZ ) {",
+ "\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ + cameraProjectionMatrix[3][3];",
+ "\tvec4 clipPosition = vec4( ( vec3( screenPosition, depth ) - 0.5 ) * 2.0, 1.0 );",
+ "\tclipPosition *= clipW; // unprojection.",
+ "\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;",
+ "}",
+ "vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPosition ) {",
+ "\t#if NORMAL_TEXTURE == 1",
+ "\treturn unpackRGBToNormal( texture2D( tNormal, screenPosition ).xyz );",
+ "\t#else",
+ "\treturn normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );",
+ "\t#endif",
+ "}",
+ "float scaleDividedByCameraFar;",
+ "float minResolutionMultipliedByCameraFar;",
+ "float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {",
+ "\tvec3 viewDelta = sampleViewPosition - centerViewPosition;",
+ "\tfloat viewDistance = length( viewDelta );",
+ "\tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;",
+ "\treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - bias) / (1.0 + pow2( scaledScreenDistance ) );",
+ "}",
+ "// moving costly divides into consts",
+ "const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );",
+ "const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );",
+ "float getAmbientOcclusion( const in vec3 centerViewPosition ) {",
+ "\t// precompute some variables require in getOcclusion.",
+ "\tscaleDividedByCameraFar = scale / cameraFar;",
+ "\tminResolutionMultipliedByCameraFar = minResolution * cameraFar;",
+ "\tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUv );",
+ "\t// jsfiddle that shows sample pattern: https://jsfiddle.net/a16ff1p7/",
+ "\tfloat angle = rand( vUv + randomSeed ) * PI2;",
+ "\tvec2 radius = vec2( kernelRadius * INV_NUM_SAMPLES ) / size;",
+ "\tvec2 radiusStep = radius;",
+ "\tfloat occlusionSum = 0.0;",
+ "\tfloat weightSum = 0.0;",
+ "\tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {",
+ "\t\tvec2 sampleUv = vUv + vec2( cos( angle ), sin( angle ) ) * radius;",
+ "\t\tradius += radiusStep;",
+ "\t\tangle += ANGLE_STEP;",
+ "\t\tfloat sampleDepth = getDepth( sampleUv );",
+ "\t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {",
+ "\t\t\tcontinue;",
+ "\t\t}",
+ "\t\tfloat sampleViewZ = getViewZ( sampleDepth );",
+ "\t\tvec3 sampleViewPosition = getViewPosition( sampleUv, sampleDepth, sampleViewZ );",
+ "\t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );",
+ "\t\tweightSum += 1.0;",
+ "\t}",
+ "\tif( weightSum == 0.0 ) discard;",
+ "\treturn occlusionSum * ( intensity / weightSum );",
+ "}",
+ "void main() {",
+ "\tfloat centerDepth = getDepth( vUv );",
+ "\tif( centerDepth >= ( 1.0 - EPSILON ) ) {",
+ "\t\tdiscard;",
+ "\t}",
+ "\tfloat centerViewZ = getViewZ( centerDepth );",
+ "\tvec3 viewPosition = getViewPosition( vUv, centerDepth, centerViewZ );",
+ "\tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );",
+ "\tgl_FragColor = getDefaultColor( vUv );",
+ "\tgl_FragColor.xyz *= 1.0 - ambientOcclusion;",
+ "}",
+ ].join("\n"),
+ },
+ co = {
+ defines: {
+ KERNEL_RADIUS: 4,
+ DEPTH_PACKING: 1,
+ PERSPECTIVE_CAMERA: 1,
+ },
+ uniforms: {
+ tDiffuse: { value: null },
+ size: { value: new A.Vector2(512, 512) },
+ sampleUvOffsets: { value: [new A.Vector2(0, 0)] },
+ sampleWeights: { value: [1] },
+ tDepth: { value: null },
+ cameraNear: { value: 10 },
+ cameraFar: { value: 1e3 },
+ depthCutoff: { value: 10 },
+ },
+ vertexShader: [
+ "#include ",
+ "uniform vec2 size;",
+ "varying vec2 vUv;",
+ "varying vec2 vInvSize;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tvInvSize = 1.0 / size;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "#include ",
+ "uniform sampler2D tDiffuse;",
+ "uniform sampler2D tDepth;",
+ "uniform float cameraNear;",
+ "uniform float cameraFar;",
+ "uniform float depthCutoff;",
+ "uniform vec2 sampleUvOffsets[ KERNEL_RADIUS + 1 ];",
+ "uniform float sampleWeights[ KERNEL_RADIUS + 1 ];",
+ "varying vec2 vUv;",
+ "varying vec2 vInvSize;",
+ "float getDepth( const in vec2 screenPosition ) {",
+ "\t#if DEPTH_PACKING == 1",
+ "\treturn unpackRGBAToDepth( texture2D( tDepth, screenPosition ) );",
+ "\t#else",
+ "\treturn texture2D( tDepth, screenPosition ).x;",
+ "\t#endif",
+ "}",
+ "float getViewZ( const in float depth ) {",
+ "\t#if PERSPECTIVE_CAMERA == 1",
+ "\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );",
+ "\t#else",
+ "\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );",
+ "\t#endif",
+ "}",
+ "void main() {",
+ "\tfloat depth = getDepth( vUv );",
+ "\tif( depth >= ( 1.0 - EPSILON ) ) {",
+ "\t\tdiscard;",
+ "\t}",
+ "\tfloat centerViewZ = -getViewZ( depth );",
+ "\tbool rBreak = false, lBreak = false;",
+ "\tfloat weightSum = sampleWeights[0];",
+ "\tvec4 diffuseSum = texture2D( tDiffuse, vUv ) * weightSum;",
+ "\tfor( int i = 1; i <= KERNEL_RADIUS; i ++ ) {",
+ "\t\tfloat sampleWeight = sampleWeights[i];",
+ "\t\tvec2 sampleUvOffset = sampleUvOffsets[i] * vInvSize;",
+ "\t\tvec2 sampleUv = vUv + sampleUvOffset;",
+ "\t\tfloat viewZ = -getViewZ( getDepth( sampleUv ) );",
+ "\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) rBreak = true;",
+ "\t\tif( ! rBreak ) {",
+ "\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;",
+ "\t\t\tweightSum += sampleWeight;",
+ "\t\t}",
+ "\t\tsampleUv = vUv - sampleUvOffset;",
+ "\t\tviewZ = -getViewZ( getDepth( sampleUv ) );",
+ "\t\tif( abs( viewZ - centerViewZ ) > depthCutoff ) lBreak = true;",
+ "\t\tif( ! lBreak ) {",
+ "\t\t\tdiffuseSum += texture2D( tDiffuse, sampleUv ) * sampleWeight;",
+ "\t\t\tweightSum += sampleWeight;",
+ "\t\t}",
+ "\t}",
+ "\tgl_FragColor = diffuseSum / weightSum;",
+ "}",
+ ].join("\n"),
+ },
+ fo = {
+ createSampleWeights: function (e, t) {
+ for (var n, r, i = [], a = 0; a <= e; a++)
+ i.push(
+ ((n = a),
+ (r = t),
+ Math.exp((-n * n) / (r * r * 2)) /
+ (Math.sqrt(2 * Math.PI) * r))
+ );
+ return i;
+ },
+ createSampleOffsets: function (e, t) {
+ for (var n = [], r = 0; r <= e; r++)
+ n.push(t.clone().multiplyScalar(r));
+ return n;
+ },
+ configure: function (e, t, n, r) {
+ (e.defines.KERNEL_RADIUS = t),
+ (e.uniforms.sampleUvOffsets.value = fo.createSampleOffsets(
+ t,
+ r
+ )),
+ (e.uniforms.sampleWeights.value = fo.createSampleWeights(t, n)),
+ (e.needsUpdate = !0);
+ },
+ },
+ ho = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i,
+ a,
+ o =
+ arguments.length > 2 &&
+ void 0 !== arguments[2] &&
+ arguments[2],
+ s =
+ arguments.length > 3 &&
+ void 0 !== arguments[3] &&
+ arguments[3],
+ l =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : new A.Vector2(256, 256);
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this)).scene = e),
+ (i.camera = r),
+ (i.clear = !0),
+ (i.needsSwap = !1),
+ (i.supportsDepthTextureExtension = o),
+ (i.supportsNormalTexture = s),
+ (i.originalClearColor = new A.Color()),
+ (i._oldClearColor = new A.Color()),
+ (i.oldClearAlpha = 1),
+ (i.params = {
+ output: 0,
+ saoBias: 0.5,
+ saoIntensity: 0.18,
+ saoScale: 1,
+ saoKernelRadius: 100,
+ saoMinResolution: 0,
+ saoBlur: !0,
+ saoBlurRadius: 8,
+ saoBlurStdDev: 4,
+ saoBlurDepthCutoff: 0.01,
+ }),
+ (i.resolution = new A.Vector2(l.x, l.y)),
+ (i.saoRenderTarget = new A.WebGLRenderTarget(
+ i.resolution.x,
+ i.resolution.y,
+ { type: A.HalfFloatType }
+ )),
+ (i.blurIntermediateRenderTarget = i.saoRenderTarget.clone()),
+ (i.beautyRenderTarget = i.saoRenderTarget.clone()),
+ (i.normalRenderTarget = new A.WebGLRenderTarget(
+ i.resolution.x,
+ i.resolution.y,
+ {
+ minFilter: A.NearestFilter,
+ magFilter: A.NearestFilter,
+ type: A.HalfFloatType,
+ }
+ )),
+ (i.depthRenderTarget = i.normalRenderTarget.clone()),
+ i.supportsDepthTextureExtension &&
+ (((a = new A.DepthTexture()).type = A.UnsignedShortType),
+ (i.beautyRenderTarget.depthTexture = a),
+ (i.beautyRenderTarget.depthBuffer = !0)),
+ (i.depthMaterial = new A.MeshDepthMaterial()),
+ (i.depthMaterial.depthPacking = A.RGBADepthPacking),
+ (i.depthMaterial.blending = A.NoBlending),
+ (i.normalMaterial = new A.MeshNormalMaterial()),
+ (i.normalMaterial.blending = A.NoBlending),
+ (i.saoMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, uo.defines),
+ fragmentShader: uo.fragmentShader,
+ vertexShader: uo.vertexShader,
+ uniforms: A.UniformsUtils.clone(uo.uniforms),
+ })),
+ (i.saoMaterial.extensions.derivatives = !0),
+ (i.saoMaterial.defines.DEPTH_PACKING =
+ i.supportsDepthTextureExtension ? 0 : 1),
+ (i.saoMaterial.defines.NORMAL_TEXTURE = i.supportsNormalTexture
+ ? 1
+ : 0),
+ (i.saoMaterial.defines.PERSPECTIVE_CAMERA = i.camera
+ .isPerspectiveCamera
+ ? 1
+ : 0),
+ (i.saoMaterial.uniforms.tDepth.value =
+ i.supportsDepthTextureExtension
+ ? a
+ : i.depthRenderTarget.texture),
+ (i.saoMaterial.uniforms.tNormal.value =
+ i.normalRenderTarget.texture),
+ i.saoMaterial.uniforms.size.value.set(
+ i.resolution.x,
+ i.resolution.y
+ ),
+ i.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(
+ i.camera.projectionMatrixInverse
+ ),
+ (i.saoMaterial.uniforms.cameraProjectionMatrix.value =
+ i.camera.projectionMatrix),
+ (i.saoMaterial.blending = A.NoBlending),
+ (i.vBlurMaterial = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(co.uniforms),
+ defines: Object.assign({}, co.defines),
+ vertexShader: co.vertexShader,
+ fragmentShader: co.fragmentShader,
+ })),
+ (i.vBlurMaterial.defines.DEPTH_PACKING =
+ i.supportsDepthTextureExtension ? 0 : 1),
+ (i.vBlurMaterial.defines.PERSPECTIVE_CAMERA = i.camera
+ .isPerspectiveCamera
+ ? 1
+ : 0),
+ (i.vBlurMaterial.uniforms.tDiffuse.value =
+ i.saoRenderTarget.texture),
+ (i.vBlurMaterial.uniforms.tDepth.value =
+ i.supportsDepthTextureExtension
+ ? a
+ : i.depthRenderTarget.texture),
+ i.vBlurMaterial.uniforms.size.value.set(
+ i.resolution.x,
+ i.resolution.y
+ ),
+ (i.vBlurMaterial.blending = A.NoBlending),
+ (i.hBlurMaterial = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(co.uniforms),
+ defines: Object.assign({}, co.defines),
+ vertexShader: co.vertexShader,
+ fragmentShader: co.fragmentShader,
+ })),
+ (i.hBlurMaterial.defines.DEPTH_PACKING =
+ i.supportsDepthTextureExtension ? 0 : 1),
+ (i.hBlurMaterial.defines.PERSPECTIVE_CAMERA = i.camera
+ .isPerspectiveCamera
+ ? 1
+ : 0),
+ (i.hBlurMaterial.uniforms.tDiffuse.value =
+ i.blurIntermediateRenderTarget.texture),
+ (i.hBlurMaterial.uniforms.tDepth.value =
+ i.supportsDepthTextureExtension
+ ? a
+ : i.depthRenderTarget.texture),
+ i.hBlurMaterial.uniforms.size.value.set(
+ i.resolution.x,
+ i.resolution.y
+ ),
+ (i.hBlurMaterial.blending = A.NoBlending),
+ (i.materialCopy = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(Va.uniforms),
+ vertexShader: Va.vertexShader,
+ fragmentShader: Va.fragmentShader,
+ blending: A.NoBlending,
+ })),
+ (i.materialCopy.transparent = !0),
+ (i.materialCopy.depthTest = !1),
+ (i.materialCopy.depthWrite = !1),
+ (i.materialCopy.blending = A.CustomBlending),
+ (i.materialCopy.blendSrc = A.DstColorFactor),
+ (i.materialCopy.blendDst = A.ZeroFactor),
+ (i.materialCopy.blendEquation = A.AddEquation),
+ (i.materialCopy.blendSrcAlpha = A.DstAlphaFactor),
+ (i.materialCopy.blendDstAlpha = A.ZeroFactor),
+ (i.materialCopy.blendEquationAlpha = A.AddEquation),
+ (i.depthCopy = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(qr.uniforms),
+ vertexShader: qr.vertexShader,
+ fragmentShader: qr.fragmentShader,
+ blending: A.NoBlending,
+ })),
+ (i.fsQuad = new ka(null)),
+ i
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "render",
+ value: function (e, t, n) {
+ if (
+ (this.renderToScreen &&
+ ((this.materialCopy.blending = A.NoBlending),
+ (this.materialCopy.uniforms.tDiffuse.value = n.texture),
+ (this.materialCopy.needsUpdate = !0),
+ this.renderPass(e, this.materialCopy, null)),
+ 1 !== this.params.output)
+ ) {
+ e.getClearColor(this._oldClearColor),
+ (this.oldClearAlpha = e.getClearAlpha());
+ var r = e.autoClear;
+ (e.autoClear = !1),
+ e.setRenderTarget(this.depthRenderTarget),
+ e.clear(),
+ (this.saoMaterial.uniforms.bias.value =
+ this.params.saoBias),
+ (this.saoMaterial.uniforms.intensity.value =
+ this.params.saoIntensity),
+ (this.saoMaterial.uniforms.scale.value =
+ this.params.saoScale),
+ (this.saoMaterial.uniforms.kernelRadius.value =
+ this.params.saoKernelRadius),
+ (this.saoMaterial.uniforms.minResolution.value =
+ this.params.saoMinResolution),
+ (this.saoMaterial.uniforms.cameraNear.value =
+ this.camera.near),
+ (this.saoMaterial.uniforms.cameraFar.value =
+ this.camera.far);
+ var i =
+ this.params.saoBlurDepthCutoff *
+ (this.camera.far - this.camera.near);
+ (this.vBlurMaterial.uniforms.depthCutoff.value = i),
+ (this.hBlurMaterial.uniforms.depthCutoff.value = i),
+ (this.vBlurMaterial.uniforms.cameraNear.value =
+ this.camera.near),
+ (this.vBlurMaterial.uniforms.cameraFar.value =
+ this.camera.far),
+ (this.hBlurMaterial.uniforms.cameraNear.value =
+ this.camera.near),
+ (this.hBlurMaterial.uniforms.cameraFar.value =
+ this.camera.far),
+ (this.params.saoBlurRadius = Math.floor(
+ this.params.saoBlurRadius
+ )),
+ (this.prevStdDev === this.params.saoBlurStdDev &&
+ this.prevNumSamples === this.params.saoBlurRadius) ||
+ (fo.configure(
+ this.vBlurMaterial,
+ this.params.saoBlurRadius,
+ this.params.saoBlurStdDev,
+ new A.Vector2(0, 1)
+ ),
+ fo.configure(
+ this.hBlurMaterial,
+ this.params.saoBlurRadius,
+ this.params.saoBlurStdDev,
+ new A.Vector2(1, 0)
+ ),
+ (this.prevStdDev = this.params.saoBlurStdDev),
+ (this.prevNumSamples = this.params.saoBlurRadius)),
+ e.setClearColor(0),
+ e.setRenderTarget(this.beautyRenderTarget),
+ e.clear(),
+ e.render(this.scene, this.camera),
+ this.supportsDepthTextureExtension ||
+ this.renderOverride(
+ e,
+ this.depthMaterial,
+ this.depthRenderTarget,
+ 0,
+ 1
+ ),
+ this.supportsNormalTexture &&
+ this.renderOverride(
+ e,
+ this.normalMaterial,
+ this.normalRenderTarget,
+ 7829503,
+ 1
+ ),
+ this.renderPass(
+ e,
+ this.saoMaterial,
+ this.saoRenderTarget,
+ 16777215,
+ 1
+ ),
+ this.params.saoBlur &&
+ (this.renderPass(
+ e,
+ this.vBlurMaterial,
+ this.blurIntermediateRenderTarget,
+ 16777215,
+ 1
+ ),
+ this.renderPass(
+ e,
+ this.hBlurMaterial,
+ this.saoRenderTarget,
+ 16777215,
+ 1
+ ));
+ var a = this.materialCopy;
+ 3 === this.params.output
+ ? this.supportsDepthTextureExtension
+ ? ((this.materialCopy.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.depthTexture),
+ (this.materialCopy.needsUpdate = !0))
+ : ((this.depthCopy.uniforms.tDiffuse.value =
+ this.depthRenderTarget.texture),
+ (this.depthCopy.needsUpdate = !0),
+ (a = this.depthCopy))
+ : 4 === this.params.output
+ ? ((this.materialCopy.uniforms.tDiffuse.value =
+ this.normalRenderTarget.texture),
+ (this.materialCopy.needsUpdate = !0))
+ : ((this.materialCopy.uniforms.tDiffuse.value =
+ this.saoRenderTarget.texture),
+ (this.materialCopy.needsUpdate = !0)),
+ 0 === this.params.output
+ ? (a.blending = A.CustomBlending)
+ : (a.blending = A.NoBlending),
+ this.renderPass(e, a, this.renderToScreen ? null : n),
+ e.setClearColor(
+ this._oldClearColor,
+ this.oldClearAlpha
+ ),
+ (e.autoClear = r);
+ }
+ },
+ },
+ {
+ key: "renderPass",
+ value: function (e, t, n, r, i) {
+ e.getClearColor(this.originalClearColor);
+ var a = e.getClearAlpha(),
+ o = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ (this.fsQuad.material = t),
+ this.fsQuad.render(e),
+ (e.autoClear = o),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(a);
+ },
+ },
+ {
+ key: "renderOverride",
+ value: function (e, t, n, r, i) {
+ e.getClearColor(this.originalClearColor);
+ var a = e.getClearAlpha(),
+ o = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ (r = t.clearColor || r),
+ (i = t.clearAlpha || i),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ (this.scene.overrideMaterial = t),
+ e.render(this.scene, this.camera),
+ (this.scene.overrideMaterial = null),
+ (e.autoClear = o),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(a);
+ },
+ },
+ {
+ key: "setSize",
+ value: function (e, t) {
+ this.beautyRenderTarget.setSize(e, t),
+ this.saoRenderTarget.setSize(e, t),
+ this.blurIntermediateRenderTarget.setSize(e, t),
+ this.normalRenderTarget.setSize(e, t),
+ this.depthRenderTarget.setSize(e, t),
+ this.saoMaterial.uniforms.size.value.set(e, t),
+ this.saoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(
+ this.camera.projectionMatrixInverse
+ ),
+ (this.saoMaterial.uniforms.cameraProjectionMatrix.value =
+ this.camera.projectionMatrix),
+ (this.saoMaterial.needsUpdate = !0),
+ this.vBlurMaterial.uniforms.size.value.set(e, t),
+ (this.vBlurMaterial.needsUpdate = !0),
+ this.hBlurMaterial.uniforms.size.value.set(e, t),
+ (this.hBlurMaterial.needsUpdate = !0);
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.saoRenderTarget.dispose(),
+ this.blurIntermediateRenderTarget.dispose(),
+ this.beautyRenderTarget.dispose(),
+ this.normalRenderTarget.dispose(),
+ this.depthRenderTarget.dispose(),
+ this.depthMaterial.dispose(),
+ this.normalMaterial.dispose(),
+ this.saoMaterial.dispose(),
+ this.vBlurMaterial.dispose(),
+ this.hBlurMaterial.dispose(),
+ this.materialCopy.dispose(),
+ this.depthCopy.dispose(),
+ this.fsQuad.dispose();
+ },
+ },
+ ]),
+ n
+ );
+ })(Ia),
+ po = {
+ uniforms: {
+ damp: { value: 0.96 },
+ tOld: { value: null },
+ tNew: { value: null },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float damp;",
+ "uniform sampler2D tOld;",
+ "uniform sampler2D tNew;",
+ "varying vec2 vUv;",
+ "vec4 when_gt( vec4 x, float y ) {",
+ "\treturn max( sign( x - y ), 0.0 );",
+ "}",
+ "void main() {",
+ "\tvec4 texelOld = texture2D( tOld, vUv );",
+ "\tvec4 texelNew = texture2D( tNew, vUv );",
+ "\ttexelOld *= damp * when_gt( texelOld, 0.1 );",
+ "\tgl_FragColor = max(texelNew, texelOld);",
+ "}",
+ ].join("\n"),
+ },
+ vo = null,
+ mo = null,
+ go = null,
+ Ao = null,
+ yo = {
+ uniforms: {
+ tDiffuse: { value: null },
+ tSize: { value: new A.Vector2(256, 256) },
+ center: { value: new A.Vector2(0.5, 0.5) },
+ angle: { value: 1.57 },
+ scale: { value: 1 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec2 center;",
+ "uniform float angle;",
+ "uniform float scale;",
+ "uniform vec2 tSize;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "float pattern() {",
+ "\tfloat s = sin( angle ), c = cos( angle );",
+ "\tvec2 tex = vUv * tSize - center;",
+ "\tvec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale;",
+ "\treturn ( sin( point.x ) * sin( point.y ) ) * 4.0;",
+ "}",
+ "void main() {",
+ "\tvec4 color = texture2D( tDiffuse, vUv );",
+ "\tfloat average = ( color.r + color.g + color.b ) / 3.0;",
+ "\tgl_FragColor = vec4( vec3( average * 10.0 - 5.0 + pattern() ), color.a );",
+ "}",
+ ].join("\n"),
+ },
+ bo = null,
+ xo = {
+ defines: {
+ MAX_STEP: 0,
+ isPerspectiveCamera: !0,
+ isDistanceAttenuation: !0,
+ isFresnel: !0,
+ isInfiniteThick: !1,
+ isSelective: !1,
+ },
+ uniforms: {
+ tDiffuse: { value: null },
+ tNormal: { value: null },
+ tMetalness: { value: null },
+ tDepth: { value: null },
+ cameraNear: { value: null },
+ cameraFar: { value: null },
+ resolution: { value: new A.Vector2() },
+ cameraProjectionMatrix: { value: new A.Matrix4() },
+ cameraInverseProjectionMatrix: { value: new A.Matrix4() },
+ opacity: { value: 0.5 },
+ maxDistance: { value: 180 },
+ cameraRange: { value: 0 },
+ surfDist: { value: 0.007 },
+ thickTolerance: { value: 0.03 },
+ },
+ vertexShader:
+ "\n\n varying vec2 vUv;\n\n void main() {\n\n\t\t\tvUv = uv;\n\n\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",
+ fragmentShader:
+ "\n\t\t// precision highp float;\n\t\tprecision highp sampler2D;\n\t\tvarying vec2 vUv;\n\t\tuniform sampler2D tDepth;\n\t\tuniform sampler2D tNormal;\n\t\tuniform sampler2D tMetalness;\n\t\tuniform sampler2D tDiffuse;\n\t\tuniform float cameraRange;\n\t\tuniform vec2 resolution;\n\t\tuniform float opacity;\n\t\tuniform float cameraNear;\n\t\tuniform float cameraFar;\n\t\tuniform float maxDistance;\n\t\tuniform float surfDist;\n\t\tuniform mat4 cameraProjectionMatrix;\n\t\tuniform mat4 cameraInverseProjectionMatrix;\n\t\tuniform float thickTolerance;\n\t\t#include \n\t\tfloat pointToLineDistance(vec3 x0, vec3 x1, vec3 x2) {\n\t\t\t//x0: point, x1: linePointA, x2: linePointB\n\t\t\t//https://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html\n\t\t\treturn length(cross(x0-x1,x0-x2))/length(x2-x1);\n\t\t}\n\t\tfloat pointPlaneDistance(vec3 point,vec3 planePoint,vec3 planeNormal){\n\t\t\t// https://mathworld.wolfram.com/Point-PlaneDistance.html\n\t\t\t//// https://en.wikipedia.org/wiki/Plane_(geometry)\n\t\t\t//// http://paulbourke.net/geometry/pointlineplane/\n\t\t\tfloat a=planeNormal.x,b=planeNormal.y,c=planeNormal.z;\n\t\t\tfloat x0=point.x,y0=point.y,z0=point.z;\n\t\t\tfloat x=planePoint.x,y=planePoint.y,z=planePoint.z;\n\t\t\tfloat d=-(a*x+b*y+c*z);\n\t\t\tfloat distance=(a*x0+b*y0+c*z0+d)/sqrt(a*a+b*b+c*c);\n\t\t\treturn distance;\n\t\t}\n\t\tfloat getDepth( const in vec2 uv ) {\n\t\t\treturn texture2D( tDepth, uv ).x;\n\t\t}\n\t\tfloat getViewZ( const in float depth ) {\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\treturn perspectiveDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#else\n\t\t\t\treturn orthographicDepthToViewZ( depth, cameraNear, cameraFar );\n\t\t\t#endif\n\t\t}\n\t\tvec3 getViewPosition( const in vec2 uv, const in float depth/*clip space*/, const in float clipW ) {\n\t\t\tvec4 clipPosition = vec4( ( vec3( uv, depth ) - 0.5 ) * 2.0, 1.0 );//ndc\n\t\t\tclipPosition *= clipW; //clip\n\t\t\treturn ( cameraInverseProjectionMatrix * clipPosition ).xyz;//view\n\t\t}\n\t\tvec3 getViewNormal( const in vec2 uv ) {\n\t\t\treturn unpackRGBToNormal( texture2D( tNormal, uv ).xyz );\n\t\t}\n\t\tvec2 viewPositionToXY(vec3 viewPosition){\n\t\t\tvec2 xy;\n\t\t\tvec4 clip=cameraProjectionMatrix*vec4(viewPosition,1);\n\t\t\txy=clip.xy;//clip\n\t\t\tfloat clipW=clip.w;\n\t\t\txy/=clipW;//NDC\n\t\t\txy=(xy+1.)/2.;//uv\n\t\t\txy*=resolution;//screen\n\t\t\treturn xy;\n\t\t}\n\t\tvoid main(){\n\t\t\t#ifdef isSelective\n\t\t\t\tfloat metalness=texture2D(tMetalness,vUv).r;\n\t\t\t\tif(metalness==0.) return;\n\t\t\t#endif\n\n\t\t\tfloat depth = getDepth( vUv );\n\t\t\tfloat viewZ = getViewZ( depth );\n\t\t\tif(-viewZ>=cameraFar) return;\n\n\t\t\tfloat clipW = cameraProjectionMatrix[2][3] * viewZ+cameraProjectionMatrix[3][3];\n\t\t\tvec3 viewPosition=getViewPosition( vUv, depth, clipW );\n\n\t\t\tvec2 d0=gl_FragCoord.xy;\n\t\t\tvec2 d1;\n\n\t\t\tvec3 viewNormal=getViewNormal( vUv );\n\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\tvec3 viewIncidenceDir=normalize(viewPosition);\n\t\t\t\tvec3 viewReflectDir=reflect(viewIncidenceDir,viewNormal);\n\t\t\t#else\n\t\t\t\tvec3 viewIncidenceDir=vec3(0,0,-1);\n\t\t\t\tvec3 viewReflectDir=reflect(viewIncidenceDir,viewNormal);\n\t\t\t#endif\n\n\t\t\tfloat maxReflectRayLen=maxDistance/dot(-viewIncidenceDir,viewNormal);\n\t\t\t// dot(a,b)==length(a)*length(b)*cos(theta) // https://www.mathsisfun.com/algebra/vectors-dot-product.html\n\t\t\t// if(a.isNormalized&&b.isNormalized) dot(a,b)==cos(theta)\n\t\t\t// maxDistance/maxReflectRayLen=cos(theta)\n\t\t\t// maxDistance/maxReflectRayLen==dot(a,b)\n\t\t\t// maxReflectRayLen==maxDistance/dot(a,b)\n\n\t\t\tvec3 d1viewPosition=viewPosition+viewReflectDir*maxReflectRayLen;\n\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\tif(d1viewPosition.z>-cameraNear){\n\t\t\t\t\t//https://tutorial.math.lamar.edu/Classes/CalcIII/EqnsOfLines.aspx\n\t\t\t\t\tfloat t=(-cameraNear-viewPosition.z)/viewReflectDir.z;\n\t\t\t\t\td1viewPosition=viewPosition+viewReflectDir*t;\n\t\t\t\t}\n\t\t\t#endif\n\t\t\td1=viewPositionToXY(d1viewPosition);\n\n\t\t\tfloat totalLen=length(d1-d0);\n\t\t\tfloat xLen=d1.x-d0.x;\n\t\t\tfloat yLen=d1.y-d0.y;\n\t\t\tfloat totalStep=max(abs(xLen),abs(yLen));\n\t\t\tfloat xSpan=xLen/totalStep;\n\t\t\tfloat ySpan=yLen/totalStep;\n\t\t\tfor(float i=0.;i=totalStep) break;\n\t\t\t\tvec2 xy=vec2(d0.x+i*xSpan,d0.y+i*ySpan);\n\t\t\t\tif(xy.x<0.||xy.x>resolution.x||xy.y<0.||xy.y>resolution.y) break;\n\t\t\t\tfloat s=length(xy-d0)/totalLen;\n\t\t\t\tvec2 uv=xy/resolution;\n\n\t\t\t\tfloat d = getDepth(uv);\n\t\t\t\tfloat vZ = getViewZ( d );\n\t\t\t\tif(-vZ>=cameraFar) continue;\n\t\t\t\tfloat cW = cameraProjectionMatrix[2][3] * vZ+cameraProjectionMatrix[3][3];\n\t\t\t\tvec3 vP=getViewPosition( uv, d, cW );\n\n\t\t\t\t#ifdef isPerspectiveCamera\n\t\t\t\t\t// https://www.comp.nus.edu.sg/~lowkl/publications/lowk_persp_interp_techrep.pdf\n\t\t\t\t\tfloat recipVPZ=1./viewPosition.z;\n\t\t\t\t\tfloat viewReflectRayZ=1./(recipVPZ+s*(1./d1viewPosition.z-recipVPZ));\n\t\t\t\t\tfloat sD=surfDist*cW;\n\t\t\t\t#else\n\t\t\t\t\tfloat viewReflectRayZ=viewPosition.z+s*(d1viewPosition.z-viewPosition.z);\n\t\t\t\t\tfloat sD=surfDist;\n\t\t\t\t#endif\n\t\t\t\tif(viewReflectRayZ-sD>vZ) continue;\n\n\t\t\t\t#ifdef isInfiniteThick\n\t\t\t\t\tif(viewReflectRayZ+thickTolerance*clipW=0.) continue;\n\t\t\t\t\tfloat distance=pointPlaneDistance(vP,viewPosition,viewNormal);\n\t\t\t\t\tif(distance>maxDistance) break;\n\t\t\t\t\t#ifdef isDistanceAttenuation\n\t\t\t\t\t\tfloat ratio=1.-(distance/maxDistance);\n\t\t\t\t\t\tfloat attenuation=ratio*ratio;\n\t\t\t\t\t\top=opacity*attenuation;\n\t\t\t\t\t#endif\n\t\t\t\t\t#ifdef isFresnel\n\t\t\t\t\t\tfloat fresnel=(dot(viewIncidenceDir,viewReflectDir)+1.)/2.;\n\t\t\t\t\t\top*=fresnel;\n\t\t\t\t\t#endif\n\t\t\t\t\tvec4 reflectColor=texture2D(tDiffuse,uv);\n\t\t\t\t\tgl_FragColor.xyz=reflectColor.xyz;\n\t\t\t\t\tgl_FragColor.a=op;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t",
+ },
+ So = {
+ defines: { PERSPECTIVE_CAMERA: 1 },
+ uniforms: {
+ tDepth: { value: null },
+ cameraNear: { value: null },
+ cameraFar: { value: null },
+ },
+ vertexShader:
+ "\n\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",
+ fragmentShader:
+ "\n\n uniform sampler2D tDepth;\n\n uniform float cameraNear;\n uniform float cameraFar;\n\n varying vec2 vUv;\n\n #include \n\n\t\tfloat getLinearDepth( const in vec2 uv ) {\n\n\t\t\t#if PERSPECTIVE_CAMERA == 1\n\n\t\t\t\tfloat fragCoordZ = texture2D( tDepth, uv ).x;\n\t\t\t\tfloat viewZ = perspectiveDepthToViewZ( fragCoordZ, cameraNear, cameraFar );\n\t\t\t\treturn viewZToOrthographicDepth( viewZ, cameraNear, cameraFar );\n\n\t\t\t#else\n\n\t\t\t\treturn texture2D( tDepth, uv ).x;\n\n\t\t\t#endif\n\n\t\t}\n\n void main() {\n\n \tfloat depth = getLinearDepth( vUv );\n\t\t\tfloat d = 1.0 - depth;\n\t\t\t// d=(d-.999)*1000.;\n \tgl_FragColor = vec4( vec3( d ), 1.0 );\n\n }\n\n ",
+ },
+ Eo = {
+ uniforms: {
+ tDiffuse: { value: null },
+ resolution: { value: new A.Vector2() },
+ opacity: { value: 0.5 },
+ },
+ vertexShader:
+ "\n\n varying vec2 vUv;\n\n void main() {\n\n \tvUv = uv;\n \tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n\n ",
+ fragmentShader:
+ "\n\n uniform sampler2D tDiffuse;\n uniform vec2 resolution;\n varying vec2 vUv;\n void main() {\n\t\t\t//reverse engineering from PhotoShop blur filter, then change coefficient\n\n \tvec2 texelSize = ( 1.0 / resolution );\n\n\t\t\tvec4 c=texture2D(tDiffuse,vUv);\n\n\t\t\tvec2 offset;\n\n\t\t\toffset=(vec2(-1,0))*texelSize;\n\t\t\tvec4 cl=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(1,0))*texelSize;\n\t\t\tvec4 cr=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(0,-1))*texelSize;\n\t\t\tvec4 cb=texture2D(tDiffuse,vUv+offset);\n\n\t\t\toffset=(vec2(0,1))*texelSize;\n\t\t\tvec4 ct=texture2D(tDiffuse,vUv+offset);\n\n\t\t\t// float coeCenter=.5;\n\t\t\t// float coeSide=.125;\n\t\t\tfloat coeCenter=.2;\n\t\t\tfloat coeSide=.2;\n\t\t\tfloat a=c.a*coeCenter+cl.a*coeSide+cr.a*coeSide+cb.a*coeSide+ct.a*coeSide;\n\t\t\tvec3 rgb=(c.rgb*c.a*coeCenter+cl.rgb*cl.a*coeSide+cr.rgb*cr.a*coeSide+cb.rgb*cb.a*coeSide+ct.rgb*ct.a*coeSide)/a;\n\t\t\tgl_FragColor=vec4(rgb,a);\n\n\t\t}\n\t",
+ },
+ _o = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r,
+ i = e.renderer,
+ a = e.scene,
+ o = e.camera,
+ s = e.width,
+ l = e.height,
+ u = e.selects,
+ c = e.bouncing,
+ d = void 0 !== c && c,
+ h = e.groundReflector;
+ (0, p.Z)(this, n),
+ ((r = t.call(this)).width = void 0 !== s ? s : 512),
+ (r.height = void 0 !== l ? l : 512),
+ (r.clear = !0),
+ (r.renderer = i),
+ (r.scene = a),
+ (r.camera = o),
+ (r.groundReflector = h),
+ (r.opacity = xo.uniforms.opacity.value),
+ (r.output = 0),
+ (r.maxDistance = xo.uniforms.maxDistance.value),
+ (r.thickness = xo.uniforms.thickness.value),
+ (r.tempColor = new A.Color()),
+ (r._selects = u),
+ (r.selective = Array.isArray(r._selects)),
+ Object.defineProperty((0, f.Z)(r), "selects", {
+ get: function () {
+ return this._selects;
+ },
+ set: function (e) {
+ this._selects !== e &&
+ ((this._selects = e),
+ Array.isArray(e)
+ ? ((this.selective = !0),
+ (this.ssrMaterial.defines.SELECTIVE = !0),
+ (this.ssrMaterial.needsUpdate = !0))
+ : ((this.selective = !1),
+ (this.ssrMaterial.defines.SELECTIVE = !1),
+ (this.ssrMaterial.needsUpdate = !0)));
+ },
+ }),
+ (r._bouncing = d),
+ Object.defineProperty((0, f.Z)(r), "bouncing", {
+ get: function () {
+ return this._bouncing;
+ },
+ set: function (e) {
+ this._bouncing !== e &&
+ ((this._bouncing = e),
+ (this.ssrMaterial.uniforms.tDiffuse.value = e
+ ? this.prevRenderTarget.texture
+ : this.beautyRenderTarget.texture));
+ },
+ }),
+ (r.blur = !0),
+ (r._distanceAttenuation = xo.defines.DISTANCE_ATTENUATION),
+ Object.defineProperty((0, f.Z)(r), "distanceAttenuation", {
+ get: function () {
+ return this._distanceAttenuation;
+ },
+ set: function (e) {
+ this._distanceAttenuation !== e &&
+ ((this._distanceAttenuation = e),
+ (this.ssrMaterial.defines.DISTANCE_ATTENUATION = e),
+ (this.ssrMaterial.needsUpdate = !0));
+ },
+ }),
+ (r._fresnel = xo.defines.FRESNEL),
+ Object.defineProperty((0, f.Z)(r), "fresnel", {
+ get: function () {
+ return this._fresnel;
+ },
+ set: function (e) {
+ this._fresnel !== e &&
+ ((this._fresnel = e),
+ (this.ssrMaterial.defines.FRESNEL = e),
+ (this.ssrMaterial.needsUpdate = !0));
+ },
+ }),
+ (r._infiniteThick = xo.defines.INFINITE_THICK),
+ Object.defineProperty((0, f.Z)(r), "infiniteThick", {
+ get: function () {
+ return this._infiniteThick;
+ },
+ set: function (e) {
+ this._infiniteThick !== e &&
+ ((this._infiniteThick = e),
+ (this.ssrMaterial.defines.INFINITE_THICK = e),
+ (this.ssrMaterial.needsUpdate = !0));
+ },
+ });
+ var v = new A.DepthTexture();
+ return (
+ (v.type = A.UnsignedShortType),
+ (v.minFilter = A.NearestFilter),
+ (v.magFilter = A.NearestFilter),
+ (r.beautyRenderTarget = new A.WebGLRenderTarget(
+ r.width,
+ r.height,
+ {
+ minFilter: A.NearestFilter,
+ magFilter: A.NearestFilter,
+ type: A.HalfFloatType,
+ depthTexture: v,
+ depthBuffer: !0,
+ }
+ )),
+ (r.prevRenderTarget = new A.WebGLRenderTarget(
+ r.width,
+ r.height,
+ { minFilter: A.NearestFilter, magFilter: A.NearestFilter }
+ )),
+ (r.normalRenderTarget = new A.WebGLRenderTarget(
+ r.width,
+ r.height,
+ {
+ minFilter: A.NearestFilter,
+ magFilter: A.NearestFilter,
+ type: A.HalfFloatType,
+ }
+ )),
+ (r.metalnessRenderTarget = new A.WebGLRenderTarget(
+ r.width,
+ r.height,
+ {
+ minFilter: A.NearestFilter,
+ magFilter: A.NearestFilter,
+ type: A.HalfFloatType,
+ }
+ )),
+ (r.ssrRenderTarget = new A.WebGLRenderTarget(
+ r.width,
+ r.height,
+ { minFilter: A.NearestFilter, magFilter: A.NearestFilter }
+ )),
+ (r.blurRenderTarget = r.ssrRenderTarget.clone()),
+ (r.blurRenderTarget2 = r.ssrRenderTarget.clone()),
+ (r.ssrMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, xo.defines, {
+ MAX_STEP: Math.sqrt(
+ r.width * r.width + r.height * r.height
+ ),
+ }),
+ uniforms: A.UniformsUtils.clone(xo.uniforms),
+ vertexShader: xo.vertexShader,
+ fragmentShader: xo.fragmentShader,
+ blending: A.NoBlending,
+ })),
+ (r.ssrMaterial.uniforms.tDiffuse.value =
+ r.beautyRenderTarget.texture),
+ (r.ssrMaterial.uniforms.tNormal.value =
+ r.normalRenderTarget.texture),
+ (r.ssrMaterial.defines.SELECTIVE = r.selective),
+ (r.ssrMaterial.needsUpdate = !0),
+ (r.ssrMaterial.uniforms.tMetalness.value =
+ r.metalnessRenderTarget.texture),
+ (r.ssrMaterial.uniforms.tDepth.value =
+ r.beautyRenderTarget.depthTexture),
+ (r.ssrMaterial.uniforms.cameraNear.value = r.camera.near),
+ (r.ssrMaterial.uniforms.cameraFar.value = r.camera.far),
+ (r.ssrMaterial.uniforms.thickness.value = r.thickness),
+ r.ssrMaterial.uniforms.resolution.value.set(r.width, r.height),
+ r.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy(
+ r.camera.projectionMatrix
+ ),
+ r.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(
+ r.camera.projectionMatrixInverse
+ ),
+ (r.normalMaterial = new A.MeshNormalMaterial()),
+ (r.normalMaterial.blending = A.NoBlending),
+ (r.metalnessOnMaterial = new A.MeshBasicMaterial({
+ color: "white",
+ })),
+ (r.metalnessOffMaterial = new A.MeshBasicMaterial({
+ color: "black",
+ })),
+ (r.blurMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, Eo.defines),
+ uniforms: A.UniformsUtils.clone(Eo.uniforms),
+ vertexShader: Eo.vertexShader,
+ fragmentShader: Eo.fragmentShader,
+ })),
+ (r.blurMaterial.uniforms.tDiffuse.value =
+ r.ssrRenderTarget.texture),
+ r.blurMaterial.uniforms.resolution.value.set(r.width, r.height),
+ (r.blurMaterial2 = new A.ShaderMaterial({
+ defines: Object.assign({}, Eo.defines),
+ uniforms: A.UniformsUtils.clone(Eo.uniforms),
+ vertexShader: Eo.vertexShader,
+ fragmentShader: Eo.fragmentShader,
+ })),
+ (r.blurMaterial2.uniforms.tDiffuse.value =
+ r.blurRenderTarget.texture),
+ r.blurMaterial2.uniforms.resolution.value.set(
+ r.width,
+ r.height
+ ),
+ (r.depthRenderMaterial = new A.ShaderMaterial({
+ defines: Object.assign({}, So.defines),
+ uniforms: A.UniformsUtils.clone(So.uniforms),
+ vertexShader: So.vertexShader,
+ fragmentShader: So.fragmentShader,
+ blending: A.NoBlending,
+ })),
+ (r.depthRenderMaterial.uniforms.tDepth.value =
+ r.beautyRenderTarget.depthTexture),
+ (r.depthRenderMaterial.uniforms.cameraNear.value =
+ r.camera.near),
+ (r.depthRenderMaterial.uniforms.cameraFar.value = r.camera.far),
+ (r.copyMaterial = new A.ShaderMaterial({
+ uniforms: A.UniformsUtils.clone(Va.uniforms),
+ vertexShader: Va.vertexShader,
+ fragmentShader: Va.fragmentShader,
+ transparent: !0,
+ depthTest: !1,
+ depthWrite: !1,
+ blendSrc: A.SrcAlphaFactor,
+ blendDst: A.OneMinusSrcAlphaFactor,
+ blendEquation: A.AddEquation,
+ blendSrcAlpha: A.SrcAlphaFactor,
+ blendDstAlpha: A.OneMinusSrcAlphaFactor,
+ blendEquationAlpha: A.AddEquation,
+ })),
+ (r.fsQuad = new ka(null)),
+ (r.originalClearColor = new A.Color()),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "dispose",
+ value: function () {
+ this.beautyRenderTarget.dispose(),
+ this.prevRenderTarget.dispose(),
+ this.normalRenderTarget.dispose(),
+ this.metalnessRenderTarget.dispose(),
+ this.ssrRenderTarget.dispose(),
+ this.blurRenderTarget.dispose(),
+ this.blurRenderTarget2.dispose(),
+ this.normalMaterial.dispose(),
+ this.metalnessOnMaterial.dispose(),
+ this.metalnessOffMaterial.dispose(),
+ this.blurMaterial.dispose(),
+ this.blurMaterial2.dispose(),
+ this.copyMaterial.dispose(),
+ this.depthRenderMaterial.dispose(),
+ this.fsQuad.dispose();
+ },
+ },
+ {
+ key: "render",
+ value: function (e, t) {
+ switch (
+ (e.setRenderTarget(this.beautyRenderTarget),
+ e.clear(),
+ this.groundReflector &&
+ ((this.groundReflector.visible = !1),
+ this.groundReflector.doRender(
+ this.renderer,
+ this.scene,
+ this.camera
+ ),
+ (this.groundReflector.visible = !0)),
+ e.render(this.scene, this.camera),
+ this.groundReflector &&
+ (this.groundReflector.visible = !1),
+ this.renderOverride(
+ e,
+ this.normalMaterial,
+ this.normalRenderTarget,
+ 0,
+ 0
+ ),
+ this.selective &&
+ this.renderMetalness(
+ e,
+ this.metalnessOnMaterial,
+ this.metalnessRenderTarget,
+ 0,
+ 0
+ ),
+ (this.ssrMaterial.uniforms.opacity.value = this.opacity),
+ (this.ssrMaterial.uniforms.maxDistance.value =
+ this.maxDistance),
+ (this.ssrMaterial.uniforms.thickness.value =
+ this.thickness),
+ this.renderPass(
+ e,
+ this.ssrMaterial,
+ this.ssrRenderTarget
+ ),
+ this.blur &&
+ (this.renderPass(
+ e,
+ this.blurMaterial,
+ this.blurRenderTarget
+ ),
+ this.renderPass(
+ e,
+ this.blurMaterial2,
+ this.blurRenderTarget2
+ )),
+ this.output)
+ ) {
+ case n.OUTPUT.Default:
+ this.bouncing
+ ? ((this.copyMaterial.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.prevRenderTarget
+ ),
+ this.blur
+ ? (this.copyMaterial.uniforms.tDiffuse.value =
+ this.blurRenderTarget2.texture)
+ : (this.copyMaterial.uniforms.tDiffuse.value =
+ this.ssrRenderTarget.texture),
+ (this.copyMaterial.blending = A.NormalBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.prevRenderTarget
+ ),
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.prevRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ ))
+ : ((this.copyMaterial.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ ),
+ this.blur
+ ? (this.copyMaterial.uniforms.tDiffuse.value =
+ this.blurRenderTarget2.texture)
+ : (this.copyMaterial.uniforms.tDiffuse.value =
+ this.ssrRenderTarget.texture),
+ (this.copyMaterial.blending = A.NormalBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ ));
+ break;
+ case n.OUTPUT.SSR:
+ this.blur
+ ? (this.copyMaterial.uniforms.tDiffuse.value =
+ this.blurRenderTarget2.texture)
+ : (this.copyMaterial.uniforms.tDiffuse.value =
+ this.ssrRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ ),
+ this.bouncing &&
+ (this.blur
+ ? (this.copyMaterial.uniforms.tDiffuse.value =
+ this.blurRenderTarget2.texture)
+ : (this.copyMaterial.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.prevRenderTarget
+ ),
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.ssrRenderTarget.texture),
+ (this.copyMaterial.blending = A.NormalBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.prevRenderTarget
+ ));
+ break;
+ case n.OUTPUT.Beauty:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.beautyRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Depth:
+ this.renderPass(
+ e,
+ this.depthRenderMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Normal:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.normalRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ case n.OUTPUT.Metalness:
+ (this.copyMaterial.uniforms.tDiffuse.value =
+ this.metalnessRenderTarget.texture),
+ (this.copyMaterial.blending = A.NoBlending),
+ this.renderPass(
+ e,
+ this.copyMaterial,
+ this.renderToScreen ? null : t
+ );
+ break;
+ default:
+ console.warn("THREE.SSRPass: Unknown output type.");
+ }
+ },
+ },
+ {
+ key: "renderPass",
+ value: function (e, t, n, r, i) {
+ this.originalClearColor.copy(
+ e.getClearColor(this.tempColor)
+ );
+ var a = e.getClearAlpha(this.tempColor),
+ o = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ (this.fsQuad.material = t),
+ this.fsQuad.render(e),
+ (e.autoClear = o),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(a);
+ },
+ },
+ {
+ key: "renderOverride",
+ value: function (e, t, n, r, i) {
+ this.originalClearColor.copy(
+ e.getClearColor(this.tempColor)
+ );
+ var a = e.getClearAlpha(this.tempColor),
+ o = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ (r = t.clearColor || r),
+ (i = t.clearAlpha || i),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ (this.scene.overrideMaterial = t),
+ e.render(this.scene, this.camera),
+ (this.scene.overrideMaterial = null),
+ (e.autoClear = o),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(a);
+ },
+ },
+ {
+ key: "renderMetalness",
+ value: function (e, t, n, r, i) {
+ var a = this;
+ this.originalClearColor.copy(
+ e.getClearColor(this.tempColor)
+ );
+ var o = e.getClearAlpha(this.tempColor),
+ s = e.autoClear;
+ e.setRenderTarget(n),
+ (e.autoClear = !1),
+ (r = t.clearColor || r),
+ (i = t.clearAlpha || i),
+ void 0 !== r &&
+ null !== r &&
+ (e.setClearColor(r),
+ e.setClearAlpha(i || 0),
+ e.clear()),
+ this.scene.traverseVisible(function (e) {
+ (e._SSRPassBackupMaterial = e.material),
+ a._selects.includes(e)
+ ? (e.material = a.metalnessOnMaterial)
+ : (e.material = a.metalnessOffMaterial);
+ }),
+ e.render(this.scene, this.camera),
+ this.scene.traverseVisible(function (e) {
+ e.material = e._SSRPassBackupMaterial;
+ }),
+ (e.autoClear = s),
+ e.setClearColor(this.originalClearColor),
+ e.setClearAlpha(o);
+ },
+ },
+ {
+ key: "setSize",
+ value: function (e, t) {
+ (this.width = e),
+ (this.height = t),
+ (this.ssrMaterial.defines.MAX_STEP = Math.sqrt(
+ e * e + t * t
+ )),
+ (this.ssrMaterial.needsUpdate = !0),
+ this.beautyRenderTarget.setSize(e, t),
+ this.prevRenderTarget.setSize(e, t),
+ this.ssrRenderTarget.setSize(e, t),
+ this.normalRenderTarget.setSize(e, t),
+ this.metalnessRenderTarget.setSize(e, t),
+ this.blurRenderTarget.setSize(e, t),
+ this.blurRenderTarget2.setSize(e, t),
+ this.ssrMaterial.uniforms.resolution.value.set(e, t),
+ this.ssrMaterial.uniforms.cameraProjectionMatrix.value.copy(
+ this.camera.projectionMatrix
+ ),
+ this.ssrMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(
+ this.camera.projectionMatrixInverse
+ ),
+ this.blurMaterial.uniforms.resolution.value.set(e, t),
+ this.blurMaterial2.uniforms.resolution.value.set(e, t);
+ },
+ },
+ ]),
+ n
+ );
+ })(Ia),
+ Co = _o,
+ wo = null,
+ To = null,
+ Mo = null,
+ Io = null,
+ ko = null,
+ Ro = null;
+ function Bo(e, t, n) {
+ var r = new WebGLRenderTarget(
+ e.x,
+ e.y,
+ n
+ ? { depthTexture: new DepthTexture(e.x, e.y), depthBuffer: !0 }
+ : void 0
+ );
+ return (
+ (r.texture.format = t),
+ (r.texture.minFilter = NearestFilter),
+ (r.texture.magFilter = NearestFilter),
+ (r.texture.generateMipmaps = !1),
+ (r.stencilBuffer = !1),
+ r
+ );
+ }
+ var Po = {
+ defines: { KERNEL_SIZE_FLOAT: "25.0", KERNEL_SIZE_INT: "25" },
+ uniforms: {
+ tDiffuse: { value: null },
+ uImageIncrement: { value: new A.Vector2(0.001953125, 0) },
+ cKernel: { value: [] },
+ },
+ vertexShader: [
+ "uniform vec2 uImageIncrement;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv - ( ( KERNEL_SIZE_FLOAT - 1.0 ) / 2.0 ) * uImageIncrement;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float cKernel[ KERNEL_SIZE_INT ];",
+ "uniform sampler2D tDiffuse;",
+ "uniform vec2 uImageIncrement;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec2 imageCoord = vUv;",
+ "\tvec4 sum = vec4( 0.0, 0.0, 0.0, 0.0 );",
+ "\tfor( int i = 0; i < KERNEL_SIZE_INT; i ++ ) {",
+ "\t\tsum += texture2D( tDiffuse, imageCoord ) * cKernel[ i ];",
+ "\t\timageCoord += uImageIncrement;",
+ "\t}",
+ "\tgl_FragColor = sum;",
+ "}",
+ ].join("\n"),
+ buildKernel: function (e) {
+ for (
+ var t,
+ n,
+ r = Math.min(2 * Math.ceil(3 * e) + 1, 25),
+ i = 0.5 * (r - 1),
+ a = new Array(r),
+ o = 0,
+ s = 0;
+ s < r;
+ ++s
+ )
+ (a[s] =
+ ((t = s - i), (n = e), Math.exp((-t * t) / (2 * n * n)))),
+ (o += a[s]);
+ for (var l = 0; l < r; ++l) a[l] /= o;
+ return a;
+ },
+ },
+ Lo = null,
+ Do = {
+ uniforms: { tDiffuse: { value: null }, strength: { value: 1 } },
+ vertexShader:
+ "\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }",
+ fragmentShader:
+ "\n uniform float strength;\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n vec4 texel = texture2D( tDiffuse, vUv );\n gl_FragColor = strength * texel;\n }",
+ },
+ Uo = null,
+ Fo = null,
+ Oo = null;
+ function No() {
+ var e = {};
+ return {
+ get: function (t) {
+ return e[t];
+ },
+ add: function (t, n) {
+ e[t] = n;
+ },
+ remove: function (t) {
+ delete e[t];
+ },
+ removeAll: function () {
+ e = {};
+ },
+ };
+ }
+ var Go = {
+ KHR_BINARY_GLTF: "KHR_binary_glTF",
+ KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
+ KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
+ KHR_MATERIALS_CLEARCOAT: "KHR_materials_clearcoat",
+ KHR_MATERIALS_IOR: "KHR_materials_ior",
+ KHR_MATERIALS_SHEEN: "KHR_materials_sheen",
+ KHR_MATERIALS_SPECULAR: "KHR_materials_specular",
+ KHR_MATERIALS_TRANSMISSION: "KHR_materials_transmission",
+ KHR_MATERIALS_IRIDESCENCE: "KHR_materials_iridescence",
+ KHR_MATERIALS_ANISOTROPY: "KHR_materials_anisotropy",
+ KHR_MATERIALS_UNLIT: "KHR_materials_unlit",
+ KHR_MATERIALS_VOLUME: "KHR_materials_volume",
+ KHR_TEXTURE_BASISU: "KHR_texture_basisu",
+ KHR_TEXTURE_TRANSFORM: "KHR_texture_transform",
+ KHR_MESH_QUANTIZATION: "KHR_mesh_quantization",
+ KHR_MATERIALS_EMISSIVE_STRENGTH: "KHR_materials_emissive_strength",
+ EXT_TEXTURE_WEBP: "EXT_texture_webp",
+ EXT_TEXTURE_AVIF: "EXT_texture_avif",
+ EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
+ EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing",
+ },
+ Zo = null,
+ zo = null,
+ Qo = null,
+ Ho = null,
+ Vo = null,
+ jo = null,
+ Wo = null,
+ Xo = null,
+ Yo = null,
+ qo = null,
+ Jo = null,
+ Ko = null,
+ $o = null,
+ es = null,
+ ts = null,
+ ns = null,
+ rs = "glTF",
+ is = 12,
+ as = { JSON: 1313821514, BIN: 5130562 },
+ os = null,
+ ss = null,
+ ls = null,
+ us = null,
+ cs = null,
+ fs = new A.Quaternion(),
+ ds = null,
+ hs = {
+ FLOAT: 5126,
+ FLOAT_MAT3: 35675,
+ FLOAT_MAT4: 35676,
+ FLOAT_VEC2: 35664,
+ FLOAT_VEC3: 35665,
+ FLOAT_VEC4: 35666,
+ LINEAR: 9729,
+ REPEAT: 10497,
+ SAMPLER_2D: 35678,
+ POINTS: 0,
+ LINES: 1,
+ LINE_LOOP: 2,
+ LINE_STRIP: 3,
+ TRIANGLES: 4,
+ TRIANGLE_STRIP: 5,
+ TRIANGLE_FAN: 6,
+ UNSIGNED_BYTE: 5121,
+ UNSIGNED_SHORT: 5123,
+ },
+ ps = {
+ 5120: Int8Array,
+ 5121: Uint8Array,
+ 5122: Int16Array,
+ 5123: Uint16Array,
+ 5125: Uint32Array,
+ 5126: Float32Array,
+ },
+ vs = {
+ 9728: A.NearestFilter,
+ 9729: A.LinearFilter,
+ 9984: A.NearestMipmapNearestFilter,
+ 9985: A.LinearMipmapNearestFilter,
+ 9986: A.NearestMipmapLinearFilter,
+ 9987: A.LinearMipmapLinearFilter,
+ },
+ ms = {
+ 33071: A.ClampToEdgeWrapping,
+ 33648: A.MirroredRepeatWrapping,
+ 10497: A.RepeatWrapping,
+ },
+ gs = {
+ SCALAR: 1,
+ VEC2: 2,
+ VEC3: 3,
+ VEC4: 4,
+ MAT2: 4,
+ MAT3: 9,
+ MAT4: 16,
+ },
+ As = (0, s.Z)(
+ (0, s.Z)(
+ { POSITION: "position", NORMAL: "normal", TANGENT: "tangent" },
+ $n >= 152
+ ? {
+ TEXCOORD_0: "uv",
+ TEXCOORD_1: "uv1",
+ TEXCOORD_2: "uv2",
+ TEXCOORD_3: "uv3",
+ }
+ : { TEXCOORD_0: "uv", TEXCOORD_1: "uv2" }
+ ),
+ {},
+ { COLOR_0: "color", WEIGHTS_0: "skinWeight", JOINTS_0: "skinIndex" }
+ ),
+ ys = {
+ scale: "scale",
+ translation: "position",
+ rotation: "quaternion",
+ weights: "morphTargetInfluences",
+ },
+ bs = {
+ CUBICSPLINE: void 0,
+ LINEAR: A.InterpolateLinear,
+ STEP: A.InterpolateDiscrete,
+ },
+ xs = { OPAQUE: "OPAQUE", MASK: "MASK", BLEND: "BLEND" };
+ function Ss(e) {
+ return (
+ void 0 === e.DefaultMaterial &&
+ (e.DefaultMaterial = new MeshStandardMaterial({
+ color: 16777215,
+ emissive: 0,
+ metalness: 1,
+ roughness: 1,
+ transparent: !1,
+ depthTest: !0,
+ side: FrontSide,
+ })),
+ e.DefaultMaterial
+ );
+ }
+ function Es(e, t, n) {
+ for (var r in n.extensions)
+ void 0 === e[r] &&
+ ((t.userData.gltfExtensions = t.userData.gltfExtensions || {}),
+ (t.userData.gltfExtensions[r] = n.extensions[r]));
+ }
+ function _s(e, t) {
+ void 0 !== t.extras &&
+ ("object" === typeof t.extras
+ ? Object.assign(e.userData, t.extras)
+ : console.warn(
+ "THREE.GLTFLoader: Ignoring primitive type .extras, " +
+ t.extras
+ ));
+ }
+ function Cs(e, t, n) {
+ for (var r = !1, i = !1, a = !1, o = 0, s = t.length; o < s; o++) {
+ var l = t[o];
+ if (
+ (void 0 !== l.POSITION && (r = !0),
+ void 0 !== l.NORMAL && (i = !0),
+ void 0 !== l.COLOR_0 && (a = !0),
+ r && i && a)
+ )
+ break;
+ }
+ if (!r && !i && !a) return Promise.resolve(e);
+ for (var u = [], c = [], f = [], d = 0, h = t.length; d < h; d++) {
+ var p = t[d];
+ if (r) {
+ var v =
+ void 0 !== p.POSITION
+ ? n.getDependency("accessor", p.POSITION)
+ : e.attributes.position;
+ u.push(v);
+ }
+ if (i) {
+ var m =
+ void 0 !== p.NORMAL
+ ? n.getDependency("accessor", p.NORMAL)
+ : e.attributes.normal;
+ c.push(m);
+ }
+ if (a) {
+ var g =
+ void 0 !== p.COLOR_0
+ ? n.getDependency("accessor", p.COLOR_0)
+ : e.attributes.color;
+ f.push(g);
+ }
+ }
+ return Promise.all([
+ Promise.all(u),
+ Promise.all(c),
+ Promise.all(f),
+ ]).then(function (t) {
+ var n = t[0],
+ o = t[1],
+ s = t[2];
+ return (
+ r && (e.morphAttributes.position = n),
+ i && (e.morphAttributes.normal = o),
+ a && (e.morphAttributes.color = s),
+ (e.morphTargetsRelative = !0),
+ e
+ );
+ });
+ }
+ function ws(e, t) {
+ if ((e.updateMorphTargets(), void 0 !== t.weights))
+ for (var n = 0, r = t.weights.length; n < r; n++)
+ e.morphTargetInfluences[n] = t.weights[n];
+ if (t.extras && Array.isArray(t.extras.targetNames)) {
+ var i = t.extras.targetNames;
+ if (e.morphTargetInfluences.length === i.length) {
+ e.morphTargetDictionary = {};
+ for (var a = 0, o = i.length; a < o; a++)
+ e.morphTargetDictionary[i[a]] = a;
+ } else
+ console.warn(
+ "THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names."
+ );
+ }
+ }
+ function Ts(e) {
+ var t,
+ n = e.extensions && e.extensions[Go.KHR_DRACO_MESH_COMPRESSION];
+ if (
+ ((t = n
+ ? "draco:" +
+ n.bufferView +
+ ":" +
+ n.indices +
+ ":" +
+ Ms(n.attributes)
+ : e.indices + ":" + Ms(e.attributes) + ":" + e.mode),
+ void 0 !== e.targets)
+ )
+ for (var r = 0, i = e.targets.length; r < i; r++)
+ t += ":" + Ms(e.targets[r]);
+ return t;
+ }
+ function Ms(e) {
+ for (
+ var t = "", n = Object.keys(e).sort(), r = 0, i = n.length;
+ r < i;
+ r++
+ )
+ t += n[r] + ":" + e[n[r]] + ";";
+ return t;
+ }
+ function Is(e) {
+ switch (e) {
+ case Int8Array:
+ return 1 / 127;
+ case Uint8Array:
+ return 1 / 255;
+ case Int16Array:
+ return 1 / 32767;
+ case Uint16Array:
+ return 1 / 65535;
+ default:
+ throw new Error(
+ "THREE.GLTFLoader: Unsupported normalized accessor component type."
+ );
+ }
+ }
+ function ks(e) {
+ return e.search(/\.jpe?g($|\?)/i) > 0 ||
+ 0 === e.search(/^data\:image\/jpeg/)
+ ? "image/jpeg"
+ : e.search(/\.webp($|\?)/i) > 0 ||
+ 0 === e.search(/^data\:image\/webp/)
+ ? "image/webp"
+ : "image/png";
+ }
+ var Rs = new A.Matrix4(),
+ Bs = null;
+ function Ps(e, t, n) {
+ var r = t.attributes,
+ i = new Box3();
+ if (void 0 !== r.POSITION) {
+ var a = n.json.accessors[r.POSITION],
+ o = a.min,
+ s = a.max;
+ if (void 0 !== o && void 0 !== s) {
+ if (
+ (i.set(
+ new Vector3(o[0], o[1], o[2]),
+ new Vector3(s[0], s[1], s[2])
+ ),
+ a.normalized)
+ ) {
+ var l = Is(ps[a.componentType]);
+ i.min.multiplyScalar(l), i.max.multiplyScalar(l);
+ }
+ var u = t.targets;
+ if (void 0 !== u) {
+ for (
+ var c = new Vector3(), f = new Vector3(), d = 0, h = u.length;
+ d < h;
+ d++
+ ) {
+ var p = u[d];
+ if (void 0 !== p.POSITION) {
+ var v = n.json.accessors[p.POSITION],
+ m = v.min,
+ g = v.max;
+ if (void 0 !== m && void 0 !== g) {
+ if (
+ (f.setX(Math.max(Math.abs(m[0]), Math.abs(g[0]))),
+ f.setY(Math.max(Math.abs(m[1]), Math.abs(g[1]))),
+ f.setZ(Math.max(Math.abs(m[2]), Math.abs(g[2]))),
+ v.normalized)
+ ) {
+ var A = Is(ps[v.componentType]);
+ f.multiplyScalar(A);
+ }
+ c.max(f);
+ } else
+ console.warn(
+ "THREE.GLTFLoader: Missing min/max properties for accessor POSITION."
+ );
+ }
+ }
+ i.expandByVector(c);
+ }
+ e.boundingBox = i;
+ var y = new Sphere();
+ i.getCenter(y.center),
+ (y.radius = i.min.distanceTo(i.max) / 2),
+ (e.boundingSphere = y);
+ } else
+ console.warn(
+ "THREE.GLTFLoader: Missing min/max properties for accessor POSITION."
+ );
+ }
+ }
+ function Ls(e, t, n) {
+ var r = t.attributes,
+ i = [];
+ function a(t, r) {
+ return n.getDependency("accessor", t).then(function (t) {
+ e.setAttribute(r, t);
+ });
+ }
+ for (var o in r) {
+ var s = As[o] || o.toLowerCase();
+ s in e.attributes || i.push(a(r[o], s));
+ }
+ if (void 0 !== t.indices && !e.index) {
+ var l = n.getDependency("accessor", t.indices).then(function (t) {
+ e.setIndex(t);
+ });
+ i.push(l);
+ }
+ return (
+ _s(e, t),
+ Ps(e, t, n),
+ Promise.all(i).then(function () {
+ return void 0 !== t.targets ? Cs(e, t.targets, n) : e;
+ })
+ );
+ }
+ var Ds =
+ "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles/generic-hand/",
+ Us = null,
+ Fs = 0.01,
+ Os = "index-finger-tip",
+ Ns = null,
+ Gs = 0.05,
+ Zs = 0.02,
+ zs = 0.01,
+ Qs = 0.02,
+ Hs = 1,
+ Vs = 0.4,
+ js = 0.002,
+ Ws = 0.01,
+ Xs = 0.003,
+ Ys = 0.035,
+ qs = 16,
+ Js = 12,
+ Ks = 110,
+ $s = new A.Vector3(0, 1, 0),
+ el = new A.Vector3(0, 0, 1),
+ tl = 0.02,
+ nl = 1.5,
+ rl = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this)).hand = e),
+ (i.controller = r),
+ (i.motionController = null),
+ (i.envMap = null),
+ (i.mesh = null),
+ (i.pointerGeometry = null),
+ (i.pointerMesh = null),
+ (i.pointerObject = null),
+ (i.pinched = !1),
+ (i.attached = !1),
+ (i.cursorObject = null),
+ (i.raycaster = null),
+ (i._onConnected = i._onConnected.bind((0, f.Z)(i))),
+ (i._onDisconnected = i._onDisconnected.bind((0, f.Z)(i))),
+ i.hand.addEventListener("connected", i._onConnected),
+ i.hand.addEventListener("disconnected", i._onDisconnected),
+ i
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "_onConnected",
+ value: function (e) {
+ var t = e.data;
+ t.hand &&
+ ((this.visible = !0),
+ (this.xrInputSource = t),
+ this.createPointer());
+ },
+ },
+ {
+ key: "_onDisconnected",
+ value: function () {
+ var e, t;
+ (this.visible = !1),
+ (this.xrInputSource = null),
+ null == (e = this.pointerGeometry) || e.dispose(),
+ null == (t = this.pointerMesh) || t.material.dispose(),
+ this.clear();
+ },
+ },
+ {
+ key: "_drawVerticesRing",
+ value: function (e, t, n) {
+ for (var r = t.clone(), i = 0; i < qs; i++) {
+ r.applyAxisAngle(el, (2 * Math.PI) / qs);
+ var a = n * qs + i;
+ (e[3 * a] = r.x),
+ (e[3 * a + 1] = r.y),
+ (e[3 * a + 2] = r.z);
+ }
+ },
+ },
+ {
+ key: "_updatePointerVertices",
+ value: function (e) {
+ var t = this.pointerGeometry.attributes.position.array,
+ n = new A.Vector3(js, 0, -1 * (Ys - e));
+ this._drawVerticesRing(t, n, 0);
+ for (
+ var r = new A.Vector3(
+ Math.sin((Math.PI * Ks) / 180) * e,
+ Math.cos((Math.PI * Ks) / 180) * e,
+ 0
+ ),
+ i = 0;
+ i < Js;
+ i++
+ )
+ this._drawVerticesRing(t, r, i + 1),
+ r.applyAxisAngle($s, (Math.PI * Ks) / 180 / (-2 * Js));
+ var a = qs * (1 + Js),
+ o = qs * (1 + Js) + 1,
+ s = new A.Vector3(0, 0, -1 * (Ys - e));
+ (t[3 * a] = s.x),
+ (t[3 * a + 1] = s.y),
+ (t[3 * a + 2] = s.z);
+ var l = new A.Vector3(0, 0, e);
+ (t[3 * o] = l.x),
+ (t[3 * o + 1] = l.y),
+ (t[3 * o + 2] = l.z),
+ this.pointerGeometry.setAttribute(
+ "position",
+ new A.Float32BufferAttribute(t, 3)
+ );
+ },
+ },
+ {
+ key: "createPointer",
+ value: function () {
+ var e,
+ t,
+ n = new Array(3 * ((Js + 1) * qs + 2)).fill(0),
+ r = [];
+ for (
+ this.pointerGeometry = new A.BufferGeometry(),
+ this.pointerGeometry.setAttribute(
+ "position",
+ new A.Float32BufferAttribute(n, 3)
+ ),
+ this._updatePointerVertices(Ws),
+ e = 0;
+ e < Js;
+ e++
+ ) {
+ for (t = 0; t < qs - 1; t++)
+ r.push(e * qs + t, e * qs + t + 1, (e + 1) * qs + t),
+ r.push(
+ e * qs + t + 1,
+ (e + 1) * qs + t + 1,
+ (e + 1) * qs + t
+ );
+ r.push((e + 1) * qs - 1, e * qs, (e + 2) * qs - 1),
+ r.push(e * qs, (e + 1) * qs, (e + 2) * qs - 1);
+ }
+ var i = qs * (1 + Js),
+ a = qs * (1 + Js) + 1;
+ for (e = 0; e < qs - 1; e++)
+ r.push(i, e + 1, e),
+ r.push(a, e + qs * Js, e + qs * Js + 1);
+ r.push(i, 0, qs - 1), r.push(a, qs * (Js + 1) - 1, qs * Js);
+ var o = new A.MeshBasicMaterial();
+ (o.transparent = !0),
+ (o.opacity = Vs),
+ this.pointerGeometry.setIndex(r),
+ (this.pointerMesh = new A.Mesh(this.pointerGeometry, o)),
+ this.pointerMesh.position.set(0, 0, -1 * Ws),
+ (this.pointerObject = new A.Object3D()),
+ this.pointerObject.add(this.pointerMesh),
+ (this.raycaster = new A.Raycaster());
+ var s = new A.SphereGeometry(tl, 10, 10),
+ l = new A.MeshBasicMaterial();
+ (l.transparent = !0),
+ (l.opacity = Vs),
+ (this.cursorObject = new A.Mesh(s, l)),
+ this.pointerObject.add(this.cursorObject),
+ this.add(this.pointerObject);
+ },
+ },
+ {
+ key: "_updateRaycaster",
+ value: function () {
+ if (this.raycaster) {
+ var e = this.pointerObject.matrixWorld,
+ t = new A.Matrix4();
+ t.identity().extractRotation(e),
+ this.raycaster.ray.origin.setFromMatrixPosition(e),
+ this.raycaster.ray.direction
+ .set(0, 0, -1)
+ .applyMatrix4(t);
+ }
+ },
+ },
+ {
+ key: "_updatePointer",
+ value: function () {
+ this.pointerObject.visible = this.controller.visible;
+ var e = this.hand.joints["index-finger-tip"],
+ t = this.hand.joints["thumb-tip"],
+ n = e.position.distanceTo(t.position),
+ r = e.position
+ .clone()
+ .add(t.position)
+ .multiplyScalar(0.5);
+ this.pointerObject.position.copy(r),
+ this.pointerObject.quaternion.copy(
+ this.controller.quaternion
+ ),
+ (this.pinched = n <= Zs);
+ var i = (n - zs) / (Gs - zs),
+ a = (n - zs) / (Zs - zs);
+ if (i > 1)
+ this._updatePointerVertices(Ws),
+ this.pointerMesh.position.set(0, 0, -1 * Ws),
+ (this.pointerMesh.material.opacity = Vs);
+ else if (i > 0) {
+ var o = (Ws - Xs) * i + Xs;
+ this._updatePointerVertices(o),
+ a < 1
+ ? (this.pointerMesh.position.set(
+ 0,
+ 0,
+ -1 * o - (1 - a) * Qs
+ ),
+ (this.pointerMesh.material.opacity =
+ Vs + (1 - a) * (Hs - Vs)))
+ : (this.pointerMesh.position.set(0, 0, -1 * o),
+ (this.pointerMesh.material.opacity = Vs));
+ } else
+ this._updatePointerVertices(Xs),
+ this.pointerMesh.position.set(0, 0, -1 * Xs - Qs),
+ (this.pointerMesh.material.opacity = Hs);
+ this.cursorObject.material.opacity =
+ this.pointerMesh.material.opacity;
+ },
+ },
+ {
+ key: "updateMatrixWorld",
+ value: function (e) {
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "updateMatrixWorld",
+ this
+ ).call(this, e),
+ this.pointerGeometry &&
+ (this._updatePointer(), this._updateRaycaster());
+ },
+ },
+ {
+ key: "isPinched",
+ value: function () {
+ return this.pinched;
+ },
+ },
+ {
+ key: "setAttached",
+ value: function (e) {
+ this.attached = e;
+ },
+ },
+ {
+ key: "isAttached",
+ value: function () {
+ return this.attached;
+ },
+ },
+ {
+ key: "intersectObject",
+ value: function (e) {
+ var t =
+ !(arguments.length > 1 && void 0 !== arguments[1]) ||
+ arguments[1];
+ if (this.raycaster)
+ return this.raycaster.intersectObject(e, t);
+ },
+ },
+ {
+ key: "intersectObjects",
+ value: function (e) {
+ var t =
+ !(arguments.length > 1 && void 0 !== arguments[1]) ||
+ arguments[1];
+ if (this.raycaster)
+ return this.raycaster.intersectObjects(e, t);
+ },
+ },
+ {
+ key: "checkIntersections",
+ value: function (e) {
+ var t =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1];
+ if (this.raycaster && !this.attached) {
+ var n = this.raycaster.intersectObjects(e, t),
+ r = new A.Vector3(0, 0, -1);
+ if (n.length > 0) {
+ var i = n[0].distance;
+ this.cursorObject.position.copy(r.multiplyScalar(i));
+ } else
+ this.cursorObject.position.copy(r.multiplyScalar(nl));
+ }
+ },
+ },
+ {
+ key: "setCursor",
+ value: function (e) {
+ var t = new A.Vector3(0, 0, -1);
+ this.raycaster &&
+ !this.attached &&
+ this.cursorObject.position.copy(t.multiplyScalar(e));
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this._onDisconnected(),
+ this.hand.removeEventListener(
+ "connected",
+ this._onConnected
+ ),
+ this.hand.removeEventListener(
+ "disconnected",
+ this._onDisconnected
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(A.Object3D);
+ function il(e, t) {
+ var n = document.createElement("canvas"),
+ r = n.getContext("2d"),
+ i = 100;
+ r.font = "normal 100px Arial";
+ var a = r.measureText(e).width;
+ (n.width = a),
+ (n.height = i),
+ (r.font = "normal 100px Arial"),
+ (r.textAlign = "center"),
+ (r.textBaseline = "middle"),
+ (r.fillStyle = "#ffffff"),
+ r.fillText(e, a / 2, 50);
+ var o = new THREE.Texture(n);
+ o.needsUpdate = !0;
+ var s = new THREE.MeshBasicMaterial({
+ color: 16777215,
+ side: THREE.DoubleSide,
+ map: o,
+ transparent: !0,
+ }),
+ l = new THREE.PlaneGeometry((t * a) / i, t);
+ return new THREE.Mesh(l, s);
+ }
+ var al = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, null, [
+ {
+ key: "createButton",
+ value: function (t) {
+ var n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ r = document.createElement("button");
+ function i() {
+ (r.style.display = ""),
+ (r.style.cursor = "auto"),
+ (r.style.left = "calc(50% - 75px)"),
+ (r.style.width = "150px"),
+ (r.onmouseenter = null),
+ (r.onmouseleave = null),
+ (r.onclick = null),
+ (r.textContent = "VR NOT SUPPORTED");
+ }
+ function a(e) {
+ (e.style.position = "absolute"),
+ (e.style.bottom = "20px"),
+ (e.style.padding = "12px 6px"),
+ (e.style.border = "1px solid #fff"),
+ (e.style.borderRadius = "4px"),
+ (e.style.background = "rgba(0,0,0,0.1)"),
+ (e.style.color = "#fff"),
+ (e.style.font = "normal 13px sans-serif"),
+ (e.style.textAlign = "center"),
+ (e.style.opacity = "0.5"),
+ (e.style.outline = "none"),
+ (e.style.zIndex = "999");
+ }
+ if ("xr" in navigator)
+ return (
+ a(r),
+ (r.id = "VRButton"),
+ (r.style.display = "none"),
+ navigator.xr
+ .isSessionSupported("immersive-vr")
+ .then(function (a) {
+ a
+ ? (function () {
+ var e = null;
+ function i(e) {
+ return a.apply(this, arguments);
+ }
+ function a() {
+ return (a = (0, c.Z)(
+ (0, u.Z)().mark(function n(i) {
+ return (0, u.Z)().wrap(function (n) {
+ for (;;)
+ switch ((n.prev = n.next)) {
+ case 0:
+ return (
+ i.addEventListener("end", o),
+ (n.next = 3),
+ t.xr.setSession(i)
+ );
+ case 3:
+ (r.textContent = "EXIT VR"),
+ (e = i);
+ case 5:
+ case "end":
+ return n.stop();
+ }
+ }, n);
+ })
+ )).apply(this, arguments);
+ }
+ function o() {
+ e.removeEventListener("end", o),
+ (r.textContent = "ENTER VR"),
+ (e = null);
+ }
+ (r.style.display = ""),
+ (r.style.cursor = "pointer"),
+ (r.style.left = "calc(50% - 50px)"),
+ (r.style.width = "100px"),
+ (r.textContent = "ENTER VR"),
+ (r.onmouseenter = function () {
+ r.style.opacity = "1.0";
+ }),
+ (r.onmouseleave = function () {
+ r.style.opacity = "0.5";
+ }),
+ (r.onclick = function () {
+ var t;
+ if (null === e) {
+ var r = [
+ n.optionalFeatures,
+ "local-floor",
+ "bounded-floor",
+ "hand-tracking",
+ ]
+ .flat()
+ .filter(Boolean);
+ null == (t = navigator.xr) ||
+ t
+ .requestSession(
+ "immersive-vr",
+ (0, s.Z)(
+ (0, s.Z)({}, n),
+ {},
+ { optionalFeatures: r }
+ )
+ )
+ .then(i);
+ } else e.end();
+ });
+ })()
+ : i(),
+ a && e.xrSessionIsGranted && r.click();
+ }),
+ r
+ );
+ var o = document.createElement("a");
+ return (
+ !1 === window.isSecureContext
+ ? ((o.href = document.location.href.replace(
+ /^http:/,
+ "https:"
+ )),
+ (o.innerHTML = "WEBXR NEEDS HTTPS"))
+ : ((o.href = "https://immersiveweb.dev/"),
+ (o.innerHTML = "WEBXR NOT AVAILABLE")),
+ (o.style.left = "calc(50% - 90px)"),
+ (o.style.width = "180px"),
+ (o.style.textDecoration = "none"),
+ a(o),
+ o
+ );
+ },
+ },
+ {
+ key: "registerSessionGrantedListener",
+ value: function () {
+ "undefined" !== typeof navigator &&
+ "xr" in navigator &&
+ navigator.xr.addEventListener(
+ "sessiongranted",
+ function () {
+ e.xrSessionIsGranted = !0;
+ }
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ ol = al,
+ sl = {
+ Handedness: { NONE: "none", LEFT: "left", RIGHT: "right" },
+ ComponentState: {
+ DEFAULT: "default",
+ TOUCHED: "touched",
+ PRESSED: "pressed",
+ },
+ ComponentProperty: {
+ BUTTON: "button",
+ X_AXIS: "xAxis",
+ Y_AXIS: "yAxis",
+ STATE: "state",
+ },
+ ComponentType: {
+ TRIGGER: "trigger",
+ SQUEEZE: "squeeze",
+ TOUCHPAD: "touchpad",
+ THUMBSTICK: "thumbstick",
+ BUTTON: "button",
+ },
+ ButtonTouchThreshold: 0.05,
+ AxisTouchThreshold: 0.1,
+ VisualResponseProperty: {
+ TRANSFORM: "transform",
+ VISIBILITY: "visibility",
+ },
+ };
+ function ll(e) {
+ return ul.apply(this, arguments);
+ }
+ function ul() {
+ return (ul = _asyncToGenerator(
+ _regeneratorRuntime().mark(function e(t) {
+ var n;
+ return _regeneratorRuntime().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), fetch(t);
+ case 2:
+ if ((n = e.sent).ok) {
+ e.next = 7;
+ break;
+ }
+ throw new Error(n.statusText);
+ case 7:
+ return e.abrupt("return", n.json());
+ case 8:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ )).apply(this, arguments);
+ }
+ function cl(e) {
+ return fl.apply(this, arguments);
+ }
+ function fl() {
+ return (fl = _asyncToGenerator(
+ _regeneratorRuntime().mark(function e(t) {
+ var n;
+ return _regeneratorRuntime().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ if (t) {
+ e.next = 2;
+ break;
+ }
+ throw new Error("No basePath supplied");
+ case 2:
+ return (
+ "profilesList.json",
+ (e.next = 5),
+ ll("".concat(t, "/").concat("profilesList.json"))
+ );
+ case 5:
+ return (n = e.sent), e.abrupt("return", n);
+ case 7:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ )).apply(this, arguments);
+ }
+ function dl(e, t) {
+ return hl.apply(this, arguments);
+ }
+ function hl() {
+ return (
+ (hl = _asyncToGenerator(
+ _regeneratorRuntime().mark(function e(t, n) {
+ var r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f = arguments;
+ return _regeneratorRuntime().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ if (
+ ((r = f.length > 2 && void 0 !== f[2] ? f[2] : null),
+ (i = !(f.length > 3 && void 0 !== f[3]) || f[3]),
+ t)
+ ) {
+ e.next = 4;
+ break;
+ }
+ throw new Error("No xrInputSource supplied");
+ case 4:
+ if (n) {
+ e.next = 6;
+ break;
+ }
+ throw new Error("No basePath supplied");
+ case 6:
+ return (e.next = 8), cl(n);
+ case 8:
+ if (
+ ((a = e.sent),
+ (o = void 0),
+ t.profiles.some(function (e) {
+ var t = a[e];
+ return (
+ t &&
+ (o = {
+ profileId: e,
+ profilePath: "".concat(n, "/").concat(t.path),
+ deprecated: !!t.deprecated,
+ }),
+ !!o
+ );
+ }),
+ o)
+ ) {
+ e.next = 18;
+ break;
+ }
+ if (r) {
+ e.next = 14;
+ break;
+ }
+ throw new Error("No matching profile name found");
+ case 14:
+ if ((s = a[r])) {
+ e.next = 17;
+ break;
+ }
+ throw new Error(
+ 'No matching profile name found and default profile "'.concat(
+ r,
+ '" missing.'
+ )
+ );
+ case 17:
+ o = {
+ profileId: r,
+ profilePath: "".concat(n, "/").concat(s.path),
+ deprecated: !!s.deprecated,
+ };
+ case 18:
+ return (e.next = 20), ll(o.profilePath);
+ case 20:
+ if (((l = e.sent), (u = void 0), !i)) {
+ e.next = 27;
+ break;
+ }
+ if (
+ (c =
+ "any" === t.handedness
+ ? l.layouts[Object.keys(l.layouts)[0]]
+ : l.layouts[t.handedness])
+ ) {
+ e.next = 26;
+ break;
+ }
+ throw new Error(
+ "No matching handedness, "
+ .concat(t.handedness, ", in profile ")
+ .concat(o.profileId)
+ );
+ case 26:
+ c.assetPath &&
+ (u = o.profilePath.replace(
+ "profile.json",
+ c.assetPath
+ ));
+ case 27:
+ return e.abrupt("return", { profile: l, assetPath: u });
+ case 28:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ )),
+ hl.apply(this, arguments)
+ );
+ }
+ var pl = {
+ xAxis: 0,
+ yAxis: 0,
+ button: 0,
+ state: sl.ComponentState.DEFAULT,
+ };
+ function vl() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0,
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = e,
+ r = t;
+ if (Math.sqrt(e * e + t * t) > 1) {
+ var i = Math.atan2(t, e);
+ (n = Math.cos(i)), (r = Math.sin(i));
+ }
+ return {
+ normalizedXAxis: 0.5 * n + 0.5,
+ normalizedYAxis: 0.5 * r + 0.5,
+ };
+ }
+ var ml = null,
+ gl = null,
+ Al = null,
+ yl =
+ "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles",
+ bl = "generic-trigger",
+ xl = function (e, t) {
+ t.traverse(function (t) {
+ t instanceof Mesh &&
+ "envMap" in t.material &&
+ ((t.material.envMap = e), (t.material.needsUpdate = !0));
+ });
+ },
+ Sl = null;
+ function El(e, t) {
+ Object.values(e.components).forEach(function (e) {
+ var n = e.type,
+ r = e.touchPointNodeName,
+ i = e.visualResponses;
+ if (n === sl.ComponentType.TOUCHPAD && r)
+ if (
+ ((e.touchPointNode = t.getObjectByName(r)), e.touchPointNode)
+ ) {
+ var a = new SphereGeometry(0.001),
+ o = new MeshBasicMaterial({ color: 255 }),
+ s = new Mesh(a, o);
+ e.touchPointNode.add(s);
+ } else
+ console.warn(
+ "Could not find touch dot, "
+ .concat(e.touchPointNodeName, ", in touchpad component ")
+ .concat(e.id)
+ );
+ Object.values(i).forEach(function (e) {
+ var n = e.valueNodeName,
+ r = e.minNodeName,
+ i = e.maxNodeName;
+ if (
+ e.valueNodeProperty === sl.VisualResponseProperty.TRANSFORM &&
+ r &&
+ i
+ ) {
+ if (
+ ((e.minNode = t.getObjectByName(r)),
+ (e.maxNode = t.getObjectByName(i)),
+ !e.minNode)
+ )
+ return void console.warn(
+ "Could not find ".concat(r, " in the model")
+ );
+ if (!e.maxNode)
+ return void console.warn(
+ "Could not find ".concat(i, " in the model")
+ );
+ }
+ (e.valueNode = t.getObjectByName(n)),
+ e.valueNode ||
+ console.warn("Could not find ".concat(n, " in the model"));
+ });
+ });
+ }
+ function _l(e, t) {
+ El(e.motionController, t), e.envMap && xl(e.envMap, t), e.add(t);
+ }
+ var Cl = null,
+ wl = null,
+ Tl = null,
+ Ml = new A.Matrix4(),
+ Il = new A.Vector3(),
+ kl = null,
+ Rl = null,
+ Bl = null,
+ Pl = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : function (e, t, n) {
+ return n.set(e, t, Math.cos(e) * Math.sin(t));
+ },
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 8,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 8;
+ (0, p.Z)(this, n),
+ ((e = t.call(this)).type = "ParametricGeometry"),
+ (e.parameters = { func: r, slices: i, stacks: a });
+ for (
+ var o = [],
+ s = [],
+ l = [],
+ u = [],
+ c = 1e-5,
+ f = new A.Vector3(),
+ d = new A.Vector3(),
+ h = new A.Vector3(),
+ v = new A.Vector3(),
+ m = new A.Vector3(),
+ g = i + 1,
+ y = 0;
+ y <= a;
+ y++
+ )
+ for (var b = y / a, x = 0; x <= i; x++) {
+ var S = x / i;
+ r(S, b, d),
+ s.push(d.x, d.y, d.z),
+ S - c >= 0
+ ? (r(S - c, b, h), v.subVectors(d, h))
+ : (r(S + c, b, h), v.subVectors(h, d)),
+ b - c >= 0
+ ? (r(S, b - c, h), m.subVectors(d, h))
+ : (r(S, b + c, h), m.subVectors(h, d)),
+ f.crossVectors(v, m).normalize(),
+ l.push(f.x, f.y, f.z),
+ u.push(S, b);
+ }
+ for (var E = 0; E < a; E++)
+ for (var _ = 0; _ < i; _++) {
+ var C = E * g + _,
+ w = E * g + _ + 1,
+ T = (E + 1) * g + _ + 1,
+ M = (E + 1) * g + _;
+ o.push(C, w, M), o.push(w, T, M);
+ }
+ return (
+ e.setIndex(o),
+ e.setAttribute("position", new A.Float32BufferAttribute(s, 3)),
+ e.setAttribute("normal", new A.Float32BufferAttribute(l, 3)),
+ e.setAttribute("uv", new A.Float32BufferAttribute(u, 2)),
+ e
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.BufferGeometry),
+ Ll = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 64,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 8,
+ s =
+ arguments.length > 4 &&
+ void 0 !== arguments[4] &&
+ arguments[4];
+ (0, p.Z)(this, n);
+ var l = i + 1,
+ u = e.computeFrenetFrames(i, s),
+ c = u.tangents,
+ f = u.normals,
+ d = u.binormals,
+ h = new A.Vector3();
+ return (
+ ((r = t.call(
+ this,
+ function (t, n, r) {
+ n *= 2 * Math.PI;
+ var i = Math.floor(t * (l - 1));
+ e.getPointAt(t, h);
+ var o = f[i],
+ s = d[i],
+ u = -a * Math.cos(n),
+ c = a * Math.sin(n);
+ (h.x += u * o.x + c * s.x),
+ (h.y += u * o.y + c * s.y),
+ (h.z += u * o.z + c * s.z),
+ r.copy(h);
+ },
+ i,
+ o
+ )).tangents = c),
+ (r.normals = f),
+ (r.binormals = d),
+ (r.path = e),
+ (r.segments = i),
+ (r.radius = a),
+ (r.segmentsRadius = o),
+ (r.closed = s),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(Pl),
+ Dl = {
+ klein: function (e, t, n) {
+ var r, i;
+ (t *= Math.PI),
+ (e *= 2 * Math.PI),
+ (t *= 2) < Math.PI
+ ? ((r =
+ 3 * Math.cos(t) * (1 + Math.sin(t)) +
+ 2 * (1 - Math.cos(t) / 2) * Math.cos(t) * Math.cos(e)),
+ (i =
+ -8 * Math.sin(t) -
+ 2 * (1 - Math.cos(t) / 2) * Math.sin(t) * Math.cos(e)))
+ : ((r =
+ 3 * Math.cos(t) * (1 + Math.sin(t)) +
+ 2 * (1 - Math.cos(t) / 2) * Math.cos(e + Math.PI)),
+ (i = -8 * Math.sin(t)));
+ var a = -2 * (1 - Math.cos(t) / 2) * Math.sin(e);
+ n.set(r, a, i);
+ },
+ plane: function (e, t) {
+ return function (n, r, i) {
+ var a = n * e,
+ o = r * t;
+ i.set(a, 0, o);
+ };
+ },
+ mobius: function (e, t, n) {
+ e -= 0.5;
+ var r = 2 * Math.PI * t,
+ i = Math.cos(r) * (2 + e * Math.cos(r / 2)),
+ a = Math.sin(r) * (2 + e * Math.cos(r / 2)),
+ o = e * Math.sin(r / 2);
+ n.set(i, a, o);
+ },
+ mobius3d: function (e, t, n) {
+ (e *= Math.PI), (t *= 2 * Math.PI);
+ var r = (e *= 2) / 2,
+ i =
+ 0.125 * Math.cos(t) * Math.cos(r) -
+ 0.65 * Math.sin(t) * Math.sin(r),
+ a =
+ 0.125 * Math.cos(t) * Math.sin(r) +
+ 0.65 * Math.sin(t) * Math.cos(r),
+ o = (2.25 + i) * Math.sin(e);
+ (i = (2.25 + i) * Math.cos(e)), n.set(i, o, a);
+ },
+ TubeGeometry: Ll,
+ TorusKnotGeometry: (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 200,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 40,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 64,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 8,
+ s =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : 2,
+ l =
+ arguments.length > 5 && void 0 !== arguments[5]
+ ? arguments[5]
+ : 3;
+ (0, p.Z)(this, n);
+ var u = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ return (0, p.Z)(this, n), t.apply(this, arguments);
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "getPoint",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new A.Vector3();
+ e *= 2 * Math.PI;
+ var n =
+ (1 + 0.5 * Math.cos(l * e)) * Math.cos(s * e),
+ i = (1 + 0.5 * Math.cos(l * e)) * Math.sin(s * e),
+ a = 0.5 * Math.sin(l * e);
+ return t.set(n, i, a).multiplyScalar(r);
+ },
+ },
+ ]),
+ n
+ );
+ })(A.Curve),
+ c = a,
+ f = o,
+ d = new u();
+ return (
+ ((e = t.call(this, d, c, i, f, !0, !1)).radius = r),
+ (e.tube = i),
+ (e.segmentsT = a),
+ (e.segmentsR = o),
+ (e.p = s),
+ (e.q = l),
+ e
+ );
+ }
+ return (0, v.Z)(n);
+ })(Ll),
+ SphereGeometry: (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i) {
+ return (
+ (0, p.Z)(this, n),
+ t.call(
+ this,
+ function (t, n, r) {
+ (t *= Math.PI), (n *= 2 * Math.PI);
+ var i = e * Math.sin(t) * Math.cos(n),
+ a = e * Math.sin(t) * Math.sin(n),
+ o = e * Math.cos(t);
+ r.set(i, a, o);
+ },
+ r,
+ i
+ )
+ );
+ }
+ return (0, v.Z)(n);
+ })(Pl),
+ PlaneGeometry: (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i, a) {
+ return (
+ (0, p.Z)(this, n),
+ t.call(
+ this,
+ function (t, n, i) {
+ var a = t * e,
+ o = n * r;
+ i.set(a, 0, o);
+ },
+ i,
+ a
+ )
+ );
+ }
+ return (0, v.Z)(n);
+ })(Pl),
+ },
+ Ul = new A.Vector3();
+ function Fl(e, t, n, r, i, a) {
+ var o = (2 * Math.PI * i) / 4,
+ s = Math.max(a - 2 * i, 0),
+ l = Math.PI / 4;
+ Ul.copy(t), (Ul[r] = 0), Ul.normalize();
+ var u = (0.5 * o) / (o + s),
+ c = 1 - Ul.angleTo(e) / l;
+ return 1 === Math.sign(Ul[n]) ? c * u : s / (o + s) + u + u * (1 - c);
+ }
+ var Ol = null,
+ Nl = null,
+ Gl = null,
+ Zl = null,
+ zl = null,
+ Ql = null,
+ Hl = new A.Matrix4(),
+ Vl = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (t = t || {}),
+ (this.vertices = {
+ near: [
+ new A.Vector3(),
+ new A.Vector3(),
+ new A.Vector3(),
+ new A.Vector3(),
+ ],
+ far: [
+ new A.Vector3(),
+ new A.Vector3(),
+ new A.Vector3(),
+ new A.Vector3(),
+ ],
+ }),
+ void 0 !== t.projectionMatrix &&
+ this.setFromProjectionMatrix(
+ t.projectionMatrix,
+ t.maxFar || 1e4
+ );
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "setFromProjectionMatrix",
+ value: function (e, t) {
+ var n = 0 === e.elements[11];
+ return (
+ Hl.copy(e).invert(),
+ this.vertices.near[0].set(1, 1, -1),
+ this.vertices.near[1].set(1, -1, -1),
+ this.vertices.near[2].set(-1, -1, -1),
+ this.vertices.near[3].set(-1, 1, -1),
+ this.vertices.near.forEach(function (e) {
+ e.applyMatrix4(Hl);
+ }),
+ this.vertices.far[0].set(1, 1, 1),
+ this.vertices.far[1].set(1, -1, 1),
+ this.vertices.far[2].set(-1, -1, 1),
+ this.vertices.far[3].set(-1, 1, 1),
+ this.vertices.far.forEach(function (e) {
+ e.applyMatrix4(Hl);
+ var r = Math.abs(e.z);
+ n
+ ? (e.z *= Math.min(t / r, 1))
+ : e.multiplyScalar(Math.min(t / r, 1));
+ }),
+ this.vertices
+ );
+ },
+ },
+ {
+ key: "split",
+ value: function (t, n) {
+ for (; t.length > n.length; ) n.push(new e());
+ n.length = t.length;
+ for (var r = 0; r < t.length; r++) {
+ var i = n[r];
+ if (0 === r)
+ for (var a = 0; a < 4; a++)
+ i.vertices.near[a].copy(this.vertices.near[a]);
+ else
+ for (var o = 0; o < 4; o++)
+ i.vertices.near[o].lerpVectors(
+ this.vertices.near[o],
+ this.vertices.far[o],
+ t[r - 1]
+ );
+ if (r === t.length - 1)
+ for (var s = 0; s < 4; s++)
+ i.vertices.far[s].copy(this.vertices.far[s]);
+ else
+ for (var l = 0; l < 4; l++)
+ i.vertices.far[l].lerpVectors(
+ this.vertices.near[l],
+ this.vertices.far[l],
+ t[r]
+ );
+ }
+ },
+ },
+ {
+ key: "toSpace",
+ value: function (e, t) {
+ for (var n = 0; n < 4; n++)
+ t.vertices.near[n]
+ .copy(this.vertices.near[n])
+ .applyMatrix4(e),
+ t.vertices.far[n]
+ .copy(this.vertices.far[n])
+ .applyMatrix4(e);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ jl = {
+ lights_fragment_begin:
+ "\nGeometricContext geometry;\n\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n\n#ifdef CLEARCOAT\n\n\tgeometry.clearcoatNormal = clearcoatNormal;\n\n#endif\n\nIncidentLight directLight;\n\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\n\t\tpointLight = pointLights[ i ];\n\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\n\t\tspotLight = spotLights[ i ];\n\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_DIR_LIGHTS > 0) && defined( RE_Direct ) && defined( USE_CSM ) && defined( CSM_CASCADES )\n\n\tDirectionalLight directionalLight;\n\tfloat linearDepth = (vViewPosition.z) / (shadowFar - cameraNear);\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#if defined( USE_SHADOWMAP ) && defined( CSM_FADE )\n\tvec2 cascade;\n\tfloat cascadeCenter;\n\tfloat closestEdge;\n\tfloat margin;\n\tfloat csmx;\n\tfloat csmy;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t \t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\t\t// NOTE: Depth gets larger away from the camera.\n\t\t\t// cascade.x is closer, cascade.y is further\n\t\t\tcascade = CSM_cascades[ i ];\n\t\t\tcascadeCenter = ( cascade.x + cascade.y ) / 2.0;\n\t\t\tclosestEdge = linearDepth < cascadeCenter ? cascade.x : cascade.y;\n\t\t\tmargin = 0.25 * pow( closestEdge, 2.0 );\n\t\t\tcsmx = cascade.x - margin / 2.0;\n\t\t\tcsmy = cascade.y + margin / 2.0;\n\t\t\tif( linearDepth >= csmx && ( linearDepth < csmy || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 ) ) {\n\n\t\t\t\tfloat dist = min( linearDepth - csmx, csmy - linearDepth );\n\t\t\t\tfloat ratio = clamp( dist / margin, 0.0, 1.0 );\n\n\t\t\t\tvec3 prevColor = directLight.color;\n\t\t\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\t\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t\t\t\tbool shouldFadeLastCascade = UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth > cascadeCenter;\n\t\t\t\tdirectLight.color = mix( prevColor, directLight.color, shouldFadeLastCascade ? ratio : 1.0 );\n\n\t\t\t\tReflectedLight prevLight = reflectedLight;\n\t\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t\t\tbool shouldBlend = UNROLLED_LOOP_INDEX != CSM_CASCADES - 1 || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1 && linearDepth < cascadeCenter;\n\t\t\t\tfloat blendRatio = shouldBlend ? ratio : 1.0;\n\n\t\t\t\treflectedLight.directDiffuse = mix( prevLight.directDiffuse, reflectedLight.directDiffuse, blendRatio );\n\t\t\t\treflectedLight.directSpecular = mix( prevLight.directSpecular, reflectedLight.directSpecular, blendRatio );\n\t\t\t\treflectedLight.indirectDiffuse = mix( prevLight.indirectDiffuse, reflectedLight.indirectDiffuse, blendRatio );\n\t\t\t\treflectedLight.indirectSpecular = mix( prevLight.indirectSpecular, reflectedLight.indirectSpecular, blendRatio );\n\n\t\t\t}\n\t \t#endif\n\n\t}\n\t#pragma unroll_loop_end\n\t#else\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\t\tdirectionalLight = directionalLights[ i ];\n\t\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\n\t\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\t\tif(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y) directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\n\t\t\tif(linearDepth >= CSM_cascades[UNROLLED_LOOP_INDEX].x && (linearDepth < CSM_cascades[UNROLLED_LOOP_INDEX].y || UNROLLED_LOOP_INDEX == CSM_CASCADES - 1)) RE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t\t#endif\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n\t#if ( NUM_DIR_LIGHTS > NUM_DIR_LIGHT_SHADOWS)\n\t\t// compute the lights not casting shadows (if any)\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = NUM_DIR_LIGHT_SHADOWS; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\t\tdirectionalLight = directionalLights[ i ];\n\n\t\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) && !defined( USE_CSM ) && !defined( CSM_CASCADES )\n\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\n\t\tdirectionalLight = directionalLights[ i ];\n\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\n\tRectAreaLight rectAreaLight;\n\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\n\t}\n\t#pragma unroll_loop_end\n\n#endif\n\n#if defined( RE_IndirectDiffuse )\n\n\tvec3 iblIrradiance = vec3( 0.0 );\n\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\n\t\t}\n\t\t#pragma unroll_loop_end\n\n\t#endif\n\n#endif\n\n#if defined( RE_IndirectSpecular )\n\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n\n#endif\n",
+ getlights_pars_begin: function () {
+ return "\n\t\t\t#if defined( USE_CSM ) && defined( CSM_CASCADES )\n\t\t\tuniform vec2 CSM_cascades[CSM_CASCADES];\n\t\t\tuniform float cameraNear;\n\t\t\tuniform float shadowFar;\n\t\t\t#endif\n\n\t\t\t".concat(
+ A.ShaderChunk.lights_pars_begin,
+ "\n\t\t"
+ );
+ },
+ },
+ Wl = new A.Matrix4(),
+ Xl = new Vl(),
+ Yl = new A.Vector3(),
+ ql = new A.Box3(),
+ Jl = null,
+ Kl = null,
+ $l = null,
+ eu = null,
+ tu = {
+ uniforms: { tDiffuse: { value: null }, exposure: { value: 1 } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#define saturate(a) clamp( a, 0.0, 1.0 )",
+ "uniform sampler2D tDiffuse;",
+ "uniform float exposure;",
+ "varying vec2 vUv;",
+ "vec3 RRTAndODTFit( vec3 v ) {",
+ "\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;",
+ "\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;",
+ "\treturn a / b;",
+ "}",
+ "vec3 ACESFilmicToneMapping( vec3 color ) {",
+ "\tconst mat3 ACESInputMat = mat3(",
+ "\t\tvec3( 0.59719, 0.07600, 0.02840 ),",
+ "\t\tvec3( 0.35458, 0.90834, 0.13383 ),",
+ "\t\tvec3( 0.04823, 0.01566, 0.83777 )",
+ "\t);",
+ "\tconst mat3 ACESOutputMat = mat3(",
+ "\t\tvec3( 1.60475, -0.10208, -0.00327 ),",
+ "\t\tvec3( -0.53108, 1.10813, -0.07276 ),",
+ "\t\tvec3( -0.07367, -0.00605, 1.07602 )",
+ "\t);",
+ "\tcolor = ACESInputMat * color;",
+ "\tcolor = RRTAndODTFit( color );",
+ "\tcolor = ACESOutputMat * color;",
+ "\treturn saturate( color );",
+ "}",
+ "void main() {",
+ "\tvec4 tex = texture2D( tDiffuse, vUv );",
+ "\ttex.rgb *= exposure / 0.6;",
+ "\tgl_FragColor = vec4( ACESFilmicToneMapping( tex.rgb ), tex.a );",
+ "}",
+ ].join("\n"),
+ },
+ nu = {
+ uniforms: {},
+ vertexShader: [
+ "void main() {",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "void main() {",
+ "\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );",
+ "}",
+ ].join("\n"),
+ },
+ ru = {
+ uniforms: { tDiffuse: { value: null }, opacity: { value: 1 } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float opacity;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 base = texture2D( tDiffuse, vUv );",
+ "\tvec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );",
+ "\tfloat lum = dot( lumCoeff, base.rgb );",
+ "\tvec3 blend = vec3( lum );",
+ "\tfloat L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );",
+ "\tvec3 result1 = 2.0 * base.rgb * blend;",
+ "\tvec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );",
+ "\tvec3 newColor = mix( result1, result2, L );",
+ "\tfloat A2 = opacity * base.a;",
+ "\tvec3 mixRGB = A2 * newColor.rgb;",
+ "\tmixRGB += ( ( 1.0 - A2 ) * base.rgb );",
+ "\tgl_FragColor = vec4( mixRGB, base.a );",
+ "}",
+ ].join("\n"),
+ },
+ iu = {
+ uniforms: {
+ tDiffuse1: { value: null },
+ tDiffuse2: { value: null },
+ mixRatio: { value: 0.5 },
+ opacity: { value: 1 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float opacity;",
+ "uniform float mixRatio;",
+ "uniform sampler2D tDiffuse1;",
+ "uniform sampler2D tDiffuse2;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 texel1 = texture2D( tDiffuse1, vUv );",
+ "\tvec4 texel2 = texture2D( tDiffuse2, vUv );",
+ "\tgl_FragColor = opacity * mix( texel1, texel2, mixRatio );",
+ "}",
+ ].join("\n"),
+ },
+ au = {
+ uniforms: {
+ tDiffuse: { value: null },
+ brightness: { value: 0 },
+ contrast: { value: 0 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float brightness;",
+ "uniform float contrast;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tgl_FragColor = texture2D( tDiffuse, vUv );",
+ "\tgl_FragColor.rgb += brightness;",
+ "\tif (contrast > 0.0) {",
+ "\t\tgl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;",
+ "\t} else {",
+ "\t\tgl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;",
+ "\t}",
+ "}",
+ ].join("\n"),
+ },
+ ou = {
+ uniforms: {
+ tDiffuse: { value: null },
+ powRGB: { value: new A.Vector3(2, 2, 2) },
+ mulRGB: { value: new A.Vector3(1, 1, 1) },
+ addRGB: { value: new A.Vector3(0, 0, 0) },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform vec3 powRGB;",
+ "uniform vec3 mulRGB;",
+ "uniform vec3 addRGB;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tgl_FragColor = texture2D( tDiffuse, vUv );",
+ "\tgl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );",
+ "}",
+ ].join("\n"),
+ },
+ su = {
+ uniforms: {
+ tDiffuse: { value: null },
+ color: { value: new A.Color(16777215) },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec3 color;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 texel = texture2D( tDiffuse, vUv );",
+ "\tvec3 luma = vec3( 0.299, 0.587, 0.114 );",
+ "\tfloat v = dot( texel.xyz, luma );",
+ "\tgl_FragColor = vec4( v * color, texel.w );",
+ "}",
+ ].join("\n"),
+ },
+ lu = {
+ uniforms: {
+ tColor: { value: null },
+ tDepth: { value: null },
+ focus: { value: 1 },
+ maxblur: { value: 1 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float focus;",
+ "uniform float maxblur;",
+ "uniform sampler2D tColor;",
+ "uniform sampler2D tDepth;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 depth = texture2D( tDepth, vUv );",
+ "\tfloat factor = depth.x - focus;",
+ "\tvec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );",
+ "\tgl_FragColor = col;",
+ "\tgl_FragColor.a = 1.0;",
+ "}",
+ ].join("\n"),
+ },
+ uu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ resolution: { value: new A.Vector2(1 / 1024, 1 / 512) },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "precision highp float;",
+ "",
+ "uniform sampler2D tDiffuse;",
+ "",
+ "uniform vec2 resolution;",
+ "",
+ "varying vec2 vUv;",
+ "",
+ "// FXAA 3.11 implementation by NVIDIA, ported to WebGL by Agost Biro (biro@archilogic.com)",
+ "",
+ "//----------------------------------------------------------------------------------",
+ "// File: es3-keplerFXAAassetsshaders/FXAA_DefaultES.frag",
+ "// SDK Version: v3.00",
+ "// Email: gameworks@nvidia.com",
+ "// Site: http://developer.nvidia.com/",
+ "//",
+ "// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.",
+ "//",
+ "// Redistribution and use in source and binary forms, with or without",
+ "// modification, are permitted provided that the following conditions",
+ "// are met:",
+ "// * Redistributions of source code must retain the above copyright",
+ "// notice, this list of conditions and the following disclaimer.",
+ "// * Redistributions in binary form must reproduce the above copyright",
+ "// notice, this list of conditions and the following disclaimer in the",
+ "// documentation and/or other materials provided with the distribution.",
+ "// * Neither the name of NVIDIA CORPORATION nor the names of its",
+ "// contributors may be used to endorse or promote products derived",
+ "// from this software without specific prior written permission.",
+ "//",
+ "// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY",
+ "// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE",
+ "// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR",
+ "// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR",
+ "// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,",
+ "// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,",
+ "// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR",
+ "// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY",
+ "// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT",
+ "// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE",
+ "// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
+ "//",
+ "//----------------------------------------------------------------------------------",
+ "",
+ "#define FXAA_PC 1",
+ "#define FXAA_GLSL_100 1",
+ "#define FXAA_QUALITY_PRESET 12",
+ "",
+ "#define FXAA_GREEN_AS_LUMA 1",
+ "",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_PC_CONSOLE",
+ " //",
+ " // The console algorithm for PC is included",
+ " // for developers targeting really low spec machines.",
+ " // Likely better to just run FXAA_PC, and use a really low preset.",
+ " //",
+ " #define FXAA_PC_CONSOLE 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_GLSL_120",
+ " #define FXAA_GLSL_120 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_GLSL_130",
+ " #define FXAA_GLSL_130 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_HLSL_3",
+ " #define FXAA_HLSL_3 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_HLSL_4",
+ " #define FXAA_HLSL_4 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_HLSL_5",
+ " #define FXAA_HLSL_5 0",
+ "#endif",
+ "/*==========================================================================*/",
+ "#ifndef FXAA_GREEN_AS_LUMA",
+ " //",
+ " // For those using non-linear color,",
+ " // and either not able to get luma in alpha, or not wanting to,",
+ " // this enables FXAA to run using green as a proxy for luma.",
+ " // So with this enabled, no need to pack luma in alpha.",
+ " //",
+ " // This will turn off AA on anything which lacks some amount of green.",
+ " // Pure red and blue or combination of only R and B, will get no AA.",
+ " //",
+ " // Might want to lower the settings for both,",
+ " // fxaaConsoleEdgeThresholdMin",
+ " // fxaaQualityEdgeThresholdMin",
+ " // In order to insure AA does not get turned off on colors",
+ " // which contain a minor amount of green.",
+ " //",
+ " // 1 = On.",
+ " // 0 = Off.",
+ " //",
+ " #define FXAA_GREEN_AS_LUMA 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_EARLY_EXIT",
+ " //",
+ " // Controls algorithm's early exit path.",
+ " // On PS3 turning this ON adds 2 cycles to the shader.",
+ " // On 360 turning this OFF adds 10ths of a millisecond to the shader.",
+ " // Turning this off on console will result in a more blurry image.",
+ " // So this defaults to on.",
+ " //",
+ " // 1 = On.",
+ " // 0 = Off.",
+ " //",
+ " #define FXAA_EARLY_EXIT 1",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_DISCARD",
+ " //",
+ " // Only valid for PC OpenGL currently.",
+ " // Probably will not work when FXAA_GREEN_AS_LUMA = 1.",
+ " //",
+ " // 1 = Use discard on pixels which don't need AA.",
+ " // For APIs which enable concurrent TEX+ROP from same surface.",
+ " // 0 = Return unchanged color on pixels which don't need AA.",
+ " //",
+ " #define FXAA_DISCARD 0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_FAST_PIXEL_OFFSET",
+ " //",
+ " // Used for GLSL 120 only.",
+ " //",
+ " // 1 = GL API supports fast pixel offsets",
+ " // 0 = do not use fast pixel offsets",
+ " //",
+ " #ifdef GL_EXT_gpu_shader4",
+ " #define FXAA_FAST_PIXEL_OFFSET 1",
+ " #endif",
+ " #ifdef GL_NV_gpu_shader5",
+ " #define FXAA_FAST_PIXEL_OFFSET 1",
+ " #endif",
+ " #ifdef GL_ARB_gpu_shader5",
+ " #define FXAA_FAST_PIXEL_OFFSET 1",
+ " #endif",
+ " #ifndef FXAA_FAST_PIXEL_OFFSET",
+ " #define FXAA_FAST_PIXEL_OFFSET 0",
+ " #endif",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#ifndef FXAA_GATHER4_ALPHA",
+ " //",
+ " // 1 = API supports gather4 on alpha channel.",
+ " // 0 = API does not support gather4 on alpha channel.",
+ " //",
+ " #if (FXAA_HLSL_5 == 1)",
+ " #define FXAA_GATHER4_ALPHA 1",
+ " #endif",
+ " #ifdef GL_ARB_gpu_shader5",
+ " #define FXAA_GATHER4_ALPHA 1",
+ " #endif",
+ " #ifdef GL_NV_gpu_shader5",
+ " #define FXAA_GATHER4_ALPHA 1",
+ " #endif",
+ " #ifndef FXAA_GATHER4_ALPHA",
+ " #define FXAA_GATHER4_ALPHA 0",
+ " #endif",
+ "#endif",
+ "",
+ "",
+ "/*============================================================================",
+ " FXAA QUALITY - TUNING KNOBS",
+ "------------------------------------------------------------------------------",
+ "NOTE the other tuning knobs are now in the shader function inputs!",
+ "============================================================================*/",
+ "#ifndef FXAA_QUALITY_PRESET",
+ " //",
+ " // Choose the quality preset.",
+ " // This needs to be compiled into the shader as it effects code.",
+ " // Best option to include multiple presets is to",
+ " // in each shader define the preset, then include this file.",
+ " //",
+ " // OPTIONS",
+ " // -----------------------------------------------------------------------",
+ " // 10 to 15 - default medium dither (10=fastest, 15=highest quality)",
+ " // 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)",
+ " // 39 - no dither, very expensive",
+ " //",
+ " // NOTES",
+ " // -----------------------------------------------------------------------",
+ " // 12 = slightly faster then FXAA 3.9 and higher edge quality (default)",
+ " // 13 = about same speed as FXAA 3.9 and better than 12",
+ " // 23 = closest to FXAA 3.9 visually and performance wise",
+ " // _ = the lowest digit is directly related to performance",
+ " // _ = the highest digit is directly related to style",
+ " //",
+ " #define FXAA_QUALITY_PRESET 12",
+ "#endif",
+ "",
+ "",
+ "/*============================================================================",
+ "",
+ " FXAA QUALITY - PRESETS",
+ "",
+ "============================================================================*/",
+ "",
+ "/*============================================================================",
+ " FXAA QUALITY - MEDIUM DITHER PRESETS",
+ "============================================================================*/",
+ "#if (FXAA_QUALITY_PRESET == 10)",
+ " #define FXAA_QUALITY_PS 3",
+ " #define FXAA_QUALITY_P0 1.5",
+ " #define FXAA_QUALITY_P1 3.0",
+ " #define FXAA_QUALITY_P2 12.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 11)",
+ " #define FXAA_QUALITY_PS 4",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 3.0",
+ " #define FXAA_QUALITY_P3 12.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 12)",
+ " #define FXAA_QUALITY_PS 5",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 4.0",
+ " #define FXAA_QUALITY_P4 12.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 13)",
+ " #define FXAA_QUALITY_PS 6",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 4.0",
+ " #define FXAA_QUALITY_P5 12.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 14)",
+ " #define FXAA_QUALITY_PS 7",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 4.0",
+ " #define FXAA_QUALITY_P6 12.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 15)",
+ " #define FXAA_QUALITY_PS 8",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 2.0",
+ " #define FXAA_QUALITY_P6 4.0",
+ " #define FXAA_QUALITY_P7 12.0",
+ "#endif",
+ "",
+ "/*============================================================================",
+ " FXAA QUALITY - LOW DITHER PRESETS",
+ "============================================================================*/",
+ "#if (FXAA_QUALITY_PRESET == 20)",
+ " #define FXAA_QUALITY_PS 3",
+ " #define FXAA_QUALITY_P0 1.5",
+ " #define FXAA_QUALITY_P1 2.0",
+ " #define FXAA_QUALITY_P2 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 21)",
+ " #define FXAA_QUALITY_PS 4",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 22)",
+ " #define FXAA_QUALITY_PS 5",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 23)",
+ " #define FXAA_QUALITY_PS 6",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 24)",
+ " #define FXAA_QUALITY_PS 7",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 3.0",
+ " #define FXAA_QUALITY_P6 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 25)",
+ " #define FXAA_QUALITY_PS 8",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 2.0",
+ " #define FXAA_QUALITY_P6 4.0",
+ " #define FXAA_QUALITY_P7 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 26)",
+ " #define FXAA_QUALITY_PS 9",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 2.0",
+ " #define FXAA_QUALITY_P6 2.0",
+ " #define FXAA_QUALITY_P7 4.0",
+ " #define FXAA_QUALITY_P8 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 27)",
+ " #define FXAA_QUALITY_PS 10",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 2.0",
+ " #define FXAA_QUALITY_P6 2.0",
+ " #define FXAA_QUALITY_P7 2.0",
+ " #define FXAA_QUALITY_P8 4.0",
+ " #define FXAA_QUALITY_P9 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 28)",
+ " #define FXAA_QUALITY_PS 11",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 2.0",
+ " #define FXAA_QUALITY_P6 2.0",
+ " #define FXAA_QUALITY_P7 2.0",
+ " #define FXAA_QUALITY_P8 2.0",
+ " #define FXAA_QUALITY_P9 4.0",
+ " #define FXAA_QUALITY_P10 8.0",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_QUALITY_PRESET == 29)",
+ " #define FXAA_QUALITY_PS 12",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.5",
+ " #define FXAA_QUALITY_P2 2.0",
+ " #define FXAA_QUALITY_P3 2.0",
+ " #define FXAA_QUALITY_P4 2.0",
+ " #define FXAA_QUALITY_P5 2.0",
+ " #define FXAA_QUALITY_P6 2.0",
+ " #define FXAA_QUALITY_P7 2.0",
+ " #define FXAA_QUALITY_P8 2.0",
+ " #define FXAA_QUALITY_P9 2.0",
+ " #define FXAA_QUALITY_P10 4.0",
+ " #define FXAA_QUALITY_P11 8.0",
+ "#endif",
+ "",
+ "/*============================================================================",
+ " FXAA QUALITY - EXTREME QUALITY",
+ "============================================================================*/",
+ "#if (FXAA_QUALITY_PRESET == 39)",
+ " #define FXAA_QUALITY_PS 12",
+ " #define FXAA_QUALITY_P0 1.0",
+ " #define FXAA_QUALITY_P1 1.0",
+ " #define FXAA_QUALITY_P2 1.0",
+ " #define FXAA_QUALITY_P3 1.0",
+ " #define FXAA_QUALITY_P4 1.0",
+ " #define FXAA_QUALITY_P5 1.5",
+ " #define FXAA_QUALITY_P6 2.0",
+ " #define FXAA_QUALITY_P7 2.0",
+ " #define FXAA_QUALITY_P8 2.0",
+ " #define FXAA_QUALITY_P9 2.0",
+ " #define FXAA_QUALITY_P10 4.0",
+ " #define FXAA_QUALITY_P11 8.0",
+ "#endif",
+ "",
+ "",
+ "",
+ "/*============================================================================",
+ "",
+ " API PORTING",
+ "",
+ "============================================================================*/",
+ "#if (FXAA_GLSL_100 == 1) || (FXAA_GLSL_120 == 1) || (FXAA_GLSL_130 == 1)",
+ " #define FxaaBool bool",
+ " #define FxaaDiscard discard",
+ " #define FxaaFloat float",
+ " #define FxaaFloat2 vec2",
+ " #define FxaaFloat3 vec3",
+ " #define FxaaFloat4 vec4",
+ " #define FxaaHalf float",
+ " #define FxaaHalf2 vec2",
+ " #define FxaaHalf3 vec3",
+ " #define FxaaHalf4 vec4",
+ " #define FxaaInt2 ivec2",
+ " #define FxaaSat(x) clamp(x, 0.0, 1.0)",
+ " #define FxaaTex sampler2D",
+ "#else",
+ " #define FxaaBool bool",
+ " #define FxaaDiscard clip(-1)",
+ " #define FxaaFloat float",
+ " #define FxaaFloat2 float2",
+ " #define FxaaFloat3 float3",
+ " #define FxaaFloat4 float4",
+ " #define FxaaHalf half",
+ " #define FxaaHalf2 half2",
+ " #define FxaaHalf3 half3",
+ " #define FxaaHalf4 half4",
+ " #define FxaaSat(x) saturate(x)",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_GLSL_100 == 1)",
+ " #define FxaaTexTop(t, p) texture2D(t, p, 0.0)",
+ " #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r), 0.0)",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_GLSL_120 == 1)",
+ " // Requires,",
+ " // #version 120",
+ " // And at least,",
+ " // #extension GL_EXT_gpu_shader4 : enable",
+ " // (or set FXAA_FAST_PIXEL_OFFSET 1 to work like DX9)",
+ " #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)",
+ " #if (FXAA_FAST_PIXEL_OFFSET == 1)",
+ " #define FxaaTexOff(t, p, o, r) texture2DLodOffset(t, p, 0.0, o)",
+ " #else",
+ " #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)",
+ " #endif",
+ " #if (FXAA_GATHER4_ALPHA == 1)",
+ " // use #extension GL_ARB_gpu_shader5 : enable",
+ " #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)",
+ " #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)",
+ " #define FxaaTexGreen4(t, p) textureGather(t, p, 1)",
+ " #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)",
+ " #endif",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_GLSL_130 == 1)",
+ ' // Requires "#version 130" or better',
+ " #define FxaaTexTop(t, p) textureLod(t, p, 0.0)",
+ " #define FxaaTexOff(t, p, o, r) textureLodOffset(t, p, 0.0, o)",
+ " #if (FXAA_GATHER4_ALPHA == 1)",
+ " // use #extension GL_ARB_gpu_shader5 : enable",
+ " #define FxaaTexAlpha4(t, p) textureGather(t, p, 3)",
+ " #define FxaaTexOffAlpha4(t, p, o) textureGatherOffset(t, p, o, 3)",
+ " #define FxaaTexGreen4(t, p) textureGather(t, p, 1)",
+ " #define FxaaTexOffGreen4(t, p, o) textureGatherOffset(t, p, o, 1)",
+ " #endif",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_HLSL_3 == 1)",
+ " #define FxaaInt2 float2",
+ " #define FxaaTex sampler2D",
+ " #define FxaaTexTop(t, p) tex2Dlod(t, float4(p, 0.0, 0.0))",
+ " #define FxaaTexOff(t, p, o, r) tex2Dlod(t, float4(p + (o * r), 0, 0))",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_HLSL_4 == 1)",
+ " #define FxaaInt2 int2",
+ " struct FxaaTex { SamplerState smpl; Texture2D tex; };",
+ " #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)",
+ " #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)",
+ "#endif",
+ "/*--------------------------------------------------------------------------*/",
+ "#if (FXAA_HLSL_5 == 1)",
+ " #define FxaaInt2 int2",
+ " struct FxaaTex { SamplerState smpl; Texture2D tex; };",
+ " #define FxaaTexTop(t, p) t.tex.SampleLevel(t.smpl, p, 0.0)",
+ " #define FxaaTexOff(t, p, o, r) t.tex.SampleLevel(t.smpl, p, 0.0, o)",
+ " #define FxaaTexAlpha4(t, p) t.tex.GatherAlpha(t.smpl, p)",
+ " #define FxaaTexOffAlpha4(t, p, o) t.tex.GatherAlpha(t.smpl, p, o)",
+ " #define FxaaTexGreen4(t, p) t.tex.GatherGreen(t.smpl, p)",
+ " #define FxaaTexOffGreen4(t, p, o) t.tex.GatherGreen(t.smpl, p, o)",
+ "#endif",
+ "",
+ "",
+ "/*============================================================================",
+ " GREEN AS LUMA OPTION SUPPORT FUNCTION",
+ "============================================================================*/",
+ "#if (FXAA_GREEN_AS_LUMA == 0)",
+ " FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.w; }",
+ "#else",
+ " FxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }",
+ "#endif",
+ "",
+ "",
+ "",
+ "",
+ "/*============================================================================",
+ "",
+ " FXAA3 QUALITY - PC",
+ "",
+ "============================================================================*/",
+ "#if (FXAA_PC == 1)",
+ "/*--------------------------------------------------------------------------*/",
+ "FxaaFloat4 FxaaPixelShader(",
+ " //",
+ " // Use noperspective interpolation here (turn off perspective interpolation).",
+ " // {xy} = center of pixel",
+ " FxaaFloat2 pos,",
+ " //",
+ " // Used only for FXAA Console, and not used on the 360 version.",
+ " // Use noperspective interpolation here (turn off perspective interpolation).",
+ " // {xy_} = upper left of pixel",
+ " // {_zw} = lower right of pixel",
+ " FxaaFloat4 fxaaConsolePosPos,",
+ " //",
+ " // Input color texture.",
+ " // {rgb_} = color in linear or perceptual color space",
+ " // if (FXAA_GREEN_AS_LUMA == 0)",
+ " // {__a} = luma in perceptual color space (not linear)",
+ " FxaaTex tex,",
+ " //",
+ " // Only used on the optimized 360 version of FXAA Console.",
+ ' // For everything but 360, just use the same input here as for "tex".',
+ " // For 360, same texture, just alias with a 2nd sampler.",
+ " // This sampler needs to have an exponent bias of -1.",
+ " FxaaTex fxaaConsole360TexExpBiasNegOne,",
+ " //",
+ " // Only used on the optimized 360 version of FXAA Console.",
+ ' // For everything but 360, just use the same input here as for "tex".',
+ " // For 360, same texture, just alias with a 3nd sampler.",
+ " // This sampler needs to have an exponent bias of -2.",
+ " FxaaTex fxaaConsole360TexExpBiasNegTwo,",
+ " //",
+ " // Only used on FXAA Quality.",
+ " // This must be from a constant/uniform.",
+ " // {x_} = 1.0/screenWidthInPixels",
+ " // {_y} = 1.0/screenHeightInPixels",
+ " FxaaFloat2 fxaaQualityRcpFrame,",
+ " //",
+ " // Only used on FXAA Console.",
+ " // This must be from a constant/uniform.",
+ " // This effects sub-pixel AA quality and inversely sharpness.",
+ " // Where N ranges between,",
+ " // N = 0.50 (default)",
+ " // N = 0.33 (sharper)",
+ " // {x__} = -N/screenWidthInPixels",
+ " // {_y_} = -N/screenHeightInPixels",
+ " // {_z_} = N/screenWidthInPixels",
+ " // {__w} = N/screenHeightInPixels",
+ " FxaaFloat4 fxaaConsoleRcpFrameOpt,",
+ " //",
+ " // Only used on FXAA Console.",
+ " // Not used on 360, but used on PS3 and PC.",
+ " // This must be from a constant/uniform.",
+ " // {x__} = -2.0/screenWidthInPixels",
+ " // {_y_} = -2.0/screenHeightInPixels",
+ " // {_z_} = 2.0/screenWidthInPixels",
+ " // {__w} = 2.0/screenHeightInPixels",
+ " FxaaFloat4 fxaaConsoleRcpFrameOpt2,",
+ " //",
+ " // Only used on FXAA Console.",
+ " // Only used on 360 in place of fxaaConsoleRcpFrameOpt2.",
+ " // This must be from a constant/uniform.",
+ " // {x__} = 8.0/screenWidthInPixels",
+ " // {_y_} = 8.0/screenHeightInPixels",
+ " // {_z_} = -4.0/screenWidthInPixels",
+ " // {__w} = -4.0/screenHeightInPixels",
+ " FxaaFloat4 fxaaConsole360RcpFrameOpt2,",
+ " //",
+ " // Only used on FXAA Quality.",
+ " // This used to be the FXAA_QUALITY_SUBPIX define.",
+ " // It is here now to allow easier tuning.",
+ " // Choose the amount of sub-pixel aliasing removal.",
+ " // This can effect sharpness.",
+ " // 1.00 - upper limit (softer)",
+ " // 0.75 - default amount of filtering",
+ " // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)",
+ " // 0.25 - almost off",
+ " // 0.00 - completely off",
+ " FxaaFloat fxaaQualitySubpix,",
+ " //",
+ " // Only used on FXAA Quality.",
+ " // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.",
+ " // It is here now to allow easier tuning.",
+ " // The minimum amount of local contrast required to apply algorithm.",
+ " // 0.333 - too little (faster)",
+ " // 0.250 - low quality",
+ " // 0.166 - default",
+ " // 0.125 - high quality",
+ " // 0.063 - overkill (slower)",
+ " FxaaFloat fxaaQualityEdgeThreshold,",
+ " //",
+ " // Only used on FXAA Quality.",
+ " // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.",
+ " // It is here now to allow easier tuning.",
+ " // Trims the algorithm from processing darks.",
+ " // 0.0833 - upper limit (default, the start of visible unfiltered edges)",
+ " // 0.0625 - high quality (faster)",
+ " // 0.0312 - visible limit (slower)",
+ " // Special notes when using FXAA_GREEN_AS_LUMA,",
+ " // Likely want to set this to zero.",
+ " // As colors that are mostly not-green",
+ " // will appear very dark in the green channel!",
+ " // Tune by looking at mostly non-green content,",
+ " // then start at zero and increase until aliasing is a problem.",
+ " FxaaFloat fxaaQualityEdgeThresholdMin,",
+ " //",
+ " // Only used on FXAA Console.",
+ " // This used to be the FXAA_CONSOLE_EDGE_SHARPNESS define.",
+ " // It is here now to allow easier tuning.",
+ " // This does not effect PS3, as this needs to be compiled in.",
+ " // Use FXAA_CONSOLE_PS3_EDGE_SHARPNESS for PS3.",
+ " // Due to the PS3 being ALU bound,",
+ " // there are only three safe values here: 2 and 4 and 8.",
+ " // These options use the shaders ability to a free *|/ by 2|4|8.",
+ " // For all other platforms can be a non-power of two.",
+ " // 8.0 is sharper (default!!!)",
+ " // 4.0 is softer",
+ " // 2.0 is really soft (good only for vector graphics inputs)",
+ " FxaaFloat fxaaConsoleEdgeSharpness,",
+ " //",
+ " // Only used on FXAA Console.",
+ " // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD define.",
+ " // It is here now to allow easier tuning.",
+ " // This does not effect PS3, as this needs to be compiled in.",
+ " // Use FXAA_CONSOLE_PS3_EDGE_THRESHOLD for PS3.",
+ " // Due to the PS3 being ALU bound,",
+ " // there are only two safe values here: 1/4 and 1/8.",
+ " // These options use the shaders ability to a free *|/ by 2|4|8.",
+ " // The console setting has a different mapping than the quality setting.",
+ " // Other platforms can use other values.",
+ " // 0.125 leaves less aliasing, but is softer (default!!!)",
+ " // 0.25 leaves more aliasing, and is sharper",
+ " FxaaFloat fxaaConsoleEdgeThreshold,",
+ " //",
+ " // Only used on FXAA Console.",
+ " // This used to be the FXAA_CONSOLE_EDGE_THRESHOLD_MIN define.",
+ " // It is here now to allow easier tuning.",
+ " // Trims the algorithm from processing darks.",
+ " // The console setting has a different mapping than the quality setting.",
+ " // This only applies when FXAA_EARLY_EXIT is 1.",
+ " // This does not apply to PS3,",
+ " // PS3 was simplified to avoid more shader instructions.",
+ " // 0.06 - faster but more aliasing in darks",
+ " // 0.05 - default",
+ " // 0.04 - slower and less aliasing in darks",
+ " // Special notes when using FXAA_GREEN_AS_LUMA,",
+ " // Likely want to set this to zero.",
+ " // As colors that are mostly not-green",
+ " // will appear very dark in the green channel!",
+ " // Tune by looking at mostly non-green content,",
+ " // then start at zero and increase until aliasing is a problem.",
+ " FxaaFloat fxaaConsoleEdgeThresholdMin,",
+ " //",
+ " // Extra constants for 360 FXAA Console only.",
+ " // Use zeros or anything else for other platforms.",
+ " // These must be in physical constant registers and NOT immediates.",
+ " // Immediates will result in compiler un-optimizing.",
+ " // {xyzw} = float4(1.0, -1.0, 0.25, -0.25)",
+ " FxaaFloat4 fxaaConsole360ConstDir",
+ ") {",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat2 posM;",
+ " posM.x = pos.x;",
+ " posM.y = pos.y;",
+ " #if (FXAA_GATHER4_ALPHA == 1)",
+ " #if (FXAA_DISCARD == 0)",
+ " FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);",
+ " #if (FXAA_GREEN_AS_LUMA == 0)",
+ " #define lumaM rgbyM.w",
+ " #else",
+ " #define lumaM rgbyM.y",
+ " #endif",
+ " #endif",
+ " #if (FXAA_GREEN_AS_LUMA == 0)",
+ " FxaaFloat4 luma4A = FxaaTexAlpha4(tex, posM);",
+ " FxaaFloat4 luma4B = FxaaTexOffAlpha4(tex, posM, FxaaInt2(-1, -1));",
+ " #else",
+ " FxaaFloat4 luma4A = FxaaTexGreen4(tex, posM);",
+ " FxaaFloat4 luma4B = FxaaTexOffGreen4(tex, posM, FxaaInt2(-1, -1));",
+ " #endif",
+ " #if (FXAA_DISCARD == 1)",
+ " #define lumaM luma4A.w",
+ " #endif",
+ " #define lumaE luma4A.z",
+ " #define lumaS luma4A.x",
+ " #define lumaSE luma4A.y",
+ " #define lumaNW luma4B.w",
+ " #define lumaN luma4B.z",
+ " #define lumaW luma4B.x",
+ " #else",
+ " FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);",
+ " #if (FXAA_GREEN_AS_LUMA == 0)",
+ " #define lumaM rgbyM.w",
+ " #else",
+ " #define lumaM rgbyM.y",
+ " #endif",
+ " #if (FXAA_GLSL_100 == 1)",
+ " FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0, 1.0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 0.0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 0.0,-1.0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 0.0), fxaaQualityRcpFrame.xy));",
+ " #else",
+ " FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));",
+ " #endif",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat maxSM = max(lumaS, lumaM);",
+ " FxaaFloat minSM = min(lumaS, lumaM);",
+ " FxaaFloat maxESM = max(lumaE, maxSM);",
+ " FxaaFloat minESM = min(lumaE, minSM);",
+ " FxaaFloat maxWN = max(lumaN, lumaW);",
+ " FxaaFloat minWN = min(lumaN, lumaW);",
+ " FxaaFloat rangeMax = max(maxWN, maxESM);",
+ " FxaaFloat rangeMin = min(minWN, minESM);",
+ " FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;",
+ " FxaaFloat range = rangeMax - rangeMin;",
+ " FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);",
+ " FxaaBool earlyExit = range < rangeMaxClamped;",
+ "/*--------------------------------------------------------------------------*/",
+ " if(earlyExit)",
+ " #if (FXAA_DISCARD == 1)",
+ " FxaaDiscard;",
+ " #else",
+ " return rgbyM;",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_GATHER4_ALPHA == 0)",
+ " #if (FXAA_GLSL_100 == 1)",
+ " FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0,-1.0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0, 1.0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2( 1.0,-1.0), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaFloat2(-1.0, 1.0), fxaaQualityRcpFrame.xy));",
+ " #else",
+ " FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));",
+ " #endif",
+ " #else",
+ " FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(1, -1), fxaaQualityRcpFrame.xy));",
+ " FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat lumaNS = lumaN + lumaS;",
+ " FxaaFloat lumaWE = lumaW + lumaE;",
+ " FxaaFloat subpixRcpRange = 1.0/range;",
+ " FxaaFloat subpixNSWE = lumaNS + lumaWE;",
+ " FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;",
+ " FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat lumaNESE = lumaNE + lumaSE;",
+ " FxaaFloat lumaNWNE = lumaNW + lumaNE;",
+ " FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;",
+ " FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat lumaNWSW = lumaNW + lumaSW;",
+ " FxaaFloat lumaSWSE = lumaSW + lumaSE;",
+ " FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);",
+ " FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);",
+ " FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;",
+ " FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;",
+ " FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;",
+ " FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;",
+ " FxaaFloat lengthSign = fxaaQualityRcpFrame.x;",
+ " FxaaBool horzSpan = edgeHorz >= edgeVert;",
+ " FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;",
+ "/*--------------------------------------------------------------------------*/",
+ " if(!horzSpan) lumaN = lumaW;",
+ " if(!horzSpan) lumaS = lumaE;",
+ " if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;",
+ " FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat gradientN = lumaN - lumaM;",
+ " FxaaFloat gradientS = lumaS - lumaM;",
+ " FxaaFloat lumaNN = lumaN + lumaM;",
+ " FxaaFloat lumaSS = lumaS + lumaM;",
+ " FxaaBool pairN = abs(gradientN) >= abs(gradientS);",
+ " FxaaFloat gradient = max(abs(gradientN), abs(gradientS));",
+ " if(pairN) lengthSign = -lengthSign;",
+ " FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat2 posB;",
+ " posB.x = posM.x;",
+ " posB.y = posM.y;",
+ " FxaaFloat2 offNP;",
+ " offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;",
+ " offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;",
+ " if(!horzSpan) posB.x += lengthSign * 0.5;",
+ " if( horzSpan) posB.y += lengthSign * 0.5;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat2 posN;",
+ " posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;",
+ " posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;",
+ " FxaaFloat2 posP;",
+ " posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;",
+ " posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;",
+ " FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;",
+ " FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));",
+ " FxaaFloat subpixE = subpixC * subpixC;",
+ " FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));",
+ "/*--------------------------------------------------------------------------*/",
+ " if(!pairN) lumaNN = lumaSS;",
+ " FxaaFloat gradientScaled = gradient * 1.0/4.0;",
+ " FxaaFloat lumaMM = lumaM - lumaNN * 0.5;",
+ " FxaaFloat subpixF = subpixD * subpixE;",
+ " FxaaBool lumaMLTZero = lumaMM < 0.0;",
+ "/*--------------------------------------------------------------------------*/",
+ " lumaEndN -= lumaNN * 0.5;",
+ " lumaEndP -= lumaNN * 0.5;",
+ " FxaaBool doneN = abs(lumaEndN) >= gradientScaled;",
+ " FxaaBool doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;",
+ " FxaaBool doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;",
+ "/*--------------------------------------------------------------------------*/",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 3)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 4)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 5)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 6)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 7)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 8)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 9)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 10)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 11)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;",
+ "/*--------------------------------------------------------------------------*/",
+ " #if (FXAA_QUALITY_PS > 12)",
+ " if(doneNP) {",
+ " if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));",
+ " if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));",
+ " if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;",
+ " if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;",
+ " doneN = abs(lumaEndN) >= gradientScaled;",
+ " doneP = abs(lumaEndP) >= gradientScaled;",
+ " if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;",
+ " if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;",
+ " doneNP = (!doneN) || (!doneP);",
+ " if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;",
+ " if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ " #endif",
+ "/*--------------------------------------------------------------------------*/",
+ " }",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat dstN = posM.x - posN.x;",
+ " FxaaFloat dstP = posP.x - posM.x;",
+ " if(!horzSpan) dstN = posM.y - posN.y;",
+ " if(!horzSpan) dstP = posP.y - posM.y;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;",
+ " FxaaFloat spanLength = (dstP + dstN);",
+ " FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;",
+ " FxaaFloat spanLengthRcp = 1.0/spanLength;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaBool directionN = dstN < dstP;",
+ " FxaaFloat dst = min(dstN, dstP);",
+ " FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;",
+ " FxaaFloat subpixG = subpixF * subpixF;",
+ " FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;",
+ " FxaaFloat subpixH = subpixG * fxaaQualitySubpix;",
+ "/*--------------------------------------------------------------------------*/",
+ " FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;",
+ " FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);",
+ " if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;",
+ " if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;",
+ " #if (FXAA_DISCARD == 1)",
+ " return FxaaTexTop(tex, posM);",
+ " #else",
+ " return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);",
+ " #endif",
+ "}",
+ "/*==========================================================================*/",
+ "#endif",
+ "",
+ "void main() {",
+ " gl_FragColor = FxaaPixelShader(",
+ " vUv,",
+ " vec4(0.0),",
+ " tDiffuse,",
+ " tDiffuse,",
+ " tDiffuse,",
+ " resolution,",
+ " vec4(0.0),",
+ " vec4(0.0),",
+ " vec4(0.0),",
+ " 0.75,",
+ " 0.166,",
+ " 0.0833,",
+ " 0.0,",
+ " 0.0,",
+ " 0.0,",
+ " vec4(0.0)",
+ " );",
+ "",
+ " // TODO avoid querying texture twice for same texel",
+ " gl_FragColor.a = texture2D(tDiffuse, vUv).a;",
+ "}",
+ ].join("\n"),
+ },
+ cu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ screenWidth: { value: 1024 },
+ screenHeight: { value: 1024 },
+ sampleDistance: { value: 0.94 },
+ waveFactor: { value: 0.00125 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float screenWidth;",
+ "uniform float screenHeight;",
+ "uniform float sampleDistance;",
+ "uniform float waveFactor;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 color, org, tmp, add;",
+ "\tfloat sample_dist, f;",
+ "\tvec2 vin;",
+ "\tvec2 uv = vUv;",
+ "\tadd = color = org = texture2D( tDiffuse, uv );",
+ "\tvin = ( uv - vec2( 0.5 ) ) * vec2( 1.4 );",
+ "\tsample_dist = dot( vin, vin ) * 2.0;",
+ "\tf = ( waveFactor * 100.0 + sample_dist ) * sampleDistance * 4.0;",
+ "\tvec2 sampleSize = vec2( 1.0 / screenWidth, 1.0 / screenHeight ) * vec2( f );",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.111964, 0.993712 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.846724, 0.532032 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.943883, -0.330279 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( 0.330279, -0.943883 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.532032, -0.846724 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.993712, -0.111964 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tadd += tmp = texture2D( tDiffuse, uv + vec2( -0.707107, 0.707107 ) * sampleSize );",
+ "\tif( tmp.b < color.b ) color = tmp;",
+ "\tcolor = color * vec4( 2.0 ) - ( add / vec4( 8.0 ) );",
+ "\tcolor = color + ( add / vec4( 8.0 ) - color ) * ( vec4( 1.0 ) - vec4( sample_dist * 0.5 ) );",
+ "\tgl_FragColor = vec4( color.rgb * color.rgb * vec3( 0.95 ) + color.rgb, 1.0 );",
+ "}",
+ ].join("\n"),
+ },
+ fu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ aspect: { value: new A.Vector2(512, 512) },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "uniform vec2 aspect;",
+ "vec2 texel = vec2(1.0 / aspect.x, 1.0 / aspect.y);",
+ "mat3 G[9];",
+ "const mat3 g0 = mat3( 0.3535533845424652, 0, -0.3535533845424652, 0.5, 0, -0.5, 0.3535533845424652, 0, -0.3535533845424652 );",
+ "const mat3 g1 = mat3( 0.3535533845424652, 0.5, 0.3535533845424652, 0, 0, 0, -0.3535533845424652, -0.5, -0.3535533845424652 );",
+ "const mat3 g2 = mat3( 0, 0.3535533845424652, -0.5, -0.3535533845424652, 0, 0.3535533845424652, 0.5, -0.3535533845424652, 0 );",
+ "const mat3 g3 = mat3( 0.5, -0.3535533845424652, 0, -0.3535533845424652, 0, 0.3535533845424652, 0, 0.3535533845424652, -0.5 );",
+ "const mat3 g4 = mat3( 0, -0.5, 0, 0.5, 0, 0.5, 0, -0.5, 0 );",
+ "const mat3 g5 = mat3( -0.5, 0, 0.5, 0, 0, 0, 0.5, 0, -0.5 );",
+ "const mat3 g6 = mat3( 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.6666666865348816, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204 );",
+ "const mat3 g7 = mat3( -0.3333333432674408, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, 0.6666666865348816, 0.1666666716337204, -0.3333333432674408, 0.1666666716337204, -0.3333333432674408 );",
+ "const mat3 g8 = mat3( 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408, 0.3333333432674408 );",
+ "void main(void)",
+ "{",
+ "\tG[0] = g0,",
+ "\tG[1] = g1,",
+ "\tG[2] = g2,",
+ "\tG[3] = g3,",
+ "\tG[4] = g4,",
+ "\tG[5] = g5,",
+ "\tG[6] = g6,",
+ "\tG[7] = g7,",
+ "\tG[8] = g8;",
+ "\tmat3 I;",
+ "\tfloat cnv[9];",
+ "\tvec3 sample;",
+ "\tfor (float i=0.0; i<3.0; i++) {",
+ "\t\tfor (float j=0.0; j<3.0; j++) {",
+ "\t\t\tsample = texture2D(tDiffuse, vUv + texel * vec2(i-1.0,j-1.0) ).rgb;",
+ "\t\t\tI[int(i)][int(j)] = length(sample);",
+ "\t\t}",
+ "\t}",
+ "\tfor (int i=0; i<9; i++) {",
+ "\t\tfloat dp3 = dot(G[i][0], I[0]) + dot(G[i][1], I[1]) + dot(G[i][2], I[2]);",
+ "\t\tcnv[i] = dp3 * dp3;",
+ "\t}",
+ "\tfloat M = (cnv[0] + cnv[1]) + (cnv[2] + cnv[3]);",
+ "\tfloat S = (cnv[4] + cnv[5]) + (cnv[6] + cnv[7]) + (cnv[8] + M);",
+ "\tgl_FragColor = vec4(vec3(sqrt(M/S)), 1.0);",
+ "}",
+ ].join("\n"),
+ },
+ du = {
+ uniforms: {
+ mRefractionRatio: { value: 1.02 },
+ mFresnelBias: { value: 0.1 },
+ mFresnelPower: { value: 2 },
+ mFresnelScale: { value: 1 },
+ tCube: { value: null },
+ },
+ vertexShader: [
+ "uniform float mRefractionRatio;",
+ "uniform float mFresnelBias;",
+ "uniform float mFresnelScale;",
+ "uniform float mFresnelPower;",
+ "varying vec3 vReflect;",
+ "varying vec3 vRefract[3];",
+ "varying float vReflectionFactor;",
+ "void main() {",
+ "\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
+ "\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );",
+ "\tvec3 worldNormal = normalize( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );",
+ "\tvec3 I = worldPosition.xyz - cameraPosition;",
+ "\tvReflect = reflect( I, worldNormal );",
+ "\tvRefract[0] = refract( normalize( I ), worldNormal, mRefractionRatio );",
+ "\tvRefract[1] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.99 );",
+ "\tvRefract[2] = refract( normalize( I ), worldNormal, mRefractionRatio * 0.98 );",
+ "\tvReflectionFactor = mFresnelBias + mFresnelScale * pow( 1.0 + dot( normalize( I ), worldNormal ), mFresnelPower );",
+ "\tgl_Position = projectionMatrix * mvPosition;",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform samplerCube tCube;",
+ "varying vec3 vReflect;",
+ "varying vec3 vRefract[3];",
+ "varying float vReflectionFactor;",
+ "void main() {",
+ "\tvec4 reflectedColor = textureCube( tCube, vec3( -vReflect.x, vReflect.yz ) );",
+ "\tvec4 refractedColor = vec4( 1.0 );",
+ "\trefractedColor.r = textureCube( tCube, vec3( -vRefract[0].x, vRefract[0].yz ) ).r;",
+ "\trefractedColor.g = textureCube( tCube, vec3( -vRefract[1].x, vRefract[1].yz ) ).g;",
+ "\trefractedColor.b = textureCube( tCube, vec3( -vRefract[2].x, vRefract[2].yz ) ).b;",
+ "\tgl_FragColor = mix( refractedColor, reflectedColor, clamp( vReflectionFactor, 0.0, 1.0 ) );",
+ "}",
+ ].join("\n"),
+ },
+ hu = {
+ uniforms: { tDiffuse: { value: null } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 tex = texture2D( tDiffuse, vUv );",
+ "\tgl_FragColor = LinearTosRGB( tex );",
+ "}",
+ ].join("\n"),
+ },
+ pu = {
+ uniforms: { tInput: { value: null } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ " vUv = uv;",
+ " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "varying vec2 vUv;",
+ "uniform sampler2D tInput;",
+ "void main() {",
+ "\tgl_FragColor = vec4( 1.0 ) - texture2D( tInput, vUv );",
+ "}",
+ ].join("\n"),
+ },
+ vu = {
+ uniforms: {
+ tInput: { value: null },
+ fStepSize: { value: 1 },
+ vSunPositionScreenSpace: { value: new A.Vector3() },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ " vUv = uv;",
+ " gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#define TAPS_PER_PASS 6.0",
+ "varying vec2 vUv;",
+ "uniform sampler2D tInput;",
+ "uniform vec3 vSunPositionScreenSpace;",
+ "uniform float fStepSize;",
+ "void main() {",
+ "\tvec2 delta = vSunPositionScreenSpace.xy - vUv;",
+ "\tfloat dist = length( delta );",
+ "\tvec2 stepv = fStepSize * delta / dist;",
+ "\tfloat iters = dist/fStepSize;",
+ "\tvec2 uv = vUv.xy;",
+ "\tfloat col = 0.0;",
+ "\tfloat f = min( 1.0, max( vSunPositionScreenSpace.z / 1000.0, 0.0 ) );",
+ "\tif ( 0.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
+ "\tuv += stepv;",
+ "\tif ( 1.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
+ "\tuv += stepv;",
+ "\tif ( 2.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
+ "\tuv += stepv;",
+ "\tif ( 3.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
+ "\tuv += stepv;",
+ "\tif ( 4.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
+ "\tuv += stepv;",
+ "\tif ( 5.0 <= iters && uv.y < 1.0 ) col += texture2D( tInput, uv ).r * f;",
+ "\tuv += stepv;",
+ "\tgl_FragColor = vec4( col/TAPS_PER_PASS );",
+ "\tgl_FragColor.a = 1.0;",
+ "}",
+ ].join("\n"),
+ },
+ mu = {
+ uniforms: {
+ tColors: { value: null },
+ tGodRays: { value: null },
+ fGodRayIntensity: { value: 0.69 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "varying vec2 vUv;",
+ "uniform sampler2D tColors;",
+ "uniform sampler2D tGodRays;",
+ "uniform float fGodRayIntensity;",
+ "void main() {",
+ "\tgl_FragColor = texture2D( tColors, vUv ) + fGodRayIntensity * vec4( 1.0 - texture2D( tGodRays, vUv ).r );",
+ "\tgl_FragColor.a = 1.0;",
+ "}",
+ ].join("\n"),
+ },
+ gu = {
+ uniforms: {
+ vSunPositionScreenSpace: { value: new A.Vector3() },
+ fAspect: { value: 1 },
+ sunColor: { value: new A.Color(16772608) },
+ bgColor: { value: new A.Color(0) },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "varying vec2 vUv;",
+ "uniform vec3 vSunPositionScreenSpace;",
+ "uniform float fAspect;",
+ "uniform vec3 sunColor;",
+ "uniform vec3 bgColor;",
+ "void main() {",
+ "\tvec2 diff = vUv - vSunPositionScreenSpace.xy;",
+ "\tdiff.x *= fAspect;",
+ "\tfloat prop = clamp( length( diff ) / 0.5, 0.0, 1.0 );",
+ "\tprop = 0.35 * pow( 1.0 - prop, 3.0 );",
+ "\tgl_FragColor.xyz = ( vSunPositionScreenSpace.z > 0.0 ) ? mix( sunColor, bgColor, 1.0 - prop ) : bgColor;",
+ "\tgl_FragColor.w = 1.0;",
+ "}",
+ ].join("\n"),
+ },
+ Au = {
+ uniforms: { tDiffuse: { value: null }, h: { value: 1 / 512 } },
+ vertexShader:
+ "\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",
+ fragmentShader:
+ "\n uniform sampler2D tDiffuse;\n uniform float h;\n\n varying vec2 vUv;\n\n void main() {\n\n \tvec4 sum = vec4( 0.0 );\n\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n \tgl_FragColor = sum;\n\n }\n ",
+ },
+ yu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ h: { value: 1 / 512 },
+ r: { value: 0.35 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float h;",
+ "uniform float r;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 sum = vec4( 0.0 );",
+ "\tfloat hh = h * abs( r - vUv.y );",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * hh, vUv.y ) ) * 0.051;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * hh, vUv.y ) ) * 0.0918;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * hh, vUv.y ) ) * 0.12245;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * hh, vUv.y ) ) * 0.1531;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * hh, vUv.y ) ) * 0.1531;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * hh, vUv.y ) ) * 0.12245;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * hh, vUv.y ) ) * 0.0918;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * hh, vUv.y ) ) * 0.051;",
+ "\tgl_FragColor = sum;",
+ "}",
+ ].join("\n"),
+ },
+ bu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ hue: { value: 0 },
+ saturation: { value: 0 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float hue;",
+ "uniform float saturation;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tgl_FragColor = texture2D( tDiffuse, vUv );",
+ "\tfloat angle = hue * 3.14159265;",
+ "\tfloat s = sin(angle), c = cos(angle);",
+ "\tvec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;",
+ "\tfloat len = length(gl_FragColor.rgb);",
+ "\tgl_FragColor.rgb = vec3(",
+ "\t\tdot(gl_FragColor.rgb, weights.xyz),",
+ "\t\tdot(gl_FragColor.rgb, weights.zxy),",
+ "\t\tdot(gl_FragColor.rgb, weights.yzx)",
+ "\t);",
+ "\tfloat average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;",
+ "\tif (saturation > 0.0) {",
+ "\t\tgl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - saturation));",
+ "\t} else {",
+ "\t\tgl_FragColor.rgb += (average - gl_FragColor.rgb) * (-saturation);",
+ "\t}",
+ "}",
+ ].join("\n"),
+ },
+ xu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ sides: { value: 6 },
+ angle: { value: 0 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float sides;",
+ "uniform float angle;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec2 p = vUv - 0.5;",
+ "\tfloat r = length(p);",
+ "\tfloat a = atan(p.y, p.x) + angle;",
+ "\tfloat tau = 2. * 3.1416 ;",
+ "\ta = mod(a, tau/sides);",
+ "\ta = abs(a - tau/sides/2.) ;",
+ "\tp = r * vec2(cos(a), sin(a));",
+ "\tvec4 color = texture2D(tDiffuse, p + 0.5);",
+ "\tgl_FragColor = color;",
+ "}",
+ ].join("\n"),
+ },
+ Su = {
+ uniforms: { tDiffuse: { value: null }, side: { value: 1 } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform int side;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec2 p = vUv;",
+ "\tif (side == 0){",
+ "\t\tif (p.x > 0.5) p.x = 1.0 - p.x;",
+ "\t}else if (side == 1){",
+ "\t\tif (p.x < 0.5) p.x = 1.0 - p.x;",
+ "\t}else if (side == 2){",
+ "\t\tif (p.y < 0.5) p.y = 1.0 - p.y;",
+ "\t}else if (side == 3){",
+ "\t\tif (p.y > 0.5) p.y = 1.0 - p.y;",
+ "\t} ",
+ "\tvec4 color = texture2D(tDiffuse, p);",
+ "\tgl_FragColor = color;",
+ "}",
+ ].join("\n"),
+ },
+ Eu = {
+ uniforms: {
+ heightMap: { value: null },
+ resolution: { value: new A.Vector2(512, 512) },
+ scale: { value: new A.Vector2(1, 1) },
+ height: { value: 0.05 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float height;",
+ "uniform vec2 resolution;",
+ "uniform sampler2D heightMap;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tfloat val = texture2D( heightMap, vUv ).x;",
+ "\tfloat valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;",
+ "\tfloat valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;",
+ "\tgl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height ) ) + 0.5 ), 1.0 );",
+ "}",
+ ].join("\n"),
+ },
+ _u = {
+ modes: {
+ none: "NO_PARALLAX",
+ basic: "USE_BASIC_PARALLAX",
+ steep: "USE_STEEP_PARALLAX",
+ occlusion: "USE_OCLUSION_PARALLAX",
+ relief: "USE_RELIEF_PARALLAX",
+ },
+ uniforms: {
+ bumpMap: { value: null },
+ map: { value: null },
+ parallaxScale: { value: null },
+ parallaxMinLayers: { value: null },
+ parallaxMaxLayers: { value: null },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "varying vec3 vViewPosition;",
+ "varying vec3 vNormal;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
+ "\tvViewPosition = -mvPosition.xyz;",
+ "\tvNormal = normalize( normalMatrix * normal );",
+ "\tgl_Position = projectionMatrix * mvPosition;",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D bumpMap;",
+ "uniform sampler2D map;",
+ "uniform float parallaxScale;",
+ "uniform float parallaxMinLayers;",
+ "uniform float parallaxMaxLayers;",
+ "varying vec2 vUv;",
+ "varying vec3 vViewPosition;",
+ "varying vec3 vNormal;",
+ "#ifdef USE_BASIC_PARALLAX",
+ "\tvec2 parallaxMap( in vec3 V ) {",
+ "\t\tfloat initialHeight = texture2D( bumpMap, vUv ).r;",
+ "\t\tvec2 texCoordOffset = parallaxScale * V.xy * initialHeight;",
+ "\t\treturn vUv - texCoordOffset;",
+ "\t}",
+ "#else",
+ "\tvec2 parallaxMap( in vec3 V ) {",
+ "\t\tfloat numLayers = mix( parallaxMaxLayers, parallaxMinLayers, abs( dot( vec3( 0.0, 0.0, 1.0 ), V ) ) );",
+ "\t\tfloat layerHeight = 1.0 / numLayers;",
+ "\t\tfloat currentLayerHeight = 0.0;",
+ "\t\tvec2 dtex = parallaxScale * V.xy / V.z / numLayers;",
+ "\t\tvec2 currentTextureCoords = vUv;",
+ "\t\tfloat heightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;",
+ "\t\tfor ( int i = 0; i < 30; i += 1 ) {",
+ "\t\t\tif ( heightFromTexture <= currentLayerHeight ) {",
+ "\t\t\t\tbreak;",
+ "\t\t\t}",
+ "\t\t\tcurrentLayerHeight += layerHeight;",
+ "\t\t\tcurrentTextureCoords -= dtex;",
+ "\t\t\theightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;",
+ "\t\t}",
+ "\t\t#ifdef USE_STEEP_PARALLAX",
+ "\t\t\treturn currentTextureCoords;",
+ "\t\t#elif defined( USE_RELIEF_PARALLAX )",
+ "\t\t\tvec2 deltaTexCoord = dtex / 2.0;",
+ "\t\t\tfloat deltaHeight = layerHeight / 2.0;",
+ "\t\t\tcurrentTextureCoords += deltaTexCoord;",
+ "\t\t\tcurrentLayerHeight -= deltaHeight;",
+ "\t\t\tconst int numSearches = 5;",
+ "\t\t\tfor ( int i = 0; i < numSearches; i += 1 ) {",
+ "\t\t\t\tdeltaTexCoord /= 2.0;",
+ "\t\t\t\tdeltaHeight /= 2.0;",
+ "\t\t\t\theightFromTexture = texture2D( bumpMap, currentTextureCoords ).r;",
+ "\t\t\t\tif( heightFromTexture > currentLayerHeight ) {",
+ "\t\t\t\t\tcurrentTextureCoords -= deltaTexCoord;",
+ "\t\t\t\t\tcurrentLayerHeight += deltaHeight;",
+ "\t\t\t\t} else {",
+ "\t\t\t\t\tcurrentTextureCoords += deltaTexCoord;",
+ "\t\t\t\t\tcurrentLayerHeight -= deltaHeight;",
+ "\t\t\t\t}",
+ "\t\t\t}",
+ "\t\t\treturn currentTextureCoords;",
+ "\t\t#elif defined( USE_OCLUSION_PARALLAX )",
+ "\t\t\tvec2 prevTCoords = currentTextureCoords + dtex;",
+ "\t\t\tfloat nextH = heightFromTexture - currentLayerHeight;",
+ "\t\t\tfloat prevH = texture2D( bumpMap, prevTCoords ).r - currentLayerHeight + layerHeight;",
+ "\t\t\tfloat weight = nextH / ( nextH - prevH );",
+ "\t\t\treturn prevTCoords * weight + currentTextureCoords * ( 1.0 - weight );",
+ "\t\t#else",
+ "\t\t\treturn vUv;",
+ "\t\t#endif",
+ "\t}",
+ "#endif",
+ "vec2 perturbUv( vec3 surfPosition, vec3 surfNormal, vec3 viewPosition ) {",
+ "\tvec2 texDx = dFdx( vUv );",
+ "\tvec2 texDy = dFdy( vUv );",
+ "\tvec3 vSigmaX = dFdx( surfPosition );",
+ "\tvec3 vSigmaY = dFdy( surfPosition );",
+ "\tvec3 vR1 = cross( vSigmaY, surfNormal );",
+ "\tvec3 vR2 = cross( surfNormal, vSigmaX );",
+ "\tfloat fDet = dot( vSigmaX, vR1 );",
+ "\tvec2 vProjVscr = ( 1.0 / fDet ) * vec2( dot( vR1, viewPosition ), dot( vR2, viewPosition ) );",
+ "\tvec3 vProjVtex;",
+ "\tvProjVtex.xy = texDx * vProjVscr.x + texDy * vProjVscr.y;",
+ "\tvProjVtex.z = dot( surfNormal, viewPosition );",
+ "\treturn parallaxMap( vProjVtex );",
+ "}",
+ "void main() {",
+ "\tvec2 mapUv = perturbUv( -vViewPosition, normalize( vNormal ), normalize( vViewPosition ) );",
+ "\tgl_FragColor = texture2D( map, mapUv );",
+ "}",
+ ].join("\n"),
+ },
+ Cu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ resolution: { value: null },
+ pixelSize: { value: 1 },
+ },
+ vertexShader: [
+ "varying highp vec2 vUv;",
+ "void main() {",
+ "vUv = uv;",
+ "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float pixelSize;",
+ "uniform vec2 resolution;",
+ "varying highp vec2 vUv;",
+ "void main(){",
+ "vec2 dxy = pixelSize / resolution;",
+ "vec2 coord = dxy * floor( vUv / dxy );",
+ "gl_FragColor = texture2D(tDiffuse, coord);",
+ "}",
+ ].join("\n"),
+ },
+ wu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ amount: { value: 0.005 },
+ angle: { value: 0 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float amount;",
+ "uniform float angle;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec2 offset = amount * vec2( cos(angle), sin(angle));",
+ "\tvec4 cr = texture2D(tDiffuse, vUv + offset);",
+ "\tvec4 cga = texture2D(tDiffuse, vUv);",
+ "\tvec4 cb = texture2D(tDiffuse, vUv - offset);",
+ "\tgl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);",
+ "}",
+ ].join("\n"),
+ },
+ Tu = {
+ uniforms: { tDiffuse: { value: null }, amount: { value: 1 } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float amount;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 color = texture2D( tDiffuse, vUv );",
+ "\tvec3 c = color.rgb;",
+ "\tcolor.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );",
+ "\tcolor.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );",
+ "\tcolor.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );",
+ "\tgl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );",
+ "}",
+ ].join("\n"),
+ },
+ Mu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ resolution: { value: new A.Vector2() },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform vec2 resolution;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec2 texel = vec2( 1.0 / resolution.x, 1.0 / resolution.y );",
+ "\tconst mat3 Gx = mat3( -1, -2, -1, 0, 0, 0, 1, 2, 1 );",
+ "\tconst mat3 Gy = mat3( -1, 0, 1, -2, 0, 2, -1, 0, 1 );",
+ "\tfloat tx0y0 = texture2D( tDiffuse, vUv + texel * vec2( -1, -1 ) ).r;",
+ "\tfloat tx0y1 = texture2D( tDiffuse, vUv + texel * vec2( -1, 0 ) ).r;",
+ "\tfloat tx0y2 = texture2D( tDiffuse, vUv + texel * vec2( -1, 1 ) ).r;",
+ "\tfloat tx1y0 = texture2D( tDiffuse, vUv + texel * vec2( 0, -1 ) ).r;",
+ "\tfloat tx1y1 = texture2D( tDiffuse, vUv + texel * vec2( 0, 0 ) ).r;",
+ "\tfloat tx1y2 = texture2D( tDiffuse, vUv + texel * vec2( 0, 1 ) ).r;",
+ "\tfloat tx2y0 = texture2D( tDiffuse, vUv + texel * vec2( 1, -1 ) ).r;",
+ "\tfloat tx2y1 = texture2D( tDiffuse, vUv + texel * vec2( 1, 0 ) ).r;",
+ "\tfloat tx2y2 = texture2D( tDiffuse, vUv + texel * vec2( 1, 1 ) ).r;",
+ "\tfloat valueGx = Gx[0][0] * tx0y0 + Gx[1][0] * tx1y0 + Gx[2][0] * tx2y0 + ",
+ "\t\tGx[0][1] * tx0y1 + Gx[1][1] * tx1y1 + Gx[2][1] * tx2y1 + ",
+ "\t\tGx[0][2] * tx0y2 + Gx[1][2] * tx1y2 + Gx[2][2] * tx2y2; ",
+ "\tfloat valueGy = Gy[0][0] * tx0y0 + Gy[1][0] * tx1y0 + Gy[2][0] * tx2y0 + ",
+ "\t\tGy[0][1] * tx0y1 + Gy[1][1] * tx1y1 + Gy[2][1] * tx2y1 + ",
+ "\t\tGy[0][2] * tx0y2 + Gy[1][2] * tx1y2 + Gy[2][2] * tx2y2; ",
+ "\tfloat G = sqrt( ( valueGx * valueGx ) + ( valueGy * valueGy ) );",
+ "\tgl_FragColor = vec4( vec3( G ), 1 );",
+ "}",
+ ].join("\n"),
+ },
+ Iu;
+ function ku() {
+ if (Iu) return Iu;
+ var e = A.ShaderChunk.meshphong_frag.slice(
+ 0,
+ A.ShaderChunk.meshphong_frag.indexOf("void main() {")
+ ),
+ t = A.ShaderChunk.meshphong_frag.slice(
+ A.ShaderChunk.meshphong_frag.indexOf("void main() {")
+ );
+ return (Iu = {
+ uniforms: A.UniformsUtils.merge([
+ A.ShaderLib.phong.uniforms,
+ {
+ thicknessMap: { value: null },
+ thicknessColor: { value: new A.Color(16777215) },
+ thicknessDistortion: { value: 0.1 },
+ thicknessAmbient: { value: 0 },
+ thicknessAttenuation: { value: 0.1 },
+ thicknessPower: { value: 2 },
+ thicknessScale: { value: 10 },
+ },
+ ]),
+ vertexShader: "\n #define USE_UV\n ".concat(
+ A.ShaderChunk.meshphong_vert,
+ "\n "
+ ),
+ fragmentShader:
+ "\n #define USE_UV',\n #define SUBSURFACE',\n\n "
+ .concat(
+ e,
+ "\n\n uniform sampler2D thicknessMap;\n uniform float thicknessPower;\n uniform float thicknessScale;\n uniform float thicknessDistortion;\n uniform float thicknessAmbient;\n uniform float thicknessAttenuation;\n uniform vec3 thicknessColor;\n\n void RE_Direct_Scattering(const in IncidentLight directLight, const in vec2 uv, const in GeometricContext geometry, inout ReflectedLight reflectedLight) {\n \tvec3 thickness = thicknessColor * texture2D(thicknessMap, uv).r;\n \tvec3 scatteringHalf = normalize(directLight.direction + (geometry.normal * thicknessDistortion));\n \tfloat scatteringDot = pow(saturate(dot(geometry.viewDir, -scatteringHalf)), thicknessPower) * thicknessScale;\n \tvec3 scatteringIllu = (scatteringDot + thicknessAmbient) * thickness;\n \treflectedLight.directDiffuse += scatteringIllu * thicknessAttenuation * directLight.color;\n }\n\n "
+ )
+ .concat(
+ t.replace(
+ "#include ",
+ A.ShaderChunk.lights_fragment_begin.replace(
+ /RE_Direct\( directLight, geometry, material, reflectedLight \);/g,
+ "\n RE_Direct( directLight, geometry, material, reflectedLight );\n\n #if defined( SUBSURFACE ) && defined( USE_UV )\n RE_Direct_Scattering(directLight, vUv, geometry, reflectedLight);\n #endif\n "
+ )
+ ),
+ "\n "
+ ),
+ });
+ }
+ var Ru = {
+ get uniforms() {
+ return ku().uniforms;
+ },
+ set uniforms(e) {
+ ku().uniforms = e;
+ },
+ get vertexShader() {
+ return ku().vertexShader;
+ },
+ set vertexShader(e) {
+ ku().vertexShader = e;
+ },
+ get fragmentShader() {
+ return ku().vertexShader;
+ },
+ set fragmentShader(e) {
+ ku().vertexShader = e;
+ },
+ },
+ Bu = {
+ uniforms: { tDiffuse: { value: null } },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );",
+ "\tvec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);",
+ "\tgl_FragColor = newTex;",
+ "}",
+ ].join("\n"),
+ },
+ Pu = {
+ uniforms: {
+ uDirLightPos: { value: new A.Vector3() },
+ uDirLightColor: { value: new A.Color(15658734) },
+ uAmbientLightColor: { value: new A.Color(328965) },
+ uBaseColor: { value: new A.Color(16777215) },
+ },
+ vertexShader: [
+ "varying vec3 vNormal;",
+ "varying vec3 vRefract;",
+ "void main() {",
+ "\tvec4 worldPosition = modelMatrix * vec4( position, 1.0 );",
+ "\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
+ "\tvec3 worldNormal = normalize ( mat3( modelMatrix[0].xyz, modelMatrix[1].xyz, modelMatrix[2].xyz ) * normal );",
+ "\tvNormal = normalize( normalMatrix * normal );",
+ "\tvec3 I = worldPosition.xyz - cameraPosition;",
+ "\tvRefract = refract( normalize( I ), worldNormal, 1.02 );",
+ "\tgl_Position = projectionMatrix * mvPosition;",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec3 uBaseColor;",
+ "uniform vec3 uDirLightPos;",
+ "uniform vec3 uDirLightColor;",
+ "uniform vec3 uAmbientLightColor;",
+ "varying vec3 vNormal;",
+ "varying vec3 vRefract;",
+ "void main() {",
+ "\tfloat directionalLightWeighting = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);",
+ "\tvec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;",
+ "\tfloat intensity = smoothstep( - 0.5, 1.0, pow( length(lightWeighting), 20.0 ) );",
+ "\tintensity += length(lightWeighting) * 0.2;",
+ "\tfloat cameraWeighting = dot( normalize( vNormal ), vRefract );",
+ "\tintensity += pow( 1.0 - length( cameraWeighting ), 6.0 );",
+ "\tintensity = intensity * 0.2 + 0.3;",
+ "\tif ( intensity < 0.50 ) {",
+ "\t\tgl_FragColor = vec4( 2.0 * intensity * uBaseColor, 1.0 );",
+ "\t} else {",
+ "\t\tgl_FragColor = vec4( 1.0 - 2.0 * ( 1.0 - intensity ) * ( 1.0 - uBaseColor ), 1.0 );",
+ "}",
+ "}",
+ ].join("\n"),
+ },
+ Lu = {
+ uniforms: {
+ uDirLightPos: { value: new A.Vector3() },
+ uDirLightColor: { value: new A.Color(15658734) },
+ uAmbientLightColor: { value: new A.Color(328965) },
+ uBaseColor: { value: new A.Color(15658734) },
+ uLineColor1: { value: new A.Color(8421504) },
+ uLineColor2: { value: new A.Color(0) },
+ uLineColor3: { value: new A.Color(0) },
+ uLineColor4: { value: new A.Color(0) },
+ },
+ vertexShader: [
+ "varying vec3 vNormal;",
+ "void main() {",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "\tvNormal = normalize( normalMatrix * normal );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec3 uBaseColor;",
+ "uniform vec3 uLineColor1;",
+ "uniform vec3 uLineColor2;",
+ "uniform vec3 uLineColor3;",
+ "uniform vec3 uLineColor4;",
+ "uniform vec3 uDirLightPos;",
+ "uniform vec3 uDirLightColor;",
+ "uniform vec3 uAmbientLightColor;",
+ "varying vec3 vNormal;",
+ "void main() {",
+ "\tfloat camera = max( dot( normalize( vNormal ), vec3( 0.0, 0.0, 1.0 ) ), 0.4);",
+ "\tfloat light = max( dot( normalize( vNormal ), uDirLightPos ), 0.0);",
+ "\tgl_FragColor = vec4( uBaseColor, 1.0 );",
+ "\tif ( length(uAmbientLightColor + uDirLightColor * light) < 1.00 ) {",
+ "\t\tgl_FragColor *= vec4( uLineColor1, 1.0 );",
+ "\t}",
+ "\tif ( length(uAmbientLightColor + uDirLightColor * camera) < 0.50 ) {",
+ "\t\tgl_FragColor *= vec4( uLineColor2, 1.0 );",
+ "\t}",
+ "}",
+ ].join("\n"),
+ },
+ Du = {
+ uniforms: {
+ uDirLightPos: { value: new A.Vector3() },
+ uDirLightColor: { value: new A.Color(15658734) },
+ uAmbientLightColor: { value: new A.Color(328965) },
+ uBaseColor: { value: new A.Color(16777215) },
+ uLineColor1: { value: new A.Color(0) },
+ uLineColor2: { value: new A.Color(0) },
+ uLineColor3: { value: new A.Color(0) },
+ uLineColor4: { value: new A.Color(0) },
+ },
+ vertexShader: [
+ "varying vec3 vNormal;",
+ "void main() {",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "\tvNormal = normalize( normalMatrix * normal );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec3 uBaseColor;",
+ "uniform vec3 uLineColor1;",
+ "uniform vec3 uLineColor2;",
+ "uniform vec3 uLineColor3;",
+ "uniform vec3 uLineColor4;",
+ "uniform vec3 uDirLightPos;",
+ "uniform vec3 uDirLightColor;",
+ "uniform vec3 uAmbientLightColor;",
+ "varying vec3 vNormal;",
+ "void main() {",
+ "\tfloat directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);",
+ "\tvec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;",
+ "\tgl_FragColor = vec4( uBaseColor, 1.0 );",
+ "\tif ( length(lightWeighting) < 1.00 ) {",
+ "\t\tif ( mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) {",
+ "\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );",
+ "\t\t}",
+ "\t}",
+ "\tif ( length(lightWeighting) < 0.75 ) {",
+ "\t\tif (mod(gl_FragCoord.x - gl_FragCoord.y, 10.0) == 0.0) {",
+ "\t\t\tgl_FragColor = vec4( uLineColor2, 1.0 );",
+ "\t\t}",
+ "\t}",
+ "\tif ( length(lightWeighting) < 0.50 ) {",
+ "\t\tif (mod(gl_FragCoord.x + gl_FragCoord.y - 5.0, 10.0) == 0.0) {",
+ "\t\t\tgl_FragColor = vec4( uLineColor3, 1.0 );",
+ "\t\t}",
+ "\t}",
+ "\tif ( length(lightWeighting) < 0.3465 ) {",
+ "\t\tif (mod(gl_FragCoord.x - gl_FragCoord.y - 5.0, 10.0) == 0.0) {",
+ "\t\t\tgl_FragColor = vec4( uLineColor4, 1.0 );",
+ "\t}",
+ "\t}",
+ "}",
+ ].join("\n"),
+ },
+ Uu = {
+ uniforms: {
+ uDirLightPos: { value: new A.Vector3() },
+ uDirLightColor: { value: new A.Color(15658734) },
+ uAmbientLightColor: { value: new A.Color(328965) },
+ uBaseColor: { value: new A.Color(16777215) },
+ uLineColor1: { value: new A.Color(0) },
+ },
+ vertexShader: [
+ "varying vec3 vNormal;",
+ "void main() {",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "\tvNormal = normalize( normalMatrix * normal );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec3 uBaseColor;",
+ "uniform vec3 uLineColor1;",
+ "uniform vec3 uLineColor2;",
+ "uniform vec3 uLineColor3;",
+ "uniform vec3 uLineColor4;",
+ "uniform vec3 uDirLightPos;",
+ "uniform vec3 uDirLightColor;",
+ "uniform vec3 uAmbientLightColor;",
+ "varying vec3 vNormal;",
+ "void main() {",
+ "float directionalLightWeighting = max( dot( normalize(vNormal), uDirLightPos ), 0.0);",
+ "vec3 lightWeighting = uAmbientLightColor + uDirLightColor * directionalLightWeighting;",
+ "gl_FragColor = vec4( uBaseColor, 1.0 );",
+ "if ( length(lightWeighting) < 1.00 ) {",
+ "\t\tif ( ( mod(gl_FragCoord.x, 4.001) + mod(gl_FragCoord.y, 4.0) ) > 6.00 ) {",
+ "\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );",
+ "\t\t}",
+ "\t}",
+ "\tif ( length(lightWeighting) < 0.50 ) {",
+ "\t\tif ( ( mod(gl_FragCoord.x + 2.0, 4.001) + mod(gl_FragCoord.y + 2.0, 4.0) ) > 6.00 ) {",
+ "\t\t\tgl_FragColor = vec4( uLineColor1, 1.0 );",
+ "\t\t}",
+ "\t}",
+ "}",
+ ].join("\n"),
+ },
+ Fu = {
+ uniforms: {
+ texture: { value: null },
+ delta: { value: new A.Vector2(1, 1) },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "#include ",
+ "#define ITERATIONS 10.0",
+ "uniform sampler2D texture;",
+ "uniform vec2 delta;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 color = vec4( 0.0 );",
+ "\tfloat total = 0.0;",
+ "\tfloat offset = rand( vUv );",
+ "\tfor ( float t = -ITERATIONS; t <= ITERATIONS; t ++ ) {",
+ "\t\tfloat percent = ( t + offset - 0.5 ) / ITERATIONS;",
+ "\t\tfloat weight = 1.0 - abs( percent );",
+ "\t\tcolor += texture2D( texture, vUv + delta * percent ) * weight;",
+ "\t\ttotal += weight;",
+ "\t}",
+ "\tgl_FragColor = color / total;",
+ "}",
+ ].join("\n"),
+ },
+ Ou = {
+ uniforms: { tDiffuse: { value: null }, v: { value: 1 / 512 } },
+ vertexShader:
+ "\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",
+ fragmentShader:
+ "\n\n uniform sampler2D tDiffuse;\n uniform float v;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 sum = vec4( 0.0 );\n\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n gl_FragColor = sum;\n\n }\n ",
+ },
+ Nu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ v: { value: 1 / 512 },
+ r: { value: 0.35 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform sampler2D tDiffuse;",
+ "uniform float v;",
+ "uniform float r;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 sum = vec4( 0.0 );",
+ "\tfloat vv = v * abs( r - vUv.y );",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * vv ) ) * 0.051;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * vv ) ) * 0.0918;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * vv ) ) * 0.12245;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * vv ) ) * 0.1531;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * vv ) ) * 0.1531;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * vv ) ) * 0.12245;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * vv ) ) * 0.0918;",
+ "\tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * vv ) ) * 0.051;",
+ "\tgl_FragColor = sum;",
+ "}",
+ ].join("\n"),
+ },
+ Gu = {
+ uniforms: {
+ tDiffuse: { value: null },
+ offset: { value: 1 },
+ darkness: { value: 1 },
+ },
+ vertexShader: [
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform float offset;",
+ "uniform float darkness;",
+ "uniform sampler2D tDiffuse;",
+ "varying vec2 vUv;",
+ "void main() {",
+ "\tvec4 texel = texture2D( tDiffuse, vUv );",
+ "\tvec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );",
+ "\tgl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );",
+ "}",
+ ].join("\n"),
+ },
+ Zu = {
+ uniforms: {
+ u_size: { value: new A.Vector3(1, 1, 1) },
+ u_renderstyle: { value: 0 },
+ u_renderthreshold: { value: 0.5 },
+ u_clim: { value: new A.Vector2(1, 1) },
+ u_data: { value: null },
+ u_cmdata: { value: null },
+ },
+ vertexShader: [
+ "\t\tvarying vec4 v_nearpos;",
+ "\t\tvarying vec4 v_farpos;",
+ "\t\tvarying vec3 v_position;",
+ "\t\tvoid main() {",
+ "\t\t\t\tmat4 viewtransformf = modelViewMatrix;",
+ "\t\t\t\tmat4 viewtransformi = inverse(modelViewMatrix);",
+ "\t\t\t\tvec4 position4 = vec4(position, 1.0);",
+ "\t\t\t\tvec4 pos_in_cam = viewtransformf * position4;",
+ "\t\t\t\tpos_in_cam.z = -pos_in_cam.w;",
+ "\t\t\t\tv_nearpos = viewtransformi * pos_in_cam;",
+ "\t\t\t\tpos_in_cam.z = pos_in_cam.w;",
+ "\t\t\t\tv_farpos = viewtransformi * pos_in_cam;",
+ "\t\t\t\tv_position = position;",
+ "\t\t\t\tgl_Position = projectionMatrix * viewMatrix * modelMatrix * position4;",
+ "\t\t}",
+ ].join("\n"),
+ fragmentShader: [
+ "\t\tprecision highp float;",
+ "\t\tprecision mediump sampler3D;",
+ "\t\tuniform vec3 u_size;",
+ "\t\tuniform int u_renderstyle;",
+ "\t\tuniform float u_renderthreshold;",
+ "\t\tuniform vec2 u_clim;",
+ "\t\tuniform sampler3D u_data;",
+ "\t\tuniform sampler2D u_cmdata;",
+ "\t\tvarying vec3 v_position;",
+ "\t\tvarying vec4 v_nearpos;",
+ "\t\tvarying vec4 v_farpos;",
+ "\t\tconst int MAX_STEPS = 887;\t// 887 for 512^3, 1774 for 1024^3",
+ "\t\tconst int REFINEMENT_STEPS = 4;",
+ "\t\tconst float relative_step_size = 1.0;",
+ "\t\tconst vec4 ambient_color = vec4(0.2, 0.4, 0.2, 1.0);",
+ "\t\tconst vec4 diffuse_color = vec4(0.8, 0.2, 0.2, 1.0);",
+ "\t\tconst vec4 specular_color = vec4(1.0, 1.0, 1.0, 1.0);",
+ "\t\tconst float shininess = 40.0;",
+ "\t\tvoid cast_mip(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray);",
+ "\t\tvoid cast_iso(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray);",
+ "\t\tfloat sample1(vec3 texcoords);",
+ "\t\tvec4 apply_colormap(float val);",
+ "\t\tvec4 add_lighting(float val, vec3 loc, vec3 step, vec3 view_ray);",
+ "\t\tvoid main() {",
+ "\t\t\t\tvec3 farpos = v_farpos.xyz / v_farpos.w;",
+ "\t\t\t\tvec3 nearpos = v_nearpos.xyz / v_nearpos.w;",
+ "\t\t\t\tvec3 view_ray = normalize(nearpos.xyz - farpos.xyz);",
+ "\t\t\t\tfloat distance = dot(nearpos - v_position, view_ray);",
+ "\t\t\t\tdistance = max(distance, min((-0.5 - v_position.x) / view_ray.x,",
+ "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.x - 0.5 - v_position.x) / view_ray.x));",
+ "\t\t\t\tdistance = max(distance, min((-0.5 - v_position.y) / view_ray.y,",
+ "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.y - 0.5 - v_position.y) / view_ray.y));",
+ "\t\t\t\tdistance = max(distance, min((-0.5 - v_position.z) / view_ray.z,",
+ "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(u_size.z - 0.5 - v_position.z) / view_ray.z));",
+ "\t\t\t\tvec3 front = v_position + view_ray * distance;",
+ "\t\t\t\tint nsteps = int(-distance / relative_step_size + 0.5);",
+ "\t\t\t\tif ( nsteps < 1 )",
+ "\t\t\t\t\t\tdiscard;",
+ "\t\t\t\tvec3 step = ((v_position - front) / u_size) / float(nsteps);",
+ "\t\t\t\tvec3 start_loc = front / u_size;",
+ "\t\t\t\tif (u_renderstyle == 0)",
+ "\t\t\t\t\t\tcast_mip(start_loc, step, nsteps, view_ray);",
+ "\t\t\t\telse if (u_renderstyle == 1)",
+ "\t\t\t\t\t\tcast_iso(start_loc, step, nsteps, view_ray);",
+ "\t\t\t\tif (gl_FragColor.a < 0.05)",
+ "\t\t\t\t\t\tdiscard;",
+ "\t\t}",
+ "\t\tfloat sample1(vec3 texcoords) {",
+ "\t\t\t\t/* Sample float value from a 3D texture. Assumes intensity data. */",
+ "\t\t\t\treturn texture(u_data, texcoords.xyz).r;",
+ "\t\t}",
+ "\t\tvec4 apply_colormap(float val) {",
+ "\t\t\t\tval = (val - u_clim[0]) / (u_clim[1] - u_clim[0]);",
+ "\t\t\t\treturn texture2D(u_cmdata, vec2(val, 0.5));",
+ "\t\t}",
+ "\t\tvoid cast_mip(vec3 start_loc, vec3 step, int nsteps, vec3 view_ray) {",
+ "\t\t\t\tfloat max_val = -1e6;",
+ "\t\t\t\tint max_i = 100;",
+ "\t\t\t\tvec3 loc = start_loc;",
+ "\t\t\t\tfor (int iter=0; iter= nsteps)",
+ "\t\t\t\t\t\t\t\tbreak;",
+ "\t\t\t\t\t\tfloat val = sample1(loc);",
+ "\t\t\t\t\t\tif (val > max_val) {",
+ "\t\t\t\t\t\t\t\tmax_val = val;",
+ "\t\t\t\t\t\t\t\tmax_i = iter;",
+ "\t\t\t\t\t\t}",
+ "\t\t\t\t\t\tloc += step;",
+ "\t\t\t\t}",
+ "\t\t\t\tvec3 iloc = start_loc + step * (float(max_i) - 0.5);",
+ "\t\t\t\tvec3 istep = step / float(REFINEMENT_STEPS);",
+ "\t\t\t\tfor (int i=0; i= nsteps)",
+ "\t\t\t\t\t\t\t\tbreak;",
+ "\t\t\t\t\t\tfloat val = sample1(loc);",
+ "\t\t\t\t\t\tif (val > low_threshold) {",
+ "\t\t\t\t\t\t\t\tvec3 iloc = loc - 0.5 * step;",
+ "\t\t\t\t\t\t\t\tvec3 istep = step / float(REFINEMENT_STEPS);",
+ "\t\t\t\t\t\t\t\tfor (int i=0; i u_renderthreshold) {",
+ "\t\t\t\t\t\t\t\t\t\t\t\tgl_FragColor = add_lighting(val, iloc, dstep, view_ray);",
+ "\t\t\t\t\t\t\t\t\t\t\t\treturn;",
+ "\t\t\t\t\t\t\t\t\t\t}",
+ "\t\t\t\t\t\t\t\t\t\tiloc += istep;",
+ "\t\t\t\t\t\t\t\t}",
+ "\t\t\t\t\t\t}",
+ "\t\t\t\t\t\tloc += step;",
+ "\t\t\t\t}",
+ "\t\t}",
+ "\t\tvec4 add_lighting(float val, vec3 loc, vec3 step, vec3 view_ray)",
+ "\t\t{",
+ "\t\t\t\tvec3 V = normalize(view_ray);",
+ "\t\t\t\tvec3 N;",
+ "\t\t\t\tfloat val1, val2;",
+ "\t\t\t\tval1 = sample1(loc + vec3(-step[0], 0.0, 0.0));",
+ "\t\t\t\tval2 = sample1(loc + vec3(+step[0], 0.0, 0.0));",
+ "\t\t\t\tN[0] = val1 - val2;",
+ "\t\t\t\tval = max(max(val1, val2), val);",
+ "\t\t\t\tval1 = sample1(loc + vec3(0.0, -step[1], 0.0));",
+ "\t\t\t\tval2 = sample1(loc + vec3(0.0, +step[1], 0.0));",
+ "\t\t\t\tN[1] = val1 - val2;",
+ "\t\t\t\tval = max(max(val1, val2), val);",
+ "\t\t\t\tval1 = sample1(loc + vec3(0.0, 0.0, -step[2]));",
+ "\t\t\t\tval2 = sample1(loc + vec3(0.0, 0.0, +step[2]));",
+ "\t\t\t\tN[2] = val1 - val2;",
+ "\t\t\t\tval = max(max(val1, val2), val);",
+ "\t\t\t\tfloat gm = length(N); // gradient magnitude",
+ "\t\t\t\tN = normalize(N);",
+ "\t\t\t\tfloat Nselect = float(dot(N, V) > 0.0);",
+ "\t\t\t\tN = (2.0 * Nselect - 1.0) * N;\t// ==\tNselect * N - (1.0-Nselect)*N;",
+ "\t\t\t\tvec4 ambient_color = vec4(0.0, 0.0, 0.0, 0.0);",
+ "\t\t\t\tvec4 diffuse_color = vec4(0.0, 0.0, 0.0, 0.0);",
+ "\t\t\t\tvec4 specular_color = vec4(0.0, 0.0, 0.0, 0.0);",
+ "\t\t\t\tfor (int i=0; i<1; i++)",
+ "\t\t\t\t{",
+ "\t\t\t\t\t\tvec3 L = normalize(view_ray);\t//lightDirs[i];",
+ "\t\t\t\t\t\tfloat lightEnabled = float( length(L) > 0.0 );",
+ "\t\t\t\t\t\tL = normalize(L + (1.0 - lightEnabled));",
+ "\t\t\t\t\t\tfloat lambertTerm = clamp(dot(N, L), 0.0, 1.0);",
+ "\t\t\t\t\t\tvec3 H = normalize(L+V); // Halfway vector",
+ "\t\t\t\t\t\tfloat specularTerm = pow(max(dot(H, N), 0.0), shininess);",
+ "\t\t\t\t\t\tfloat mask1 = lightEnabled;",
+ "\t\t\t\t\t\tambient_color +=\tmask1 * ambient_color;\t// * gl_LightSource[i].ambient;",
+ "\t\t\t\t\t\tdiffuse_color +=\tmask1 * lambertTerm;",
+ "\t\t\t\t\t\tspecular_color += mask1 * specularTerm * specular_color;",
+ "\t\t\t\t}",
+ "\t\t\t\tvec4 final_color;",
+ "\t\t\t\tvec4 color = apply_colormap(val);",
+ "\t\t\t\tfinal_color = color * (ambient_color + diffuse_color) + specular_color;",
+ "\t\t\t\tfinal_color.a = color.a;",
+ "\t\t\t\treturn final_color;",
+ "\t\t}",
+ ].join("\n"),
+ },
+ zu = {
+ uniforms: {
+ color: { value: null },
+ time: { value: 0 },
+ tDiffuse: { value: null },
+ tDudv: { value: null },
+ textureMatrix: { value: null },
+ },
+ vertexShader: [
+ "uniform mat4 textureMatrix;",
+ "varying vec2 vUv;",
+ "varying vec4 vUvRefraction;",
+ "void main() {",
+ "\tvUv = uv;",
+ "\tvUvRefraction = textureMatrix * vec4( position, 1.0 );",
+ "\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );",
+ "}",
+ ].join("\n"),
+ fragmentShader: [
+ "uniform vec3 color;",
+ "uniform float time;",
+ "uniform sampler2D tDiffuse;",
+ "uniform sampler2D tDudv;",
+ "varying vec2 vUv;",
+ "varying vec4 vUvRefraction;",
+ "float blendOverlay( float base, float blend ) {",
+ "\treturn( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );",
+ "}",
+ "vec3 blendOverlay( vec3 base, vec3 blend ) {",
+ "\treturn vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ),blendOverlay( base.b, blend.b ) );",
+ "}",
+ "void main() {",
+ " float waveStrength = 0.1;",
+ " float waveSpeed = 0.03;",
+ "\tvec2 distortedUv = texture2D( tDudv, vec2( vUv.x + time * waveSpeed, vUv.y ) ).rg * waveStrength;",
+ "\tdistortedUv = vUv.xy + vec2( distortedUv.x, distortedUv.y + time * waveSpeed );",
+ "\tvec2 distortion = ( texture2D( tDudv, distortedUv ).rg * 2.0 - 1.0 ) * waveStrength;",
+ " vec4 uv = vec4( vUvRefraction );",
+ " uv.xy += distortion;",
+ "\tvec4 base = texture2DProj( tDiffuse, uv );",
+ "\tgl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );",
+ "}",
+ ].join("\n"),
+ },
+ Qu = null,
+ Hu = null,
+ Vu = new WeakMap();
+ function ju(e) {
+ var t = document.createRange(),
+ n = new Color();
+ function r(e, t, n, r) {
+ "" !== r &&
+ ("uppercase" === e.textTransform && (r = r.toUpperCase()),
+ (l.font = e.fontWeight + " " + e.fontSize + " " + e.fontFamily),
+ (l.textBaseline = "top"),
+ (l.fillStyle = e.color),
+ l.fillText(r, t, n + 0.1 * parseFloat(e.fontSize)));
+ }
+ function i(e, t, n, r, i) {
+ n < 2 * i && (i = n / 2),
+ r < 2 * i && (i = r / 2),
+ l.beginPath(),
+ l.moveTo(e + i, t),
+ l.arcTo(e + n, t, e + n, t + r, i),
+ l.arcTo(e + n, t + r, e, t + r, i),
+ l.arcTo(e, t + r, e, t, i),
+ l.arcTo(e, t, e + n, t, i),
+ l.closePath();
+ }
+ function a(e, t, n, r, i, a) {
+ var o = e[t + "Width"],
+ s = e[t + "Style"],
+ u = e[t + "Color"];
+ "0px" !== o &&
+ "none" !== s &&
+ "transparent" !== u &&
+ "rgba(0, 0, 0, 0)" !== u &&
+ ((l.strokeStyle = u),
+ (l.lineWidth = parseFloat(o)),
+ l.beginPath(),
+ l.moveTo(n, r),
+ l.lineTo(n + i, r + a),
+ l.stroke());
+ }
+ var o = e.getBoundingClientRect(),
+ s = Vu.get(e);
+ void 0 === s &&
+ (((s = document.createElement("canvas")).width = o.width),
+ (s.height = o.height),
+ Vu.set(e, s));
+ var l = s.getContext("2d"),
+ u = new (function (e) {
+ var t = [],
+ n = !1;
+ function r() {
+ if ((n && ((n = !1), e.restore()), 0 !== t.length)) {
+ for (
+ var r = -1 / 0, i = -1 / 0, a = 1 / 0, o = 1 / 0, s = 0;
+ s < t.length;
+ s++
+ ) {
+ var l = t[s];
+ (r = Math.max(r, l.x)),
+ (i = Math.max(i, l.y)),
+ (a = Math.min(a, l.x + l.width)),
+ (o = Math.min(o, l.y + l.height));
+ }
+ e.save(),
+ e.beginPath(),
+ e.rect(r, i, a - r, o - i),
+ e.clip(),
+ (n = !0);
+ }
+ }
+ return {
+ add: function (e) {
+ t.push(e), r();
+ },
+ remove: function () {
+ t.pop(), r();
+ },
+ };
+ })(l);
+ return (
+ (function e(s, c) {
+ var f = 0,
+ d = 0,
+ h = 0,
+ p = 0;
+ if (s.nodeType === Node.TEXT_NODE) {
+ t.selectNode(s);
+ var v = t.getBoundingClientRect();
+ (f = v.left - o.left - 0.5),
+ (d = v.top - o.top - 0.5),
+ (h = v.width),
+ (p = v.height),
+ r(c, f, d, s.nodeValue.trim());
+ } else {
+ if (s.nodeType === Node.COMMENT_NODE) return;
+ if (s instanceof HTMLCanvasElement) {
+ if ("none" === s.style.display) return;
+ l.save();
+ var m = window.devicePixelRatio;
+ l.scale(1 / m, 1 / m), l.drawImage(s, 0, 0), l.restore();
+ } else {
+ if ("none" === s.style.display) return;
+ var g = s.getBoundingClientRect();
+ (f = g.left - o.left - 0.5),
+ (d = g.top - o.top - 0.5),
+ (h = g.width),
+ (p = g.height),
+ (c = window.getComputedStyle(s)),
+ i(f, d, h, p, parseFloat(c.borderRadius));
+ var A = c.backgroundColor;
+ "transparent" !== A &&
+ "rgba(0, 0, 0, 0)" !== A &&
+ ((l.fillStyle = A), l.fill());
+ for (
+ var y = !0,
+ b = null,
+ x = 0,
+ S = [
+ "borderTop",
+ "borderLeft",
+ "borderBottom",
+ "borderRight",
+ ];
+ x < S.length;
+ x++
+ ) {
+ var E = S[x];
+ if (
+ (null !== b &&
+ (y =
+ c[E + "Width"] === c[b + "Width"] &&
+ c[E + "Color"] === c[b + "Color"] &&
+ c[E + "Style"] === c[b + "Style"]),
+ !1 === y)
+ )
+ break;
+ b = E;
+ }
+ if (!0 === y) {
+ var _ = parseFloat(c.borderTopWidth);
+ "0px" !== c.borderTopWidth &&
+ "none" !== c.borderTopStyle &&
+ "transparent" !== c.borderTopColor &&
+ "rgba(0, 0, 0, 0)" !== c.borderTopColor &&
+ ((l.strokeStyle = c.borderTopColor),
+ (l.lineWidth = _),
+ l.stroke());
+ } else
+ a(c, "borderTop", f, d, h, 0),
+ a(c, "borderLeft", f, d, 0, p),
+ a(c, "borderBottom", f, d + p, h, 0),
+ a(c, "borderRight", f + h, d, 0, p);
+ if (s instanceof HTMLInputElement) {
+ var C = c.accentColor;
+ (void 0 !== C && "auto" !== C) || (C = c.color), n.set(C);
+ var w =
+ Math.sqrt(
+ 0.299 * Math.pow(n.r, 2) +
+ 0.587 * Math.pow(n.g, 2) +
+ 0.114 * Math.pow(n.b, 2)
+ ) < 0.5
+ ? "white"
+ : "#111111";
+ if (
+ ("radio" === s.type &&
+ (i(f, d, h, p, p),
+ (l.fillStyle = "white"),
+ (l.strokeStyle = C),
+ (l.lineWidth = 1),
+ l.fill(),
+ l.stroke(),
+ s.checked &&
+ (i(f + 2, d + 2, h - 4, p - 4, p),
+ (l.fillStyle = C),
+ (l.strokeStyle = w),
+ (l.lineWidth = 2),
+ l.fill(),
+ l.stroke())),
+ "checkbox" === s.type &&
+ (i(f, d, h, p, 2),
+ (l.fillStyle = s.checked ? C : "white"),
+ (l.strokeStyle = s.checked ? w : C),
+ (l.lineWidth = 1),
+ l.stroke(),
+ l.fill(),
+ s.checked))
+ ) {
+ var T = l.textAlign;
+ (l.textAlign = "center"),
+ r(
+ {
+ color: w,
+ fontFamily: c.fontFamily,
+ fontSize: p + "px",
+ fontWeight: "bold",
+ },
+ f + h / 2,
+ d,
+ "\u2714"
+ ),
+ (l.textAlign = T);
+ }
+ if ("range" === s.type) {
+ var M = ["min", "max", "value"].map(function (e) {
+ return parseFloat(s[e]);
+ }),
+ I = _slicedToArray(M, 3),
+ k = I[0],
+ R = I[1],
+ B = ((I[2] - k) / (R - k)) * (h - p);
+ i(f, d + p / 4, h, p / 2, p / 4),
+ (l.fillStyle = w),
+ (l.strokeStyle = C),
+ (l.lineWidth = 1),
+ l.fill(),
+ l.stroke(),
+ i(f, d + p / 4, B + p / 2, p / 2, p / 4),
+ (l.fillStyle = C),
+ l.fill(),
+ i(f + B, d, p, p, p / 2),
+ (l.fillStyle = C),
+ l.fill();
+ }
+ ("color" !== s.type &&
+ "text" !== s.type &&
+ "number" !== s.type) ||
+ (u.add({ x: f, y: d, width: h, height: p }),
+ r(
+ c,
+ f + parseInt(c.paddingLeft),
+ d + parseInt(c.paddingTop),
+ s.value
+ ),
+ u.remove());
+ }
+ }
+ }
+ var P = "auto" === c.overflow || "hidden" === c.overflow;
+ P && u.add({ x: f, y: d, width: h, height: p });
+ for (var L = 0; L < s.childNodes.length; L++)
+ e(s.childNodes[L], c);
+ P && u.remove();
+ })(e),
+ s
+ );
+ }
+ function Wu(e, t, n, r) {
+ var i = {
+ clientX: n * e.offsetWidth + e.offsetLeft,
+ clientY: r * e.offsetHeight + e.offsetTop,
+ view: e.ownerDocument.defaultView,
+ };
+ window.dispatchEvent(new MouseEvent(t, i));
+ var a = e.getBoundingClientRect();
+ (n = n * a.width + a.left),
+ (r = r * a.height + a.top),
+ (function e(a) {
+ if (
+ a.nodeType !== Node.TEXT_NODE &&
+ a.nodeType !== Node.COMMENT_NODE
+ ) {
+ var o = a.getBoundingClientRect();
+ if (
+ n > o.left &&
+ n < o.right &&
+ r > o.top &&
+ r < o.bottom &&
+ (a.dispatchEvent(new MouseEvent(t, i)),
+ a instanceof HTMLInputElement &&
+ "range" === a.type &&
+ ("mousedown" === t || "click" === t))
+ ) {
+ var s = ["min", "max"].map(function (e) {
+ return parseFloat(a[e]);
+ }),
+ l = _slicedToArray(s, 2),
+ u = l[0],
+ c = l[1],
+ f = o.width,
+ d = (n - o.x) / f;
+ (a.value = u + (c - u) * d),
+ a.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
+ }
+ for (var h = 0; h < a.childNodes.length; h++)
+ e(a.childNodes[h]);
+ }
+ })(e);
+ }
+ var Xu = new A.Vector2(),
+ Yu = { type: "", data: Xu },
+ qu = null,
+ Ju = null,
+ Ku = new A.Frustum(),
+ $u = new A.Vector3(),
+ ec = new A.Vector3(),
+ tc = new A.Vector3(),
+ nc = new A.Vector3(),
+ rc = new A.Vector3(),
+ ic = new A.Vector3(),
+ ac = new A.Vector3(),
+ oc = new A.Vector3(),
+ sc = new A.Vector3(),
+ lc = new A.Vector3(),
+ uc = new A.Vector3(),
+ cc = new A.Vector3(),
+ fc = new A.Vector3(),
+ dc = new A.Vector3(),
+ hc = null;
+ function pc() {
+ return vc.apply(this, arguments);
+ }
+ function vc() {
+ return (
+ (vc = _asyncToGenerator(
+ _regeneratorRuntime().mark(function e() {
+ var t, n, r, i, a, o, s, l, u, c, f, d, h, p, v, m;
+ return _regeneratorRuntime().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ if (
+ ((m = function () {
+ var e = performance.now();
+ if (v > 0) {
+ var t = (e - v) / 1e3;
+ o.stepSimulation(t, 10);
+ }
+ v = e;
+ for (var n = 0, r = u.length; n < r; n++) {
+ var i = u[n];
+ if (i.isInstancedMesh) {
+ for (
+ var a = i.instanceMatrix.array,
+ l = c.get(i),
+ f = 0;
+ f < l.length;
+ f++
+ ) {
+ l[f].getMotionState().getWorldTransform(s),
+ mc(
+ s.getOrigin(),
+ s.getRotation(),
+ a,
+ 16 * f
+ );
+ }
+ i.instanceMatrix.needsUpdate = !0;
+ } else if (i.isMesh) {
+ c.get(i).getMotionState().getWorldTransform(s);
+ var d = s.getOrigin(),
+ h = s.getRotation();
+ i.position.set(d.x(), d.y(), d.z()),
+ i.quaternion.set(h.x(), h.y(), h.z(), h.w());
+ }
+ }
+ }),
+ (p = function (e, n) {
+ var r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0;
+ if (e.isInstancedMesh) {
+ var i = c.get(e)[r];
+ i.setAngularVelocity(new t.btVector3(0, 0, 0)),
+ i.setLinearVelocity(new t.btVector3(0, 0, 0)),
+ s.setIdentity(),
+ s.setOrigin(new t.btVector3(n.x, n.y, n.z)),
+ i.setWorldTransform(s);
+ } else if (e.isMesh) {
+ var a = c.get(e);
+ a.setAngularVelocity(new t.btVector3(0, 0, 0)),
+ a.setLinearVelocity(new t.btVector3(0, 0, 0)),
+ s.setIdentity(),
+ s.setOrigin(new t.btVector3(n.x, n.y, n.z)),
+ a.setWorldTransform(s);
+ }
+ }),
+ (h = function (e, n, r) {
+ for (
+ var i = e.instanceMatrix.array, a = [], s = 0;
+ s < e.count;
+ s++
+ ) {
+ var l = 16 * s,
+ f = new t.btTransform();
+ f.setFromOpenGLMatrix(i.slice(l, l + 16));
+ var d = new t.btDefaultMotionState(f),
+ h = new t.btVector3(0, 0, 0);
+ r.calculateLocalInertia(n, h);
+ var p = new t.btRigidBodyConstructionInfo(
+ n,
+ d,
+ r,
+ h
+ ),
+ v = new t.btRigidBody(p);
+ o.addRigidBody(v), a.push(v);
+ }
+ n > 0 &&
+ (e.instanceMatrix.setUsage(35048),
+ u.push(e),
+ c.set(e, a));
+ }),
+ (d = function (e, n, r) {
+ var i = e.position,
+ a = e.quaternion,
+ s = new t.btTransform();
+ s.setIdentity(),
+ s.setOrigin(new t.btVector3(i.x, i.y, i.z)),
+ s.setRotation(
+ new t.btQuaternion(a.x, a.y, a.z, a.w)
+ );
+ var l = new t.btDefaultMotionState(s),
+ f = new t.btVector3(0, 0, 0);
+ r.calculateLocalInertia(n, f);
+ var d = new t.btRigidBodyConstructionInfo(
+ n,
+ l,
+ r,
+ f
+ ),
+ h = new t.btRigidBody(d);
+ o.addRigidBody(h),
+ n > 0 && (u.push(e), c.set(e, h));
+ }),
+ (f = function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = l(e.geometry);
+ null !== n &&
+ (e.isInstancedMesh
+ ? h(e, t, n)
+ : e.isMesh && d(e, t, n));
+ }),
+ (l = function (e) {
+ var n = e.parameters;
+ if ("BoxGeometry" === e.type) {
+ var r = void 0 !== n.width ? n.width / 2 : 0.5,
+ i = void 0 !== n.height ? n.height / 2 : 0.5,
+ a = void 0 !== n.depth ? n.depth / 2 : 0.5,
+ o = new t.btBoxShape(new t.btVector3(r, i, a));
+ return o.setMargin(0.05), o;
+ }
+ if (
+ "SphereGeometry" === e.type ||
+ "IcosahedronGeometry" === e.type
+ ) {
+ var s = void 0 !== n.radius ? n.radius : 1,
+ l = new t.btSphereShape(s);
+ return l.setMargin(0.05), l;
+ }
+ return null;
+ }),
+ "Ammo" in window !== !1)
+ ) {
+ e.next = 9;
+ break;
+ }
+ return (
+ console.error("AmmoPhysics: Couldn't find Ammo.js"),
+ e.abrupt("return")
+ );
+ case 9:
+ return (e.next = 11), Ammo();
+ case 11:
+ return (
+ (t = e.sent),
+ 60,
+ (n = new t.btDefaultCollisionConfiguration()),
+ (r = new t.btCollisionDispatcher(n)),
+ (i = new t.btDbvtBroadphase()),
+ (a = new t.btSequentialImpulseConstraintSolver()),
+ (o = new t.btDiscreteDynamicsWorld(
+ r,
+ i,
+ a,
+ n
+ )).setGravity(new t.btVector3(0, -9.8, 0)),
+ (s = new t.btTransform()),
+ (u = []),
+ (c = new WeakMap()),
+ (v = 0),
+ setInterval(m, 1e3 / 60),
+ e.abrupt("return", { addMesh: f, setMeshPosition: p })
+ );
+ case 25:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ )),
+ vc.apply(this, arguments)
+ );
+ }
+ function mc(e, t, n, r) {
+ var i = t.x(),
+ a = t.y(),
+ o = t.z(),
+ s = t.w(),
+ l = i + i,
+ u = a + a,
+ c = o + o,
+ f = i * l,
+ d = i * u,
+ h = i * c,
+ p = a * u,
+ v = a * c,
+ m = o * c,
+ g = s * l,
+ A = s * u,
+ y = s * c;
+ (n[r + 0] = 1 - (p + m)),
+ (n[r + 1] = d + y),
+ (n[r + 2] = h - A),
+ (n[r + 3] = 0),
+ (n[r + 4] = d - y),
+ (n[r + 5] = 1 - (f + m)),
+ (n[r + 6] = v + g),
+ (n[r + 7] = 0),
+ (n[r + 8] = h + A),
+ (n[r + 9] = v - g),
+ (n[r + 10] = 1 - (f + p)),
+ (n[r + 11] = 0),
+ (n[r + 12] = e.x()),
+ (n[r + 13] = e.y()),
+ (n[r + 14] = e.z()),
+ (n[r + 15] = 1);
+ }
+ var gc = null,
+ Ac = null,
+ yc = null,
+ bc = null,
+ xc = null,
+ Sc = null;
+ function Ec(e, t, n) {
+ var r = n.length - e - 1;
+ if (t >= n[r]) return r - 1;
+ if (t <= n[e]) return e;
+ for (
+ var i = e, a = r, o = Math.floor((i + a) / 2);
+ t < n[o] || t >= n[o + 1];
+
+ )
+ t < n[o] ? (a = o) : (i = o), (o = Math.floor((i + a) / 2));
+ return o;
+ }
+ function _c(e, t, n, r) {
+ var i = [],
+ a = [],
+ o = [];
+ i[0] = 1;
+ for (var s = 1; s <= n; ++s) {
+ (a[s] = t - r[e + 1 - s]), (o[s] = r[e + s] - t);
+ for (var l = 0, u = 0; u < s; ++u) {
+ var c = o[u + 1],
+ f = a[s - u],
+ d = i[u] / (c + f);
+ (i[u] = l + c * d), (l = f * d);
+ }
+ i[s] = l;
+ }
+ return i;
+ }
+ function Cc(e, t, n, r) {
+ for (
+ var i = Ec(e, r, t),
+ a = _c(i, r, e, t),
+ o = new Vector4(0, 0, 0, 0),
+ s = 0;
+ s <= e;
+ ++s
+ ) {
+ var l = n[i - e + s],
+ u = a[s],
+ c = l.w * u;
+ (o.x += l.x * c),
+ (o.y += l.y * c),
+ (o.z += l.z * c),
+ (o.w += l.w * u);
+ }
+ return o;
+ }
+ function wc(e, t, n, r, i) {
+ for (var a = [], o = 0; o <= n; ++o) a[o] = 0;
+ for (var s = [], l = 0; l <= r; ++l) s[l] = a.slice(0);
+ for (var u = [], c = 0; c <= n; ++c) u[c] = a.slice(0);
+ u[0][0] = 1;
+ for (var f = a.slice(0), d = a.slice(0), h = 1; h <= n; ++h) {
+ (f[h] = t - i[e + 1 - h]), (d[h] = i[e + h] - t);
+ for (var p = 0, v = 0; v < h; ++v) {
+ var m = d[v + 1],
+ g = f[h - v];
+ u[h][v] = m + g;
+ var A = u[v][h - 1] / u[h][v];
+ (u[v][h] = p + m * A), (p = g * A);
+ }
+ u[h][h] = p;
+ }
+ for (var y = 0; y <= n; ++y) s[0][y] = u[y][n];
+ for (var b = 0; b <= n; ++b) {
+ for (var x = 0, S = 1, E = [], _ = 0; _ <= n; ++_)
+ E[_] = a.slice(0);
+ E[0][0] = 1;
+ for (var C = 1; C <= r; ++C) {
+ var w = 0,
+ T = b - C,
+ M = n - C;
+ b >= C &&
+ ((E[S][0] = E[x][0] / u[M + 1][T]), (w = E[S][0] * u[T][M]));
+ for (
+ var I = b - 1 <= M ? C - 1 : n - b, k = T >= -1 ? 1 : -T;
+ k <= I;
+ ++k
+ )
+ (E[S][k] = (E[x][k] - E[x][k - 1]) / u[M + 1][T + k]),
+ (w += E[S][k] * u[T + k][M]);
+ b <= M &&
+ ((E[S][C] = -E[x][C - 1] / u[M + 1][b]),
+ (w += E[S][C] * u[b][M])),
+ (s[C][b] = w);
+ var R = x;
+ (x = S), (S = R);
+ }
+ }
+ for (var B = n, P = 1; P <= r; ++P) {
+ for (var L = 0; L <= n; ++L) s[P][L] *= B;
+ B *= n - P;
+ }
+ return s;
+ }
+ function Tc(e, t, n, r, i) {
+ for (
+ var a = i < e ? i : e,
+ o = [],
+ s = Ec(e, r, t),
+ l = wc(s, r, e, a, t),
+ u = [],
+ c = 0;
+ c < n.length;
+ ++c
+ ) {
+ var f = n[c].clone(),
+ d = f.w;
+ (f.x *= d), (f.y *= d), (f.z *= d), (u[c] = f);
+ }
+ for (var h = 0; h <= a; ++h) {
+ for (
+ var p = u[s - e].clone().multiplyScalar(l[h][0]), v = 1;
+ v <= e;
+ ++v
+ )
+ p.add(u[s - e + v].clone().multiplyScalar(l[h][v]));
+ o[h] = p;
+ }
+ for (var m = a + 1; m <= i + 1; ++m) o[m] = new Vector4(0, 0, 0);
+ return o;
+ }
+ function Mc(e, t) {
+ for (var n = 1, r = 2; r <= e; ++r) n *= r;
+ for (var i = 1, a = 2; a <= t; ++a) i *= a;
+ for (var o = 2; o <= e - t; ++o) i *= o;
+ return n / i;
+ }
+ function Ic(e) {
+ for (var t = e.length, n = [], r = [], i = 0; i < t; ++i) {
+ var a = e[i];
+ (n[i] = new Vector3(a.x, a.y, a.z)), (r[i] = a.w);
+ }
+ for (var o = [], s = 0; s < t; ++s) {
+ for (var l = n[s].clone(), u = 1; u <= s; ++u)
+ l.sub(o[s - u].clone().multiplyScalar(Mc(s, u) * r[u]));
+ o[s] = l.divideScalar(r[0]);
+ }
+ return o;
+ }
+ function kc(e, t, n, r, i) {
+ return Ic(Tc(e, t, n, r, i));
+ }
+ function Rc(e, t, n, r, i, a, o, s) {
+ for (
+ var l = Ec(e, a, n),
+ u = Ec(t, o, r),
+ c = _c(l, a, e, n),
+ f = _c(u, o, t, r),
+ d = [],
+ h = 0;
+ h <= t;
+ ++h
+ ) {
+ d[h] = new Vector4(0, 0, 0, 0);
+ for (var p = 0; p <= e; ++p) {
+ var v = i[l - e + p][u - t + h].clone(),
+ m = v.w;
+ (v.x *= m),
+ (v.y *= m),
+ (v.z *= m),
+ d[h].add(v.multiplyScalar(c[p]));
+ }
+ }
+ for (var g = new Vector4(0, 0, 0, 0), A = 0; A <= t; ++A)
+ g.add(d[A].multiplyScalar(f[A]));
+ g.divideScalar(g.w), s.set(g.x, g.y, g.z);
+ }
+ var Bc = null,
+ Pc,
+ Lc,
+ Dc,
+ Uc = null,
+ Fc = null,
+ Oc = null,
+ Nc = null,
+ Gc = null,
+ Zc = null,
+ zc = null,
+ Qc = null;
+ function Hc(e) {
+ var t = "Kaydara FBX Binary \0";
+ return e.byteLength >= 21 && t === tf(e, 0, 21);
+ }
+ function Vc(e) {
+ var t = [
+ "K",
+ "a",
+ "y",
+ "d",
+ "a",
+ "r",
+ "a",
+ "\\",
+ "F",
+ "B",
+ "X",
+ "\\",
+ "B",
+ "i",
+ "n",
+ "a",
+ "r",
+ "y",
+ "\\",
+ "\\",
+ ],
+ n = 0;
+ function r(t) {
+ var r = e[t - 1];
+ return (e = e.slice(n + t)), n++, r;
+ }
+ for (var i = 0; i < t.length; ++i) {
+ if (r(1) === t[i]) return !1;
+ }
+ return !0;
+ }
+ function jc(e) {
+ var t = e.match(/FBXVersion: (\d+)/);
+ if (t) return parseInt(t[1]);
+ throw new Error(
+ "THREE.FBXLoader: Cannot find the version number for the file given."
+ );
+ }
+ function Wc(e) {
+ return e / 46186158e3;
+ }
+ var Xc = null;
+ function Yc(e, t, n, r) {
+ var i;
+ switch (r.mappingType) {
+ case "ByPolygonVertex":
+ i = e;
+ break;
+ case "ByPolygon":
+ i = t;
+ break;
+ case "ByVertice":
+ i = n;
+ break;
+ case "AllSame":
+ i = r.indices[0];
+ break;
+ default:
+ console.warn(
+ "THREE.FBXLoader: unknown attribute mapping type " +
+ r.mappingType
+ );
+ }
+ "IndexToDirect" === r.referenceType && (i = r.indices[i]);
+ var a = i * r.dataSize,
+ o = a + r.dataSize;
+ return rf(Xc, r.buffer, a, o);
+ }
+ var qc = new A.Euler(),
+ Jc = new A.Vector3();
+ function Kc(e) {
+ var t = new Matrix4(),
+ n = new Matrix4(),
+ r = new Matrix4(),
+ i = new Matrix4(),
+ a = new Matrix4(),
+ o = new Matrix4(),
+ s = new Matrix4(),
+ l = new Matrix4(),
+ u = new Matrix4(),
+ c = new Matrix4(),
+ f = new Matrix4(),
+ d = new Matrix4(),
+ h = e.inheritType ? e.inheritType : 0;
+ if (
+ (e.translation && t.setPosition(Jc.fromArray(e.translation)),
+ e.preRotation)
+ ) {
+ var p = e.preRotation.map(MathUtils.degToRad);
+ p.push(e.eulerOrder), n.makeRotationFromEuler(qc.fromArray(p));
+ }
+ if (e.rotation) {
+ var v = e.rotation.map(MathUtils.degToRad);
+ v.push(e.eulerOrder), r.makeRotationFromEuler(qc.fromArray(v));
+ }
+ if (e.postRotation) {
+ var m = e.postRotation.map(MathUtils.degToRad);
+ m.push(e.eulerOrder),
+ i.makeRotationFromEuler(qc.fromArray(m)),
+ i.invert();
+ }
+ e.scale && a.scale(Jc.fromArray(e.scale)),
+ e.scalingOffset && s.setPosition(Jc.fromArray(e.scalingOffset)),
+ e.scalingPivot && o.setPosition(Jc.fromArray(e.scalingPivot)),
+ e.rotationOffset && l.setPosition(Jc.fromArray(e.rotationOffset)),
+ e.rotationPivot && u.setPosition(Jc.fromArray(e.rotationPivot)),
+ e.parentMatrixWorld &&
+ (f.copy(e.parentMatrix), c.copy(e.parentMatrixWorld));
+ var g = n.clone().multiply(r).multiply(i),
+ A = new Matrix4();
+ A.extractRotation(c);
+ var y = new Matrix4();
+ y.copyPosition(c);
+ var b = y.clone().invert().multiply(c),
+ x = A.clone().invert().multiply(b),
+ S = a,
+ E = new Matrix4();
+ if (0 === h) E.copy(A).multiply(g).multiply(x).multiply(S);
+ else if (1 === h) E.copy(A).multiply(x).multiply(g).multiply(S);
+ else {
+ var _ = new Matrix4()
+ .scale(new Vector3().setFromMatrixScale(f))
+ .clone()
+ .invert(),
+ C = x.clone().multiply(_);
+ E.copy(A).multiply(g).multiply(C).multiply(S);
+ }
+ var w = u.clone().invert(),
+ T = o.clone().invert(),
+ M = t
+ .clone()
+ .multiply(l)
+ .multiply(u)
+ .multiply(n)
+ .multiply(r)
+ .multiply(i)
+ .multiply(w)
+ .multiply(s)
+ .multiply(o)
+ .multiply(a)
+ .multiply(T),
+ I = new Matrix4().copyPosition(M),
+ k = c.clone().multiply(I);
+ return (
+ d.copyPosition(k),
+ (M = d.clone().multiply(E)).premultiply(c.invert()),
+ M
+ );
+ }
+ function $c(e) {
+ var t = ["ZYX", "YZX", "XZY", "ZXY", "YXZ", "XYZ"];
+ return 6 === (e = e || 0)
+ ? (console.warn(
+ "THREE.FBXLoader: unsupported Euler Order: Spherical XYZ. Animations and rotations may be incorrect."
+ ),
+ t[0])
+ : t[e];
+ }
+ function ef(e) {
+ return e.split(",").map(function (e) {
+ return parseFloat(e);
+ });
+ }
+ function tf(e, t, n) {
+ return (
+ void 0 === t && (t = 0),
+ void 0 === n && (n = e.byteLength),
+ LoaderUtils.decodeText(new Uint8Array(e, t, n))
+ );
+ }
+ function nf(e, t) {
+ for (var n = 0, r = e.length, i = t.length; n < i; n++, r++)
+ e[r] = t[n];
+ }
+ function rf(e, t, n, r) {
+ for (var i = n, a = 0; i < r; i++, a++) e[a] = t[i];
+ return e;
+ }
+ function af(e, t, n) {
+ return e.slice(0, t).concat(n).concat(e.slice(t));
+ }
+ var of = null,
+ sf = (function () {
+ function e(t) {
+ (0, p.Z)(this, e), M(this, "data"), (this.data = t);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "generateShapes",
+ value: function (e) {
+ for (
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 100,
+ n = arguments.length > 2 ? arguments[2] : void 0,
+ r = [],
+ i = (0, s.Z)({ letterSpacing: 0, lineHeight: 1 }, n),
+ a = lf(e, t, this.data, i),
+ o = 0,
+ l = a.length;
+ o < l;
+ o++
+ )
+ Array.prototype.push.apply(r, a[o].toShapes(!1));
+ return r;
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function lf(e, t, n, r) {
+ for (
+ var i = Array.from(e),
+ a = t / n.resolution,
+ o =
+ (n.boundingBox.yMax -
+ n.boundingBox.yMin +
+ n.underlineThickness) *
+ a,
+ s = [],
+ l = 0,
+ u = 0,
+ c = 0;
+ c < i.length;
+ c++
+ ) {
+ var f = i[c];
+ if ("\n" === f) (l = 0), (u -= o * r.lineHeight);
+ else {
+ var d = uf(f, a, l, u, n);
+ d && ((l += d.offsetX + r.letterSpacing), s.push(d.path));
+ }
+ }
+ return s;
+ }
+ function uf(e, t, n, r, i) {
+ var a = i.glyphs[e] || i.glyphs["?"];
+ if (a) {
+ var o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p = new A.ShapePath();
+ if (a.o)
+ for (
+ var v = a._cachedOutline || (a._cachedOutline = a.o.split(" ")),
+ m = 0,
+ g = v.length;
+ m < g;
+
+ ) {
+ switch (v[m++]) {
+ case "m":
+ (o = parseInt(v[m++]) * t + n),
+ (s = parseInt(v[m++]) * t + r),
+ p.moveTo(o, s);
+ break;
+ case "l":
+ (o = parseInt(v[m++]) * t + n),
+ (s = parseInt(v[m++]) * t + r),
+ p.lineTo(o, s);
+ break;
+ case "q":
+ (l = parseInt(v[m++]) * t + n),
+ (u = parseInt(v[m++]) * t + r),
+ (c = parseInt(v[m++]) * t + n),
+ (f = parseInt(v[m++]) * t + r),
+ p.quadraticCurveTo(c, f, l, u);
+ break;
+ case "b":
+ (l = parseInt(v[m++]) * t + n),
+ (u = parseInt(v[m++]) * t + r),
+ (c = parseInt(v[m++]) * t + n),
+ (f = parseInt(v[m++]) * t + r),
+ (d = parseInt(v[m++]) * t + n),
+ (h = parseInt(v[m++]) * t + r),
+ p.bezierCurveTo(c, f, d, h, l, u);
+ }
+ }
+ return { offsetX: a.ha * t, path: p };
+ }
+ console.error(
+ 'THREE.Font: character "' +
+ e +
+ '" does not exists in font family ' +
+ i.familyName +
+ "."
+ );
+ }
+ var cf = null,
+ ff = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : null,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.call(this, null)).isData3DTexture = !0),
+ (e.image = { data: r, width: i, height: a, depth: o }),
+ (e.magFilter = A.NearestFilter),
+ (e.minFilter = A.NearestFilter),
+ (e.wrapR = A.ClampToEdgeWrapping),
+ (e.generateMipmaps = !1),
+ (e.flipY = !1),
+ (e.unpackAlignment = 1),
+ e
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.Texture),
+ df = null,
+ hf = null,
+ pf = {
+ type: function (e) {
+ switch (e) {
+ case "uchar":
+ case "unsigned char":
+ case "uint8":
+ case "uint8_t":
+ this.__array = Uint8Array;
+ break;
+ case "signed char":
+ case "int8":
+ case "int8_t":
+ this.__array = Int8Array;
+ break;
+ case "short":
+ case "short int":
+ case "signed short":
+ case "signed short int":
+ case "int16":
+ case "int16_t":
+ this.__array = Int16Array;
+ break;
+ case "ushort":
+ case "unsigned short":
+ case "unsigned short int":
+ case "uint16":
+ case "uint16_t":
+ this.__array = Uint16Array;
+ break;
+ case "int":
+ case "signed int":
+ case "int32":
+ case "int32_t":
+ this.__array = Int32Array;
+ break;
+ case "uint":
+ case "unsigned int":
+ case "uint32":
+ case "uint32_t":
+ this.__array = Uint32Array;
+ break;
+ case "float":
+ this.__array = Float32Array;
+ break;
+ case "double":
+ this.__array = Float64Array;
+ break;
+ default:
+ throw new Error("Unsupported NRRD data type: " + e);
+ }
+ return (this.type = e);
+ },
+ endian: function (e) {
+ return (this.endian = e);
+ },
+ encoding: function (e) {
+ return (this.encoding = e);
+ },
+ dimension: function (e) {
+ return (this.dim = parseInt(e, 10));
+ },
+ sizes: function (e) {
+ var t;
+ return (this.sizes = (function () {
+ for (
+ var n = e.split(/\s+/), r = [], i = 0, a = n.length;
+ i < a;
+ i++
+ )
+ (t = n[i]), r.push(parseInt(t, 10));
+ return r;
+ })());
+ },
+ space: function (e) {
+ return (this.space = e);
+ },
+ "space origin": function (e) {
+ return (this.space_origin = e
+ .split("(")[1]
+ .split(")")[0]
+ .split(","));
+ },
+ "space directions": function (e) {
+ var t,
+ n,
+ r = e.match(/\(.*?\)/g);
+ return (this.vectors = (function () {
+ for (var e = [], i = 0, a = r.length; i < a; i++)
+ (n = r[i]),
+ e.push(
+ (function () {
+ for (
+ var e = n.slice(1, -1).split(/,/),
+ r = [],
+ i = 0,
+ a = e.length;
+ i < a;
+ i++
+ )
+ (t = e[i]), r.push(parseFloat(t));
+ return r;
+ })()
+ );
+ return e;
+ })());
+ },
+ spacings: function (e) {
+ var t,
+ n = e.split(/\s+/);
+ return (this.spacings = (function () {
+ for (var e = [], r = 0, i = n.length; r < i; r++)
+ (t = n[r]), e.push(parseFloat(t));
+ return e;
+ })());
+ },
+ },
+ vf = null,
+ mf = null,
+ gf = null,
+ Af = null,
+ yf = null,
+ bf = null,
+ xf = null,
+ Sf = null,
+ Ef = (function () {
+ var e =
+ "object" == typeof global &&
+ global &&
+ global.Object === Object &&
+ global,
+ t =
+ "object" == typeof self &&
+ self &&
+ self.Object === Object &&
+ self,
+ n = e || t || Function("return this")(),
+ a = n.Symbol,
+ o = Object.prototype,
+ s = o.hasOwnProperty,
+ l = o.toString,
+ u = a ? a.toStringTag : void 0;
+ var c = Object.prototype.toString;
+ var A = "[object Null]",
+ y = "[object Undefined]",
+ b = a ? a.toStringTag : void 0;
+ function x(e) {
+ return null == e
+ ? void 0 === e
+ ? y
+ : A
+ : b && b in Object(e)
+ ? (function (e) {
+ var t = s.call(e, u),
+ n = e[u];
+ try {
+ e[u] = void 0;
+ var r = !0;
+ } catch (a) {}
+ var i = l.call(e);
+ return r && (t ? (e[u] = n) : delete e[u]), i;
+ })(e)
+ : (function (e) {
+ return c.call(e);
+ })(e);
+ }
+ function S(e) {
+ return null != e && "object" == typeof e;
+ }
+ var E = "[object Symbol]";
+ function _(e) {
+ return "symbol" == typeof e || (S(e) && x(e) == E);
+ }
+ function C(e, t) {
+ for (
+ var n = -1, r = null == e ? 0 : e.length, i = Array(r);
+ ++n < r;
+
+ )
+ i[n] = t(e[n], n, e);
+ return i;
+ }
+ var w = Array.isArray,
+ T = 1 / 0,
+ M = a ? a.prototype : void 0,
+ I = M ? M.toString : void 0;
+ function k(e) {
+ if ("string" == typeof e) return e;
+ if (w(e)) return C(e, k) + "";
+ if (_(e)) return I ? I.call(e) : "";
+ var t = e + "";
+ return "0" == t && 1 / e == -T ? "-0" : t;
+ }
+ var R = /\s/;
+ var B = /^\s+/;
+ function P(e) {
+ return e
+ ? e
+ .slice(
+ 0,
+ (function (e) {
+ for (var t = e.length; t-- && R.test(e.charAt(t)); );
+ return t;
+ })(e) + 1
+ )
+ .replace(B, "")
+ : e;
+ }
+ function L(e) {
+ var t = typeof e;
+ return null != e && ("object" == t || "function" == t);
+ }
+ var D = NaN,
+ U = /^[-+]0x[0-9a-f]+$/i,
+ F = /^0b[01]+$/i,
+ O = /^0o[0-7]+$/i,
+ N = parseInt;
+ var G = 1 / 0,
+ Z = 17976931348623157e292;
+ function z(e) {
+ return e
+ ? (e = (function (e) {
+ if ("number" == typeof e) return e;
+ if (_(e)) return D;
+ if (L(e)) {
+ var t = "function" == typeof e.valueOf ? e.valueOf() : e;
+ e = L(t) ? t + "" : t;
+ }
+ if ("string" != typeof e) return 0 === e ? e : +e;
+ e = P(e);
+ var n = F.test(e);
+ return n || O.test(e)
+ ? N(e.slice(2), n ? 2 : 8)
+ : U.test(e)
+ ? D
+ : +e;
+ })(e)) === G || e === -G
+ ? (e < 0 ? -1 : 1) * Z
+ : e === e
+ ? e
+ : 0
+ : 0 === e
+ ? e
+ : 0;
+ }
+ function Q(e) {
+ var t = z(e),
+ n = t % 1;
+ return t === t ? (n ? t - n : t) : 0;
+ }
+ function H(e) {
+ return e;
+ }
+ var V = "[object AsyncFunction]",
+ j = "[object Function]",
+ W = "[object GeneratorFunction]",
+ X = "[object Proxy]";
+ function Y(e) {
+ if (!L(e)) return !1;
+ var t = x(e);
+ return t == j || t == W || t == V || t == X;
+ }
+ var q = n["__core-js_shared__"],
+ J = (function () {
+ var e = /[^.]+$/.exec((q && q.keys && q.keys.IE_PROTO) || "");
+ return e ? "Symbol(src)_1." + e : "";
+ })();
+ var K = Function.prototype.toString;
+ function $(e) {
+ if (null != e) {
+ try {
+ return K.call(e);
+ } catch (t) {}
+ try {
+ return e + "";
+ } catch (t) {}
+ }
+ return "";
+ }
+ var ee = /^\[object .+?Constructor\]$/,
+ te = Function.prototype,
+ ne = Object.prototype,
+ re = te.toString,
+ ie = ne.hasOwnProperty,
+ ae = RegExp(
+ "^" +
+ re
+ .call(ie)
+ .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")
+ .replace(
+ /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,
+ "$1.*?"
+ ) +
+ "$"
+ );
+ function oe(e) {
+ return (
+ !(!L(e) || ((t = e), J && J in t)) &&
+ (Y(e) ? ae : ee).test($(e))
+ );
+ var t;
+ }
+ function se(e, t) {
+ var n = (function (e, t) {
+ return null == e ? void 0 : e[t];
+ })(e, t);
+ return oe(n) ? n : void 0;
+ }
+ var le = se(n, "WeakMap"),
+ ue = Object.create,
+ ce = (function () {
+ function e() {}
+ return function (t) {
+ if (!L(t)) return {};
+ if (ue) return ue(t);
+ e.prototype = t;
+ var n = new e();
+ return (e.prototype = void 0), n;
+ };
+ })();
+ function fe() {}
+ var de = Date.now;
+ var he = (function () {
+ try {
+ var e = se(Object, "defineProperty");
+ return e({}, "", {}), e;
+ } catch (t) {}
+ })(),
+ pe = (function (e) {
+ var t = 0,
+ n = 0;
+ return function () {
+ var r = de(),
+ i = 16 - (r - n);
+ if (((n = r), i > 0)) {
+ if (++t >= 800) return arguments[0];
+ } else t = 0;
+ return e.apply(void 0, arguments);
+ };
+ })(
+ he
+ ? function (e, t) {
+ return he(e, "toString", {
+ configurable: !0,
+ enumerable: !1,
+ value:
+ ((n = t),
+ function () {
+ return n;
+ }),
+ writable: !0,
+ });
+ var n;
+ }
+ : H
+ ),
+ ve = pe;
+ function me(e, t) {
+ for (
+ var n = -1, r = null == e ? 0 : e.length;
+ ++n < r && !1 !== t(e[n], n, e);
+
+ );
+ return e;
+ }
+ function ge(e, t, n, r) {
+ for (var i = e.length, a = n + (r ? 1 : -1); r ? a-- : ++a < i; )
+ if (t(e[a], a, e)) return a;
+ return -1;
+ }
+ function Ae(e) {
+ return e !== e;
+ }
+ function ye(e, t, n) {
+ return t === t
+ ? (function (e, t, n) {
+ for (var r = n - 1, i = e.length; ++r < i; )
+ if (e[r] === t) return r;
+ return -1;
+ })(e, t, n)
+ : ge(e, Ae, n);
+ }
+ function be(e, t) {
+ return !!(null == e ? 0 : e.length) && ye(e, t, 0) > -1;
+ }
+ var xe = 9007199254740991,
+ Se = /^(?:0|[1-9]\d*)$/;
+ function Ee(e, t) {
+ var n = typeof e;
+ return (
+ !!(t = null == t ? xe : t) &&
+ ("number" == n || ("symbol" != n && Se.test(e))) &&
+ e > -1 &&
+ e % 1 == 0 &&
+ e < t
+ );
+ }
+ function _e(e, t, n) {
+ "__proto__" == t && he
+ ? he(e, t, {
+ configurable: !0,
+ enumerable: !0,
+ value: n,
+ writable: !0,
+ })
+ : (e[t] = n);
+ }
+ function Ce(e, t) {
+ return e === t || (e !== e && t !== t);
+ }
+ var we = Object.prototype.hasOwnProperty;
+ function Te(e, t, n) {
+ var r = e[t];
+ (we.call(e, t) && Ce(r, n) && (void 0 !== n || t in e)) ||
+ _e(e, t, n);
+ }
+ function Me(e, t, n, r) {
+ var i = !n;
+ n || (n = {});
+ for (var a = -1, o = t.length; ++a < o; ) {
+ var s = t[a],
+ l = r ? r(n[s], e[s], s, n, e) : void 0;
+ void 0 === l && (l = e[s]), i ? _e(n, s, l) : Te(n, s, l);
+ }
+ return n;
+ }
+ var Ie = Math.max;
+ function ke(e, t) {
+ return ve(
+ (function (e, t, n) {
+ return (
+ (t = Ie(void 0 === t ? e.length - 1 : t, 0)),
+ function () {
+ for (
+ var r = arguments,
+ i = -1,
+ a = Ie(r.length - t, 0),
+ o = Array(a);
+ ++i < a;
+
+ )
+ o[i] = r[t + i];
+ i = -1;
+ for (var s = Array(t + 1); ++i < t; ) s[i] = r[i];
+ return (
+ (s[t] = n(o)),
+ (function (e, t, n) {
+ switch (n.length) {
+ case 0:
+ return e.call(t);
+ case 1:
+ return e.call(t, n[0]);
+ case 2:
+ return e.call(t, n[0], n[1]);
+ case 3:
+ return e.call(t, n[0], n[1], n[2]);
+ }
+ return e.apply(t, n);
+ })(e, this, s)
+ );
+ }
+ );
+ })(e, t, H),
+ e + ""
+ );
+ }
+ var Re = 9007199254740991;
+ function Be(e) {
+ return "number" == typeof e && e > -1 && e % 1 == 0 && e <= Re;
+ }
+ function Pe(e) {
+ return null != e && Be(e.length) && !Y(e);
+ }
+ function Le(e, t, n) {
+ if (!L(n)) return !1;
+ var r = typeof t;
+ return (
+ !!("number" == r
+ ? Pe(n) && Ee(t, n.length)
+ : "string" == r && t in n) && Ce(n[t], e)
+ );
+ }
+ var De = Object.prototype;
+ function Ue(e) {
+ var t = e && e.constructor;
+ return e === (("function" == typeof t && t.prototype) || De);
+ }
+ function Fe(e) {
+ return S(e) && "[object Arguments]" == x(e);
+ }
+ var Oe = Object.prototype,
+ Ne = Oe.hasOwnProperty,
+ Ge = Oe.propertyIsEnumerable,
+ Ze = Fe(
+ (function () {
+ return arguments;
+ })()
+ )
+ ? Fe
+ : function (e) {
+ return (
+ S(e) && Ne.call(e, "callee") && !Ge.call(e, "callee")
+ );
+ },
+ ze = Ze;
+ var Qe =
+ "object" == typeof exports &&
+ exports &&
+ !exports.nodeType &&
+ exports,
+ He =
+ Qe &&
+ "object" == typeof module &&
+ module &&
+ !module.nodeType &&
+ module,
+ Ve = He && He.exports === Qe ? n.Buffer : void 0,
+ je =
+ (Ve ? Ve.isBuffer : void 0) ||
+ function () {
+ return !1;
+ },
+ We = {};
+ function Xe(e) {
+ return function (t) {
+ return e(t);
+ };
+ }
+ (We["[object Float32Array]"] =
+ We["[object Float64Array]"] =
+ We["[object Int8Array]"] =
+ We["[object Int16Array]"] =
+ We["[object Int32Array]"] =
+ We["[object Uint8Array]"] =
+ We["[object Uint8ClampedArray]"] =
+ We["[object Uint16Array]"] =
+ We["[object Uint32Array]"] =
+ !0),
+ (We["[object Arguments]"] =
+ We["[object Array]"] =
+ We["[object ArrayBuffer]"] =
+ We["[object Boolean]"] =
+ We["[object DataView]"] =
+ We["[object Date]"] =
+ We["[object Error]"] =
+ We["[object Function]"] =
+ We["[object Map]"] =
+ We["[object Number]"] =
+ We["[object Object]"] =
+ We["[object RegExp]"] =
+ We["[object Set]"] =
+ We["[object String]"] =
+ We["[object WeakMap]"] =
+ !1);
+ var Ye =
+ "object" == typeof exports &&
+ exports &&
+ !exports.nodeType &&
+ exports,
+ qe =
+ Ye &&
+ "object" == typeof module &&
+ module &&
+ !module.nodeType &&
+ module,
+ Je = qe && qe.exports === Ye && e.process,
+ Ke = (function () {
+ try {
+ var e = qe && qe.require && qe.require("util").types;
+ return e || (Je && Je.binding && Je.binding("util"));
+ } catch (t) {}
+ })(),
+ $e = Ke && Ke.isTypedArray,
+ et = $e
+ ? Xe($e)
+ : function (e) {
+ return S(e) && Be(e.length) && !!We[x(e)];
+ },
+ tt = Object.prototype.hasOwnProperty;
+ function nt(e, t) {
+ var n = w(e),
+ r = !n && ze(e),
+ i = !n && !r && je(e),
+ a = !n && !r && !i && et(e),
+ o = n || r || i || a,
+ s = o
+ ? (function (e, t) {
+ for (var n = -1, r = Array(e); ++n < e; ) r[n] = t(n);
+ return r;
+ })(e.length, String)
+ : [],
+ l = s.length;
+ for (var u in e)
+ (!t && !tt.call(e, u)) ||
+ (o &&
+ ("length" == u ||
+ (i && ("offset" == u || "parent" == u)) ||
+ (a &&
+ ("buffer" == u ||
+ "byteLength" == u ||
+ "byteOffset" == u)) ||
+ Ee(u, l))) ||
+ s.push(u);
+ return s;
+ }
+ function rt(e, t) {
+ return function (n) {
+ return e(t(n));
+ };
+ }
+ var it = rt(Object.keys, Object),
+ at = Object.prototype.hasOwnProperty;
+ function ot(e) {
+ if (!Ue(e)) return it(e);
+ var t = [];
+ for (var n in Object(e))
+ at.call(e, n) && "constructor" != n && t.push(n);
+ return t;
+ }
+ function st(e) {
+ return Pe(e) ? nt(e) : ot(e);
+ }
+ var lt,
+ ut = Object.prototype.hasOwnProperty,
+ ct =
+ ((lt = function (e, t) {
+ if (Ue(t) || Pe(t)) Me(t, st(t), e);
+ else for (var n in t) ut.call(t, n) && Te(e, n, t[n]);
+ }),
+ ke(function (e, t) {
+ var n = -1,
+ r = t.length,
+ i = r > 1 ? t[r - 1] : void 0,
+ a = r > 2 ? t[2] : void 0;
+ for (
+ i =
+ lt.length > 3 && "function" == typeof i
+ ? (r--, i)
+ : void 0,
+ a &&
+ Le(t[0], t[1], a) &&
+ ((i = r < 3 ? void 0 : i), (r = 1)),
+ e = Object(e);
+ ++n < r;
+
+ ) {
+ var o = t[n];
+ o && lt(e, o, n, i);
+ }
+ return e;
+ }));
+ var ft = Object.prototype.hasOwnProperty;
+ function dt(e) {
+ if (!L(e))
+ return (function (e) {
+ var t = [];
+ if (null != e) for (var n in Object(e)) t.push(n);
+ return t;
+ })(e);
+ var t = Ue(e),
+ n = [];
+ for (var r in e)
+ ("constructor" != r || (!t && ft.call(e, r))) && n.push(r);
+ return n;
+ }
+ function ht(e) {
+ return Pe(e) ? nt(e, !0) : dt(e);
+ }
+ var pt = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
+ vt = /^\w*$/;
+ function mt(e, t) {
+ if (w(e)) return !1;
+ var n = typeof e;
+ return (
+ !(
+ "number" != n &&
+ "symbol" != n &&
+ "boolean" != n &&
+ null != e &&
+ !_(e)
+ ) ||
+ vt.test(e) ||
+ !pt.test(e) ||
+ (null != t && e in Object(t))
+ );
+ }
+ var gt = se(Object, "create");
+ var At = Object.prototype.hasOwnProperty;
+ var yt = Object.prototype.hasOwnProperty;
+ function bt(e) {
+ var t = -1,
+ n = null == e ? 0 : e.length;
+ for (this.clear(); ++t < n; ) {
+ var r = e[t];
+ this.set(r[0], r[1]);
+ }
+ }
+ function xt(e, t) {
+ for (var n = e.length; n--; ) if (Ce(e[n][0], t)) return n;
+ return -1;
+ }
+ (bt.prototype.clear = function () {
+ (this.__data__ = gt ? gt(null) : {}), (this.size = 0);
+ }),
+ (bt.prototype.delete = function (e) {
+ var t = this.has(e) && delete this.__data__[e];
+ return (this.size -= t ? 1 : 0), t;
+ }),
+ (bt.prototype.get = function (e) {
+ var t = this.__data__;
+ if (gt) {
+ var n = t[e];
+ return "__lodash_hash_undefined__" === n ? void 0 : n;
+ }
+ return At.call(t, e) ? t[e] : void 0;
+ }),
+ (bt.prototype.has = function (e) {
+ var t = this.__data__;
+ return gt ? void 0 !== t[e] : yt.call(t, e);
+ }),
+ (bt.prototype.set = function (e, t) {
+ var n = this.__data__;
+ return (
+ (this.size += this.has(e) ? 0 : 1),
+ (n[e] = gt && void 0 === t ? "__lodash_hash_undefined__" : t),
+ this
+ );
+ });
+ var St = Array.prototype.splice;
+ function Et(e) {
+ var t = -1,
+ n = null == e ? 0 : e.length;
+ for (this.clear(); ++t < n; ) {
+ var r = e[t];
+ this.set(r[0], r[1]);
+ }
+ }
+ (Et.prototype.clear = function () {
+ (this.__data__ = []), (this.size = 0);
+ }),
+ (Et.prototype.delete = function (e) {
+ var t = this.__data__,
+ n = xt(t, e);
+ return (
+ !(n < 0) &&
+ (n == t.length - 1 ? t.pop() : St.call(t, n, 1),
+ --this.size,
+ !0)
+ );
+ }),
+ (Et.prototype.get = function (e) {
+ var t = this.__data__,
+ n = xt(t, e);
+ return n < 0 ? void 0 : t[n][1];
+ }),
+ (Et.prototype.has = function (e) {
+ return xt(this.__data__, e) > -1;
+ }),
+ (Et.prototype.set = function (e, t) {
+ var n = this.__data__,
+ r = xt(n, e);
+ return (
+ r < 0 ? (++this.size, n.push([e, t])) : (n[r][1] = t), this
+ );
+ });
+ var _t = se(n, "Map");
+ function Ct(e, t) {
+ var n = e.__data__;
+ return (function (e) {
+ var t = typeof e;
+ return "string" == t ||
+ "number" == t ||
+ "symbol" == t ||
+ "boolean" == t
+ ? "__proto__" !== e
+ : null === e;
+ })(t)
+ ? n["string" == typeof t ? "string" : "hash"]
+ : n.map;
+ }
+ function wt(e) {
+ var t = -1,
+ n = null == e ? 0 : e.length;
+ for (this.clear(); ++t < n; ) {
+ var r = e[t];
+ this.set(r[0], r[1]);
+ }
+ }
+ (wt.prototype.clear = function () {
+ (this.size = 0),
+ (this.__data__ = {
+ hash: new bt(),
+ map: new (_t || Et)(),
+ string: new bt(),
+ });
+ }),
+ (wt.prototype.delete = function (e) {
+ var t = Ct(this, e).delete(e);
+ return (this.size -= t ? 1 : 0), t;
+ }),
+ (wt.prototype.get = function (e) {
+ return Ct(this, e).get(e);
+ }),
+ (wt.prototype.has = function (e) {
+ return Ct(this, e).has(e);
+ }),
+ (wt.prototype.set = function (e, t) {
+ var n = Ct(this, e),
+ r = n.size;
+ return n.set(e, t), (this.size += n.size == r ? 0 : 1), this;
+ });
+ var Tt = "Expected a function";
+ function Mt(e, t) {
+ if (
+ "function" != typeof e ||
+ (null != t && "function" != typeof t)
+ )
+ throw new TypeError(Tt);
+ var n = function n() {
+ var r = arguments,
+ i = t ? t.apply(this, r) : r[0],
+ a = n.cache;
+ if (a.has(i)) return a.get(i);
+ var o = e.apply(this, r);
+ return (n.cache = a.set(i, o) || a), o;
+ };
+ return (n.cache = new (Mt.Cache || wt)()), n;
+ }
+ Mt.Cache = wt;
+ var It =
+ /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,
+ kt = /\\(\\)?/g,
+ Rt = (function (e) {
+ var t = Mt(e, function (e) {
+ return 500 === n.size && n.clear(), e;
+ }),
+ n = t.cache;
+ return t;
+ })(function (e) {
+ var t = [];
+ return (
+ 46 === e.charCodeAt(0) && t.push(""),
+ e.replace(It, function (e, n, r, i) {
+ t.push(r ? i.replace(kt, "$1") : n || e);
+ }),
+ t
+ );
+ });
+ function Bt(e, t) {
+ return w(e)
+ ? e
+ : mt(e, t)
+ ? [e]
+ : Rt(
+ (function (e) {
+ return null == e ? "" : k(e);
+ })(e)
+ );
+ }
+ var Pt = 1 / 0;
+ function Lt(e) {
+ if ("string" == typeof e || _(e)) return e;
+ var t = e + "";
+ return "0" == t && 1 / e == -Pt ? "-0" : t;
+ }
+ function Dt(e, t) {
+ for (var n = 0, r = (t = Bt(t, e)).length; null != e && n < r; )
+ e = e[Lt(t[n++])];
+ return n && n == r ? e : void 0;
+ }
+ function Ut(e, t) {
+ for (var n = -1, r = t.length, i = e.length; ++n < r; )
+ e[i + n] = t[n];
+ return e;
+ }
+ var Ft = a ? a.isConcatSpreadable : void 0;
+ function Ot(e) {
+ return w(e) || ze(e) || !!(Ft && e && e[Ft]);
+ }
+ function Nt(e, t, n, r, i) {
+ var a = -1,
+ o = e.length;
+ for (n || (n = Ot), i || (i = []); ++a < o; ) {
+ var s = e[a];
+ t > 0 && n(s)
+ ? t > 1
+ ? Nt(s, t - 1, n, r, i)
+ : Ut(i, s)
+ : r || (i[i.length] = s);
+ }
+ return i;
+ }
+ function Gt(e) {
+ return (null == e ? 0 : e.length) ? Nt(e, 1) : [];
+ }
+ var Zt = rt(Object.getPrototypeOf, Object);
+ function zt(e, t, n) {
+ var r = -1,
+ i = e.length;
+ t < 0 && (t = -t > i ? 0 : i + t),
+ (n = n > i ? i : n) < 0 && (n += i),
+ (i = t > n ? 0 : (n - t) >>> 0),
+ (t >>>= 0);
+ for (var a = Array(i); ++r < i; ) a[r] = e[r + t];
+ return a;
+ }
+ function Qt(e, t, n, r) {
+ var i = -1,
+ a = null == e ? 0 : e.length;
+ for (r && a && (n = e[++i]); ++i < a; ) n = t(n, e[i], i, e);
+ return n;
+ }
+ function Ht(e) {
+ var t = (this.__data__ = new Et(e));
+ this.size = t.size;
+ }
+ (Ht.prototype.clear = function () {
+ (this.__data__ = new Et()), (this.size = 0);
+ }),
+ (Ht.prototype.delete = function (e) {
+ var t = this.__data__,
+ n = t.delete(e);
+ return (this.size = t.size), n;
+ }),
+ (Ht.prototype.get = function (e) {
+ return this.__data__.get(e);
+ }),
+ (Ht.prototype.has = function (e) {
+ return this.__data__.has(e);
+ }),
+ (Ht.prototype.set = function (e, t) {
+ var n = this.__data__;
+ if (n instanceof Et) {
+ var r = n.__data__;
+ if (!_t || r.length < 199)
+ return r.push([e, t]), (this.size = ++n.size), this;
+ n = this.__data__ = new wt(r);
+ }
+ return n.set(e, t), (this.size = n.size), this;
+ });
+ var Vt =
+ "object" == typeof exports &&
+ exports &&
+ !exports.nodeType &&
+ exports,
+ jt =
+ Vt &&
+ "object" == typeof module &&
+ module &&
+ !module.nodeType &&
+ module,
+ Wt = jt && jt.exports === Vt ? n.Buffer : void 0,
+ Xt = Wt ? Wt.allocUnsafe : void 0;
+ function Yt(e, t) {
+ for (
+ var n = -1, r = null == e ? 0 : e.length, i = 0, a = [];
+ ++n < r;
+
+ ) {
+ var o = e[n];
+ t(o, n, e) && (a[i++] = o);
+ }
+ return a;
+ }
+ function qt() {
+ return [];
+ }
+ var Jt = Object.prototype.propertyIsEnumerable,
+ Kt = Object.getOwnPropertySymbols,
+ $t = Kt
+ ? function (e) {
+ return null == e
+ ? []
+ : ((e = Object(e)),
+ Yt(Kt(e), function (t) {
+ return Jt.call(e, t);
+ }));
+ }
+ : qt;
+ var en = Object.getOwnPropertySymbols
+ ? function (e) {
+ for (var t = []; e; ) Ut(t, $t(e)), (e = Zt(e));
+ return t;
+ }
+ : qt;
+ function tn(e, t, n) {
+ var r = t(e);
+ return w(e) ? r : Ut(r, n(e));
+ }
+ function nn(e) {
+ return tn(e, st, $t);
+ }
+ function rn(e) {
+ return tn(e, ht, en);
+ }
+ var an = se(n, "DataView"),
+ on = se(n, "Promise"),
+ sn = se(n, "Set"),
+ ln = "[object Map]",
+ un = "[object Promise]",
+ cn = "[object Set]",
+ fn = "[object WeakMap]",
+ dn = "[object DataView]",
+ hn = $(an),
+ pn = $(_t),
+ vn = $(on),
+ mn = $(sn),
+ gn = $(le),
+ An = x;
+ ((an && An(new an(new ArrayBuffer(1))) != dn) ||
+ (_t && An(new _t()) != ln) ||
+ (on && An(on.resolve()) != un) ||
+ (sn && An(new sn()) != cn) ||
+ (le && An(new le()) != fn)) &&
+ (An = function (e) {
+ var t = x(e),
+ n = "[object Object]" == t ? e.constructor : void 0,
+ r = n ? $(n) : "";
+ if (r)
+ switch (r) {
+ case hn:
+ return dn;
+ case pn:
+ return ln;
+ case vn:
+ return un;
+ case mn:
+ return cn;
+ case gn:
+ return fn;
+ }
+ return t;
+ });
+ var yn = An,
+ bn = Object.prototype.hasOwnProperty;
+ var xn = n.Uint8Array;
+ function Sn(e) {
+ var t = new e.constructor(e.byteLength);
+ return new xn(t).set(new xn(e)), t;
+ }
+ var En = /\w*$/;
+ var _n = a ? a.prototype : void 0,
+ Cn = _n ? _n.valueOf : void 0;
+ var wn = "[object Boolean]",
+ Tn = "[object Date]",
+ Mn = "[object Map]",
+ In = "[object Number]",
+ kn = "[object RegExp]",
+ Rn = "[object Set]",
+ Bn = "[object String]",
+ Pn = "[object Symbol]",
+ Ln = "[object ArrayBuffer]",
+ Dn = "[object DataView]",
+ Un = "[object Float32Array]",
+ Fn = "[object Float64Array]",
+ On = "[object Int8Array]",
+ Nn = "[object Int16Array]",
+ Gn = "[object Int32Array]",
+ Zn = "[object Uint8Array]",
+ zn = "[object Uint8ClampedArray]",
+ Qn = "[object Uint16Array]",
+ Hn = "[object Uint32Array]";
+ function Vn(e, t, n) {
+ var r,
+ i = e.constructor;
+ switch (t) {
+ case Ln:
+ return Sn(e);
+ case wn:
+ case Tn:
+ return new i(+e);
+ case Dn:
+ return (function (e, t) {
+ var n = t ? Sn(e.buffer) : e.buffer;
+ return new e.constructor(n, e.byteOffset, e.byteLength);
+ })(e, n);
+ case Un:
+ case Fn:
+ case On:
+ case Nn:
+ case Gn:
+ case Zn:
+ case zn:
+ case Qn:
+ case Hn:
+ return (function (e, t) {
+ var n = t ? Sn(e.buffer) : e.buffer;
+ return new e.constructor(n, e.byteOffset, e.length);
+ })(e, n);
+ case Mn:
+ return new i();
+ case In:
+ case Bn:
+ return new i(e);
+ case kn:
+ return (function (e) {
+ var t = new e.constructor(e.source, En.exec(e));
+ return (t.lastIndex = e.lastIndex), t;
+ })(e);
+ case Rn:
+ return new i();
+ case Pn:
+ return (r = e), Cn ? Object(Cn.call(r)) : {};
+ }
+ }
+ var jn = Ke && Ke.isMap,
+ Wn = jn
+ ? Xe(jn)
+ : function (e) {
+ return S(e) && "[object Map]" == yn(e);
+ };
+ var Xn = Ke && Ke.isSet,
+ Yn = Xn
+ ? Xe(Xn)
+ : function (e) {
+ return S(e) && "[object Set]" == yn(e);
+ },
+ qn = 1,
+ Jn = 2,
+ Kn = 4,
+ $n = "[object Arguments]",
+ er = "[object Function]",
+ tr = "[object GeneratorFunction]",
+ nr = "[object Object]",
+ rr = {};
+ function ir(e, t, n, r, i, a) {
+ var o,
+ s = t & qn,
+ l = t & Jn,
+ u = t & Kn;
+ if ((n && (o = i ? n(e, r, i, a) : n(e)), void 0 !== o)) return o;
+ if (!L(e)) return e;
+ var c = w(e);
+ if (c) {
+ if (
+ ((o = (function (e) {
+ var t = e.length,
+ n = new e.constructor(t);
+ return (
+ t &&
+ "string" == typeof e[0] &&
+ bn.call(e, "index") &&
+ ((n.index = e.index), (n.input = e.input)),
+ n
+ );
+ })(e)),
+ !s)
+ )
+ return (function (e, t) {
+ var n = -1,
+ r = e.length;
+ for (t || (t = Array(r)); ++n < r; ) t[n] = e[n];
+ return t;
+ })(e, o);
+ } else {
+ var f = yn(e),
+ d = f == er || f == tr;
+ if (je(e))
+ return (function (e, t) {
+ if (t) return e.slice();
+ var n = e.length,
+ r = Xt ? Xt(n) : new e.constructor(n);
+ return e.copy(r), r;
+ })(e, s);
+ if (f == nr || f == $n || (d && !i)) {
+ if (
+ ((o =
+ l || d
+ ? {}
+ : (function (e) {
+ return "function" != typeof e.constructor || Ue(e)
+ ? {}
+ : ce(Zt(e));
+ })(e)),
+ !s)
+ )
+ return l
+ ? (function (e, t) {
+ return Me(e, en(e), t);
+ })(
+ e,
+ (function (e, t) {
+ return e && Me(t, ht(t), e);
+ })(o, e)
+ )
+ : (function (e, t) {
+ return Me(e, $t(e), t);
+ })(
+ e,
+ (function (e, t) {
+ return e && Me(t, st(t), e);
+ })(o, e)
+ );
+ } else {
+ if (!rr[f]) return i ? e : {};
+ o = Vn(e, f, s);
+ }
+ }
+ a || (a = new Ht());
+ var h = a.get(e);
+ if (h) return h;
+ a.set(e, o),
+ Yn(e)
+ ? e.forEach(function (r) {
+ o.add(ir(r, t, n, r, e, a));
+ })
+ : Wn(e) &&
+ e.forEach(function (r, i) {
+ o.set(i, ir(r, t, n, i, e, a));
+ });
+ var p = c ? void 0 : (u ? (l ? rn : nn) : l ? ht : st)(e);
+ return (
+ me(p || e, function (r, i) {
+ p && (r = e[(i = r)]), Te(o, i, ir(r, t, n, i, e, a));
+ }),
+ o
+ );
+ }
+ (rr[$n] =
+ rr["[object Array]"] =
+ rr["[object ArrayBuffer]"] =
+ rr["[object DataView]"] =
+ rr["[object Boolean]"] =
+ rr["[object Date]"] =
+ rr["[object Float32Array]"] =
+ rr["[object Float64Array]"] =
+ rr["[object Int8Array]"] =
+ rr["[object Int16Array]"] =
+ rr["[object Int32Array]"] =
+ rr["[object Map]"] =
+ rr["[object Number]"] =
+ rr[nr] =
+ rr["[object RegExp]"] =
+ rr["[object Set]"] =
+ rr["[object String]"] =
+ rr["[object Symbol]"] =
+ rr["[object Uint8Array]"] =
+ rr["[object Uint8ClampedArray]"] =
+ rr["[object Uint16Array]"] =
+ rr["[object Uint32Array]"] =
+ !0),
+ (rr["[object Error]"] = rr[er] = rr["[object WeakMap]"] = !1);
+ var ar = 4;
+ function or(e) {
+ return ir(e, ar);
+ }
+ function sr(e) {
+ for (
+ var t = -1, n = null == e ? 0 : e.length, r = 0, i = [];
+ ++t < n;
+
+ ) {
+ var a = e[t];
+ a && (i[r++] = a);
+ }
+ return i;
+ }
+ function lr(e) {
+ var t = -1,
+ n = null == e ? 0 : e.length;
+ for (this.__data__ = new wt(); ++t < n; ) this.add(e[t]);
+ }
+ function ur(e, t) {
+ for (var n = -1, r = null == e ? 0 : e.length; ++n < r; )
+ if (t(e[n], n, e)) return !0;
+ return !1;
+ }
+ function cr(e, t) {
+ return e.has(t);
+ }
+ (lr.prototype.add = lr.prototype.push =
+ function (e) {
+ return this.__data__.set(e, "__lodash_hash_undefined__"), this;
+ }),
+ (lr.prototype.has = function (e) {
+ return this.__data__.has(e);
+ });
+ var fr = 1,
+ dr = 2;
+ function hr(e, t, n, r, i, a) {
+ var o = n & fr,
+ s = e.length,
+ l = t.length;
+ if (s != l && !(o && l > s)) return !1;
+ var u = a.get(e),
+ c = a.get(t);
+ if (u && c) return u == t && c == e;
+ var f = -1,
+ d = !0,
+ h = n & dr ? new lr() : void 0;
+ for (a.set(e, t), a.set(t, e); ++f < s; ) {
+ var p = e[f],
+ v = t[f];
+ if (r) var m = o ? r(v, p, f, t, e, a) : r(p, v, f, e, t, a);
+ if (void 0 !== m) {
+ if (m) continue;
+ d = !1;
+ break;
+ }
+ if (h) {
+ if (
+ !ur(t, function (e, t) {
+ if (!cr(h, t) && (p === e || i(p, e, n, r, a)))
+ return h.push(t);
+ })
+ ) {
+ d = !1;
+ break;
+ }
+ } else if (p !== v && !i(p, v, n, r, a)) {
+ d = !1;
+ break;
+ }
+ }
+ return a.delete(e), a.delete(t), d;
+ }
+ function pr(e) {
+ var t = -1,
+ n = Array(e.size);
+ return (
+ e.forEach(function (e, r) {
+ n[++t] = [r, e];
+ }),
+ n
+ );
+ }
+ function vr(e) {
+ var t = -1,
+ n = Array(e.size);
+ return (
+ e.forEach(function (e) {
+ n[++t] = e;
+ }),
+ n
+ );
+ }
+ var mr = 1,
+ gr = 2,
+ Ar = "[object Boolean]",
+ yr = "[object Date]",
+ br = "[object Error]",
+ xr = "[object Map]",
+ Sr = "[object Number]",
+ Er = "[object RegExp]",
+ _r = "[object Set]",
+ Cr = "[object String]",
+ wr = "[object Symbol]",
+ Tr = "[object ArrayBuffer]",
+ Mr = "[object DataView]",
+ Ir = a ? a.prototype : void 0,
+ kr = Ir ? Ir.valueOf : void 0;
+ var Rr = 1,
+ Br = Object.prototype.hasOwnProperty;
+ var Pr = 1,
+ Lr = "[object Arguments]",
+ Dr = "[object Array]",
+ Ur = "[object Object]",
+ Fr = Object.prototype.hasOwnProperty;
+ function Or(e, t, n, r, i, a) {
+ var o = w(e),
+ s = w(t),
+ l = o ? Dr : yn(e),
+ u = s ? Dr : yn(t),
+ c = (l = l == Lr ? Ur : l) == Ur,
+ f = (u = u == Lr ? Ur : u) == Ur,
+ d = l == u;
+ if (d && je(e)) {
+ if (!je(t)) return !1;
+ (o = !0), (c = !1);
+ }
+ if (d && !c)
+ return (
+ a || (a = new Ht()),
+ o || et(e)
+ ? hr(e, t, n, r, i, a)
+ : (function (e, t, n, r, i, a, o) {
+ switch (n) {
+ case Mr:
+ if (
+ e.byteLength != t.byteLength ||
+ e.byteOffset != t.byteOffset
+ )
+ return !1;
+ (e = e.buffer), (t = t.buffer);
+ case Tr:
+ return !(
+ e.byteLength != t.byteLength ||
+ !a(new xn(e), new xn(t))
+ );
+ case Ar:
+ case yr:
+ case Sr:
+ return Ce(+e, +t);
+ case br:
+ return e.name == t.name && e.message == t.message;
+ case Er:
+ case Cr:
+ return e == t + "";
+ case xr:
+ var s = pr;
+ case _r:
+ var l = r & mr;
+ if ((s || (s = vr), e.size != t.size && !l))
+ return !1;
+ var u = o.get(e);
+ if (u) return u == t;
+ (r |= gr), o.set(e, t);
+ var c = hr(s(e), s(t), r, i, a, o);
+ return o.delete(e), c;
+ case wr:
+ if (kr) return kr.call(e) == kr.call(t);
+ }
+ return !1;
+ })(e, t, l, n, r, i, a)
+ );
+ if (!(n & Pr)) {
+ var h = c && Fr.call(e, "__wrapped__"),
+ p = f && Fr.call(t, "__wrapped__");
+ if (h || p) {
+ var v = h ? e.value() : e,
+ m = p ? t.value() : t;
+ return a || (a = new Ht()), i(v, m, n, r, a);
+ }
+ }
+ return (
+ !!d &&
+ (a || (a = new Ht()),
+ (function (e, t, n, r, i, a) {
+ var o = n & Rr,
+ s = nn(e),
+ l = s.length;
+ if (l != nn(t).length && !o) return !1;
+ for (var u = l; u--; ) {
+ var c = s[u];
+ if (!(o ? c in t : Br.call(t, c))) return !1;
+ }
+ var f = a.get(e),
+ d = a.get(t);
+ if (f && d) return f == t && d == e;
+ var h = !0;
+ a.set(e, t), a.set(t, e);
+ for (var p = o; ++u < l; ) {
+ var v = e[(c = s[u])],
+ m = t[c];
+ if (r)
+ var g = o ? r(m, v, c, t, e, a) : r(v, m, c, e, t, a);
+ if (!(void 0 === g ? v === m || i(v, m, n, r, a) : g)) {
+ h = !1;
+ break;
+ }
+ p || (p = "constructor" == c);
+ }
+ if (h && !p) {
+ var A = e.constructor,
+ y = t.constructor;
+ A == y ||
+ !("constructor" in e) ||
+ !("constructor" in t) ||
+ ("function" == typeof A &&
+ A instanceof A &&
+ "function" == typeof y &&
+ y instanceof y) ||
+ (h = !1);
+ }
+ return a.delete(e), a.delete(t), h;
+ })(e, t, n, r, i, a))
+ );
+ }
+ function Nr(e, t, n, r, i) {
+ return (
+ e === t ||
+ (null == e || null == t || (!S(e) && !S(t))
+ ? e !== e && t !== t
+ : Or(e, t, n, r, Nr, i))
+ );
+ }
+ var Gr = 1,
+ Zr = 2;
+ function zr(e) {
+ return e === e && !L(e);
+ }
+ function Qr(e, t) {
+ return function (n) {
+ return (
+ null != n && n[e] === t && (void 0 !== t || e in Object(n))
+ );
+ };
+ }
+ function Hr(e) {
+ var t = (function (e) {
+ for (var t = st(e), n = t.length; n--; ) {
+ var r = t[n],
+ i = e[r];
+ t[n] = [r, i, zr(i)];
+ }
+ return t;
+ })(e);
+ return 1 == t.length && t[0][2]
+ ? Qr(t[0][0], t[0][1])
+ : function (n) {
+ return (
+ n === e ||
+ (function (e, t, n, r) {
+ var i = n.length,
+ a = i,
+ o = !r;
+ if (null == e) return !a;
+ for (e = Object(e); i--; ) {
+ var s = n[i];
+ if (o && s[2] ? s[1] !== e[s[0]] : !(s[0] in e))
+ return !1;
+ }
+ for (; ++i < a; ) {
+ var l = (s = n[i])[0],
+ u = e[l],
+ c = s[1];
+ if (o && s[2]) {
+ if (void 0 === u && !(l in e)) return !1;
+ } else {
+ var f = new Ht();
+ if (r) var d = r(u, c, l, e, t, f);
+ if (!(void 0 === d ? Nr(c, u, Gr | Zr, r, f) : d))
+ return !1;
+ }
+ }
+ return !0;
+ })(n, e, t)
+ );
+ };
+ }
+ function Vr(e, t) {
+ return null != e && t in Object(e);
+ }
+ function jr(e, t, n) {
+ for (var r = -1, i = (t = Bt(t, e)).length, a = !1; ++r < i; ) {
+ var o = Lt(t[r]);
+ if (!(a = null != e && n(e, o))) break;
+ e = e[o];
+ }
+ return a || ++r != i
+ ? a
+ : !!(i = null == e ? 0 : e.length) &&
+ Be(i) &&
+ Ee(o, i) &&
+ (w(e) || ze(e));
+ }
+ var Wr = 1,
+ Xr = 2;
+ function Yr(e, t) {
+ return mt(e) && zr(t)
+ ? Qr(Lt(e), t)
+ : function (n) {
+ var r = (function (e, t, n) {
+ var r = null == e ? void 0 : Dt(e, t);
+ return void 0 === r ? n : r;
+ })(n, e);
+ return void 0 === r && r === t
+ ? (function (e, t) {
+ return null != e && jr(e, t, Vr);
+ })(n, e)
+ : Nr(t, r, Wr | Xr);
+ };
+ }
+ function qr(e) {
+ return mt(e)
+ ? ((t = Lt(e)),
+ function (e) {
+ return null == e ? void 0 : e[t];
+ })
+ : (function (e) {
+ return function (t) {
+ return Dt(t, e);
+ };
+ })(e);
+ var t;
+ }
+ function Jr(e) {
+ return "function" == typeof e
+ ? e
+ : null == e
+ ? H
+ : "object" == typeof e
+ ? w(e)
+ ? Yr(e[0], e[1])
+ : Hr(e)
+ : qr(e);
+ }
+ function Kr(e, t, n, r) {
+ for (var i = -1, a = null == e ? 0 : e.length; ++i < a; ) {
+ var o = e[i];
+ t(r, o, n(o), e);
+ }
+ return r;
+ }
+ var $r,
+ ei = function (e, t, n) {
+ for (var r = -1, i = Object(e), a = n(e), o = a.length; o--; ) {
+ var s = a[$r ? o : ++r];
+ if (!1 === t(i[s], s, i)) break;
+ }
+ return e;
+ };
+ var ti = (function (e, t) {
+ return function (n, r) {
+ if (null == n) return n;
+ if (!Pe(n)) return e(n, r);
+ for (
+ var i = n.length, a = t ? i : -1, o = Object(n);
+ (t ? a-- : ++a < i) && !1 !== r(o[a], a, o);
+
+ );
+ return n;
+ };
+ })(function (e, t) {
+ return e && ei(e, t, st);
+ }),
+ ni = ti;
+ function ri(e, t, n, r) {
+ return (
+ ni(e, function (e, i, a) {
+ t(r, e, n(e), a);
+ }),
+ r
+ );
+ }
+ var ii = Object.prototype,
+ ai = ii.hasOwnProperty,
+ oi = ke(function (e, t) {
+ e = Object(e);
+ var n = -1,
+ r = t.length,
+ i = r > 2 ? t[2] : void 0;
+ for (i && Le(t[0], t[1], i) && (r = 1); ++n < r; )
+ for (
+ var a = t[n], o = ht(a), s = -1, l = o.length;
+ ++s < l;
+
+ ) {
+ var u = o[s],
+ c = e[u];
+ (void 0 === c || (Ce(c, ii[u]) && !ai.call(e, u))) &&
+ (e[u] = a[u]);
+ }
+ return e;
+ });
+ function si(e) {
+ return S(e) && Pe(e);
+ }
+ function li(e, t, n) {
+ for (var r = -1, i = null == e ? 0 : e.length; ++r < i; )
+ if (n(t, e[r])) return !0;
+ return !1;
+ }
+ var ui = ke(function (e, t) {
+ return si(e)
+ ? (function (e, t, n, r) {
+ var i = -1,
+ a = be,
+ o = !0,
+ s = e.length,
+ l = [],
+ u = t.length;
+ if (!s) return l;
+ n && (t = C(t, Xe(n))),
+ r
+ ? ((a = li), (o = !1))
+ : t.length >= 200 &&
+ ((a = cr), (o = !1), (t = new lr(t)));
+ e: for (; ++i < s; ) {
+ var c = e[i],
+ f = null == n ? c : n(c);
+ if (((c = r || 0 !== c ? c : 0), o && f === f)) {
+ for (var d = u; d--; ) if (t[d] === f) continue e;
+ l.push(c);
+ } else a(t, f, r) || l.push(c);
+ }
+ return l;
+ })(e, Nt(t, 1, si, !0))
+ : [];
+ });
+ function ci(e) {
+ var t = null == e ? 0 : e.length;
+ return t ? e[t - 1] : void 0;
+ }
+ function fi(e, t, n) {
+ var r = null == e ? 0 : e.length;
+ return r
+ ? zt(e, (t = n || void 0 === t ? 1 : Q(t)) < 0 ? 0 : t, r)
+ : [];
+ }
+ function di(e, t, n) {
+ var r = null == e ? 0 : e.length;
+ return r
+ ? zt(
+ e,
+ 0,
+ (t = r - (t = n || void 0 === t ? 1 : Q(t))) < 0 ? 0 : t
+ )
+ : [];
+ }
+ function hi(e, t) {
+ var n;
+ return (w(e) ? me : ni)(e, "function" == typeof (n = t) ? n : H);
+ }
+ function pi(e, t) {
+ for (var n = -1, r = null == e ? 0 : e.length; ++n < r; )
+ if (!t(e[n], n, e)) return !1;
+ return !0;
+ }
+ function vi(e, t) {
+ var n = !0;
+ return (
+ ni(e, function (e, r, i) {
+ return (n = !!t(e, r, i));
+ }),
+ n
+ );
+ }
+ function mi(e, t, n) {
+ var r = w(e) ? pi : vi;
+ return n && Le(e, t, n) && (t = void 0), r(e, Jr(t));
+ }
+ function gi(e, t) {
+ var n = [];
+ return (
+ ni(e, function (e, r, i) {
+ t(e, r, i) && n.push(e);
+ }),
+ n
+ );
+ }
+ function Ai(e, t) {
+ return (w(e) ? Yt : gi)(e, Jr(t));
+ }
+ var yi = Math.max;
+ var bi,
+ xi =
+ ((bi = function (e, t, n) {
+ var r = null == e ? 0 : e.length;
+ if (!r) return -1;
+ var i = null == n ? 0 : Q(n);
+ return i < 0 && (i = yi(r + i, 0)), ge(e, Jr(t), i);
+ }),
+ function (e, t, n) {
+ var r = Object(e);
+ if (!Pe(e)) {
+ var i = Jr(t);
+ (e = st(e)),
+ (t = function (e) {
+ return i(r[e], e, r);
+ });
+ }
+ var a = bi(e, t, n);
+ return a > -1 ? r[i ? e[a] : a] : void 0;
+ });
+ function Si(e) {
+ return e && e.length ? e[0] : void 0;
+ }
+ function Ei(e, t) {
+ var n = -1,
+ r = Pe(e) ? Array(e.length) : [];
+ return (
+ ni(e, function (e, i, a) {
+ r[++n] = t(e, i, a);
+ }),
+ r
+ );
+ }
+ function _i(e, t) {
+ return (w(e) ? C : Ei)(e, Jr(t));
+ }
+ function Ci(e, t) {
+ return Nt(_i(e, t), 1);
+ }
+ var wi,
+ Ti,
+ Mi = Object.prototype.hasOwnProperty,
+ Ii =
+ ((wi = function (e, t, n) {
+ Mi.call(e, n) ? e[n].push(t) : _e(e, n, [t]);
+ }),
+ function (e, t) {
+ var n = w(e) ? Kr : ri,
+ r = Ti ? Ti() : {};
+ return n(e, wi, Jr(t), r);
+ }),
+ ki = Object.prototype.hasOwnProperty;
+ function Ri(e, t) {
+ return null != e && ki.call(e, t);
+ }
+ function Bi(e, t) {
+ return null != e && jr(e, t, Ri);
+ }
+ var Pi = "[object String]";
+ function Li(e) {
+ return "string" == typeof e || (!w(e) && S(e) && x(e) == Pi);
+ }
+ function Di(e) {
+ return null == e
+ ? []
+ : (function (e, t) {
+ return C(t, function (t) {
+ return e[t];
+ });
+ })(e, st(e));
+ }
+ var Ui = Math.max;
+ function Fi(e, t, n, r) {
+ (e = Pe(e) ? e : Di(e)), (n = n && !r ? Q(n) : 0);
+ var i = e.length;
+ return (
+ n < 0 && (n = Ui(i + n, 0)),
+ Li(e) ? n <= i && e.indexOf(t, n) > -1 : !!i && ye(e, t, n) > -1
+ );
+ }
+ var Oi = Math.max;
+ function Ni(e, t, n) {
+ var r = null == e ? 0 : e.length;
+ if (!r) return -1;
+ var i = null == n ? 0 : Q(n);
+ return i < 0 && (i = Oi(r + i, 0)), ye(e, t, i);
+ }
+ var Gi = "[object Map]",
+ Zi = "[object Set]",
+ zi = Object.prototype.hasOwnProperty;
+ function Qi(e) {
+ if (null == e) return !0;
+ if (
+ Pe(e) &&
+ (w(e) ||
+ "string" == typeof e ||
+ "function" == typeof e.splice ||
+ je(e) ||
+ et(e) ||
+ ze(e))
+ )
+ return !e.length;
+ var t = yn(e);
+ if (t == Gi || t == Zi) return !e.size;
+ if (Ue(e)) return !ot(e).length;
+ for (var n in e) if (zi.call(e, n)) return !1;
+ return !0;
+ }
+ var Hi = Ke && Ke.isRegExp,
+ Vi = Hi
+ ? Xe(Hi)
+ : function (e) {
+ return S(e) && "[object RegExp]" == x(e);
+ };
+ function ji(e) {
+ return void 0 === e;
+ }
+ var Wi = "Expected a function";
+ function Xi(e, t, n, r) {
+ if (!L(e)) return e;
+ for (
+ var i = -1, a = (t = Bt(t, e)).length, o = a - 1, s = e;
+ null != s && ++i < a;
+
+ ) {
+ var l = Lt(t[i]),
+ u = n;
+ if (
+ "__proto__" === l ||
+ "constructor" === l ||
+ "prototype" === l
+ )
+ return e;
+ if (i != o) {
+ var c = s[l];
+ void 0 === (u = r ? r(c, l, s) : void 0) &&
+ (u = L(c) ? c : Ee(t[i + 1]) ? [] : {});
+ }
+ Te(s, l, u), (s = s[l]);
+ }
+ return e;
+ }
+ function Yi(e, t) {
+ if (null == e) return {};
+ var n = C(rn(e), function (e) {
+ return [e];
+ });
+ return (
+ (t = Jr(t)),
+ (function (e, t, n) {
+ for (var r = -1, i = t.length, a = {}; ++r < i; ) {
+ var o = t[r],
+ s = Dt(e, o);
+ n(s, o) && Xi(a, Bt(o, e), s);
+ }
+ return a;
+ })(e, n, function (e, n) {
+ return t(e, n[0]);
+ })
+ );
+ }
+ function qi(e, t, n, r, i) {
+ return (
+ i(e, function (e, i, a) {
+ n = r ? ((r = !1), e) : t(n, e, i, a);
+ }),
+ n
+ );
+ }
+ function Ji(e, t, n) {
+ var r = w(e) ? Qt : qi,
+ i = arguments.length < 3;
+ return r(e, Jr(t), n, i, ni);
+ }
+ function Ki(e, t) {
+ return (w(e) ? Yt : gi)(
+ e,
+ (function (e) {
+ if ("function" != typeof e) throw new TypeError(Wi);
+ return function () {
+ var t = arguments;
+ switch (t.length) {
+ case 0:
+ return !e.call(this);
+ case 1:
+ return !e.call(this, t[0]);
+ case 2:
+ return !e.call(this, t[0], t[1]);
+ case 3:
+ return !e.call(this, t[0], t[1], t[2]);
+ }
+ return !e.apply(this, t);
+ };
+ })(Jr(t))
+ );
+ }
+ function $i(e, t) {
+ var n;
+ return (
+ ni(e, function (e, r, i) {
+ return !(n = t(e, r, i));
+ }),
+ !!n
+ );
+ }
+ function ea(e, t, n) {
+ var r = w(e) ? ur : $i;
+ return n && Le(e, t, n) && (t = void 0), r(e, Jr(t));
+ }
+ var ta =
+ sn && 1 / vr(new sn([, -0]))[1] == 1 / 0
+ ? function (e) {
+ return new sn(e);
+ }
+ : fe,
+ na = 200;
+ function ra(e) {
+ return e && e.length
+ ? (function (e, t, n) {
+ var r = -1,
+ i = be,
+ a = e.length,
+ o = !0,
+ s = [],
+ l = s;
+ if (n) (o = !1), (i = li);
+ else if (a >= na) {
+ var u = t ? null : ta(e);
+ if (u) return vr(u);
+ (o = !1), (i = cr), (l = new lr());
+ } else l = t ? [] : s;
+ e: for (; ++r < a; ) {
+ var c = e[r],
+ f = t ? t(c) : c;
+ if (((c = n || 0 !== c ? c : 0), o && f === f)) {
+ for (var d = l.length; d--; )
+ if (l[d] === f) continue e;
+ t && l.push(f), s.push(c);
+ } else i(l, f, n) || (l !== s && l.push(f), s.push(c));
+ }
+ return s;
+ })(e)
+ : [];
+ }
+ function ia(e) {
+ console && console.error && console.error("Error: ".concat(e));
+ }
+ function aa(e) {
+ console && console.warn && console.warn("Warning: ".concat(e));
+ }
+ function oa(e) {
+ var t = new Date().getTime(),
+ n = e();
+ return { time: new Date().getTime() - t, value: n };
+ }
+ function sa(e) {
+ function t() {}
+ t.prototype = e;
+ var n = new t();
+ function r() {
+ return typeof n.bar;
+ }
+ return r(), r(), e;
+ }
+ function la(e) {
+ return Li((t = e).LABEL) && "" !== t.LABEL ? e.LABEL : e.name;
+ var t;
+ }
+ var ua = (function () {
+ function e(t) {
+ (0, p.Z)(this, e), (this._definition = t);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "definition",
+ get: function () {
+ return this._definition;
+ },
+ set: function (e) {
+ this._definition = e;
+ },
+ },
+ {
+ key: "accept",
+ value: function (e) {
+ e.visit(this),
+ hi(this.definition, function (t) {
+ t.accept(e);
+ });
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ ca = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, [])).idx = 1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "definition",
+ get: function () {
+ return void 0 !== this.referencedRule
+ ? this.referencedRule.definition
+ : [];
+ },
+ set: function (e) {},
+ },
+ {
+ key: "accept",
+ value: function (e) {
+ e.visit(this);
+ },
+ },
+ ]),
+ n
+ );
+ })(ua),
+ fa = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).orgText = ""),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ da = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).ignoreAmbiguities = !1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ ha = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).idx = 1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ pa = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).idx = 1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ va = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).idx = 1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ ma = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).idx = 1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ ga = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).idx = 1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(ua),
+ Aa = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e.definition)).idx = 1),
+ (r.ignoreAmbiguities = !1),
+ (r.hasPredicates = !1),
+ ct(
+ (0, f.Z)(r),
+ Yi(e, function (e) {
+ return void 0 !== e;
+ })
+ ),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "definition",
+ get: function () {
+ return this._definition;
+ },
+ set: function (e) {
+ this._definition = e;
+ },
+ },
+ ]),
+ n
+ );
+ })(ua),
+ ya = (function () {
+ function e(t) {
+ (0, p.Z)(this, e),
+ (this.idx = 1),
+ ct(
+ this,
+ Yi(t, function (e) {
+ return void 0 !== e;
+ })
+ );
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "accept",
+ value: function (e) {
+ e.visit(this);
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function ba(e) {
+ function t(e) {
+ return _i(e, ba);
+ }
+ if (e instanceof ca) {
+ var n = {
+ type: "NonTerminal",
+ name: e.nonTerminalName,
+ idx: e.idx,
+ };
+ return Li(e.label) && (n.label = e.label), n;
+ }
+ if (e instanceof da)
+ return { type: "Alternative", definition: t(e.definition) };
+ if (e instanceof ha)
+ return {
+ type: "Option",
+ idx: e.idx,
+ definition: t(e.definition),
+ };
+ if (e instanceof pa)
+ return {
+ type: "RepetitionMandatory",
+ idx: e.idx,
+ definition: t(e.definition),
+ };
+ if (e instanceof va)
+ return {
+ type: "RepetitionMandatoryWithSeparator",
+ idx: e.idx,
+ separator: ba(new ya({ terminalType: e.separator })),
+ definition: t(e.definition),
+ };
+ if (e instanceof ga)
+ return {
+ type: "RepetitionWithSeparator",
+ idx: e.idx,
+ separator: ba(new ya({ terminalType: e.separator })),
+ definition: t(e.definition),
+ };
+ if (e instanceof ma)
+ return {
+ type: "Repetition",
+ idx: e.idx,
+ definition: t(e.definition),
+ };
+ if (e instanceof Aa)
+ return {
+ type: "Alternation",
+ idx: e.idx,
+ definition: t(e.definition),
+ };
+ if (e instanceof ya) {
+ var r = {
+ type: "Terminal",
+ name: e.terminalType.name,
+ label: la(e.terminalType),
+ idx: e.idx,
+ };
+ Li(e.label) && (r.terminalLabel = e.label);
+ var i = e.terminalType.PATTERN;
+ return (
+ e.terminalType.PATTERN && (r.pattern = Vi(i) ? i.source : i),
+ r
+ );
+ }
+ if (e instanceof fa)
+ return {
+ type: "Rule",
+ name: e.name,
+ orgText: e.orgText,
+ definition: t(e.definition),
+ };
+ throw Error("non exhaustive match");
+ }
+ var xa = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "visit",
+ value: function (e) {
+ var t = e;
+ switch (t.constructor) {
+ case ca:
+ return this.visitNonTerminal(t);
+ case da:
+ return this.visitAlternative(t);
+ case ha:
+ return this.visitOption(t);
+ case pa:
+ return this.visitRepetitionMandatory(t);
+ case va:
+ return this.visitRepetitionMandatoryWithSeparator(t);
+ case ga:
+ return this.visitRepetitionWithSeparator(t);
+ case ma:
+ return this.visitRepetition(t);
+ case Aa:
+ return this.visitAlternation(t);
+ case ya:
+ return this.visitTerminal(t);
+ case fa:
+ return this.visitRule(t);
+ default:
+ throw Error("non exhaustive match");
+ }
+ },
+ },
+ { key: "visitNonTerminal", value: function (e) {} },
+ { key: "visitAlternative", value: function (e) {} },
+ { key: "visitOption", value: function (e) {} },
+ { key: "visitRepetition", value: function (e) {} },
+ { key: "visitRepetitionMandatory", value: function (e) {} },
+ {
+ key: "visitRepetitionMandatoryWithSeparator",
+ value: function (e) {},
+ },
+ {
+ key: "visitRepetitionWithSeparator",
+ value: function (e) {},
+ },
+ { key: "visitAlternation", value: function (e) {} },
+ { key: "visitTerminal", value: function (e) {} },
+ { key: "visitRule", value: function (e) {} },
+ ]),
+ e
+ );
+ })();
+ function Sa(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : [];
+ return (
+ !!(e instanceof ha || e instanceof ma || e instanceof ga) ||
+ (e instanceof Aa
+ ? ea(e.definition, function (e) {
+ return Sa(e, t);
+ })
+ : !(e instanceof ca && Fi(t, e)) &&
+ e instanceof ua &&
+ (e instanceof ca && t.push(e),
+ mi(e.definition, function (e) {
+ return Sa(e, t);
+ })))
+ );
+ }
+ function Ea(e) {
+ if (e instanceof ca) return "SUBRULE";
+ if (e instanceof ha) return "OPTION";
+ if (e instanceof Aa) return "OR";
+ if (e instanceof pa) return "AT_LEAST_ONE";
+ if (e instanceof va) return "AT_LEAST_ONE_SEP";
+ if (e instanceof ga) return "MANY_SEP";
+ if (e instanceof ma) return "MANY";
+ if (e instanceof ya) return "CONSUME";
+ throw Error("non exhaustive match");
+ }
+ var _a = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "walk",
+ value: function (e) {
+ var t = this,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : [];
+ hi(e.definition, function (r, i) {
+ var a = fi(e.definition, i + 1);
+ if (r instanceof ca) t.walkProdRef(r, a, n);
+ else if (r instanceof ya) t.walkTerminal(r, a, n);
+ else if (r instanceof da) t.walkFlat(r, a, n);
+ else if (r instanceof ha) t.walkOption(r, a, n);
+ else if (r instanceof pa) t.walkAtLeastOne(r, a, n);
+ else if (r instanceof va) t.walkAtLeastOneSep(r, a, n);
+ else if (r instanceof ga) t.walkManySep(r, a, n);
+ else if (r instanceof ma) t.walkMany(r, a, n);
+ else {
+ if (!(r instanceof Aa))
+ throw Error("non exhaustive match");
+ t.walkOr(r, a, n);
+ }
+ });
+ },
+ },
+ { key: "walkTerminal", value: function (e, t, n) {} },
+ { key: "walkProdRef", value: function (e, t, n) {} },
+ {
+ key: "walkFlat",
+ value: function (e, t, n) {
+ var r = t.concat(n);
+ this.walk(e, r);
+ },
+ },
+ {
+ key: "walkOption",
+ value: function (e, t, n) {
+ var r = t.concat(n);
+ this.walk(e, r);
+ },
+ },
+ {
+ key: "walkAtLeastOne",
+ value: function (e, t, n) {
+ var r = [new ha({ definition: e.definition })].concat(
+ t,
+ n
+ );
+ this.walk(e, r);
+ },
+ },
+ {
+ key: "walkAtLeastOneSep",
+ value: function (e, t, n) {
+ var r = Ca(e, t, n);
+ this.walk(e, r);
+ },
+ },
+ {
+ key: "walkMany",
+ value: function (e, t, n) {
+ var r = [new ha({ definition: e.definition })].concat(
+ t,
+ n
+ );
+ this.walk(e, r);
+ },
+ },
+ {
+ key: "walkManySep",
+ value: function (e, t, n) {
+ var r = Ca(e, t, n);
+ this.walk(e, r);
+ },
+ },
+ {
+ key: "walkOr",
+ value: function (e, t, n) {
+ var r = this,
+ i = t.concat(n);
+ hi(e.definition, function (e) {
+ var t = new da({ definition: [e] });
+ r.walk(t, i);
+ });
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function Ca(e, t, n) {
+ return [
+ new ha({
+ definition: [new ya({ terminalType: e.separator })].concat(
+ e.definition
+ ),
+ }),
+ ].concat(t, n);
+ }
+ function wa(e) {
+ if (e instanceof ca) return wa(e.referencedRule);
+ if (e instanceof ya) return [e.terminalType];
+ if (
+ (function (e) {
+ return (
+ e instanceof da ||
+ e instanceof ha ||
+ e instanceof ma ||
+ e instanceof pa ||
+ e instanceof va ||
+ e instanceof ga ||
+ e instanceof ya ||
+ e instanceof fa
+ );
+ })(e)
+ )
+ return (function (e) {
+ var t,
+ n = [],
+ r = e.definition,
+ i = 0,
+ a = r.length > i,
+ o = !0;
+ for (; a && o; )
+ (o = Sa((t = r[i]))),
+ (n = n.concat(wa(t))),
+ (i += 1),
+ (a = r.length > i);
+ return ra(n);
+ })(e);
+ if (
+ (function (e) {
+ return e instanceof Aa;
+ })(e)
+ )
+ return (function (e) {
+ var t = _i(e.definition, function (e) {
+ return wa(e);
+ });
+ return ra(Gt(t));
+ })(e);
+ throw Error("non exhaustive match");
+ }
+ var Ta = "_~IN~_",
+ Ma = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this)).topProd = e),
+ (r.follows = {}),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "startWalking",
+ value: function () {
+ return this.walk(this.topProd), this.follows;
+ },
+ },
+ { key: "walkTerminal", value: function (e, t, n) {} },
+ {
+ key: "walkProdRef",
+ value: function (e, t, n) {
+ var r,
+ i,
+ a =
+ ((r = e.referencedRule),
+ (i = e.idx),
+ r.name + i + Ta + this.topProd.name),
+ o = t.concat(n),
+ s = wa(new da({ definition: o }));
+ this.follows[a] = s;
+ },
+ },
+ ]),
+ n
+ );
+ })(_a);
+ function Ia(e) {
+ return e.charCodeAt(0);
+ }
+ function ka(e, t) {
+ Array.isArray(e)
+ ? e.forEach(function (e) {
+ t.push(e);
+ })
+ : t.push(e);
+ }
+ function Ra(e, t) {
+ if (!0 === e[t]) throw "duplicate flag " + t;
+ e[t], (e[t] = !0);
+ }
+ function Ba(e) {
+ if (void 0 === e)
+ throw Error("Internal Error - Should never get here!");
+ return !0;
+ }
+ function Pa(e) {
+ return "Character" === e.type;
+ }
+ for (var La = [], Da = Ia("0"); Da <= Ia("9"); Da++) La.push(Da);
+ for (
+ var Ua = [Ia("_")].concat(La), Fa = Ia("a");
+ Fa <= Ia("z");
+ Fa++
+ )
+ Ua.push(Fa);
+ for (var Oa = Ia("A"); Oa <= Ia("Z"); Oa++) Ua.push(Oa);
+ var Na = [
+ Ia(" "),
+ Ia("\f"),
+ Ia("\n"),
+ Ia("\r"),
+ Ia("\t"),
+ Ia("\v"),
+ Ia("\t"),
+ Ia("\xa0"),
+ Ia("\u1680"),
+ Ia("\u2000"),
+ Ia("\u2001"),
+ Ia("\u2002"),
+ Ia("\u2003"),
+ Ia("\u2004"),
+ Ia("\u2005"),
+ Ia("\u2006"),
+ Ia("\u2007"),
+ Ia("\u2008"),
+ Ia("\u2009"),
+ Ia("\u200a"),
+ Ia("\u2028"),
+ Ia("\u2029"),
+ Ia("\u202f"),
+ Ia("\u205f"),
+ Ia("\u3000"),
+ Ia("\ufeff"),
+ ],
+ Ga = /[0-9a-fA-F]/,
+ Za = /[0-9]/,
+ za = /[1-9]/,
+ Qa = (function () {
+ function e() {
+ (0, p.Z)(this, e),
+ (this.idx = 0),
+ (this.input = ""),
+ (this.groupIdx = 0);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "saveState",
+ value: function () {
+ return {
+ idx: this.idx,
+ input: this.input,
+ groupIdx: this.groupIdx,
+ };
+ },
+ },
+ {
+ key: "restoreState",
+ value: function (e) {
+ (this.idx = e.idx),
+ (this.input = e.input),
+ (this.groupIdx = e.groupIdx);
+ },
+ },
+ {
+ key: "pattern",
+ value: function (e) {
+ (this.idx = 0),
+ (this.input = e),
+ (this.groupIdx = 0),
+ this.consumeChar("/");
+ var t = this.disjunction();
+ this.consumeChar("/");
+ for (
+ var n = {
+ type: "Flags",
+ loc: { begin: this.idx, end: e.length },
+ global: !1,
+ ignoreCase: !1,
+ multiLine: !1,
+ unicode: !1,
+ sticky: !1,
+ };
+ this.isRegExpFlag();
+
+ )
+ switch (this.popChar()) {
+ case "g":
+ Ra(n, "global");
+ break;
+ case "i":
+ Ra(n, "ignoreCase");
+ break;
+ case "m":
+ Ra(n, "multiLine");
+ break;
+ case "u":
+ Ra(n, "unicode");
+ break;
+ case "y":
+ Ra(n, "sticky");
+ }
+ if (this.idx !== this.input.length)
+ throw Error(
+ "Redundant input: " + this.input.substring(this.idx)
+ );
+ return {
+ type: "Pattern",
+ flags: n,
+ value: t,
+ loc: this.loc(0),
+ };
+ },
+ },
+ {
+ key: "disjunction",
+ value: function () {
+ var e = [],
+ t = this.idx;
+ for (
+ e.push(this.alternative());
+ "|" === this.peekChar();
+
+ )
+ this.consumeChar("|"), e.push(this.alternative());
+ return {
+ type: "Disjunction",
+ value: e,
+ loc: this.loc(t),
+ };
+ },
+ },
+ {
+ key: "alternative",
+ value: function () {
+ for (var e = [], t = this.idx; this.isTerm(); )
+ e.push(this.term());
+ return {
+ type: "Alternative",
+ value: e,
+ loc: this.loc(t),
+ };
+ },
+ },
+ {
+ key: "term",
+ value: function () {
+ return this.isAssertion()
+ ? this.assertion()
+ : this.atom();
+ },
+ },
+ {
+ key: "assertion",
+ value: function () {
+ var e = this.idx;
+ switch (this.popChar()) {
+ case "^":
+ return { type: "StartAnchor", loc: this.loc(e) };
+ case "$":
+ return { type: "EndAnchor", loc: this.loc(e) };
+ case "\\":
+ switch (this.popChar()) {
+ case "b":
+ return {
+ type: "WordBoundary",
+ loc: this.loc(e),
+ };
+ case "B":
+ return {
+ type: "NonWordBoundary",
+ loc: this.loc(e),
+ };
+ }
+ throw Error("Invalid Assertion Escape");
+ case "(":
+ var t;
+ switch ((this.consumeChar("?"), this.popChar())) {
+ case "=":
+ t = "Lookahead";
+ break;
+ case "!":
+ t = "NegativeLookahead";
+ }
+ Ba(t);
+ var n = this.disjunction();
+ return (
+ this.consumeChar(")"),
+ { type: t, value: n, loc: this.loc(e) }
+ );
+ }
+ return (function () {
+ throw Error(
+ "Internal Error - Should never get here!"
+ );
+ })();
+ },
+ },
+ {
+ key: "quantifier",
+ value: function () {
+ var e =
+ arguments.length > 0 &&
+ void 0 !== arguments[0] &&
+ arguments[0],
+ t = void 0,
+ n = this.idx;
+ switch (this.popChar()) {
+ case "*":
+ t = { atLeast: 0, atMost: 1 / 0 };
+ break;
+ case "+":
+ t = { atLeast: 1, atMost: 1 / 0 };
+ break;
+ case "?":
+ t = { atLeast: 0, atMost: 1 };
+ break;
+ case "{":
+ var r = this.integerIncludingZero();
+ switch (this.popChar()) {
+ case "}":
+ t = { atLeast: r, atMost: r };
+ break;
+ case ",":
+ (t = this.isDigit()
+ ? {
+ atLeast: r,
+ atMost: this.integerIncludingZero(),
+ }
+ : { atLeast: r, atMost: 1 / 0 }),
+ this.consumeChar("}");
+ }
+ if (!0 === e && void 0 === t) return;
+ Ba(t);
+ }
+ if (!0 !== e || void 0 !== t)
+ return Ba(t)
+ ? ("?" === this.peekChar(0)
+ ? (this.consumeChar("?"), (t.greedy = !1))
+ : (t.greedy = !0),
+ (t.type = "Quantifier"),
+ (t.loc = this.loc(n)),
+ t)
+ : void 0;
+ },
+ },
+ {
+ key: "atom",
+ value: function () {
+ var e,
+ t = this.idx;
+ switch (this.peekChar()) {
+ case ".":
+ e = this.dotAll();
+ break;
+ case "\\":
+ e = this.atomEscape();
+ break;
+ case "[":
+ e = this.characterClass();
+ break;
+ case "(":
+ e = this.group();
+ }
+ if (
+ (void 0 === e &&
+ this.isPatternCharacter() &&
+ (e = this.patternCharacter()),
+ Ba(e))
+ )
+ return (
+ (e.loc = this.loc(t)),
+ this.isQuantifier() &&
+ (e.quantifier = this.quantifier()),
+ e
+ );
+ },
+ },
+ {
+ key: "dotAll",
+ value: function () {
+ return (
+ this.consumeChar("."),
+ {
+ type: "Set",
+ complement: !0,
+ value: [
+ Ia("\n"),
+ Ia("\r"),
+ Ia("\u2028"),
+ Ia("\u2029"),
+ ],
+ }
+ );
+ },
+ },
+ {
+ key: "atomEscape",
+ value: function () {
+ switch ((this.consumeChar("\\"), this.peekChar())) {
+ case "1":
+ case "2":
+ case "3":
+ case "4":
+ case "5":
+ case "6":
+ case "7":
+ case "8":
+ case "9":
+ return this.decimalEscapeAtom();
+ case "d":
+ case "D":
+ case "s":
+ case "S":
+ case "w":
+ case "W":
+ return this.characterClassEscape();
+ case "f":
+ case "n":
+ case "r":
+ case "t":
+ case "v":
+ return this.controlEscapeAtom();
+ case "c":
+ return this.controlLetterEscapeAtom();
+ case "0":
+ return this.nulCharacterAtom();
+ case "x":
+ return this.hexEscapeSequenceAtom();
+ case "u":
+ return this.regExpUnicodeEscapeSequenceAtom();
+ default:
+ return this.identityEscapeAtom();
+ }
+ },
+ },
+ {
+ key: "decimalEscapeAtom",
+ value: function () {
+ return {
+ type: "GroupBackReference",
+ value: this.positiveInteger(),
+ };
+ },
+ },
+ {
+ key: "characterClassEscape",
+ value: function () {
+ var e,
+ t = !1;
+ switch (this.popChar()) {
+ case "d":
+ e = La;
+ break;
+ case "D":
+ (e = La), (t = !0);
+ break;
+ case "s":
+ e = Na;
+ break;
+ case "S":
+ (e = Na), (t = !0);
+ break;
+ case "w":
+ e = Ua;
+ break;
+ case "W":
+ (e = Ua), (t = !0);
+ }
+ if (Ba(e))
+ return { type: "Set", value: e, complement: t };
+ },
+ },
+ {
+ key: "controlEscapeAtom",
+ value: function () {
+ var e;
+ switch (this.popChar()) {
+ case "f":
+ e = Ia("\f");
+ break;
+ case "n":
+ e = Ia("\n");
+ break;
+ case "r":
+ e = Ia("\r");
+ break;
+ case "t":
+ e = Ia("\t");
+ break;
+ case "v":
+ e = Ia("\v");
+ }
+ if (Ba(e)) return { type: "Character", value: e };
+ },
+ },
+ {
+ key: "controlLetterEscapeAtom",
+ value: function () {
+ this.consumeChar("c");
+ var e = this.popChar();
+ if (!1 === /[a-zA-Z]/.test(e)) throw Error("Invalid ");
+ return {
+ type: "Character",
+ value: e.toUpperCase().charCodeAt(0) - 64,
+ };
+ },
+ },
+ {
+ key: "nulCharacterAtom",
+ value: function () {
+ return (
+ this.consumeChar("0"),
+ { type: "Character", value: Ia("\0") }
+ );
+ },
+ },
+ {
+ key: "hexEscapeSequenceAtom",
+ value: function () {
+ return this.consumeChar("x"), this.parseHexDigits(2);
+ },
+ },
+ {
+ key: "regExpUnicodeEscapeSequenceAtom",
+ value: function () {
+ return this.consumeChar("u"), this.parseHexDigits(4);
+ },
+ },
+ {
+ key: "identityEscapeAtom",
+ value: function () {
+ return { type: "Character", value: Ia(this.popChar()) };
+ },
+ },
+ {
+ key: "classPatternCharacterAtom",
+ value: function () {
+ switch (this.peekChar()) {
+ case "\n":
+ case "\r":
+ case "\u2028":
+ case "\u2029":
+ case "\\":
+ case "]":
+ throw Error("TBD");
+ default:
+ return {
+ type: "Character",
+ value: Ia(this.popChar()),
+ };
+ }
+ },
+ },
+ {
+ key: "characterClass",
+ value: function () {
+ var e = [],
+ t = !1;
+ for (
+ this.consumeChar("["),
+ "^" === this.peekChar(0) &&
+ (this.consumeChar("^"), (t = !0));
+ this.isClassAtom();
+
+ ) {
+ var n = this.classAtom();
+ if ((n.type, Pa(n) && this.isRangeDash())) {
+ this.consumeChar("-");
+ var r = this.classAtom();
+ if ((r.type, Pa(r))) {
+ if (r.value < n.value)
+ throw Error(
+ "Range out of order in character class"
+ );
+ e.push({ from: n.value, to: r.value });
+ } else
+ ka(n.value, e), e.push(Ia("-")), ka(r.value, e);
+ } else ka(n.value, e);
+ }
+ return (
+ this.consumeChar("]"),
+ { type: "Set", complement: t, value: e }
+ );
+ },
+ },
+ {
+ key: "classAtom",
+ value: function () {
+ switch (this.peekChar()) {
+ case "]":
+ case "\n":
+ case "\r":
+ case "\u2028":
+ case "\u2029":
+ throw Error("TBD");
+ case "\\":
+ return this.classEscape();
+ default:
+ return this.classPatternCharacterAtom();
+ }
+ },
+ },
+ {
+ key: "classEscape",
+ value: function () {
+ switch ((this.consumeChar("\\"), this.peekChar())) {
+ case "b":
+ return (
+ this.consumeChar("b"),
+ { type: "Character", value: Ia("\b") }
+ );
+ case "d":
+ case "D":
+ case "s":
+ case "S":
+ case "w":
+ case "W":
+ return this.characterClassEscape();
+ case "f":
+ case "n":
+ case "r":
+ case "t":
+ case "v":
+ return this.controlEscapeAtom();
+ case "c":
+ return this.controlLetterEscapeAtom();
+ case "0":
+ return this.nulCharacterAtom();
+ case "x":
+ return this.hexEscapeSequenceAtom();
+ case "u":
+ return this.regExpUnicodeEscapeSequenceAtom();
+ default:
+ return this.identityEscapeAtom();
+ }
+ },
+ },
+ {
+ key: "group",
+ value: function () {
+ var e = !0;
+ if ((this.consumeChar("("), "?" === this.peekChar(0)))
+ this.consumeChar("?"),
+ this.consumeChar(":"),
+ (e = !1);
+ else this.groupIdx++;
+ var t = this.disjunction();
+ this.consumeChar(")");
+ var n = { type: "Group", capturing: e, value: t };
+ return e && (n.idx = this.groupIdx), n;
+ },
+ },
+ {
+ key: "positiveInteger",
+ value: function () {
+ var e = this.popChar();
+ if (!1 === za.test(e))
+ throw Error("Expecting a positive integer");
+ for (; Za.test(this.peekChar(0)); ) e += this.popChar();
+ return parseInt(e, 10);
+ },
+ },
+ {
+ key: "integerIncludingZero",
+ value: function () {
+ var e = this.popChar();
+ if (!1 === Za.test(e))
+ throw Error("Expecting an integer");
+ for (; Za.test(this.peekChar(0)); ) e += this.popChar();
+ return parseInt(e, 10);
+ },
+ },
+ {
+ key: "patternCharacter",
+ value: function () {
+ var e = this.popChar();
+ switch (e) {
+ case "\n":
+ case "\r":
+ case "\u2028":
+ case "\u2029":
+ case "^":
+ case "$":
+ case "\\":
+ case ".":
+ case "*":
+ case "+":
+ case "?":
+ case "(":
+ case ")":
+ case "[":
+ case "|":
+ throw Error("TBD");
+ default:
+ return { type: "Character", value: Ia(e) };
+ }
+ },
+ },
+ {
+ key: "isRegExpFlag",
+ value: function () {
+ switch (this.peekChar(0)) {
+ case "g":
+ case "i":
+ case "m":
+ case "u":
+ case "y":
+ return !0;
+ default:
+ return !1;
+ }
+ },
+ },
+ {
+ key: "isRangeDash",
+ value: function () {
+ return "-" === this.peekChar() && this.isClassAtom(1);
+ },
+ },
+ {
+ key: "isDigit",
+ value: function () {
+ return Za.test(this.peekChar(0));
+ },
+ },
+ {
+ key: "isClassAtom",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0;
+ switch (this.peekChar(e)) {
+ case "]":
+ case "\n":
+ case "\r":
+ case "\u2028":
+ case "\u2029":
+ return !1;
+ default:
+ return !0;
+ }
+ },
+ },
+ {
+ key: "isTerm",
+ value: function () {
+ return this.isAtom() || this.isAssertion();
+ },
+ },
+ {
+ key: "isAtom",
+ value: function () {
+ if (this.isPatternCharacter()) return !0;
+ switch (this.peekChar(0)) {
+ case ".":
+ case "\\":
+ case "[":
+ case "(":
+ return !0;
+ default:
+ return !1;
+ }
+ },
+ },
+ {
+ key: "isAssertion",
+ value: function () {
+ switch (this.peekChar(0)) {
+ case "^":
+ case "$":
+ return !0;
+ case "\\":
+ switch (this.peekChar(1)) {
+ case "b":
+ case "B":
+ return !0;
+ default:
+ return !1;
+ }
+ case "(":
+ return (
+ "?" === this.peekChar(1) &&
+ ("=" === this.peekChar(2) ||
+ "!" === this.peekChar(2))
+ );
+ default:
+ return !1;
+ }
+ },
+ },
+ {
+ key: "isQuantifier",
+ value: function () {
+ var e = this.saveState();
+ try {
+ return void 0 !== this.quantifier(!0);
+ } catch (t) {
+ return !1;
+ } finally {
+ this.restoreState(e);
+ }
+ },
+ },
+ {
+ key: "isPatternCharacter",
+ value: function () {
+ switch (this.peekChar()) {
+ case "^":
+ case "$":
+ case "\\":
+ case ".":
+ case "*":
+ case "+":
+ case "?":
+ case "(":
+ case ")":
+ case "[":
+ case "|":
+ case "/":
+ case "\n":
+ case "\r":
+ case "\u2028":
+ case "\u2029":
+ return !1;
+ default:
+ return !0;
+ }
+ },
+ },
+ {
+ key: "parseHexDigits",
+ value: function (e) {
+ for (var t = "", n = 0; n < e; n++) {
+ var r = this.popChar();
+ if (!1 === Ga.test(r))
+ throw Error("Expecting a HexDecimal digits");
+ t += r;
+ }
+ return { type: "Character", value: parseInt(t, 16) };
+ },
+ },
+ {
+ key: "peekChar",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0;
+ return this.input[this.idx + e];
+ },
+ },
+ {
+ key: "popChar",
+ value: function () {
+ var e = this.peekChar(0);
+ return this.consumeChar(void 0), e;
+ },
+ },
+ {
+ key: "consumeChar",
+ value: function (e) {
+ if (void 0 !== e && this.input[this.idx] !== e)
+ throw Error(
+ "Expected: '" +
+ e +
+ "' but found: '" +
+ this.input[this.idx] +
+ "' at offset: " +
+ this.idx
+ );
+ if (this.idx >= this.input.length)
+ throw Error("Unexpected end of input");
+ this.idx++;
+ },
+ },
+ {
+ key: "loc",
+ value: function (e) {
+ return { begin: e, end: this.idx };
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Ha = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "visitChildren",
+ value: function (e) {
+ var t = this;
+ for (var n in e) {
+ var r = e[n];
+ e.hasOwnProperty(n) &&
+ (void 0 !== r.type
+ ? this.visit(r)
+ : Array.isArray(r) &&
+ r.forEach(function (e) {
+ t.visit(e);
+ }, this));
+ }
+ },
+ },
+ {
+ key: "visit",
+ value: function (e) {
+ switch (e.type) {
+ case "Pattern":
+ this.visitPattern(e);
+ break;
+ case "Flags":
+ this.visitFlags(e);
+ break;
+ case "Disjunction":
+ this.visitDisjunction(e);
+ break;
+ case "Alternative":
+ this.visitAlternative(e);
+ break;
+ case "StartAnchor":
+ this.visitStartAnchor(e);
+ break;
+ case "EndAnchor":
+ this.visitEndAnchor(e);
+ break;
+ case "WordBoundary":
+ this.visitWordBoundary(e);
+ break;
+ case "NonWordBoundary":
+ this.visitNonWordBoundary(e);
+ break;
+ case "Lookahead":
+ this.visitLookahead(e);
+ break;
+ case "NegativeLookahead":
+ this.visitNegativeLookahead(e);
+ break;
+ case "Character":
+ this.visitCharacter(e);
+ break;
+ case "Set":
+ this.visitSet(e);
+ break;
+ case "Group":
+ this.visitGroup(e);
+ break;
+ case "GroupBackReference":
+ this.visitGroupBackReference(e);
+ break;
+ case "Quantifier":
+ this.visitQuantifier(e);
+ }
+ this.visitChildren(e);
+ },
+ },
+ { key: "visitPattern", value: function (e) {} },
+ { key: "visitFlags", value: function (e) {} },
+ { key: "visitDisjunction", value: function (e) {} },
+ { key: "visitAlternative", value: function (e) {} },
+ { key: "visitStartAnchor", value: function (e) {} },
+ { key: "visitEndAnchor", value: function (e) {} },
+ { key: "visitWordBoundary", value: function (e) {} },
+ { key: "visitNonWordBoundary", value: function (e) {} },
+ { key: "visitLookahead", value: function (e) {} },
+ { key: "visitNegativeLookahead", value: function (e) {} },
+ { key: "visitCharacter", value: function (e) {} },
+ { key: "visitSet", value: function (e) {} },
+ { key: "visitGroup", value: function (e) {} },
+ { key: "visitGroupBackReference", value: function (e) {} },
+ { key: "visitQuantifier", value: function (e) {} },
+ ]),
+ e
+ );
+ })(),
+ Va = {},
+ ja = new Qa();
+ function Wa(e) {
+ var t = e.toString();
+ if (Va.hasOwnProperty(t)) return Va[t];
+ var n = ja.pattern(t);
+ return (Va[t] = n), n;
+ }
+ var Xa =
+ "Complement Sets are not supported for first char optimization",
+ Ya = 'Unable to use "first char" lexer optimizations:\n';
+ function qa(e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1] && arguments[1];
+ try {
+ var n = Wa(e);
+ return Ja(n.value, {}, n.flags.ignoreCase);
+ } catch (i) {
+ if (i.message === Xa)
+ t &&
+ aa(
+ ""
+ .concat(Ya, "\tUnable to optimize: < ")
+ .concat(
+ e.toString(),
+ " >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details."
+ )
+ );
+ else {
+ var r = "";
+ t &&
+ (r =
+ "\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),
+ ia(
+ ""
+ .concat(Ya, "\n\tFailed parsing: < ")
+ .concat(
+ e.toString(),
+ " >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues"
+ ) + r
+ );
+ }
+ }
+ return [];
+ }
+ function Ja(e, t, n) {
+ switch (e.type) {
+ case "Disjunction":
+ for (var r = 0; r < e.value.length; r++) Ja(e.value[r], t, n);
+ break;
+ case "Alternative":
+ for (var i = e.value, a = 0; a < i.length; a++) {
+ var o = i[a];
+ switch (o.type) {
+ case "EndAnchor":
+ case "GroupBackReference":
+ case "Lookahead":
+ case "NegativeLookahead":
+ case "StartAnchor":
+ case "WordBoundary":
+ case "NonWordBoundary":
+ continue;
+ }
+ var s = o;
+ switch (s.type) {
+ case "Character":
+ Ka(s.value, t, n);
+ break;
+ case "Set":
+ if (!0 === s.complement) throw Error(Xa);
+ hi(s.value, function (e) {
+ if ("number" === typeof e) Ka(e, t, n);
+ else {
+ var r = e;
+ if (!0 === n)
+ for (var i = r.from; i <= r.to; i++) Ka(i, t, n);
+ else {
+ for (var a = r.from; a <= r.to && a < xo; a++)
+ Ka(a, t, n);
+ if (r.to >= xo)
+ for (
+ var o = r.from >= xo ? r.from : xo,
+ s = r.to,
+ l = Eo(o),
+ u = Eo(s),
+ c = l;
+ c <= u;
+ c++
+ )
+ t[c] = c;
+ }
+ }
+ });
+ break;
+ case "Group":
+ Ja(s.value, t, n);
+ break;
+ default:
+ throw Error("Non Exhaustive Match");
+ }
+ var l =
+ void 0 !== s.quantifier && 0 === s.quantifier.atLeast;
+ if (
+ ("Group" === s.type && !1 === eo(s)) ||
+ ("Group" !== s.type && !1 === l)
+ )
+ break;
+ }
+ break;
+ default:
+ throw Error("non exhaustive match!");
+ }
+ return Di(t);
+ }
+ function Ka(e, t, n) {
+ var r = Eo(e);
+ (t[r] = r),
+ !0 === n &&
+ (function (e, t) {
+ var n = String.fromCharCode(e),
+ r = n.toUpperCase();
+ if (r !== n) {
+ var i = Eo(r.charCodeAt(0));
+ t[i] = i;
+ } else {
+ var a = n.toLowerCase();
+ if (a !== n) {
+ var o = Eo(a.charCodeAt(0));
+ t[o] = o;
+ }
+ }
+ })(e, t);
+ }
+ function $a(e, t) {
+ return xi(e.value, function (e) {
+ if ("number" === typeof e) return Fi(t, e);
+ var n = e;
+ return (
+ void 0 !==
+ xi(t, function (e) {
+ return n.from <= e && e <= n.to;
+ })
+ );
+ });
+ }
+ function eo(e) {
+ var t = e.quantifier;
+ return (
+ !(!t || 0 !== t.atLeast) ||
+ (!!e.value && (w(e.value) ? mi(e.value, eo) : eo(e.value)))
+ );
+ }
+ var to = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this)).targetCharCodes = e),
+ (r.found = !1),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "visitChildren",
+ value: function (e) {
+ if (!0 !== this.found) {
+ switch (e.type) {
+ case "Lookahead":
+ return void this.visitLookahead(e);
+ case "NegativeLookahead":
+ return void this.visitNegativeLookahead(e);
+ }
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "visitChildren",
+ this
+ ).call(this, e);
+ }
+ },
+ },
+ {
+ key: "visitCharacter",
+ value: function (e) {
+ Fi(this.targetCharCodes, e.value) && (this.found = !0);
+ },
+ },
+ {
+ key: "visitSet",
+ value: function (e) {
+ e.complement
+ ? void 0 === $a(e, this.targetCharCodes) &&
+ (this.found = !0)
+ : void 0 !== $a(e, this.targetCharCodes) &&
+ (this.found = !0);
+ },
+ },
+ ]),
+ n
+ );
+ })(Ha);
+ function no(e, t) {
+ if (t instanceof RegExp) {
+ var n = Wa(t),
+ r = new to(e);
+ return r.visit(n), r.found;
+ }
+ return (
+ void 0 !==
+ xi(t, function (t) {
+ return Fi(e, t.charCodeAt(0));
+ })
+ );
+ }
+ var ro = "PATTERN",
+ io = "defaultMode",
+ ao = "modes",
+ oo = "boolean" === typeof new RegExp("(?:)").sticky;
+ function so(e, t) {
+ var n,
+ r = (t = oi(t, {
+ useSticky: oo,
+ debug: !1,
+ safeMode: !1,
+ positionTracking: "full",
+ lineTerminatorCharacters: ["\r", "\n"],
+ tracer: function (e, t) {
+ return t();
+ },
+ })).tracer;
+ r("initCharCodeToOptimizedIndexMap", function () {
+ !(function () {
+ if (Qi(So)) {
+ So = new Array(65536);
+ for (var e = 0; e < 65536; e++)
+ So[e] = e > 255 ? 255 + ~~(e / 255) : e;
+ }
+ })();
+ }),
+ r("Reject Lexer.NA", function () {
+ n = Ki(e, function (e) {
+ return e[ro] === Uo.NA;
+ });
+ });
+ var i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p,
+ v = !1;
+ r("Transform Patterns", function () {
+ (v = !1),
+ (i = _i(n, function (e) {
+ var n = e[ro];
+ if (Vi(n)) {
+ var r = n.source;
+ return 1 !== r.length ||
+ "^" === r ||
+ "$" === r ||
+ "." === r ||
+ n.ignoreCase
+ ? 2 !== r.length ||
+ "\\" !== r[0] ||
+ Fi(
+ [
+ "d",
+ "D",
+ "s",
+ "S",
+ "t",
+ "r",
+ "n",
+ "t",
+ "0",
+ "c",
+ "b",
+ "B",
+ "f",
+ "v",
+ "w",
+ "W",
+ ],
+ r[1]
+ )
+ ? t.useSticky
+ ? ho(n)
+ : fo(n)
+ : r[1]
+ : r;
+ }
+ if (Y(n)) return (v = !0), { exec: n };
+ if ("object" === typeof n) return (v = !0), n;
+ if ("string" === typeof n) {
+ if (1 === n.length) return n;
+ var i = n.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&"),
+ a = new RegExp(i);
+ return t.useSticky ? ho(a) : fo(a);
+ }
+ throw Error("non exhaustive match");
+ }));
+ }),
+ r("misc mapping", function () {
+ (a = _i(n, function (e) {
+ return e.tokenTypeIdx;
+ })),
+ (o = _i(n, function (e) {
+ var t = e.GROUP;
+ if (t !== Uo.SKIPPED) {
+ if (Li(t)) return t;
+ if (ji(t)) return !1;
+ throw Error("non exhaustive match");
+ }
+ })),
+ (s = _i(n, function (e) {
+ var t = e.LONGER_ALT;
+ if (t)
+ return w(t)
+ ? _i(t, function (e) {
+ return Ni(n, e);
+ })
+ : [Ni(n, t)];
+ })),
+ (l = _i(n, function (e) {
+ return e.PUSH_MODE;
+ })),
+ (u = _i(n, function (e) {
+ return Bi(e, "POP_MODE");
+ }));
+ }),
+ r("Line Terminator Handling", function () {
+ var e = yo(t.lineTerminatorCharacters);
+ (c = _i(n, function (e) {
+ return !1;
+ })),
+ "onlyOffset" !== t.positionTracking &&
+ (c = _i(n, function (t) {
+ return Bi(t, "LINE_BREAKS")
+ ? !!t.LINE_BREAKS
+ : !1 === Ao(t, e) && no(e, t.PATTERN);
+ }));
+ }),
+ r("Misc Mapping #2", function () {
+ (f = _i(n, vo)),
+ (d = _i(i, mo)),
+ (h = Ji(
+ n,
+ function (e, t) {
+ var n = t.GROUP;
+ return Li(n) && n !== Uo.SKIPPED && (e[n] = []), e;
+ },
+ {}
+ )),
+ (p = _i(i, function (e, t) {
+ return {
+ pattern: i[t],
+ longerAlt: s[t],
+ canLineTerminator: c[t],
+ isCustom: f[t],
+ short: d[t],
+ group: o[t],
+ push: l[t],
+ pop: u[t],
+ tokenTypeIdx: a[t],
+ tokenType: n[t],
+ };
+ }));
+ });
+ var m = !0,
+ g = [];
+ return (
+ t.safeMode ||
+ r("First Char Optimization", function () {
+ g = Ji(
+ n,
+ function (e, n, r) {
+ if ("string" === typeof n.PATTERN) {
+ var i = Eo(n.PATTERN.charCodeAt(0));
+ bo(e, i, p[r]);
+ } else if (w(n.START_CHARS_HINT)) {
+ var a;
+ hi(n.START_CHARS_HINT, function (t) {
+ var n = Eo(
+ "string" === typeof t ? t.charCodeAt(0) : t
+ );
+ a !== n && ((a = n), bo(e, n, p[r]));
+ });
+ } else if (Vi(n.PATTERN))
+ if (n.PATTERN.unicode)
+ (m = !1),
+ t.ensureOptimizations &&
+ ia(
+ ""
+ .concat(Ya, "\tUnable to analyze < ")
+ .concat(
+ n.PATTERN.toString(),
+ " > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE"
+ )
+ );
+ else {
+ var o = qa(n.PATTERN, t.ensureOptimizations);
+ Qi(o) && (m = !1),
+ hi(o, function (t) {
+ bo(e, t, p[r]);
+ });
+ }
+ else
+ t.ensureOptimizations &&
+ ia(
+ ""
+ .concat(Ya, "\tTokenType: <")
+ .concat(
+ n.name,
+ "> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"
+ )
+ ),
+ (m = !1);
+ return e;
+ },
+ []
+ );
+ }),
+ {
+ emptyGroups: h,
+ patternIdxToConfig: p,
+ charCodeToPatternIdxToConfig: g,
+ hasCustom: v,
+ canBeOptimized: m,
+ }
+ );
+ }
+ function lo(e, t) {
+ var n = [],
+ r = (function (e) {
+ var t = Ai(e, function (e) {
+ return !Bi(e, ro);
+ }),
+ n = _i(t, function (e) {
+ return {
+ message:
+ "Token Type: ->" +
+ e.name +
+ "<- missing static 'PATTERN' property",
+ type: Po.MISSING_PATTERN,
+ tokenTypes: [e],
+ };
+ }),
+ r = ui(e, t);
+ return { errors: n, valid: r };
+ })(e);
+ n = n.concat(r.errors);
+ var i = (function (e) {
+ var t = Ai(e, function (e) {
+ var t = e[ro];
+ return !Vi(t) && !Y(t) && !Bi(t, "exec") && !Li(t);
+ }),
+ n = _i(t, function (e) {
+ return {
+ message:
+ "Token Type: ->" +
+ e.name +
+ "<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",
+ type: Po.INVALID_PATTERN,
+ tokenTypes: [e],
+ };
+ }),
+ r = ui(e, t);
+ return { errors: n, valid: r };
+ })(r.valid),
+ a = i.valid;
+ return (
+ (n = (n = n.concat(i.errors)).concat(
+ (function (e) {
+ var t = [],
+ n = Ai(e, function (e) {
+ return Vi(e[ro]);
+ });
+ return (
+ (t = t.concat(
+ (function (e) {
+ var t = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.apply(this, arguments)).found = !1),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "visitEndAnchor",
+ value: function (e) {
+ this.found = !0;
+ },
+ },
+ ]),
+ n
+ );
+ })(Ha),
+ n = Ai(e, function (e) {
+ var n = e.PATTERN;
+ try {
+ var r = Wa(n),
+ i = new t();
+ return i.visit(r), i.found;
+ } catch (a) {
+ return uo.test(n.source);
+ }
+ }),
+ r = _i(n, function (e) {
+ return {
+ message:
+ "Unexpected RegExp Anchor Error:\n\tToken Type: ->" +
+ e.name +
+ "<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",
+ type: Po.EOI_ANCHOR_FOUND,
+ tokenTypes: [e],
+ };
+ });
+ return r;
+ })(n)
+ )),
+ (t = t.concat(
+ (function (e) {
+ var t = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.apply(this, arguments)).found = !1),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "visitStartAnchor",
+ value: function (e) {
+ this.found = !0;
+ },
+ },
+ ]),
+ n
+ );
+ })(Ha),
+ n = Ai(e, function (e) {
+ var n = e.PATTERN;
+ try {
+ var r = Wa(n),
+ i = new t();
+ return i.visit(r), i.found;
+ } catch (a) {
+ return co.test(n.source);
+ }
+ }),
+ r = _i(n, function (e) {
+ return {
+ message:
+ "Unexpected RegExp Anchor Error:\n\tToken Type: ->" +
+ e.name +
+ "<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",
+ type: Po.SOI_ANCHOR_FOUND,
+ tokenTypes: [e],
+ };
+ });
+ return r;
+ })(n)
+ )),
+ (t = t.concat(
+ (function (e) {
+ var t = Ai(e, function (e) {
+ var t = e[ro];
+ return (
+ t instanceof RegExp && (t.multiline || t.global)
+ );
+ }),
+ n = _i(t, function (e) {
+ return {
+ message:
+ "Token Type: ->" +
+ e.name +
+ "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
+ type: Po.UNSUPPORTED_FLAGS_FOUND,
+ tokenTypes: [e],
+ };
+ });
+ return n;
+ })(n)
+ )),
+ (t = t.concat(
+ (function (e) {
+ var t = [],
+ n = _i(e, function (n) {
+ return Ji(
+ e,
+ function (e, r) {
+ return (
+ n.PATTERN.source !== r.PATTERN.source ||
+ Fi(t, r) ||
+ r.PATTERN === Uo.NA ||
+ (t.push(r), e.push(r)),
+ e
+ );
+ },
+ []
+ );
+ }),
+ r = _i(
+ Ai((n = sr(n)), function (e) {
+ return e.length > 1;
+ }),
+ function (e) {
+ var t = _i(e, function (e) {
+ return e.name;
+ }),
+ n = Si(e).PATTERN;
+ return {
+ message: "The same RegExp pattern ->"
+ .concat(
+ n,
+ "<-has been used in all of the following Token Types: "
+ )
+ .concat(t.join(", "), " <-"),
+ type: Po.DUPLICATE_PATTERNS_FOUND,
+ tokenTypes: e,
+ };
+ }
+ );
+ return r;
+ })(n)
+ )),
+ (t = t.concat(
+ (function (e) {
+ var t = Ai(e, function (e) {
+ return e.PATTERN.test("");
+ }),
+ n = _i(t, function (e) {
+ return {
+ message:
+ "Token Type: ->" +
+ e.name +
+ "<- static 'PATTERN' must not match an empty string",
+ type: Po.EMPTY_MATCH_PATTERN,
+ tokenTypes: [e],
+ };
+ });
+ return n;
+ })(n)
+ )),
+ t
+ );
+ })(a)
+ )),
+ (n = n.concat(
+ (function (e) {
+ var t = Ai(e, function (e) {
+ if (!Bi(e, "GROUP")) return !1;
+ var t = e.GROUP;
+ return t !== Uo.SKIPPED && t !== Uo.NA && !Li(t);
+ }),
+ n = _i(t, function (e) {
+ return {
+ message:
+ "Token Type: ->" +
+ e.name +
+ "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",
+ type: Po.INVALID_GROUP_TYPE_FOUND,
+ tokenTypes: [e],
+ };
+ });
+ return n;
+ })(a)
+ )),
+ (n = n.concat(
+ (function (e, t) {
+ var n = Ai(e, function (e) {
+ return void 0 !== e.PUSH_MODE && !Fi(t, e.PUSH_MODE);
+ }),
+ r = _i(n, function (e) {
+ return {
+ message: "Token Type: ->"
+ .concat(
+ e.name,
+ "<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"
+ )
+ .concat(e.PUSH_MODE, "<-which does not exist"),
+ type: Po.PUSH_MODE_DOES_NOT_EXIST,
+ tokenTypes: [e],
+ };
+ });
+ return r;
+ })(a, t)
+ )),
+ (n = n.concat(
+ (function (e) {
+ var t = [],
+ n = Ji(
+ e,
+ function (e, t, n) {
+ var r,
+ i = t.PATTERN;
+ return (
+ i === Uo.NA ||
+ (Li(i)
+ ? e.push({ str: i, idx: n, tokenType: t })
+ : Vi(i) &&
+ ((r = i),
+ void 0 ===
+ xi(
+ [
+ ".",
+ "\\",
+ "[",
+ "]",
+ "|",
+ "^",
+ "$",
+ "(",
+ ")",
+ "?",
+ "*",
+ "+",
+ "{",
+ ],
+ function (e) {
+ return -1 !== r.source.indexOf(e);
+ }
+ )) &&
+ e.push({
+ str: i.source,
+ idx: n,
+ tokenType: t,
+ })),
+ e
+ );
+ },
+ []
+ );
+ return (
+ hi(e, function (e, r) {
+ hi(n, function (n) {
+ var i = n.str,
+ a = n.idx,
+ o = n.tokenType;
+ if (
+ r < a &&
+ (function (e, t) {
+ if (Vi(t)) {
+ var n = t.exec(e);
+ return null !== n && 0 === n.index;
+ }
+ if (Y(t)) return t(e, 0, [], {});
+ if (Bi(t, "exec")) return t.exec(e, 0, [], {});
+ if ("string" === typeof t) return t === e;
+ throw Error("non exhaustive match");
+ })(i, e.PATTERN)
+ ) {
+ var s = "Token: ->"
+ .concat(
+ o.name,
+ "<- can never be matched.\nBecause it appears AFTER the Token Type ->"
+ )
+ .concat(
+ e.name,
+ "<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE"
+ );
+ t.push({
+ message: s,
+ type: Po.UNREACHABLE_PATTERN,
+ tokenTypes: [e, o],
+ });
+ }
+ });
+ }),
+ t
+ );
+ })(a)
+ )),
+ n
+ );
+ }
+ var uo = /[^\\][$]/;
+ var co = /[^\\[][\^]|^\^/;
+ function fo(e) {
+ var t = e.ignoreCase ? "i" : "";
+ return new RegExp("^(?:".concat(e.source, ")"), t);
+ }
+ function ho(e) {
+ var t = e.ignoreCase ? "iy" : "y";
+ return new RegExp("".concat(e.source), t);
+ }
+ function po(e, t, n) {
+ var r = [],
+ i = !1,
+ a = Ki(sr(Gt(Di(e.modes))), function (e) {
+ return e[ro] === Uo.NA;
+ }),
+ o = yo(n);
+ return (
+ t &&
+ hi(a, function (e) {
+ var t = Ao(e, o);
+ if (!1 !== t) {
+ var n = (function (e, t) {
+ if (t.issue === Po.IDENTIFY_TERMINATOR)
+ return "Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"
+ .concat(e.name, "> Token Type\n\t Root cause: ")
+ .concat(
+ t.errMsg,
+ ".\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR"
+ );
+ if (t.issue === Po.CUSTOM_LINE_BREAK)
+ return "Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <".concat(
+ e.name,
+ "> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK"
+ );
+ throw Error("non exhaustive match");
+ })(e, t),
+ a = { message: n, type: t.issue, tokenType: e };
+ r.push(a);
+ } else Bi(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : no(o, e.PATTERN) && (i = !0);
+ }),
+ t &&
+ !i &&
+ r.push({
+ message:
+ "Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",
+ type: Po.NO_LINE_BREAKS_FLAGS,
+ }),
+ r
+ );
+ }
+ function vo(e) {
+ var t = e.PATTERN;
+ if (Vi(t)) return !1;
+ if (Y(t)) return !0;
+ if (Bi(t, "exec")) return !0;
+ if (Li(t)) return !1;
+ throw Error("non exhaustive match");
+ }
+ function mo(e) {
+ return !(!Li(e) || 1 !== e.length) && e.charCodeAt(0);
+ }
+ var go = {
+ test: function (e) {
+ for (var t = e.length, n = this.lastIndex; n < t; n++) {
+ var r = e.charCodeAt(n);
+ if (10 === r) return (this.lastIndex = n + 1), !0;
+ if (13 === r)
+ return (
+ 10 === e.charCodeAt(n + 1)
+ ? (this.lastIndex = n + 2)
+ : (this.lastIndex = n + 1),
+ !0
+ );
+ }
+ return !1;
+ },
+ lastIndex: 0,
+ };
+ function Ao(e, t) {
+ if (Bi(e, "LINE_BREAKS")) return !1;
+ if (Vi(e.PATTERN)) {
+ try {
+ no(t, e.PATTERN);
+ } catch (n) {
+ return { issue: Po.IDENTIFY_TERMINATOR, errMsg: n.message };
+ }
+ return !1;
+ }
+ if (Li(e.PATTERN)) return !1;
+ if (vo(e)) return { issue: Po.CUSTOM_LINE_BREAK };
+ throw Error("non exhaustive match");
+ }
+ function yo(e) {
+ return _i(e, function (e) {
+ return Li(e) ? e.charCodeAt(0) : e;
+ });
+ }
+ function bo(e, t, n) {
+ void 0 === e[t] ? (e[t] = [n]) : e[t].push(n);
+ }
+ var xo = 256,
+ So = [];
+ function Eo(e) {
+ return e < xo ? e : So[e];
+ }
+ function _o(e, t) {
+ var n = e.tokenTypeIdx;
+ return (
+ n === t.tokenTypeIdx ||
+ (!0 === t.isParent && !0 === t.categoryMatchesMap[n])
+ );
+ }
+ function Co(e, t) {
+ return e.tokenTypeIdx === t.tokenTypeIdx;
+ }
+ var wo = 1,
+ To = {};
+ function Mo(e) {
+ var t = (function (e) {
+ var t = or(e),
+ n = e,
+ r = !0;
+ for (; r; ) {
+ n = sr(
+ Gt(
+ _i(n, function (e) {
+ return e.CATEGORIES;
+ })
+ )
+ );
+ var i = ui(n, t);
+ (t = t.concat(i)), Qi(i) ? (r = !1) : (n = i);
+ }
+ return t;
+ })(e);
+ !(function (e) {
+ hi(e, function (e) {
+ ko(e) || ((To[wo] = e), (e.tokenTypeIdx = wo++)),
+ Ro(e) &&
+ !w(e.CATEGORIES) &&
+ (e.CATEGORIES = [e.CATEGORIES]),
+ Ro(e) || (e.CATEGORIES = []),
+ Bi(e, "categoryMatches") || (e.categoryMatches = []),
+ (function (e) {
+ return Bi(e, "categoryMatchesMap");
+ })(e) || (e.categoryMatchesMap = {});
+ });
+ })(t),
+ (function (e) {
+ hi(e, function (e) {
+ Io([], e);
+ });
+ })(t),
+ (function (e) {
+ hi(e, function (e) {
+ (e.categoryMatches = []),
+ hi(e.categoryMatchesMap, function (t, n) {
+ e.categoryMatches.push(To[n].tokenTypeIdx);
+ });
+ });
+ })(t),
+ hi(t, function (e) {
+ e.isParent = e.categoryMatches.length > 0;
+ });
+ }
+ function Io(e, t) {
+ hi(e, function (e) {
+ t.categoryMatchesMap[e.tokenTypeIdx] = !0;
+ }),
+ hi(t.CATEGORIES, function (n) {
+ var r = e.concat(t);
+ Fi(r, n) || Io(r, n);
+ });
+ }
+ function ko(e) {
+ return Bi(e, "tokenTypeIdx");
+ }
+ function Ro(e) {
+ return Bi(e, "CATEGORIES");
+ }
+ function Bo(e) {
+ return Bi(e, "tokenTypeIdx");
+ }
+ var Po, Lo;
+ ((Lo = Po || (Po = {}))[(Lo.MISSING_PATTERN = 0)] =
+ "MISSING_PATTERN"),
+ (Lo[(Lo.INVALID_PATTERN = 1)] = "INVALID_PATTERN"),
+ (Lo[(Lo.EOI_ANCHOR_FOUND = 2)] = "EOI_ANCHOR_FOUND"),
+ (Lo[(Lo.UNSUPPORTED_FLAGS_FOUND = 3)] =
+ "UNSUPPORTED_FLAGS_FOUND"),
+ (Lo[(Lo.DUPLICATE_PATTERNS_FOUND = 4)] =
+ "DUPLICATE_PATTERNS_FOUND"),
+ (Lo[(Lo.INVALID_GROUP_TYPE_FOUND = 5)] =
+ "INVALID_GROUP_TYPE_FOUND"),
+ (Lo[(Lo.PUSH_MODE_DOES_NOT_EXIST = 6)] =
+ "PUSH_MODE_DOES_NOT_EXIST"),
+ (Lo[(Lo.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7)] =
+ "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"),
+ (Lo[(Lo.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8)] =
+ "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"),
+ (Lo[(Lo.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9)] =
+ "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"),
+ (Lo[(Lo.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10)] =
+ "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"),
+ (Lo[(Lo.SOI_ANCHOR_FOUND = 11)] = "SOI_ANCHOR_FOUND"),
+ (Lo[(Lo.EMPTY_MATCH_PATTERN = 12)] = "EMPTY_MATCH_PATTERN"),
+ (Lo[(Lo.NO_LINE_BREAKS_FLAGS = 13)] = "NO_LINE_BREAKS_FLAGS"),
+ (Lo[(Lo.UNREACHABLE_PATTERN = 14)] = "UNREACHABLE_PATTERN"),
+ (Lo[(Lo.IDENTIFY_TERMINATOR = 15)] = "IDENTIFY_TERMINATOR"),
+ (Lo[(Lo.CUSTOM_LINE_BREAK = 16)] = "CUSTOM_LINE_BREAK"),
+ (Lo[(Lo.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE = 17)] =
+ "MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE");
+ var Do = {
+ deferDefinitionErrorsHandling: !1,
+ positionTracking: "full",
+ lineTerminatorsPattern: /\n|\r\n?/g,
+ lineTerminatorCharacters: ["\n", "\r"],
+ ensureOptimizations: !1,
+ safeMode: !1,
+ errorMessageProvider: {
+ buildUnableToPopLexerModeMessage: function (e) {
+ return "Unable to pop Lexer Mode after encountering Token ->".concat(
+ e.image,
+ "<- The Mode Stack is empty"
+ );
+ },
+ buildUnexpectedCharactersMessage: function (e, t, n, r, i) {
+ return "unexpected character: ->"
+ .concat(e.charAt(t), "<- at offset: ")
+ .concat(t, ", skipped ")
+ .concat(n, " characters.");
+ },
+ },
+ traceInitPerf: !1,
+ skipValidations: !1,
+ recoveryEnabled: !0,
+ };
+ Object.freeze(Do);
+ var Uo = (function () {
+ function e(t) {
+ var n = this,
+ r =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Do;
+ if (
+ ((0, p.Z)(this, e),
+ (this.lexerDefinition = t),
+ (this.lexerDefinitionErrors = []),
+ (this.lexerDefinitionWarning = []),
+ (this.patternIdxToConfig = {}),
+ (this.charCodeToPatternIdxToConfig = {}),
+ (this.modes = []),
+ (this.emptyGroups = {}),
+ (this.trackStartLines = !0),
+ (this.trackEndLines = !0),
+ (this.hasCustom = !1),
+ (this.canModeBeOptimized = {}),
+ (this.TRACE_INIT = function (e, t) {
+ if (!0 === n.traceInitPerf) {
+ n.traceInitIndent++;
+ var r = new Array(n.traceInitIndent + 1).join("\t");
+ n.traceInitIndent < n.traceInitMaxIdent &&
+ console.log("".concat(r, "--\x3e <").concat(e, ">"));
+ var i = oa(t),
+ a = i.time,
+ o = i.value,
+ s = a > 10 ? console.warn : console.log;
+ return (
+ n.traceInitIndent < n.traceInitMaxIdent &&
+ s(
+ ""
+ .concat(r, "<-- <")
+ .concat(e, "> time: ")
+ .concat(a, "ms")
+ ),
+ n.traceInitIndent--,
+ o
+ );
+ }
+ return t();
+ }),
+ "boolean" === typeof r)
+ )
+ throw Error(
+ "The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported"
+ );
+ this.config = ct({}, Do, r);
+ var i = this.config.traceInitPerf;
+ !0 === i
+ ? ((this.traceInitMaxIdent = 1 / 0),
+ (this.traceInitPerf = !0))
+ : "number" === typeof i &&
+ ((this.traceInitMaxIdent = i), (this.traceInitPerf = !0)),
+ (this.traceInitIndent = -1),
+ this.TRACE_INIT("Lexer Constructor", function () {
+ var e,
+ i = !0;
+ n.TRACE_INIT("Lexer Config handling", function () {
+ if (
+ n.config.lineTerminatorsPattern ===
+ Do.lineTerminatorsPattern
+ )
+ n.config.lineTerminatorsPattern = go;
+ else if (
+ n.config.lineTerminatorCharacters ===
+ Do.lineTerminatorCharacters
+ )
+ throw Error(
+ "Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS"
+ );
+ if (r.safeMode && r.ensureOptimizations)
+ throw Error(
+ '"safeMode" and "ensureOptimizations" flags are mutually exclusive.'
+ );
+ (n.trackStartLines = /full|onlyStart/i.test(
+ n.config.positionTracking
+ )),
+ (n.trackEndLines = /full/i.test(
+ n.config.positionTracking
+ )),
+ w(t)
+ ? (e = {
+ modes: { defaultMode: or(t) },
+ defaultMode: io,
+ })
+ : ((i = !1), (e = or(t)));
+ }),
+ !1 === n.config.skipValidations &&
+ (n.TRACE_INIT("performRuntimeChecks", function () {
+ n.lexerDefinitionErrors =
+ n.lexerDefinitionErrors.concat(
+ (function (e, t, n) {
+ var r = [];
+ return (
+ Bi(e, io) ||
+ r.push({
+ message:
+ "A MultiMode Lexer cannot be initialized without a <" +
+ io +
+ "> property in its definition\n",
+ type: Po.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE,
+ }),
+ Bi(e, ao) ||
+ r.push({
+ message:
+ "A MultiMode Lexer cannot be initialized without a property in its definition\n",
+ type: Po.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY,
+ }),
+ Bi(e, ao) &&
+ Bi(e, io) &&
+ !Bi(e.modes, e.defaultMode) &&
+ r.push({
+ message:
+ "A MultiMode Lexer cannot be initialized with a "
+ .concat(io, ": <")
+ .concat(
+ e.defaultMode,
+ ">which does not exist\n"
+ ),
+ type: Po.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST,
+ }),
+ Bi(e, ao) &&
+ hi(e.modes, function (e, t) {
+ hi(e, function (n, i) {
+ ji(n)
+ ? r.push({
+ message:
+ "A Lexer cannot be initialized using an undefined Token Type. Mode:<"
+ .concat(t, "> at index: <")
+ .concat(i, ">\n"),
+ type: Po.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED,
+ })
+ : Bi(n, "LONGER_ALT") &&
+ hi(
+ w(n.LONGER_ALT)
+ ? n.LONGER_ALT
+ : [n.LONGER_ALT],
+ function (i) {
+ ji(i) ||
+ Fi(e, i) ||
+ r.push({
+ message:
+ "A MultiMode Lexer cannot be initialized with a longer_alt <"
+ .concat(
+ i.name,
+ "> on token <"
+ )
+ .concat(
+ n.name,
+ "> outside of mode <"
+ )
+ .concat(t, ">\n"),
+ type: Po.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE,
+ });
+ }
+ );
+ });
+ }),
+ r
+ );
+ })(
+ e,
+ n.trackStartLines,
+ n.config.lineTerminatorCharacters
+ )
+ );
+ }),
+ n.TRACE_INIT(
+ "performWarningRuntimeChecks",
+ function () {
+ n.lexerDefinitionWarning =
+ n.lexerDefinitionWarning.concat(
+ po(
+ e,
+ n.trackStartLines,
+ n.config.lineTerminatorCharacters
+ )
+ );
+ }
+ )),
+ (e.modes = e.modes ? e.modes : {}),
+ hi(e.modes, function (t, n) {
+ e.modes[n] = Ki(t, function (e) {
+ return ji(e);
+ });
+ });
+ var a = st(e.modes);
+ if (
+ (hi(e.modes, function (e, t) {
+ n.TRACE_INIT(
+ "Mode: <".concat(t, "> processing"),
+ function () {
+ var i;
+ (n.modes.push(t),
+ !1 === n.config.skipValidations &&
+ n.TRACE_INIT("validatePatterns", function () {
+ n.lexerDefinitionErrors =
+ n.lexerDefinitionErrors.concat(lo(e, a));
+ }),
+ Qi(n.lexerDefinitionErrors)) &&
+ (Mo(e),
+ n.TRACE_INIT("analyzeTokenTypes", function () {
+ i = so(e, {
+ lineTerminatorCharacters:
+ n.config.lineTerminatorCharacters,
+ positionTracking: r.positionTracking,
+ ensureOptimizations: r.ensureOptimizations,
+ safeMode: r.safeMode,
+ tracer: n.TRACE_INIT,
+ });
+ }),
+ (n.patternIdxToConfig[t] = i.patternIdxToConfig),
+ (n.charCodeToPatternIdxToConfig[t] =
+ i.charCodeToPatternIdxToConfig),
+ (n.emptyGroups = ct(
+ {},
+ n.emptyGroups,
+ i.emptyGroups
+ )),
+ (n.hasCustom = i.hasCustom || n.hasCustom),
+ (n.canModeBeOptimized[t] = i.canBeOptimized));
+ }
+ );
+ }),
+ (n.defaultMode = e.defaultMode),
+ !Qi(n.lexerDefinitionErrors) &&
+ !n.config.deferDefinitionErrorsHandling)
+ ) {
+ var o = _i(n.lexerDefinitionErrors, function (e) {
+ return e.message;
+ }).join("-----------------------\n");
+ throw new Error(
+ "Errors detected in definition of Lexer:\n" + o
+ );
+ }
+ hi(n.lexerDefinitionWarning, function (e) {
+ aa(e.message);
+ }),
+ n.TRACE_INIT(
+ "Choosing sub-methods implementations",
+ function () {
+ if (
+ (oo
+ ? ((n.chopInput = H), (n.match = n.matchWithTest))
+ : ((n.updateLastIndex = fe),
+ (n.match = n.matchWithExec)),
+ i && (n.handleModes = fe),
+ !1 === n.trackStartLines &&
+ (n.computeNewColumn = H),
+ !1 === n.trackEndLines &&
+ (n.updateTokenEndLineColumnLocation = fe),
+ /full/i.test(n.config.positionTracking))
+ )
+ n.createTokenInstance = n.createFullToken;
+ else if (/onlyStart/i.test(n.config.positionTracking))
+ n.createTokenInstance = n.createStartOnlyToken;
+ else {
+ if (!/onlyOffset/i.test(n.config.positionTracking))
+ throw Error(
+ 'Invalid config option: "'.concat(
+ n.config.positionTracking,
+ '"'
+ )
+ );
+ n.createTokenInstance = n.createOffsetOnlyToken;
+ }
+ n.hasCustom
+ ? ((n.addToken = n.addTokenUsingPush),
+ (n.handlePayload = n.handlePayloadWithCustom))
+ : ((n.addToken = n.addTokenUsingMemberAccess),
+ (n.handlePayload = n.handlePayloadNoCustom));
+ }
+ ),
+ n.TRACE_INIT("Failed Optimization Warnings", function () {
+ var e = Ji(
+ n.canModeBeOptimized,
+ function (e, t, n) {
+ return !1 === t && e.push(n), e;
+ },
+ []
+ );
+ if (r.ensureOptimizations && !Qi(e))
+ throw Error(
+ "Lexer Modes: < ".concat(
+ e.join(", "),
+ ' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.'
+ )
+ );
+ }),
+ n.TRACE_INIT("clearRegExpParserCache", function () {
+ Va = {};
+ }),
+ n.TRACE_INIT("toFastProperties", function () {
+ sa(n);
+ });
+ });
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "tokenize",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : this.defaultMode;
+ if (!Qi(this.lexerDefinitionErrors)) {
+ var n = _i(this.lexerDefinitionErrors, function (e) {
+ return e.message;
+ }).join("-----------------------\n");
+ throw new Error(
+ "Unable to Tokenize because Errors detected in definition of Lexer:\n" +
+ n
+ );
+ }
+ return this.tokenizeInternal(e, t);
+ },
+ },
+ {
+ key: "tokenizeInternal",
+ value: function (e, t) {
+ var n,
+ r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p,
+ v,
+ m,
+ g,
+ A = this,
+ y = e,
+ b = y.length,
+ x = 0,
+ S = 0,
+ E = this.hasCustom ? 0 : Math.floor(e.length / 10),
+ _ = new Array(E),
+ C = [],
+ T = this.trackStartLines ? 1 : void 0,
+ M = this.trackStartLines ? 1 : void 0,
+ I = (function (e) {
+ var t = {};
+ return (
+ hi(st(e), function (n) {
+ var r = e[n];
+ if (!w(r)) throw Error("non exhaustive match");
+ t[n] = [];
+ }),
+ t
+ );
+ })(this.emptyGroups),
+ k = this.trackStartLines,
+ R = this.config.lineTerminatorsPattern,
+ B = 0,
+ P = [],
+ L = [],
+ D = [],
+ U = [];
+ function F() {
+ return P;
+ }
+ function O(e) {
+ var t = Eo(e),
+ n = L[t];
+ return void 0 === n ? U : n;
+ }
+ Object.freeze(U);
+ var N,
+ G = function (e) {
+ if (
+ 1 === D.length &&
+ void 0 === e.tokenType.PUSH_MODE
+ ) {
+ var t =
+ A.config.errorMessageProvider.buildUnableToPopLexerModeMessage(
+ e
+ );
+ C.push({
+ offset: e.startOffset,
+ line: e.startLine,
+ column: e.startColumn,
+ length: e.image.length,
+ message: t,
+ });
+ } else {
+ D.pop();
+ var n = ci(D);
+ (P = A.patternIdxToConfig[n]),
+ (L = A.charCodeToPatternIdxToConfig[n]),
+ (B = P.length);
+ var r =
+ A.canModeBeOptimized[n] &&
+ !1 === A.config.safeMode;
+ g = L && r ? O : F;
+ }
+ };
+ function Z(e) {
+ D.push(e),
+ (L = this.charCodeToPatternIdxToConfig[e]),
+ (P = this.patternIdxToConfig[e]),
+ (B = P.length),
+ (B = P.length);
+ var t =
+ this.canModeBeOptimized[e] &&
+ !1 === this.config.safeMode;
+ g = L && t ? O : F;
+ }
+ Z.call(this, t);
+ for (var z = this.config.recoveryEnabled; x < b; ) {
+ s = null;
+ var Q = y.charCodeAt(x),
+ H = g(Q),
+ V = H.length;
+ for (n = 0; n < V; n++) {
+ var j = (N = H[n]).pattern;
+ l = null;
+ var W = N.short;
+ if (
+ (!1 !== W
+ ? Q === W && (s = j)
+ : !0 === N.isCustom
+ ? null !== (m = j.exec(y, x, _, I))
+ ? ((s = m[0]),
+ void 0 !== m.payload && (l = m.payload))
+ : (s = null)
+ : (this.updateLastIndex(j, x),
+ (s = this.match(j, e, x))),
+ null !== s)
+ ) {
+ if (void 0 !== (o = N.longerAlt)) {
+ var X = o.length;
+ for (i = 0; i < X; i++) {
+ var Y = P[o[i]],
+ q = Y.pattern;
+ if (
+ ((u = null),
+ !0 === Y.isCustom
+ ? null !== (m = q.exec(y, x, _, I))
+ ? ((a = m[0]),
+ void 0 !== m.payload && (u = m.payload))
+ : (a = null)
+ : (this.updateLastIndex(q, x),
+ (a = this.match(q, e, x))),
+ a && a.length > s.length)
+ ) {
+ (s = a), (l = u), (N = Y);
+ break;
+ }
+ }
+ }
+ break;
+ }
+ }
+ if (null !== s) {
+ if (
+ ((c = s.length),
+ void 0 !== (f = N.group) &&
+ ((d = N.tokenTypeIdx),
+ (h = this.createTokenInstance(
+ s,
+ x,
+ d,
+ N.tokenType,
+ T,
+ M,
+ c
+ )),
+ this.handlePayload(h, l),
+ !1 === f
+ ? (S = this.addToken(_, S, h))
+ : I[f].push(h)),
+ (e = this.chopInput(e, c)),
+ (x += c),
+ (M = this.computeNewColumn(M, c)),
+ !0 === k && !0 === N.canLineTerminator)
+ ) {
+ var J = 0,
+ K = void 0,
+ $ = void 0;
+ R.lastIndex = 0;
+ do {
+ !0 === (K = R.test(s)) &&
+ (($ = R.lastIndex - 1), J++);
+ } while (!0 === K);
+ 0 !== J &&
+ ((T += J),
+ (M = c - $),
+ this.updateTokenEndLineColumnLocation(
+ h,
+ f,
+ $,
+ J,
+ T,
+ M,
+ c
+ ));
+ }
+ this.handleModes(N, G, Z, h);
+ } else {
+ for (
+ var ee = x, te = T, ne = M, re = !1 === z;
+ !1 === re && x < b;
+
+ )
+ for (
+ e = this.chopInput(e, 1), x++, r = 0;
+ r < B;
+ r++
+ ) {
+ var ie = P[r],
+ ae = ie.pattern,
+ oe = ie.short;
+ if (
+ (!1 !== oe
+ ? y.charCodeAt(x) === oe && (re = !0)
+ : !0 === ie.isCustom
+ ? (re = null !== ae.exec(y, x, _, I))
+ : (this.updateLastIndex(ae, x),
+ (re = null !== ae.exec(e))),
+ !0 === re)
+ )
+ break;
+ }
+ if (
+ ((p = x - ee),
+ (M = this.computeNewColumn(M, p)),
+ (v =
+ this.config.errorMessageProvider.buildUnexpectedCharactersMessage(
+ y,
+ ee,
+ p,
+ te,
+ ne
+ )),
+ C.push({
+ offset: ee,
+ line: te,
+ column: ne,
+ length: p,
+ message: v,
+ }),
+ !1 === z)
+ )
+ break;
+ }
+ }
+ return (
+ this.hasCustom || (_.length = S),
+ { tokens: _, groups: I, errors: C }
+ );
+ },
+ },
+ {
+ key: "handleModes",
+ value: function (e, t, n, r) {
+ if (!0 === e.pop) {
+ var i = e.push;
+ t(r), void 0 !== i && n.call(this, i);
+ } else void 0 !== e.push && n.call(this, e.push);
+ },
+ },
+ {
+ key: "chopInput",
+ value: function (e, t) {
+ return e.substring(t);
+ },
+ },
+ {
+ key: "updateLastIndex",
+ value: function (e, t) {
+ e.lastIndex = t;
+ },
+ },
+ {
+ key: "updateTokenEndLineColumnLocation",
+ value: function (e, t, n, r, i, a, o) {
+ var s, l;
+ void 0 !== t &&
+ ((l = (s = n === o - 1) ? -1 : 0),
+ (1 === r && !0 === s) ||
+ ((e.endLine = i + l), (e.endColumn = a - 1 - l)));
+ },
+ },
+ {
+ key: "computeNewColumn",
+ value: function (e, t) {
+ return e + t;
+ },
+ },
+ {
+ key: "createOffsetOnlyToken",
+ value: function (e, t, n, r) {
+ return {
+ image: e,
+ startOffset: t,
+ tokenTypeIdx: n,
+ tokenType: r,
+ };
+ },
+ },
+ {
+ key: "createStartOnlyToken",
+ value: function (e, t, n, r, i, a) {
+ return {
+ image: e,
+ startOffset: t,
+ startLine: i,
+ startColumn: a,
+ tokenTypeIdx: n,
+ tokenType: r,
+ };
+ },
+ },
+ {
+ key: "createFullToken",
+ value: function (e, t, n, r, i, a, o) {
+ return {
+ image: e,
+ startOffset: t,
+ endOffset: t + o - 1,
+ startLine: i,
+ endLine: i,
+ startColumn: a,
+ endColumn: a + o - 1,
+ tokenTypeIdx: n,
+ tokenType: r,
+ };
+ },
+ },
+ {
+ key: "addTokenUsingPush",
+ value: function (e, t, n) {
+ return e.push(n), t;
+ },
+ },
+ {
+ key: "addTokenUsingMemberAccess",
+ value: function (e, t, n) {
+ return (e[t] = n), ++t;
+ },
+ },
+ { key: "handlePayloadNoCustom", value: function (e, t) {} },
+ {
+ key: "handlePayloadWithCustom",
+ value: function (e, t) {
+ null !== t && (e.payload = t);
+ },
+ },
+ {
+ key: "matchWithTest",
+ value: function (e, t, n) {
+ return !0 === e.test(t)
+ ? t.substring(n, e.lastIndex)
+ : null;
+ },
+ },
+ {
+ key: "matchWithExec",
+ value: function (e, t) {
+ var n = e.exec(t);
+ return null !== n ? n[0] : null;
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function Fo(e) {
+ return Oo(e) ? e.LABEL : e.name;
+ }
+ function Oo(e) {
+ return Li(e.LABEL) && "" !== e.LABEL;
+ }
+ (Uo.SKIPPED =
+ "This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace."),
+ (Uo.NA = /NOT_APPLICABLE/);
+ var No = "parent",
+ Go = "categories",
+ Zo = "label",
+ zo = "group",
+ Qo = "push_mode",
+ Ho = "pop_mode",
+ Vo = "longer_alt",
+ jo = "line_breaks",
+ Wo = "start_chars_hint";
+ function Xo(e) {
+ return (function (e) {
+ var t = e.pattern,
+ n = {};
+ (n.name = e.name), ji(t) || (n.PATTERN = t);
+ if (Bi(e, No))
+ throw "The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";
+ Bi(e, Go) && (n.CATEGORIES = e[Go]);
+ Mo([n]), Bi(e, Zo) && (n.LABEL = e[Zo]);
+ Bi(e, zo) && (n.GROUP = e[zo]);
+ Bi(e, Ho) && (n.POP_MODE = e[Ho]);
+ Bi(e, Qo) && (n.PUSH_MODE = e[Qo]);
+ Bi(e, Vo) && (n.LONGER_ALT = e[Vo]);
+ Bi(e, jo) && (n.LINE_BREAKS = e[jo]);
+ Bi(e, Wo) && (n.START_CHARS_HINT = e[Wo]);
+ return n;
+ })(e);
+ }
+ var Yo = Xo({ name: "EOF", pattern: Uo.NA });
+ function qo(e, t, n, r, i, a, o, s) {
+ return {
+ image: t,
+ startOffset: n,
+ endOffset: r,
+ startLine: i,
+ endLine: a,
+ startColumn: o,
+ endColumn: s,
+ tokenTypeIdx: e.tokenTypeIdx,
+ tokenType: e,
+ };
+ }
+ Mo([Yo]);
+ var Jo = {
+ buildMismatchTokenMessage: function (e) {
+ var t = e.expected,
+ n = e.actual,
+ r =
+ (e.previous,
+ e.ruleName,
+ Oo(t)
+ ? "--\x3e ".concat(Fo(t), " <--")
+ : "token of type --\x3e ".concat(t.name, " <--"));
+ return "Expecting "
+ .concat(r, " but found --\x3e '")
+ .concat(n.image, "' <--");
+ },
+ buildNotAllInputParsedMessage: function (e) {
+ var t = e.firstRedundant;
+ e.ruleName;
+ return "Redundant input, expecting EOF but found: " + t.image;
+ },
+ buildNoViableAltMessage: function (e) {
+ var t = e.expectedPathsPerAlt,
+ n = e.actual,
+ r = (e.previous, e.customUserDescription),
+ i = (e.ruleName, "Expecting: "),
+ a = "\nbut found: '" + Si(n).image + "'";
+ if (r) return i + r + a;
+ var o = _i(
+ Ji(
+ t,
+ function (e, t) {
+ return e.concat(t);
+ },
+ []
+ ),
+ function (e) {
+ return "[".concat(
+ _i(e, function (e) {
+ return Fo(e);
+ }).join(", "),
+ "]"
+ );
+ }
+ ),
+ s = _i(o, function (e, t) {
+ return " ".concat(t + 1, ". ").concat(e);
+ });
+ return (
+ i +
+ "one of these possible Token sequences:\n".concat(
+ s.join("\n")
+ ) +
+ a
+ );
+ },
+ buildEarlyExitMessage: function (e) {
+ var t = e.expectedIterationPaths,
+ n = e.actual,
+ r = e.customUserDescription,
+ i = (e.ruleName, "Expecting: "),
+ a = "\nbut found: '" + Si(n).image + "'";
+ if (r) return i + r + a;
+ var o = _i(t, function (e) {
+ return "[".concat(
+ _i(e, function (e) {
+ return Fo(e);
+ }).join(","),
+ "]"
+ );
+ });
+ return (
+ i +
+ "expecting at least one iteration which starts with one of these possible Token sequences::\n <".concat(
+ o.join(" ,"),
+ ">"
+ ) +
+ a
+ );
+ },
+ };
+ Object.freeze(Jo);
+ var Ko = {
+ buildRuleNotFoundError: function (e, t) {
+ return (
+ "Invalid grammar, reference to a rule which is not defined: ->" +
+ t.nonTerminalName +
+ "<-\ninside top level rule: ->" +
+ e.name +
+ "<-"
+ );
+ },
+ },
+ $o = {
+ buildDuplicateFoundError: function (e, t) {
+ var n,
+ r = e.name,
+ i = Si(t),
+ a = i.idx,
+ o = Ea(i),
+ s =
+ (n = i) instanceof ya
+ ? n.terminalType.name
+ : n instanceof ca
+ ? n.nonTerminalName
+ : "",
+ l = a > 0,
+ u = "->"
+ .concat(o)
+ .concat(l ? a : "", "<- ")
+ .concat(
+ s ? "with argument: ->".concat(s, "<-") : "",
+ "\n appears more than once ("
+ )
+ .concat(t.length, " times) in the top level rule: ->")
+ .concat(
+ r,
+ "<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n "
+ );
+ return (u = (u = u.replace(/[ \t]+/g, " ")).replace(
+ /\s\s+/g,
+ "\n"
+ ));
+ },
+ buildNamespaceConflictError: function (e) {
+ return "Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <".concat(
+ e.name,
+ ">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter."
+ );
+ },
+ buildAlternationPrefixAmbiguityError: function (e) {
+ var t = _i(e.prefixPath, function (e) {
+ return Fo(e);
+ }).join(", "),
+ n = 0 === e.alternation.idx ? "" : e.alternation.idx;
+ return "Ambiguous alternatives: <"
+ .concat(
+ e.ambiguityIndices.join(" ,"),
+ "> due to common lookahead prefix\nin inside <")
+ .concat(e.topLevelRule.name, "> Rule,\n<")
+ .concat(
+ t,
+ "> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details."
+ );
+ },
+ buildAlternationAmbiguityError: function (e) {
+ var t = _i(e.prefixPath, function (e) {
+ return Fo(e);
+ }).join(", "),
+ n = 0 === e.alternation.idx ? "" : e.alternation.idx,
+ r = "Ambiguous Alternatives Detected: <"
+ .concat(e.ambiguityIndices.join(" ,"), "> in inside <")
+ .concat(e.topLevelRule.name, "> Rule,\n<")
+ .concat(
+ t,
+ "> may appears as a prefix path in all these alternatives.\n"
+ );
+ return (r +=
+ "See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.");
+ },
+ buildEmptyRepetitionError: function (e) {
+ var t = Ea(e.repetition);
+ return (
+ 0 !== e.repetition.idx && (t += e.repetition.idx),
+ "The repetition <"
+ .concat(t, "> within Rule <")
+ .concat(
+ e.topLevelRule.name,
+ "> can never consume any tokens.\nThis could lead to an infinite loop."
+ )
+ );
+ },
+ buildTokenNameError: function (e) {
+ return "deprecated";
+ },
+ buildEmptyAlternationError: function (e) {
+ return "Ambiguous empty alternative: <"
+ .concat(e.emptyChoiceIdx + 1, "> in inside <")
+ .concat(
+ e.topLevelRule.name,
+ "> Rule.\nOnly the last alternative may be an empty alternative."
+ );
+ },
+ buildTooManyAlternativesError: function (e) {
+ return "An Alternation cannot have more than 256 alternatives:\n inside <")
+ .concat(e.topLevelRule.name, "> Rule.\n has ")
+ .concat(
+ e.alternation.definition.length + 1,
+ " alternatives."
+ );
+ },
+ buildLeftRecursionError: function (e) {
+ var t = e.topLevelRule.name,
+ n = _i(e.leftRecursionPath, function (e) {
+ return e.name;
+ }),
+ r = ""
+ .concat(t, " --\x3e ")
+ .concat(n.concat([t]).join(" --\x3e "));
+ return "Left Recursion found in grammar.\nrule: <"
+ .concat(
+ t,
+ "> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "
+ )
+ .concat(
+ r,
+ "\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring."
+ );
+ },
+ buildInvalidRuleNameError: function (e) {
+ return "deprecated";
+ },
+ buildDuplicateRuleNameError: function (e) {
+ var t;
+ return (
+ (t =
+ e.topLevelRule instanceof fa
+ ? e.topLevelRule.name
+ : e.topLevelRule),
+ "Duplicate definition, rule: ->"
+ .concat(t, "<- is already defined in the grammar: ->")
+ .concat(e.grammarName, "<-")
+ );
+ },
+ };
+ var es,
+ ts,
+ ns = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this)).nameToTopRule = e),
+ (i.errMsgProvider = r),
+ (i.errors = []),
+ i
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "resolveRefs",
+ value: function () {
+ var e = this;
+ hi(Di(this.nameToTopRule), function (t) {
+ (e.currTopLevel = t), t.accept(e);
+ });
+ },
+ },
+ {
+ key: "visitNonTerminal",
+ value: function (e) {
+ var t = this.nameToTopRule[e.nonTerminalName];
+ if (t) e.referencedRule = t;
+ else {
+ var n = this.errMsgProvider.buildRuleNotFoundError(
+ this.currTopLevel,
+ e
+ );
+ this.errors.push({
+ message: n,
+ type: Bl.UNRESOLVED_SUBRULE_REF,
+ ruleName: this.currTopLevel.name,
+ unresolvedRefName: e.nonTerminalName,
+ });
+ }
+ },
+ },
+ ]),
+ n
+ );
+ })(xa),
+ rs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this)).topProd = e),
+ (i.path = r),
+ (i.possibleTokTypes = []),
+ (i.nextProductionName = ""),
+ (i.nextProductionOccurrence = 0),
+ (i.found = !1),
+ (i.isAtEndOfPath = !1),
+ i
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "startWalking",
+ value: function () {
+ if (
+ ((this.found = !1),
+ this.path.ruleStack[0] !== this.topProd.name)
+ )
+ throw Error(
+ "The path does not start with the walker's top Rule!"
+ );
+ return (
+ (this.ruleStack = or(this.path.ruleStack).reverse()),
+ (this.occurrenceStack = or(
+ this.path.occurrenceStack
+ ).reverse()),
+ this.ruleStack.pop(),
+ this.occurrenceStack.pop(),
+ this.updateExpectedNext(),
+ this.walk(this.topProd),
+ this.possibleTokTypes
+ );
+ },
+ },
+ {
+ key: "walk",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : [];
+ this.found ||
+ (0, d.Z)((0, h.Z)(n.prototype), "walk", this).call(
+ this,
+ e,
+ t
+ );
+ },
+ },
+ {
+ key: "walkProdRef",
+ value: function (e, t, n) {
+ if (
+ e.referencedRule.name === this.nextProductionName &&
+ e.idx === this.nextProductionOccurrence
+ ) {
+ var r = t.concat(n);
+ this.updateExpectedNext(),
+ this.walk(e.referencedRule, r);
+ }
+ },
+ },
+ {
+ key: "updateExpectedNext",
+ value: function () {
+ Qi(this.ruleStack)
+ ? ((this.nextProductionName = ""),
+ (this.nextProductionOccurrence = 0),
+ (this.isAtEndOfPath = !0))
+ : ((this.nextProductionName = this.ruleStack.pop()),
+ (this.nextProductionOccurrence =
+ this.occurrenceStack.pop()));
+ },
+ },
+ ]),
+ n
+ );
+ })(_a),
+ is = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this, e, r)).path = r),
+ (i.nextTerminalName = ""),
+ (i.nextTerminalOccurrence = 0),
+ (i.nextTerminalName = i.path.lastTok.name),
+ (i.nextTerminalOccurrence = i.path.lastTokOccurrence),
+ i
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "walkTerminal",
+ value: function (e, t, n) {
+ if (
+ this.isAtEndOfPath &&
+ e.terminalType.name === this.nextTerminalName &&
+ e.idx === this.nextTerminalOccurrence &&
+ !this.found
+ ) {
+ var r = t.concat(n),
+ i = new da({ definition: r });
+ (this.possibleTokTypes = wa(i)), (this.found = !0);
+ }
+ },
+ },
+ ]),
+ n
+ );
+ })(rs),
+ as = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this)).topRule = e),
+ (i.occurrence = r),
+ (i.result = {
+ token: void 0,
+ occurrence: void 0,
+ isEndOfRule: void 0,
+ }),
+ i
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "startWalking",
+ value: function () {
+ return this.walk(this.topRule), this.result;
+ },
+ },
+ ]),
+ n
+ );
+ })(_a),
+ os = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ return (0, p.Z)(this, n), t.apply(this, arguments);
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "walkMany",
+ value: function (e, t, r) {
+ if (e.idx === this.occurrence) {
+ var i = Si(t.concat(r));
+ (this.result.isEndOfRule = void 0 === i),
+ i instanceof ya &&
+ ((this.result.token = i.terminalType),
+ (this.result.occurrence = i.idx));
+ } else
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkMany",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ ]),
+ n
+ );
+ })(as),
+ ss = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ return (0, p.Z)(this, n), t.apply(this, arguments);
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "walkManySep",
+ value: function (e, t, r) {
+ if (e.idx === this.occurrence) {
+ var i = Si(t.concat(r));
+ (this.result.isEndOfRule = void 0 === i),
+ i instanceof ya &&
+ ((this.result.token = i.terminalType),
+ (this.result.occurrence = i.idx));
+ } else
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkManySep",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ ]),
+ n
+ );
+ })(as),
+ ls = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ return (0, p.Z)(this, n), t.apply(this, arguments);
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "walkAtLeastOne",
+ value: function (e, t, r) {
+ if (e.idx === this.occurrence) {
+ var i = Si(t.concat(r));
+ (this.result.isEndOfRule = void 0 === i),
+ i instanceof ya &&
+ ((this.result.token = i.terminalType),
+ (this.result.occurrence = i.idx));
+ } else
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkAtLeastOne",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ ]),
+ n
+ );
+ })(as),
+ us = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ return (0, p.Z)(this, n), t.apply(this, arguments);
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "walkAtLeastOneSep",
+ value: function (e, t, r) {
+ if (e.idx === this.occurrence) {
+ var i = Si(t.concat(r));
+ (this.result.isEndOfRule = void 0 === i),
+ i instanceof ya &&
+ ((this.result.token = i.terminalType),
+ (this.result.occurrence = i.idx));
+ } else
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkAtLeastOneSep",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ ]),
+ n
+ );
+ })(as);
+ function cs(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : [];
+ n = or(n);
+ var r = [],
+ i = 0;
+ function a(a) {
+ var o = cs(a.concat(fi(e, i + 1)), t, n);
+ return r.concat(o);
+ }
+ for (; n.length < t && i < e.length; ) {
+ var o = e[i];
+ if (o instanceof da) return a(o.definition);
+ if (o instanceof ca) return a(o.definition);
+ if (o instanceof ha) r = a(o.definition);
+ else {
+ if (o instanceof pa)
+ return a(
+ o.definition.concat([
+ new ma({ definition: o.definition }),
+ ])
+ );
+ if (o instanceof va)
+ return a([
+ new da({ definition: o.definition }),
+ new ma({
+ definition: [
+ new ya({ terminalType: o.separator }),
+ ].concat(o.definition),
+ }),
+ ]);
+ if (o instanceof ga) {
+ var s = o.definition.concat([
+ new ma({
+ definition: [
+ new ya({ terminalType: o.separator }),
+ ].concat(o.definition),
+ }),
+ ]);
+ r = a(s);
+ } else if (o instanceof ma) {
+ var l = o.definition.concat([
+ new ma({ definition: o.definition }),
+ ]);
+ r = a(l);
+ } else {
+ if (o instanceof Aa)
+ return (
+ hi(o.definition, function (e) {
+ !1 === Qi(e.definition) && (r = a(e.definition));
+ }),
+ r
+ );
+ if (!(o instanceof ya)) throw Error("non exhaustive match");
+ n.push(o.terminalType);
+ }
+ }
+ i++;
+ }
+ return r.push({ partialPath: n, suffixDef: fi(e, i) }), r;
+ }
+ function fs(e, t, n, r) {
+ var i = "EXIT_NONE_TERMINAL",
+ a = [i],
+ o = "EXIT_ALTERNATIVE",
+ s = !1,
+ l = t.length,
+ u = l - r - 1,
+ c = [],
+ f = [];
+ for (
+ f.push({ idx: -1, def: e, ruleStack: [], occurrenceStack: [] });
+ !Qi(f);
+
+ ) {
+ var d = f.pop();
+ if (d !== o) {
+ var h = d.def,
+ p = d.idx,
+ v = d.ruleStack,
+ m = d.occurrenceStack;
+ if (!Qi(h)) {
+ var g = h[0];
+ if (g === i) {
+ var A = {
+ idx: p,
+ def: fi(h),
+ ruleStack: di(v),
+ occurrenceStack: di(m),
+ };
+ f.push(A);
+ } else if (g instanceof ya)
+ if (p < l - 1) {
+ var y = p + 1;
+ if (n(t[y], g.terminalType)) {
+ var b = {
+ idx: y,
+ def: fi(h),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(b);
+ }
+ } else {
+ if (p !== l - 1) throw Error("non exhaustive match");
+ c.push({
+ nextTokenType: g.terminalType,
+ nextTokenOccurrence: g.idx,
+ ruleStack: v,
+ occurrenceStack: m,
+ }),
+ (s = !0);
+ }
+ else if (g instanceof ca) {
+ var x = or(v);
+ x.push(g.nonTerminalName);
+ var S = or(m);
+ S.push(g.idx);
+ var E = {
+ idx: p,
+ def: g.definition.concat(a, fi(h)),
+ ruleStack: x,
+ occurrenceStack: S,
+ };
+ f.push(E);
+ } else if (g instanceof ha) {
+ var _ = {
+ idx: p,
+ def: fi(h),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(_), f.push(o);
+ var C = {
+ idx: p,
+ def: g.definition.concat(fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(C);
+ } else if (g instanceof pa) {
+ var w = new ma({ definition: g.definition, idx: g.idx }),
+ T = {
+ idx: p,
+ def: g.definition.concat([w], fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(T);
+ } else if (g instanceof va) {
+ var M = new ya({ terminalType: g.separator }),
+ I = new ma({
+ definition: [M].concat(g.definition),
+ idx: g.idx,
+ }),
+ k = {
+ idx: p,
+ def: g.definition.concat([I], fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(k);
+ } else if (g instanceof ga) {
+ var R = {
+ idx: p,
+ def: fi(h),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(R), f.push(o);
+ var B = new ya({ terminalType: g.separator }),
+ P = new ma({
+ definition: [B].concat(g.definition),
+ idx: g.idx,
+ }),
+ L = {
+ idx: p,
+ def: g.definition.concat([P], fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(L);
+ } else if (g instanceof ma) {
+ var D = {
+ idx: p,
+ def: fi(h),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(D), f.push(o);
+ var U = new ma({ definition: g.definition, idx: g.idx }),
+ F = {
+ idx: p,
+ def: g.definition.concat([U], fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(F);
+ } else if (g instanceof Aa)
+ for (var O = g.definition.length - 1; O >= 0; O--) {
+ var N = {
+ idx: p,
+ def: g.definition[O].definition.concat(fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ };
+ f.push(N), f.push(o);
+ }
+ else if (g instanceof da)
+ f.push({
+ idx: p,
+ def: g.definition.concat(fi(h)),
+ ruleStack: v,
+ occurrenceStack: m,
+ });
+ else {
+ if (!(g instanceof fa))
+ throw Error("non exhaustive match");
+ f.push(ds(g, p, v, m));
+ }
+ }
+ } else s && ci(f).idx <= u && f.pop();
+ }
+ return c;
+ }
+ function ds(e, t, n, r) {
+ var i = or(n);
+ i.push(e.name);
+ var a = or(r);
+ return (
+ a.push(1),
+ { idx: t, def: e.definition, ruleStack: i, occurrenceStack: a }
+ );
+ }
+ function hs(e) {
+ if (e instanceof ha || "Option" === e) return es.OPTION;
+ if (e instanceof ma || "Repetition" === e) return es.REPETITION;
+ if (e instanceof pa || "RepetitionMandatory" === e)
+ return es.REPETITION_MANDATORY;
+ if (e instanceof va || "RepetitionMandatoryWithSeparator" === e)
+ return es.REPETITION_MANDATORY_WITH_SEPARATOR;
+ if (e instanceof ga || "RepetitionWithSeparator" === e)
+ return es.REPETITION_WITH_SEPARATOR;
+ if (e instanceof Aa || "Alternation" === e) return es.ALTERNATION;
+ throw Error("non exhaustive match");
+ }
+ function ps(e, t, n, r) {
+ var i = e.length,
+ a = mi(e, function (e) {
+ return mi(e, function (e) {
+ return 1 === e.length;
+ });
+ });
+ if (t)
+ return function (t) {
+ for (
+ var r = _i(t, function (e) {
+ return e.GATE;
+ }),
+ a = 0;
+ a < i;
+ a++
+ ) {
+ var o = e[a],
+ s = o.length,
+ l = r[a];
+ if (void 0 === l || !1 !== l.call(this))
+ e: for (var u = 0; u < s; u++) {
+ for (var c = o[u], f = c.length, d = 0; d < f; d++) {
+ var h = this.LA(d + 1);
+ if (!1 === n(h, c[d])) continue e;
+ }
+ return a;
+ }
+ }
+ };
+ if (a && !r) {
+ var o = Ji(
+ _i(e, function (e) {
+ return Gt(e);
+ }),
+ function (e, t, n) {
+ return (
+ hi(t, function (t) {
+ Bi(e, t.tokenTypeIdx) || (e[t.tokenTypeIdx] = n),
+ hi(t.categoryMatches, function (t) {
+ Bi(e, t) || (e[t] = n);
+ });
+ }),
+ e
+ );
+ },
+ {}
+ );
+ return function () {
+ var e = this.LA(1);
+ return o[e.tokenTypeIdx];
+ };
+ }
+ return function () {
+ for (var t = 0; t < i; t++) {
+ var r = e[t],
+ a = r.length;
+ e: for (var o = 0; o < a; o++) {
+ for (var s = r[o], l = s.length, u = 0; u < l; u++) {
+ var c = this.LA(u + 1);
+ if (!1 === n(c, s[u])) continue e;
+ }
+ return t;
+ }
+ }
+ };
+ }
+ function vs(e, t, n) {
+ var r = mi(e, function (e) {
+ return 1 === e.length;
+ }),
+ i = e.length;
+ if (r && !n) {
+ var a = Gt(e);
+ if (1 === a.length && Qi(a[0].categoryMatches)) {
+ var o = a[0].tokenTypeIdx;
+ return function () {
+ return this.LA(1).tokenTypeIdx === o;
+ };
+ }
+ var s = Ji(
+ a,
+ function (e, t, n) {
+ return (
+ (e[t.tokenTypeIdx] = !0),
+ hi(t.categoryMatches, function (t) {
+ e[t] = !0;
+ }),
+ e
+ );
+ },
+ []
+ );
+ return function () {
+ var e = this.LA(1);
+ return !0 === s[e.tokenTypeIdx];
+ };
+ }
+ return function () {
+ e: for (var n = 0; n < i; n++) {
+ for (var r = e[n], a = r.length, o = 0; o < a; o++) {
+ var s = this.LA(o + 1);
+ if (!1 === t(s, r[o])) continue e;
+ }
+ return !0;
+ }
+ return !1;
+ };
+ }
+ ((ts = es || (es = {}))[(ts.OPTION = 0)] = "OPTION"),
+ (ts[(ts.REPETITION = 1)] = "REPETITION"),
+ (ts[(ts.REPETITION_MANDATORY = 2)] = "REPETITION_MANDATORY"),
+ (ts[(ts.REPETITION_MANDATORY_WITH_SEPARATOR = 3)] =
+ "REPETITION_MANDATORY_WITH_SEPARATOR"),
+ (ts[(ts.REPETITION_WITH_SEPARATOR = 4)] =
+ "REPETITION_WITH_SEPARATOR"),
+ (ts[(ts.ALTERNATION = 5)] = "ALTERNATION");
+ var ms = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i) {
+ var a;
+ return (
+ (0, p.Z)(this, n),
+ ((a = t.call(this)).topProd = e),
+ (a.targetOccurrence = r),
+ (a.targetProdType = i),
+ a
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "startWalking",
+ value: function () {
+ return this.walk(this.topProd), this.restDef;
+ },
+ },
+ {
+ key: "checkIsTarget",
+ value: function (e, t, n, r) {
+ return (
+ e.idx === this.targetOccurrence &&
+ this.targetProdType === t &&
+ ((this.restDef = n.concat(r)), !0)
+ );
+ },
+ },
+ {
+ key: "walkOption",
+ value: function (e, t, r) {
+ this.checkIsTarget(e, es.OPTION, t, r) ||
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkOption",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ {
+ key: "walkAtLeastOne",
+ value: function (e, t, r) {
+ this.checkIsTarget(e, es.REPETITION_MANDATORY, t, r) ||
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkOption",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ {
+ key: "walkAtLeastOneSep",
+ value: function (e, t, r) {
+ this.checkIsTarget(
+ e,
+ es.REPETITION_MANDATORY_WITH_SEPARATOR,
+ t,
+ r
+ ) ||
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkOption",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ {
+ key: "walkMany",
+ value: function (e, t, r) {
+ this.checkIsTarget(e, es.REPETITION, t, r) ||
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkOption",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ {
+ key: "walkManySep",
+ value: function (e, t, r) {
+ this.checkIsTarget(
+ e,
+ es.REPETITION_WITH_SEPARATOR,
+ t,
+ r
+ ) ||
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "walkOption",
+ this
+ ).call(this, e, t, r);
+ },
+ },
+ ]),
+ n
+ );
+ })(_a),
+ gs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i) {
+ var a;
+ return (
+ (0, p.Z)(this, n),
+ ((a = t.call(this)).targetOccurrence = e),
+ (a.targetProdType = r),
+ (a.targetRef = i),
+ (a.result = []),
+ a
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "checkIsTarget",
+ value: function (e, t) {
+ e.idx !== this.targetOccurrence ||
+ this.targetProdType !== t ||
+ (void 0 !== this.targetRef && e !== this.targetRef) ||
+ (this.result = e.definition);
+ },
+ },
+ {
+ key: "visitOption",
+ value: function (e) {
+ this.checkIsTarget(e, es.OPTION);
+ },
+ },
+ {
+ key: "visitRepetition",
+ value: function (e) {
+ this.checkIsTarget(e, es.REPETITION);
+ },
+ },
+ {
+ key: "visitRepetitionMandatory",
+ value: function (e) {
+ this.checkIsTarget(e, es.REPETITION_MANDATORY);
+ },
+ },
+ {
+ key: "visitRepetitionMandatoryWithSeparator",
+ value: function (e) {
+ this.checkIsTarget(
+ e,
+ es.REPETITION_MANDATORY_WITH_SEPARATOR
+ );
+ },
+ },
+ {
+ key: "visitRepetitionWithSeparator",
+ value: function (e) {
+ this.checkIsTarget(e, es.REPETITION_WITH_SEPARATOR);
+ },
+ },
+ {
+ key: "visitAlternation",
+ value: function (e) {
+ this.checkIsTarget(e, es.ALTERNATION);
+ },
+ },
+ ]),
+ n
+ );
+ })(xa);
+ function As(e) {
+ for (var t = new Array(e), n = 0; n < e; n++) t[n] = [];
+ return t;
+ }
+ function ys(e) {
+ for (var t = [""], n = 0; n < e.length; n++) {
+ for (var r = e[n], i = [], a = 0; a < t.length; a++) {
+ var o = t[a];
+ i.push(o + "_" + r.tokenTypeIdx);
+ for (var s = 0; s < r.categoryMatches.length; s++) {
+ var l = "_" + r.categoryMatches[s];
+ i.push(o + l);
+ }
+ }
+ t = i;
+ }
+ return t;
+ }
+ function bs(e, t, n) {
+ for (var r = 0; r < e.length; r++)
+ if (r !== n)
+ for (var i = e[r], a = 0; a < t.length; a++) {
+ if (!0 === i[t[a]]) return !1;
+ }
+ return !0;
+ }
+ function xs(e, t) {
+ for (
+ var n = _i(e, function (e) {
+ return cs([e], 1);
+ }),
+ r = As(n.length),
+ i = _i(n, function (e) {
+ var t = {};
+ return (
+ hi(e, function (e) {
+ hi(ys(e.partialPath), function (e) {
+ t[e] = !0;
+ });
+ }),
+ t
+ );
+ }),
+ a = n,
+ o = 1;
+ o <= t;
+ o++
+ ) {
+ var s = a;
+ a = As(s.length);
+ for (
+ var l = function (e) {
+ for (var n = s[e], l = 0; l < n.length; l++) {
+ var u = n[l].partialPath,
+ c = n[l].suffixDef,
+ f = ys(u);
+ if (bs(i, f, e) || Qi(c) || u.length === t) {
+ var d = r[e];
+ if (!1 === _s(d, u)) {
+ d.push(u);
+ for (var h = 0; h < f.length; h++) {
+ var p = f[h];
+ i[e][p] = !0;
+ }
+ }
+ } else {
+ var v = cs(c, o + 1, u);
+ (a[e] = a[e].concat(v)),
+ hi(v, function (t) {
+ hi(ys(t.partialPath), function (t) {
+ i[e][t] = !0;
+ });
+ });
+ }
+ }
+ },
+ u = 0;
+ u < s.length;
+ u++
+ )
+ l(u);
+ }
+ return r;
+ }
+ function Ss(e, t, n, r) {
+ var i = new gs(e, es.ALTERNATION, r);
+ return t.accept(i), xs(i.result, n);
+ }
+ function Es(e, t, n, r) {
+ var i = new gs(e, n);
+ t.accept(i);
+ var a = i.result,
+ o = new ms(t, e, n).startWalking();
+ return xs(
+ [new da({ definition: a }), new da({ definition: o })],
+ r
+ );
+ }
+ function _s(e, t) {
+ e: for (var n = 0; n < e.length; n++) {
+ var r = e[n];
+ if (r.length === t.length) {
+ for (var i = 0; i < r.length; i++) {
+ var a = t[i],
+ o = r[i];
+ if (
+ !1 ===
+ (a === o ||
+ void 0 !== o.categoryMatchesMap[a.tokenTypeIdx])
+ )
+ continue e;
+ }
+ return !0;
+ }
+ }
+ return !1;
+ }
+ function Cs(e) {
+ return mi(e, function (e) {
+ return mi(e, function (e) {
+ return mi(e, function (e) {
+ return Qi(e.categoryMatches);
+ });
+ });
+ });
+ }
+ function ws(e, t, n, r) {
+ var i = Ci(e, function (e) {
+ return (function (e, t) {
+ var n = new Is();
+ e.accept(n);
+ var r = n.allProductions,
+ i = _i(
+ Di(
+ Yi(Ii(r, Ts), function (e) {
+ return e.length > 1;
+ })
+ ),
+ function (n) {
+ var r = Si(n),
+ i = t.buildDuplicateFoundError(e, n),
+ a = Ea(r),
+ o = {
+ message: i,
+ type: Bl.DUPLICATE_PRODUCTIONS,
+ ruleName: e.name,
+ dslName: a,
+ occurrence: r.idx,
+ },
+ s = Ms(r);
+ return s && (o.parameter = s), o;
+ }
+ );
+ return i;
+ })(e, n);
+ }),
+ a = (function (e, t, n) {
+ var r = [],
+ i = _i(t, function (e) {
+ return e.name;
+ });
+ return (
+ hi(e, function (e) {
+ var t = e.name;
+ if (Fi(i, t)) {
+ var a = n.buildNamespaceConflictError(e);
+ r.push({
+ message: a,
+ type: Bl.CONFLICT_TOKENS_RULES_NAMESPACE,
+ ruleName: t,
+ });
+ }
+ }),
+ r
+ );
+ })(e, t, n),
+ o = Ci(e, function (e) {
+ return (function (e, t) {
+ var n = new Bs();
+ e.accept(n);
+ var r = Ci(n.alternations, function (n) {
+ return n.definition.length > 255
+ ? [
+ {
+ message: t.buildTooManyAlternativesError({
+ topLevelRule: e,
+ alternation: n,
+ }),
+ type: Bl.TOO_MANY_ALTS,
+ ruleName: e.name,
+ occurrence: n.idx,
+ },
+ ]
+ : [];
+ });
+ return r;
+ })(e, n);
+ }),
+ s = Ci(e, function (t) {
+ return (function (e, t, n, r) {
+ var i = [],
+ a = Ji(
+ t,
+ function (t, n) {
+ return n.name === e.name ? t + 1 : t;
+ },
+ 0
+ );
+ if (a > 1) {
+ var o = r.buildDuplicateRuleNameError({
+ topLevelRule: e,
+ grammarName: n,
+ });
+ i.push({
+ message: o,
+ type: Bl.DUPLICATE_RULE_NAME,
+ ruleName: e.name,
+ });
+ }
+ return i;
+ })(t, e, r, n);
+ });
+ return i.concat(a, o, s);
+ }
+ function Ts(e) {
+ return "".concat(Ea(e), "_#_").concat(e.idx, "_#_").concat(Ms(e));
+ }
+ function Ms(e) {
+ return e instanceof ya
+ ? e.terminalType.name
+ : e instanceof ca
+ ? e.nonTerminalName
+ : "";
+ }
+ var Is = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.apply(this, arguments)).allProductions = []),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "visitNonTerminal",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitOption",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionWithSeparator",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionMandatory",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionMandatoryWithSeparator",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetition",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitAlternation",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitTerminal",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ ]),
+ n
+ );
+ })(xa);
+ function ks(e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : [],
+ i = [],
+ a = Rs(t.definition);
+ if (Qi(a)) return [];
+ var o = e.name;
+ Fi(a, e) &&
+ i.push({
+ message: n.buildLeftRecursionError({
+ topLevelRule: e,
+ leftRecursionPath: r,
+ }),
+ type: Bl.LEFT_RECURSION,
+ ruleName: o,
+ });
+ var s = Ci(ui(a, r.concat([e])), function (t) {
+ var i = or(r);
+ return i.push(t), ks(e, t, n, i);
+ });
+ return i.concat(s);
+ }
+ function Rs(e) {
+ var t = [];
+ if (Qi(e)) return t;
+ var n = Si(e);
+ if (n instanceof ca) t.push(n.referencedRule);
+ else if (
+ n instanceof da ||
+ n instanceof ha ||
+ n instanceof pa ||
+ n instanceof va ||
+ n instanceof ga ||
+ n instanceof ma
+ )
+ t = t.concat(Rs(n.definition));
+ else if (n instanceof Aa)
+ t = Gt(
+ _i(n.definition, function (e) {
+ return Rs(e.definition);
+ })
+ );
+ else if (!(n instanceof ya)) throw Error("non exhaustive match");
+ var r = Sa(n),
+ i = e.length > 1;
+ if (r && i) {
+ var a = fi(e);
+ return t.concat(Rs(a));
+ }
+ return t;
+ }
+ var Bs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.apply(this, arguments)).alternations = []),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "visitAlternation",
+ value: function (e) {
+ this.alternations.push(e);
+ },
+ },
+ ]),
+ n
+ );
+ })(xa);
+ function Ps(e, t, n) {
+ var r = new Bs();
+ e.accept(r);
+ var i = r.alternations,
+ a = Ci(
+ (i = Ki(i, function (e) {
+ return !0 === e.ignoreAmbiguities;
+ })),
+ function (r) {
+ var i = r.idx,
+ a = r.maxLookahead || t,
+ o = Ss(i, e, a, r),
+ s = (function (e, t, n, r) {
+ var i = [],
+ a = Ji(
+ e,
+ function (n, r, a) {
+ return (
+ !0 === t.definition[a].ignoreAmbiguities ||
+ hi(r, function (r) {
+ var o = [a];
+ hi(e, function (e, n) {
+ a !== n &&
+ _s(e, r) &&
+ !0 !==
+ t.definition[n].ignoreAmbiguities &&
+ o.push(n);
+ }),
+ o.length > 1 &&
+ !_s(i, r) &&
+ (i.push(r),
+ n.push({ alts: o, path: r }));
+ }),
+ n
+ );
+ },
+ []
+ ),
+ o = _i(a, function (e) {
+ var i = _i(e.alts, function (e) {
+ return e + 1;
+ });
+ return {
+ message: r.buildAlternationAmbiguityError({
+ topLevelRule: n,
+ alternation: t,
+ ambiguityIndices: i,
+ prefixPath: e.path,
+ }),
+ type: Bl.AMBIGUOUS_ALTS,
+ ruleName: n.name,
+ occurrence: t.idx,
+ alternatives: e.alts,
+ };
+ });
+ return o;
+ })(o, r, e, n),
+ l = (function (e, t, n, r) {
+ var i = Ji(
+ e,
+ function (e, t, n) {
+ var r = _i(t, function (e) {
+ return { idx: n, path: e };
+ });
+ return e.concat(r);
+ },
+ []
+ ),
+ a = sr(
+ Ci(i, function (e) {
+ if (!0 === t.definition[e.idx].ignoreAmbiguities)
+ return [];
+ var a = e.idx,
+ o = e.path;
+ return _i(
+ Ai(i, function (e) {
+ return (
+ !0 !==
+ t.definition[e.idx].ignoreAmbiguities &&
+ e.idx < a &&
+ (function (e, t) {
+ return (
+ e.length < t.length &&
+ mi(e, function (e, n) {
+ var r = t[n];
+ return (
+ e === r ||
+ r.categoryMatchesMap[e.tokenTypeIdx]
+ );
+ })
+ );
+ })(e.path, o)
+ );
+ }),
+ function (e) {
+ var i = [e.idx + 1, a + 1],
+ o = 0 === t.idx ? "" : t.idx;
+ return {
+ message:
+ r.buildAlternationPrefixAmbiguityError({
+ topLevelRule: n,
+ alternation: t,
+ ambiguityIndices: i,
+ prefixPath: e.path,
+ }),
+ type: Bl.AMBIGUOUS_PREFIX_ALTS,
+ ruleName: n.name,
+ occurrence: o,
+ alternatives: i,
+ };
+ }
+ );
+ })
+ );
+ return a;
+ })(o, r, e, n);
+ return s.concat(l);
+ }
+ );
+ return a;
+ }
+ var Ls = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.apply(this, arguments)).allProductions = []),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "visitRepetitionWithSeparator",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionMandatory",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionMandatoryWithSeparator",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ {
+ key: "visitRepetition",
+ value: function (e) {
+ this.allProductions.push(e);
+ },
+ },
+ ]),
+ n
+ );
+ })(xa);
+ function Ds(e) {
+ var t = oi(e, { errMsgProvider: Ko }),
+ n = {};
+ return (
+ hi(e.rules, function (e) {
+ n[e.name] = e;
+ }),
+ (function (e, t) {
+ var n = new ns(e, t);
+ return n.resolveRefs(), n.errors;
+ })(n, t.errMsgProvider)
+ );
+ }
+ var Us = "MismatchedTokenException",
+ Fs = "NoViableAltException",
+ Os = "EarlyExitException",
+ Ns = "NotAllInputParsedException",
+ Gs = [Us, Fs, Os, Ns];
+ function Zs(e) {
+ return Fi(Gs, e.name);
+ }
+ Object.freeze(Gs);
+ var zs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n),
+ ((i = t.call(this, e)).token = r),
+ (i.resyncedTokens = []),
+ Object.setPrototypeOf(
+ (0, f.Z)(i),
+ (this instanceof n ? this.constructor : void 0).prototype
+ ),
+ Error.captureStackTrace &&
+ Error.captureStackTrace((0, f.Z)(i), i.constructor),
+ i
+ );
+ }
+ return (0, v.Z)(n);
+ })((0, i.Z)(Error)),
+ Qs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i) {
+ var a;
+ return (
+ (0, p.Z)(this, n),
+ ((a = t.call(this, e, r)).previousToken = i),
+ (a.name = Us),
+ a
+ );
+ }
+ return (0, v.Z)(n);
+ })(zs),
+ Hs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i) {
+ var a;
+ return (
+ (0, p.Z)(this, n),
+ ((a = t.call(this, e, r)).previousToken = i),
+ (a.name = Fs),
+ a
+ );
+ }
+ return (0, v.Z)(n);
+ })(zs),
+ Vs = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r) {
+ var i;
+ return (
+ (0, p.Z)(this, n), ((i = t.call(this, e, r)).name = Ns), i
+ );
+ }
+ return (0, v.Z)(n);
+ })(zs),
+ js = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i) {
+ var a;
+ return (
+ (0, p.Z)(this, n),
+ ((a = t.call(this, e, r)).previousToken = i),
+ (a.name = Os),
+ a
+ );
+ }
+ return (0, v.Z)(n);
+ })(zs),
+ Ws = {},
+ Xs = "InRuleRecoveryException",
+ Ys = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n), ((r = t.call(this, e)).name = Xs), r
+ );
+ }
+ return (0, v.Z)(n);
+ })((0, i.Z)(Error)),
+ qs = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initRecoverable",
+ value: function (e) {
+ (this.firstAfterRepMap = {}),
+ (this.resyncFollows = {}),
+ (this.recoveryEnabled = Bi(e, "recoveryEnabled")
+ ? e.recoveryEnabled
+ : Ll.recoveryEnabled),
+ this.recoveryEnabled &&
+ (this.attemptInRepetitionRecovery = Js);
+ },
+ },
+ {
+ key: "getTokenToInsert",
+ value: function (e) {
+ var t = qo(e, "", NaN, NaN, NaN, NaN, NaN, NaN);
+ return (t.isInsertedInRecovery = !0), t;
+ },
+ },
+ {
+ key: "canTokenTypeBeInsertedInRecovery",
+ value: function (e) {
+ return !0;
+ },
+ },
+ {
+ key: "canTokenTypeBeDeletedInRecovery",
+ value: function (e) {
+ return !0;
+ },
+ },
+ {
+ key: "tryInRepetitionRecovery",
+ value: function (e, t, n, r) {
+ for (
+ var i = this,
+ a = this.findReSyncTokenType(),
+ o = this.exportLexerState(),
+ s = [],
+ l = !1,
+ u = this.LA(1),
+ c = this.LA(1),
+ f = function () {
+ var e = i.LA(0),
+ t =
+ i.errorMessageProvider.buildMismatchTokenMessage(
+ {
+ expected: r,
+ actual: u,
+ previous: e,
+ ruleName: i.getCurrRuleFullName(),
+ }
+ ),
+ n = new Qs(t, u, i.LA(0));
+ (n.resyncedTokens = di(s)), i.SAVE_ERROR(n);
+ };
+ !l;
+
+ ) {
+ if (this.tokenMatcher(c, r)) return void f();
+ if (n.call(this)) return f(), void e.apply(this, t);
+ this.tokenMatcher(c, a)
+ ? (l = !0)
+ : ((c = this.SKIP_TOKEN()),
+ this.addToResyncTokens(c, s));
+ }
+ this.importLexerState(o);
+ },
+ },
+ {
+ key: "shouldInRepetitionRecoveryBeTried",
+ value: function (e, t, n) {
+ return (
+ !1 !== n &&
+ !this.tokenMatcher(this.LA(1), e) &&
+ !this.isBackTracking() &&
+ !this.canPerformInRuleRecovery(
+ e,
+ this.getFollowsForInRuleRecovery(e, t)
+ )
+ );
+ },
+ },
+ {
+ key: "getFollowsForInRuleRecovery",
+ value: function (e, t) {
+ var n = this.getCurrentGrammarPath(e, t);
+ return this.getNextPossibleTokenTypes(n);
+ },
+ },
+ {
+ key: "tryInRuleRecovery",
+ value: function (e, t) {
+ if (this.canRecoverWithSingleTokenInsertion(e, t))
+ return this.getTokenToInsert(e);
+ if (this.canRecoverWithSingleTokenDeletion(e)) {
+ var n = this.SKIP_TOKEN();
+ return this.consumeToken(), n;
+ }
+ throw new Ys("sad sad panda");
+ },
+ },
+ {
+ key: "canPerformInRuleRecovery",
+ value: function (e, t) {
+ return (
+ this.canRecoverWithSingleTokenInsertion(e, t) ||
+ this.canRecoverWithSingleTokenDeletion(e)
+ );
+ },
+ },
+ {
+ key: "canRecoverWithSingleTokenInsertion",
+ value: function (e, t) {
+ var n = this;
+ if (!this.canTokenTypeBeInsertedInRecovery(e))
+ return !1;
+ if (Qi(t)) return !1;
+ var r = this.LA(1);
+ return (
+ void 0 !==
+ xi(t, function (e) {
+ return n.tokenMatcher(r, e);
+ })
+ );
+ },
+ },
+ {
+ key: "canRecoverWithSingleTokenDeletion",
+ value: function (e) {
+ return (
+ !!this.canTokenTypeBeDeletedInRecovery(e) &&
+ this.tokenMatcher(this.LA(2), e)
+ );
+ },
+ },
+ {
+ key: "isInCurrentRuleReSyncSet",
+ value: function (e) {
+ var t = this.getCurrFollowKey();
+ return Fi(this.getFollowSetFromFollowKey(t), e);
+ },
+ },
+ {
+ key: "findReSyncTokenType",
+ value: function () {
+ for (
+ var e = this.flattenFollowSet(),
+ t = this.LA(1),
+ n = 2;
+ ;
+
+ ) {
+ var r = xi(e, function (e) {
+ return _o(t, e);
+ });
+ if (void 0 !== r) return r;
+ (t = this.LA(n)), n++;
+ }
+ },
+ },
+ {
+ key: "getCurrFollowKey",
+ value: function () {
+ if (1 === this.RULE_STACK.length) return Ws;
+ var e = this.getLastExplicitRuleShortName(),
+ t = this.getLastExplicitRuleOccurrenceIndex(),
+ n = this.getPreviousExplicitRuleShortName();
+ return {
+ ruleName: this.shortRuleNameToFullName(e),
+ idxInCallingRule: t,
+ inRule: this.shortRuleNameToFullName(n),
+ };
+ },
+ },
+ {
+ key: "buildFullFollowKeyStack",
+ value: function () {
+ var e = this,
+ t = this.RULE_STACK,
+ n = this.RULE_OCCURRENCE_STACK;
+ return _i(t, function (r, i) {
+ return 0 === i
+ ? Ws
+ : {
+ ruleName: e.shortRuleNameToFullName(r),
+ idxInCallingRule: n[i],
+ inRule: e.shortRuleNameToFullName(t[i - 1]),
+ };
+ });
+ },
+ },
+ {
+ key: "flattenFollowSet",
+ value: function () {
+ var e = this;
+ return Gt(
+ _i(this.buildFullFollowKeyStack(), function (t) {
+ return e.getFollowSetFromFollowKey(t);
+ })
+ );
+ },
+ },
+ {
+ key: "getFollowSetFromFollowKey",
+ value: function (e) {
+ if (e === Ws) return [Yo];
+ var t = e.ruleName + e.idxInCallingRule + Ta + e.inRule;
+ return this.resyncFollows[t];
+ },
+ },
+ {
+ key: "addToResyncTokens",
+ value: function (e, t) {
+ return this.tokenMatcher(e, Yo) || t.push(e), t;
+ },
+ },
+ {
+ key: "reSyncTo",
+ value: function (e) {
+ for (
+ var t = [], n = this.LA(1);
+ !1 === this.tokenMatcher(n, e);
+
+ )
+ (n = this.SKIP_TOKEN()), this.addToResyncTokens(n, t);
+ return di(t);
+ },
+ },
+ {
+ key: "attemptInRepetitionRecovery",
+ value: function (e, t, n, r, i, a, o) {},
+ },
+ {
+ key: "getCurrentGrammarPath",
+ value: function (e, t) {
+ return {
+ ruleStack: this.getHumanReadableRuleStack(),
+ occurrenceStack: or(this.RULE_OCCURRENCE_STACK),
+ lastTok: e,
+ lastTokOccurrence: t,
+ };
+ },
+ },
+ {
+ key: "getHumanReadableRuleStack",
+ value: function () {
+ var e = this;
+ return _i(this.RULE_STACK, function (t) {
+ return e.shortRuleNameToFullName(t);
+ });
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function Js(e, t, n, r, i, a, o) {
+ var s = this.getKeyForAutomaticLookahead(r, i),
+ l = this.firstAfterRepMap[s];
+ if (void 0 === l) {
+ var u = this.getCurrRuleFullName();
+ (l = new a(this.getGAstProductions()[u], i).startWalking()),
+ (this.firstAfterRepMap[s] = l);
+ }
+ var c = l.token,
+ f = l.occurrence,
+ d = l.isEndOfRule;
+ 1 === this.RULE_STACK.length &&
+ d &&
+ void 0 === c &&
+ ((c = Yo), (f = 1)),
+ void 0 !== c &&
+ void 0 !== f &&
+ this.shouldInRepetitionRecoveryBeTried(c, f, o) &&
+ this.tryInRepetitionRecovery(e, t, n, c);
+ }
+ var Ks = 1024,
+ $s = 1280,
+ el = 1536;
+ function tl(e, t, n) {
+ return n | t | e;
+ }
+ var nl = (function () {
+ function e(t) {
+ var n;
+ (0, p.Z)(this, e),
+ (this.maxLookahead =
+ null !==
+ (n =
+ null === t || void 0 === t
+ ? void 0
+ : t.maxLookahead) && void 0 !== n
+ ? n
+ : Ll.maxLookahead);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "validate",
+ value: function (e) {
+ var t = this.validateNoLeftRecursion(e.rules);
+ if (Qi(t)) {
+ var n = this.validateEmptyOrAlternatives(e.rules),
+ i = this.validateAmbiguousAlternationAlternatives(
+ e.rules,
+ this.maxLookahead
+ ),
+ a = this.validateSomeNonEmptyLookaheadPath(
+ e.rules,
+ this.maxLookahead
+ );
+ return [].concat(
+ (0, r.Z)(t),
+ (0, r.Z)(n),
+ (0, r.Z)(i),
+ (0, r.Z)(a)
+ );
+ }
+ return t;
+ },
+ },
+ {
+ key: "validateNoLeftRecursion",
+ value: function (e) {
+ return Ci(e, function (e) {
+ return ks(e, e, $o);
+ });
+ },
+ },
+ {
+ key: "validateEmptyOrAlternatives",
+ value: function (e) {
+ return Ci(e, function (e) {
+ return (function (e, t) {
+ var n = new Bs();
+ return (
+ e.accept(n),
+ Ci(n.alternations, function (n) {
+ return Ci(di(n.definition), function (r, i) {
+ return Qi(fs([r], [], _o, 1))
+ ? [
+ {
+ message: t.buildEmptyAlternationError(
+ {
+ topLevelRule: e,
+ alternation: n,
+ emptyChoiceIdx: i,
+ }
+ ),
+ type: Bl.NONE_LAST_EMPTY_ALT,
+ ruleName: e.name,
+ occurrence: n.idx,
+ alternative: i + 1,
+ },
+ ]
+ : [];
+ });
+ })
+ );
+ })(e, $o);
+ });
+ },
+ },
+ {
+ key: "validateAmbiguousAlternationAlternatives",
+ value: function (e, t) {
+ return Ci(e, function (e) {
+ return Ps(e, t, $o);
+ });
+ },
+ },
+ {
+ key: "validateSomeNonEmptyLookaheadPath",
+ value: function (e, t) {
+ return (function (e, t, n) {
+ var r = [];
+ return (
+ hi(e, function (e) {
+ var i = new Ls();
+ e.accept(i),
+ hi(i.allProductions, function (i) {
+ var a = hs(i),
+ o = i.maxLookahead || t;
+ if (Qi(Gt(Es(i.idx, e, a, o)[0]))) {
+ var s = n.buildEmptyRepetitionError({
+ topLevelRule: e,
+ repetition: i,
+ });
+ r.push({
+ message: s,
+ type: Bl.NO_NON_EMPTY_LOOKAHEAD,
+ ruleName: e.name,
+ });
+ }
+ });
+ }),
+ r
+ );
+ })(e, t, $o);
+ },
+ },
+ {
+ key: "buildLookaheadForAlternation",
+ value: function (e) {
+ return (function (e, t, n, r, i, a) {
+ var o = Ss(e, t, n);
+ return a(o, r, Cs(o) ? Co : _o, i);
+ })(
+ e.prodOccurrence,
+ e.rule,
+ e.maxLookahead,
+ e.hasPredicates,
+ e.dynamicTokensEnabled,
+ ps
+ );
+ },
+ },
+ {
+ key: "buildLookaheadForOptional",
+ value: function (e) {
+ return (function (e, t, n, r, i, a) {
+ var o = Es(e, t, i, n),
+ s = Cs(o) ? Co : _o;
+ return a(o[0], s, r);
+ })(
+ e.prodOccurrence,
+ e.rule,
+ e.maxLookahead,
+ e.dynamicTokensEnabled,
+ hs(e.prodType),
+ vs
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ rl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initLooksAhead",
+ value: function (e) {
+ (this.dynamicTokensEnabled = Bi(
+ e,
+ "dynamicTokensEnabled"
+ )
+ ? e.dynamicTokensEnabled
+ : Ll.dynamicTokensEnabled),
+ (this.maxLookahead = Bi(e, "maxLookahead")
+ ? e.maxLookahead
+ : Ll.maxLookahead),
+ (this.lookaheadStrategy = Bi(e, "lookaheadStrategy")
+ ? e.lookaheadStrategy
+ : new nl({ maxLookahead: this.maxLookahead })),
+ (this.lookAheadFuncsCache = new Map());
+ },
+ },
+ {
+ key: "preComputeLookaheadFunctions",
+ value: function (e) {
+ var t = this;
+ hi(e, function (e) {
+ t.TRACE_INIT(
+ "".concat(e.name, " Rule Lookahead"),
+ function () {
+ var n = (function (e) {
+ al.reset(), e.accept(al);
+ var t = al.dslMethods;
+ return al.reset(), t;
+ })(e),
+ r = n.alternation,
+ i = n.repetition,
+ a = n.option,
+ o = n.repetitionMandatory,
+ s = n.repetitionMandatoryWithSeparator,
+ l = n.repetitionWithSeparator;
+ hi(r, function (n) {
+ var r = 0 === n.idx ? "" : n.idx;
+ t.TRACE_INIT(
+ "".concat(Ea(n)).concat(r),
+ function () {
+ var r =
+ t.lookaheadStrategy.buildLookaheadForAlternation(
+ {
+ prodOccurrence: n.idx,
+ rule: e,
+ maxLookahead:
+ n.maxLookahead || t.maxLookahead,
+ hasPredicates: n.hasPredicates,
+ dynamicTokensEnabled:
+ t.dynamicTokensEnabled,
+ }
+ ),
+ i = tl(
+ t.fullRuleNameToShort[e.name],
+ 256,
+ n.idx
+ );
+ t.setLaFuncCache(i, r);
+ }
+ );
+ }),
+ hi(i, function (n) {
+ t.computeLookaheadFunc(
+ e,
+ n.idx,
+ 768,
+ "Repetition",
+ n.maxLookahead,
+ Ea(n)
+ );
+ }),
+ hi(a, function (n) {
+ t.computeLookaheadFunc(
+ e,
+ n.idx,
+ 512,
+ "Option",
+ n.maxLookahead,
+ Ea(n)
+ );
+ }),
+ hi(o, function (n) {
+ t.computeLookaheadFunc(
+ e,
+ n.idx,
+ Ks,
+ "RepetitionMandatory",
+ n.maxLookahead,
+ Ea(n)
+ );
+ }),
+ hi(s, function (n) {
+ t.computeLookaheadFunc(
+ e,
+ n.idx,
+ el,
+ "RepetitionMandatoryWithSeparator",
+ n.maxLookahead,
+ Ea(n)
+ );
+ }),
+ hi(l, function (n) {
+ t.computeLookaheadFunc(
+ e,
+ n.idx,
+ $s,
+ "RepetitionWithSeparator",
+ n.maxLookahead,
+ Ea(n)
+ );
+ });
+ }
+ );
+ });
+ },
+ },
+ {
+ key: "computeLookaheadFunc",
+ value: function (e, t, n, r, i, a) {
+ var o = this;
+ this.TRACE_INIT(
+ "".concat(a).concat(0 === t ? "" : t),
+ function () {
+ var a =
+ o.lookaheadStrategy.buildLookaheadForOptional({
+ prodOccurrence: t,
+ rule: e,
+ maxLookahead: i || o.maxLookahead,
+ dynamicTokensEnabled: o.dynamicTokensEnabled,
+ prodType: r,
+ }),
+ s = tl(o.fullRuleNameToShort[e.name], n, t);
+ o.setLaFuncCache(s, a);
+ }
+ );
+ },
+ },
+ {
+ key: "getKeyForAutomaticLookahead",
+ value: function (e, t) {
+ return tl(this.getLastExplicitRuleShortName(), e, t);
+ },
+ },
+ {
+ key: "getLaFuncFromCache",
+ value: function (e) {
+ return this.lookAheadFuncsCache.get(e);
+ },
+ },
+ {
+ key: "setLaFuncCache",
+ value: function (e, t) {
+ this.lookAheadFuncsCache.set(e, t);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ il = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.apply(this, arguments)).dslMethods = {
+ option: [],
+ alternation: [],
+ repetition: [],
+ repetitionWithSeparator: [],
+ repetitionMandatory: [],
+ repetitionMandatoryWithSeparator: [],
+ }),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "reset",
+ value: function () {
+ this.dslMethods = {
+ option: [],
+ alternation: [],
+ repetition: [],
+ repetitionWithSeparator: [],
+ repetitionMandatory: [],
+ repetitionMandatoryWithSeparator: [],
+ };
+ },
+ },
+ {
+ key: "visitOption",
+ value: function (e) {
+ this.dslMethods.option.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionWithSeparator",
+ value: function (e) {
+ this.dslMethods.repetitionWithSeparator.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionMandatory",
+ value: function (e) {
+ this.dslMethods.repetitionMandatory.push(e);
+ },
+ },
+ {
+ key: "visitRepetitionMandatoryWithSeparator",
+ value: function (e) {
+ this.dslMethods.repetitionMandatoryWithSeparator.push(
+ e
+ );
+ },
+ },
+ {
+ key: "visitRepetition",
+ value: function (e) {
+ this.dslMethods.repetition.push(e);
+ },
+ },
+ {
+ key: "visitAlternation",
+ value: function (e) {
+ this.dslMethods.alternation.push(e);
+ },
+ },
+ ]),
+ n
+ );
+ })(xa),
+ al = new il();
+ function ol(e, t) {
+ !0 === isNaN(e.startOffset)
+ ? ((e.startOffset = t.startOffset), (e.endOffset = t.endOffset))
+ : e.endOffset < t.endOffset === !0 &&
+ (e.endOffset = t.endOffset);
+ }
+ function sl(e, t) {
+ !0 === isNaN(e.startOffset)
+ ? ((e.startOffset = t.startOffset),
+ (e.startColumn = t.startColumn),
+ (e.startLine = t.startLine),
+ (e.endOffset = t.endOffset),
+ (e.endColumn = t.endColumn),
+ (e.endLine = t.endLine))
+ : e.endOffset < t.endOffset === !0 &&
+ ((e.endOffset = t.endOffset),
+ (e.endColumn = t.endColumn),
+ (e.endLine = t.endLine));
+ }
+ var ll,
+ ul,
+ cl = "name";
+ function fl(e, t) {
+ Object.defineProperty(e, cl, {
+ enumerable: !1,
+ configurable: !0,
+ writable: !1,
+ value: t,
+ });
+ }
+ function dl(e, t) {
+ for (var n = st(e), r = n.length, i = 0; i < r; i++)
+ for (var a = e[n[i]], o = a.length, s = 0; s < o; s++) {
+ var l = a[s];
+ void 0 === l.tokenTypeIdx && this[l.name](l.children, t);
+ }
+ }
+ function hl(e, t) {
+ var n = function () {};
+ fl(n, e + "BaseSemantics");
+ var r = {
+ visit: function (e, t) {
+ if ((w(e) && (e = e[0]), !ji(e)))
+ return this[e.name](e.children, t);
+ },
+ validateVisitor: function () {
+ var e = (function (e, t) {
+ var n = (function (e, t) {
+ var n = Ai(t, function (t) {
+ return !1 === Y(e[t]);
+ }),
+ r = _i(n, function (t) {
+ return {
+ msg: "Missing visitor method: <"
+ .concat(t, "> on ")
+ .concat(e.constructor.name, " CST Visitor."),
+ type: ll.MISSING_METHOD,
+ methodName: t,
+ };
+ });
+ return sr(r);
+ })(e, t);
+ return n;
+ })(this, t);
+ if (!Qi(e)) {
+ var n = _i(e, function (e) {
+ return e.msg;
+ });
+ throw Error(
+ "Errors Detected in CST Visitor <"
+ .concat(this.constructor.name, ">:\n\t")
+ .concat(n.join("\n\n").replace(/\n/g, "\n\t"))
+ );
+ }
+ },
+ };
+ return (
+ ((n.prototype = r).constructor = n), (n._RULE_NAMES = t), n
+ );
+ }
+ ((ul = ll || (ll = {}))[(ul.REDUNDANT_METHOD = 0)] =
+ "REDUNDANT_METHOD"),
+ (ul[(ul.MISSING_METHOD = 1)] = "MISSING_METHOD");
+ var pl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initTreeBuilder",
+ value: function (e) {
+ if (
+ ((this.CST_STACK = []),
+ (this.outputCst = e.outputCst),
+ (this.nodeLocationTracking = Bi(
+ e,
+ "nodeLocationTracking"
+ )
+ ? e.nodeLocationTracking
+ : Ll.nodeLocationTracking),
+ this.outputCst)
+ )
+ if (/full/i.test(this.nodeLocationTracking))
+ this.recoveryEnabled
+ ? ((this.setNodeLocationFromToken = sl),
+ (this.setNodeLocationFromNode = sl),
+ (this.cstPostRule = fe),
+ (this.setInitialNodeLocation =
+ this.setInitialNodeLocationFullRecovery))
+ : ((this.setNodeLocationFromToken = fe),
+ (this.setNodeLocationFromNode = fe),
+ (this.cstPostRule = this.cstPostRuleFull),
+ (this.setInitialNodeLocation =
+ this.setInitialNodeLocationFullRegular));
+ else if (
+ /onlyOffset/i.test(this.nodeLocationTracking)
+ )
+ this.recoveryEnabled
+ ? ((this.setNodeLocationFromToken = ol),
+ (this.setNodeLocationFromNode = ol),
+ (this.cstPostRule = fe),
+ (this.setInitialNodeLocation =
+ this.setInitialNodeLocationOnlyOffsetRecovery))
+ : ((this.setNodeLocationFromToken = fe),
+ (this.setNodeLocationFromNode = fe),
+ (this.cstPostRule = this.cstPostRuleOnlyOffset),
+ (this.setInitialNodeLocation =
+ this.setInitialNodeLocationOnlyOffsetRegular));
+ else {
+ if (!/none/i.test(this.nodeLocationTracking))
+ throw Error(
+ 'Invalid config option: "'.concat(
+ e.nodeLocationTracking,
+ '"'
+ )
+ );
+ (this.setNodeLocationFromToken = fe),
+ (this.setNodeLocationFromNode = fe),
+ (this.cstPostRule = fe),
+ (this.setInitialNodeLocation = fe);
+ }
+ else
+ (this.cstInvocationStateUpdate = fe),
+ (this.cstFinallyStateUpdate = fe),
+ (this.cstPostTerminal = fe),
+ (this.cstPostNonTerminal = fe),
+ (this.cstPostRule = fe);
+ },
+ },
+ {
+ key: "setInitialNodeLocationOnlyOffsetRecovery",
+ value: function (e) {
+ e.location = { startOffset: NaN, endOffset: NaN };
+ },
+ },
+ {
+ key: "setInitialNodeLocationOnlyOffsetRegular",
+ value: function (e) {
+ e.location = {
+ startOffset: this.LA(1).startOffset,
+ endOffset: NaN,
+ };
+ },
+ },
+ {
+ key: "setInitialNodeLocationFullRecovery",
+ value: function (e) {
+ e.location = {
+ startOffset: NaN,
+ startLine: NaN,
+ startColumn: NaN,
+ endOffset: NaN,
+ endLine: NaN,
+ endColumn: NaN,
+ };
+ },
+ },
+ {
+ key: "setInitialNodeLocationFullRegular",
+ value: function (e) {
+ var t = this.LA(1);
+ e.location = {
+ startOffset: t.startOffset,
+ startLine: t.startLine,
+ startColumn: t.startColumn,
+ endOffset: NaN,
+ endLine: NaN,
+ endColumn: NaN,
+ };
+ },
+ },
+ {
+ key: "cstInvocationStateUpdate",
+ value: function (e) {
+ var t = { name: e, children: Object.create(null) };
+ this.setInitialNodeLocation(t), this.CST_STACK.push(t);
+ },
+ },
+ {
+ key: "cstFinallyStateUpdate",
+ value: function () {
+ this.CST_STACK.pop();
+ },
+ },
+ {
+ key: "cstPostRuleFull",
+ value: function (e) {
+ var t = this.LA(0),
+ n = e.location;
+ n.startOffset <= t.startOffset === !0
+ ? ((n.endOffset = t.endOffset),
+ (n.endLine = t.endLine),
+ (n.endColumn = t.endColumn))
+ : ((n.startOffset = NaN),
+ (n.startLine = NaN),
+ (n.startColumn = NaN));
+ },
+ },
+ {
+ key: "cstPostRuleOnlyOffset",
+ value: function (e) {
+ var t = this.LA(0),
+ n = e.location;
+ n.startOffset <= t.startOffset === !0
+ ? (n.endOffset = t.endOffset)
+ : (n.startOffset = NaN);
+ },
+ },
+ {
+ key: "cstPostTerminal",
+ value: function (e, t) {
+ var n,
+ r,
+ i,
+ a = this.CST_STACK[this.CST_STACK.length - 1];
+ (r = t),
+ (i = e),
+ void 0 === (n = a).children[i]
+ ? (n.children[i] = [r])
+ : n.children[i].push(r),
+ this.setNodeLocationFromToken(a.location, t);
+ },
+ },
+ {
+ key: "cstPostNonTerminal",
+ value: function (e, t) {
+ var n = this.CST_STACK[this.CST_STACK.length - 1];
+ !(function (e, t, n) {
+ void 0 === e.children[t]
+ ? (e.children[t] = [n])
+ : e.children[t].push(n);
+ })(n, t, e),
+ this.setNodeLocationFromNode(n.location, e.location);
+ },
+ },
+ {
+ key: "getBaseCstVisitorConstructor",
+ value: function () {
+ if (ji(this.baseCstVisitorConstructor)) {
+ var e = hl(
+ this.className,
+ st(this.gastProductionsCache)
+ );
+ return (this.baseCstVisitorConstructor = e), e;
+ }
+ return this.baseCstVisitorConstructor;
+ },
+ },
+ {
+ key: "getBaseCstVisitorConstructorWithDefaults",
+ value: function () {
+ if (ji(this.baseCstVisitorWithDefaultsConstructor)) {
+ var e = (function (e, t, n) {
+ var r = function () {};
+ fl(r, e + "BaseSemanticsWithDefaults");
+ var i = Object.create(n.prototype);
+ return (
+ hi(t, function (e) {
+ i[e] = dl;
+ }),
+ ((r.prototype = i).constructor = r),
+ r
+ );
+ })(
+ this.className,
+ st(this.gastProductionsCache),
+ this.getBaseCstVisitorConstructor()
+ );
+ return (
+ (this.baseCstVisitorWithDefaultsConstructor = e), e
+ );
+ }
+ return this.baseCstVisitorWithDefaultsConstructor;
+ },
+ },
+ {
+ key: "getLastExplicitRuleShortName",
+ value: function () {
+ var e = this.RULE_STACK;
+ return e[e.length - 1];
+ },
+ },
+ {
+ key: "getPreviousExplicitRuleShortName",
+ value: function () {
+ var e = this.RULE_STACK;
+ return e[e.length - 2];
+ },
+ },
+ {
+ key: "getLastExplicitRuleOccurrenceIndex",
+ value: function () {
+ var e = this.RULE_OCCURRENCE_STACK;
+ return e[e.length - 1];
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ vl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initLexerAdapter",
+ value: function () {
+ (this.tokVector = []),
+ (this.tokVectorLength = 0),
+ (this.currIdx = -1);
+ },
+ },
+ {
+ key: "input",
+ get: function () {
+ return this.tokVector;
+ },
+ set: function (e) {
+ if (!0 !== this.selfAnalysisDone)
+ throw Error(
+ "Missing invocation at the end of the Parser's constructor."
+ );
+ this.reset(),
+ (this.tokVector = e),
+ (this.tokVectorLength = e.length);
+ },
+ },
+ {
+ key: "SKIP_TOKEN",
+ value: function () {
+ return this.currIdx <= this.tokVector.length - 2
+ ? (this.consumeToken(), this.LA(1))
+ : Rl;
+ },
+ },
+ {
+ key: "LA",
+ value: function (e) {
+ var t = this.currIdx + e;
+ return t < 0 || this.tokVectorLength <= t
+ ? Rl
+ : this.tokVector[t];
+ },
+ },
+ {
+ key: "consumeToken",
+ value: function () {
+ this.currIdx++;
+ },
+ },
+ {
+ key: "exportLexerState",
+ value: function () {
+ return this.currIdx;
+ },
+ },
+ {
+ key: "importLexerState",
+ value: function (e) {
+ this.currIdx = e;
+ },
+ },
+ {
+ key: "resetLexerState",
+ value: function () {
+ this.currIdx = -1;
+ },
+ },
+ {
+ key: "moveToTerminatedState",
+ value: function () {
+ this.currIdx = this.tokVector.length - 1;
+ },
+ },
+ {
+ key: "getLexerPosition",
+ value: function () {
+ return this.exportLexerState();
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ ml = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "ACTION",
+ value: function (e) {
+ return e.call(this);
+ },
+ },
+ {
+ key: "consume",
+ value: function (e, t, n) {
+ return this.consumeInternal(t, e, n);
+ },
+ },
+ {
+ key: "subrule",
+ value: function (e, t, n) {
+ return this.subruleInternal(t, e, n);
+ },
+ },
+ {
+ key: "option",
+ value: function (e, t) {
+ return this.optionInternal(t, e);
+ },
+ },
+ {
+ key: "or",
+ value: function (e, t) {
+ return this.orInternal(t, e);
+ },
+ },
+ {
+ key: "many",
+ value: function (e, t) {
+ return this.manyInternal(e, t);
+ },
+ },
+ {
+ key: "atLeastOne",
+ value: function (e, t) {
+ return this.atLeastOneInternal(e, t);
+ },
+ },
+ {
+ key: "CONSUME",
+ value: function (e, t) {
+ return this.consumeInternal(e, 0, t);
+ },
+ },
+ {
+ key: "CONSUME1",
+ value: function (e, t) {
+ return this.consumeInternal(e, 1, t);
+ },
+ },
+ {
+ key: "CONSUME2",
+ value: function (e, t) {
+ return this.consumeInternal(e, 2, t);
+ },
+ },
+ {
+ key: "CONSUME3",
+ value: function (e, t) {
+ return this.consumeInternal(e, 3, t);
+ },
+ },
+ {
+ key: "CONSUME4",
+ value: function (e, t) {
+ return this.consumeInternal(e, 4, t);
+ },
+ },
+ {
+ key: "CONSUME5",
+ value: function (e, t) {
+ return this.consumeInternal(e, 5, t);
+ },
+ },
+ {
+ key: "CONSUME6",
+ value: function (e, t) {
+ return this.consumeInternal(e, 6, t);
+ },
+ },
+ {
+ key: "CONSUME7",
+ value: function (e, t) {
+ return this.consumeInternal(e, 7, t);
+ },
+ },
+ {
+ key: "CONSUME8",
+ value: function (e, t) {
+ return this.consumeInternal(e, 8, t);
+ },
+ },
+ {
+ key: "CONSUME9",
+ value: function (e, t) {
+ return this.consumeInternal(e, 9, t);
+ },
+ },
+ {
+ key: "SUBRULE",
+ value: function (e, t) {
+ return this.subruleInternal(e, 0, t);
+ },
+ },
+ {
+ key: "SUBRULE1",
+ value: function (e, t) {
+ return this.subruleInternal(e, 1, t);
+ },
+ },
+ {
+ key: "SUBRULE2",
+ value: function (e, t) {
+ return this.subruleInternal(e, 2, t);
+ },
+ },
+ {
+ key: "SUBRULE3",
+ value: function (e, t) {
+ return this.subruleInternal(e, 3, t);
+ },
+ },
+ {
+ key: "SUBRULE4",
+ value: function (e, t) {
+ return this.subruleInternal(e, 4, t);
+ },
+ },
+ {
+ key: "SUBRULE5",
+ value: function (e, t) {
+ return this.subruleInternal(e, 5, t);
+ },
+ },
+ {
+ key: "SUBRULE6",
+ value: function (e, t) {
+ return this.subruleInternal(e, 6, t);
+ },
+ },
+ {
+ key: "SUBRULE7",
+ value: function (e, t) {
+ return this.subruleInternal(e, 7, t);
+ },
+ },
+ {
+ key: "SUBRULE8",
+ value: function (e, t) {
+ return this.subruleInternal(e, 8, t);
+ },
+ },
+ {
+ key: "SUBRULE9",
+ value: function (e, t) {
+ return this.subruleInternal(e, 9, t);
+ },
+ },
+ {
+ key: "OPTION",
+ value: function (e) {
+ return this.optionInternal(e, 0);
+ },
+ },
+ {
+ key: "OPTION1",
+ value: function (e) {
+ return this.optionInternal(e, 1);
+ },
+ },
+ {
+ key: "OPTION2",
+ value: function (e) {
+ return this.optionInternal(e, 2);
+ },
+ },
+ {
+ key: "OPTION3",
+ value: function (e) {
+ return this.optionInternal(e, 3);
+ },
+ },
+ {
+ key: "OPTION4",
+ value: function (e) {
+ return this.optionInternal(e, 4);
+ },
+ },
+ {
+ key: "OPTION5",
+ value: function (e) {
+ return this.optionInternal(e, 5);
+ },
+ },
+ {
+ key: "OPTION6",
+ value: function (e) {
+ return this.optionInternal(e, 6);
+ },
+ },
+ {
+ key: "OPTION7",
+ value: function (e) {
+ return this.optionInternal(e, 7);
+ },
+ },
+ {
+ key: "OPTION8",
+ value: function (e) {
+ return this.optionInternal(e, 8);
+ },
+ },
+ {
+ key: "OPTION9",
+ value: function (e) {
+ return this.optionInternal(e, 9);
+ },
+ },
+ {
+ key: "OR",
+ value: function (e) {
+ return this.orInternal(e, 0);
+ },
+ },
+ {
+ key: "OR1",
+ value: function (e) {
+ return this.orInternal(e, 1);
+ },
+ },
+ {
+ key: "OR2",
+ value: function (e) {
+ return this.orInternal(e, 2);
+ },
+ },
+ {
+ key: "OR3",
+ value: function (e) {
+ return this.orInternal(e, 3);
+ },
+ },
+ {
+ key: "OR4",
+ value: function (e) {
+ return this.orInternal(e, 4);
+ },
+ },
+ {
+ key: "OR5",
+ value: function (e) {
+ return this.orInternal(e, 5);
+ },
+ },
+ {
+ key: "OR6",
+ value: function (e) {
+ return this.orInternal(e, 6);
+ },
+ },
+ {
+ key: "OR7",
+ value: function (e) {
+ return this.orInternal(e, 7);
+ },
+ },
+ {
+ key: "OR8",
+ value: function (e) {
+ return this.orInternal(e, 8);
+ },
+ },
+ {
+ key: "OR9",
+ value: function (e) {
+ return this.orInternal(e, 9);
+ },
+ },
+ {
+ key: "MANY",
+ value: function (e) {
+ this.manyInternal(0, e);
+ },
+ },
+ {
+ key: "MANY1",
+ value: function (e) {
+ this.manyInternal(1, e);
+ },
+ },
+ {
+ key: "MANY2",
+ value: function (e) {
+ this.manyInternal(2, e);
+ },
+ },
+ {
+ key: "MANY3",
+ value: function (e) {
+ this.manyInternal(3, e);
+ },
+ },
+ {
+ key: "MANY4",
+ value: function (e) {
+ this.manyInternal(4, e);
+ },
+ },
+ {
+ key: "MANY5",
+ value: function (e) {
+ this.manyInternal(5, e);
+ },
+ },
+ {
+ key: "MANY6",
+ value: function (e) {
+ this.manyInternal(6, e);
+ },
+ },
+ {
+ key: "MANY7",
+ value: function (e) {
+ this.manyInternal(7, e);
+ },
+ },
+ {
+ key: "MANY8",
+ value: function (e) {
+ this.manyInternal(8, e);
+ },
+ },
+ {
+ key: "MANY9",
+ value: function (e) {
+ this.manyInternal(9, e);
+ },
+ },
+ {
+ key: "MANY_SEP",
+ value: function (e) {
+ this.manySepFirstInternal(0, e);
+ },
+ },
+ {
+ key: "MANY_SEP1",
+ value: function (e) {
+ this.manySepFirstInternal(1, e);
+ },
+ },
+ {
+ key: "MANY_SEP2",
+ value: function (e) {
+ this.manySepFirstInternal(2, e);
+ },
+ },
+ {
+ key: "MANY_SEP3",
+ value: function (e) {
+ this.manySepFirstInternal(3, e);
+ },
+ },
+ {
+ key: "MANY_SEP4",
+ value: function (e) {
+ this.manySepFirstInternal(4, e);
+ },
+ },
+ {
+ key: "MANY_SEP5",
+ value: function (e) {
+ this.manySepFirstInternal(5, e);
+ },
+ },
+ {
+ key: "MANY_SEP6",
+ value: function (e) {
+ this.manySepFirstInternal(6, e);
+ },
+ },
+ {
+ key: "MANY_SEP7",
+ value: function (e) {
+ this.manySepFirstInternal(7, e);
+ },
+ },
+ {
+ key: "MANY_SEP8",
+ value: function (e) {
+ this.manySepFirstInternal(8, e);
+ },
+ },
+ {
+ key: "MANY_SEP9",
+ value: function (e) {
+ this.manySepFirstInternal(9, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE",
+ value: function (e) {
+ this.atLeastOneInternal(0, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE1",
+ value: function (e) {
+ return this.atLeastOneInternal(1, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE2",
+ value: function (e) {
+ this.atLeastOneInternal(2, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE3",
+ value: function (e) {
+ this.atLeastOneInternal(3, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE4",
+ value: function (e) {
+ this.atLeastOneInternal(4, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE5",
+ value: function (e) {
+ this.atLeastOneInternal(5, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE6",
+ value: function (e) {
+ this.atLeastOneInternal(6, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE7",
+ value: function (e) {
+ this.atLeastOneInternal(7, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE8",
+ value: function (e) {
+ this.atLeastOneInternal(8, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE9",
+ value: function (e) {
+ this.atLeastOneInternal(9, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(0, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP1",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(1, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP2",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(2, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP3",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(3, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP4",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(4, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP5",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(5, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP6",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(6, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP7",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(7, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP8",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(8, e);
+ },
+ },
+ {
+ key: "AT_LEAST_ONE_SEP9",
+ value: function (e) {
+ this.atLeastOneSepFirstInternal(9, e);
+ },
+ },
+ {
+ key: "RULE",
+ value: function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : Dl;
+ if (Fi(this.definedRulesNames, e)) {
+ var r = {
+ message: $o.buildDuplicateRuleNameError({
+ topLevelRule: e,
+ grammarName: this.className,
+ }),
+ type: Bl.DUPLICATE_RULE_NAME,
+ ruleName: e,
+ };
+ this.definitionErrors.push(r);
+ }
+ this.definedRulesNames.push(e);
+ var i = this.defineRule(e, t, n);
+ return (this[e] = i), i;
+ },
+ },
+ {
+ key: "OVERRIDE_RULE",
+ value: function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : Dl,
+ r = (function (e, t, n) {
+ var r,
+ i = [];
+ return (
+ Fi(t, e) ||
+ ((r = "Invalid rule override, rule: ->"
+ .concat(
+ e,
+ "<- cannot be overridden in the grammar: ->"
+ )
+ .concat(
+ n,
+ "<-as it is not defined in any of the super grammars "
+ )),
+ i.push({
+ message: r,
+ type: Bl.INVALID_RULE_OVERRIDE,
+ ruleName: e,
+ })),
+ i
+ );
+ })(e, this.definedRulesNames, this.className);
+ this.definitionErrors = this.definitionErrors.concat(r);
+ var i = this.defineRule(e, t, n);
+ return (this[e] = i), i;
+ },
+ },
+ {
+ key: "BACKTRACK",
+ value: function (e, t) {
+ return function () {
+ this.isBackTrackingStack.push(1);
+ var n = this.saveRecogState();
+ try {
+ return e.apply(this, t), !0;
+ } catch (r) {
+ if (Zs(r)) return !1;
+ throw r;
+ } finally {
+ this.reloadRecogState(n),
+ this.isBackTrackingStack.pop();
+ }
+ };
+ },
+ },
+ {
+ key: "getGAstProductions",
+ value: function () {
+ return this.gastProductionsCache;
+ },
+ },
+ {
+ key: "getSerializedGastProductions",
+ value: function () {
+ return _i(Di(this.gastProductionsCache), ba);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ gl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initRecognizerEngine",
+ value: function (e, t) {
+ if (
+ ((this.className = this.constructor.name),
+ (this.shortRuleNameToFull = {}),
+ (this.fullRuleNameToShort = {}),
+ (this.ruleShortNameIdx = 256),
+ (this.tokenMatcher = Co),
+ (this.subruleIdx = 0),
+ (this.definedRulesNames = []),
+ (this.tokensMap = {}),
+ (this.isBackTrackingStack = []),
+ (this.RULE_STACK = []),
+ (this.RULE_OCCURRENCE_STACK = []),
+ (this.gastProductionsCache = {}),
+ Bi(t, "serializedGrammar"))
+ )
+ throw Error(
+ "The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details."
+ );
+ if (w(e)) {
+ if (Qi(e))
+ throw Error(
+ "A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0)."
+ );
+ if ("number" === typeof e[0].startOffset)
+ throw Error(
+ "The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details."
+ );
+ }
+ if (w(e))
+ this.tokensMap = Ji(
+ e,
+ function (e, t) {
+ return (e[t.name] = t), e;
+ },
+ {}
+ );
+ else if (Bi(e, "modes") && mi(Gt(Di(e.modes)), Bo)) {
+ var n = ra(Gt(Di(e.modes)));
+ this.tokensMap = Ji(
+ n,
+ function (e, t) {
+ return (e[t.name] = t), e;
+ },
+ {}
+ );
+ } else {
+ if (!L(e))
+ throw new Error(
+ " argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition"
+ );
+ this.tokensMap = or(e);
+ }
+ this.tokensMap.EOF = Yo;
+ var r = mi(
+ Bi(e, "modes") ? Gt(Di(e.modes)) : Di(e),
+ function (e) {
+ return Qi(e.categoryMatches);
+ }
+ );
+ (this.tokenMatcher = r ? Co : _o),
+ Mo(Di(this.tokensMap));
+ },
+ },
+ {
+ key: "defineRule",
+ value: function (e, t, n) {
+ if (this.selfAnalysisDone)
+ throw Error(
+ "Grammar rule <".concat(
+ e,
+ "> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called."
+ )
+ );
+ var r,
+ i = Bi(n, "resyncEnabled")
+ ? n.resyncEnabled
+ : Dl.resyncEnabled,
+ a = Bi(n, "recoveryValueFunc")
+ ? n.recoveryValueFunc
+ : Dl.recoveryValueFunc,
+ o = this.ruleShortNameIdx << 12;
+ return (
+ this.ruleShortNameIdx++,
+ (this.shortRuleNameToFull[o] = e),
+ (this.fullRuleNameToShort[e] = o),
+ (r =
+ !0 === this.outputCst
+ ? function () {
+ try {
+ this.ruleInvocationStateUpdate(
+ o,
+ e,
+ this.subruleIdx
+ );
+ for (
+ var n = arguments.length,
+ r = new Array(n),
+ s = 0;
+ s < n;
+ s++
+ )
+ r[s] = arguments[s];
+ t.apply(this, r);
+ var l =
+ this.CST_STACK[this.CST_STACK.length - 1];
+ return this.cstPostRule(l), l;
+ } catch (u) {
+ return this.invokeRuleCatch(u, i, a);
+ } finally {
+ this.ruleFinallyStateUpdate();
+ }
+ }
+ : function () {
+ try {
+ this.ruleInvocationStateUpdate(
+ o,
+ e,
+ this.subruleIdx
+ );
+ for (
+ var n = arguments.length,
+ r = new Array(n),
+ s = 0;
+ s < n;
+ s++
+ )
+ r[s] = arguments[s];
+ return t.apply(this, r);
+ } catch (l) {
+ return this.invokeRuleCatch(l, i, a);
+ } finally {
+ this.ruleFinallyStateUpdate();
+ }
+ }),
+ Object.assign(r, {
+ ruleName: e,
+ originalGrammarAction: t,
+ })
+ );
+ },
+ },
+ {
+ key: "invokeRuleCatch",
+ value: function (e, t, n) {
+ var r = 1 === this.RULE_STACK.length,
+ i =
+ t && !this.isBackTracking() && this.recoveryEnabled;
+ if (Zs(e)) {
+ var a = e;
+ if (i) {
+ var o = this.findReSyncTokenType();
+ if (this.isInCurrentRuleReSyncSet(o)) {
+ if (
+ ((a.resyncedTokens = this.reSyncTo(o)),
+ this.outputCst)
+ ) {
+ var s =
+ this.CST_STACK[this.CST_STACK.length - 1];
+ return (s.recoveredNode = !0), s;
+ }
+ return n(e);
+ }
+ if (this.outputCst) {
+ var l = this.CST_STACK[this.CST_STACK.length - 1];
+ (l.recoveredNode = !0), (a.partialCstResult = l);
+ }
+ throw a;
+ }
+ if (r) return this.moveToTerminatedState(), n(e);
+ throw a;
+ }
+ throw e;
+ },
+ },
+ {
+ key: "optionInternal",
+ value: function (e, t) {
+ var n = this.getKeyForAutomaticLookahead(512, t);
+ return this.optionInternalLogic(e, t, n);
+ },
+ },
+ {
+ key: "optionInternalLogic",
+ value: function (e, t, n) {
+ var r,
+ i = this,
+ a = this.getLaFuncFromCache(n);
+ if ("function" !== typeof e) {
+ r = e.DEF;
+ var o = e.GATE;
+ if (void 0 !== o) {
+ var s = a;
+ a = function () {
+ return o.call(i) && s.call(i);
+ };
+ }
+ } else r = e;
+ if (!0 === a.call(this)) return r.call(this);
+ },
+ },
+ {
+ key: "atLeastOneInternal",
+ value: function (e, t) {
+ var n = this.getKeyForAutomaticLookahead(Ks, e);
+ return this.atLeastOneInternalLogic(e, t, n);
+ },
+ },
+ {
+ key: "atLeastOneInternalLogic",
+ value: function (e, t, n) {
+ var r,
+ i = this,
+ a = this.getLaFuncFromCache(n);
+ if ("function" !== typeof t) {
+ r = t.DEF;
+ var o = t.GATE;
+ if (void 0 !== o) {
+ var s = a;
+ a = function () {
+ return o.call(i) && s.call(i);
+ };
+ }
+ } else r = t;
+ if (!0 !== a.call(this))
+ throw this.raiseEarlyExitException(
+ e,
+ es.REPETITION_MANDATORY,
+ t.ERR_MSG
+ );
+ for (
+ var l = this.doSingleRepetition(r);
+ !0 === a.call(this) && !0 === l;
+
+ )
+ l = this.doSingleRepetition(r);
+ this.attemptInRepetitionRecovery(
+ this.atLeastOneInternal,
+ [e, t],
+ a,
+ Ks,
+ e,
+ ls
+ );
+ },
+ },
+ {
+ key: "atLeastOneSepFirstInternal",
+ value: function (e, t) {
+ var n = this.getKeyForAutomaticLookahead(el, e);
+ this.atLeastOneSepFirstInternalLogic(e, t, n);
+ },
+ },
+ {
+ key: "atLeastOneSepFirstInternalLogic",
+ value: function (e, t, n) {
+ var r = this,
+ i = t.DEF,
+ a = t.SEP;
+ if (!0 !== this.getLaFuncFromCache(n).call(this))
+ throw this.raiseEarlyExitException(
+ e,
+ es.REPETITION_MANDATORY_WITH_SEPARATOR,
+ t.ERR_MSG
+ );
+ i.call(this);
+ for (
+ var o = function () {
+ return r.tokenMatcher(r.LA(1), a);
+ };
+ !0 === this.tokenMatcher(this.LA(1), a);
+
+ )
+ this.CONSUME(a), i.call(this);
+ this.attemptInRepetitionRecovery(
+ this.repetitionSepSecondInternal,
+ [e, a, o, i, us],
+ o,
+ el,
+ e,
+ us
+ );
+ },
+ },
+ {
+ key: "manyInternal",
+ value: function (e, t) {
+ var n = this.getKeyForAutomaticLookahead(768, e);
+ return this.manyInternalLogic(e, t, n);
+ },
+ },
+ {
+ key: "manyInternalLogic",
+ value: function (e, t, n) {
+ var r,
+ i = this,
+ a = this.getLaFuncFromCache(n);
+ if ("function" !== typeof t) {
+ r = t.DEF;
+ var o = t.GATE;
+ if (void 0 !== o) {
+ var s = a;
+ a = function () {
+ return o.call(i) && s.call(i);
+ };
+ }
+ } else r = t;
+ for (var l = !0; !0 === a.call(this) && !0 === l; )
+ l = this.doSingleRepetition(r);
+ this.attemptInRepetitionRecovery(
+ this.manyInternal,
+ [e, t],
+ a,
+ 768,
+ e,
+ os,
+ l
+ );
+ },
+ },
+ {
+ key: "manySepFirstInternal",
+ value: function (e, t) {
+ var n = this.getKeyForAutomaticLookahead($s, e);
+ this.manySepFirstInternalLogic(e, t, n);
+ },
+ },
+ {
+ key: "manySepFirstInternalLogic",
+ value: function (e, t, n) {
+ var r = this,
+ i = t.DEF,
+ a = t.SEP;
+ if (!0 === this.getLaFuncFromCache(n).call(this)) {
+ i.call(this);
+ for (
+ var o = function () {
+ return r.tokenMatcher(r.LA(1), a);
+ };
+ !0 === this.tokenMatcher(this.LA(1), a);
+
+ )
+ this.CONSUME(a), i.call(this);
+ this.attemptInRepetitionRecovery(
+ this.repetitionSepSecondInternal,
+ [e, a, o, i, ss],
+ o,
+ $s,
+ e,
+ ss
+ );
+ }
+ },
+ },
+ {
+ key: "repetitionSepSecondInternal",
+ value: function (e, t, n, r, i) {
+ for (; n(); ) this.CONSUME(t), r.call(this);
+ this.attemptInRepetitionRecovery(
+ this.repetitionSepSecondInternal,
+ [e, t, n, r, i],
+ n,
+ el,
+ e,
+ i
+ );
+ },
+ },
+ {
+ key: "doSingleRepetition",
+ value: function (e) {
+ var t = this.getLexerPosition();
+ return e.call(this), this.getLexerPosition() > t;
+ },
+ },
+ {
+ key: "orInternal",
+ value: function (e, t) {
+ var n = this.getKeyForAutomaticLookahead(256, t),
+ r = w(e) ? e : e.DEF,
+ i = this.getLaFuncFromCache(n).call(this, r);
+ if (void 0 !== i) return r[i].ALT.call(this);
+ this.raiseNoAltException(t, e.ERR_MSG);
+ },
+ },
+ {
+ key: "ruleFinallyStateUpdate",
+ value: function () {
+ if (
+ (this.RULE_STACK.pop(),
+ this.RULE_OCCURRENCE_STACK.pop(),
+ this.cstFinallyStateUpdate(),
+ 0 === this.RULE_STACK.length &&
+ !1 === this.isAtEndOfInput())
+ ) {
+ var e = this.LA(1),
+ t =
+ this.errorMessageProvider.buildNotAllInputParsedMessage(
+ {
+ firstRedundant: e,
+ ruleName: this.getCurrRuleFullName(),
+ }
+ );
+ this.SAVE_ERROR(new Vs(t, e));
+ }
+ },
+ },
+ {
+ key: "subruleInternal",
+ value: function (e, t, n) {
+ var r;
+ try {
+ var i = void 0 !== n ? n.ARGS : void 0;
+ return (
+ (this.subruleIdx = t),
+ (r = e.apply(this, i)),
+ this.cstPostNonTerminal(
+ r,
+ void 0 !== n && void 0 !== n.LABEL
+ ? n.LABEL
+ : e.ruleName
+ ),
+ r
+ );
+ } catch (a) {
+ throw this.subruleInternalError(a, n, e.ruleName);
+ }
+ },
+ },
+ {
+ key: "subruleInternalError",
+ value: function (e, t, n) {
+ throw (
+ (Zs(e) &&
+ void 0 !== e.partialCstResult &&
+ (this.cstPostNonTerminal(
+ e.partialCstResult,
+ void 0 !== t && void 0 !== t.LABEL ? t.LABEL : n
+ ),
+ delete e.partialCstResult),
+ e)
+ );
+ },
+ },
+ {
+ key: "consumeInternal",
+ value: function (e, t, n) {
+ var r;
+ try {
+ var i = this.LA(1);
+ !0 === this.tokenMatcher(i, e)
+ ? (this.consumeToken(), (r = i))
+ : this.consumeInternalError(e, i, n);
+ } catch (a) {
+ r = this.consumeInternalRecovery(e, t, a);
+ }
+ return (
+ this.cstPostTerminal(
+ void 0 !== n && void 0 !== n.LABEL
+ ? n.LABEL
+ : e.name,
+ r
+ ),
+ r
+ );
+ },
+ },
+ {
+ key: "consumeInternalError",
+ value: function (e, t, n) {
+ var r,
+ i = this.LA(0);
+ throw (
+ ((r =
+ void 0 !== n && n.ERR_MSG
+ ? n.ERR_MSG
+ : this.errorMessageProvider.buildMismatchTokenMessage(
+ {
+ expected: e,
+ actual: t,
+ previous: i,
+ ruleName: this.getCurrRuleFullName(),
+ }
+ )),
+ this.SAVE_ERROR(new Qs(r, t, i)))
+ );
+ },
+ },
+ {
+ key: "consumeInternalRecovery",
+ value: function (e, t, n) {
+ if (
+ !this.recoveryEnabled ||
+ "MismatchedTokenException" !== n.name ||
+ this.isBackTracking()
+ )
+ throw n;
+ var r = this.getFollowsForInRuleRecovery(e, t);
+ try {
+ return this.tryInRuleRecovery(e, r);
+ } catch (i) {
+ throw i.name === Xs ? n : i;
+ }
+ },
+ },
+ {
+ key: "saveRecogState",
+ value: function () {
+ var e = this.errors,
+ t = or(this.RULE_STACK);
+ return {
+ errors: e,
+ lexerState: this.exportLexerState(),
+ RULE_STACK: t,
+ CST_STACK: this.CST_STACK,
+ };
+ },
+ },
+ {
+ key: "reloadRecogState",
+ value: function (e) {
+ (this.errors = e.errors),
+ this.importLexerState(e.lexerState),
+ (this.RULE_STACK = e.RULE_STACK);
+ },
+ },
+ {
+ key: "ruleInvocationStateUpdate",
+ value: function (e, t, n) {
+ this.RULE_OCCURRENCE_STACK.push(n),
+ this.RULE_STACK.push(e),
+ this.cstInvocationStateUpdate(t);
+ },
+ },
+ {
+ key: "isBackTracking",
+ value: function () {
+ return 0 !== this.isBackTrackingStack.length;
+ },
+ },
+ {
+ key: "getCurrRuleFullName",
+ value: function () {
+ var e = this.getLastExplicitRuleShortName();
+ return this.shortRuleNameToFull[e];
+ },
+ },
+ {
+ key: "shortRuleNameToFullName",
+ value: function (e) {
+ return this.shortRuleNameToFull[e];
+ },
+ },
+ {
+ key: "isAtEndOfInput",
+ value: function () {
+ return this.tokenMatcher(this.LA(1), Yo);
+ },
+ },
+ {
+ key: "reset",
+ value: function () {
+ this.resetLexerState(),
+ (this.subruleIdx = 0),
+ (this.isBackTrackingStack = []),
+ (this.errors = []),
+ (this.RULE_STACK = []),
+ (this.CST_STACK = []),
+ (this.RULE_OCCURRENCE_STACK = []);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Al = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initErrorHandler",
+ value: function (e) {
+ (this._errors = []),
+ (this.errorMessageProvider = Bi(
+ e,
+ "errorMessageProvider"
+ )
+ ? e.errorMessageProvider
+ : Ll.errorMessageProvider);
+ },
+ },
+ {
+ key: "SAVE_ERROR",
+ value: function (e) {
+ if (Zs(e))
+ return (
+ (e.context = {
+ ruleStack: this.getHumanReadableRuleStack(),
+ ruleOccurrenceStack: or(
+ this.RULE_OCCURRENCE_STACK
+ ),
+ }),
+ this._errors.push(e),
+ e
+ );
+ throw Error(
+ "Trying to save an Error which is not a RecognitionException"
+ );
+ },
+ },
+ {
+ key: "errors",
+ get: function () {
+ return or(this._errors);
+ },
+ set: function (e) {
+ this._errors = e;
+ },
+ },
+ {
+ key: "raiseEarlyExitException",
+ value: function (e, t, n) {
+ for (
+ var r = this.getCurrRuleFullName(),
+ i = Es(
+ e,
+ this.getGAstProductions()[r],
+ t,
+ this.maxLookahead
+ )[0],
+ a = [],
+ o = 1;
+ o <= this.maxLookahead;
+ o++
+ )
+ a.push(this.LA(o));
+ var s = this.errorMessageProvider.buildEarlyExitMessage(
+ {
+ expectedIterationPaths: i,
+ actual: a,
+ previous: this.LA(0),
+ customUserDescription: n,
+ ruleName: r,
+ }
+ );
+ throw this.SAVE_ERROR(
+ new js(s, this.LA(1), this.LA(0))
+ );
+ },
+ },
+ {
+ key: "raiseNoAltException",
+ value: function (e, t) {
+ for (
+ var n = this.getCurrRuleFullName(),
+ r = Ss(
+ e,
+ this.getGAstProductions()[n],
+ this.maxLookahead
+ ),
+ i = [],
+ a = 1;
+ a <= this.maxLookahead;
+ a++
+ )
+ i.push(this.LA(a));
+ var o = this.LA(0),
+ s = this.errorMessageProvider.buildNoViableAltMessage(
+ {
+ expectedPathsPerAlt: r,
+ actual: i,
+ previous: o,
+ customUserDescription: t,
+ ruleName: this.getCurrRuleFullName(),
+ }
+ );
+ throw this.SAVE_ERROR(new Hs(s, this.LA(1), o));
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ yl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ { key: "initContentAssist", value: function () {} },
+ {
+ key: "computeContentAssist",
+ value: function (e, t) {
+ var n = this.gastProductionsCache[e];
+ if (ji(n))
+ throw Error(
+ "Rule ->".concat(
+ e,
+ "<- does not exist in this grammar."
+ )
+ );
+ return fs([n], t, this.tokenMatcher, this.maxLookahead);
+ },
+ },
+ {
+ key: "getNextPossibleTokenTypes",
+ value: function (e) {
+ var t = Si(e.ruleStack),
+ n = this.getGAstProductions()[t];
+ return new is(n, e).startWalking();
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ bl = {
+ description:
+ "This Object indicates the Parser is during Recording Phase",
+ };
+ Object.freeze(bl);
+ var xl = Math.pow(2, 8) - 1,
+ Sl = Xo({ name: "RECORDING_PHASE_TOKEN", pattern: Uo.NA });
+ Mo([Sl]);
+ var El = qo(
+ Sl,
+ "This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1
+ );
+ Object.freeze(El);
+ var _l = {
+ name: "This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",
+ children: {},
+ },
+ Cl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initGastRecorder",
+ value: function (e) {
+ (this.recordingProdStack = []),
+ (this.RECORDING_PHASE = !1);
+ },
+ },
+ {
+ key: "enableRecording",
+ value: function () {
+ var e = this;
+ (this.RECORDING_PHASE = !0),
+ this.TRACE_INIT("Enable Recording", function () {
+ for (
+ var t = function (t) {
+ var n = t > 0 ? t : "";
+ (e["CONSUME".concat(n)] = function (e, n) {
+ return this.consumeInternalRecord(e, t, n);
+ }),
+ (e["SUBRULE".concat(n)] = function (e, n) {
+ return this.subruleInternalRecord(
+ e,
+ t,
+ n
+ );
+ }),
+ (e["OPTION".concat(n)] = function (e) {
+ return this.optionInternalRecord(e, t);
+ }),
+ (e["OR".concat(n)] = function (e) {
+ return this.orInternalRecord(e, t);
+ }),
+ (e["MANY".concat(n)] = function (e) {
+ this.manyInternalRecord(t, e);
+ }),
+ (e["MANY_SEP".concat(n)] = function (e) {
+ this.manySepFirstInternalRecord(t, e);
+ }),
+ (e["AT_LEAST_ONE".concat(n)] = function (
+ e
+ ) {
+ this.atLeastOneInternalRecord(t, e);
+ }),
+ (e["AT_LEAST_ONE_SEP".concat(n)] =
+ function (e) {
+ this.atLeastOneSepFirstInternalRecord(
+ t,
+ e
+ );
+ });
+ },
+ n = 0;
+ n < 10;
+ n++
+ )
+ t(n);
+ (e.consume = function (e, t, n) {
+ return this.consumeInternalRecord(t, e, n);
+ }),
+ (e.subrule = function (e, t, n) {
+ return this.subruleInternalRecord(t, e, n);
+ }),
+ (e.option = function (e, t) {
+ return this.optionInternalRecord(t, e);
+ }),
+ (e.or = function (e, t) {
+ return this.orInternalRecord(t, e);
+ }),
+ (e.many = function (e, t) {
+ this.manyInternalRecord(e, t);
+ }),
+ (e.atLeastOne = function (e, t) {
+ this.atLeastOneInternalRecord(e, t);
+ }),
+ (e.ACTION = e.ACTION_RECORD),
+ (e.BACKTRACK = e.BACKTRACK_RECORD),
+ (e.LA = e.LA_RECORD);
+ });
+ },
+ },
+ {
+ key: "disableRecording",
+ value: function () {
+ var e = this;
+ (this.RECORDING_PHASE = !1),
+ this.TRACE_INIT(
+ "Deleting Recording methods",
+ function () {
+ for (var t = e, n = 0; n < 10; n++) {
+ var r = n > 0 ? n : "";
+ delete t["CONSUME".concat(r)],
+ delete t["SUBRULE".concat(r)],
+ delete t["OPTION".concat(r)],
+ delete t["OR".concat(r)],
+ delete t["MANY".concat(r)],
+ delete t["MANY_SEP".concat(r)],
+ delete t["AT_LEAST_ONE".concat(r)],
+ delete t["AT_LEAST_ONE_SEP".concat(r)];
+ }
+ delete t.consume,
+ delete t.subrule,
+ delete t.option,
+ delete t.or,
+ delete t.many,
+ delete t.atLeastOne,
+ delete t.ACTION,
+ delete t.BACKTRACK,
+ delete t.LA;
+ }
+ );
+ },
+ },
+ { key: "ACTION_RECORD", value: function (e) {} },
+ {
+ key: "BACKTRACK_RECORD",
+ value: function (e, t) {
+ return function () {
+ return !0;
+ };
+ },
+ },
+ {
+ key: "LA_RECORD",
+ value: function (e) {
+ return Rl;
+ },
+ },
+ {
+ key: "topLevelRuleRecord",
+ value: function (e, t) {
+ try {
+ var n = new fa({ definition: [], name: e });
+ return (
+ (n.name = e),
+ this.recordingProdStack.push(n),
+ t.call(this),
+ this.recordingProdStack.pop(),
+ n
+ );
+ } catch (r) {
+ if (!0 !== r.KNOWN_RECORDER_ERROR)
+ try {
+ r.message =
+ r.message +
+ '\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording';
+ } catch (i) {
+ throw r;
+ }
+ throw r;
+ }
+ },
+ },
+ {
+ key: "optionInternalRecord",
+ value: function (e, t) {
+ return wl.call(this, ha, e, t);
+ },
+ },
+ {
+ key: "atLeastOneInternalRecord",
+ value: function (e, t) {
+ wl.call(this, pa, t, e);
+ },
+ },
+ {
+ key: "atLeastOneSepFirstInternalRecord",
+ value: function (e, t) {
+ wl.call(this, va, t, e, true);
+ },
+ },
+ {
+ key: "manyInternalRecord",
+ value: function (e, t) {
+ wl.call(this, ma, t, e);
+ },
+ },
+ {
+ key: "manySepFirstInternalRecord",
+ value: function (e, t) {
+ wl.call(this, ga, t, e, true);
+ },
+ },
+ {
+ key: "orInternalRecord",
+ value: function (e, t) {
+ return Tl.call(this, e, t);
+ },
+ },
+ {
+ key: "subruleInternalRecord",
+ value: function (e, t, n) {
+ if ((Il(t), !e || !1 === Bi(e, "ruleName"))) {
+ var r = new Error(
+ " argument is invalid expecting a Parser method reference but got: <"
+ )
+ .concat(
+ JSON.stringify(e),
+ ">\n inside top level rule: <"
+ )
+ .concat(this.recordingProdStack[0].name, ">")
+ );
+ throw ((r.KNOWN_RECORDER_ERROR = !0), r);
+ }
+ var i = ci(this.recordingProdStack),
+ a = e.ruleName,
+ o = new ca({
+ idx: t,
+ nonTerminalName: a,
+ label:
+ null === n || void 0 === n ? void 0 : n.LABEL,
+ referencedRule: void 0,
+ });
+ return i.definition.push(o), this.outputCst ? _l : bl;
+ },
+ },
+ {
+ key: "consumeInternalRecord",
+ value: function (e, t, n) {
+ if ((Il(t), !ko(e))) {
+ var r = new Error(
+ " argument is invalid expecting a TokenType reference but got: <"
+ )
+ .concat(
+ JSON.stringify(e),
+ ">\n inside top level rule: <"
+ )
+ .concat(this.recordingProdStack[0].name, ">")
+ );
+ throw ((r.KNOWN_RECORDER_ERROR = !0), r);
+ }
+ var i = ci(this.recordingProdStack),
+ a = new ya({
+ idx: t,
+ terminalType: e,
+ label:
+ null === n || void 0 === n ? void 0 : n.LABEL,
+ });
+ return i.definition.push(a), El;
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function wl(e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3] && arguments[3];
+ Il(n);
+ var i = ci(this.recordingProdStack),
+ a = Y(t) ? t : t.DEF,
+ o = new e({ definition: [], idx: n });
+ return (
+ r && (o.separator = t.SEP),
+ Bi(t, "MAX_LOOKAHEAD") && (o.maxLookahead = t.MAX_LOOKAHEAD),
+ this.recordingProdStack.push(o),
+ a.call(this),
+ i.definition.push(o),
+ this.recordingProdStack.pop(),
+ bl
+ );
+ }
+ function Tl(e, t) {
+ var n = this;
+ Il(t);
+ var r = ci(this.recordingProdStack),
+ i = !1 === w(e),
+ a = !1 === i ? e : e.DEF,
+ o = new Aa({
+ definition: [],
+ idx: t,
+ ignoreAmbiguities: i && !0 === e.IGNORE_AMBIGUITIES,
+ });
+ Bi(e, "MAX_LOOKAHEAD") && (o.maxLookahead = e.MAX_LOOKAHEAD);
+ var s = ea(a, function (e) {
+ return Y(e.GATE);
+ });
+ return (
+ (o.hasPredicates = s),
+ r.definition.push(o),
+ hi(a, function (e) {
+ var t = new da({ definition: [] });
+ o.definition.push(t),
+ Bi(e, "IGNORE_AMBIGUITIES")
+ ? (t.ignoreAmbiguities = e.IGNORE_AMBIGUITIES)
+ : Bi(e, "GATE") && (t.ignoreAmbiguities = !0),
+ n.recordingProdStack.push(t),
+ e.ALT.call(n),
+ n.recordingProdStack.pop();
+ }),
+ bl
+ );
+ }
+ function Ml(e) {
+ return 0 === e ? "" : "".concat(e);
+ }
+ function Il(e) {
+ if (e < 0 || e > xl) {
+ var t = new Error(
+ "Invalid DSL Method idx value: <"
+ .concat(
+ e,
+ ">\n\tIdx value must be a none negative value smaller than "
+ )
+ .concat(xl + 1)
+ );
+ throw ((t.KNOWN_RECORDER_ERROR = !0), t);
+ }
+ }
+ var kl = (function () {
+ function e() {
+ (0, p.Z)(this, e);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "initPerformanceTracer",
+ value: function (e) {
+ if (Bi(e, "traceInitPerf")) {
+ var t = e.traceInitPerf,
+ n = "number" === typeof t;
+ (this.traceInitMaxIdent = n ? t : 1 / 0),
+ (this.traceInitPerf = n ? t > 0 : t);
+ } else
+ (this.traceInitMaxIdent = 0),
+ (this.traceInitPerf = Ll.traceInitPerf);
+ this.traceInitIndent = -1;
+ },
+ },
+ {
+ key: "TRACE_INIT",
+ value: function (e, t) {
+ if (!0 === this.traceInitPerf) {
+ this.traceInitIndent++;
+ var n = new Array(this.traceInitIndent + 1).join("\t");
+ this.traceInitIndent < this.traceInitMaxIdent &&
+ console.log("".concat(n, "--\x3e <").concat(e, ">"));
+ var r = oa(t),
+ i = r.time,
+ a = r.value,
+ o = i > 10 ? console.warn : console.log;
+ return (
+ this.traceInitIndent < this.traceInitMaxIdent &&
+ o(
+ ""
+ .concat(n, "<-- <")
+ .concat(e, "> time: ")
+ .concat(i, "ms")
+ ),
+ this.traceInitIndent--,
+ a
+ );
+ }
+ return t();
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ var Rl = qo(Yo, "", NaN, NaN, NaN, NaN, NaN, NaN);
+ Object.freeze(Rl);
+ var Bl,
+ Pl,
+ Ll = Object.freeze({
+ recoveryEnabled: !1,
+ maxLookahead: 3,
+ dynamicTokensEnabled: !1,
+ outputCst: !0,
+ errorMessageProvider: Jo,
+ nodeLocationTracking: "none",
+ traceInitPerf: !1,
+ skipValidations: !1,
+ }),
+ Dl = Object.freeze({
+ recoveryValueFunc: function () {},
+ resyncEnabled: !0,
+ });
+ ((Pl = Bl || (Bl = {}))[(Pl.INVALID_RULE_NAME = 0)] =
+ "INVALID_RULE_NAME"),
+ (Pl[(Pl.DUPLICATE_RULE_NAME = 1)] = "DUPLICATE_RULE_NAME"),
+ (Pl[(Pl.INVALID_RULE_OVERRIDE = 2)] = "INVALID_RULE_OVERRIDE"),
+ (Pl[(Pl.DUPLICATE_PRODUCTIONS = 3)] = "DUPLICATE_PRODUCTIONS"),
+ (Pl[(Pl.UNRESOLVED_SUBRULE_REF = 4)] = "UNRESOLVED_SUBRULE_REF"),
+ (Pl[(Pl.LEFT_RECURSION = 5)] = "LEFT_RECURSION"),
+ (Pl[(Pl.NONE_LAST_EMPTY_ALT = 6)] = "NONE_LAST_EMPTY_ALT"),
+ (Pl[(Pl.AMBIGUOUS_ALTS = 7)] = "AMBIGUOUS_ALTS"),
+ (Pl[(Pl.CONFLICT_TOKENS_RULES_NAMESPACE = 8)] =
+ "CONFLICT_TOKENS_RULES_NAMESPACE"),
+ (Pl[(Pl.INVALID_TOKEN_NAME = 9)] = "INVALID_TOKEN_NAME"),
+ (Pl[(Pl.NO_NON_EMPTY_LOOKAHEAD = 10)] = "NO_NON_EMPTY_LOOKAHEAD"),
+ (Pl[(Pl.AMBIGUOUS_PREFIX_ALTS = 11)] = "AMBIGUOUS_PREFIX_ALTS"),
+ (Pl[(Pl.TOO_MANY_ALTS = 12)] = "TOO_MANY_ALTS"),
+ (Pl[(Pl.CUSTOM_LOOKAHEAD_VALIDATION = 13)] =
+ "CUSTOM_LOOKAHEAD_VALIDATION");
+ var Ul,
+ Fl = (function () {
+ function e(t, n) {
+ (0, p.Z)(this, e),
+ (this.definitionErrors = []),
+ (this.selfAnalysisDone = !1);
+ var r = this;
+ if (
+ (r.initErrorHandler(n),
+ r.initLexerAdapter(),
+ r.initLooksAhead(n),
+ r.initRecognizerEngine(t, n),
+ r.initRecoverable(n),
+ r.initTreeBuilder(n),
+ r.initContentAssist(),
+ r.initGastRecorder(n),
+ r.initPerformanceTracer(n),
+ Bi(n, "ignoredIssues"))
+ )
+ throw new Error(
+ "The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details."
+ );
+ this.skipValidations = Bi(n, "skipValidations")
+ ? n.skipValidations
+ : Ll.skipValidations;
+ }
+ return (
+ (0, v.Z)(
+ e,
+ [
+ {
+ key: "performSelfAnalysis",
+ value: function () {
+ var t = this;
+ this.TRACE_INIT("performSelfAnalysis", function () {
+ var n;
+ t.selfAnalysisDone = !0;
+ var r = t.className;
+ t.TRACE_INIT("toFastProps", function () {
+ sa(t);
+ }),
+ t.TRACE_INIT("Grammar Recording", function () {
+ try {
+ t.enableRecording(),
+ hi(t.definedRulesNames, function (e) {
+ var n,
+ r = t[e].originalGrammarAction;
+ t.TRACE_INIT(
+ "".concat(e, " Rule"),
+ function () {
+ n = t.topLevelRuleRecord(e, r);
+ }
+ ),
+ (t.gastProductionsCache[e] = n);
+ });
+ } finally {
+ t.disableRecording();
+ }
+ });
+ var i = [];
+ if (
+ (t.TRACE_INIT("Grammar Resolving", function () {
+ (i = Ds({ rules: Di(t.gastProductionsCache) })),
+ (t.definitionErrors =
+ t.definitionErrors.concat(i));
+ }),
+ t.TRACE_INIT("Grammar Validations", function () {
+ if (Qi(i) && !1 === t.skipValidations) {
+ var e =
+ ((a = {
+ rules: Di(t.gastProductionsCache),
+ tokenTypes: Di(t.tokensMap),
+ errMsgProvider: $o,
+ grammarName: r,
+ }),
+ ws(
+ (a = oi(a, { errMsgProvider: $o }))
+ .rules,
+ a.tokenTypes,
+ a.errMsgProvider,
+ a.grammarName
+ )),
+ n = (function (e) {
+ return _i(
+ e.lookaheadStrategy.validate({
+ rules: e.rules,
+ tokenTypes: e.tokenTypes,
+ grammarName: e.grammarName,
+ }),
+ function (e) {
+ return Object.assign(
+ {
+ type: Bl.CUSTOM_LOOKAHEAD_VALIDATION,
+ },
+ e
+ );
+ }
+ );
+ })({
+ lookaheadStrategy: t.lookaheadStrategy,
+ rules: Di(t.gastProductionsCache),
+ tokenTypes: Di(t.tokensMap),
+ grammarName: r,
+ });
+ t.definitionErrors =
+ t.definitionErrors.concat(e, n);
+ }
+ var a;
+ }),
+ Qi(t.definitionErrors) &&
+ (t.recoveryEnabled &&
+ t.TRACE_INIT(
+ "computeAllProdsFollows",
+ function () {
+ var e = (function (e) {
+ var t = {};
+ return (
+ hi(e, function (e) {
+ var n = new Ma(e).startWalking();
+ ct(t, n);
+ }),
+ t
+ );
+ })(Di(t.gastProductionsCache));
+ t.resyncFollows = e;
+ }
+ ),
+ t.TRACE_INIT(
+ "ComputeLookaheadFunctions",
+ function () {
+ var e, n;
+ null ===
+ (n = (e = t.lookaheadStrategy)
+ .initialize) ||
+ void 0 === n ||
+ n.call(e, {
+ rules: Di(t.gastProductionsCache),
+ }),
+ t.preComputeLookaheadFunctions(
+ Di(t.gastProductionsCache)
+ );
+ }
+ )),
+ !e.DEFER_DEFINITION_ERRORS_HANDLING &&
+ !Qi(t.definitionErrors))
+ )
+ throw (
+ ((n = _i(t.definitionErrors, function (e) {
+ return e.message;
+ })),
+ new Error(
+ "Parser Definition Errors detected:\n ".concat(
+ n.join(
+ "\n-------------------------------\n"
+ )
+ )
+ ))
+ );
+ });
+ },
+ },
+ ],
+ [
+ {
+ key: "performSelfAnalysis",
+ value: function (e) {
+ throw Error(
+ "The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead."
+ );
+ },
+ },
+ ]
+ ),
+ e
+ );
+ })();
+ (Fl.DEFER_DEFINITION_ERRORS_HANDLING = !1),
+ (Ul = Fl),
+ [qs, rl, pl, vl, gl, ml, Al, yl, Cl, kl].forEach(function (e) {
+ var t = e.prototype;
+ Object.getOwnPropertyNames(t).forEach(function (n) {
+ if ("constructor" !== n) {
+ var r = Object.getOwnPropertyDescriptor(t, n);
+ r && (r.get || r.set)
+ ? Object.defineProperty(Ul.prototype, n, r)
+ : (Ul.prototype[n] = e.prototype[n]);
+ }
+ });
+ });
+ var Ol = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Ll;
+ (0, p.Z)(this, n);
+ var i = or(r);
+ return (i.outputCst = !0), t.call(this, e, i);
+ }
+ return (0, v.Z)(n);
+ })(Fl);
+ return { CstParser: Ol, Lexer: Uo, createToken: Xo };
+ })(),
+ _f = Ef.CstParser,
+ Cf = Ef.Lexer,
+ wf = Ef.createToken,
+ Tf = null,
+ Mf = null,
+ If = null,
+ kf = null,
+ Rf = { INTENSITY: 1, INTENSITY_ALPHA: 2, RGB: 3, RGBA: 4 },
+ Bf = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 4;
+ (0, p.Z)(this, e),
+ (this.pool = t),
+ (this.queue = []),
+ (this.workers = []),
+ (this.workersResolve = []),
+ (this.workerStatus = 0);
+ }
+ return (
+ (0, v.Z)(e, [
+ {
+ key: "_initWorker",
+ value: function (e) {
+ if (!this.workers[e]) {
+ var t = this.workerCreator();
+ t.addEventListener(
+ "message",
+ this._onMessage.bind(this, e)
+ ),
+ (this.workers[e] = t);
+ }
+ },
+ },
+ {
+ key: "_getIdleWorker",
+ value: function () {
+ for (var e = 0; e < this.pool; e++)
+ if (!(this.workerStatus & (1 << e))) return e;
+ return -1;
+ },
+ },
+ {
+ key: "_onMessage",
+ value: function (e, t) {
+ var n = this.workersResolve[e];
+ if ((n && n(t), this.queue.length)) {
+ var r = this.queue.shift(),
+ i = r.resolve,
+ a = r.msg,
+ o = r.transfer;
+ (this.workersResolve[e] = i),
+ this.workers[e].postMessage(a, o);
+ } else this.workerStatus ^= 1 << e;
+ },
+ },
+ {
+ key: "setWorkerCreator",
+ value: function (e) {
+ this.workerCreator = e;
+ },
+ },
+ {
+ key: "setWorkerLimit",
+ value: function (e) {
+ this.pool = e;
+ },
+ },
+ {
+ key: "postMessage",
+ value: function (e, t) {
+ var n = this;
+ return new Promise(function (r) {
+ var i = n._getIdleWorker();
+ -1 !== i
+ ? (n._initWorker(i),
+ (n.workerStatus |= 1 << i),
+ (n.workersResolve[i] = r),
+ n.workers[i].postMessage(e, t))
+ : n.queue.push({ resolve: r, msg: e, transfer: t });
+ });
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.workers.forEach(function (e) {
+ return e.terminate();
+ }),
+ (this.workersResolve.length = 0),
+ (this.workers.length = 0),
+ (this.queue.length = 0),
+ (this.workerStatus = 0);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Pf = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e, r, i, a, o, s) {
+ var l;
+ return (
+ (0, p.Z)(this, n),
+ ((l = t.call(this, e, r, i, o, s)).isCompressedArrayTexture =
+ !0),
+ (l.image.depth = a),
+ (l.wrapR = A.ClampToEdgeWrapping),
+ l
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.CompressedTexture),
+ Lf = new WeakMap(),
+ Df = 0,
+ Uf,
+ Ff = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e)).transcoderPath = ""),
+ (r.transcoderBinary = null),
+ (r.transcoderPending = null),
+ (r.workerPool = new Bf()),
+ (r.workerSourceURL = ""),
+ (r.workerConfig = null),
+ "undefined" !== typeof MSC_TRANSCODER &&
+ console.warn(
+ 'THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.'
+ ),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "setTranscoderPath",
+ value: function (e) {
+ return (this.transcoderPath = e), this;
+ },
+ },
+ {
+ key: "setWorkerLimit",
+ value: function (e) {
+ return this.workerPool.setWorkerLimit(e), this;
+ },
+ },
+ {
+ key: "detectSupport",
+ value: function (e) {
+ return (
+ (this.workerConfig = {
+ astcSupported: e.extensions.has(
+ "WEBGL_compressed_texture_astc"
+ ),
+ etc1Supported: e.extensions.has(
+ "WEBGL_compressed_texture_etc1"
+ ),
+ etc2Supported: e.extensions.has(
+ "WEBGL_compressed_texture_etc"
+ ),
+ dxtSupported: e.extensions.has(
+ "WEBGL_compressed_texture_s3tc"
+ ),
+ bptcSupported: e.extensions.has(
+ "EXT_texture_compression_bptc"
+ ),
+ pvrtcSupported:
+ e.extensions.has("WEBGL_compressed_texture_pvrtc") ||
+ e.extensions.has(
+ "WEBKIT_WEBGL_compressed_texture_pvrtc"
+ ),
+ }),
+ e.capabilities.isWebGL2 &&
+ (this.workerConfig.etc1Supported = !1),
+ this
+ );
+ },
+ },
+ {
+ key: "init",
+ value: function () {
+ var e = this;
+ if (!this.transcoderPending) {
+ var t = new A.FileLoader(this.manager);
+ t.setPath(this.transcoderPath),
+ t.setWithCredentials(this.withCredentials);
+ var r = t.loadAsync("basis_transcoder.js"),
+ i = new A.FileLoader(this.manager);
+ i.setPath(this.transcoderPath),
+ i.setResponseType("arraybuffer"),
+ i.setWithCredentials(this.withCredentials);
+ var o = i.loadAsync("basis_transcoder.wasm");
+ (this.transcoderPending = Promise.all([r, o]).then(
+ function (t) {
+ var r = (0, a.Z)(t, 2),
+ i = r[0],
+ o = r[1],
+ s = n.BasisWorker.toString(),
+ l = [
+ "/* constants */",
+ "let _EngineFormat = " +
+ JSON.stringify(n.EngineFormat),
+ "let _TranscoderFormat = " +
+ JSON.stringify(n.TranscoderFormat),
+ "let _BasisFormat = " +
+ JSON.stringify(n.BasisFormat),
+ "/* basis_transcoder.js */",
+ i,
+ "/* worker */",
+ s.substring(
+ s.indexOf("{") + 1,
+ s.lastIndexOf("}")
+ ),
+ ].join("\n");
+ (e.workerSourceURL = URL.createObjectURL(
+ new Blob([l])
+ )),
+ (e.transcoderBinary = o),
+ e.workerPool.setWorkerCreator(function () {
+ var t = new Worker(e.workerSourceURL),
+ n = e.transcoderBinary.slice(0);
+ return (
+ t.postMessage(
+ {
+ type: "init",
+ config: e.workerConfig,
+ transcoderBinary: n,
+ },
+ [n]
+ ),
+ t
+ );
+ });
+ }
+ )),
+ Df > 0 &&
+ console.warn(
+ "THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."
+ ),
+ Df++;
+ }
+ return this.transcoderPending;
+ },
+ },
+ {
+ key: "load",
+ value: function (e, t, n, r) {
+ var i = this;
+ if (null === this.workerConfig)
+ throw new Error(
+ "THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`."
+ );
+ var a = new A.FileLoader(this.manager);
+ a.setResponseType("arraybuffer"),
+ a.setWithCredentials(this.withCredentials),
+ a.load(
+ e,
+ function (e) {
+ if (Lf.has(e))
+ return Lf.get(e).promise.then(t).catch(r);
+ i._createTexture(e)
+ .then(function (e) {
+ return t ? t(e) : null;
+ })
+ .catch(r);
+ },
+ n,
+ r
+ );
+ },
+ },
+ {
+ key: "_createTextureFrom",
+ value: function (e, t) {
+ var n = e.mipmaps,
+ r = e.width,
+ i = e.height,
+ a = e.format,
+ o = e.type,
+ s = e.error,
+ l = e.dfdTransferFn,
+ u = e.dfdFlags;
+ if ("error" === o) return Promise.reject(s);
+ var c =
+ t.layerCount > 1
+ ? new Pf(n, r, i, t.layerCount, a, A.UnsignedByteType)
+ : new A.CompressedTexture(
+ n,
+ r,
+ i,
+ a,
+ A.UnsignedByteType
+ );
+ return (
+ (c.minFilter =
+ 1 === n.length
+ ? A.LinearFilter
+ : A.LinearMipmapLinearFilter),
+ (c.magFilter = A.LinearFilter),
+ (c.generateMipmaps = !1),
+ (c.needsUpdate = !0),
+ "colorSpace" in c
+ ? (c.colorSpace = l === b.FVZ ? "srgb" : "srgb-linear")
+ : (c.encoding = l === b.FVZ ? 3001 : 3e3),
+ (c.premultiplyAlpha = !!(u & b.qHj)),
+ c
+ );
+ },
+ },
+ {
+ key: "_createTexture",
+ value: (function () {
+ var e = (0, c.Z)(
+ (0, u.Z)().mark(function e(t) {
+ var n,
+ r,
+ i,
+ a,
+ o = this,
+ s = arguments;
+ return (0, u.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ if (
+ ((n =
+ s.length > 1 && void 0 !== s[1]
+ ? s[1]
+ : {}),
+ (r = (0, b.ij3)(new Uint8Array(t)))
+ .vkFormat === b.kXg)
+ ) {
+ e.next = 4;
+ break;
+ }
+ return e.abrupt("return", zf(r));
+ case 4:
+ return (
+ (i = n),
+ (a = this.init()
+ .then(function () {
+ return o.workerPool.postMessage(
+ {
+ type: "transcode",
+ buffer: t,
+ taskConfig: i,
+ },
+ [t]
+ );
+ })
+ .then(function (e) {
+ return o._createTextureFrom(e.data, r);
+ })),
+ Lf.set(t, { promise: a }),
+ e.abrupt("return", a)
+ );
+ case 8:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ })
+ );
+ return function (t) {
+ return e.apply(this, arguments);
+ };
+ })(),
+ },
+ {
+ key: "dispose",
+ value: function () {
+ return (
+ this.workerPool.dispose(),
+ this.workerSourceURL &&
+ URL.revokeObjectURL(this.workerSourceURL),
+ Df--,
+ this
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(A.Loader),
+ Of = Ff;
+ A.RGBAFormat,
+ A.RGBA_ASTC_4x4_Format,
+ A.RGBA_BPTC_Format,
+ A.RGBA_ETC2_EAC_Format,
+ A.RGBA_PVRTC_4BPPV1_Format,
+ A.RGBA_S3TC_DXT5_Format,
+ A.RGB_ETC1_Format,
+ A.RGB_ETC2_Format,
+ A.RGB_PVRTC_4BPPV1_Format,
+ A.RGB_S3TC_DXT1_Format;
+ var Nf =
+ ((S = {}),
+ (0, l.Z)(S, b.qfi, A.RGBAFormat),
+ (0, l.Z)(S, b.IgZ, A.RGBAFormat),
+ (0, l.Z)(S, b.MCP, A.RGBAFormat),
+ (0, l.Z)(S, b.OmG, A.RGBAFormat),
+ (0, l.Z)(S, b.bWS, A.RGFormat),
+ (0, l.Z)(S, b.LR2, A.RGFormat),
+ (0, l.Z)(S, b.gJS, A.RGFormat),
+ (0, l.Z)(S, b.IJq, A.RGFormat),
+ (0, l.Z)(S, b.eQx, A.RedFormat),
+ (0, l.Z)(S, b.wOb, A.RedFormat),
+ (0, l.Z)(S, b.e1Y, A.RedFormat),
+ (0, l.Z)(S, b.tLr, A.RedFormat),
+ S),
+ Gf =
+ ((E = {}),
+ (0, l.Z)(E, b.qfi, A.FloatType),
+ (0, l.Z)(E, b.IgZ, A.HalfFloatType),
+ (0, l.Z)(E, b.MCP, A.UnsignedByteType),
+ (0, l.Z)(E, b.OmG, A.UnsignedByteType),
+ (0, l.Z)(E, b.bWS, A.FloatType),
+ (0, l.Z)(E, b.LR2, A.HalfFloatType),
+ (0, l.Z)(E, b.gJS, A.UnsignedByteType),
+ (0, l.Z)(E, b.IJq, A.UnsignedByteType),
+ (0, l.Z)(E, b.eQx, A.FloatType),
+ (0, l.Z)(E, b.wOb, A.HalfFloatType),
+ (0, l.Z)(E, b.e1Y, A.UnsignedByteType),
+ (0, l.Z)(E, b.tLr, A.UnsignedByteType),
+ E),
+ Zf =
+ ((_ = {}),
+ (0, l.Z)(_, b.OmG, 3001),
+ (0, l.Z)(_, b.IJq, 3001),
+ (0, l.Z)(_, b.e1Y, 3001),
+ _);
+ function zf(e) {
+ return Qf.apply(this, arguments);
+ }
+ function Qf() {
+ return (
+ (Qf = (0, c.Z)(
+ (0, u.Z)().mark(function e(t) {
+ var n, r, i, a, o, s, l, f;
+ return (0, u.Z)().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ if (
+ ((n = t.vkFormat),
+ (r = t.pixelWidth),
+ (i = t.pixelHeight),
+ (a = t.pixelDepth),
+ void 0 !== Nf[n])
+ ) {
+ e.next = 3;
+ break;
+ }
+ throw new Error(
+ "THREE.KTX2Loader: Unsupported vkFormat."
+ );
+ case 3:
+ if (
+ ((o = t.levels[0]), t.supercompressionScheme !== b.Oi)
+ ) {
+ e.next = 8;
+ break;
+ }
+ (s = o.levelData), (e.next = 16);
+ break;
+ case 8:
+ if (t.supercompressionScheme !== b.c6w) {
+ e.next = 15;
+ break;
+ }
+ return (
+ Uf ||
+ (Uf = new Promise(
+ (function () {
+ var e = (0, c.Z)(
+ (0, u.Z)().mark(function e(t) {
+ var n;
+ return (0, u.Z)().wrap(function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (
+ (n = new x.L()),
+ (e.next = 3),
+ n.init()
+ );
+ case 3:
+ t(n);
+ case 4:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ );
+ return function (t) {
+ return e.apply(this, arguments);
+ };
+ })()
+ )),
+ (e.next = 12),
+ Uf
+ );
+ case 12:
+ (s = e.sent.decode(
+ o.levelData,
+ o.uncompressedByteLength
+ )),
+ (e.next = 16);
+ break;
+ case 15:
+ throw new Error(
+ "THREE.KTX2Loader: Unsupported supercompressionScheme."
+ );
+ case 16:
+ return (
+ (l =
+ Gf[n] === A.FloatType
+ ? new Float32Array(
+ s.buffer,
+ s.byteOffset,
+ s.byteLength / Float32Array.BYTES_PER_ELEMENT
+ )
+ : Gf[n] === A.HalfFloatType
+ ? new Uint16Array(
+ s.buffer,
+ s.byteOffset,
+ s.byteLength / Uint16Array.BYTES_PER_ELEMENT
+ )
+ : s),
+ ((f =
+ 0 === a
+ ? new A.DataTexture(l, r, i)
+ : new ff(l, r, i, a)).type = Gf[n]),
+ (f.format = Nf[n]),
+ (f.encoding = Zf[n] || 3e3),
+ (f.needsUpdate = !0),
+ e.abrupt("return", Promise.resolve(f))
+ );
+ case 23:
+ case "end":
+ return e.stop();
+ }
+ }, e);
+ })
+ )),
+ Qf.apply(this, arguments)
+ );
+ }
+ var Hf = null,
+ Vf = null,
+ jf = (function () {
+ var e = 0,
+ t = -3;
+ function n() {
+ (this.table = new Uint16Array(16)),
+ (this.trans = new Uint16Array(288));
+ }
+ function r(e, t) {
+ (this.source = e),
+ (this.sourceIndex = 0),
+ (this.tag = 0),
+ (this.bitcount = 0),
+ (this.dest = t),
+ (this.destLen = 0),
+ (this.ltree = new n()),
+ (this.dtree = new n());
+ }
+ var i = new n(),
+ a = new n(),
+ o = new Uint8Array(30),
+ s = new Uint16Array(30),
+ l = new Uint8Array(30),
+ u = new Uint16Array(30),
+ c = new Uint8Array([
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1,
+ 15,
+ ]),
+ f = new n(),
+ d = new Uint8Array(320);
+ function h(e, t, n, r) {
+ var i, a;
+ for (i = 0; i < n; ++i) e[i] = 0;
+ for (i = 0; i < 30 - n; ++i) e[i + n] = (i / n) | 0;
+ for (a = r, i = 0; i < 30; ++i) (t[i] = a), (a += 1 << e[i]);
+ }
+ var p = new Uint16Array(16);
+ function v(e, t, n, r) {
+ var i, a;
+ for (i = 0; i < 16; ++i) e.table[i] = 0;
+ for (i = 0; i < r; ++i) e.table[t[n + i]]++;
+ for (e.table[0] = 0, a = 0, i = 0; i < 16; ++i)
+ (p[i] = a), (a += e.table[i]);
+ for (i = 0; i < r; ++i) t[n + i] && (e.trans[p[t[n + i]]++] = i);
+ }
+ function m(e) {
+ e.bitcount-- ||
+ ((e.tag = e.source[e.sourceIndex++]), (e.bitcount = 7));
+ var t = 1 & e.tag;
+ return (e.tag >>>= 1), t;
+ }
+ function g(e, t, n) {
+ if (!t) return n;
+ for (; e.bitcount < 24; )
+ (e.tag |= e.source[e.sourceIndex++] << e.bitcount),
+ (e.bitcount += 8);
+ var r = e.tag & (65535 >>> (16 - t));
+ return (e.tag >>>= t), (e.bitcount -= t), r + n;
+ }
+ function A(e, t) {
+ for (; e.bitcount < 24; )
+ (e.tag |= e.source[e.sourceIndex++] << e.bitcount),
+ (e.bitcount += 8);
+ var n = 0,
+ r = 0,
+ i = 0,
+ a = e.tag;
+ do {
+ (r = 2 * r + (1 & a)),
+ (a >>>= 1),
+ ++i,
+ (n += t.table[i]),
+ (r -= t.table[i]);
+ } while (r >= 0);
+ return (e.tag = a), (e.bitcount -= i), t.trans[n + r];
+ }
+ function y(e, t, n) {
+ var r, i, a, o, s, l;
+ for (
+ r = g(e, 5, 257), i = g(e, 5, 1), a = g(e, 4, 4), o = 0;
+ o < 19;
+ ++o
+ )
+ d[o] = 0;
+ for (o = 0; o < a; ++o) {
+ var u = g(e, 3, 0);
+ d[c[o]] = u;
+ }
+ for (v(f, d, 0, 19), s = 0; s < r + i; ) {
+ var h = A(e, f);
+ switch (h) {
+ case 16:
+ var p = d[s - 1];
+ for (l = g(e, 2, 3); l; --l) d[s++] = p;
+ break;
+ case 17:
+ for (l = g(e, 3, 3); l; --l) d[s++] = 0;
+ break;
+ case 18:
+ for (l = g(e, 7, 11); l; --l) d[s++] = 0;
+ break;
+ default:
+ d[s++] = h;
+ }
+ }
+ v(t, d, 0, r), v(n, d, r, i);
+ }
+ function b(t, n, r) {
+ for (;;) {
+ var i,
+ a,
+ c,
+ f,
+ d = A(t, n);
+ if (256 === d) return e;
+ if (d < 256) t.dest[t.destLen++] = d;
+ else
+ for (
+ i = g(t, o[(d -= 257)], s[d]),
+ a = A(t, r),
+ f = c = t.destLen - g(t, l[a], u[a]);
+ f < c + i;
+ ++f
+ )
+ t.dest[t.destLen++] = t.dest[f];
+ }
+ }
+ function x(n) {
+ for (var r, i; n.bitcount > 8; )
+ n.sourceIndex--, (n.bitcount -= 8);
+ if (
+ (r =
+ 256 * (r = n.source[n.sourceIndex + 1]) +
+ n.source[n.sourceIndex]) !==
+ (65535 &
+ ~(
+ 256 * n.source[n.sourceIndex + 3] +
+ n.source[n.sourceIndex + 2]
+ ))
+ )
+ return t;
+ for (n.sourceIndex += 4, i = r; i; --i)
+ n.dest[n.destLen++] = n.source[n.sourceIndex++];
+ return (n.bitcount = 0), e;
+ }
+ !(function (e, t) {
+ var n;
+ for (n = 0; n < 7; ++n) e.table[n] = 0;
+ for (
+ e.table[7] = 24, e.table[8] = 152, e.table[9] = 112, n = 0;
+ n < 24;
+ ++n
+ )
+ e.trans[n] = 256 + n;
+ for (n = 0; n < 144; ++n) e.trans[24 + n] = n;
+ for (n = 0; n < 8; ++n) e.trans[168 + n] = 280 + n;
+ for (n = 0; n < 112; ++n) e.trans[176 + n] = 144 + n;
+ for (n = 0; n < 5; ++n) t.table[n] = 0;
+ for (t.table[5] = 32, n = 0; n < 32; ++n) t.trans[n] = n;
+ })(i, a),
+ h(o, s, 4, 3),
+ h(l, u, 2, 1),
+ (o[28] = 0),
+ (s[28] = 258);
+ var S = function (n, o) {
+ var s,
+ l,
+ u = new r(n, o);
+ do {
+ switch (((s = m(u)), g(u, 2, 0))) {
+ case 0:
+ l = x(u);
+ break;
+ case 1:
+ l = b(u, i, a);
+ break;
+ case 2:
+ y(u, u.ltree, u.dtree), (l = b(u, u.ltree, u.dtree));
+ break;
+ default:
+ l = t;
+ }
+ if (l !== e) throw new Error("Data error");
+ } while (!s);
+ return u.destLen < u.dest.length
+ ? "function" === typeof u.dest.slice
+ ? u.dest.slice(0, u.destLen)
+ : u.dest.subarray(0, u.destLen)
+ : u.dest;
+ };
+ function E(e, t, n, r, i) {
+ return (
+ Math.pow(1 - i, 3) * e +
+ 3 * Math.pow(1 - i, 2) * i * t +
+ 3 * (1 - i) * Math.pow(i, 2) * n +
+ Math.pow(i, 3) * r
+ );
+ }
+ function _() {
+ (this.x1 = Number.NaN),
+ (this.y1 = Number.NaN),
+ (this.x2 = Number.NaN),
+ (this.y2 = Number.NaN);
+ }
+ function C() {
+ (this.commands = []),
+ (this.fill = "black"),
+ (this.stroke = null),
+ (this.strokeWidth = 1);
+ }
+ function w(e) {
+ throw new Error(e);
+ }
+ function T(e, t) {
+ e || w(t);
+ }
+ (_.prototype.isEmpty = function () {
+ return (
+ isNaN(this.x1) ||
+ isNaN(this.y1) ||
+ isNaN(this.x2) ||
+ isNaN(this.y2)
+ );
+ }),
+ (_.prototype.addPoint = function (e, t) {
+ "number" === typeof e &&
+ ((isNaN(this.x1) || isNaN(this.x2)) &&
+ ((this.x1 = e), (this.x2 = e)),
+ e < this.x1 && (this.x1 = e),
+ e > this.x2 && (this.x2 = e)),
+ "number" === typeof t &&
+ ((isNaN(this.y1) || isNaN(this.y2)) &&
+ ((this.y1 = t), (this.y2 = t)),
+ t < this.y1 && (this.y1 = t),
+ t > this.y2 && (this.y2 = t));
+ }),
+ (_.prototype.addX = function (e) {
+ this.addPoint(e, null);
+ }),
+ (_.prototype.addY = function (e) {
+ this.addPoint(null, e);
+ }),
+ (_.prototype.addBezier = function (e, t, n, r, i, a, o, s) {
+ var l = [e, t],
+ u = [n, r],
+ c = [i, a],
+ f = [o, s];
+ this.addPoint(e, t), this.addPoint(o, s);
+ for (var d = 0; d <= 1; d++) {
+ var h = 6 * l[d] - 12 * u[d] + 6 * c[d],
+ p = -3 * l[d] + 9 * u[d] - 9 * c[d] + 3 * f[d],
+ v = 3 * u[d] - 3 * l[d];
+ if (0 !== p) {
+ var m = Math.pow(h, 2) - 4 * v * p;
+ if (!(m < 0)) {
+ var g = (-h + Math.sqrt(m)) / (2 * p);
+ 0 < g &&
+ g < 1 &&
+ (0 === d && this.addX(E(l[d], u[d], c[d], f[d], g)),
+ 1 === d && this.addY(E(l[d], u[d], c[d], f[d], g)));
+ var A = (-h - Math.sqrt(m)) / (2 * p);
+ 0 < A &&
+ A < 1 &&
+ (0 === d && this.addX(E(l[d], u[d], c[d], f[d], A)),
+ 1 === d && this.addY(E(l[d], u[d], c[d], f[d], A)));
+ }
+ } else {
+ if (0 === h) continue;
+ var y = -v / h;
+ 0 < y &&
+ y < 1 &&
+ (0 === d && this.addX(E(l[d], u[d], c[d], f[d], y)),
+ 1 === d && this.addY(E(l[d], u[d], c[d], f[d], y)));
+ }
+ }
+ }),
+ (_.prototype.addQuad = function (e, t, n, r, i, a) {
+ var o = e + (2 / 3) * (n - e),
+ s = t + (2 / 3) * (r - t),
+ l = o + (1 / 3) * (i - e),
+ u = s + (1 / 3) * (a - t);
+ this.addBezier(e, t, o, s, l, u, i, a);
+ }),
+ (C.prototype.moveTo = function (e, t) {
+ this.commands.push({ type: "M", x: e, y: t });
+ }),
+ (C.prototype.lineTo = function (e, t) {
+ this.commands.push({ type: "L", x: e, y: t });
+ }),
+ (C.prototype.curveTo = C.prototype.bezierCurveTo =
+ function (e, t, n, r, i, a) {
+ this.commands.push({
+ type: "C",
+ x1: e,
+ y1: t,
+ x2: n,
+ y2: r,
+ x: i,
+ y: a,
+ });
+ }),
+ (C.prototype.quadTo = C.prototype.quadraticCurveTo =
+ function (e, t, n, r) {
+ this.commands.push({ type: "Q", x1: e, y1: t, x: n, y: r });
+ }),
+ (C.prototype.close = C.prototype.closePath =
+ function () {
+ this.commands.push({ type: "Z" });
+ }),
+ (C.prototype.extend = function (e) {
+ if (e.commands) e = e.commands;
+ else if (e instanceof _) {
+ var t = e;
+ return (
+ this.moveTo(t.x1, t.y1),
+ this.lineTo(t.x2, t.y1),
+ this.lineTo(t.x2, t.y2),
+ this.lineTo(t.x1, t.y2),
+ void this.close()
+ );
+ }
+ Array.prototype.push.apply(this.commands, e);
+ }),
+ (C.prototype.getBoundingBox = function () {
+ for (
+ var e = new _(), t = 0, n = 0, r = 0, i = 0, a = 0;
+ a < this.commands.length;
+ a++
+ ) {
+ var o = this.commands[a];
+ switch (o.type) {
+ case "M":
+ e.addPoint(o.x, o.y), (t = r = o.x), (n = i = o.y);
+ break;
+ case "L":
+ e.addPoint(o.x, o.y), (r = o.x), (i = o.y);
+ break;
+ case "Q":
+ e.addQuad(r, i, o.x1, o.y1, o.x, o.y),
+ (r = o.x),
+ (i = o.y);
+ break;
+ case "C":
+ e.addBezier(r, i, o.x1, o.y1, o.x2, o.y2, o.x, o.y),
+ (r = o.x),
+ (i = o.y);
+ break;
+ case "Z":
+ (r = t), (i = n);
+ break;
+ default:
+ throw new Error("Unexpected path command " + o.type);
+ }
+ }
+ return e.isEmpty() && e.addPoint(0, 0), e;
+ }),
+ (C.prototype.draw = function (e) {
+ e.beginPath();
+ for (var t = 0; t < this.commands.length; t += 1) {
+ var n = this.commands[t];
+ "M" === n.type
+ ? e.moveTo(n.x, n.y)
+ : "L" === n.type
+ ? e.lineTo(n.x, n.y)
+ : "C" === n.type
+ ? e.bezierCurveTo(n.x1, n.y1, n.x2, n.y2, n.x, n.y)
+ : "Q" === n.type
+ ? e.quadraticCurveTo(n.x1, n.y1, n.x, n.y)
+ : "Z" === n.type && e.closePath();
+ }
+ this.fill && ((e.fillStyle = this.fill), e.fill()),
+ this.stroke &&
+ ((e.strokeStyle = this.stroke),
+ (e.lineWidth = this.strokeWidth),
+ e.stroke());
+ }),
+ (C.prototype.toPathData = function (e) {
+ function t(t) {
+ return Math.round(t) === t
+ ? "" + Math.round(t)
+ : t.toFixed(e);
+ }
+ function n() {
+ for (
+ var e = arguments, n = "", r = 0;
+ r < arguments.length;
+ r += 1
+ ) {
+ var i = e[r];
+ i >= 0 && r > 0 && (n += " "), (n += t(i));
+ }
+ return n;
+ }
+ e = void 0 !== e ? e : 2;
+ for (var r = "", i = 0; i < this.commands.length; i += 1) {
+ var a = this.commands[i];
+ "M" === a.type
+ ? (r += "M" + n(a.x, a.y))
+ : "L" === a.type
+ ? (r += "L" + n(a.x, a.y))
+ : "C" === a.type
+ ? (r += "C" + n(a.x1, a.y1, a.x2, a.y2, a.x, a.y))
+ : "Q" === a.type
+ ? (r += "Q" + n(a.x1, a.y1, a.x, a.y))
+ : "Z" === a.type && (r += "Z");
+ }
+ return r;
+ }),
+ (C.prototype.toSVG = function (e) {
+ var t = '")
+ );
+ }),
+ (C.prototype.toDOMElement = function (e) {
+ var t = this.toPathData(e),
+ n = document.createElementNS(
+ "http://www.w3.org/2000/svg",
+ "path"
+ );
+ return n.setAttribute("d", t), n;
+ });
+ var M = { fail: w, argument: T, assert: T },
+ I = 2147483648,
+ k = {},
+ R = {},
+ B = {};
+ function P(e) {
+ return function () {
+ return e;
+ };
+ }
+ (R.BYTE = function (e) {
+ return (
+ M.argument(
+ e >= 0 && e <= 255,
+ "Byte value should be between 0 and 255."
+ ),
+ [e]
+ );
+ }),
+ (B.BYTE = P(1)),
+ (R.CHAR = function (e) {
+ return [e.charCodeAt(0)];
+ }),
+ (B.CHAR = P(1)),
+ (R.CHARARRAY = function (e) {
+ "undefined" === typeof e &&
+ ((e = ""),
+ console.warn(
+ "Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."
+ ));
+ for (var t = [], n = 0; n < e.length; n += 1)
+ t[n] = e.charCodeAt(n);
+ return t;
+ }),
+ (B.CHARARRAY = function (e) {
+ return "undefined" === typeof e ? 0 : e.length;
+ }),
+ (R.USHORT = function (e) {
+ return [(e >> 8) & 255, 255 & e];
+ }),
+ (B.USHORT = P(2)),
+ (R.SHORT = function (e) {
+ return (
+ e >= 32768 && (e = -(65536 - e)), [(e >> 8) & 255, 255 & e]
+ );
+ }),
+ (B.SHORT = P(2)),
+ (R.UINT24 = function (e) {
+ return [(e >> 16) & 255, (e >> 8) & 255, 255 & e];
+ }),
+ (B.UINT24 = P(3)),
+ (R.ULONG = function (e) {
+ return [
+ (e >> 24) & 255,
+ (e >> 16) & 255,
+ (e >> 8) & 255,
+ 255 & e,
+ ];
+ }),
+ (B.ULONG = P(4)),
+ (R.LONG = function (e) {
+ return (
+ e >= I && (e = -(2 * I - e)),
+ [(e >> 24) & 255, (e >> 16) & 255, (e >> 8) & 255, 255 & e]
+ );
+ }),
+ (B.LONG = P(4)),
+ (R.FIXED = R.ULONG),
+ (B.FIXED = B.ULONG),
+ (R.FWORD = R.SHORT),
+ (B.FWORD = B.SHORT),
+ (R.UFWORD = R.USHORT),
+ (B.UFWORD = B.USHORT),
+ (R.LONGDATETIME = function (e) {
+ return [
+ 0,
+ 0,
+ 0,
+ 0,
+ (e >> 24) & 255,
+ (e >> 16) & 255,
+ (e >> 8) & 255,
+ 255 & e,
+ ];
+ }),
+ (B.LONGDATETIME = P(8)),
+ (R.TAG = function (e) {
+ return (
+ M.argument(
+ 4 === e.length,
+ "Tag should be exactly 4 ASCII characters."
+ ),
+ [
+ e.charCodeAt(0),
+ e.charCodeAt(1),
+ e.charCodeAt(2),
+ e.charCodeAt(3),
+ ]
+ );
+ }),
+ (B.TAG = P(4)),
+ (R.Card8 = R.BYTE),
+ (B.Card8 = B.BYTE),
+ (R.Card16 = R.USHORT),
+ (B.Card16 = B.USHORT),
+ (R.OffSize = R.BYTE),
+ (B.OffSize = B.BYTE),
+ (R.SID = R.USHORT),
+ (B.SID = B.USHORT),
+ (R.NUMBER = function (e) {
+ return e >= -107 && e <= 107
+ ? [e + 139]
+ : e >= 108 && e <= 1131
+ ? [247 + ((e -= 108) >> 8), 255 & e]
+ : e >= -1131 && e <= -108
+ ? [251 + ((e = -e - 108) >> 8), 255 & e]
+ : e >= -32768 && e <= 32767
+ ? R.NUMBER16(e)
+ : R.NUMBER32(e);
+ }),
+ (B.NUMBER = function (e) {
+ return R.NUMBER(e).length;
+ }),
+ (R.NUMBER16 = function (e) {
+ return [28, (e >> 8) & 255, 255 & e];
+ }),
+ (B.NUMBER16 = P(3)),
+ (R.NUMBER32 = function (e) {
+ return [
+ 29,
+ (e >> 24) & 255,
+ (e >> 16) & 255,
+ (e >> 8) & 255,
+ 255 & e,
+ ];
+ }),
+ (B.NUMBER32 = P(5)),
+ (R.REAL = function (e) {
+ var t = e.toString(),
+ n = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(t);
+ if (n) {
+ var r = parseFloat("1e" + ((n[2] ? +n[2] : 0) + n[1].length));
+ t = (Math.round(e * r) / r).toString();
+ }
+ for (var i = "", a = 0, o = t.length; a < o; a += 1) {
+ var s = t[a];
+ i +=
+ "e" === s
+ ? "-" === t[++a]
+ ? "c"
+ : "b"
+ : "." === s
+ ? "a"
+ : "-" === s
+ ? "e"
+ : s;
+ }
+ for (
+ var l = [30],
+ u = 0,
+ c = (i += 1 & i.length ? "f" : "ff").length;
+ u < c;
+ u += 2
+ )
+ l.push(parseInt(i.substr(u, 2), 16));
+ return l;
+ }),
+ (B.REAL = function (e) {
+ return R.REAL(e).length;
+ }),
+ (R.NAME = R.CHARARRAY),
+ (B.NAME = B.CHARARRAY),
+ (R.STRING = R.CHARARRAY),
+ (B.STRING = B.CHARARRAY),
+ (k.UTF8 = function (e, t, n) {
+ for (var r = [], i = n, a = 0; a < i; a++, t += 1)
+ r[a] = e.getUint8(t);
+ return String.fromCharCode.apply(null, r);
+ }),
+ (k.UTF16 = function (e, t, n) {
+ for (var r = [], i = n / 2, a = 0; a < i; a++, t += 2)
+ r[a] = e.getUint16(t);
+ return String.fromCharCode.apply(null, r);
+ }),
+ (R.UTF16 = function (e) {
+ for (var t = [], n = 0; n < e.length; n += 1) {
+ var r = e.charCodeAt(n);
+ (t[t.length] = (r >> 8) & 255), (t[t.length] = 255 & r);
+ }
+ return t;
+ }),
+ (B.UTF16 = function (e) {
+ return 2 * e.length;
+ });
+ var L = {
+ "x-mac-croatian":
+ "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u03a9\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026 \xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\uf8ff\xa9\u2044\u20ac\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7",
+ "x-mac-cyrillic":
+ "\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e",
+ "x-mac-gaelic":
+ "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u1e02\xb1\u2264\u2265\u1e03\u010a\u010b\u1e0a\u1e0b\u1e1e\u1e1f\u0120\u0121\u1e40\xe6\xf8\u1e41\u1e56\u1e57\u027c\u0192\u017f\u1e60\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\u1e61\u1e9b\xff\u0178\u1e6a\u20ac\u2039\u203a\u0176\u0177\u1e6b\xb7\u1ef2\u1ef3\u204a\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\u2663\xd2\xda\xdb\xd9\u0131\xdd\xfd\u0174\u0175\u1e84\u1e85\u1e80\u1e81\u1e82\u1e83",
+ "x-mac-greek":
+ "\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\u20ac\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\xb7\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026 \u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\xad",
+ "x-mac-icelandic":
+ "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7",
+ "x-mac-inuit":
+ "\u1403\u1404\u1405\u1406\u140a\u140b\u1431\u1432\u1433\u1434\u1438\u1439\u1449\u144e\u144f\u1450\u1451\u1455\u1456\u1466\u146d\u146e\u146f\u1470\u1472\u1473\u1483\u148b\u148c\u148d\u148e\u1490\u1491\xb0\u14a1\u14a5\u14a6\u2022\xb6\u14a7\xae\xa9\u2122\u14a8\u14aa\u14ab\u14bb\u14c2\u14c3\u14c4\u14c5\u14c7\u14c8\u14d0\u14ef\u14f0\u14f1\u14f2\u14f4\u14f5\u1505\u14d5\u14d6\u14d7\u14d8\u14da\u14db\u14ea\u1528\u1529\u152a\u152b\u152d\u2026 \u152e\u153e\u1555\u1556\u1557\u2013\u2014\u201c\u201d\u2018\u2019\u1558\u1559\u155a\u155d\u1546\u1547\u1548\u1549\u154b\u154c\u1550\u157f\u1580\u1581\u1582\u1583\u1584\u1585\u158f\u1590\u1591\u1592\u1593\u1594\u1595\u1671\u1672\u1673\u1674\u1675\u1676\u1596\u15a0\u15a1\u15a2\u15a3\u15a4\u15a5\u15a6\u157c\u0141\u0142",
+ "x-mac-ce":
+ "\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026 \u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7",
+ macintosh:
+ "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7",
+ "x-mac-romanian":
+ "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u0218\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\u0103\u0219\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\u20ac\u2039\u203a\u021a\u021b\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7",
+ "x-mac-turkish":
+ "\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u03a9\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026 \xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\uf8ff\xd2\xda\xdb\xd9\uf8a0\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7",
+ };
+ k.MACSTRING = function (e, t, n, r) {
+ var i = L[r];
+ if (void 0 !== i) {
+ for (var a = "", o = 0; o < n; o++) {
+ var s = e.getUint8(t + o);
+ a += s <= 127 ? String.fromCharCode(s) : i[127 & s];
+ }
+ return a;
+ }
+ };
+ var D,
+ U = "function" === typeof WeakMap && new WeakMap();
+ function F(e) {
+ return e >= -128 && e <= 127;
+ }
+ function O(e, t, n) {
+ for (var r = 0, i = e.length; t < i && r < 64 && 0 === e[t]; )
+ ++t, ++r;
+ return n.push(128 | (r - 1)), t;
+ }
+ function N(e, t, n) {
+ for (var r = 0, i = e.length, a = t; a < i && r < 64; ) {
+ var o = e[a];
+ if (!F(o)) break;
+ if (0 === o && a + 1 < i && 0 === e[a + 1]) break;
+ ++a, ++r;
+ }
+ n.push(r - 1);
+ for (var s = t; s < a; ++s) n.push((e[s] + 256) & 255);
+ return a;
+ }
+ function G(e, t, n) {
+ for (var r = 0, i = e.length, a = t; a < i && r < 64; ) {
+ var o = e[a];
+ if (0 === o) break;
+ if (F(o) && a + 1 < i && F(e[a + 1])) break;
+ ++a, ++r;
+ }
+ n.push(64 | (r - 1));
+ for (var s = t; s < a; ++s) {
+ var l = e[s];
+ n.push(((l + 65536) >> 8) & 255, (l + 256) & 255);
+ }
+ return a;
+ }
+ (R.MACSTRING = function (e, t) {
+ var n = (function (e) {
+ if (!D) for (var t in ((D = {}), L)) D[t] = new String(t);
+ var n = D[e];
+ if (void 0 !== n) {
+ if (U) {
+ var r = U.get(n);
+ if (void 0 !== r) return r;
+ }
+ var i = L[e];
+ if (void 0 !== i) {
+ for (var a = {}, o = 0; o < i.length; o++)
+ a[i.charCodeAt(o)] = o + 128;
+ return U && U.set(n, a), a;
+ }
+ }
+ })(t);
+ if (void 0 !== n) {
+ for (var r = [], i = 0; i < e.length; i++) {
+ var a = e.charCodeAt(i);
+ if (a >= 128 && void 0 === (a = n[a])) return;
+ r[i] = a;
+ }
+ return r;
+ }
+ }),
+ (B.MACSTRING = function (e, t) {
+ var n = R.MACSTRING(e, t);
+ return void 0 !== n ? n.length : 0;
+ }),
+ (R.VARDELTAS = function (e) {
+ for (var t = 0, n = []; t < e.length; ) {
+ var r = e[t];
+ t =
+ 0 === r
+ ? O(e, t, n)
+ : r >= -128 && r <= 127
+ ? N(e, t, n)
+ : G(e, t, n);
+ }
+ return n;
+ }),
+ (R.INDEX = function (e) {
+ for (var t = 1, n = [t], r = [], i = 0; i < e.length; i += 1) {
+ var a = R.OBJECT(e[i]);
+ Array.prototype.push.apply(r, a), (t += a.length), n.push(t);
+ }
+ if (0 === r.length) return [0, 0];
+ for (
+ var o = [],
+ s = (1 + Math.floor(Math.log(t) / Math.log(2)) / 8) | 0,
+ l = [void 0, R.BYTE, R.USHORT, R.UINT24, R.ULONG][s],
+ u = 0;
+ u < n.length;
+ u += 1
+ ) {
+ var c = l(n[u]);
+ Array.prototype.push.apply(o, c);
+ }
+ return Array.prototype.concat(
+ R.Card16(e.length),
+ R.OffSize(s),
+ o,
+ r
+ );
+ }),
+ (B.INDEX = function (e) {
+ return R.INDEX(e).length;
+ }),
+ (R.DICT = function (e) {
+ for (
+ var t = [], n = Object.keys(e), r = n.length, i = 0;
+ i < r;
+ i += 1
+ ) {
+ var a = parseInt(n[i], 0),
+ o = e[a];
+ t = (t = t.concat(R.OPERAND(o.value, o.type))).concat(
+ R.OPERATOR(a)
+ );
+ }
+ return t;
+ }),
+ (B.DICT = function (e) {
+ return R.DICT(e).length;
+ }),
+ (R.OPERATOR = function (e) {
+ return e < 1200 ? [e] : [12, e - 1200];
+ }),
+ (R.OPERAND = function (e, t) {
+ var n = [];
+ if (Array.isArray(t))
+ for (var r = 0; r < t.length; r += 1)
+ M.argument(
+ e.length === t.length,
+ "Not enough arguments given for type" + t
+ ),
+ (n = n.concat(R.OPERAND(e[r], t[r])));
+ else if ("SID" === t) n = n.concat(R.NUMBER(e));
+ else if ("offset" === t) n = n.concat(R.NUMBER32(e));
+ else if ("number" === t) n = n.concat(R.NUMBER(e));
+ else {
+ if ("real" !== t)
+ throw new Error("Unknown operand type " + t);
+ n = n.concat(R.REAL(e));
+ }
+ return n;
+ }),
+ (R.OP = R.BYTE),
+ (B.OP = B.BYTE);
+ var Z = "function" === typeof WeakMap && new WeakMap();
+ function z(e, t, n) {
+ if (
+ t.length &&
+ ("coverageFormat" !== t[0].name || 1 === t[0].value)
+ )
+ for (var r = 0; r < t.length; r += 1) {
+ var i = t[r];
+ this[i.name] = i.value;
+ }
+ if (((this.tableName = e), (this.fields = t), n))
+ for (var a = Object.keys(n), o = 0; o < a.length; o += 1) {
+ var s = a[o],
+ l = n[s];
+ void 0 !== this[s] && (this[s] = l);
+ }
+ }
+ function Q(e, t, n) {
+ void 0 === n && (n = t.length);
+ var r = new Array(t.length + 1);
+ r[0] = { name: e + "Count", type: "USHORT", value: n };
+ for (var i = 0; i < t.length; i++)
+ r[i + 1] = { name: e + i, type: "USHORT", value: t[i] };
+ return r;
+ }
+ function H(e, t, n) {
+ var r = t.length,
+ i = new Array(r + 1);
+ i[0] = { name: e + "Count", type: "USHORT", value: r };
+ for (var a = 0; a < r; a++)
+ i[a + 1] = { name: e + a, type: "TABLE", value: n(t[a], a) };
+ return i;
+ }
+ function V(e, t, n) {
+ var r = t.length,
+ i = [];
+ i[0] = { name: e + "Count", type: "USHORT", value: r };
+ for (var a = 0; a < r; a++) i = i.concat(n(t[a], a));
+ return i;
+ }
+ function j(e) {
+ 1 === e.format
+ ? z.call(
+ this,
+ "coverageTable",
+ [
+ { name: "coverageFormat", type: "USHORT", value: 1 },
+ ].concat(Q("glyph", e.glyphs))
+ )
+ : 2 === e.format
+ ? z.call(
+ this,
+ "coverageTable",
+ [
+ { name: "coverageFormat", type: "USHORT", value: 2 },
+ ].concat(
+ V("rangeRecord", e.ranges, function (e) {
+ return [
+ {
+ name: "startGlyphID",
+ type: "USHORT",
+ value: e.start,
+ },
+ { name: "endGlyphID", type: "USHORT", value: e.end },
+ {
+ name: "startCoverageIndex",
+ type: "USHORT",
+ value: e.index,
+ },
+ ];
+ })
+ )
+ )
+ : M.assert(!1, "Coverage format must be 1 or 2.");
+ }
+ function W(e) {
+ z.call(
+ this,
+ "scriptListTable",
+ V("scriptRecord", e, function (e, t) {
+ var n = e.script,
+ r = n.defaultLangSys;
+ return (
+ M.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 z(
+ "scriptTable",
+ [
+ {
+ name: "defaultLangSys",
+ type: "TABLE",
+ value: new z(
+ "defaultLangSys",
+ [
+ {
+ name: "lookupOrder",
+ type: "USHORT",
+ value: 0,
+ },
+ {
+ name: "reqFeatureIndex",
+ type: "USHORT",
+ value: r.reqFeatureIndex,
+ },
+ ].concat(Q("featureIndex", r.featureIndexes))
+ ),
+ },
+ ].concat(
+ V("langSys", n.langSysRecords, function (e, t) {
+ var n = e.langSys;
+ return [
+ {
+ name: "langSysTag" + t,
+ type: "TAG",
+ value: e.tag,
+ },
+ {
+ name: "langSys" + t,
+ type: "TABLE",
+ value: new z(
+ "langSys",
+ [
+ {
+ name: "lookupOrder",
+ type: "USHORT",
+ value: 0,
+ },
+ {
+ name: "reqFeatureIndex",
+ type: "USHORT",
+ value: n.reqFeatureIndex,
+ },
+ ].concat(
+ Q("featureIndex", n.featureIndexes)
+ )
+ ),
+ },
+ ];
+ })
+ )
+ ),
+ },
+ ]
+ );
+ })
+ );
+ }
+ function X(e) {
+ z.call(
+ this,
+ "featureListTable",
+ V("featureRecord", e, function (e, t) {
+ var n = e.feature;
+ return [
+ { name: "featureTag" + t, type: "TAG", value: e.tag },
+ {
+ name: "feature" + t,
+ type: "TABLE",
+ value: new z(
+ "featureTable",
+ [
+ {
+ name: "featureParams",
+ type: "USHORT",
+ value: n.featureParams,
+ },
+ ].concat(Q("lookupListIndex", n.lookupListIndexes))
+ ),
+ },
+ ];
+ })
+ );
+ }
+ function Y(e, t) {
+ z.call(
+ this,
+ "lookupListTable",
+ H("lookup", e, function (e) {
+ var n = t[e.lookupType];
+ return (
+ M.assert(
+ !!n,
+ "Unable to write GSUB lookup type " +
+ e.lookupType +
+ " tables."
+ ),
+ new z(
+ "lookupTable",
+ [
+ {
+ name: "lookupType",
+ type: "USHORT",
+ value: e.lookupType,
+ },
+ {
+ name: "lookupFlag",
+ type: "USHORT",
+ value: e.lookupFlag,
+ },
+ ].concat(H("subtable", e.subtables, n))
+ )
+ );
+ })
+ );
+ }
+ (R.CHARSTRING = function (e) {
+ if (Z) {
+ var t = Z.get(e);
+ if (void 0 !== t) return t;
+ }
+ for (var n = [], r = e.length, i = 0; i < r; i += 1) {
+ var a = e[i];
+ n = n.concat(R[a.type](a.value));
+ }
+ return Z && Z.set(e, n), n;
+ }),
+ (B.CHARSTRING = function (e) {
+ return R.CHARSTRING(e).length;
+ }),
+ (R.OBJECT = function (e) {
+ var t = R[e.type];
+ return (
+ M.argument(
+ void 0 !== t,
+ "No encoding function for type " + e.type
+ ),
+ t(e.value)
+ );
+ }),
+ (B.OBJECT = function (e) {
+ var t = B[e.type];
+ return (
+ M.argument(
+ void 0 !== t,
+ "No sizeOf function for type " + e.type
+ ),
+ t(e.value)
+ );
+ }),
+ (R.TABLE = function (e) {
+ for (
+ var t = [], n = e.fields.length, r = [], i = [], a = 0;
+ a < n;
+ a += 1
+ ) {
+ var o = e.fields[a],
+ s = R[o.type];
+ M.argument(
+ void 0 !== s,
+ "No encoding function for field type " +
+ o.type +
+ " (" +
+ o.name +
+ ")"
+ );
+ var l = e[o.name];
+ void 0 === l && (l = o.value);
+ var u = s(l);
+ "TABLE" === o.type
+ ? (i.push(t.length), (t = t.concat([0, 0])), r.push(u))
+ : (t = t.concat(u));
+ }
+ for (var c = 0; c < r.length; c += 1) {
+ var f = i[c],
+ d = t.length;
+ M.argument(d < 65536, "Table " + e.tableName + " too big."),
+ (t[f] = d >> 8),
+ (t[f + 1] = 255 & d),
+ (t = t.concat(r[c]));
+ }
+ return t;
+ }),
+ (B.TABLE = function (e) {
+ for (var t = 0, n = e.fields.length, r = 0; r < n; r += 1) {
+ var i = e.fields[r],
+ a = B[i.type];
+ M.argument(
+ void 0 !== a,
+ "No sizeOf function for field type " +
+ i.type +
+ " (" +
+ i.name +
+ ")"
+ );
+ var o = e[i.name];
+ void 0 === o && (o = i.value),
+ (t += a(o)),
+ "TABLE" === i.type && (t += 2);
+ }
+ return t;
+ }),
+ (R.RECORD = R.TABLE),
+ (B.RECORD = B.TABLE),
+ (R.LITERAL = function (e) {
+ return e;
+ }),
+ (B.LITERAL = function (e) {
+ return e.length;
+ }),
+ (z.prototype.encode = function () {
+ return R.TABLE(this);
+ }),
+ (z.prototype.sizeOf = function () {
+ return B.TABLE(this);
+ }),
+ (j.prototype = Object.create(z.prototype)),
+ (j.prototype.constructor = j),
+ (W.prototype = Object.create(z.prototype)),
+ (W.prototype.constructor = W),
+ (X.prototype = Object.create(z.prototype)),
+ (X.prototype.constructor = X),
+ (Y.prototype = Object.create(z.prototype)),
+ (Y.prototype.constructor = Y);
+ var q = {
+ Table: z,
+ Record: z,
+ Coverage: j,
+ ScriptList: W,
+ FeatureList: X,
+ LookupList: Y,
+ ushortList: Q,
+ tableList: H,
+ recordList: V,
+ };
+ function J(e, t) {
+ return e.getUint8(t);
+ }
+ function K(e, t) {
+ return e.getUint16(t, !1);
+ }
+ function $(e, t) {
+ return e.getUint32(t, !1);
+ }
+ function ee(e, t) {
+ return e.getInt16(t, !1) + e.getUint16(t + 2, !1) / 65535;
+ }
+ var te = {
+ byte: 1,
+ uShort: 2,
+ short: 2,
+ uLong: 4,
+ fixed: 4,
+ longDateTime: 8,
+ tag: 4,
+ };
+ function ne(e, t) {
+ (this.data = e), (this.offset = t), (this.relativeOffset = 0);
+ }
+ (ne.prototype.parseByte = function () {
+ var e = this.data.getUint8(this.offset + this.relativeOffset);
+ return (this.relativeOffset += 1), e;
+ }),
+ (ne.prototype.parseChar = function () {
+ var e = this.data.getInt8(this.offset + this.relativeOffset);
+ return (this.relativeOffset += 1), e;
+ }),
+ (ne.prototype.parseCard8 = ne.prototype.parseByte),
+ (ne.prototype.parseUShort = function () {
+ var e = this.data.getUint16(this.offset + this.relativeOffset);
+ return (this.relativeOffset += 2), e;
+ }),
+ (ne.prototype.parseCard16 = ne.prototype.parseUShort),
+ (ne.prototype.parseSID = ne.prototype.parseUShort),
+ (ne.prototype.parseOffset16 = ne.prototype.parseUShort),
+ (ne.prototype.parseShort = function () {
+ var e = this.data.getInt16(this.offset + this.relativeOffset);
+ return (this.relativeOffset += 2), e;
+ }),
+ (ne.prototype.parseF2Dot14 = function () {
+ var e =
+ this.data.getInt16(this.offset + this.relativeOffset) / 16384;
+ return (this.relativeOffset += 2), e;
+ }),
+ (ne.prototype.parseULong = function () {
+ var e = $(this.data, this.offset + this.relativeOffset);
+ return (this.relativeOffset += 4), e;
+ }),
+ (ne.prototype.parseOffset32 = ne.prototype.parseULong),
+ (ne.prototype.parseFixed = function () {
+ var e = ee(this.data, this.offset + this.relativeOffset);
+ return (this.relativeOffset += 4), e;
+ }),
+ (ne.prototype.parseString = function (e) {
+ var t = this.data,
+ n = this.offset + this.relativeOffset,
+ r = "";
+ this.relativeOffset += e;
+ for (var i = 0; i < e; i++)
+ r += String.fromCharCode(t.getUint8(n + i));
+ return r;
+ }),
+ (ne.prototype.parseTag = function () {
+ return this.parseString(4);
+ }),
+ (ne.prototype.parseLongDateTime = function () {
+ var e = $(this.data, this.offset + this.relativeOffset + 4);
+ return (e -= 2082844800), (this.relativeOffset += 8), e;
+ }),
+ (ne.prototype.parseVersion = function (e) {
+ var t = K(this.data, this.offset + this.relativeOffset),
+ n = K(this.data, this.offset + this.relativeOffset + 2);
+ return (
+ (this.relativeOffset += 4),
+ void 0 === e && (e = 4096),
+ t + n / e / 10
+ );
+ }),
+ (ne.prototype.skip = function (e, t) {
+ void 0 === t && (t = 1), (this.relativeOffset += te[e] * t);
+ }),
+ (ne.prototype.parseULongList = function (e) {
+ void 0 === e && (e = this.parseULong());
+ for (
+ var t = new Array(e),
+ n = this.data,
+ r = this.offset + this.relativeOffset,
+ i = 0;
+ i < e;
+ i++
+ )
+ (t[i] = n.getUint32(r)), (r += 4);
+ return (this.relativeOffset += 4 * e), t;
+ }),
+ (ne.prototype.parseOffset16List = ne.prototype.parseUShortList =
+ function (e) {
+ void 0 === e && (e = this.parseUShort());
+ for (
+ var t = new Array(e),
+ n = this.data,
+ r = this.offset + this.relativeOffset,
+ i = 0;
+ i < e;
+ i++
+ )
+ (t[i] = n.getUint16(r)), (r += 2);
+ return (this.relativeOffset += 2 * e), t;
+ }),
+ (ne.prototype.parseShortList = function (e) {
+ for (
+ var t = new Array(e),
+ n = this.data,
+ r = this.offset + this.relativeOffset,
+ i = 0;
+ i < e;
+ i++
+ )
+ (t[i] = n.getInt16(r)), (r += 2);
+ return (this.relativeOffset += 2 * e), t;
+ }),
+ (ne.prototype.parseByteList = function (e) {
+ for (
+ var t = new Array(e),
+ n = this.data,
+ r = this.offset + this.relativeOffset,
+ i = 0;
+ i < e;
+ i++
+ )
+ t[i] = n.getUint8(r++);
+ return (this.relativeOffset += e), t;
+ }),
+ (ne.prototype.parseList = function (e, t) {
+ t || ((t = e), (e = this.parseUShort()));
+ for (var n = new Array(e), r = 0; r < e; r++)
+ n[r] = t.call(this);
+ return n;
+ }),
+ (ne.prototype.parseList32 = function (e, t) {
+ t || ((t = e), (e = this.parseULong()));
+ for (var n = new Array(e), r = 0; r < e; r++)
+ n[r] = t.call(this);
+ return n;
+ }),
+ (ne.prototype.parseRecordList = function (e, t) {
+ t || ((t = e), (e = this.parseUShort()));
+ for (
+ var n = new Array(e), r = Object.keys(t), i = 0;
+ i < e;
+ i++
+ ) {
+ for (var a = {}, o = 0; o < r.length; o++) {
+ var s = r[o],
+ l = t[s];
+ a[s] = l.call(this);
+ }
+ n[i] = a;
+ }
+ return n;
+ }),
+ (ne.prototype.parseRecordList32 = function (e, t) {
+ t || ((t = e), (e = this.parseULong()));
+ for (
+ var n = new Array(e), r = Object.keys(t), i = 0;
+ i < e;
+ i++
+ ) {
+ for (var a = {}, o = 0; o < r.length; o++) {
+ var s = r[o],
+ l = t[s];
+ a[s] = l.call(this);
+ }
+ n[i] = a;
+ }
+ return n;
+ }),
+ (ne.prototype.parseStruct = function (e) {
+ if ("function" === typeof e) return e.call(this);
+ for (var t = Object.keys(e), n = {}, r = 0; r < t.length; r++) {
+ var i = t[r],
+ a = e[i];
+ n[i] = a.call(this);
+ }
+ return n;
+ }),
+ (ne.prototype.parseValueRecord = function (e) {
+ if ((void 0 === e && (e = this.parseUShort()), 0 !== e)) {
+ var t = {};
+ return (
+ 1 & e && (t.xPlacement = this.parseShort()),
+ 2 & e && (t.yPlacement = this.parseShort()),
+ 4 & e && (t.xAdvance = this.parseShort()),
+ 8 & e && (t.yAdvance = this.parseShort()),
+ 16 & e && ((t.xPlaDevice = void 0), this.parseShort()),
+ 32 & e && ((t.yPlaDevice = void 0), this.parseShort()),
+ 64 & e && ((t.xAdvDevice = void 0), this.parseShort()),
+ 128 & e && ((t.yAdvDevice = void 0), this.parseShort()),
+ t
+ );
+ }
+ }),
+ (ne.prototype.parseValueRecordList = function () {
+ for (
+ var e = this.parseUShort(),
+ t = this.parseUShort(),
+ n = new Array(t),
+ r = 0;
+ r < t;
+ r++
+ )
+ n[r] = this.parseValueRecord(e);
+ return n;
+ }),
+ (ne.prototype.parsePointer = function (e) {
+ var t = this.parseOffset16();
+ if (t > 0)
+ return new ne(this.data, this.offset + t).parseStruct(e);
+ }),
+ (ne.prototype.parsePointer32 = function (e) {
+ var t = this.parseOffset32();
+ if (t > 0)
+ return new ne(this.data, this.offset + t).parseStruct(e);
+ }),
+ (ne.prototype.parseListOfLists = function (e) {
+ for (
+ var t = this.parseOffset16List(),
+ n = t.length,
+ r = this.relativeOffset,
+ i = new Array(n),
+ a = 0;
+ a < n;
+ a++
+ ) {
+ var o = t[a];
+ if (0 !== o)
+ if (((this.relativeOffset = o), e)) {
+ for (
+ var s = this.parseOffset16List(),
+ l = new Array(s.length),
+ u = 0;
+ u < s.length;
+ u++
+ )
+ (this.relativeOffset = o + s[u]), (l[u] = e.call(this));
+ i[a] = l;
+ } else i[a] = this.parseUShortList();
+ else i[a] = void 0;
+ }
+ return (this.relativeOffset = r), i;
+ }),
+ (ne.prototype.parseCoverage = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort(),
+ n = this.parseUShort();
+ if (1 === t)
+ return { format: 1, glyphs: this.parseUShortList(n) };
+ if (2 === t) {
+ for (var r = new Array(n), i = 0; i < n; i++)
+ r[i] = {
+ start: this.parseUShort(),
+ end: this.parseUShort(),
+ index: this.parseUShort(),
+ };
+ return { format: 2, ranges: r };
+ }
+ throw new Error(
+ "0x" + e.toString(16) + ": Coverage format must be 1 or 2."
+ );
+ }),
+ (ne.prototype.parseClassDef = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort();
+ if (1 === t)
+ return {
+ format: 1,
+ startGlyph: this.parseUShort(),
+ classes: this.parseUShortList(),
+ };
+ if (2 === t)
+ return {
+ format: 2,
+ ranges: this.parseRecordList({
+ start: ne.uShort,
+ end: ne.uShort,
+ classId: ne.uShort,
+ }),
+ };
+ throw new Error(
+ "0x" + e.toString(16) + ": ClassDef format must be 1 or 2."
+ );
+ }),
+ (ne.list = function (e, t) {
+ return function () {
+ return this.parseList(e, t);
+ };
+ }),
+ (ne.list32 = function (e, t) {
+ return function () {
+ return this.parseList32(e, t);
+ };
+ }),
+ (ne.recordList = function (e, t) {
+ return function () {
+ return this.parseRecordList(e, t);
+ };
+ }),
+ (ne.recordList32 = function (e, t) {
+ return function () {
+ return this.parseRecordList32(e, t);
+ };
+ }),
+ (ne.pointer = function (e) {
+ return function () {
+ return this.parsePointer(e);
+ };
+ }),
+ (ne.pointer32 = function (e) {
+ return function () {
+ return this.parsePointer32(e);
+ };
+ }),
+ (ne.tag = ne.prototype.parseTag),
+ (ne.byte = ne.prototype.parseByte),
+ (ne.uShort = ne.offset16 = ne.prototype.parseUShort),
+ (ne.uShortList = ne.prototype.parseUShortList),
+ (ne.uLong = ne.offset32 = ne.prototype.parseULong),
+ (ne.uLongList = ne.prototype.parseULongList),
+ (ne.struct = ne.prototype.parseStruct),
+ (ne.coverage = ne.prototype.parseCoverage),
+ (ne.classDef = ne.prototype.parseClassDef);
+ var re = {
+ reserved: ne.uShort,
+ reqFeatureIndex: ne.uShort,
+ featureIndexes: ne.uShortList,
+ };
+ (ne.prototype.parseScriptList = function () {
+ return (
+ this.parsePointer(
+ ne.recordList({
+ tag: ne.tag,
+ script: ne.pointer({
+ defaultLangSys: ne.pointer(re),
+ langSysRecords: ne.recordList({
+ tag: ne.tag,
+ langSys: ne.pointer(re),
+ }),
+ }),
+ })
+ ) || []
+ );
+ }),
+ (ne.prototype.parseFeatureList = function () {
+ return (
+ this.parsePointer(
+ ne.recordList({
+ tag: ne.tag,
+ feature: ne.pointer({
+ featureParams: ne.offset16,
+ lookupListIndexes: ne.uShortList,
+ }),
+ })
+ ) || []
+ );
+ }),
+ (ne.prototype.parseLookupList = function (e) {
+ return (
+ this.parsePointer(
+ ne.list(
+ ne.pointer(function () {
+ var t = this.parseUShort();
+ M.argument(
+ 1 <= t && t <= 9,
+ "GPOS/GSUB lookup type " + t + " unknown."
+ );
+ var n = this.parseUShort(),
+ r = 16 & n;
+ return {
+ lookupType: t,
+ lookupFlag: n,
+ subtables: this.parseList(ne.pointer(e[t])),
+ markFilteringSet: r ? this.parseUShort() : void 0,
+ };
+ })
+ )
+ ) || []
+ );
+ }),
+ (ne.prototype.parseFeatureVariationsList = function () {
+ return (
+ this.parsePointer32(function () {
+ var e = this.parseUShort(),
+ t = this.parseUShort();
+ return (
+ M.argument(
+ 1 === e && t < 1,
+ "GPOS/GSUB feature variations table unknown."
+ ),
+ this.parseRecordList32({
+ conditionSetOffset: ne.offset32,
+ featureTableSubstitutionOffset: ne.offset32,
+ })
+ );
+ }) || []
+ );
+ });
+ var ie = {
+ getByte: J,
+ getCard8: J,
+ getUShort: K,
+ getCard16: K,
+ getShort: function (e, t) {
+ return e.getInt16(t, !1);
+ },
+ getULong: $,
+ getFixed: ee,
+ getTag: function (e, t) {
+ for (var n = "", r = t; r < t + 4; r += 1)
+ n += String.fromCharCode(e.getInt8(r));
+ return n;
+ },
+ getOffset: function (e, t, n) {
+ for (var r = 0, i = 0; i < n; i += 1)
+ (r <<= 8), (r += e.getUint8(t + i));
+ return r;
+ },
+ getBytes: function (e, t, n) {
+ for (var r = [], i = t; i < n; i += 1) r.push(e.getUint8(i));
+ return r;
+ },
+ bytesToString: function (e) {
+ for (var t = "", n = 0; n < e.length; n += 1)
+ t += String.fromCharCode(e[n]);
+ return t;
+ },
+ Parser: ne,
+ };
+ function ae(e, t, n) {
+ e.segments.push({
+ end: t,
+ start: t,
+ delta: -(t - n),
+ offset: 0,
+ glyphIndex: n,
+ });
+ }
+ var oe = {
+ parse: function (e, t) {
+ var n = {};
+ (n.version = ie.getUShort(e, t)),
+ M.argument(
+ 0 === n.version,
+ "cmap table version should be 0."
+ ),
+ (n.numTables = ie.getUShort(e, t + 2));
+ for (var r = -1, i = n.numTables - 1; i >= 0; i -= 1) {
+ var a = ie.getUShort(e, t + 4 + 8 * i),
+ o = ie.getUShort(e, t + 4 + 8 * i + 2);
+ if (
+ (3 === a && (0 === o || 1 === o || 10 === o)) ||
+ (0 === a &&
+ (0 === o || 1 === o || 2 === o || 3 === o || 4 === o))
+ ) {
+ r = ie.getULong(e, t + 4 + 8 * i + 4);
+ break;
+ }
+ }
+ if (-1 === r)
+ throw new Error("No valid cmap sub-tables found.");
+ var s = new ie.Parser(e, t + r);
+ if (((n.format = s.parseUShort()), 12 === n.format))
+ !(function (e, t) {
+ var n;
+ t.parseUShort(),
+ (e.length = t.parseULong()),
+ (e.language = t.parseULong()),
+ (e.groupCount = n = t.parseULong()),
+ (e.glyphIndexMap = {});
+ for (var r = 0; r < n; r += 1)
+ for (
+ var i = t.parseULong(),
+ a = t.parseULong(),
+ o = t.parseULong(),
+ s = i;
+ s <= a;
+ s += 1
+ )
+ (e.glyphIndexMap[s] = o), o++;
+ })(n, s);
+ else {
+ if (4 !== n.format)
+ throw new Error(
+ "Only format 4 and 12 cmap tables are supported (found format " +
+ n.format +
+ ")."
+ );
+ !(function (e, t, n, r, i) {
+ var a;
+ (e.length = t.parseUShort()),
+ (e.language = t.parseUShort()),
+ (e.segCount = a = t.parseUShort() >> 1),
+ t.skip("uShort", 3),
+ (e.glyphIndexMap = {});
+ for (
+ var o = new ie.Parser(n, r + i + 14),
+ s = new ie.Parser(n, r + i + 16 + 2 * a),
+ l = new ie.Parser(n, r + i + 16 + 4 * a),
+ u = new ie.Parser(n, r + i + 16 + 6 * a),
+ c = r + i + 16 + 8 * a,
+ f = 0;
+ f < a - 1;
+ f += 1
+ )
+ for (
+ var d = void 0,
+ h = o.parseUShort(),
+ p = s.parseUShort(),
+ v = l.parseShort(),
+ m = u.parseUShort(),
+ g = p;
+ g <= h;
+ g += 1
+ )
+ 0 !== m
+ ? ((c = u.offset + u.relativeOffset - 2),
+ (c += m),
+ (c += 2 * (g - p)),
+ 0 !== (d = ie.getUShort(n, c)) &&
+ (d = (d + v) & 65535))
+ : (d = (g + v) & 65535),
+ (e.glyphIndexMap[g] = d);
+ })(n, s, e, t, r);
+ }
+ return n;
+ },
+ make: function (e) {
+ var t,
+ n = !0;
+ for (t = e.length - 1; t > 0; t -= 1) {
+ if (e.get(t).unicode > 65535) {
+ console.log("Adding CMAP format 12 (needed!)"), (n = !1);
+ break;
+ }
+ }
+ var r = [
+ { name: "version", type: "USHORT", value: 0 },
+ { name: "numTables", type: "USHORT", value: n ? 1 : 2 },
+ { name: "platformID", type: "USHORT", value: 3 },
+ { name: "encodingID", type: "USHORT", value: 1 },
+ { name: "offset", type: "ULONG", value: n ? 12 : 20 },
+ ];
+ n ||
+ (r = r.concat([
+ { name: "cmap12PlatformID", type: "USHORT", value: 3 },
+ { name: "cmap12EncodingID", type: "USHORT", value: 10 },
+ { name: "cmap12Offset", type: "ULONG", value: 0 },
+ ])),
+ (r = r.concat([
+ { name: "format", type: "USHORT", value: 4 },
+ { name: "cmap4Length", type: "USHORT", value: 0 },
+ { name: "language", type: "USHORT", value: 0 },
+ { name: "segCountX2", type: "USHORT", value: 0 },
+ { name: "searchRange", type: "USHORT", value: 0 },
+ { name: "entrySelector", type: "USHORT", value: 0 },
+ { name: "rangeShift", type: "USHORT", value: 0 },
+ ]));
+ var i = new q.Table("cmap", r);
+ for (i.segments = [], t = 0; t < e.length; t += 1) {
+ for (var a = e.get(t), o = 0; o < a.unicodes.length; o += 1)
+ ae(i, a.unicodes[o], t);
+ i.segments = i.segments.sort(function (e, t) {
+ return e.start - t.start;
+ });
+ }
+ !(function (e) {
+ e.segments.push({
+ end: 65535,
+ start: 65535,
+ delta: 1,
+ offset: 0,
+ });
+ })(i);
+ var s = i.segments.length,
+ l = 0,
+ u = [],
+ c = [],
+ f = [],
+ d = [],
+ h = [],
+ p = [];
+ for (t = 0; t < s; t += 1) {
+ var v = i.segments[t];
+ v.end <= 65535 && v.start <= 65535
+ ? ((u = u.concat({
+ name: "end_" + t,
+ type: "USHORT",
+ value: v.end,
+ })),
+ (c = c.concat({
+ name: "start_" + t,
+ type: "USHORT",
+ value: v.start,
+ })),
+ (f = f.concat({
+ name: "idDelta_" + t,
+ type: "SHORT",
+ value: v.delta,
+ })),
+ (d = d.concat({
+ name: "idRangeOffset_" + t,
+ type: "USHORT",
+ value: v.offset,
+ })),
+ void 0 !== v.glyphId &&
+ (h = h.concat({
+ name: "glyph_" + t,
+ type: "USHORT",
+ value: v.glyphId,
+ })))
+ : (l += 1),
+ n ||
+ void 0 === v.glyphIndex ||
+ (p = (p = (p = p.concat({
+ name: "cmap12Start_" + t,
+ type: "ULONG",
+ value: v.start,
+ })).concat({
+ name: "cmap12End_" + t,
+ type: "ULONG",
+ value: v.end,
+ })).concat({
+ name: "cmap12Glyph_" + t,
+ type: "ULONG",
+ value: v.glyphIndex,
+ }));
+ }
+ if (
+ ((i.segCountX2 = 2 * (s - l)),
+ (i.searchRange =
+ 2 *
+ Math.pow(2, Math.floor(Math.log(s - l) / Math.log(2)))),
+ (i.entrySelector =
+ Math.log(i.searchRange / 2) / Math.log(2)),
+ (i.rangeShift = i.segCountX2 - i.searchRange),
+ (i.fields = i.fields.concat(u)),
+ i.fields.push({
+ name: "reservedPad",
+ type: "USHORT",
+ value: 0,
+ }),
+ (i.fields = i.fields.concat(c)),
+ (i.fields = i.fields.concat(f)),
+ (i.fields = i.fields.concat(d)),
+ (i.fields = i.fields.concat(h)),
+ (i.cmap4Length =
+ 14 +
+ 2 * u.length +
+ 2 +
+ 2 * c.length +
+ 2 * f.length +
+ 2 * d.length +
+ 2 * h.length),
+ !n)
+ ) {
+ var m = 16 + 4 * p.length;
+ (i.cmap12Offset = 20 + i.cmap4Length),
+ (i.fields = i.fields.concat([
+ { name: "cmap12Format", type: "USHORT", value: 12 },
+ { name: "cmap12Reserved", type: "USHORT", value: 0 },
+ { name: "cmap12Length", type: "ULONG", value: m },
+ { name: "cmap12Language", type: "ULONG", value: 0 },
+ {
+ name: "cmap12nGroups",
+ type: "ULONG",
+ value: p.length / 3,
+ },
+ ])),
+ (i.fields = i.fields.concat(p));
+ }
+ return i;
+ },
+ },
+ se = [
+ ".notdef",
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quoteright",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "quoteleft",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ "exclamdown",
+ "cent",
+ "sterling",
+ "fraction",
+ "yen",
+ "florin",
+ "section",
+ "currency",
+ "quotesingle",
+ "quotedblleft",
+ "guillemotleft",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ "endash",
+ "dagger",
+ "daggerdbl",
+ "periodcentered",
+ "paragraph",
+ "bullet",
+ "quotesinglbase",
+ "quotedblbase",
+ "quotedblright",
+ "guillemotright",
+ "ellipsis",
+ "perthousand",
+ "questiondown",
+ "grave",
+ "acute",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "dieresis",
+ "ring",
+ "cedilla",
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "emdash",
+ "AE",
+ "ordfeminine",
+ "Lslash",
+ "Oslash",
+ "OE",
+ "ordmasculine",
+ "ae",
+ "dotlessi",
+ "lslash",
+ "oslash",
+ "oe",
+ "germandbls",
+ "onesuperior",
+ "logicalnot",
+ "mu",
+ "trademark",
+ "Eth",
+ "onehalf",
+ "plusminus",
+ "Thorn",
+ "onequarter",
+ "divide",
+ "brokenbar",
+ "degree",
+ "thorn",
+ "threequarters",
+ "twosuperior",
+ "registered",
+ "minus",
+ "eth",
+ "multiply",
+ "threesuperior",
+ "copyright",
+ "Aacute",
+ "Acircumflex",
+ "Adieresis",
+ "Agrave",
+ "Aring",
+ "Atilde",
+ "Ccedilla",
+ "Eacute",
+ "Ecircumflex",
+ "Edieresis",
+ "Egrave",
+ "Iacute",
+ "Icircumflex",
+ "Idieresis",
+ "Igrave",
+ "Ntilde",
+ "Oacute",
+ "Ocircumflex",
+ "Odieresis",
+ "Ograve",
+ "Otilde",
+ "Scaron",
+ "Uacute",
+ "Ucircumflex",
+ "Udieresis",
+ "Ugrave",
+ "Yacute",
+ "Ydieresis",
+ "Zcaron",
+ "aacute",
+ "acircumflex",
+ "adieresis",
+ "agrave",
+ "aring",
+ "atilde",
+ "ccedilla",
+ "eacute",
+ "ecircumflex",
+ "edieresis",
+ "egrave",
+ "iacute",
+ "icircumflex",
+ "idieresis",
+ "igrave",
+ "ntilde",
+ "oacute",
+ "ocircumflex",
+ "odieresis",
+ "ograve",
+ "otilde",
+ "scaron",
+ "uacute",
+ "ucircumflex",
+ "udieresis",
+ "ugrave",
+ "yacute",
+ "ydieresis",
+ "zcaron",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "266 ff",
+ "onedotenleader",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "commasuperior",
+ "threequartersemdash",
+ "periodsuperior",
+ "questionsmall",
+ "asuperior",
+ "bsuperior",
+ "centsuperior",
+ "dsuperior",
+ "esuperior",
+ "isuperior",
+ "lsuperior",
+ "msuperior",
+ "nsuperior",
+ "osuperior",
+ "rsuperior",
+ "ssuperior",
+ "tsuperior",
+ "ff",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hyphensuperior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ "exclamdownsmall",
+ "centoldstyle",
+ "Lslashsmall",
+ "Scaronsmall",
+ "Zcaronsmall",
+ "Dieresissmall",
+ "Brevesmall",
+ "Caronsmall",
+ "Dotaccentsmall",
+ "Macronsmall",
+ "figuredash",
+ "hypheninferior",
+ "Ogoneksmall",
+ "Ringsmall",
+ "Cedillasmall",
+ "questiondownsmall",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ "zerosuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "eightsuperior",
+ "ninesuperior",
+ "zeroinferior",
+ "oneinferior",
+ "twoinferior",
+ "threeinferior",
+ "fourinferior",
+ "fiveinferior",
+ "sixinferior",
+ "seveninferior",
+ "eightinferior",
+ "nineinferior",
+ "centinferior",
+ "dollarinferior",
+ "periodinferior",
+ "commainferior",
+ "Agravesmall",
+ "Aacutesmall",
+ "Acircumflexsmall",
+ "Atildesmall",
+ "Adieresissmall",
+ "Aringsmall",
+ "AEsmall",
+ "Ccedillasmall",
+ "Egravesmall",
+ "Eacutesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Igravesmall",
+ "Iacutesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ethsmall",
+ "Ntildesmall",
+ "Ogravesmall",
+ "Oacutesmall",
+ "Ocircumflexsmall",
+ "Otildesmall",
+ "Odieresissmall",
+ "OEsmall",
+ "Oslashsmall",
+ "Ugravesmall",
+ "Uacutesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ "Yacutesmall",
+ "Thornsmall",
+ "Ydieresissmall",
+ "001.000",
+ "001.001",
+ "001.002",
+ "001.003",
+ "Black",
+ "Bold",
+ "Book",
+ "Light",
+ "Medium",
+ "Regular",
+ "Roman",
+ "Semibold",
+ ],
+ le = [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quoteright",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "quoteleft",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "exclamdown",
+ "cent",
+ "sterling",
+ "fraction",
+ "yen",
+ "florin",
+ "section",
+ "currency",
+ "quotesingle",
+ "quotedblleft",
+ "guillemotleft",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ "",
+ "endash",
+ "dagger",
+ "daggerdbl",
+ "periodcentered",
+ "",
+ "paragraph",
+ "bullet",
+ "quotesinglbase",
+ "quotedblbase",
+ "quotedblright",
+ "guillemotright",
+ "ellipsis",
+ "perthousand",
+ "",
+ "questiondown",
+ "",
+ "grave",
+ "acute",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "dieresis",
+ "",
+ "ring",
+ "cedilla",
+ "",
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "emdash",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "AE",
+ "",
+ "ordfeminine",
+ "",
+ "",
+ "",
+ "",
+ "Lslash",
+ "Oslash",
+ "OE",
+ "ordmasculine",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "ae",
+ "",
+ "",
+ "",
+ "dotlessi",
+ "",
+ "",
+ "lslash",
+ "oslash",
+ "oe",
+ "germandbls",
+ ],
+ ue = [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "space",
+ "exclamsmall",
+ "Hungarumlautsmall",
+ "",
+ "dollaroldstyle",
+ "dollarsuperior",
+ "ampersandsmall",
+ "Acutesmall",
+ "parenleftsuperior",
+ "parenrightsuperior",
+ "twodotenleader",
+ "onedotenleader",
+ "comma",
+ "hyphen",
+ "period",
+ "fraction",
+ "zerooldstyle",
+ "oneoldstyle",
+ "twooldstyle",
+ "threeoldstyle",
+ "fouroldstyle",
+ "fiveoldstyle",
+ "sixoldstyle",
+ "sevenoldstyle",
+ "eightoldstyle",
+ "nineoldstyle",
+ "colon",
+ "semicolon",
+ "commasuperior",
+ "threequartersemdash",
+ "periodsuperior",
+ "questionsmall",
+ "",
+ "asuperior",
+ "bsuperior",
+ "centsuperior",
+ "dsuperior",
+ "esuperior",
+ "",
+ "",
+ "isuperior",
+ "",
+ "",
+ "lsuperior",
+ "msuperior",
+ "nsuperior",
+ "osuperior",
+ "",
+ "",
+ "rsuperior",
+ "ssuperior",
+ "tsuperior",
+ "",
+ "ff",
+ "fi",
+ "fl",
+ "ffi",
+ "ffl",
+ "parenleftinferior",
+ "",
+ "parenrightinferior",
+ "Circumflexsmall",
+ "hyphensuperior",
+ "Gravesmall",
+ "Asmall",
+ "Bsmall",
+ "Csmall",
+ "Dsmall",
+ "Esmall",
+ "Fsmall",
+ "Gsmall",
+ "Hsmall",
+ "Ismall",
+ "Jsmall",
+ "Ksmall",
+ "Lsmall",
+ "Msmall",
+ "Nsmall",
+ "Osmall",
+ "Psmall",
+ "Qsmall",
+ "Rsmall",
+ "Ssmall",
+ "Tsmall",
+ "Usmall",
+ "Vsmall",
+ "Wsmall",
+ "Xsmall",
+ "Ysmall",
+ "Zsmall",
+ "colonmonetary",
+ "onefitted",
+ "rupiah",
+ "Tildesmall",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "exclamdownsmall",
+ "centoldstyle",
+ "Lslashsmall",
+ "",
+ "",
+ "Scaronsmall",
+ "Zcaronsmall",
+ "Dieresissmall",
+ "Brevesmall",
+ "Caronsmall",
+ "",
+ "Dotaccentsmall",
+ "",
+ "",
+ "Macronsmall",
+ "",
+ "",
+ "figuredash",
+ "hypheninferior",
+ "",
+ "",
+ "Ogoneksmall",
+ "Ringsmall",
+ "Cedillasmall",
+ "",
+ "",
+ "",
+ "onequarter",
+ "onehalf",
+ "threequarters",
+ "questiondownsmall",
+ "oneeighth",
+ "threeeighths",
+ "fiveeighths",
+ "seveneighths",
+ "onethird",
+ "twothirds",
+ "",
+ "",
+ "zerosuperior",
+ "onesuperior",
+ "twosuperior",
+ "threesuperior",
+ "foursuperior",
+ "fivesuperior",
+ "sixsuperior",
+ "sevensuperior",
+ "eightsuperior",
+ "ninesuperior",
+ "zeroinferior",
+ "oneinferior",
+ "twoinferior",
+ "threeinferior",
+ "fourinferior",
+ "fiveinferior",
+ "sixinferior",
+ "seveninferior",
+ "eightinferior",
+ "nineinferior",
+ "centinferior",
+ "dollarinferior",
+ "periodinferior",
+ "commainferior",
+ "Agravesmall",
+ "Aacutesmall",
+ "Acircumflexsmall",
+ "Atildesmall",
+ "Adieresissmall",
+ "Aringsmall",
+ "AEsmall",
+ "Ccedillasmall",
+ "Egravesmall",
+ "Eacutesmall",
+ "Ecircumflexsmall",
+ "Edieresissmall",
+ "Igravesmall",
+ "Iacutesmall",
+ "Icircumflexsmall",
+ "Idieresissmall",
+ "Ethsmall",
+ "Ntildesmall",
+ "Ogravesmall",
+ "Oacutesmall",
+ "Ocircumflexsmall",
+ "Otildesmall",
+ "Odieresissmall",
+ "OEsmall",
+ "Oslashsmall",
+ "Ugravesmall",
+ "Uacutesmall",
+ "Ucircumflexsmall",
+ "Udieresissmall",
+ "Yacutesmall",
+ "Thornsmall",
+ "Ydieresissmall",
+ ],
+ ce = [
+ ".notdef",
+ ".null",
+ "nonmarkingreturn",
+ "space",
+ "exclam",
+ "quotedbl",
+ "numbersign",
+ "dollar",
+ "percent",
+ "ampersand",
+ "quotesingle",
+ "parenleft",
+ "parenright",
+ "asterisk",
+ "plus",
+ "comma",
+ "hyphen",
+ "period",
+ "slash",
+ "zero",
+ "one",
+ "two",
+ "three",
+ "four",
+ "five",
+ "six",
+ "seven",
+ "eight",
+ "nine",
+ "colon",
+ "semicolon",
+ "less",
+ "equal",
+ "greater",
+ "question",
+ "at",
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z",
+ "bracketleft",
+ "backslash",
+ "bracketright",
+ "asciicircum",
+ "underscore",
+ "grave",
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z",
+ "braceleft",
+ "bar",
+ "braceright",
+ "asciitilde",
+ "Adieresis",
+ "Aring",
+ "Ccedilla",
+ "Eacute",
+ "Ntilde",
+ "Odieresis",
+ "Udieresis",
+ "aacute",
+ "agrave",
+ "acircumflex",
+ "adieresis",
+ "atilde",
+ "aring",
+ "ccedilla",
+ "eacute",
+ "egrave",
+ "ecircumflex",
+ "edieresis",
+ "iacute",
+ "igrave",
+ "icircumflex",
+ "idieresis",
+ "ntilde",
+ "oacute",
+ "ograve",
+ "ocircumflex",
+ "odieresis",
+ "otilde",
+ "uacute",
+ "ugrave",
+ "ucircumflex",
+ "udieresis",
+ "dagger",
+ "degree",
+ "cent",
+ "sterling",
+ "section",
+ "bullet",
+ "paragraph",
+ "germandbls",
+ "registered",
+ "copyright",
+ "trademark",
+ "acute",
+ "dieresis",
+ "notequal",
+ "AE",
+ "Oslash",
+ "infinity",
+ "plusminus",
+ "lessequal",
+ "greaterequal",
+ "yen",
+ "mu",
+ "partialdiff",
+ "summation",
+ "product",
+ "pi",
+ "integral",
+ "ordfeminine",
+ "ordmasculine",
+ "Omega",
+ "ae",
+ "oslash",
+ "questiondown",
+ "exclamdown",
+ "logicalnot",
+ "radical",
+ "florin",
+ "approxequal",
+ "Delta",
+ "guillemotleft",
+ "guillemotright",
+ "ellipsis",
+ "nonbreakingspace",
+ "Agrave",
+ "Atilde",
+ "Otilde",
+ "OE",
+ "oe",
+ "endash",
+ "emdash",
+ "quotedblleft",
+ "quotedblright",
+ "quoteleft",
+ "quoteright",
+ "divide",
+ "lozenge",
+ "ydieresis",
+ "Ydieresis",
+ "fraction",
+ "currency",
+ "guilsinglleft",
+ "guilsinglright",
+ "fi",
+ "fl",
+ "daggerdbl",
+ "periodcentered",
+ "quotesinglbase",
+ "quotedblbase",
+ "perthousand",
+ "Acircumflex",
+ "Ecircumflex",
+ "Aacute",
+ "Edieresis",
+ "Egrave",
+ "Iacute",
+ "Icircumflex",
+ "Idieresis",
+ "Igrave",
+ "Oacute",
+ "Ocircumflex",
+ "apple",
+ "Ograve",
+ "Uacute",
+ "Ucircumflex",
+ "Ugrave",
+ "dotlessi",
+ "circumflex",
+ "tilde",
+ "macron",
+ "breve",
+ "dotaccent",
+ "ring",
+ "cedilla",
+ "hungarumlaut",
+ "ogonek",
+ "caron",
+ "Lslash",
+ "lslash",
+ "Scaron",
+ "scaron",
+ "Zcaron",
+ "zcaron",
+ "brokenbar",
+ "Eth",
+ "eth",
+ "Yacute",
+ "yacute",
+ "Thorn",
+ "thorn",
+ "minus",
+ "multiply",
+ "onesuperior",
+ "twosuperior",
+ "threesuperior",
+ "onehalf",
+ "onequarter",
+ "threequarters",
+ "franc",
+ "Gbreve",
+ "gbreve",
+ "Idotaccent",
+ "Scedilla",
+ "scedilla",
+ "Cacute",
+ "cacute",
+ "Ccaron",
+ "ccaron",
+ "dcroat",
+ ];
+ function fe(e) {
+ this.font = e;
+ }
+ function de(e) {
+ this.cmap = e;
+ }
+ function he(e, t) {
+ (this.encoding = e), (this.charset = t);
+ }
+ function pe(e) {
+ switch (e.version) {
+ case 1:
+ this.names = ce.slice();
+ break;
+ case 2:
+ this.names = new Array(e.numberOfGlyphs);
+ for (var t = 0; t < e.numberOfGlyphs; t++)
+ e.glyphNameIndex[t] < ce.length
+ ? (this.names[t] = ce[e.glyphNameIndex[t]])
+ : (this.names[t] =
+ e.names[e.glyphNameIndex[t] - ce.length]);
+ break;
+ case 2.5:
+ this.names = new Array(e.numberOfGlyphs);
+ for (var n = 0; n < e.numberOfGlyphs; n++)
+ this.names[n] = ce[n + e.glyphNameIndex[n]];
+ break;
+ default:
+ this.names = [];
+ }
+ }
+ function ve(e, t) {
+ t.lowMemory
+ ? (function (e) {
+ e._IndexToUnicodeMap = {};
+ for (
+ var t = e.tables.cmap.glyphIndexMap,
+ n = Object.keys(t),
+ r = 0;
+ r < n.length;
+ r += 1
+ ) {
+ var i = n[r],
+ a = t[i];
+ void 0 === e._IndexToUnicodeMap[a]
+ ? (e._IndexToUnicodeMap[a] = {
+ unicodes: [parseInt(i)],
+ })
+ : e._IndexToUnicodeMap[a].unicodes.push(parseInt(i));
+ }
+ })(e)
+ : (function (e) {
+ for (
+ var t,
+ n = e.tables.cmap.glyphIndexMap,
+ r = Object.keys(n),
+ i = 0;
+ i < r.length;
+ i += 1
+ ) {
+ var a = r[i],
+ o = n[a];
+ (t = e.glyphs.get(o)).addUnicode(parseInt(a));
+ }
+ for (var s = 0; s < e.glyphs.length; s += 1)
+ (t = e.glyphs.get(s)),
+ e.cffEncoding
+ ? e.isCIDFont
+ ? (t.name = "gid" + s)
+ : (t.name = e.cffEncoding.charset[s])
+ : e.glyphNames.names &&
+ (t.name = e.glyphNames.glyphIndexToName(s));
+ })(e);
+ }
+ (fe.prototype.charToGlyphIndex = function (e) {
+ var t = e.codePointAt(0),
+ n = this.font.glyphs;
+ if (n)
+ for (var r = 0; r < n.length; r += 1)
+ for (var i = n.get(r), a = 0; a < i.unicodes.length; a += 1)
+ if (i.unicodes[a] === t) return r;
+ return null;
+ }),
+ (de.prototype.charToGlyphIndex = function (e) {
+ return this.cmap.glyphIndexMap[e.codePointAt(0)] || 0;
+ }),
+ (he.prototype.charToGlyphIndex = function (e) {
+ var t = e.codePointAt(0),
+ n = this.encoding[t];
+ return this.charset.indexOf(n);
+ }),
+ (pe.prototype.nameToGlyphIndex = function (e) {
+ return this.names.indexOf(e);
+ }),
+ (pe.prototype.glyphIndexToName = function (e) {
+ return this.names[e];
+ });
+ var me = {
+ line: function (e, t, n, r, i) {
+ e.beginPath(), e.moveTo(t, n), e.lineTo(r, i), e.stroke();
+ },
+ };
+ function ge(e) {
+ this.bindConstructorValues(e);
+ }
+ function Ae(e, t, n) {
+ Object.defineProperty(e, t, {
+ get: function () {
+ return e.path, e[n];
+ },
+ set: function (t) {
+ e[n] = t;
+ },
+ enumerable: !0,
+ configurable: !0,
+ });
+ }
+ function ye(e, t) {
+ if (((this.font = e), (this.glyphs = {}), Array.isArray(t)))
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ (r.path.unitsPerEm = e.unitsPerEm), (this.glyphs[n] = r);
+ }
+ this.length = (t && t.length) || 0;
+ }
+ (ge.prototype.bindConstructorValues = function (e) {
+ (this.index = e.index || 0),
+ (this.name = e.name || null),
+ (this.unicode = e.unicode || void 0),
+ (this.unicodes =
+ e.unicodes || void 0 !== e.unicode ? [e.unicode] : []),
+ "xMin" in e && (this.xMin = e.xMin),
+ "yMin" in e && (this.yMin = e.yMin),
+ "xMax" in e && (this.xMax = e.xMax),
+ "yMax" in e && (this.yMax = e.yMax),
+ "advanceWidth" in e && (this.advanceWidth = e.advanceWidth),
+ Object.defineProperty(
+ this,
+ "path",
+ (function (e, t) {
+ var n = t || new C();
+ return {
+ configurable: !0,
+ get: function () {
+ return "function" === typeof n && (n = n()), n;
+ },
+ set: function (e) {
+ n = e;
+ },
+ };
+ })(0, e.path)
+ );
+ }),
+ (ge.prototype.addUnicode = function (e) {
+ 0 === this.unicodes.length && (this.unicode = e),
+ this.unicodes.push(e);
+ }),
+ (ge.prototype.getBoundingBox = function () {
+ return this.path.getBoundingBox();
+ }),
+ (ge.prototype.getPath = function (e, t, n, r, i) {
+ var a, o;
+ (e = void 0 !== e ? e : 0),
+ (t = void 0 !== t ? t : 0),
+ (n = void 0 !== n ? n : 72),
+ r || (r = {});
+ var s = r.xScale,
+ l = r.yScale;
+ if (
+ (r.hinting &&
+ i &&
+ i.hinting &&
+ (o = this.path && i.hinting.exec(this, n)),
+ o)
+ )
+ (a = i.hinting.getCommands(o)),
+ (e = Math.round(e)),
+ (t = Math.round(t)),
+ (s = l = 1);
+ else {
+ a = this.path.commands;
+ var u = (1 / (this.path.unitsPerEm || 1e3)) * n;
+ void 0 === s && (s = u), void 0 === l && (l = u);
+ }
+ for (var c = new C(), f = 0; f < a.length; f += 1) {
+ var d = a[f];
+ "M" === d.type
+ ? c.moveTo(e + d.x * s, t + -d.y * l)
+ : "L" === d.type
+ ? c.lineTo(e + d.x * s, t + -d.y * l)
+ : "Q" === d.type
+ ? c.quadraticCurveTo(
+ e + d.x1 * s,
+ t + -d.y1 * l,
+ e + d.x * s,
+ t + -d.y * l
+ )
+ : "C" === d.type
+ ? c.curveTo(
+ e + d.x1 * s,
+ t + -d.y1 * l,
+ e + d.x2 * s,
+ t + -d.y2 * l,
+ e + d.x * s,
+ t + -d.y * l
+ )
+ : "Z" === d.type && c.closePath();
+ }
+ return c;
+ }),
+ (ge.prototype.getContours = function () {
+ if (void 0 === this.points) return [];
+ for (
+ var e = [], t = [], n = 0;
+ n < this.points.length;
+ n += 1
+ ) {
+ var r = this.points[n];
+ t.push(r), r.lastPointOfContour && (e.push(t), (t = []));
+ }
+ return (
+ M.argument(
+ 0 === t.length,
+ "There are still points left in the current contour."
+ ),
+ e
+ );
+ }),
+ (ge.prototype.getMetrics = function () {
+ for (
+ var e = this.path.commands, t = [], n = [], r = 0;
+ r < e.length;
+ r += 1
+ ) {
+ var i = e[r];
+ "Z" !== i.type && (t.push(i.x), n.push(i.y)),
+ ("Q" !== i.type && "C" !== i.type) ||
+ (t.push(i.x1), n.push(i.y1)),
+ "C" === i.type && (t.push(i.x2), n.push(i.y2));
+ }
+ var a = {
+ xMin: Math.min.apply(null, t),
+ yMin: Math.min.apply(null, n),
+ xMax: Math.max.apply(null, t),
+ yMax: Math.max.apply(null, n),
+ leftSideBearing: this.leftSideBearing,
+ };
+ return (
+ isFinite(a.xMin) || (a.xMin = 0),
+ isFinite(a.xMax) || (a.xMax = this.advanceWidth),
+ isFinite(a.yMin) || (a.yMin = 0),
+ isFinite(a.yMax) || (a.yMax = 0),
+ (a.rightSideBearing =
+ this.advanceWidth - a.leftSideBearing - (a.xMax - a.xMin)),
+ a
+ );
+ }),
+ (ge.prototype.draw = function (e, t, n, r, i) {
+ this.getPath(t, n, r, i).draw(e);
+ }),
+ (ge.prototype.drawPoints = function (e, t, n, r) {
+ function i(t, n, r, i) {
+ e.beginPath();
+ for (var a = 0; a < t.length; a += 1)
+ e.moveTo(n + t[a].x * i, r + t[a].y * i),
+ e.arc(
+ n + t[a].x * i,
+ r + t[a].y * i,
+ 2,
+ 0,
+ 2 * Math.PI,
+ !1
+ );
+ e.closePath(), e.fill();
+ }
+ (t = void 0 !== t ? t : 0),
+ (n = void 0 !== n ? n : 0),
+ (r = void 0 !== r ? r : 24);
+ for (
+ var a = (1 / this.path.unitsPerEm) * r,
+ o = [],
+ s = [],
+ l = this.path,
+ u = 0;
+ u < l.commands.length;
+ u += 1
+ ) {
+ var c = l.commands[u];
+ void 0 !== c.x && o.push({ x: c.x, y: -c.y }),
+ void 0 !== c.x1 && s.push({ x: c.x1, y: -c.y1 }),
+ void 0 !== c.x2 && s.push({ x: c.x2, y: -c.y2 });
+ }
+ (e.fillStyle = "blue"),
+ i(o, t, n, a),
+ (e.fillStyle = "red"),
+ i(s, t, n, a);
+ }),
+ (ge.prototype.drawMetrics = function (e, t, n, r) {
+ var i;
+ (t = void 0 !== t ? t : 0),
+ (n = void 0 !== n ? n : 0),
+ (r = void 0 !== r ? r : 24),
+ (i = (1 / this.path.unitsPerEm) * r),
+ (e.lineWidth = 1),
+ (e.strokeStyle = "black"),
+ me.line(e, t, -1e4, t, 1e4),
+ me.line(e, -1e4, n, 1e4, n);
+ var a = this.xMin || 0,
+ o = this.yMin || 0,
+ s = this.xMax || 0,
+ l = this.yMax || 0,
+ u = this.advanceWidth || 0;
+ (e.strokeStyle = "blue"),
+ me.line(e, t + a * i, -1e4, t + a * i, 1e4),
+ me.line(e, t + s * i, -1e4, t + s * i, 1e4),
+ me.line(e, -1e4, n + -o * i, 1e4, n + -o * i),
+ me.line(e, -1e4, n + -l * i, 1e4, n + -l * i),
+ (e.strokeStyle = "green"),
+ me.line(e, t + u * i, -1e4, t + u * i, 1e4);
+ }),
+ (ye.prototype.get = function (e) {
+ if (void 0 === this.glyphs[e]) {
+ this.font._push(e),
+ "function" === typeof this.glyphs[e] &&
+ (this.glyphs[e] = this.glyphs[e]());
+ var t = this.glyphs[e],
+ n = this.font._IndexToUnicodeMap[e];
+ if (n)
+ for (var r = 0; r < n.unicodes.length; r++)
+ t.addUnicode(n.unicodes[r]);
+ this.font.cffEncoding
+ ? this.font.isCIDFont
+ ? (t.name = "gid" + e)
+ : (t.name = this.font.cffEncoding.charset[e])
+ : this.font.glyphNames.names &&
+ (t.name = this.font.glyphNames.glyphIndexToName(e)),
+ (this.glyphs[e].advanceWidth =
+ this.font._hmtxTableData[e].advanceWidth),
+ (this.glyphs[e].leftSideBearing =
+ this.font._hmtxTableData[e].leftSideBearing);
+ } else
+ "function" === typeof this.glyphs[e] &&
+ (this.glyphs[e] = this.glyphs[e]());
+ return this.glyphs[e];
+ }),
+ (ye.prototype.push = function (e, t) {
+ (this.glyphs[e] = t), this.length++;
+ });
+ var be = {
+ GlyphSet: ye,
+ glyphLoader: function (e, t) {
+ return new ge({ index: t, font: e });
+ },
+ ttfGlyphLoader: function (e, t, n, r, i, a) {
+ return function () {
+ var o = new ge({ index: t, font: e });
+ return (
+ (o.path = function () {
+ n(o, r, i);
+ var t = a(e.glyphs, o);
+ return (t.unitsPerEm = e.unitsPerEm), t;
+ }),
+ Ae(o, "xMin", "_xMin"),
+ Ae(o, "xMax", "_xMax"),
+ Ae(o, "yMin", "_yMin"),
+ Ae(o, "yMax", "_yMax"),
+ o
+ );
+ };
+ },
+ cffGlyphLoader: function (e, t, n, r) {
+ return function () {
+ var i = new ge({ index: t, font: e });
+ return (
+ (i.path = function () {
+ var t = n(e, i, r);
+ return (t.unitsPerEm = e.unitsPerEm), t;
+ }),
+ i
+ );
+ };
+ },
+ };
+ function xe(e, t) {
+ if (e === t) return !0;
+ if (Array.isArray(e) && Array.isArray(t)) {
+ if (e.length !== t.length) return !1;
+ for (var n = 0; n < e.length; n += 1)
+ if (!xe(e[n], t[n])) return !1;
+ return !0;
+ }
+ return !1;
+ }
+ function Se(e) {
+ return e.length < 1240 ? 107 : e.length < 33900 ? 1131 : 32768;
+ }
+ function Ee(e, t, n) {
+ var r,
+ i,
+ a = [],
+ o = [],
+ s = ie.getCard16(e, t);
+ if (0 !== s) {
+ var l = ie.getByte(e, t + 2);
+ r = t + (s + 1) * l + 2;
+ for (var u = t + 3, c = 0; c < s + 1; c += 1)
+ a.push(ie.getOffset(e, u, l)), (u += l);
+ i = r + a[s];
+ } else i = t + 2;
+ for (var f = 0; f < a.length - 1; f += 1) {
+ var d = ie.getBytes(e, r + a[f], r + a[f + 1]);
+ n && (d = n(d)), o.push(d);
+ }
+ return { objects: o, startOffset: t, endOffset: i };
+ }
+ function _e(e, t) {
+ if (28 === t) return (e.parseByte() << 8) | e.parseByte();
+ if (29 === t)
+ return (
+ (e.parseByte() << 24) |
+ (e.parseByte() << 16) |
+ (e.parseByte() << 8) |
+ e.parseByte()
+ );
+ if (30 === t)
+ return (function (e) {
+ for (
+ var t = "",
+ n = [
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ ".",
+ "E",
+ "E-",
+ null,
+ "-",
+ ];
+ ;
+
+ ) {
+ var r = e.parseByte(),
+ i = r >> 4,
+ a = 15 & r;
+ if (15 === i) break;
+ if (((t += n[i]), 15 === a)) break;
+ t += n[a];
+ }
+ return parseFloat(t);
+ })(e);
+ if (t >= 32 && t <= 246) return t - 139;
+ if (t >= 247 && t <= 250)
+ return 256 * (t - 247) + e.parseByte() + 108;
+ if (t >= 251 && t <= 254)
+ return 256 * -(t - 251) - e.parseByte() - 108;
+ throw new Error("Invalid b0 " + t);
+ }
+ function Ce(e, t, n) {
+ t = void 0 !== t ? t : 0;
+ var r = new ie.Parser(e, t),
+ i = [],
+ a = [];
+ for (n = void 0 !== n ? n : e.length; r.relativeOffset < n; ) {
+ var o = r.parseByte();
+ o <= 21
+ ? (12 === o && (o = 1200 + r.parseByte()),
+ i.push([o, a]),
+ (a = []))
+ : a.push(_e(r, o));
+ }
+ return (function (e) {
+ for (var t = {}, n = 0; n < e.length; n += 1) {
+ var r = e[n][0],
+ i = e[n][1],
+ a = void 0;
+ if (
+ ((a = 1 === i.length ? i[0] : i),
+ t.hasOwnProperty(r) && !isNaN(t[r]))
+ )
+ throw new Error("Object " + t + " already has key " + r);
+ t[r] = a;
+ }
+ return t;
+ })(i);
+ }
+ function we(e, t) {
+ return (t = t <= 390 ? se[t] : e[t - 391]);
+ }
+ function Te(e, t, n) {
+ for (var r, i = {}, a = 0; a < t.length; a += 1) {
+ var o = t[a];
+ if (Array.isArray(o.type)) {
+ var s = [];
+ s.length = o.type.length;
+ for (var l = 0; l < o.type.length; l++)
+ void 0 === (r = void 0 !== e[o.op] ? e[o.op][l] : void 0) &&
+ (r =
+ void 0 !== o.value && void 0 !== o.value[l]
+ ? o.value[l]
+ : null),
+ "SID" === o.type[l] && (r = we(n, r)),
+ (s[l] = r);
+ i[o.name] = s;
+ } else
+ void 0 === (r = e[o.op]) &&
+ (r = void 0 !== o.value ? o.value : null),
+ "SID" === o.type && (r = we(n, r)),
+ (i[o.name] = r);
+ }
+ return i;
+ }
+ var Me = [
+ { name: "version", op: 0, type: "SID" },
+ { name: "notice", op: 1, type: "SID" },
+ { name: "copyright", op: 1200, type: "SID" },
+ { name: "fullName", op: 2, type: "SID" },
+ { name: "familyName", op: 3, type: "SID" },
+ { name: "weight", op: 4, type: "SID" },
+ { name: "isFixedPitch", op: 1201, type: "number", value: 0 },
+ { name: "italicAngle", op: 1202, type: "number", value: 0 },
+ {
+ name: "underlinePosition",
+ op: 1203,
+ type: "number",
+ value: -100,
+ },
+ {
+ name: "underlineThickness",
+ op: 1204,
+ type: "number",
+ value: 50,
+ },
+ { name: "paintType", op: 1205, type: "number", value: 0 },
+ { name: "charstringType", op: 1206, type: "number", value: 2 },
+ {
+ name: "fontMatrix",
+ op: 1207,
+ type: ["real", "real", "real", "real", "real", "real"],
+ value: [0.001, 0, 0, 0.001, 0, 0],
+ },
+ { name: "uniqueId", op: 13, type: "number" },
+ {
+ name: "fontBBox",
+ op: 5,
+ type: ["number", "number", "number", "number"],
+ value: [0, 0, 0, 0],
+ },
+ { name: "strokeWidth", op: 1208, type: "number", value: 0 },
+ { name: "xuid", op: 14, type: [], value: null },
+ { name: "charset", op: 15, type: "offset", value: 0 },
+ { name: "encoding", op: 16, type: "offset", value: 0 },
+ { name: "charStrings", op: 17, type: "offset", value: 0 },
+ {
+ name: "private",
+ op: 18,
+ type: ["number", "offset"],
+ value: [0, 0],
+ },
+ { name: "ros", op: 1230, type: ["SID", "SID", "number"] },
+ { name: "cidFontVersion", op: 1231, type: "number", value: 0 },
+ { name: "cidFontRevision", op: 1232, type: "number", value: 0 },
+ { name: "cidFontType", op: 1233, type: "number", value: 0 },
+ { name: "cidCount", op: 1234, type: "number", value: 8720 },
+ { name: "uidBase", op: 1235, type: "number" },
+ { name: "fdArray", op: 1236, type: "offset" },
+ { name: "fdSelect", op: 1237, type: "offset" },
+ { name: "fontName", op: 1238, type: "SID" },
+ ],
+ Ie = [
+ { name: "subrs", op: 19, type: "offset", value: 0 },
+ { name: "defaultWidthX", op: 20, type: "number", value: 0 },
+ { name: "nominalWidthX", op: 21, type: "number", value: 0 },
+ ];
+ function ke(e, t) {
+ return Te(Ce(e, 0, e.byteLength), Me, t);
+ }
+ function Re(e, t, n, r) {
+ return Te(Ce(e, t, n), Ie, r);
+ }
+ function Be(e, t, n, r) {
+ for (var i = [], a = 0; a < n.length; a += 1) {
+ var o = ke(new DataView(new Uint8Array(n[a]).buffer), r);
+ (o._subrs = []),
+ (o._subrsBias = 0),
+ (o._defaultWidthX = 0),
+ (o._nominalWidthX = 0);
+ var s = o.private[0],
+ l = o.private[1];
+ if (0 !== s && 0 !== l) {
+ var u = Re(e, l + t, s, r);
+ if (
+ ((o._defaultWidthX = u.defaultWidthX),
+ (o._nominalWidthX = u.nominalWidthX),
+ 0 !== u.subrs)
+ ) {
+ var c = Ee(e, l + u.subrs + t);
+ (o._subrs = c.objects), (o._subrsBias = Se(o._subrs));
+ }
+ o._privateDict = u;
+ }
+ i.push(o);
+ }
+ return i;
+ }
+ function Pe(e, t, n) {
+ var r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f = new C(),
+ d = [],
+ h = 0,
+ p = !1,
+ v = !1,
+ m = 0,
+ g = 0;
+ if (e.isCIDFont) {
+ var A = e.tables.cff.topDict._fdSelect[t.index],
+ y = e.tables.cff.topDict._fdArray[A];
+ (s = y._subrs),
+ (l = y._subrsBias),
+ (u = y._defaultWidthX),
+ (c = y._nominalWidthX);
+ } else
+ (s = e.tables.cff.topDict._subrs),
+ (l = e.tables.cff.topDict._subrsBias),
+ (u = e.tables.cff.topDict._defaultWidthX),
+ (c = e.tables.cff.topDict._nominalWidthX);
+ var b = u;
+ function x(e, t) {
+ v && f.closePath(), f.moveTo(e, t), (v = !0);
+ }
+ function S() {
+ d.length % 2 !== 0 && !p && (b = d.shift() + c),
+ (h += d.length >> 1),
+ (d.length = 0),
+ (p = !0);
+ }
+ return (
+ (function n(u) {
+ for (
+ var A, y, E, _, C, w, T, M, I, k, R, B, P = 0;
+ P < u.length;
+
+ ) {
+ var L = u[P];
+ switch (((P += 1), L)) {
+ case 1:
+ case 3:
+ case 18:
+ case 23:
+ S();
+ break;
+ case 4:
+ d.length > 1 && !p && ((b = d.shift() + c), (p = !0)),
+ (g += d.pop()),
+ x(m, g);
+ break;
+ case 5:
+ for (; d.length > 0; )
+ (m += d.shift()), (g += d.shift()), f.lineTo(m, g);
+ break;
+ case 6:
+ for (
+ ;
+ d.length > 0 &&
+ ((m += d.shift()), f.lineTo(m, g), 0 !== d.length);
+
+ )
+ (g += d.shift()), f.lineTo(m, g);
+ break;
+ case 7:
+ for (
+ ;
+ d.length > 0 &&
+ ((g += d.shift()), f.lineTo(m, g), 0 !== d.length);
+
+ )
+ (m += d.shift()), f.lineTo(m, g);
+ break;
+ case 8:
+ for (; d.length > 0; )
+ (r = m + d.shift()),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a + d.shift()),
+ (g = o + d.shift()),
+ f.curveTo(r, i, a, o, m, g);
+ break;
+ case 10:
+ (C = d.pop() + l), (w = s[C]) && n(w);
+ break;
+ case 11:
+ return;
+ case 12:
+ switch (((L = u[P]), (P += 1), L)) {
+ case 35:
+ (r = m + d.shift()),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (T = a + d.shift()),
+ (M = o + d.shift()),
+ (I = T + d.shift()),
+ (k = M + d.shift()),
+ (R = I + d.shift()),
+ (B = k + d.shift()),
+ (m = R + d.shift()),
+ (g = B + d.shift()),
+ d.shift(),
+ f.curveTo(r, i, a, o, T, M),
+ f.curveTo(I, k, R, B, m, g);
+ break;
+ case 34:
+ (r = m + d.shift()),
+ (i = g),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (T = a + d.shift()),
+ (M = o),
+ (I = T + d.shift()),
+ (k = o),
+ (R = I + d.shift()),
+ (B = g),
+ (m = R + d.shift()),
+ f.curveTo(r, i, a, o, T, M),
+ f.curveTo(I, k, R, B, m, g);
+ break;
+ case 36:
+ (r = m + d.shift()),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (T = a + d.shift()),
+ (M = o),
+ (I = T + d.shift()),
+ (k = o),
+ (R = I + d.shift()),
+ (B = k + d.shift()),
+ (m = R + d.shift()),
+ f.curveTo(r, i, a, o, T, M),
+ f.curveTo(I, k, R, B, m, g);
+ break;
+ case 37:
+ (r = m + d.shift()),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (T = a + d.shift()),
+ (M = o + d.shift()),
+ (I = T + d.shift()),
+ (k = M + d.shift()),
+ (R = I + d.shift()),
+ (B = k + d.shift()),
+ Math.abs(R - m) > Math.abs(B - g)
+ ? (m = R + d.shift())
+ : (g = B + d.shift()),
+ f.curveTo(r, i, a, o, T, M),
+ f.curveTo(I, k, R, B, m, g);
+ break;
+ default:
+ console.log(
+ "Glyph " + t.index + ": unknown operator 1200" + L
+ ),
+ (d.length = 0);
+ }
+ break;
+ case 14:
+ d.length > 0 && !p && ((b = d.shift() + c), (p = !0)),
+ v && (f.closePath(), (v = !1));
+ break;
+ case 19:
+ case 20:
+ S(), (P += (h + 7) >> 3);
+ break;
+ case 21:
+ d.length > 2 && !p && ((b = d.shift() + c), (p = !0)),
+ (g += d.pop()),
+ x((m += d.pop()), g);
+ break;
+ case 22:
+ d.length > 1 && !p && ((b = d.shift() + c), (p = !0)),
+ x((m += d.pop()), g);
+ break;
+ case 24:
+ for (; d.length > 2; )
+ (r = m + d.shift()),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a + d.shift()),
+ (g = o + d.shift()),
+ f.curveTo(r, i, a, o, m, g);
+ (m += d.shift()), (g += d.shift()), f.lineTo(m, g);
+ break;
+ case 25:
+ for (; d.length > 6; )
+ (m += d.shift()), (g += d.shift()), f.lineTo(m, g);
+ (r = m + d.shift()),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a + d.shift()),
+ (g = o + d.shift()),
+ f.curveTo(r, i, a, o, m, g);
+ break;
+ case 26:
+ for (d.length % 2 && (m += d.shift()); d.length > 0; )
+ (r = m),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a),
+ (g = o + d.shift()),
+ f.curveTo(r, i, a, o, m, g);
+ break;
+ case 27:
+ for (d.length % 2 && (g += d.shift()); d.length > 0; )
+ (r = m + d.shift()),
+ (i = g),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a + d.shift()),
+ (g = o),
+ f.curveTo(r, i, a, o, m, g);
+ break;
+ case 28:
+ (A = u[P]),
+ (y = u[P + 1]),
+ d.push(((A << 24) | (y << 16)) >> 16),
+ (P += 2);
+ break;
+ case 29:
+ (C = d.pop() + e.gsubrsBias), (w = e.gsubrs[C]) && n(w);
+ break;
+ case 30:
+ for (
+ ;
+ d.length > 0 &&
+ ((r = m),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a + d.shift()),
+ (g = o + (1 === d.length ? d.shift() : 0)),
+ f.curveTo(r, i, a, o, m, g),
+ 0 !== d.length);
+
+ )
+ (r = m + d.shift()),
+ (i = g),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (g = o + d.shift()),
+ (m = a + (1 === d.length ? d.shift() : 0)),
+ f.curveTo(r, i, a, o, m, g);
+ break;
+ case 31:
+ for (
+ ;
+ d.length > 0 &&
+ ((r = m + d.shift()),
+ (i = g),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (g = o + d.shift()),
+ (m = a + (1 === d.length ? d.shift() : 0)),
+ f.curveTo(r, i, a, o, m, g),
+ 0 !== d.length);
+
+ )
+ (r = m),
+ (i = g + d.shift()),
+ (a = r + d.shift()),
+ (o = i + d.shift()),
+ (m = a + d.shift()),
+ (g = o + (1 === d.length ? d.shift() : 0)),
+ f.curveTo(r, i, a, o, m, g);
+ break;
+ default:
+ L < 32
+ ? console.log(
+ "Glyph " + t.index + ": unknown operator " + L
+ )
+ : L < 247
+ ? d.push(L - 139)
+ : L < 251
+ ? ((A = u[P]),
+ (P += 1),
+ d.push(256 * (L - 247) + A + 108))
+ : L < 255
+ ? ((A = u[P]),
+ (P += 1),
+ d.push(256 * -(L - 251) - A - 108))
+ : ((A = u[P]),
+ (y = u[P + 1]),
+ (E = u[P + 2]),
+ (_ = u[P + 3]),
+ (P += 4),
+ d.push(
+ ((A << 24) | (y << 16) | (E << 8) | _) / 65536
+ ));
+ }
+ }
+ })(n),
+ (t.advanceWidth = b),
+ f
+ );
+ }
+ function Le(e, t) {
+ var n,
+ r = se.indexOf(e);
+ return (
+ r >= 0 && (n = r),
+ (r = t.indexOf(e)) >= 0
+ ? (n = r + se.length)
+ : ((n = se.length + t.length), t.push(e)),
+ n
+ );
+ }
+ function De(e, t, n) {
+ for (var r = {}, i = 0; i < e.length; i += 1) {
+ var a = e[i],
+ o = t[a.name];
+ void 0 === o ||
+ xe(o, a.value) ||
+ ("SID" === a.type && (o = Le(o, n)),
+ (r[a.op] = { name: a.name, type: a.type, value: o }));
+ }
+ return r;
+ }
+ function Ue(e, t) {
+ var n = new q.Record("Top DICT", [
+ { name: "dict", type: "DICT", value: {} },
+ ]);
+ return (n.dict = De(Me, e, t)), n;
+ }
+ function Fe(e) {
+ var t = new q.Record("Top DICT INDEX", [
+ { name: "topDicts", type: "INDEX", value: [] },
+ ]);
+ return (
+ (t.topDicts = [{ name: "topDict_0", type: "TABLE", value: e }]),
+ t
+ );
+ }
+ function Oe(e) {
+ var t = [],
+ n = e.path;
+ t.push({ name: "width", type: "NUMBER", value: e.advanceWidth });
+ for (var r = 0, i = 0, a = 0; a < n.commands.length; a += 1) {
+ var o = void 0,
+ s = void 0,
+ l = n.commands[a];
+ if ("Q" === l.type) {
+ var u = 1 / 3,
+ c = 2 / 3;
+ l = {
+ type: "C",
+ x: l.x,
+ y: l.y,
+ x1: Math.round(u * r + c * l.x1),
+ y1: Math.round(u * i + c * l.y1),
+ x2: Math.round(u * l.x + c * l.x1),
+ y2: Math.round(u * l.y + c * l.y1),
+ };
+ }
+ if ("M" === l.type)
+ (o = Math.round(l.x - r)),
+ (s = Math.round(l.y - i)),
+ t.push({ name: "dx", type: "NUMBER", value: o }),
+ t.push({ name: "dy", type: "NUMBER", value: s }),
+ t.push({ name: "rmoveto", type: "OP", value: 21 }),
+ (r = Math.round(l.x)),
+ (i = Math.round(l.y));
+ else if ("L" === l.type)
+ (o = Math.round(l.x - r)),
+ (s = Math.round(l.y - i)),
+ t.push({ name: "dx", type: "NUMBER", value: o }),
+ t.push({ name: "dy", type: "NUMBER", value: s }),
+ t.push({ name: "rlineto", type: "OP", value: 5 }),
+ (r = Math.round(l.x)),
+ (i = Math.round(l.y));
+ else if ("C" === l.type) {
+ var f = Math.round(l.x1 - r),
+ d = Math.round(l.y1 - i),
+ h = Math.round(l.x2 - l.x1),
+ p = Math.round(l.y2 - l.y1);
+ (o = Math.round(l.x - l.x2)),
+ (s = Math.round(l.y - l.y2)),
+ t.push({ name: "dx1", type: "NUMBER", value: f }),
+ t.push({ name: "dy1", type: "NUMBER", value: d }),
+ t.push({ name: "dx2", type: "NUMBER", value: h }),
+ t.push({ name: "dy2", type: "NUMBER", value: p }),
+ t.push({ name: "dx", type: "NUMBER", value: o }),
+ t.push({ name: "dy", type: "NUMBER", value: s }),
+ t.push({ name: "rrcurveto", type: "OP", value: 8 }),
+ (r = Math.round(l.x)),
+ (i = Math.round(l.y));
+ }
+ }
+ return t.push({ name: "endchar", type: "OP", value: 14 }), t;
+ }
+ var Ne = {
+ parse: function (e, t, n, r) {
+ n.tables.cff = {};
+ var i = (function (e, t) {
+ var n = {};
+ return (
+ (n.formatMajor = ie.getCard8(e, t)),
+ (n.formatMinor = ie.getCard8(e, t + 1)),
+ (n.size = ie.getCard8(e, t + 2)),
+ (n.offsetSize = ie.getCard8(e, t + 3)),
+ (n.startOffset = t),
+ (n.endOffset = t + 4),
+ n
+ );
+ })(e, t),
+ a = Ee(e, i.endOffset, ie.bytesToString),
+ o = Ee(e, a.endOffset),
+ s = Ee(e, o.endOffset, ie.bytesToString),
+ l = Ee(e, s.endOffset);
+ (n.gsubrs = l.objects), (n.gsubrsBias = Se(n.gsubrs));
+ var u = Be(e, t, o.objects, s.objects);
+ if (1 !== u.length)
+ throw new Error(
+ "CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " +
+ u.length
+ );
+ var c = u[0];
+ if (
+ ((n.tables.cff.topDict = c),
+ c._privateDict &&
+ ((n.defaultWidthX = c._privateDict.defaultWidthX),
+ (n.nominalWidthX = c._privateDict.nominalWidthX)),
+ void 0 !== c.ros[0] &&
+ void 0 !== c.ros[1] &&
+ (n.isCIDFont = !0),
+ n.isCIDFont)
+ ) {
+ var f = c.fdArray,
+ d = c.fdSelect;
+ if (0 === f || 0 === d)
+ throw new Error(
+ "Font is marked as a CID font, but FDArray and/or FDSelect information is missing"
+ );
+ var h = Ee(e, (f += t)),
+ p = Be(e, t, h.objects, s.objects);
+ (c._fdArray = p),
+ (d += t),
+ (c._fdSelect = (function (e, t, n, r) {
+ var i,
+ a = [],
+ o = new ie.Parser(e, t),
+ s = o.parseCard8();
+ if (0 === s)
+ for (var l = 0; l < n; l++) {
+ if ((i = o.parseCard8()) >= r)
+ throw new Error(
+ "CFF table CID Font FDSelect has bad FD index value " +
+ i +
+ " (FD count " +
+ r +
+ ")"
+ );
+ a.push(i);
+ }
+ else {
+ if (3 !== s)
+ throw new Error(
+ "CFF Table CID Font FDSelect table has unsupported format " +
+ s
+ );
+ var u,
+ c = o.parseCard16(),
+ f = o.parseCard16();
+ if (0 !== f)
+ throw new Error(
+ "CFF Table CID Font FDSelect format 3 range has bad initial GID " +
+ f
+ );
+ for (var d = 0; d < c; d++) {
+ if (
+ ((i = o.parseCard8()),
+ (u = o.parseCard16()),
+ i >= r)
+ )
+ throw new Error(
+ "CFF table CID Font FDSelect has bad FD index value " +
+ i +
+ " (FD count " +
+ r +
+ ")"
+ );
+ if (u > n)
+ throw new Error(
+ "CFF Table CID Font FDSelect format 3 range has bad GID " +
+ u
+ );
+ for (; f < u; f++) a.push(i);
+ f = u;
+ }
+ if (u !== n)
+ throw new Error(
+ "CFF Table CID Font FDSelect format 3 range has bad final GID " +
+ u
+ );
+ }
+ return a;
+ })(e, d, n.numGlyphs, p.length));
+ }
+ var v,
+ m = t + c.private[1],
+ g = Re(e, m, c.private[0], s.objects);
+ if (
+ ((n.defaultWidthX = g.defaultWidthX),
+ (n.nominalWidthX = g.nominalWidthX),
+ 0 !== g.subrs)
+ ) {
+ var A = m + g.subrs,
+ y = Ee(e, A);
+ (n.subrs = y.objects), (n.subrsBias = Se(n.subrs));
+ } else (n.subrs = []), (n.subrsBias = 0);
+ r.lowMemory
+ ? ((v = (function (e, t) {
+ var n,
+ r,
+ i = [],
+ a = ie.getCard16(e, t);
+ if (0 !== a) {
+ var o = ie.getByte(e, t + 2);
+ n = t + (a + 1) * o + 2;
+ for (var s = t + 3, l = 0; l < a + 1; l += 1)
+ i.push(ie.getOffset(e, s, o)), (s += o);
+ r = n + i[a];
+ } else r = t + 2;
+ return { offsets: i, startOffset: t, endOffset: r };
+ })(e, t + c.charStrings)),
+ (n.nGlyphs = v.offsets.length))
+ : ((v = Ee(e, t + c.charStrings)),
+ (n.nGlyphs = v.objects.length));
+ var b = (function (e, t, n, r) {
+ var i,
+ a,
+ o = new ie.Parser(e, t);
+ n -= 1;
+ var s = [".notdef"],
+ l = o.parseCard8();
+ if (0 === l)
+ for (var u = 0; u < n; u += 1)
+ (i = o.parseSID()), s.push(we(r, i));
+ else if (1 === l)
+ for (; s.length <= n; ) {
+ (i = o.parseSID()), (a = o.parseCard8());
+ for (var c = 0; c <= a; c += 1)
+ s.push(we(r, i)), (i += 1);
+ }
+ else {
+ if (2 !== l) throw new Error("Unknown charset format " + l);
+ for (; s.length <= n; ) {
+ (i = o.parseSID()), (a = o.parseCard16());
+ for (var f = 0; f <= a; f += 1)
+ s.push(we(r, i)), (i += 1);
+ }
+ }
+ return s;
+ })(e, t + c.charset, n.nGlyphs, s.objects);
+ if (
+ (0 === c.encoding
+ ? (n.cffEncoding = new he(le, b))
+ : 1 === c.encoding
+ ? (n.cffEncoding = new he(ue, b))
+ : (n.cffEncoding = (function (e, t, n) {
+ var r,
+ i = {},
+ a = new ie.Parser(e, t),
+ o = a.parseCard8();
+ if (0 === o)
+ for (var s = a.parseCard8(), l = 0; l < s; l += 1)
+ i[(r = a.parseCard8())] = l;
+ else {
+ if (1 !== o)
+ throw new Error("Unknown encoding format " + o);
+ var u = a.parseCard8();
+ r = 1;
+ for (var c = 0; c < u; c += 1)
+ for (
+ var f = a.parseCard8(), d = a.parseCard8(), h = f;
+ h <= f + d;
+ h += 1
+ )
+ (i[h] = r), (r += 1);
+ }
+ return new he(i, n);
+ })(e, t + c.encoding, b)),
+ (n.encoding = n.encoding || n.cffEncoding),
+ (n.glyphs = new be.GlyphSet(n)),
+ r.lowMemory)
+ )
+ n._push = function (r) {
+ var i = (function (e, t, n, r, i) {
+ var a = ie.getCard16(n, r),
+ o = 0;
+ 0 !== a && (o = r + (a + 1) * ie.getByte(n, r + 2) + 2);
+ var s = ie.getBytes(n, o + t[e], o + t[e + 1]);
+ return i && (s = i(s)), s;
+ })(r, v.offsets, e, t + c.charStrings);
+ n.glyphs.push(r, be.cffGlyphLoader(n, r, Pe, i));
+ };
+ else
+ for (var x = 0; x < n.nGlyphs; x += 1) {
+ var S = v.objects[x];
+ n.glyphs.push(x, be.cffGlyphLoader(n, x, Pe, S));
+ }
+ },
+ make: function (e, t) {
+ for (
+ var n,
+ r = new q.Table("CFF ", [
+ { name: "header", type: "RECORD" },
+ { name: "nameIndex", type: "RECORD" },
+ { name: "topDictIndex", type: "RECORD" },
+ { name: "stringIndex", type: "RECORD" },
+ { name: "globalSubrIndex", type: "RECORD" },
+ { name: "charsets", type: "RECORD" },
+ { name: "charStringsIndex", type: "RECORD" },
+ { name: "privateDict", type: "RECORD" },
+ ]),
+ i = 1 / t.unitsPerEm,
+ a = {
+ version: t.version,
+ fullName: t.fullName,
+ familyName: t.familyName,
+ weight: t.weightName,
+ fontBBox: t.fontBBox || [0, 0, 0, 0],
+ fontMatrix: [i, 0, 0, i, 0, 0],
+ charset: 999,
+ encoding: 0,
+ charStrings: 999,
+ private: [0, 999],
+ },
+ o = [],
+ s = 1;
+ s < e.length;
+ s += 1
+ )
+ (n = e.get(s)), o.push(n.name);
+ var l = [];
+ (r.header = new q.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 },
+ ])),
+ (r.nameIndex = (function (e) {
+ var t = new q.Record("Name INDEX", [
+ { name: "names", type: "INDEX", value: [] },
+ ]);
+ t.names = [];
+ for (var n = 0; n < e.length; n += 1)
+ t.names.push({
+ name: "name_" + n,
+ type: "NAME",
+ value: e[n],
+ });
+ return t;
+ })([t.postScriptName]));
+ var u = Ue(a, l);
+ (r.topDictIndex = Fe(u)),
+ (r.globalSubrIndex = new q.Record("Global Subr INDEX", [
+ { name: "subrs", type: "INDEX", value: [] },
+ ])),
+ (r.charsets = (function (e, t) {
+ for (
+ var n = new q.Record("Charsets", [
+ { name: "format", type: "Card8", value: 0 },
+ ]),
+ r = 0;
+ r < e.length;
+ r += 1
+ ) {
+ var i = Le(e[r], t);
+ n.fields.push({
+ name: "glyph_" + r,
+ type: "SID",
+ value: i,
+ });
+ }
+ return n;
+ })(o, l)),
+ (r.charStringsIndex = (function (e) {
+ for (
+ var t = new q.Record("CharStrings INDEX", [
+ { name: "charStrings", type: "INDEX", value: [] },
+ ]),
+ n = 0;
+ n < e.length;
+ n += 1
+ ) {
+ var r = e.get(n),
+ i = Oe(r);
+ t.charStrings.push({
+ name: r.name,
+ type: "CHARSTRING",
+ value: i,
+ });
+ }
+ return t;
+ })(e)),
+ (r.privateDict = (function (e, t) {
+ var n = new q.Record("Private DICT", [
+ { name: "dict", type: "DICT", value: {} },
+ ]);
+ return (n.dict = De(Ie, e, t)), n;
+ })({}, l)),
+ (r.stringIndex = (function (e) {
+ var t = new q.Record("String INDEX", [
+ { name: "strings", type: "INDEX", value: [] },
+ ]);
+ t.strings = [];
+ for (var n = 0; n < e.length; n += 1)
+ t.strings.push({
+ name: "string_" + n,
+ type: "STRING",
+ value: e[n],
+ });
+ return t;
+ })(l));
+ var c =
+ r.header.sizeOf() +
+ r.nameIndex.sizeOf() +
+ r.topDictIndex.sizeOf() +
+ r.stringIndex.sizeOf() +
+ r.globalSubrIndex.sizeOf();
+ return (
+ (a.charset = c),
+ (a.encoding = 0),
+ (a.charStrings = a.charset + r.charsets.sizeOf()),
+ (a.private[1] = a.charStrings + r.charStringsIndex.sizeOf()),
+ (u = Ue(a, l)),
+ (r.topDictIndex = Fe(u)),
+ r
+ );
+ },
+ };
+ var Ge = {
+ parse: function (e, t) {
+ var n = {},
+ r = new ie.Parser(e, t);
+ return (
+ (n.version = r.parseVersion()),
+ (n.fontRevision = Math.round(1e3 * r.parseFixed()) / 1e3),
+ (n.checkSumAdjustment = r.parseULong()),
+ (n.magicNumber = r.parseULong()),
+ M.argument(
+ 1594834165 === n.magicNumber,
+ "Font header has wrong magic number."
+ ),
+ (n.flags = r.parseUShort()),
+ (n.unitsPerEm = r.parseUShort()),
+ (n.created = r.parseLongDateTime()),
+ (n.modified = r.parseLongDateTime()),
+ (n.xMin = r.parseShort()),
+ (n.yMin = r.parseShort()),
+ (n.xMax = r.parseShort()),
+ (n.yMax = r.parseShort()),
+ (n.macStyle = r.parseUShort()),
+ (n.lowestRecPPEM = r.parseUShort()),
+ (n.fontDirectionHint = r.parseShort()),
+ (n.indexToLocFormat = r.parseShort()),
+ (n.glyphDataFormat = r.parseShort()),
+ n
+ );
+ },
+ make: function (e) {
+ var t = Math.round(new Date().getTime() / 1e3) + 2082844800,
+ n = t;
+ return (
+ e.createdTimestamp && (n = e.createdTimestamp + 2082844800),
+ new q.Table(
+ "head",
+ [
+ { name: "version", type: "FIXED", value: 65536 },
+ { name: "fontRevision", type: "FIXED", value: 65536 },
+ { name: "checkSumAdjustment", type: "ULONG", value: 0 },
+ { name: "magicNumber", type: "ULONG", value: 1594834165 },
+ { name: "flags", type: "USHORT", value: 0 },
+ { name: "unitsPerEm", type: "USHORT", value: 1e3 },
+ { name: "created", type: "LONGDATETIME", value: n },
+ { name: "modified", type: "LONGDATETIME", value: t },
+ { name: "xMin", type: "SHORT", value: 0 },
+ { name: "yMin", type: "SHORT", value: 0 },
+ { name: "xMax", type: "SHORT", value: 0 },
+ { name: "yMax", type: "SHORT", value: 0 },
+ { name: "macStyle", type: "USHORT", value: 0 },
+ { name: "lowestRecPPEM", type: "USHORT", value: 0 },
+ { name: "fontDirectionHint", type: "SHORT", value: 2 },
+ { name: "indexToLocFormat", type: "SHORT", value: 0 },
+ { name: "glyphDataFormat", type: "SHORT", value: 0 },
+ ],
+ e
+ )
+ );
+ },
+ };
+ var Ze = {
+ parse: function (e, t) {
+ var n = {},
+ r = new ie.Parser(e, t);
+ return (
+ (n.version = r.parseVersion()),
+ (n.ascender = r.parseShort()),
+ (n.descender = r.parseShort()),
+ (n.lineGap = r.parseShort()),
+ (n.advanceWidthMax = r.parseUShort()),
+ (n.minLeftSideBearing = r.parseShort()),
+ (n.minRightSideBearing = r.parseShort()),
+ (n.xMaxExtent = r.parseShort()),
+ (n.caretSlopeRise = r.parseShort()),
+ (n.caretSlopeRun = r.parseShort()),
+ (n.caretOffset = r.parseShort()),
+ (r.relativeOffset += 8),
+ (n.metricDataFormat = r.parseShort()),
+ (n.numberOfHMetrics = r.parseUShort()),
+ n
+ );
+ },
+ make: function (e) {
+ return new q.Table(
+ "hhea",
+ [
+ { name: "version", type: "FIXED", value: 65536 },
+ { name: "ascender", type: "FWORD", value: 0 },
+ { name: "descender", type: "FWORD", value: 0 },
+ { name: "lineGap", type: "FWORD", value: 0 },
+ { name: "advanceWidthMax", type: "UFWORD", value: 0 },
+ { name: "minLeftSideBearing", type: "FWORD", value: 0 },
+ { name: "minRightSideBearing", type: "FWORD", value: 0 },
+ { name: "xMaxExtent", type: "FWORD", value: 0 },
+ { name: "caretSlopeRise", type: "SHORT", value: 1 },
+ { name: "caretSlopeRun", type: "SHORT", value: 0 },
+ { name: "caretOffset", type: "SHORT", value: 0 },
+ { name: "reserved1", type: "SHORT", value: 0 },
+ { name: "reserved2", type: "SHORT", value: 0 },
+ { name: "reserved3", type: "SHORT", value: 0 },
+ { name: "reserved4", type: "SHORT", value: 0 },
+ { name: "metricDataFormat", type: "SHORT", value: 0 },
+ { name: "numberOfHMetrics", type: "USHORT", value: 0 },
+ ],
+ e
+ );
+ },
+ };
+ var ze = {
+ parse: function (e, t, n, r, i, a, o) {
+ o.lowMemory
+ ? (function (e, t, n, r, i) {
+ var a, o;
+ e._hmtxTableData = {};
+ for (var s = new ie.Parser(t, n), l = 0; l < i; l += 1)
+ l < r && ((a = s.parseUShort()), (o = s.parseShort())),
+ (e._hmtxTableData[l] = {
+ advanceWidth: a,
+ leftSideBearing: o,
+ });
+ })(e, t, n, r, i)
+ : (function (e, t, n, r, i) {
+ for (
+ var a, o, s = new ie.Parser(e, t), l = 0;
+ l < r;
+ l += 1
+ ) {
+ l < n && ((a = s.parseUShort()), (o = s.parseShort()));
+ var u = i.get(l);
+ (u.advanceWidth = a), (u.leftSideBearing = o);
+ }
+ })(t, n, r, i, a);
+ },
+ make: function (e) {
+ for (
+ var t = new q.Table("hmtx", []), n = 0;
+ n < e.length;
+ n += 1
+ ) {
+ var r = e.get(n),
+ i = r.advanceWidth || 0,
+ a = r.leftSideBearing || 0;
+ t.fields.push({
+ name: "advanceWidth_" + n,
+ type: "USHORT",
+ value: i,
+ }),
+ t.fields.push({
+ name: "leftSideBearing_" + n,
+ type: "SHORT",
+ value: a,
+ });
+ }
+ return t;
+ },
+ };
+ var Qe = {
+ make: function (e) {
+ for (
+ var t = new q.Table("ltag", [
+ { name: "version", type: "ULONG", value: 1 },
+ { name: "flags", type: "ULONG", value: 0 },
+ { name: "numTags", type: "ULONG", value: e.length },
+ ]),
+ n = "",
+ r = 12 + 4 * e.length,
+ i = 0;
+ i < e.length;
+ ++i
+ ) {
+ var a = n.indexOf(e[i]);
+ a < 0 && ((a = n.length), (n += e[i])),
+ t.fields.push({
+ name: "offset " + i,
+ type: "USHORT",
+ value: r + a,
+ }),
+ t.fields.push({
+ name: "length " + i,
+ type: "USHORT",
+ value: e[i].length,
+ });
+ }
+ return (
+ t.fields.push({
+ name: "stringPool",
+ type: "CHARARRAY",
+ value: n,
+ }),
+ t
+ );
+ },
+ parse: function (e, t) {
+ var n = new ie.Parser(e, t),
+ r = n.parseULong();
+ M.argument(1 === r, "Unsupported ltag table version."),
+ n.skip("uLong", 1);
+ for (var i = n.parseULong(), a = [], o = 0; o < i; o++) {
+ for (
+ var s = "",
+ l = t + n.parseUShort(),
+ u = n.parseUShort(),
+ c = l;
+ c < l + u;
+ ++c
+ )
+ s += String.fromCharCode(e.getInt8(c));
+ a.push(s);
+ }
+ return a;
+ },
+ };
+ var He = {
+ parse: function (e, t) {
+ var n = {},
+ r = new ie.Parser(e, t);
+ return (
+ (n.version = r.parseVersion()),
+ (n.numGlyphs = r.parseUShort()),
+ 1 === n.version &&
+ ((n.maxPoints = r.parseUShort()),
+ (n.maxContours = r.parseUShort()),
+ (n.maxCompositePoints = r.parseUShort()),
+ (n.maxCompositeContours = r.parseUShort()),
+ (n.maxZones = r.parseUShort()),
+ (n.maxTwilightPoints = r.parseUShort()),
+ (n.maxStorage = r.parseUShort()),
+ (n.maxFunctionDefs = r.parseUShort()),
+ (n.maxInstructionDefs = r.parseUShort()),
+ (n.maxStackElements = r.parseUShort()),
+ (n.maxSizeOfInstructions = r.parseUShort()),
+ (n.maxComponentElements = r.parseUShort()),
+ (n.maxComponentDepth = r.parseUShort())),
+ n
+ );
+ },
+ make: function (e) {
+ return new q.Table("maxp", [
+ { name: "version", type: "FIXED", value: 20480 },
+ { name: "numGlyphs", type: "USHORT", value: e },
+ ]);
+ },
+ },
+ Ve = [
+ "copyright",
+ "fontFamily",
+ "fontSubfamily",
+ "uniqueID",
+ "fullName",
+ "version",
+ "postScriptName",
+ "trademark",
+ "manufacturer",
+ "designer",
+ "description",
+ "manufacturerURL",
+ "designerURL",
+ "license",
+ "licenseURL",
+ "reserved",
+ "preferredFamily",
+ "preferredSubfamily",
+ "compatibleFullName",
+ "sampleText",
+ "postScriptFindFontName",
+ "wwsFamily",
+ "wwsSubfamily",
+ ],
+ je = {
+ 0: "en",
+ 1: "fr",
+ 2: "de",
+ 3: "it",
+ 4: "nl",
+ 5: "sv",
+ 6: "es",
+ 7: "da",
+ 8: "pt",
+ 9: "no",
+ 10: "he",
+ 11: "ja",
+ 12: "ar",
+ 13: "fi",
+ 14: "el",
+ 15: "is",
+ 16: "mt",
+ 17: "tr",
+ 18: "hr",
+ 19: "zh-Hant",
+ 20: "ur",
+ 21: "hi",
+ 22: "th",
+ 23: "ko",
+ 24: "lt",
+ 25: "pl",
+ 26: "hu",
+ 27: "es",
+ 28: "lv",
+ 29: "se",
+ 30: "fo",
+ 31: "fa",
+ 32: "ru",
+ 33: "zh",
+ 34: "nl-BE",
+ 35: "ga",
+ 36: "sq",
+ 37: "ro",
+ 38: "cz",
+ 39: "sk",
+ 40: "si",
+ 41: "yi",
+ 42: "sr",
+ 43: "mk",
+ 44: "bg",
+ 45: "uk",
+ 46: "be",
+ 47: "uz",
+ 48: "kk",
+ 49: "az-Cyrl",
+ 50: "az-Arab",
+ 51: "hy",
+ 52: "ka",
+ 53: "mo",
+ 54: "ky",
+ 55: "tg",
+ 56: "tk",
+ 57: "mn-CN",
+ 58: "mn",
+ 59: "ps",
+ 60: "ks",
+ 61: "ku",
+ 62: "sd",
+ 63: "bo",
+ 64: "ne",
+ 65: "sa",
+ 66: "mr",
+ 67: "bn",
+ 68: "as",
+ 69: "gu",
+ 70: "pa",
+ 71: "or",
+ 72: "ml",
+ 73: "kn",
+ 74: "ta",
+ 75: "te",
+ 76: "si",
+ 77: "my",
+ 78: "km",
+ 79: "lo",
+ 80: "vi",
+ 81: "id",
+ 82: "tl",
+ 83: "ms",
+ 84: "ms-Arab",
+ 85: "am",
+ 86: "ti",
+ 87: "om",
+ 88: "so",
+ 89: "sw",
+ 90: "rw",
+ 91: "rn",
+ 92: "ny",
+ 93: "mg",
+ 94: "eo",
+ 128: "cy",
+ 129: "eu",
+ 130: "ca",
+ 131: "la",
+ 132: "qu",
+ 133: "gn",
+ 134: "ay",
+ 135: "tt",
+ 136: "ug",
+ 137: "dz",
+ 138: "jv",
+ 139: "su",
+ 140: "gl",
+ 141: "af",
+ 142: "br",
+ 143: "iu",
+ 144: "gd",
+ 145: "gv",
+ 146: "ga",
+ 147: "to",
+ 148: "el-polyton",
+ 149: "kl",
+ 150: "az",
+ 151: "nn",
+ },
+ We = {
+ 0: 0,
+ 1: 0,
+ 2: 0,
+ 3: 0,
+ 4: 0,
+ 5: 0,
+ 6: 0,
+ 7: 0,
+ 8: 0,
+ 9: 0,
+ 10: 5,
+ 11: 1,
+ 12: 4,
+ 13: 0,
+ 14: 6,
+ 15: 0,
+ 16: 0,
+ 17: 0,
+ 18: 0,
+ 19: 2,
+ 20: 4,
+ 21: 9,
+ 22: 21,
+ 23: 3,
+ 24: 29,
+ 25: 29,
+ 26: 29,
+ 27: 29,
+ 28: 29,
+ 29: 0,
+ 30: 0,
+ 31: 4,
+ 32: 7,
+ 33: 25,
+ 34: 0,
+ 35: 0,
+ 36: 0,
+ 37: 0,
+ 38: 29,
+ 39: 29,
+ 40: 0,
+ 41: 5,
+ 42: 7,
+ 43: 7,
+ 44: 7,
+ 45: 7,
+ 46: 7,
+ 47: 7,
+ 48: 7,
+ 49: 7,
+ 50: 4,
+ 51: 24,
+ 52: 23,
+ 53: 7,
+ 54: 7,
+ 55: 7,
+ 56: 7,
+ 57: 27,
+ 58: 7,
+ 59: 4,
+ 60: 4,
+ 61: 4,
+ 62: 4,
+ 63: 26,
+ 64: 9,
+ 65: 9,
+ 66: 9,
+ 67: 13,
+ 68: 13,
+ 69: 11,
+ 70: 10,
+ 71: 12,
+ 72: 17,
+ 73: 16,
+ 74: 14,
+ 75: 15,
+ 76: 18,
+ 77: 19,
+ 78: 20,
+ 79: 22,
+ 80: 30,
+ 81: 0,
+ 82: 0,
+ 83: 0,
+ 84: 4,
+ 85: 28,
+ 86: 28,
+ 87: 28,
+ 88: 0,
+ 89: 0,
+ 90: 0,
+ 91: 0,
+ 92: 0,
+ 93: 0,
+ 94: 0,
+ 128: 0,
+ 129: 0,
+ 130: 0,
+ 131: 0,
+ 132: 0,
+ 133: 0,
+ 134: 0,
+ 135: 7,
+ 136: 4,
+ 137: 26,
+ 138: 0,
+ 139: 0,
+ 140: 0,
+ 141: 0,
+ 142: 0,
+ 143: 28,
+ 144: 0,
+ 145: 0,
+ 146: 0,
+ 147: 0,
+ 148: 6,
+ 149: 0,
+ 150: 0,
+ 151: 0,
+ },
+ Xe = {
+ 1078: "af",
+ 1052: "sq",
+ 1156: "gsw",
+ 1118: "am",
+ 5121: "ar-DZ",
+ 15361: "ar-BH",
+ 3073: "ar",
+ 2049: "ar-IQ",
+ 11265: "ar-JO",
+ 13313: "ar-KW",
+ 12289: "ar-LB",
+ 4097: "ar-LY",
+ 6145: "ary",
+ 8193: "ar-OM",
+ 16385: "ar-QA",
+ 1025: "ar-SA",
+ 10241: "ar-SY",
+ 7169: "aeb",
+ 14337: "ar-AE",
+ 9217: "ar-YE",
+ 1067: "hy",
+ 1101: "as",
+ 2092: "az-Cyrl",
+ 1068: "az",
+ 1133: "ba",
+ 1069: "eu",
+ 1059: "be",
+ 2117: "bn",
+ 1093: "bn-IN",
+ 8218: "bs-Cyrl",
+ 5146: "bs",
+ 1150: "br",
+ 1026: "bg",
+ 1027: "ca",
+ 3076: "zh-HK",
+ 5124: "zh-MO",
+ 2052: "zh",
+ 4100: "zh-SG",
+ 1028: "zh-TW",
+ 1155: "co",
+ 1050: "hr",
+ 4122: "hr-BA",
+ 1029: "cs",
+ 1030: "da",
+ 1164: "prs",
+ 1125: "dv",
+ 2067: "nl-BE",
+ 1043: "nl",
+ 3081: "en-AU",
+ 10249: "en-BZ",
+ 4105: "en-CA",
+ 9225: "en-029",
+ 16393: "en-IN",
+ 6153: "en-IE",
+ 8201: "en-JM",
+ 17417: "en-MY",
+ 5129: "en-NZ",
+ 13321: "en-PH",
+ 18441: "en-SG",
+ 7177: "en-ZA",
+ 11273: "en-TT",
+ 2057: "en-GB",
+ 1033: "en",
+ 12297: "en-ZW",
+ 1061: "et",
+ 1080: "fo",
+ 1124: "fil",
+ 1035: "fi",
+ 2060: "fr-BE",
+ 3084: "fr-CA",
+ 1036: "fr",
+ 5132: "fr-LU",
+ 6156: "fr-MC",
+ 4108: "fr-CH",
+ 1122: "fy",
+ 1110: "gl",
+ 1079: "ka",
+ 3079: "de-AT",
+ 1031: "de",
+ 5127: "de-LI",
+ 4103: "de-LU",
+ 2055: "de-CH",
+ 1032: "el",
+ 1135: "kl",
+ 1095: "gu",
+ 1128: "ha",
+ 1037: "he",
+ 1081: "hi",
+ 1038: "hu",
+ 1039: "is",
+ 1136: "ig",
+ 1057: "id",
+ 1117: "iu",
+ 2141: "iu-Latn",
+ 2108: "ga",
+ 1076: "xh",
+ 1077: "zu",
+ 1040: "it",
+ 2064: "it-CH",
+ 1041: "ja",
+ 1099: "kn",
+ 1087: "kk",
+ 1107: "km",
+ 1158: "quc",
+ 1159: "rw",
+ 1089: "sw",
+ 1111: "kok",
+ 1042: "ko",
+ 1088: "ky",
+ 1108: "lo",
+ 1062: "lv",
+ 1063: "lt",
+ 2094: "dsb",
+ 1134: "lb",
+ 1071: "mk",
+ 2110: "ms-BN",
+ 1086: "ms",
+ 1100: "ml",
+ 1082: "mt",
+ 1153: "mi",
+ 1146: "arn",
+ 1102: "mr",
+ 1148: "moh",
+ 1104: "mn",
+ 2128: "mn-CN",
+ 1121: "ne",
+ 1044: "nb",
+ 2068: "nn",
+ 1154: "oc",
+ 1096: "or",
+ 1123: "ps",
+ 1045: "pl",
+ 1046: "pt",
+ 2070: "pt-PT",
+ 1094: "pa",
+ 1131: "qu-BO",
+ 2155: "qu-EC",
+ 3179: "qu",
+ 1048: "ro",
+ 1047: "rm",
+ 1049: "ru",
+ 9275: "smn",
+ 4155: "smj-NO",
+ 5179: "smj",
+ 3131: "se-FI",
+ 1083: "se",
+ 2107: "se-SE",
+ 8251: "sms",
+ 6203: "sma-NO",
+ 7227: "sms",
+ 1103: "sa",
+ 7194: "sr-Cyrl-BA",
+ 3098: "sr",
+ 6170: "sr-Latn-BA",
+ 2074: "sr-Latn",
+ 1132: "nso",
+ 1074: "tn",
+ 1115: "si",
+ 1051: "sk",
+ 1060: "sl",
+ 11274: "es-AR",
+ 16394: "es-BO",
+ 13322: "es-CL",
+ 9226: "es-CO",
+ 5130: "es-CR",
+ 7178: "es-DO",
+ 12298: "es-EC",
+ 17418: "es-SV",
+ 4106: "es-GT",
+ 18442: "es-HN",
+ 2058: "es-MX",
+ 19466: "es-NI",
+ 6154: "es-PA",
+ 15370: "es-PY",
+ 10250: "es-PE",
+ 20490: "es-PR",
+ 3082: "es",
+ 1034: "es",
+ 21514: "es-US",
+ 14346: "es-UY",
+ 8202: "es-VE",
+ 2077: "sv-FI",
+ 1053: "sv",
+ 1114: "syr",
+ 1064: "tg",
+ 2143: "tzm",
+ 1097: "ta",
+ 1092: "tt",
+ 1098: "te",
+ 1054: "th",
+ 1105: "bo",
+ 1055: "tr",
+ 1090: "tk",
+ 1152: "ug",
+ 1058: "uk",
+ 1070: "hsb",
+ 1056: "ur",
+ 2115: "uz-Cyrl",
+ 1091: "uz",
+ 1066: "vi",
+ 1106: "cy",
+ 1160: "wo",
+ 1157: "sah",
+ 1144: "ii",
+ 1130: "yo",
+ };
+ function Ye(e, t, n) {
+ switch (e) {
+ case 0:
+ if (65535 === t) return "und";
+ if (n) return n[t];
+ break;
+ case 1:
+ return je[t];
+ case 3:
+ return Xe[t];
+ }
+ }
+ var qe = "utf-16",
+ Je = {
+ 0: "macintosh",
+ 1: "x-mac-japanese",
+ 2: "x-mac-chinesetrad",
+ 3: "x-mac-korean",
+ 6: "x-mac-greek",
+ 7: "x-mac-cyrillic",
+ 9: "x-mac-devanagai",
+ 10: "x-mac-gurmukhi",
+ 11: "x-mac-gujarati",
+ 12: "x-mac-oriya",
+ 13: "x-mac-bengali",
+ 14: "x-mac-tamil",
+ 15: "x-mac-telugu",
+ 16: "x-mac-kannada",
+ 17: "x-mac-malayalam",
+ 18: "x-mac-sinhalese",
+ 19: "x-mac-burmese",
+ 20: "x-mac-khmer",
+ 21: "x-mac-thai",
+ 22: "x-mac-lao",
+ 23: "x-mac-georgian",
+ 24: "x-mac-armenian",
+ 25: "x-mac-chinesesimp",
+ 26: "x-mac-tibetan",
+ 27: "x-mac-mongolian",
+ 28: "x-mac-ethiopic",
+ 29: "x-mac-ce",
+ 30: "x-mac-vietnamese",
+ 31: "x-mac-extarabic",
+ },
+ Ke = {
+ 15: "x-mac-icelandic",
+ 17: "x-mac-turkish",
+ 18: "x-mac-croatian",
+ 24: "x-mac-ce",
+ 25: "x-mac-ce",
+ 26: "x-mac-ce",
+ 27: "x-mac-ce",
+ 28: "x-mac-ce",
+ 30: "x-mac-icelandic",
+ 37: "x-mac-romanian",
+ 38: "x-mac-ce",
+ 39: "x-mac-ce",
+ 40: "x-mac-ce",
+ 143: "x-mac-inuit",
+ 146: "x-mac-gaelic",
+ };
+ function $e(e, t, n) {
+ switch (e) {
+ case 0:
+ return qe;
+ case 1:
+ return Ke[n] || Je[t];
+ case 3:
+ if (1 === t || 10 === t) return qe;
+ }
+ }
+ function et(e) {
+ var t = {};
+ for (var n in e) t[e[n]] = parseInt(n);
+ return t;
+ }
+ function tt(e, t, n, r, i, a) {
+ return new q.Record("NameRecord", [
+ { name: "platformID", type: "USHORT", value: e },
+ { name: "encodingID", type: "USHORT", value: t },
+ { name: "languageID", type: "USHORT", value: n },
+ { name: "nameID", type: "USHORT", value: r },
+ { name: "length", type: "USHORT", value: i },
+ { name: "offset", type: "USHORT", value: a },
+ ]);
+ }
+ function nt(e, t) {
+ var n = (function (e, t) {
+ var n = e.length,
+ r = t.length - n + 1;
+ e: for (var i = 0; i < r; i++)
+ for (; i < r; i++) {
+ for (var a = 0; a < n; a++)
+ if (t[i + a] !== e[a]) continue e;
+ return i;
+ }
+ return -1;
+ })(e, t);
+ if (n < 0) {
+ n = t.length;
+ for (var r = 0, i = e.length; r < i; ++r) t.push(e[r]);
+ }
+ return n;
+ }
+ var rt = {
+ parse: function (e, t, n) {
+ for (
+ var r = {},
+ i = new ie.Parser(e, t),
+ a = i.parseUShort(),
+ o = i.parseUShort(),
+ s = i.offset + i.parseUShort(),
+ l = 0;
+ l < o;
+ l++
+ ) {
+ var u = i.parseUShort(),
+ c = i.parseUShort(),
+ f = i.parseUShort(),
+ d = i.parseUShort(),
+ h = Ve[d] || d,
+ p = i.parseUShort(),
+ v = i.parseUShort(),
+ m = Ye(u, f, n),
+ g = $e(u, c, f);
+ if (void 0 !== g && void 0 !== m) {
+ var A = void 0;
+ if (
+ (A =
+ g === qe
+ ? k.UTF16(e, s + v, p)
+ : k.MACSTRING(e, s + v, p, g))
+ ) {
+ var y = r[h];
+ void 0 === y && (y = r[h] = {}), (y[m] = A);
+ }
+ }
+ }
+ return 1 === a && i.parseUShort(), r;
+ },
+ make: function (e, t) {
+ var n,
+ r = [],
+ i = {},
+ a = et(Ve);
+ for (var o in e) {
+ var s = a[o];
+ if ((void 0 === s && (s = o), (n = parseInt(s)), isNaN(n)))
+ throw new Error(
+ 'Name table entry "' +
+ o +
+ '" does not exist, see nameTableNames for complete list.'
+ );
+ (i[n] = e[o]), r.push(n);
+ }
+ for (
+ var l = et(je), u = et(Xe), c = [], f = [], d = 0;
+ d < r.length;
+ d++
+ ) {
+ var h = i[(n = r[d])];
+ for (var p in h) {
+ var v = h[p],
+ m = 1,
+ g = l[p],
+ A = We[g],
+ y = $e(m, A, g),
+ b = R.MACSTRING(v, y);
+ void 0 === b &&
+ ((m = 0),
+ (g = t.indexOf(p)) < 0 && ((g = t.length), t.push(p)),
+ (A = 4),
+ (b = R.UTF16(v)));
+ var x = nt(b, f);
+ c.push(tt(m, A, g, n, b.length, x));
+ var S = u[p];
+ if (void 0 !== S) {
+ var E = R.UTF16(v),
+ _ = nt(E, f);
+ c.push(tt(3, 1, S, n, E.length, _));
+ }
+ }
+ }
+ c.sort(function (e, t) {
+ return (
+ e.platformID - t.platformID ||
+ e.encodingID - t.encodingID ||
+ e.languageID - t.languageID ||
+ e.nameID - t.nameID
+ );
+ });
+ for (
+ var C = new q.Table("name", [
+ { name: "format", type: "USHORT", value: 0 },
+ { name: "count", type: "USHORT", value: c.length },
+ {
+ name: "stringOffset",
+ type: "USHORT",
+ value: 6 + 12 * c.length,
+ },
+ ]),
+ w = 0;
+ w < c.length;
+ w++
+ )
+ C.fields.push({
+ name: "record_" + w,
+ type: "RECORD",
+ value: c[w],
+ });
+ return (
+ C.fields.push({
+ name: "strings",
+ type: "LITERAL",
+ value: f,
+ }),
+ C
+ );
+ },
+ },
+ it = [
+ { begin: 0, end: 127 },
+ { begin: 128, end: 255 },
+ { begin: 256, end: 383 },
+ { begin: 384, end: 591 },
+ { begin: 592, end: 687 },
+ { begin: 688, end: 767 },
+ { begin: 768, end: 879 },
+ { begin: 880, end: 1023 },
+ { begin: 11392, end: 11519 },
+ { begin: 1024, end: 1279 },
+ { begin: 1328, end: 1423 },
+ { begin: 1424, end: 1535 },
+ { begin: 42240, end: 42559 },
+ { begin: 1536, end: 1791 },
+ { begin: 1984, end: 2047 },
+ { begin: 2304, end: 2431 },
+ { begin: 2432, end: 2559 },
+ { begin: 2560, end: 2687 },
+ { begin: 2688, end: 2815 },
+ { begin: 2816, end: 2943 },
+ { begin: 2944, end: 3071 },
+ { begin: 3072, end: 3199 },
+ { begin: 3200, end: 3327 },
+ { begin: 3328, end: 3455 },
+ { begin: 3584, end: 3711 },
+ { begin: 3712, end: 3839 },
+ { begin: 4256, end: 4351 },
+ { begin: 6912, end: 7039 },
+ { begin: 4352, end: 4607 },
+ { begin: 7680, end: 7935 },
+ { begin: 7936, end: 8191 },
+ { begin: 8192, end: 8303 },
+ { begin: 8304, end: 8351 },
+ { begin: 8352, end: 8399 },
+ { begin: 8400, end: 8447 },
+ { begin: 8448, end: 8527 },
+ { begin: 8528, end: 8591 },
+ { begin: 8592, end: 8703 },
+ { begin: 8704, end: 8959 },
+ { begin: 8960, end: 9215 },
+ { begin: 9216, end: 9279 },
+ { begin: 9280, end: 9311 },
+ { begin: 9312, end: 9471 },
+ { begin: 9472, end: 9599 },
+ { begin: 9600, end: 9631 },
+ { begin: 9632, end: 9727 },
+ { begin: 9728, end: 9983 },
+ { begin: 9984, end: 10175 },
+ { begin: 12288, end: 12351 },
+ { begin: 12352, end: 12447 },
+ { begin: 12448, end: 12543 },
+ { begin: 12544, end: 12591 },
+ { begin: 12592, end: 12687 },
+ { begin: 43072, end: 43135 },
+ { begin: 12800, end: 13055 },
+ { begin: 13056, end: 13311 },
+ { begin: 44032, end: 55215 },
+ { begin: 55296, end: 57343 },
+ { begin: 67840, end: 67871 },
+ { begin: 19968, end: 40959 },
+ { begin: 57344, end: 63743 },
+ { begin: 12736, end: 12783 },
+ { begin: 64256, end: 64335 },
+ { begin: 64336, end: 65023 },
+ { begin: 65056, end: 65071 },
+ { begin: 65040, end: 65055 },
+ { begin: 65104, end: 65135 },
+ { begin: 65136, end: 65279 },
+ { begin: 65280, end: 65519 },
+ { begin: 65520, end: 65535 },
+ { begin: 3840, end: 4095 },
+ { begin: 1792, end: 1871 },
+ { begin: 1920, end: 1983 },
+ { begin: 3456, end: 3583 },
+ { begin: 4096, end: 4255 },
+ { begin: 4608, end: 4991 },
+ { begin: 5024, end: 5119 },
+ { begin: 5120, end: 5759 },
+ { begin: 5760, end: 5791 },
+ { begin: 5792, end: 5887 },
+ { begin: 6016, end: 6143 },
+ { begin: 6144, end: 6319 },
+ { begin: 10240, end: 10495 },
+ { begin: 40960, end: 42127 },
+ { begin: 5888, end: 5919 },
+ { begin: 66304, end: 66351 },
+ { begin: 66352, end: 66383 },
+ { begin: 66560, end: 66639 },
+ { begin: 118784, end: 119039 },
+ { begin: 119808, end: 120831 },
+ { begin: 1044480, end: 1048573 },
+ { begin: 65024, end: 65039 },
+ { begin: 917504, end: 917631 },
+ { begin: 6400, end: 6479 },
+ { begin: 6480, end: 6527 },
+ { begin: 6528, end: 6623 },
+ { begin: 6656, end: 6687 },
+ { begin: 11264, end: 11359 },
+ { begin: 11568, end: 11647 },
+ { begin: 19904, end: 19967 },
+ { begin: 43008, end: 43055 },
+ { begin: 65536, end: 65663 },
+ { begin: 65856, end: 65935 },
+ { begin: 66432, end: 66463 },
+ { begin: 66464, end: 66527 },
+ { begin: 66640, end: 66687 },
+ { begin: 66688, end: 66735 },
+ { begin: 67584, end: 67647 },
+ { begin: 68096, end: 68191 },
+ { begin: 119552, end: 119647 },
+ { begin: 73728, end: 74751 },
+ { begin: 119648, end: 119679 },
+ { begin: 7040, end: 7103 },
+ { begin: 7168, end: 7247 },
+ { begin: 7248, end: 7295 },
+ { begin: 43136, end: 43231 },
+ { begin: 43264, end: 43311 },
+ { begin: 43312, end: 43359 },
+ { begin: 43520, end: 43615 },
+ { begin: 65936, end: 65999 },
+ { begin: 66e3, end: 66047 },
+ { begin: 66208, end: 66271 },
+ { begin: 127024, end: 127135 },
+ ];
+ var at = {
+ parse: function (e, t) {
+ var n = {},
+ r = new ie.Parser(e, t);
+ (n.version = r.parseUShort()),
+ (n.xAvgCharWidth = r.parseShort()),
+ (n.usWeightClass = r.parseUShort()),
+ (n.usWidthClass = r.parseUShort()),
+ (n.fsType = r.parseUShort()),
+ (n.ySubscriptXSize = r.parseShort()),
+ (n.ySubscriptYSize = r.parseShort()),
+ (n.ySubscriptXOffset = r.parseShort()),
+ (n.ySubscriptYOffset = r.parseShort()),
+ (n.ySuperscriptXSize = r.parseShort()),
+ (n.ySuperscriptYSize = r.parseShort()),
+ (n.ySuperscriptXOffset = r.parseShort()),
+ (n.ySuperscriptYOffset = r.parseShort()),
+ (n.yStrikeoutSize = r.parseShort()),
+ (n.yStrikeoutPosition = r.parseShort()),
+ (n.sFamilyClass = r.parseShort()),
+ (n.panose = []);
+ for (var i = 0; i < 10; i++) n.panose[i] = r.parseByte();
+ return (
+ (n.ulUnicodeRange1 = r.parseULong()),
+ (n.ulUnicodeRange2 = r.parseULong()),
+ (n.ulUnicodeRange3 = r.parseULong()),
+ (n.ulUnicodeRange4 = r.parseULong()),
+ (n.achVendID = String.fromCharCode(
+ r.parseByte(),
+ r.parseByte(),
+ r.parseByte(),
+ r.parseByte()
+ )),
+ (n.fsSelection = r.parseUShort()),
+ (n.usFirstCharIndex = r.parseUShort()),
+ (n.usLastCharIndex = r.parseUShort()),
+ (n.sTypoAscender = r.parseShort()),
+ (n.sTypoDescender = r.parseShort()),
+ (n.sTypoLineGap = r.parseShort()),
+ (n.usWinAscent = r.parseUShort()),
+ (n.usWinDescent = r.parseUShort()),
+ n.version >= 1 &&
+ ((n.ulCodePageRange1 = r.parseULong()),
+ (n.ulCodePageRange2 = r.parseULong())),
+ n.version >= 2 &&
+ ((n.sxHeight = r.parseShort()),
+ (n.sCapHeight = r.parseShort()),
+ (n.usDefaultChar = r.parseUShort()),
+ (n.usBreakChar = r.parseUShort()),
+ (n.usMaxContent = r.parseUShort())),
+ n
+ );
+ },
+ make: function (e) {
+ return new q.Table(
+ "OS/2",
+ [
+ { name: "version", type: "USHORT", value: 3 },
+ { name: "xAvgCharWidth", type: "SHORT", value: 0 },
+ { name: "usWeightClass", type: "USHORT", value: 0 },
+ { name: "usWidthClass", type: "USHORT", value: 0 },
+ { name: "fsType", type: "USHORT", value: 0 },
+ { name: "ySubscriptXSize", type: "SHORT", value: 650 },
+ { name: "ySubscriptYSize", type: "SHORT", value: 699 },
+ { name: "ySubscriptXOffset", type: "SHORT", value: 0 },
+ { name: "ySubscriptYOffset", type: "SHORT", value: 140 },
+ { name: "ySuperscriptXSize", type: "SHORT", value: 650 },
+ { name: "ySuperscriptYSize", type: "SHORT", value: 699 },
+ { name: "ySuperscriptXOffset", type: "SHORT", value: 0 },
+ { name: "ySuperscriptYOffset", type: "SHORT", value: 479 },
+ { name: "yStrikeoutSize", type: "SHORT", value: 49 },
+ { name: "yStrikeoutPosition", type: "SHORT", value: 258 },
+ { name: "sFamilyClass", type: "SHORT", value: 0 },
+ { name: "bFamilyType", type: "BYTE", value: 0 },
+ { name: "bSerifStyle", type: "BYTE", value: 0 },
+ { name: "bWeight", type: "BYTE", value: 0 },
+ { name: "bProportion", type: "BYTE", value: 0 },
+ { name: "bContrast", type: "BYTE", value: 0 },
+ { name: "bStrokeVariation", type: "BYTE", value: 0 },
+ { name: "bArmStyle", type: "BYTE", value: 0 },
+ { name: "bLetterform", type: "BYTE", value: 0 },
+ { name: "bMidline", type: "BYTE", value: 0 },
+ { name: "bXHeight", type: "BYTE", value: 0 },
+ { name: "ulUnicodeRange1", type: "ULONG", value: 0 },
+ { name: "ulUnicodeRange2", type: "ULONG", value: 0 },
+ { name: "ulUnicodeRange3", type: "ULONG", value: 0 },
+ { name: "ulUnicodeRange4", type: "ULONG", value: 0 },
+ { name: "achVendID", type: "CHARARRAY", value: "XXXX" },
+ { name: "fsSelection", type: "USHORT", value: 0 },
+ { name: "usFirstCharIndex", type: "USHORT", value: 0 },
+ { name: "usLastCharIndex", type: "USHORT", value: 0 },
+ { name: "sTypoAscender", type: "SHORT", value: 0 },
+ { name: "sTypoDescender", type: "SHORT", value: 0 },
+ { name: "sTypoLineGap", type: "SHORT", value: 0 },
+ { name: "usWinAscent", type: "USHORT", value: 0 },
+ { name: "usWinDescent", type: "USHORT", value: 0 },
+ { name: "ulCodePageRange1", type: "ULONG", value: 0 },
+ { name: "ulCodePageRange2", type: "ULONG", value: 0 },
+ { name: "sxHeight", type: "SHORT", value: 0 },
+ { name: "sCapHeight", type: "SHORT", value: 0 },
+ { name: "usDefaultChar", type: "USHORT", value: 0 },
+ { name: "usBreakChar", type: "USHORT", value: 0 },
+ { name: "usMaxContext", type: "USHORT", value: 0 },
+ ],
+ e
+ );
+ },
+ unicodeRanges: it,
+ getUnicodeRange: function (e) {
+ for (var t = 0; t < it.length; t += 1) {
+ var n = it[t];
+ if (e >= n.begin && e < n.end) return t;
+ }
+ return -1;
+ },
+ };
+ var ot = {
+ parse: function (e, t) {
+ var n = {},
+ r = new ie.Parser(e, t);
+ switch (
+ ((n.version = r.parseVersion()),
+ (n.italicAngle = r.parseFixed()),
+ (n.underlinePosition = r.parseShort()),
+ (n.underlineThickness = r.parseShort()),
+ (n.isFixedPitch = r.parseULong()),
+ (n.minMemType42 = r.parseULong()),
+ (n.maxMemType42 = r.parseULong()),
+ (n.minMemType1 = r.parseULong()),
+ (n.maxMemType1 = r.parseULong()),
+ n.version)
+ ) {
+ case 1:
+ n.names = ce.slice();
+ break;
+ case 2:
+ (n.numberOfGlyphs = r.parseUShort()),
+ (n.glyphNameIndex = new Array(n.numberOfGlyphs));
+ for (var i = 0; i < n.numberOfGlyphs; i++)
+ n.glyphNameIndex[i] = r.parseUShort();
+ n.names = [];
+ for (var a = 0; a < n.numberOfGlyphs; a++)
+ if (n.glyphNameIndex[a] >= ce.length) {
+ var o = r.parseChar();
+ n.names.push(r.parseString(o));
+ }
+ break;
+ case 2.5:
+ (n.numberOfGlyphs = r.parseUShort()),
+ (n.offset = new Array(n.numberOfGlyphs));
+ for (var s = 0; s < n.numberOfGlyphs; s++)
+ n.offset[s] = r.parseChar();
+ }
+ return n;
+ },
+ make: function () {
+ return new q.Table("post", [
+ { name: "version", type: "FIXED", value: 196608 },
+ { name: "italicAngle", type: "FIXED", value: 0 },
+ { name: "underlinePosition", type: "FWORD", value: 0 },
+ { name: "underlineThickness", type: "FWORD", value: 0 },
+ { name: "isFixedPitch", type: "ULONG", value: 0 },
+ { name: "minMemType42", type: "ULONG", value: 0 },
+ { name: "maxMemType42", type: "ULONG", value: 0 },
+ { name: "minMemType1", type: "ULONG", value: 0 },
+ { name: "maxMemType1", type: "ULONG", value: 0 },
+ ]);
+ },
+ },
+ st = new Array(9);
+ (st[1] = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort();
+ return 1 === t
+ ? {
+ substFormat: 1,
+ coverage: this.parsePointer(ne.coverage),
+ deltaGlyphId: this.parseUShort(),
+ }
+ : 2 === t
+ ? {
+ substFormat: 2,
+ coverage: this.parsePointer(ne.coverage),
+ substitute: this.parseOffset16List(),
+ }
+ : void M.assert(
+ !1,
+ "0x" +
+ e.toString(16) +
+ ": lookup type 1 format must be 1 or 2."
+ );
+ }),
+ (st[2] = function () {
+ var e = this.parseUShort();
+ return (
+ M.argument(
+ 1 === e,
+ "GSUB Multiple Substitution Subtable identifier-format must be 1"
+ ),
+ {
+ substFormat: e,
+ coverage: this.parsePointer(ne.coverage),
+ sequences: this.parseListOfLists(),
+ }
+ );
+ }),
+ (st[3] = function () {
+ var e = this.parseUShort();
+ return (
+ M.argument(
+ 1 === e,
+ "GSUB Alternate Substitution Subtable identifier-format must be 1"
+ ),
+ {
+ substFormat: e,
+ coverage: this.parsePointer(ne.coverage),
+ alternateSets: this.parseListOfLists(),
+ }
+ );
+ }),
+ (st[4] = function () {
+ var e = this.parseUShort();
+ return (
+ M.argument(
+ 1 === e,
+ "GSUB ligature table identifier-format must be 1"
+ ),
+ {
+ substFormat: e,
+ coverage: this.parsePointer(ne.coverage),
+ ligatureSets: this.parseListOfLists(function () {
+ return {
+ ligGlyph: this.parseUShort(),
+ components: this.parseUShortList(
+ this.parseUShort() - 1
+ ),
+ };
+ }),
+ }
+ );
+ });
+ var lt = { sequenceIndex: ne.uShort, lookupListIndex: ne.uShort };
+ (st[5] = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort();
+ if (1 === t)
+ return {
+ substFormat: t,
+ coverage: this.parsePointer(ne.coverage),
+ ruleSets: this.parseListOfLists(function () {
+ var e = this.parseUShort(),
+ t = this.parseUShort();
+ return {
+ input: this.parseUShortList(e - 1),
+ lookupRecords: this.parseRecordList(t, lt),
+ };
+ }),
+ };
+ if (2 === t)
+ return {
+ substFormat: t,
+ coverage: this.parsePointer(ne.coverage),
+ classDef: this.parsePointer(ne.classDef),
+ classSets: this.parseListOfLists(function () {
+ var e = this.parseUShort(),
+ t = this.parseUShort();
+ return {
+ classes: this.parseUShortList(e - 1),
+ lookupRecords: this.parseRecordList(t, lt),
+ };
+ }),
+ };
+ if (3 === t) {
+ var n = this.parseUShort(),
+ r = this.parseUShort();
+ return {
+ substFormat: t,
+ coverages: this.parseList(n, ne.pointer(ne.coverage)),
+ lookupRecords: this.parseRecordList(r, lt),
+ };
+ }
+ M.assert(
+ !1,
+ "0x" +
+ e.toString(16) +
+ ": lookup type 5 format must be 1, 2 or 3."
+ );
+ }),
+ (st[6] = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort();
+ return 1 === t
+ ? {
+ substFormat: 1,
+ coverage: this.parsePointer(ne.coverage),
+ chainRuleSets: this.parseListOfLists(function () {
+ return {
+ backtrack: this.parseUShortList(),
+ input: this.parseUShortList(this.parseShort() - 1),
+ lookahead: this.parseUShortList(),
+ lookupRecords: this.parseRecordList(lt),
+ };
+ }),
+ }
+ : 2 === t
+ ? {
+ substFormat: 2,
+ coverage: this.parsePointer(ne.coverage),
+ backtrackClassDef: this.parsePointer(ne.classDef),
+ inputClassDef: this.parsePointer(ne.classDef),
+ lookaheadClassDef: this.parsePointer(ne.classDef),
+ chainClassSet: this.parseListOfLists(function () {
+ return {
+ backtrack: this.parseUShortList(),
+ input: this.parseUShortList(this.parseShort() - 1),
+ lookahead: this.parseUShortList(),
+ lookupRecords: this.parseRecordList(lt),
+ };
+ }),
+ }
+ : 3 === t
+ ? {
+ substFormat: 3,
+ backtrackCoverage: this.parseList(
+ ne.pointer(ne.coverage)
+ ),
+ inputCoverage: this.parseList(ne.pointer(ne.coverage)),
+ lookaheadCoverage: this.parseList(
+ ne.pointer(ne.coverage)
+ ),
+ lookupRecords: this.parseRecordList(lt),
+ }
+ : void M.assert(
+ !1,
+ "0x" +
+ e.toString(16) +
+ ": lookup type 6 format must be 1, 2 or 3."
+ );
+ }),
+ (st[7] = function () {
+ var e = this.parseUShort();
+ M.argument(
+ 1 === e,
+ "GSUB Extension Substitution subtable identifier-format must be 1"
+ );
+ var t = this.parseUShort(),
+ n = new ne(this.data, this.offset + this.parseULong());
+ return {
+ substFormat: 1,
+ lookupType: t,
+ extension: st[t].call(n),
+ };
+ }),
+ (st[8] = function () {
+ var e = this.parseUShort();
+ return (
+ M.argument(
+ 1 === e,
+ "GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"
+ ),
+ {
+ substFormat: e,
+ coverage: this.parsePointer(ne.coverage),
+ backtrackCoverage: this.parseList(ne.pointer(ne.coverage)),
+ lookaheadCoverage: this.parseList(ne.pointer(ne.coverage)),
+ substitutes: this.parseUShortList(),
+ }
+ );
+ });
+ var ut = new Array(9);
+ (ut[1] = function (e) {
+ return 1 === e.substFormat
+ ? new q.Table("substitutionTable", [
+ { name: "substFormat", type: "USHORT", value: 1 },
+ {
+ name: "coverage",
+ type: "TABLE",
+ value: new q.Coverage(e.coverage),
+ },
+ {
+ name: "deltaGlyphID",
+ type: "USHORT",
+ value: e.deltaGlyphId,
+ },
+ ])
+ : new q.Table(
+ "substitutionTable",
+ [
+ { name: "substFormat", type: "USHORT", value: 2 },
+ {
+ name: "coverage",
+ type: "TABLE",
+ value: new q.Coverage(e.coverage),
+ },
+ ].concat(q.ushortList("substitute", e.substitute))
+ );
+ }),
+ (ut[2] = function (e) {
+ return (
+ M.assert(
+ 1 === e.substFormat,
+ "Lookup type 2 substFormat must be 1."
+ ),
+ new q.Table(
+ "substitutionTable",
+ [
+ { name: "substFormat", type: "USHORT", value: 1 },
+ {
+ name: "coverage",
+ type: "TABLE",
+ value: new q.Coverage(e.coverage),
+ },
+ ].concat(
+ q.tableList("seqSet", e.sequences, function (e) {
+ return new q.Table(
+ "sequenceSetTable",
+ q.ushortList("sequence", e)
+ );
+ })
+ )
+ )
+ );
+ }),
+ (ut[3] = function (e) {
+ return (
+ M.assert(
+ 1 === e.substFormat,
+ "Lookup type 3 substFormat must be 1."
+ ),
+ new q.Table(
+ "substitutionTable",
+ [
+ { name: "substFormat", type: "USHORT", value: 1 },
+ {
+ name: "coverage",
+ type: "TABLE",
+ value: new q.Coverage(e.coverage),
+ },
+ ].concat(
+ q.tableList("altSet", e.alternateSets, function (e) {
+ return new q.Table(
+ "alternateSetTable",
+ q.ushortList("alternate", e)
+ );
+ })
+ )
+ )
+ );
+ }),
+ (ut[4] = function (e) {
+ return (
+ M.assert(
+ 1 === e.substFormat,
+ "Lookup type 4 substFormat must be 1."
+ ),
+ new q.Table(
+ "substitutionTable",
+ [
+ { name: "substFormat", type: "USHORT", value: 1 },
+ {
+ name: "coverage",
+ type: "TABLE",
+ value: new q.Coverage(e.coverage),
+ },
+ ].concat(
+ q.tableList("ligSet", e.ligatureSets, function (e) {
+ return new q.Table(
+ "ligatureSetTable",
+ q.tableList("ligature", e, function (e) {
+ return new q.Table(
+ "ligatureTable",
+ [
+ {
+ name: "ligGlyph",
+ type: "USHORT",
+ value: e.ligGlyph,
+ },
+ ].concat(
+ q.ushortList(
+ "component",
+ e.components,
+ e.components.length + 1
+ )
+ )
+ );
+ })
+ );
+ })
+ )
+ )
+ );
+ }),
+ (ut[6] = function (e) {
+ if (1 === e.substFormat)
+ return new q.Table(
+ "chainContextTable",
+ [
+ {
+ name: "substFormat",
+ type: "USHORT",
+ value: e.substFormat,
+ },
+ {
+ name: "coverage",
+ type: "TABLE",
+ value: new q.Coverage(e.coverage),
+ },
+ ].concat(
+ q.tableList(
+ "chainRuleSet",
+ e.chainRuleSets,
+ function (e) {
+ return new q.Table(
+ "chainRuleSetTable",
+ q.tableList("chainRule", e, function (e) {
+ var t = q
+ .ushortList(
+ "backtrackGlyph",
+ e.backtrack,
+ e.backtrack.length
+ )
+ .concat(
+ q.ushortList(
+ "inputGlyph",
+ e.input,
+ e.input.length + 1
+ )
+ )
+ .concat(
+ q.ushortList(
+ "lookaheadGlyph",
+ e.lookahead,
+ e.lookahead.length
+ )
+ )
+ .concat(
+ q.ushortList(
+ "substitution",
+ [],
+ e.lookupRecords.length
+ )
+ );
+ return (
+ e.lookupRecords.forEach(function (e, n) {
+ t = t
+ .concat({
+ name: "sequenceIndex" + n,
+ type: "USHORT",
+ value: e.sequenceIndex,
+ })
+ .concat({
+ name: "lookupListIndex" + n,
+ type: "USHORT",
+ value: e.lookupListIndex,
+ });
+ }),
+ new q.Table("chainRuleTable", t)
+ );
+ })
+ );
+ }
+ )
+ )
+ );
+ if (2 === e.substFormat)
+ M.assert(!1, "lookup type 6 format 2 is not yet supported.");
+ else if (3 === e.substFormat) {
+ var t = [
+ {
+ name: "substFormat",
+ type: "USHORT",
+ value: e.substFormat,
+ },
+ ];
+ return (
+ t.push({
+ name: "backtrackGlyphCount",
+ type: "USHORT",
+ value: e.backtrackCoverage.length,
+ }),
+ e.backtrackCoverage.forEach(function (e, n) {
+ t.push({
+ name: "backtrackCoverage" + n,
+ type: "TABLE",
+ value: new q.Coverage(e),
+ });
+ }),
+ t.push({
+ name: "inputGlyphCount",
+ type: "USHORT",
+ value: e.inputCoverage.length,
+ }),
+ e.inputCoverage.forEach(function (e, n) {
+ t.push({
+ name: "inputCoverage" + n,
+ type: "TABLE",
+ value: new q.Coverage(e),
+ });
+ }),
+ t.push({
+ name: "lookaheadGlyphCount",
+ type: "USHORT",
+ value: e.lookaheadCoverage.length,
+ }),
+ e.lookaheadCoverage.forEach(function (e, n) {
+ t.push({
+ name: "lookaheadCoverage" + n,
+ type: "TABLE",
+ value: new q.Coverage(e),
+ });
+ }),
+ t.push({
+ name: "substitutionCount",
+ type: "USHORT",
+ value: e.lookupRecords.length,
+ }),
+ e.lookupRecords.forEach(function (e, n) {
+ t = t
+ .concat({
+ name: "sequenceIndex" + n,
+ type: "USHORT",
+ value: e.sequenceIndex,
+ })
+ .concat({
+ name: "lookupListIndex" + n,
+ type: "USHORT",
+ value: e.lookupListIndex,
+ });
+ }),
+ new q.Table("chainContextTable", t)
+ );
+ }
+ M.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
+ });
+ var ct = {
+ parse: function (e, t) {
+ var n = new ne(e, (t = t || 0)),
+ r = n.parseVersion(1);
+ return (
+ M.argument(
+ 1 === r || 1.1 === r,
+ "Unsupported GSUB table version."
+ ),
+ 1 === r
+ ? {
+ version: r,
+ scripts: n.parseScriptList(),
+ features: n.parseFeatureList(),
+ lookups: n.parseLookupList(st),
+ }
+ : {
+ version: r,
+ scripts: n.parseScriptList(),
+ features: n.parseFeatureList(),
+ lookups: n.parseLookupList(st),
+ variations: n.parseFeatureVariationsList(),
+ }
+ );
+ },
+ make: function (e) {
+ return new q.Table("GSUB", [
+ { name: "version", type: "ULONG", value: 65536 },
+ {
+ name: "scripts",
+ type: "TABLE",
+ value: new q.ScriptList(e.scripts),
+ },
+ {
+ name: "features",
+ type: "TABLE",
+ value: new q.FeatureList(e.features),
+ },
+ {
+ name: "lookups",
+ type: "TABLE",
+ value: new q.LookupList(e.lookups, ut),
+ },
+ ]);
+ },
+ };
+ var ft = {
+ parse: function (e, t) {
+ var n = new ie.Parser(e, t),
+ r = n.parseULong();
+ M.argument(1 === r, "Unsupported META table version."),
+ n.parseULong(),
+ n.parseULong();
+ for (var i = n.parseULong(), a = {}, o = 0; o < i; o++) {
+ var s = n.parseTag(),
+ l = n.parseULong(),
+ u = n.parseULong(),
+ c = k.UTF8(e, t + l, u);
+ a[s] = c;
+ }
+ return a;
+ },
+ make: function (e) {
+ var t = Object.keys(e).length,
+ n = "",
+ r = 16 + 12 * t,
+ i = new q.Table("meta", [
+ { name: "version", type: "ULONG", value: 1 },
+ { name: "flags", type: "ULONG", value: 0 },
+ { name: "offset", type: "ULONG", value: r },
+ { name: "numTags", type: "ULONG", value: t },
+ ]);
+ for (var a in e) {
+ var o = n.length;
+ (n += e[a]),
+ i.fields.push({ name: "tag " + a, type: "TAG", value: a }),
+ i.fields.push({
+ name: "offset " + a,
+ type: "ULONG",
+ value: r + o,
+ }),
+ i.fields.push({
+ name: "length " + a,
+ type: "ULONG",
+ value: e[a].length,
+ });
+ }
+ return (
+ i.fields.push({
+ name: "stringPool",
+ type: "CHARARRAY",
+ value: n,
+ }),
+ i
+ );
+ },
+ };
+ function dt(e) {
+ return (Math.log(e) / Math.log(2)) | 0;
+ }
+ function ht(e) {
+ for (; e.length % 4 !== 0; ) e.push(0);
+ for (var t = 0, n = 0; n < e.length; n += 4)
+ t +=
+ (e[n] << 24) + (e[n + 1] << 16) + (e[n + 2] << 8) + e[n + 3];
+ return (t %= Math.pow(2, 32));
+ }
+ function pt(e, t, n, r) {
+ return new q.Record("Table Record", [
+ { name: "tag", type: "TAG", value: void 0 !== e ? e : "" },
+ {
+ name: "checkSum",
+ type: "ULONG",
+ value: void 0 !== t ? t : 0,
+ },
+ { name: "offset", type: "ULONG", value: void 0 !== n ? n : 0 },
+ { name: "length", type: "ULONG", value: void 0 !== r ? r : 0 },
+ ]);
+ }
+ function vt(e) {
+ var t = new q.Table("sfnt", [
+ { name: "version", type: "TAG", value: "OTTO" },
+ { name: "numTables", type: "USHORT", value: 0 },
+ { name: "searchRange", type: "USHORT", value: 0 },
+ { name: "entrySelector", type: "USHORT", value: 0 },
+ { name: "rangeShift", type: "USHORT", value: 0 },
+ ]);
+ (t.tables = e), (t.numTables = e.length);
+ var n = Math.pow(2, dt(t.numTables));
+ (t.searchRange = 16 * n),
+ (t.entrySelector = dt(n)),
+ (t.rangeShift = 16 * t.numTables - t.searchRange);
+ for (
+ var r = [],
+ i = [],
+ a = t.sizeOf() + pt().sizeOf() * t.numTables;
+ a % 4 !== 0;
+
+ )
+ (a += 1), i.push({ name: "padding", type: "BYTE", value: 0 });
+ for (var o = 0; o < e.length; o += 1) {
+ var s = e[o];
+ M.argument(
+ 4 === s.tableName.length,
+ "Table name" + s.tableName + " is invalid."
+ );
+ var l = s.sizeOf(),
+ u = pt(s.tableName, ht(s.encode()), a, l);
+ for (
+ r.push({
+ name: u.tag + " Table Record",
+ type: "RECORD",
+ value: u,
+ }),
+ i.push({
+ name: s.tableName + " table",
+ type: "RECORD",
+ value: s,
+ }),
+ a += l,
+ M.argument(
+ !isNaN(a),
+ "Something went wrong calculating the offset."
+ );
+ a % 4 !== 0;
+
+ )
+ (a += 1), i.push({ name: "padding", type: "BYTE", value: 0 });
+ }
+ return (
+ r.sort(function (e, t) {
+ return e.value.tag > t.value.tag ? 1 : -1;
+ }),
+ (t.fields = t.fields.concat(r)),
+ (t.fields = t.fields.concat(i)),
+ t
+ );
+ }
+ function mt(e, t, n) {
+ for (var r = 0; r < t.length; r += 1) {
+ var i = e.charToGlyphIndex(t[r]);
+ if (i > 0) return e.glyphs.get(i).getMetrics();
+ }
+ return n;
+ }
+ function gt(e) {
+ for (var t = 0, n = 0; n < e.length; n += 1) t += e[n];
+ return t / e.length;
+ }
+ var At = {
+ make: vt,
+ fontToTable: function (e) {
+ for (
+ var t,
+ n = [],
+ r = [],
+ i = [],
+ a = [],
+ o = [],
+ s = [],
+ l = [],
+ u = 0,
+ c = 0,
+ f = 0,
+ d = 0,
+ h = 0,
+ p = 0;
+ p < e.glyphs.length;
+ p += 1
+ ) {
+ var v = e.glyphs.get(p),
+ m = 0 | v.unicode;
+ if (isNaN(v.advanceWidth))
+ throw new Error(
+ "Glyph " +
+ v.name +
+ " (" +
+ p +
+ "): advanceWidth is not a number."
+ );
+ (t > m || void 0 === t) && m > 0 && (t = m), u < m && (u = m);
+ var g = at.getUnicodeRange(m);
+ if (g < 32) c |= 1 << g;
+ else if (g < 64) f |= 1 << (g - 32);
+ else if (g < 96) d |= 1 << (g - 64);
+ else {
+ if (!(g < 123))
+ throw new Error(
+ "Unicode ranges bits > 123 are reserved for internal usage"
+ );
+ h |= 1 << (g - 96);
+ }
+ if (".notdef" !== v.name) {
+ var A = v.getMetrics();
+ n.push(A.xMin),
+ r.push(A.yMin),
+ i.push(A.xMax),
+ a.push(A.yMax),
+ s.push(A.leftSideBearing),
+ l.push(A.rightSideBearing),
+ o.push(v.advanceWidth);
+ }
+ }
+ var y = {
+ xMin: Math.min.apply(null, n),
+ yMin: Math.min.apply(null, r),
+ xMax: Math.max.apply(null, i),
+ yMax: Math.max.apply(null, a),
+ advanceWidthMax: Math.max.apply(null, o),
+ advanceWidthAvg: gt(o),
+ minLeftSideBearing: Math.min.apply(null, s),
+ maxLeftSideBearing: Math.max.apply(null, s),
+ minRightSideBearing: Math.min.apply(null, l),
+ };
+ (y.ascender = e.ascender), (y.descender = e.descender);
+ var b = Ge.make({
+ flags: 3,
+ unitsPerEm: e.unitsPerEm,
+ xMin: y.xMin,
+ yMin: y.yMin,
+ xMax: y.xMax,
+ yMax: y.yMax,
+ lowestRecPPEM: 3,
+ createdTimestamp: e.createdTimestamp,
+ }),
+ x = Ze.make({
+ ascender: y.ascender,
+ descender: y.descender,
+ advanceWidthMax: y.advanceWidthMax,
+ minLeftSideBearing: y.minLeftSideBearing,
+ minRightSideBearing: y.minRightSideBearing,
+ xMaxExtent: y.maxLeftSideBearing + (y.xMax - y.xMin),
+ numberOfHMetrics: e.glyphs.length,
+ }),
+ S = He.make(e.glyphs.length),
+ E = at.make(
+ Object.assign(
+ {
+ xAvgCharWidth: Math.round(y.advanceWidthAvg),
+ usFirstCharIndex: t,
+ usLastCharIndex: u,
+ ulUnicodeRange1: c,
+ ulUnicodeRange2: f,
+ ulUnicodeRange3: d,
+ ulUnicodeRange4: h,
+ sTypoAscender: y.ascender,
+ sTypoDescender: y.descender,
+ sTypoLineGap: 0,
+ usWinAscent: y.yMax,
+ usWinDescent: Math.abs(y.yMin),
+ ulCodePageRange1: 1,
+ sxHeight: mt(e, "xyvw", {
+ yMax: Math.round(y.ascender / 2),
+ }).yMax,
+ sCapHeight: mt(e, "HIKLEFJMNTZBDPRAGOQSUVWXY", y).yMax,
+ usDefaultChar: e.hasChar(" ") ? 32 : 0,
+ usBreakChar: e.hasChar(" ") ? 32 : 0,
+ },
+ e.tables.os2
+ )
+ ),
+ _ = ze.make(e.glyphs),
+ C = oe.make(e.glyphs),
+ w = e.getEnglishName("fontFamily"),
+ T = e.getEnglishName("fontSubfamily"),
+ M = w + " " + T,
+ I = e.getEnglishName("postScriptName");
+ I || (I = w.replace(/\s/g, "") + "-" + T);
+ var k = {};
+ for (var R in e.names) k[R] = e.names[R];
+ k.uniqueID ||
+ (k.uniqueID = {
+ en: e.getEnglishName("manufacturer") + ":" + M,
+ }),
+ k.postScriptName || (k.postScriptName = { en: I }),
+ k.preferredFamily || (k.preferredFamily = e.names.fontFamily),
+ k.preferredSubfamily ||
+ (k.preferredSubfamily = e.names.fontSubfamily);
+ var B = [],
+ P = rt.make(k, B),
+ L = B.length > 0 ? Qe.make(B) : void 0,
+ D = ot.make(),
+ U = Ne.make(e.glyphs, {
+ version: e.getEnglishName("version"),
+ fullName: M,
+ familyName: w,
+ weightName: T,
+ postScriptName: I,
+ unitsPerEm: e.unitsPerEm,
+ fontBBox: [0, y.yMin, y.ascender, y.advanceWidthMax],
+ }),
+ F =
+ e.metas && Object.keys(e.metas).length > 0
+ ? ft.make(e.metas)
+ : void 0,
+ O = [b, x, S, E, P, C, D, U, _];
+ L && O.push(L),
+ e.tables.gsub && O.push(ct.make(e.tables.gsub)),
+ F && O.push(F);
+ for (
+ var N = vt(O),
+ G = ht(N.encode()),
+ Z = N.fields,
+ z = !1,
+ Q = 0;
+ Q < Z.length;
+ Q += 1
+ )
+ if ("head table" === Z[Q].name) {
+ (Z[Q].value.checkSumAdjustment = 2981146554 - G), (z = !0);
+ break;
+ }
+ if (!z)
+ throw new Error(
+ "Could not find head table with checkSum to adjust."
+ );
+ return N;
+ },
+ computeCheckSum: ht,
+ };
+ function yt(e, t) {
+ for (var n = 0, r = e.length - 1; n <= r; ) {
+ var i = (n + r) >>> 1,
+ a = e[i].tag;
+ if (a === t) return i;
+ a < t ? (n = i + 1) : (r = i - 1);
+ }
+ return -n - 1;
+ }
+ function bt(e, t) {
+ for (var n = 0, r = e.length - 1; n <= r; ) {
+ var i = (n + r) >>> 1,
+ a = e[i];
+ if (a === t) return i;
+ a < t ? (n = i + 1) : (r = i - 1);
+ }
+ return -n - 1;
+ }
+ function xt(e, t) {
+ for (var n, r = 0, i = e.length - 1; r <= i; ) {
+ var a = (r + i) >>> 1,
+ o = (n = e[a]).start;
+ if (o === t) return n;
+ o < t ? (r = a + 1) : (i = a - 1);
+ }
+ if (r > 0) return t > (n = e[r - 1]).end ? 0 : n;
+ }
+ function St(e, t) {
+ (this.font = e), (this.tableName = t);
+ }
+ function Et(e) {
+ St.call(this, e, "gpos");
+ }
+ function _t(e) {
+ St.call(this, e, "gsub");
+ }
+ function Ct(e, t) {
+ var n = e.length;
+ if (n !== t.length) return !1;
+ for (var r = 0; r < n; r++) if (e[r] !== t[r]) return !1;
+ return !0;
+ }
+ function wt(e, t, n) {
+ for (var r = e.subtables, i = 0; i < r.length; i++) {
+ var a = r[i];
+ if (a.substFormat === t) return a;
+ }
+ if (n) return r.push(n), n;
+ }
+ function Tt(e, t) {
+ if (!e) throw t;
+ }
+ function Mt(e, t, n, r, i) {
+ var a;
+ return (
+ (t & r) > 0
+ ? ((a = e.parseByte()),
+ 0 === (t & i) && (a = -a),
+ (a = n + a))
+ : (a = (t & i) > 0 ? n : n + e.parseShort()),
+ a
+ );
+ }
+ function It(e, t, n) {
+ var r,
+ i,
+ a = new ie.Parser(t, n);
+ if (
+ ((e.numberOfContours = a.parseShort()),
+ (e._xMin = a.parseShort()),
+ (e._yMin = a.parseShort()),
+ (e._xMax = a.parseShort()),
+ (e._yMax = a.parseShort()),
+ e.numberOfContours > 0)
+ ) {
+ for (
+ var o = (e.endPointIndices = []), s = 0;
+ s < e.numberOfContours;
+ s += 1
+ )
+ o.push(a.parseUShort());
+ (e.instructionLength = a.parseUShort()), (e.instructions = []);
+ for (var l = 0; l < e.instructionLength; l += 1)
+ e.instructions.push(a.parseByte());
+ var u = o[o.length - 1] + 1;
+ r = [];
+ for (var c = 0; c < u; c += 1)
+ if (((i = a.parseByte()), r.push(i), (8 & i) > 0))
+ for (var f = a.parseByte(), d = 0; d < f; d += 1)
+ r.push(i), (c += 1);
+ if ((M.argument(r.length === u, "Bad flags."), o.length > 0)) {
+ var h,
+ p = [];
+ if (u > 0) {
+ for (var v = 0; v < u; v += 1)
+ (i = r[v]),
+ ((h = {}).onCurve = !!(1 & i)),
+ (h.lastPointOfContour = o.indexOf(v) >= 0),
+ p.push(h);
+ for (var m = 0, g = 0; g < u; g += 1)
+ (i = r[g]),
+ ((h = p[g]).x = Mt(a, i, m, 2, 16)),
+ (m = h.x);
+ for (var A = 0, y = 0; y < u; y += 1)
+ (i = r[y]),
+ ((h = p[y]).y = Mt(a, i, A, 4, 32)),
+ (A = h.y);
+ }
+ e.points = p;
+ } else e.points = [];
+ } else if (0 === e.numberOfContours) e.points = [];
+ else {
+ (e.isComposite = !0), (e.points = []), (e.components = []);
+ for (var b = !0; b; ) {
+ r = a.parseUShort();
+ var x = {
+ glyphIndex: a.parseUShort(),
+ xScale: 1,
+ scale01: 0,
+ scale10: 0,
+ yScale: 1,
+ dx: 0,
+ dy: 0,
+ };
+ (1 & r) > 0
+ ? (2 & r) > 0
+ ? ((x.dx = a.parseShort()), (x.dy = a.parseShort()))
+ : (x.matchedPoints = [a.parseUShort(), a.parseUShort()])
+ : (2 & r) > 0
+ ? ((x.dx = a.parseChar()), (x.dy = a.parseChar()))
+ : (x.matchedPoints = [a.parseByte(), a.parseByte()]),
+ (8 & r) > 0
+ ? (x.xScale = x.yScale = a.parseF2Dot14())
+ : (64 & r) > 0
+ ? ((x.xScale = a.parseF2Dot14()),
+ (x.yScale = a.parseF2Dot14()))
+ : (128 & r) > 0 &&
+ ((x.xScale = a.parseF2Dot14()),
+ (x.scale01 = a.parseF2Dot14()),
+ (x.scale10 = a.parseF2Dot14()),
+ (x.yScale = a.parseF2Dot14())),
+ e.components.push(x),
+ (b = !!(32 & r));
+ }
+ if (256 & r) {
+ (e.instructionLength = a.parseUShort()),
+ (e.instructions = []);
+ for (var S = 0; S < e.instructionLength; S += 1)
+ e.instructions.push(a.parseByte());
+ }
+ }
+ }
+ function kt(e, t) {
+ for (var n = [], r = 0; r < e.length; r += 1) {
+ var i = e[r],
+ a = {
+ x: t.xScale * i.x + t.scale01 * i.y + t.dx,
+ y: t.scale10 * i.x + t.yScale * i.y + t.dy,
+ onCurve: i.onCurve,
+ lastPointOfContour: i.lastPointOfContour,
+ };
+ n.push(a);
+ }
+ return n;
+ }
+ function Rt(e) {
+ var t = new C();
+ if (!e) return t;
+ for (
+ var n = (function (e) {
+ for (var t = [], n = [], r = 0; r < e.length; r += 1) {
+ var i = e[r];
+ n.push(i), i.lastPointOfContour && (t.push(n), (n = []));
+ }
+ return (
+ M.argument(
+ 0 === n.length,
+ "There are still points left in the current contour."
+ ),
+ t
+ );
+ })(e),
+ r = 0;
+ r < n.length;
+ ++r
+ ) {
+ var i = n[r],
+ a = null,
+ o = i[i.length - 1],
+ s = i[0];
+ if (o.onCurve) t.moveTo(o.x, o.y);
+ else if (s.onCurve) t.moveTo(s.x, s.y);
+ else {
+ var l = { x: 0.5 * (o.x + s.x), y: 0.5 * (o.y + s.y) };
+ t.moveTo(l.x, l.y);
+ }
+ for (var u = 0; u < i.length; ++u)
+ if (
+ ((a = o), (o = s), (s = i[(u + 1) % i.length]), o.onCurve)
+ )
+ t.lineTo(o.x, o.y);
+ else {
+ var c = s;
+ a.onCurve || (o.x, a.x, o.y, a.y),
+ s.onCurve ||
+ (c = { x: 0.5 * (o.x + s.x), y: 0.5 * (o.y + s.y) }),
+ t.quadraticCurveTo(o.x, o.y, c.x, c.y);
+ }
+ t.closePath();
+ }
+ return t;
+ }
+ function Bt(e, t) {
+ if (t.isComposite)
+ for (var n = 0; n < t.components.length; n += 1) {
+ var r = t.components[n],
+ i = e.get(r.glyphIndex);
+ if ((i.getPath(), i.points)) {
+ var a = void 0;
+ if (void 0 === r.matchedPoints) a = kt(i.points, r);
+ else {
+ if (
+ r.matchedPoints[0] > t.points.length - 1 ||
+ r.matchedPoints[1] > i.points.length - 1
+ )
+ throw Error("Matched points out of range in " + t.name);
+ var o = t.points[r.matchedPoints[0]],
+ s = i.points[r.matchedPoints[1]],
+ l = {
+ xScale: r.xScale,
+ scale01: r.scale01,
+ scale10: r.scale10,
+ yScale: r.yScale,
+ dx: 0,
+ dy: 0,
+ };
+ (s = kt([s], l)[0]),
+ (l.dx = o.x - s.x),
+ (l.dy = o.y - s.y),
+ (a = kt(i.points, l));
+ }
+ t.points = t.points.concat(a);
+ }
+ }
+ return Rt(t.points);
+ }
+ (St.prototype = {
+ searchTag: yt,
+ binSearch: bt,
+ getTable: function (e) {
+ var t = this.font.tables[this.tableName];
+ return (
+ !t &&
+ e &&
+ (t = this.font.tables[this.tableName] =
+ this.createDefaultTable()),
+ t
+ );
+ },
+ getScriptNames: function () {
+ var e = this.getTable();
+ return e
+ ? e.scripts.map(function (e) {
+ return e.tag;
+ })
+ : [];
+ },
+ getDefaultScriptName: function () {
+ var e = this.getTable();
+ if (e) {
+ for (var t = !1, n = 0; n < e.scripts.length; n++) {
+ var r = e.scripts[n].tag;
+ if ("DFLT" === r) return r;
+ "latn" === r && (t = !0);
+ }
+ return t ? "latn" : void 0;
+ }
+ },
+ getScriptTable: function (e, t) {
+ var n = this.getTable(t);
+ if (n) {
+ e = e || "DFLT";
+ var r = n.scripts,
+ i = yt(n.scripts, e);
+ if (i >= 0) return r[i].script;
+ if (t) {
+ var a = {
+ tag: e,
+ script: {
+ defaultLangSys: {
+ reserved: 0,
+ reqFeatureIndex: 65535,
+ featureIndexes: [],
+ },
+ langSysRecords: [],
+ },
+ };
+ return r.splice(-1 - i, 0, a), a.script;
+ }
+ }
+ },
+ getLangSysTable: function (e, t, n) {
+ var r = this.getScriptTable(e, n);
+ if (r) {
+ if (!t || "dflt" === t || "DFLT" === t)
+ return r.defaultLangSys;
+ var i = yt(r.langSysRecords, t);
+ if (i >= 0) return r.langSysRecords[i].langSys;
+ if (n) {
+ var a = {
+ tag: t,
+ langSys: {
+ reserved: 0,
+ reqFeatureIndex: 65535,
+ featureIndexes: [],
+ },
+ };
+ return r.langSysRecords.splice(-1 - i, 0, a), a.langSys;
+ }
+ }
+ },
+ getFeatureTable: function (e, t, n, r) {
+ var i = this.getLangSysTable(e, t, r);
+ if (i) {
+ for (
+ var a,
+ o = i.featureIndexes,
+ s = this.font.tables[this.tableName].features,
+ l = 0;
+ l < o.length;
+ l++
+ )
+ if ((a = s[o[l]]).tag === n) return a.feature;
+ if (r) {
+ var u = s.length;
+ return (
+ M.assert(
+ 0 === u || n >= s[u - 1].tag,
+ "Features must be added in alphabetical order."
+ ),
+ (a = {
+ tag: n,
+ feature: { params: 0, lookupListIndexes: [] },
+ }),
+ s.push(a),
+ o.push(u),
+ a.feature
+ );
+ }
+ }
+ },
+ getLookupTables: function (e, t, n, r, i) {
+ var a = this.getFeatureTable(e, t, n, i),
+ o = [];
+ if (a) {
+ for (
+ var s,
+ l = a.lookupListIndexes,
+ u = this.font.tables[this.tableName].lookups,
+ c = 0;
+ c < l.length;
+ c++
+ )
+ (s = u[l[c]]).lookupType === r && o.push(s);
+ if (0 === o.length && i) {
+ s = {
+ lookupType: r,
+ lookupFlag: 0,
+ subtables: [],
+ markFilteringSet: void 0,
+ };
+ var f = u.length;
+ return u.push(s), l.push(f), [s];
+ }
+ }
+ return o;
+ },
+ getGlyphClass: function (e, t) {
+ switch (e.format) {
+ case 1:
+ return e.startGlyph <= t &&
+ t < e.startGlyph + e.classes.length
+ ? e.classes[t - e.startGlyph]
+ : 0;
+ case 2:
+ var n = xt(e.ranges, t);
+ return n ? n.classId : 0;
+ }
+ },
+ getCoverageIndex: function (e, t) {
+ switch (e.format) {
+ case 1:
+ var n = bt(e.glyphs, t);
+ return n >= 0 ? n : -1;
+ case 2:
+ var r = xt(e.ranges, t);
+ return r ? r.index + t - r.start : -1;
+ }
+ },
+ expandCoverage: function (e) {
+ if (1 === e.format) return e.glyphs;
+ for (var t = [], n = e.ranges, r = 0; r < n.length; r++)
+ for (var i = n[r], a = i.start, o = i.end, s = a; s <= o; s++)
+ t.push(s);
+ return t;
+ },
+ }),
+ (Et.prototype = St.prototype),
+ (Et.prototype.init = function () {
+ var e = this.getDefaultScriptName();
+ this.defaultKerningTables = this.getKerningTables(e);
+ }),
+ (Et.prototype.getKerningValue = function (e, t, n) {
+ for (var r = 0; r < e.length; r++)
+ for (var i = e[r].subtables, a = 0; a < i.length; a++) {
+ var o = i[a],
+ s = this.getCoverageIndex(o.coverage, t);
+ if (!(s < 0))
+ switch (o.posFormat) {
+ case 1:
+ for (
+ var l = o.pairSets[s], u = 0;
+ u < l.length;
+ u++
+ ) {
+ var c = l[u];
+ if (c.secondGlyph === n)
+ return (c.value1 && c.value1.xAdvance) || 0;
+ }
+ break;
+ case 2:
+ var f = this.getGlyphClass(o.classDef1, t),
+ d = this.getGlyphClass(o.classDef2, n),
+ h = o.classRecords[f][d];
+ return (h.value1 && h.value1.xAdvance) || 0;
+ }
+ }
+ return 0;
+ }),
+ (Et.prototype.getKerningTables = function (e, t) {
+ if (this.font.tables.gpos)
+ return this.getLookupTables(e, t, "kern", 2);
+ }),
+ (_t.prototype = St.prototype),
+ (_t.prototype.createDefaultTable = function () {
+ return {
+ version: 1,
+ scripts: [
+ {
+ tag: "DFLT",
+ script: {
+ defaultLangSys: {
+ reserved: 0,
+ reqFeatureIndex: 65535,
+ featureIndexes: [],
+ },
+ langSysRecords: [],
+ },
+ },
+ ],
+ features: [],
+ lookups: [],
+ };
+ }),
+ (_t.prototype.getSingle = function (e, t, n) {
+ for (
+ var r = [], i = this.getLookupTables(t, n, e, 1), a = 0;
+ a < i.length;
+ a++
+ )
+ for (var o = i[a].subtables, s = 0; s < o.length; s++) {
+ var l = o[s],
+ u = this.expandCoverage(l.coverage),
+ c = void 0;
+ if (1 === l.substFormat) {
+ var f = l.deltaGlyphId;
+ for (c = 0; c < u.length; c++) {
+ var d = u[c];
+ r.push({ sub: d, by: d + f });
+ }
+ } else {
+ var h = l.substitute;
+ for (c = 0; c < u.length; c++)
+ r.push({ sub: u[c], by: h[c] });
+ }
+ }
+ return r;
+ }),
+ (_t.prototype.getMultiple = function (e, t, n) {
+ for (
+ var r = [], i = this.getLookupTables(t, n, e, 2), a = 0;
+ a < i.length;
+ a++
+ )
+ for (var o = i[a].subtables, s = 0; s < o.length; s++) {
+ var l = o[s],
+ u = this.expandCoverage(l.coverage),
+ c = void 0;
+ for (c = 0; c < u.length; c++) {
+ var f = u[c],
+ d = l.sequences[c];
+ r.push({ sub: f, by: d });
+ }
+ }
+ return r;
+ }),
+ (_t.prototype.getAlternates = function (e, t, n) {
+ for (
+ var r = [], i = this.getLookupTables(t, n, e, 3), a = 0;
+ a < i.length;
+ a++
+ )
+ for (var o = i[a].subtables, s = 0; s < o.length; s++)
+ for (
+ var l = o[s],
+ u = this.expandCoverage(l.coverage),
+ c = l.alternateSets,
+ f = 0;
+ f < u.length;
+ f++
+ )
+ r.push({ sub: u[f], by: c[f] });
+ return r;
+ }),
+ (_t.prototype.getLigatures = function (e, t, n) {
+ for (
+ var r = [], i = this.getLookupTables(t, n, e, 4), a = 0;
+ a < i.length;
+ a++
+ )
+ for (var o = i[a].subtables, s = 0; s < o.length; s++)
+ for (
+ var l = o[s],
+ u = this.expandCoverage(l.coverage),
+ c = l.ligatureSets,
+ f = 0;
+ f < u.length;
+ f++
+ )
+ for (var d = u[f], h = c[f], p = 0; p < h.length; p++) {
+ var v = h[p];
+ r.push({
+ sub: [d].concat(v.components),
+ by: v.ligGlyph,
+ });
+ }
+ return r;
+ }),
+ (_t.prototype.addSingle = function (e, t, n, r) {
+ var i = wt(this.getLookupTables(n, r, e, 1, !0)[0], 2, {
+ substFormat: 2,
+ coverage: { format: 1, glyphs: [] },
+ substitute: [],
+ });
+ M.assert(
+ 1 === i.coverage.format,
+ "Single: unable to modify coverage table format " +
+ i.coverage.format
+ );
+ var a = t.sub,
+ o = this.binSearch(i.coverage.glyphs, a);
+ o < 0 &&
+ ((o = -1 - o),
+ i.coverage.glyphs.splice(o, 0, a),
+ i.substitute.splice(o, 0, 0)),
+ (i.substitute[o] = t.by);
+ }),
+ (_t.prototype.addMultiple = function (e, t, n, r) {
+ M.assert(
+ t.by instanceof Array && t.by.length > 1,
+ 'Multiple: "by" must be an array of two or more ids'
+ );
+ var i = wt(this.getLookupTables(n, r, e, 2, !0)[0], 1, {
+ substFormat: 1,
+ coverage: { format: 1, glyphs: [] },
+ sequences: [],
+ });
+ M.assert(
+ 1 === i.coverage.format,
+ "Multiple: unable to modify coverage table format " +
+ i.coverage.format
+ );
+ var a = t.sub,
+ o = this.binSearch(i.coverage.glyphs, a);
+ o < 0 &&
+ ((o = -1 - o),
+ i.coverage.glyphs.splice(o, 0, a),
+ i.sequences.splice(o, 0, 0)),
+ (i.sequences[o] = t.by);
+ }),
+ (_t.prototype.addAlternate = function (e, t, n, r) {
+ var i = wt(this.getLookupTables(n, r, e, 3, !0)[0], 1, {
+ substFormat: 1,
+ coverage: { format: 1, glyphs: [] },
+ alternateSets: [],
+ });
+ M.assert(
+ 1 === i.coverage.format,
+ "Alternate: unable to modify coverage table format " +
+ i.coverage.format
+ );
+ var a = t.sub,
+ o = this.binSearch(i.coverage.glyphs, a);
+ o < 0 &&
+ ((o = -1 - o),
+ i.coverage.glyphs.splice(o, 0, a),
+ i.alternateSets.splice(o, 0, 0)),
+ (i.alternateSets[o] = t.by);
+ }),
+ (_t.prototype.addLigature = function (e, t, n, r) {
+ var i = this.getLookupTables(n, r, e, 4, !0)[0],
+ a = i.subtables[0];
+ a ||
+ ((a = {
+ substFormat: 1,
+ coverage: { format: 1, glyphs: [] },
+ ligatureSets: [],
+ }),
+ (i.subtables[0] = a)),
+ M.assert(
+ 1 === a.coverage.format,
+ "Ligature: unable to modify coverage table format " +
+ a.coverage.format
+ );
+ var o = t.sub[0],
+ s = t.sub.slice(1),
+ l = { ligGlyph: t.by, components: s },
+ u = this.binSearch(a.coverage.glyphs, o);
+ if (u >= 0) {
+ for (var c = a.ligatureSets[u], f = 0; f < c.length; f++)
+ if (Ct(c[f].components, s)) return;
+ c.push(l);
+ } else
+ (u = -1 - u),
+ a.coverage.glyphs.splice(u, 0, o),
+ a.ligatureSets.splice(u, 0, [l]);
+ }),
+ (_t.prototype.getFeature = function (e, t, n) {
+ if (/ss\d\d/.test(e)) return this.getSingle(e, t, n);
+ switch (e) {
+ case "aalt":
+ case "salt":
+ return this.getSingle(e, t, n).concat(
+ this.getAlternates(e, t, n)
+ );
+ case "dlig":
+ case "liga":
+ case "rlig":
+ return this.getLigatures(e, t, n);
+ case "ccmp":
+ return this.getMultiple(e, t, n).concat(
+ this.getLigatures(e, t, n)
+ );
+ case "stch":
+ return this.getMultiple(e, t, n);
+ }
+ }),
+ (_t.prototype.add = function (e, t, n, r) {
+ if (/ss\d\d/.test(e)) return this.addSingle(e, t, n, r);
+ switch (e) {
+ case "aalt":
+ case "salt":
+ return "number" === typeof t.by
+ ? this.addSingle(e, t, n, r)
+ : this.addAlternate(e, t, n, r);
+ case "dlig":
+ case "liga":
+ case "rlig":
+ return this.addLigature(e, t, n, r);
+ case "ccmp":
+ return t.by instanceof Array
+ ? this.addMultiple(e, t, n, r)
+ : this.addLigature(e, t, n, r);
+ }
+ });
+ var Pt,
+ Lt,
+ Dt,
+ Ut,
+ Ft = {
+ getPath: Rt,
+ parse: function (e, t, n, r, i) {
+ return i.lowMemory
+ ? (function (e, t, n, r) {
+ var i = new be.GlyphSet(r);
+ return (
+ (r._push = function (a) {
+ var o = n[a];
+ o !== n[a + 1]
+ ? i.push(
+ a,
+ be.ttfGlyphLoader(r, a, It, e, t + o, Bt)
+ )
+ : i.push(a, be.glyphLoader(r, a));
+ }),
+ i
+ );
+ })(e, t, n, r)
+ : (function (e, t, n, r) {
+ for (
+ var i = new be.GlyphSet(r), a = 0;
+ a < n.length - 1;
+ a += 1
+ ) {
+ var o = n[a];
+ o !== n[a + 1]
+ ? i.push(
+ a,
+ be.ttfGlyphLoader(r, a, It, e, t + o, Bt)
+ )
+ : i.push(a, be.glyphLoader(r, a));
+ }
+ return i;
+ })(e, t, n, r);
+ },
+ };
+ function Ot(e) {
+ (this.font = e),
+ (this.getCommands = function (e) {
+ return Ft.getPath(e).commands;
+ }),
+ (this._fpgmState = this._prepState = void 0),
+ (this._errorState = 0);
+ }
+ function Nt(e) {
+ return e;
+ }
+ function Gt(e) {
+ return Math.sign(e) * Math.round(Math.abs(e));
+ }
+ function Zt(e) {
+ return (Math.sign(e) * Math.round(Math.abs(2 * e))) / 2;
+ }
+ function zt(e) {
+ return Math.sign(e) * (Math.round(Math.abs(e) + 0.5) - 0.5);
+ }
+ function Qt(e) {
+ return Math.sign(e) * Math.ceil(Math.abs(e));
+ }
+ function Ht(e) {
+ return Math.sign(e) * Math.floor(Math.abs(e));
+ }
+ var Vt = function (e) {
+ var t = this.srPeriod,
+ n = this.srPhase,
+ r = 1;
+ return (
+ e < 0 && ((e = -e), (r = -1)),
+ (e += this.srThreshold - n),
+ (e = Math.trunc(e / t) * t),
+ (e += n) < 0 ? n * r : e * r
+ );
+ },
+ jt = {
+ x: 1,
+ y: 0,
+ axis: "x",
+ distance: function (e, t, n, r) {
+ return (n ? e.xo : e.x) - (r ? t.xo : t.x);
+ },
+ interpolate: function (e, t, n, r) {
+ var i, a, o, s, l, u, c;
+ if (!r || r === this)
+ return (
+ (i = e.xo - t.xo),
+ (a = e.xo - n.xo),
+ (l = t.x - t.xo),
+ (u = n.x - n.xo),
+ 0 === (c = (o = Math.abs(i)) + (s = Math.abs(a)))
+ ? void (e.x = e.xo + (l + u) / 2)
+ : void (e.x = e.xo + (l * s + u * o) / c)
+ );
+ (i = r.distance(e, t, !0, !0)),
+ (a = r.distance(e, n, !0, !0)),
+ (l = r.distance(t, t, !1, !0)),
+ (u = r.distance(n, n, !1, !0)),
+ 0 !== (c = (o = Math.abs(i)) + (s = Math.abs(a)))
+ ? jt.setRelative(e, e, (l * s + u * o) / c, r, !0)
+ : jt.setRelative(e, e, (l + u) / 2, r, !0);
+ },
+ normalSlope: Number.NEGATIVE_INFINITY,
+ setRelative: function (e, t, n, r, i) {
+ if (r && r !== this) {
+ var a = i ? t.xo : t.x,
+ o = i ? t.yo : t.y,
+ s = a + n * r.x,
+ l = o + n * r.y;
+ e.x = s + (e.y - l) / r.normalSlope;
+ } else e.x = (i ? t.xo : t.x) + n;
+ },
+ slope: 0,
+ touch: function (e) {
+ e.xTouched = !0;
+ },
+ touched: function (e) {
+ return e.xTouched;
+ },
+ untouch: function (e) {
+ e.xTouched = !1;
+ },
+ },
+ Wt = {
+ x: 0,
+ y: 1,
+ axis: "y",
+ distance: function (e, t, n, r) {
+ return (n ? e.yo : e.y) - (r ? t.yo : t.y);
+ },
+ interpolate: function (e, t, n, r) {
+ var i, a, o, s, l, u, c;
+ if (!r || r === this)
+ return (
+ (i = e.yo - t.yo),
+ (a = e.yo - n.yo),
+ (l = t.y - t.yo),
+ (u = n.y - n.yo),
+ 0 === (c = (o = Math.abs(i)) + (s = Math.abs(a)))
+ ? void (e.y = e.yo + (l + u) / 2)
+ : void (e.y = e.yo + (l * s + u * o) / c)
+ );
+ (i = r.distance(e, t, !0, !0)),
+ (a = r.distance(e, n, !0, !0)),
+ (l = r.distance(t, t, !1, !0)),
+ (u = r.distance(n, n, !1, !0)),
+ 0 !== (c = (o = Math.abs(i)) + (s = Math.abs(a)))
+ ? Wt.setRelative(e, e, (l * s + u * o) / c, r, !0)
+ : Wt.setRelative(e, e, (l + u) / 2, r, !0);
+ },
+ normalSlope: 0,
+ setRelative: function (e, t, n, r, i) {
+ if (r && r !== this) {
+ var a = i ? t.xo : t.x,
+ o = i ? t.yo : t.y,
+ s = a + n * r.x,
+ l = o + n * r.y;
+ e.y = l + r.normalSlope * (e.x - s);
+ } else e.y = (i ? t.yo : t.y) + n;
+ },
+ slope: Number.POSITIVE_INFINITY,
+ touch: function (e) {
+ e.yTouched = !0;
+ },
+ touched: function (e) {
+ return e.yTouched;
+ },
+ untouch: function (e) {
+ e.yTouched = !1;
+ },
+ };
+ function Xt(e, t) {
+ (this.x = e),
+ (this.y = t),
+ (this.axis = void 0),
+ (this.slope = t / e),
+ (this.normalSlope = -e / t),
+ Object.freeze(this);
+ }
+ function Yt(e, t) {
+ var n = Math.sqrt(e * e + t * t);
+ return (
+ (t /= n),
+ 1 === (e /= n) && 0 === t
+ ? jt
+ : 0 === e && 1 === t
+ ? Wt
+ : new Xt(e, t)
+ );
+ }
+ function qt(e, t, n, r) {
+ (this.x = this.xo = Math.round(64 * e) / 64),
+ (this.y = this.yo = Math.round(64 * t) / 64),
+ (this.lastPointOfContour = n),
+ (this.onCurve = r),
+ (this.prevPointOnContour = void 0),
+ (this.nextPointOnContour = void 0),
+ (this.xTouched = !1),
+ (this.yTouched = !1),
+ Object.preventExtensions(this);
+ }
+ Object.freeze(jt),
+ Object.freeze(Wt),
+ (Xt.prototype.distance = function (e, t, n, r) {
+ return (
+ this.x * jt.distance(e, t, n, r) +
+ this.y * Wt.distance(e, t, n, r)
+ );
+ }),
+ (Xt.prototype.interpolate = function (e, t, n, r) {
+ var i, a, o, s, l, u, c;
+ (o = r.distance(e, t, !0, !0)),
+ (s = r.distance(e, n, !0, !0)),
+ (i = r.distance(t, t, !1, !0)),
+ (a = r.distance(n, n, !1, !0)),
+ 0 !== (c = (l = Math.abs(o)) + (u = Math.abs(s)))
+ ? this.setRelative(e, e, (i * u + a * l) / c, r, !0)
+ : this.setRelative(e, e, (i + a) / 2, r, !0);
+ }),
+ (Xt.prototype.setRelative = function (e, t, n, r, i) {
+ r = r || this;
+ var a = i ? t.xo : t.x,
+ o = i ? t.yo : t.y,
+ s = a + n * r.x,
+ l = o + n * r.y,
+ u = r.normalSlope,
+ c = this.slope,
+ f = e.x,
+ d = e.y;
+ (e.x = (c * f - u * s + l - d) / (c - u)),
+ (e.y = c * (e.x - f) + d);
+ }),
+ (Xt.prototype.touch = function (e) {
+ (e.xTouched = !0), (e.yTouched = !0);
+ }),
+ (qt.prototype.nextTouched = function (e) {
+ for (
+ var t = this.nextPointOnContour;
+ !e.touched(t) && t !== this;
+
+ )
+ t = t.nextPointOnContour;
+ return t;
+ }),
+ (qt.prototype.prevTouched = function (e) {
+ for (
+ var t = this.prevPointOnContour;
+ !e.touched(t) && t !== this;
+
+ )
+ t = t.prevPointOnContour;
+ return t;
+ });
+ var Jt = Object.freeze(new qt(0, 0)),
+ Kt = {
+ cvCutIn: 17 / 16,
+ deltaBase: 9,
+ deltaShift: 0.125,
+ loop: 1,
+ minDis: 1,
+ autoFlip: !0,
+ };
+ function $t(e, t) {
+ switch (((this.env = e), (this.stack = []), (this.prog = t), e)) {
+ case "glyf":
+ (this.zp0 = this.zp1 = this.zp2 = 1),
+ (this.rp0 = this.rp1 = this.rp2 = 0);
+ case "prep":
+ (this.fv = this.pv = this.dpv = jt), (this.round = Gt);
+ }
+ }
+ function en(e) {
+ for (
+ var t = (e.tZone = new Array(e.gZone.length)), n = 0;
+ n < t.length;
+ n++
+ )
+ t[n] = new qt(0, 0);
+ }
+ function tn(e, t) {
+ var n,
+ r = e.prog,
+ i = e.ip,
+ a = 1;
+ do {
+ if (88 === (n = r[++i])) a++;
+ else if (89 === n) a--;
+ else if (64 === n) i += r[i + 1] + 1;
+ else if (65 === n) i += 2 * r[i + 1] + 1;
+ else if (n >= 176 && n <= 183) i += n - 176 + 1;
+ else if (n >= 184 && n <= 191) i += 2 * (n - 184 + 1);
+ else if (t && 1 === a && 27 === n) break;
+ } while (a > 0);
+ e.ip = i;
+ }
+ function nn(e, t) {
+ exports.DEBUG && console.log(t.step, "SVTCA[" + e.axis + "]"),
+ (t.fv = t.pv = t.dpv = e);
+ }
+ function rn(e, t) {
+ exports.DEBUG && console.log(t.step, "SPVTCA[" + e.axis + "]"),
+ (t.pv = t.dpv = e);
+ }
+ function an(e, t) {
+ exports.DEBUG && console.log(t.step, "SFVTCA[" + e.axis + "]"),
+ (t.fv = e);
+ }
+ function on(e, t) {
+ var n,
+ r,
+ i = t.stack,
+ a = i.pop(),
+ o = i.pop(),
+ s = t.z2[a],
+ l = t.z1[o];
+ exports.DEBUG && console.log("SPVTL[" + e + "]", a, o),
+ e
+ ? ((n = s.y - l.y), (r = l.x - s.x))
+ : ((n = l.x - s.x), (r = l.y - s.y)),
+ (t.pv = t.dpv = Yt(n, r));
+ }
+ function sn(e, t) {
+ var n,
+ r,
+ i = t.stack,
+ a = i.pop(),
+ o = i.pop(),
+ s = t.z2[a],
+ l = t.z1[o];
+ exports.DEBUG && console.log("SFVTL[" + e + "]", a, o),
+ e
+ ? ((n = s.y - l.y), (r = l.x - s.x))
+ : ((n = l.x - s.x), (r = l.y - s.y)),
+ (t.fv = Yt(n, r));
+ }
+ function ln(e) {
+ exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop();
+ }
+ function un(e, t) {
+ var n = t.stack.pop(),
+ r = t.z0[n],
+ i = t.fv,
+ a = t.pv;
+ exports.DEBUG && console.log(t.step, "MDAP[" + e + "]", n);
+ var o = a.distance(r, Jt);
+ e && (o = t.round(o)),
+ i.setRelative(r, Jt, o, a),
+ i.touch(r),
+ (t.rp0 = t.rp1 = n);
+ }
+ function cn(e, t) {
+ var n,
+ r,
+ i,
+ a = t.z2,
+ o = a.length - 2;
+ exports.DEBUG && console.log(t.step, "IUP[" + e.axis + "]");
+ for (var s = 0; s < o; s++)
+ (n = a[s]),
+ e.touched(n) ||
+ ((r = n.prevTouched(e)) !== n &&
+ (r === (i = n.nextTouched(e)) &&
+ e.setRelative(n, n, e.distance(r, r, !1, !0), e, !0),
+ e.interpolate(n, r, i, e)));
+ }
+ function fn(e, t) {
+ for (
+ var n = t.stack,
+ r = e ? t.rp1 : t.rp2,
+ i = (e ? t.z0 : t.z1)[r],
+ a = t.fv,
+ o = t.pv,
+ s = t.loop,
+ l = t.z2;
+ s--;
+
+ ) {
+ var u = n.pop(),
+ c = l[u],
+ f = o.distance(i, i, !1, !0);
+ a.setRelative(c, c, f, o),
+ a.touch(c),
+ exports.DEBUG &&
+ console.log(
+ t.step,
+ (t.loop > 1 ? "loop " + (t.loop - s) + ": " : "") +
+ "SHP[" +
+ (e ? "rp1" : "rp2") +
+ "]",
+ u
+ );
+ }
+ t.loop = 1;
+ }
+ function dn(e, t) {
+ var n = t.stack,
+ r = e ? t.rp1 : t.rp2,
+ i = (e ? t.z0 : t.z1)[r],
+ a = t.fv,
+ o = t.pv,
+ s = n.pop(),
+ l = t.z2[t.contours[s]],
+ u = l;
+ exports.DEBUG && console.log(t.step, "SHC[" + e + "]", s);
+ var c = o.distance(i, i, !1, !0);
+ do {
+ u !== i && a.setRelative(u, u, c, o),
+ (u = u.nextPointOnContour);
+ } while (u !== l);
+ }
+ function hn(e, t) {
+ var n,
+ r,
+ i = t.stack,
+ a = e ? t.rp1 : t.rp2,
+ o = (e ? t.z0 : t.z1)[a],
+ s = t.fv,
+ l = t.pv,
+ u = i.pop();
+ switch (
+ (exports.DEBUG && console.log(t.step, "SHZ[" + e + "]", u), u)
+ ) {
+ case 0:
+ n = t.tZone;
+ break;
+ case 1:
+ n = t.gZone;
+ break;
+ default:
+ throw new Error("Invalid zone");
+ }
+ for (
+ var c = l.distance(o, o, !1, !0), f = n.length - 2, d = 0;
+ d < f;
+ d++
+ )
+ (r = n[d]), s.setRelative(r, r, c, l);
+ }
+ function pn(e, t) {
+ var n = t.stack,
+ r = n.pop() / 64,
+ i = n.pop(),
+ a = t.z1[i],
+ o = t.z0[t.rp0],
+ s = t.fv,
+ l = t.pv;
+ s.setRelative(a, o, r, l),
+ s.touch(a),
+ exports.DEBUG && console.log(t.step, "MSIRP[" + e + "]", r, i),
+ (t.rp1 = t.rp0),
+ (t.rp2 = i),
+ e && (t.rp0 = i);
+ }
+ function vn(e, t) {
+ var n = t.stack,
+ r = n.pop(),
+ i = n.pop(),
+ a = t.z0[i],
+ o = t.fv,
+ s = t.pv,
+ l = t.cvt[r];
+ exports.DEBUG &&
+ console.log(t.step, "MIAP[" + e + "]", r, "(", l, ")", i);
+ var u = s.distance(a, Jt);
+ e && (Math.abs(u - l) < t.cvCutIn && (u = l), (u = t.round(u))),
+ o.setRelative(a, Jt, u, s),
+ 0 === t.zp0 && ((a.xo = a.x), (a.yo = a.y)),
+ o.touch(a),
+ (t.rp0 = t.rp1 = i);
+ }
+ function mn(e, t) {
+ var n = t.stack,
+ r = n.pop(),
+ i = t.z2[r];
+ exports.DEBUG && console.log(t.step, "GC[" + e + "]", r),
+ n.push(64 * t.dpv.distance(i, Jt, e, !1));
+ }
+ function gn(e, t) {
+ var n = t.stack,
+ r = n.pop(),
+ i = n.pop(),
+ a = t.z1[r],
+ o = t.z0[i],
+ s = t.dpv.distance(o, a, e, e);
+ exports.DEBUG &&
+ console.log(t.step, "MD[" + e + "]", r, i, "->", s),
+ t.stack.push(Math.round(64 * s));
+ }
+ function An(e, t) {
+ var n = t.stack,
+ r = n.pop(),
+ i = t.fv,
+ a = t.pv,
+ o = t.ppem,
+ s = t.deltaBase + 16 * (e - 1),
+ l = t.deltaShift,
+ u = t.z0;
+ exports.DEBUG && console.log(t.step, "DELTAP[" + e + "]", r, n);
+ for (var c = 0; c < r; c++) {
+ var f = n.pop(),
+ d = n.pop();
+ if (s + ((240 & d) >> 4) === o) {
+ var h = (15 & d) - 8;
+ h >= 0 && h++,
+ exports.DEBUG &&
+ console.log(t.step, "DELTAPFIX", f, "by", h * l);
+ var p = u[f];
+ i.setRelative(p, p, h * l, a);
+ }
+ }
+ }
+ function yn(e, t) {
+ var n = t.stack,
+ r = n.pop();
+ exports.DEBUG && console.log(t.step, "ROUND[]"),
+ n.push(64 * t.round(r / 64));
+ }
+ function bn(e, t) {
+ var n = t.stack,
+ r = n.pop(),
+ i = t.ppem,
+ a = t.deltaBase + 16 * (e - 1),
+ o = t.deltaShift;
+ exports.DEBUG && console.log(t.step, "DELTAC[" + e + "]", r, n);
+ for (var s = 0; s < r; s++) {
+ var l = n.pop(),
+ u = n.pop();
+ if (a + ((240 & u) >> 4) === i) {
+ var c = (15 & u) - 8;
+ c >= 0 && c++;
+ var f = c * o;
+ exports.DEBUG && console.log(t.step, "DELTACFIX", l, "by", f),
+ (t.cvt[l] += f);
+ }
+ }
+ }
+ function xn(e, t) {
+ var n,
+ r,
+ i = t.stack,
+ a = i.pop(),
+ o = i.pop(),
+ s = t.z2[a],
+ l = t.z1[o];
+ exports.DEBUG && console.log(t.step, "SDPVTL[" + e + "]", a, o),
+ e
+ ? ((n = s.y - l.y), (r = l.x - s.x))
+ : ((n = l.x - s.x), (r = l.y - s.y)),
+ (t.dpv = Yt(n, r));
+ }
+ function Sn(e, t) {
+ var n = t.stack,
+ r = t.prog,
+ i = t.ip;
+ exports.DEBUG && console.log(t.step, "PUSHB[" + e + "]");
+ for (var a = 0; a < e; a++) n.push(r[++i]);
+ t.ip = i;
+ }
+ function En(e, t) {
+ var n = t.ip,
+ r = t.prog,
+ i = t.stack;
+ exports.DEBUG && console.log(t.ip, "PUSHW[" + e + "]");
+ for (var a = 0; a < e; a++) {
+ var o = (r[++n] << 8) | r[++n];
+ 32768 & o && (o = -(1 + (65535 ^ o))), i.push(o);
+ }
+ t.ip = n;
+ }
+ function _n(e, t, n, r, i, a) {
+ var o,
+ s,
+ l,
+ u,
+ c = a.stack,
+ f = e && c.pop(),
+ d = c.pop(),
+ h = a.rp0,
+ p = a.z0[h],
+ v = a.z1[d],
+ m = a.minDis,
+ g = a.fv,
+ A = a.dpv;
+ (l = (s = o = A.distance(v, p, !0, !0)) >= 0 ? 1 : -1),
+ (s = Math.abs(s)),
+ e &&
+ ((u = a.cvt[f]), r && Math.abs(s - u) < a.cvCutIn && (s = u)),
+ n && s < m && (s = m),
+ r && (s = a.round(s)),
+ g.setRelative(v, p, l * s, A),
+ g.touch(v),
+ exports.DEBUG &&
+ console.log(
+ a.step,
+ (e ? "MIRP[" : "MDRP[") +
+ (t ? "M" : "m") +
+ (n ? ">" : "_") +
+ (r ? "R" : "_") +
+ (0 === i ? "Gr" : 1 === i ? "Bl" : 2 === i ? "Wh" : "") +
+ "]",
+ e ? f + "(" + a.cvt[f] + "," + u + ")" : "",
+ d,
+ "(d =",
+ o,
+ "->",
+ l * s,
+ ")"
+ ),
+ (a.rp1 = a.rp0),
+ (a.rp2 = d),
+ t && (a.rp0 = d);
+ }
+ function Cn(e) {
+ (this.char = e), (this.state = {}), (this.activeState = null);
+ }
+ function wn(e, t, n) {
+ (this.contextName = n),
+ (this.startIndex = e),
+ (this.endOffset = t);
+ }
+ function Tn(e, t, n) {
+ (this.contextName = e),
+ (this.openRange = null),
+ (this.ranges = []),
+ (this.checkStart = t),
+ (this.checkEnd = n);
+ }
+ function Mn(e, t) {
+ (this.context = e),
+ (this.index = t),
+ (this.length = e.length),
+ (this.current = e[t]),
+ (this.backtrack = e.slice(0, t)),
+ (this.lookahead = e.slice(t + 1));
+ }
+ function In(e) {
+ (this.eventId = e), (this.subscribers = []);
+ }
+ function kn(e) {
+ var t = this,
+ n = [
+ "start",
+ "end",
+ "next",
+ "newToken",
+ "contextStart",
+ "contextEnd",
+ "insertToken",
+ "removeToken",
+ "removeRange",
+ "replaceToken",
+ "replaceRange",
+ "composeRUD",
+ "updateContextsRanges",
+ ];
+ n.forEach(function (e) {
+ Object.defineProperty(t.events, e, { value: new In(e) });
+ }),
+ e &&
+ n.forEach(function (n) {
+ var r = e[n];
+ "function" === typeof r && t.events[n].subscribe(r);
+ });
+ [
+ "insertToken",
+ "removeToken",
+ "removeRange",
+ "replaceToken",
+ "replaceRange",
+ "composeRUD",
+ ].forEach(function (e) {
+ t.events[e].subscribe(t.updateContextsRanges);
+ });
+ }
+ function Rn(e) {
+ (this.tokens = []),
+ (this.registeredContexts = {}),
+ (this.contextCheckers = []),
+ (this.events = {}),
+ (this.registeredModifiers = []),
+ kn.call(this, e);
+ }
+ function Bn(e) {
+ return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e);
+ }
+ function Pn(e) {
+ return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(
+ e
+ );
+ }
+ function Ln(e) {
+ return /[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(
+ e
+ );
+ }
+ function Dn(e) {
+ return /[A-z]/.test(e);
+ }
+ function Un(e) {
+ (this.font = e), (this.features = {});
+ }
+ function Fn(e) {
+ (this.id = e.id),
+ (this.tag = e.tag),
+ (this.substitution = e.substitution);
+ }
+ function On(e, t) {
+ if (!e) return -1;
+ switch (t.format) {
+ case 1:
+ return t.glyphs.indexOf(e);
+ case 2:
+ for (var n = t.ranges, r = 0; r < n.length; r++) {
+ var i = n[r];
+ if (e >= i.start && e <= i.end) {
+ var a = e - i.start;
+ return i.index + a;
+ }
+ }
+ break;
+ default:
+ return -1;
+ }
+ return -1;
+ }
+ function Nn(e, t) {
+ return -1 === On(e, t.coverage) ? null : e + t.deltaGlyphId;
+ }
+ function Gn(e, t) {
+ var n = On(e, t.coverage);
+ return -1 === n ? null : t.substitute[n];
+ }
+ function Zn(e, t) {
+ for (var n = [], r = 0; r < e.length; r++) {
+ var i = e[r],
+ a = t.current,
+ o = On((a = Array.isArray(a) ? a[0] : a), i);
+ -1 !== o && n.push(o);
+ }
+ return n.length !== e.length ? -1 : n;
+ }
+ function zn(e, t) {
+ var n =
+ t.inputCoverage.length +
+ t.lookaheadCoverage.length +
+ t.backtrackCoverage.length;
+ if (e.context.length < n) return [];
+ var r = Zn(t.inputCoverage, e);
+ if (-1 === r) return [];
+ var i = t.inputCoverage.length - 1;
+ if (e.lookahead.length < t.lookaheadCoverage.length) return [];
+ for (var a = e.lookahead.slice(i); a.length && Ln(a[0].char); )
+ a.shift();
+ var o = new Mn(a, 0),
+ s = Zn(t.lookaheadCoverage, o),
+ l = [].concat(e.backtrack);
+ for (l.reverse(); l.length && Ln(l[0].char); ) l.shift();
+ if (l.length < t.backtrackCoverage.length) return [];
+ var u = new Mn(l, 0),
+ c = Zn(t.backtrackCoverage, u),
+ f = [];
+ if (
+ r.length === t.inputCoverage.length &&
+ s.length === t.lookaheadCoverage.length &&
+ c.length === t.backtrackCoverage.length
+ )
+ for (var d = 0; d < t.lookupRecords.length; d++)
+ for (
+ var h = t.lookupRecords[d].lookupListIndex,
+ p = this.getLookupByIndex(h),
+ v = 0;
+ v < p.subtables.length;
+ v++
+ ) {
+ var m = p.subtables[v],
+ g = this.getLookupMethod(p, m);
+ if ("12" === this.getSubstitutionType(p, m))
+ for (var A = 0; A < r.length; A++) {
+ var y = g(e.get(A));
+ y && f.push(y);
+ }
+ }
+ return f;
+ }
+ function Qn(e, t) {
+ var n,
+ r = On(e.current, t.coverage);
+ if (-1 === r) return null;
+ for (var i = t.ligatureSets[r], a = 0; a < i.length; a++) {
+ n = i[a];
+ for (var o = 0; o < n.components.length; o++) {
+ if (e.lookahead[o] !== n.components[o]) break;
+ if (o === n.components.length - 1) return n;
+ }
+ }
+ return null;
+ }
+ function Hn(e, t) {
+ var n = On(e, t.coverage);
+ return -1 === n ? null : t.sequences[n];
+ }
+ (Ot.prototype.exec = function (e, t) {
+ if ("number" !== typeof t)
+ throw new Error("Point size is not a number!");
+ if (!(this._errorState > 2)) {
+ var n = this.font,
+ r = this._prepState;
+ if (!r || r.ppem !== t) {
+ var i = this._fpgmState;
+ if (!i) {
+ ($t.prototype = Kt),
+ ((i = this._fpgmState =
+ new $t("fpgm", n.tables.fpgm)).funcs = []),
+ (i.font = n),
+ exports.DEBUG &&
+ (console.log("---EXEC FPGM---"), (i.step = -1));
+ try {
+ Lt(i);
+ } catch (u) {
+ return (
+ console.log("Hinting error in FPGM:" + u),
+ void (this._errorState = 3)
+ );
+ }
+ }
+ ($t.prototype = i),
+ ((r = this._prepState =
+ new $t("prep", n.tables.prep)).ppem = t);
+ var a = n.tables.cvt;
+ if (a)
+ for (
+ var o = (r.cvt = new Array(a.length)),
+ s = t / n.unitsPerEm,
+ l = 0;
+ l < a.length;
+ l++
+ )
+ o[l] = a[l] * s;
+ else r.cvt = [];
+ exports.DEBUG &&
+ (console.log("---EXEC PREP---"), (r.step = -1));
+ try {
+ Lt(r);
+ } catch (u) {
+ this._errorState < 2 &&
+ console.log("Hinting error in PREP:" + u),
+ (this._errorState = 2);
+ }
+ }
+ if (!(this._errorState > 1))
+ try {
+ return Dt(e, r);
+ } catch (u) {
+ return (
+ this._errorState < 1 &&
+ (console.log("Hinting error:" + u),
+ console.log(
+ "Note: further hinting errors are silenced"
+ )),
+ void (this._errorState = 1)
+ );
+ }
+ }
+ }),
+ (Dt = function (e, t) {
+ var n,
+ r,
+ i,
+ a = t.ppem / t.font.unitsPerEm,
+ o = a,
+ s = e.components;
+ if ((($t.prototype = t), s)) {
+ var l = t.font;
+ (r = []), (n = []);
+ for (var u = 0; u < s.length; u++) {
+ var c = s[u],
+ f = l.glyphs.get(c.glyphIndex);
+ (i = new $t("glyf", f.instructions)),
+ exports.DEBUG &&
+ (console.log("---EXEC COMP " + u + "---"),
+ (i.step = -1)),
+ Ut(f, i, a, o);
+ for (
+ var d = Math.round(c.dx * a),
+ h = Math.round(c.dy * o),
+ p = i.gZone,
+ v = i.contours,
+ m = 0;
+ m < p.length;
+ m++
+ ) {
+ var g = p[m];
+ (g.xTouched = g.yTouched = !1),
+ (g.xo = g.x = g.x + d),
+ (g.yo = g.y = g.y + h);
+ }
+ var A = r.length;
+ r.push.apply(r, p);
+ for (var y = 0; y < v.length; y++) n.push(v[y] + A);
+ }
+ e.instructions &&
+ !i.inhibitGridFit &&
+ (((i = new $t("glyf", e.instructions)).gZone =
+ i.z0 =
+ i.z1 =
+ i.z2 =
+ r),
+ (i.contours = n),
+ r.push(
+ new qt(0, 0),
+ new qt(Math.round(e.advanceWidth * a), 0)
+ ),
+ exports.DEBUG &&
+ (console.log("---EXEC COMPOSITE---"), (i.step = -1)),
+ Lt(i),
+ (r.length -= 2));
+ } else
+ (i = new $t("glyf", e.instructions)),
+ exports.DEBUG &&
+ (console.log("---EXEC GLYPH---"), (i.step = -1)),
+ Ut(e, i, a, o),
+ (r = i.gZone);
+ return r;
+ }),
+ (Ut = function (e, t, n, r) {
+ for (
+ var i,
+ a,
+ o,
+ s = e.points || [],
+ l = s.length,
+ u = (t.gZone = t.z0 = t.z1 = t.z2 = []),
+ c = (t.contours = []),
+ f = 0;
+ f < l;
+ f++
+ )
+ (i = s[f]),
+ (u[f] = new qt(
+ i.x * n,
+ i.y * r,
+ i.lastPointOfContour,
+ i.onCurve
+ ));
+ for (var d = 0; d < l; d++)
+ (i = u[d]),
+ a || ((a = i), c.push(d)),
+ i.lastPointOfContour
+ ? ((i.nextPointOnContour = a),
+ (a.prevPointOnContour = i),
+ (a = void 0))
+ : ((o = u[d + 1]),
+ (i.nextPointOnContour = o),
+ (o.prevPointOnContour = i));
+ if (!t.inhibitGridFit) {
+ if (exports.DEBUG) {
+ console.log("PROCESSING GLYPH", t.stack);
+ for (var h = 0; h < l; h++) console.log(h, u[h].x, u[h].y);
+ }
+ if (
+ (u.push(
+ new qt(0, 0),
+ new qt(Math.round(e.advanceWidth * n), 0)
+ ),
+ Lt(t),
+ (u.length -= 2),
+ exports.DEBUG)
+ ) {
+ console.log("FINISHED GLYPH", t.stack);
+ for (var p = 0; p < l; p++) console.log(p, u[p].x, u[p].y);
+ }
+ }
+ }),
+ (Lt = function (e) {
+ var t = e.prog;
+ if (t) {
+ var n,
+ r = t.length;
+ for (e.ip = 0; e.ip < r; e.ip++) {
+ if ((exports.DEBUG && e.step++, !(n = Pt[t[e.ip]])))
+ throw new Error(
+ "unknown instruction: 0x" + Number(t[e.ip]).toString(16)
+ );
+ n(e);
+ }
+ }
+ }),
+ (Pt = [
+ nn.bind(void 0, Wt),
+ nn.bind(void 0, jt),
+ rn.bind(void 0, Wt),
+ rn.bind(void 0, jt),
+ an.bind(void 0, Wt),
+ an.bind(void 0, jt),
+ on.bind(void 0, 0),
+ on.bind(void 0, 1),
+ sn.bind(void 0, 0),
+ sn.bind(void 0, 1),
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "SPVFS[]", n, r),
+ (e.pv = e.dpv = Yt(r, n));
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "SPVFS[]", n, r),
+ (e.fv = Yt(r, n));
+ },
+ function (e) {
+ var t = e.stack,
+ n = e.pv;
+ exports.DEBUG && console.log(e.step, "GPV[]"),
+ t.push(16384 * n.x),
+ t.push(16384 * n.y);
+ },
+ function (e) {
+ var t = e.stack,
+ n = e.fv;
+ exports.DEBUG && console.log(e.step, "GFV[]"),
+ t.push(16384 * n.x),
+ t.push(16384 * n.y);
+ },
+ function (e) {
+ (e.fv = e.pv),
+ exports.DEBUG && console.log(e.step, "SFVTPV[]");
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop(),
+ i = t.pop(),
+ a = t.pop(),
+ o = t.pop(),
+ s = e.z0,
+ l = e.z1,
+ u = s[n],
+ c = s[r],
+ f = l[i],
+ d = l[a],
+ h = e.z2[o];
+ exports.DEBUG && console.log("ISECT[], ", n, r, i, a, o);
+ var p = u.x,
+ v = u.y,
+ m = c.x,
+ g = c.y,
+ A = f.x,
+ y = f.y,
+ b = d.x,
+ x = d.y,
+ S = (p - m) * (y - x) - (v - g) * (A - b),
+ E = p * g - v * m,
+ _ = A * x - y * b;
+ (h.x = (E * (A - b) - _ * (p - m)) / S),
+ (h.y = (E * (y - x) - _ * (v - g)) / S);
+ },
+ function (e) {
+ (e.rp0 = e.stack.pop()),
+ exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
+ },
+ function (e) {
+ (e.rp1 = e.stack.pop()),
+ exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
+ },
+ function (e) {
+ (e.rp2 = e.stack.pop()),
+ exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "SZP0[]", t),
+ (e.zp0 = t),
+ t)
+ ) {
+ case 0:
+ e.tZone || en(e), (e.z0 = e.tZone);
+ break;
+ case 1:
+ e.z0 = e.gZone;
+ break;
+ default:
+ throw new Error("Invalid zone pointer");
+ }
+ },
+ function (e) {
+ var t = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "SZP1[]", t),
+ (e.zp1 = t),
+ t)
+ ) {
+ case 0:
+ e.tZone || en(e), (e.z1 = e.tZone);
+ break;
+ case 1:
+ e.z1 = e.gZone;
+ break;
+ default:
+ throw new Error("Invalid zone pointer");
+ }
+ },
+ function (e) {
+ var t = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "SZP2[]", t),
+ (e.zp2 = t),
+ t)
+ ) {
+ case 0:
+ e.tZone || en(e), (e.z2 = e.tZone);
+ break;
+ case 1:
+ e.z2 = e.gZone;
+ break;
+ default:
+ throw new Error("Invalid zone pointer");
+ }
+ },
+ function (e) {
+ var t = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "SZPS[]", t),
+ (e.zp0 = e.zp1 = e.zp2 = t),
+ t)
+ ) {
+ case 0:
+ e.tZone || en(e), (e.z0 = e.z1 = e.z2 = e.tZone);
+ break;
+ case 1:
+ e.z0 = e.z1 = e.z2 = e.gZone;
+ break;
+ default:
+ throw new Error("Invalid zone pointer");
+ }
+ },
+ function (e) {
+ (e.loop = e.stack.pop()),
+ exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
+ },
+ function (e) {
+ exports.DEBUG && console.log(e.step, "RTG[]"), (e.round = Gt);
+ },
+ function (e) {
+ exports.DEBUG && console.log(e.step, "RTHG[]"),
+ (e.round = zt);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "SMD[]", t),
+ (e.minDis = t / 64);
+ },
+ function (e) {
+ exports.DEBUG && console.log(e.step, "ELSE[]"), tn(e, !1);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "JMPR[]", t),
+ (e.ip += t - 1);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "SCVTCI[]", t),
+ (e.cvCutIn = t / 64);
+ },
+ void 0,
+ void 0,
+ function (e) {
+ var t = e.stack;
+ exports.DEBUG && console.log(e.step, "DUP[]"),
+ t.push(t[t.length - 1]);
+ },
+ ln,
+ function (e) {
+ exports.DEBUG && console.log(e.step, "CLEAR[]"),
+ (e.stack.length = 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "SWAP[]"),
+ t.push(n),
+ t.push(r);
+ },
+ function (e) {
+ var t = e.stack;
+ exports.DEBUG && console.log(e.step, "DEPTH[]"),
+ t.push(t.length);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "CINDEX[]", n),
+ t.push(t[t.length - n]);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "MINDEX[]", n),
+ t.push(t.splice(t.length - n, 1)[0]);
+ },
+ void 0,
+ void 0,
+ void 0,
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "LOOPCALL[]", n, r);
+ var i = e.ip,
+ a = e.prog;
+ e.prog = e.funcs[n];
+ for (var o = 0; o < r; o++)
+ Lt(e),
+ exports.DEBUG &&
+ console.log(
+ ++e.step,
+ o + 1 < r ? "next loopcall" : "done loopcall",
+ o
+ );
+ (e.ip = i), (e.prog = a);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "CALL[]", t);
+ var n = e.ip,
+ r = e.prog;
+ (e.prog = e.funcs[t]),
+ Lt(e),
+ (e.ip = n),
+ (e.prog = r),
+ exports.DEBUG && console.log(++e.step, "returning from", t);
+ },
+ function (e) {
+ if ("fpgm" !== e.env)
+ throw new Error("FDEF not allowed here");
+ var t = e.stack,
+ n = e.prog,
+ r = e.ip,
+ i = t.pop(),
+ a = r;
+ for (
+ exports.DEBUG && console.log(e.step, "FDEF[]", i);
+ 45 !== n[++r];
+
+ );
+ (e.ip = r), (e.funcs[i] = n.slice(a + 1, r));
+ },
+ void 0,
+ un.bind(void 0, 0),
+ un.bind(void 0, 1),
+ cn.bind(void 0, Wt),
+ cn.bind(void 0, jt),
+ fn.bind(void 0, 0),
+ fn.bind(void 0, 1),
+ dn.bind(void 0, 0),
+ dn.bind(void 0, 1),
+ hn.bind(void 0, 0),
+ hn.bind(void 0, 1),
+ function (e) {
+ for (
+ var t = e.stack,
+ n = e.loop,
+ r = e.fv,
+ i = t.pop() / 64,
+ a = e.z2;
+ n--;
+
+ ) {
+ var o = t.pop(),
+ s = a[o];
+ exports.DEBUG &&
+ console.log(
+ e.step,
+ (e.loop > 1 ? "loop " + (e.loop - n) + ": " : "") +
+ "SHPIX[]",
+ o,
+ i
+ ),
+ r.setRelative(s, s, i),
+ r.touch(s);
+ }
+ e.loop = 1;
+ },
+ function (e) {
+ for (
+ var t = e.stack,
+ n = e.rp1,
+ r = e.rp2,
+ i = e.loop,
+ a = e.z0[n],
+ o = e.z1[r],
+ s = e.fv,
+ l = e.dpv,
+ u = e.z2;
+ i--;
+
+ ) {
+ var c = t.pop(),
+ f = u[c];
+ exports.DEBUG &&
+ console.log(
+ e.step,
+ (e.loop > 1 ? "loop " + (e.loop - i) + ": " : "") +
+ "IP[]",
+ c,
+ n,
+ "<->",
+ r
+ ),
+ s.interpolate(f, a, o, l),
+ s.touch(f);
+ }
+ e.loop = 1;
+ },
+ pn.bind(void 0, 0),
+ pn.bind(void 0, 1),
+ function (e) {
+ for (
+ var t = e.stack,
+ n = e.rp0,
+ r = e.z0[n],
+ i = e.loop,
+ a = e.fv,
+ o = e.pv,
+ s = e.z1;
+ i--;
+
+ ) {
+ var l = t.pop(),
+ u = s[l];
+ exports.DEBUG &&
+ console.log(
+ e.step,
+ (e.loop > 1 ? "loop " + (e.loop - i) + ": " : "") +
+ "ALIGNRP[]",
+ l
+ ),
+ a.setRelative(u, r, 0, o),
+ a.touch(u);
+ }
+ e.loop = 1;
+ },
+ function (e) {
+ exports.DEBUG && console.log(e.step, "RTDG[]"),
+ (e.round = Zt);
+ },
+ vn.bind(void 0, 0),
+ vn.bind(void 0, 1),
+ function (e) {
+ var t = e.prog,
+ n = e.ip,
+ r = e.stack,
+ i = t[++n];
+ exports.DEBUG && console.log(e.step, "NPUSHB[]", i);
+ for (var a = 0; a < i; a++) r.push(t[++n]);
+ e.ip = n;
+ },
+ function (e) {
+ var t = e.ip,
+ n = e.prog,
+ r = e.stack,
+ i = n[++t];
+ exports.DEBUG && console.log(e.step, "NPUSHW[]", i);
+ for (var a = 0; a < i; a++) {
+ var o = (n[++t] << 8) | n[++t];
+ 32768 & o && (o = -(1 + (65535 ^ o))), r.push(o);
+ }
+ e.ip = t;
+ },
+ function (e) {
+ var t = e.stack,
+ n = e.store;
+ n || (n = e.store = []);
+ var r = t.pop(),
+ i = t.pop();
+ exports.DEBUG && console.log(e.step, "WS", r, i), (n[i] = r);
+ },
+ function (e) {
+ var t = e.stack,
+ n = e.store,
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "RS", r);
+ var i = (n && n[r]) || 0;
+ t.push(i);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "WCVTP", n, r),
+ (e.cvt[r] = n / 64);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "RCVT", n),
+ t.push(64 * e.cvt[n]);
+ },
+ mn.bind(void 0, 0),
+ mn.bind(void 0, 1),
+ void 0,
+ gn.bind(void 0, 0),
+ gn.bind(void 0, 1),
+ function (e) {
+ exports.DEBUG && console.log(e.step, "MPPEM[]"),
+ e.stack.push(e.ppem);
+ },
+ void 0,
+ function (e) {
+ exports.DEBUG && console.log(e.step, "FLIPON[]"),
+ (e.autoFlip = !0);
+ },
+ void 0,
+ void 0,
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "LT[]", n, r),
+ t.push(r < n ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "LTEQ[]", n, r),
+ t.push(r <= n ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "GT[]", n, r),
+ t.push(r > n ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "GTEQ[]", n, r),
+ t.push(r >= n ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "EQ[]", n, r),
+ t.push(n === r ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "NEQ[]", n, r),
+ t.push(n !== r ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "ODD[]", n),
+ t.push(Math.trunc(n) % 2 ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "EVEN[]", n),
+ t.push(Math.trunc(n) % 2 ? 0 : 1);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "IF[]", t),
+ t ||
+ (tn(e, !0),
+ exports.DEBUG && console.log(e.step, "EIF[]"));
+ },
+ function (e) {
+ exports.DEBUG && console.log(e.step, "EIF[]");
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "AND[]", n, r),
+ t.push(n && r ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "OR[]", n, r),
+ t.push(n || r ? 1 : 0);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "NOT[]", n),
+ t.push(n ? 0 : 1);
+ },
+ An.bind(void 0, 1),
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "SDB[]", t),
+ (e.deltaBase = t);
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "SDS[]", t),
+ (e.deltaShift = Math.pow(0.5, t));
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "ADD[]", n, r),
+ t.push(r + n);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "SUB[]", n, r),
+ t.push(r - n);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "DIV[]", n, r),
+ t.push((64 * r) / n);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "MUL[]", n, r),
+ t.push((r * n) / 64);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "ABS[]", n),
+ t.push(Math.abs(n));
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "NEG[]", n), t.push(-n);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "FLOOR[]", n),
+ t.push(64 * Math.floor(n / 64));
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop();
+ exports.DEBUG && console.log(e.step, "CEILING[]", n),
+ t.push(64 * Math.ceil(n / 64));
+ },
+ yn.bind(void 0, 0),
+ yn.bind(void 0, 1),
+ yn.bind(void 0, 2),
+ yn.bind(void 0, 3),
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "WCVTF[]", n, r),
+ (e.cvt[r] = (n * e.ppem) / e.font.unitsPerEm);
+ },
+ An.bind(void 0, 2),
+ An.bind(void 0, 3),
+ bn.bind(void 0, 1),
+ bn.bind(void 0, 2),
+ bn.bind(void 0, 3),
+ function (e) {
+ var t,
+ n = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "SROUND[]", n),
+ (e.round = Vt),
+ 192 & n)
+ ) {
+ case 0:
+ t = 0.5;
+ break;
+ case 64:
+ t = 1;
+ break;
+ case 128:
+ t = 2;
+ break;
+ default:
+ throw new Error("invalid SROUND value");
+ }
+ switch (((e.srPeriod = t), 48 & n)) {
+ case 0:
+ e.srPhase = 0;
+ break;
+ case 16:
+ e.srPhase = 0.25 * t;
+ break;
+ case 32:
+ e.srPhase = 0.5 * t;
+ break;
+ case 48:
+ e.srPhase = 0.75 * t;
+ break;
+ default:
+ throw new Error("invalid SROUND value");
+ }
+ (n &= 15), (e.srThreshold = 0 === n ? 0 : (n / 8 - 0.5) * t);
+ },
+ function (e) {
+ var t,
+ n = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "S45ROUND[]", n),
+ (e.round = Vt),
+ 192 & n)
+ ) {
+ case 0:
+ t = Math.sqrt(2) / 2;
+ break;
+ case 64:
+ t = Math.sqrt(2);
+ break;
+ case 128:
+ t = 2 * Math.sqrt(2);
+ break;
+ default:
+ throw new Error("invalid S45ROUND value");
+ }
+ switch (((e.srPeriod = t), 48 & n)) {
+ case 0:
+ e.srPhase = 0;
+ break;
+ case 16:
+ e.srPhase = 0.25 * t;
+ break;
+ case 32:
+ e.srPhase = 0.5 * t;
+ break;
+ case 48:
+ e.srPhase = 0.75 * t;
+ break;
+ default:
+ throw new Error("invalid S45ROUND value");
+ }
+ (n &= 15), (e.srThreshold = 0 === n ? 0 : (n / 8 - 0.5) * t);
+ },
+ void 0,
+ void 0,
+ function (e) {
+ exports.DEBUG && console.log(e.step, "ROFF[]"),
+ (e.round = Nt);
+ },
+ void 0,
+ function (e) {
+ exports.DEBUG && console.log(e.step, "RUTG[]"),
+ (e.round = Qt);
+ },
+ function (e) {
+ exports.DEBUG && console.log(e.step, "RDTG[]"),
+ (e.round = Ht);
+ },
+ ln,
+ ln,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "SCANCTRL[]", t);
+ },
+ xn.bind(void 0, 0),
+ xn.bind(void 0, 1),
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = 0;
+ exports.DEBUG && console.log(e.step, "GETINFO[]", n),
+ 1 & n && (r = 35),
+ 32 & n && (r |= 4096),
+ t.push(r);
+ },
+ void 0,
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop(),
+ i = t.pop();
+ exports.DEBUG && console.log(e.step, "ROLL[]"),
+ t.push(r),
+ t.push(n),
+ t.push(i);
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "MAX[]", n, r),
+ t.push(Math.max(r, n));
+ },
+ function (e) {
+ var t = e.stack,
+ n = t.pop(),
+ r = t.pop();
+ exports.DEBUG && console.log(e.step, "MIN[]", n, r),
+ t.push(Math.min(r, n));
+ },
+ function (e) {
+ var t = e.stack.pop();
+ exports.DEBUG && console.log(e.step, "SCANTYPE[]", t);
+ },
+ function (e) {
+ var t = e.stack.pop(),
+ n = e.stack.pop();
+ switch (
+ (exports.DEBUG && console.log(e.step, "INSTCTRL[]", t, n),
+ t)
+ ) {
+ case 1:
+ return void (e.inhibitGridFit = !!n);
+ case 2:
+ return void (e.ignoreCvt = !!n);
+ default:
+ throw new Error("invalid INSTCTRL[] selector");
+ }
+ },
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ void 0,
+ Sn.bind(void 0, 1),
+ Sn.bind(void 0, 2),
+ Sn.bind(void 0, 3),
+ Sn.bind(void 0, 4),
+ Sn.bind(void 0, 5),
+ Sn.bind(void 0, 6),
+ Sn.bind(void 0, 7),
+ Sn.bind(void 0, 8),
+ En.bind(void 0, 1),
+ En.bind(void 0, 2),
+ En.bind(void 0, 3),
+ En.bind(void 0, 4),
+ En.bind(void 0, 5),
+ En.bind(void 0, 6),
+ En.bind(void 0, 7),
+ En.bind(void 0, 8),
+ _n.bind(void 0, 0, 0, 0, 0, 0),
+ _n.bind(void 0, 0, 0, 0, 0, 1),
+ _n.bind(void 0, 0, 0, 0, 0, 2),
+ _n.bind(void 0, 0, 0, 0, 0, 3),
+ _n.bind(void 0, 0, 0, 0, 1, 0),
+ _n.bind(void 0, 0, 0, 0, 1, 1),
+ _n.bind(void 0, 0, 0, 0, 1, 2),
+ _n.bind(void 0, 0, 0, 0, 1, 3),
+ _n.bind(void 0, 0, 0, 1, 0, 0),
+ _n.bind(void 0, 0, 0, 1, 0, 1),
+ _n.bind(void 0, 0, 0, 1, 0, 2),
+ _n.bind(void 0, 0, 0, 1, 0, 3),
+ _n.bind(void 0, 0, 0, 1, 1, 0),
+ _n.bind(void 0, 0, 0, 1, 1, 1),
+ _n.bind(void 0, 0, 0, 1, 1, 2),
+ _n.bind(void 0, 0, 0, 1, 1, 3),
+ _n.bind(void 0, 0, 1, 0, 0, 0),
+ _n.bind(void 0, 0, 1, 0, 0, 1),
+ _n.bind(void 0, 0, 1, 0, 0, 2),
+ _n.bind(void 0, 0, 1, 0, 0, 3),
+ _n.bind(void 0, 0, 1, 0, 1, 0),
+ _n.bind(void 0, 0, 1, 0, 1, 1),
+ _n.bind(void 0, 0, 1, 0, 1, 2),
+ _n.bind(void 0, 0, 1, 0, 1, 3),
+ _n.bind(void 0, 0, 1, 1, 0, 0),
+ _n.bind(void 0, 0, 1, 1, 0, 1),
+ _n.bind(void 0, 0, 1, 1, 0, 2),
+ _n.bind(void 0, 0, 1, 1, 0, 3),
+ _n.bind(void 0, 0, 1, 1, 1, 0),
+ _n.bind(void 0, 0, 1, 1, 1, 1),
+ _n.bind(void 0, 0, 1, 1, 1, 2),
+ _n.bind(void 0, 0, 1, 1, 1, 3),
+ _n.bind(void 0, 1, 0, 0, 0, 0),
+ _n.bind(void 0, 1, 0, 0, 0, 1),
+ _n.bind(void 0, 1, 0, 0, 0, 2),
+ _n.bind(void 0, 1, 0, 0, 0, 3),
+ _n.bind(void 0, 1, 0, 0, 1, 0),
+ _n.bind(void 0, 1, 0, 0, 1, 1),
+ _n.bind(void 0, 1, 0, 0, 1, 2),
+ _n.bind(void 0, 1, 0, 0, 1, 3),
+ _n.bind(void 0, 1, 0, 1, 0, 0),
+ _n.bind(void 0, 1, 0, 1, 0, 1),
+ _n.bind(void 0, 1, 0, 1, 0, 2),
+ _n.bind(void 0, 1, 0, 1, 0, 3),
+ _n.bind(void 0, 1, 0, 1, 1, 0),
+ _n.bind(void 0, 1, 0, 1, 1, 1),
+ _n.bind(void 0, 1, 0, 1, 1, 2),
+ _n.bind(void 0, 1, 0, 1, 1, 3),
+ _n.bind(void 0, 1, 1, 0, 0, 0),
+ _n.bind(void 0, 1, 1, 0, 0, 1),
+ _n.bind(void 0, 1, 1, 0, 0, 2),
+ _n.bind(void 0, 1, 1, 0, 0, 3),
+ _n.bind(void 0, 1, 1, 0, 1, 0),
+ _n.bind(void 0, 1, 1, 0, 1, 1),
+ _n.bind(void 0, 1, 1, 0, 1, 2),
+ _n.bind(void 0, 1, 1, 0, 1, 3),
+ _n.bind(void 0, 1, 1, 1, 0, 0),
+ _n.bind(void 0, 1, 1, 1, 0, 1),
+ _n.bind(void 0, 1, 1, 1, 0, 2),
+ _n.bind(void 0, 1, 1, 1, 0, 3),
+ _n.bind(void 0, 1, 1, 1, 1, 0),
+ _n.bind(void 0, 1, 1, 1, 1, 1),
+ _n.bind(void 0, 1, 1, 1, 1, 2),
+ _n.bind(void 0, 1, 1, 1, 1, 3),
+ ]),
+ (Cn.prototype.setState = function (e, t) {
+ return (
+ (this.state[e] = t),
+ (this.activeState = { key: e, value: this.state[e] }),
+ this.activeState
+ );
+ }),
+ (Cn.prototype.getState = function (e) {
+ return this.state[e] || null;
+ }),
+ (Rn.prototype.inboundIndex = function (e) {
+ return e >= 0 && e < this.tokens.length;
+ }),
+ (Rn.prototype.composeRUD = function (e) {
+ var t = this,
+ n = e.map(function (e) {
+ return t[e[0]].apply(t, e.slice(1).concat(true));
+ }),
+ r = function (e) {
+ return "object" === typeof e && e.hasOwnProperty("FAIL");
+ };
+ if (n.every(r))
+ return {
+ FAIL: "composeRUD: one or more operations hasn't completed successfully",
+ report: n.filter(r),
+ };
+ this.dispatch("composeRUD", [
+ n.filter(function (e) {
+ return !r(e);
+ }),
+ ]);
+ }),
+ (Rn.prototype.replaceRange = function (e, t, n, r) {
+ t = null !== t ? t : this.tokens.length;
+ var i = n.every(function (e) {
+ return e instanceof Cn;
+ });
+ if (!isNaN(e) && this.inboundIndex(e) && i) {
+ var a = this.tokens.splice.apply(
+ this.tokens,
+ [e, t].concat(n)
+ );
+ return r || this.dispatch("replaceToken", [e, t, n]), [a, n];
+ }
+ return { FAIL: "replaceRange: invalid tokens or startIndex." };
+ }),
+ (Rn.prototype.replaceToken = function (e, t, n) {
+ if (!isNaN(e) && this.inboundIndex(e) && t instanceof Cn) {
+ var r = this.tokens.splice(e, 1, t);
+ return n || this.dispatch("replaceToken", [e, t]), [r[0], t];
+ }
+ return { FAIL: "replaceToken: invalid token or index." };
+ }),
+ (Rn.prototype.removeRange = function (e, t, n) {
+ t = isNaN(t) ? this.tokens.length : t;
+ var r = this.tokens.splice(e, t);
+ return n || this.dispatch("removeRange", [r, e, t]), r;
+ }),
+ (Rn.prototype.removeToken = function (e, t) {
+ if (!isNaN(e) && this.inboundIndex(e)) {
+ var n = this.tokens.splice(e, 1);
+ return t || this.dispatch("removeToken", [n, e]), n;
+ }
+ return { FAIL: "removeToken: invalid token index." };
+ }),
+ (Rn.prototype.insertToken = function (e, t, n) {
+ return e.every(function (e) {
+ return e instanceof Cn;
+ })
+ ? (this.tokens.splice.apply(this.tokens, [t, 0].concat(e)),
+ n || this.dispatch("insertToken", [e, t]),
+ e)
+ : { FAIL: "insertToken: invalid token(s)." };
+ }),
+ (Rn.prototype.registerModifier = function (e, t, n) {
+ this.events.newToken.subscribe(function (r, i) {
+ var a = [r, i],
+ o = [r, i];
+ if (null === t || !0 === t.apply(this, a)) {
+ var s = n.apply(this, o);
+ r.setState(e, s);
+ }
+ }),
+ this.registeredModifiers.push(e);
+ }),
+ (In.prototype.subscribe = function (e) {
+ return "function" === typeof e
+ ? this.subscribers.push(e) - 1
+ : { FAIL: "invalid '" + this.eventId + "' event handler" };
+ }),
+ (In.prototype.unsubscribe = function (e) {
+ this.subscribers.splice(e, 1);
+ }),
+ (Mn.prototype.setCurrentIndex = function (e) {
+ (this.index = e),
+ (this.current = this.context[e]),
+ (this.backtrack = this.context.slice(0, e)),
+ (this.lookahead = this.context.slice(e + 1));
+ }),
+ (Mn.prototype.get = function (e) {
+ switch (!0) {
+ case 0 === e:
+ return this.current;
+ case e < 0 && Math.abs(e) <= this.backtrack.length:
+ return this.backtrack.slice(e)[0];
+ case e > 0 && e <= this.lookahead.length:
+ return this.lookahead[e - 1];
+ default:
+ return null;
+ }
+ }),
+ (Rn.prototype.rangeToText = function (e) {
+ if (e instanceof wn)
+ return this.getRangeTokens(e)
+ .map(function (e) {
+ return e.char;
+ })
+ .join("");
+ }),
+ (Rn.prototype.getText = function () {
+ return this.tokens
+ .map(function (e) {
+ return e.char;
+ })
+ .join("");
+ }),
+ (Rn.prototype.getContext = function (e) {
+ var t = this.registeredContexts[e];
+ return t || null;
+ }),
+ (Rn.prototype.on = function (e, t) {
+ var n = this.events[e];
+ return n ? n.subscribe(t) : null;
+ }),
+ (Rn.prototype.dispatch = function (e, t) {
+ var n = this,
+ r = this.events[e];
+ r instanceof In &&
+ r.subscribers.forEach(function (e) {
+ e.apply(n, t || []);
+ });
+ }),
+ (Rn.prototype.registerContextChecker = function (e, t, n) {
+ if (this.getContext(e))
+ return {
+ FAIL: "context name '" + e + "' is already registered.",
+ };
+ if ("function" !== typeof t)
+ return { FAIL: "missing context start check." };
+ if ("function" !== typeof n)
+ return { FAIL: "missing context end check." };
+ var r = new Tn(e, t, n);
+ return (
+ (this.registeredContexts[e] = r),
+ this.contextCheckers.push(r),
+ r
+ );
+ }),
+ (Rn.prototype.getRangeTokens = function (e) {
+ var t = e.startIndex + e.endOffset;
+ return [].concat(this.tokens.slice(e.startIndex, t));
+ }),
+ (Rn.prototype.getContextRanges = function (e) {
+ var t = this.getContext(e);
+ return t
+ ? t.ranges
+ : { FAIL: "context checker '" + e + "' is not registered." };
+ }),
+ (Rn.prototype.resetContextsRanges = function () {
+ var e = this.registeredContexts;
+ for (var t in e) {
+ if (e.hasOwnProperty(t)) e[t].ranges = [];
+ }
+ }),
+ (Rn.prototype.updateContextsRanges = function () {
+ this.resetContextsRanges();
+ for (
+ var e = this.tokens.map(function (e) {
+ return e.char;
+ }),
+ t = 0;
+ t < e.length;
+ t++
+ ) {
+ var n = new Mn(e, t);
+ this.runContextCheck(n);
+ }
+ this.dispatch("updateContextsRanges", [
+ this.registeredContexts,
+ ]);
+ }),
+ (Rn.prototype.setEndOffset = function (e, t) {
+ var n = new wn(this.getContext(t).openRange.startIndex, e, t),
+ r = this.getContext(t).ranges;
+ return (
+ (n.rangeId = t + "." + r.length),
+ r.push(n),
+ (this.getContext(t).openRange = null),
+ n
+ );
+ }),
+ (Rn.prototype.runContextCheck = function (e) {
+ var t = this,
+ n = e.index;
+ this.contextCheckers.forEach(function (r) {
+ var i = r.contextName,
+ a = t.getContext(i).openRange;
+ if (
+ (!a &&
+ r.checkStart(e) &&
+ ((a = new wn(n, null, i)),
+ (t.getContext(i).openRange = a),
+ t.dispatch("contextStart", [i, n])),
+ a && r.checkEnd(e))
+ ) {
+ var o = n - a.startIndex + 1,
+ s = t.setEndOffset(o, i);
+ t.dispatch("contextEnd", [i, s]);
+ }
+ });
+ }),
+ (Rn.prototype.tokenize = function (e) {
+ (this.tokens = []), this.resetContextsRanges();
+ var t = Array.from(e);
+ this.dispatch("start");
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n],
+ i = new Mn(t, n);
+ this.dispatch("next", [i]), this.runContextCheck(i);
+ var a = new Cn(r);
+ this.tokens.push(a), this.dispatch("newToken", [a, i]);
+ }
+ return this.dispatch("end", [this.tokens]), this.tokens;
+ }),
+ (Un.prototype.getDefaultScriptFeaturesIndexes = function () {
+ for (
+ var e = this.font.tables.gsub.scripts, t = 0;
+ t < e.length;
+ t++
+ ) {
+ var n = e[t];
+ if ("DFLT" === n.tag)
+ return n.script.defaultLangSys.featureIndexes;
+ }
+ return [];
+ }),
+ (Un.prototype.getScriptFeaturesIndexes = function (e) {
+ if (!this.font.tables.gsub) return [];
+ if (!e) return this.getDefaultScriptFeaturesIndexes();
+ for (
+ var t = this.font.tables.gsub.scripts, n = 0;
+ n < t.length;
+ n++
+ ) {
+ var r = t[n];
+ if (r.tag === e && r.script.defaultLangSys)
+ return r.script.defaultLangSys.featureIndexes;
+ var i = r.langSysRecords;
+ if (i)
+ for (var a = 0; a < i.length; a++) {
+ var o = i[a];
+ if (o.tag === e) return o.langSys.featureIndexes;
+ }
+ }
+ return this.getDefaultScriptFeaturesIndexes();
+ }),
+ (Un.prototype.mapTagsToFeatures = function (e, t) {
+ for (var n = {}, r = 0; r < e.length; r++) {
+ var i = e[r].tag,
+ a = e[r].feature;
+ n[i] = a;
+ }
+ this.features[t].tags = n;
+ }),
+ (Un.prototype.getScriptFeatures = function (e) {
+ var t = this.features[e];
+ if (this.features.hasOwnProperty(e)) return t;
+ var n = this.getScriptFeaturesIndexes(e);
+ if (!n) return null;
+ var r = this.font.tables.gsub;
+ return (
+ (t = n.map(function (e) {
+ return r.features[e];
+ })),
+ (this.features[e] = t),
+ this.mapTagsToFeatures(t, e),
+ t
+ );
+ }),
+ (Un.prototype.getSubstitutionType = function (e, t) {
+ return e.lookupType.toString() + t.substFormat.toString();
+ }),
+ (Un.prototype.getLookupMethod = function (e, t) {
+ var n = this;
+ switch (this.getSubstitutionType(e, t)) {
+ case "11":
+ return function (e) {
+ return Nn.apply(n, [e, t]);
+ };
+ case "12":
+ return function (e) {
+ return Gn.apply(n, [e, t]);
+ };
+ case "63":
+ return function (e) {
+ return zn.apply(n, [e, t]);
+ };
+ case "41":
+ return function (e) {
+ return Qn.apply(n, [e, t]);
+ };
+ case "21":
+ return function (e) {
+ return Hn.apply(n, [e, t]);
+ };
+ default:
+ throw new Error(
+ "lookupType: " +
+ e.lookupType +
+ " - substFormat: " +
+ t.substFormat +
+ " is not yet supported"
+ );
+ }
+ }),
+ (Un.prototype.lookupFeature = function (e) {
+ var t = e.contextParams,
+ n = t.index,
+ r = this.getFeature({ tag: e.tag, script: e.script });
+ if (!r)
+ return new Error(
+ "font '" +
+ this.font.names.fullName.en +
+ "' doesn't support feature '" +
+ e.tag +
+ "' for script '" +
+ e.script +
+ "'."
+ );
+ for (
+ var i = this.getFeatureLookups(r),
+ a = [].concat(t.context),
+ o = 0;
+ o < i.length;
+ o++
+ )
+ for (
+ var s = i[o], l = this.getLookupSubtables(s), u = 0;
+ u < l.length;
+ u++
+ ) {
+ var c = l[u],
+ f = this.getSubstitutionType(s, c),
+ d = this.getLookupMethod(s, c),
+ h = void 0;
+ switch (f) {
+ case "11":
+ (h = d(t.current)) &&
+ a.splice(
+ n,
+ 1,
+ new Fn({ id: 11, tag: e.tag, substitution: h })
+ );
+ break;
+ case "12":
+ (h = d(t.current)) &&
+ a.splice(
+ n,
+ 1,
+ new Fn({ id: 12, tag: e.tag, substitution: h })
+ );
+ break;
+ case "63":
+ (h = d(t)),
+ Array.isArray(h) &&
+ h.length &&
+ a.splice(
+ n,
+ 1,
+ new Fn({ id: 63, tag: e.tag, substitution: h })
+ );
+ break;
+ case "41":
+ (h = d(t)) &&
+ a.splice(
+ n,
+ 1,
+ new Fn({ id: 41, tag: e.tag, substitution: h })
+ );
+ break;
+ case "21":
+ (h = d(t.current)) &&
+ a.splice(
+ n,
+ 1,
+ new Fn({ id: 21, tag: e.tag, substitution: h })
+ );
+ }
+ (t = new Mn(a, n)),
+ (Array.isArray(h) && !h.length) || (h = null);
+ }
+ return a.length ? a : null;
+ }),
+ (Un.prototype.supports = function (e) {
+ if (!e.script) return !1;
+ this.getScriptFeatures(e.script);
+ var t = this.features.hasOwnProperty(e.script);
+ if (!e.tag) return t;
+ var n = this.features[e.script].some(function (t) {
+ return t.tag === e.tag;
+ });
+ return t && n;
+ }),
+ (Un.prototype.getLookupSubtables = function (e) {
+ return e.subtables || null;
+ }),
+ (Un.prototype.getLookupByIndex = function (e) {
+ return this.font.tables.gsub.lookups[e] || null;
+ }),
+ (Un.prototype.getFeatureLookups = function (e) {
+ return e.lookupListIndexes.map(
+ this.getLookupByIndex.bind(this)
+ );
+ }),
+ (Un.prototype.getFeature = function (e) {
+ if (!this.font) return { FAIL: "No font was found" };
+ this.features.hasOwnProperty(e.script) ||
+ this.getScriptFeatures(e.script);
+ var t = this.features[e.script];
+ return t
+ ? t.tags[e.tag]
+ ? this.features[e.script].tags[e.tag]
+ : null
+ : { FAIL: "No feature for script " + e.script };
+ });
+ var Vn = {
+ startCheck: function (e) {
+ var t = e.current,
+ n = e.get(-1);
+ return (null === n && Bn(t)) || (!Bn(n) && Bn(t));
+ },
+ endCheck: function (e) {
+ var t = e.get(1);
+ return null === t || !Bn(t);
+ },
+ };
+ var jn = {
+ startCheck: function (e) {
+ var t = e.current,
+ n = e.get(-1);
+ return (Bn(t) || Ln(t)) && !Bn(n);
+ },
+ endCheck: function (e) {
+ var t = e.get(1);
+ switch (!0) {
+ case null === t:
+ return !0;
+ case !Bn(t) && !Ln(t):
+ var n = (function (e) {
+ return /\s/.test(e);
+ })(t);
+ if (!n) return !0;
+ if (n) {
+ if (
+ !e.lookahead.some(function (e) {
+ return Bn(e) || Ln(e);
+ })
+ )
+ return !0;
+ }
+ break;
+ default:
+ return !1;
+ }
+ },
+ };
+ var Wn = {
+ 11: function (e, t, n) {
+ t[n].setState(e.tag, e.substitution);
+ },
+ 12: function (e, t, n) {
+ t[n].setState(e.tag, e.substitution);
+ },
+ 63: function (e, t, n) {
+ e.substitution.forEach(function (r, i) {
+ t[n + i].setState(e.tag, r);
+ });
+ },
+ 41: function (e, t, n) {
+ var r = t[n];
+ r.setState(e.tag, e.substitution.ligGlyph);
+ for (
+ var i = e.substitution.components.length, a = 0;
+ a < i;
+ a++
+ )
+ (r = t[n + a + 1]).setState("deleted", !0);
+ },
+ };
+ function Xn(e, t, n) {
+ e instanceof Fn && Wn[e.id] && Wn[e.id](e, t, n);
+ }
+ function Yn(e) {
+ var t = this,
+ n = "arab",
+ r = this.featuresTags[n],
+ i = this.tokenizer.getRangeTokens(e);
+ if (1 !== i.length) {
+ var a = new Mn(
+ i.map(function (e) {
+ return e.getState("glyphIndex");
+ }),
+ 0
+ ),
+ o = new Mn(
+ i.map(function (e) {
+ return e.char;
+ }),
+ 0
+ );
+ i.forEach(function (e, s) {
+ if (!Ln(e.char)) {
+ a.setCurrentIndex(s), o.setCurrentIndex(s);
+ var l,
+ u = 0;
+ switch (
+ ((function (e) {
+ for (
+ var t = [].concat(e.backtrack), n = t.length - 1;
+ n >= 0;
+ n--
+ ) {
+ var r = t[n],
+ i = Pn(r),
+ a = Ln(r);
+ if (!i && !a) return !0;
+ if (i) return !1;
+ }
+ return !1;
+ })(o) && (u |= 1),
+ (function (e) {
+ if (Pn(e.current)) return !1;
+ for (var t = 0; t < e.lookahead.length; t++)
+ if (!Ln(e.lookahead[t])) return !0;
+ return !1;
+ })(o) && (u |= 2),
+ u)
+ ) {
+ case 1:
+ l = "fina";
+ break;
+ case 2:
+ l = "init";
+ break;
+ case 3:
+ l = "medi";
+ }
+ if (-1 !== r.indexOf(l)) {
+ var c = t.query.lookupFeature({
+ tag: l,
+ script: n,
+ contextParams: a,
+ });
+ if (c instanceof Error) return console.info(c.message);
+ c.forEach(function (e, t) {
+ e instanceof Fn &&
+ (Xn(e, i, t), (a.context[t] = e.substitution));
+ });
+ }
+ }
+ });
+ }
+ }
+ function qn(e, t) {
+ return new Mn(
+ e.map(function (e) {
+ return e.activeState.value;
+ }),
+ t || 0
+ );
+ }
+ function Jn(e) {
+ var t = this,
+ n = this.tokenizer.getRangeTokens(e),
+ r = qn(n);
+ r.context.forEach(function (e, i) {
+ r.setCurrentIndex(i);
+ var a = t.query.lookupFeature({
+ tag: "rlig",
+ script: "arab",
+ contextParams: r,
+ });
+ a.length &&
+ (a.forEach(function (e) {
+ return Xn(e, n, i);
+ }),
+ (r = qn(n)));
+ });
+ }
+ var Kn = {
+ startCheck: function (e) {
+ var t = e.current,
+ n = e.get(-1);
+ return (null === n && Dn(t)) || (!Dn(n) && Dn(t));
+ },
+ endCheck: function (e) {
+ var t = e.get(1);
+ return null === t || !Dn(t);
+ },
+ };
+ function $n(e, t) {
+ return new Mn(
+ e.map(function (e) {
+ return e.activeState.value;
+ }),
+ t || 0
+ );
+ }
+ function er(e) {
+ var t = this,
+ n = this.tokenizer.getRangeTokens(e),
+ r = $n(n);
+ r.context.forEach(function (e, i) {
+ r.setCurrentIndex(i);
+ var a = t.query.lookupFeature({
+ tag: "liga",
+ script: "latn",
+ contextParams: r,
+ });
+ a.length &&
+ (a.forEach(function (e) {
+ return Xn(e, n, i);
+ }),
+ (r = $n(n)));
+ });
+ }
+ function tr(e) {
+ (this.baseDir = e || "ltr"),
+ (this.tokenizer = new Rn()),
+ (this.featuresTags = {});
+ }
+ function nr(e) {
+ var t = this.contextChecks[e + "Check"];
+ return this.tokenizer.registerContextChecker(
+ e,
+ t.startCheck,
+ t.endCheck
+ );
+ }
+ function rr() {
+ return (
+ nr.call(this, "latinWord"),
+ nr.call(this, "arabicWord"),
+ nr.call(this, "arabicSentence"),
+ this.tokenizer.tokenize(this.text)
+ );
+ }
+ function ir() {
+ var e = this;
+ this.tokenizer
+ .getContextRanges("arabicSentence")
+ .forEach(function (t) {
+ var n = e.tokenizer.getRangeTokens(t);
+ e.tokenizer.replaceRange(
+ t.startIndex,
+ t.endOffset,
+ n.reverse()
+ );
+ });
+ }
+ function ar() {
+ if (
+ -1 === this.tokenizer.registeredModifiers.indexOf("glyphIndex")
+ )
+ throw new Error(
+ "glyphIndex modifier is required to apply arabic presentation features."
+ );
+ }
+ function or() {
+ var e = this;
+ this.featuresTags.hasOwnProperty("arab") &&
+ (ar.call(this),
+ this.tokenizer
+ .getContextRanges("arabicWord")
+ .forEach(function (t) {
+ Yn.call(e, t);
+ }));
+ }
+ function sr() {
+ var e = this,
+ t = "arab";
+ this.featuresTags.hasOwnProperty(t) &&
+ -1 !== this.featuresTags[t].indexOf("rlig") &&
+ (ar.call(this),
+ this.tokenizer
+ .getContextRanges("arabicWord")
+ .forEach(function (t) {
+ Jn.call(e, t);
+ }));
+ }
+ function lr() {
+ var e = this,
+ t = "latn";
+ this.featuresTags.hasOwnProperty(t) &&
+ -1 !== this.featuresTags[t].indexOf("liga") &&
+ (ar.call(this),
+ this.tokenizer
+ .getContextRanges("latinWord")
+ .forEach(function (t) {
+ er.call(e, t);
+ }));
+ }
+ function ur(e) {
+ ((e = e || {}).tables = e.tables || {}),
+ e.empty ||
+ (Tt(
+ e.familyName,
+ "When creating a new Font object, familyName is required."
+ ),
+ Tt(
+ e.styleName,
+ "When creating a new Font object, styleName is required."
+ ),
+ Tt(
+ e.unitsPerEm,
+ "When creating a new Font object, unitsPerEm is required."
+ ),
+ Tt(
+ e.ascender,
+ "When creating a new Font object, ascender is required."
+ ),
+ Tt(
+ e.descender <= 0,
+ "When creating a new Font object, negative descender value is required."
+ ),
+ (this.names = {
+ fontFamily: { en: e.familyName || " " },
+ fontSubfamily: { en: e.styleName || " " },
+ fullName: {
+ en: e.fullName || e.familyName + " " + e.styleName,
+ },
+ postScriptName: {
+ en:
+ e.postScriptName ||
+ (e.familyName + e.styleName).replace(/\s/g, ""),
+ },
+ designer: { en: e.designer || " " },
+ designerURL: { en: e.designerURL || " " },
+ manufacturer: { en: e.manufacturer || " " },
+ manufacturerURL: { en: e.manufacturerURL || " " },
+ license: { en: e.license || " " },
+ licenseURL: { en: e.licenseURL || " " },
+ version: { en: e.version || "Version 0.1" },
+ description: { en: e.description || " " },
+ copyright: { en: e.copyright || " " },
+ trademark: { en: e.trademark || " " },
+ }),
+ (this.unitsPerEm = e.unitsPerEm || 1e3),
+ (this.ascender = e.ascender),
+ (this.descender = e.descender),
+ (this.createdTimestamp = e.createdTimestamp),
+ (this.tables = Object.assign(e.tables, {
+ os2: Object.assign(
+ {
+ usWeightClass:
+ e.weightClass || this.usWeightClasses.MEDIUM,
+ usWidthClass:
+ e.widthClass || this.usWidthClasses.MEDIUM,
+ fsSelection:
+ e.fsSelection || this.fsSelectionValues.REGULAR,
+ },
+ e.tables.os2
+ ),
+ }))),
+ (this.supported = !0),
+ (this.glyphs = new be.GlyphSet(this, e.glyphs || [])),
+ (this.encoding = new fe(this)),
+ (this.position = new Et(this)),
+ (this.substitution = new _t(this)),
+ (this.tables = this.tables || {}),
+ (this._push = null),
+ (this._hmtxTableData = {}),
+ Object.defineProperty(this, "hinting", {
+ get: function () {
+ return this._hinting
+ ? this._hinting
+ : "truetype" === this.outlinesFormat
+ ? (this._hinting = new Ot(this))
+ : void 0;
+ },
+ });
+ }
+ function cr(e, t) {
+ var n = JSON.stringify(e),
+ r = 256;
+ for (var i in t) {
+ var a = parseInt(i);
+ if (a && !(a < 256)) {
+ if (JSON.stringify(t[i]) === n) return a;
+ r <= a && (r = a + 1);
+ }
+ }
+ return (t[r] = e), r;
+ }
+ function fr(e, t, n) {
+ var r = cr(t.name, n);
+ return [
+ { name: "tag_" + e, type: "TAG", value: t.tag },
+ {
+ name: "minValue_" + e,
+ type: "FIXED",
+ value: t.minValue << 16,
+ },
+ {
+ name: "defaultValue_" + e,
+ type: "FIXED",
+ value: t.defaultValue << 16,
+ },
+ {
+ name: "maxValue_" + e,
+ type: "FIXED",
+ value: t.maxValue << 16,
+ },
+ { name: "flags_" + e, type: "USHORT", value: 0 },
+ { name: "nameID_" + e, type: "USHORT", value: r },
+ ];
+ }
+ function dr(e, t, n) {
+ var r = {},
+ i = new ie.Parser(e, t);
+ return (
+ (r.tag = i.parseTag()),
+ (r.minValue = i.parseFixed()),
+ (r.defaultValue = i.parseFixed()),
+ (r.maxValue = i.parseFixed()),
+ i.skip("uShort", 1),
+ (r.name = n[i.parseUShort()] || {}),
+ r
+ );
+ }
+ function hr(e, t, n, r) {
+ for (
+ var i = [
+ {
+ name: "nameID_" + e,
+ type: "USHORT",
+ value: cr(t.name, r),
+ },
+ { name: "flags_" + e, type: "USHORT", value: 0 },
+ ],
+ a = 0;
+ a < n.length;
+ ++a
+ ) {
+ var o = n[a].tag;
+ i.push({
+ name: "axis_" + e + " " + o,
+ type: "FIXED",
+ value: t.coordinates[o] << 16,
+ });
+ }
+ return i;
+ }
+ function pr(e, t, n, r) {
+ var i = {},
+ a = new ie.Parser(e, t);
+ (i.name = r[a.parseUShort()] || {}),
+ a.skip("uShort", 1),
+ (i.coordinates = {});
+ for (var o = 0; o < n.length; ++o)
+ i.coordinates[n[o].tag] = a.parseFixed();
+ return i;
+ }
+ (tr.prototype.setText = function (e) {
+ this.text = e;
+ }),
+ (tr.prototype.contextChecks = {
+ latinWordCheck: Kn,
+ arabicWordCheck: Vn,
+ arabicSentenceCheck: jn,
+ }),
+ (tr.prototype.registerFeatures = function (e, t) {
+ var n = this,
+ r = t.filter(function (t) {
+ return n.query.supports({ script: e, tag: t });
+ });
+ this.featuresTags.hasOwnProperty(e)
+ ? (this.featuresTags[e] = this.featuresTags[e].concat(r))
+ : (this.featuresTags[e] = r);
+ }),
+ (tr.prototype.applyFeatures = function (e, t) {
+ if (!e)
+ throw new Error(
+ "No valid font was provided to apply features"
+ );
+ this.query || (this.query = new Un(e));
+ for (var n = 0; n < t.length; n++) {
+ var r = t[n];
+ this.query.supports({ script: r.script }) &&
+ this.registerFeatures(r.script, r.tags);
+ }
+ }),
+ (tr.prototype.registerModifier = function (e, t, n) {
+ this.tokenizer.registerModifier(e, t, n);
+ }),
+ (tr.prototype.checkContextReady = function (e) {
+ return !!this.tokenizer.getContext(e);
+ }),
+ (tr.prototype.applyFeaturesToContexts = function () {
+ this.checkContextReady("arabicWord") &&
+ (or.call(this), sr.call(this)),
+ this.checkContextReady("latinWord") && lr.call(this),
+ this.checkContextReady("arabicSentence") && ir.call(this);
+ }),
+ (tr.prototype.processText = function (e) {
+ (this.text && this.text === e) ||
+ (this.setText(e),
+ rr.call(this),
+ this.applyFeaturesToContexts());
+ }),
+ (tr.prototype.getBidiText = function (e) {
+ return this.processText(e), this.tokenizer.getText();
+ }),
+ (tr.prototype.getTextGlyphs = function (e) {
+ this.processText(e);
+ for (var t = [], n = 0; n < this.tokenizer.tokens.length; n++) {
+ var r = this.tokenizer.tokens[n];
+ if (!r.state.deleted) {
+ var i = r.activeState.value;
+ t.push(Array.isArray(i) ? i[0] : i);
+ }
+ }
+ return t;
+ }),
+ (ur.prototype.hasChar = function (e) {
+ return null !== this.encoding.charToGlyphIndex(e);
+ }),
+ (ur.prototype.charToGlyphIndex = function (e) {
+ return this.encoding.charToGlyphIndex(e);
+ }),
+ (ur.prototype.charToGlyph = function (e) {
+ var t = this.charToGlyphIndex(e),
+ n = this.glyphs.get(t);
+ return n || (n = this.glyphs.get(0)), n;
+ }),
+ (ur.prototype.updateFeatures = function (e) {
+ return this.defaultRenderOptions.features.map(function (t) {
+ return "latn" === t.script
+ ? {
+ script: "latn",
+ tags: t.tags.filter(function (t) {
+ return e[t];
+ }),
+ }
+ : t;
+ });
+ }),
+ (ur.prototype.stringToGlyphs = function (e, t) {
+ var n = this,
+ r = new tr();
+ r.registerModifier("glyphIndex", null, function (e) {
+ return n.charToGlyphIndex(e.char);
+ });
+ var i = t
+ ? this.updateFeatures(t.features)
+ : this.defaultRenderOptions.features;
+ r.applyFeatures(this, i);
+ for (
+ var a = r.getTextGlyphs(e),
+ o = a.length,
+ s = new Array(o),
+ l = this.glyphs.get(0),
+ u = 0;
+ u < o;
+ u += 1
+ )
+ s[u] = this.glyphs.get(a[u]) || l;
+ return s;
+ }),
+ (ur.prototype.nameToGlyphIndex = function (e) {
+ return this.glyphNames.nameToGlyphIndex(e);
+ }),
+ (ur.prototype.nameToGlyph = function (e) {
+ var t = this.nameToGlyphIndex(e),
+ n = this.glyphs.get(t);
+ return n || (n = this.glyphs.get(0)), n;
+ }),
+ (ur.prototype.glyphIndexToName = function (e) {
+ return this.glyphNames.glyphIndexToName
+ ? this.glyphNames.glyphIndexToName(e)
+ : "";
+ }),
+ (ur.prototype.getKerningValue = function (e, t) {
+ (e = e.index || e), (t = t.index || t);
+ var n = this.position.defaultKerningTables;
+ return n
+ ? this.position.getKerningValue(n, e, t)
+ : this.kerningPairs[e + "," + t] || 0;
+ }),
+ (ur.prototype.defaultRenderOptions = {
+ kerning: !0,
+ features: [
+ { script: "arab", tags: ["init", "medi", "fina", "rlig"] },
+ { script: "latn", tags: ["liga", "rlig"] },
+ ],
+ }),
+ (ur.prototype.forEachGlyph = function (e, t, n, r, i, a) {
+ (t = void 0 !== t ? t : 0),
+ (n = void 0 !== n ? n : 0),
+ (r = void 0 !== r ? r : 72),
+ (i = Object.assign({}, this.defaultRenderOptions, i));
+ var o,
+ s = (1 / this.unitsPerEm) * r,
+ l = this.stringToGlyphs(e, i);
+ if (i.kerning) {
+ var u = i.script || this.position.getDefaultScriptName();
+ o = this.position.getKerningTables(u, i.language);
+ }
+ for (var c = 0; c < l.length; c += 1) {
+ var f = l[c];
+ if (
+ (a.call(this, f, t, n, r, i),
+ f.advanceWidth && (t += f.advanceWidth * s),
+ i.kerning && c < l.length - 1)
+ )
+ t +=
+ (o
+ ? this.position.getKerningValue(
+ o,
+ f.index,
+ l[c + 1].index
+ )
+ : this.getKerningValue(f, l[c + 1])) * s;
+ i.letterSpacing
+ ? (t += i.letterSpacing * r)
+ : i.tracking && (t += (i.tracking / 1e3) * r);
+ }
+ return t;
+ }),
+ (ur.prototype.getPath = function (e, t, n, r, i) {
+ var a = new C();
+ return (
+ this.forEachGlyph(e, t, n, r, i, function (e, t, n, r) {
+ var o = e.getPath(t, n, r, i, this);
+ a.extend(o);
+ }),
+ a
+ );
+ }),
+ (ur.prototype.getPaths = function (e, t, n, r, i) {
+ var a = [];
+ return (
+ this.forEachGlyph(e, t, n, r, i, function (e, t, n, r) {
+ var o = e.getPath(t, n, r, i, this);
+ a.push(o);
+ }),
+ a
+ );
+ }),
+ (ur.prototype.getAdvanceWidth = function (e, t, n) {
+ return this.forEachGlyph(e, 0, 0, t, n, function () {});
+ }),
+ (ur.prototype.draw = function (e, t, n, r, i, a) {
+ this.getPath(t, n, r, i, a).draw(e);
+ }),
+ (ur.prototype.drawPoints = function (e, t, n, r, i, a) {
+ this.forEachGlyph(t, n, r, i, a, function (t, n, r, i) {
+ t.drawPoints(e, n, r, i);
+ });
+ }),
+ (ur.prototype.drawMetrics = function (e, t, n, r, i, a) {
+ this.forEachGlyph(t, n, r, i, a, function (t, n, r, i) {
+ t.drawMetrics(e, n, r, i);
+ });
+ }),
+ (ur.prototype.getEnglishName = function (e) {
+ var t = this.names[e];
+ if (t) return t.en;
+ }),
+ (ur.prototype.validate = function () {
+ var e = this;
+ function t(t) {
+ var n = e.getEnglishName(t);
+ n && n.trim().length;
+ }
+ t("fontFamily"),
+ t("weightName"),
+ t("manufacturer"),
+ t("copyright"),
+ t("version"),
+ this.unitsPerEm;
+ }),
+ (ur.prototype.toTables = function () {
+ return At.fontToTable(this);
+ }),
+ (ur.prototype.toBuffer = function () {
+ return (
+ console.warn(
+ "Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."
+ ),
+ this.toArrayBuffer()
+ );
+ }),
+ (ur.prototype.toArrayBuffer = function () {
+ for (
+ var e = this.toTables().encode(),
+ t = new ArrayBuffer(e.length),
+ n = new Uint8Array(t),
+ r = 0;
+ r < e.length;
+ r++
+ )
+ n[r] = e[r];
+ return t;
+ }),
+ (ur.prototype.fsSelectionValues = {
+ ITALIC: 1,
+ UNDERSCORE: 2,
+ NEGATIVE: 4,
+ OUTLINED: 8,
+ STRIKEOUT: 16,
+ BOLD: 32,
+ REGULAR: 64,
+ USER_TYPO_METRICS: 128,
+ WWS: 256,
+ OBLIQUE: 512,
+ }),
+ (ur.prototype.usWidthClasses = {
+ ULTRA_CONDENSED: 1,
+ EXTRA_CONDENSED: 2,
+ CONDENSED: 3,
+ SEMI_CONDENSED: 4,
+ MEDIUM: 5,
+ SEMI_EXPANDED: 6,
+ EXPANDED: 7,
+ EXTRA_EXPANDED: 8,
+ ULTRA_EXPANDED: 9,
+ }),
+ (ur.prototype.usWeightClasses = {
+ THIN: 100,
+ EXTRA_LIGHT: 200,
+ LIGHT: 300,
+ NORMAL: 400,
+ MEDIUM: 500,
+ SEMI_BOLD: 600,
+ BOLD: 700,
+ EXTRA_BOLD: 800,
+ BLACK: 900,
+ });
+ var vr = {
+ make: function (e, t) {
+ var n = new q.Table("fvar", [
+ { name: "version", type: "ULONG", value: 65536 },
+ { name: "offsetToData", type: "USHORT", value: 0 },
+ { name: "countSizePairs", type: "USHORT", value: 2 },
+ { name: "axisCount", type: "USHORT", value: e.axes.length },
+ { name: "axisSize", type: "USHORT", value: 20 },
+ {
+ name: "instanceCount",
+ type: "USHORT",
+ value: e.instances.length,
+ },
+ {
+ name: "instanceSize",
+ type: "USHORT",
+ value: 4 + 4 * e.axes.length,
+ },
+ ]);
+ n.offsetToData = n.sizeOf();
+ for (var r = 0; r < e.axes.length; r++)
+ n.fields = n.fields.concat(fr(r, e.axes[r], t));
+ for (var i = 0; i < e.instances.length; i++)
+ n.fields = n.fields.concat(
+ hr(i, e.instances[i], e.axes, t)
+ );
+ return n;
+ },
+ parse: function (e, t, n) {
+ var r = new ie.Parser(e, t),
+ i = r.parseULong();
+ M.argument(65536 === i, "Unsupported fvar table version.");
+ var a = r.parseOffset16();
+ r.skip("uShort", 1);
+ for (
+ var o = r.parseUShort(),
+ s = r.parseUShort(),
+ l = r.parseUShort(),
+ u = r.parseUShort(),
+ c = [],
+ f = 0;
+ f < o;
+ f++
+ )
+ c.push(dr(e, t + a + f * s, n));
+ for (var d = [], h = t + a + o * s, p = 0; p < l; p++)
+ d.push(pr(e, h + p * u, c, n));
+ return { axes: c, instances: d };
+ },
+ },
+ mr = function () {
+ return {
+ coverage: this.parsePointer(ne.coverage),
+ attachPoints: this.parseList(ne.pointer(ne.uShortList)),
+ };
+ },
+ gr = function () {
+ var e = this.parseUShort();
+ return (
+ M.argument(
+ 1 === e || 2 === e || 3 === e,
+ "Unsupported CaretValue table version."
+ ),
+ 1 === e
+ ? { coordinate: this.parseShort() }
+ : 2 === e
+ ? { pointindex: this.parseShort() }
+ : 3 === e
+ ? { coordinate: this.parseShort() }
+ : void 0
+ );
+ },
+ Ar = function () {
+ return this.parseList(ne.pointer(gr));
+ },
+ yr = function () {
+ return {
+ coverage: this.parsePointer(ne.coverage),
+ ligGlyphs: this.parseList(ne.pointer(Ar)),
+ };
+ },
+ br = function () {
+ return (
+ this.parseUShort(), this.parseList(ne.pointer(ne.coverage))
+ );
+ };
+ var xr = {
+ parse: function (e, t) {
+ var n = new ne(e, (t = t || 0)),
+ r = n.parseVersion(1);
+ M.argument(
+ 1 === r || 1.2 === r || 1.3 === r,
+ "Unsupported GDEF table version."
+ );
+ var i = {
+ version: r,
+ classDef: n.parsePointer(ne.classDef),
+ attachList: n.parsePointer(mr),
+ ligCaretList: n.parsePointer(yr),
+ markAttachClassDef: n.parsePointer(ne.classDef),
+ };
+ return r >= 1.2 && (i.markGlyphSets = n.parsePointer(br)), i;
+ },
+ },
+ Sr = new Array(10);
+ (Sr[1] = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort();
+ return 1 === t
+ ? {
+ posFormat: 1,
+ coverage: this.parsePointer(ne.coverage),
+ value: this.parseValueRecord(),
+ }
+ : 2 === t
+ ? {
+ posFormat: 2,
+ coverage: this.parsePointer(ne.coverage),
+ values: this.parseValueRecordList(),
+ }
+ : void M.assert(
+ !1,
+ "0x" +
+ e.toString(16) +
+ ": GPOS lookup type 1 format must be 1 or 2."
+ );
+ }),
+ (Sr[2] = function () {
+ var e = this.offset + this.relativeOffset,
+ t = this.parseUShort();
+ M.assert(
+ 1 === t || 2 === t,
+ "0x" +
+ e.toString(16) +
+ ": GPOS lookup type 2 format must be 1 or 2."
+ );
+ var n = this.parsePointer(ne.coverage),
+ r = this.parseUShort(),
+ i = this.parseUShort();
+ if (1 === t)
+ return {
+ posFormat: t,
+ coverage: n,
+ valueFormat1: r,
+ valueFormat2: i,
+ pairSets: this.parseList(
+ ne.pointer(
+ ne.list(function () {
+ return {
+ secondGlyph: this.parseUShort(),
+ value1: this.parseValueRecord(r),
+ value2: this.parseValueRecord(i),
+ };
+ })
+ )
+ ),
+ };
+ if (2 === t) {
+ var a = this.parsePointer(ne.classDef),
+ o = this.parsePointer(ne.classDef),
+ s = this.parseUShort(),
+ l = this.parseUShort();
+ return {
+ posFormat: t,
+ coverage: n,
+ valueFormat1: r,
+ valueFormat2: i,
+ classDef1: a,
+ classDef2: o,
+ class1Count: s,
+ class2Count: l,
+ classRecords: this.parseList(
+ s,
+ ne.list(l, function () {
+ return {
+ value1: this.parseValueRecord(r),
+ value2: this.parseValueRecord(i),
+ };
+ })
+ ),
+ };
+ }
+ }),
+ (Sr[3] = function () {
+ return { error: "GPOS Lookup 3 not supported" };
+ }),
+ (Sr[4] = function () {
+ return { error: "GPOS Lookup 4 not supported" };
+ }),
+ (Sr[5] = function () {
+ return { error: "GPOS Lookup 5 not supported" };
+ }),
+ (Sr[6] = function () {
+ return { error: "GPOS Lookup 6 not supported" };
+ }),
+ (Sr[7] = function () {
+ return { error: "GPOS Lookup 7 not supported" };
+ }),
+ (Sr[8] = function () {
+ return { error: "GPOS Lookup 8 not supported" };
+ }),
+ (Sr[9] = function () {
+ return { error: "GPOS Lookup 9 not supported" };
+ });
+ var Er = new Array(10);
+ var _r = {
+ parse: function (e, t) {
+ var n = new ne(e, (t = t || 0)),
+ r = n.parseVersion(1);
+ return (
+ M.argument(
+ 1 === r || 1.1 === r,
+ "Unsupported GPOS table version " + r
+ ),
+ 1 === r
+ ? {
+ version: r,
+ scripts: n.parseScriptList(),
+ features: n.parseFeatureList(),
+ lookups: n.parseLookupList(Sr),
+ }
+ : {
+ version: r,
+ scripts: n.parseScriptList(),
+ features: n.parseFeatureList(),
+ lookups: n.parseLookupList(Sr),
+ variations: n.parseFeatureVariationsList(),
+ }
+ );
+ },
+ make: function (e) {
+ return new q.Table("GPOS", [
+ { name: "version", type: "ULONG", value: 65536 },
+ {
+ name: "scripts",
+ type: "TABLE",
+ value: new q.ScriptList(e.scripts),
+ },
+ {
+ name: "features",
+ type: "TABLE",
+ value: new q.FeatureList(e.features),
+ },
+ {
+ name: "lookups",
+ type: "TABLE",
+ value: new q.LookupList(e.lookups, Er),
+ },
+ ]);
+ },
+ };
+ var Cr = {
+ parse: function (e, t) {
+ var n = new ie.Parser(e, t),
+ r = n.parseUShort();
+ if (0 === r)
+ return (function (e) {
+ var t = {};
+ e.skip("uShort");
+ var n = e.parseUShort();
+ M.argument(0 === n, "Unsupported kern sub-table version."),
+ e.skip("uShort", 2);
+ var r = e.parseUShort();
+ e.skip("uShort", 3);
+ for (var i = 0; i < r; i += 1) {
+ var a = e.parseUShort(),
+ o = e.parseUShort(),
+ s = e.parseShort();
+ t[a + "," + o] = s;
+ }
+ return t;
+ })(n);
+ if (1 === r)
+ return (function (e) {
+ var t = {};
+ e.skip("uShort"),
+ e.parseULong() > 1 &&
+ console.warn(
+ "Only the first kern subtable is supported."
+ ),
+ e.skip("uLong");
+ var n = 255 & e.parseUShort();
+ if ((e.skip("uShort"), 0 === n)) {
+ var r = e.parseUShort();
+ e.skip("uShort", 3);
+ for (var i = 0; i < r; i += 1) {
+ var a = e.parseUShort(),
+ o = e.parseUShort(),
+ s = e.parseShort();
+ t[a + "," + o] = s;
+ }
+ }
+ return t;
+ })(n);
+ throw new Error("Unsupported kern table version (" + r + ").");
+ },
+ };
+ var wr = {
+ parse: function (e, t, n, r) {
+ for (
+ var i = new ie.Parser(e, t),
+ a = r ? i.parseUShort : i.parseULong,
+ o = [],
+ s = 0;
+ s < n + 1;
+ s += 1
+ ) {
+ var l = a.call(i);
+ r && (l *= 2), o.push(l);
+ }
+ return o;
+ },
+ };
+ function Tr(e, t) {
+ for (var n = [], r = 12, i = 0; i < t; i += 1) {
+ var a = ie.getTag(e, r),
+ o = ie.getULong(e, r + 4),
+ s = ie.getULong(e, r + 8),
+ l = ie.getULong(e, r + 12);
+ n.push({
+ tag: a,
+ checksum: o,
+ offset: s,
+ length: l,
+ compression: !1,
+ }),
+ (r += 16);
+ }
+ return n;
+ }
+ function Mr(e, t) {
+ if ("WOFF" === t.compression) {
+ var n = new Uint8Array(
+ e.buffer,
+ t.offset + 2,
+ t.compressedLength - 2
+ ),
+ r = new Uint8Array(t.length);
+ if ((S(n, r), r.byteLength !== t.length))
+ throw new Error(
+ "Decompression error: " +
+ t.tag +
+ " decompressed length doesn't match recorded length"
+ );
+ return { data: new DataView(r.buffer, 0), offset: 0 };
+ }
+ return { data: e, offset: t.offset };
+ }
+ return {
+ parseBuffer: function (e, t) {
+ var n, r;
+ t = void 0 === t || null === t ? {} : t;
+ var i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p,
+ v,
+ m,
+ g = new ur({ empty: !0 }),
+ A = new DataView(e, 0),
+ y = [],
+ b = ie.getTag(A, 0);
+ if (
+ b === String.fromCharCode(0, 1, 0, 0) ||
+ "true" === b ||
+ "typ1" === b
+ )
+ (g.outlinesFormat = "truetype"),
+ (y = Tr(A, (i = ie.getUShort(A, 4))));
+ else if ("OTTO" === b)
+ (g.outlinesFormat = "cff"),
+ (y = Tr(A, (i = ie.getUShort(A, 4))));
+ else {
+ if ("wOFF" !== b)
+ throw new Error("Unsupported OpenType signature " + b);
+ var x = ie.getTag(A, 4);
+ if (x === String.fromCharCode(0, 1, 0, 0))
+ g.outlinesFormat = "truetype";
+ else {
+ if ("OTTO" !== x)
+ throw new Error("Unsupported OpenType flavor " + b);
+ g.outlinesFormat = "cff";
+ }
+ y = (function (e, t) {
+ for (var n = [], r = 44, i = 0; i < t; i += 1) {
+ var a = ie.getTag(e, r),
+ o = ie.getULong(e, r + 4),
+ s = ie.getULong(e, r + 8),
+ l = ie.getULong(e, r + 12),
+ u = void 0;
+ (u = s < l && "WOFF"),
+ n.push({
+ tag: a,
+ offset: o,
+ compression: u,
+ compressedLength: s,
+ length: l,
+ }),
+ (r += 20);
+ }
+ return n;
+ })(A, (i = ie.getUShort(A, 12)));
+ }
+ for (var S = 0; S < i; S += 1) {
+ var E = y[S],
+ _ = void 0;
+ switch (E.tag) {
+ case "cmap":
+ (_ = Mr(A, E)),
+ (g.tables.cmap = oe.parse(_.data, _.offset)),
+ (g.encoding = new de(g.tables.cmap));
+ break;
+ case "cvt ":
+ (_ = Mr(A, E)),
+ (m = new ie.Parser(_.data, _.offset)),
+ (g.tables.cvt = m.parseShortList(E.length / 2));
+ break;
+ case "fvar":
+ o = E;
+ break;
+ case "fpgm":
+ (_ = Mr(A, E)),
+ (m = new ie.Parser(_.data, _.offset)),
+ (g.tables.fpgm = m.parseByteList(E.length));
+ break;
+ case "head":
+ (_ = Mr(A, E)),
+ (g.tables.head = Ge.parse(_.data, _.offset)),
+ (g.unitsPerEm = g.tables.head.unitsPerEm),
+ (n = g.tables.head.indexToLocFormat);
+ break;
+ case "hhea":
+ (_ = Mr(A, E)),
+ (g.tables.hhea = Ze.parse(_.data, _.offset)),
+ (g.ascender = g.tables.hhea.ascender),
+ (g.descender = g.tables.hhea.descender),
+ (g.numberOfHMetrics = g.tables.hhea.numberOfHMetrics);
+ break;
+ case "hmtx":
+ f = E;
+ break;
+ case "ltag":
+ (_ = Mr(A, E)), (r = Qe.parse(_.data, _.offset));
+ break;
+ case "maxp":
+ (_ = Mr(A, E)),
+ (g.tables.maxp = He.parse(_.data, _.offset)),
+ (g.numGlyphs = g.tables.maxp.numGlyphs);
+ break;
+ case "name":
+ p = E;
+ break;
+ case "OS/2":
+ (_ = Mr(A, E)),
+ (g.tables.os2 = at.parse(_.data, _.offset));
+ break;
+ case "post":
+ (_ = Mr(A, E)),
+ (g.tables.post = ot.parse(_.data, _.offset)),
+ (g.glyphNames = new pe(g.tables.post));
+ break;
+ case "prep":
+ (_ = Mr(A, E)),
+ (m = new ie.Parser(_.data, _.offset)),
+ (g.tables.prep = m.parseByteList(E.length));
+ break;
+ case "glyf":
+ s = E;
+ break;
+ case "loca":
+ h = E;
+ break;
+ case "CFF ":
+ a = E;
+ break;
+ case "kern":
+ d = E;
+ break;
+ case "GDEF":
+ l = E;
+ break;
+ case "GPOS":
+ u = E;
+ break;
+ case "GSUB":
+ c = E;
+ break;
+ case "meta":
+ v = E;
+ }
+ }
+ var C = Mr(A, p);
+ if (
+ ((g.tables.name = rt.parse(C.data, C.offset, r)),
+ (g.names = g.tables.name),
+ s && h)
+ ) {
+ var w = 0 === n,
+ T = Mr(A, h),
+ M = wr.parse(T.data, T.offset, g.numGlyphs, w),
+ I = Mr(A, s);
+ g.glyphs = Ft.parse(I.data, I.offset, M, g, t);
+ } else {
+ if (!a)
+ throw new Error(
+ "Font doesn't contain TrueType or CFF outlines."
+ );
+ var k = Mr(A, a);
+ Ne.parse(k.data, k.offset, g, t);
+ }
+ var R = Mr(A, f);
+ if (
+ (ze.parse(
+ g,
+ R.data,
+ R.offset,
+ g.numberOfHMetrics,
+ g.numGlyphs,
+ g.glyphs,
+ t
+ ),
+ ve(g, t),
+ d)
+ ) {
+ var B = Mr(A, d);
+ g.kerningPairs = Cr.parse(B.data, B.offset);
+ } else g.kerningPairs = {};
+ if (l) {
+ var P = Mr(A, l);
+ g.tables.gdef = xr.parse(P.data, P.offset);
+ }
+ if (u) {
+ var L = Mr(A, u);
+ (g.tables.gpos = _r.parse(L.data, L.offset)),
+ g.position.init();
+ }
+ if (c) {
+ var D = Mr(A, c);
+ g.tables.gsub = ct.parse(D.data, D.offset);
+ }
+ if (o) {
+ var U = Mr(A, o);
+ g.tables.fvar = vr.parse(U.data, U.offset, g.names);
+ }
+ if (v) {
+ var F = Mr(A, v);
+ (g.tables.meta = ft.parse(F.data, F.offset)),
+ (g.metas = g.tables.meta);
+ }
+ return g;
+ },
+ };
+ })(),
+ Wf = jf.parseBuffer,
+ Xf = null,
+ Yf = null,
+ qf = null,
+ Jf = null,
+ Kf = "colorSpace" in new A.Texture(),
+ $f = null,
+ ed = null,
+ td = null,
+ nd = null,
+ rd = null,
+ id = null,
+ ad = null;
+ function od(e) {
+ var t,
+ n,
+ r = e.header,
+ i = r[12],
+ a = r[2],
+ o = r[6],
+ s = r[7],
+ l = r[10],
+ u = r[11];
+ switch (a) {
+ case 0:
+ (t = 2), (n = RGB_PVRTC_2BPPV1_Format);
+ break;
+ case 1:
+ (t = 2), (n = RGBA_PVRTC_2BPPV1_Format);
+ break;
+ case 2:
+ (t = 4), (n = RGB_PVRTC_4BPPV1_Format);
+ break;
+ case 3:
+ (t = 4), (n = RGBA_PVRTC_4BPPV1_Format);
+ break;
+ default:
+ console.error("THREE.PVRLoader: Unsupported PVR format:", a);
+ }
+ return (
+ (e.dataPtr = 52 + i),
+ (e.bpp = t),
+ (e.format = n),
+ (e.width = s),
+ (e.height = o),
+ (e.numSurfaces = l),
+ (e.numMipmaps = u),
+ (e.isCubemap = 6 === l),
+ ld(e)
+ );
+ }
+ function sd(e) {
+ var t,
+ n,
+ r = e.header,
+ i = r[0],
+ a = r[1],
+ o = r[2],
+ s = r[3],
+ l = r[4],
+ u = r[10],
+ c = r[12],
+ f = 255 & l,
+ d = u > 0;
+ return (
+ 25 === f
+ ? ((n = d ? RGBA_PVRTC_4BPPV1_Format : RGB_PVRTC_4BPPV1_Format),
+ (t = 4))
+ : 24 === f
+ ? ((n = d ? RGBA_PVRTC_2BPPV1_Format : RGB_PVRTC_2BPPV1_Format),
+ (t = 2))
+ : console.error("THREE.PVRLoader: Unknown PVR format:", f),
+ (e.dataPtr = i),
+ (e.bpp = t),
+ (e.format = n),
+ (e.width = o),
+ (e.height = a),
+ (e.numSurfaces = c),
+ (e.numMipmaps = s + 1),
+ (e.isCubemap = 6 === c),
+ ld(e)
+ );
+ }
+ function ld(e) {
+ var t,
+ n = {
+ mipmaps: [],
+ width: e.width,
+ height: e.height,
+ format: e.format,
+ mipmapCount: e.numMipmaps,
+ isCubemap: e.isCubemap,
+ },
+ r = e.buffer,
+ i = e.dataPtr,
+ a = 0,
+ o = 0,
+ s = 0,
+ l = 0,
+ u = 0,
+ c = e.bpp,
+ f = e.numSurfaces;
+ 2 === c ? ((o = 8), (s = 4)) : ((o = 4), (s = 4)),
+ (t = (o * s * c) / 8),
+ (n.mipmaps.length = e.numMipmaps * f);
+ for (var d = 0; d < e.numMipmaps; ) {
+ var h = e.width >> d,
+ p = e.height >> d;
+ (l = h / o) < 2 && (l = 2),
+ (u = p / s) < 2 && (u = 2),
+ (a = l * u * t);
+ for (var v = 0; v < f; v++) {
+ var m = { data: new Uint8Array(r, i, a), width: h, height: p };
+ (n.mipmaps[v * e.numMipmaps + d] = m), (i += a);
+ }
+ d++;
+ }
+ return n;
+ }
+ var ud = null,
+ cd = new WeakMap(),
+ fd = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, e)).transcoderPath = ""),
+ (r.transcoderBinary = null),
+ (r.transcoderPending = null),
+ (r.workerLimit = 4),
+ (r.workerPool = []),
+ (r.workerNextTaskID = 1),
+ (r.workerSourceURL = ""),
+ (r.workerConfig = null),
+ r
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "setTranscoderPath",
+ value: function (e) {
+ return (this.transcoderPath = e), this;
+ },
+ },
+ {
+ key: "setWorkerLimit",
+ value: function (e) {
+ return (this.workerLimit = e), this;
+ },
+ },
+ {
+ key: "detectSupport",
+ value: function (e) {
+ return (
+ (this.workerConfig = {
+ astcSupported: e.extensions.has(
+ "WEBGL_compressed_texture_astc"
+ ),
+ etc1Supported: e.extensions.has(
+ "WEBGL_compressed_texture_etc1"
+ ),
+ etc2Supported: e.extensions.has(
+ "WEBGL_compressed_texture_etc"
+ ),
+ dxtSupported: e.extensions.has(
+ "WEBGL_compressed_texture_s3tc"
+ ),
+ bptcSupported: e.extensions.has(
+ "EXT_texture_compression_bptc"
+ ),
+ pvrtcSupported:
+ e.extensions.has("WEBGL_compressed_texture_pvrtc") ||
+ e.extensions.has(
+ "WEBKIT_WEBGL_compressed_texture_pvrtc"
+ ),
+ }),
+ this
+ );
+ },
+ },
+ {
+ key: "load",
+ value: function (e, t, n, r) {
+ var i = this,
+ a = new A.FileLoader(this.manager);
+ a.setResponseType("arraybuffer"),
+ a.setWithCredentials(this.withCredentials);
+ var o = new A.CompressedTexture();
+ return (
+ a.load(
+ e,
+ function (e) {
+ if (cd.has(e))
+ return cd.get(e).promise.then(t).catch(r);
+ i._createTexture([e])
+ .then(function (e) {
+ o.copy(e), (o.needsUpdate = !0), t && t(o);
+ })
+ .catch(r);
+ },
+ n,
+ r
+ ),
+ o
+ );
+ },
+ },
+ {
+ key: "parseInternalAsync",
+ value: function (e) {
+ for (
+ var t = e.levels, n = new Set(), r = 0;
+ r < t.length;
+ r++
+ )
+ n.add(t[r].data.buffer);
+ return this._createTexture(
+ Array.from(n),
+ (0, s.Z)((0, s.Z)({}, e), {}, { lowLevel: !0 })
+ );
+ },
+ },
+ {
+ key: "_createTexture",
+ value: function (e) {
+ for (
+ var t,
+ n,
+ r = this,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {},
+ a = 0,
+ o = 0;
+ o < e.length;
+ o++
+ )
+ a += e[o].byteLength;
+ var s = this._allocateWorker(a)
+ .then(function (a) {
+ return (
+ (t = a),
+ (n = r.workerNextTaskID++),
+ new Promise(function (r, a) {
+ (t._callbacks[n] = { resolve: r, reject: a }),
+ t.postMessage(
+ {
+ type: "transcode",
+ id: n,
+ buffers: e,
+ taskConfig: i,
+ },
+ e
+ );
+ })
+ );
+ })
+ .then(function (e) {
+ var t = e.mipmaps,
+ n = e.width,
+ r = e.height,
+ i = e.format,
+ a = new A.CompressedTexture(
+ t,
+ n,
+ r,
+ i,
+ A.UnsignedByteType
+ );
+ return (
+ (a.minFilter =
+ 1 === t.length
+ ? A.LinearFilter
+ : A.LinearMipmapLinearFilter),
+ (a.magFilter = A.LinearFilter),
+ (a.generateMipmaps = !1),
+ (a.needsUpdate = !0),
+ a
+ );
+ });
+ return (
+ s
+ .catch(function () {
+ return !0;
+ })
+ .then(function () {
+ t &&
+ n &&
+ ((t._taskLoad -= a), delete t._callbacks[n]);
+ }),
+ cd.set(e[0], { promise: s }),
+ s
+ );
+ },
+ },
+ {
+ key: "_initTranscoder",
+ value: function () {
+ var e = this;
+ if (!this.transcoderPending) {
+ var t = new A.FileLoader(this.manager);
+ t.setPath(this.transcoderPath),
+ t.setWithCredentials(this.withCredentials);
+ var r = new Promise(function (e, n) {
+ t.load("basis_transcoder.js", e, void 0, n);
+ }),
+ i = new A.FileLoader(this.manager);
+ i.setPath(this.transcoderPath),
+ i.setResponseType("arraybuffer"),
+ i.setWithCredentials(this.withCredentials);
+ var o = new Promise(function (e, t) {
+ i.load("basis_transcoder.wasm", e, void 0, t);
+ });
+ this.transcoderPending = Promise.all([r, o]).then(
+ function (t) {
+ var r = (0, a.Z)(t, 2),
+ i = r[0],
+ o = r[1],
+ s = n.BasisWorker.toString(),
+ l = [
+ "/* constants */",
+ "let _EngineFormat = " +
+ JSON.stringify(n.EngineFormat),
+ "let _TranscoderFormat = " +
+ JSON.stringify(n.TranscoderFormat),
+ "let _BasisFormat = " +
+ JSON.stringify(n.BasisFormat),
+ "/* basis_transcoder.js */",
+ i,
+ "/* worker */",
+ s.substring(
+ s.indexOf("{") + 1,
+ s.lastIndexOf("}")
+ ),
+ ].join("\n");
+ (e.workerSourceURL = URL.createObjectURL(
+ new Blob([l])
+ )),
+ (e.transcoderBinary = o);
+ }
+ );
+ }
+ return this.transcoderPending;
+ },
+ },
+ {
+ key: "_allocateWorker",
+ value: function (e) {
+ var t = this;
+ return this._initTranscoder().then(function () {
+ if (t.workerPool.length < t.workerLimit) {
+ var n = new Worker(t.workerSourceURL);
+ (n._callbacks = {}),
+ (n._taskLoad = 0),
+ n.postMessage({
+ type: "init",
+ config: t.workerConfig,
+ transcoderBinary: t.transcoderBinary,
+ }),
+ (n.onmessage = function (e) {
+ var t = e.data;
+ switch (t.type) {
+ case "transcode":
+ n._callbacks[t.id].resolve(t);
+ break;
+ case "error":
+ n._callbacks[t.id].reject(t);
+ break;
+ default:
+ console.error(
+ 'THREE.BasisTextureLoader: Unexpected message, "' +
+ t.type +
+ '"'
+ );
+ }
+ }),
+ t.workerPool.push(n);
+ } else
+ t.workerPool.sort(function (e, t) {
+ return e._taskLoad > t._taskLoad ? -1 : 1;
+ });
+ var r = t.workerPool[t.workerPool.length - 1];
+ return (r._taskLoad += e), r;
+ });
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ for (var e = 0; e < this.workerPool.length; e++)
+ this.workerPool[e].terminate();
+ return (this.workerPool.length = 0), this;
+ },
+ },
+ ]),
+ n
+ );
+ })(A.Loader),
+ dd = fd;
+ A.RGBAFormat,
+ A.RGBA_ASTC_4x4_Format,
+ A.RGBA_BPTC_Format,
+ A.RGBA_ETC2_EAC_Format,
+ A.RGBA_PVRTC_4BPPV1_Format,
+ A.RGBA_S3TC_DXT5_Format,
+ A.RGB_ETC1_Format,
+ A.RGB_ETC2_Format,
+ A.RGB_PVRTC_4BPPV1_Format,
+ A.RGB_S3TC_DXT1_Format;
+ var hd = null,
+ pd = 19789,
+ vd = 15786,
+ md = 49725,
+ gd = 2,
+ Ad = 16,
+ yd = 17,
+ bd = 18,
+ xd = 19,
+ Sd = 48,
+ Ed = 49,
+ _d = 15677,
+ Cd = 15678,
+ wd = 256,
+ Td = 45055,
+ Md = 40960,
+ Id = 40976,
+ kd = 40992,
+ Rd = 41008,
+ Bd = 41024,
+ Pd = 41040,
+ Ld = 41089,
+ Dd = 41091,
+ Ud = 41093,
+ Fd = 41095,
+ Od = 41472,
+ Nd = 41488,
+ Gd = 41520,
+ Zd = 41476,
+ zd = 41728,
+ Qd = 41812,
+ Hd = 41814,
+ Vd = 41816,
+ jd = 41818,
+ Wd = 16384,
+ Xd = 16640,
+ Yd = 16656,
+ qd = 16672,
+ Jd = 16688,
+ Kd = 16704,
+ $d = 16736,
+ eh = 0,
+ th = 1,
+ nh = 2,
+ rh = 3,
+ ih = 4,
+ ah = 5,
+ oh = 0,
+ sh = 1,
+ lh = 2,
+ uh = 3,
+ ch = 4,
+ fh = 5,
+ dh = 6,
+ hh = "16",
+ ph = "24",
+ vh = new A.Vector3(),
+ mh = new A.Vector3(),
+ gh = null,
+ Ah = null;
+ function yh(e) {
+ for (var t = 0, n = e.length; t < n; t++) {
+ var r = e[t],
+ i = r.vertices,
+ a = i[0],
+ o = i[1],
+ s = i[2];
+ vh.subVectors(o, a),
+ mh.subVectors(s, o),
+ (r.faceNormal = new Vector3().crossVectors(vh, mh).normalize());
+ }
+ }
+ var bh = new A.Ray();
+ function xh(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
+ r = 100 * (1 + 1e-10);
+ function i(e) {
+ var t = ~~(e.x * r),
+ n = ~~(e.y * r),
+ i = ~~(e.z * r);
+ return "".concat(t, ",").concat(n, ",").concat(i);
+ }
+ function a(e, t) {
+ return "".concat(i(e), "_").concat(i(t));
+ }
+ function o(e, t, n) {
+ n.direction.subVectors(t, e).normalize();
+ var r = e.dot(n.direction);
+ return n.origin.copy(e).addScaledVector(n.direction, -r), n;
+ }
+ function s(e) {
+ return a(e.origin, e.direction);
+ }
+ for (
+ var l = new Set(),
+ u = new Map(),
+ c = {},
+ f = [],
+ d = 0,
+ h = t.length;
+ d < h;
+ d++
+ ) {
+ var p = t[d].vertices,
+ v = p[0],
+ m = p[1];
+ if ((l.add(a(v, m)), l.add(a(m, v)), n)) {
+ var g = o(v, m, new Ray()),
+ A = s(g);
+ if (!u.has(A)) {
+ o(m, v, g);
+ var y = s(g),
+ b = { ray: g, distances: [] };
+ u.set(A, b), u.set(y, b);
+ }
+ var x = u.get(A),
+ S = x.ray.direction.dot(v),
+ E = x.ray.direction.dot(m);
+ if (S > E) {
+ var _ = [E, S];
+ (S = _[0]), (E = _[1]);
+ }
+ x.distances.push(S, E);
+ }
+ }
+ for (var C = 0, w = e.length; C < w; C++)
+ for (
+ var T = e[C], M = T.vertices, I = M.length, k = 0;
+ k < I;
+ k++
+ ) {
+ var R = k,
+ B = (k + 1) % I,
+ P = M[R],
+ L = M[B],
+ D = a(P, L);
+ if (!l.has(D)) {
+ if (n) {
+ o(P, L, bh);
+ var U = s(bh);
+ if (u.has(U)) {
+ var F = u.get(U),
+ O = F.ray,
+ N = F.distances,
+ G = O.direction.dot(P),
+ Z = O.direction.dot(L);
+ if (G > Z) {
+ var z = [Z, G];
+ (G = z[0]), (Z = z[1]);
+ }
+ for (var Q = !1, H = 0, V = N.length; H < V; H += 2)
+ if (G >= N[H] && Z <= N[H + 1]) {
+ Q = !0;
+ break;
+ }
+ if (Q) continue;
+ }
+ }
+ var j = { index: R, tri: T };
+ c[D] = j;
+ }
+ }
+ for (;;) {
+ var W = null;
+ for (var X in c) {
+ W = c[X];
+ break;
+ }
+ if (null === W) break;
+ for (var Y = [W]; Y.length > 0; )
+ for (
+ var q = Y.pop().tri,
+ J = q.vertices,
+ K = q.normals,
+ $ = q.faceNormal,
+ ee = J.length,
+ te = 0;
+ te < ee;
+ te++
+ ) {
+ var ne = te,
+ re = (te + 1) % ee,
+ ie = J[ne],
+ ae = J[re];
+ delete c[a(ie, ae)];
+ var oe = a(ae, ie),
+ se = c[oe];
+ if (se) {
+ var le = se.tri,
+ ue = se.index,
+ ce = le.normals,
+ fe = ce.length,
+ de = le.faceNormal;
+ if (Math.abs(le.faceNormal.dot(q.faceNormal)) < 0.25)
+ continue;
+ oe in c && (Y.push(se), delete c[oe]);
+ var he = (ue + 1) % fe;
+ K[ne] &&
+ ce[he] &&
+ K[ne] !== ce[he] &&
+ (ce[he].norm.add(K[ne].norm), (K[ne].norm = ce[he].norm));
+ var pe = K[ne] || ce[he];
+ null === pe &&
+ ((pe = { norm: new Vector3() }), f.push(pe.norm)),
+ null === K[ne] && ((K[ne] = pe), pe.norm.add($)),
+ null === ce[he] && ((ce[he] = pe), pe.norm.add(de)),
+ K[re] &&
+ ce[ue] &&
+ K[re] !== ce[ue] &&
+ (ce[ue].norm.add(K[re].norm), (K[re].norm = ce[ue].norm));
+ var ve = K[re] || ce[ue];
+ null === ve &&
+ ((ve = { norm: new Vector3() }), f.push(ve.norm)),
+ null === K[re] && ((K[re] = ve), ve.norm.add($)),
+ null === ce[ue] && ((ce[ue] = ve), ve.norm.add(de));
+ }
+ }
+ }
+ for (var me = 0, ge = f.length; me < ge; me++) f[me].normalize();
+ }
+ function Sh(e) {
+ return "Part" === e || "Unofficial_Part" === e;
+ }
+ function Eh(e) {
+ return /primitive/i.test(e) || "Subpart" === e;
+ }
+ var _h = null,
+ Ch = null;
+ function wh(e, t, n, r) {
+ return ((!r && e === hh) || (r && e === ph)) && (e = t), n[e] || null;
+ }
+ var Th = null;
+ function Mh(e, t) {
+ return e.colorCode === t.colorCode
+ ? 0
+ : e.colorCode < t.colorCode
+ ? -1
+ : 1;
+ }
+ function Ih(e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2] && arguments[2],
+ r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : null;
+ e.sort(Mh), null === r && (r = e.length);
+ for (
+ var i = new Float32Array(t * r * 3),
+ a = 3 === t ? new Float32Array(t * r * 3) : null,
+ o = [],
+ s = new Array(6),
+ l = new BufferGeometry(),
+ u = null,
+ c = 0,
+ f = 0,
+ d = 0,
+ h = 0,
+ p = e.length;
+ h < p;
+ h++
+ ) {
+ var v = e[h],
+ m = v.vertices;
+ 4 === m.length &&
+ ((s[0] = m[0]),
+ (s[1] = m[1]),
+ (s[2] = m[2]),
+ (s[3] = m[0]),
+ (s[4] = m[2]),
+ (s[5] = m[3]),
+ (m = s));
+ for (var g = 0, A = m.length; g < A; g++) {
+ var y = m[g],
+ b = d + 3 * g;
+ (i[b + 0] = y.x), (i[b + 1] = y.y), (i[b + 2] = y.z);
+ }
+ if (3 === t) {
+ if (!v.faceNormal) {
+ var x = m[0],
+ S = m[1],
+ E = m[2];
+ vh.subVectors(S, x),
+ mh.subVectors(E, S),
+ (v.faceNormal = new Vector3()
+ .crossVectors(vh, mh)
+ .normalize());
+ }
+ var _ = v.normals;
+ 4 === _.length &&
+ ((s[0] = _[0]),
+ (s[1] = _[1]),
+ (s[2] = _[2]),
+ (s[3] = _[0]),
+ (s[4] = _[2]),
+ (s[5] = _[3]),
+ (_ = s));
+ for (var C = 0, w = _.length; C < w; C++) {
+ var T = v.faceNormal;
+ _[C] && (T = _[C].norm);
+ var M = d + 3 * C;
+ (a[M + 0] = T.x), (a[M + 1] = T.y), (a[M + 2] = T.z);
+ }
+ }
+ if (u !== v.colorCode) {
+ null !== u && l.addGroup(c, f, o.length - 1);
+ var I = v.material;
+ null !== I
+ ? 3 === t
+ ? o.push(I)
+ : 2 === t &&
+ (null !== I
+ ? n
+ ? o.push(
+ I.userData.edgeMaterial.userData
+ .conditionalEdgeMaterial
+ )
+ : o.push(I.userData.edgeMaterial)
+ : o.push(null))
+ : o.push(v.colorCode),
+ (u = v.colorCode),
+ (c = d / 3),
+ (f = m.length);
+ } else f += m.length;
+ d += 3 * m.length;
+ }
+ f > 0 && l.addGroup(c, 1 / 0, o.length - 1),
+ l.setAttribute("position", new BufferAttribute(i, 3)),
+ null !== a && l.setAttribute("normal", new BufferAttribute(a, 3));
+ var k = null;
+ if (
+ (2 === t
+ ? (k = n
+ ? new Ah(l, 1 === o.length ? o[0] : o)
+ : new LineSegments(l, 1 === o.length ? o[0] : o))
+ : 3 === t && (k = new Mesh(l, 1 === o.length ? o[0] : o)),
+ n)
+ ) {
+ k.isConditionalLine = !0;
+ for (
+ var R = new Float32Array(3 * e.length * 2),
+ B = new Float32Array(3 * e.length * 2),
+ P = new Float32Array(3 * e.length * 2),
+ L = 0,
+ D = e.length;
+ L < D;
+ L++
+ ) {
+ var U = e[L],
+ F = U.vertices,
+ O = U.controlPoints,
+ N = O[0],
+ G = O[1],
+ Z = F[0],
+ z = F[1],
+ Q = 3 * L * 2;
+ (R[Q + 0] = N.x),
+ (R[Q + 1] = N.y),
+ (R[Q + 2] = N.z),
+ (R[Q + 3] = N.x),
+ (R[Q + 4] = N.y),
+ (R[Q + 5] = N.z),
+ (B[Q + 0] = G.x),
+ (B[Q + 1] = G.y),
+ (B[Q + 2] = G.z),
+ (B[Q + 3] = G.x),
+ (B[Q + 4] = G.y),
+ (B[Q + 5] = G.z),
+ (P[Q + 0] = z.x - Z.x),
+ (P[Q + 1] = z.y - Z.y),
+ (P[Q + 2] = z.z - Z.z),
+ (P[Q + 3] = z.x - Z.x),
+ (P[Q + 4] = z.y - Z.y),
+ (P[Q + 5] = z.z - Z.z);
+ }
+ l.setAttribute("control0", new BufferAttribute(R, 3, !1)),
+ l.setAttribute("control1", new BufferAttribute(B, 3, !1)),
+ l.setAttribute("direction", new BufferAttribute(P, 3, !1));
+ }
+ return k;
+ }
+ var kh = null,
+ Rh = null,
+ Bh = new WeakMap(),
+ Ph = null;
+ function Lh() {
+ var e, t;
+ function n(e, n) {
+ var a,
+ o,
+ s,
+ l,
+ u,
+ c = e.geometry(),
+ f = e.attributes(),
+ d = c.objectType;
+ switch (d) {
+ case t.ObjectType.Curve:
+ var h = i(c, 100);
+ (o = {}),
+ (l = {}),
+ ((s = {}).itemSize = 3),
+ (s.type = "Float32Array"),
+ (s.array = []);
+ for (var p = 0; p < h.length; p++)
+ s.array.push(h[p][0]),
+ s.array.push(h[p][1]),
+ s.array.push(h[p][2]);
+ (o.position = s), (l.attributes = o), (a = { data: l });
+ break;
+ case t.ObjectType.Point:
+ var v = c.location,
+ m = {};
+ (o = {}),
+ (l = {}),
+ ((s = {}).itemSize = 3),
+ (s.type = "Float32Array"),
+ (s.array = [v[0], v[1], v[2]]);
+ var g = f.drawColor(n);
+ (m.itemSize = 3),
+ (m.type = "Float32Array"),
+ (m.array = [g.r / 255, g.g / 255, g.b / 255]),
+ (o.position = s),
+ (o.color = m),
+ (l.attributes = o),
+ (a = { data: l });
+ break;
+ case t.ObjectType.PointSet:
+ case t.ObjectType.Mesh:
+ a = c.toThreejsJSON();
+ break;
+ case t.ObjectType.Brep:
+ var A = c.faces();
+ u = new t.Mesh();
+ for (var y = 0; y < A.count; y++) {
+ var b = A.get(y),
+ x = b.getMesh(t.MeshType.Any);
+ x && (u.append(x), x.delete()), b.delete();
+ }
+ u.faces().count > 0 &&
+ (u.compact(), (a = u.toThreejsJSON()), A.delete()),
+ u.delete();
+ break;
+ case t.ObjectType.Extrusion:
+ (u = c.getMesh(t.MeshType.Any)) &&
+ ((a = u.toThreejsJSON()), u.delete());
+ break;
+ case t.ObjectType.TextDot:
+ case t.ObjectType.Light:
+ a = r(c);
+ break;
+ case t.ObjectType.InstanceReference:
+ ((a = r(c)).xform = r(c.xform)),
+ (a.xform.array = c.xform.toFloatArray(!0));
+ break;
+ case t.ObjectType.SubD:
+ c.subdivide(3),
+ (u = t.Mesh.createFromSubDControlNet(c)) &&
+ ((a = u.toThreejsJSON()), u.delete());
+ break;
+ default:
+ console.warn(
+ "THREE.3DMLoader: TODO: Implement ".concat(d.constructor.name)
+ );
+ }
+ if (a)
+ return (
+ ((o = r(f)).geometry = r(c)),
+ f.groupCount > 0 && (o.groupIds = f.getGroupList()),
+ f.userStringCount > 0 && (o.userStrings = f.getUserStrings()),
+ c.userStringCount > 0 &&
+ (o.geometry.userStrings = c.getUserStrings()),
+ (o.drawColor = f.drawColor(n)),
+ {
+ geometry: a,
+ attributes: o,
+ objectType: (d = (d = d.constructor.name).substring(
+ 11,
+ d.length
+ )),
+ }
+ );
+ console.warn(
+ "THREE.3DMLoader: ".concat(
+ d.constructor.name,
+ " has no associated mesh geometry."
+ )
+ );
+ }
+ function r(e) {
+ var t = {};
+ for (var n in e) {
+ var r = e[n];
+ "function" !== typeof r &&
+ ("object" === typeof r &&
+ null !== r &&
+ r.hasOwnProperty("constructor")
+ ? (t[n] = { name: r.constructor.name, value: r.value })
+ : (t[n] = r));
+ }
+ return t;
+ }
+ function i(e, n) {
+ var r = n,
+ a = [],
+ o = [];
+ if (e instanceof t.LineCurve) return [e.pointAtStart, e.pointAtEnd];
+ if (e instanceof t.PolylineCurve) {
+ r = e.pointCount;
+ for (var s = 0; s < r; s++) a.push(e.point(s));
+ return a;
+ }
+ if (e instanceof t.PolyCurve) {
+ for (var l = e.segmentCount, u = 0; u < l; u++) {
+ var c = e.segmentCurve(u),
+ f = i(c, r);
+ (a = a.concat(f)), c.delete();
+ }
+ return a;
+ }
+ if (
+ (e instanceof t.ArcCurve &&
+ (r = (r = Math.floor(e.angleDegrees / 5)) < 2 ? 2 : r),
+ e instanceof t.NurbsCurve && 1 === e.degree)
+ ) {
+ for (var d = e.tryGetPolyline(), h = 0; h < d.count; h++)
+ a.push(d.get(h));
+ return d.delete(), a;
+ }
+ for (var p = e.domain, v = r - 1, m = 0; m < r; m++) {
+ var g = p[0] + (m / v) * (p[1] - p[0]);
+ if (g !== p[0] && g !== p[1]) {
+ var A = e.tangentAt(g),
+ y = e.tangentAt(o.slice(-1)[0]),
+ b = A[0] * A[0] + A[1] * A[1] + A[2] * A[2],
+ x = y[0] * y[0] + y[1] * y[1] + y[2] * y[2],
+ S = Math.sqrt(b * x),
+ E = void 0;
+ if (0 === S) E = Math.PI / 2;
+ else {
+ var _ = (A.x * y.x + A.y * y.y + A.z * y.z) / S;
+ E = Math.acos(Math.max(-1, Math.min(1, _)));
+ }
+ E < 0.1 || o.push(g);
+ } else o.push(g);
+ }
+ return (
+ (a = o.map(function (t) {
+ return e.pointAt(t);
+ })),
+ a
+ );
+ }
+ onmessage = function (i) {
+ var a = i.data;
+ switch (a.type) {
+ case "init":
+ var o,
+ s = a.libraryConfig.wasmBinary;
+ e = new Promise(function (e) {
+ (o = { wasmBinary: s, onRuntimeInitialized: e }), rhino3dm(o);
+ }).then(function () {
+ t = o;
+ });
+ break;
+ case "decode":
+ var l = a.buffer;
+ e.then(function () {
+ var e = (function (e, t) {
+ for (
+ var i = new Uint8Array(t),
+ a = e.File3dm.fromByteArray(i),
+ o = [],
+ s = [],
+ l = [],
+ u = [],
+ c = [],
+ f = [],
+ d = a.objects(),
+ h = d.count,
+ p = 0;
+ p < h;
+ p++
+ ) {
+ var v = d.get(p),
+ m = n(v, a);
+ v.delete(), m && o.push(m);
+ }
+ for (var g = 0; g < a.instanceDefinitions().count(); g++) {
+ var A = a.instanceDefinitions().get(g),
+ y = r(A);
+ (y.objectIds = A.getObjectIds()),
+ o.push({
+ geometry: null,
+ attributes: y,
+ objectType: "InstanceDefinition",
+ });
+ }
+ for (
+ var b = [
+ e.TextureType.Diffuse,
+ e.TextureType.Bump,
+ e.TextureType.Transparency,
+ e.TextureType.Opacity,
+ e.TextureType.Emap,
+ ],
+ x = [
+ e.TextureType.PBR_BaseColor,
+ e.TextureType.PBR_Subsurface,
+ e.TextureType.PBR_SubsurfaceScattering,
+ e.TextureType.PBR_SubsurfaceScatteringRadius,
+ e.TextureType.PBR_Metallic,
+ e.TextureType.PBR_Specular,
+ e.TextureType.PBR_SpecularTint,
+ e.TextureType.PBR_Roughness,
+ e.TextureType.PBR_Anisotropic,
+ e.TextureType.PBR_Anisotropic_Rotation,
+ e.TextureType.PBR_Sheen,
+ e.TextureType.PBR_SheenTint,
+ e.TextureType.PBR_Clearcoat,
+ e.TextureType.PBR_ClearcoatBump,
+ e.TextureType.PBR_ClearcoatRoughness,
+ e.TextureType.PBR_OpacityIor,
+ e.TextureType.PBR_OpacityRoughness,
+ e.TextureType.PBR_Emission,
+ e.TextureType.PBR_AmbientOcclusion,
+ e.TextureType.PBR_Displacement,
+ ],
+ S = 0;
+ S < a.materials().count();
+ S++
+ ) {
+ for (
+ var E = a.materials().get(S),
+ _ = E.physicallyBased(),
+ C = r(E),
+ w = [],
+ T = 0;
+ T < b.length;
+ T++
+ ) {
+ var M = E.getTexture(b[T]);
+ if (M) {
+ var I = b[T].constructor.name,
+ k = { type: (I = I.substring(12, I.length)) },
+ R = a.getEmbeddedFileAsBase64(M.fileName);
+ R
+ ? (k.image = "data:image/png;base64," + R)
+ : (console.warn(
+ "THREE.3DMLoader: Image for ".concat(
+ I,
+ " texture not embedded in file."
+ )
+ ),
+ (k.image = null)),
+ w.push(k),
+ M.delete();
+ }
+ }
+ if (((C.textures = w), _.supported)) {
+ console.log("pbr true");
+ for (var B = 0; B < x.length; B++) {
+ var P = E.getTexture(b[B]);
+ if (P) {
+ var L = a.getEmbeddedFileAsBase64(P.fileName),
+ D = b[B].constructor.name,
+ U = {
+ type: (D = D.substring(12, D.length)),
+ image: "data:image/png;base64," + L,
+ };
+ w.push(U), P.delete();
+ }
+ }
+ var F = r(E.physicallyBased());
+ C = Object.assign(F, C);
+ }
+ s.push(C), E.delete(), _.delete();
+ }
+ for (var O = 0; O < a.layers().count(); O++) {
+ var N = a.layers().get(O),
+ G = r(N);
+ l.push(G), N.delete();
+ }
+ for (var Z = 0; Z < a.views().count(); Z++) {
+ var z = a.views().get(Z),
+ Q = r(z);
+ u.push(Q), z.delete();
+ }
+ for (var H = 0; H < a.namedViews().count(); H++) {
+ var V = a.namedViews().get(H),
+ j = r(V);
+ c.push(j), V.delete();
+ }
+ for (var W = 0; W < a.groups().count(); W++) {
+ var X = a.groups().get(W),
+ Y = r(X);
+ f.push(Y), X.delete();
+ }
+ var q = r(a.settings());
+ return (
+ a.delete(),
+ {
+ objects: o,
+ materials: s,
+ layers: l,
+ views: u,
+ namedViews: c,
+ groups: f,
+ settings: q,
+ }
+ );
+ })(t, l);
+ self.postMessage({ type: "decode", id: a.id, data: e });
+ });
+ }
+ };
+ }
+ var Dh = /^[og]\s*(.+)?/,
+ Uh = /^mtllib /,
+ Fh = /^usemtl /,
+ Oh = /^usemap /,
+ Nh = new A.Vector3(),
+ Gh = new A.Vector3(),
+ Zh = new A.Vector3(),
+ zh = new A.Vector3(),
+ Qh = new A.Vector3();
+ function Hh() {
+ var e = {
+ objects: [],
+ object: {},
+ vertices: [],
+ normals: [],
+ colors: [],
+ uvs: [],
+ materials: {},
+ materialLibraries: [],
+ startObject: function (e, t) {
+ if (this.object && !1 === this.object.fromDeclaration)
+ return (
+ (this.object.name = e),
+ void (this.object.fromDeclaration = !1 !== t)
+ );
+ var n =
+ this.object && "function" === typeof this.object.currentMaterial
+ ? this.object.currentMaterial()
+ : void 0;
+ if (
+ (this.object &&
+ "function" === typeof this.object._finalize &&
+ this.object._finalize(!0),
+ (this.object = {
+ name: e || "",
+ fromDeclaration: !1 !== t,
+ geometry: {
+ vertices: [],
+ normals: [],
+ colors: [],
+ uvs: [],
+ hasUVIndices: !1,
+ },
+ materials: [],
+ smooth: !0,
+ startMaterial: function (e, t) {
+ var n = this._finalize(!1);
+ n &&
+ (n.inherited || n.groupCount <= 0) &&
+ this.materials.splice(n.index, 1);
+ var r = {
+ index: this.materials.length,
+ name: e || "",
+ mtllib:
+ Array.isArray(t) && t.length > 0 ? t[t.length - 1] : "",
+ smooth: void 0 !== n ? n.smooth : this.smooth,
+ groupStart: void 0 !== n ? n.groupEnd : 0,
+ groupEnd: -1,
+ groupCount: -1,
+ inherited: !1,
+ clone: function (e) {
+ var t = {
+ index: "number" === typeof e ? e : this.index,
+ name: this.name,
+ mtllib: this.mtllib,
+ smooth: this.smooth,
+ groupStart: 0,
+ groupEnd: -1,
+ groupCount: -1,
+ inherited: !1,
+ };
+ return (t.clone = this.clone.bind(t)), t;
+ },
+ };
+ return this.materials.push(r), r;
+ },
+ currentMaterial: function () {
+ if (this.materials.length > 0)
+ return this.materials[this.materials.length - 1];
+ },
+ _finalize: function (e) {
+ var t = this.currentMaterial();
+ if (
+ (t &&
+ -1 === t.groupEnd &&
+ ((t.groupEnd = this.geometry.vertices.length / 3),
+ (t.groupCount = t.groupEnd - t.groupStart),
+ (t.inherited = !1)),
+ e && this.materials.length > 1)
+ )
+ for (var n = this.materials.length - 1; n >= 0; n--)
+ this.materials[n].groupCount <= 0 &&
+ this.materials.splice(n, 1);
+ return (
+ e &&
+ 0 === this.materials.length &&
+ this.materials.push({ name: "", smooth: this.smooth }),
+ t
+ );
+ },
+ }),
+ n && n.name && "function" === typeof n.clone)
+ ) {
+ var r = n.clone(0);
+ (r.inherited = !0), this.object.materials.push(r);
+ }
+ this.objects.push(this.object);
+ },
+ finalize: function () {
+ this.object &&
+ "function" === typeof this.object._finalize &&
+ this.object._finalize(!0);
+ },
+ parseVertexIndex: function (e, t) {
+ var n = parseInt(e, 10);
+ return 3 * (n >= 0 ? n - 1 : n + t / 3);
+ },
+ parseNormalIndex: function (e, t) {
+ var n = parseInt(e, 10);
+ return 3 * (n >= 0 ? n - 1 : n + t / 3);
+ },
+ parseUVIndex: function (e, t) {
+ var n = parseInt(e, 10);
+ return 2 * (n >= 0 ? n - 1 : n + t / 2);
+ },
+ addVertex: function (e, t, n) {
+ var r = this.vertices,
+ i = this.object.geometry.vertices;
+ i.push(r[e + 0], r[e + 1], r[e + 2]),
+ i.push(r[t + 0], r[t + 1], r[t + 2]),
+ i.push(r[n + 0], r[n + 1], r[n + 2]);
+ },
+ addVertexPoint: function (e) {
+ var t = this.vertices;
+ this.object.geometry.vertices.push(t[e + 0], t[e + 1], t[e + 2]);
+ },
+ addVertexLine: function (e) {
+ var t = this.vertices;
+ this.object.geometry.vertices.push(t[e + 0], t[e + 1], t[e + 2]);
+ },
+ addNormal: function (e, t, n) {
+ var r = this.normals,
+ i = this.object.geometry.normals;
+ i.push(r[e + 0], r[e + 1], r[e + 2]),
+ i.push(r[t + 0], r[t + 1], r[t + 2]),
+ i.push(r[n + 0], r[n + 1], r[n + 2]);
+ },
+ addFaceNormal: function (e, t, n) {
+ var r = this.vertices,
+ i = this.object.geometry.normals;
+ Nh.fromArray(r, e),
+ Gh.fromArray(r, t),
+ Zh.fromArray(r, n),
+ Qh.subVectors(Zh, Gh),
+ zh.subVectors(Nh, Gh),
+ Qh.cross(zh),
+ Qh.normalize(),
+ i.push(Qh.x, Qh.y, Qh.z),
+ i.push(Qh.x, Qh.y, Qh.z),
+ i.push(Qh.x, Qh.y, Qh.z);
+ },
+ addColor: function (e, t, n) {
+ var r = this.colors,
+ i = this.object.geometry.colors;
+ void 0 !== r[e] && i.push(r[e + 0], r[e + 1], r[e + 2]),
+ void 0 !== r[t] && i.push(r[t + 0], r[t + 1], r[t + 2]),
+ void 0 !== r[n] && i.push(r[n + 0], r[n + 1], r[n + 2]);
+ },
+ addUV: function (e, t, n) {
+ var r = this.uvs,
+ i = this.object.geometry.uvs;
+ i.push(r[e + 0], r[e + 1]),
+ i.push(r[t + 0], r[t + 1]),
+ i.push(r[n + 0], r[n + 1]);
+ },
+ addDefaultUV: function () {
+ var e = this.object.geometry.uvs;
+ e.push(0, 0), e.push(0, 0), e.push(0, 0);
+ },
+ addUVLine: function (e) {
+ var t = this.uvs;
+ this.object.geometry.uvs.push(t[e + 0], t[e + 1]);
+ },
+ addFace: function (e, t, n, r, i, a, o, s, l) {
+ var u = this.vertices.length,
+ c = this.parseVertexIndex(e, u),
+ f = this.parseVertexIndex(t, u),
+ d = this.parseVertexIndex(n, u);
+ if (
+ (this.addVertex(c, f, d),
+ this.addColor(c, f, d),
+ void 0 !== o && "" !== o)
+ ) {
+ var h = this.normals.length;
+ (c = this.parseNormalIndex(o, h)),
+ (f = this.parseNormalIndex(s, h)),
+ (d = this.parseNormalIndex(l, h)),
+ this.addNormal(c, f, d);
+ } else this.addFaceNormal(c, f, d);
+ if (void 0 !== r && "" !== r) {
+ var p = this.uvs.length;
+ (c = this.parseUVIndex(r, p)),
+ (f = this.parseUVIndex(i, p)),
+ (d = this.parseUVIndex(a, p)),
+ this.addUV(c, f, d),
+ (this.object.geometry.hasUVIndices = !0);
+ } else this.addDefaultUV();
+ },
+ addPointGeometry: function (e) {
+ this.object.geometry.type = "Points";
+ for (
+ var t = this.vertices.length, n = 0, r = e.length;
+ n < r;
+ n++
+ ) {
+ var i = this.parseVertexIndex(e[n], t);
+ this.addVertexPoint(i), this.addColor(i);
+ }
+ },
+ addLineGeometry: function (e, t) {
+ this.object.geometry.type = "Line";
+ for (
+ var n = this.vertices.length,
+ r = this.uvs.length,
+ i = 0,
+ a = e.length;
+ i < a;
+ i++
+ )
+ this.addVertexLine(this.parseVertexIndex(e[i], n));
+ for (var o = 0, s = t.length; o < s; o++)
+ this.addUVLine(this.parseUVIndex(t[o], r));
+ },
+ };
+ return e.startObject("", !1), e;
+ }
+ var Vh = null,
+ jh = null,
+ Wh = null,
+ Xh = null,
+ Yh = null;
+ function qh(e) {
+ var t = e.geometry,
+ n = [];
+ if (t && void 0 !== t.bones) {
+ for (var r = 0, i = t.bones.length; r < i; r++) {
+ var a = t.bones[r],
+ o = new Bone();
+ n.push(o),
+ (o.name = a.name),
+ o.position.fromArray(a.pos),
+ o.quaternion.fromArray(a.rotq),
+ void 0 !== a.scl && o.scale.fromArray(a.scl);
+ }
+ for (var s = 0, l = t.bones.length; s < l; s++) {
+ var u = t.bones[s];
+ -1 !== u.parent && null !== u.parent && void 0 !== n[u.parent]
+ ? n[u.parent].add(n[s])
+ : e.add(n[s]);
+ }
+ }
+ return e.updateMatrixWorld(!0), n;
+ }
+ var Jh = null,
+ Kh = null,
+ $h = null,
+ ep = null,
+ tp = null,
+ np = null,
+ rp = 0,
+ ip = null,
+ ap = null,
+ op = null,
+ sp = {
+ "89d104cd-d012-426b-b5b3-bbaee63ac43c": "Bubbles",
+ "700f3aa8-9a7c-2384-8b8a-ea028905dd8c": "CelVinyl",
+ "0f0ff7b2-a677-45eb-a7d6-0cd7206f4816": "ChromaticWave",
+ "1161af82-50cf-47db-9706-0c3576d43c43": "CoarseBristles",
+ "79168f10-6961-464a-8be1-57ed364c5600": "CoarseBristlesSingleSided",
+ "1caa6d7d-f015-3f54-3a4b-8b5354d39f81": "Comet",
+ "c8313697-2563-47fc-832e-290f4c04b901": "DiamondHull",
+ "4391aaaa-df73-4396-9e33-31e4e4930b27": "Disco",
+ "d1d991f2-e7a0-4cf1-b328-f57e915e6260": "DotMarker",
+ "6a1cf9f9-032c-45ec-9b1d-a6680bee30f7": "Dots",
+ "0d3889f3-3ede-470c-8af4-f44813306126": "DoubleTaperedFlat",
+ "0d3889f3-3ede-470c-8af4-de4813306126": "DoubleTaperedMarker",
+ "d0262945-853c-4481-9cbd-88586bed93cb": "DuctTape",
+ "3ca16e2f-bdcd-4da2-8631-dcef342f40f1": "DuctTapeSingleSided",
+ "f6e85de3-6dcc-4e7f-87fd-cee8c3d25d51": "Electricity",
+ "02ffb866-7fb2-4d15-b761-1012cefb1360": "Embers",
+ "cb92b597-94ca-4255-b017-0e3f42f12f9e": "Fire",
+ "2d35bcf0-e4d8-452c-97b1-3311be063130": "Flat",
+ "55303bc4-c749-4a72-98d9-d23e68e76e18": "FlatDeprecated",
+ "280c0a7a-aad8-416c-a7d2-df63d129ca70": "FlatSingleSided",
+ "cf019139-d41c-4eb0-a1d0-5cf54b0a42f3": "Highlighter",
+ "6a1cf9f9-032c-45ec-9b6e-a6680bee32e9": "HyperGrid",
+ "dce872c2-7b49-4684-b59b-c45387949c5c": "Hypercolor",
+ "e8ef32b1-baa8-460a-9c2c-9cf8506794f5": "HypercolorSingleSided",
+ "2f212815-f4d3-c1a4-681a-feeaf9c6dc37": "Icing",
+ "f5c336cf-5108-4b40-ade9-c687504385ab": "Ink",
+ "c0012095-3ffd-4040-8ee1-fc180d346eaa": "InkSingleSided",
+ "4a76a27a-44d8-4bfe-9a8c-713749a499b0": "Leaves",
+ "ea19de07-d0c0-4484-9198-18489a3c1487": "LeavesSingleSided",
+ "2241cd32-8ba2-48a5-9ee7-2caef7e9ed62": "Light",
+ "4391aaaa-df81-4396-9e33-31e4e4930b27": "LightWire",
+ "d381e0f5-3def-4a0d-8853-31e9200bcbda": "Lofted",
+ "429ed64a-4e97-4466-84d3-145a861ef684": "Marker",
+ "79348357-432d-4746-8e29-0e25c112e3aa": "MatteHull",
+ "b2ffef01-eaaa-4ab5-aa64-95a2c4f5dbc6": "NeonPulse",
+ "f72ec0e7-a844-4e38-82e3-140c44772699": "OilPaint",
+ "c515dad7-4393-4681-81ad-162ef052241b": "OilPaintSingleSided",
+ "f1114e2e-eb8d-4fde-915a-6e653b54e9f5": "Paper",
+ "759f1ebd-20cd-4720-8d41-234e0da63716": "PaperSingleSided",
+ "e0abbc80-0f80-e854-4970-8924a0863dcc": "Petal",
+ "c33714d1-b2f9-412e-bd50-1884c9d46336": "Plasma",
+ "ad1ad437-76e2-450d-a23a-e17f8310b960": "Rainbow",
+ "faaa4d44-fcfb-4177-96be-753ac0421ba3": "ShinyHull",
+ "70d79cca-b159-4f35-990c-f02193947fe8": "Smoke",
+ "d902ed8b-d0d1-476c-a8de-878a79e3a34c": "Snow",
+ "accb32f5-4509-454f-93f8-1df3fd31df1b": "SoftHighlighter",
+ "cf7f0059-7aeb-53a4-2b67-c83d863a9ffa": "Spikes",
+ "8dc4a70c-d558-4efd-a5ed-d4e860f40dc3": "Splatter",
+ "7a1c8107-50c5-4b70-9a39-421576d6617e": "SplatterSingleSided",
+ "0eb4db27-3f82-408d-b5a1-19ebd7d5b711": "Stars",
+ "44bb800a-fbc3-4592-8426-94ecb05ddec3": "Streamers",
+ "0077f88c-d93a-42f3-b59b-b31c50cdb414": "Taffy",
+ "b468c1fb-f254-41ed-8ec9-57030bc5660c": "TaperedFlat",
+ "c8ccb53d-ae13-45ef-8afb-b730d81394eb": "TaperedFlatSingleSided",
+ "d90c6ad8-af0f-4b54-b422-e0f92abe1b3c": "TaperedMarker",
+ "1a26b8c0-8a07-4f8a-9fac-d2ef36e0cad0": "TaperedMarker_Flat",
+ "75b32cf0-fdd6-4d89-a64b-e2a00b247b0f": "ThickPaint",
+ "fdf0326a-c0d1-4fed-b101-9db0ff6d071f": "ThickPaintSingleSided",
+ "4391385a-df73-4396-9e33-31e4e4930b27": "Toon",
+ "a8fea537-da7c-4d4b-817f-24f074725d6d": "UnlitHull",
+ "d229d335-c334-495a-a801-660ac8a87360": "VelvetInk",
+ "10201aa3-ebc2-42d8-84b7-2e63f6eeb8ab": "Waveform",
+ "b67c0e81-ce6d-40a8-aeb0-ef036b081aa3": "WetPaint",
+ "dea67637-cd1a-27e4-c9b1-52f4bbcb84e5": "WetPaintSingleSided",
+ "5347acf0-a8e2-47b6-8346-30c70719d763": "WigglyGraphite",
+ "e814fef1-97fd-7194-4a2f-50c2bb918be2": "WigglyGraphiteSingleSided",
+ "4391385a-cf83-4396-9e33-31e4e4930b27": "Wire",
+ },
+ lp = {
+ colors: {
+ BloomColor:
+ "\n\t\t\tvec3 BloomColor(vec3 color, float gain) {\n\t\t\t\t// Guarantee that there's at least a little bit of all 3 channels.\n\t\t\t\t// This makes fully-saturated strokes (which only have 2 non-zero\n\t\t\t\t// color channels) eventually clip to white rather than to a secondary.\n\t\t\t\tfloat cmin = length(color.rgb) * .05;\n\t\t\t\tcolor.rgb = max(color.rgb, vec3(cmin, cmin, cmin));\n\t\t\t\t// If we try to remove this pow() from .a, it brightens up\n\t\t\t\t// pressure-sensitive strokes; looks better as-is.\n\t\t\t\tcolor = pow(color, vec3(2.2));\n\t\t\t\tcolor.rgb *= 2. * exp(gain * 10.);\n\t\t\t\treturn color;\n\t\t\t}\n\t\t",
+ LinearToSrgb:
+ "\n\t\t\tvec3 LinearToSrgb(vec3 color) {\n\t\t\t\t// Approximation http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\n\t\t\t\tvec3 linearColor = color.rgb;\n\t\t\t\tvec3 S1 = sqrt(linearColor);\n\t\t\t\tvec3 S2 = sqrt(S1);\n\t\t\t\tvec3 S3 = sqrt(S2);\n\t\t\t\tcolor.rgb = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * linearColor;\n\t\t\t\treturn color;\n\t\t\t}\n\t\t",
+ hsv: "\n\t\t\t// uniform sampler2D lookupTex;\n\t\t\tvec4 lookup(vec4 textureColor) {\n\t\t\t\treturn textureColor;\n\t\t\t}\n\n\t\t\tvec3 lookup(vec3 textureColor) {\n\t\t\t\treturn textureColor;\n\t\t\t}\n\n\t\t\tvec3 hsv2rgb( vec3 hsv ) {\n\t\t\t\tvec3 rgb = clamp( abs(mod(hsv.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0 );\n\t\t\t\treturn hsv.z * mix( vec3(1.0), rgb, hsv.y);\n\t\t\t}\n\n\t\t\tvec3 rgb2hsv( vec3 rgb ) {\n\t\t\t\tvec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\t\t\t\tvec4 p = mix(vec4(rgb.bg, K.wz), vec4(rgb.gb, K.xy), step(rgb.b, rgb.g));\n\t\t\t\tvec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n\t\t\t\tfloat d = q.x - min(q.w, q.y);\n\t\t\t\tfloat e = 1.0e-10;\n\n\t\t\t\treturn vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n\t\t\t}\n\t\t",
+ SrgbToLinear:
+ "\n\t\t\tvec3 SrgbToLinear(vec3 color) {\n\t\t\t\t// Approximation http://chilliant.blogspot.com/2012/08/srgb-approximations-for-hlsl.html\n\t\t\t\tvec3 sRGB = color.rgb;\n\t\t\t\tcolor.rgb = sRGB * (sRGB * (sRGB * 0.305306011 + 0.682171111) + 0.012522878);\n\t\t\t\treturn color;\n\t\t\t}\n\t\t",
+ },
+ },
+ up = function () {
+ return {
+ Light: {
+ uniforms: {
+ mainTex: {
+ value: new TextureLoader()
+ .setPath("./textures/tiltbrush/")
+ .loader.load("Light.webp"),
+ },
+ alphaTest: { value: 0.067 },
+ emission_gain: { value: 0.45 },
+ alpha: { value: 1 },
+ },
+ vertexShader:
+ "\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tattribute vec2 uv;\n\t\t\tattribute vec4 color;\n\t\t\tattribute vec3 position;\n\n\t\t\tuniform mat4 modelMatrix;\n\t\t\tuniform mat4 modelViewMatrix;\n\t\t\tuniform mat4 projectionMatrix;\n\t\t\tuniform mat4 viewMatrix;\n\t\t\tuniform mat3 normalMatrix;\n\t\t\tuniform vec3 cameraPosition;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t"
+ .concat(lp.colors.LinearToSrgb, "\n\t\t\t")
+ .concat(
+ lp.colors.hsv,
+ "\n\n\t\t\tvoid main() {\n\n\t\t\t\tvUv = uv;\n\n\t\t\t\tvColor = lookup(color.rgb);\n\n\t\t\t\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\n\t\t\t\tgl_Position = projectionMatrix * mvPosition;\n\n\t\t\t}\n\t\t"
+ ),
+ fragmentShader:
+ "\n\t\t\tprecision highp float;\n\t\t\tprecision highp int;\n\n\t\t\tuniform float emission_gain;\n\n\t\t\tuniform sampler2D mainTex;\n\t\t\tuniform float alphaTest;\n\n\t\t\tvarying vec2 vUv;\n\t\t\tvarying vec3 vColor;\n\n\t\t\t"
+ .concat(lp.colors.BloomColor, "\n\t\t\t")
+ .concat(
+ lp.colors.SrgbToLinear,
+ "\n\n\t\t\tvoid main(){\n\t\t\t\tvec4 col = texture2D(mainTex, vUv);\n\t\t\t\tvec3 color = vColor;\n\t\t\t\tcolor = BloomColor(color, emission_gain);\n\t\t\t\tcolor = color * col.rgb;\n\t\t\t\tcolor = color * col.a;\n\t\t\t\tcolor = SrgbToLinear(color);\n\t\t\t\tgl_FragColor = vec4(color, 1.0);\n\t\t\t}\n\t\t"
+ ),
+ side: 2,
+ transparent: !0,
+ depthFunc: 2,
+ depthWrite: !0,
+ depthTest: !1,
+ blending: 5,
+ blendDst: 201,
+ blendDstAlpha: 201,
+ blendEquation: 100,
+ blendEquationAlpha: 100,
+ blendSrc: 201,
+ blendSrcAlpha: 201,
+ },
+ };
+ };
+ function cp(e) {
+ return "Light" === sp[e]
+ ? new RawShaderMaterial(up().Light)
+ : new MeshBasicMaterial({ vertexColors: !0, side: DoubleSide });
+ }
+ var fp = new WeakMap(),
+ dp = null;
+ function hp() {
+ var e, t;
+ function n(e, t, n, r, i, a) {
+ var o = a.num_components(),
+ s = n.num_points() * o,
+ l = s * i.BYTES_PER_ELEMENT,
+ u = (function (e, t) {
+ switch (t) {
+ case Float32Array:
+ return e.DT_FLOAT32;
+ case Int8Array:
+ return e.DT_INT8;
+ case Int16Array:
+ return e.DT_INT16;
+ case Int32Array:
+ return e.DT_INT32;
+ case Uint8Array:
+ return e.DT_UINT8;
+ case Uint16Array:
+ return e.DT_UINT16;
+ case Uint32Array:
+ return e.DT_UINT32;
+ }
+ })(e, i),
+ c = e._malloc(l);
+ t.GetAttributeDataArrayForAllPoints(n, a, u, l, c);
+ var f = new i(e.HEAPF32.buffer, c, s).slice();
+ return e._free(c), { name: r, array: f, itemSize: o };
+ }
+ onmessage = function (r) {
+ var i = r.data;
+ switch (i.type) {
+ case "init":
+ (e = i.decoderConfig),
+ (t = new Promise(function (t) {
+ (e.onModuleLoaded = function (e) {
+ t({ draco: e });
+ }),
+ DracoDecoderModule(e);
+ }));
+ break;
+ case "decode":
+ var a = i.buffer,
+ o = i.taskConfig;
+ t.then(function (e) {
+ var t = e.draco,
+ r = new t.Decoder(),
+ s = new t.DecoderBuffer();
+ s.Init(new Int8Array(a), a.byteLength);
+ try {
+ var l = (function (e, t, r, i) {
+ var a,
+ o,
+ s = i.attributeIDs,
+ l = i.attributeTypes,
+ u = t.GetEncodedGeometryType(r);
+ if (u === e.TRIANGULAR_MESH)
+ (a = new e.Mesh()), (o = t.DecodeBufferToMesh(r, a));
+ else {
+ if (u !== e.POINT_CLOUD)
+ throw new Error(
+ "THREE.DRACOLoader: Unexpected geometry type."
+ );
+ (a = new e.PointCloud()),
+ (o = t.DecodeBufferToPointCloud(r, a));
+ }
+ if (!o.ok() || 0 === a.ptr)
+ throw new Error(
+ "THREE.DRACOLoader: Decoding failed: " +
+ o.error_msg()
+ );
+ var c = { index: null, attributes: [] };
+ for (var f in s) {
+ var d = self[l[f]],
+ h = void 0,
+ p = void 0;
+ if (i.useUniqueIDs)
+ (p = s[f]), (h = t.GetAttributeByUniqueId(a, p));
+ else {
+ if (-1 === (p = t.GetAttributeId(a, e[s[f]])))
+ continue;
+ h = t.GetAttribute(a, p);
+ }
+ c.attributes.push(n(e, t, a, f, d, h));
+ }
+ u === e.TRIANGULAR_MESH &&
+ (c.index = (function (e, t, n) {
+ var r = n.num_faces(),
+ i = 3 * r,
+ a = 4 * i,
+ o = e._malloc(a);
+ t.GetTrianglesUInt32Array(n, a, o);
+ var s = new Uint32Array(
+ e.HEAPF32.buffer,
+ o,
+ i
+ ).slice();
+ return e._free(o), { array: s, itemSize: 1 };
+ })(e, t, a));
+ return e.destroy(a), c;
+ })(t, r, s, o),
+ u = l.attributes.map(function (e) {
+ return e.array.buffer;
+ });
+ l.index && u.push(l.index.array.buffer),
+ self.postMessage(
+ { type: "decode", id: i.id, geometry: l },
+ u
+ );
+ } catch (c) {
+ console.error(c),
+ self.postMessage({
+ type: "error",
+ id: i.id,
+ error: c.message,
+ });
+ } finally {
+ t.destroy(s), t.destroy(r);
+ }
+ });
+ }
+ };
+ }
+ var pp = null,
+ vp = null,
+ mp = null;
+ function gp() {
+ if (null === mp) {
+ var e = new ArrayBuffer(2),
+ t = new Uint8Array(e),
+ n = new Uint16Array(e);
+ (t[0] = 170), (t[1] = 187), (mp = 43707 === n[0]);
+ }
+ return mp;
+ }
+ var Ap = [
+ null,
+ Float32Array,
+ null,
+ Int8Array,
+ Int16Array,
+ null,
+ Int32Array,
+ Uint8Array,
+ Uint16Array,
+ null,
+ Uint32Array,
+ ],
+ yp = {
+ Uint16Array: "getUint16",
+ Uint32Array: "getUint32",
+ Int16Array: "getInt16",
+ Int32Array: "getInt32",
+ Float32Array: "getFloat32",
+ Float64Array: "getFloat64",
+ };
+ function bp(e, t, n, r, i) {
+ var a,
+ o = t.BYTES_PER_ELEMENT;
+ if (i === gp() || 1 === o) a = new t(e, n, r);
+ else {
+ var s = new DataView(e, n, r * o),
+ l = yp[t.name],
+ u = !i;
+ a = new t(r);
+ for (var c = 0; c < r; c++) a[c] = s[l](c * o, u);
+ }
+ return a;
+ }
+ function xp(e) {
+ var t = new Uint8Array(e),
+ n = t[0],
+ r = t[1],
+ i = !!((r >> 7) & 1),
+ a = (r >> 6) & 1,
+ o = 1 === ((r >> 5) & 1),
+ s = 31 & r,
+ l = 0,
+ u = 0;
+ if (
+ (o
+ ? ((l = (t[2] << 16) + (t[3] << 8) + t[4]),
+ (u = (t[5] << 16) + (t[6] << 8) + t[7]))
+ : ((l = t[2] + (t[3] << 8) + (t[4] << 16)),
+ (u = t[5] + (t[6] << 8) + (t[7] << 16))),
+ 0 === n)
+ )
+ throw new Error("PRWM decoder: Invalid format version: 0");
+ if (1 !== n)
+ throw new Error("PRWM decoder: Unsupported format version: " + n);
+ if (!i) {
+ if (0 !== a)
+ throw new Error(
+ "PRWM decoder: Indices type must be set to 0 for non-indexed geometries"
+ );
+ if (0 !== u)
+ throw new Error(
+ "PRWM decoder: Number of indices must be set to 0 for non-indexed geometries"
+ );
+ }
+ for (var c = 8, f = {}, d = 0; d < s; d++) {
+ for (var h = ""; c < t.length; ) {
+ var p = t[c];
+ if ((c++, 0 === p)) break;
+ h += String.fromCharCode(p);
+ }
+ var v = ((r = t[c]) >> 7) & 1,
+ m = 1 + ((r >> 4) & 3),
+ g = Ap[15 & r];
+ c++;
+ var A = bp(e, g, (c = 4 * Math.ceil(c / 4)), m * l, o);
+ (c += g.BYTES_PER_ELEMENT * m * l),
+ (f[h] = { type: v, cardinality: m, values: A });
+ }
+ c = 4 * Math.ceil(c / 4);
+ var y = null;
+ return (
+ i && (y = bp(e, 1 === a ? Uint32Array : Uint16Array, c, u, o)),
+ { version: n, attributes: f, indices: y }
+ );
+ }
+ var Sp = null,
+ Ep;
+ function _p() {
+ if (Ep) return Ep;
+ ((Ep = {}).toRGBA8 = function (e) {
+ var t = e.width,
+ n = e.height;
+ if (null == e.tabs.acTL)
+ return [Ep.toRGBA8.decodeImage(e.data, t, n, e).buffer];
+ var r = [];
+ null == e.frames[0].data && (e.frames[0].data = e.data);
+ for (
+ var i = t * n * 4,
+ a = new Uint8Array(i),
+ o = new Uint8Array(i),
+ s = new Uint8Array(i),
+ l = 0;
+ l < e.frames.length;
+ l++
+ ) {
+ var u = e.frames[l],
+ c = u.rect.x,
+ f = u.rect.y,
+ d = u.rect.width,
+ h = u.rect.height,
+ p = Ep.toRGBA8.decodeImage(u.data, d, h, e);
+ if (0 != l) for (var v = 0; v < i; v++) s[v] = a[v];
+ if (
+ (0 == u.blend
+ ? Ep._copyTile(p, d, h, a, t, n, c, f, 0)
+ : 1 == u.blend && Ep._copyTile(p, d, h, a, t, n, c, f, 1),
+ r.push(a.buffer.slice(0)),
+ 1 == u.dispose)
+ )
+ Ep._copyTile(o, d, h, a, t, n, c, f, 0);
+ else if (2 == u.dispose) for (v = 0; v < i; v++) a[v] = s[v];
+ }
+ return r;
+ }),
+ (Ep.toRGBA8.decodeImage = function (e, t, n, r) {
+ var i = t * n,
+ a = Ep.decode._getBPP(r),
+ o = Math.ceil((t * a) / 8),
+ s = new Uint8Array(4 * i),
+ l = new Uint32Array(s.buffer),
+ u = r.ctype,
+ c = r.depth,
+ f = Ep._bin.readUshort;
+ if (6 == u) {
+ var d = i << 2;
+ if (8 == c)
+ for (var h = 0; h < d; h += 4)
+ (s[h] = e[h]),
+ (s[h + 1] = e[h + 1]),
+ (s[h + 2] = e[h + 2]),
+ (s[h + 3] = e[h + 3]);
+ if (16 == c) for (h = 0; h < d; h++) s[h] = e[h << 1];
+ } else if (2 == u) {
+ var p = r.tabs.tRNS;
+ if (null == p) {
+ if (8 == c)
+ for (h = 0; h < i; h++) {
+ var v = 3 * h;
+ l[h] =
+ (255 << 24) | (e[v + 2] << 16) | (e[v + 1] << 8) | e[v];
+ }
+ if (16 == c)
+ for (h = 0; h < i; h++) {
+ v = 6 * h;
+ l[h] =
+ (255 << 24) | (e[v + 4] << 16) | (e[v + 2] << 8) | e[v];
+ }
+ } else {
+ var m = p[0],
+ g = p[1],
+ A = p[2];
+ if (8 == c)
+ for (h = 0; h < i; h++) {
+ var y = h << 2;
+ v = 3 * h;
+ (l[h] =
+ (255 << 24) |
+ (e[v + 2] << 16) |
+ (e[v + 1] << 8) |
+ e[v]),
+ e[v] == m &&
+ e[v + 1] == g &&
+ e[v + 2] == A &&
+ (s[y + 3] = 0);
+ }
+ if (16 == c)
+ for (h = 0; h < i; h++) {
+ (y = h << 2), (v = 6 * h);
+ (l[h] =
+ (255 << 24) |
+ (e[v + 4] << 16) |
+ (e[v + 2] << 8) |
+ e[v]),
+ f(e, v) == m &&
+ f(e, v + 2) == g &&
+ f(e, v + 4) == A &&
+ (s[y + 3] = 0);
+ }
+ }
+ } else if (3 == u) {
+ var b = r.tabs.PLTE,
+ x = r.tabs.tRNS,
+ S = x ? x.length : 0;
+ if (1 == c)
+ for (var E = 0; E < n; E++) {
+ var _ = E * o,
+ C = E * t;
+ for (h = 0; h < t; h++) {
+ y = (C + h) << 2;
+ var w =
+ 3 * (T = (e[_ + (h >> 3)] >> (7 - ((7 & h) << 0))) & 1);
+ (s[y] = b[w]),
+ (s[y + 1] = b[w + 1]),
+ (s[y + 2] = b[w + 2]),
+ (s[y + 3] = T < S ? x[T] : 255);
+ }
+ }
+ if (2 == c)
+ for (E = 0; E < n; E++)
+ for (_ = E * o, C = E * t, h = 0; h < t; h++) {
+ (y = (C + h) << 2),
+ (w =
+ 3 *
+ (T = (e[_ + (h >> 2)] >> (6 - ((3 & h) << 1))) & 3));
+ (s[y] = b[w]),
+ (s[y + 1] = b[w + 1]),
+ (s[y + 2] = b[w + 2]),
+ (s[y + 3] = T < S ? x[T] : 255);
+ }
+ if (4 == c)
+ for (E = 0; E < n; E++)
+ for (_ = E * o, C = E * t, h = 0; h < t; h++) {
+ (y = (C + h) << 2),
+ (w =
+ 3 *
+ (T = (e[_ + (h >> 1)] >> (4 - ((1 & h) << 2))) & 15));
+ (s[y] = b[w]),
+ (s[y + 1] = b[w + 1]),
+ (s[y + 2] = b[w + 2]),
+ (s[y + 3] = T < S ? x[T] : 255);
+ }
+ if (8 == c)
+ for (h = 0; h < i; h++) {
+ var T;
+ (y = h << 2), (w = 3 * (T = e[h]));
+ (s[y] = b[w]),
+ (s[y + 1] = b[w + 1]),
+ (s[y + 2] = b[w + 2]),
+ (s[y + 3] = T < S ? x[T] : 255);
+ }
+ } else if (4 == u) {
+ if (8 == c)
+ for (h = 0; h < i; h++) {
+ y = h << 2;
+ var M = e[(I = h << 1)];
+ (s[y] = M),
+ (s[y + 1] = M),
+ (s[y + 2] = M),
+ (s[y + 3] = e[I + 1]);
+ }
+ if (16 == c)
+ for (h = 0; h < i; h++) {
+ var I;
+ (y = h << 2), (M = e[(I = h << 2)]);
+ (s[y] = M),
+ (s[y + 1] = M),
+ (s[y + 2] = M),
+ (s[y + 3] = e[I + 2]);
+ }
+ } else if (0 == u)
+ for (m = r.tabs.tRNS ? r.tabs.tRNS : -1, E = 0; E < n; E++) {
+ var k = E * o,
+ R = E * t;
+ if (1 == c)
+ for (var B = 0; B < t; B++) {
+ var P =
+ (M =
+ 255 * ((e[k + (B >>> 3)] >>> (7 - (7 & B))) & 1)) ==
+ 255 * m
+ ? 0
+ : 255;
+ l[R + B] = (P << 24) | (M << 16) | (M << 8) | M;
+ }
+ else if (2 == c)
+ for (B = 0; B < t; B++) {
+ P =
+ (M =
+ 85 *
+ ((e[k + (B >>> 2)] >>> (6 - ((3 & B) << 1))) & 3)) ==
+ 85 * m
+ ? 0
+ : 255;
+ l[R + B] = (P << 24) | (M << 16) | (M << 8) | M;
+ }
+ else if (4 == c)
+ for (B = 0; B < t; B++) {
+ P =
+ (M =
+ 17 *
+ ((e[k + (B >>> 1)] >>> (4 - ((1 & B) << 2))) & 15)) ==
+ 17 * m
+ ? 0
+ : 255;
+ l[R + B] = (P << 24) | (M << 16) | (M << 8) | M;
+ }
+ else if (8 == c)
+ for (B = 0; B < t; B++) {
+ P = (M = e[k + B]) == m ? 0 : 255;
+ l[R + B] = (P << 24) | (M << 16) | (M << 8) | M;
+ }
+ else if (16 == c)
+ for (B = 0; B < t; B++) {
+ (M = e[k + (B << 1)]),
+ (P = f(e, k + (B << 1)) == m ? 0 : 255);
+ l[R + B] = (P << 24) | (M << 16) | (M << 8) | M;
+ }
+ }
+ return s;
+ }),
+ (Ep.decode = function (e) {
+ for (
+ var t,
+ n,
+ r,
+ i,
+ a = new Uint8Array(e),
+ o = 8,
+ s = Ep._bin,
+ l = s.readUshort,
+ u = s.readUint,
+ c = { tabs: {}, frames: [] },
+ f = new Uint8Array(a.length),
+ d = 0,
+ h = 0,
+ p = [137, 80, 78, 71, 13, 10, 26, 10],
+ v = 0;
+ v < 8;
+ v++
+ )
+ if (a[v] != p[v])
+ throw new Error("The input is not a PNG file!");
+ for (; o < a.length; ) {
+ var m = s.readUint(a, o);
+ o += 4;
+ var g = s.readASCII(a, o, 4);
+ if (((o += 4), "IHDR" == g)) Ep.decode._IHDR(a, o, c);
+ else if ("CgBI" == g) c.tabs[g] = a.slice(o, o + 4);
+ else if ("IDAT" == g) {
+ for (v = 0; v < m; v++) f[d + v] = a[o + v];
+ d += m;
+ } else if ("acTL" == g)
+ (c.tabs[g] = { num_frames: u(a, o), num_plays: u(a, o + 4) }),
+ (t = new Uint8Array(a.length));
+ else if ("fcTL" == g) {
+ var A;
+ if (0 != h)
+ ((A = c.frames[c.frames.length - 1]).data =
+ Ep.decode._decompress(
+ c,
+ t.slice(0, h),
+ A.rect.width,
+ A.rect.height
+ )),
+ (h = 0);
+ var y = {
+ x: u(a, o + 12),
+ y: u(a, o + 16),
+ width: u(a, o + 4),
+ height: u(a, o + 8),
+ },
+ b = l(a, o + 22);
+ b = l(a, o + 20) / (0 == b ? 100 : b);
+ var x = {
+ rect: y,
+ delay: Math.round(1e3 * b),
+ dispose: a[o + 24],
+ blend: a[o + 25],
+ };
+ c.frames.push(x);
+ } else if ("fdAT" == g) {
+ for (v = 0; v < m - 4; v++) t[h + v] = a[o + v + 4];
+ h += m - 4;
+ } else if ("pHYs" == g)
+ c.tabs[g] = [
+ s.readUint(a, o),
+ s.readUint(a, o + 4),
+ a[o + 8],
+ ];
+ else if ("cHRM" == g) {
+ c.tabs[g] = [];
+ for (v = 0; v < 8; v++)
+ c.tabs[g].push(s.readUint(a, o + 4 * v));
+ } else if ("tEXt" == g || "zTXt" == g) {
+ null == c.tabs[g] && (c.tabs[g] = {});
+ var S = s.nextZero(a, o);
+ r = s.readASCII(a, o, S - o);
+ var E = o + m - S - 1;
+ "tEXt" == g
+ ? (n = s.readASCII(a, S + 1, E))
+ : ((i = Ep.decode._inflate(a.slice(S + 2, S + 2 + E))),
+ (n = s.readUTF8(i, 0, i.length))),
+ (c.tabs[g][r] = n);
+ } else if ("iTXt" == g) {
+ null == c.tabs[g] && (c.tabs[g] = {});
+ S = 0;
+ var _ = o;
+ (S = s.nextZero(a, _)), (r = s.readASCII(a, _, S - _));
+ var C = a[(_ = S + 1)];
+ (_ += 2),
+ (S = s.nextZero(a, _)),
+ s.readASCII(a, _, S - _),
+ (_ = S + 1),
+ (S = s.nextZero(a, _)),
+ s.readUTF8(a, _, S - _);
+ E = m - ((_ = S + 1) - o);
+ 0 == C
+ ? (n = s.readUTF8(a, _, E))
+ : ((i = Ep.decode._inflate(a.slice(_, _ + E))),
+ (n = s.readUTF8(i, 0, i.length))),
+ (c.tabs[g][r] = n);
+ } else if ("PLTE" == g) c.tabs[g] = s.readBytes(a, o, m);
+ else if ("hIST" == g) {
+ var w = c.tabs.PLTE.length / 3;
+ c.tabs[g] = [];
+ for (v = 0; v < w; v++) c.tabs[g].push(l(a, o + 2 * v));
+ } else if ("tRNS" == g)
+ 3 == c.ctype
+ ? (c.tabs[g] = s.readBytes(a, o, m))
+ : 0 == c.ctype
+ ? (c.tabs[g] = l(a, o))
+ : 2 == c.ctype &&
+ (c.tabs[g] = [l(a, o), l(a, o + 2), l(a, o + 4)]);
+ else if ("gAMA" == g) c.tabs[g] = s.readUint(a, o) / 1e5;
+ else if ("sRGB" == g) c.tabs[g] = a[o];
+ else if ("bKGD" == g)
+ 0 == c.ctype || 4 == c.ctype
+ ? (c.tabs[g] = [l(a, o)])
+ : 2 == c.ctype || 6 == c.ctype
+ ? (c.tabs[g] = [l(a, o), l(a, o + 2), l(a, o + 4)])
+ : 3 == c.ctype && (c.tabs[g] = a[o]);
+ else if ("IEND" == g) break;
+ (o += m), s.readUint(a, o), (o += 4);
+ }
+ 0 != h &&
+ ((A = c.frames[c.frames.length - 1]).data =
+ Ep.decode._decompress(
+ c,
+ t.slice(0, h),
+ A.rect.width,
+ A.rect.height
+ ));
+ return (
+ (c.data = Ep.decode._decompress(c, f, c.width, c.height)),
+ delete c.compress,
+ delete c.interlace,
+ delete c.filter,
+ c
+ );
+ }),
+ (Ep.decode._decompress = function (e, t, n, r) {
+ var i = Ep.decode._getBPP(e),
+ a = Math.ceil((n * i) / 8),
+ o = new Uint8Array((a + 1 + e.interlace) * r);
+ return (
+ (t = e.tabs.CgBI
+ ? Ep.inflateRaw(t, o)
+ : Ep.decode._inflate(t, o)),
+ 0 == e.interlace
+ ? (t = Ep.decode._filterZero(t, e, 0, n, r))
+ : 1 == e.interlace && (t = Ep.decode._readInterlace(t, e)),
+ t
+ );
+ }),
+ (Ep.decode._inflate = function (e, t) {
+ return Ep.inflateRaw(
+ new Uint8Array(e.buffer, 2, e.length - 6),
+ t
+ );
+ }),
+ (Ep.inflateRaw = (function () {
+ var e = { H: {} };
+ return (
+ (e.H.N = function (t, n) {
+ var r,
+ i,
+ a = Uint8Array,
+ o = 0,
+ s = 0,
+ l = 0,
+ u = 0,
+ c = 0,
+ f = 0,
+ d = 0,
+ h = 0,
+ p = 0;
+ if (3 == t[0] && 0 == t[1]) return n || new a(0);
+ var v = e.H,
+ m = v.b,
+ g = v.e,
+ A = v.R,
+ y = v.n,
+ b = v.A,
+ x = v.Z,
+ S = v.m,
+ E = null == n;
+ for (E && (n = new a((t.length >>> 2) << 5)); 0 == o; )
+ if (
+ ((o = m(t, p, 1)), (s = m(t, p + 1, 2)), (p += 3), 0 != s)
+ ) {
+ if (
+ (E && (n = e.H.W(n, h + (1 << 17))),
+ 1 == s && ((r = S.J), (i = S.h), (f = 511), (d = 31)),
+ 2 == s)
+ ) {
+ (l = g(t, p, 5) + 257),
+ (u = g(t, p + 5, 5) + 1),
+ (c = g(t, p + 10, 4) + 4),
+ (p += 14);
+ for (var _ = 1, C = 0; C < 38; C += 2)
+ (S.Q[C] = 0), (S.Q[C + 1] = 0);
+ for (C = 0; C < c; C++) {
+ var w = g(t, p + 3 * C, 3);
+ (S.Q[1 + (S.X[C] << 1)] = w), w > _ && (_ = w);
+ }
+ (p += 3 * c),
+ y(S.Q, _),
+ b(S.Q, _, S.u),
+ (r = S.w),
+ (i = S.d),
+ (p = A(S.u, (1 << _) - 1, l + u, t, p, S.v));
+ var T = v.V(S.v, 0, l, S.C);
+ f = (1 << T) - 1;
+ var M = v.V(S.v, l, u, S.D);
+ (d = (1 << M) - 1),
+ y(S.C, T),
+ b(S.C, T, r),
+ y(S.D, M),
+ b(S.D, M, i);
+ }
+ for (;;) {
+ var I = r[x(t, p) & f];
+ p += 15 & I;
+ var k = I >>> 4;
+ if (k >>> 8 == 0) n[h++] = k;
+ else {
+ if (256 == k) break;
+ var R = h + k - 254;
+ if (k > 264) {
+ var B = S.q[k - 257];
+ (R = h + (B >>> 3) + g(t, p, 7 & B)), (p += 7 & B);
+ }
+ var P = i[x(t, p) & d];
+ p += 15 & P;
+ var L = P >>> 4,
+ D = S.c[L],
+ U = (D >>> 4) + m(t, p, 15 & D);
+ for (p += 15 & D; h < R; )
+ (n[h] = n[h++ - U]),
+ (n[h] = n[h++ - U]),
+ (n[h] = n[h++ - U]),
+ (n[h] = n[h++ - U]);
+ h = R;
+ }
+ }
+ } else {
+ 0 != (7 & p) && (p += 8 - (7 & p));
+ var F = 4 + (p >>> 3),
+ O = t[F - 4] | (t[F - 3] << 8);
+ E && (n = e.H.W(n, h + O)),
+ n.set(new a(t.buffer, t.byteOffset + F, O), h),
+ (p = (F + O) << 3),
+ (h += O);
+ }
+ return n.length == h ? n : n.slice(0, h);
+ }),
+ (e.H.W = function (e, t) {
+ var n = e.length;
+ if (t <= n) return e;
+ var r = new Uint8Array(n << 1);
+ return r.set(e, 0), r;
+ }),
+ (e.H.R = function (t, n, r, i, a, o) {
+ for (var s = e.H.e, l = e.H.Z, u = 0; u < r; ) {
+ var c = t[l(i, a) & n];
+ a += 15 & c;
+ var f = c >>> 4;
+ if (f <= 15) (o[u] = f), u++;
+ else {
+ var d = 0,
+ h = 0;
+ 16 == f
+ ? ((h = 3 + s(i, a, 2)), (a += 2), (d = o[u - 1]))
+ : 17 == f
+ ? ((h = 3 + s(i, a, 3)), (a += 3))
+ : 18 == f && ((h = 11 + s(i, a, 7)), (a += 7));
+ for (var p = u + h; u < p; ) (o[u] = d), u++;
+ }
+ }
+ return a;
+ }),
+ (e.H.V = function (e, t, n, r) {
+ for (var i = 0, a = 0, o = r.length >>> 1; a < n; ) {
+ var s = e[a + t];
+ (r[a << 1] = 0),
+ (r[1 + (a << 1)] = s),
+ s > i && (i = s),
+ a++;
+ }
+ for (; a < o; ) (r[a << 1] = 0), (r[1 + (a << 1)] = 0), a++;
+ return i;
+ }),
+ (e.H.n = function (t, n) {
+ for (
+ var r, i, a, o, s = e.H.m, l = t.length, u = s.j, c = 0;
+ c <= n;
+ c++
+ )
+ u[c] = 0;
+ for (c = 1; c < l; c += 2) u[t[c]]++;
+ var f = s.K;
+ for (r = 0, u[0] = 0, i = 1; i <= n; i++)
+ (r = (r + u[i - 1]) << 1), (f[i] = r);
+ for (a = 0; a < l; a += 2)
+ 0 != (o = t[a + 1]) && ((t[a] = f[o]), f[o]++);
+ }),
+ (e.H.A = function (t, n, r) {
+ for (var i = t.length, a = e.H.m.r, o = 0; o < i; o += 2)
+ if (0 != t[o + 1])
+ for (
+ var s = o >> 1,
+ l = t[o + 1],
+ u = (s << 4) | l,
+ c = n - l,
+ f = t[o] << c,
+ d = f + (1 << c);
+ f != d;
+
+ ) {
+ (r[a[f] >>> (15 - n)] = u), f++;
+ }
+ }),
+ (e.H.l = function (t, n) {
+ for (
+ var r = e.H.m.r, i = 15 - n, a = 0;
+ a < t.length;
+ a += 2
+ ) {
+ var o = t[a] << (n - t[a + 1]);
+ t[a] = r[o] >>> i;
+ }
+ }),
+ (e.H.M = function (e, t, n) {
+ n <<= 7 & t;
+ var r = t >>> 3;
+ (e[r] |= n), (e[r + 1] |= n >>> 8);
+ }),
+ (e.H.I = function (e, t, n) {
+ n <<= 7 & t;
+ var r = t >>> 3;
+ (e[r] |= n), (e[r + 1] |= n >>> 8), (e[r + 2] |= n >>> 16);
+ }),
+ (e.H.e = function (e, t, n) {
+ return (
+ ((e[t >>> 3] | (e[1 + (t >>> 3)] << 8)) >>> (7 & t)) &
+ ((1 << n) - 1)
+ );
+ }),
+ (e.H.b = function (e, t, n) {
+ return (
+ ((e[t >>> 3] |
+ (e[1 + (t >>> 3)] << 8) |
+ (e[2 + (t >>> 3)] << 16)) >>>
+ (7 & t)) &
+ ((1 << n) - 1)
+ );
+ }),
+ (e.H.Z = function (e, t) {
+ return (
+ (e[t >>> 3] |
+ (e[1 + (t >>> 3)] << 8) |
+ (e[2 + (t >>> 3)] << 16)) >>>
+ (7 & t)
+ );
+ }),
+ (e.H.i = function (e, t) {
+ return (
+ (e[t >>> 3] |
+ (e[1 + (t >>> 3)] << 8) |
+ (e[2 + (t >>> 3)] << 16) |
+ (e[3 + (t >>> 3)] << 24)) >>>
+ (7 & t)
+ );
+ }),
+ (e.H.m = (function () {
+ var e = Uint16Array,
+ t = Uint32Array;
+ return {
+ K: new e(16),
+ j: new e(16),
+ X: [
+ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14,
+ 1, 15,
+ ],
+ S: [
+ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258,
+ 999, 999, 999,
+ ],
+ T: [
+ 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3,
+ 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 0,
+ ],
+ q: new e(32),
+ p: [
+ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+ 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+ 8193, 12289, 16385, 24577, 65535, 65535,
+ ],
+ z: [
+ 0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
+ 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 0, 0,
+ ],
+ c: new t(32),
+ J: new e(512),
+ _: [],
+ h: new e(32),
+ $: [],
+ w: new e(32768),
+ C: [],
+ v: [],
+ d: new e(32768),
+ D: [],
+ u: new e(512),
+ Q: [],
+ r: new e(32768),
+ s: new t(286),
+ Y: new t(30),
+ a: new t(19),
+ t: new t(15e3),
+ k: new e(65536),
+ g: new e(32768),
+ };
+ })()),
+ (function () {
+ for (var t = e.H.m, n = 0; n < 32768; n++) {
+ var r = n;
+ (r =
+ ((4278255360 &
+ (r =
+ ((4042322160 &
+ (r =
+ ((3435973836 &
+ (r =
+ ((2863311530 & r) >>> 1) |
+ ((1431655765 & r) << 1))) >>>
+ 2) |
+ ((858993459 & r) << 2))) >>>
+ 4) |
+ ((252645135 & r) << 4))) >>>
+ 8) |
+ ((16711935 & r) << 8)),
+ (t.r[n] = ((r >>> 16) | (r << 16)) >>> 17);
+ }
+ function i(e, t, n) {
+ for (; 0 != t--; ) e.push(0, n);
+ }
+ for (n = 0; n < 32; n++)
+ (t.q[n] = (t.S[n] << 3) | t.T[n]),
+ (t.c[n] = (t.p[n] << 4) | t.z[n]);
+ i(t._, 144, 8),
+ i(t._, 112, 9),
+ i(t._, 24, 7),
+ i(t._, 8, 8),
+ e.H.n(t._, 9),
+ e.H.A(t._, 9, t.J),
+ e.H.l(t._, 9),
+ i(t.$, 32, 5),
+ e.H.n(t.$, 5),
+ e.H.A(t.$, 5, t.h),
+ e.H.l(t.$, 5),
+ i(t.Q, 19, 0),
+ i(t.C, 286, 0),
+ i(t.D, 30, 0),
+ i(t.v, 320, 0);
+ })(),
+ e.H.N
+ );
+ })()),
+ (Ep.decode._readInterlace = function (e, t) {
+ for (
+ var n = t.width,
+ r = t.height,
+ i = Ep.decode._getBPP(t),
+ a = i >> 3,
+ o = Math.ceil((n * i) / 8),
+ s = new Uint8Array(r * o),
+ l = 0,
+ u = [0, 0, 4, 0, 2, 0, 1],
+ c = [0, 4, 0, 2, 0, 1, 0],
+ f = [8, 8, 8, 4, 4, 2, 2],
+ d = [8, 8, 4, 4, 2, 2, 1],
+ h = 0;
+ h < 7;
+
+ ) {
+ for (var p = f[h], v = d[h], m = 0, g = 0, A = u[h]; A < r; )
+ (A += p), g++;
+ for (var y = c[h]; y < n; ) (y += v), m++;
+ var b = Math.ceil((m * i) / 8);
+ Ep.decode._filterZero(e, t, l, m, g);
+ for (var x, S = 0, E = u[h]; E < r; ) {
+ for (var _ = c[h], C = (l + S * b) << 3; _ < n; ) {
+ if (
+ (1 == i &&
+ ((x = ((x = e[C >> 3]) >> (7 - (7 & C))) & 1),
+ (s[E * o + (_ >> 3)] |= x << (7 - ((7 & _) << 0)))),
+ 2 == i &&
+ ((x = ((x = e[C >> 3]) >> (6 - (7 & C))) & 3),
+ (s[E * o + (_ >> 2)] |= x << (6 - ((3 & _) << 1)))),
+ 4 == i &&
+ ((x = ((x = e[C >> 3]) >> (4 - (7 & C))) & 15),
+ (s[E * o + (_ >> 1)] |= x << (4 - ((1 & _) << 2)))),
+ i >= 8)
+ )
+ for (var w = E * o + _ * a, T = 0; T < a; T++)
+ s[w + T] = e[(C >> 3) + T];
+ (C += i), (_ += v);
+ }
+ S++, (E += p);
+ }
+ m * g != 0 && (l += g * (1 + b)), (h += 1);
+ }
+ return s;
+ }),
+ (Ep.decode._getBPP = function (e) {
+ return [1, null, 3, 1, 2, null, 4][e.ctype] * e.depth;
+ }),
+ (Ep.decode._filterZero = function (e, t, n, r, i) {
+ var a = Ep.decode._getBPP(t),
+ o = Math.ceil((r * a) / 8),
+ s = Ep.decode._paeth;
+ a = Math.ceil(a / 8);
+ var l,
+ u,
+ c = e[n],
+ f = 0;
+ if ((c > 1 && (e[n] = [0, 0, 1][c - 2]), 3 == c))
+ for (f = a; f < o; f++)
+ e[f + 1] = (e[f + 1] + (e[f + 1 - a] >>> 1)) & 255;
+ for (var d = 0; d < i; d++)
+ if (((f = 0), 0 == (c = e[(u = (l = n + d * o) + d + 1) - 1])))
+ for (; f < o; f++) e[l + f] = e[u + f];
+ else if (1 == c) {
+ for (; f < a; f++) e[l + f] = e[u + f];
+ for (; f < o; f++) e[l + f] = e[u + f] + e[l + f - a];
+ } else if (2 == c)
+ for (; f < o; f++) e[l + f] = e[u + f] + e[l + f - o];
+ else if (3 == c) {
+ for (; f < a; f++) e[l + f] = e[u + f] + (e[l + f - o] >>> 1);
+ for (; f < o; f++)
+ e[l + f] = e[u + f] + ((e[l + f - o] + e[l + f - a]) >>> 1);
+ } else {
+ for (; f < a; f++)
+ e[l + f] = e[u + f] + s(0, e[l + f - o], 0);
+ for (; f < o; f++)
+ e[l + f] =
+ e[u + f] +
+ s(e[l + f - a], e[l + f - o], e[l + f - a - o]);
+ }
+ return e;
+ }),
+ (Ep.decode._paeth = function (e, t, n) {
+ var r = e + t - n,
+ i = r - e,
+ a = r - t,
+ o = r - n;
+ return i * i <= a * a && i * i <= o * o
+ ? e
+ : a * a <= o * o
+ ? t
+ : n;
+ }),
+ (Ep.decode._IHDR = function (e, t, n) {
+ var r = Ep._bin;
+ (n.width = r.readUint(e, t)),
+ (t += 4),
+ (n.height = r.readUint(e, t)),
+ (t += 4),
+ (n.depth = e[t]),
+ t++,
+ (n.ctype = e[t]),
+ t++,
+ (n.compress = e[t]),
+ t++,
+ (n.filter = e[t]),
+ t++,
+ (n.interlace = e[t]),
+ t++;
+ }),
+ (Ep._bin = {
+ nextZero: function (e, t) {
+ for (; 0 != e[t]; ) t++;
+ return t;
+ },
+ readUshort: function (e, t) {
+ return (e[t] << 8) | e[t + 1];
+ },
+ writeUshort: function (e, t, n) {
+ (e[t] = (n >> 8) & 255), (e[t + 1] = 255 & n);
+ },
+ readUint: function (e, t) {
+ return (
+ 16777216 * e[t] +
+ ((e[t + 1] << 16) | (e[t + 2] << 8) | e[t + 3])
+ );
+ },
+ writeUint: function (e, t, n) {
+ (e[t] = (n >> 24) & 255),
+ (e[t + 1] = (n >> 16) & 255),
+ (e[t + 2] = (n >> 8) & 255),
+ (e[t + 3] = 255 & n);
+ },
+ readASCII: function (e, t, n) {
+ for (var r = "", i = 0; i < n; i++)
+ r += String.fromCharCode(e[t + i]);
+ return r;
+ },
+ writeASCII: function (e, t, n) {
+ for (var r = 0; r < n.length; r++) e[t + r] = n.charCodeAt(r);
+ },
+ readBytes: function (e, t, n) {
+ for (var r = [], i = 0; i < n; i++) r.push(e[t + i]);
+ return r;
+ },
+ pad: function (e) {
+ return e.length < 2 ? "0" + e : e;
+ },
+ readUTF8: function (e, t, n) {
+ for (var r, i = "", a = 0; a < n; a++)
+ i += "%" + Ep._bin.pad(e[t + a].toString(16));
+ try {
+ r = decodeURIComponent(i);
+ } catch (o) {
+ return Ep._bin.readASCII(e, t, n);
+ }
+ return r;
+ },
+ }),
+ (Ep._copyTile = function (e, t, n, r, i, a, o, s, l) {
+ for (
+ var u = Math.min(t, i), c = Math.min(n, a), f = 0, d = 0, h = 0;
+ h < c;
+ h++
+ )
+ for (var p = 0; p < u; p++)
+ if (
+ (o >= 0 && s >= 0
+ ? ((f = (h * t + p) << 2),
+ (d = ((s + h) * i + o + p) << 2))
+ : ((f = ((-s + h) * t - o + p) << 2),
+ (d = (h * i + p) << 2)),
+ 0 == l)
+ )
+ (r[d] = e[f]),
+ (r[d + 1] = e[f + 1]),
+ (r[d + 2] = e[f + 2]),
+ (r[d + 3] = e[f + 3]);
+ else if (1 == l) {
+ var v = e[f + 3] * (1 / 255),
+ m = e[f] * v,
+ g = e[f + 1] * v,
+ A = e[f + 2] * v,
+ y = r[d + 3] * (1 / 255),
+ b = r[d] * y,
+ x = r[d + 1] * y,
+ S = r[d + 2] * y,
+ E = 1 - v,
+ _ = v + y * E,
+ C = 0 == _ ? 0 : 1 / _;
+ (r[d + 3] = 255 * _),
+ (r[d + 0] = (m + b * E) * C),
+ (r[d + 1] = (g + x * E) * C),
+ (r[d + 2] = (A + S * E) * C);
+ } else if (2 == l) {
+ (v = e[f + 3]),
+ (m = e[f]),
+ (g = e[f + 1]),
+ (A = e[f + 2]),
+ (y = r[d + 3]),
+ (b = r[d]),
+ (x = r[d + 1]),
+ (S = r[d + 2]);
+ v == y && m == b && g == x && A == S
+ ? ((r[d] = 0),
+ (r[d + 1] = 0),
+ (r[d + 2] = 0),
+ (r[d + 3] = 0))
+ : ((r[d] = m),
+ (r[d + 1] = g),
+ (r[d + 2] = A),
+ (r[d + 3] = v));
+ } else if (3 == l) {
+ (v = e[f + 3]),
+ (m = e[f]),
+ (g = e[f + 1]),
+ (A = e[f + 2]),
+ (y = r[d + 3]),
+ (b = r[d]),
+ (x = r[d + 1]),
+ (S = r[d + 2]);
+ if (v == y && m == b && g == x && A == S) continue;
+ if (v < 220 && y > 20) return !1;
+ }
+ return !0;
+ });
+ }
+ var Cp = null,
+ wp = null,
+ Tp = null,
+ Mp = null,
+ Ip = null,
+ kp = null,
+ Rp = null,
+ Bp = null,
+ Pp = null,
+ Lp = null,
+ Dp;
+ function Up(e) {
+ return e % 2;
+ }
+ function Fp(e) {
+ return e.length + 1 + (Up(e.length + 1) ? 1 : 0);
+ }
+ function Op(e, t, n) {
+ console.log(new TextDecoder().decode(new Uint8Array(e, t, n)));
+ }
+ var Np = null,
+ Gp = null,
+ Zp = null,
+ zp = null;
+ function Qp(e, t) {
+ var n = e.indexOf(t);
+ return -1 === n ? "./" : e.substr(0, n);
+ }
+ var Hp = null,
+ Vp = new A.Box3(),
+ jp = new A.Vector3(),
+ Wp = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ (0, p.Z)(this, n),
+ ((e = t.call(this)).isLineSegmentsGeometry = !0),
+ (e.type = "LineSegmentsGeometry");
+ return (
+ e.setIndex([
+ 0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5,
+ ]),
+ e.setAttribute(
+ "position",
+ new A.Float32BufferAttribute(
+ [
+ -1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0,
+ -1, -1, 0, 1, -1, 0,
+ ],
+ 3
+ )
+ ),
+ e.setAttribute(
+ "uv",
+ new A.Float32BufferAttribute(
+ [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2],
+ 2
+ )
+ ),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ var t = this.attributes.instanceStart,
+ n = this.attributes.instanceEnd;
+ return (
+ void 0 !== t &&
+ (t.applyMatrix4(e),
+ n.applyMatrix4(e),
+ (t.needsUpdate = !0)),
+ null !== this.boundingBox && this.computeBoundingBox(),
+ null !== this.boundingSphere &&
+ this.computeBoundingSphere(),
+ this
+ );
+ },
+ },
+ {
+ key: "setPositions",
+ value: function (e) {
+ var t;
+ e instanceof Float32Array
+ ? (t = e)
+ : Array.isArray(e) && (t = new Float32Array(e));
+ var n = new A.InstancedInterleavedBuffer(t, 6, 1);
+ return (
+ this.setAttribute(
+ "instanceStart",
+ new A.InterleavedBufferAttribute(n, 3, 0)
+ ),
+ this.setAttribute(
+ "instanceEnd",
+ new A.InterleavedBufferAttribute(n, 3, 3)
+ ),
+ this.computeBoundingBox(),
+ this.computeBoundingSphere(),
+ this
+ );
+ },
+ },
+ {
+ key: "setColors",
+ value: function (e) {
+ var t;
+ e instanceof Float32Array
+ ? (t = e)
+ : Array.isArray(e) && (t = new Float32Array(e));
+ var n = new A.InstancedInterleavedBuffer(t, 6, 1);
+ return (
+ this.setAttribute(
+ "instanceColorStart",
+ new A.InterleavedBufferAttribute(n, 3, 0)
+ ),
+ this.setAttribute(
+ "instanceColorEnd",
+ new A.InterleavedBufferAttribute(n, 3, 3)
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "fromWireframeGeometry",
+ value: function (e) {
+ return this.setPositions(e.attributes.position.array), this;
+ },
+ },
+ {
+ key: "fromEdgesGeometry",
+ value: function (e) {
+ return this.setPositions(e.attributes.position.array), this;
+ },
+ },
+ {
+ key: "fromMesh",
+ value: function (e) {
+ return (
+ this.fromWireframeGeometry(
+ new A.WireframeGeometry(e.geometry)
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "fromLineSegments",
+ value: function (e) {
+ var t = e.geometry;
+ return this.setPositions(t.attributes.position.array), this;
+ },
+ },
+ {
+ key: "computeBoundingBox",
+ value: function () {
+ null === this.boundingBox &&
+ (this.boundingBox = new A.Box3());
+ var e = this.attributes.instanceStart,
+ t = this.attributes.instanceEnd;
+ void 0 !== e &&
+ void 0 !== t &&
+ (this.boundingBox.setFromBufferAttribute(e),
+ Vp.setFromBufferAttribute(t),
+ this.boundingBox.union(Vp));
+ },
+ },
+ {
+ key: "computeBoundingSphere",
+ value: function () {
+ null === this.boundingSphere &&
+ (this.boundingSphere = new A.Sphere()),
+ null === this.boundingBox && this.computeBoundingBox();
+ var e = this.attributes.instanceStart,
+ t = this.attributes.instanceEnd;
+ if (void 0 !== e && void 0 !== t) {
+ var n = this.boundingSphere.center;
+ this.boundingBox.getCenter(n);
+ for (var r = 0, i = 0, a = e.count; i < a; i++)
+ jp.fromBufferAttribute(e, i),
+ (r = Math.max(r, n.distanceToSquared(jp))),
+ jp.fromBufferAttribute(t, i),
+ (r = Math.max(r, n.distanceToSquared(jp)));
+ (this.boundingSphere.radius = Math.sqrt(r)),
+ isNaN(this.boundingSphere.radius) &&
+ console.error(
+ "THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",
+ this
+ );
+ }
+ },
+ },
+ { key: "toJSON", value: function () {} },
+ {
+ key: "applyMatrix",
+ value: function (e) {
+ return (
+ console.warn(
+ "THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."
+ ),
+ this.applyMatrix4(e)
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(A.InstancedBufferGeometry),
+ Xp = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.call(this)).isLineGeometry = !0),
+ (e.type = "LineGeometry"),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "setPositions",
+ value: function (e) {
+ for (
+ var t = e.length - 3, r = new Float32Array(2 * t), i = 0;
+ i < t;
+ i += 3
+ )
+ (r[2 * i] = e[i]),
+ (r[2 * i + 1] = e[i + 1]),
+ (r[2 * i + 2] = e[i + 2]),
+ (r[2 * i + 3] = e[i + 3]),
+ (r[2 * i + 4] = e[i + 4]),
+ (r[2 * i + 5] = e[i + 5]);
+ return (
+ (0, d.Z)(
+ (0, h.Z)(n.prototype),
+ "setPositions",
+ this
+ ).call(this, r),
+ this
+ );
+ },
+ },
+ {
+ key: "setColors",
+ value: function (e) {
+ for (
+ var t = e.length - 3, r = new Float32Array(2 * t), i = 0;
+ i < t;
+ i += 3
+ )
+ (r[2 * i] = e[i]),
+ (r[2 * i + 1] = e[i + 1]),
+ (r[2 * i + 2] = e[i + 2]),
+ (r[2 * i + 3] = e[i + 3]),
+ (r[2 * i + 4] = e[i + 4]),
+ (r[2 * i + 5] = e[i + 5]);
+ return (
+ (0, d.Z)((0, h.Z)(n.prototype), "setColors", this).call(
+ this,
+ r
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "fromLine",
+ value: function (e) {
+ var t = e.geometry;
+ return this.setPositions(t.attributes.position.array), this;
+ },
+ },
+ ]),
+ n
+ );
+ })(Wp),
+ Yp = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, p.Z)(this, n),
+ ((r = t.call(this, {
+ type: "LineMaterial",
+ uniforms: A.UniformsUtils.clone(
+ A.UniformsUtils.merge([
+ A.UniformsLib.common,
+ A.UniformsLib.fog,
+ {
+ worldUnits: { value: 1 },
+ linewidth: { value: 1 },
+ resolution: { value: new A.Vector2(1, 1) },
+ dashOffset: { value: 0 },
+ dashScale: { value: 1 },
+ dashSize: { value: 1 },
+ gapSize: { value: 1 },
+ },
+ ])
+ ),
+ vertexShader:
+ "\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tuniform float linewidth;\n\t\t\t\tuniform vec2 resolution;\n\n\t\t\t\tattribute vec3 instanceStart;\n\t\t\t\tattribute vec3 instanceEnd;\n\n\t\t\t\tattribute vec3 instanceColorStart;\n\t\t\t\tattribute vec3 instanceColorEnd;\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashScale;\n\t\t\t\t\tattribute float instanceDistanceStart;\n\t\t\t\t\tattribute float instanceDistanceEnd;\n\t\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#endif\n\n\t\t\t\tvoid trimSegment( const in vec4 start, inout vec4 end ) {\n\n\t\t\t\t\t// trim end segment so it terminates between the camera plane and the near plane\n\n\t\t\t\t\t// conservative estimate of the near plane\n\t\t\t\t\tfloat a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column\n\t\t\t\t\tfloat b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column\n\t\t\t\t\tfloat nearEstimate = - 0.5 * b / a;\n\n\t\t\t\t\tfloat alpha = ( nearEstimate - start.z ) / ( end.z - start.z );\n\n\t\t\t\t\tend.xyz = mix( start.xyz, end.xyz, alpha );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#ifdef USE_COLOR\n\n\t\t\t\t\t\tvColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd;\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat aspect = resolution.x / resolution.y;\n\n\t\t\t\t\t// camera space\n\t\t\t\t\tvec4 start = modelViewMatrix * vec4( instanceStart, 1.0 );\n\t\t\t\t\tvec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\tworldStart = start.xyz;\n\t\t\t\t\t\tworldEnd = end.xyz;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvUv = uv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\t// special case for perspective projection, and segments that terminate either in, or behind, the camera plane\n\t\t\t\t\t// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space\n\t\t\t\t\t// but we need to perform ndc-space calculations in the shader, so we must address this issue directly\n\t\t\t\t\t// perhaps there is a more elegant solution -- WestLangley\n\n\t\t\t\t\tbool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column\n\n\t\t\t\t\tif ( perspective ) {\n\n\t\t\t\t\t\tif ( start.z < 0.0 && end.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( start, end );\n\n\t\t\t\t\t\t} else if ( end.z < 0.0 && start.z >= 0.0 ) {\n\n\t\t\t\t\t\t\ttrimSegment( end, start );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t// clip space\n\t\t\t\t\tvec4 clipStart = projectionMatrix * start;\n\t\t\t\t\tvec4 clipEnd = projectionMatrix * end;\n\n\t\t\t\t\t// ndc space\n\t\t\t\t\tvec3 ndcStart = clipStart.xyz / clipStart.w;\n\t\t\t\t\tvec3 ndcEnd = clipEnd.xyz / clipEnd.w;\n\n\t\t\t\t\t// direction\n\t\t\t\t\tvec2 dir = ndcEnd.xy - ndcStart.xy;\n\n\t\t\t\t\t// account for clip-space aspect ratio\n\t\t\t\t\tdir.x *= aspect;\n\t\t\t\t\tdir = normalize( dir );\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// get the offset direction as perpendicular to the view vector\n\t\t\t\t\t\tvec3 worldDir = normalize( end.xyz - start.xyz );\n\t\t\t\t\t\tvec3 offset;\n\t\t\t\t\t\tif ( position.y < 0.5 ) {\n\n\t\t\t\t\t\t\toffset = normalize( cross( start.xyz, worldDir ) );\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\toffset = normalize( cross( end.xyz, worldDir ) );\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\tfloat forwardOffset = dot( worldDir, vec3( 0.0, 0.0, 1.0 ) );\n\n\t\t\t\t\t\t// don't extend the line if we're rendering dashes because we\n\t\t\t\t\t\t// won't be rendering the endcaps\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t// extend the line bounds to encompass endcaps\n\t\t\t\t\t\t\tstart.xyz += - worldDir * linewidth * 0.5;\n\t\t\t\t\t\t\tend.xyz += worldDir * linewidth * 0.5;\n\n\t\t\t\t\t\t\t// shift the position of the quad so it hugs the forward edge of the line\n\t\t\t\t\t\t\toffset.xy -= dir * forwardOffset;\n\t\t\t\t\t\t\toffset.z += 0.5;\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y > 1.0 || position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset.xy += dir * 2.0 * forwardOffset;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth * 0.5;\n\n\t\t\t\t\t\t// set the world position\n\t\t\t\t\t\tworldPos = ( position.y < 0.5 ) ? start : end;\n\t\t\t\t\t\tworldPos.xyz += offset;\n\n\t\t\t\t\t\t// project the worldpos\n\t\t\t\t\t\tvec4 clip = projectionMatrix * worldPos;\n\n\t\t\t\t\t\t// shift the depth of the projected points so the line\n\t\t\t\t\t\t// segments overlap neatly\n\t\t\t\t\t\tvec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd;\n\t\t\t\t\t\tclip.z = clipPose.z * clip.w;\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\tvec2 offset = vec2( dir.y, - dir.x );\n\t\t\t\t\t\t// undo aspect ratio adjustment\n\t\t\t\t\t\tdir.x /= aspect;\n\t\t\t\t\t\toffset.x /= aspect;\n\n\t\t\t\t\t\t// sign flip\n\t\t\t\t\t\tif ( position.x < 0.0 ) offset *= - 1.0;\n\n\t\t\t\t\t\t// endcaps\n\t\t\t\t\t\tif ( position.y < 0.0 ) {\n\n\t\t\t\t\t\t\toffset += - dir;\n\n\t\t\t\t\t\t} else if ( position.y > 1.0 ) {\n\n\t\t\t\t\t\t\toffset += dir;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// adjust for linewidth\n\t\t\t\t\t\toffset *= linewidth;\n\n\t\t\t\t\t\t// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ...\n\t\t\t\t\t\toffset /= resolution.y;\n\n\t\t\t\t\t\t// select end\n\t\t\t\t\t\tvec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd;\n\n\t\t\t\t\t\t// back to clip space\n\t\t\t\t\t\toffset *= clip.w;\n\n\t\t\t\t\t\tclip.xy += offset;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tgl_Position = clip;\n\n\t\t\t\t\tvec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",
+ fragmentShader:
+ "\n\t\t\t\tuniform vec3 diffuse;\n\t\t\t\tuniform float opacity;\n\t\t\t\tuniform float linewidth;\n\n\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\tuniform float dashOffset;\n\t\t\t\t\tuniform float dashSize;\n\t\t\t\t\tuniform float gapSize;\n\n\t\t\t\t#endif\n\n\t\t\t\tvarying float vLineDistance;\n\n\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\tvarying vec4 worldPos;\n\t\t\t\t\tvarying vec3 worldStart;\n\t\t\t\t\tvarying vec3 worldEnd;\n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t\t#endif\n\n\t\t\t\t#else\n\n\t\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\t#endif\n\n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\t\t\t\t#include \n\n\t\t\t\tvec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) {\n\n\t\t\t\t\tfloat mua;\n\t\t\t\t\tfloat mub;\n\n\t\t\t\t\tvec3 p13 = p1 - p3;\n\t\t\t\t\tvec3 p43 = p4 - p3;\n\n\t\t\t\t\tvec3 p21 = p2 - p1;\n\n\t\t\t\t\tfloat d1343 = dot( p13, p43 );\n\t\t\t\t\tfloat d4321 = dot( p43, p21 );\n\t\t\t\t\tfloat d1321 = dot( p13, p21 );\n\t\t\t\t\tfloat d4343 = dot( p43, p43 );\n\t\t\t\t\tfloat d2121 = dot( p21, p21 );\n\n\t\t\t\t\tfloat denom = d2121 * d4343 - d4321 * d4321;\n\n\t\t\t\t\tfloat numer = d1343 * d4321 - d1321 * d4343;\n\n\t\t\t\t\tmua = numer / denom;\n\t\t\t\t\tmua = clamp( mua, 0.0, 1.0 );\n\t\t\t\t\tmub = ( d1343 + d4321 * ( mua ) ) / d4343;\n\t\t\t\t\tmub = clamp( mub, 0.0, 1.0 );\n\n\t\t\t\t\treturn vec2( mua, mub );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\t#include \n\n\t\t\t\t\t#ifdef USE_DASH\n\n\t\t\t\t\t\tif ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps\n\n\t\t\t\t\t\tif ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tfloat alpha = opacity;\n\n\t\t\t\t\t#ifdef WORLD_UNITS\n\n\t\t\t\t\t\t// Find the closest points on the view ray and the line segment\n\t\t\t\t\t\tvec3 rayEnd = normalize( worldPos.xyz ) * 1e5;\n\t\t\t\t\t\tvec3 lineDir = worldEnd - worldStart;\n\t\t\t\t\t\tvec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd );\n\n\t\t\t\t\t\tvec3 p1 = worldStart + lineDir * params.x;\n\t\t\t\t\t\tvec3 p2 = rayEnd * params.y;\n\t\t\t\t\t\tvec3 delta = p1 - p2;\n\t\t\t\t\t\tfloat len = length( delta );\n\t\t\t\t\t\tfloat norm = len / linewidth;\n\n\t\t\t\t\t\t#ifndef USE_DASH\n\n\t\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t\tfloat dnorm = fwidth( norm );\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm );\n\n\t\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\t\tif ( norm > 0.5 ) {\n\n\t\t\t\t\t\t\t\t\tdiscard;\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#endif\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#else\n\n\t\t\t\t\t\t#ifdef USE_ALPHA_TO_COVERAGE\n\n\t\t\t\t\t\t\t// artifacts appear on some hardware if a derivative is taken within a conditional\n\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\t\t\t\t\t\t\tfloat dlen = fwidth( len2 );\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\talpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 );\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#else\n\n\t\t\t\t\t\t\tif ( abs( vUv.y ) > 1.0 ) {\n\n\t\t\t\t\t\t\t\tfloat a = vUv.x;\n\t\t\t\t\t\t\t\tfloat b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0;\n\t\t\t\t\t\t\t\tfloat len2 = a * a + b * b;\n\n\t\t\t\t\t\t\t\tif ( len2 > 1.0 ) discard;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t#endif\n\n\t\t\t\t\t#endif\n\n\t\t\t\t\tvec4 diffuseColor = vec4( diffuse, alpha );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t\tgl_FragColor = vec4( diffuseColor.rgb, alpha );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include <".concat(
+ parseInt(A.REVISION.replace(/\D+/g, "")) >= 154
+ ? "colorspace_fragment"
+ : "encodings_fragment",
+ ">\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t"
+ ),
+ clipping: !0,
+ })).isLineMaterial = !0),
+ Object.defineProperties((0, f.Z)(r), {
+ color: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.diffuse.value;
+ },
+ set: function (e) {
+ this.uniforms.diffuse.value = e;
+ },
+ },
+ worldUnits: {
+ enumerable: !0,
+ get: function () {
+ return "WORLD_UNITS" in this.defines;
+ },
+ set: function (e) {
+ !0 === e
+ ? (this.defines.WORLD_UNITS = "")
+ : delete this.defines.WORLD_UNITS;
+ },
+ },
+ linewidth: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.linewidth.value;
+ },
+ set: function (e) {
+ this.uniforms.linewidth.value = e;
+ },
+ },
+ dashed: {
+ enumerable: !0,
+ get: function () {
+ return Boolean("USE_DASH" in this.defines);
+ },
+ set: function (e) {
+ Boolean(e) !== Boolean("USE_DASH" in this.defines) &&
+ (this.needsUpdate = !0),
+ !0 === e
+ ? (this.defines.USE_DASH = "")
+ : delete this.defines.USE_DASH;
+ },
+ },
+ dashScale: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.dashScale.value;
+ },
+ set: function (e) {
+ this.uniforms.dashScale.value = e;
+ },
+ },
+ dashSize: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.dashSize.value;
+ },
+ set: function (e) {
+ this.uniforms.dashSize.value = e;
+ },
+ },
+ dashOffset: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.dashOffset.value;
+ },
+ set: function (e) {
+ this.uniforms.dashOffset.value = e;
+ },
+ },
+ gapSize: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.gapSize.value;
+ },
+ set: function (e) {
+ this.uniforms.gapSize.value = e;
+ },
+ },
+ opacity: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.opacity.value;
+ },
+ set: function (e) {
+ this.uniforms.opacity.value = e;
+ },
+ },
+ resolution: {
+ enumerable: !0,
+ get: function () {
+ return this.uniforms.resolution.value;
+ },
+ set: function (e) {
+ this.uniforms.resolution.value.copy(e);
+ },
+ },
+ alphaToCoverage: {
+ enumerable: !0,
+ get: function () {
+ return Boolean("USE_ALPHA_TO_COVERAGE" in this.defines);
+ },
+ set: function (e) {
+ Boolean(e) !==
+ Boolean("USE_ALPHA_TO_COVERAGE" in this.defines) &&
+ (this.needsUpdate = !0),
+ !0 === e
+ ? ((this.defines.USE_ALPHA_TO_COVERAGE = ""),
+ (this.extensions.derivatives = !0))
+ : (delete this.defines.USE_ALPHA_TO_COVERAGE,
+ (this.extensions.derivatives = !1));
+ },
+ },
+ }),
+ r.setValues(e),
+ r
+ );
+ }
+ return (0, v.Z)(n);
+ })(A.ShaderMaterial),
+ qp = new A.Vector3(),
+ Jp = new A.Vector3(),
+ Kp = null,
+ $p = null,
+ ev = new A.Vector3(),
+ tv = new A.Vector3(),
+ nv = new A.Vector4(),
+ rv = new A.Vector4(),
+ iv = new A.Vector4(),
+ av = new A.Vector3(),
+ ov = new A.Matrix4(),
+ sv = new A.Line3(),
+ lv = new A.Vector3(),
+ uv = new A.Box3(),
+ cv = new A.Sphere(),
+ fv = new A.Vector4(),
+ dv,
+ hv,
+ pv,
+ vv;
+ function mv(e, t, n) {
+ return (
+ fv.set(0, 0, -t, 1).applyMatrix4(e.projectionMatrix),
+ fv.multiplyScalar(1 / fv.w),
+ (fv.x = vv / n.width),
+ (fv.y = vv / n.height),
+ fv.applyMatrix4(e.projectionMatrixInverse),
+ fv.multiplyScalar(1 / fv.w),
+ Math.abs(Math.max(fv.x, fv.y))
+ );
+ }
+ function gv(e, t) {
+ for (var n = 0, r = hv.count; n < r; n++) {
+ sv.start.fromBufferAttribute(hv, n),
+ sv.end.fromBufferAttribute(pv, n);
+ var i = new A.Vector3(),
+ a = new A.Vector3();
+ dv.distanceSqToSegment(sv.start, sv.end, a, i),
+ a.distanceTo(i) < 0.5 * vv &&
+ t.push({
+ point: a,
+ pointOnLine: i,
+ distance: dv.origin.distanceTo(a),
+ object: e,
+ face: null,
+ faceIndex: n,
+ uv: null,
+ uv2: null,
+ });
+ }
+ }
+ function Av(e, t, n) {
+ var r = t.projectionMatrix,
+ i = e.material.resolution,
+ a = e.matrixWorld,
+ o = e.geometry,
+ s = o.attributes.instanceStart,
+ l = o.attributes.instanceEnd,
+ u = -t.near;
+ dv.at(1, iv),
+ (iv.w = 1),
+ iv.applyMatrix4(t.matrixWorldInverse),
+ iv.applyMatrix4(r),
+ iv.multiplyScalar(1 / iv.w),
+ (iv.x *= i.x / 2),
+ (iv.y *= i.y / 2),
+ (iv.z = 0),
+ av.copy(iv),
+ ov.multiplyMatrices(t.matrixWorldInverse, a);
+ for (var c = 0, f = s.count; c < f; c++) {
+ if (
+ (nv.fromBufferAttribute(s, c),
+ rv.fromBufferAttribute(l, c),
+ (nv.w = 1),
+ (rv.w = 1),
+ nv.applyMatrix4(ov),
+ rv.applyMatrix4(ov),
+ !(nv.z > u && rv.z > u))
+ ) {
+ if (nv.z > u) {
+ var d = nv.z - rv.z,
+ h = (nv.z - u) / d;
+ nv.lerp(rv, h);
+ } else if (rv.z > u) {
+ var p = rv.z - nv.z,
+ v = (rv.z - u) / p;
+ rv.lerp(nv, v);
+ }
+ nv.applyMatrix4(r),
+ rv.applyMatrix4(r),
+ nv.multiplyScalar(1 / nv.w),
+ rv.multiplyScalar(1 / rv.w),
+ (nv.x *= i.x / 2),
+ (nv.y *= i.y / 2),
+ (rv.x *= i.x / 2),
+ (rv.y *= i.y / 2),
+ sv.start.copy(nv),
+ (sv.start.z = 0),
+ sv.end.copy(rv),
+ (sv.end.z = 0);
+ var m = sv.closestPointToPointParameter(av, !0);
+ sv.at(m, lv);
+ var g = A.MathUtils.lerp(nv.z, rv.z, m),
+ y = g >= -1 && g <= 1,
+ b = av.distanceTo(lv) < 0.5 * vv;
+ if (y && b) {
+ sv.start.fromBufferAttribute(s, c),
+ sv.end.fromBufferAttribute(l, c),
+ sv.start.applyMatrix4(a),
+ sv.end.applyMatrix4(a);
+ var x = new A.Vector3(),
+ S = new A.Vector3();
+ dv.distanceSqToSegment(sv.start, sv.end, S, x),
+ n.push({
+ point: S,
+ pointOnLine: x,
+ distance: dv.origin.distanceTo(S),
+ object: e,
+ face: null,
+ faceIndex: c,
+ uv: null,
+ uv2: null,
+ });
+ }
+ }
+ }
+ }
+ var yv = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Wp(),
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new Yp({ color: 16777215 * Math.random() });
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.call(this, r, i)).isLineSegments2 = !0),
+ (e.type = "LineSegments2"),
+ e
+ );
+ }
+ return (
+ (0, v.Z)(n, [
+ {
+ key: "computeLineDistances",
+ value: function () {
+ for (
+ var e = this.geometry,
+ t = e.attributes.instanceStart,
+ n = e.attributes.instanceEnd,
+ r = new Float32Array(2 * t.count),
+ i = 0,
+ a = 0,
+ o = t.count;
+ i < o;
+ i++, a += 2
+ )
+ ev.fromBufferAttribute(t, i),
+ tv.fromBufferAttribute(n, i),
+ (r[a] = 0 === a ? 0 : r[a - 1]),
+ (r[a + 1] = r[a] + ev.distanceTo(tv));
+ var s = new A.InstancedInterleavedBuffer(r, 2, 1);
+ return (
+ e.setAttribute(
+ "instanceDistanceStart",
+ new A.InterleavedBufferAttribute(s, 1, 0)
+ ),
+ e.setAttribute(
+ "instanceDistanceEnd",
+ new A.InterleavedBufferAttribute(s, 1, 1)
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "raycast",
+ value: function (e, t) {
+ var n = this.material.worldUnits,
+ r = e.camera;
+ null !== r ||
+ n ||
+ console.error(
+ 'LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.'
+ );
+ var i =
+ (void 0 !== e.params.Line2 && e.params.Line2.threshold) ||
+ 0;
+ dv = e.ray;
+ var a,
+ o = this.matrixWorld,
+ s = this.geometry,
+ l = this.material;
+ ((vv = l.linewidth + i),
+ (hv = s.attributes.instanceStart),
+ (pv = s.attributes.instanceEnd),
+ null === s.boundingSphere && s.computeBoundingSphere(),
+ cv.copy(s.boundingSphere).applyMatrix4(o),
+ n)
+ ? (a = 0.5 * vv)
+ : (a = mv(
+ r,
+ Math.max(r.near, cv.distanceToPoint(dv.origin)),
+ l.resolution
+ ));
+ if (((cv.radius += a), !1 !== dv.intersectsSphere(cv))) {
+ var u;
+ if (
+ (null === s.boundingBox && s.computeBoundingBox(),
+ uv.copy(s.boundingBox).applyMatrix4(o),
+ n)
+ )
+ u = 0.5 * vv;
+ else
+ u = mv(
+ r,
+ Math.max(r.near, uv.distanceToPoint(dv.origin)),
+ l.resolution
+ );
+ uv.expandByScalar(u),
+ !1 !== dv.intersectsBox(uv) &&
+ (n ? gv(this, t) : Av(this, r, t));
+ }
+ },
+ },
+ ]),
+ n
+ );
+ })(A.Mesh),
+ bv = (function (e) {
+ (0, m.Z)(n, e);
+ var t = (0, g.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Xp(),
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new Yp({ color: 16777215 * Math.random() });
+ return (
+ (0, p.Z)(this, n),
+ ((e = t.call(this, r, i)).isLine2 = !0),
+ (e.type = "Line2"),
+ e
+ );
+ }
+ return (0, v.Z)(n);
+ })(yv),
+ xv = null,
+ Sv = new A.Vector3(),
+ Ev = new A.Vector3(),
+ _v = null,
+ Cv = null,
+ wv = new A.Vector3(),
+ Tv = new A.Vector3(),
+ Mv = new A.Matrix3(),
+ Iv = null,
+ kv = null,
+ Rv = null,
+ Bv = null,
+ Pv = null,
+ Lv = null,
+ Dv = null,
+ Uv = null,
+ Fv = null,
+ Ov = null,
+ Nv = null,
+ Gv = null,
+ Zv = null,
+ zv = null;
+ function Qv(e, t, n) {
+ return n * (t - e) + e;
+ }
+ var Hv = null,
+ Vv = null,
+ jv = null,
+ Wv = null,
+ Xv = null,
+ Yv = new A.Matrix4(),
+ qv = new A.Object3D(),
+ Jv = new A.Vector3(),
+ Kv = null,
+ $v = null,
+ em = null,
+ tm,
+ nm = function () {
+ if (tm) return tm;
+ var e = new Uint8Array([
+ 0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 3, 2, 0, 0,
+ 5, 3, 1, 0, 1, 12, 1, 0, 10, 22, 2, 12, 0, 65, 0, 65, 0, 65, 0,
+ 252, 10, 0, 0, 11, 7, 0, 65, 0, 253, 15, 26, 11,
+ ]),
+ t = new Uint8Array([
+ 32, 0, 65, 253, 3, 1, 2, 34, 4, 106, 6, 5, 11, 8, 7, 20, 13, 33,
+ 12, 16, 128, 9, 116, 64, 19, 113, 127, 15, 10, 21, 22, 14, 255,
+ 66, 24, 54, 136, 107, 18, 23, 192, 26, 114, 118, 132, 17, 77,
+ 101, 130, 144, 27, 87, 131, 44, 45, 74, 156, 154, 70, 167,
+ ]);
+ if ("object" !== typeof WebAssembly) return { supported: !1 };
+ var n,
+ r =
+ "B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";
+ WebAssembly.validate(e) &&
+ (r =
+ "B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");
+ var i = WebAssembly.instantiate(
+ (function (e) {
+ for (
+ var n = new Uint8Array(e.length), r = 0;
+ r < e.length;
+ ++r
+ ) {
+ var i = e.charCodeAt(r);
+ n[r] =
+ i > 96
+ ? i - 71
+ : i > 64
+ ? i - 65
+ : i > 47
+ ? i + 4
+ : i > 46
+ ? 63
+ : 62;
+ }
+ for (var a = 0, o = 0; o < e.length; ++o)
+ n[a++] = n[o] < 60 ? t[n[o]] : 64 * (n[o] - 60) + n[++o];
+ return n.buffer.slice(0, a);
+ })(r),
+ {}
+ ).then(function (e) {
+ (n = e.instance).exports.__wasm_call_ctors();
+ });
+ function a(e, t, r, i, a, o) {
+ var s = n.exports.sbrk,
+ l = (r + 3) & -4,
+ u = s(l * i),
+ c = s(a.length),
+ f = new Uint8Array(n.exports.memory.buffer);
+ f.set(a, c);
+ var d = e(u, r, i, c, a.length);
+ if (
+ (0 === d && o && o(u, l, i),
+ t.set(f.subarray(u, u + r * i)),
+ s(u - s(0)),
+ 0 !== d)
+ )
+ throw new Error("Malformed buffer data: ".concat(d));
+ }
+ var o = {
+ 0: "",
+ 1: "meshopt_decodeFilterOct",
+ 2: "meshopt_decodeFilterQuat",
+ 3: "meshopt_decodeFilterExp",
+ NONE: "",
+ OCTAHEDRAL: "meshopt_decodeFilterOct",
+ QUATERNION: "meshopt_decodeFilterQuat",
+ EXPONENTIAL: "meshopt_decodeFilterExp",
+ },
+ s = {
+ 0: "meshopt_decodeVertexBuffer",
+ 1: "meshopt_decodeIndexBuffer",
+ 2: "meshopt_decodeIndexSequence",
+ ATTRIBUTES: "meshopt_decodeVertexBuffer",
+ TRIANGLES: "meshopt_decodeIndexBuffer",
+ INDICES: "meshopt_decodeIndexSequence",
+ };
+ return (tm = {
+ ready: i,
+ supported: !0,
+ decodeVertexBuffer: function (e, t, r, i, s) {
+ a(
+ n.exports.meshopt_decodeVertexBuffer,
+ e,
+ t,
+ r,
+ i,
+ n.exports[o[s]]
+ );
+ },
+ decodeIndexBuffer: function (e, t, r, i) {
+ a(n.exports.meshopt_decodeIndexBuffer, e, t, r, i);
+ },
+ decodeIndexSequence: function (e, t, r, i) {
+ a(n.exports.meshopt_decodeIndexSequence, e, t, r, i);
+ },
+ decodeGltfBuffer: function (e, t, r, i, l, u) {
+ a(n.exports[s[l]], e, t, r, i, n.exports[o[u]]);
+ },
+ });
+ };
+ },
+ 7760: function (e, t, n) {
+ "use strict";
+ n.r(t),
+ n.d(t, {
+ ACESFilmicToneMapping: function () {
+ return me;
+ },
+ AddEquation: function () {
+ return N;
+ },
+ AddOperation: function () {
+ return fe;
+ },
+ AdditiveAnimationBlendMode: function () {
+ return Wt;
+ },
+ AdditiveBlending: function () {
+ return D;
+ },
+ AlphaFormat: function () {
+ return Xe;
+ },
+ AlwaysCompare: function () {
+ return Un;
+ },
+ AlwaysDepth: function () {
+ return ne;
+ },
+ AlwaysStencilFunc: function () {
+ return Mn;
+ },
+ AmbientLight: function () {
+ return $d;
+ },
+ AnimationAction: function () {
+ return zh;
+ },
+ AnimationClip: function () {
+ return Sd;
+ },
+ AnimationLoader: function () {
+ return Bd;
+ },
+ AnimationMixer: function () {
+ return Hh;
+ },
+ AnimationObjectGroup: function () {
+ return Zh;
+ },
+ AnimationUtils: function () {
+ return ud;
+ },
+ ArcCurve: function () {
+ return wc;
+ },
+ ArrayCamera: function () {
+ return Yl;
+ },
+ ArrowHelper: function () {
+ return Dp;
+ },
+ Audio: function () {
+ return Ch;
+ },
+ AudioAnalyser: function () {
+ return Rh;
+ },
+ AudioContext: function () {
+ return dh;
+ },
+ AudioListener: function () {
+ return _h;
+ },
+ AudioLoader: function () {
+ return hh;
+ },
+ AxesHelper: function () {
+ return Up;
+ },
+ BackSide: function () {
+ return k;
+ },
+ BasicDepthPacking: function () {
+ return $t;
+ },
+ BasicShadowMap: function () {
+ return C;
+ },
+ Bone: function () {
+ return Gu;
+ },
+ BooleanKeyframeTrack: function () {
+ return vd;
+ },
+ Box2: function () {
+ return np;
+ },
+ Box3: function () {
+ return Xr;
+ },
+ Box3Helper: function () {
+ return Bp;
+ },
+ BoxGeometry: function () {
+ return ao;
+ },
+ BoxHelper: function () {
+ return Rp;
+ },
+ BufferAttribute: function () {
+ return xa;
+ },
+ BufferGeometry: function () {
+ return Na;
+ },
+ BufferGeometryLoader: function () {
+ return oh;
+ },
+ ByteType: function () {
+ return Oe;
+ },
+ Cache: function () {
+ return _d;
+ },
+ Camera: function () {
+ return fo;
+ },
+ CameraHelper: function () {
+ return wp;
+ },
+ CanvasTexture: function () {
+ return Ec;
+ },
+ CapsuleGeometry: function () {
+ return Wc;
+ },
+ CatmullRomCurve3: function () {
+ return Bc;
+ },
+ CineonToneMapping: function () {
+ return ve;
+ },
+ CircleGeometry: function () {
+ return Xc;
+ },
+ ClampToEdgeWrapping: function () {
+ return Ce;
+ },
+ Clock: function () {
+ return Ah;
+ },
+ Color: function () {
+ return fa;
+ },
+ ColorKeyframeTrack: function () {
+ return md;
+ },
+ ColorManagement: function () {
+ return Tr;
+ },
+ CompressedArrayTexture: function () {
+ return xc;
+ },
+ CompressedCubeTexture: function () {
+ return Sc;
+ },
+ CompressedTexture: function () {
+ return bc;
+ },
+ CompressedTextureLoader: function () {
+ return Pd;
+ },
+ ConeGeometry: function () {
+ return qc;
+ },
+ CubeCamera: function () {
+ return vo;
+ },
+ CubeReflectionMapping: function () {
+ return ye;
+ },
+ CubeRefractionMapping: function () {
+ return be;
+ },
+ CubeTexture: function () {
+ return mo;
+ },
+ CubeTextureLoader: function () {
+ return Dd;
+ },
+ CubeUVReflectionMapping: function () {
+ return Ee;
+ },
+ CubicBezierCurve: function () {
+ return Uc;
+ },
+ CubicBezierCurve3: function () {
+ return Fc;
+ },
+ CubicInterpolant: function () {
+ return fd;
+ },
+ CullFaceBack: function () {
+ return S;
+ },
+ CullFaceFront: function () {
+ return E;
+ },
+ CullFaceFrontBack: function () {
+ return _;
+ },
+ CullFaceNone: function () {
+ return x;
+ },
+ Curve: function () {
+ return _c;
+ },
+ CurvePath: function () {
+ return Hc;
+ },
+ CustomBlending: function () {
+ return O;
+ },
+ CustomToneMapping: function () {
+ return ge;
+ },
+ CylinderGeometry: function () {
+ return Yc;
+ },
+ Cylindrical: function () {
+ return ep;
+ },
+ Data3DTexture: function () {
+ return Zr;
+ },
+ DataArrayTexture: function () {
+ return Nr;
+ },
+ DataTexture: function () {
+ return Zu;
+ },
+ DataTextureLoader: function () {
+ return Ud;
+ },
+ DataUtils: function () {
+ return Aa;
+ },
+ DecrementStencilOp: function () {
+ return gn;
+ },
+ DecrementWrapStencilOp: function () {
+ return yn;
+ },
+ DefaultLoadingManager: function () {
+ return wd;
+ },
+ DepthFormat: function () {
+ return Ke;
+ },
+ DepthStencilFormat: function () {
+ return $e;
+ },
+ DepthTexture: function () {
+ return $l;
+ },
+ DirectionalLight: function () {
+ return Kd;
+ },
+ DirectionalLightHelper: function () {
+ return Ep;
+ },
+ DiscreteInterpolant: function () {
+ return hd;
+ },
+ DisplayP3ColorSpace: function () {
+ return sn;
+ },
+ DodecahedronGeometry: function () {
+ return Kc;
+ },
+ DoubleSide: function () {
+ return R;
+ },
+ DstAlphaFactor: function () {
+ return q;
+ },
+ DstColorFactor: function () {
+ return K;
+ },
+ DynamicCopyUsage: function () {
+ return Hn;
+ },
+ DynamicDrawUsage: function () {
+ return On;
+ },
+ DynamicReadUsage: function () {
+ return Zn;
+ },
+ EdgesGeometry: function () {
+ return rf;
+ },
+ EllipseCurve: function () {
+ return Cc;
+ },
+ EqualCompare: function () {
+ return Rn;
+ },
+ EqualDepth: function () {
+ return ae;
+ },
+ EqualStencilFunc: function () {
+ return En;
+ },
+ EquirectangularReflectionMapping: function () {
+ return xe;
+ },
+ EquirectangularRefractionMapping: function () {
+ return Se;
+ },
+ Euler: function () {
+ return Ri;
+ },
+ EventDispatcher: function () {
+ return Jn;
+ },
+ ExtrudeGeometry: function () {
+ return Lf;
+ },
+ FileLoader: function () {
+ return Rd;
+ },
+ Float16BufferAttribute: function () {
+ return Ia;
+ },
+ Float32BufferAttribute: function () {
+ return ka;
+ },
+ Float64BufferAttribute: function () {
+ return Ra;
+ },
+ FloatType: function () {
+ return Qe;
+ },
+ Fog: function () {
+ return su;
+ },
+ FogExp2: function () {
+ return ou;
+ },
+ FramebufferTexture: function () {
+ return yc;
+ },
+ FrontSide: function () {
+ return I;
+ },
+ Frustum: function () {
+ return _o;
+ },
+ GLBufferAttribute: function () {
+ return Yh;
+ },
+ GLSL1: function () {
+ return jn;
+ },
+ GLSL3: function () {
+ return Wn;
+ },
+ GreaterCompare: function () {
+ return Pn;
+ },
+ GreaterDepth: function () {
+ return se;
+ },
+ GreaterEqualCompare: function () {
+ return Dn;
+ },
+ GreaterEqualDepth: function () {
+ return oe;
+ },
+ GreaterEqualStencilFunc: function () {
+ return Tn;
+ },
+ GreaterStencilFunc: function () {
+ return Cn;
+ },
+ GridHelper: function () {
+ return Ap;
+ },
+ Group: function () {
+ return ql;
+ },
+ HalfFloatType: function () {
+ return He;
+ },
+ HemisphereLight: function () {
+ return Nd;
+ },
+ HemisphereLightHelper: function () {
+ return gp;
+ },
+ IcosahedronGeometry: function () {
+ return Uf;
+ },
+ ImageBitmapLoader: function () {
+ return fh;
+ },
+ ImageLoader: function () {
+ return Ld;
+ },
+ ImageUtils: function () {
+ return kr;
+ },
+ IncrementStencilOp: function () {
+ return mn;
+ },
+ IncrementWrapStencilOp: function () {
+ return An;
+ },
+ InstancedBufferAttribute: function () {
+ return Vu;
+ },
+ InstancedBufferGeometry: function () {
+ return ah;
+ },
+ InstancedInterleavedBuffer: function () {
+ return Xh;
+ },
+ InstancedMesh: function () {
+ return $u;
+ },
+ Int16BufferAttribute: function () {
+ return Ca;
+ },
+ Int32BufferAttribute: function () {
+ return Ta;
+ },
+ Int8BufferAttribute: function () {
+ return Sa;
+ },
+ IntType: function () {
+ return Ze;
+ },
+ InterleavedBuffer: function () {
+ return uu;
+ },
+ InterleavedBufferAttribute: function () {
+ return fu;
+ },
+ Interpolant: function () {
+ return cd;
+ },
+ InterpolateDiscrete: function () {
+ return Gt;
+ },
+ InterpolateLinear: function () {
+ return Zt;
+ },
+ InterpolateSmooth: function () {
+ return zt;
+ },
+ InvertStencilOp: function () {
+ return bn;
+ },
+ KeepStencilOp: function () {
+ return pn;
+ },
+ KeyframeTrack: function () {
+ return pd;
+ },
+ LOD: function () {
+ return Iu;
+ },
+ LatheGeometry: function () {
+ return jc;
+ },
+ Layers: function () {
+ return Bi;
+ },
+ LessCompare: function () {
+ return kn;
+ },
+ LessDepth: function () {
+ return re;
+ },
+ LessEqualCompare: function () {
+ return Bn;
+ },
+ LessEqualDepth: function () {
+ return ie;
+ },
+ LessEqualStencilFunc: function () {
+ return _n;
+ },
+ LessStencilFunc: function () {
+ return Sn;
+ },
+ Light: function () {
+ return Od;
+ },
+ LightProbe: function () {
+ return nh;
+ },
+ Line: function () {
+ return oc;
+ },
+ Line3: function () {
+ return ap;
+ },
+ LineBasicMaterial: function () {
+ return ec;
+ },
+ LineCurve: function () {
+ return Oc;
+ },
+ LineCurve3: function () {
+ return Nc;
+ },
+ LineDashedMaterial: function () {
+ return rd;
+ },
+ LineLoop: function () {
+ return cc;
+ },
+ LineSegments: function () {
+ return uc;
+ },
+ LinearDisplayP3ColorSpace: function () {
+ return ln;
+ },
+ LinearEncoding: function () {
+ return Jt;
+ },
+ LinearFilter: function () {
+ return Be;
+ },
+ LinearInterpolant: function () {
+ return dd;
+ },
+ LinearMipMapLinearFilter: function () {
+ return Ue;
+ },
+ LinearMipMapNearestFilter: function () {
+ return Le;
+ },
+ LinearMipmapLinearFilter: function () {
+ return De;
+ },
+ LinearMipmapNearestFilter: function () {
+ return Pe;
+ },
+ LinearSRGBColorSpace: function () {
+ return on;
+ },
+ LinearToneMapping: function () {
+ return he;
+ },
+ LinearTransfer: function () {
+ return un;
+ },
+ Loader: function () {
+ return Td;
+ },
+ LoaderUtils: function () {
+ return ih;
+ },
+ LoadingManager: function () {
+ return Cd;
+ },
+ LoopOnce: function () {
+ return Ft;
+ },
+ LoopPingPong: function () {
+ return Nt;
+ },
+ LoopRepeat: function () {
+ return Ot;
+ },
+ LuminanceAlphaFormat: function () {
+ return Je;
+ },
+ LuminanceFormat: function () {
+ return qe;
+ },
+ MOUSE: function () {
+ return y;
+ },
+ Material: function () {
+ return oa;
+ },
+ MaterialLoader: function () {
+ return rh;
+ },
+ MathUtils: function () {
+ return fr;
+ },
+ Matrix3: function () {
+ return hr;
+ },
+ Matrix4: function () {
+ return xi;
+ },
+ MaxEquation: function () {
+ return Q;
+ },
+ Mesh: function () {
+ return ro;
+ },
+ MeshBasicMaterial: function () {
+ return ha;
+ },
+ MeshDepthMaterial: function () {
+ return Ql;
+ },
+ MeshDistanceMaterial: function () {
+ return Hl;
+ },
+ MeshLambertMaterial: function () {
+ return td;
+ },
+ MeshMatcapMaterial: function () {
+ return nd;
+ },
+ MeshNormalMaterial: function () {
+ return ed;
+ },
+ MeshPhongMaterial: function () {
+ return Kf;
+ },
+ MeshPhysicalMaterial: function () {
+ return Jf;
+ },
+ MeshStandardMaterial: function () {
+ return qf;
+ },
+ MeshToonMaterial: function () {
+ return $f;
+ },
+ MinEquation: function () {
+ return z;
+ },
+ MirroredRepeatWrapping: function () {
+ return we;
+ },
+ MixOperation: function () {
+ return ce;
+ },
+ MultiplyBlending: function () {
+ return F;
+ },
+ MultiplyOperation: function () {
+ return ue;
+ },
+ NearestFilter: function () {
+ return Te;
+ },
+ NearestMipMapLinearFilter: function () {
+ return Re;
+ },
+ NearestMipMapNearestFilter: function () {
+ return Ie;
+ },
+ NearestMipmapLinearFilter: function () {
+ return ke;
+ },
+ NearestMipmapNearestFilter: function () {
+ return Me;
+ },
+ NeverCompare: function () {
+ return In;
+ },
+ NeverDepth: function () {
+ return te;
+ },
+ NeverStencilFunc: function () {
+ return xn;
+ },
+ NoBlending: function () {
+ return P;
+ },
+ NoColorSpace: function () {
+ return rn;
+ },
+ NoToneMapping: function () {
+ return de;
+ },
+ NormalAnimationBlendMode: function () {
+ return jt;
+ },
+ NormalBlending: function () {
+ return L;
+ },
+ NotEqualCompare: function () {
+ return Ln;
+ },
+ NotEqualDepth: function () {
+ return le;
+ },
+ NotEqualStencilFunc: function () {
+ return wn;
+ },
+ NumberKeyframeTrack: function () {
+ return gd;
+ },
+ Object3D: function () {
+ return ji;
+ },
+ ObjectLoader: function () {
+ return sh;
+ },
+ ObjectSpaceNormalMap: function () {
+ return nn;
+ },
+ OctahedronGeometry: function () {
+ return Ff;
+ },
+ OneFactor: function () {
+ return V;
+ },
+ OneMinusDstAlphaFactor: function () {
+ return J;
+ },
+ OneMinusDstColorFactor: function () {
+ return $;
+ },
+ OneMinusSrcAlphaFactor: function () {
+ return Y;
+ },
+ OneMinusSrcColorFactor: function () {
+ return W;
+ },
+ OrthographicCamera: function () {
+ return Oo;
+ },
+ P3Primaries: function () {
+ return dn;
+ },
+ PCFShadowMap: function () {
+ return w;
+ },
+ PCFSoftShadowMap: function () {
+ return T;
+ },
+ PMREMGenerator: function () {
+ return Wo;
+ },
+ Path: function () {
+ return Vc;
+ },
+ PerspectiveCamera: function () {
+ return ho;
+ },
+ Plane: function () {
+ return xo;
+ },
+ PlaneGeometry: function () {
+ return To;
+ },
+ PlaneHelper: function () {
+ return Pp;
+ },
+ PointLight: function () {
+ return qd;
+ },
+ PointLightHelper: function () {
+ return hp;
+ },
+ Points: function () {
+ return mc;
+ },
+ PointsMaterial: function () {
+ return fc;
+ },
+ PolarGridHelper: function () {
+ return yp;
+ },
+ PolyhedronGeometry: function () {
+ return Jc;
+ },
+ PositionalAudio: function () {
+ return kh;
+ },
+ PropertyBinding: function () {
+ return Gh;
+ },
+ PropertyMixer: function () {
+ return Bh;
+ },
+ QuadraticBezierCurve: function () {
+ return Gc;
+ },
+ QuadraticBezierCurve3: function () {
+ return Zc;
+ },
+ Quaternion: function () {
+ return Hr;
+ },
+ QuaternionKeyframeTrack: function () {
+ return yd;
+ },
+ QuaternionLinearInterpolant: function () {
+ return Ad;
+ },
+ RED_GREEN_RGTC2_Format: function () {
+ return Dt;
+ },
+ RED_RGTC1_Format: function () {
+ return Pt;
+ },
+ REVISION: function () {
+ return A;
+ },
+ RGBADepthPacking: function () {
+ return en;
+ },
+ RGBAFormat: function () {
+ return Ye;
+ },
+ RGBAIntegerFormat: function () {
+ return it;
+ },
+ RGBA_ASTC_10x10_Format: function () {
+ return Tt;
+ },
+ RGBA_ASTC_10x5_Format: function () {
+ return _t;
+ },
+ RGBA_ASTC_10x6_Format: function () {
+ return Ct;
+ },
+ RGBA_ASTC_10x8_Format: function () {
+ return wt;
+ },
+ RGBA_ASTC_12x10_Format: function () {
+ return Mt;
+ },
+ RGBA_ASTC_12x12_Format: function () {
+ return It;
+ },
+ RGBA_ASTC_4x4_Format: function () {
+ return mt;
+ },
+ RGBA_ASTC_5x4_Format: function () {
+ return gt;
+ },
+ RGBA_ASTC_5x5_Format: function () {
+ return At;
+ },
+ RGBA_ASTC_6x5_Format: function () {
+ return yt;
+ },
+ RGBA_ASTC_6x6_Format: function () {
+ return bt;
+ },
+ RGBA_ASTC_8x5_Format: function () {
+ return xt;
+ },
+ RGBA_ASTC_8x6_Format: function () {
+ return St;
+ },
+ RGBA_ASTC_8x8_Format: function () {
+ return Et;
+ },
+ RGBA_BPTC_Format: function () {
+ return kt;
+ },
+ RGBA_ETC2_EAC_Format: function () {
+ return vt;
+ },
+ RGBA_PVRTC_2BPPV1_Format: function () {
+ return dt;
+ },
+ RGBA_PVRTC_4BPPV1_Format: function () {
+ return ft;
+ },
+ RGBA_S3TC_DXT1_Format: function () {
+ return ot;
+ },
+ RGBA_S3TC_DXT3_Format: function () {
+ return st;
+ },
+ RGBA_S3TC_DXT5_Format: function () {
+ return lt;
+ },
+ RGB_BPTC_SIGNED_Format: function () {
+ return Rt;
+ },
+ RGB_BPTC_UNSIGNED_Format: function () {
+ return Bt;
+ },
+ RGB_ETC1_Format: function () {
+ return ht;
+ },
+ RGB_ETC2_Format: function () {
+ return pt;
+ },
+ RGB_PVRTC_2BPPV1_Format: function () {
+ return ct;
+ },
+ RGB_PVRTC_4BPPV1_Format: function () {
+ return ut;
+ },
+ RGB_S3TC_DXT1_Format: function () {
+ return at;
+ },
+ RGFormat: function () {
+ return nt;
+ },
+ RGIntegerFormat: function () {
+ return rt;
+ },
+ RawShaderMaterial: function () {
+ return Yf;
+ },
+ Ray: function () {
+ return bi;
+ },
+ Raycaster: function () {
+ return qh;
+ },
+ Rec709Primaries: function () {
+ return fn;
+ },
+ RectAreaLight: function () {
+ return eh;
+ },
+ RedFormat: function () {
+ return et;
+ },
+ RedIntegerFormat: function () {
+ return tt;
+ },
+ ReinhardToneMapping: function () {
+ return pe;
+ },
+ RenderTarget: function () {
+ return Fr;
+ },
+ RepeatWrapping: function () {
+ return _e;
+ },
+ ReplaceStencilOp: function () {
+ return vn;
+ },
+ ReverseSubtractEquation: function () {
+ return Z;
+ },
+ RingGeometry: function () {
+ return Of;
+ },
+ SIGNED_RED_GREEN_RGTC2_Format: function () {
+ return Ut;
+ },
+ SIGNED_RED_RGTC1_Format: function () {
+ return Lt;
+ },
+ SRGBColorSpace: function () {
+ return an;
+ },
+ SRGBTransfer: function () {
+ return cn;
+ },
+ Scene: function () {
+ return lu;
+ },
+ ShaderChunk: function () {
+ return Mo;
+ },
+ ShaderLib: function () {
+ return ko;
+ },
+ ShaderMaterial: function () {
+ return co;
+ },
+ ShadowMaterial: function () {
+ return Xf;
+ },
+ Shape: function () {
+ return af;
+ },
+ ShapeGeometry: function () {
+ return Nf;
+ },
+ ShapePath: function () {
+ return Fp;
+ },
+ ShapeUtils: function () {
+ return Rf;
+ },
+ ShortType: function () {
+ return Ne;
+ },
+ Skeleton: function () {
+ return Hu;
+ },
+ SkeletonHelper: function () {
+ return fp;
+ },
+ SkinnedMesh: function () {
+ return Nu;
+ },
+ Source: function () {
+ return Br;
+ },
+ Sphere: function () {
+ return di;
+ },
+ SphereGeometry: function () {
+ return Gf;
+ },
+ Spherical: function () {
+ return $h;
+ },
+ SphericalHarmonics3: function () {
+ return th;
+ },
+ SplineCurve: function () {
+ return zc;
+ },
+ SpotLight: function () {
+ return Vd;
+ },
+ SpotLightHelper: function () {
+ return sp;
+ },
+ Sprite: function () {
+ return Cu;
+ },
+ SpriteMaterial: function () {
+ return du;
+ },
+ SrcAlphaFactor: function () {
+ return X;
+ },
+ SrcAlphaSaturateFactor: function () {
+ return ee;
+ },
+ SrcColorFactor: function () {
+ return j;
+ },
+ StaticCopyUsage: function () {
+ return Qn;
+ },
+ StaticDrawUsage: function () {
+ return Fn;
+ },
+ StaticReadUsage: function () {
+ return Gn;
+ },
+ StereoCamera: function () {
+ return gh;
+ },
+ StreamCopyUsage: function () {
+ return Vn;
+ },
+ StreamDrawUsage: function () {
+ return Nn;
+ },
+ StreamReadUsage: function () {
+ return zn;
+ },
+ StringKeyframeTrack: function () {
+ return bd;
+ },
+ SubtractEquation: function () {
+ return G;
+ },
+ SubtractiveBlending: function () {
+ return U;
+ },
+ TOUCH: function () {
+ return b;
+ },
+ TangentSpaceNormalMap: function () {
+ return tn;
+ },
+ TetrahedronGeometry: function () {
+ return Zf;
+ },
+ Texture: function () {
+ return Dr;
+ },
+ TextureLoader: function () {
+ return Fd;
+ },
+ TorusGeometry: function () {
+ return zf;
+ },
+ TorusKnotGeometry: function () {
+ return Qf;
+ },
+ Triangle: function () {
+ return ia;
+ },
+ TriangleFanDrawMode: function () {
+ return qt;
+ },
+ TriangleStripDrawMode: function () {
+ return Yt;
+ },
+ TrianglesDrawMode: function () {
+ return Xt;
+ },
+ TubeGeometry: function () {
+ return Hf;
+ },
+ TwoPassDoubleSide: function () {
+ return B;
+ },
+ UVMapping: function () {
+ return Ae;
+ },
+ Uint16BufferAttribute: function () {
+ return wa;
+ },
+ Uint32BufferAttribute: function () {
+ return Ma;
+ },
+ Uint8BufferAttribute: function () {
+ return Ea;
+ },
+ Uint8ClampedBufferAttribute: function () {
+ return _a;
+ },
+ Uniform: function () {
+ return Vh;
+ },
+ UniformsGroup: function () {
+ return Wh;
+ },
+ UniformsLib: function () {
+ return Io;
+ },
+ UniformsUtils: function () {
+ return uo;
+ },
+ UnsignedByteType: function () {
+ return Fe;
+ },
+ UnsignedInt248Type: function () {
+ return We;
+ },
+ UnsignedIntType: function () {
+ return ze;
+ },
+ UnsignedShort4444Type: function () {
+ return Ve;
+ },
+ UnsignedShort5551Type: function () {
+ return je;
+ },
+ UnsignedShortType: function () {
+ return Ge;
+ },
+ VSMShadowMap: function () {
+ return M;
+ },
+ Vector2: function () {
+ return dr;
+ },
+ Vector3: function () {
+ return Vr;
+ },
+ Vector4: function () {
+ return Ur;
+ },
+ VectorKeyframeTrack: function () {
+ return xd;
+ },
+ VideoTexture: function () {
+ return Ac;
+ },
+ WebGL1Renderer: function () {
+ return iu;
+ },
+ WebGL3DRenderTarget: function () {
+ return zr;
+ },
+ WebGLArrayRenderTarget: function () {
+ return Gr;
+ },
+ WebGLCoordinateSystem: function () {
+ return Yn;
+ },
+ WebGLCubeRenderTarget: function () {
+ return go;
+ },
+ WebGLMultipleRenderTargets: function () {
+ return Qr;
+ },
+ WebGLRenderTarget: function () {
+ return Or;
+ },
+ WebGLRenderer: function () {
+ return ru;
+ },
+ WebGLUtils: function () {
+ return Xl;
+ },
+ WebGPUCoordinateSystem: function () {
+ return qn;
+ },
+ WireframeGeometry: function () {
+ return Vf;
+ },
+ WrapAroundEnding: function () {
+ return Vt;
+ },
+ ZeroCurvatureEnding: function () {
+ return Qt;
+ },
+ ZeroFactor: function () {
+ return H;
+ },
+ ZeroSlopeEnding: function () {
+ return Ht;
+ },
+ ZeroStencilOp: function () {
+ return hn;
+ },
+ _SRGBAFormat: function () {
+ return Xn;
+ },
+ createCanvasElement: function () {
+ return yr;
+ },
+ sRGBEncoding: function () {
+ return Kt;
+ },
+ });
+ var r,
+ i = n(8664),
+ a = n(5861),
+ o = n(7762),
+ s = n(9439),
+ l = n(1752),
+ u = n(1120),
+ c = n(3433),
+ f = n(7326),
+ d = n(136),
+ h = n(9388),
+ p = n(4942),
+ v = n(4165),
+ m = n(5671),
+ g = n(3144),
+ A = "157",
+ y = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 },
+ b = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 },
+ x = 0,
+ S = 1,
+ E = 2,
+ _ = 3,
+ C = 0,
+ w = 1,
+ T = 2,
+ M = 3,
+ I = 0,
+ k = 1,
+ R = 2,
+ B = 2,
+ P = 0,
+ L = 1,
+ D = 2,
+ U = 3,
+ F = 4,
+ O = 5,
+ N = 100,
+ G = 101,
+ Z = 102,
+ z = 103,
+ Q = 104,
+ H = 200,
+ V = 201,
+ j = 202,
+ W = 203,
+ X = 204,
+ Y = 205,
+ q = 206,
+ J = 207,
+ K = 208,
+ $ = 209,
+ ee = 210,
+ te = 0,
+ ne = 1,
+ re = 2,
+ ie = 3,
+ ae = 4,
+ oe = 5,
+ se = 6,
+ le = 7,
+ ue = 0,
+ ce = 1,
+ fe = 2,
+ de = 0,
+ he = 1,
+ pe = 2,
+ ve = 3,
+ me = 4,
+ ge = 5,
+ Ae = 300,
+ ye = 301,
+ be = 302,
+ xe = 303,
+ Se = 304,
+ Ee = 306,
+ _e = 1e3,
+ Ce = 1001,
+ we = 1002,
+ Te = 1003,
+ Me = 1004,
+ Ie = 1004,
+ ke = 1005,
+ Re = 1005,
+ Be = 1006,
+ Pe = 1007,
+ Le = 1007,
+ De = 1008,
+ Ue = 1008,
+ Fe = 1009,
+ Oe = 1010,
+ Ne = 1011,
+ Ge = 1012,
+ Ze = 1013,
+ ze = 1014,
+ Qe = 1015,
+ He = 1016,
+ Ve = 1017,
+ je = 1018,
+ We = 1020,
+ Xe = 1021,
+ Ye = 1023,
+ qe = 1024,
+ Je = 1025,
+ Ke = 1026,
+ $e = 1027,
+ et = 1028,
+ tt = 1029,
+ nt = 1030,
+ rt = 1031,
+ it = 1033,
+ at = 33776,
+ ot = 33777,
+ st = 33778,
+ lt = 33779,
+ ut = 35840,
+ ct = 35841,
+ ft = 35842,
+ dt = 35843,
+ ht = 36196,
+ pt = 37492,
+ vt = 37496,
+ mt = 37808,
+ gt = 37809,
+ At = 37810,
+ yt = 37811,
+ bt = 37812,
+ xt = 37813,
+ St = 37814,
+ Et = 37815,
+ _t = 37816,
+ Ct = 37817,
+ wt = 37818,
+ Tt = 37819,
+ Mt = 37820,
+ It = 37821,
+ kt = 36492,
+ Rt = 36494,
+ Bt = 36495,
+ Pt = 36283,
+ Lt = 36284,
+ Dt = 36285,
+ Ut = 36286,
+ Ft = 2200,
+ Ot = 2201,
+ Nt = 2202,
+ Gt = 2300,
+ Zt = 2301,
+ zt = 2302,
+ Qt = 2400,
+ Ht = 2401,
+ Vt = 2402,
+ jt = 2500,
+ Wt = 2501,
+ Xt = 0,
+ Yt = 1,
+ qt = 2,
+ Jt = 3e3,
+ Kt = 3001,
+ $t = 3200,
+ en = 3201,
+ tn = 0,
+ nn = 1,
+ rn = "",
+ an = "srgb",
+ on = "srgb-linear",
+ sn = "display-p3",
+ ln = "display-p3-linear",
+ un = "linear",
+ cn = "srgb",
+ fn = "rec709",
+ dn = "p3",
+ hn = 0,
+ pn = 7680,
+ vn = 7681,
+ mn = 7682,
+ gn = 7683,
+ An = 34055,
+ yn = 34056,
+ bn = 5386,
+ xn = 512,
+ Sn = 513,
+ En = 514,
+ _n = 515,
+ Cn = 516,
+ wn = 517,
+ Tn = 518,
+ Mn = 519,
+ In = 512,
+ kn = 513,
+ Rn = 514,
+ Bn = 515,
+ Pn = 516,
+ Ln = 517,
+ Dn = 518,
+ Un = 519,
+ Fn = 35044,
+ On = 35048,
+ Nn = 35040,
+ Gn = 35045,
+ Zn = 35049,
+ zn = 35041,
+ Qn = 35046,
+ Hn = 35050,
+ Vn = 35042,
+ jn = "100",
+ Wn = "300 es",
+ Xn = 1035,
+ Yn = 2e3,
+ qn = 2001,
+ Jn = (function () {
+ function e() {
+ (0, m.Z)(this, e);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "addEventListener",
+ value: function (e, t) {
+ void 0 === this._listeners && (this._listeners = {});
+ var n = this._listeners;
+ void 0 === n[e] && (n[e] = []),
+ -1 === n[e].indexOf(t) && n[e].push(t);
+ },
+ },
+ {
+ key: "hasEventListener",
+ value: function (e, t) {
+ if (void 0 === this._listeners) return !1;
+ var n = this._listeners;
+ return void 0 !== n[e] && -1 !== n[e].indexOf(t);
+ },
+ },
+ {
+ key: "removeEventListener",
+ value: function (e, t) {
+ if (void 0 !== this._listeners) {
+ var n = this._listeners[e];
+ if (void 0 !== n) {
+ var r = n.indexOf(t);
+ -1 !== r && n.splice(r, 1);
+ }
+ }
+ },
+ },
+ {
+ key: "dispatchEvent",
+ value: function (e) {
+ if (void 0 !== this._listeners) {
+ var t = this._listeners[e.type];
+ if (void 0 !== t) {
+ e.target = this;
+ for (
+ var n = t.slice(0), r = 0, i = n.length;
+ r < i;
+ r++
+ )
+ n[r].call(this, e);
+ e.target = null;
+ }
+ }
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Kn = [
+ "00",
+ "01",
+ "02",
+ "03",
+ "04",
+ "05",
+ "06",
+ "07",
+ "08",
+ "09",
+ "0a",
+ "0b",
+ "0c",
+ "0d",
+ "0e",
+ "0f",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "15",
+ "16",
+ "17",
+ "18",
+ "19",
+ "1a",
+ "1b",
+ "1c",
+ "1d",
+ "1e",
+ "1f",
+ "20",
+ "21",
+ "22",
+ "23",
+ "24",
+ "25",
+ "26",
+ "27",
+ "28",
+ "29",
+ "2a",
+ "2b",
+ "2c",
+ "2d",
+ "2e",
+ "2f",
+ "30",
+ "31",
+ "32",
+ "33",
+ "34",
+ "35",
+ "36",
+ "37",
+ "38",
+ "39",
+ "3a",
+ "3b",
+ "3c",
+ "3d",
+ "3e",
+ "3f",
+ "40",
+ "41",
+ "42",
+ "43",
+ "44",
+ "45",
+ "46",
+ "47",
+ "48",
+ "49",
+ "4a",
+ "4b",
+ "4c",
+ "4d",
+ "4e",
+ "4f",
+ "50",
+ "51",
+ "52",
+ "53",
+ "54",
+ "55",
+ "56",
+ "57",
+ "58",
+ "59",
+ "5a",
+ "5b",
+ "5c",
+ "5d",
+ "5e",
+ "5f",
+ "60",
+ "61",
+ "62",
+ "63",
+ "64",
+ "65",
+ "66",
+ "67",
+ "68",
+ "69",
+ "6a",
+ "6b",
+ "6c",
+ "6d",
+ "6e",
+ "6f",
+ "70",
+ "71",
+ "72",
+ "73",
+ "74",
+ "75",
+ "76",
+ "77",
+ "78",
+ "79",
+ "7a",
+ "7b",
+ "7c",
+ "7d",
+ "7e",
+ "7f",
+ "80",
+ "81",
+ "82",
+ "83",
+ "84",
+ "85",
+ "86",
+ "87",
+ "88",
+ "89",
+ "8a",
+ "8b",
+ "8c",
+ "8d",
+ "8e",
+ "8f",
+ "90",
+ "91",
+ "92",
+ "93",
+ "94",
+ "95",
+ "96",
+ "97",
+ "98",
+ "99",
+ "9a",
+ "9b",
+ "9c",
+ "9d",
+ "9e",
+ "9f",
+ "a0",
+ "a1",
+ "a2",
+ "a3",
+ "a4",
+ "a5",
+ "a6",
+ "a7",
+ "a8",
+ "a9",
+ "aa",
+ "ab",
+ "ac",
+ "ad",
+ "ae",
+ "af",
+ "b0",
+ "b1",
+ "b2",
+ "b3",
+ "b4",
+ "b5",
+ "b6",
+ "b7",
+ "b8",
+ "b9",
+ "ba",
+ "bb",
+ "bc",
+ "bd",
+ "be",
+ "bf",
+ "c0",
+ "c1",
+ "c2",
+ "c3",
+ "c4",
+ "c5",
+ "c6",
+ "c7",
+ "c8",
+ "c9",
+ "ca",
+ "cb",
+ "cc",
+ "cd",
+ "ce",
+ "cf",
+ "d0",
+ "d1",
+ "d2",
+ "d3",
+ "d4",
+ "d5",
+ "d6",
+ "d7",
+ "d8",
+ "d9",
+ "da",
+ "db",
+ "dc",
+ "dd",
+ "de",
+ "df",
+ "e0",
+ "e1",
+ "e2",
+ "e3",
+ "e4",
+ "e5",
+ "e6",
+ "e7",
+ "e8",
+ "e9",
+ "ea",
+ "eb",
+ "ec",
+ "ed",
+ "ee",
+ "ef",
+ "f0",
+ "f1",
+ "f2",
+ "f3",
+ "f4",
+ "f5",
+ "f6",
+ "f7",
+ "f8",
+ "f9",
+ "fa",
+ "fb",
+ "fc",
+ "fd",
+ "fe",
+ "ff",
+ ],
+ $n = 1234567,
+ er = Math.PI / 180,
+ tr = 180 / Math.PI;
+ function nr() {
+ var e = (4294967295 * Math.random()) | 0,
+ t = (4294967295 * Math.random()) | 0,
+ n = (4294967295 * Math.random()) | 0,
+ r = (4294967295 * Math.random()) | 0;
+ return (
+ Kn[255 & e] +
+ Kn[(e >> 8) & 255] +
+ Kn[(e >> 16) & 255] +
+ Kn[(e >> 24) & 255] +
+ "-" +
+ Kn[255 & t] +
+ Kn[(t >> 8) & 255] +
+ "-" +
+ Kn[((t >> 16) & 15) | 64] +
+ Kn[(t >> 24) & 255] +
+ "-" +
+ Kn[(63 & n) | 128] +
+ Kn[(n >> 8) & 255] +
+ "-" +
+ Kn[(n >> 16) & 255] +
+ Kn[(n >> 24) & 255] +
+ Kn[255 & r] +
+ Kn[(r >> 8) & 255] +
+ Kn[(r >> 16) & 255] +
+ Kn[(r >> 24) & 255]
+ ).toLowerCase();
+ }
+ function rr(e, t, n) {
+ return Math.max(t, Math.min(n, e));
+ }
+ function ir(e, t) {
+ return ((e % t) + t) % t;
+ }
+ function ar(e, t, n) {
+ return (1 - n) * e + n * t;
+ }
+ function or(e) {
+ return 0 === (e & (e - 1)) && 0 !== e;
+ }
+ function sr(e) {
+ return Math.pow(2, Math.ceil(Math.log(e) / Math.LN2));
+ }
+ function lr(e) {
+ return Math.pow(2, Math.floor(Math.log(e) / Math.LN2));
+ }
+ function ur(e, t) {
+ switch (t.constructor) {
+ case Float32Array:
+ return e;
+ case Uint32Array:
+ return e / 4294967295;
+ case Uint16Array:
+ return e / 65535;
+ case Uint8Array:
+ return e / 255;
+ case Int32Array:
+ return Math.max(e / 2147483647, -1);
+ case Int16Array:
+ return Math.max(e / 32767, -1);
+ case Int8Array:
+ return Math.max(e / 127, -1);
+ default:
+ throw new Error("Invalid component type.");
+ }
+ }
+ function cr(e, t) {
+ switch (t.constructor) {
+ case Float32Array:
+ return e;
+ case Uint32Array:
+ return Math.round(4294967295 * e);
+ case Uint16Array:
+ return Math.round(65535 * e);
+ case Uint8Array:
+ return Math.round(255 * e);
+ case Int32Array:
+ return Math.round(2147483647 * e);
+ case Int16Array:
+ return Math.round(32767 * e);
+ case Int8Array:
+ return Math.round(127 * e);
+ default:
+ throw new Error("Invalid component type.");
+ }
+ }
+ var fr = {
+ DEG2RAD: er,
+ RAD2DEG: tr,
+ generateUUID: nr,
+ clamp: rr,
+ euclideanModulo: ir,
+ mapLinear: function (e, t, n, r, i) {
+ return r + ((e - t) * (i - r)) / (n - t);
+ },
+ inverseLerp: function (e, t, n) {
+ return e !== t ? (n - e) / (t - e) : 0;
+ },
+ lerp: ar,
+ damp: function (e, t, n, r) {
+ return ar(e, t, 1 - Math.exp(-n * r));
+ },
+ pingpong: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1;
+ return t - Math.abs(ir(e, 2 * t) - t);
+ },
+ smoothstep: function (e, t, n) {
+ return e <= t
+ ? 0
+ : e >= n
+ ? 1
+ : (e = (e - t) / (n - t)) * e * (3 - 2 * e);
+ },
+ smootherstep: function (e, t, n) {
+ return e <= t
+ ? 0
+ : e >= n
+ ? 1
+ : (e = (e - t) / (n - t)) * e * e * (e * (6 * e - 15) + 10);
+ },
+ randInt: function (e, t) {
+ return e + Math.floor(Math.random() * (t - e + 1));
+ },
+ randFloat: function (e, t) {
+ return e + Math.random() * (t - e);
+ },
+ randFloatSpread: function (e) {
+ return e * (0.5 - Math.random());
+ },
+ seededRandom: function (e) {
+ void 0 !== e && ($n = e);
+ var t = ($n += 1831565813);
+ return (
+ (t = Math.imul(t ^ (t >>> 15), 1 | t)),
+ (((t ^= t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ (t >>> 14)) >>>
+ 0) /
+ 4294967296
+ );
+ },
+ degToRad: function (e) {
+ return e * er;
+ },
+ radToDeg: function (e) {
+ return e * tr;
+ },
+ isPowerOfTwo: or,
+ ceilPowerOfTwo: sr,
+ floorPowerOfTwo: lr,
+ setQuaternionFromProperEuler: function (e, t, n, r, i) {
+ var a = Math.cos,
+ o = Math.sin,
+ s = a(n / 2),
+ l = o(n / 2),
+ u = a((t + r) / 2),
+ c = o((t + r) / 2),
+ f = a((t - r) / 2),
+ d = o((t - r) / 2),
+ h = a((r - t) / 2),
+ p = o((r - t) / 2);
+ switch (i) {
+ case "XYX":
+ e.set(s * c, l * f, l * d, s * u);
+ break;
+ case "YZY":
+ e.set(l * d, s * c, l * f, s * u);
+ break;
+ case "ZXZ":
+ e.set(l * f, l * d, s * c, s * u);
+ break;
+ case "XZX":
+ e.set(s * c, l * p, l * h, s * u);
+ break;
+ case "YXY":
+ e.set(l * h, s * c, l * p, s * u);
+ break;
+ case "ZYZ":
+ e.set(l * p, l * h, s * c, s * u);
+ break;
+ default:
+ console.warn(
+ "THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " +
+ i
+ );
+ }
+ },
+ normalize: cr,
+ denormalize: ur,
+ },
+ dr = (function (e) {
+ function t() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ (0, m.Z)(this, t),
+ (t.prototype.isVector2 = !0),
+ (this.x = e),
+ (this.y = n);
+ }
+ return (
+ (0, g.Z)(t, [
+ {
+ key: "width",
+ get: function () {
+ return this.x;
+ },
+ set: function (e) {
+ this.x = e;
+ },
+ },
+ {
+ key: "height",
+ get: function () {
+ return this.y;
+ },
+ set: function (e) {
+ this.y = e;
+ },
+ },
+ {
+ key: "set",
+ value: function (e, t) {
+ return (this.x = e), (this.y = t), this;
+ },
+ },
+ {
+ key: "setScalar",
+ value: function (e) {
+ return (this.x = e), (this.y = e), this;
+ },
+ },
+ {
+ key: "setX",
+ value: function (e) {
+ return (this.x = e), this;
+ },
+ },
+ {
+ key: "setY",
+ value: function (e) {
+ return (this.y = e), this;
+ },
+ },
+ {
+ key: "setComponent",
+ value: function (e, t) {
+ switch (e) {
+ case 0:
+ this.x = t;
+ break;
+ case 1:
+ this.y = t;
+ break;
+ default:
+ throw new Error("index is out of range: " + e);
+ }
+ return this;
+ },
+ },
+ {
+ key: "getComponent",
+ value: function (e) {
+ switch (e) {
+ case 0:
+ return this.x;
+ case 1:
+ return this.y;
+ default:
+ throw new Error("index is out of range: " + e);
+ }
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(this.x, this.y);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (this.x = e.x), (this.y = e.y), this;
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ return (this.x += e.x), (this.y += e.y), this;
+ },
+ },
+ {
+ key: "addScalar",
+ value: function (e) {
+ return (this.x += e), (this.y += e), this;
+ },
+ },
+ {
+ key: "addVectors",
+ value: function (e, t) {
+ return (this.x = e.x + t.x), (this.y = e.y + t.y), this;
+ },
+ },
+ {
+ key: "addScaledVector",
+ value: function (e, t) {
+ return (this.x += e.x * t), (this.y += e.y * t), this;
+ },
+ },
+ {
+ key: "sub",
+ value: function (e) {
+ return (this.x -= e.x), (this.y -= e.y), this;
+ },
+ },
+ {
+ key: "subScalar",
+ value: function (e) {
+ return (this.x -= e), (this.y -= e), this;
+ },
+ },
+ {
+ key: "subVectors",
+ value: function (e, t) {
+ return (this.x = e.x - t.x), (this.y = e.y - t.y), this;
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return (this.x *= e.x), (this.y *= e.y), this;
+ },
+ },
+ {
+ key: "multiplyScalar",
+ value: function (e) {
+ return (this.x *= e), (this.y *= e), this;
+ },
+ },
+ {
+ key: "divide",
+ value: function (e) {
+ return (this.x /= e.x), (this.y /= e.y), this;
+ },
+ },
+ {
+ key: "divideScalar",
+ value: function (e) {
+ return this.multiplyScalar(1 / e);
+ },
+ },
+ {
+ key: "applyMatrix3",
+ value: function (e) {
+ var t = this.x,
+ n = this.y,
+ r = e.elements;
+ return (
+ (this.x = r[0] * t + r[3] * n + r[6]),
+ (this.y = r[1] * t + r[4] * n + r[7]),
+ this
+ );
+ },
+ },
+ {
+ key: "min",
+ value: function (e) {
+ return (
+ (this.x = Math.min(this.x, e.x)),
+ (this.y = Math.min(this.y, e.y)),
+ this
+ );
+ },
+ },
+ {
+ key: "max",
+ value: function (e) {
+ return (
+ (this.x = Math.max(this.x, e.x)),
+ (this.y = Math.max(this.y, e.y)),
+ this
+ );
+ },
+ },
+ {
+ key: "clamp",
+ value: function (e, t) {
+ return (
+ (this.x = Math.max(e.x, Math.min(t.x, this.x))),
+ (this.y = Math.max(e.y, Math.min(t.y, this.y))),
+ this
+ );
+ },
+ },
+ {
+ key: "clampScalar",
+ value: function (e, t) {
+ return (
+ (this.x = Math.max(e, Math.min(t, this.x))),
+ (this.y = Math.max(e, Math.min(t, this.y))),
+ this
+ );
+ },
+ },
+ {
+ key: "clampLength",
+ value: function (e, t) {
+ var n = this.length();
+ return this.divideScalar(n || 1).multiplyScalar(
+ Math.max(e, Math.min(t, n))
+ );
+ },
+ },
+ {
+ key: "floor",
+ value: function () {
+ return (
+ (this.x = Math.floor(this.x)),
+ (this.y = Math.floor(this.y)),
+ this
+ );
+ },
+ },
+ {
+ key: "ceil",
+ value: function () {
+ return (
+ (this.x = Math.ceil(this.x)),
+ (this.y = Math.ceil(this.y)),
+ this
+ );
+ },
+ },
+ {
+ key: "round",
+ value: function () {
+ return (
+ (this.x = Math.round(this.x)),
+ (this.y = Math.round(this.y)),
+ this
+ );
+ },
+ },
+ {
+ key: "roundToZero",
+ value: function () {
+ return (
+ (this.x = Math.trunc(this.x)),
+ (this.y = Math.trunc(this.y)),
+ this
+ );
+ },
+ },
+ {
+ key: "negate",
+ value: function () {
+ return (this.x = -this.x), (this.y = -this.y), this;
+ },
+ },
+ {
+ key: "dot",
+ value: function (e) {
+ return this.x * e.x + this.y * e.y;
+ },
+ },
+ {
+ key: "cross",
+ value: function (e) {
+ return this.x * e.y - this.y * e.x;
+ },
+ },
+ {
+ key: "lengthSq",
+ value: function () {
+ return this.x * this.x + this.y * this.y;
+ },
+ },
+ {
+ key: "length",
+ value: function () {
+ return Math.sqrt(this.x * this.x + this.y * this.y);
+ },
+ },
+ {
+ key: "manhattanLength",
+ value: function () {
+ return Math.abs(this.x) + Math.abs(this.y);
+ },
+ },
+ {
+ key: "normalize",
+ value: function () {
+ return this.divideScalar(this.length() || 1);
+ },
+ },
+ {
+ key: "angle",
+ value: function () {
+ var e = Math.atan2(-this.y, -this.x) + Math.PI;
+ return e;
+ },
+ },
+ {
+ key: "angleTo",
+ value: function (e) {
+ var t = Math.sqrt(this.lengthSq() * e.lengthSq());
+ if (0 === t) return Math.PI / 2;
+ var n = this.dot(e) / t;
+ return Math.acos(rr(n, -1, 1));
+ },
+ },
+ {
+ key: "distanceTo",
+ value: function (e) {
+ return Math.sqrt(this.distanceToSquared(e));
+ },
+ },
+ {
+ key: "distanceToSquared",
+ value: function (e) {
+ var t = this.x - e.x,
+ n = this.y - e.y;
+ return t * t + n * n;
+ },
+ },
+ {
+ key: "manhattanDistanceTo",
+ value: function (e) {
+ return Math.abs(this.x - e.x) + Math.abs(this.y - e.y);
+ },
+ },
+ {
+ key: "setLength",
+ value: function (e) {
+ return this.normalize().multiplyScalar(e);
+ },
+ },
+ {
+ key: "lerp",
+ value: function (e, t) {
+ return (
+ (this.x += (e.x - this.x) * t),
+ (this.y += (e.y - this.y) * t),
+ this
+ );
+ },
+ },
+ {
+ key: "lerpVectors",
+ value: function (e, t, n) {
+ return (
+ (this.x = e.x + (t.x - e.x) * n),
+ (this.y = e.y + (t.y - e.y) * n),
+ this
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return e.x === this.x && e.y === this.y;
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (this.x = e[t]), (this.y = e[t + 1]), this;
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (e[t] = this.x), (e[t + 1] = this.y), e;
+ },
+ },
+ {
+ key: "fromBufferAttribute",
+ value: function (e, t) {
+ return (this.x = e.getX(t)), (this.y = e.getY(t)), this;
+ },
+ },
+ {
+ key: "rotateAround",
+ value: function (e, t) {
+ var n = Math.cos(t),
+ r = Math.sin(t),
+ i = this.x - e.x,
+ a = this.y - e.y;
+ return (
+ (this.x = i * n - a * r + e.x),
+ (this.y = i * r + a * n + e.y),
+ this
+ );
+ },
+ },
+ {
+ key: "random",
+ value: function () {
+ return (
+ (this.x = Math.random()), (this.y = Math.random()), this
+ );
+ },
+ },
+ {
+ key: e,
+ value: (0, v.Z)().mark(function e() {
+ return (0, v.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), this.x;
+ case 2:
+ return (e.next = 4), this.y;
+ case 4:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ }),
+ },
+ ]),
+ t
+ );
+ })(Symbol.iterator),
+ hr = (function () {
+ function e(t, n, r, i, a, o, s, l, u) {
+ (0, m.Z)(this, e),
+ (e.prototype.isMatrix3 = !0),
+ (this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1]),
+ void 0 !== t && this.set(t, n, r, i, a, o, s, l, u);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t, n, r, i, a, o, s, l) {
+ var u = this.elements;
+ return (
+ (u[0] = e),
+ (u[1] = r),
+ (u[2] = o),
+ (u[3] = t),
+ (u[4] = i),
+ (u[5] = s),
+ (u[6] = n),
+ (u[7] = a),
+ (u[8] = l),
+ this
+ );
+ },
+ },
+ {
+ key: "identity",
+ value: function () {
+ return this.set(1, 0, 0, 0, 1, 0, 0, 0, 1), this;
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ var t = this.elements,
+ n = e.elements;
+ return (
+ (t[0] = n[0]),
+ (t[1] = n[1]),
+ (t[2] = n[2]),
+ (t[3] = n[3]),
+ (t[4] = n[4]),
+ (t[5] = n[5]),
+ (t[6] = n[6]),
+ (t[7] = n[7]),
+ (t[8] = n[8]),
+ this
+ );
+ },
+ },
+ {
+ key: "extractBasis",
+ value: function (e, t, n) {
+ return (
+ e.setFromMatrix3Column(this, 0),
+ t.setFromMatrix3Column(this, 1),
+ n.setFromMatrix3Column(this, 2),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromMatrix4",
+ value: function (e) {
+ var t = e.elements;
+ return (
+ this.set(
+ t[0],
+ t[4],
+ t[8],
+ t[1],
+ t[5],
+ t[9],
+ t[2],
+ t[6],
+ t[10]
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return this.multiplyMatrices(this, e);
+ },
+ },
+ {
+ key: "premultiply",
+ value: function (e) {
+ return this.multiplyMatrices(e, this);
+ },
+ },
+ {
+ key: "multiplyMatrices",
+ value: function (e, t) {
+ var n = e.elements,
+ r = t.elements,
+ i = this.elements,
+ a = n[0],
+ o = n[3],
+ s = n[6],
+ l = n[1],
+ u = n[4],
+ c = n[7],
+ f = n[2],
+ d = n[5],
+ h = n[8],
+ p = r[0],
+ v = r[3],
+ m = r[6],
+ g = r[1],
+ A = r[4],
+ y = r[7],
+ b = r[2],
+ x = r[5],
+ S = r[8];
+ return (
+ (i[0] = a * p + o * g + s * b),
+ (i[3] = a * v + o * A + s * x),
+ (i[6] = a * m + o * y + s * S),
+ (i[1] = l * p + u * g + c * b),
+ (i[4] = l * v + u * A + c * x),
+ (i[7] = l * m + u * y + c * S),
+ (i[2] = f * p + d * g + h * b),
+ (i[5] = f * v + d * A + h * x),
+ (i[8] = f * m + d * y + h * S),
+ this
+ );
+ },
+ },
+ {
+ key: "multiplyScalar",
+ value: function (e) {
+ var t = this.elements;
+ return (
+ (t[0] *= e),
+ (t[3] *= e),
+ (t[6] *= e),
+ (t[1] *= e),
+ (t[4] *= e),
+ (t[7] *= e),
+ (t[2] *= e),
+ (t[5] *= e),
+ (t[8] *= e),
+ this
+ );
+ },
+ },
+ {
+ key: "determinant",
+ value: function () {
+ var e = this.elements,
+ t = e[0],
+ n = e[1],
+ r = e[2],
+ i = e[3],
+ a = e[4],
+ o = e[5],
+ s = e[6],
+ l = e[7],
+ u = e[8];
+ return (
+ t * a * u -
+ t * o * l -
+ n * i * u +
+ n * o * s +
+ r * i * l -
+ r * a * s
+ );
+ },
+ },
+ {
+ key: "invert",
+ value: function () {
+ var e = this.elements,
+ t = e[0],
+ n = e[1],
+ r = e[2],
+ i = e[3],
+ a = e[4],
+ o = e[5],
+ s = e[6],
+ l = e[7],
+ u = e[8],
+ c = u * a - o * l,
+ f = o * s - u * i,
+ d = l * i - a * s,
+ h = t * c + n * f + r * d;
+ if (0 === h) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
+ var p = 1 / h;
+ return (
+ (e[0] = c * p),
+ (e[1] = (r * l - u * n) * p),
+ (e[2] = (o * n - r * a) * p),
+ (e[3] = f * p),
+ (e[4] = (u * t - r * s) * p),
+ (e[5] = (r * i - o * t) * p),
+ (e[6] = d * p),
+ (e[7] = (n * s - l * t) * p),
+ (e[8] = (a * t - n * i) * p),
+ this
+ );
+ },
+ },
+ {
+ key: "transpose",
+ value: function () {
+ var e,
+ t = this.elements;
+ return (
+ (e = t[1]),
+ (t[1] = t[3]),
+ (t[3] = e),
+ (e = t[2]),
+ (t[2] = t[6]),
+ (t[6] = e),
+ (e = t[5]),
+ (t[5] = t[7]),
+ (t[7] = e),
+ this
+ );
+ },
+ },
+ {
+ key: "getNormalMatrix",
+ value: function (e) {
+ return this.setFromMatrix4(e).invert().transpose();
+ },
+ },
+ {
+ key: "transposeIntoArray",
+ value: function (e) {
+ var t = this.elements;
+ return (
+ (e[0] = t[0]),
+ (e[1] = t[3]),
+ (e[2] = t[6]),
+ (e[3] = t[1]),
+ (e[4] = t[4]),
+ (e[5] = t[7]),
+ (e[6] = t[2]),
+ (e[7] = t[5]),
+ (e[8] = t[8]),
+ this
+ );
+ },
+ },
+ {
+ key: "setUvTransform",
+ value: function (e, t, n, r, i, a, o) {
+ var s = Math.cos(i),
+ l = Math.sin(i);
+ return (
+ this.set(
+ n * s,
+ n * l,
+ -n * (s * a + l * o) + a + e,
+ -r * l,
+ r * s,
+ -r * (-l * a + s * o) + o + t,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "scale",
+ value: function (e, t) {
+ return this.premultiply(pr.makeScale(e, t)), this;
+ },
+ },
+ {
+ key: "rotate",
+ value: function (e) {
+ return this.premultiply(pr.makeRotation(-e)), this;
+ },
+ },
+ {
+ key: "translate",
+ value: function (e, t) {
+ return this.premultiply(pr.makeTranslation(e, t)), this;
+ },
+ },
+ {
+ key: "makeTranslation",
+ value: function (e, t) {
+ return (
+ e.isVector2
+ ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1)
+ : this.set(1, 0, e, 0, 1, t, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotation",
+ value: function (e) {
+ var t = Math.cos(e),
+ n = Math.sin(e);
+ return this.set(t, -n, 0, n, t, 0, 0, 0, 1), this;
+ },
+ },
+ {
+ key: "makeScale",
+ value: function (e, t) {
+ return this.set(e, 0, 0, 0, t, 0, 0, 0, 1), this;
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ for (
+ var t = this.elements, n = e.elements, r = 0;
+ r < 9;
+ r++
+ )
+ if (t[r] !== n[r]) return !1;
+ return !0;
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ for (
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = 0;
+ n < 9;
+ n++
+ )
+ this.elements[n] = e[n + t];
+ return this;
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = this.elements;
+ return (
+ (e[t] = n[0]),
+ (e[t + 1] = n[1]),
+ (e[t + 2] = n[2]),
+ (e[t + 3] = n[3]),
+ (e[t + 4] = n[4]),
+ (e[t + 5] = n[5]),
+ (e[t + 6] = n[6]),
+ (e[t + 7] = n[7]),
+ (e[t + 8] = n[8]),
+ e
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().fromArray(this.elements);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ pr = new hr();
+ function vr(e) {
+ for (var t = e.length - 1; t >= 0; --t) if (e[t] >= 65535) return !0;
+ return !1;
+ }
+ var mr = {
+ Int8Array: Int8Array,
+ Uint8Array: Uint8Array,
+ Uint8ClampedArray: Uint8ClampedArray,
+ Int16Array: Int16Array,
+ Uint16Array: Uint16Array,
+ Int32Array: Int32Array,
+ Uint32Array: Uint32Array,
+ Float32Array: Float32Array,
+ Float64Array: Float64Array,
+ };
+ function gr(e, t) {
+ return new mr[e](t);
+ }
+ function Ar(e) {
+ return document.createElementNS("http://www.w3.org/1999/xhtml", e);
+ }
+ function yr() {
+ var e = Ar("canvas");
+ return (e.style.display = "block"), e;
+ }
+ var br = {};
+ function xr(e) {
+ e in br || ((br[e] = !0), console.warn(e));
+ }
+ var Sr,
+ Er = new hr().set(
+ 0.8224621,
+ 0.177538,
+ 0,
+ 0.0331941,
+ 0.9668058,
+ 0,
+ 0.0170827,
+ 0.0723974,
+ 0.9105199
+ ),
+ _r = new hr().set(
+ 1.2249401,
+ -0.2249404,
+ 0,
+ -0.0420569,
+ 1.0420571,
+ 0,
+ -0.0196376,
+ -0.0786361,
+ 1.0982735
+ ),
+ Cr =
+ ((r = {}),
+ (0, p.Z)(r, on, {
+ transfer: un,
+ primaries: fn,
+ toReference: function (e) {
+ return e;
+ },
+ fromReference: function (e) {
+ return e;
+ },
+ }),
+ (0, p.Z)(r, an, {
+ transfer: cn,
+ primaries: fn,
+ toReference: function (e) {
+ return e.convertSRGBToLinear();
+ },
+ fromReference: function (e) {
+ return e.convertLinearToSRGB();
+ },
+ }),
+ (0, p.Z)(r, ln, {
+ transfer: un,
+ primaries: dn,
+ toReference: function (e) {
+ return e.applyMatrix3(_r);
+ },
+ fromReference: function (e) {
+ return e.applyMatrix3(Er);
+ },
+ }),
+ (0, p.Z)(r, sn, {
+ transfer: cn,
+ primaries: dn,
+ toReference: function (e) {
+ return e.convertSRGBToLinear().applyMatrix3(_r);
+ },
+ fromReference: function (e) {
+ return e.applyMatrix3(Er).convertLinearToSRGB();
+ },
+ }),
+ r),
+ wr = new Set([on, ln]),
+ Tr = {
+ enabled: !0,
+ _workingColorSpace: on,
+ get legacyMode() {
+ return (
+ console.warn(
+ "THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."
+ ),
+ !this.enabled
+ );
+ },
+ set legacyMode(e) {
+ console.warn(
+ "THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."
+ ),
+ (this.enabled = !e);
+ },
+ get workingColorSpace() {
+ return this._workingColorSpace;
+ },
+ set workingColorSpace(e) {
+ if (!wr.has(e))
+ throw new Error(
+ 'Unsupported working color space, "'.concat(e, '".')
+ );
+ this._workingColorSpace = e;
+ },
+ convert: function (e, t, n) {
+ if (!1 === this.enabled || t === n || !t || !n) return e;
+ var r = Cr[t].toReference;
+ return (0, Cr[n].fromReference)(r(e));
+ },
+ fromWorkingColorSpace: function (e, t) {
+ return this.convert(e, this._workingColorSpace, t);
+ },
+ toWorkingColorSpace: function (e, t) {
+ return this.convert(e, t, this._workingColorSpace);
+ },
+ getPrimaries: function (e) {
+ return Cr[e].primaries;
+ },
+ getTransfer: function (e) {
+ return e === rn ? un : Cr[e].transfer;
+ },
+ };
+ function Mr(e) {
+ return e < 0.04045
+ ? 0.0773993808 * e
+ : Math.pow(0.9478672986 * e + 0.0521327014, 2.4);
+ }
+ function Ir(e) {
+ return e < 0.0031308
+ ? 12.92 * e
+ : 1.055 * Math.pow(e, 0.41666) - 0.055;
+ }
+ var kr = (function () {
+ function e() {
+ (0, m.Z)(this, e);
+ }
+ return (
+ (0, g.Z)(e, null, [
+ {
+ key: "getDataURL",
+ value: function (e) {
+ if (/^data:/i.test(e.src)) return e.src;
+ if ("undefined" === typeof HTMLCanvasElement) return e.src;
+ var t;
+ if (e instanceof HTMLCanvasElement) t = e;
+ else {
+ void 0 === Sr && (Sr = Ar("canvas")),
+ (Sr.width = e.width),
+ (Sr.height = e.height);
+ var n = Sr.getContext("2d");
+ e instanceof ImageData
+ ? n.putImageData(e, 0, 0)
+ : n.drawImage(e, 0, 0, e.width, e.height),
+ (t = Sr);
+ }
+ return t.width > 2048 || t.height > 2048
+ ? (console.warn(
+ "THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",
+ e
+ ),
+ t.toDataURL("image/jpeg", 0.6))
+ : t.toDataURL("image/png");
+ },
+ },
+ {
+ key: "sRGBToLinear",
+ value: function (e) {
+ if (
+ ("undefined" !== typeof HTMLImageElement &&
+ e instanceof HTMLImageElement) ||
+ ("undefined" !== typeof HTMLCanvasElement &&
+ e instanceof HTMLCanvasElement) ||
+ ("undefined" !== typeof ImageBitmap &&
+ e instanceof ImageBitmap)
+ ) {
+ var t = Ar("canvas");
+ (t.width = e.width), (t.height = e.height);
+ var n = t.getContext("2d");
+ n.drawImage(e, 0, 0, e.width, e.height);
+ for (
+ var r = n.getImageData(0, 0, e.width, e.height),
+ i = r.data,
+ a = 0;
+ a < i.length;
+ a++
+ )
+ i[a] = 255 * Mr(i[a] / 255);
+ return n.putImageData(r, 0, 0), t;
+ }
+ if (e.data) {
+ for (var o = e.data.slice(0), s = 0; s < o.length; s++)
+ o instanceof Uint8Array ||
+ o instanceof Uint8ClampedArray
+ ? (o[s] = Math.floor(255 * Mr(o[s] / 255)))
+ : (o[s] = Mr(o[s]));
+ return { data: o, width: e.width, height: e.height };
+ }
+ return (
+ console.warn(
+ "THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."
+ ),
+ e
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Rr = 0,
+ Br = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : null;
+ (0, m.Z)(this, e),
+ (this.isSource = !0),
+ Object.defineProperty(this, "id", { value: Rr++ }),
+ (this.uuid = nr()),
+ (this.data = t),
+ (this.version = 0);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "needsUpdate",
+ set: function (e) {
+ !0 === e && this.version++;
+ },
+ },
+ {
+ key: "toJSON",
+ value: function (e) {
+ var t = void 0 === e || "string" === typeof e;
+ if (!t && void 0 !== e.images[this.uuid])
+ return e.images[this.uuid];
+ var n = { uuid: this.uuid, url: "" },
+ r = this.data;
+ if (null !== r) {
+ var i;
+ if (Array.isArray(r)) {
+ i = [];
+ for (var a = 0, o = r.length; a < o; a++)
+ r[a].isDataTexture
+ ? i.push(Pr(r[a].image))
+ : i.push(Pr(r[a]));
+ } else i = Pr(r);
+ n.url = i;
+ }
+ return t || (e.images[this.uuid] = n), n;
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function Pr(e) {
+ return ("undefined" !== typeof HTMLImageElement &&
+ e instanceof HTMLImageElement) ||
+ ("undefined" !== typeof HTMLCanvasElement &&
+ e instanceof HTMLCanvasElement) ||
+ ("undefined" !== typeof ImageBitmap && e instanceof ImageBitmap)
+ ? kr.getDataURL(e)
+ : e.data
+ ? {
+ data: Array.from(e.data),
+ width: e.width,
+ height: e.height,
+ type: e.data.constructor.name,
+ }
+ : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
+ }
+ var Lr = 0,
+ Dr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : n.DEFAULT_IMAGE,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : n.DEFAULT_MAPPING,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : Ce,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : Ce,
+ s =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : Be,
+ l =
+ arguments.length > 5 && void 0 !== arguments[5]
+ ? arguments[5]
+ : De,
+ u =
+ arguments.length > 6 && void 0 !== arguments[6]
+ ? arguments[6]
+ : Ye,
+ c =
+ arguments.length > 7 && void 0 !== arguments[7]
+ ? arguments[7]
+ : Fe,
+ d =
+ arguments.length > 8 && void 0 !== arguments[8]
+ ? arguments[8]
+ : n.DEFAULT_ANISOTROPY,
+ h =
+ arguments.length > 9 && void 0 !== arguments[9]
+ ? arguments[9]
+ : rn;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isTexture = !0),
+ Object.defineProperty((0, f.Z)(e), "id", { value: Lr++ }),
+ (e.uuid = nr()),
+ (e.name = ""),
+ (e.source = new Br(r)),
+ (e.mipmaps = []),
+ (e.mapping = i),
+ (e.channel = 0),
+ (e.wrapS = a),
+ (e.wrapT = o),
+ (e.magFilter = s),
+ (e.minFilter = l),
+ (e.anisotropy = d),
+ (e.format = u),
+ (e.internalFormat = null),
+ (e.type = c),
+ (e.offset = new dr(0, 0)),
+ (e.repeat = new dr(1, 1)),
+ (e.center = new dr(0, 0)),
+ (e.rotation = 0),
+ (e.matrixAutoUpdate = !0),
+ (e.matrix = new hr()),
+ (e.generateMipmaps = !0),
+ (e.premultiplyAlpha = !1),
+ (e.flipY = !0),
+ (e.unpackAlignment = 4),
+ "string" === typeof h
+ ? (e.colorSpace = h)
+ : (xr(
+ "THREE.Texture: Property .encoding has been replaced by .colorSpace."
+ ),
+ (e.colorSpace = h === Kt ? an : rn)),
+ (e.userData = {}),
+ (e.version = 0),
+ (e.onUpdate = null),
+ (e.isRenderTargetTexture = !1),
+ (e.needsPMREMUpdate = !1),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "image",
+ get: function () {
+ return this.source.data;
+ },
+ set: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : null;
+ this.source.data = e;
+ },
+ },
+ {
+ key: "updateMatrix",
+ value: function () {
+ this.matrix.setUvTransform(
+ this.offset.x,
+ this.offset.y,
+ this.repeat.x,
+ this.repeat.y,
+ this.rotation,
+ this.center.x,
+ this.center.y
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (this.name = e.name),
+ (this.source = e.source),
+ (this.mipmaps = e.mipmaps.slice(0)),
+ (this.mapping = e.mapping),
+ (this.channel = e.channel),
+ (this.wrapS = e.wrapS),
+ (this.wrapT = e.wrapT),
+ (this.magFilter = e.magFilter),
+ (this.minFilter = e.minFilter),
+ (this.anisotropy = e.anisotropy),
+ (this.format = e.format),
+ (this.internalFormat = e.internalFormat),
+ (this.type = e.type),
+ this.offset.copy(e.offset),
+ this.repeat.copy(e.repeat),
+ this.center.copy(e.center),
+ (this.rotation = e.rotation),
+ (this.matrixAutoUpdate = e.matrixAutoUpdate),
+ this.matrix.copy(e.matrix),
+ (this.generateMipmaps = e.generateMipmaps),
+ (this.premultiplyAlpha = e.premultiplyAlpha),
+ (this.flipY = e.flipY),
+ (this.unpackAlignment = e.unpackAlignment),
+ (this.colorSpace = e.colorSpace),
+ (this.userData = JSON.parse(JSON.stringify(e.userData))),
+ (this.needsUpdate = !0),
+ this
+ );
+ },
+ },
+ {
+ key: "toJSON",
+ value: function (e) {
+ var t = void 0 === e || "string" === typeof e;
+ if (!t && void 0 !== e.textures[this.uuid])
+ return e.textures[this.uuid];
+ var n = {
+ metadata: {
+ version: 4.6,
+ type: "Texture",
+ generator: "Texture.toJSON",
+ },
+ uuid: this.uuid,
+ name: this.name,
+ image: this.source.toJSON(e).uuid,
+ mapping: this.mapping,
+ channel: this.channel,
+ repeat: [this.repeat.x, this.repeat.y],
+ offset: [this.offset.x, this.offset.y],
+ center: [this.center.x, this.center.y],
+ rotation: this.rotation,
+ wrap: [this.wrapS, this.wrapT],
+ format: this.format,
+ internalFormat: this.internalFormat,
+ type: this.type,
+ colorSpace: this.colorSpace,
+ minFilter: this.minFilter,
+ magFilter: this.magFilter,
+ anisotropy: this.anisotropy,
+ flipY: this.flipY,
+ generateMipmaps: this.generateMipmaps,
+ premultiplyAlpha: this.premultiplyAlpha,
+ unpackAlignment: this.unpackAlignment,
+ };
+ return (
+ Object.keys(this.userData).length > 0 &&
+ (n.userData = this.userData),
+ t || (e.textures[this.uuid] = n),
+ n
+ );
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.dispatchEvent({ type: "dispose" });
+ },
+ },
+ {
+ key: "transformUv",
+ value: function (e) {
+ if (this.mapping !== Ae) return e;
+ if ((e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1))
+ switch (this.wrapS) {
+ case _e:
+ e.x = e.x - Math.floor(e.x);
+ break;
+ case Ce:
+ e.x = e.x < 0 ? 0 : 1;
+ break;
+ case we:
+ 1 === Math.abs(Math.floor(e.x) % 2)
+ ? (e.x = Math.ceil(e.x) - e.x)
+ : (e.x = e.x - Math.floor(e.x));
+ }
+ if (e.y < 0 || e.y > 1)
+ switch (this.wrapT) {
+ case _e:
+ e.y = e.y - Math.floor(e.y);
+ break;
+ case Ce:
+ e.y = e.y < 0 ? 0 : 1;
+ break;
+ case we:
+ 1 === Math.abs(Math.floor(e.y) % 2)
+ ? (e.y = Math.ceil(e.y) - e.y)
+ : (e.y = e.y - Math.floor(e.y));
+ }
+ return this.flipY && (e.y = 1 - e.y), e;
+ },
+ },
+ {
+ key: "needsUpdate",
+ set: function (e) {
+ !0 === e &&
+ (this.version++, (this.source.needsUpdate = !0));
+ },
+ },
+ {
+ key: "encoding",
+ get: function () {
+ return (
+ xr(
+ "THREE.Texture: Property .encoding has been replaced by .colorSpace."
+ ),
+ this.colorSpace === an ? Kt : Jt
+ );
+ },
+ set: function (e) {
+ xr(
+ "THREE.Texture: Property .encoding has been replaced by .colorSpace."
+ ),
+ (this.colorSpace = e === Kt ? an : rn);
+ },
+ },
+ ]),
+ n
+ );
+ })(Jn);
+ (Dr.DEFAULT_IMAGE = null),
+ (Dr.DEFAULT_MAPPING = Ae),
+ (Dr.DEFAULT_ANISOTROPY = 1);
+ var Ur = (function (e) {
+ function t() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0,
+ i =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1;
+ (0, m.Z)(this, t),
+ (t.prototype.isVector4 = !0),
+ (this.x = e),
+ (this.y = n),
+ (this.z = r),
+ (this.w = i);
+ }
+ return (
+ (0, g.Z)(t, [
+ {
+ key: "width",
+ get: function () {
+ return this.z;
+ },
+ set: function (e) {
+ this.z = e;
+ },
+ },
+ {
+ key: "height",
+ get: function () {
+ return this.w;
+ },
+ set: function (e) {
+ this.w = e;
+ },
+ },
+ {
+ key: "set",
+ value: function (e, t, n, r) {
+ return (
+ (this.x = e),
+ (this.y = t),
+ (this.z = n),
+ (this.w = r),
+ this
+ );
+ },
+ },
+ {
+ key: "setScalar",
+ value: function (e) {
+ return (
+ (this.x = e),
+ (this.y = e),
+ (this.z = e),
+ (this.w = e),
+ this
+ );
+ },
+ },
+ {
+ key: "setX",
+ value: function (e) {
+ return (this.x = e), this;
+ },
+ },
+ {
+ key: "setY",
+ value: function (e) {
+ return (this.y = e), this;
+ },
+ },
+ {
+ key: "setZ",
+ value: function (e) {
+ return (this.z = e), this;
+ },
+ },
+ {
+ key: "setW",
+ value: function (e) {
+ return (this.w = e), this;
+ },
+ },
+ {
+ key: "setComponent",
+ value: function (e, t) {
+ switch (e) {
+ case 0:
+ this.x = t;
+ break;
+ case 1:
+ this.y = t;
+ break;
+ case 2:
+ this.z = t;
+ break;
+ case 3:
+ this.w = t;
+ break;
+ default:
+ throw new Error("index is out of range: " + e);
+ }
+ return this;
+ },
+ },
+ {
+ key: "getComponent",
+ value: function (e) {
+ switch (e) {
+ case 0:
+ return this.x;
+ case 1:
+ return this.y;
+ case 2:
+ return this.z;
+ case 3:
+ return this.w;
+ default:
+ throw new Error("index is out of range: " + e);
+ }
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(this.x, this.y, this.z, this.w);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (this.x = e.x),
+ (this.y = e.y),
+ (this.z = e.z),
+ (this.w = void 0 !== e.w ? e.w : 1),
+ this
+ );
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ return (
+ (this.x += e.x),
+ (this.y += e.y),
+ (this.z += e.z),
+ (this.w += e.w),
+ this
+ );
+ },
+ },
+ {
+ key: "addScalar",
+ value: function (e) {
+ return (
+ (this.x += e),
+ (this.y += e),
+ (this.z += e),
+ (this.w += e),
+ this
+ );
+ },
+ },
+ {
+ key: "addVectors",
+ value: function (e, t) {
+ return (
+ (this.x = e.x + t.x),
+ (this.y = e.y + t.y),
+ (this.z = e.z + t.z),
+ (this.w = e.w + t.w),
+ this
+ );
+ },
+ },
+ {
+ key: "addScaledVector",
+ value: function (e, t) {
+ return (
+ (this.x += e.x * t),
+ (this.y += e.y * t),
+ (this.z += e.z * t),
+ (this.w += e.w * t),
+ this
+ );
+ },
+ },
+ {
+ key: "sub",
+ value: function (e) {
+ return (
+ (this.x -= e.x),
+ (this.y -= e.y),
+ (this.z -= e.z),
+ (this.w -= e.w),
+ this
+ );
+ },
+ },
+ {
+ key: "subScalar",
+ value: function (e) {
+ return (
+ (this.x -= e),
+ (this.y -= e),
+ (this.z -= e),
+ (this.w -= e),
+ this
+ );
+ },
+ },
+ {
+ key: "subVectors",
+ value: function (e, t) {
+ return (
+ (this.x = e.x - t.x),
+ (this.y = e.y - t.y),
+ (this.z = e.z - t.z),
+ (this.w = e.w - t.w),
+ this
+ );
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return (
+ (this.x *= e.x),
+ (this.y *= e.y),
+ (this.z *= e.z),
+ (this.w *= e.w),
+ this
+ );
+ },
+ },
+ {
+ key: "multiplyScalar",
+ value: function (e) {
+ return (
+ (this.x *= e),
+ (this.y *= e),
+ (this.z *= e),
+ (this.w *= e),
+ this
+ );
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ var t = this.x,
+ n = this.y,
+ r = this.z,
+ i = this.w,
+ a = e.elements;
+ return (
+ (this.x = a[0] * t + a[4] * n + a[8] * r + a[12] * i),
+ (this.y = a[1] * t + a[5] * n + a[9] * r + a[13] * i),
+ (this.z = a[2] * t + a[6] * n + a[10] * r + a[14] * i),
+ (this.w = a[3] * t + a[7] * n + a[11] * r + a[15] * i),
+ this
+ );
+ },
+ },
+ {
+ key: "divideScalar",
+ value: function (e) {
+ return this.multiplyScalar(1 / e);
+ },
+ },
+ {
+ key: "setAxisAngleFromQuaternion",
+ value: function (e) {
+ this.w = 2 * Math.acos(e.w);
+ var t = Math.sqrt(1 - e.w * e.w);
+ return (
+ t < 1e-4
+ ? ((this.x = 1), (this.y = 0), (this.z = 0))
+ : ((this.x = e.x / t),
+ (this.y = e.y / t),
+ (this.z = e.z / t)),
+ this
+ );
+ },
+ },
+ {
+ key: "setAxisAngleFromRotationMatrix",
+ value: function (e) {
+ var t,
+ n,
+ r,
+ i,
+ a = 0.01,
+ o = 0.1,
+ s = e.elements,
+ l = s[0],
+ u = s[4],
+ c = s[8],
+ f = s[1],
+ d = s[5],
+ h = s[9],
+ p = s[2],
+ v = s[6],
+ m = s[10];
+ if (
+ Math.abs(u - f) < a &&
+ Math.abs(c - p) < a &&
+ Math.abs(h - v) < a
+ ) {
+ if (
+ Math.abs(u + f) < o &&
+ Math.abs(c + p) < o &&
+ Math.abs(h + v) < o &&
+ Math.abs(l + d + m - 3) < o
+ )
+ return this.set(1, 0, 0, 0), this;
+ t = Math.PI;
+ var g = (l + 1) / 2,
+ A = (d + 1) / 2,
+ y = (m + 1) / 2,
+ b = (u + f) / 4,
+ x = (c + p) / 4,
+ S = (h + v) / 4;
+ return (
+ g > A && g > y
+ ? g < a
+ ? ((n = 0), (r = 0.707106781), (i = 0.707106781))
+ : ((r = b / (n = Math.sqrt(g))), (i = x / n))
+ : A > y
+ ? A < a
+ ? ((n = 0.707106781), (r = 0), (i = 0.707106781))
+ : ((n = b / (r = Math.sqrt(A))), (i = S / r))
+ : y < a
+ ? ((n = 0.707106781), (r = 0.707106781), (i = 0))
+ : ((n = x / (i = Math.sqrt(y))), (r = S / i)),
+ this.set(n, r, i, t),
+ this
+ );
+ }
+ var E = Math.sqrt(
+ (v - h) * (v - h) + (c - p) * (c - p) + (f - u) * (f - u)
+ );
+ return (
+ Math.abs(E) < 0.001 && (E = 1),
+ (this.x = (v - h) / E),
+ (this.y = (c - p) / E),
+ (this.z = (f - u) / E),
+ (this.w = Math.acos((l + d + m - 1) / 2)),
+ this
+ );
+ },
+ },
+ {
+ key: "min",
+ value: function (e) {
+ return (
+ (this.x = Math.min(this.x, e.x)),
+ (this.y = Math.min(this.y, e.y)),
+ (this.z = Math.min(this.z, e.z)),
+ (this.w = Math.min(this.w, e.w)),
+ this
+ );
+ },
+ },
+ {
+ key: "max",
+ value: function (e) {
+ return (
+ (this.x = Math.max(this.x, e.x)),
+ (this.y = Math.max(this.y, e.y)),
+ (this.z = Math.max(this.z, e.z)),
+ (this.w = Math.max(this.w, e.w)),
+ this
+ );
+ },
+ },
+ {
+ key: "clamp",
+ value: function (e, t) {
+ return (
+ (this.x = Math.max(e.x, Math.min(t.x, this.x))),
+ (this.y = Math.max(e.y, Math.min(t.y, this.y))),
+ (this.z = Math.max(e.z, Math.min(t.z, this.z))),
+ (this.w = Math.max(e.w, Math.min(t.w, this.w))),
+ this
+ );
+ },
+ },
+ {
+ key: "clampScalar",
+ value: function (e, t) {
+ return (
+ (this.x = Math.max(e, Math.min(t, this.x))),
+ (this.y = Math.max(e, Math.min(t, this.y))),
+ (this.z = Math.max(e, Math.min(t, this.z))),
+ (this.w = Math.max(e, Math.min(t, this.w))),
+ this
+ );
+ },
+ },
+ {
+ key: "clampLength",
+ value: function (e, t) {
+ var n = this.length();
+ return this.divideScalar(n || 1).multiplyScalar(
+ Math.max(e, Math.min(t, n))
+ );
+ },
+ },
+ {
+ key: "floor",
+ value: function () {
+ return (
+ (this.x = Math.floor(this.x)),
+ (this.y = Math.floor(this.y)),
+ (this.z = Math.floor(this.z)),
+ (this.w = Math.floor(this.w)),
+ this
+ );
+ },
+ },
+ {
+ key: "ceil",
+ value: function () {
+ return (
+ (this.x = Math.ceil(this.x)),
+ (this.y = Math.ceil(this.y)),
+ (this.z = Math.ceil(this.z)),
+ (this.w = Math.ceil(this.w)),
+ this
+ );
+ },
+ },
+ {
+ key: "round",
+ value: function () {
+ return (
+ (this.x = Math.round(this.x)),
+ (this.y = Math.round(this.y)),
+ (this.z = Math.round(this.z)),
+ (this.w = Math.round(this.w)),
+ this
+ );
+ },
+ },
+ {
+ key: "roundToZero",
+ value: function () {
+ return (
+ (this.x = Math.trunc(this.x)),
+ (this.y = Math.trunc(this.y)),
+ (this.z = Math.trunc(this.z)),
+ (this.w = Math.trunc(this.w)),
+ this
+ );
+ },
+ },
+ {
+ key: "negate",
+ value: function () {
+ return (
+ (this.x = -this.x),
+ (this.y = -this.y),
+ (this.z = -this.z),
+ (this.w = -this.w),
+ this
+ );
+ },
+ },
+ {
+ key: "dot",
+ value: function (e) {
+ return (
+ this.x * e.x + this.y * e.y + this.z * e.z + this.w * e.w
+ );
+ },
+ },
+ {
+ key: "lengthSq",
+ value: function () {
+ return (
+ this.x * this.x +
+ this.y * this.y +
+ this.z * this.z +
+ this.w * this.w
+ );
+ },
+ },
+ {
+ key: "length",
+ value: function () {
+ return Math.sqrt(
+ this.x * this.x +
+ this.y * this.y +
+ this.z * this.z +
+ this.w * this.w
+ );
+ },
+ },
+ {
+ key: "manhattanLength",
+ value: function () {
+ return (
+ Math.abs(this.x) +
+ Math.abs(this.y) +
+ Math.abs(this.z) +
+ Math.abs(this.w)
+ );
+ },
+ },
+ {
+ key: "normalize",
+ value: function () {
+ return this.divideScalar(this.length() || 1);
+ },
+ },
+ {
+ key: "setLength",
+ value: function (e) {
+ return this.normalize().multiplyScalar(e);
+ },
+ },
+ {
+ key: "lerp",
+ value: function (e, t) {
+ return (
+ (this.x += (e.x - this.x) * t),
+ (this.y += (e.y - this.y) * t),
+ (this.z += (e.z - this.z) * t),
+ (this.w += (e.w - this.w) * t),
+ this
+ );
+ },
+ },
+ {
+ key: "lerpVectors",
+ value: function (e, t, n) {
+ return (
+ (this.x = e.x + (t.x - e.x) * n),
+ (this.y = e.y + (t.y - e.y) * n),
+ (this.z = e.z + (t.z - e.z) * n),
+ (this.w = e.w + (t.w - e.w) * n),
+ this
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e.x === this.x &&
+ e.y === this.y &&
+ e.z === this.z &&
+ e.w === this.w
+ );
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (this.x = e[t]),
+ (this.y = e[t + 1]),
+ (this.z = e[t + 2]),
+ (this.w = e[t + 3]),
+ this
+ );
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (e[t] = this.x),
+ (e[t + 1] = this.y),
+ (e[t + 2] = this.z),
+ (e[t + 3] = this.w),
+ e
+ );
+ },
+ },
+ {
+ key: "fromBufferAttribute",
+ value: function (e, t) {
+ return (
+ (this.x = e.getX(t)),
+ (this.y = e.getY(t)),
+ (this.z = e.getZ(t)),
+ (this.w = e.getW(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "random",
+ value: function () {
+ return (
+ (this.x = Math.random()),
+ (this.y = Math.random()),
+ (this.z = Math.random()),
+ (this.w = Math.random()),
+ this
+ );
+ },
+ },
+ {
+ key: e,
+ value: (0, v.Z)().mark(function e() {
+ return (0, v.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), this.x;
+ case 2:
+ return (e.next = 4), this.y;
+ case 4:
+ return (e.next = 6), this.z;
+ case 6:
+ return (e.next = 8), this.w;
+ case 8:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ }),
+ },
+ ]),
+ t
+ );
+ })(Symbol.iterator),
+ Fr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : {};
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isRenderTarget = !0),
+ (e.width = r),
+ (e.height = i),
+ (e.depth = 1),
+ (e.scissor = new Ur(0, 0, r, i)),
+ (e.scissorTest = !1),
+ (e.viewport = new Ur(0, 0, r, i));
+ var o = { width: r, height: i, depth: 1 };
+ return (
+ void 0 !== a.encoding &&
+ (xr(
+ "THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."
+ ),
+ (a.colorSpace = a.encoding === Kt ? an : rn)),
+ (a = Object.assign(
+ {
+ generateMipmaps: !1,
+ internalFormat: null,
+ minFilter: Be,
+ depthBuffer: !0,
+ stencilBuffer: !1,
+ depthTexture: null,
+ samples: 0,
+ },
+ a
+ )),
+ (e.texture = new Dr(
+ o,
+ a.mapping,
+ a.wrapS,
+ a.wrapT,
+ a.magFilter,
+ a.minFilter,
+ a.format,
+ a.type,
+ a.anisotropy,
+ a.colorSpace
+ )),
+ (e.texture.isRenderTargetTexture = !0),
+ (e.texture.flipY = !1),
+ (e.texture.generateMipmaps = a.generateMipmaps),
+ (e.texture.internalFormat = a.internalFormat),
+ (e.depthBuffer = a.depthBuffer),
+ (e.stencilBuffer = a.stencilBuffer),
+ (e.depthTexture = a.depthTexture),
+ (e.samples = a.samples),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "setSize",
+ value: function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1;
+ (this.width === e &&
+ this.height === t &&
+ this.depth === n) ||
+ ((this.width = e),
+ (this.height = t),
+ (this.depth = n),
+ (this.texture.image.width = e),
+ (this.texture.image.height = t),
+ (this.texture.image.depth = n),
+ this.dispose()),
+ this.viewport.set(0, 0, e, t),
+ this.scissor.set(0, 0, e, t);
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ (this.width = e.width),
+ (this.height = e.height),
+ (this.depth = e.depth),
+ this.scissor.copy(e.scissor),
+ (this.scissorTest = e.scissorTest),
+ this.viewport.copy(e.viewport),
+ (this.texture = e.texture.clone()),
+ (this.texture.isRenderTargetTexture = !0);
+ var t = Object.assign({}, e.texture.image);
+ return (
+ (this.texture.source = new Br(t)),
+ (this.depthBuffer = e.depthBuffer),
+ (this.stencilBuffer = e.stencilBuffer),
+ null !== e.depthTexture &&
+ (this.depthTexture = e.depthTexture.clone()),
+ (this.samples = e.samples),
+ this
+ );
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.dispatchEvent({ type: "dispose" });
+ },
+ },
+ ]),
+ n
+ );
+ })(Jn),
+ Or = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : {};
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this, r, i, a)).isWebGLRenderTarget = !0),
+ e
+ );
+ }
+ return (0, g.Z)(n);
+ })(Fr),
+ Nr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : null,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this, null)).isDataArrayTexture = !0),
+ (e.image = { data: r, width: i, height: a, depth: o }),
+ (e.magFilter = Te),
+ (e.minFilter = Te),
+ (e.wrapR = Ce),
+ (e.generateMipmaps = !1),
+ (e.flipY = !1),
+ (e.unpackAlignment = 1),
+ e
+ );
+ }
+ return (0, g.Z)(n);
+ })(Dr),
+ Gr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this, r, i)).isWebGLArrayRenderTarget = !0),
+ (e.depth = a),
+ (e.texture = new Nr(null, r, i, a)),
+ (e.texture.isRenderTargetTexture = !0),
+ e
+ );
+ }
+ return (0, g.Z)(n);
+ })(Or),
+ Zr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : null,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this, null)).isData3DTexture = !0),
+ (e.image = { data: r, width: i, height: a, depth: o }),
+ (e.magFilter = Te),
+ (e.minFilter = Te),
+ (e.wrapR = Ce),
+ (e.generateMipmaps = !1),
+ (e.flipY = !1),
+ (e.unpackAlignment = 1),
+ e
+ );
+ }
+ return (0, g.Z)(n);
+ })(Dr),
+ zr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this, r, i)).isWebGL3DRenderTarget = !0),
+ (e.depth = a),
+ (e.texture = new Zr(null, r, i, a)),
+ (e.texture.isRenderTargetTexture = !0),
+ e
+ );
+ }
+ return (0, g.Z)(n);
+ })(Or),
+ Qr = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : {};
+ (0, m.Z)(this, n),
+ ((e = t.call(this, r, i, o)).isWebGLMultipleRenderTargets = !0);
+ var s = e.texture;
+ e.texture = [];
+ for (var l = 0; l < a; l++)
+ (e.texture[l] = s.clone()),
+ (e.texture[l].isRenderTargetTexture = !0);
+ return e;
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "setSize",
+ value: function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1;
+ if (
+ this.width !== e ||
+ this.height !== t ||
+ this.depth !== n
+ ) {
+ (this.width = e), (this.height = t), (this.depth = n);
+ for (var r = 0, i = this.texture.length; r < i; r++)
+ (this.texture[r].image.width = e),
+ (this.texture[r].image.height = t),
+ (this.texture[r].image.depth = n);
+ this.dispose();
+ }
+ this.viewport.set(0, 0, e, t), this.scissor.set(0, 0, e, t);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ this.dispose(),
+ (this.width = e.width),
+ (this.height = e.height),
+ (this.depth = e.depth),
+ this.scissor.copy(e.scissor),
+ (this.scissorTest = e.scissorTest),
+ this.viewport.copy(e.viewport),
+ (this.depthBuffer = e.depthBuffer),
+ (this.stencilBuffer = e.stencilBuffer),
+ null !== e.depthTexture &&
+ (this.depthTexture = e.depthTexture.clone()),
+ (this.texture.length = 0);
+ for (var t = 0, n = e.texture.length; t < n; t++)
+ (this.texture[t] = e.texture[t].clone()),
+ (this.texture[t].isRenderTargetTexture = !0);
+ return this;
+ },
+ },
+ ]),
+ n
+ );
+ })(Or),
+ Hr = (function (e) {
+ function t() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0,
+ i =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1;
+ (0, m.Z)(this, t),
+ (this.isQuaternion = !0),
+ (this._x = e),
+ (this._y = n),
+ (this._z = r),
+ (this._w = i);
+ }
+ return (
+ (0, g.Z)(
+ t,
+ [
+ {
+ key: "x",
+ get: function () {
+ return this._x;
+ },
+ set: function (e) {
+ (this._x = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "y",
+ get: function () {
+ return this._y;
+ },
+ set: function (e) {
+ (this._y = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "z",
+ get: function () {
+ return this._z;
+ },
+ set: function (e) {
+ (this._z = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "w",
+ get: function () {
+ return this._w;
+ },
+ set: function (e) {
+ (this._w = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "set",
+ value: function (e, t, n, r) {
+ return (
+ (this._x = e),
+ (this._y = t),
+ (this._z = n),
+ (this._w = r),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(
+ this._x,
+ this._y,
+ this._z,
+ this._w
+ );
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (this._x = e.x),
+ (this._y = e.y),
+ (this._z = e.z),
+ (this._w = e.w),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromEuler",
+ value: function (e, t) {
+ var n = e._x,
+ r = e._y,
+ i = e._z,
+ a = e._order,
+ o = Math.cos,
+ s = Math.sin,
+ l = o(n / 2),
+ u = o(r / 2),
+ c = o(i / 2),
+ f = s(n / 2),
+ d = s(r / 2),
+ h = s(i / 2);
+ switch (a) {
+ case "XYZ":
+ (this._x = f * u * c + l * d * h),
+ (this._y = l * d * c - f * u * h),
+ (this._z = l * u * h + f * d * c),
+ (this._w = l * u * c - f * d * h);
+ break;
+ case "YXZ":
+ (this._x = f * u * c + l * d * h),
+ (this._y = l * d * c - f * u * h),
+ (this._z = l * u * h - f * d * c),
+ (this._w = l * u * c + f * d * h);
+ break;
+ case "ZXY":
+ (this._x = f * u * c - l * d * h),
+ (this._y = l * d * c + f * u * h),
+ (this._z = l * u * h + f * d * c),
+ (this._w = l * u * c - f * d * h);
+ break;
+ case "ZYX":
+ (this._x = f * u * c - l * d * h),
+ (this._y = l * d * c + f * u * h),
+ (this._z = l * u * h - f * d * c),
+ (this._w = l * u * c + f * d * h);
+ break;
+ case "YZX":
+ (this._x = f * u * c + l * d * h),
+ (this._y = l * d * c + f * u * h),
+ (this._z = l * u * h - f * d * c),
+ (this._w = l * u * c - f * d * h);
+ break;
+ case "XZY":
+ (this._x = f * u * c - l * d * h),
+ (this._y = l * d * c - f * u * h),
+ (this._z = l * u * h + f * d * c),
+ (this._w = l * u * c + f * d * h);
+ break;
+ default:
+ console.warn(
+ "THREE.Quaternion: .setFromEuler() encountered an unknown order: " +
+ a
+ );
+ }
+ return !1 !== t && this._onChangeCallback(), this;
+ },
+ },
+ {
+ key: "setFromAxisAngle",
+ value: function (e, t) {
+ var n = t / 2,
+ r = Math.sin(n);
+ return (
+ (this._x = e.x * r),
+ (this._y = e.y * r),
+ (this._z = e.z * r),
+ (this._w = Math.cos(n)),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromRotationMatrix",
+ value: function (e) {
+ var t = e.elements,
+ n = t[0],
+ r = t[4],
+ i = t[8],
+ a = t[1],
+ o = t[5],
+ s = t[9],
+ l = t[2],
+ u = t[6],
+ c = t[10],
+ f = n + o + c;
+ if (f > 0) {
+ var d = 0.5 / Math.sqrt(f + 1);
+ (this._w = 0.25 / d),
+ (this._x = (u - s) * d),
+ (this._y = (i - l) * d),
+ (this._z = (a - r) * d);
+ } else if (n > o && n > c) {
+ var h = 2 * Math.sqrt(1 + n - o - c);
+ (this._w = (u - s) / h),
+ (this._x = 0.25 * h),
+ (this._y = (r + a) / h),
+ (this._z = (i + l) / h);
+ } else if (o > c) {
+ var p = 2 * Math.sqrt(1 + o - n - c);
+ (this._w = (i - l) / p),
+ (this._x = (r + a) / p),
+ (this._y = 0.25 * p),
+ (this._z = (s + u) / p);
+ } else {
+ var v = 2 * Math.sqrt(1 + c - n - o);
+ (this._w = (a - r) / v),
+ (this._x = (i + l) / v),
+ (this._y = (s + u) / v),
+ (this._z = 0.25 * v);
+ }
+ return this._onChangeCallback(), this;
+ },
+ },
+ {
+ key: "setFromUnitVectors",
+ value: function (e, t) {
+ var n = e.dot(t) + 1;
+ return (
+ n < Number.EPSILON
+ ? ((n = 0),
+ Math.abs(e.x) > Math.abs(e.z)
+ ? ((this._x = -e.y),
+ (this._y = e.x),
+ (this._z = 0),
+ (this._w = n))
+ : ((this._x = 0),
+ (this._y = -e.z),
+ (this._z = e.y),
+ (this._w = n)))
+ : ((this._x = e.y * t.z - e.z * t.y),
+ (this._y = e.z * t.x - e.x * t.z),
+ (this._z = e.x * t.y - e.y * t.x),
+ (this._w = n)),
+ this.normalize()
+ );
+ },
+ },
+ {
+ key: "angleTo",
+ value: function (e) {
+ return 2 * Math.acos(Math.abs(rr(this.dot(e), -1, 1)));
+ },
+ },
+ {
+ key: "rotateTowards",
+ value: function (e, t) {
+ var n = this.angleTo(e);
+ if (0 === n) return this;
+ var r = Math.min(1, t / n);
+ return this.slerp(e, r), this;
+ },
+ },
+ {
+ key: "identity",
+ value: function () {
+ return this.set(0, 0, 0, 1);
+ },
+ },
+ {
+ key: "invert",
+ value: function () {
+ return this.conjugate();
+ },
+ },
+ {
+ key: "conjugate",
+ value: function () {
+ return (
+ (this._x *= -1),
+ (this._y *= -1),
+ (this._z *= -1),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "dot",
+ value: function (e) {
+ return (
+ this._x * e._x +
+ this._y * e._y +
+ this._z * e._z +
+ this._w * e._w
+ );
+ },
+ },
+ {
+ key: "lengthSq",
+ value: function () {
+ return (
+ this._x * this._x +
+ this._y * this._y +
+ this._z * this._z +
+ this._w * this._w
+ );
+ },
+ },
+ {
+ key: "length",
+ value: function () {
+ return Math.sqrt(
+ this._x * this._x +
+ this._y * this._y +
+ this._z * this._z +
+ this._w * this._w
+ );
+ },
+ },
+ {
+ key: "normalize",
+ value: function () {
+ var e = this.length();
+ return (
+ 0 === e
+ ? ((this._x = 0),
+ (this._y = 0),
+ (this._z = 0),
+ (this._w = 1))
+ : ((e = 1 / e),
+ (this._x = this._x * e),
+ (this._y = this._y * e),
+ (this._z = this._z * e),
+ (this._w = this._w * e)),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return this.multiplyQuaternions(this, e);
+ },
+ },
+ {
+ key: "premultiply",
+ value: function (e) {
+ return this.multiplyQuaternions(e, this);
+ },
+ },
+ {
+ key: "multiplyQuaternions",
+ value: function (e, t) {
+ var n = e._x,
+ r = e._y,
+ i = e._z,
+ a = e._w,
+ o = t._x,
+ s = t._y,
+ l = t._z,
+ u = t._w;
+ return (
+ (this._x = n * u + a * o + r * l - i * s),
+ (this._y = r * u + a * s + i * o - n * l),
+ (this._z = i * u + a * l + n * s - r * o),
+ (this._w = a * u - n * o - r * s - i * l),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "slerp",
+ value: function (e, t) {
+ if (0 === t) return this;
+ if (1 === t) return this.copy(e);
+ var n = this._x,
+ r = this._y,
+ i = this._z,
+ a = this._w,
+ o = a * e._w + n * e._x + r * e._y + i * e._z;
+ if (
+ (o < 0
+ ? ((this._w = -e._w),
+ (this._x = -e._x),
+ (this._y = -e._y),
+ (this._z = -e._z),
+ (o = -o))
+ : this.copy(e),
+ o >= 1)
+ )
+ return (
+ (this._w = a),
+ (this._x = n),
+ (this._y = r),
+ (this._z = i),
+ this
+ );
+ var s = 1 - o * o;
+ if (s <= Number.EPSILON) {
+ var l = 1 - t;
+ return (
+ (this._w = l * a + t * this._w),
+ (this._x = l * n + t * this._x),
+ (this._y = l * r + t * this._y),
+ (this._z = l * i + t * this._z),
+ this.normalize(),
+ this._onChangeCallback(),
+ this
+ );
+ }
+ var u = Math.sqrt(s),
+ c = Math.atan2(u, o),
+ f = Math.sin((1 - t) * c) / u,
+ d = Math.sin(t * c) / u;
+ return (
+ (this._w = a * f + this._w * d),
+ (this._x = n * f + this._x * d),
+ (this._y = r * f + this._y * d),
+ (this._z = i * f + this._z * d),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "slerpQuaternions",
+ value: function (e, t, n) {
+ return this.copy(e).slerp(t, n);
+ },
+ },
+ {
+ key: "random",
+ value: function () {
+ var e = Math.random(),
+ t = Math.sqrt(1 - e),
+ n = Math.sqrt(e),
+ r = 2 * Math.PI * Math.random(),
+ i = 2 * Math.PI * Math.random();
+ return this.set(
+ t * Math.cos(r),
+ n * Math.sin(i),
+ n * Math.cos(i),
+ t * Math.sin(r)
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e._x === this._x &&
+ e._y === this._y &&
+ e._z === this._z &&
+ e._w === this._w
+ );
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (this._x = e[t]),
+ (this._y = e[t + 1]),
+ (this._z = e[t + 2]),
+ (this._w = e[t + 3]),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (e[t] = this._x),
+ (e[t + 1] = this._y),
+ (e[t + 2] = this._z),
+ (e[t + 3] = this._w),
+ e
+ );
+ },
+ },
+ {
+ key: "fromBufferAttribute",
+ value: function (e, t) {
+ return (
+ (this._x = e.getX(t)),
+ (this._y = e.getY(t)),
+ (this._z = e.getZ(t)),
+ (this._w = e.getW(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "toJSON",
+ value: function () {
+ return this.toArray();
+ },
+ },
+ {
+ key: "_onChange",
+ value: function (e) {
+ return (this._onChangeCallback = e), this;
+ },
+ },
+ { key: "_onChangeCallback", value: function () {} },
+ {
+ key: e,
+ value: (0, v.Z)().mark(function e() {
+ return (0, v.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), this._x;
+ case 2:
+ return (e.next = 4), this._y;
+ case 4:
+ return (e.next = 6), this._z;
+ case 6:
+ return (e.next = 8), this._w;
+ case 8:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ }),
+ },
+ ],
+ [
+ {
+ key: "slerpFlat",
+ value: function (e, t, n, r, i, a, o) {
+ var s = n[r + 0],
+ l = n[r + 1],
+ u = n[r + 2],
+ c = n[r + 3],
+ f = i[a + 0],
+ d = i[a + 1],
+ h = i[a + 2],
+ p = i[a + 3];
+ if (0 === o)
+ return (
+ (e[t + 0] = s),
+ (e[t + 1] = l),
+ (e[t + 2] = u),
+ void (e[t + 3] = c)
+ );
+ if (1 === o)
+ return (
+ (e[t + 0] = f),
+ (e[t + 1] = d),
+ (e[t + 2] = h),
+ void (e[t + 3] = p)
+ );
+ if (c !== p || s !== f || l !== d || u !== h) {
+ var v = 1 - o,
+ m = s * f + l * d + u * h + c * p,
+ g = m >= 0 ? 1 : -1,
+ A = 1 - m * m;
+ if (A > Number.EPSILON) {
+ var y = Math.sqrt(A),
+ b = Math.atan2(y, m * g);
+ (v = Math.sin(v * b) / y), (o = Math.sin(o * b) / y);
+ }
+ var x = o * g;
+ if (
+ ((s = s * v + f * x),
+ (l = l * v + d * x),
+ (u = u * v + h * x),
+ (c = c * v + p * x),
+ v === 1 - o)
+ ) {
+ var S = 1 / Math.sqrt(s * s + l * l + u * u + c * c);
+ (s *= S), (l *= S), (u *= S), (c *= S);
+ }
+ }
+ (e[t] = s),
+ (e[t + 1] = l),
+ (e[t + 2] = u),
+ (e[t + 3] = c);
+ },
+ },
+ {
+ key: "multiplyQuaternionsFlat",
+ value: function (e, t, n, r, i, a) {
+ var o = n[r],
+ s = n[r + 1],
+ l = n[r + 2],
+ u = n[r + 3],
+ c = i[a],
+ f = i[a + 1],
+ d = i[a + 2],
+ h = i[a + 3];
+ return (
+ (e[t] = o * h + u * c + s * d - l * f),
+ (e[t + 1] = s * h + u * f + l * c - o * d),
+ (e[t + 2] = l * h + u * d + o * f - s * c),
+ (e[t + 3] = u * h - o * c - s * f - l * d),
+ e
+ );
+ },
+ },
+ ]
+ ),
+ t
+ );
+ })(Symbol.iterator),
+ Vr = (function (e) {
+ function t() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0;
+ (0, m.Z)(this, t),
+ (t.prototype.isVector3 = !0),
+ (this.x = e),
+ (this.y = n),
+ (this.z = r);
+ }
+ return (
+ (0, g.Z)(t, [
+ {
+ key: "set",
+ value: function (e, t, n) {
+ return (
+ void 0 === n && (n = this.z),
+ (this.x = e),
+ (this.y = t),
+ (this.z = n),
+ this
+ );
+ },
+ },
+ {
+ key: "setScalar",
+ value: function (e) {
+ return (this.x = e), (this.y = e), (this.z = e), this;
+ },
+ },
+ {
+ key: "setX",
+ value: function (e) {
+ return (this.x = e), this;
+ },
+ },
+ {
+ key: "setY",
+ value: function (e) {
+ return (this.y = e), this;
+ },
+ },
+ {
+ key: "setZ",
+ value: function (e) {
+ return (this.z = e), this;
+ },
+ },
+ {
+ key: "setComponent",
+ value: function (e, t) {
+ switch (e) {
+ case 0:
+ this.x = t;
+ break;
+ case 1:
+ this.y = t;
+ break;
+ case 2:
+ this.z = t;
+ break;
+ default:
+ throw new Error("index is out of range: " + e);
+ }
+ return this;
+ },
+ },
+ {
+ key: "getComponent",
+ value: function (e) {
+ switch (e) {
+ case 0:
+ return this.x;
+ case 1:
+ return this.y;
+ case 2:
+ return this.z;
+ default:
+ throw new Error("index is out of range: " + e);
+ }
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(this.x, this.y, this.z);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (this.x = e.x), (this.y = e.y), (this.z = e.z), this;
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ return (
+ (this.x += e.x), (this.y += e.y), (this.z += e.z), this
+ );
+ },
+ },
+ {
+ key: "addScalar",
+ value: function (e) {
+ return (this.x += e), (this.y += e), (this.z += e), this;
+ },
+ },
+ {
+ key: "addVectors",
+ value: function (e, t) {
+ return (
+ (this.x = e.x + t.x),
+ (this.y = e.y + t.y),
+ (this.z = e.z + t.z),
+ this
+ );
+ },
+ },
+ {
+ key: "addScaledVector",
+ value: function (e, t) {
+ return (
+ (this.x += e.x * t),
+ (this.y += e.y * t),
+ (this.z += e.z * t),
+ this
+ );
+ },
+ },
+ {
+ key: "sub",
+ value: function (e) {
+ return (
+ (this.x -= e.x), (this.y -= e.y), (this.z -= e.z), this
+ );
+ },
+ },
+ {
+ key: "subScalar",
+ value: function (e) {
+ return (this.x -= e), (this.y -= e), (this.z -= e), this;
+ },
+ },
+ {
+ key: "subVectors",
+ value: function (e, t) {
+ return (
+ (this.x = e.x - t.x),
+ (this.y = e.y - t.y),
+ (this.z = e.z - t.z),
+ this
+ );
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return (
+ (this.x *= e.x), (this.y *= e.y), (this.z *= e.z), this
+ );
+ },
+ },
+ {
+ key: "multiplyScalar",
+ value: function (e) {
+ return (this.x *= e), (this.y *= e), (this.z *= e), this;
+ },
+ },
+ {
+ key: "multiplyVectors",
+ value: function (e, t) {
+ return (
+ (this.x = e.x * t.x),
+ (this.y = e.y * t.y),
+ (this.z = e.z * t.z),
+ this
+ );
+ },
+ },
+ {
+ key: "applyEuler",
+ value: function (e) {
+ return this.applyQuaternion(Wr.setFromEuler(e));
+ },
+ },
+ {
+ key: "applyAxisAngle",
+ value: function (e, t) {
+ return this.applyQuaternion(Wr.setFromAxisAngle(e, t));
+ },
+ },
+ {
+ key: "applyMatrix3",
+ value: function (e) {
+ var t = this.x,
+ n = this.y,
+ r = this.z,
+ i = e.elements;
+ return (
+ (this.x = i[0] * t + i[3] * n + i[6] * r),
+ (this.y = i[1] * t + i[4] * n + i[7] * r),
+ (this.z = i[2] * t + i[5] * n + i[8] * r),
+ this
+ );
+ },
+ },
+ {
+ key: "applyNormalMatrix",
+ value: function (e) {
+ return this.applyMatrix3(e).normalize();
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ var t = this.x,
+ n = this.y,
+ r = this.z,
+ i = e.elements,
+ a = 1 / (i[3] * t + i[7] * n + i[11] * r + i[15]);
+ return (
+ (this.x = (i[0] * t + i[4] * n + i[8] * r + i[12]) * a),
+ (this.y = (i[1] * t + i[5] * n + i[9] * r + i[13]) * a),
+ (this.z = (i[2] * t + i[6] * n + i[10] * r + i[14]) * a),
+ this
+ );
+ },
+ },
+ {
+ key: "applyQuaternion",
+ value: function (e) {
+ var t = this.x,
+ n = this.y,
+ r = this.z,
+ i = e.x,
+ a = e.y,
+ o = e.z,
+ s = e.w,
+ l = s * t + a * r - o * n,
+ u = s * n + o * t - i * r,
+ c = s * r + i * n - a * t,
+ f = -i * t - a * n - o * r;
+ return (
+ (this.x = l * s + f * -i + u * -o - c * -a),
+ (this.y = u * s + f * -a + c * -i - l * -o),
+ (this.z = c * s + f * -o + l * -a - u * -i),
+ this
+ );
+ },
+ },
+ {
+ key: "project",
+ value: function (e) {
+ return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(
+ e.projectionMatrix
+ );
+ },
+ },
+ {
+ key: "unproject",
+ value: function (e) {
+ return this.applyMatrix4(
+ e.projectionMatrixInverse
+ ).applyMatrix4(e.matrixWorld);
+ },
+ },
+ {
+ key: "transformDirection",
+ value: function (e) {
+ var t = this.x,
+ n = this.y,
+ r = this.z,
+ i = e.elements;
+ return (
+ (this.x = i[0] * t + i[4] * n + i[8] * r),
+ (this.y = i[1] * t + i[5] * n + i[9] * r),
+ (this.z = i[2] * t + i[6] * n + i[10] * r),
+ this.normalize()
+ );
+ },
+ },
+ {
+ key: "divide",
+ value: function (e) {
+ return (
+ (this.x /= e.x), (this.y /= e.y), (this.z /= e.z), this
+ );
+ },
+ },
+ {
+ key: "divideScalar",
+ value: function (e) {
+ return this.multiplyScalar(1 / e);
+ },
+ },
+ {
+ key: "min",
+ value: function (e) {
+ return (
+ (this.x = Math.min(this.x, e.x)),
+ (this.y = Math.min(this.y, e.y)),
+ (this.z = Math.min(this.z, e.z)),
+ this
+ );
+ },
+ },
+ {
+ key: "max",
+ value: function (e) {
+ return (
+ (this.x = Math.max(this.x, e.x)),
+ (this.y = Math.max(this.y, e.y)),
+ (this.z = Math.max(this.z, e.z)),
+ this
+ );
+ },
+ },
+ {
+ key: "clamp",
+ value: function (e, t) {
+ return (
+ (this.x = Math.max(e.x, Math.min(t.x, this.x))),
+ (this.y = Math.max(e.y, Math.min(t.y, this.y))),
+ (this.z = Math.max(e.z, Math.min(t.z, this.z))),
+ this
+ );
+ },
+ },
+ {
+ key: "clampScalar",
+ value: function (e, t) {
+ return (
+ (this.x = Math.max(e, Math.min(t, this.x))),
+ (this.y = Math.max(e, Math.min(t, this.y))),
+ (this.z = Math.max(e, Math.min(t, this.z))),
+ this
+ );
+ },
+ },
+ {
+ key: "clampLength",
+ value: function (e, t) {
+ var n = this.length();
+ return this.divideScalar(n || 1).multiplyScalar(
+ Math.max(e, Math.min(t, n))
+ );
+ },
+ },
+ {
+ key: "floor",
+ value: function () {
+ return (
+ (this.x = Math.floor(this.x)),
+ (this.y = Math.floor(this.y)),
+ (this.z = Math.floor(this.z)),
+ this
+ );
+ },
+ },
+ {
+ key: "ceil",
+ value: function () {
+ return (
+ (this.x = Math.ceil(this.x)),
+ (this.y = Math.ceil(this.y)),
+ (this.z = Math.ceil(this.z)),
+ this
+ );
+ },
+ },
+ {
+ key: "round",
+ value: function () {
+ return (
+ (this.x = Math.round(this.x)),
+ (this.y = Math.round(this.y)),
+ (this.z = Math.round(this.z)),
+ this
+ );
+ },
+ },
+ {
+ key: "roundToZero",
+ value: function () {
+ return (
+ (this.x = Math.trunc(this.x)),
+ (this.y = Math.trunc(this.y)),
+ (this.z = Math.trunc(this.z)),
+ this
+ );
+ },
+ },
+ {
+ key: "negate",
+ value: function () {
+ return (
+ (this.x = -this.x),
+ (this.y = -this.y),
+ (this.z = -this.z),
+ this
+ );
+ },
+ },
+ {
+ key: "dot",
+ value: function (e) {
+ return this.x * e.x + this.y * e.y + this.z * e.z;
+ },
+ },
+ {
+ key: "lengthSq",
+ value: function () {
+ return this.x * this.x + this.y * this.y + this.z * this.z;
+ },
+ },
+ {
+ key: "length",
+ value: function () {
+ return Math.sqrt(
+ this.x * this.x + this.y * this.y + this.z * this.z
+ );
+ },
+ },
+ {
+ key: "manhattanLength",
+ value: function () {
+ return (
+ Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z)
+ );
+ },
+ },
+ {
+ key: "normalize",
+ value: function () {
+ return this.divideScalar(this.length() || 1);
+ },
+ },
+ {
+ key: "setLength",
+ value: function (e) {
+ return this.normalize().multiplyScalar(e);
+ },
+ },
+ {
+ key: "lerp",
+ value: function (e, t) {
+ return (
+ (this.x += (e.x - this.x) * t),
+ (this.y += (e.y - this.y) * t),
+ (this.z += (e.z - this.z) * t),
+ this
+ );
+ },
+ },
+ {
+ key: "lerpVectors",
+ value: function (e, t, n) {
+ return (
+ (this.x = e.x + (t.x - e.x) * n),
+ (this.y = e.y + (t.y - e.y) * n),
+ (this.z = e.z + (t.z - e.z) * n),
+ this
+ );
+ },
+ },
+ {
+ key: "cross",
+ value: function (e) {
+ return this.crossVectors(this, e);
+ },
+ },
+ {
+ key: "crossVectors",
+ value: function (e, t) {
+ var n = e.x,
+ r = e.y,
+ i = e.z,
+ a = t.x,
+ o = t.y,
+ s = t.z;
+ return (
+ (this.x = r * s - i * o),
+ (this.y = i * a - n * s),
+ (this.z = n * o - r * a),
+ this
+ );
+ },
+ },
+ {
+ key: "projectOnVector",
+ value: function (e) {
+ var t = e.lengthSq();
+ if (0 === t) return this.set(0, 0, 0);
+ var n = e.dot(this) / t;
+ return this.copy(e).multiplyScalar(n);
+ },
+ },
+ {
+ key: "projectOnPlane",
+ value: function (e) {
+ return jr.copy(this).projectOnVector(e), this.sub(jr);
+ },
+ },
+ {
+ key: "reflect",
+ value: function (e) {
+ return this.sub(jr.copy(e).multiplyScalar(2 * this.dot(e)));
+ },
+ },
+ {
+ key: "angleTo",
+ value: function (e) {
+ var t = Math.sqrt(this.lengthSq() * e.lengthSq());
+ if (0 === t) return Math.PI / 2;
+ var n = this.dot(e) / t;
+ return Math.acos(rr(n, -1, 1));
+ },
+ },
+ {
+ key: "distanceTo",
+ value: function (e) {
+ return Math.sqrt(this.distanceToSquared(e));
+ },
+ },
+ {
+ key: "distanceToSquared",
+ value: function (e) {
+ var t = this.x - e.x,
+ n = this.y - e.y,
+ r = this.z - e.z;
+ return t * t + n * n + r * r;
+ },
+ },
+ {
+ key: "manhattanDistanceTo",
+ value: function (e) {
+ return (
+ Math.abs(this.x - e.x) +
+ Math.abs(this.y - e.y) +
+ Math.abs(this.z - e.z)
+ );
+ },
+ },
+ {
+ key: "setFromSpherical",
+ value: function (e) {
+ return this.setFromSphericalCoords(
+ e.radius,
+ e.phi,
+ e.theta
+ );
+ },
+ },
+ {
+ key: "setFromSphericalCoords",
+ value: function (e, t, n) {
+ var r = Math.sin(t) * e;
+ return (
+ (this.x = r * Math.sin(n)),
+ (this.y = Math.cos(t) * e),
+ (this.z = r * Math.cos(n)),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromCylindrical",
+ value: function (e) {
+ return this.setFromCylindricalCoords(
+ e.radius,
+ e.theta,
+ e.y
+ );
+ },
+ },
+ {
+ key: "setFromCylindricalCoords",
+ value: function (e, t, n) {
+ return (
+ (this.x = e * Math.sin(t)),
+ (this.y = n),
+ (this.z = e * Math.cos(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromMatrixPosition",
+ value: function (e) {
+ var t = e.elements;
+ return (
+ (this.x = t[12]), (this.y = t[13]), (this.z = t[14]), this
+ );
+ },
+ },
+ {
+ key: "setFromMatrixScale",
+ value: function (e) {
+ var t = this.setFromMatrixColumn(e, 0).length(),
+ n = this.setFromMatrixColumn(e, 1).length(),
+ r = this.setFromMatrixColumn(e, 2).length();
+ return (this.x = t), (this.y = n), (this.z = r), this;
+ },
+ },
+ {
+ key: "setFromMatrixColumn",
+ value: function (e, t) {
+ return this.fromArray(e.elements, 4 * t);
+ },
+ },
+ {
+ key: "setFromMatrix3Column",
+ value: function (e, t) {
+ return this.fromArray(e.elements, 3 * t);
+ },
+ },
+ {
+ key: "setFromEuler",
+ value: function (e) {
+ return (
+ (this.x = e._x), (this.y = e._y), (this.z = e._z), this
+ );
+ },
+ },
+ {
+ key: "setFromColor",
+ value: function (e) {
+ return (this.x = e.r), (this.y = e.g), (this.z = e.b), this;
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return e.x === this.x && e.y === this.y && e.z === this.z;
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (this.x = e[t]),
+ (this.y = e[t + 1]),
+ (this.z = e[t + 2]),
+ this
+ );
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (e[t] = this.x),
+ (e[t + 1] = this.y),
+ (e[t + 2] = this.z),
+ e
+ );
+ },
+ },
+ {
+ key: "fromBufferAttribute",
+ value: function (e, t) {
+ return (
+ (this.x = e.getX(t)),
+ (this.y = e.getY(t)),
+ (this.z = e.getZ(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "random",
+ value: function () {
+ return (
+ (this.x = Math.random()),
+ (this.y = Math.random()),
+ (this.z = Math.random()),
+ this
+ );
+ },
+ },
+ {
+ key: "randomDirection",
+ value: function () {
+ var e = 2 * (Math.random() - 0.5),
+ t = Math.random() * Math.PI * 2,
+ n = Math.sqrt(1 - Math.pow(e, 2));
+ return (
+ (this.x = n * Math.cos(t)),
+ (this.y = n * Math.sin(t)),
+ (this.z = e),
+ this
+ );
+ },
+ },
+ {
+ key: e,
+ value: (0, v.Z)().mark(function e() {
+ return (0, v.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), this.x;
+ case 2:
+ return (e.next = 4), this.y;
+ case 4:
+ return (e.next = 6), this.z;
+ case 6:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ }),
+ },
+ ]),
+ t
+ );
+ })(Symbol.iterator),
+ jr = new Vr(),
+ Wr = new Hr(),
+ Xr = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Vr(1 / 0, 1 / 0, 1 / 0),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new Vr(-1 / 0, -1 / 0, -1 / 0);
+ (0, m.Z)(this, e),
+ (this.isBox3 = !0),
+ (this.min = t),
+ (this.max = n);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t) {
+ return this.min.copy(e), this.max.copy(t), this;
+ },
+ },
+ {
+ key: "setFromArray",
+ value: function (e) {
+ this.makeEmpty();
+ for (var t = 0, n = e.length; t < n; t += 3)
+ this.expandByPoint(qr.fromArray(e, t));
+ return this;
+ },
+ },
+ {
+ key: "setFromBufferAttribute",
+ value: function (e) {
+ this.makeEmpty();
+ for (var t = 0, n = e.count; t < n; t++)
+ this.expandByPoint(qr.fromBufferAttribute(e, t));
+ return this;
+ },
+ },
+ {
+ key: "setFromPoints",
+ value: function (e) {
+ this.makeEmpty();
+ for (var t = 0, n = e.length; t < n; t++)
+ this.expandByPoint(e[t]);
+ return this;
+ },
+ },
+ {
+ key: "setFromCenterAndSize",
+ value: function (e, t) {
+ var n = qr.copy(t).multiplyScalar(0.5);
+ return (
+ this.min.copy(e).sub(n), this.max.copy(e).add(n), this
+ );
+ },
+ },
+ {
+ key: "setFromObject",
+ value: function (e) {
+ var t =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1];
+ return this.makeEmpty(), this.expandByObject(e, t);
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return this.min.copy(e.min), this.max.copy(e.max), this;
+ },
+ },
+ {
+ key: "makeEmpty",
+ value: function () {
+ return (
+ (this.min.x = this.min.y = this.min.z = 1 / 0),
+ (this.max.x = this.max.y = this.max.z = -1 / 0),
+ this
+ );
+ },
+ },
+ {
+ key: "isEmpty",
+ value: function () {
+ return (
+ this.max.x < this.min.x ||
+ this.max.y < this.min.y ||
+ this.max.z < this.min.z
+ );
+ },
+ },
+ {
+ key: "getCenter",
+ value: function (e) {
+ return this.isEmpty()
+ ? e.set(0, 0, 0)
+ : e.addVectors(this.min, this.max).multiplyScalar(0.5);
+ },
+ },
+ {
+ key: "getSize",
+ value: function (e) {
+ return this.isEmpty()
+ ? e.set(0, 0, 0)
+ : e.subVectors(this.max, this.min);
+ },
+ },
+ {
+ key: "expandByPoint",
+ value: function (e) {
+ return this.min.min(e), this.max.max(e), this;
+ },
+ },
+ {
+ key: "expandByVector",
+ value: function (e) {
+ return this.min.sub(e), this.max.add(e), this;
+ },
+ },
+ {
+ key: "expandByScalar",
+ value: function (e) {
+ return this.min.addScalar(-e), this.max.addScalar(e), this;
+ },
+ },
+ {
+ key: "expandByObject",
+ value: function (e) {
+ var t =
+ arguments.length > 1 &&
+ void 0 !== arguments[1] &&
+ arguments[1];
+ if ((e.updateWorldMatrix(!1, !1), void 0 !== e.boundingBox))
+ null === e.boundingBox && e.computeBoundingBox(),
+ Jr.copy(e.boundingBox),
+ Jr.applyMatrix4(e.matrixWorld),
+ this.union(Jr);
+ else {
+ var n = e.geometry;
+ if (void 0 !== n)
+ if (
+ t &&
+ void 0 !== n.attributes &&
+ void 0 !== n.attributes.position
+ )
+ for (
+ var r = n.attributes.position, i = 0, a = r.count;
+ i < a;
+ i++
+ )
+ qr
+ .fromBufferAttribute(r, i)
+ .applyMatrix4(e.matrixWorld),
+ this.expandByPoint(qr);
+ else
+ null === n.boundingBox && n.computeBoundingBox(),
+ Jr.copy(n.boundingBox),
+ Jr.applyMatrix4(e.matrixWorld),
+ this.union(Jr);
+ }
+ for (var o = e.children, s = 0, l = o.length; s < l; s++)
+ this.expandByObject(o[s], t);
+ return this;
+ },
+ },
+ {
+ key: "containsPoint",
+ value: function (e) {
+ return !(
+ e.x < this.min.x ||
+ e.x > this.max.x ||
+ e.y < this.min.y ||
+ e.y > this.max.y ||
+ e.z < this.min.z ||
+ e.z > this.max.z
+ );
+ },
+ },
+ {
+ key: "containsBox",
+ value: function (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 &&
+ this.min.z <= e.min.z &&
+ e.max.z <= this.max.z
+ );
+ },
+ },
+ {
+ key: "getParameter",
+ value: function (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),
+ (e.z - this.min.z) / (this.max.z - this.min.z)
+ );
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ return !(
+ e.max.x < this.min.x ||
+ e.min.x > this.max.x ||
+ e.max.y < this.min.y ||
+ e.min.y > this.max.y ||
+ e.max.z < this.min.z ||
+ e.min.z > this.max.z
+ );
+ },
+ },
+ {
+ key: "intersectsSphere",
+ value: function (e) {
+ return (
+ this.clampPoint(e.center, qr),
+ qr.distanceToSquared(e.center) <= e.radius * e.radius
+ );
+ },
+ },
+ {
+ key: "intersectsPlane",
+ value: function (e) {
+ var t, n;
+ return (
+ e.normal.x > 0
+ ? ((t = e.normal.x * this.min.x),
+ (n = e.normal.x * this.max.x))
+ : ((t = e.normal.x * this.max.x),
+ (n = e.normal.x * this.min.x)),
+ e.normal.y > 0
+ ? ((t += e.normal.y * this.min.y),
+ (n += e.normal.y * this.max.y))
+ : ((t += e.normal.y * this.max.y),
+ (n += e.normal.y * this.min.y)),
+ e.normal.z > 0
+ ? ((t += e.normal.z * this.min.z),
+ (n += e.normal.z * this.max.z))
+ : ((t += e.normal.z * this.max.z),
+ (n += e.normal.z * this.min.z)),
+ t <= -e.constant && n >= -e.constant
+ );
+ },
+ },
+ {
+ key: "intersectsTriangle",
+ value: function (e) {
+ if (this.isEmpty()) return !1;
+ this.getCenter(ii),
+ ai.subVectors(this.max, ii),
+ Kr.subVectors(e.a, ii),
+ $r.subVectors(e.b, ii),
+ ei.subVectors(e.c, ii),
+ ti.subVectors($r, Kr),
+ ni.subVectors(ei, $r),
+ ri.subVectors(Kr, ei);
+ var t = [
+ 0,
+ -ti.z,
+ ti.y,
+ 0,
+ -ni.z,
+ ni.y,
+ 0,
+ -ri.z,
+ ri.y,
+ ti.z,
+ 0,
+ -ti.x,
+ ni.z,
+ 0,
+ -ni.x,
+ ri.z,
+ 0,
+ -ri.x,
+ -ti.y,
+ ti.x,
+ 0,
+ -ni.y,
+ ni.x,
+ 0,
+ -ri.y,
+ ri.x,
+ 0,
+ ];
+ return (
+ !!li(t, Kr, $r, ei, ai) &&
+ !!li((t = [1, 0, 0, 0, 1, 0, 0, 0, 1]), Kr, $r, ei, ai) &&
+ (oi.crossVectors(ti, ni),
+ li((t = [oi.x, oi.y, oi.z]), Kr, $r, ei, ai))
+ );
+ },
+ },
+ {
+ key: "clampPoint",
+ value: function (e, t) {
+ return t.copy(e).clamp(this.min, this.max);
+ },
+ },
+ {
+ key: "distanceToPoint",
+ value: function (e) {
+ return this.clampPoint(e, qr).distanceTo(e);
+ },
+ },
+ {
+ key: "getBoundingSphere",
+ value: function (e) {
+ return (
+ this.isEmpty()
+ ? e.makeEmpty()
+ : (this.getCenter(e.center),
+ (e.radius = 0.5 * this.getSize(qr).length())),
+ e
+ );
+ },
+ },
+ {
+ key: "intersect",
+ value: function (e) {
+ return (
+ this.min.max(e.min),
+ this.max.min(e.max),
+ this.isEmpty() && this.makeEmpty(),
+ this
+ );
+ },
+ },
+ {
+ key: "union",
+ value: function (e) {
+ return this.min.min(e.min), this.max.max(e.max), this;
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ return (
+ this.isEmpty() ||
+ (Yr[0]
+ .set(this.min.x, this.min.y, this.min.z)
+ .applyMatrix4(e),
+ Yr[1]
+ .set(this.min.x, this.min.y, this.max.z)
+ .applyMatrix4(e),
+ Yr[2]
+ .set(this.min.x, this.max.y, this.min.z)
+ .applyMatrix4(e),
+ Yr[3]
+ .set(this.min.x, this.max.y, this.max.z)
+ .applyMatrix4(e),
+ Yr[4]
+ .set(this.max.x, this.min.y, this.min.z)
+ .applyMatrix4(e),
+ Yr[5]
+ .set(this.max.x, this.min.y, this.max.z)
+ .applyMatrix4(e),
+ Yr[6]
+ .set(this.max.x, this.max.y, this.min.z)
+ .applyMatrix4(e),
+ Yr[7]
+ .set(this.max.x, this.max.y, this.max.z)
+ .applyMatrix4(e),
+ this.setFromPoints(Yr)),
+ this
+ );
+ },
+ },
+ {
+ key: "translate",
+ value: function (e) {
+ return this.min.add(e), this.max.add(e), this;
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return e.min.equals(this.min) && e.max.equals(this.max);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Yr = [
+ new Vr(),
+ new Vr(),
+ new Vr(),
+ new Vr(),
+ new Vr(),
+ new Vr(),
+ new Vr(),
+ new Vr(),
+ ],
+ qr = new Vr(),
+ Jr = new Xr(),
+ Kr = new Vr(),
+ $r = new Vr(),
+ ei = new Vr(),
+ ti = new Vr(),
+ ni = new Vr(),
+ ri = new Vr(),
+ ii = new Vr(),
+ ai = new Vr(),
+ oi = new Vr(),
+ si = new Vr();
+ function li(e, t, n, r, i) {
+ for (var a = 0, o = e.length - 3; a <= o; a += 3) {
+ si.fromArray(e, a);
+ var s =
+ i.x * Math.abs(si.x) +
+ i.y * Math.abs(si.y) +
+ i.z * Math.abs(si.z),
+ l = t.dot(si),
+ u = n.dot(si),
+ c = r.dot(si);
+ if (Math.max(-Math.max(l, u, c), Math.min(l, u, c)) > s) return !1;
+ }
+ return !0;
+ }
+ var ui = new Xr(),
+ ci = new Vr(),
+ fi = new Vr(),
+ di = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Vr(),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : -1;
+ (0, m.Z)(this, e), (this.center = t), (this.radius = n);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t) {
+ return this.center.copy(e), (this.radius = t), this;
+ },
+ },
+ {
+ key: "setFromPoints",
+ value: function (e, t) {
+ var n = this.center;
+ void 0 !== t ? n.copy(t) : ui.setFromPoints(e).getCenter(n);
+ for (var r = 0, i = 0, a = e.length; i < a; i++)
+ r = Math.max(r, n.distanceToSquared(e[i]));
+ return (this.radius = Math.sqrt(r)), this;
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ this.center.copy(e.center), (this.radius = e.radius), this
+ );
+ },
+ },
+ {
+ key: "isEmpty",
+ value: function () {
+ return this.radius < 0;
+ },
+ },
+ {
+ key: "makeEmpty",
+ value: function () {
+ return this.center.set(0, 0, 0), (this.radius = -1), this;
+ },
+ },
+ {
+ key: "containsPoint",
+ value: function (e) {
+ return (
+ e.distanceToSquared(this.center) <=
+ this.radius * this.radius
+ );
+ },
+ },
+ {
+ key: "distanceToPoint",
+ value: function (e) {
+ return e.distanceTo(this.center) - this.radius;
+ },
+ },
+ {
+ key: "intersectsSphere",
+ value: function (e) {
+ var t = this.radius + e.radius;
+ return e.center.distanceToSquared(this.center) <= t * t;
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ return e.intersectsSphere(this);
+ },
+ },
+ {
+ key: "intersectsPlane",
+ value: function (e) {
+ return (
+ Math.abs(e.distanceToPoint(this.center)) <= this.radius
+ );
+ },
+ },
+ {
+ key: "clampPoint",
+ value: function (e, t) {
+ var n = this.center.distanceToSquared(e);
+ return (
+ t.copy(e),
+ n > this.radius * this.radius &&
+ (t.sub(this.center).normalize(),
+ t.multiplyScalar(this.radius).add(this.center)),
+ t
+ );
+ },
+ },
+ {
+ key: "getBoundingBox",
+ value: function (e) {
+ return this.isEmpty()
+ ? (e.makeEmpty(), e)
+ : (e.set(this.center, this.center),
+ e.expandByScalar(this.radius),
+ e);
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ return (
+ this.center.applyMatrix4(e),
+ (this.radius = this.radius * e.getMaxScaleOnAxis()),
+ this
+ );
+ },
+ },
+ {
+ key: "translate",
+ value: function (e) {
+ return this.center.add(e), this;
+ },
+ },
+ {
+ key: "expandByPoint",
+ value: function (e) {
+ if (this.isEmpty())
+ return this.center.copy(e), (this.radius = 0), this;
+ ci.subVectors(e, this.center);
+ var t = ci.lengthSq();
+ if (t > this.radius * this.radius) {
+ var n = Math.sqrt(t),
+ r = 0.5 * (n - this.radius);
+ this.center.addScaledVector(ci, r / n),
+ (this.radius += r);
+ }
+ return this;
+ },
+ },
+ {
+ key: "union",
+ value: function (e) {
+ return e.isEmpty()
+ ? this
+ : this.isEmpty()
+ ? (this.copy(e), this)
+ : (!0 === this.center.equals(e.center)
+ ? (this.radius = Math.max(this.radius, e.radius))
+ : (fi
+ .subVectors(e.center, this.center)
+ .setLength(e.radius),
+ this.expandByPoint(ci.copy(e.center).add(fi)),
+ this.expandByPoint(ci.copy(e.center).sub(fi))),
+ this);
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e.center.equals(this.center) && e.radius === this.radius
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ hi = new Vr(),
+ pi = new Vr(),
+ vi = new Vr(),
+ mi = new Vr(),
+ gi = new Vr(),
+ Ai = new Vr(),
+ yi = new Vr(),
+ bi = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Vr(),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new Vr(0, 0, -1);
+ (0, m.Z)(this, e), (this.origin = t), (this.direction = n);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t) {
+ return this.origin.copy(e), this.direction.copy(t), this;
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ this.origin.copy(e.origin),
+ this.direction.copy(e.direction),
+ this
+ );
+ },
+ },
+ {
+ key: "at",
+ value: function (e, t) {
+ return t
+ .copy(this.origin)
+ .addScaledVector(this.direction, e);
+ },
+ },
+ {
+ key: "lookAt",
+ value: function (e) {
+ return (
+ this.direction.copy(e).sub(this.origin).normalize(), this
+ );
+ },
+ },
+ {
+ key: "recast",
+ value: function (e) {
+ return this.origin.copy(this.at(e, hi)), this;
+ },
+ },
+ {
+ key: "closestPointToPoint",
+ value: function (e, t) {
+ t.subVectors(e, this.origin);
+ var n = t.dot(this.direction);
+ return n < 0
+ ? t.copy(this.origin)
+ : t.copy(this.origin).addScaledVector(this.direction, n);
+ },
+ },
+ {
+ key: "distanceToPoint",
+ value: function (e) {
+ return Math.sqrt(this.distanceSqToPoint(e));
+ },
+ },
+ {
+ key: "distanceSqToPoint",
+ value: function (e) {
+ var t = hi.subVectors(e, this.origin).dot(this.direction);
+ return t < 0
+ ? this.origin.distanceToSquared(e)
+ : (hi
+ .copy(this.origin)
+ .addScaledVector(this.direction, t),
+ hi.distanceToSquared(e));
+ },
+ },
+ {
+ key: "distanceSqToSegment",
+ value: function (e, t, n, r) {
+ pi.copy(e).add(t).multiplyScalar(0.5),
+ vi.copy(t).sub(e).normalize(),
+ mi.copy(this.origin).sub(pi);
+ var i,
+ a,
+ o,
+ s,
+ l = 0.5 * e.distanceTo(t),
+ u = -this.direction.dot(vi),
+ c = mi.dot(this.direction),
+ f = -mi.dot(vi),
+ d = mi.lengthSq(),
+ h = Math.abs(1 - u * u);
+ if (h > 0)
+ if (((a = u * c - f), (s = l * h), (i = u * f - c) >= 0))
+ if (a >= -s)
+ if (a <= s) {
+ var p = 1 / h;
+ o =
+ (i *= p) * (i + u * (a *= p) + 2 * c) +
+ a * (u * i + a + 2 * f) +
+ d;
+ } else
+ (a = l),
+ (o =
+ -(i = Math.max(0, -(u * a + c))) * i +
+ a * (a + 2 * f) +
+ d);
+ else
+ (a = -l),
+ (o =
+ -(i = Math.max(0, -(u * a + c))) * i +
+ a * (a + 2 * f) +
+ d);
+ else
+ a <= -s
+ ? (o =
+ -(i = Math.max(0, -(-u * l + c))) * i +
+ (a = i > 0 ? -l : Math.min(Math.max(-l, -f), l)) *
+ (a + 2 * f) +
+ d)
+ : a <= s
+ ? ((i = 0),
+ (o =
+ (a = Math.min(Math.max(-l, -f), l)) *
+ (a + 2 * f) +
+ d))
+ : (o =
+ -(i = Math.max(0, -(u * l + c))) * i +
+ (a = i > 0 ? l : Math.min(Math.max(-l, -f), l)) *
+ (a + 2 * f) +
+ d);
+ else
+ (a = u > 0 ? -l : l),
+ (o =
+ -(i = Math.max(0, -(u * a + c))) * i +
+ a * (a + 2 * f) +
+ d);
+ return (
+ n &&
+ n.copy(this.origin).addScaledVector(this.direction, i),
+ r && r.copy(pi).addScaledVector(vi, a),
+ o
+ );
+ },
+ },
+ {
+ key: "intersectSphere",
+ value: function (e, t) {
+ hi.subVectors(e.center, this.origin);
+ var n = hi.dot(this.direction),
+ r = hi.dot(hi) - n * n,
+ i = e.radius * e.radius;
+ if (r > i) return null;
+ var a = Math.sqrt(i - r),
+ o = n - a,
+ s = n + a;
+ return s < 0 ? null : o < 0 ? this.at(s, t) : this.at(o, t);
+ },
+ },
+ {
+ key: "intersectsSphere",
+ value: function (e) {
+ return (
+ this.distanceSqToPoint(e.center) <= e.radius * e.radius
+ );
+ },
+ },
+ {
+ key: "distanceToPlane",
+ value: function (e) {
+ var t = e.normal.dot(this.direction);
+ if (0 === t)
+ return 0 === e.distanceToPoint(this.origin) ? 0 : null;
+ var n = -(this.origin.dot(e.normal) + e.constant) / t;
+ return n >= 0 ? n : null;
+ },
+ },
+ {
+ key: "intersectPlane",
+ value: function (e, t) {
+ var n = this.distanceToPlane(e);
+ return null === n ? null : this.at(n, t);
+ },
+ },
+ {
+ key: "intersectsPlane",
+ value: function (e) {
+ var t = e.distanceToPoint(this.origin);
+ return 0 === t || e.normal.dot(this.direction) * t < 0;
+ },
+ },
+ {
+ key: "intersectBox",
+ value: function (e, t) {
+ var n,
+ r,
+ i,
+ a,
+ o,
+ s,
+ l = 1 / this.direction.x,
+ u = 1 / this.direction.y,
+ c = 1 / this.direction.z,
+ f = this.origin;
+ return (
+ l >= 0
+ ? ((n = (e.min.x - f.x) * l), (r = (e.max.x - f.x) * l))
+ : ((n = (e.max.x - f.x) * l),
+ (r = (e.min.x - f.x) * l)),
+ u >= 0
+ ? ((i = (e.min.y - f.y) * u), (a = (e.max.y - f.y) * u))
+ : ((i = (e.max.y - f.y) * u),
+ (a = (e.min.y - f.y) * u)),
+ n > a || i > r
+ ? null
+ : ((i > n || isNaN(n)) && (n = i),
+ (a < r || isNaN(r)) && (r = a),
+ c >= 0
+ ? ((o = (e.min.z - f.z) * c),
+ (s = (e.max.z - f.z) * c))
+ : ((o = (e.max.z - f.z) * c),
+ (s = (e.min.z - f.z) * c)),
+ n > s || o > r
+ ? null
+ : ((o > n || n !== n) && (n = o),
+ (s < r || r !== r) && (r = s),
+ r < 0 ? null : this.at(n >= 0 ? n : r, t)))
+ );
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ return null !== this.intersectBox(e, hi);
+ },
+ },
+ {
+ key: "intersectTriangle",
+ value: function (e, t, n, r, i) {
+ gi.subVectors(t, e),
+ Ai.subVectors(n, e),
+ yi.crossVectors(gi, Ai);
+ var a,
+ o = this.direction.dot(yi);
+ if (o > 0) {
+ if (r) return null;
+ a = 1;
+ } else {
+ if (!(o < 0)) return null;
+ (a = -1), (o = -o);
+ }
+ mi.subVectors(this.origin, e);
+ var s = a * this.direction.dot(Ai.crossVectors(mi, Ai));
+ if (s < 0) return null;
+ var l = a * this.direction.dot(gi.cross(mi));
+ if (l < 0) return null;
+ if (s + l > o) return null;
+ var u = -a * mi.dot(yi);
+ return u < 0 ? null : this.at(u / o, i);
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ return (
+ this.origin.applyMatrix4(e),
+ this.direction.transformDirection(e),
+ this
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e.origin.equals(this.origin) &&
+ e.direction.equals(this.direction)
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ xi = (function () {
+ function e(t, n, r, i, a, o, s, l, u, c, f, d, h, p, v, g) {
+ (0, m.Z)(this, e),
+ (e.prototype.isMatrix4 = !0),
+ (this.elements = [
+ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1,
+ ]),
+ void 0 !== t &&
+ this.set(t, n, r, i, a, o, s, l, u, c, f, d, h, p, v, g);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (
+ e,
+ t,
+ n,
+ r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f,
+ d,
+ h,
+ p,
+ v
+ ) {
+ var m = this.elements;
+ return (
+ (m[0] = e),
+ (m[4] = t),
+ (m[8] = n),
+ (m[12] = r),
+ (m[1] = i),
+ (m[5] = a),
+ (m[9] = o),
+ (m[13] = s),
+ (m[2] = l),
+ (m[6] = u),
+ (m[10] = c),
+ (m[14] = f),
+ (m[3] = d),
+ (m[7] = h),
+ (m[11] = p),
+ (m[15] = v),
+ this
+ );
+ },
+ },
+ {
+ key: "identity",
+ value: function () {
+ return (
+ this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new e().fromArray(this.elements);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ var t = this.elements,
+ n = e.elements;
+ return (
+ (t[0] = n[0]),
+ (t[1] = n[1]),
+ (t[2] = n[2]),
+ (t[3] = n[3]),
+ (t[4] = n[4]),
+ (t[5] = n[5]),
+ (t[6] = n[6]),
+ (t[7] = n[7]),
+ (t[8] = n[8]),
+ (t[9] = n[9]),
+ (t[10] = n[10]),
+ (t[11] = n[11]),
+ (t[12] = n[12]),
+ (t[13] = n[13]),
+ (t[14] = n[14]),
+ (t[15] = n[15]),
+ this
+ );
+ },
+ },
+ {
+ key: "copyPosition",
+ value: function (e) {
+ var t = this.elements,
+ n = e.elements;
+ return (
+ (t[12] = n[12]), (t[13] = n[13]), (t[14] = n[14]), this
+ );
+ },
+ },
+ {
+ key: "setFromMatrix3",
+ value: function (e) {
+ var t = e.elements;
+ return (
+ this.set(
+ t[0],
+ t[3],
+ t[6],
+ 0,
+ t[1],
+ t[4],
+ t[7],
+ 0,
+ t[2],
+ t[5],
+ t[8],
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "extractBasis",
+ value: function (e, t, n) {
+ return (
+ e.setFromMatrixColumn(this, 0),
+ t.setFromMatrixColumn(this, 1),
+ n.setFromMatrixColumn(this, 2),
+ this
+ );
+ },
+ },
+ {
+ key: "makeBasis",
+ value: function (e, t, n) {
+ return (
+ this.set(
+ e.x,
+ t.x,
+ n.x,
+ 0,
+ e.y,
+ t.y,
+ n.y,
+ 0,
+ e.z,
+ t.z,
+ n.z,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "extractRotation",
+ value: function (e) {
+ var t = this.elements,
+ n = e.elements,
+ r = 1 / Si.setFromMatrixColumn(e, 0).length(),
+ i = 1 / Si.setFromMatrixColumn(e, 1).length(),
+ a = 1 / Si.setFromMatrixColumn(e, 2).length();
+ return (
+ (t[0] = n[0] * r),
+ (t[1] = n[1] * r),
+ (t[2] = n[2] * r),
+ (t[3] = 0),
+ (t[4] = n[4] * i),
+ (t[5] = n[5] * i),
+ (t[6] = n[6] * i),
+ (t[7] = 0),
+ (t[8] = n[8] * a),
+ (t[9] = n[9] * a),
+ (t[10] = n[10] * a),
+ (t[11] = 0),
+ (t[12] = 0),
+ (t[13] = 0),
+ (t[14] = 0),
+ (t[15] = 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotationFromEuler",
+ value: function (e) {
+ var t = this.elements,
+ n = e.x,
+ r = e.y,
+ i = e.z,
+ a = Math.cos(n),
+ o = Math.sin(n),
+ s = Math.cos(r),
+ l = Math.sin(r),
+ u = Math.cos(i),
+ c = Math.sin(i);
+ if ("XYZ" === e.order) {
+ var f = a * u,
+ d = a * c,
+ h = o * u,
+ p = o * c;
+ (t[0] = s * u),
+ (t[4] = -s * c),
+ (t[8] = l),
+ (t[1] = d + h * l),
+ (t[5] = f - p * l),
+ (t[9] = -o * s),
+ (t[2] = p - f * l),
+ (t[6] = h + d * l),
+ (t[10] = a * s);
+ } else if ("YXZ" === e.order) {
+ var v = s * u,
+ m = s * c,
+ g = l * u,
+ A = l * c;
+ (t[0] = v + A * o),
+ (t[4] = g * o - m),
+ (t[8] = a * l),
+ (t[1] = a * c),
+ (t[5] = a * u),
+ (t[9] = -o),
+ (t[2] = m * o - g),
+ (t[6] = A + v * o),
+ (t[10] = a * s);
+ } else if ("ZXY" === e.order) {
+ var y = s * u,
+ b = s * c,
+ x = l * u,
+ S = l * c;
+ (t[0] = y - S * o),
+ (t[4] = -a * c),
+ (t[8] = x + b * o),
+ (t[1] = b + x * o),
+ (t[5] = a * u),
+ (t[9] = S - y * o),
+ (t[2] = -a * l),
+ (t[6] = o),
+ (t[10] = a * s);
+ } else if ("ZYX" === e.order) {
+ var E = a * u,
+ _ = a * c,
+ C = o * u,
+ w = o * c;
+ (t[0] = s * u),
+ (t[4] = C * l - _),
+ (t[8] = E * l + w),
+ (t[1] = s * c),
+ (t[5] = w * l + E),
+ (t[9] = _ * l - C),
+ (t[2] = -l),
+ (t[6] = o * s),
+ (t[10] = a * s);
+ } else if ("YZX" === e.order) {
+ var T = a * s,
+ M = a * l,
+ I = o * s,
+ k = o * l;
+ (t[0] = s * u),
+ (t[4] = k - T * c),
+ (t[8] = I * c + M),
+ (t[1] = c),
+ (t[5] = a * u),
+ (t[9] = -o * u),
+ (t[2] = -l * u),
+ (t[6] = M * c + I),
+ (t[10] = T - k * c);
+ } else if ("XZY" === e.order) {
+ var R = a * s,
+ B = a * l,
+ P = o * s,
+ L = o * l;
+ (t[0] = s * u),
+ (t[4] = -c),
+ (t[8] = l * u),
+ (t[1] = R * c + L),
+ (t[5] = a * u),
+ (t[9] = B * c - P),
+ (t[2] = P * c - B),
+ (t[6] = o * u),
+ (t[10] = L * c + R);
+ }
+ return (
+ (t[3] = 0),
+ (t[7] = 0),
+ (t[11] = 0),
+ (t[12] = 0),
+ (t[13] = 0),
+ (t[14] = 0),
+ (t[15] = 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotationFromQuaternion",
+ value: function (e) {
+ return this.compose(_i, e, Ci);
+ },
+ },
+ {
+ key: "lookAt",
+ value: function (e, t, n) {
+ var r = this.elements;
+ return (
+ Mi.subVectors(e, t),
+ 0 === Mi.lengthSq() && (Mi.z = 1),
+ Mi.normalize(),
+ wi.crossVectors(n, Mi),
+ 0 === wi.lengthSq() &&
+ (1 === Math.abs(n.z) ? (Mi.x += 1e-4) : (Mi.z += 1e-4),
+ Mi.normalize(),
+ wi.crossVectors(n, Mi)),
+ wi.normalize(),
+ Ti.crossVectors(Mi, wi),
+ (r[0] = wi.x),
+ (r[4] = Ti.x),
+ (r[8] = Mi.x),
+ (r[1] = wi.y),
+ (r[5] = Ti.y),
+ (r[9] = Mi.y),
+ (r[2] = wi.z),
+ (r[6] = Ti.z),
+ (r[10] = Mi.z),
+ this
+ );
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return this.multiplyMatrices(this, e);
+ },
+ },
+ {
+ key: "premultiply",
+ value: function (e) {
+ return this.multiplyMatrices(e, this);
+ },
+ },
+ {
+ key: "multiplyMatrices",
+ value: function (e, t) {
+ var n = e.elements,
+ r = t.elements,
+ i = this.elements,
+ a = n[0],
+ o = n[4],
+ s = n[8],
+ l = n[12],
+ u = n[1],
+ c = n[5],
+ f = n[9],
+ d = n[13],
+ h = n[2],
+ p = n[6],
+ v = n[10],
+ m = n[14],
+ g = n[3],
+ A = n[7],
+ y = n[11],
+ b = n[15],
+ x = r[0],
+ S = r[4],
+ E = r[8],
+ _ = r[12],
+ C = r[1],
+ w = r[5],
+ T = r[9],
+ M = r[13],
+ I = r[2],
+ k = r[6],
+ R = r[10],
+ B = r[14],
+ P = r[3],
+ L = r[7],
+ D = r[11],
+ U = r[15];
+ return (
+ (i[0] = a * x + o * C + s * I + l * P),
+ (i[4] = a * S + o * w + s * k + l * L),
+ (i[8] = a * E + o * T + s * R + l * D),
+ (i[12] = a * _ + o * M + s * B + l * U),
+ (i[1] = u * x + c * C + f * I + d * P),
+ (i[5] = u * S + c * w + f * k + d * L),
+ (i[9] = u * E + c * T + f * R + d * D),
+ (i[13] = u * _ + c * M + f * B + d * U),
+ (i[2] = h * x + p * C + v * I + m * P),
+ (i[6] = h * S + p * w + v * k + m * L),
+ (i[10] = h * E + p * T + v * R + m * D),
+ (i[14] = h * _ + p * M + v * B + m * U),
+ (i[3] = g * x + A * C + y * I + b * P),
+ (i[7] = g * S + A * w + y * k + b * L),
+ (i[11] = g * E + A * T + y * R + b * D),
+ (i[15] = g * _ + A * M + y * B + b * U),
+ this
+ );
+ },
+ },
+ {
+ key: "multiplyScalar",
+ value: function (e) {
+ var t = this.elements;
+ return (
+ (t[0] *= e),
+ (t[4] *= e),
+ (t[8] *= e),
+ (t[12] *= e),
+ (t[1] *= e),
+ (t[5] *= e),
+ (t[9] *= e),
+ (t[13] *= e),
+ (t[2] *= e),
+ (t[6] *= e),
+ (t[10] *= e),
+ (t[14] *= e),
+ (t[3] *= e),
+ (t[7] *= e),
+ (t[11] *= e),
+ (t[15] *= e),
+ this
+ );
+ },
+ },
+ {
+ key: "determinant",
+ value: function () {
+ var e = this.elements,
+ t = e[0],
+ n = e[4],
+ r = e[8],
+ i = e[12],
+ a = e[1],
+ o = e[5],
+ s = e[9],
+ l = e[13],
+ u = e[2],
+ c = e[6],
+ f = e[10],
+ d = e[14];
+ return (
+ e[3] *
+ (+i * s * c -
+ r * l * c -
+ i * o * f +
+ n * l * f +
+ r * o * d -
+ n * s * d) +
+ e[7] *
+ (+t * s * d -
+ t * l * f +
+ i * a * f -
+ r * a * d +
+ r * l * u -
+ i * s * u) +
+ e[11] *
+ (+t * l * c -
+ t * o * d -
+ i * a * c +
+ n * a * d +
+ i * o * u -
+ n * l * u) +
+ e[15] *
+ (-r * o * u -
+ t * s * c +
+ t * o * f +
+ r * a * c -
+ n * a * f +
+ n * s * u)
+ );
+ },
+ },
+ {
+ key: "transpose",
+ value: function () {
+ var e,
+ t = this.elements;
+ return (
+ (e = t[1]),
+ (t[1] = t[4]),
+ (t[4] = e),
+ (e = t[2]),
+ (t[2] = t[8]),
+ (t[8] = e),
+ (e = t[6]),
+ (t[6] = t[9]),
+ (t[9] = e),
+ (e = t[3]),
+ (t[3] = t[12]),
+ (t[12] = e),
+ (e = t[7]),
+ (t[7] = t[13]),
+ (t[13] = e),
+ (e = t[11]),
+ (t[11] = t[14]),
+ (t[14] = e),
+ this
+ );
+ },
+ },
+ {
+ key: "setPosition",
+ value: function (e, t, n) {
+ var r = this.elements;
+ return (
+ e.isVector3
+ ? ((r[12] = e.x), (r[13] = e.y), (r[14] = e.z))
+ : ((r[12] = e), (r[13] = t), (r[14] = n)),
+ this
+ );
+ },
+ },
+ {
+ key: "invert",
+ value: function () {
+ var e = this.elements,
+ t = e[0],
+ n = e[1],
+ r = e[2],
+ i = e[3],
+ a = e[4],
+ o = e[5],
+ s = e[6],
+ l = e[7],
+ u = e[8],
+ c = e[9],
+ f = e[10],
+ d = e[11],
+ h = e[12],
+ p = e[13],
+ v = e[14],
+ m = e[15],
+ g =
+ c * v * l -
+ p * f * l +
+ p * s * d -
+ o * v * d -
+ c * s * m +
+ o * f * m,
+ A =
+ h * f * l -
+ u * v * l -
+ h * s * d +
+ a * v * d +
+ u * s * m -
+ a * f * m,
+ y =
+ u * p * l -
+ h * c * l +
+ h * o * d -
+ a * p * d -
+ u * o * m +
+ a * c * m,
+ b =
+ h * c * s -
+ u * p * s -
+ h * o * f +
+ a * p * f +
+ u * o * v -
+ a * c * v,
+ x = t * g + n * A + r * y + i * b;
+ if (0 === x)
+ return this.set(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0
+ );
+ var S = 1 / x;
+ return (
+ (e[0] = g * S),
+ (e[1] =
+ (p * f * i -
+ c * v * i -
+ p * r * d +
+ n * v * d +
+ c * r * m -
+ n * f * m) *
+ S),
+ (e[2] =
+ (o * v * i -
+ p * s * i +
+ p * r * l -
+ n * v * l -
+ o * r * m +
+ n * s * m) *
+ S),
+ (e[3] =
+ (c * s * i -
+ o * f * i -
+ c * r * l +
+ n * f * l +
+ o * r * d -
+ n * s * d) *
+ S),
+ (e[4] = A * S),
+ (e[5] =
+ (u * v * i -
+ h * f * i +
+ h * r * d -
+ t * v * d -
+ u * r * m +
+ t * f * m) *
+ S),
+ (e[6] =
+ (h * s * i -
+ a * v * i -
+ h * r * l +
+ t * v * l +
+ a * r * m -
+ t * s * m) *
+ S),
+ (e[7] =
+ (a * f * i -
+ u * s * i +
+ u * r * l -
+ t * f * l -
+ a * r * d +
+ t * s * d) *
+ S),
+ (e[8] = y * S),
+ (e[9] =
+ (h * c * i -
+ u * p * i -
+ h * n * d +
+ t * p * d +
+ u * n * m -
+ t * c * m) *
+ S),
+ (e[10] =
+ (a * p * i -
+ h * o * i +
+ h * n * l -
+ t * p * l -
+ a * n * m +
+ t * o * m) *
+ S),
+ (e[11] =
+ (u * o * i -
+ a * c * i -
+ u * n * l +
+ t * c * l +
+ a * n * d -
+ t * o * d) *
+ S),
+ (e[12] = b * S),
+ (e[13] =
+ (u * p * r -
+ h * c * r +
+ h * n * f -
+ t * p * f -
+ u * n * v +
+ t * c * v) *
+ S),
+ (e[14] =
+ (h * o * r -
+ a * p * r -
+ h * n * s +
+ t * p * s +
+ a * n * v -
+ t * o * v) *
+ S),
+ (e[15] =
+ (a * c * r -
+ u * o * r +
+ u * n * s -
+ t * c * s -
+ a * n * f +
+ t * o * f) *
+ S),
+ this
+ );
+ },
+ },
+ {
+ key: "scale",
+ value: function (e) {
+ var t = this.elements,
+ n = e.x,
+ r = e.y,
+ i = e.z;
+ return (
+ (t[0] *= n),
+ (t[4] *= r),
+ (t[8] *= i),
+ (t[1] *= n),
+ (t[5] *= r),
+ (t[9] *= i),
+ (t[2] *= n),
+ (t[6] *= r),
+ (t[10] *= i),
+ (t[3] *= n),
+ (t[7] *= r),
+ (t[11] *= i),
+ this
+ );
+ },
+ },
+ {
+ key: "getMaxScaleOnAxis",
+ value: function () {
+ var e = this.elements,
+ t = e[0] * e[0] + e[1] * e[1] + e[2] * e[2],
+ n = e[4] * e[4] + e[5] * e[5] + e[6] * e[6],
+ r = e[8] * e[8] + e[9] * e[9] + e[10] * e[10];
+ return Math.sqrt(Math.max(t, n, r));
+ },
+ },
+ {
+ key: "makeTranslation",
+ value: function (e, t, n) {
+ return (
+ e.isVector3
+ ? this.set(
+ 1,
+ 0,
+ 0,
+ e.x,
+ 0,
+ 1,
+ 0,
+ e.y,
+ 0,
+ 0,
+ 1,
+ e.z,
+ 0,
+ 0,
+ 0,
+ 1
+ )
+ : this.set(
+ 1,
+ 0,
+ 0,
+ e,
+ 0,
+ 1,
+ 0,
+ t,
+ 0,
+ 0,
+ 1,
+ n,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotationX",
+ value: function (e) {
+ var t = Math.cos(e),
+ n = Math.sin(e);
+ return (
+ this.set(1, 0, 0, 0, 0, t, -n, 0, 0, n, t, 0, 0, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotationY",
+ value: function (e) {
+ var t = Math.cos(e),
+ n = Math.sin(e);
+ return (
+ this.set(t, 0, n, 0, 0, 1, 0, 0, -n, 0, t, 0, 0, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotationZ",
+ value: function (e) {
+ var t = Math.cos(e),
+ n = Math.sin(e);
+ return (
+ this.set(t, -n, 0, 0, n, t, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeRotationAxis",
+ value: function (e, t) {
+ var n = Math.cos(t),
+ r = Math.sin(t),
+ i = 1 - n,
+ a = e.x,
+ o = e.y,
+ s = e.z,
+ l = i * a,
+ u = i * o;
+ return (
+ this.set(
+ l * a + n,
+ l * o - r * s,
+ l * s + r * o,
+ 0,
+ l * o + r * s,
+ u * o + n,
+ u * s - r * a,
+ 0,
+ l * s - r * o,
+ u * s + r * a,
+ i * s * s + n,
+ 0,
+ 0,
+ 0,
+ 0,
+ 1
+ ),
+ this
+ );
+ },
+ },
+ {
+ key: "makeScale",
+ value: function (e, t, n) {
+ return (
+ this.set(e, 0, 0, 0, 0, t, 0, 0, 0, 0, n, 0, 0, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "makeShear",
+ value: function (e, t, n, r, i, a) {
+ return (
+ this.set(1, n, i, 0, e, 1, a, 0, t, r, 1, 0, 0, 0, 0, 1),
+ this
+ );
+ },
+ },
+ {
+ key: "compose",
+ value: function (e, t, n) {
+ var r = this.elements,
+ i = t._x,
+ a = t._y,
+ o = t._z,
+ s = t._w,
+ l = i + i,
+ u = a + a,
+ c = o + o,
+ f = i * l,
+ d = i * u,
+ h = i * c,
+ p = a * u,
+ v = a * c,
+ m = o * c,
+ g = s * l,
+ A = s * u,
+ y = s * c,
+ b = n.x,
+ x = n.y,
+ S = n.z;
+ return (
+ (r[0] = (1 - (p + m)) * b),
+ (r[1] = (d + y) * b),
+ (r[2] = (h - A) * b),
+ (r[3] = 0),
+ (r[4] = (d - y) * x),
+ (r[5] = (1 - (f + m)) * x),
+ (r[6] = (v + g) * x),
+ (r[7] = 0),
+ (r[8] = (h + A) * S),
+ (r[9] = (v - g) * S),
+ (r[10] = (1 - (f + p)) * S),
+ (r[11] = 0),
+ (r[12] = e.x),
+ (r[13] = e.y),
+ (r[14] = e.z),
+ (r[15] = 1),
+ this
+ );
+ },
+ },
+ {
+ key: "decompose",
+ value: function (e, t, n) {
+ var r = this.elements,
+ i = Si.set(r[0], r[1], r[2]).length(),
+ a = Si.set(r[4], r[5], r[6]).length(),
+ o = Si.set(r[8], r[9], r[10]).length();
+ this.determinant() < 0 && (i = -i),
+ (e.x = r[12]),
+ (e.y = r[13]),
+ (e.z = r[14]),
+ Ei.copy(this);
+ var s = 1 / i,
+ l = 1 / a,
+ u = 1 / o;
+ return (
+ (Ei.elements[0] *= s),
+ (Ei.elements[1] *= s),
+ (Ei.elements[2] *= s),
+ (Ei.elements[4] *= l),
+ (Ei.elements[5] *= l),
+ (Ei.elements[6] *= l),
+ (Ei.elements[8] *= u),
+ (Ei.elements[9] *= u),
+ (Ei.elements[10] *= u),
+ t.setFromRotationMatrix(Ei),
+ (n.x = i),
+ (n.y = a),
+ (n.z = o),
+ this
+ );
+ },
+ },
+ {
+ key: "makePerspective",
+ value: function (e, t, n, r, i, a) {
+ var o,
+ s,
+ l =
+ arguments.length > 6 && void 0 !== arguments[6]
+ ? arguments[6]
+ : Yn,
+ u = this.elements,
+ c = (2 * i) / (t - e),
+ f = (2 * i) / (n - r),
+ d = (t + e) / (t - e),
+ h = (n + r) / (n - r);
+ if (l === Yn)
+ (o = -(a + i) / (a - i)), (s = (-2 * a * i) / (a - i));
+ else {
+ if (l !== qn)
+ throw new Error(
+ "THREE.Matrix4.makePerspective(): Invalid coordinate system: " +
+ l
+ );
+ (o = -a / (a - i)), (s = (-a * i) / (a - i));
+ }
+ return (
+ (u[0] = c),
+ (u[4] = 0),
+ (u[8] = d),
+ (u[12] = 0),
+ (u[1] = 0),
+ (u[5] = f),
+ (u[9] = h),
+ (u[13] = 0),
+ (u[2] = 0),
+ (u[6] = 0),
+ (u[10] = o),
+ (u[14] = s),
+ (u[3] = 0),
+ (u[7] = 0),
+ (u[11] = -1),
+ (u[15] = 0),
+ this
+ );
+ },
+ },
+ {
+ key: "makeOrthographic",
+ value: function (e, t, n, r, i, a) {
+ var o,
+ s,
+ l =
+ arguments.length > 6 && void 0 !== arguments[6]
+ ? arguments[6]
+ : Yn,
+ u = this.elements,
+ c = 1 / (t - e),
+ f = 1 / (n - r),
+ d = 1 / (a - i),
+ h = (t + e) * c,
+ p = (n + r) * f;
+ if (l === Yn) (o = (a + i) * d), (s = -2 * d);
+ else {
+ if (l !== qn)
+ throw new Error(
+ "THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " +
+ l
+ );
+ (o = i * d), (s = -1 * d);
+ }
+ return (
+ (u[0] = 2 * c),
+ (u[4] = 0),
+ (u[8] = 0),
+ (u[12] = -h),
+ (u[1] = 0),
+ (u[5] = 2 * f),
+ (u[9] = 0),
+ (u[13] = -p),
+ (u[2] = 0),
+ (u[6] = 0),
+ (u[10] = s),
+ (u[14] = -o),
+ (u[3] = 0),
+ (u[7] = 0),
+ (u[11] = 0),
+ (u[15] = 1),
+ this
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ for (
+ var t = this.elements, n = e.elements, r = 0;
+ r < 16;
+ r++
+ )
+ if (t[r] !== n[r]) return !1;
+ return !0;
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ for (
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = 0;
+ n < 16;
+ n++
+ )
+ this.elements[n] = e[n + t];
+ return this;
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ n = this.elements;
+ return (
+ (e[t] = n[0]),
+ (e[t + 1] = n[1]),
+ (e[t + 2] = n[2]),
+ (e[t + 3] = n[3]),
+ (e[t + 4] = n[4]),
+ (e[t + 5] = n[5]),
+ (e[t + 6] = n[6]),
+ (e[t + 7] = n[7]),
+ (e[t + 8] = n[8]),
+ (e[t + 9] = n[9]),
+ (e[t + 10] = n[10]),
+ (e[t + 11] = n[11]),
+ (e[t + 12] = n[12]),
+ (e[t + 13] = n[13]),
+ (e[t + 14] = n[14]),
+ (e[t + 15] = n[15]),
+ e
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Si = new Vr(),
+ Ei = new xi(),
+ _i = new Vr(0, 0, 0),
+ Ci = new Vr(1, 1, 1),
+ wi = new Vr(),
+ Ti = new Vr(),
+ Mi = new Vr(),
+ Ii = new xi(),
+ ki = new Hr(),
+ Ri = (function (e) {
+ function t() {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 0,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0,
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0,
+ i =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : t.DEFAULT_ORDER;
+ (0, m.Z)(this, t),
+ (this.isEuler = !0),
+ (this._x = e),
+ (this._y = n),
+ (this._z = r),
+ (this._order = i);
+ }
+ return (
+ (0, g.Z)(t, [
+ {
+ key: "x",
+ get: function () {
+ return this._x;
+ },
+ set: function (e) {
+ (this._x = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "y",
+ get: function () {
+ return this._y;
+ },
+ set: function (e) {
+ (this._y = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "z",
+ get: function () {
+ return this._z;
+ },
+ set: function (e) {
+ (this._z = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "order",
+ get: function () {
+ return this._order;
+ },
+ set: function (e) {
+ (this._order = e), this._onChangeCallback();
+ },
+ },
+ {
+ key: "set",
+ value: function (e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : this._order;
+ return (
+ (this._x = e),
+ (this._y = t),
+ (this._z = n),
+ (this._order = r),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(
+ this._x,
+ this._y,
+ this._z,
+ this._order
+ );
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (this._x = e._x),
+ (this._y = e._y),
+ (this._z = e._z),
+ (this._order = e._order),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromRotationMatrix",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : this._order,
+ n =
+ !(arguments.length > 2 && void 0 !== arguments[2]) ||
+ arguments[2],
+ r = e.elements,
+ i = r[0],
+ a = r[4],
+ o = r[8],
+ s = r[1],
+ l = r[5],
+ u = r[9],
+ c = r[2],
+ f = r[6],
+ d = r[10];
+ switch (t) {
+ case "XYZ":
+ (this._y = Math.asin(rr(o, -1, 1))),
+ Math.abs(o) < 0.9999999
+ ? ((this._x = Math.atan2(-u, d)),
+ (this._z = Math.atan2(-a, i)))
+ : ((this._x = Math.atan2(f, l)), (this._z = 0));
+ break;
+ case "YXZ":
+ (this._x = Math.asin(-rr(u, -1, 1))),
+ Math.abs(u) < 0.9999999
+ ? ((this._y = Math.atan2(o, d)),
+ (this._z = Math.atan2(s, l)))
+ : ((this._y = Math.atan2(-c, i)), (this._z = 0));
+ break;
+ case "ZXY":
+ (this._x = Math.asin(rr(f, -1, 1))),
+ Math.abs(f) < 0.9999999
+ ? ((this._y = Math.atan2(-c, d)),
+ (this._z = Math.atan2(-a, l)))
+ : ((this._y = 0), (this._z = Math.atan2(s, i)));
+ break;
+ case "ZYX":
+ (this._y = Math.asin(-rr(c, -1, 1))),
+ Math.abs(c) < 0.9999999
+ ? ((this._x = Math.atan2(f, d)),
+ (this._z = Math.atan2(s, i)))
+ : ((this._x = 0), (this._z = Math.atan2(-a, l)));
+ break;
+ case "YZX":
+ (this._z = Math.asin(rr(s, -1, 1))),
+ Math.abs(s) < 0.9999999
+ ? ((this._x = Math.atan2(-u, l)),
+ (this._y = Math.atan2(-c, i)))
+ : ((this._x = 0), (this._y = Math.atan2(o, d)));
+ break;
+ case "XZY":
+ (this._z = Math.asin(-rr(a, -1, 1))),
+ Math.abs(a) < 0.9999999
+ ? ((this._x = Math.atan2(f, l)),
+ (this._y = Math.atan2(o, i)))
+ : ((this._x = Math.atan2(-u, d)), (this._y = 0));
+ break;
+ default:
+ console.warn(
+ "THREE.Euler: .setFromRotationMatrix() encountered an unknown order: " +
+ t
+ );
+ }
+ return (
+ (this._order = t),
+ !0 === n && this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromQuaternion",
+ value: function (e, t, n) {
+ return (
+ Ii.makeRotationFromQuaternion(e),
+ this.setFromRotationMatrix(Ii, t, n)
+ );
+ },
+ },
+ {
+ key: "setFromVector3",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : this._order;
+ return this.set(e.x, e.y, e.z, t);
+ },
+ },
+ {
+ key: "reorder",
+ value: function (e) {
+ return ki.setFromEuler(this), this.setFromQuaternion(ki, e);
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e._x === this._x &&
+ e._y === this._y &&
+ e._z === this._z &&
+ e._order === this._order
+ );
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ return (
+ (this._x = e[0]),
+ (this._y = e[1]),
+ (this._z = e[2]),
+ void 0 !== e[3] && (this._order = e[3]),
+ this._onChangeCallback(),
+ this
+ );
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (e[t] = this._x),
+ (e[t + 1] = this._y),
+ (e[t + 2] = this._z),
+ (e[t + 3] = this._order),
+ e
+ );
+ },
+ },
+ {
+ key: "_onChange",
+ value: function (e) {
+ return (this._onChangeCallback = e), this;
+ },
+ },
+ { key: "_onChangeCallback", value: function () {} },
+ {
+ key: e,
+ value: (0, v.Z)().mark(function e() {
+ return (0, v.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), this._x;
+ case 2:
+ return (e.next = 4), this._y;
+ case 4:
+ return (e.next = 6), this._z;
+ case 6:
+ return (e.next = 8), this._order;
+ case 8:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ }),
+ },
+ ]),
+ t
+ );
+ })(Symbol.iterator);
+ Ri.DEFAULT_ORDER = "XYZ";
+ var Bi = (function () {
+ function e() {
+ (0, m.Z)(this, e), (this.mask = 1);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e) {
+ this.mask = ((1 << e) | 0) >>> 0;
+ },
+ },
+ {
+ key: "enable",
+ value: function (e) {
+ this.mask |= (1 << e) | 0;
+ },
+ },
+ {
+ key: "enableAll",
+ value: function () {
+ this.mask = -1;
+ },
+ },
+ {
+ key: "toggle",
+ value: function (e) {
+ this.mask ^= (1 << e) | 0;
+ },
+ },
+ {
+ key: "disable",
+ value: function (e) {
+ this.mask &= ~((1 << e) | 0);
+ },
+ },
+ {
+ key: "disableAll",
+ value: function () {
+ this.mask = 0;
+ },
+ },
+ {
+ key: "test",
+ value: function (e) {
+ return 0 !== (this.mask & e.mask);
+ },
+ },
+ {
+ key: "isEnabled",
+ value: function (e) {
+ return 0 !== (this.mask & ((1 << e) | 0));
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Pi = 0,
+ Li = new Vr(),
+ Di = new Hr(),
+ Ui = new xi(),
+ Fi = new Vr(),
+ Oi = new Vr(),
+ Ni = new Vr(),
+ Gi = new Hr(),
+ Zi = new Vr(1, 0, 0),
+ zi = new Vr(0, 1, 0),
+ Qi = new Vr(0, 0, 1),
+ Hi = { type: "added" },
+ Vi = { type: "removed" },
+ ji = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e;
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isObject3D = !0),
+ Object.defineProperty((0, f.Z)(e), "id", { value: Pi++ }),
+ (e.uuid = nr()),
+ (e.name = ""),
+ (e.type = "Object3D"),
+ (e.parent = null),
+ (e.children = []),
+ (e.up = n.DEFAULT_UP.clone());
+ var r = new Vr(),
+ i = new Ri(),
+ a = new Hr(),
+ o = new Vr(1, 1, 1);
+ return (
+ i._onChange(function () {
+ a.setFromEuler(i, !1);
+ }),
+ a._onChange(function () {
+ i.setFromQuaternion(a, void 0, !1);
+ }),
+ Object.defineProperties((0, f.Z)(e), {
+ position: { configurable: !0, enumerable: !0, value: r },
+ rotation: { configurable: !0, enumerable: !0, value: i },
+ quaternion: { configurable: !0, enumerable: !0, value: a },
+ scale: { configurable: !0, enumerable: !0, value: o },
+ modelViewMatrix: { value: new xi() },
+ normalMatrix: { value: new hr() },
+ }),
+ (e.matrix = new xi()),
+ (e.matrixWorld = new xi()),
+ (e.matrixAutoUpdate = n.DEFAULT_MATRIX_AUTO_UPDATE),
+ (e.matrixWorldNeedsUpdate = !1),
+ (e.matrixWorldAutoUpdate = n.DEFAULT_MATRIX_WORLD_AUTO_UPDATE),
+ (e.layers = new Bi()),
+ (e.visible = !0),
+ (e.castShadow = !1),
+ (e.receiveShadow = !1),
+ (e.frustumCulled = !0),
+ (e.renderOrder = 0),
+ (e.animations = []),
+ (e.userData = {}),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ { key: "onBeforeRender", value: function () {} },
+ { key: "onAfterRender", value: function () {} },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ this.matrixAutoUpdate && this.updateMatrix(),
+ this.matrix.premultiply(e),
+ this.matrix.decompose(
+ this.position,
+ this.quaternion,
+ this.scale
+ );
+ },
+ },
+ {
+ key: "applyQuaternion",
+ value: function (e) {
+ return this.quaternion.premultiply(e), this;
+ },
+ },
+ {
+ key: "setRotationFromAxisAngle",
+ value: function (e, t) {
+ this.quaternion.setFromAxisAngle(e, t);
+ },
+ },
+ {
+ key: "setRotationFromEuler",
+ value: function (e) {
+ this.quaternion.setFromEuler(e, !0);
+ },
+ },
+ {
+ key: "setRotationFromMatrix",
+ value: function (e) {
+ this.quaternion.setFromRotationMatrix(e);
+ },
+ },
+ {
+ key: "setRotationFromQuaternion",
+ value: function (e) {
+ this.quaternion.copy(e);
+ },
+ },
+ {
+ key: "rotateOnAxis",
+ value: function (e, t) {
+ return (
+ Di.setFromAxisAngle(e, t),
+ this.quaternion.multiply(Di),
+ this
+ );
+ },
+ },
+ {
+ key: "rotateOnWorldAxis",
+ value: function (e, t) {
+ return (
+ Di.setFromAxisAngle(e, t),
+ this.quaternion.premultiply(Di),
+ this
+ );
+ },
+ },
+ {
+ key: "rotateX",
+ value: function (e) {
+ return this.rotateOnAxis(Zi, e);
+ },
+ },
+ {
+ key: "rotateY",
+ value: function (e) {
+ return this.rotateOnAxis(zi, e);
+ },
+ },
+ {
+ key: "rotateZ",
+ value: function (e) {
+ return this.rotateOnAxis(Qi, e);
+ },
+ },
+ {
+ key: "translateOnAxis",
+ value: function (e, t) {
+ return (
+ Li.copy(e).applyQuaternion(this.quaternion),
+ this.position.add(Li.multiplyScalar(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "translateX",
+ value: function (e) {
+ return this.translateOnAxis(Zi, e);
+ },
+ },
+ {
+ key: "translateY",
+ value: function (e) {
+ return this.translateOnAxis(zi, e);
+ },
+ },
+ {
+ key: "translateZ",
+ value: function (e) {
+ return this.translateOnAxis(Qi, e);
+ },
+ },
+ {
+ key: "localToWorld",
+ value: function (e) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ e.applyMatrix4(this.matrixWorld)
+ );
+ },
+ },
+ {
+ key: "worldToLocal",
+ value: function (e) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ e.applyMatrix4(Ui.copy(this.matrixWorld).invert())
+ );
+ },
+ },
+ {
+ key: "lookAt",
+ value: function (e, t, n) {
+ e.isVector3 ? Fi.copy(e) : Fi.set(e, t, n);
+ var r = this.parent;
+ this.updateWorldMatrix(!0, !1),
+ Oi.setFromMatrixPosition(this.matrixWorld),
+ this.isCamera || this.isLight
+ ? Ui.lookAt(Oi, Fi, this.up)
+ : Ui.lookAt(Fi, Oi, this.up),
+ this.quaternion.setFromRotationMatrix(Ui),
+ r &&
+ (Ui.extractRotation(r.matrixWorld),
+ Di.setFromRotationMatrix(Ui),
+ this.quaternion.premultiply(Di.invert()));
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ if (arguments.length > 1) {
+ for (var t = 0; t < arguments.length; t++)
+ this.add(arguments[t]);
+ return this;
+ }
+ return e === this
+ ? (console.error(
+ "THREE.Object3D.add: object can't be added as a child of itself.",
+ e
+ ),
+ this)
+ : (e && e.isObject3D
+ ? (null !== e.parent && e.parent.remove(e),
+ (e.parent = this),
+ this.children.push(e),
+ e.dispatchEvent(Hi))
+ : console.error(
+ "THREE.Object3D.add: object not an instance of THREE.Object3D.",
+ e
+ ),
+ this);
+ },
+ },
+ {
+ key: "remove",
+ value: function (e) {
+ if (arguments.length > 1) {
+ for (var t = 0; t < arguments.length; t++)
+ this.remove(arguments[t]);
+ return this;
+ }
+ var n = this.children.indexOf(e);
+ return (
+ -1 !== n &&
+ ((e.parent = null),
+ this.children.splice(n, 1),
+ e.dispatchEvent(Vi)),
+ this
+ );
+ },
+ },
+ {
+ key: "removeFromParent",
+ value: function () {
+ var e = this.parent;
+ return null !== e && e.remove(this), this;
+ },
+ },
+ {
+ key: "clear",
+ value: function () {
+ return this.remove.apply(this, (0, c.Z)(this.children));
+ },
+ },
+ {
+ key: "attach",
+ value: function (e) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ Ui.copy(this.matrixWorld).invert(),
+ null !== e.parent &&
+ (e.parent.updateWorldMatrix(!0, !1),
+ Ui.multiply(e.parent.matrixWorld)),
+ e.applyMatrix4(Ui),
+ this.add(e),
+ e.updateWorldMatrix(!1, !0),
+ this
+ );
+ },
+ },
+ {
+ key: "getObjectById",
+ value: function (e) {
+ return this.getObjectByProperty("id", e);
+ },
+ },
+ {
+ key: "getObjectByName",
+ value: function (e) {
+ return this.getObjectByProperty("name", e);
+ },
+ },
+ {
+ key: "getObjectByProperty",
+ value: function (e, t) {
+ if (this[e] === t) return this;
+ for (var n = 0, r = this.children.length; n < r; n++) {
+ var i = this.children[n].getObjectByProperty(e, t);
+ if (void 0 !== i) return i;
+ }
+ },
+ },
+ {
+ key: "getObjectsByProperty",
+ value: function (e, t) {
+ var n = [];
+ this[e] === t && n.push(this);
+ for (var r = 0, i = this.children.length; r < i; r++) {
+ var a = this.children[r].getObjectsByProperty(e, t);
+ a.length > 0 && (n = n.concat(a));
+ }
+ return n;
+ },
+ },
+ {
+ key: "getWorldPosition",
+ value: function (e) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ e.setFromMatrixPosition(this.matrixWorld)
+ );
+ },
+ },
+ {
+ key: "getWorldQuaternion",
+ value: function (e) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ this.matrixWorld.decompose(Oi, e, Ni),
+ e
+ );
+ },
+ },
+ {
+ key: "getWorldScale",
+ value: function (e) {
+ return (
+ this.updateWorldMatrix(!0, !1),
+ this.matrixWorld.decompose(Oi, Gi, e),
+ e
+ );
+ },
+ },
+ {
+ key: "getWorldDirection",
+ value: function (e) {
+ this.updateWorldMatrix(!0, !1);
+ var t = this.matrixWorld.elements;
+ return e.set(t[8], t[9], t[10]).normalize();
+ },
+ },
+ { key: "raycast", value: function () {} },
+ {
+ key: "traverse",
+ value: function (e) {
+ e(this);
+ for (var t = this.children, n = 0, r = t.length; n < r; n++)
+ t[n].traverse(e);
+ },
+ },
+ {
+ key: "traverseVisible",
+ value: function (e) {
+ if (!1 !== this.visible) {
+ e(this);
+ for (
+ var t = this.children, n = 0, r = t.length;
+ n < r;
+ n++
+ )
+ t[n].traverseVisible(e);
+ }
+ },
+ },
+ {
+ key: "traverseAncestors",
+ value: function (e) {
+ var t = this.parent;
+ null !== t && (e(t), t.traverseAncestors(e));
+ },
+ },
+ {
+ key: "updateMatrix",
+ value: function () {
+ this.matrix.compose(
+ this.position,
+ this.quaternion,
+ this.scale
+ ),
+ (this.matrixWorldNeedsUpdate = !0);
+ },
+ },
+ {
+ key: "updateMatrixWorld",
+ value: function (e) {
+ this.matrixAutoUpdate && this.updateMatrix(),
+ (this.matrixWorldNeedsUpdate || e) &&
+ (null === this.parent
+ ? this.matrixWorld.copy(this.matrix)
+ : this.matrixWorld.multiplyMatrices(
+ this.parent.matrixWorld,
+ this.matrix
+ ),
+ (this.matrixWorldNeedsUpdate = !1),
+ (e = !0));
+ for (
+ var t = this.children, n = 0, r = t.length;
+ n < r;
+ n++
+ ) {
+ var i = t[n];
+ (!0 !== i.matrixWorldAutoUpdate && !0 !== e) ||
+ i.updateMatrixWorld(e);
+ }
+ },
+ },
+ {
+ key: "updateWorldMatrix",
+ value: function (e, t) {
+ var n = this.parent;
+ if (
+ (!0 === e &&
+ null !== n &&
+ !0 === n.matrixWorldAutoUpdate &&
+ n.updateWorldMatrix(!0, !1),
+ this.matrixAutoUpdate && this.updateMatrix(),
+ null === this.parent
+ ? this.matrixWorld.copy(this.matrix)
+ : this.matrixWorld.multiplyMatrices(
+ this.parent.matrixWorld,
+ this.matrix
+ ),
+ !0 === t)
+ )
+ for (
+ var r = this.children, i = 0, a = r.length;
+ i < a;
+ i++
+ ) {
+ var o = r[i];
+ !0 === o.matrixWorldAutoUpdate &&
+ o.updateWorldMatrix(!1, !0);
+ }
+ },
+ },
+ {
+ key: "toJSON",
+ value: function (e) {
+ var t = void 0 === e || "string" === typeof e,
+ n = {};
+ t &&
+ ((e = {
+ geometries: {},
+ materials: {},
+ textures: {},
+ images: {},
+ shapes: {},
+ skeletons: {},
+ animations: {},
+ nodes: {},
+ }),
+ (n.metadata = {
+ version: 4.6,
+ type: "Object",
+ generator: "Object3D.toJSON",
+ }));
+ var r = {};
+ function i(t, n) {
+ return (
+ void 0 === t[n.uuid] && (t[n.uuid] = n.toJSON(e)),
+ n.uuid
+ );
+ }
+ if (
+ ((r.uuid = this.uuid),
+ (r.type = this.type),
+ "" !== this.name && (r.name = this.name),
+ !0 === this.castShadow && (r.castShadow = !0),
+ !0 === this.receiveShadow && (r.receiveShadow = !0),
+ !1 === this.visible && (r.visible = !1),
+ !1 === this.frustumCulled && (r.frustumCulled = !1),
+ 0 !== this.renderOrder &&
+ (r.renderOrder = this.renderOrder),
+ Object.keys(this.userData).length > 0 &&
+ (r.userData = this.userData),
+ (r.layers = this.layers.mask),
+ (r.matrix = this.matrix.toArray()),
+ (r.up = this.up.toArray()),
+ !1 === this.matrixAutoUpdate && (r.matrixAutoUpdate = !1),
+ this.isInstancedMesh &&
+ ((r.type = "InstancedMesh"),
+ (r.count = this.count),
+ (r.instanceMatrix = this.instanceMatrix.toJSON()),
+ null !== this.instanceColor &&
+ (r.instanceColor = this.instanceColor.toJSON())),
+ this.isScene)
+ )
+ this.background &&
+ (this.background.isColor
+ ? (r.background = this.background.toJSON())
+ : this.background.isTexture &&
+ (r.background = this.background.toJSON(e).uuid)),
+ this.environment &&
+ this.environment.isTexture &&
+ !0 !== this.environment.isRenderTargetTexture &&
+ (r.environment = this.environment.toJSON(e).uuid);
+ else if (this.isMesh || this.isLine || this.isPoints) {
+ r.geometry = i(e.geometries, this.geometry);
+ var a = this.geometry.parameters;
+ if (void 0 !== a && void 0 !== a.shapes) {
+ var o = a.shapes;
+ if (Array.isArray(o))
+ for (var s = 0, l = o.length; s < l; s++) {
+ var u = o[s];
+ i(e.shapes, u);
+ }
+ else i(e.shapes, o);
+ }
+ }
+ if (
+ (this.isSkinnedMesh &&
+ ((r.bindMode = this.bindMode),
+ (r.bindMatrix = this.bindMatrix.toArray()),
+ void 0 !== this.skeleton &&
+ (i(e.skeletons, this.skeleton),
+ (r.skeleton = this.skeleton.uuid))),
+ void 0 !== this.material)
+ )
+ if (Array.isArray(this.material)) {
+ for (
+ var c = [], f = 0, d = this.material.length;
+ f < d;
+ f++
+ )
+ c.push(i(e.materials, this.material[f]));
+ r.material = c;
+ } else r.material = i(e.materials, this.material);
+ if (this.children.length > 0) {
+ r.children = [];
+ for (var h = 0; h < this.children.length; h++)
+ r.children.push(this.children[h].toJSON(e).object);
+ }
+ if (this.animations.length > 0) {
+ r.animations = [];
+ for (var p = 0; p < this.animations.length; p++) {
+ var v = this.animations[p];
+ r.animations.push(i(e.animations, v));
+ }
+ }
+ if (t) {
+ var m = _(e.geometries),
+ g = _(e.materials),
+ A = _(e.textures),
+ y = _(e.images),
+ b = _(e.shapes),
+ x = _(e.skeletons),
+ S = _(e.animations),
+ E = _(e.nodes);
+ m.length > 0 && (n.geometries = m),
+ g.length > 0 && (n.materials = g),
+ A.length > 0 && (n.textures = A),
+ y.length > 0 && (n.images = y),
+ b.length > 0 && (n.shapes = b),
+ x.length > 0 && (n.skeletons = x),
+ S.length > 0 && (n.animations = S),
+ E.length > 0 && (n.nodes = E);
+ }
+ return (n.object = r), n;
+ function _(e) {
+ var t = [];
+ for (var n in e) {
+ var r = e[n];
+ delete r.metadata, t.push(r);
+ }
+ return t;
+ }
+ },
+ },
+ {
+ key: "clone",
+ value: function (e) {
+ return new this.constructor().copy(this, e);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ var t =
+ !(arguments.length > 1 && void 0 !== arguments[1]) ||
+ arguments[1];
+ if (
+ ((this.name = e.name),
+ this.up.copy(e.up),
+ this.position.copy(e.position),
+ (this.rotation.order = e.rotation.order),
+ this.quaternion.copy(e.quaternion),
+ this.scale.copy(e.scale),
+ this.matrix.copy(e.matrix),
+ this.matrixWorld.copy(e.matrixWorld),
+ (this.matrixAutoUpdate = e.matrixAutoUpdate),
+ (this.matrixWorldNeedsUpdate = e.matrixWorldNeedsUpdate),
+ (this.matrixWorldAutoUpdate = e.matrixWorldAutoUpdate),
+ (this.layers.mask = e.layers.mask),
+ (this.visible = e.visible),
+ (this.castShadow = e.castShadow),
+ (this.receiveShadow = e.receiveShadow),
+ (this.frustumCulled = e.frustumCulled),
+ (this.renderOrder = e.renderOrder),
+ (this.animations = e.animations.slice()),
+ (this.userData = JSON.parse(JSON.stringify(e.userData))),
+ !0 === t)
+ )
+ for (var n = 0; n < e.children.length; n++) {
+ var r = e.children[n];
+ this.add(r.clone());
+ }
+ return this;
+ },
+ },
+ ]),
+ n
+ );
+ })(Jn);
+ (ji.DEFAULT_UP = new Vr(0, 1, 0)),
+ (ji.DEFAULT_MATRIX_AUTO_UPDATE = !0),
+ (ji.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0);
+ var Wi = new Vr(),
+ Xi = new Vr(),
+ Yi = new Vr(),
+ qi = new Vr(),
+ Ji = new Vr(),
+ Ki = new Vr(),
+ $i = new Vr(),
+ ea = new Vr(),
+ ta = new Vr(),
+ na = new Vr(),
+ ra = !1,
+ ia = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Vr(),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new Vr(),
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : new Vr();
+ (0, m.Z)(this, e), (this.a = t), (this.b = n), (this.c = r);
+ }
+ return (
+ (0, g.Z)(
+ e,
+ [
+ {
+ key: "set",
+ value: function (e, t, n) {
+ return (
+ this.a.copy(e), this.b.copy(t), this.c.copy(n), this
+ );
+ },
+ },
+ {
+ key: "setFromPointsAndIndices",
+ value: function (e, t, n, r) {
+ return (
+ this.a.copy(e[t]),
+ this.b.copy(e[n]),
+ this.c.copy(e[r]),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromAttributeAndIndices",
+ value: function (e, t, n, r) {
+ return (
+ this.a.fromBufferAttribute(e, t),
+ this.b.fromBufferAttribute(e, n),
+ this.c.fromBufferAttribute(e, r),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ this.a.copy(e.a),
+ this.b.copy(e.b),
+ this.c.copy(e.c),
+ this
+ );
+ },
+ },
+ {
+ key: "getArea",
+ value: function () {
+ return (
+ Wi.subVectors(this.c, this.b),
+ Xi.subVectors(this.a, this.b),
+ 0.5 * Wi.cross(Xi).length()
+ );
+ },
+ },
+ {
+ key: "getMidpoint",
+ value: function (e) {
+ return e
+ .addVectors(this.a, this.b)
+ .add(this.c)
+ .multiplyScalar(1 / 3);
+ },
+ },
+ {
+ key: "getNormal",
+ value: function (t) {
+ return e.getNormal(this.a, this.b, this.c, t);
+ },
+ },
+ {
+ key: "getPlane",
+ value: function (e) {
+ return e.setFromCoplanarPoints(this.a, this.b, this.c);
+ },
+ },
+ {
+ key: "getBarycoord",
+ value: function (t, n) {
+ return e.getBarycoord(t, this.a, this.b, this.c, n);
+ },
+ },
+ {
+ key: "getUV",
+ value: function (t, n, r, i, a) {
+ return (
+ !1 === ra &&
+ (console.warn(
+ "THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."
+ ),
+ (ra = !0)),
+ e.getInterpolation(
+ t,
+ this.a,
+ this.b,
+ this.c,
+ n,
+ r,
+ i,
+ a
+ )
+ );
+ },
+ },
+ {
+ key: "getInterpolation",
+ value: function (t, n, r, i, a) {
+ return e.getInterpolation(
+ t,
+ this.a,
+ this.b,
+ this.c,
+ n,
+ r,
+ i,
+ a
+ );
+ },
+ },
+ {
+ key: "containsPoint",
+ value: function (t) {
+ return e.containsPoint(t, this.a, this.b, this.c);
+ },
+ },
+ {
+ key: "isFrontFacing",
+ value: function (t) {
+ return e.isFrontFacing(this.a, this.b, this.c, t);
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ return e.intersectsTriangle(this);
+ },
+ },
+ {
+ key: "closestPointToPoint",
+ value: function (e, t) {
+ var n,
+ r,
+ i = this.a,
+ a = this.b,
+ o = this.c;
+ Ji.subVectors(a, i),
+ Ki.subVectors(o, i),
+ ea.subVectors(e, i);
+ var s = Ji.dot(ea),
+ l = Ki.dot(ea);
+ if (s <= 0 && l <= 0) return t.copy(i);
+ ta.subVectors(e, a);
+ var u = Ji.dot(ta),
+ c = Ki.dot(ta);
+ if (u >= 0 && c <= u) return t.copy(a);
+ var f = s * c - u * l;
+ if (f <= 0 && s >= 0 && u <= 0)
+ return (
+ (n = s / (s - u)), t.copy(i).addScaledVector(Ji, n)
+ );
+ na.subVectors(e, o);
+ var d = Ji.dot(na),
+ h = Ki.dot(na);
+ if (h >= 0 && d <= h) return t.copy(o);
+ var p = d * l - s * h;
+ if (p <= 0 && l >= 0 && h <= 0)
+ return (
+ (r = l / (l - h)), t.copy(i).addScaledVector(Ki, r)
+ );
+ var v = u * h - d * c;
+ if (v <= 0 && c - u >= 0 && d - h >= 0)
+ return (
+ $i.subVectors(o, a),
+ (r = (c - u) / (c - u + (d - h))),
+ t.copy(a).addScaledVector($i, r)
+ );
+ var m = 1 / (v + p + f);
+ return (
+ (n = p * m),
+ (r = f * m),
+ t.copy(i).addScaledVector(Ji, n).addScaledVector(Ki, r)
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e.a.equals(this.a) &&
+ e.b.equals(this.b) &&
+ e.c.equals(this.c)
+ );
+ },
+ },
+ ],
+ [
+ {
+ key: "getNormal",
+ value: function (e, t, n, r) {
+ r.subVectors(n, t), Wi.subVectors(e, t), r.cross(Wi);
+ var i = r.lengthSq();
+ return i > 0
+ ? r.multiplyScalar(1 / Math.sqrt(i))
+ : r.set(0, 0, 0);
+ },
+ },
+ {
+ key: "getBarycoord",
+ value: function (e, t, n, r, i) {
+ Wi.subVectors(r, t),
+ Xi.subVectors(n, t),
+ Yi.subVectors(e, t);
+ var a = Wi.dot(Wi),
+ o = Wi.dot(Xi),
+ s = Wi.dot(Yi),
+ l = Xi.dot(Xi),
+ u = Xi.dot(Yi),
+ c = a * l - o * o;
+ if (0 === c) return i.set(-2, -1, -1);
+ var f = 1 / c,
+ d = (l * s - o * u) * f,
+ h = (a * u - o * s) * f;
+ return i.set(1 - d - h, h, d);
+ },
+ },
+ {
+ key: "containsPoint",
+ value: function (e, t, n, r) {
+ return (
+ this.getBarycoord(e, t, n, r, qi),
+ qi.x >= 0 && qi.y >= 0 && qi.x + qi.y <= 1
+ );
+ },
+ },
+ {
+ key: "getUV",
+ value: function (e, t, n, r, i, a, o, s) {
+ return (
+ !1 === ra &&
+ (console.warn(
+ "THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."
+ ),
+ (ra = !0)),
+ this.getInterpolation(e, t, n, r, i, a, o, s)
+ );
+ },
+ },
+ {
+ key: "getInterpolation",
+ value: function (e, t, n, r, i, a, o, s) {
+ return (
+ this.getBarycoord(e, t, n, r, qi),
+ s.setScalar(0),
+ s.addScaledVector(i, qi.x),
+ s.addScaledVector(a, qi.y),
+ s.addScaledVector(o, qi.z),
+ s
+ );
+ },
+ },
+ {
+ key: "isFrontFacing",
+ value: function (e, t, n, r) {
+ return (
+ Wi.subVectors(n, t),
+ Xi.subVectors(e, t),
+ Wi.cross(Xi).dot(r) < 0
+ );
+ },
+ },
+ ]
+ ),
+ e
+ );
+ })(),
+ aa = 0,
+ oa = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isMaterial = !0),
+ Object.defineProperty((0, f.Z)(e), "id", { value: aa++ }),
+ (e.uuid = nr()),
+ (e.name = ""),
+ (e.type = "Material"),
+ (e.blending = L),
+ (e.side = I),
+ (e.vertexColors = !1),
+ (e.opacity = 1),
+ (e.transparent = !1),
+ (e.alphaHash = !1),
+ (e.blendSrc = X),
+ (e.blendDst = Y),
+ (e.blendEquation = N),
+ (e.blendSrcAlpha = null),
+ (e.blendDstAlpha = null),
+ (e.blendEquationAlpha = null),
+ (e.depthFunc = ie),
+ (e.depthTest = !0),
+ (e.depthWrite = !0),
+ (e.stencilWriteMask = 255),
+ (e.stencilFunc = Mn),
+ (e.stencilRef = 0),
+ (e.stencilFuncMask = 255),
+ (e.stencilFail = pn),
+ (e.stencilZFail = pn),
+ (e.stencilZPass = pn),
+ (e.stencilWrite = !1),
+ (e.clippingPlanes = null),
+ (e.clipIntersection = !1),
+ (e.clipShadows = !1),
+ (e.shadowSide = null),
+ (e.colorWrite = !0),
+ (e.precision = null),
+ (e.polygonOffset = !1),
+ (e.polygonOffsetFactor = 0),
+ (e.polygonOffsetUnits = 0),
+ (e.dithering = !1),
+ (e.alphaToCoverage = !1),
+ (e.premultipliedAlpha = !1),
+ (e.forceSinglePass = !1),
+ (e.visible = !0),
+ (e.toneMapped = !0),
+ (e.userData = {}),
+ (e.version = 0),
+ (e._alphaTest = 0),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "alphaTest",
+ get: function () {
+ return this._alphaTest;
+ },
+ set: function (e) {
+ this._alphaTest > 0 !== e > 0 && this.version++,
+ (this._alphaTest = e);
+ },
+ },
+ { key: "onBuild", value: function () {} },
+ { key: "onBeforeRender", value: function () {} },
+ { key: "onBeforeCompile", value: function () {} },
+ {
+ key: "customProgramCacheKey",
+ value: function () {
+ return this.onBeforeCompile.toString();
+ },
+ },
+ {
+ key: "setValues",
+ value: function (e) {
+ if (void 0 !== e)
+ for (var t in e) {
+ var n = e[t];
+ if (void 0 !== n) {
+ var r = this[t];
+ void 0 !== r
+ ? r && r.isColor
+ ? r.set(n)
+ : r && r.isVector3 && n && n.isVector3
+ ? r.copy(n)
+ : (this[t] = n)
+ : console.warn(
+ "THREE.Material: '"
+ .concat(t, "' is not a property of THREE.")
+ .concat(this.type, ".")
+ );
+ } else
+ console.warn(
+ "THREE.Material: parameter '".concat(
+ t,
+ "' has value of undefined."
+ )
+ );
+ }
+ },
+ },
+ {
+ key: "toJSON",
+ value: function (e) {
+ var t = void 0 === e || "string" === typeof e;
+ t && (e = { textures: {}, images: {} });
+ var n = {
+ metadata: {
+ version: 4.6,
+ type: "Material",
+ generator: "Material.toJSON",
+ },
+ };
+ function r(e) {
+ var t = [];
+ for (var n in e) {
+ var r = e[n];
+ delete r.metadata, t.push(r);
+ }
+ return t;
+ }
+ if (
+ ((n.uuid = this.uuid),
+ (n.type = this.type),
+ "" !== this.name && (n.name = this.name),
+ this.color &&
+ this.color.isColor &&
+ (n.color = this.color.getHex()),
+ void 0 !== this.roughness &&
+ (n.roughness = this.roughness),
+ void 0 !== this.metalness &&
+ (n.metalness = this.metalness),
+ void 0 !== this.sheen && (n.sheen = this.sheen),
+ this.sheenColor &&
+ this.sheenColor.isColor &&
+ (n.sheenColor = this.sheenColor.getHex()),
+ void 0 !== this.sheenRoughness &&
+ (n.sheenRoughness = this.sheenRoughness),
+ this.emissive &&
+ this.emissive.isColor &&
+ (n.emissive = this.emissive.getHex()),
+ this.emissiveIntensity &&
+ 1 !== this.emissiveIntensity &&
+ (n.emissiveIntensity = this.emissiveIntensity),
+ this.specular &&
+ this.specular.isColor &&
+ (n.specular = this.specular.getHex()),
+ void 0 !== this.specularIntensity &&
+ (n.specularIntensity = this.specularIntensity),
+ this.specularColor &&
+ this.specularColor.isColor &&
+ (n.specularColor = this.specularColor.getHex()),
+ void 0 !== this.shininess &&
+ (n.shininess = this.shininess),
+ void 0 !== this.clearcoat &&
+ (n.clearcoat = this.clearcoat),
+ void 0 !== this.clearcoatRoughness &&
+ (n.clearcoatRoughness = this.clearcoatRoughness),
+ this.clearcoatMap &&
+ this.clearcoatMap.isTexture &&
+ (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid),
+ this.clearcoatRoughnessMap &&
+ this.clearcoatRoughnessMap.isTexture &&
+ (n.clearcoatRoughnessMap =
+ this.clearcoatRoughnessMap.toJSON(e).uuid),
+ this.clearcoatNormalMap &&
+ this.clearcoatNormalMap.isTexture &&
+ ((n.clearcoatNormalMap =
+ this.clearcoatNormalMap.toJSON(e).uuid),
+ (n.clearcoatNormalScale =
+ this.clearcoatNormalScale.toArray())),
+ void 0 !== this.iridescence &&
+ (n.iridescence = this.iridescence),
+ void 0 !== this.iridescenceIOR &&
+ (n.iridescenceIOR = this.iridescenceIOR),
+ void 0 !== this.iridescenceThicknessRange &&
+ (n.iridescenceThicknessRange =
+ this.iridescenceThicknessRange),
+ this.iridescenceMap &&
+ this.iridescenceMap.isTexture &&
+ (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid),
+ this.iridescenceThicknessMap &&
+ this.iridescenceThicknessMap.isTexture &&
+ (n.iridescenceThicknessMap =
+ this.iridescenceThicknessMap.toJSON(e).uuid),
+ void 0 !== this.anisotropy &&
+ (n.anisotropy = this.anisotropy),
+ void 0 !== this.anisotropyRotation &&
+ (n.anisotropyRotation = this.anisotropyRotation),
+ this.anisotropyMap &&
+ this.anisotropyMap.isTexture &&
+ (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid),
+ this.map &&
+ this.map.isTexture &&
+ (n.map = this.map.toJSON(e).uuid),
+ this.matcap &&
+ this.matcap.isTexture &&
+ (n.matcap = this.matcap.toJSON(e).uuid),
+ this.alphaMap &&
+ this.alphaMap.isTexture &&
+ (n.alphaMap = this.alphaMap.toJSON(e).uuid),
+ this.lightMap &&
+ this.lightMap.isTexture &&
+ ((n.lightMap = this.lightMap.toJSON(e).uuid),
+ (n.lightMapIntensity = this.lightMapIntensity)),
+ this.aoMap &&
+ this.aoMap.isTexture &&
+ ((n.aoMap = this.aoMap.toJSON(e).uuid),
+ (n.aoMapIntensity = this.aoMapIntensity)),
+ this.bumpMap &&
+ this.bumpMap.isTexture &&
+ ((n.bumpMap = this.bumpMap.toJSON(e).uuid),
+ (n.bumpScale = this.bumpScale)),
+ this.normalMap &&
+ this.normalMap.isTexture &&
+ ((n.normalMap = this.normalMap.toJSON(e).uuid),
+ (n.normalMapType = this.normalMapType),
+ (n.normalScale = this.normalScale.toArray())),
+ this.displacementMap &&
+ this.displacementMap.isTexture &&
+ ((n.displacementMap =
+ this.displacementMap.toJSON(e).uuid),
+ (n.displacementScale = this.displacementScale),
+ (n.displacementBias = this.displacementBias)),
+ this.roughnessMap &&
+ this.roughnessMap.isTexture &&
+ (n.roughnessMap = this.roughnessMap.toJSON(e).uuid),
+ this.metalnessMap &&
+ this.metalnessMap.isTexture &&
+ (n.metalnessMap = this.metalnessMap.toJSON(e).uuid),
+ this.emissiveMap &&
+ this.emissiveMap.isTexture &&
+ (n.emissiveMap = this.emissiveMap.toJSON(e).uuid),
+ this.specularMap &&
+ this.specularMap.isTexture &&
+ (n.specularMap = this.specularMap.toJSON(e).uuid),
+ this.specularIntensityMap &&
+ this.specularIntensityMap.isTexture &&
+ (n.specularIntensityMap =
+ this.specularIntensityMap.toJSON(e).uuid),
+ this.specularColorMap &&
+ this.specularColorMap.isTexture &&
+ (n.specularColorMap =
+ this.specularColorMap.toJSON(e).uuid),
+ this.envMap &&
+ this.envMap.isTexture &&
+ ((n.envMap = this.envMap.toJSON(e).uuid),
+ void 0 !== this.combine && (n.combine = this.combine)),
+ void 0 !== this.envMapIntensity &&
+ (n.envMapIntensity = this.envMapIntensity),
+ void 0 !== this.reflectivity &&
+ (n.reflectivity = this.reflectivity),
+ void 0 !== this.refractionRatio &&
+ (n.refractionRatio = this.refractionRatio),
+ this.gradientMap &&
+ this.gradientMap.isTexture &&
+ (n.gradientMap = this.gradientMap.toJSON(e).uuid),
+ void 0 !== this.transmission &&
+ (n.transmission = this.transmission),
+ this.transmissionMap &&
+ this.transmissionMap.isTexture &&
+ (n.transmissionMap =
+ this.transmissionMap.toJSON(e).uuid),
+ void 0 !== this.thickness &&
+ (n.thickness = this.thickness),
+ this.thicknessMap &&
+ this.thicknessMap.isTexture &&
+ (n.thicknessMap = this.thicknessMap.toJSON(e).uuid),
+ void 0 !== this.attenuationDistance &&
+ this.attenuationDistance !== 1 / 0 &&
+ (n.attenuationDistance = this.attenuationDistance),
+ void 0 !== this.attenuationColor &&
+ (n.attenuationColor = this.attenuationColor.getHex()),
+ void 0 !== this.size && (n.size = this.size),
+ null !== this.shadowSide &&
+ (n.shadowSide = this.shadowSide),
+ void 0 !== this.sizeAttenuation &&
+ (n.sizeAttenuation = this.sizeAttenuation),
+ this.blending !== L && (n.blending = this.blending),
+ this.side !== I && (n.side = this.side),
+ !0 === this.vertexColors && (n.vertexColors = !0),
+ this.opacity < 1 && (n.opacity = this.opacity),
+ !0 === this.transparent && (n.transparent = !0),
+ (n.depthFunc = this.depthFunc),
+ (n.depthTest = this.depthTest),
+ (n.depthWrite = this.depthWrite),
+ (n.colorWrite = this.colorWrite),
+ (n.stencilWrite = this.stencilWrite),
+ (n.stencilWriteMask = this.stencilWriteMask),
+ (n.stencilFunc = this.stencilFunc),
+ (n.stencilRef = this.stencilRef),
+ (n.stencilFuncMask = this.stencilFuncMask),
+ (n.stencilFail = this.stencilFail),
+ (n.stencilZFail = this.stencilZFail),
+ (n.stencilZPass = this.stencilZPass),
+ void 0 !== this.rotation &&
+ 0 !== this.rotation &&
+ (n.rotation = this.rotation),
+ !0 === this.polygonOffset && (n.polygonOffset = !0),
+ 0 !== this.polygonOffsetFactor &&
+ (n.polygonOffsetFactor = this.polygonOffsetFactor),
+ 0 !== this.polygonOffsetUnits &&
+ (n.polygonOffsetUnits = this.polygonOffsetUnits),
+ void 0 !== this.linewidth &&
+ 1 !== this.linewidth &&
+ (n.linewidth = this.linewidth),
+ void 0 !== this.dashSize && (n.dashSize = this.dashSize),
+ void 0 !== this.gapSize && (n.gapSize = this.gapSize),
+ void 0 !== this.scale && (n.scale = this.scale),
+ !0 === this.dithering && (n.dithering = !0),
+ this.alphaTest > 0 && (n.alphaTest = this.alphaTest),
+ !0 === this.alphaHash && (n.alphaHash = !0),
+ !0 === this.alphaToCoverage && (n.alphaToCoverage = !0),
+ !0 === this.premultipliedAlpha &&
+ (n.premultipliedAlpha = !0),
+ !0 === this.forceSinglePass && (n.forceSinglePass = !0),
+ !0 === this.wireframe && (n.wireframe = !0),
+ this.wireframeLinewidth > 1 &&
+ (n.wireframeLinewidth = this.wireframeLinewidth),
+ "round" !== this.wireframeLinecap &&
+ (n.wireframeLinecap = this.wireframeLinecap),
+ "round" !== this.wireframeLinejoin &&
+ (n.wireframeLinejoin = this.wireframeLinejoin),
+ !0 === this.flatShading && (n.flatShading = !0),
+ !1 === this.visible && (n.visible = !1),
+ !1 === this.toneMapped && (n.toneMapped = !1),
+ !1 === this.fog && (n.fog = !1),
+ Object.keys(this.userData).length > 0 &&
+ (n.userData = this.userData),
+ t)
+ ) {
+ var i = r(e.textures),
+ a = r(e.images);
+ i.length > 0 && (n.textures = i),
+ a.length > 0 && (n.images = a);
+ }
+ return n;
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ (this.name = e.name),
+ (this.blending = e.blending),
+ (this.side = e.side),
+ (this.vertexColors = e.vertexColors),
+ (this.opacity = e.opacity),
+ (this.transparent = e.transparent),
+ (this.blendSrc = e.blendSrc),
+ (this.blendDst = e.blendDst),
+ (this.blendEquation = e.blendEquation),
+ (this.blendSrcAlpha = e.blendSrcAlpha),
+ (this.blendDstAlpha = e.blendDstAlpha),
+ (this.blendEquationAlpha = e.blendEquationAlpha),
+ (this.depthFunc = e.depthFunc),
+ (this.depthTest = e.depthTest),
+ (this.depthWrite = e.depthWrite),
+ (this.stencilWriteMask = e.stencilWriteMask),
+ (this.stencilFunc = e.stencilFunc),
+ (this.stencilRef = e.stencilRef),
+ (this.stencilFuncMask = e.stencilFuncMask),
+ (this.stencilFail = e.stencilFail),
+ (this.stencilZFail = e.stencilZFail),
+ (this.stencilZPass = e.stencilZPass),
+ (this.stencilWrite = e.stencilWrite);
+ var t = e.clippingPlanes,
+ n = null;
+ if (null !== t) {
+ var r = t.length;
+ n = new Array(r);
+ for (var i = 0; i !== r; ++i) n[i] = t[i].clone();
+ }
+ return (
+ (this.clippingPlanes = n),
+ (this.clipIntersection = e.clipIntersection),
+ (this.clipShadows = e.clipShadows),
+ (this.shadowSide = e.shadowSide),
+ (this.colorWrite = e.colorWrite),
+ (this.precision = e.precision),
+ (this.polygonOffset = e.polygonOffset),
+ (this.polygonOffsetFactor = e.polygonOffsetFactor),
+ (this.polygonOffsetUnits = e.polygonOffsetUnits),
+ (this.dithering = e.dithering),
+ (this.alphaTest = e.alphaTest),
+ (this.alphaHash = e.alphaHash),
+ (this.alphaToCoverage = e.alphaToCoverage),
+ (this.premultipliedAlpha = e.premultipliedAlpha),
+ (this.forceSinglePass = e.forceSinglePass),
+ (this.visible = e.visible),
+ (this.toneMapped = e.toneMapped),
+ (this.userData = JSON.parse(JSON.stringify(e.userData))),
+ this
+ );
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.dispatchEvent({ type: "dispose" });
+ },
+ },
+ {
+ key: "needsUpdate",
+ set: function (e) {
+ !0 === e && this.version++;
+ },
+ },
+ ]),
+ n
+ );
+ })(Jn),
+ sa = {
+ aliceblue: 15792383,
+ antiquewhite: 16444375,
+ aqua: 65535,
+ aquamarine: 8388564,
+ azure: 15794175,
+ beige: 16119260,
+ bisque: 16770244,
+ black: 0,
+ blanchedalmond: 16772045,
+ blue: 255,
+ blueviolet: 9055202,
+ brown: 10824234,
+ burlywood: 14596231,
+ cadetblue: 6266528,
+ chartreuse: 8388352,
+ chocolate: 13789470,
+ coral: 16744272,
+ cornflowerblue: 6591981,
+ cornsilk: 16775388,
+ crimson: 14423100,
+ cyan: 65535,
+ darkblue: 139,
+ darkcyan: 35723,
+ darkgoldenrod: 12092939,
+ darkgray: 11119017,
+ darkgreen: 25600,
+ darkgrey: 11119017,
+ darkkhaki: 12433259,
+ darkmagenta: 9109643,
+ darkolivegreen: 5597999,
+ darkorange: 16747520,
+ darkorchid: 10040012,
+ darkred: 9109504,
+ darksalmon: 15308410,
+ darkseagreen: 9419919,
+ darkslateblue: 4734347,
+ darkslategray: 3100495,
+ darkslategrey: 3100495,
+ darkturquoise: 52945,
+ darkviolet: 9699539,
+ deeppink: 16716947,
+ deepskyblue: 49151,
+ dimgray: 6908265,
+ dimgrey: 6908265,
+ dodgerblue: 2003199,
+ firebrick: 11674146,
+ floralwhite: 16775920,
+ forestgreen: 2263842,
+ fuchsia: 16711935,
+ gainsboro: 14474460,
+ ghostwhite: 16316671,
+ gold: 16766720,
+ goldenrod: 14329120,
+ gray: 8421504,
+ green: 32768,
+ greenyellow: 11403055,
+ grey: 8421504,
+ honeydew: 15794160,
+ hotpink: 16738740,
+ indianred: 13458524,
+ indigo: 4915330,
+ ivory: 16777200,
+ khaki: 15787660,
+ lavender: 15132410,
+ lavenderblush: 16773365,
+ lawngreen: 8190976,
+ lemonchiffon: 16775885,
+ lightblue: 11393254,
+ lightcoral: 15761536,
+ lightcyan: 14745599,
+ lightgoldenrodyellow: 16448210,
+ lightgray: 13882323,
+ lightgreen: 9498256,
+ lightgrey: 13882323,
+ lightpink: 16758465,
+ lightsalmon: 16752762,
+ lightseagreen: 2142890,
+ lightskyblue: 8900346,
+ lightslategray: 7833753,
+ lightslategrey: 7833753,
+ lightsteelblue: 11584734,
+ lightyellow: 16777184,
+ lime: 65280,
+ limegreen: 3329330,
+ linen: 16445670,
+ magenta: 16711935,
+ maroon: 8388608,
+ mediumaquamarine: 6737322,
+ mediumblue: 205,
+ mediumorchid: 12211667,
+ mediumpurple: 9662683,
+ mediumseagreen: 3978097,
+ mediumslateblue: 8087790,
+ mediumspringgreen: 64154,
+ mediumturquoise: 4772300,
+ mediumvioletred: 13047173,
+ midnightblue: 1644912,
+ mintcream: 16121850,
+ mistyrose: 16770273,
+ moccasin: 16770229,
+ navajowhite: 16768685,
+ navy: 128,
+ oldlace: 16643558,
+ olive: 8421376,
+ olivedrab: 7048739,
+ orange: 16753920,
+ orangered: 16729344,
+ orchid: 14315734,
+ palegoldenrod: 15657130,
+ palegreen: 10025880,
+ paleturquoise: 11529966,
+ palevioletred: 14381203,
+ papayawhip: 16773077,
+ peachpuff: 16767673,
+ peru: 13468991,
+ pink: 16761035,
+ plum: 14524637,
+ powderblue: 11591910,
+ purple: 8388736,
+ rebeccapurple: 6697881,
+ red: 16711680,
+ rosybrown: 12357519,
+ royalblue: 4286945,
+ saddlebrown: 9127187,
+ salmon: 16416882,
+ sandybrown: 16032864,
+ seagreen: 3050327,
+ seashell: 16774638,
+ sienna: 10506797,
+ silver: 12632256,
+ skyblue: 8900331,
+ slateblue: 6970061,
+ slategray: 7372944,
+ slategrey: 7372944,
+ snow: 16775930,
+ springgreen: 65407,
+ steelblue: 4620980,
+ tan: 13808780,
+ teal: 32896,
+ thistle: 14204888,
+ tomato: 16737095,
+ turquoise: 4251856,
+ violet: 15631086,
+ wheat: 16113331,
+ white: 16777215,
+ whitesmoke: 16119285,
+ yellow: 16776960,
+ yellowgreen: 10145074,
+ },
+ la = { h: 0, s: 0, l: 0 },
+ ua = { h: 0, s: 0, l: 0 };
+ function ca(e, t, n) {
+ return (
+ n < 0 && (n += 1),
+ n > 1 && (n -= 1),
+ n < 1 / 6
+ ? e + 6 * (t - e) * n
+ : n < 0.5
+ ? t
+ : n < 2 / 3
+ ? e + 6 * (t - e) * (2 / 3 - n)
+ : e
+ );
+ }
+ var fa = (function (e) {
+ function t(e, n, r) {
+ return (
+ (0, m.Z)(this, t),
+ (this.isColor = !0),
+ (this.r = 1),
+ (this.g = 1),
+ (this.b = 1),
+ this.set(e, n, r)
+ );
+ }
+ return (
+ (0, g.Z)(t, [
+ {
+ key: "set",
+ value: function (e, t, n) {
+ if (void 0 === t && void 0 === n) {
+ var r = e;
+ r && r.isColor
+ ? this.copy(r)
+ : "number" === typeof r
+ ? this.setHex(r)
+ : "string" === typeof r && this.setStyle(r);
+ } else this.setRGB(e, t, n);
+ return this;
+ },
+ },
+ {
+ key: "setScalar",
+ value: function (e) {
+ return (this.r = e), (this.g = e), (this.b = e), this;
+ },
+ },
+ {
+ key: "setHex",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : an;
+ return (
+ (e = Math.floor(e)),
+ (this.r = ((e >> 16) & 255) / 255),
+ (this.g = ((e >> 8) & 255) / 255),
+ (this.b = (255 & e) / 255),
+ Tr.toWorkingColorSpace(this, t),
+ this
+ );
+ },
+ },
+ {
+ key: "setRGB",
+ value: function (e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : Tr.workingColorSpace;
+ return (
+ (this.r = e),
+ (this.g = t),
+ (this.b = n),
+ Tr.toWorkingColorSpace(this, r),
+ this
+ );
+ },
+ },
+ {
+ key: "setHSL",
+ value: function (e, t, n) {
+ var r =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : Tr.workingColorSpace;
+ if (
+ ((e = ir(e, 1)),
+ (t = rr(t, 0, 1)),
+ (n = rr(n, 0, 1)),
+ 0 === t)
+ )
+ this.r = this.g = this.b = n;
+ else {
+ var i = n <= 0.5 ? n * (1 + t) : n + t - n * t,
+ a = 2 * n - i;
+ (this.r = ca(a, i, e + 1 / 3)),
+ (this.g = ca(a, i, e)),
+ (this.b = ca(a, i, e - 1 / 3));
+ }
+ return Tr.toWorkingColorSpace(this, r), this;
+ },
+ },
+ {
+ key: "setStyle",
+ value: function (e) {
+ var t,
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : an;
+ function r(t) {
+ void 0 !== t &&
+ parseFloat(t) < 1 &&
+ console.warn(
+ "THREE.Color: Alpha component of " +
+ e +
+ " will be ignored."
+ );
+ }
+ if ((t = /^(\w+)\(([^\)]*)\)/.exec(e))) {
+ var i,
+ a = t[1],
+ o = t[2];
+ switch (a) {
+ case "rgb":
+ case "rgba":
+ if (
+ (i =
+ /^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(
+ o
+ ))
+ )
+ return (
+ r(i[4]),
+ this.setRGB(
+ Math.min(255, parseInt(i[1], 10)) / 255,
+ Math.min(255, parseInt(i[2], 10)) / 255,
+ Math.min(255, parseInt(i[3], 10)) / 255,
+ n
+ )
+ );
+ if (
+ (i =
+ /^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(
+ o
+ ))
+ )
+ return (
+ r(i[4]),
+ this.setRGB(
+ Math.min(100, parseInt(i[1], 10)) / 100,
+ Math.min(100, parseInt(i[2], 10)) / 100,
+ Math.min(100, parseInt(i[3], 10)) / 100,
+ n
+ )
+ );
+ break;
+ case "hsl":
+ case "hsla":
+ if (
+ (i =
+ /^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(
+ o
+ ))
+ )
+ return (
+ r(i[4]),
+ this.setHSL(
+ parseFloat(i[1]) / 360,
+ parseFloat(i[2]) / 100,
+ parseFloat(i[3]) / 100,
+ n
+ )
+ );
+ break;
+ default:
+ console.warn("THREE.Color: Unknown color model " + e);
+ }
+ } else if ((t = /^\#([A-Fa-f\d]+)$/.exec(e))) {
+ var s = t[1],
+ l = s.length;
+ if (3 === l)
+ return this.setRGB(
+ parseInt(s.charAt(0), 16) / 15,
+ parseInt(s.charAt(1), 16) / 15,
+ parseInt(s.charAt(2), 16) / 15,
+ n
+ );
+ if (6 === l) return this.setHex(parseInt(s, 16), n);
+ console.warn("THREE.Color: Invalid hex color " + e);
+ } else if (e && e.length > 0)
+ return this.setColorName(e, n);
+ return this;
+ },
+ },
+ {
+ key: "setColorName",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : an,
+ n = sa[e.toLowerCase()];
+ return (
+ void 0 !== n
+ ? this.setHex(n, t)
+ : console.warn("THREE.Color: Unknown color " + e),
+ this
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(this.r, this.g, this.b);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (this.r = e.r), (this.g = e.g), (this.b = e.b), this;
+ },
+ },
+ {
+ key: "copySRGBToLinear",
+ value: function (e) {
+ return (
+ (this.r = Mr(e.r)),
+ (this.g = Mr(e.g)),
+ (this.b = Mr(e.b)),
+ this
+ );
+ },
+ },
+ {
+ key: "copyLinearToSRGB",
+ value: function (e) {
+ return (
+ (this.r = Ir(e.r)),
+ (this.g = Ir(e.g)),
+ (this.b = Ir(e.b)),
+ this
+ );
+ },
+ },
+ {
+ key: "convertSRGBToLinear",
+ value: function () {
+ return this.copySRGBToLinear(this), this;
+ },
+ },
+ {
+ key: "convertLinearToSRGB",
+ value: function () {
+ return this.copyLinearToSRGB(this), this;
+ },
+ },
+ {
+ key: "getHex",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : an;
+ return (
+ Tr.fromWorkingColorSpace(da.copy(this), e),
+ 65536 * Math.round(rr(255 * da.r, 0, 255)) +
+ 256 * Math.round(rr(255 * da.g, 0, 255)) +
+ Math.round(rr(255 * da.b, 0, 255))
+ );
+ },
+ },
+ {
+ key: "getHexString",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : an;
+ return ("000000" + this.getHex(e).toString(16)).slice(-6);
+ },
+ },
+ {
+ key: "getHSL",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Tr.workingColorSpace;
+ Tr.fromWorkingColorSpace(da.copy(this), t);
+ var n,
+ r,
+ i = da.r,
+ a = da.g,
+ o = da.b,
+ s = Math.max(i, a, o),
+ l = Math.min(i, a, o),
+ u = (l + s) / 2;
+ if (l === s) (n = 0), (r = 0);
+ else {
+ var c = s - l;
+ switch (
+ ((r = u <= 0.5 ? c / (s + l) : c / (2 - s - l)), s)
+ ) {
+ case i:
+ n = (a - o) / c + (a < o ? 6 : 0);
+ break;
+ case a:
+ n = (o - i) / c + 2;
+ break;
+ case o:
+ n = (i - a) / c + 4;
+ }
+ n /= 6;
+ }
+ return (e.h = n), (e.s = r), (e.l = u), e;
+ },
+ },
+ {
+ key: "getRGB",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Tr.workingColorSpace;
+ return (
+ Tr.fromWorkingColorSpace(da.copy(this), t),
+ (e.r = da.r),
+ (e.g = da.g),
+ (e.b = da.b),
+ e
+ );
+ },
+ },
+ {
+ key: "getStyle",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : an;
+ Tr.fromWorkingColorSpace(da.copy(this), e);
+ var t = da.r,
+ n = da.g,
+ r = da.b;
+ return e !== an
+ ? "color("
+ .concat(e, " ")
+ .concat(t.toFixed(3), " ")
+ .concat(n.toFixed(3), " ")
+ .concat(r.toFixed(3), ")")
+ : "rgb("
+ .concat(Math.round(255 * t), ",")
+ .concat(Math.round(255 * n), ",")
+ .concat(Math.round(255 * r), ")");
+ },
+ },
+ {
+ key: "offsetHSL",
+ value: function (e, t, n) {
+ return (
+ this.getHSL(la), this.setHSL(la.h + e, la.s + t, la.l + n)
+ );
+ },
+ },
+ {
+ key: "add",
+ value: function (e) {
+ return (
+ (this.r += e.r), (this.g += e.g), (this.b += e.b), this
+ );
+ },
+ },
+ {
+ key: "addColors",
+ value: function (e, t) {
+ return (
+ (this.r = e.r + t.r),
+ (this.g = e.g + t.g),
+ (this.b = e.b + t.b),
+ this
+ );
+ },
+ },
+ {
+ key: "addScalar",
+ value: function (e) {
+ return (this.r += e), (this.g += e), (this.b += e), this;
+ },
+ },
+ {
+ key: "sub",
+ value: function (e) {
+ return (
+ (this.r = Math.max(0, this.r - e.r)),
+ (this.g = Math.max(0, this.g - e.g)),
+ (this.b = Math.max(0, this.b - e.b)),
+ this
+ );
+ },
+ },
+ {
+ key: "multiply",
+ value: function (e) {
+ return (
+ (this.r *= e.r), (this.g *= e.g), (this.b *= e.b), this
+ );
+ },
+ },
+ {
+ key: "multiplyScalar",
+ value: function (e) {
+ return (this.r *= e), (this.g *= e), (this.b *= e), this;
+ },
+ },
+ {
+ key: "lerp",
+ value: function (e, t) {
+ return (
+ (this.r += (e.r - this.r) * t),
+ (this.g += (e.g - this.g) * t),
+ (this.b += (e.b - this.b) * t),
+ this
+ );
+ },
+ },
+ {
+ key: "lerpColors",
+ value: function (e, t, n) {
+ return (
+ (this.r = e.r + (t.r - e.r) * n),
+ (this.g = e.g + (t.g - e.g) * n),
+ (this.b = e.b + (t.b - e.b) * n),
+ this
+ );
+ },
+ },
+ {
+ key: "lerpHSL",
+ value: function (e, t) {
+ this.getHSL(la), e.getHSL(ua);
+ var n = ar(la.h, ua.h, t),
+ r = ar(la.s, ua.s, t),
+ i = ar(la.l, ua.l, t);
+ return this.setHSL(n, r, i), this;
+ },
+ },
+ {
+ key: "setFromVector3",
+ value: function (e) {
+ return (this.r = e.x), (this.g = e.y), (this.b = e.z), this;
+ },
+ },
+ {
+ key: "applyMatrix3",
+ value: function (e) {
+ var t = this.r,
+ n = this.g,
+ r = this.b,
+ i = e.elements;
+ return (
+ (this.r = i[0] * t + i[3] * n + i[6] * r),
+ (this.g = i[1] * t + i[4] * n + i[7] * r),
+ (this.b = i[2] * t + i[5] * n + i[8] * r),
+ this
+ );
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return e.r === this.r && e.g === this.g && e.b === this.b;
+ },
+ },
+ {
+ key: "fromArray",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (this.r = e[t]),
+ (this.g = e[t + 1]),
+ (this.b = e[t + 2]),
+ this
+ );
+ },
+ },
+ {
+ key: "toArray",
+ value: function () {
+ var e =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : [],
+ t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return (
+ (e[t] = this.r),
+ (e[t + 1] = this.g),
+ (e[t + 2] = this.b),
+ e
+ );
+ },
+ },
+ {
+ key: "fromBufferAttribute",
+ value: function (e, t) {
+ return (
+ (this.r = e.getX(t)),
+ (this.g = e.getY(t)),
+ (this.b = e.getZ(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "toJSON",
+ value: function () {
+ return this.getHex();
+ },
+ },
+ {
+ key: e,
+ value: (0, v.Z)().mark(function e() {
+ return (0, v.Z)().wrap(
+ function (e) {
+ for (;;)
+ switch ((e.prev = e.next)) {
+ case 0:
+ return (e.next = 2), this.r;
+ case 2:
+ return (e.next = 4), this.g;
+ case 4:
+ return (e.next = 6), this.b;
+ case 6:
+ case "end":
+ return e.stop();
+ }
+ },
+ e,
+ this
+ );
+ }),
+ },
+ ]),
+ t
+ );
+ })(Symbol.iterator),
+ da = new fa();
+ fa.NAMES = sa;
+ var ha = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, m.Z)(this, n),
+ ((r = t.call(this)).isMeshBasicMaterial = !0),
+ (r.type = "MeshBasicMaterial"),
+ (r.color = new fa(16777215)),
+ (r.map = null),
+ (r.lightMap = null),
+ (r.lightMapIntensity = 1),
+ (r.aoMap = null),
+ (r.aoMapIntensity = 1),
+ (r.specularMap = null),
+ (r.alphaMap = null),
+ (r.envMap = null),
+ (r.combine = ue),
+ (r.reflectivity = 1),
+ (r.refractionRatio = 0.98),
+ (r.wireframe = !1),
+ (r.wireframeLinewidth = 1),
+ (r.wireframeLinecap = "round"),
+ (r.wireframeLinejoin = "round"),
+ (r.fog = !0),
+ r.setValues(e),
+ r
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e
+ ),
+ this.color.copy(e.color),
+ (this.map = e.map),
+ (this.lightMap = e.lightMap),
+ (this.lightMapIntensity = e.lightMapIntensity),
+ (this.aoMap = e.aoMap),
+ (this.aoMapIntensity = e.aoMapIntensity),
+ (this.specularMap = e.specularMap),
+ (this.alphaMap = e.alphaMap),
+ (this.envMap = e.envMap),
+ (this.combine = e.combine),
+ (this.reflectivity = e.reflectivity),
+ (this.refractionRatio = e.refractionRatio),
+ (this.wireframe = e.wireframe),
+ (this.wireframeLinewidth = e.wireframeLinewidth),
+ (this.wireframeLinecap = e.wireframeLinecap),
+ (this.wireframeLinejoin = e.wireframeLinejoin),
+ (this.fog = e.fog),
+ this
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(oa),
+ pa = va();
+ function va() {
+ for (
+ var e = new ArrayBuffer(4),
+ t = new Float32Array(e),
+ n = new Uint32Array(e),
+ r = new Uint32Array(512),
+ i = new Uint32Array(512),
+ a = 0;
+ a < 256;
+ ++a
+ ) {
+ var o = a - 127;
+ o < -27
+ ? ((r[a] = 0),
+ (r[256 | a] = 32768),
+ (i[a] = 24),
+ (i[256 | a] = 24))
+ : o < -14
+ ? ((r[a] = 1024 >> (-o - 14)),
+ (r[256 | a] = (1024 >> (-o - 14)) | 32768),
+ (i[a] = -o - 1),
+ (i[256 | a] = -o - 1))
+ : o <= 15
+ ? ((r[a] = (o + 15) << 10),
+ (r[256 | a] = ((o + 15) << 10) | 32768),
+ (i[a] = 13),
+ (i[256 | a] = 13))
+ : o < 128
+ ? ((r[a] = 31744),
+ (r[256 | a] = 64512),
+ (i[a] = 24),
+ (i[256 | a] = 24))
+ : ((r[a] = 31744),
+ (r[256 | a] = 64512),
+ (i[a] = 13),
+ (i[256 | a] = 13));
+ }
+ for (
+ var s = new Uint32Array(2048),
+ l = new Uint32Array(64),
+ u = new Uint32Array(64),
+ c = 1;
+ c < 1024;
+ ++c
+ ) {
+ for (var f = c << 13, d = 0; 0 === (8388608 & f); )
+ (f <<= 1), (d -= 8388608);
+ (f &= -8388609), (d += 947912704), (s[c] = f | d);
+ }
+ for (var h = 1024; h < 2048; ++h)
+ s[h] = 939524096 + ((h - 1024) << 13);
+ for (var p = 1; p < 31; ++p) l[p] = p << 23;
+ (l[31] = 1199570944), (l[32] = 2147483648);
+ for (var v = 33; v < 63; ++v) l[v] = 2147483648 + ((v - 32) << 23);
+ l[63] = 3347054592;
+ for (var m = 1; m < 64; ++m) 32 !== m && (u[m] = 1024);
+ return {
+ floatView: t,
+ uint32View: n,
+ baseTable: r,
+ shiftTable: i,
+ mantissaTable: s,
+ exponentTable: l,
+ offsetTable: u,
+ };
+ }
+ function ma(e) {
+ Math.abs(e) > 65504 &&
+ console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),
+ (e = rr(e, -65504, 65504)),
+ (pa.floatView[0] = e);
+ var t = pa.uint32View[0],
+ n = (t >> 23) & 511;
+ return pa.baseTable[n] + ((8388607 & t) >> pa.shiftTable[n]);
+ }
+ function ga(e) {
+ var t = e >> 10;
+ return (
+ (pa.uint32View[0] =
+ pa.mantissaTable[pa.offsetTable[t] + (1023 & e)] +
+ pa.exponentTable[t]),
+ pa.floatView[0]
+ );
+ }
+ var Aa = { toHalfFloat: ma, fromHalfFloat: ga },
+ ya = new Vr(),
+ ba = new dr(),
+ xa = (function () {
+ function e(t, n) {
+ var r =
+ arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
+ if (((0, m.Z)(this, e), Array.isArray(t)))
+ throw new TypeError(
+ "THREE.BufferAttribute: array should be a Typed Array."
+ );
+ (this.isBufferAttribute = !0),
+ (this.name = ""),
+ (this.array = t),
+ (this.itemSize = n),
+ (this.count = void 0 !== t ? t.length / n : 0),
+ (this.normalized = r),
+ (this.usage = Fn),
+ (this.updateRange = { offset: 0, count: -1 }),
+ (this.gpuType = Qe),
+ (this.version = 0);
+ }
+ return (
+ (0, g.Z)(e, [
+ { key: "onUploadCallback", value: function () {} },
+ {
+ key: "needsUpdate",
+ set: function (e) {
+ !0 === e && this.version++;
+ },
+ },
+ {
+ key: "setUsage",
+ value: function (e) {
+ return (this.usage = e), this;
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (this.name = e.name),
+ (this.array = new e.array.constructor(e.array)),
+ (this.itemSize = e.itemSize),
+ (this.count = e.count),
+ (this.normalized = e.normalized),
+ (this.usage = e.usage),
+ (this.gpuType = e.gpuType),
+ this
+ );
+ },
+ },
+ {
+ key: "copyAt",
+ value: function (e, t, n) {
+ (e *= this.itemSize), (n *= t.itemSize);
+ for (var r = 0, i = this.itemSize; r < i; r++)
+ this.array[e + r] = t.array[n + r];
+ return this;
+ },
+ },
+ {
+ key: "copyArray",
+ value: function (e) {
+ return this.array.set(e), this;
+ },
+ },
+ {
+ key: "applyMatrix3",
+ value: function (e) {
+ if (2 === this.itemSize)
+ for (var t = 0, n = this.count; t < n; t++)
+ ba.fromBufferAttribute(this, t),
+ ba.applyMatrix3(e),
+ this.setXY(t, ba.x, ba.y);
+ else if (3 === this.itemSize)
+ for (var r = 0, i = this.count; r < i; r++)
+ ya.fromBufferAttribute(this, r),
+ ya.applyMatrix3(e),
+ this.setXYZ(r, ya.x, ya.y, ya.z);
+ return this;
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ for (var t = 0, n = this.count; t < n; t++)
+ ya.fromBufferAttribute(this, t),
+ ya.applyMatrix4(e),
+ this.setXYZ(t, ya.x, ya.y, ya.z);
+ return this;
+ },
+ },
+ {
+ key: "applyNormalMatrix",
+ value: function (e) {
+ for (var t = 0, n = this.count; t < n; t++)
+ ya.fromBufferAttribute(this, t),
+ ya.applyNormalMatrix(e),
+ this.setXYZ(t, ya.x, ya.y, ya.z);
+ return this;
+ },
+ },
+ {
+ key: "transformDirection",
+ value: function (e) {
+ for (var t = 0, n = this.count; t < n; t++)
+ ya.fromBufferAttribute(this, t),
+ ya.transformDirection(e),
+ this.setXYZ(t, ya.x, ya.y, ya.z);
+ return this;
+ },
+ },
+ {
+ key: "set",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ return this.array.set(e, t), this;
+ },
+ },
+ {
+ key: "getComponent",
+ value: function (e, t) {
+ var n = this.array[e * this.itemSize + t];
+ return this.normalized && (n = ur(n, this.array)), n;
+ },
+ },
+ {
+ key: "setComponent",
+ value: function (e, t, n) {
+ return (
+ this.normalized && (n = cr(n, this.array)),
+ (this.array[e * this.itemSize + t] = n),
+ this
+ );
+ },
+ },
+ {
+ key: "getX",
+ value: function (e) {
+ var t = this.array[e * this.itemSize];
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setX",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize] = t),
+ this
+ );
+ },
+ },
+ {
+ key: "getY",
+ value: function (e) {
+ var t = this.array[e * this.itemSize + 1];
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setY",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize + 1] = t),
+ this
+ );
+ },
+ },
+ {
+ key: "getZ",
+ value: function (e) {
+ var t = this.array[e * this.itemSize + 2];
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setZ",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize + 2] = t),
+ this
+ );
+ },
+ },
+ {
+ key: "getW",
+ value: function (e) {
+ var t = this.array[e * this.itemSize + 3];
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setW",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize + 3] = t),
+ this
+ );
+ },
+ },
+ {
+ key: "setXY",
+ value: function (e, t, n) {
+ return (
+ (e *= this.itemSize),
+ this.normalized &&
+ ((t = cr(t, this.array)), (n = cr(n, this.array))),
+ (this.array[e + 0] = t),
+ (this.array[e + 1] = n),
+ this
+ );
+ },
+ },
+ {
+ key: "setXYZ",
+ value: function (e, t, n, r) {
+ return (
+ (e *= this.itemSize),
+ this.normalized &&
+ ((t = cr(t, this.array)),
+ (n = cr(n, this.array)),
+ (r = cr(r, this.array))),
+ (this.array[e + 0] = t),
+ (this.array[e + 1] = n),
+ (this.array[e + 2] = r),
+ this
+ );
+ },
+ },
+ {
+ key: "setXYZW",
+ value: function (e, t, n, r, i) {
+ return (
+ (e *= this.itemSize),
+ this.normalized &&
+ ((t = cr(t, this.array)),
+ (n = cr(n, this.array)),
+ (r = cr(r, this.array)),
+ (i = cr(i, this.array))),
+ (this.array[e + 0] = t),
+ (this.array[e + 1] = n),
+ (this.array[e + 2] = r),
+ (this.array[e + 3] = i),
+ this
+ );
+ },
+ },
+ {
+ key: "onUpload",
+ value: function (e) {
+ return (this.onUploadCallback = e), this;
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor(this.array, this.itemSize).copy(
+ this
+ );
+ },
+ },
+ {
+ key: "toJSON",
+ value: function () {
+ var e = {
+ itemSize: this.itemSize,
+ type: this.array.constructor.name,
+ array: Array.from(this.array),
+ normalized: this.normalized,
+ };
+ return (
+ "" !== this.name && (e.name = this.name),
+ this.usage !== Fn && (e.usage = this.usage),
+ (0 === this.updateRange.offset &&
+ -1 === this.updateRange.count) ||
+ (e.updateRange = this.updateRange),
+ e
+ );
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ Sa = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Int8Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ea = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Uint8Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ _a = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (
+ (0, m.Z)(this, n), t.call(this, new Uint8ClampedArray(e), r, i)
+ );
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ca = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Int16Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ wa = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Uint16Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ta = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Int32Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ma = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Uint32Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ia = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ var a;
+ return (
+ (0, m.Z)(this, n),
+ ((a = t.call(
+ this,
+ new Uint16Array(e),
+ r,
+ i
+ )).isFloat16BufferAttribute = !0),
+ a
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "getX",
+ value: function (e) {
+ var t = ga(this.array[e * this.itemSize]);
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setX",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize] = ma(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "getY",
+ value: function (e) {
+ var t = ga(this.array[e * this.itemSize + 1]);
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setY",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize + 1] = ma(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "getZ",
+ value: function (e) {
+ var t = ga(this.array[e * this.itemSize + 2]);
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setZ",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize + 2] = ma(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "getW",
+ value: function (e) {
+ var t = ga(this.array[e * this.itemSize + 3]);
+ return this.normalized && (t = ur(t, this.array)), t;
+ },
+ },
+ {
+ key: "setW",
+ value: function (e, t) {
+ return (
+ this.normalized && (t = cr(t, this.array)),
+ (this.array[e * this.itemSize + 3] = ma(t)),
+ this
+ );
+ },
+ },
+ {
+ key: "setXY",
+ value: function (e, t, n) {
+ return (
+ (e *= this.itemSize),
+ this.normalized &&
+ ((t = cr(t, this.array)), (n = cr(n, this.array))),
+ (this.array[e + 0] = ma(t)),
+ (this.array[e + 1] = ma(n)),
+ this
+ );
+ },
+ },
+ {
+ key: "setXYZ",
+ value: function (e, t, n, r) {
+ return (
+ (e *= this.itemSize),
+ this.normalized &&
+ ((t = cr(t, this.array)),
+ (n = cr(n, this.array)),
+ (r = cr(r, this.array))),
+ (this.array[e + 0] = ma(t)),
+ (this.array[e + 1] = ma(n)),
+ (this.array[e + 2] = ma(r)),
+ this
+ );
+ },
+ },
+ {
+ key: "setXYZW",
+ value: function (e, t, n, r, i) {
+ return (
+ (e *= this.itemSize),
+ this.normalized &&
+ ((t = cr(t, this.array)),
+ (n = cr(n, this.array)),
+ (r = cr(r, this.array)),
+ (i = cr(i, this.array))),
+ (this.array[e + 0] = ma(t)),
+ (this.array[e + 1] = ma(n)),
+ (this.array[e + 2] = ma(r)),
+ (this.array[e + 3] = ma(i)),
+ this
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(xa),
+ ka = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Float32Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ra = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ return (0, m.Z)(this, n), t.call(this, new Float64Array(e), r, i);
+ }
+ return (0, g.Z)(n);
+ })(xa),
+ Ba = 0,
+ Pa = new xi(),
+ La = new ji(),
+ Da = new Vr(),
+ Ua = new Xr(),
+ Fa = new Xr(),
+ Oa = new Vr(),
+ Na = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isBufferGeometry = !0),
+ Object.defineProperty((0, f.Z)(e), "id", { value: Ba++ }),
+ (e.uuid = nr()),
+ (e.name = ""),
+ (e.type = "BufferGeometry"),
+ (e.index = null),
+ (e.attributes = {}),
+ (e.morphAttributes = {}),
+ (e.morphTargetsRelative = !1),
+ (e.groups = []),
+ (e.boundingBox = null),
+ (e.boundingSphere = null),
+ (e.drawRange = { start: 0, count: 1 / 0 }),
+ (e.userData = {}),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "getIndex",
+ value: function () {
+ return this.index;
+ },
+ },
+ {
+ key: "setIndex",
+ value: function (e) {
+ return (
+ Array.isArray(e)
+ ? (this.index = new (vr(e) ? Ma : wa)(e, 1))
+ : (this.index = e),
+ this
+ );
+ },
+ },
+ {
+ key: "getAttribute",
+ value: function (e) {
+ return this.attributes[e];
+ },
+ },
+ {
+ key: "setAttribute",
+ value: function (e, t) {
+ return (this.attributes[e] = t), this;
+ },
+ },
+ {
+ key: "deleteAttribute",
+ value: function (e) {
+ return delete this.attributes[e], this;
+ },
+ },
+ {
+ key: "hasAttribute",
+ value: function (e) {
+ return void 0 !== this.attributes[e];
+ },
+ },
+ {
+ key: "addGroup",
+ value: function (e, t) {
+ var n =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0;
+ this.groups.push({ start: e, count: t, materialIndex: n });
+ },
+ },
+ {
+ key: "clearGroups",
+ value: function () {
+ this.groups = [];
+ },
+ },
+ {
+ key: "setDrawRange",
+ value: function (e, t) {
+ (this.drawRange.start = e), (this.drawRange.count = t);
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e) {
+ var t = this.attributes.position;
+ void 0 !== t && (t.applyMatrix4(e), (t.needsUpdate = !0));
+ var n = this.attributes.normal;
+ if (void 0 !== n) {
+ var r = new hr().getNormalMatrix(e);
+ n.applyNormalMatrix(r), (n.needsUpdate = !0);
+ }
+ var i = this.attributes.tangent;
+ return (
+ void 0 !== i &&
+ (i.transformDirection(e), (i.needsUpdate = !0)),
+ null !== this.boundingBox && this.computeBoundingBox(),
+ null !== this.boundingSphere &&
+ this.computeBoundingSphere(),
+ this
+ );
+ },
+ },
+ {
+ key: "applyQuaternion",
+ value: function (e) {
+ return (
+ Pa.makeRotationFromQuaternion(e),
+ this.applyMatrix4(Pa),
+ this
+ );
+ },
+ },
+ {
+ key: "rotateX",
+ value: function (e) {
+ return Pa.makeRotationX(e), this.applyMatrix4(Pa), this;
+ },
+ },
+ {
+ key: "rotateY",
+ value: function (e) {
+ return Pa.makeRotationY(e), this.applyMatrix4(Pa), this;
+ },
+ },
+ {
+ key: "rotateZ",
+ value: function (e) {
+ return Pa.makeRotationZ(e), this.applyMatrix4(Pa), this;
+ },
+ },
+ {
+ key: "translate",
+ value: function (e, t, n) {
+ return (
+ Pa.makeTranslation(e, t, n), this.applyMatrix4(Pa), this
+ );
+ },
+ },
+ {
+ key: "scale",
+ value: function (e, t, n) {
+ return Pa.makeScale(e, t, n), this.applyMatrix4(Pa), this;
+ },
+ },
+ {
+ key: "lookAt",
+ value: function (e) {
+ return (
+ La.lookAt(e),
+ La.updateMatrix(),
+ this.applyMatrix4(La.matrix),
+ this
+ );
+ },
+ },
+ {
+ key: "center",
+ value: function () {
+ return (
+ this.computeBoundingBox(),
+ this.boundingBox.getCenter(Da).negate(),
+ this.translate(Da.x, Da.y, Da.z),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromPoints",
+ value: function (e) {
+ for (var t = [], n = 0, r = e.length; n < r; n++) {
+ var i = e[n];
+ t.push(i.x, i.y, i.z || 0);
+ }
+ return this.setAttribute("position", new ka(t, 3)), this;
+ },
+ },
+ {
+ key: "computeBoundingBox",
+ value: function () {
+ null === this.boundingBox && (this.boundingBox = new Xr());
+ var e = this.attributes.position,
+ t = this.morphAttributes.position;
+ if (e && e.isGLBufferAttribute)
+ return (
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',
+ this
+ ),
+ void this.boundingBox.set(
+ new Vr(-1 / 0, -1 / 0, -1 / 0),
+ new Vr(1 / 0, 1 / 0, 1 / 0)
+ )
+ );
+ if (void 0 !== e) {
+ if ((this.boundingBox.setFromBufferAttribute(e), t))
+ for (var n = 0, r = t.length; n < r; n++) {
+ var i = t[n];
+ Ua.setFromBufferAttribute(i),
+ this.morphTargetsRelative
+ ? (Oa.addVectors(this.boundingBox.min, Ua.min),
+ this.boundingBox.expandByPoint(Oa),
+ Oa.addVectors(this.boundingBox.max, Ua.max),
+ this.boundingBox.expandByPoint(Oa))
+ : (this.boundingBox.expandByPoint(Ua.min),
+ this.boundingBox.expandByPoint(Ua.max));
+ }
+ } else this.boundingBox.makeEmpty();
+ (isNaN(this.boundingBox.min.x) ||
+ isNaN(this.boundingBox.min.y) ||
+ isNaN(this.boundingBox.min.z)) &&
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',
+ this
+ );
+ },
+ },
+ {
+ key: "computeBoundingSphere",
+ value: function () {
+ null === this.boundingSphere &&
+ (this.boundingSphere = new di());
+ var e = this.attributes.position,
+ t = this.morphAttributes.position;
+ if (e && e.isGLBufferAttribute)
+ return (
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',
+ this
+ ),
+ void this.boundingSphere.set(new Vr(), 1 / 0)
+ );
+ if (e) {
+ var n = this.boundingSphere.center;
+ if ((Ua.setFromBufferAttribute(e), t))
+ for (var r = 0, i = t.length; r < i; r++) {
+ var a = t[r];
+ Fa.setFromBufferAttribute(a),
+ this.morphTargetsRelative
+ ? (Oa.addVectors(Ua.min, Fa.min),
+ Ua.expandByPoint(Oa),
+ Oa.addVectors(Ua.max, Fa.max),
+ Ua.expandByPoint(Oa))
+ : (Ua.expandByPoint(Fa.min),
+ Ua.expandByPoint(Fa.max));
+ }
+ Ua.getCenter(n);
+ for (var o = 0, s = 0, l = e.count; s < l; s++)
+ Oa.fromBufferAttribute(e, s),
+ (o = Math.max(o, n.distanceToSquared(Oa)));
+ if (t)
+ for (var u = 0, c = t.length; u < c; u++)
+ for (
+ var f = t[u],
+ d = this.morphTargetsRelative,
+ h = 0,
+ p = f.count;
+ h < p;
+ h++
+ )
+ Oa.fromBufferAttribute(f, h),
+ d && (Da.fromBufferAttribute(e, h), Oa.add(Da)),
+ (o = Math.max(o, n.distanceToSquared(Oa)));
+ (this.boundingSphere.radius = Math.sqrt(o)),
+ isNaN(this.boundingSphere.radius) &&
+ console.error(
+ 'THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',
+ this
+ );
+ }
+ },
+ },
+ {
+ key: "computeTangents",
+ value: function () {
+ var e = this.index,
+ t = this.attributes;
+ if (
+ null !== e &&
+ void 0 !== t.position &&
+ void 0 !== t.normal &&
+ void 0 !== t.uv
+ ) {
+ var n = e.array,
+ r = t.position.array,
+ i = t.normal.array,
+ a = t.uv.array,
+ o = r.length / 3;
+ !1 === this.hasAttribute("tangent") &&
+ this.setAttribute(
+ "tangent",
+ new xa(new Float32Array(4 * o), 4)
+ );
+ for (
+ var s = this.getAttribute("tangent").array,
+ l = [],
+ u = [],
+ c = 0;
+ c < o;
+ c++
+ )
+ (l[c] = new Vr()), (u[c] = new Vr());
+ var f = new Vr(),
+ d = new Vr(),
+ h = new Vr(),
+ p = new dr(),
+ v = new dr(),
+ m = new dr(),
+ g = new Vr(),
+ A = new Vr(),
+ y = this.groups;
+ 0 === y.length && (y = [{ start: 0, count: n.length }]);
+ for (var b = 0, x = y.length; b < x; ++b)
+ for (
+ var S = y[b], E = S.start, _ = E, C = E + S.count;
+ _ < C;
+ _ += 3
+ )
+ U(n[_ + 0], n[_ + 1], n[_ + 2]);
+ for (
+ var w = new Vr(),
+ T = new Vr(),
+ M = new Vr(),
+ I = new Vr(),
+ k = 0,
+ R = y.length;
+ k < R;
+ ++k
+ )
+ for (
+ var B = y[k], P = B.start, L = P, D = P + B.count;
+ L < D;
+ L += 3
+ )
+ F(n[L + 0]), F(n[L + 1]), F(n[L + 2]);
+ } else
+ console.error(
+ "THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)"
+ );
+ function U(e, t, n) {
+ f.fromArray(r, 3 * e),
+ d.fromArray(r, 3 * t),
+ h.fromArray(r, 3 * n),
+ p.fromArray(a, 2 * e),
+ v.fromArray(a, 2 * t),
+ m.fromArray(a, 2 * n),
+ d.sub(f),
+ h.sub(f),
+ v.sub(p),
+ m.sub(p);
+ var i = 1 / (v.x * m.y - m.x * v.y);
+ isFinite(i) &&
+ (g
+ .copy(d)
+ .multiplyScalar(m.y)
+ .addScaledVector(h, -v.y)
+ .multiplyScalar(i),
+ A.copy(h)
+ .multiplyScalar(v.x)
+ .addScaledVector(d, -m.x)
+ .multiplyScalar(i),
+ l[e].add(g),
+ l[t].add(g),
+ l[n].add(g),
+ u[e].add(A),
+ u[t].add(A),
+ u[n].add(A));
+ }
+ function F(e) {
+ M.fromArray(i, 3 * e), I.copy(M);
+ var t = l[e];
+ w.copy(t),
+ w.sub(M.multiplyScalar(M.dot(t))).normalize(),
+ T.crossVectors(I, t);
+ var n = T.dot(u[e]) < 0 ? -1 : 1;
+ (s[4 * e] = w.x),
+ (s[4 * e + 1] = w.y),
+ (s[4 * e + 2] = w.z),
+ (s[4 * e + 3] = n);
+ }
+ },
+ },
+ {
+ key: "computeVertexNormals",
+ value: function () {
+ var e = this.index,
+ t = this.getAttribute("position");
+ if (void 0 !== t) {
+ var n = this.getAttribute("normal");
+ if (void 0 === n)
+ (n = new xa(new Float32Array(3 * t.count), 3)),
+ this.setAttribute("normal", n);
+ else
+ for (var r = 0, i = n.count; r < i; r++)
+ n.setXYZ(r, 0, 0, 0);
+ var a = new Vr(),
+ o = new Vr(),
+ s = new Vr(),
+ l = new Vr(),
+ u = new Vr(),
+ c = new Vr(),
+ f = new Vr(),
+ d = new Vr();
+ if (e)
+ for (var h = 0, p = e.count; h < p; h += 3) {
+ var v = e.getX(h + 0),
+ m = e.getX(h + 1),
+ g = e.getX(h + 2);
+ a.fromBufferAttribute(t, v),
+ o.fromBufferAttribute(t, m),
+ s.fromBufferAttribute(t, g),
+ f.subVectors(s, o),
+ d.subVectors(a, o),
+ f.cross(d),
+ l.fromBufferAttribute(n, v),
+ u.fromBufferAttribute(n, m),
+ c.fromBufferAttribute(n, g),
+ l.add(f),
+ u.add(f),
+ c.add(f),
+ n.setXYZ(v, l.x, l.y, l.z),
+ n.setXYZ(m, u.x, u.y, u.z),
+ n.setXYZ(g, c.x, c.y, c.z);
+ }
+ else
+ for (var A = 0, y = t.count; A < y; A += 3)
+ a.fromBufferAttribute(t, A + 0),
+ o.fromBufferAttribute(t, A + 1),
+ s.fromBufferAttribute(t, A + 2),
+ f.subVectors(s, o),
+ d.subVectors(a, o),
+ f.cross(d),
+ n.setXYZ(A + 0, f.x, f.y, f.z),
+ n.setXYZ(A + 1, f.x, f.y, f.z),
+ n.setXYZ(A + 2, f.x, f.y, f.z);
+ this.normalizeNormals(), (n.needsUpdate = !0);
+ }
+ },
+ },
+ {
+ key: "normalizeNormals",
+ value: function () {
+ for (
+ var e = this.attributes.normal, t = 0, n = e.count;
+ t < n;
+ t++
+ )
+ Oa.fromBufferAttribute(e, t),
+ Oa.normalize(),
+ e.setXYZ(t, Oa.x, Oa.y, Oa.z);
+ },
+ },
+ {
+ key: "toNonIndexed",
+ value: function () {
+ function e(e, t) {
+ for (
+ var n = e.array,
+ r = e.itemSize,
+ i = e.normalized,
+ a = new n.constructor(t.length * r),
+ o = 0,
+ s = 0,
+ l = 0,
+ u = t.length;
+ l < u;
+ l++
+ ) {
+ o = e.isInterleavedBufferAttribute
+ ? t[l] * e.data.stride + e.offset
+ : t[l] * r;
+ for (var c = 0; c < r; c++) a[s++] = n[o++];
+ }
+ return new xa(a, r, i);
+ }
+ if (null === this.index)
+ return (
+ console.warn(
+ "THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."
+ ),
+ this
+ );
+ var t = new n(),
+ r = this.index.array,
+ i = this.attributes;
+ for (var a in i) {
+ var o = e(i[a], r);
+ t.setAttribute(a, o);
+ }
+ var s = this.morphAttributes;
+ for (var l in s) {
+ for (
+ var u = [], c = s[l], f = 0, d = c.length;
+ f < d;
+ f++
+ ) {
+ var h = e(c[f], r);
+ u.push(h);
+ }
+ t.morphAttributes[l] = u;
+ }
+ t.morphTargetsRelative = this.morphTargetsRelative;
+ for (var p = this.groups, v = 0, m = p.length; v < m; v++) {
+ var g = p[v];
+ t.addGroup(g.start, g.count, g.materialIndex);
+ }
+ return t;
+ },
+ },
+ {
+ key: "toJSON",
+ value: function () {
+ var e = {
+ metadata: {
+ version: 4.6,
+ type: "BufferGeometry",
+ generator: "BufferGeometry.toJSON",
+ },
+ };
+ if (
+ ((e.uuid = this.uuid),
+ (e.type = this.type),
+ "" !== this.name && (e.name = this.name),
+ Object.keys(this.userData).length > 0 &&
+ (e.userData = this.userData),
+ void 0 !== this.parameters)
+ ) {
+ var t = this.parameters;
+ for (var n in t) void 0 !== t[n] && (e[n] = t[n]);
+ return e;
+ }
+ e.data = { attributes: {} };
+ var r = this.index;
+ null !== r &&
+ (e.data.index = {
+ type: r.array.constructor.name,
+ array: Array.prototype.slice.call(r.array),
+ });
+ var i = this.attributes;
+ for (var a in i) {
+ var o = i[a];
+ e.data.attributes[a] = o.toJSON(e.data);
+ }
+ var s = {},
+ l = !1;
+ for (var u in this.morphAttributes) {
+ for (
+ var c = this.morphAttributes[u],
+ f = [],
+ d = 0,
+ h = c.length;
+ d < h;
+ d++
+ ) {
+ var p = c[d];
+ f.push(p.toJSON(e.data));
+ }
+ f.length > 0 && ((s[u] = f), (l = !0));
+ }
+ l &&
+ ((e.data.morphAttributes = s),
+ (e.data.morphTargetsRelative =
+ this.morphTargetsRelative));
+ var v = this.groups;
+ v.length > 0 &&
+ (e.data.groups = JSON.parse(JSON.stringify(v)));
+ var m = this.boundingSphere;
+ return (
+ null !== m &&
+ (e.data.boundingSphere = {
+ center: m.center.toArray(),
+ radius: m.radius,
+ }),
+ e
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ (this.index = null),
+ (this.attributes = {}),
+ (this.morphAttributes = {}),
+ (this.groups = []),
+ (this.boundingBox = null),
+ (this.boundingSphere = null);
+ var t = {};
+ this.name = e.name;
+ var n = e.index;
+ null !== n && this.setIndex(n.clone(t));
+ var r = e.attributes;
+ for (var i in r) {
+ var a = r[i];
+ this.setAttribute(i, a.clone(t));
+ }
+ var o = e.morphAttributes;
+ for (var s in o) {
+ for (
+ var l = [], u = o[s], c = 0, f = u.length;
+ c < f;
+ c++
+ )
+ l.push(u[c].clone(t));
+ this.morphAttributes[s] = l;
+ }
+ this.morphTargetsRelative = e.morphTargetsRelative;
+ for (var d = e.groups, h = 0, p = d.length; h < p; h++) {
+ var v = d[h];
+ this.addGroup(v.start, v.count, v.materialIndex);
+ }
+ var m = e.boundingBox;
+ null !== m && (this.boundingBox = m.clone());
+ var g = e.boundingSphere;
+ return (
+ null !== g && (this.boundingSphere = g.clone()),
+ (this.drawRange.start = e.drawRange.start),
+ (this.drawRange.count = e.drawRange.count),
+ (this.userData = e.userData),
+ this
+ );
+ },
+ },
+ {
+ key: "dispose",
+ value: function () {
+ this.dispatchEvent({ type: "dispose" });
+ },
+ },
+ ]),
+ n
+ );
+ })(Jn),
+ Ga = new xi(),
+ Za = new bi(),
+ za = new di(),
+ Qa = new Vr(),
+ Ha = new Vr(),
+ Va = new Vr(),
+ ja = new Vr(),
+ Wa = new Vr(),
+ Xa = new Vr(),
+ Ya = new dr(),
+ qa = new dr(),
+ Ja = new dr(),
+ Ka = new Vr(),
+ $a = new Vr(),
+ eo = new Vr(),
+ to = new Vr(),
+ no = new Vr(),
+ ro = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Na(),
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new ha();
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isMesh = !0),
+ (e.type = "Mesh"),
+ (e.geometry = r),
+ (e.material = i),
+ e.updateMorphTargets(),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "copy",
+ value: function (e, t) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e,
+ t
+ ),
+ void 0 !== e.morphTargetInfluences &&
+ (this.morphTargetInfluences =
+ e.morphTargetInfluences.slice()),
+ void 0 !== e.morphTargetDictionary &&
+ (this.morphTargetDictionary = Object.assign(
+ {},
+ e.morphTargetDictionary
+ )),
+ (this.material = Array.isArray(e.material)
+ ? e.material.slice()
+ : e.material),
+ (this.geometry = e.geometry),
+ this
+ );
+ },
+ },
+ {
+ key: "updateMorphTargets",
+ value: function () {
+ var e = this.geometry.morphAttributes,
+ t = Object.keys(e);
+ if (t.length > 0) {
+ var n = e[t[0]];
+ if (void 0 !== n) {
+ (this.morphTargetInfluences = []),
+ (this.morphTargetDictionary = {});
+ for (var r = 0, i = n.length; r < i; r++) {
+ var a = n[r].name || String(r);
+ this.morphTargetInfluences.push(0),
+ (this.morphTargetDictionary[a] = r);
+ }
+ }
+ }
+ },
+ },
+ {
+ key: "getVertexPosition",
+ value: function (e, t) {
+ var n = this.geometry,
+ r = n.attributes.position,
+ i = n.morphAttributes.position,
+ a = n.morphTargetsRelative;
+ t.fromBufferAttribute(r, e);
+ var o = this.morphTargetInfluences;
+ if (i && o) {
+ Xa.set(0, 0, 0);
+ for (var s = 0, l = i.length; s < l; s++) {
+ var u = o[s],
+ c = i[s];
+ 0 !== u &&
+ (Wa.fromBufferAttribute(c, e),
+ a
+ ? Xa.addScaledVector(Wa, u)
+ : Xa.addScaledVector(Wa.sub(t), u));
+ }
+ t.add(Xa);
+ }
+ return t;
+ },
+ },
+ {
+ key: "raycast",
+ value: function (e, t) {
+ var n = this.geometry,
+ r = this.material,
+ i = this.matrixWorld;
+ if (void 0 !== r) {
+ if (
+ (null === n.boundingSphere && n.computeBoundingSphere(),
+ za.copy(n.boundingSphere),
+ za.applyMatrix4(i),
+ Za.copy(e.ray).recast(e.near),
+ !1 === za.containsPoint(Za.origin))
+ ) {
+ if (null === Za.intersectSphere(za, Qa)) return;
+ if (
+ Za.origin.distanceToSquared(Qa) >
+ Math.pow(e.far - e.near, 2)
+ )
+ return;
+ }
+ Ga.copy(i).invert(),
+ Za.copy(e.ray).applyMatrix4(Ga),
+ (null !== n.boundingBox &&
+ !1 === Za.intersectsBox(n.boundingBox)) ||
+ this._computeIntersections(e, t, Za);
+ }
+ },
+ },
+ {
+ key: "_computeIntersections",
+ value: function (e, t, n) {
+ var r,
+ i = this.geometry,
+ a = this.material,
+ o = i.index,
+ s = i.attributes.position,
+ l = i.attributes.uv,
+ u = i.attributes.uv1,
+ c = i.attributes.normal,
+ f = i.groups,
+ d = i.drawRange;
+ if (null !== o)
+ if (Array.isArray(a))
+ for (var h = 0, p = f.length; h < p; h++)
+ for (
+ var v = f[h],
+ m = a[v.materialIndex],
+ g = Math.max(v.start, d.start),
+ A = Math.min(
+ o.count,
+ Math.min(v.start + v.count, d.start + d.count)
+ );
+ g < A;
+ g += 3
+ ) {
+ (r = io(
+ this,
+ m,
+ e,
+ n,
+ l,
+ u,
+ c,
+ o.getX(g),
+ o.getX(g + 1),
+ o.getX(g + 2)
+ )) &&
+ ((r.faceIndex = Math.floor(g / 3)),
+ (r.face.materialIndex = v.materialIndex),
+ t.push(r));
+ }
+ else
+ for (
+ var y = Math.max(0, d.start),
+ b = Math.min(o.count, d.start + d.count);
+ y < b;
+ y += 3
+ ) {
+ (r = io(
+ this,
+ a,
+ e,
+ n,
+ l,
+ u,
+ c,
+ o.getX(y),
+ o.getX(y + 1),
+ o.getX(y + 2)
+ )) && ((r.faceIndex = Math.floor(y / 3)), t.push(r));
+ }
+ else if (void 0 !== s)
+ if (Array.isArray(a))
+ for (var x = 0, S = f.length; x < S; x++)
+ for (
+ var E = f[x],
+ _ = a[E.materialIndex],
+ C = Math.max(E.start, d.start),
+ w = Math.min(
+ s.count,
+ Math.min(E.start + E.count, d.start + d.count)
+ );
+ C < w;
+ C += 3
+ ) {
+ (r = io(this, _, e, n, l, u, c, C, C + 1, C + 2)) &&
+ ((r.faceIndex = Math.floor(C / 3)),
+ (r.face.materialIndex = E.materialIndex),
+ t.push(r));
+ }
+ else
+ for (
+ var T = Math.max(0, d.start),
+ M = Math.min(s.count, d.start + d.count);
+ T < M;
+ T += 3
+ ) {
+ (r = io(this, a, e, n, l, u, c, T, T + 1, T + 2)) &&
+ ((r.faceIndex = Math.floor(T / 3)), t.push(r));
+ }
+ },
+ },
+ ]),
+ n
+ );
+ })(ji);
+ function io(e, t, n, r, i, a, o, s, l, u) {
+ e.getVertexPosition(s, Ha),
+ e.getVertexPosition(l, Va),
+ e.getVertexPosition(u, ja);
+ var c = (function (e, t, n, r, i, a, o, s) {
+ if (
+ null ===
+ (t.side === k
+ ? r.intersectTriangle(o, a, i, !0, s)
+ : r.intersectTriangle(i, a, o, t.side === I, s))
+ )
+ return null;
+ no.copy(s), no.applyMatrix4(e.matrixWorld);
+ var l = n.ray.origin.distanceTo(no);
+ return l < n.near || l > n.far
+ ? null
+ : { distance: l, point: no.clone(), object: e };
+ })(e, t, n, r, Ha, Va, ja, to);
+ if (c) {
+ i &&
+ (Ya.fromBufferAttribute(i, s),
+ qa.fromBufferAttribute(i, l),
+ Ja.fromBufferAttribute(i, u),
+ (c.uv = ia.getInterpolation(
+ to,
+ Ha,
+ Va,
+ ja,
+ Ya,
+ qa,
+ Ja,
+ new dr()
+ ))),
+ a &&
+ (Ya.fromBufferAttribute(a, s),
+ qa.fromBufferAttribute(a, l),
+ Ja.fromBufferAttribute(a, u),
+ (c.uv1 = ia.getInterpolation(
+ to,
+ Ha,
+ Va,
+ ja,
+ Ya,
+ qa,
+ Ja,
+ new dr()
+ )),
+ (c.uv2 = c.uv1)),
+ o &&
+ (Ka.fromBufferAttribute(o, s),
+ $a.fromBufferAttribute(o, l),
+ eo.fromBufferAttribute(o, u),
+ (c.normal = ia.getInterpolation(
+ to,
+ Ha,
+ Va,
+ ja,
+ Ka,
+ $a,
+ eo,
+ new Vr()
+ )),
+ c.normal.dot(r.direction) > 0 && c.normal.multiplyScalar(-1));
+ var f = { a: s, b: l, c: u, normal: new Vr(), materialIndex: 0 };
+ ia.getNormal(Ha, Va, ja, f.normal), (c.face = f);
+ }
+ return c;
+ }
+ var ao = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1,
+ s =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : 1,
+ l =
+ arguments.length > 5 && void 0 !== arguments[5]
+ ? arguments[5]
+ : 1;
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).type = "BoxGeometry"),
+ (e.parameters = {
+ width: r,
+ height: i,
+ depth: a,
+ widthSegments: o,
+ heightSegments: s,
+ depthSegments: l,
+ });
+ var u = (0, f.Z)(e);
+ (o = Math.floor(o)), (s = Math.floor(s)), (l = Math.floor(l));
+ var c = [],
+ d = [],
+ h = [],
+ p = [],
+ v = 0,
+ g = 0;
+ function A(e, t, n, r, i, a, o, s, l, f, m) {
+ for (
+ var A = a / l,
+ y = o / f,
+ b = a / 2,
+ x = o / 2,
+ S = s / 2,
+ E = l + 1,
+ _ = f + 1,
+ C = 0,
+ w = 0,
+ T = new Vr(),
+ M = 0;
+ M < _;
+ M++
+ )
+ for (var I = M * y - x, k = 0; k < E; k++) {
+ var R = k * A - b;
+ (T[e] = R * r),
+ (T[t] = I * i),
+ (T[n] = S),
+ d.push(T.x, T.y, T.z),
+ (T[e] = 0),
+ (T[t] = 0),
+ (T[n] = s > 0 ? 1 : -1),
+ h.push(T.x, T.y, T.z),
+ p.push(k / l),
+ p.push(1 - M / f),
+ (C += 1);
+ }
+ for (var B = 0; B < f; B++)
+ for (var P = 0; P < l; P++) {
+ var L = v + P + E * B,
+ D = v + P + E * (B + 1),
+ U = v + (P + 1) + E * (B + 1),
+ F = v + (P + 1) + E * B;
+ c.push(L, D, F), c.push(D, U, F), (w += 6);
+ }
+ u.addGroup(g, w, m), (g += w), (v += C);
+ }
+ return (
+ A("z", "y", "x", -1, -1, a, i, r, l, s, 0),
+ A("z", "y", "x", 1, -1, a, i, -r, l, s, 1),
+ A("x", "z", "y", 1, 1, r, a, i, o, l, 2),
+ A("x", "z", "y", 1, -1, r, a, -i, o, l, 3),
+ A("x", "y", "z", 1, -1, r, i, a, o, s, 4),
+ A("x", "y", "z", -1, -1, r, i, -a, o, s, 5),
+ e.setIndex(c),
+ e.setAttribute("position", new ka(d, 3)),
+ e.setAttribute("normal", new ka(h, 3)),
+ e.setAttribute("uv", new ka(p, 2)),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(
+ n,
+ [
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e
+ ),
+ (this.parameters = Object.assign({}, e.parameters)),
+ this
+ );
+ },
+ },
+ ],
+ [
+ {
+ key: "fromJSON",
+ value: function (e) {
+ return new n(
+ e.width,
+ e.height,
+ e.depth,
+ e.widthSegments,
+ e.heightSegments,
+ e.depthSegments
+ );
+ },
+ },
+ ]
+ ),
+ n
+ );
+ })(Na);
+ function oo(e) {
+ var t = {};
+ for (var n in e)
+ for (var r in ((t[n] = {}), e[n])) {
+ var i = e[n][r];
+ i &&
+ (i.isColor ||
+ i.isMatrix3 ||
+ i.isMatrix4 ||
+ i.isVector2 ||
+ i.isVector3 ||
+ i.isVector4 ||
+ i.isTexture ||
+ i.isQuaternion)
+ ? i.isRenderTargetTexture
+ ? (console.warn(
+ "UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."
+ ),
+ (t[n][r] = null))
+ : (t[n][r] = i.clone())
+ : Array.isArray(i)
+ ? (t[n][r] = i.slice())
+ : (t[n][r] = i);
+ }
+ return t;
+ }
+ function so(e) {
+ for (var t = {}, n = 0; n < e.length; n++) {
+ var r = oo(e[n]);
+ for (var i in r) t[i] = r[i];
+ }
+ return t;
+ }
+ function lo(e) {
+ return null === e.getRenderTarget()
+ ? e.outputColorSpace
+ : Tr.workingColorSpace;
+ }
+ var uo = { clone: oo, merge: so },
+ co = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e) {
+ var r;
+ return (
+ (0, m.Z)(this, n),
+ ((r = t.call(this)).isShaderMaterial = !0),
+ (r.type = "ShaderMaterial"),
+ (r.defines = {}),
+ (r.uniforms = {}),
+ (r.uniformsGroups = []),
+ (r.vertexShader =
+ "void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}"),
+ (r.fragmentShader =
+ "void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}"),
+ (r.linewidth = 1),
+ (r.wireframe = !1),
+ (r.wireframeLinewidth = 1),
+ (r.fog = !1),
+ (r.lights = !1),
+ (r.clipping = !1),
+ (r.forceSinglePass = !0),
+ (r.extensions = {
+ derivatives: !1,
+ fragDepth: !1,
+ drawBuffers: !1,
+ shaderTextureLOD: !1,
+ }),
+ (r.defaultAttributeValues = {
+ color: [1, 1, 1],
+ uv: [0, 0],
+ uv1: [0, 0],
+ }),
+ (r.index0AttributeName = void 0),
+ (r.uniformsNeedUpdate = !1),
+ (r.glslVersion = null),
+ void 0 !== e && r.setValues(e),
+ r
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e
+ ),
+ (this.fragmentShader = e.fragmentShader),
+ (this.vertexShader = e.vertexShader),
+ (this.uniforms = oo(e.uniforms)),
+ (this.uniformsGroups = (function (e) {
+ for (var t = [], n = 0; n < e.length; n++)
+ t.push(e[n].clone());
+ return t;
+ })(e.uniformsGroups)),
+ (this.defines = Object.assign({}, e.defines)),
+ (this.wireframe = e.wireframe),
+ (this.wireframeLinewidth = e.wireframeLinewidth),
+ (this.fog = e.fog),
+ (this.lights = e.lights),
+ (this.clipping = e.clipping),
+ (this.extensions = Object.assign({}, e.extensions)),
+ (this.glslVersion = e.glslVersion),
+ this
+ );
+ },
+ },
+ {
+ key: "toJSON",
+ value: function (e) {
+ var t = (0, l.Z)(
+ (0, u.Z)(n.prototype),
+ "toJSON",
+ this
+ ).call(this, e);
+ for (var r in ((t.glslVersion = this.glslVersion),
+ (t.uniforms = {}),
+ this.uniforms)) {
+ var i = this.uniforms[r].value;
+ i && i.isTexture
+ ? (t.uniforms[r] = {
+ type: "t",
+ value: i.toJSON(e).uuid,
+ })
+ : i && i.isColor
+ ? (t.uniforms[r] = { type: "c", value: i.getHex() })
+ : i && i.isVector2
+ ? (t.uniforms[r] = { type: "v2", value: i.toArray() })
+ : i && i.isVector3
+ ? (t.uniforms[r] = { type: "v3", value: i.toArray() })
+ : i && i.isVector4
+ ? (t.uniforms[r] = { type: "v4", value: i.toArray() })
+ : i && i.isMatrix3
+ ? (t.uniforms[r] = { type: "m3", value: i.toArray() })
+ : i && i.isMatrix4
+ ? (t.uniforms[r] = { type: "m4", value: i.toArray() })
+ : (t.uniforms[r] = { value: i });
+ }
+ Object.keys(this.defines).length > 0 &&
+ (t.defines = this.defines),
+ (t.vertexShader = this.vertexShader),
+ (t.fragmentShader = this.fragmentShader),
+ (t.lights = this.lights),
+ (t.clipping = this.clipping);
+ var a = {};
+ for (var o in this.extensions)
+ !0 === this.extensions[o] && (a[o] = !0);
+ return Object.keys(a).length > 0 && (t.extensions = a), t;
+ },
+ },
+ ]),
+ n
+ );
+ })(oa),
+ fo = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isCamera = !0),
+ (e.type = "Camera"),
+ (e.matrixWorldInverse = new xi()),
+ (e.projectionMatrix = new xi()),
+ (e.projectionMatrixInverse = new xi()),
+ (e.coordinateSystem = Yn),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "copy",
+ value: function (e, t) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e,
+ t
+ ),
+ this.matrixWorldInverse.copy(e.matrixWorldInverse),
+ this.projectionMatrix.copy(e.projectionMatrix),
+ this.projectionMatrixInverse.copy(
+ e.projectionMatrixInverse
+ ),
+ (this.coordinateSystem = e.coordinateSystem),
+ this
+ );
+ },
+ },
+ {
+ key: "getWorldDirection",
+ value: function (e) {
+ return (0, l.Z)(
+ (0, u.Z)(n.prototype),
+ "getWorldDirection",
+ this
+ )
+ .call(this, e)
+ .negate();
+ },
+ },
+ {
+ key: "updateMatrixWorld",
+ value: function (e) {
+ (0, l.Z)(
+ (0, u.Z)(n.prototype),
+ "updateMatrixWorld",
+ this
+ ).call(this, e),
+ this.matrixWorldInverse.copy(this.matrixWorld).invert();
+ },
+ },
+ {
+ key: "updateWorldMatrix",
+ value: function (e, t) {
+ (0, l.Z)(
+ (0, u.Z)(n.prototype),
+ "updateWorldMatrix",
+ this
+ ).call(this, e, t),
+ this.matrixWorldInverse.copy(this.matrixWorld).invert();
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ ]),
+ n
+ );
+ })(ji),
+ ho = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 50,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 0.1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 2e3;
+ return (
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).isPerspectiveCamera = !0),
+ (e.type = "PerspectiveCamera"),
+ (e.fov = r),
+ (e.zoom = 1),
+ (e.near = a),
+ (e.far = o),
+ (e.focus = 10),
+ (e.aspect = i),
+ (e.view = null),
+ (e.filmGauge = 35),
+ (e.filmOffset = 0),
+ e.updateProjectionMatrix(),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "copy",
+ value: function (e, t) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e,
+ t
+ ),
+ (this.fov = e.fov),
+ (this.zoom = e.zoom),
+ (this.near = e.near),
+ (this.far = e.far),
+ (this.focus = e.focus),
+ (this.aspect = e.aspect),
+ (this.view =
+ null === e.view ? null : Object.assign({}, e.view)),
+ (this.filmGauge = e.filmGauge),
+ (this.filmOffset = e.filmOffset),
+ this
+ );
+ },
+ },
+ {
+ key: "setFocalLength",
+ value: function (e) {
+ var t = (0.5 * this.getFilmHeight()) / e;
+ (this.fov = 2 * tr * Math.atan(t)),
+ this.updateProjectionMatrix();
+ },
+ },
+ {
+ key: "getFocalLength",
+ value: function () {
+ var e = Math.tan(0.5 * er * this.fov);
+ return (0.5 * this.getFilmHeight()) / e;
+ },
+ },
+ {
+ key: "getEffectiveFOV",
+ value: function () {
+ return (
+ 2 *
+ tr *
+ Math.atan(Math.tan(0.5 * er * this.fov) / this.zoom)
+ );
+ },
+ },
+ {
+ key: "getFilmWidth",
+ value: function () {
+ return this.filmGauge * Math.min(this.aspect, 1);
+ },
+ },
+ {
+ key: "getFilmHeight",
+ value: function () {
+ return this.filmGauge / Math.max(this.aspect, 1);
+ },
+ },
+ {
+ key: "setViewOffset",
+ value: function (e, t, n, r, i, a) {
+ (this.aspect = e / t),
+ 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();
+ },
+ },
+ {
+ key: "clearViewOffset",
+ value: function () {
+ null !== this.view && (this.view.enabled = !1),
+ this.updateProjectionMatrix();
+ },
+ },
+ {
+ key: "updateProjectionMatrix",
+ value: function () {
+ var e = this.near,
+ t = (e * Math.tan(0.5 * er * this.fov)) / this.zoom,
+ n = 2 * t,
+ r = this.aspect * n,
+ i = -0.5 * r,
+ a = this.view;
+ if (null !== this.view && this.view.enabled) {
+ var o = a.fullWidth,
+ s = a.fullHeight;
+ (i += (a.offsetX * r) / o),
+ (t -= (a.offsetY * n) / s),
+ (r *= a.width / o),
+ (n *= a.height / s);
+ }
+ var l = this.filmOffset;
+ 0 !== l && (i += (e * l) / this.getFilmWidth()),
+ this.projectionMatrix.makePerspective(
+ i,
+ i + r,
+ t,
+ t - n,
+ e,
+ this.far,
+ this.coordinateSystem
+ ),
+ this.projectionMatrixInverse
+ .copy(this.projectionMatrix)
+ .invert();
+ },
+ },
+ {
+ key: "toJSON",
+ value: function (e) {
+ var t = (0, l.Z)(
+ (0, u.Z)(n.prototype),
+ "toJSON",
+ this
+ ).call(this, e);
+ return (
+ (t.object.fov = this.fov),
+ (t.object.zoom = this.zoom),
+ (t.object.near = this.near),
+ (t.object.far = this.far),
+ (t.object.focus = this.focus),
+ (t.object.aspect = this.aspect),
+ null !== this.view &&
+ (t.object.view = Object.assign({}, this.view)),
+ (t.object.filmGauge = this.filmGauge),
+ (t.object.filmOffset = this.filmOffset),
+ t
+ );
+ },
+ },
+ ]),
+ n
+ );
+ })(fo),
+ po = -90,
+ vo = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i) {
+ var a;
+ (0, m.Z)(this, n),
+ ((a = t.call(this)).type = "CubeCamera"),
+ (a.renderTarget = i),
+ (a.coordinateSystem = null),
+ (a.activeMipmapLevel = 0);
+ var o = new ho(po, 1, e, r);
+ (o.layers = a.layers), a.add(o);
+ var s = new ho(po, 1, e, r);
+ (s.layers = a.layers), a.add(s);
+ var l = new ho(po, 1, e, r);
+ (l.layers = a.layers), a.add(l);
+ var u = new ho(po, 1, e, r);
+ (u.layers = a.layers), a.add(u);
+ var c = new ho(po, 1, e, r);
+ (c.layers = a.layers), a.add(c);
+ var f = new ho(po, 1, e, r);
+ return (f.layers = a.layers), a.add(f), a;
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "updateCoordinateSystem",
+ value: function () {
+ var e,
+ t = this.coordinateSystem,
+ n = this.children.concat(),
+ r = (0, s.Z)(n, 6),
+ i = r[0],
+ a = r[1],
+ l = r[2],
+ u = r[3],
+ c = r[4],
+ f = r[5],
+ d = (0, o.Z)(n);
+ try {
+ for (d.s(); !(e = d.n()).done; ) {
+ var h = e.value;
+ this.remove(h);
+ }
+ } catch (g) {
+ d.e(g);
+ } finally {
+ d.f();
+ }
+ if (t === Yn)
+ i.up.set(0, 1, 0),
+ i.lookAt(1, 0, 0),
+ a.up.set(0, 1, 0),
+ a.lookAt(-1, 0, 0),
+ l.up.set(0, 0, -1),
+ l.lookAt(0, 1, 0),
+ u.up.set(0, 0, 1),
+ u.lookAt(0, -1, 0),
+ c.up.set(0, 1, 0),
+ c.lookAt(0, 0, 1),
+ f.up.set(0, 1, 0),
+ f.lookAt(0, 0, -1);
+ else {
+ if (t !== qn)
+ throw new Error(
+ "THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: " +
+ t
+ );
+ i.up.set(0, -1, 0),
+ i.lookAt(-1, 0, 0),
+ a.up.set(0, -1, 0),
+ a.lookAt(1, 0, 0),
+ l.up.set(0, 0, 1),
+ l.lookAt(0, 1, 0),
+ u.up.set(0, 0, -1),
+ u.lookAt(0, -1, 0),
+ c.up.set(0, -1, 0),
+ c.lookAt(0, 0, 1),
+ f.up.set(0, -1, 0),
+ f.lookAt(0, 0, -1);
+ }
+ var p,
+ v = (0, o.Z)(n);
+ try {
+ for (v.s(); !(p = v.n()).done; ) {
+ var m = p.value;
+ this.add(m), m.updateMatrixWorld();
+ }
+ } catch (g) {
+ v.e(g);
+ } finally {
+ v.f();
+ }
+ },
+ },
+ {
+ key: "update",
+ value: function (e, t) {
+ null === this.parent && this.updateMatrixWorld();
+ var n = this.renderTarget,
+ r = this.activeMipmapLevel;
+ this.coordinateSystem !== e.coordinateSystem &&
+ ((this.coordinateSystem = e.coordinateSystem),
+ this.updateCoordinateSystem());
+ var i = (0, s.Z)(this.children, 6),
+ a = i[0],
+ o = i[1],
+ l = i[2],
+ u = i[3],
+ c = i[4],
+ f = i[5],
+ d = e.getRenderTarget(),
+ h = e.getActiveCubeFace(),
+ p = e.getActiveMipmapLevel(),
+ v = e.xr.enabled;
+ e.xr.enabled = !1;
+ var m = n.texture.generateMipmaps;
+ (n.texture.generateMipmaps = !1),
+ e.setRenderTarget(n, 0, r),
+ e.render(t, a),
+ e.setRenderTarget(n, 1, r),
+ e.render(t, o),
+ e.setRenderTarget(n, 2, r),
+ e.render(t, l),
+ e.setRenderTarget(n, 3, r),
+ e.render(t, u),
+ e.setRenderTarget(n, 4, r),
+ e.render(t, c),
+ (n.texture.generateMipmaps = m),
+ e.setRenderTarget(n, 5, r),
+ e.render(t, f),
+ e.setRenderTarget(d, h, p),
+ (e.xr.enabled = v),
+ (n.texture.needsPMREMUpdate = !0);
+ },
+ },
+ ]),
+ n
+ );
+ })(ji),
+ mo = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n(e, r, i, a, o, s, l, u, c, f) {
+ var d;
+ return (
+ (0, m.Z)(this, n),
+ (e = void 0 !== e ? e : []),
+ (r = void 0 !== r ? r : ye),
+ ((d = t.call(
+ this,
+ e,
+ r,
+ i,
+ a,
+ o,
+ s,
+ l,
+ u,
+ c,
+ f
+ )).isCubeTexture = !0),
+ (d.flipY = !1),
+ d
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "images",
+ get: function () {
+ return this.image;
+ },
+ set: function (e) {
+ this.image = e;
+ },
+ },
+ ]),
+ n
+ );
+ })(Dr),
+ go = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : {};
+ (0, m.Z)(this, n),
+ ((e = t.call(this, r, r, i)).isWebGLCubeRenderTarget = !0);
+ var a = { width: r, height: r, depth: 1 },
+ o = [a, a, a, a, a, a];
+ return (
+ void 0 !== i.encoding &&
+ (xr(
+ "THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."
+ ),
+ (i.colorSpace = i.encoding === Kt ? an : rn)),
+ (e.texture = new mo(
+ o,
+ i.mapping,
+ i.wrapS,
+ i.wrapT,
+ i.magFilter,
+ i.minFilter,
+ i.format,
+ i.type,
+ i.anisotropy,
+ i.colorSpace
+ )),
+ (e.texture.isRenderTargetTexture = !0),
+ (e.texture.generateMipmaps =
+ void 0 !== i.generateMipmaps && i.generateMipmaps),
+ (e.texture.minFilter =
+ void 0 !== i.minFilter ? i.minFilter : Be),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(n, [
+ {
+ key: "fromEquirectangularTexture",
+ value: function (e, t) {
+ (this.texture.type = t.type),
+ (this.texture.colorSpace = t.colorSpace),
+ (this.texture.generateMipmaps = t.generateMipmaps),
+ (this.texture.minFilter = t.minFilter),
+ (this.texture.magFilter = t.magFilter);
+ var n = { tEquirect: { value: null } },
+ r =
+ "\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",
+ i =
+ "\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",
+ a = new ao(5, 5, 5),
+ o = new co({
+ name: "CubemapFromEquirect",
+ uniforms: oo(n),
+ vertexShader: r,
+ fragmentShader: i,
+ side: k,
+ blending: P,
+ });
+ o.uniforms.tEquirect.value = t;
+ var s = new ro(a, o),
+ l = t.minFilter;
+ return (
+ t.minFilter === De && (t.minFilter = Be),
+ new vo(1, 10, this).update(e, s),
+ (t.minFilter = l),
+ s.geometry.dispose(),
+ s.material.dispose(),
+ this
+ );
+ },
+ },
+ {
+ key: "clear",
+ value: function (e, t, n, r) {
+ for (var i = e.getRenderTarget(), a = 0; a < 6; a++)
+ e.setRenderTarget(this, a), e.clear(t, n, r);
+ e.setRenderTarget(i);
+ },
+ },
+ ]),
+ n
+ );
+ })(Or),
+ Ao = new Vr(),
+ yo = new Vr(),
+ bo = new hr(),
+ xo = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new Vr(1, 0, 0),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 0;
+ (0, m.Z)(this, e),
+ (this.isPlane = !0),
+ (this.normal = t),
+ (this.constant = n);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t) {
+ return this.normal.copy(e), (this.constant = t), this;
+ },
+ },
+ {
+ key: "setComponents",
+ value: function (e, t, n, r) {
+ return this.normal.set(e, t, n), (this.constant = r), this;
+ },
+ },
+ {
+ key: "setFromNormalAndCoplanarPoint",
+ value: function (e, t) {
+ return (
+ this.normal.copy(e),
+ (this.constant = -t.dot(this.normal)),
+ this
+ );
+ },
+ },
+ {
+ key: "setFromCoplanarPoints",
+ value: function (e, t, n) {
+ var r = Ao.subVectors(n, t)
+ .cross(yo.subVectors(e, t))
+ .normalize();
+ return this.setFromNormalAndCoplanarPoint(r, e), this;
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ this.normal.copy(e.normal),
+ (this.constant = e.constant),
+ this
+ );
+ },
+ },
+ {
+ key: "normalize",
+ value: function () {
+ var e = 1 / this.normal.length();
+ return (
+ this.normal.multiplyScalar(e), (this.constant *= e), this
+ );
+ },
+ },
+ {
+ key: "negate",
+ value: function () {
+ return (this.constant *= -1), this.normal.negate(), this;
+ },
+ },
+ {
+ key: "distanceToPoint",
+ value: function (e) {
+ return this.normal.dot(e) + this.constant;
+ },
+ },
+ {
+ key: "distanceToSphere",
+ value: function (e) {
+ return this.distanceToPoint(e.center) - e.radius;
+ },
+ },
+ {
+ key: "projectPoint",
+ value: function (e, t) {
+ return t
+ .copy(e)
+ .addScaledVector(this.normal, -this.distanceToPoint(e));
+ },
+ },
+ {
+ key: "intersectLine",
+ value: function (e, t) {
+ var n = e.delta(Ao),
+ r = this.normal.dot(n);
+ if (0 === r)
+ return 0 === this.distanceToPoint(e.start)
+ ? t.copy(e.start)
+ : null;
+ var i = -(e.start.dot(this.normal) + this.constant) / r;
+ return i < 0 || i > 1
+ ? null
+ : t.copy(e.start).addScaledVector(n, i);
+ },
+ },
+ {
+ key: "intersectsLine",
+ value: function (e) {
+ var t = this.distanceToPoint(e.start),
+ n = this.distanceToPoint(e.end);
+ return (t < 0 && n > 0) || (n < 0 && t > 0);
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ return e.intersectsPlane(this);
+ },
+ },
+ {
+ key: "intersectsSphere",
+ value: function (e) {
+ return e.intersectsPlane(this);
+ },
+ },
+ {
+ key: "coplanarPoint",
+ value: function (e) {
+ return e.copy(this.normal).multiplyScalar(-this.constant);
+ },
+ },
+ {
+ key: "applyMatrix4",
+ value: function (e, t) {
+ var n = t || bo.getNormalMatrix(e),
+ r = this.coplanarPoint(Ao).applyMatrix4(e),
+ i = this.normal.applyMatrix3(n).normalize();
+ return (this.constant = -r.dot(i)), this;
+ },
+ },
+ {
+ key: "translate",
+ value: function (e) {
+ return (this.constant -= e.dot(this.normal)), this;
+ },
+ },
+ {
+ key: "equals",
+ value: function (e) {
+ return (
+ e.normal.equals(this.normal) &&
+ e.constant === this.constant
+ );
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ ]),
+ e
+ );
+ })(),
+ So = new di(),
+ Eo = new Vr(),
+ _o = (function () {
+ function e() {
+ var t =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : new xo(),
+ n =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : new xo(),
+ r =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : new xo(),
+ i =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : new xo(),
+ a =
+ arguments.length > 4 && void 0 !== arguments[4]
+ ? arguments[4]
+ : new xo(),
+ o =
+ arguments.length > 5 && void 0 !== arguments[5]
+ ? arguments[5]
+ : new xo();
+ (0, m.Z)(this, e), (this.planes = [t, n, r, i, a, o]);
+ }
+ return (
+ (0, g.Z)(e, [
+ {
+ key: "set",
+ value: function (e, t, n, r, i, a) {
+ var o = this.planes;
+ return (
+ o[0].copy(e),
+ o[1].copy(t),
+ o[2].copy(n),
+ o[3].copy(r),
+ o[4].copy(i),
+ o[5].copy(a),
+ this
+ );
+ },
+ },
+ {
+ key: "copy",
+ value: function (e) {
+ for (var t = this.planes, n = 0; n < 6; n++)
+ t[n].copy(e.planes[n]);
+ return this;
+ },
+ },
+ {
+ key: "setFromProjectionMatrix",
+ value: function (e) {
+ var t =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : Yn,
+ n = this.planes,
+ r = e.elements,
+ i = r[0],
+ a = r[1],
+ o = r[2],
+ s = r[3],
+ l = r[4],
+ u = r[5],
+ c = r[6],
+ f = r[7],
+ d = r[8],
+ h = r[9],
+ p = r[10],
+ v = r[11],
+ m = r[12],
+ g = r[13],
+ A = r[14],
+ y = r[15];
+ if (
+ (n[0]
+ .setComponents(s - i, f - l, v - d, y - m)
+ .normalize(),
+ n[1]
+ .setComponents(s + i, f + l, v + d, y + m)
+ .normalize(),
+ n[2]
+ .setComponents(s + a, f + u, v + h, y + g)
+ .normalize(),
+ n[3]
+ .setComponents(s - a, f - u, v - h, y - g)
+ .normalize(),
+ n[4]
+ .setComponents(s - o, f - c, v - p, y - A)
+ .normalize(),
+ t === Yn)
+ )
+ n[5]
+ .setComponents(s + o, f + c, v + p, y + A)
+ .normalize();
+ else {
+ if (t !== qn)
+ throw new Error(
+ "THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " +
+ t
+ );
+ n[5].setComponents(o, c, p, A).normalize();
+ }
+ return this;
+ },
+ },
+ {
+ key: "intersectsObject",
+ value: function (e) {
+ if (void 0 !== e.boundingSphere)
+ null === e.boundingSphere && e.computeBoundingSphere(),
+ So.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);
+ else {
+ var t = e.geometry;
+ null === t.boundingSphere && t.computeBoundingSphere(),
+ So.copy(t.boundingSphere).applyMatrix4(e.matrixWorld);
+ }
+ return this.intersectsSphere(So);
+ },
+ },
+ {
+ key: "intersectsSprite",
+ value: function (e) {
+ return (
+ So.center.set(0, 0, 0),
+ (So.radius = 0.7071067811865476),
+ So.applyMatrix4(e.matrixWorld),
+ this.intersectsSphere(So)
+ );
+ },
+ },
+ {
+ key: "intersectsSphere",
+ value: function (e) {
+ for (
+ var t = this.planes, n = e.center, r = -e.radius, i = 0;
+ i < 6;
+ i++
+ ) {
+ if (t[i].distanceToPoint(n) < r) return !1;
+ }
+ return !0;
+ },
+ },
+ {
+ key: "intersectsBox",
+ value: function (e) {
+ for (var t = this.planes, n = 0; n < 6; n++) {
+ var r = t[n];
+ if (
+ ((Eo.x = r.normal.x > 0 ? e.max.x : e.min.x),
+ (Eo.y = r.normal.y > 0 ? e.max.y : e.min.y),
+ (Eo.z = r.normal.z > 0 ? e.max.z : e.min.z),
+ r.distanceToPoint(Eo) < 0)
+ )
+ return !1;
+ }
+ return !0;
+ },
+ },
+ {
+ key: "containsPoint",
+ value: function (e) {
+ for (var t = this.planes, n = 0; n < 6; n++)
+ if (t[n].distanceToPoint(e) < 0) return !1;
+ return !0;
+ },
+ },
+ {
+ key: "clone",
+ value: function () {
+ return new this.constructor().copy(this);
+ },
+ },
+ ]),
+ e
+ );
+ })();
+ function Co() {
+ var e = null,
+ t = !1,
+ n = null,
+ r = null;
+ function i(t, a) {
+ n(t, a), (r = e.requestAnimationFrame(i));
+ }
+ return {
+ start: function () {
+ !0 !== t &&
+ null !== n &&
+ ((r = e.requestAnimationFrame(i)), (t = !0));
+ },
+ stop: function () {
+ e.cancelAnimationFrame(r), (t = !1);
+ },
+ setAnimationLoop: function (e) {
+ n = e;
+ },
+ setContext: function (t) {
+ e = t;
+ },
+ };
+ }
+ function wo(e, t) {
+ var n = t.isWebGL2,
+ r = new WeakMap();
+ return {
+ get: function (e) {
+ return e.isInterleavedBufferAttribute && (e = e.data), r.get(e);
+ },
+ remove: function (t) {
+ t.isInterleavedBufferAttribute && (t = t.data);
+ var n = r.get(t);
+ n && (e.deleteBuffer(n.buffer), r.delete(t));
+ },
+ update: function (t, i) {
+ if (t.isGLBufferAttribute) {
+ var a = r.get(t);
+ (!a || a.version < t.version) &&
+ r.set(t, {
+ buffer: t.buffer,
+ type: t.type,
+ bytesPerElement: t.elementSize,
+ version: t.version,
+ });
+ } else {
+ t.isInterleavedBufferAttribute && (t = t.data);
+ var o = r.get(t);
+ void 0 === o
+ ? r.set(
+ t,
+ (function (t, r) {
+ var i,
+ a = t.array,
+ o = t.usage,
+ s = e.createBuffer();
+ if (
+ (e.bindBuffer(r, s),
+ e.bufferData(r, a, o),
+ t.onUploadCallback(),
+ a instanceof Float32Array)
+ )
+ i = e.FLOAT;
+ else if (a instanceof Uint16Array)
+ if (t.isFloat16BufferAttribute) {
+ if (!n)
+ throw new Error(
+ "THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."
+ );
+ i = e.HALF_FLOAT;
+ } else i = e.UNSIGNED_SHORT;
+ else if (a instanceof Int16Array) i = e.SHORT;
+ else if (a instanceof Uint32Array) i = e.UNSIGNED_INT;
+ else if (a instanceof Int32Array) i = e.INT;
+ else if (a instanceof Int8Array) i = e.BYTE;
+ else if (a instanceof Uint8Array) i = e.UNSIGNED_BYTE;
+ else {
+ if (!(a instanceof Uint8ClampedArray))
+ throw new Error(
+ "THREE.WebGLAttributes: Unsupported buffer data format: " +
+ a
+ );
+ i = e.UNSIGNED_BYTE;
+ }
+ return {
+ buffer: s,
+ type: i,
+ bytesPerElement: a.BYTES_PER_ELEMENT,
+ version: t.version,
+ };
+ })(t, i)
+ )
+ : o.version < t.version &&
+ (!(function (t, r, i) {
+ var a = r.array,
+ o = r.updateRange;
+ e.bindBuffer(i, t),
+ -1 === o.count
+ ? e.bufferSubData(i, 0, a)
+ : (n
+ ? e.bufferSubData(
+ i,
+ o.offset * a.BYTES_PER_ELEMENT,
+ a,
+ o.offset,
+ o.count
+ )
+ : e.bufferSubData(
+ i,
+ o.offset * a.BYTES_PER_ELEMENT,
+ a.subarray(o.offset, o.offset + o.count)
+ ),
+ (o.count = -1)),
+ r.onUploadCallback();
+ })(o.buffer, t, i),
+ (o.version = t.version));
+ }
+ },
+ };
+ }
+ var To = (function (e) {
+ (0, d.Z)(n, e);
+ var t = (0, h.Z)(n);
+ function n() {
+ var e,
+ r =
+ arguments.length > 0 && void 0 !== arguments[0]
+ ? arguments[0]
+ : 1,
+ i =
+ arguments.length > 1 && void 0 !== arguments[1]
+ ? arguments[1]
+ : 1,
+ a =
+ arguments.length > 2 && void 0 !== arguments[2]
+ ? arguments[2]
+ : 1,
+ o =
+ arguments.length > 3 && void 0 !== arguments[3]
+ ? arguments[3]
+ : 1;
+ (0, m.Z)(this, n),
+ ((e = t.call(this)).type = "PlaneGeometry"),
+ (e.parameters = {
+ width: r,
+ height: i,
+ widthSegments: a,
+ heightSegments: o,
+ });
+ for (
+ var s = r / 2,
+ l = i / 2,
+ u = Math.floor(a),
+ c = Math.floor(o),
+ f = u + 1,
+ d = c + 1,
+ h = r / u,
+ p = i / c,
+ v = [],
+ g = [],
+ A = [],
+ y = [],
+ b = 0;
+ b < d;
+ b++
+ )
+ for (var x = b * p - l, S = 0; S < f; S++) {
+ var E = S * h - s;
+ g.push(E, -x, 0),
+ A.push(0, 0, 1),
+ y.push(S / u),
+ y.push(1 - b / c);
+ }
+ for (var _ = 0; _ < c; _++)
+ for (var C = 0; C < u; C++) {
+ var w = C + f * _,
+ T = C + f * (_ + 1),
+ M = C + 1 + f * (_ + 1),
+ I = C + 1 + f * _;
+ v.push(w, T, I), v.push(T, M, I);
+ }
+ return (
+ e.setIndex(v),
+ e.setAttribute("position", new ka(g, 3)),
+ e.setAttribute("normal", new ka(A, 3)),
+ e.setAttribute("uv", new ka(y, 2)),
+ e
+ );
+ }
+ return (
+ (0, g.Z)(
+ n,
+ [
+ {
+ key: "copy",
+ value: function (e) {
+ return (
+ (0, l.Z)((0, u.Z)(n.prototype), "copy", this).call(
+ this,
+ e
+ ),
+ (this.parameters = Object.assign({}, e.parameters)),
+ this
+ );
+ },
+ },
+ ],
+ [
+ {
+ key: "fromJSON",
+ value: function (e) {
+ return new n(
+ e.width,
+ e.height,
+ e.widthSegments,
+ e.heightSegments
+ );
+ },
+ },
+ ]
+ ),
+ n
+ );
+ })(Na),
+ Mo = {
+ alphahash_fragment:
+ "#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",
+ alphahash_pars_fragment:
+ "#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",
+ alphamap_fragment:
+ "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",
+ alphamap_pars_fragment:
+ "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",
+ alphatest_fragment:
+ "#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",
+ alphatest_pars_fragment:
+ "#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",
+ aomap_fragment:
+ "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",
+ aomap_pars_fragment:
+ "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",
+ begin_vertex:
+ "vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",
+ beginnormal_vertex:
+ "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",
+ bsdfs:
+ "float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",
+ iridescence_fragment:
+ "#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",
+ bumpmap_pars_fragment:
+ "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",
+ clipping_planes_fragment:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",
+ clipping_planes_pars_fragment:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",
+ clipping_planes_pars_vertex:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",
+ clipping_planes_vertex:
+ "#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",
+ color_fragment:
+ "#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",
+ color_pars_fragment:
+ "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",
+ color_pars_vertex:
+ "#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",
+ color_vertex:
+ "#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",
+ common:
+ "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",
+ cube_uv_reflection_fragment:
+ "#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",
+ defaultnormal_vertex:
+ "vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",
+ displacementmap_pars_vertex:
+ "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",
+ displacementmap_vertex:
+ "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",
+ emissivemap_fragment:
+ "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",
+ emissivemap_pars_fragment:
+ "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",
+ colorspace_fragment:
+ "gl_FragColor = linearToOutputTexel( gl_FragColor );",
+ colorspace_pars_fragment:
+ "\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",
+ envmap_fragment:
+ "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",
+ envmap_common_pars_fragment:
+ "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",
+ envmap_pars_fragment:
+ "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",
+ envmap_pars_vertex:
+ "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",
+ envmap_physical_pars_fragment:
+ "#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",
+ envmap_vertex:
+ "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",
+ fog_vertex: "#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",
+ fog_pars_vertex:
+ "#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",
+ fog_fragment:
+ "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",
+ fog_pars_fragment:
+ "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",
+ gradientmap_pars_fragment:
+ "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",
+ lightmap_fragment:
+ "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",
+ lightmap_pars_fragment:
+ "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",
+ lights_lambert_fragment:
+ "LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",
+ lights_lambert_pars_fragment:
+ "varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",
+ lights_pars_begin:
+ "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",
+ lights_toon_fragment:
+ "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",
+ lights_toon_pars_fragment:
+ "varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",
+ lights_phong_fragment:
+ "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",
+ lights_phong_pars_fragment:
+ "varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",
+ lights_physical_fragment:
+ "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\n#endif",
+ lights_physical_pars_fragment:
+ "struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",
+ lights_fragment_begin:
+ "\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal;\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",
+ lights_fragment_maps:
+ "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",
+ lights_fragment_end:
+ "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",
+ logdepthbuf_fragment:
+ "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",
+ logdepthbuf_pars_fragment:
+ "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",
+ logdepthbuf_pars_vertex:
+ "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",
+ logdepthbuf_vertex:
+ "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",
+ map_fragment:
+ "#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",
+ map_pars_fragment:
+ "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",
+ map_particle_fragment:
+ "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",
+ map_particle_pars_fragment:
+ "#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",
+ metalnessmap_fragment:
+ "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",
+ metalnessmap_pars_fragment:
+ "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",
+ morphcolor_vertex:
+ "#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",
+ morphnormal_vertex:
+ "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",
+ morphtarget_pars_vertex:
+ "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",
+ morphtarget_vertex:
+ "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",
+ normal_fragment_begin:
+ "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",
+ normal_fragment_maps:
+ "#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",
+ normal_pars_fragment:
+ "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",
+ normal_pars_vertex:
+ "#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",
+ normal_vertex:
+ "#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",
+ normalmap_pars_fragment:
+ "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",
+ clearcoat_normal_fragment_begin:
+ "#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",
+ clearcoat_normal_fragment_maps:
+ "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",
+ clearcoat_pars_fragment:
+ "#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",
+ iridescence_pars_fragment:
+ "#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",
+ opaque_fragment:
+ "#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",
+ packing:
+ "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",
+ premultiplied_alpha_fragment:
+ "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",
+ project_vertex:
+ "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",
+ dithering_fragment:
+ "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",
+ dithering_pars_fragment:
+ "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",
+ roughnessmap_fragment:
+ "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",
+ roughnessmap_pars_fragment:
+ "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",
+ shadowmap_pars_fragment:
+ "#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",
+ shadowmap_pars_vertex:
+ "#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",
+ shadowmap_vertex:
+ "#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",
+ shadowmask_pars_fragment:
+ "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",
+ skinbase_vertex:
+ "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",
+ skinning_pars_vertex:
+ "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",
+ skinning_vertex:
+ "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",
+ skinnormal_vertex:
+ "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",
+ specularmap_fragment:
+ "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",
+ specularmap_pars_fragment:
+ "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",
+ tonemapping_fragment:
+ "#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",
+ tonemapping_pars_fragment:
+ "#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",
+ transmission_fragment:
+ "#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",
+ transmission_pars_fragment:
+ "#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",
+ uv_pars_fragment:
+ "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",
+ uv_pars_vertex:
+ "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",
+ uv_vertex:
+ "#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",
+ worldpos_vertex:
+ "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",
+ background_vert:
+ "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",
+ background_frag:
+ "uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",
+ backgroundCube_vert:
+ "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",
+ backgroundCube_frag:
+ "#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",
+ cube_vert:
+ "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",
+ cube_frag:
+ "uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",
+ depth_vert:
+ "#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",
+ depth_frag:
+ "#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",
+ distanceRGBA_vert:
+ "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",
+ distanceRGBA_frag:
+ "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",
+ equirect_vert:
+ "varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",
+ equirect_frag:
+ "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",
+ linedashed_vert:
+ "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ linedashed_frag:
+ "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshbasic_vert:
+ "#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",
+ meshbasic_frag:
+ "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include