@xtctwins/tctwins-bimx-viewer 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,14 +34,14 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
34
34
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
35
35
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
36
36
  PERFORMANCE OF THIS SOFTWARE.
37
- ***************************************************************************** */var bA=function(e,t){return bA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},bA(e,t)};function wA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}bA(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var xA=function(){return xA=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},xA.apply(this,arguments)};function BA(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))}function PA(e,t){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(6===s[0]&&o.label<n[1]){o.label=n[1],n=s;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(s);break}n[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{i=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function CA(e,t,i){if(i||2===arguments.length)for(var r,n=0,s=t.length;n<s;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||t)}for(var MA=function(){function e(e,t,i,r){this.left=e,this.top=t,this.width=i,this.height=r}return e.prototype.add=function(t,i,r,n){return new e(this.left+t,this.top+i,this.width+r,this.height+n)},e.fromClientRect=function(t,i){return new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height)},e.fromDOMRectList=function(t,i){var r=Array.from(i).find((function(e){return 0!==e.width}));return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),kA=function(e,t){return MA.fromClientRect(e,t.getBoundingClientRect())},EA=function(e){for(var t=[],i=0,r=e.length;i<r;){var n=e.charCodeAt(i++);if(n>=55296&&n<=56319&&i<r){var s=e.charCodeAt(i++);56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),i--)}else t.push(n)}return t},SA=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var i=e.length;if(!i)return"";for(var r=[],n=-1,s="";++n<i;){var o=e[n];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(n+1===i||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},TA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FA="undefined"==typeof Uint8Array?[]:new Uint8Array(256),IA=0;IA<64;IA++)FA[TA.charCodeAt(IA)]=IA;for(var DA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",RA="undefined"==typeof Uint8Array?[]:new Uint8Array(256),OA=0;OA<64;OA++)RA[DA.charCodeAt(OA)]=OA;for(var LA=function(e,t,i){return e.slice?e.slice(t,i):new Uint16Array(Array.prototype.slice.call(e,t,i))},jA=function(){function e(e,t,i,r,n,s){this.initialValue=e,this.errorValue=t,this.highStart=i,this.highValueIndex=r,this.index=n,this.data=s}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),UA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NA="undefined"==typeof Uint8Array?[]:new Uint8Array(256),VA=0;VA<64;VA++)NA[UA.charCodeAt(VA)]=VA;var QA=10,HA=13,GA=15,zA=17,WA=18,KA=19,XA=20,qA=21,YA=22,JA=24,ZA=25,$A=26,ed=27,td=28,id=30,rd=32,nd=33,sd=34,od=35,ad=37,ld=38,ud=39,cd=40,hd=42,Ad=[9001,65288],dd="×",pd="÷",fd=function(e){var t,i,r,n=function(e){var t,i,r,n,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(u)?u:new Uint8Array(u);for(t=0;t<a;t+=4)i=RA[e.charCodeAt(t)],r=RA[e.charCodeAt(t+1)],n=RA[e.charCodeAt(t+2)],s=RA[e.charCodeAt(t+3)],c[l++]=i<<2|r>>4,c[l++]=(15&r)<<4|n>>2,c[l++]=(3&n)<<6|63&s;return u}(e),s=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=4)i.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return i}(n):new Uint32Array(n),o=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=2)i.push(e[r+1]<<8|e[r]);return i}(n):new Uint16Array(n),a=LA(o,12,s[4]/2),l=2===s[5]?LA(o,(24+s[4])/2):(t=s,i=Math.ceil((24+s[4])/4),t.slice?t.slice(i,r):new Uint32Array(Array.prototype.slice.call(t,i,r)));return new jA(s[0],s[1],s[2],s[3],a,l)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHs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HLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgI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AAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAM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B1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lD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0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAr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QAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAe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HgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACU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AFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAe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AUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4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KwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),gd=[id,36],md=[1,2,3,5],vd=[QA,8],_d=[ed,$A],yd=md.concat(vd),bd=[ld,ud,cd,sd,od],wd=[GA,HA],xd=function(e,t,i,r){var n=r[i];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var s=i;s<=r.length;){if((l=r[++s])===t)return!0;if(l!==QA)break}if(n===QA)for(s=i;s>0;){var o=r[--s];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var a=i;a<=r.length;){var l;if((l=r[++a])===t)return!0;if(l!==QA)break}if(o!==QA)break}return!1},Bd=function(e,t){for(var i=e;i>=0;){var r=t[i];if(r!==QA)return r;i--}return 0},Pd=function(e,t,i,r,n){if(0===i[r])return dd;var s=r-1;if(Array.isArray(n)&&!0===n[s])return dd;var o=s-1,a=s+1,l=t[s],u=o>=0?t[o]:0,c=t[a];if(2===l&&3===c)return dd;if(-1!==md.indexOf(l))return"!";if(-1!==md.indexOf(c))return dd;if(-1!==vd.indexOf(c))return dd;if(8===Bd(s,t))return pd;if(11===fd.get(e[s]))return dd;if((l===rd||l===nd)&&11===fd.get(e[a]))return dd;if(7===l||7===c)return dd;if(9===l)return dd;if(-1===[QA,HA,GA].indexOf(l)&&9===c)return dd;if(-1!==[zA,WA,KA,JA,td].indexOf(c))return dd;if(Bd(s,t)===YA)return dd;if(xd(23,YA,s,t))return dd;if(xd([zA,WA],qA,s,t))return dd;if(xd(12,12,s,t))return dd;if(l===QA)return pd;if(23===l||23===c)return dd;if(16===c||16===l)return pd;if(-1!==[HA,GA,qA].indexOf(c)||14===l)return dd;if(36===u&&-1!==wd.indexOf(l))return dd;if(l===td&&36===c)return dd;if(c===XA)return dd;if(-1!==gd.indexOf(c)&&l===ZA||-1!==gd.indexOf(l)&&c===ZA)return dd;if(l===ed&&-1!==[ad,rd,nd].indexOf(c)||-1!==[ad,rd,nd].indexOf(l)&&c===$A)return dd;if(-1!==gd.indexOf(l)&&-1!==_d.indexOf(c)||-1!==_d.indexOf(l)&&-1!==gd.indexOf(c))return dd;if(-1!==[ed,$A].indexOf(l)&&(c===ZA||-1!==[YA,GA].indexOf(c)&&t[a+1]===ZA)||-1!==[YA,GA].indexOf(l)&&c===ZA||l===ZA&&-1!==[ZA,td,JA].indexOf(c))return dd;if(-1!==[ZA,td,JA,zA,WA].indexOf(c))for(var h=s;h>=0;){if((A=t[h])===ZA)return dd;if(-1===[td,JA].indexOf(A))break;h--}if(-1!==[ed,$A].indexOf(c))for(h=-1!==[zA,WA].indexOf(l)?o:s;h>=0;){var A;if((A=t[h])===ZA)return dd;if(-1===[td,JA].indexOf(A))break;h--}if(ld===l&&-1!==[ld,ud,sd,od].indexOf(c)||-1!==[ud,sd].indexOf(l)&&-1!==[ud,cd].indexOf(c)||-1!==[cd,od].indexOf(l)&&c===cd)return dd;if(-1!==bd.indexOf(l)&&-1!==[XA,$A].indexOf(c)||-1!==bd.indexOf(c)&&l===ed)return dd;if(-1!==gd.indexOf(l)&&-1!==gd.indexOf(c))return dd;if(l===JA&&-1!==gd.indexOf(c))return dd;if(-1!==gd.concat(ZA).indexOf(l)&&c===YA&&-1===Ad.indexOf(e[a])||-1!==gd.concat(ZA).indexOf(c)&&l===WA)return dd;if(41===l&&41===c){for(var d=i[s],p=1;d>0&&41===t[--d];)p++;if(p%2!=0)return dd}return l===rd&&c===nd?dd:pd},Cd=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var i=function(e,t){void 0===t&&(t="strict");var i=[],r=[],n=[];return e.forEach((function(e,s){var o=fd.get(e);if(o>50?(n.push(!0),o-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(s),i.push(16);if(4===o||11===o){if(0===s)return r.push(s),i.push(id);var a=i[s-1];return-1===yd.indexOf(a)?(r.push(r[s-1]),i.push(a)):(r.push(s),i.push(id))}return r.push(s),31===o?i.push("strict"===t?qA:ad):o===hd||29===o?i.push(id):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?i.push(ad):i.push(id):void i.push(o)})),[r,i,n]}(e,t.lineBreak),r=i[0],n=i[1],s=i[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(n=n.map((function(e){return-1!==[ZA,id,hd].indexOf(e)?ad:e})));var o="keep-all"===t.wordBreak?s.map((function(t,i){return t&&e[i]>=19968&&e[i]<=40959})):void 0;return[r,n,o]},Md=function(){function e(e,t,i,r){this.codePoints=e,this.required="!"===t,this.start=i,this.end=r}return e.prototype.slice=function(){return SA.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),kd=45,Ed=43,Sd=-1,Td=function(e){return e>=48&&e<=57},Fd=function(e){return Td(e)||e>=65&&e<=70||e>=97&&e<=102},Id=function(e){return 10===e||9===e||32===e},Dd=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},Rd=function(e){return Dd(e)||Td(e)||e===kd},Od=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},Ld=function(e,t){return 92===e&&10!==t},jd=function(e,t,i){return e===kd?Dd(t)||Ld(t,i):!!Dd(e)||!(92!==e||!Ld(e,t))},Ud=function(e,t,i){return e===Ed||e===kd?!!Td(t)||46===t&&Td(i):Td(46===e?t:e)},Nd=function(e){var t=0,i=1;e[t]!==Ed&&e[t]!==kd||(e[t]===kd&&(i=-1),t++);for(var r=[];Td(e[t]);)r.push(e[t++]);var n=r.length?parseInt(SA.apply(void 0,r),10):0;46===e[t]&&t++;for(var s=[];Td(e[t]);)s.push(e[t++]);var o=s.length,a=o?parseInt(SA.apply(void 0,s),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;e[t]!==Ed&&e[t]!==kd||(e[t]===kd&&(l=-1),t++);for(var u=[];Td(e[t]);)u.push(e[t++]);var c=u.length?parseInt(SA.apply(void 0,u),10):0;return i*(n+a*Math.pow(10,-o))*Math.pow(10,l*c)},Vd={type:2},Qd={type:3},Hd={type:4},Gd={type:13},zd={type:8},Wd={type:21},Kd={type:9},Xd={type:10},qd={type:11},Yd={type:12},Jd={type:14},Zd={type:23},$d={type:1},ep={type:25},tp={type:24},ip={type:26},rp={type:27},np={type:28},sp={type:29},op={type:31},ap={type:32},lp=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(EA(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==ap;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),i=this.peekCodePoint(1),r=this.peekCodePoint(2);if(Rd(t)||Ld(i,r)){var n=jd(t,i,r)?2:1;return{type:5,value:this.consumeName(),flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Gd;break;case 39:return this.consumeStringToken(39);case 40:return Vd;case 41:return Qd;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Jd;break;case Ed:if(Ud(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Hd;case kd:var s=e,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(Ud(s,o,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(jd(s,o,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===kd&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),tp;break;case 46:if(Ud(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(l===Sd)return this.consumeToken()}break;case 58:return ip;case 59:return rp;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===kd&&this.peekCodePoint(2)===kd)return this.consumeCodePoint(),this.consumeCodePoint(),ep;break;case 64:var u=this.peekCodePoint(0),c=this.peekCodePoint(1),h=this.peekCodePoint(2);if(jd(u,c,h))return{type:7,value:this.consumeName()};break;case 91:return np;case 92:if(Ld(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return sp;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),zd;break;case 123:return qd;case 125:return Yd;case 117:case 85:var A=this.peekCodePoint(0),d=this.peekCodePoint(1);return A!==Ed||!Fd(d)&&63!==d||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Kd;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Wd;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Xd;break;case Sd:return ap}return Id(e)?(this.consumeWhiteSpace(),op):Td(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Dd(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:SA(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Fd(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var i=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i)return{type:30,start:parseInt(SA.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(SA.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var r=parseInt(SA.apply(void 0,e),16);if(this.peekCodePoint(0)===kd&&Fd(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var n=[];Fd(t)&&n.length<6;)n.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(SA.apply(void 0,n),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Sd)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var i=this.consumeStringToken(this.consumeCodePoint());return 0===i.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Sd||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),Zd)}for(;;){var r=this.consumeCodePoint();if(r===Sd||41===r)return{type:22,value:SA.apply(void 0,e)};if(Id(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Sd||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:SA.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Zd);if(34===r||39===r||40===r||Od(r))return this.consumeBadUrlRemnants(),Zd;if(92===r){if(!Ld(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Zd;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;Id(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===Sd)return;Ld(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var i=Math.min(5e4,e);t+=SA.apply(void 0,this._value.splice(0,i)),e-=i}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",i=0;;){var r=this._value[i];if(r===Sd||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(i)};if(10===r)return this._value.splice(0,i),$d;if(92===r){var n=this._value[i+1];n!==Sd&&void 0!==n&&(10===n?(t+=this.consumeStringSlice(i),i=-1,this._value.shift()):Ld(r,n)&&(t+=this.consumeStringSlice(i),t+=SA(this.consumeEscapedCodePoint()),i=-1))}i++}},e.prototype.consumeNumber=function(){var e=[],t=4,i=this.peekCodePoint(0);for(i!==Ed&&i!==kd||e.push(this.consumeCodePoint());Td(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===i&&Td(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;Td(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===i||101===i)&&((r===Ed||r===kd)&&Td(n)||Td(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;Td(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Nd(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],i=e[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);return jd(r,n,s)?{type:15,number:t,flags:i,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:t,flags:i}):{type:17,number:t,flags:i}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Fd(e)){for(var t=SA(e);Fd(this.peekCodePoint(0))&&t.length<6;)t+=SA(this.consumeCodePoint());Id(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(t,16);return 0===i||function(e){return e>=55296&&e<=57343}(i)||i>1114111?65533:i}return e===Sd?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Rd(t))e+=SA(t);else{if(!Ld(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=SA(this.consumeEscapedCodePoint())}}},e}(),up=function(){function e(e){this._tokens=e}return e.create=function(t){var i=new lp;return i.write(t),new e(i.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},i=this.consumeToken();;){if(32===i.type||vp(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var i=this.consumeToken();if(32===i.type||3===i.type)return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?ap:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),cp=function(e){return 15===e.type},hp=function(e){return 17===e.type},Ap=function(e){return 20===e.type},dp=function(e){return 0===e.type},pp=function(e,t){return Ap(e)&&e.value===t},fp=function(e){return 31!==e.type},gp=function(e){return 31!==e.type&&4!==e.type},mp=function(e){var t=[],i=[];return e.forEach((function(e){if(4===e.type){if(0===i.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(i),void(i=[])}31!==e.type&&i.push(e)})),i.length&&t.push(i),t},vp=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},_p=function(e){return 17===e.type||15===e.type},yp=function(e){return 16===e.type||_p(e)},bp=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},wp={type:17,number:0,flags:4},xp={type:16,number:50,flags:4},Bp={type:16,number:100,flags:4},Pp=function(e,t,i){var r=e[0],n=e[1];return[Cp(r,t),Cp(void 0!==n?n:r,i)]},Cp=function(e,t){if(16===e.type)return e.number/100*t;if(cp(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Mp="grad",kp="turn",Ep=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case Mp:return Math.PI/200*t.number;case"rad":return t.number;case kp:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},Sp=function(e){return 15===e.type&&("deg"===e.unit||e.unit===Mp||"rad"===e.unit||e.unit===kp)},Tp=function(e){switch(e.filter(Ap).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[wp,wp];case"to top":case"bottom":return Fp(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[wp,Bp];case"to right":case"left":return Fp(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Bp,Bp];case"to bottom":case"top":return Fp(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Bp,wp];case"to left":case"right":return Fp(270)}return 0},Fp=function(e){return Math.PI*e/180},Ip=function(e,t){if(18===t.type){var i=Vp[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return i(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),n=t.value.substring(1,2),s=t.value.substring(2,3);return Op(parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16),1)}if(4===t.value.length){r=t.value.substring(0,1),n=t.value.substring(1,2),s=t.value.substring(2,3);var o=t.value.substring(3,4);return Op(parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16),parseInt(o+o,16)/255)}if(6===t.value.length){r=t.value.substring(0,2),n=t.value.substring(2,4),s=t.value.substring(4,6);return Op(parseInt(r,16),parseInt(n,16),parseInt(s,16),1)}if(8===t.value.length){r=t.value.substring(0,2),n=t.value.substring(2,4),s=t.value.substring(4,6),o=t.value.substring(6,8);return Op(parseInt(r,16),parseInt(n,16),parseInt(s,16),parseInt(o,16)/255)}}if(20===t.type){var a=Hp[t.value.toUpperCase()];if(void 0!==a)return a}return Hp.TRANSPARENT},Dp=function(e){return!(255&e)},Rp=function(e){var t=255&e,i=255&e>>8,r=255&e>>16,n=255&e>>24;return t<255?"rgba("+n+","+r+","+i+","+t/255+")":"rgb("+n+","+r+","+i+")"},Op=function(e,t,i,r){return(e<<24|t<<16|i<<8|Math.round(255*r))>>>0},Lp=function(e,t){if(17===e.type)return e.number;if(16===e.type){var i=3===t?1:255;return 3===t?e.number/100*i:Math.round(e.number/100*i)}return 0},jp=function(e,t){var i=t.filter(gp);if(3===i.length){var r=i.map(Lp),n=r[0],s=r[1],o=r[2];return Op(n,s,o,1)}if(4===i.length){var a=i.map(Lp),l=(n=a[0],s=a[1],o=a[2],a[3]);return Op(n,s,o,l)}return 0};function Up(e,t,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(t-e)*i*6+e:i<.5?t:i<2/3?6*(t-e)*(2/3-i)+e:e}var Np=function(e,t){var i=t.filter(gp),r=i[0],n=i[1],s=i[2],o=i[3],a=(17===r.type?Fp(r.number):Ep(e,r))/(2*Math.PI),l=yp(n)?n.number/100:0,u=yp(s)?s.number/100:0,c=void 0!==o&&yp(o)?Cp(o,1):1;if(0===l)return Op(255*u,255*u,255*u,1);var h=u<=.5?u*(l+1):u+l-u*l,A=2*u-h,d=Up(A,h,a+1/3),p=Up(A,h,a),f=Up(A,h,a-1/3);return Op(255*d,255*p,255*f,c)},Vp={hsl:Np,hsla:Np,rgb:jp,rgba:jp},Qp=function(e,t){return Ip(e,up.create(t).parseComponentValue())},Hp={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Gp={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Ap(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},zp={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Wp=function(e,t){var i=Ip(e,t[0]),r=t[1];return r&&yp(r)?{color:i,stop:r}:{color:i,stop:null}},Kp=function(e,t){var i=e[0],r=e[e.length-1];null===i.stop&&(i.stop=wp),null===r.stop&&(r.stop=Bp);for(var n=[],s=0,o=0;o<e.length;o++){var a=e[o].stop;if(null!==a){var l=Cp(a,t);l>s?n.push(l):n.push(s),s=l}else n.push(null)}var u=null;for(o=0;o<n.length;o++){var c=n[o];if(null===c)null===u&&(u=o);else if(null!==u){for(var h=o-u,A=(c-n[u-1])/(h+1),d=1;d<=h;d++)n[u+d-1]=A*d;u=null}}return e.map((function(e,i){return{color:e.color,stop:Math.max(Math.min(1,n[i]/t),0)}}))},Xp=function(e,t,i){var r="number"==typeof e?e:function(e,t,i){var r=t/2,n=i/2,s=Cp(e[0],t)-r,o=n-Cp(e[1],i);return(Math.atan2(o,s)+2*Math.PI)%(2*Math.PI)}(e,t,i),n=Math.abs(t*Math.sin(r))+Math.abs(i*Math.cos(r)),s=t/2,o=i/2,a=n/2,l=Math.sin(r-Math.PI/2)*a,u=Math.cos(r-Math.PI/2)*a;return[n,s-u,s+u,o-l,o+l]},qp=function(e,t){return Math.sqrt(e*e+t*t)},Yp=function(e,t,i,r,n){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var s=t[0],o=t[1],a=qp(i-s,r-o);return(n?a<e.optimumDistance:a>e.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Jp=function(e,t){var i=Fp(180),r=[];return mp(t).forEach((function(t,n){if(0===n){var s=t[0];if(20===s.type&&-1!==["top","left","right","bottom"].indexOf(s.value))return void(i=Tp(t));if(Sp(s))return void(i=(Ep(e,s)+Fp(270))%Fp(360))}var o=Wp(e,t);r.push(o)})),{angle:i,stops:r,type:1}},Zp="closest-side",$p="farthest-side",ef="closest-corner",tf="farthest-corner",rf="circle",nf="ellipse",sf="cover",of="contain",af=function(e,t){var i=0,r=3,n=[],s=[];return mp(t).forEach((function(t,o){var a=!0;if(0===o?a=t.reduce((function(e,t){if(Ap(t))switch(t.value){case"center":return s.push(xp),!1;case"top":case"left":return s.push(wp),!1;case"right":case"bottom":return s.push(Bp),!1}else if(yp(t)||_p(t))return s.push(t),!1;return e}),a):1===o&&(a=t.reduce((function(e,t){if(Ap(t))switch(t.value){case rf:return i=0,!1;case nf:return i=1,!1;case of:case Zp:return r=0,!1;case $p:return r=1,!1;case ef:return r=2,!1;case sf:case tf:return r=3,!1}else if(_p(t)||yp(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),a)),a){var l=Wp(e,t);n.push(l)}})),{size:r,shape:i,stops:n,position:s,type:2}},lf=function(e,t){if(22===t.type){var i={url:t.value,type:0};return e.cache.addImage(t.value),i}if(18===t.type){var r=cf[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)};var uf,cf={"linear-gradient":function(e,t){var i=Fp(180),r=[];return mp(t).forEach((function(t,n){if(0===n){var s=t[0];if(20===s.type&&"to"===s.value)return void(i=Tp(t));if(Sp(s))return void(i=Ep(e,s))}var o=Wp(e,t);r.push(o)})),{angle:i,stops:r,type:1}},"-moz-linear-gradient":Jp,"-ms-linear-gradient":Jp,"-o-linear-gradient":Jp,"-webkit-linear-gradient":Jp,"radial-gradient":function(e,t){var i=0,r=3,n=[],s=[];return mp(t).forEach((function(t,o){var a=!0;if(0===o){var l=!1;a=t.reduce((function(e,t){if(l)if(Ap(t))switch(t.value){case"center":return s.push(xp),e;case"top":case"left":return s.push(wp),e;case"right":case"bottom":return s.push(Bp),e}else(yp(t)||_p(t))&&s.push(t);else if(Ap(t))switch(t.value){case rf:return i=0,!1;case nf:return i=1,!1;case"at":return l=!0,!1;case Zp:return r=0,!1;case sf:case $p:return r=1,!1;case of:case ef:return r=2,!1;case tf:return r=3,!1}else if(_p(t)||yp(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),a)}if(a){var u=Wp(e,t);n.push(u)}})),{size:r,shape:i,stops:n,position:s,type:2}},"-moz-radial-gradient":af,"-ms-radial-gradient":af,"-o-radial-gradient":af,"-webkit-radial-gradient":af,"-webkit-gradient":function(e,t){var i=Fp(180),r=[],n=1;return mp(t).forEach((function(t,i){var s=t[0];if(0===i){if(Ap(s)&&"linear"===s.value)return void(n=1);if(Ap(s)&&"radial"===s.value)return void(n=2)}if(18===s.type)if("from"===s.name){var o=Ip(e,s.values[0]);r.push({stop:wp,color:o})}else if("to"===s.name){o=Ip(e,s.values[0]);r.push({stop:Bp,color:o})}else if("color-stop"===s.name){var a=s.values.filter(gp);if(2===a.length){o=Ip(e,a[1]);var l=a[0];hp(l)&&r.push({stop:{type:16,number:100*l.number,flags:l.flags},color:o})}}})),1===n?{angle:(i+Fp(180))%Fp(360),stops:r,type:n}:{size:3,shape:0,stops:r,position:[],type:n}}},hf={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var i=t[0];return 20===i.type&&"none"===i.value?[]:t.filter((function(e){return gp(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!cf[e.name])}(e)})).map((function(t){return lf(e,t)}))}},Af={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Ap(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},df={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return mp(t).map((function(e){return e.filter(yp)})).map(bp)}},pf={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return mp(t).map((function(e){return e.filter(Ap).map((function(e){return e.value})).join(" ")})).map(ff)}},ff=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(uf||(uf={}));var gf,mf={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return mp(t).map((function(e){return e.filter(vf)}))}},vf=function(e){return Ap(e)||yp(e)},_f=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},yf=_f("top"),bf=_f("right"),wf=_f("bottom"),xf=_f("left"),Bf=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return bp(t.filter(yp))}}},Pf=Bf("top-left"),Cf=Bf("top-right"),Mf=Bf("bottom-right"),kf=Bf("bottom-left"),Ef=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Sf=Ef("top"),Tf=Ef("right"),Ff=Ef("bottom"),If=Ef("left"),Df=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return cp(t)?t.number:0}}},Rf=Df("top"),Of=Df("right"),Lf=Df("bottom"),jf=Df("left"),Uf={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Nf={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Vf={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Ap).reduce((function(e,t){return e|Qf(t.value)}),0)}},Qf=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Hf={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Gf={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(gf||(gf={}));var zf,Wf={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?gf.STRICT:gf.NORMAL}},Kf={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xf=function(e,t){return Ap(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:yp(e)?Cp(e,t):t},qf={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:lf(e,t)}},Yf={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Jf={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Zf=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},$f=Zf("top"),eg=Zf("right"),tg=Zf("bottom"),ig=Zf("left"),rg={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Ap).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},ng={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},sg=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},og=sg("top"),ag=sg("right"),lg=sg("bottom"),ug=sg("left"),cg={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},hg={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Ag={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&pp(t[0],"none")?[]:mp(t).map((function(t){for(var i={color:Hp.TRANSPARENT,offsetX:wp,offsetY:wp,blur:wp},r=0,n=0;n<t.length;n++){var s=t[n];_p(s)?(0===r?i.offsetX=s:1===r?i.offsetY=s:i.blur=s,r++):i.color=Ip(e,s)}return i}))}},dg={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},pg={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var i=fg[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return i(t.values)}return null}},fg={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),i=t[0],r=t[1];t[2],t[3];var n=t[4],s=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],a=t[13];return t[14],t[15],16===t.length?[i,r,n,s,o,a]:null}},gg={type:16,number:50,flags:4},mg=[gg,gg],vg={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var i=t.filter(yp);return 2!==i.length?mg:[i[0],i[1]]}},_g={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(zf||(zf={}));for(var yg={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return zf.BREAK_ALL;case"keep-all":return zf.KEEP_ALL;default:return zf.NORMAL}}},bg={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(hp(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},wg=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")},xg={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return hp(t)?t.number:1}},Bg={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Pg={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Ap).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},Cg={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var i=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:i.push(e.value);break;case 17:i.push(e.number.toString());break;case 4:r.push(i.join(" ")),i.length=0}})),i.length&&r.push(i.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},Mg={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},kg={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return hp(t)?t.number:Ap(t)&&"bold"===t.value?700:400}},Eg={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Ap).map((function(e){return e.value}))}},Sg={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Tg=function(e,t){return 0!==(e&t)},Fg={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var i=t[0];return 20===i.type&&"none"===i.value?[]:t}},Ig={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var i=t[0];if(20===i.type&&"none"===i.value)return null;for(var r=[],n=t.filter(fp),s=0;s<n.length;s++){var o=n[s],a=n[s+1];if(20===o.type){var l=a&&hp(a)?a.number:1;r.push({counter:o.value,increment:l})}}return r}},Dg={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var i=[],r=t.filter(fp),n=0;n<r.length;n++){var s=r[n],o=r[n+1];if(Ap(s)&&"none"!==s.value){var a=o&&hp(o)?o.number:0;i.push({counter:s.value,reset:a})}}return i}},Rg={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(cp).map((function(t){return wg(e,t)}))}},Og={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var i=t[0];if(20===i.type&&"none"===i.value)return null;var r=[],n=t.filter(dp);if(n.length%2!=0)return null;for(var s=0;s<n.length;s+=2){var o=n[s].value,a=n[s+1].value;r.push({open:o,close:a})}return r}},Lg=function(e,t,i){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?i?r.open:r.close:""},jg={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&pp(t[0],"none")?[]:mp(t).map((function(t){for(var i={color:255,offsetX:wp,offsetY:wp,blur:wp,spread:wp,inset:!1},r=0,n=0;n<t.length;n++){var s=t[n];pp(s,"inset")?i.inset=!0:_p(s)?(0===r?i.offsetX=s:1===r?i.offsetY=s:2===r?i.blur=s:i.spread=s,r++):i.color=Ip(e,s)}return i}))}},Ug={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var i=[];return t.filter(Ap).forEach((function(e){switch(e.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2)}})),[0,1,2].forEach((function(e){-1===i.indexOf(e)&&i.push(e)})),i}},Ng={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Vg={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return cp(t)?t.number:0}},Qg=function(){function e(e,t){var i,r;this.animationDuration=zg(e,Rg,t.animationDuration),this.backgroundClip=zg(e,Gp,t.backgroundClip),this.backgroundColor=zg(e,zp,t.backgroundColor),this.backgroundImage=zg(e,hf,t.backgroundImage),this.backgroundOrigin=zg(e,Af,t.backgroundOrigin),this.backgroundPosition=zg(e,df,t.backgroundPosition),this.backgroundRepeat=zg(e,pf,t.backgroundRepeat),this.backgroundSize=zg(e,mf,t.backgroundSize),this.borderTopColor=zg(e,yf,t.borderTopColor),this.borderRightColor=zg(e,bf,t.borderRightColor),this.borderBottomColor=zg(e,wf,t.borderBottomColor),this.borderLeftColor=zg(e,xf,t.borderLeftColor),this.borderTopLeftRadius=zg(e,Pf,t.borderTopLeftRadius),this.borderTopRightRadius=zg(e,Cf,t.borderTopRightRadius),this.borderBottomRightRadius=zg(e,Mf,t.borderBottomRightRadius),this.borderBottomLeftRadius=zg(e,kf,t.borderBottomLeftRadius),this.borderTopStyle=zg(e,Sf,t.borderTopStyle),this.borderRightStyle=zg(e,Tf,t.borderRightStyle),this.borderBottomStyle=zg(e,Ff,t.borderBottomStyle),this.borderLeftStyle=zg(e,If,t.borderLeftStyle),this.borderTopWidth=zg(e,Rf,t.borderTopWidth),this.borderRightWidth=zg(e,Of,t.borderRightWidth),this.borderBottomWidth=zg(e,Lf,t.borderBottomWidth),this.borderLeftWidth=zg(e,jf,t.borderLeftWidth),this.boxShadow=zg(e,jg,t.boxShadow),this.color=zg(e,Uf,t.color),this.direction=zg(e,Nf,t.direction),this.display=zg(e,Vf,t.display),this.float=zg(e,Hf,t.cssFloat),this.fontFamily=zg(e,Cg,t.fontFamily),this.fontSize=zg(e,Mg,t.fontSize),this.fontStyle=zg(e,Sg,t.fontStyle),this.fontVariant=zg(e,Eg,t.fontVariant),this.fontWeight=zg(e,kg,t.fontWeight),this.letterSpacing=zg(e,Gf,t.letterSpacing),this.lineBreak=zg(e,Wf,t.lineBreak),this.lineHeight=zg(e,Kf,t.lineHeight),this.listStyleImage=zg(e,qf,t.listStyleImage),this.listStylePosition=zg(e,Yf,t.listStylePosition),this.listStyleType=zg(e,Jf,t.listStyleType),this.marginTop=zg(e,$f,t.marginTop),this.marginRight=zg(e,eg,t.marginRight),this.marginBottom=zg(e,tg,t.marginBottom),this.marginLeft=zg(e,ig,t.marginLeft),this.opacity=zg(e,xg,t.opacity);var n=zg(e,rg,t.overflow);this.overflowX=n[0],this.overflowY=n[n.length>1?1:0],this.overflowWrap=zg(e,ng,t.overflowWrap),this.paddingTop=zg(e,og,t.paddingTop),this.paddingRight=zg(e,ag,t.paddingRight),this.paddingBottom=zg(e,lg,t.paddingBottom),this.paddingLeft=zg(e,ug,t.paddingLeft),this.paintOrder=zg(e,Ug,t.paintOrder),this.position=zg(e,hg,t.position),this.textAlign=zg(e,cg,t.textAlign),this.textDecorationColor=zg(e,Bg,null!==(i=t.textDecorationColor)&&void 0!==i?i:t.color),this.textDecorationLine=zg(e,Pg,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=zg(e,Ag,t.textShadow),this.textTransform=zg(e,dg,t.textTransform),this.transform=zg(e,pg,t.transform),this.transformOrigin=zg(e,vg,t.transformOrigin),this.visibility=zg(e,_g,t.visibility),this.webkitTextStrokeColor=zg(e,Ng,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=zg(e,Vg,t.webkitTextStrokeWidth),this.wordBreak=zg(e,yg,t.wordBreak),this.zIndex=zg(e,bg,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return Dp(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return Tg(this.display,4)||Tg(this.display,33554432)||Tg(this.display,268435456)||Tg(this.display,536870912)||Tg(this.display,67108864)||Tg(this.display,134217728)},e}(),Hg=function(e,t){this.content=zg(e,Fg,t.content),this.quotes=zg(e,Og,t.quotes)},Gg=function(e,t){this.counterIncrement=zg(e,Ig,t.counterIncrement),this.counterReset=zg(e,Dg,t.counterReset)},zg=function(e,t,i){var r=new lp,n=null!=i?i.toString():t.initialValue;r.write(n);var s=new up(r.read());switch(t.type){case 2:var o=s.parseComponentValue();return t.parse(e,Ap(o)?o.value:t.initialValue);case 0:return t.parse(e,s.parseComponentValue());case 1:return t.parse(e,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(t.format){case"angle":return Ep(e,s.parseComponentValue());case"color":return Ip(e,s.parseComponentValue());case"image":return lf(e,s.parseComponentValue());case"length":var a=s.parseComponentValue();return _p(a)?a:wp;case"length-percentage":var l=s.parseComponentValue();return yp(l)?l:wp;case"time":return wg(e,s.parseComponentValue())}}},Wg=function(e,t){var i=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===i||t===i},Kg=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Wg(t,3),this.styles=new Qg(e,window.getComputedStyle(t,null)),Jm(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=kA(this.context,t),Wg(t,4)&&(this.flags|=16)},Xg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qg="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Yg=0;Yg<64;Yg++)qg[Xg.charCodeAt(Yg)]=Yg;for(var Jg=function(e,t,i){return e.slice?e.slice(t,i):new Uint16Array(Array.prototype.slice.call(e,t,i))},Zg=function(){function e(e,t,i,r,n,s){this.initialValue=e,this.errorValue=t,this.highStart=i,this.highValueIndex=r,this.index=n,this.data=s}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),$g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",em="undefined"==typeof Uint8Array?[]:new Uint8Array(256),tm=0;tm<64;tm++)em[$g.charCodeAt(tm)]=tm;var im,rm=8,nm=9,sm=11,om=12,am=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var i=e.length;if(!i)return"";for(var r=[],n=-1,s="";++n<i;){var o=e[n];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(n+1===i||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},lm=function(e){var t,i,r,n=function(e){var t,i,r,n,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(u)?u:new Uint8Array(u);for(t=0;t<a;t+=4)i=qg[e.charCodeAt(t)],r=qg[e.charCodeAt(t+1)],n=qg[e.charCodeAt(t+2)],s=qg[e.charCodeAt(t+3)],c[l++]=i<<2|r>>4,c[l++]=(15&r)<<4|n>>2,c[l++]=(3&n)<<6|63&s;return u}(e),s=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=4)i.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return i}(n):new Uint32Array(n),o=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=2)i.push(e[r+1]<<8|e[r]);return i}(n):new Uint16Array(n),a=Jg(o,12,s[4]/2),l=2===s[5]?Jg(o,(24+s[4])/2):(t=s,i=Math.ceil((24+s[4])/4),t.slice?t.slice(i,r):new Uint32Array(Array.prototype.slice.call(t,i,r)));return new Zg(s[0],s[1],s[2],s[3],a,l)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAg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gFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC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AwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFE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AOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),um="×",cm=function(e){return lm.get(e)},hm=function(e,t,i){var r=i-2,n=t[r],s=t[i-1],o=t[i];if(2===s&&3===o)return um;if(2===s||3===s||4===s)return"÷";if(2===o||3===o||4===o)return"÷";if(s===rm&&-1!==[rm,nm,sm,om].indexOf(o))return um;if(!(s!==sm&&s!==nm||o!==nm&&10!==o))return um;if((s===om||10===s)&&10===o)return um;if(13===o||5===o)return um;if(7===o)return um;if(1===s)return um;if(13===s&&14===o){for(;5===n;)n=t[--r];if(14===n)return um}if(15===s&&15===o){for(var a=0;15===n;)a++,n=t[--r];if(a%2==0)return um}return"÷"},Am=function(e){var t=function(e){for(var t=[],i=0,r=e.length;i<r;){var n=e.charCodeAt(i++);if(n>=55296&&n<=56319&&i<r){var s=e.charCodeAt(i++);56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),i--)}else t.push(n)}return t}(e),i=t.length,r=0,n=0,s=t.map(cm);return{next:function(){if(r>=i)return{done:!0,value:null};for(var e=um;r<i&&(e=hm(0,s,++r))===um;);if(e!==um||r===i){var o=am.apply(null,t.slice(n,r));return n=r,{value:o,done:!1}}return{done:!0,value:null}}}},dm=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},pm=function(e,t,i,r,n){var s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",i.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(n),o},fm=function(e){return new Promise((function(t,i){var r=new Image;r.onload=function(){return t(r)},r.onerror=i,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},gm={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var i=e.createElement("boundtest");i.style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i);var r=t.getBoundingClientRect(),n=Math.round(r.height);if(e.body.removeChild(i),123===n)return!0}}return!1}(document);return Object.defineProperty(gm,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=gm.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var i=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=t.firstChild,n=EA(r.data).map((function(e){return SA(e)})),s=0,o={},a=n.every((function(e,t){i.setStart(r,s),i.setEnd(r,s+e.length);var n=i.getBoundingClientRect();s+=e.length;var a=n.x>o.x||n.y>o.y;return o=n,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(gm,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,i=e.createElement("canvas"),r=i.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),i.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(gm,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),i=100;t.width=i,t.height=i;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,i,i);var n=new Image,s=t.toDataURL();n.src=s;var o=pm(i,i,0,0,n);return r.fillStyle="red",r.fillRect(0,0,i,i),fm(o).then((function(t){r.drawImage(t,0,0);var n=r.getImageData(0,0,i,i).data;r.fillStyle="red",r.fillRect(0,0,i,i);var o=e.createElement("div");return o.style.backgroundImage="url("+s+")",o.style.height=i+"px",dm(n)?fm(pm(i,i,0,0,o)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),dm(r.getImageData(0,0,i,i).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(gm,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(gm,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(gm,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(gm,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(gm,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},mm=function(e,t){this.text=e,this.bounds=t},vm=function(e,t){var i=t.ownerDocument;if(i){var r=i.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var n=t.parentNode;if(n){n.replaceChild(r,t);var s=kA(e,r);return r.firstChild&&n.replaceChild(r.firstChild,r),s}}return MA.EMPTY},_m=function(e,t,i){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(e,t),n.setEnd(e,t+i),n},ym=function(e){if(gm.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,i=Am(e),r=[];!(t=i.next()).done;)t.value&&r.push(t.value.slice());return r}(e)},bm=function(e,t){return 0!==t.letterSpacing?ym(e):function(e,t){if(gm.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(e)).map((function(e){return e.segment}))}return xm(e,t)}(e,t)},wm=[32,160,4961,65792,65793,4153,4241],xm=function(e,t){for(var i,r=function(e,t){var i=EA(e),r=Cd(i,t),n=r[0],s=r[1],o=r[2],a=i.length,l=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var e=dd;u<a&&(e=Pd(i,s,n,++u,o))===dd;);if(e!==dd||u===a){var t=new Md(i,e,l,u);return l=u,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),n=[],s=function(){if(i.value){var e=i.value.slice(),t=EA(e),r="";t.forEach((function(e){-1===wm.indexOf(e)?r+=SA(e):(r.length&&n.push(r),n.push(SA(e)),r="")})),r.length&&n.push(r)}};!(i=r.next()).done;)s();return n},Bm=function(e,t,i){this.text=Pm(t.data,i.textTransform),this.textBounds=function(e,t,i,r){var n=bm(t,i),s=[],o=0;return n.forEach((function(t){if(i.textDecorationLine.length||t.trim().length>0)if(gm.SUPPORT_RANGE_BOUNDS){var n=_m(r,o,t.length).getClientRects();if(n.length>1){var a=ym(t),l=0;a.forEach((function(t){s.push(new mm(t,MA.fromDOMRectList(e,_m(r,l+o,t.length).getClientRects()))),l+=t.length}))}else s.push(new mm(t,MA.fromDOMRectList(e,n)))}else{var u=r.splitText(t.length);s.push(new mm(t,vm(e,r))),r=u}else gm.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length})),s}(e,this.text,i,t)},Pm=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Cm,Mm);case 2:return e.toUpperCase();default:return e}},Cm=/(^|\s|:|-|\(|\))([a-z])/g,Mm=function(e,t,i){return e.length>0?t+i.toUpperCase():e},km=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.src=i.currentSrc||i.src,r.intrinsicWidth=i.naturalWidth,r.intrinsicHeight=i.naturalHeight,r.context.cache.addImage(r.src),r}return wA(t,e),t}(Kg),Em=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.canvas=i,r.intrinsicWidth=i.width,r.intrinsicHeight=i.height,r}return wA(t,e),t}(Kg),Sm=function(e){function t(t,i){var r=e.call(this,t,i)||this,n=new XMLSerializer,s=kA(t,i);return i.setAttribute("width",s.width+"px"),i.setAttribute("height",s.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(i)),r.intrinsicWidth=i.width.baseVal.value,r.intrinsicHeight=i.height.baseVal.value,r.context.cache.addImage(r.svg),r}return wA(t,e),t}(Kg),Tm=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.value=i.value,r}return wA(t,e),t}(Kg),Fm=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.start=i.start,r.reversed="boolean"==typeof i.reversed&&!0===i.reversed,r}return wA(t,e),t}(Kg),Im=[{type:15,flags:0,unit:"px",number:3}],Dm=[{type:16,flags:0,number:50}],Rm="checkbox",Om="radio",Lm="password",jm=707406591,Um=function(e){function t(t,i){var r,n=e.call(this,t,i)||this;switch(n.type=i.type.toLowerCase(),n.checked=i.checked,n.value=function(e){var t=e.type===Lm?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t}(i),n.type!==Rm&&n.type!==Om||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=(r=n.bounds).width>r.height?new MA(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new MA(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r),n.type){case Rm:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Im;break;case Om:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Dm}return n}return wA(t,e),t}(Kg),Nm=function(e){function t(t,i){var r=e.call(this,t,i)||this,n=i.options[i.selectedIndex||0];return r.value=n&&n.text||"",r}return wA(t,e),t}(Kg),Vm=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.value=i.value,r}return wA(t,e),t}(Kg),Qm=function(e){function t(t,i){var r=e.call(this,t,i)||this;r.src=i.src,r.width=parseInt(i.width,10)||0,r.height=parseInt(i.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){r.tree=Wm(t,i.contentWindow.document.documentElement);var n=i.contentWindow.document.documentElement?Qp(t,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):Hp.TRANSPARENT,s=i.contentWindow.document.body?Qp(t,getComputedStyle(i.contentWindow.document.body).backgroundColor):Hp.TRANSPARENT;r.backgroundColor=Dp(n)?Dp(s)?r.styles.backgroundColor:s:n}}catch(e){}return r}return wA(t,e),t}(Kg),Hm=["OL","UL","MENU"],Gm=function(e,t,i,r){for(var n=t.firstChild,s=void 0;n;n=s)if(s=n.nextSibling,qm(n)&&n.data.trim().length>0)i.textNodes.push(new Bm(e,n,i.styles));else if(Ym(n))if(hv(n)&&n.assignedNodes)n.assignedNodes().forEach((function(t){return Gm(e,t,i,r)}));else{var o=zm(e,n);o.styles.isVisible()&&(Km(n,o,r)?o.flags|=4:Xm(o.styles)&&(o.flags|=2),-1!==Hm.indexOf(n.tagName)&&(o.flags|=8),i.elements.push(o),n.slot,n.shadowRoot?Gm(e,n.shadowRoot,o,r):uv(n)||iv(n)||cv(n)||Gm(e,n,o,r))}},zm=function(e,t){return ov(t)?new km(e,t):nv(t)?new Em(e,t):iv(t)?new Sm(e,t):$m(t)?new Tm(e,t):ev(t)?new Fm(e,t):tv(t)?new Um(e,t):cv(t)?new Nm(e,t):uv(t)?new Vm(e,t):av(t)?new Qm(e,t):new Kg(e,t)},Wm=function(e,t){var i=zm(e,t);return i.flags|=4,Gm(e,t,i,i),i},Km=function(e,t,i){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||rv(e)&&i.styles.isTransparent()},Xm=function(e){return e.isPositioned()||e.isFloating()},qm=function(e){return e.nodeType===Node.TEXT_NODE},Ym=function(e){return e.nodeType===Node.ELEMENT_NODE},Jm=function(e){return Ym(e)&&void 0!==e.style&&!Zm(e)},Zm=function(e){return"object"===w(e.className)},$m=function(e){return"LI"===e.tagName},ev=function(e){return"OL"===e.tagName},tv=function(e){return"INPUT"===e.tagName},iv=function(e){return"svg"===e.tagName},rv=function(e){return"BODY"===e.tagName},nv=function(e){return"CANVAS"===e.tagName},sv=function(e){return"VIDEO"===e.tagName},ov=function(e){return"IMG"===e.tagName},av=function(e){return"IFRAME"===e.tagName},lv=function(e){return"STYLE"===e.tagName},uv=function(e){return"TEXTAREA"===e.tagName},cv=function(e){return"SELECT"===e.tagName},hv=function(e){return"SLOT"===e.tagName},Av=function(e){return e.tagName.indexOf("-")>0},dv=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,i=e.counterIncrement,r=e.counterReset,n=!0;null!==i&&i.forEach((function(e){var i=t.counters[e.counter];i&&0!==e.increment&&(n=!1,i.length||i.push(1),i[Math.max(0,i.length-1)]+=e.increment)}));var s=[];return n&&r.forEach((function(e){var i=t.counters[e.counter];s.push(e.counter),i||(i=t.counters[e.counter]=[]),i.push(e.reset)})),s},e}(),pv={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},fv={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},gv={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},mv={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},vv=function(e,t,i,r,n,s){return e<t||e>i?Mv(e,n,s.length>0):r.integers.reduce((function(t,i,n){for(;e>=i;)e-=i,t+=r.values[n];return t}),"")+s},_v=function(e,t,i,r){var n="";do{i||e--,n=r(e)+n,e/=t}while(e*t>=t);return n},yv=function(e,t,i,r,n){var s=i-t+1;return(e<0?"-":"")+(_v(Math.abs(e),s,r,(function(e){return SA(Math.floor(e%s)+t)}))+n)},bv=function(e,t,i){void 0===i&&(i=". ");var r=t.length;return _v(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+i},wv=function(e,t,i,r,n,s){if(e<-9999||e>9999)return Mv(e,4,n.length>0);var o=Math.abs(e),a=n;if(0===o)return t[0]+a;for(var l=0;o>0&&l<=4;l++){var u=o%10;0===u&&Tg(s,1)&&""!==a?a=t[u]+a:u>1||1===u&&0===l||1===u&&1===l&&Tg(s,2)||1===u&&1===l&&Tg(s,4)&&e>100||1===u&&l>1&&Tg(s,8)?a=t[u]+(l>0?i[l-1]:"")+a:1===u&&l>0&&(a=i[l-1]+a),o=Math.floor(o/10)}return(e<0?r:"")+a},xv="十百千萬",Bv="拾佰仟萬",Pv="マイナス",Cv="마이너스",Mv=function(e,t,i){var r=i?". ":"",n=i?"、":"",s=i?", ":"",o=i?" ":"";switch(t){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var a=yv(e,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return bv(e,"〇一二三四五六七八九",n);case 6:return vv(e,1,3999,pv,3,r).toLowerCase();case 7:return vv(e,1,3999,pv,3,r);case 8:return yv(e,945,969,!1,r);case 9:return yv(e,97,122,!1,r);case 10:return yv(e,65,90,!1,r);case 11:return yv(e,1632,1641,!0,r);case 12:case 49:return vv(e,1,9999,fv,3,r);case 35:return vv(e,1,9999,fv,3,r).toLowerCase();case 13:return yv(e,2534,2543,!0,r);case 14:case 30:return yv(e,6112,6121,!0,r);case 15:return bv(e,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return bv(e,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return wv(e,"零一二三四五六七八九",xv,"負",n,14);case 47:return wv(e,"零壹貳參肆伍陸柒捌玖",Bv,"負",n,15);case 42:return wv(e,"零一二三四五六七八九",xv,"负",n,14);case 41:return wv(e,"零壹贰叁肆伍陆柒捌玖",Bv,"负",n,15);case 26:return wv(e,"〇一二三四五六七八九","十百千万",Pv,n,0);case 25:return wv(e,"零壱弐参四伍六七八九","拾百千万",Pv,n,7);case 31:return wv(e,"영일이삼사오육칠팔구","십백천만",Cv,s,7);case 33:return wv(e,"零一二三四五六七八九","十百千萬",Cv,s,0);case 32:return wv(e,"零壹貳參四五六七八九","拾百千",Cv,s,7);case 18:return yv(e,2406,2415,!0,r);case 20:return vv(e,1,19999,mv,3,r);case 21:return yv(e,2790,2799,!0,r);case 22:return yv(e,2662,2671,!0,r);case 22:return vv(e,1,10999,gv,3,r);case 23:return bv(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return bv(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return yv(e,3302,3311,!0,r);case 28:return bv(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return bv(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return yv(e,3792,3801,!0,r);case 37:return yv(e,6160,6169,!0,r);case 38:return yv(e,4160,4169,!0,r);case 39:return yv(e,2918,2927,!0,r);case 40:return yv(e,1776,1785,!0,r);case 43:return yv(e,3046,3055,!0,r);case 44:return yv(e,3174,3183,!0,r);case 45:return yv(e,3664,3673,!0,r);case 46:return yv(e,3872,3881,!0,r);default:return yv(e,48,57,!0,r)}},kv="data-html2canvas-ignore",Ev=function(){function e(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new dv,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var i=this,r=Tv(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var n=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,o=r.contentWindow,a=o.document,l=Dv(r).then((function(){return BA(i,void 0,void 0,(function(){var e,i;return PA(this,(function(n){switch(n.label){case 0:return this.scrolledElements.forEach(Uv),o&&(o.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||o.scrollY===t.top&&o.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(i=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Iv(a)]:[3,4];case 3:n.sent(),n.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(a,i)})).then((function(){return r}))]:[2,r]}}))}))}));return a.open(),a.write(Lv(document.doctype)+"<html></html>"),jv(this.referenceElement.ownerDocument,n,s),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},e.prototype.createElementClone=function(e){if(Wg(e,2),nv(e))return this.createCanvasClone(e);if(sv(e))return this.createVideoClone(e);if(lv(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return ov(t)&&(ov(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Av(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Ov(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var i=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),r=e.cloneNode(!1);return r.textContent=i,r}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var i=e.ownerDocument.createElement("img");try{return i.src=e.toDataURL(),i}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var n=e.getContext("2d"),s=r.getContext("2d");if(s)if(!this.options.allowTaint&&n)s.putImageData(n.getImageData(0,0,e.width,e.height),0,0);else{var o=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(o){var a=o.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return r}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,i){Ym(t)&&(function(e){return"SCRIPT"===e.tagName}(t)||t.hasAttribute(kv)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Ym(t)&&lv(t)||e.appendChild(this.cloneNode(t,i))},e.prototype.cloneChildNodes=function(e,t,i){for(var r=this,n=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;n;n=n.nextSibling)if(Ym(n)&&hv(n)&&"function"==typeof n.assignedNodes){var s=n.assignedNodes();s.length&&s.forEach((function(e){return r.appendChildNode(t,e,i)}))}else this.appendChildNode(t,n,i)},e.prototype.cloneNode=function(e,t){if(qm(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var i=e.ownerDocument.defaultView;if(i&&Ym(e)&&(Jm(e)||Zm(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var n=i.getComputedStyle(e),s=i.getComputedStyle(e,":before"),o=i.getComputedStyle(e,":after");this.referenceElement===e&&Jm(r)&&(this.clonedReferenceElement=r),rv(r)&&Hv(r);var a=this.counters.parse(new Gg(this.context,n)),l=this.resolvePseudoContent(e,r,s,im.BEFORE);Av(e)&&(t=!0),sv(e)||this.cloneChildNodes(e,r,t),l&&r.insertBefore(l,r.firstChild);var u=this.resolvePseudoContent(e,r,o,im.AFTER);return u&&r.appendChild(u),this.counters.pop(a),(n&&(this.options.copyStyles||Zm(e))&&!av(e)||t)&&Ov(n,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(uv(e)||cv(e))&&(uv(r)||cv(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,i,r){var n=this;if(i){var s=i.content,o=t.ownerDocument;if(o&&s&&"none"!==s&&"-moz-alt-content"!==s&&"none"!==i.display){this.counters.parse(new Gg(this.context,i));var a=new Hg(this.context,i),l=o.createElement("html2canvaspseudoelement");Ov(i,l),a.content.forEach((function(t){if(0===t.type)l.appendChild(o.createTextNode(t.value));else if(22===t.type){var i=o.createElement("img");i.src=t.value,i.style.opacity="1",l.appendChild(i)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter(Ap);r.length&&l.appendChild(o.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var s=t.values.filter(gp),u=s[0],c=s[1];if(u&&Ap(u)){var h=n.counters.getCounterValue(u.value),A=c&&Ap(c)?Jf.parse(n.context,c.value):3;l.appendChild(o.createTextNode(Mv(h,A,!1)))}}else if("counters"===t.name){var d=t.values.filter(gp),p=(u=d[0],d[1]);c=d[2];if(u&&Ap(u)){var f=n.counters.getCounterValues(u.value),g=c&&Ap(c)?Jf.parse(n.context,c.value):3,m=p&&0===p.type?p.value:"",v=f.map((function(e){return Mv(e,g,!1)})).join(m);l.appendChild(o.createTextNode(v))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(o.createTextNode(Lg(a.quotes,n.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(Lg(a.quotes,--n.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(t.value))}})),l.className=Nv+" "+Vv;var u=r===im.BEFORE?" "+Nv:" "+Vv;return Zm(t)?t.className.baseValue+=u:t.className+=u,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(im||(im={}));var Sv,Tv=function(e,t){var i=e.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=t.width.toString(),i.height=t.height.toString(),i.scrolling="no",i.setAttribute(kv,"true"),e.body.appendChild(i),i},Fv=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},Iv=function(e){return Promise.all([].slice.call(e.images,0).map(Fv))},Dv=function(e){return new Promise((function(t,i){var r=e.contentWindow;if(!r)return i("No window assigned for iframe");var n=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var i=setInterval((function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(i),t(e))}),50)}}))},Rv=["all","d","content"],Ov=function(e,t){for(var i=e.length-1;i>=0;i--){var r=e.item(i);-1===Rv.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},Lv=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},jv=function(e,t,i){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||i!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,i)},Uv=function(e){var t=e[0],i=e[1],r=e[2];t.scrollLeft=i,t.scrollTop=r},Nv="___html2canvas___pseudoelement_before",Vv="___html2canvas___pseudoelement_after",Qv='{\n content: "" !important;\n display: none !important;\n}',Hv=function(e){Gv(e,"."+Nv+":before"+Qv+"\n ."+Vv+":after"+Qv)},Gv=function(e,t){var i=e.ownerDocument;if(i){var r=i.createElement("style");r.textContent=t,e.appendChild(r)}},zv=function(){function e(){}return e.getOrigin=function(t){var i=e._link;return i?(i.href=t,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Wv=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:$v(e)||Yv(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s=this;return PA(this,(function(o){switch(o.label){case 0:return t=zv.isSameOrigin(e),i=!Jv(e)&&!0===this._options.useCORS&&gm.SUPPORT_CORS_IMAGES&&!t,r=!Jv(e)&&!t&&!$v(e)&&"string"==typeof this._options.proxy&&gm.SUPPORT_CORS_XHR&&!i,t||!1!==this._options.allowTaint||Jv(e)||$v(e)||r||i?(n=e,r?[4,this.proxy(n)]:[3,2]):[2];case 1:n=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Zv(n)||i)&&(r.crossOrigin="anonymous"),r.src=n,!0===r.complete&&setTimeout((function(){return e(r)}),500),s._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+s._options.imageTimeout+"ms) loading image")}),s._options.imageTimeout)}))];case 3:return[2,o.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(n,s){var o=gm.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===o)n(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return n(e.result)}),!1),e.addEventListener("error",(function(e){return s(e)}),!1),e.readAsDataURL(a.response)}else s("Failed to proxy resource "+r+" with status code "+a.status)},a.onerror=s;var l=i.indexOf("?")>-1?"&":"?";if(a.open("GET",""+i+l+"url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&a instanceof XMLHttpRequest&&(a.responseType=o),t._options.imageTimeout){var u=t._options.imageTimeout;a.timeout=u,a.ontimeout=function(){return s("Timed out ("+u+"ms) proxying "+r)}}a.send()}))},e}(),Kv=/^data:image\/svg\+xml/i,Xv=/^data:image\/.*;base64,/i,qv=/^data:image\/.*/i,Yv=function(e){return gm.SUPPORT_SVG_DRAWING||!e_(e)},Jv=function(e){return qv.test(e)},Zv=function(e){return Xv.test(e)},$v=function(e){return"blob"===e.substr(0,4)},e_=function(e){return"svg"===e.substr(-3).toLowerCase()||Kv.test(e)},t_=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,i){return new e(this.x+t,this.y+i)},e}(),i_=function(e,t,i){return new t_(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},r_=function(){function e(e,t,i,r){this.type=1,this.start=e,this.startControl=t,this.endControl=i,this.end=r}return e.prototype.subdivide=function(t,i){var r=i_(this.start,this.startControl,t),n=i_(this.startControl,this.endControl,t),s=i_(this.endControl,this.end,t),o=i_(r,n,t),a=i_(n,s,t),l=i_(o,a,t);return i?new e(this.start,r,o,l):new e(l,a,s,this.end)},e.prototype.add=function(t,i){return new e(this.start.add(t,i),this.startControl.add(t,i),this.endControl.add(t,i),this.end.add(t,i))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),n_=function(e){return 1===e.type},s_=function(e){var t=e.styles,i=e.bounds,r=Pp(t.borderTopLeftRadius,i.width,i.height),n=r[0],s=r[1],o=Pp(t.borderTopRightRadius,i.width,i.height),a=o[0],l=o[1],u=Pp(t.borderBottomRightRadius,i.width,i.height),c=u[0],h=u[1],A=Pp(t.borderBottomLeftRadius,i.width,i.height),d=A[0],p=A[1],f=[];f.push((n+a)/i.width),f.push((d+c)/i.width),f.push((s+p)/i.height),f.push((l+h)/i.height);var g=Math.max.apply(Math,f);g>1&&(n/=g,s/=g,a/=g,l/=g,c/=g,h/=g,d/=g,p/=g);var m=i.width-a,v=i.height-h,_=i.width-c,y=i.height-p,b=t.borderTopWidth,w=t.borderRightWidth,x=t.borderBottomWidth,B=t.borderLeftWidth,P=Cp(t.paddingTop,e.bounds.width),C=Cp(t.paddingRight,e.bounds.width),M=Cp(t.paddingBottom,e.bounds.width),k=Cp(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||s>0?o_(i.left+B/3,i.top+b/3,n-B/3,s-b/3,Sv.TOP_LEFT):new t_(i.left+B/3,i.top+b/3),this.topRightBorderDoubleOuterBox=n>0||s>0?o_(i.left+m,i.top+b/3,a-w/3,l-b/3,Sv.TOP_RIGHT):new t_(i.left+i.width-w/3,i.top+b/3),this.bottomRightBorderDoubleOuterBox=c>0||h>0?o_(i.left+_,i.top+v,c-w/3,h-x/3,Sv.BOTTOM_RIGHT):new t_(i.left+i.width-w/3,i.top+i.height-x/3),this.bottomLeftBorderDoubleOuterBox=d>0||p>0?o_(i.left+B/3,i.top+y,d-B/3,p-x/3,Sv.BOTTOM_LEFT):new t_(i.left+B/3,i.top+i.height-x/3),this.topLeftBorderDoubleInnerBox=n>0||s>0?o_(i.left+2*B/3,i.top+2*b/3,n-2*B/3,s-2*b/3,Sv.TOP_LEFT):new t_(i.left+2*B/3,i.top+2*b/3),this.topRightBorderDoubleInnerBox=n>0||s>0?o_(i.left+m,i.top+2*b/3,a-2*w/3,l-2*b/3,Sv.TOP_RIGHT):new t_(i.left+i.width-2*w/3,i.top+2*b/3),this.bottomRightBorderDoubleInnerBox=c>0||h>0?o_(i.left+_,i.top+v,c-2*w/3,h-2*x/3,Sv.BOTTOM_RIGHT):new t_(i.left+i.width-2*w/3,i.top+i.height-2*x/3),this.bottomLeftBorderDoubleInnerBox=d>0||p>0?o_(i.left+2*B/3,i.top+y,d-2*B/3,p-2*x/3,Sv.BOTTOM_LEFT):new t_(i.left+2*B/3,i.top+i.height-2*x/3),this.topLeftBorderStroke=n>0||s>0?o_(i.left+B/2,i.top+b/2,n-B/2,s-b/2,Sv.TOP_LEFT):new t_(i.left+B/2,i.top+b/2),this.topRightBorderStroke=n>0||s>0?o_(i.left+m,i.top+b/2,a-w/2,l-b/2,Sv.TOP_RIGHT):new t_(i.left+i.width-w/2,i.top+b/2),this.bottomRightBorderStroke=c>0||h>0?o_(i.left+_,i.top+v,c-w/2,h-x/2,Sv.BOTTOM_RIGHT):new t_(i.left+i.width-w/2,i.top+i.height-x/2),this.bottomLeftBorderStroke=d>0||p>0?o_(i.left+B/2,i.top+y,d-B/2,p-x/2,Sv.BOTTOM_LEFT):new t_(i.left+B/2,i.top+i.height-x/2),this.topLeftBorderBox=n>0||s>0?o_(i.left,i.top,n,s,Sv.TOP_LEFT):new t_(i.left,i.top),this.topRightBorderBox=a>0||l>0?o_(i.left+m,i.top,a,l,Sv.TOP_RIGHT):new t_(i.left+i.width,i.top),this.bottomRightBorderBox=c>0||h>0?o_(i.left+_,i.top+v,c,h,Sv.BOTTOM_RIGHT):new t_(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=d>0||p>0?o_(i.left,i.top+y,d,p,Sv.BOTTOM_LEFT):new t_(i.left,i.top+i.height),this.topLeftPaddingBox=n>0||s>0?o_(i.left+B,i.top+b,Math.max(0,n-B),Math.max(0,s-b),Sv.TOP_LEFT):new t_(i.left+B,i.top+b),this.topRightPaddingBox=a>0||l>0?o_(i.left+Math.min(m,i.width-w),i.top+b,m>i.width+w?0:Math.max(0,a-w),Math.max(0,l-b),Sv.TOP_RIGHT):new t_(i.left+i.width-w,i.top+b),this.bottomRightPaddingBox=c>0||h>0?o_(i.left+Math.min(_,i.width-B),i.top+Math.min(v,i.height-x),Math.max(0,c-w),Math.max(0,h-x),Sv.BOTTOM_RIGHT):new t_(i.left+i.width-w,i.top+i.height-x),this.bottomLeftPaddingBox=d>0||p>0?o_(i.left+B,i.top+Math.min(y,i.height-x),Math.max(0,d-B),Math.max(0,p-x),Sv.BOTTOM_LEFT):new t_(i.left+B,i.top+i.height-x),this.topLeftContentBox=n>0||s>0?o_(i.left+B+k,i.top+b+P,Math.max(0,n-(B+k)),Math.max(0,s-(b+P)),Sv.TOP_LEFT):new t_(i.left+B+k,i.top+b+P),this.topRightContentBox=a>0||l>0?o_(i.left+Math.min(m,i.width+B+k),i.top+b+P,m>i.width+B+k?0:a-B+k,l-(b+P),Sv.TOP_RIGHT):new t_(i.left+i.width-(w+C),i.top+b+P),this.bottomRightContentBox=c>0||h>0?o_(i.left+Math.min(_,i.width-(B+k)),i.top+Math.min(v,i.height+b+P),Math.max(0,c-(w+C)),h-(x+M),Sv.BOTTOM_RIGHT):new t_(i.left+i.width-(w+C),i.top+i.height-(x+M)),this.bottomLeftContentBox=d>0||p>0?o_(i.left+B+k,i.top+y,Math.max(0,d-(B+k)),p-(x+M),Sv.BOTTOM_LEFT):new t_(i.left+B+k,i.top+i.height-(x+M))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Sv||(Sv={}));var o_=function(e,t,i,r,n){var s=(Math.sqrt(2)-1)/3*4,o=i*s,a=r*s,l=e+i,u=t+r;switch(n){case Sv.TOP_LEFT:return new r_(new t_(e,u),new t_(e,u-a),new t_(l-o,t),new t_(l,t));case Sv.TOP_RIGHT:return new r_(new t_(e,t),new t_(e+o,t),new t_(l,u-a),new t_(l,u));case Sv.BOTTOM_RIGHT:return new r_(new t_(l,t),new t_(l,t+a),new t_(e+o,u),new t_(e,u));case Sv.BOTTOM_LEFT:default:return new r_(new t_(l,u),new t_(l-o,u),new t_(e,t+a),new t_(e,t))}},a_=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},l_=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},u_=function(e,t,i){this.offsetX=e,this.offsetY=t,this.matrix=i,this.type=0,this.target=6},c_=function(e,t){this.path=e,this.target=t,this.type=1},h_=function(e){this.opacity=e,this.type=2,this.target=6},A_=function(e){return 1===e.type},d_=function(e,t){return e.length===t.length&&e.some((function(e,i){return e===t[i]}))},p_=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},f_=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new s_(this.container),this.container.styles.opacity<1&&this.effects.push(new h_(this.container.styles.opacity)),null!==this.container.styles.transform){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,n=this.container.styles.transform;this.effects.push(new u_(i,r,n))}if(0!==this.container.styles.overflowX){var s=a_(this.curves),o=l_(this.curves);d_(s,o)?this.effects.push(new c_(s,6)):(this.effects.push(new c_(s,2)),this.effects.push(new c_(o,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),i=this.parent,r=this.effects.slice(0);i;){var n=i.effects.filter((function(e){return!A_(e)}));if(t||0!==i.container.styles.position||!i.parent){if(r.unshift.apply(r,n),t=-1===[2,3].indexOf(i.container.styles.position),0!==i.container.styles.overflowX){var s=a_(i.curves),o=l_(i.curves);d_(s,o)||r.unshift(new c_(o,6))}}else r.unshift.apply(r,n);i=i.parent}return r.filter((function(t){return Tg(t.target,e)}))},e}(),g_=function(e,t,i,r){e.container.elements.forEach((function(n){var s=Tg(n.flags,4),o=Tg(n.flags,2),a=new f_(n,e);Tg(n.styles.display,2048)&&r.push(a);var l=Tg(n.flags,8)?[]:r;if(s||o){var u=s||n.styles.isPositioned()?i:t,c=new p_(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var h=n.styles.zIndex.order;if(h<0){var A=0;u.negativeZIndex.some((function(e,t){return h>e.element.container.styles.zIndex.order?(A=t,!1):A>0})),u.negativeZIndex.splice(A,0,c)}else if(h>0){var d=0;u.positiveZIndex.some((function(e,t){return h>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0})),u.positiveZIndex.splice(d,0,c)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?u.nonPositionedFloats.push(c):u.nonPositionedInlineLevel.push(c);g_(a,c,s?c:i,l)}else n.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),g_(a,t,i,l);Tg(n.flags,8)&&m_(n,l)}))},m_=function(e,t){for(var i=e instanceof Fm?e.start:1,r=e instanceof Fm&&e.reversed,n=0;n<t.length;n++){var s=t[n];s.container instanceof Tm&&"number"==typeof s.container.value&&0!==s.container.value&&(i=s.container.value),s.listValue=Mv(i,s.container.styles.listStyleType,!0),i+=r?-1:1}},v_=function(e,t){switch(t){case 0:return y_(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return y_(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return y_(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return y_(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},__=function(e,t){var i=[];return n_(e)?i.push(e.subdivide(.5,!1)):i.push(e),n_(t)?i.push(t.subdivide(.5,!0)):i.push(t),i},y_=function(e,t,i,r){var n=[];return n_(e)?n.push(e.subdivide(.5,!1)):n.push(e),n_(i)?n.push(i.subdivide(.5,!0)):n.push(i),n_(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),n_(t)?n.push(t.subdivide(.5,!1).reverse()):n.push(t),n},b_=function(e){var t=e.bounds,i=e.styles;return t.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},w_=function(e){var t=e.styles,i=e.bounds,r=Cp(t.paddingLeft,i.width),n=Cp(t.paddingRight,i.width),s=Cp(t.paddingTop,i.width),o=Cp(t.paddingBottom,i.width);return i.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+n),-(t.borderTopWidth+t.borderBottomWidth+s+o))},x_=function(e,t,i){var r=function(e,t){return 0===e?t.bounds:2===e?w_(t):b_(t)}(M_(e.styles.backgroundOrigin,t),e),n=function(e,t){return 0===e?t.bounds:2===e?w_(t):b_(t)}(M_(e.styles.backgroundClip,t),e),s=C_(M_(e.styles.backgroundSize,t),i,r),o=s[0],a=s[1],l=Pp(M_(e.styles.backgroundPosition,t),r.width-o,r.height-a);return[k_(M_(e.styles.backgroundRepeat,t),l,s,r,n),Math.round(r.left+l[0]),Math.round(r.top+l[1]),o,a]},B_=function(e){return Ap(e)&&e.value===uf.AUTO},P_=function(e){return"number"==typeof e},C_=function(e,t,i){var r=t[0],n=t[1],s=t[2],o=e[0],a=e[1];if(!o)return[0,0];if(yp(o)&&a&&yp(a))return[Cp(o,i.width),Cp(a,i.height)];var l=P_(s);if(Ap(o)&&(o.value===uf.CONTAIN||o.value===uf.COVER))return P_(s)?i.width/i.height<s!=(o.value===uf.COVER)?[i.width,i.width/s]:[i.height*s,i.height]:[i.width,i.height];var u=P_(r),c=P_(n),h=u||c;if(B_(o)&&(!a||B_(a)))return u&&c?[r,n]:l||h?h&&l?[u?r:n*s,c?n:r/s]:[u?r:i.width,c?n:i.height]:[i.width,i.height];if(l){var A=0,d=0;return yp(o)?A=Cp(o,i.width):yp(a)&&(d=Cp(a,i.height)),B_(o)?A=d*s:a&&!B_(a)||(d=A/s),[A,d]}var p=null,f=null;if(yp(o)?p=Cp(o,i.width):a&&yp(a)&&(f=Cp(a,i.height)),null===p||a&&!B_(a)||(f=u&&c?p/r*n:i.height),null!==f&&B_(o)&&(p=u&&c?f/n*r:i.width),null!==p&&null!==f)return[p,f];throw new Error("Unable to calculate background-size for element")},M_=function(e,t){var i=e[t];return void 0===i?e[0]:i},k_=function(e,t,i,r,n){var s=t[0],o=t[1],a=i[0],l=i[1];switch(e){case 2:return[new t_(Math.round(r.left),Math.round(r.top+o)),new t_(Math.round(r.left+r.width),Math.round(r.top+o)),new t_(Math.round(r.left+r.width),Math.round(l+r.top+o)),new t_(Math.round(r.left),Math.round(l+r.top+o))];case 3:return[new t_(Math.round(r.left+s),Math.round(r.top)),new t_(Math.round(r.left+s+a),Math.round(r.top)),new t_(Math.round(r.left+s+a),Math.round(r.height+r.top)),new t_(Math.round(r.left+s),Math.round(r.height+r.top))];case 1:return[new t_(Math.round(r.left+s),Math.round(r.top+o)),new t_(Math.round(r.left+s+a),Math.round(r.top+o)),new t_(Math.round(r.left+s+a),Math.round(r.top+o+l)),new t_(Math.round(r.left+s),Math.round(r.top+o+l))];default:return[new t_(Math.round(n.left),Math.round(n.top)),new t_(Math.round(n.left+n.width),Math.round(n.top)),new t_(Math.round(n.left+n.width),Math.round(n.height+n.top)),new t_(Math.round(n.left),Math.round(n.height+n.top))]}},E_="Hidden Text",S_=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var i=this._document.createElement("div"),r=this._document.createElement("img"),n=this._document.createElement("span"),s=this._document.body;i.style.visibility="hidden",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",s.appendChild(i),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode(E_)),i.appendChild(n),i.appendChild(r);var o=r.offsetTop-n.offsetTop+2;i.removeChild(n),i.appendChild(this._document.createTextNode(E_)),i.style.lineHeight="normal",r.style.verticalAlign="super";var a=r.offsetTop-i.offsetTop+2;return s.removeChild(i),{baseline:o,middle:a}},e.prototype.getMetrics=function(e,t){var i=e+" "+t;return void 0===this._data[i]&&(this._data[i]=this.parseMetrics(e,t)),this._data[i]},e}(),T_=function(e,t){this.context=e,this.options=t},F_=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._activeEffects=[],r.canvas=i.canvas?i.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),i.canvas||(r.canvas.width=Math.floor(i.width*i.scale),r.canvas.height=Math.floor(i.height*i.scale),r.canvas.style.width=i.width+"px",r.canvas.style.height=i.height+"px"),r.fontMetrics=new S_(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-i.x,-i.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),r}return wA(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),A_(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return BA(this,void 0,void 0,(function(){return PA(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.renderNode=function(e){return BA(this,void 0,void 0,(function(){return PA(this,(function(t){switch(t.label){case 0:return Tg(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.renderTextWithLetterSpacing=function(e,t,i){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i):ym(e.text).reduce((function(t,n){return r.ctx.fillText(n,t,e.bounds.top+i),t+r.ctx.measureText(n).width}),e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),i=L_(e.fontFamily).join(", "),r=cp(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,i].join(" "),i,r]},t.prototype.renderTextNode=function(e,t){return BA(this,void 0,void 0,(function(){var i,r,n,s,o,a,l,u,c=this;return PA(this,(function(h){return i=this.createFontStyle(t),r=i[0],n=i[1],s=i[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(n,s),a=o.baseline,l=o.middle,u=t.paintOrder,e.textBounds.forEach((function(e){u.forEach((function(i){switch(i){case 0:c.ctx.fillStyle=Rp(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,a);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(i){c.ctx.shadowColor=Rp(i.color),c.ctx.shadowOffsetX=i.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=i.offsetY.number*c.options.scale,c.ctx.shadowBlur=i.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,a)})),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=Rp(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+a),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+l),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=Rp(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+a)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}}))})),[2]}))}))},t.prototype.renderReplacedElement=function(e,t,i){if(i&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=w_(e),n=l_(t);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return BA(this,void 0,void 0,(function(){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_;return PA(this,(function(y){switch(y.label){case 0:this.applyEffects(e.getEffects(4)),i=e.container,r=e.curves,n=i.styles,s=0,o=i.textNodes,y.label=1;case 1:return s<o.length?(a=o[s],[4,this.renderTextNode(a,n)]):[3,4];case 2:y.sent(),y.label=3;case 3:return s++,[3,1];case 4:if(!(i instanceof km))return[3,8];y.label=5;case 5:return y.trys.push([5,7,,8]),[4,this.context.cache.match(i.src)];case 6:return g=y.sent(),this.renderReplacedElement(i,r,g),[3,8];case 7:return y.sent(),this.context.logger.error("Error loading image "+i.src),[3,8];case 8:if(i instanceof Em&&this.renderReplacedElement(i,r,i.canvas),!(i instanceof Sm))return[3,12];y.label=9;case 9:return y.trys.push([9,11,,12]),[4,this.context.cache.match(i.svg)];case 10:return g=y.sent(),this.renderReplacedElement(i,r,g),[3,12];case 11:return y.sent(),this.context.logger.error("Error loading svg "+i.svg.substring(0,255)),[3,12];case 12:return i instanceof Qm&&i.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}).render(i.tree)]:[3,14];case 13:l=y.sent(),i.width&&i.height&&this.ctx.drawImage(l,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height),y.label=14;case 14:if(i instanceof Um&&(u=Math.min(i.bounds.width,i.bounds.height),i.type===Rm?i.checked&&(this.ctx.save(),this.path([new t_(i.bounds.left+.39363*u,i.bounds.top+.79*u),new t_(i.bounds.left+.16*u,i.bounds.top+.5549*u),new t_(i.bounds.left+.27347*u,i.bounds.top+.44071*u),new t_(i.bounds.left+.39694*u,i.bounds.top+.5649*u),new t_(i.bounds.left+.72983*u,i.bounds.top+.23*u),new t_(i.bounds.left+.84*u,i.bounds.top+.34085*u),new t_(i.bounds.left+.39363*u,i.bounds.top+.79*u)]),this.ctx.fillStyle=Rp(jm),this.ctx.fill(),this.ctx.restore()):i.type===Om&&i.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(i.bounds.left+u/2,i.bounds.top+u/2,u/4,0,2*Math.PI,!0),this.ctx.fillStyle=Rp(jm),this.ctx.fill(),this.ctx.restore())),I_(i)&&i.value.length){switch(c=this.createFontStyle(n),v=c[0],h=c[1],A=this.fontMetrics.getMetrics(v,h).baseline,this.ctx.font=v,this.ctx.fillStyle=Rp(n.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=R_(i.styles.textAlign),_=w_(i),d=0,i.styles.textAlign){case 1:d+=_.width/2;break;case 2:d+=_.width}p=_.add(d,0,0,-_.height/2+1),this.ctx.save(),this.path([new t_(_.left,_.top),new t_(_.left+_.width,_.top),new t_(_.left+_.width,_.top+_.height),new t_(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new mm(i.value,p),n.letterSpacing,A),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Tg(i.styles.display,2048))return[3,20];if(null===i.styles.listStyleImage)return[3,19];if(0!==(f=i.styles.listStyleImage).type)return[3,18];g=void 0,m=f.url,y.label=15;case 15:return y.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return g=y.sent(),this.ctx.drawImage(g,i.bounds.left-(g.width+10),i.bounds.top),[3,18];case 17:return y.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==i.styles.listStyleType&&(v=this.createFontStyle(n)[0],this.ctx.font=v,this.ctx.fillStyle=Rp(n.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new MA(i.bounds.left,i.bounds.top+Cp(i.styles.paddingTop,i.bounds.width),i.bounds.width,Xf(n.lineHeight,n.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new mm(e.listValue,_),n.letterSpacing,Xf(n.lineHeight,n.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),y.label=20;case 20:return[2]}}))}))},t.prototype.renderStackContent=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s,o,a,l,u,c,h,A,d,p,f;return PA(this,(function(g){switch(g.label){case 0:return Tg(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,i=e.negativeZIndex,g.label=2;case 2:return t<i.length?(f=i[t],[4,this.renderStack(f)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),r=0,n=e.nonInlineLevel,g.label=7;case 7:return r<n.length?(f=n[r],[4,this.renderNode(f)]):[3,10];case 8:g.sent(),g.label=9;case 9:return r++,[3,7];case 10:s=0,o=e.nonPositionedFloats,g.label=11;case 11:return s<o.length?(f=o[s],[4,this.renderStack(f)]):[3,14];case 12:g.sent(),g.label=13;case 13:return s++,[3,11];case 14:a=0,l=e.nonPositionedInlineLevel,g.label=15;case 15:return a<l.length?(f=l[a],[4,this.renderStack(f)]):[3,18];case 16:g.sent(),g.label=17;case 17:return a++,[3,15];case 18:u=0,c=e.inlineLevel,g.label=19;case 19:return u<c.length?(f=c[u],[4,this.renderNode(f)]):[3,22];case 20:g.sent(),g.label=21;case 21:return u++,[3,19];case 22:h=0,A=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return h<A.length?(f=A[h],[4,this.renderStack(f)]):[3,26];case 24:g.sent(),g.label=25;case 25:return h++,[3,23];case 26:d=0,p=e.positiveZIndex,g.label=27;case 27:return d<p.length?(f=p[d],[4,this.renderStack(f)]):[3,30];case 28:g.sent(),g.label=29;case 29:return d++,[3,27];case 30:return[2]}}))}))},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach((function(e,i){var r=n_(e)?e.start:e;0===i?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),n_(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},t.prototype.renderRepeat=function(e,t,i,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(i,r),this.ctx.fill(),this.ctx.translate(-i,-r)},t.prototype.resizeImage=function(e,t,i){var r;if(e.width===t&&e.height===i)return e;var n=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return n.width=Math.max(1,t),n.height=Math.max(1,i),n.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,i),n},t.prototype.renderBackgroundImage=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s,o;return PA(this,(function(a){switch(a.label){case 0:t=e.styles.backgroundImage.length-1,i=function(i){var n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E,S,T,F,I,D;return PA(this,(function(R){switch(R.label){case 0:if(0!==i.type)return[3,5];n=void 0,s=i.url,R.label=1;case 1:return R.trys.push([1,3,,4]),[4,r.context.cache.match(s)];case 2:return n=R.sent(),[3,4];case 3:return R.sent(),r.context.logger.error("Error loading background-image "+s),[3,4];case 4:return n&&(o=x_(e,t,[n.width,n.height,n.width/n.height]),_=o[0],P=o[1],C=o[2],w=o[3],x=o[4],m=r.ctx.createPattern(r.resizeImage(n,w,x),"repeat"),r.renderRepeat(_,m,P,C)),[3,6];case 5:1===i.type?(a=x_(e,t,[null,null,null]),_=a[0],P=a[1],C=a[2],w=a[3],x=a[4],l=Xp(i.angle,w,x),u=l[0],c=l[1],h=l[2],A=l[3],d=l[4],(p=document.createElement("canvas")).width=w,p.height=x,f=p.getContext("2d"),g=f.createLinearGradient(c,A,h,d),Kp(i.stops,u).forEach((function(e){return g.addColorStop(e.stop,Rp(e.color))})),f.fillStyle=g,f.fillRect(0,0,w,x),w>0&&x>0&&(m=r.ctx.createPattern(p,"repeat"),r.renderRepeat(_,m,P,C))):function(e){return 2===e.type}(i)&&(v=x_(e,t,[null,null,null]),_=v[0],y=v[1],b=v[2],w=v[3],x=v[4],B=0===i.position.length?[xp]:i.position,P=Cp(B[0],w),C=Cp(B[B.length-1],x),M=function(e,t,i,r,n){var s=0,o=0;switch(e.size){case 0:0===e.shape?s=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-n)):1===e.shape&&(s=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(i),Math.abs(i-n)));break;case 2:if(0===e.shape)s=o=Math.min(qp(t,i),qp(t,i-n),qp(t-r,i),qp(t-r,i-n));else if(1===e.shape){var a=Math.min(Math.abs(i),Math.abs(i-n))/Math.min(Math.abs(t),Math.abs(t-r)),l=Yp(r,n,t,i,!0),u=l[0],c=l[1];o=a*(s=qp(u-t,(c-i)/a))}break;case 1:0===e.shape?s=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-n)):1===e.shape&&(s=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(i),Math.abs(i-n)));break;case 3:if(0===e.shape)s=o=Math.max(qp(t,i),qp(t,i-n),qp(t-r,i),qp(t-r,i-n));else if(1===e.shape){a=Math.max(Math.abs(i),Math.abs(i-n))/Math.max(Math.abs(t),Math.abs(t-r));var h=Yp(r,n,t,i,!1);u=h[0],c=h[1],o=a*(s=qp(u-t,(c-i)/a))}}return Array.isArray(e.size)&&(s=Cp(e.size[0],r),o=2===e.size.length?Cp(e.size[1],n):s),[s,o]}(i,P,C,w,x),k=M[0],E=M[1],k>0&&E>0&&(S=r.ctx.createRadialGradient(y+P,b+C,0,y+P,b+C,k),Kp(i.stops,2*k).forEach((function(e){return S.addColorStop(e.stop,Rp(e.color))})),r.path(_),r.ctx.fillStyle=S,k!==E?(T=e.bounds.left+.5*e.bounds.width,F=e.bounds.top+.5*e.bounds.height,D=1/(I=E/k),r.ctx.save(),r.ctx.translate(T,F),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-T,-F),r.ctx.fillRect(y,D*(b-F)+F,w,x*D),r.ctx.restore()):r.ctx.fill())),R.label=6;case 6:return t--,[2]}}))},r=this,n=0,s=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return n<s.length?(o=s[n],[5,i(o)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.renderSolidBorder=function(e,t,i){return BA(this,void 0,void 0,(function(){return PA(this,(function(r){return this.path(v_(i,t)),this.ctx.fillStyle=Rp(e),this.ctx.fill(),[2]}))}))},t.prototype.renderDoubleBorder=function(e,t,i,r){return BA(this,void 0,void 0,(function(){var n,s;return PA(this,(function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,i,r)]:[3,2];case 1:return o.sent(),[2];case 2:return n=function(e,t){switch(t){case 0:return y_(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return y_(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return y_(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return y_(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,i),this.path(n),this.ctx.fillStyle=Rp(e),this.ctx.fill(),s=function(e,t){switch(t){case 0:return y_(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return y_(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return y_(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return y_(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,i),this.path(s),this.ctx.fill(),[2]}}))}))},t.prototype.renderNodeBackgroundAndBorders=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s,o,a,l,u=this;return PA(this,(function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,i=!Dp(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],n=D_(M_(t.backgroundClip,0),e.curves),i||t.boxShadow.length?(this.ctx.save(),this.path(n),this.ctx.clip(),Dp(t.backgroundColor)||(this.ctx.fillStyle=Rp(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){u.ctx.save();var i,r,n,s,o,a=a_(e.curves),l=t.inset?0:1e4,c=(i=a,r=-l+(t.inset?1:-1)*t.spread.number,n=(t.inset?1:-1)*t.spread.number,s=t.spread.number*(t.inset?-2:2),o=t.spread.number*(t.inset?-2:2),i.map((function(e,t){switch(t){case 0:return e.add(r,n);case 1:return e.add(r+s,n);case 2:return e.add(r+s,n+o);case 3:return e.add(r,n+o)}return e})));t.inset?(u.path(a),u.ctx.clip(),u.mask(c)):(u.mask(a),u.ctx.clip(),u.path(c)),u.ctx.shadowOffsetX=t.offsetX.number+l,u.ctx.shadowOffsetY=t.offsetY.number,u.ctx.shadowColor=Rp(t.color),u.ctx.shadowBlur=t.blur.number,u.ctx.fillStyle=t.inset?Rp(t.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()})),c.label=2;case 2:s=0,o=0,a=r,c.label=3;case 3:return o<a.length?0!==(l=a[o]).style&&!Dp(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,s,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,s,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,s,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,s,e.curves)];case 10:c.sent(),c.label=11;case 11:s++,c.label=12;case 12:return o++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,i,r,n){return BA(this,void 0,void 0,(function(){var s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y;return PA(this,(function(b){return this.ctx.save(),s=function(e,t){switch(t){case 0:return __(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return __(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return __(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return __(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,i),o=v_(r,i),2===n&&(this.path(o),this.ctx.clip()),n_(o[0])?(a=o[0].start.x,l=o[0].start.y):(a=o[0].x,l=o[0].y),n_(o[1])?(u=o[1].end.x,c=o[1].end.y):(u=o[1].x,c=o[1].y),h=0===i||2===i?Math.abs(a-u):Math.abs(l-c),this.ctx.beginPath(),3===n?this.formatPath(s):this.formatPath(o.slice(0,2)),A=t<3?3*t:2*t,d=t<3?2*t:t,3===n&&(A=t,d=t),p=!0,h<=2*A?p=!1:h<=2*A+d?(A*=f=h/(2*A+d),d*=f):(g=Math.floor((h+d)/(A+d)),m=(h-g*A)/(g-1),d=(v=(h-(g+1)*A)/g)<=0||Math.abs(d-m)<Math.abs(d-v)?m:v),p&&(3===n?this.ctx.setLineDash([0,A+d]):this.ctx.setLineDash([A,d])),3===n?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=Rp(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===n&&(n_(o[0])&&(_=o[3],y=o[0],this.ctx.beginPath(),this.formatPath([new t_(_.end.x,_.end.y),new t_(y.start.x,y.start.y)]),this.ctx.stroke()),n_(o[1])&&(_=o[1],y=o[2],this.ctx.beginPath(),this.formatPath([new t_(_.end.x,_.end.y),new t_(y.start.x,y.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},t.prototype.render=function(e){return BA(this,void 0,void 0,(function(){var t;return PA(this,(function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Rp(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=new f_(e,null),n=new p_(r),g_(r,n,n,s=[]),m_(r.container,s),t=n,[4,this.renderStack(t)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}var r,n,s}))}))},t}(T_),I_=function(e){return e instanceof Vm||(e instanceof Nm||e instanceof Um&&e.type!==Om&&e.type!==Rm)},D_=function(e,t){switch(e){case 0:return a_(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return l_(t)}},R_=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},O_=["-apple-system","system-ui"],L_=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===O_.indexOf(e)})):e},j_=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.canvas=i.canvas?i.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=i,r.canvas.width=Math.floor(i.width*i.scale),r.canvas.height=Math.floor(i.height*i.scale),r.canvas.style.width=i.width+"px",r.canvas.style.height=i.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-i.x,-i.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),r}return wA(t,e),t.prototype.render=function(e){return BA(this,void 0,void 0,(function(){var t,i;return PA(this,(function(r){switch(r.label){case 0:return t=pm(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,U_(t)];case 1:return i=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Rp(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},t}(T_),U_=function(e){return new Promise((function(t,i){var r=new Image;r.onload=function(){t(r)},r.onerror=i,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},N_=function(){function e(e){var t=e.id,i=e.enabled;this.id=t,this.enabled=i,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,CA([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,CA([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,CA([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,CA([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),V_=function(){function e(t,i){var r;this.windowBounds=i,this.instanceName="#"+e.instanceCount++,this.logger=new N_({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new Wv(this,t)}return e.instanceCount=1,e}(),Q_=function(e,t){return void 0===t&&(t={}),H_(e,t)};"undefined"!=typeof window&&zv.setContext(window);var H_=function(e,t){return BA(void 0,void 0,void 0,(function(){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,x,B,P,C,M,k,E,S,T,F,I,D,R,O,L,j,U,N;return PA(this,(function(V){switch(V.label){case 0:if(!e||"object"!==w(e))return[2,Promise.reject("Invalid element provided as first argument")];if(!(i=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=i.defaultView))throw new Error("Document is not attached to a Window");return n={allowTaint:null!==(B=t.allowTaint)&&void 0!==B&&B,imageTimeout:null!==(P=t.imageTimeout)&&void 0!==P?P:15e3,proxy:t.proxy,useCORS:null!==(C=t.useCORS)&&void 0!==C&&C},s=xA({logging:null===(M=t.logging)||void 0===M||M,cache:t.cache},n),o={windowWidth:null!==(k=t.windowWidth)&&void 0!==k?k:r.innerWidth,windowHeight:null!==(E=t.windowHeight)&&void 0!==E?E:r.innerHeight,scrollX:null!==(S=t.scrollX)&&void 0!==S?S:r.pageXOffset,scrollY:null!==(T=t.scrollY)&&void 0!==T?T:r.pageYOffset},a=new MA(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),l=new V_(s,a),u=null!==(F=t.foreignObjectRendering)&&void 0!==F&&F,c={allowTaint:null!==(I=t.allowTaint)&&void 0!==I&&I,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new Ev(l,e,c),(A=h.clonedReferenceElement)?[4,h.toIFrame(i,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=V.sent(),p=rv(A)||function(e){return"HTML"===e.tagName}(A)?function(e){var t=e.body,i=e.documentElement;if(!t||!i)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,i.scrollWidth),Math.max(t.offsetWidth,i.offsetWidth),Math.max(t.clientWidth,i.clientWidth)),n=Math.max(Math.max(t.scrollHeight,i.scrollHeight),Math.max(t.offsetHeight,i.offsetHeight),Math.max(t.clientHeight,i.clientHeight));return new MA(0,0,r,n)}(A.ownerDocument):kA(l,A),f=p.width,g=p.height,m=p.left,v=p.top,_=G_(l,A,t.backgroundColor),y={canvas:t.canvas,backgroundColor:_,scale:null!==(R=null!==(D=t.scale)&&void 0!==D?D:r.devicePixelRatio)&&void 0!==R?R:1,x:(null!==(O=t.x)&&void 0!==O?O:0)+m,y:(null!==(L=t.y)&&void 0!==L?L:0)+v,width:null!==(j=t.width)&&void 0!==j?j:Math.ceil(f),height:null!==(U=t.height)&&void 0!==U?U:Math.ceil(g)},u?(l.logger.debug("Document cloned, using foreign object rendering"),[4,new j_(l,y).render(A)]):[3,3];case 2:return b=V.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+m+","+v+" with size "+f+"x"+g+" using computed rendering"),l.logger.debug("Starting DOM parsing"),x=Wm(l,A),_===x.styles.backgroundColor&&(x.styles.backgroundColor=Hp.TRANSPARENT),l.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),[4,new F_(l,y).render(x)];case 4:b=V.sent(),V.label=5;case 5:return(null===(N=t.removeContainer)||void 0===N||N)&&(Ev.destroy(d)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,b]}}))}))},G_=function(e,t,i){var r=t.ownerDocument,n=r.documentElement?Qp(e,getComputedStyle(r.documentElement).backgroundColor):Hp.TRANSPARENT,s=r.body?Qp(e,getComputedStyle(r.body).backgroundColor):Hp.TRANSPARENT,o="string"==typeof i?Qp(e,i):null===i?Hp.TRANSPARENT:4294967295;return t===r.documentElement?Dp(n)?Dp(s)?o:s:n:o};function z_(e,t,i){var r=e.getBoundingClientRect(),n=t.getBoundingClientRect();i[0]+=r.left-n.left,i[1]+=r.top-n.top}var W_=function(){return P((function e(t){var i=this;x(this,e),this.container=t.viewerElement,this.language="en",this.localeService=t.localeService||new yh,this.scene=new zi(this,{canvasId:t.canvasId,canvasElement:t.canvasElement,keyboardEventsElement:t.keyboardEventsElement,contextAttr:{preserveDrawingBuffer:!1!==t.preserveDrawingBuffer,premultipliedAlpha:!!t.premultipliedAlpha,antialias:!1!==t.antialias},spinnerElementId:t.spinnerElementId,transparent:!1!==t.transparent,gammaInput:!0,gammaOutput:!1,backgroundColor:t.backgroundColor,backgroundColorFromAmbientLight:t.backgroundColorFromAmbientLight,ticksPerRender:1,ticksPerOcclusionTest:20,units:t.units,scale:t.scale,origin:t.origin,lightIntensity:t.lightIntensity,saoEnabled:t.saoEnabled,alphaDepthMask:!1!==t.alphaDepthMask,entityOffsetsEnabled:!!t.entityOffsetsEnabled,pickSurfacePrecisionEnabled:!!t.pickSurfacePrecisionEnabled,readableGeometryEnabled:!!t.readableGeometryEnabled,logarithmicDepthBufferEnabled:!!t.logarithmicDepthBufferEnabled,pbrEnabled:!!t.pbrEnabled,colorTextureEnabled:!1!==t.colorTextureEnabled,dtxEnabled:!!t.dtxEnabled,edgesEnabled:t.edgesEnabled,markerZOffset:t.markerZOffset,numCachedSectionPlanes:t.numCachedSectionPlanes,lodEnabled:!!t.lodEnabled,resolutionScale:t.resolutionScale,offset:t.offset,worldAxis:t.worldAxis}),this.metaScene=new _A(this,this.scene),this.id=t.id||this.scene.id,this.camera=this.scene.camera,this.cameraFlight=new kh(this.scene,{duration:.5}),this.cameraControl=new fA(this.scene,{snapRadius:t.snapRadius,doublePickFlyTo:!0}),this.scene.canvas.on("boundary",(function(e){i.cameraControl.updatePivotElement()})),this._plugins=[],this._eventSubs={}}),[{key:"capabilities",get:function(){return this.scene.capabilities}},{key:"on",value:function(e,t){var i=this._eventSubs[e];i||(i=[],this._eventSubs[e]=i),i.push(t)}},{key:"fire",value:function(e,t){var i=this._eventSubs[e];if(i)for(var r=0,n=i.length;r<n;r++)i[r](t)}},{key:"off",value:function(e){}},{key:"log",value:function(e){console.log("[xtctwins viewer ".concat(this.id,"]: ").concat(e))}},{key:"error",value:function(e){console.error("[xtctwins viewer ".concat(this.id,"]: ").concat(e))}},{key:"addPlugin",value:function(e){this._plugins.push(e)}},{key:"removePlugin",value:function(e){for(var t=0,i=this._plugins.length;t<i;t++){var r=this._plugins[t];if(r===e)return r.clear&&r.clear(),void this._plugins.splice(t,1)}}},{key:"sendToPlugins",value:function(e,t){for(var i=0,r=this._plugins.length;i<r;i++){var n=this._plugins[i];n.send&&n.send(e,t)}}},{key:"clear",value:function(){throw'Viewer#clear() no longer implemented - use \'#sendToPlugins("clear") instead'}},{key:"resetView",value:function(){throw"Viewer#resetView() no longer implemented - use CameraMemento & ObjectsMemento classes instead"}},{key:"beginSnapshot",value:function(){this._snapshotBegun||(this.scene._renderer.beginSnapshot(),this._snapshotBegun=!0)}},{key:"getSnapshot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!this._snapshotBegun,i=void 0!==e.width&&void 0!==e.height,r=this.scene.canvas.canvas,n=r.clientWidth,s=r.clientHeight,o=e.width?Math.floor(e.width):r.width,a=e.height?Math.floor(e.height):r.height;i&&(r.width=o,r.height=a),this._snapshotBegun||this.beginSnapshot({width:o,height:a}),e.includeGizmos||this.sendToPlugins("snapshotStarting");for(var l={},u=0,c=this._plugins.length;u<c;u++){var h=this._plugins[u];if(h.getContainerElement){var A=h.getContainerElement();A!==document.body&&(l[A.id]||(l[A.id]=!0,Q_(A).then((function(e){document.body.appendChild(e),setTimeout((function(){document.body.removeChild(e)}),200)}))))}}this.scene.fire("rendering",{},!0),this.scene._renderer.renderSnapshot();var d=this.scene._renderer.readSnapshot(e);return i&&(r.width=n,r.height=s,this.scene.glRedraw()),e.includeGizmos||this.sendToPlugins("snapshotFinished"),t&&this.endSnapshot(),d}},{key:"getSnapshotWithPlugins",value:(e=a(s().mark((function e(){var t,i,r,n,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=x.length>0&&void 0!==x[0]?x[0]:{},i=!this._snapshotBegun,r=void 0!==t.width&&void 0!==t.height,n=this.scene.canvas.canvas,o=n.clientWidth,a=n.clientHeight,l=t.width?Math.floor(t.width):n.width,u=t.height?Math.floor(t.height):n.height,r&&(n.width=l,n.height=u),this._snapshotBegun||this.beginSnapshot(),t.includeGizmos||this.sendToPlugins("snapshotStarting"),this.scene._renderer.renderSnapshot(),c=this.scene._renderer.readSnapshotAsCanvas(),r&&(n.width=o,n.height=a,this.scene.glRedraw()),h={},A=[],d=0,p=this._plugins.length;d<p;d++)(f=this._plugins[d]).getContainerElement&&(g=f.getContainerElement())!==document.body&&(h[g.id]||(h[g.id]=!0,A.push(g)));m=0,v=A.length;case 18:if(!(m<v)){e.next=28;break}return _=A[m],y=0==m?c.width/_.clientWidth:1,b=Y.vec2([0,0]),z_(n,_,b),e.next=25,Q_(_,{canvas:c,backgroundColor:null,x:b[0],y:b[1],scale:y});case 25:m++,e.next=18;break;case 28:return t.includeGizmos||this.sendToPlugins("snapshotFinished"),i&&this.endSnapshot(),"jpeg"!==(w=t.format||"png")&&"png"!==w&&"bmp"!==w&&(console.error("Unsupported image format: '"+w+"' - supported types are 'jpeg', 'bmp' and 'png' - defaulting to 'png'"),w="png"),t.includeGizmos||this.sendToPlugins("snapshotFinished"),i&&this.endSnapshot(),e.abrupt("return",c.toDataURL("image/".concat(w)));case 35:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"endSnapshot",value:function(){this._snapshotBegun&&(this.scene._renderer.endSnapshot(),this.scene._renderer.render({force:!0}),this._snapshotBegun=!1)}},{key:"destroy",value:function(e){var t=this._plugins.slice();if(t.length>0)for(var i=0,r=t.length;i<r;i++){t[i].destroy()}this.cameraControl.destroy(),this.scene.destroy(e)}}]);var e}();function K_(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var X_=Boolean("object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser),q_="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);q_&&parseFloat(q_[1]);function Y_(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}var J_="object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser,Z_="undefined"!=typeof window&&void 0!==window.orientation,$_="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);function ey(e){return ey="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},ey(e)}function ty(e){var t=function(e,t){if("object"!=ey(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=ey(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ey(t)?t:String(t)}function iy(e,t,i){return(t=ty(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}$_&&parseFloat($_[1]);var ry=function(){return P((function e(t,i){var r=this;x(this,e),iy(this,"name",void 0),iy(this,"workerThread",void 0),iy(this,"isRunning",!0),iy(this,"result",void 0),iy(this,"_resolve",(function(){})),iy(this,"_reject",(function(){})),this.name=t,this.workerThread=i,this.result=new Promise((function(e,t){r._resolve=e,r._reject=t}))}),[{key:"postMessage",value:function(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}},{key:"done",value:function(e){Y_(this.isRunning),this.isRunning=!1,this._resolve(e)}},{key:"error",value:function(e){Y_(this.isRunning),this.isRunning=!1,this._reject(e)}}])}(),ny=function(){return P((function e(){x(this,e)}),[{key:"terminate",value:function(){}}])}(),sy=new Map;function oy(e){Y_(e.source&&!e.url||!e.source&&e.url);var t=sy.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return ay((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),sy.set(e.url,t)),e.source&&(t=ay(e.source),sy.set(e.source,t))),Y_(t),t}function ay(e){var t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function ly(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=i||new Set;if(e){if(uy(e))r.add(e);else if(uy(e.buffer))r.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"===w(e))for(var n in e)ly(e[n],t,r)}else;return void 0===i?Array.from(r):[]}function uy(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var cy=function(){},hy=function(){return P((function e(t){x(this,e),iy(this,"name",void 0),iy(this,"source",void 0),iy(this,"url",void 0),iy(this,"terminated",!1),iy(this,"worker",void 0),iy(this,"onMessage",void 0),iy(this,"onError",void 0),iy(this,"_loadableURL","");var i=t.name,r=t.source,n=t.url;Y_(r||n),this.name=i,this.source=r,this.url=n,this.onMessage=cy,this.onError=function(e){return console.log(e)},this.worker=J_?this._createBrowserWorker():this._createNodeWorker()}),[{key:"destroy",value:function(){this.onMessage=cy,this.onError=cy,this.worker.terminate(),this.terminated=!0}},{key:"isRunning",get:function(){return Boolean(this.onMessage)}},{key:"postMessage",value:function(e,t){t=t||ly(e),this.worker.postMessage(e,t)}},{key:"_getErrorFromErrorEvent",value:function(e){var t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}},{key:"_createBrowserWorker",value:function(){var e=this;this._loadableURL=oy({source:this.source,url:this.url});var t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=function(t){t.data?e.onMessage(t.data):e.onError(new Error("No data received"))},t.onerror=function(t){e.onError(e._getErrorFromErrorEvent(t)),e.terminated=!0},t.onmessageerror=function(e){return console.error(e)},t}},{key:"_createNodeWorker",value:function(){var e,t=this;if(this.url){var i=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new ny(i,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new ny(this.source,{eval:!0})}return e.on("message",(function(e){t.onMessage(e)})),e.on("error",(function(e){t.onError(e)})),e.on("exit",(function(e){})),e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof Worker&&J_||void 0!==ny&&!J_}}])}(),Ay=function(){return P((function e(t){x(this,e),iy(this,"name","unnamed"),iy(this,"source",void 0),iy(this,"url",void 0),iy(this,"maxConcurrency",1),iy(this,"maxMobileConcurrency",1),iy(this,"onDebug",(function(){})),iy(this,"reuseWorkers",!0),iy(this,"props",{}),iy(this,"jobQueue",[]),iy(this,"idleQueue",[]),iy(this,"count",0),iy(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}),[{key:"destroy",value:function(){this.idleQueue.forEach((function(e){return e.destroy()})),this.isDestroyed=!0}},{key:"setProps",value:function(e){this.props=n(n({},this.props),e),void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}},{key:"startJob",value:(t=a(s().mark((function e(t){var i,r,n,o=this,a=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:function(e,t,i){return e.done(i)},r=a.length>2&&void 0!==a[2]?a[2]:function(e,t){return e.error(t)},n=new Promise((function(e){return o.jobQueue.push({name:t,onMessage:i,onError:r,onStart:e}),o})),this._startQueuedJob(),e.next=6,n;case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_startQueuedJob",value:(e=a(s().mark((function e(){var t,i,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.jobQueue.length){e.next=2;break}return e.abrupt("return");case 2:if(t=this._getAvailableWorker()){e.next=5;break}return e.abrupt("return");case 5:if(!(i=this.jobQueue.shift())){e.next=18;break}return this.onDebug({message:"Starting job",name:i.name,workerThread:t,backlog:this.jobQueue.length}),r=new ry(i.name,t),t.onMessage=function(e){return i.onMessage(r,e.type,e.payload)},t.onError=function(e){return i.onError(r,e)},i.onStart(r),e.prev=12,e.next=15,r.result;case 15:return e.prev=15,this.returnWorkerToQueue(t),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[12,,15,18]])}))),function(){return e.apply(this,arguments)})},{key:"returnWorkerToQueue",value:function(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;var e="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new hy({name:e,source:this.source,url:this.url})}return null}},{key:"_getMaxConcurrency",value:function(){return Z_?this.maxMobileConcurrency:this.maxConcurrency}}],[{key:"isSupported",value:function(){return hy.isSupported()}}]);var e,t}(),dy={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:function(){}},py=function(){function e(t){x(this,e),iy(this,"props",void 0),iy(this,"workerPools",new Map),this.props=n({},dy),this.setProps(t),this.workerPools=new Map}return P(e,[{key:"destroy",value:function(){var e,t=u(this.workerPools.values());try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(e){t.e(e)}finally{t.f()}this.workerPools=new Map}},{key:"setProps",value:function(e){this.props=n(n({},this.props),e);var t,i=u(this.workerPools.values());try{for(i.s();!(t=i.n()).done;){t.value.setProps(this._getWorkerPoolProps())}}catch(e){i.e(e)}finally{i.f()}}},{key:"getWorkerPool",value:function(e){var t=e.name,i=e.source,r=e.url,n=this.workerPools.get(t);return n||((n=new Ay({name:t,source:i,url:r})).setProps(this._getWorkerPoolProps()),this.workerPools.set(t,n)),n}},{key:"_getWorkerPoolProps",value:function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}],[{key:"isSupported",value:function(){return hy.isSupported()}},{key:"getWorkerFarm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e._workerFarm=e._workerFarm||new e({}),e._workerFarm.setProps(t),e._workerFarm}}])}();iy(py,"_workerFarm",void 0);function fy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t[e.id]||{},r="".concat(e.id,"-worker.js"),n=i.workerUrl;if(n||"compression"!==e.id||(n=t.workerUrl),"test"===t._workerType&&(n="modules/".concat(e.module,"/dist/").concat(r)),!n){var s=e.version;"latest"===s&&(s="latest");var o=s?"@".concat(s):"";n="https://unpkg.com/@loaders.gl/".concat(e.module).concat(o,"/dist/").concat(r)}return Y_(n),n}function gy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"3.4.15";Y_(e,"no worker provided");var i=e.version;return!(!t||!i)}function my(e,t){return!!py.isSupported()&&(!!(J_||null!=t&&t._nodeWorkers)&&(e.worker&&(null==t?void 0:t.worker)))}function vy(e,t,i,r,n){return _y.apply(this,arguments)}function _y(){return _y=a(s().mark((function e(t,i,r,n,o){var a,l,u,c,h,A;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,l=fy(t,r),u=py.getWorkerFarm(r),c=u.getWorkerPool({name:a,url:l}),r=JSON.parse(JSON.stringify(r)),n=JSON.parse(JSON.stringify(n||{})),e.next=8,c.startJob("process-on-worker",yy.bind(null,o));case 8:return(h=e.sent).postMessage("process",{input:i,options:r,context:n}),e.next=12,h.result;case 12:return A=e.sent,e.next=15,A.result;case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e)}))),_y.apply(this,arguments)}function yy(e,t,i,r){return by.apply(this,arguments)}function by(){return(by=a(s().mark((function e(t,i,r,n){var o,a,l,u,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=r,e.next="done"===e.t0?3:"error"===e.t0?5:"process"===e.t0?7:20;break;case 3:return i.done(n),e.abrupt("break",21);case 5:return i.error(new Error(n.error)),e.abrupt("break",21);case 7:return o=n.id,a=n.input,l=n.options,e.prev=8,e.next=11,t(a,l);case 11:u=e.sent,i.postMessage("done",{id:o,result:u}),e.next=19;break;case 15:e.prev=15,e.t1=e.catch(8),c=e.t1 instanceof Error?e.t1.message:"unknown error",i.postMessage("error",{id:o,error:c});case 19:return e.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(r));case 21:case"end":return e.stop()}}),e,null,[[8,15]])})))).apply(this,arguments)}function wy(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var r,n=t.map((function(e){return e instanceof ArrayBuffer?new Uint8Array(e):e})),s=n.reduce((function(e,t){return e+t.byteLength}),0),o=new Uint8Array(s),a=0,l=u(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;o.set(c,a),a+=c.byteLength}}catch(e){l.e(e)}finally{l.f()}return o.buffer}function xy(e){return By.apply(this,arguments)}function By(){return(By=a(s().mark((function e(t){var i,r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[],r=!1,n=!1,e.prev=3,a=T(t);case 5:return e.next=7,a.next();case 7:if(!(r=!(l=e.sent).done)){e.next=13;break}u=l.value,i.push(u);case 10:r=!1,e.next=5;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(3),n=!0,o=e.t0;case 19:if(e.prev=19,e.prev=20,!r||null==a.return){e.next=24;break}return e.next=24,a.return();case 24:if(e.prev=24,!n){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(19);case 29:return e.abrupt("return",wy.apply(void 0,i));case 30:case"end":return e.stop()}}),e,null,[[3,15,19,29],[20,,24,28]])})))).apply(this,arguments)}var Py={};function Cy(e){for(var t in Py)if(e.startsWith(t)){var i=Py[t];e=e.replace(t,i)}return e.startsWith("http://")||e.startsWith("https://")||(e="".concat("").concat(e)),e}function My(e){if((t=e)&&"object"===w(t)&&t.isBuffer)return e;var t;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"==typeof e){var i=e;return(new TextEncoder).encode(i).buffer}if(e&&"object"===w(e)&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function ky(e){var t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(t+1):""}var Ey=function(e){return"function"==typeof e},Sy=function(e){return null!==e&&"object"===w(e)},Ty=function(e){return Sy(e)&&e.constructor==={}.constructor},Fy=function(e){return e&&"function"==typeof e[Symbol.asyncIterator]},Iy=function(e){return"undefined"!=typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json},Dy=function(e){return"undefined"!=typeof Blob&&e instanceof Blob},Ry=function(e){return function(e){return"undefined"!=typeof ReadableStream&&e instanceof ReadableStream||Sy(e)&&Ey(e.tee)&&Ey(e.cancel)&&Ey(e.getReader)}(e)||function(e){return Sy(e)&&Ey(e.read)&&Ey(e.pipe)&&function(e){return"boolean"==typeof e}(e.readable)}(e)},Oy=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Ly=/^([-\w.]+\/[-\w.+]+)/;function jy(e){var t=Oy.exec(e);return t?t[1]:""}var Uy=/\?.*/;function Ny(e){return e.replace(Uy,"")}function Vy(e){return Iy(e)?e.url:Dy(e)?e.name||"":"string"==typeof e?e:""}function Qy(e){if(Iy(e)){var t=e,i=t.headers.get("content-type")||"",r=Ny(t.url);return function(e){var t=Ly.exec(e);return t?t[1]:e}(i)||jy(r)}return Dy(e)?e.type||"":"string"==typeof e?jy(e):""}function Hy(e){return Iy(e)?e.headers["content-length"]||-1:Dy(e)?e.size:"string"==typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}function Gy(e){return zy.apply(this,arguments)}function zy(){return(zy=a(s().mark((function e(t){var i,r,n,o,a,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Iy(t)){e.next=2;break}return e.abrupt("return",t);case 2:return i={},(r=Hy(t))>=0&&(i["content-length"]=String(r)),n=Vy(t),(o=Qy(t))&&(i["content-type"]=o),e.next=10,Yy(t);case 10:return(a=e.sent)&&(i["x-first-bytes"]=a),"string"==typeof t&&(t=(new TextEncoder).encode(t)),l=new Response(t,{headers:i}),Object.defineProperty(l,"url",{value:n}),e.abrupt("return",l);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wy(e){return Ky.apply(this,arguments)}function Ky(){return(Ky=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=5;break}return e.next=3,Xy(t);case 3:throw i=e.sent,new Error(i);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xy(e){return qy.apply(this,arguments)}function qy(){return(qy=a(s().mark((function e(t){var i,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i="Failed to fetch resource ".concat(t.url," (").concat(t.status,"): "),e.prev=1,r=t.headers.get("Content-Type"),n=t.statusText,!r.includes("application/json")){e.next=11;break}return e.t0=n,e.t1=" ",e.next=9,t.text();case 9:e.t2=e.sent,n=e.t0+=e.t1.concat.call(e.t1,e.t2);case 11:i=(i+=n).length>60?"".concat(i.slice(0,60),"..."):i,e.next=17;break;case 15:e.prev=15,e.t3=e.catch(1);case 17:return e.abrupt("return",i);case 18:case"end":return e.stop()}}),e,null,[[1,15]])})))).apply(this,arguments)}function Yy(e){return Jy.apply(this,arguments)}function Jy(){return(Jy=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=5,"string"!=typeof t){e.next=3;break}return e.abrupt("return","data:,".concat(t.slice(0,i)));case 3:if(!(t instanceof Blob)){e.next=8;break}return r=t.slice(0,5),e.next=7,new Promise((function(e){var t=new FileReader;t.onload=function(t){var i;return e(null==t||null===(i=t.target)||void 0===i?void 0:i.result)},t.readAsDataURL(r)}));case 7:return e.abrupt("return",e.sent);case 8:if(!(t instanceof ArrayBuffer)){e.next=12;break}return n=t.slice(0,i),o=Zy(n),e.abrupt("return","data:base64,".concat(o));case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zy(e){for(var t="",i=new Uint8Array(e),r=0;r<i.byteLength;r++)t+=String.fromCharCode(i[r]);return btoa(t)}function $y(e,t){return eb.apply(this,arguments)}function eb(){return(eb=a(s().mark((function e(t,i){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t){e.next=7;break}return t=Cy(t),r=i,null!=i&&i.fetch&&"function"!=typeof(null==i?void 0:i.fetch)&&(r=i.fetch),e.next=6,fetch(t,r);case 6:case 9:return e.abrupt("return",e.sent);case 7:return e.next=9,Gy(t);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tb(){return!("object"===("undefined"==typeof process?"undefined":w(process))&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"===w(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"===w(process.versions)&&Boolean(process.versions.electron))return!0;var t="object"===("undefined"==typeof navigator?"undefined":w(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent,i=e||t;return!!(i&&i.indexOf("Electron")>=0)}()}var ib={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"===("undefined"==typeof process?"undefined":w(process))&&process},rb=ib.window||ib.self||ib.global,nb=ib.process||{},sb="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";tb();var ob,ab=function(){return P((function e(t,i){x(this,e);var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";iy(this,"storage",void 0),iy(this,"id",void 0),iy(this,"config",void 0),this.storage=function(e){try{var t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch(e){return null}}(r),this.id=t,this.config=i,this._loadConfiguration()}),[{key:"getConfiguration",value:function(){return this.config}},{key:"setConfiguration",value:function(e){if(Object.assign(this.config,e),this.storage){var t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}},{key:"_loadConfiguration",value:function(){var e={};if(this.storage){var t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}])}();function lb(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,n=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(i=Math.min(i,r/e.width));var s=e.width*i,o=e.height*i,a=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(s/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(n,");"),"background-size:".concat(s,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}function ub(e){return"string"==typeof e?ob[e.toUpperCase()]||ob.WHITE:e}function cb(e,t){if(!e)throw new Error(t||"Assertion failed")}function hb(){var e,t,i;if(tb&&"performance"in rb)e=null==rb||null===(t=rb.performance)||void 0===t||null===(i=t.now)||void 0===i?void 0:i.call(t);else if("hrtime"in nb){var r,n=null==nb||null===(r=nb.hrtime)||void 0===r?void 0:r.call(nb);e=1e3*n[0]+n[1]/1e6}else e=Date.now();return e}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(ob||(ob={}));var Ab={debug:tb&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},db={enabled:!0,level:0};function pb(){}var fb={},gb={once:!0},mb=function(){return P((function e(){x(this,e);var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""}).id;iy(this,"id",void 0),iy(this,"VERSION",sb),iy(this,"_startTs",hb()),iy(this,"_deltaTs",hb()),iy(this,"_storage",void 0),iy(this,"userData",{}),iy(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new ab("__probe-".concat(this.id,"__"),db),this.timeStamp("".concat(this.id," started")),function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),n=u(Object.getOwnPropertyNames(r));try{var s=function(){var r=t.value;"function"==typeof e[r]&&(i.find((function(e){return r===e}))||(e[r]=e[r].bind(e)))};for(n.s();!(t=n.n()).done;)s()}catch(e){n.e(e)}finally{n.f()}}(this),Object.seal(this)}),[{key:"level",get:function(){return this.getLevel()},set:function(e){this.setLevel(e)}},{key:"isEnabled",value:function(){return this._storage.config.enabled}},{key:"getLevel",value:function(){return this._storage.config.level}},{key:"getTotal",value:function(){return Number((hb()-this._startTs).toPrecision(10))}},{key:"getDelta",value:function(){return Number((hb()-this._deltaTs).toPrecision(10))}},{key:"priority",get:function(){return this.level},set:function(e){this.level=e}},{key:"getPriority",value:function(){return this.level}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.setConfiguration({enabled:e}),this}},{key:"setLevel",value:function(e){return this._storage.setConfiguration({level:e}),this}},{key:"get",value:function(e){return this._storage.config[e]}},{key:"set",value:function(e,t){this._storage.setConfiguration(b({},e,t))}},{key:"settings",value:function(){console.table?console.table(this._storage.config):console.log(this._storage.config)}},{key:"assert",value:function(e,t){cb(e,t)}},{key:"warn",value:function(e){return this._getLogFunction(0,e,Ab.warn,arguments,gb)}},{key:"error",value:function(e){return this._getLogFunction(0,e,Ab.error,arguments)}},{key:"deprecated",value:function(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}},{key:"removed",value:function(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}},{key:"probe",value:function(e,t){return this._getLogFunction(e,t,Ab.log,arguments,{time:!0,once:!0})}},{key:"log",value:function(e,t){return this._getLogFunction(e,t,Ab.debug,arguments)}},{key:"info",value:function(e,t){return this._getLogFunction(e,t,console.info,arguments)}},{key:"once",value:function(e,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),n=2;n<i;n++)r[n-2]=arguments[n];return this._getLogFunction(e,t,Ab.debug||Ab.info,arguments,gb)}},{key:"table",value:function(e,t,i){return t?this._getLogFunction(e,t,console.table||pb,i&&[i],{tag:yb(t)}):pb}},{key:"image",value:function(e){var t=e.logLevel,i=e.priority,r=e.image,n=e.message,s=void 0===n?"":n,o=e.scale,a=void 0===o?1:o;return this._shouldLog(t||i)?tb?function(e){var t=e.image,i=e.message,r=void 0===i?"":i,n=e.scale,s=void 0===n?1:n;if("string"==typeof t){var o=new Image;return o.onload=function(){var e,t=lb(o,r,s);(e=console).log.apply(e,l(t))},o.src=t,pb}var a=t.nodeName||"";if("img"===a.toLowerCase()){var u;return(u=console).log.apply(u,l(lb(t,r,s))),pb}if("canvas"===a.toLowerCase()){var c=new Image;return c.onload=function(){var e;return(e=console).log.apply(e,l(lb(c,r,s)))},c.src=t.toDataURL(),pb}return pb}({image:r,message:s,scale:a}):(console.warn("removed"),pb):pb}},{key:"time",value:function(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}},{key:"timeEnd",value:function(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}},{key:"timeStamp",value:function(e,t){return this._getLogFunction(e,t,console.timeStamp||pb)}},{key:"group",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1},r=_b({logLevel:e,message:t,opts:i}),n=i.collapsed;return r.method=(n?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}},{key:"groupCollapsed",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},i,{collapsed:!0}))}},{key:"groupEnd",value:function(e){return this._getLogFunction(e,"",console.groupEnd||pb)}},{key:"withGroup",value:function(e,t,i){this.group(e,t)();try{i()}finally{this.groupEnd(e)()}}},{key:"trace",value:function(){console.trace&&console.trace()}},{key:"_shouldLog",value:function(e){return this.isEnabled()&&this.getLevel()>=vb(e)}},{key:"_getLogFunction",value:function(e,t,i,r,n){if(this._shouldLog(e)){var s;n=_b({logLevel:e,message:t,args:r,opts:n}),cb(i=i||n.method),n.total=this.getTotal(),n.delta=this.getDelta(),this._deltaTs=hb();var o=n.tag||n.message;if(n.once){if(fb[o])return pb;fb[o]=hb()}return t=function(e,t,i){if("string"==typeof t){var r=i.time?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,i=Math.max(t-e.length,0);return"".concat(" ".repeat(i)).concat(e)}((n=i.total)<10?"".concat(n.toFixed(2),"ms"):n<100?"".concat(n.toFixed(1),"ms"):n<1e3?"".concat(n.toFixed(0),"ms"):"".concat((n/1e3).toFixed(2),"s")):"";t=function(e,t,i){return tb||"string"!=typeof e||(t&&(t=ub(t),e="[".concat(t,"m").concat(e,"")),i&&(t=ub(i),e="[".concat(i+10,"m").concat(e,""))),e}(t=i.time?"".concat(e,": ").concat(r," ").concat(t):"".concat(e,": ").concat(t),i.color,i.background)}var n;return t}(this.id,n.message,n),(s=i).bind.apply(s,[console,t].concat(l(n.args)))}return pb}}])}();function vb(e){if(!e)return 0;var t;switch(w(e)){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return cb(Number.isFinite(t)&&t>=0),t}function _b(e){var t=e.logLevel,i=e.message;e.logLevel=vb(t);for(var r=e.args?Array.from(e.args):[];r.length&&r.shift()!==i;);switch(w(t)){case"string":case"function":void 0!==i&&r.unshift(i),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());var n=w(e.message);return cb("string"===n||"object"===n),Object.assign(e,{args:r},e.opts)}function yb(e){for(var t in e)for(var i in e[t])return i||"untitled";return"empty"}iy(mb,"VERSION",sb);var bb=new mb({id:"loaders.gl"}),wb=function(){return P((function e(){x(this,e)}),[{key:"log",value:function(){return function(){}}},{key:"info",value:function(){return function(){}}},{key:"warn",value:function(){return function(){}}},{key:"error",value:function(){return function(){}}}])}(),xb={fetch:null,mimeType:void 0,nothrow:!1,log:new(function(){return P((function e(){x(this,e),iy(this,"console",void 0),this.console=console}),[{key:"log",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.log).bind.apply(e,[this.console].concat(i))}},{key:"info",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.info).bind.apply(e,[this.console].concat(i))}},{key:"warn",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.warn).bind.apply(e,[this.console].concat(i))}},{key:"error",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.error).bind.apply(e,[this.console].concat(i))}}])}()),CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:X_,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},Bb={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function Pb(){globalThis.loaders=globalThis.loaders||{};var e=globalThis.loaders;return e._state=e._state||{},e._state}var Cb=function(){var e=Pb();return e.globalOptions=e.globalOptions||n({},xb),e.globalOptions};function Mb(e,t,i,r){return i=i||[],function(e,t){kb(e,null,xb,Bb,t);var i,r=u(t);try{for(r.s();!(i=r.n()).done;){var n=i.value,s=e&&e[n.id]||{},o=n.options&&n.options[n.id]||{},a=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};kb(s,n.id,o,a,t)}}catch(e){r.e(e)}finally{r.f()}}(e,i=Array.isArray(i)?i:[i]),function(e,t,i){var r=e.options||{},s=n({},r);(function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)})(s,i),null===s.log&&(s.log=new wb);return Sb(s,Cb()),Sb(s,t),s}(t,e,r)}function kb(e,t,i,r,n){var s=t||"Top level",o=t?"".concat(t,"."):"";for(var a in e){var l=!t&&Sy(e[a]);if(!(a in i)&&!("baseUri"===a&&!t)&&!("workerUrl"===a&&t))if(a in r)bb.warn("".concat(s," loader option '").concat(o).concat(a,"' no longer supported, use '").concat(r[a],"'"))();else if(!l){var u=Eb(a,n);bb.warn("".concat(s," loader option '").concat(o).concat(a,"' not recognized. ").concat(u))()}}}function Eb(e,t){var i,r=e.toLowerCase(),n="",s=u(t);try{for(s.s();!(i=s.n()).done;){var o=i.value;for(var a in o.options){if(e===a)return"Did you mean '".concat(o.id,".").concat(a,"'?");var l=a.toLowerCase();(r.startsWith(l)||l.startsWith(r))&&(n=n||"Did you mean '".concat(o.id,".").concat(a,"'?"))}}}catch(e){s.e(e)}finally{s.f()}return n}function Sb(e,t){for(var i in t)if(i in t){var r=t[i];Ty(r)&&Ty(e[i])?e[i]=n(n({},e[i]),t[i]):e[i]=t[i]}}function Tb(e){var t;return!!e&&(Array.isArray(e)&&(e=e[0]),Array.isArray(null===(t=e)||void 0===t?void 0:t.extensions))}function Fb(e){var t,i,r;return K_(e,"null loader"),K_(Tb(e),"invalid loader"),Array.isArray(e)&&(r=e[1],e=n(n({},e=e[0]),{},{options:n(n({},e.options),r)})),(null!==(t=e)&&void 0!==t&&t.parseTextSync||null!==(i=e)&&void 0!==i&&i.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}function Ib(){return(e=Pb()).loaderRegistry=e.loaderRegistry||[],e.loaderRegistry;var e}var Db=new mb({id:"loaders.gl"}),Rb=/\.([^.]+)$/;function Ob(e){return Lb.apply(this,arguments)}function Lb(){return Lb=a(s().mark((function e(t){var i,r,o,a,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>1&&void 0!==l[1]?l[1]:[],r=l.length>2?l[2]:void 0,o=l.length>3?l[3]:void 0,Ub(t)){e.next=5;break}return e.abrupt("return",null);case 5:if(!(a=jb(t,i,n(n({},r),{},{nothrow:!0}),o))){e.next=8;break}return e.abrupt("return",a);case 8:if(!Dy(t)){e.next=13;break}return e.next=11,t.slice(0,10).arrayBuffer();case 11:t=e.sent,a=jb(t,i,r,o);case 13:if(a||null!=r&&r.nothrow){e.next=15;break}throw new Error(Nb(t));case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)}))),Lb.apply(this,arguments)}function jb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!Ub(e))return null;if(t&&!Array.isArray(t))return Fb(t);var n,s=[];(t&&(s=s.concat(t)),null!=i&&i.ignoreRegisteredLoaders)||(n=s).push.apply(n,l(Ib()));!function(e){var t,i=u(e);try{for(i.s();!(t=i.n()).done;){Fb(t.value)}}catch(e){i.e(e)}finally{i.f()}}(s);var o=function(e,t,i,r){var n,s=Vy(e),o=Qy(e),a=Ny(s)||(null==r?void 0:r.url),l=null,c="";null!=i&&i.mimeType&&(l=Vb(t,null==i?void 0:i.mimeType),c="match forced by supplied MIME type ".concat(null==i?void 0:i.mimeType));l=l||function(e,t){var i=t&&Rb.exec(t),r=i&&i[1];return r?function(e,t){t=t.toLowerCase();var i,r=u(e);try{for(r.s();!(i=r.n()).done;){var n,s=i.value,o=u(s.extensions);try{for(o.s();!(n=o.n()).done;){if(n.value.toLowerCase()===t)return s}}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return null}(e,r):null}(t,a),c=c||(l?"matched url ".concat(a):""),l=l||Vb(t,o),c=c||(l?"matched MIME type ".concat(o):""),l=l||function(e,t){if(!t)return null;var i,r=u(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;if("string"==typeof t){if(Qb(t,n))return n}else if(ArrayBuffer.isView(t)){if(Hb(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(Hb(t,0,n))return n}}}catch(e){r.e(e)}finally{r.f()}return null}(t,e),c=c||(l?"matched initial data ".concat(Gb(e)):""),l=l||Vb(t,null==i?void 0:i.fallbackMimeType),c=c||(l?"matched fallback MIME type ".concat(o):""),c&&Db.log(1,"selectLoader selected ".concat(null===(n=l)||void 0===n?void 0:n.name,": ").concat(c,"."));return l}(e,s,i,r);if(!(o||null!=i&&i.nothrow))throw new Error(Nb(e));return o}function Ub(e){return!(e instanceof Response&&204===e.status)}function Nb(e){var t=Vy(e),i=Qy(e),r="No valid loader found (";r+=t?"".concat(ky(t),", "):"no url provided, ",r+="MIME type: ".concat(i?'"'.concat(i,'"'):"not provided",", ");var n=e?Gb(e):"";return r+=n?' first bytes: "'.concat(n,'"'):"first bytes: not available",r+=")"}function Vb(e,t){var i,r=u(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x.".concat(n.id))return n}}catch(e){r.e(e)}finally{r.f()}return null}function Qb(e,t){return t.testText?t.testText(e):(Array.isArray(t.tests)?t.tests:[t.tests]).some((function(t){return e.startsWith(t)}))}function Hb(e,t,i){return(Array.isArray(i.tests)?i.tests:[i.tests]).some((function(r){return function(e,t,i,r){if(r instanceof ArrayBuffer)return function(e,t,i){if(i=i||e.byteLength,e.byteLength<i||t.byteLength<i)return!1;for(var r=new Uint8Array(e),n=new Uint8Array(t),s=0;s<r.length;++s)if(r[s]!==n[s])return!1;return!0}(r,e,r.byteLength);switch(w(r)){case"function":return r(e,i);case"string":return r===zb(e,t,r.length);default:return!1}}(e,t,i,r)}))}function Gb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return zb(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return zb(e,0,t)}return""}function zb(e,t,i){if(e.byteLength<t+i)return"";for(var r=new DataView(e),n="",s=0;s<i;s++)n+=String.fromCharCode(r.getUint8(t+s));return n}var Wb=262144;function Kb(e,i){var r,n,o,a,l;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(null==i?void 0:i.chunkSize)||Wb,n=0,o=new TextEncoder;case 3:if(!(n<e.length)){t.next=11;break}return a=Math.min(e.length-n,r),l=e.slice(n,n+a),n+=a,t.next=9,o.encode(l);case 9:t.next=3;break;case 11:case"end":return t.stop()}}),t)}function Xb(){return(Xb=k(s().mark((function e(t,i){var r,n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=(null==i?void 0:i.chunkSize)||1048576,n=0;case 2:if(!(n<t.size)){e.next=12;break}return o=n+r,e.next=6,M(t.slice(n,o).arrayBuffer());case 6:return a=e.sent,n=o,e.next=10,a;case 10:e.next=2;break;case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qb(e,t){return X_?function(e,t){return Yb.apply(this,arguments)}(e,t):function(e,t){return Jb.apply(this,arguments)}(e)}function Yb(){return(Yb=k(s().mark((function e(t,i){var r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.getReader(),e.prev=1;case 2:return o=n||r.read(),null!=i&&i._streamReadAhead&&(n=r.read()),e.next=7,M(o);case 7:if(a=e.sent,l=a.done,u=a.value,!l){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,My(u);case 14:e.next=2;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),r.releaseLock();case 21:case"end":return e.stop()}}),e,null,[[1,18]])})))).apply(this,arguments)}function Jb(){return(Jb=k(s().mark((function e(t,i){var r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,n=!1,e.prev=2,a=T(t);case 4:return e.next=6,M(a.next());case 6:if(!(r=!(l=e.sent).done)){e.next=13;break}return u=l.value,e.next=10,My(u);case 10:r=!1,e.next=4;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(2),n=!0,o=e.t0;case 19:if(e.prev=19,e.prev=20,!r||null==a.return){e.next=24;break}return e.next=24,M(a.return());case 24:if(e.prev=24,!n){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(19);case 29:case"end":return e.stop()}}),e,null,[[2,15,19,29],[20,,24,28]])})))).apply(this,arguments)}function Zb(e,t){if("string"==typeof e)return Kb(e,t);if(e instanceof ArrayBuffer)return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s().mark((function i(){var r,n,o,a,l,u;return s().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=t.chunkSize,n=void 0===r?262144:r,o=0;case 2:if(!(o<e.byteLength)){i.next=13;break}return a=Math.min(e.byteLength-o,n),l=new ArrayBuffer(a),u=new Uint8Array(e,o,a),new Uint8Array(l).set(u),o+=a,i.next=11,l;case 11:i.next=2;break;case 13:case"end":return i.stop()}}),i)}))()}(e,t);if(Dy(e))return function(e,t){return Xb.apply(this,arguments)}(e,t);if(Ry(e))return qb(e,t);if(Iy(e))return qb(e.body,t);throw new Error("makeIterator")}var $b="Cannot convert supplied data type";function ew(e,t,i){if(t.text&&"string"==typeof e)return e;var r;if((r=e)&&"object"===w(r)&&r.isBuffer&&(e=e.buffer),e instanceof ArrayBuffer){var n=e;return t.text&&!t.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary)return new TextDecoder("utf8").decode(e);var s=e.buffer,o=e.byteLength||e.length;return 0===e.byteOffset&&o===s.byteLength||(s=s.slice(e.byteOffset,e.byteOffset+o)),s}throw new Error($b)}function tw(e,t,i){return iw.apply(this,arguments)}function iw(){return iw=a(s().mark((function e(t,i,r){var n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t instanceof ArrayBuffer||ArrayBuffer.isView(t),"string"!=typeof t&&!n){e.next=3;break}return e.abrupt("return",ew(t,i));case 3:if(!Dy(t)){e.next=7;break}return e.next=6,Gy(t);case 6:t=e.sent;case 7:if(!Iy(t)){e.next=21;break}return o=t,e.next=11,Wy(o);case 11:if(!i.binary){e.next=17;break}return e.next=14,o.arrayBuffer();case 14:e.t0=e.sent,e.next=20;break;case 17:return e.next=19,o.text();case 19:e.t0=e.sent;case 20:return e.abrupt("return",e.t0);case 21:if(Ry(t)&&(t=Zb(t,r)),!((s=t)&&"function"==typeof s[Symbol.iterator]||Fy(t))){e.next=24;break}return e.abrupt("return",xy(t));case 24:throw new Error($b);case 25:case"end":return e.stop()}var s}),e)}))),iw.apply(this,arguments)}function rw(e,t){var i=Cb(),r=e||i;return"function"==typeof r.fetch?r.fetch:Sy(r.fetch)?function(e){return $y(e,r)}:null!=t&&t.fetch?null==t?void 0:t.fetch:$y}function nw(e,t,i){if(i)return i;var r,s,o=n({fetch:rw(t,e)},e);if(o.url){var a=Ny(o.url);o.baseUrl=a,o.queryString=function(e){var t=e.match(Uy);return t&&t[0]}(o.url),o.filename=ky(a),o.baseUrl=(s=(r=a)?r.lastIndexOf("/"):-1)>=0?r.substr(0,s):""}return Array.isArray(o.loaders)||(o.loaders=null),o}function sw(e,t){if(!t&&e&&!Array.isArray(e))return e;var i;if(e&&(i=Array.isArray(e)?e:[e]),t&&t.loaders){var r=Array.isArray(t.loaders)?t.loaders:[t.loaders];i=i?[].concat(l(i),l(r)):r}return i&&i.length?i:null}function ow(e,t,i,r){return aw.apply(this,arguments)}function aw(){return(aw=a(s().mark((function e(t,i,r,n){var o,a,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y_(!n||"object"===w(n)),!i||Array.isArray(i)||Tb(i)||(n=void 0,r=i,i=void 0),e.next=4,t;case 4:return t=e.sent,r=r||{},o=Vy(t),a=sw(i,n),e.next=11,Ob(t,a,r);case 11:if(l=e.sent){e.next=14;break}return e.abrupt("return",null);case 14:return r=Mb(r,l,a,o),n=nw({url:o,parse:ow,loaders:a},r,n||null),e.next=18,lw(l,t,r,n);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lw(e,t,i,r){return uw.apply(this,arguments)}function uw(){return(uw=a(s().mark((function e(t,i,r,n){var o,a,l,u,c,h,A,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return gy(t),Iy(i)&&(a=(o=i).ok,l=o.redirected,u=o.status,c=o.statusText,h=o.type,A=o.url,d=Object.fromEntries(o.headers.entries()),n.response={headers:d,ok:a,redirected:l,status:u,statusText:c,type:h,url:A}),e.next=4,tw(i,t,r);case 4:if(i=e.sent,!t.parseTextSync||"string"!=typeof i){e.next=8;break}return r.dataType="text",e.abrupt("return",t.parseTextSync(i,r,n,t));case 8:if(!my(t,r)){e.next=12;break}return e.next=11,vy(t,i,r,n,ow);case 11:case 15:case 19:return e.abrupt("return",e.sent);case 12:if(!t.parseText||"string"!=typeof i){e.next=16;break}return e.next=15,t.parseText(i,r,n,t);case 16:if(!t.parse){e.next=20;break}return e.next=19,t.parse(i,r,n,t);case 20:throw Y_(!t.parseSync),new Error("".concat(t.id," loader - no parser found and worker is disabled"));case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cw={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document},hw=cw.global||cw.self||cw.window||{},Aw="object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser,dw="function"==typeof importScripts,pw="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);pw&&parseFloat(pw[1]);var fw=null,gw=Object.freeze({__proto__:null,readFileAsArrayBuffer:null,readFileAsText:null,requireFromFile:fw,requireFromString:null}),mw={};function vw(e){return _w.apply(this,arguments)}function _w(){return _w=a(s().mark((function e(t){var i,r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>2&&void 0!==n[2]?n[2]:{},(i=n.length>1&&void 0!==n[1]?n[1]:null)&&(t=yw(t,i,r)),mw[t]=mw[t]||bw(t),e.next=6,mw[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)}))),_w.apply(this,arguments)}function yw(e,t,i){if(e.startsWith("http"))return e;var r=i.modules||{};return r[e]?r[e]:Aw?i.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(i.CDN.startsWith("http")),"".concat(i.CDN,"/").concat(t,"@").concat("3.4.15","/dist/libs/").concat(e)):dw?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function bw(e){return ww.apply(this,arguments)}function ww(){return(ww=a(s().mark((function e(t){var i,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return i=e.sent,e.next=6,i.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(Aw){e.next=20;break}if(e.prev=8,e.t0=gw&&fw,!e.t0){e.next=14;break}return e.next=13,fw(t);case 13:e.t0=e.sent;case 14:return e.abrupt("return",e.t0);case 17:return e.prev=17,e.t1=e.catch(8),e.abrupt("return",null);case 20:if(!dw){e.next=22;break}return e.abrupt("return",importScripts(t));case 22:return e.next=24,fetch(t);case 24:return r=e.sent,e.next=27,r.text();case 27:return n=e.sent,e.abrupt("return",xw(n,t));case 29:case"end":return e.stop()}}),e,null,[[8,17]])})))).apply(this,arguments)}function xw(e,t){if(!Aw)return null;if(dw)return eval.call(hw,e),null;var i=document.createElement("script");i.id=t;try{i.appendChild(document.createTextNode(e))}catch(t){i.text=e}return document.body.appendChild(i),null}var Bw,Pw,Cw="3.4.15",Mw="https://unpkg.com/@loaders.gl/textures@".concat(Cw,"/dist/libs/basis_encoder.wasm"),kw="https://unpkg.com/@loaders.gl/textures@".concat(Cw,"/dist/libs/basis_encoder.js");function Ew(e){return Sw.apply(this,arguments)}function Sw(){return(Sw=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=t.modules||{}).basis){e.next=3;break}return e.abrupt("return",i.basis);case 3:return Bw=Bw||Tw(t),e.next=6,Bw;case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tw(e){return Fw.apply(this,arguments)}function Fw(){return(Fw=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null,r=null,e.t0=Promise,e.next=5,vw("basis_transcoder.js","textures",t);case 5:return e.t1=e.sent,e.next=8,vw("basis_transcoder.wasm","textures",t);case 8:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=12,e.t0.all.call(e.t0,e.t3);case 12:return n=e.sent,o=c(n,2),i=o[0],r=o[1],i=i||globalThis.BASIS,e.next=19,Iw(i,r);case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Iw(e,t){var i={};return t&&(i.wasmBinary=t),new Promise((function(t){e(i).then((function(e){var i=e.BasisFile;(0,e.initializeBasis)(),t({BasisFile:i})}))}))}function Dw(e){return Rw.apply(this,arguments)}function Rw(){return(Rw=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=t.modules||{}).basisEncoder){e.next=3;break}return e.abrupt("return",i.basisEncoder);case 3:return Pw=Pw||Ow(t),e.next=6,Pw;case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ow(e){return Lw.apply(this,arguments)}function Lw(){return(Lw=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null,r=null,e.t0=Promise,e.next=5,vw(kw,"textures",t);case 5:return e.t1=e.sent,e.next=8,vw(Mw,"textures",t);case 8:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=12,e.t0.all.call(e.t0,e.t3);case 12:return n=e.sent,o=c(n,2),i=o[0],r=o[1],i=i||globalThis.BASIS,e.next=19,jw(i,r);case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jw(e,t){var i={};return t&&(i.wasmBinary=t),new Promise((function(t){e(i).then((function(e){var i=e.BasisFile,r=e.KTX2File,n=e.initializeBasis,s=e.BasisEncoder;n(),t({BasisFile:i,KTX2File:r,BasisEncoder:s})}))}))}var Uw,Nw,Vw,Qw,Hw,Gw,zw,Ww,Kw,Xw=33776,qw=33779,Yw=35840,Jw=35842,Zw=36196,$w=37808,ex=["","WEBKIT_","MOZ_"],tx={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"},ix=null;function rx(e){if(!ix){e=e||function(){try{return document.createElement("canvas").getContext("webgl")}catch(e){return null}}()||void 0,ix=new Set;var t,i=u(ex);try{for(i.s();!(t=i.n()).done;){var r=t.value;for(var n in tx)if(e&&e.getExtension("".concat(r).concat(n))){var s=tx[n];ix.add(s)}}}catch(e){i.e(e)}finally{i.f()}}return ix}(Kw=Uw||(Uw={}))[Kw.NONE=0]="NONE",Kw[Kw.BASISLZ=1]="BASISLZ",Kw[Kw.ZSTD=2]="ZSTD",Kw[Kw.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(Nw||(Nw={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(Vw||(Vw={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Qw||(Qw={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(Hw||(Hw={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Gw||(Gw={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(zw||(zw={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(Ww||(Ww={}));var nx=[171,75,84,88,32,50,48,187,13,10,26,10];function sx(e){var t=new Uint8Array(e);return!(t.byteLength<nx.length||t[0]!==nx[0]||t[1]!==nx[1]||t[2]!==nx[2]||t[3]!==nx[3]||t[4]!==nx[4]||t[5]!==nx[5]||t[6]!==nx[6]||t[7]!==nx[7]||t[8]!==nx[8]||t[9]!==nx[9]||t[10]!==nx[10]||t[11]!==nx[11])}var ox={etc1:{basisFormat:0,compressed:!0,format:Zw},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Xw},bc3:{basisFormat:3,compressed:!0,format:qw},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Yw},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Jw},"astc-4x4":{basisFormat:10,compressed:!0,format:$w},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function ax(){return(ax=a(s().mark((function e(t,i){var r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("auto"!==i.basis.containerFormat){e.next=11;break}if(!sx(t)){e.next=6;break}return e.next=4,Dw(i);case 4:return r=e.sent,e.abrupt("return",cx(r.KTX2File,t,i));case 6:return e.next=8,Ew(i);case 8:return n=e.sent,o=n.BasisFile,e.abrupt("return",lx(o,t,i));case 11:e.t0=i.basis.module,e.next="encoder"===e.t0?14:(e.t0,22);break;case 14:return e.next=16,Dw(i);case 16:a=e.sent,e.t1=i.basis.containerFormat,e.next="ktx2"===e.t1?20:(e.t1,21);break;case 20:return e.abrupt("return",cx(a.KTX2File,t,i));case 21:return e.abrupt("return",lx(a.BasisFile,t,i));case 22:return e.next=24,Ew(i);case 24:return l=e.sent,u=l.BasisFile,e.abrupt("return",lx(u,t,i));case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lx(e,t,i){var r=new e(new Uint8Array(t));try{if(!r.startTranscoding())throw new Error("Failed to start basis transcoding");for(var n=r.getNumImages(),s=[],o=0;o<n;o++){for(var a=r.getNumLevels(o),l=[],u=0;u<a;u++)l.push(ux(r,o,u,i));s.push(l)}return s}finally{r.close(),r.delete()}}function ux(e,t,i,r){var n=e.getImageWidth(t,i),s=e.getImageHeight(t,i),o=e.getHasAlpha(),a=Ax(r,o),l=a.compressed,u=a.format,c=a.basisFormat,h=e.getImageTranscodedSizeInBytes(t,i,c),A=new Uint8Array(h);if(!e.transcodeImage(A,t,i,c,0,0))throw new Error("failed to start Basis transcoding");return{width:n,height:s,data:A,compressed:l,format:u,hasAlpha:o}}function cx(e,t,i){var r=new e(new Uint8Array(t));try{if(!r.startTranscoding())throw new Error("failed to start KTX2 transcoding");for(var n=r.getLevels(),s=[],o=0;o<n;o++){s.push(hx(r,o,i));break}return[s]}finally{r.close(),r.delete()}}function hx(e,t,i){var r=e.getImageLevelInfo(t,0,0),n=r.alphaFlag,s=r.height,o=r.width,a=Ax(i,n),l=a.compressed,u=a.format,c=a.basisFormat,h=e.getImageTranscodedSizeInBytes(t,0,0,c),A=new Uint8Array(h);if(!e.transcodeImage(A,t,0,0,c,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:o,height:s,data:A,compressed:l,levelSize:h,hasAlpha:n,format:u}}function Ax(e,t){var i=e&&e.basis&&e.basis.format;return"auto"===i&&(i=dx()),"object"===w(i)&&(i=t?i.alpha:i.noAlpha),i=i.toLowerCase(),ox[i]}function dx(){var e=rx();return e.has("astc")?"astc-4x4":e.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:e.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:e.has("etc1")?"etc1":e.has("etc2")?"etc2":"rgb565"}var px=n(n({},{name:"Basis",id:Aw?"basis":"basis-nodejs",module:"textures",version:"3.4.15",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}}),{},{parse:function(e,t){return ax.apply(this,arguments)}});function fx(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var gx=Boolean("object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser),mx="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);mx&&parseFloat(mx[1]);var vx=globalThis._parseImageNode,_x="undefined"!=typeof Image,yx="undefined"!=typeof ImageBitmap,bx=Boolean(vx),wx=!!gx||bx;function xx(e){var t=function(e){if("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap)return"imagebitmap";if("undefined"!=typeof Image&&e instanceof Image)return"image";if(e&&"object"===w(e)&&e.data&&e.width&&e.height)return"data";return null}(e);if(!t)throw new Error("Not an image");return t}function Bx(e){switch(xx(e)){case"data":return e;case"image":case"imagebitmap":var t=document.createElement("canvas"),i=t.getContext("2d");if(!i)throw new Error("getImageData");return t.width=e.width,t.height=e.height,i.drawImage(e,0,0),i.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}var Px=/^data:image\/svg\+xml/,Cx=/\.svg((\?|#).*)?$/;function Mx(e){return e&&(Px.test(e)||Cx.test(e))}function kx(e,t){if(Mx(t)){var i=(new TextDecoder).decode(e);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(i=unescape(encodeURIComponent(i)))}catch(e){throw new Error(e.message)}return"data:image/svg+xml;base64,".concat(btoa(i))}return Ex(e,t)}function Ex(e,t){if(Mx(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}function Sx(e,t,i){return Tx.apply(this,arguments)}function Tx(){return(Tx=a(s().mark((function e(t,i,r){var n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=kx(t,r),o=self.URL||self.webkitURL,a="string"!=typeof n&&o.createObjectURL(n),e.prev=3,e.next=6,Fx(a||n,i);case 6:return e.abrupt("return",e.sent);case 7:return e.prev=7,a&&o.revokeObjectURL(a),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[3,,7,10]])})))).apply(this,arguments)}function Fx(e,t){return Ix.apply(this,arguments)}function Ix(){return Ix=a(s().mark((function e(t,i){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=new Image).src=t,!(i.image&&i.image.decode&&r.decode)){e.next=6;break}return e.next=5,r.decode();case 5:return e.abrupt("return",r);case 6:return e.next=8,new Promise((function(e,i){try{r.onload=function(){return e(r)},r.onerror=function(e){return i(new Error("Could not load image ".concat(t,": ").concat(e)))}}catch(e){i(e)}}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),Ix.apply(this,arguments)}var Dx={},Rx=!0;function Ox(e,t,i){return Lx.apply(this,arguments)}function Lx(){return(Lx=a(s().mark((function e(t,i,r){var n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Mx(r)){e.next=7;break}return e.next=3,Sx(t,i,r);case 3:o=e.sent,n=o,e.next=8;break;case 7:n=Ex(t,r);case 8:return a=i&&i.imagebitmap,e.next=11,jx(n,a);case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jx(e){return Ux.apply(this,arguments)}function Ux(){return Ux=a(s().mark((function e(t){var i,r=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Nx(i=r.length>1&&void 0!==r[1]?r[1]:null)&&Rx||(i=null),!i){e.next=13;break}return e.prev=3,e.next=6,createImageBitmap(t,i);case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(3),console.warn(e.t0),Rx=!1;case 13:return e.next=15,createImageBitmap(t);case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,null,[[3,9]])}))),Ux.apply(this,arguments)}function Nx(e){for(var t in e||Dx)return!1;return!0}function Vx(e){return function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(s=t,l(s).map((function(e){return e.charCodeAt(0)}))),n=0;n<r.length;++n)if(r[n]!==e[n+i])return!1;var s;return!0}(e,"ftyp",4)&&96&e[8]?function(e){switch((t=e,i=8,r=12,String.fromCharCode.apply(String,l(t.slice(i,r)))).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}var t,i,r}(e):null}var Qx=!1,Hx=!0;function Gx(e){var t=zx(e);return function(e){var t=zx(e),i=t.byteLength>=24&&2303741511===t.getUint32(0,Qx);if(!i)return null;return{mimeType:"image/png",width:t.getUint32(16,Qx),height:t.getUint32(20,Qx)}}(t)||function(e){var t=zx(e),i=t.byteLength>=3&&65496===t.getUint16(0,Qx)&&255===t.getUint8(2);if(!i)return null;var r=function(){for(var e=new Set([65499,65476,65484,65501,65534]),t=65504;t<65520;++t)e.add(t);var i=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:i}}(),n=r.tableMarkers,s=r.sofMarkers,o=2;for(;o+9<t.byteLength;){var a=t.getUint16(o,Qx);if(s.has(a))return{mimeType:"image/jpeg",height:t.getUint16(o+5,Qx),width:t.getUint16(o+7,Qx)};if(!n.has(a))return null;o+=2,o+=t.getUint16(o,Qx)}return null}(t)||function(e){var t=zx(e),i=t.byteLength>=10&&1195984440===t.getUint32(0,Qx);if(!i)return null;return{mimeType:"image/gif",width:t.getUint16(6,Hx),height:t.getUint16(8,Hx)}}(t)||function(e){var t=zx(e),i=t.byteLength>=14&&16973===t.getUint16(0,Qx)&&t.getUint32(2,Hx)===t.byteLength;if(!i)return null;return{mimeType:"image/bmp",width:t.getUint32(18,Hx),height:t.getUint32(22,Hx)}}(t)||function(e){var t=new Uint8Array(e instanceof DataView?e.buffer:e),i=Vx(t);if(!i)return null;return{mimeType:i.mimeType,width:0,height:0}}(t)}function zx(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}function Wx(e,t){return Kx.apply(this,arguments)}function Kx(){return Kx=a(s().mark((function e(t,i){var r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Gx(t)||{},n=r.mimeType,fx(o=globalThis._parseImageNode),e.next=5,o(t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),Kx.apply(this,arguments)}function Xx(){return(Xx=a(s().mark((function e(t,i,r){var n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(i=i||{}).image||{},o=n.type||"auto",a=(r||{}).url,l=qx(o),e.t0=l,e.next="imagebitmap"===e.t0?8:"image"===e.t0?12:"data"===e.t0?16:20;break;case 8:return e.next=10,Ox(t,i,a);case 10:return u=e.sent,e.abrupt("break",21);case 12:return e.next=14,Sx(t,i,a);case 14:return u=e.sent,e.abrupt("break",21);case 16:return e.next=18,Wx(t);case 18:return u=e.sent,e.abrupt("break",21);case 20:fx(!1);case 21:return"data"===o&&(u=Bx(u)),e.abrupt("return",u);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qx(e){switch(e){case"auto":case"data":return function(){if(yx)return"imagebitmap";if(_x)return"image";if(wx)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return yx||_x||wx;case"imagebitmap":return yx;case"image":return _x;case"data":return wx;default:throw new Error("@loaders.gl/images: image ".concat(e," not supported in this environment"))}}(e),e}}var Yx={id:"image",module:"images",name:"Images",version:"3.4.15",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],parse:function(e,t,i){return Xx.apply(this,arguments)},tests:[function(e){return Boolean(Gx(new DataView(e)))}],options:{image:{type:"auto",decode:!0}}},Jx={};function Zx(e){if(void 0===Jx[e]){var t=gx?function(e){switch(e){case"image/avif":case"image/webp":return function(e){try{return 0===document.createElement("canvas").toDataURL(e).indexOf("data:".concat(e))}catch(e){return!1}}(e);default:return!0}}(e):function(e){var t=["image/png","image/jpeg","image/gif"],i=globalThis._parseImageNode,r=globalThis._imageFormatsNode,n=void 0===r?t:r;return Boolean(i)&&n.includes(e)}(e);Jx[e]=t}return Jx[e]}function $x(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function eB(e,t,i){if(e.byteLength<=t+i)return"";for(var r=new DataView(e),n="",s=0;s<i;s++)n+=String.fromCharCode(r.getUint8(t+s));return n}function tB(e){try{return JSON.parse(e)}catch(t){throw new Error('Failed to parse JSON from data starting with "'.concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return eB(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer)return eB(e,0,t);return""}(e),'"'))}}function iB(e,t,i){var r=void 0!==i?new Uint8Array(e).subarray(t,t+i):new Uint8Array(e).subarray(t);return new Uint8Array(r).buffer}function rB(e,t){return $x(e>=0),$x(t>0),e+(t-1)&~(t-1)}function nB(e,t,i){var r;if(e instanceof ArrayBuffer)r=new Uint8Array(e);else{var n=e.byteOffset,s=e.byteLength;r=new Uint8Array(e.buffer||e.arrayBuffer,n,s)}return t.set(r,i),i+rB(r.byteLength,4)}function sB(e,t){if(!e)throw new Error(t||"assert failed: gltf")}function oB(e,t){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;var i=t.baseUri||t.uri;if(!i)throw new Error("'baseUri' must be provided to resolve relative url ".concat(e));return i.substr(0,i.lastIndexOf("/")+1)+e}function aB(e,t,i){var r=e.bufferViews[i];sB(r);var n=t[r.buffer];sB(n);var s=(r.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,s,r.byteLength)}var lB=["SCALAR","VEC2","VEC3","VEC4"],uB=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],cB=new Map(uB),hB={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},AB={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},dB={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function pB(e){return lB[e-1]||lB[0]}function fB(e){var t=cB.get(e.constructor);if(!t)throw new Error("Illegal typed array");return t}function gB(e,t){var i=dB[e.componentType],r=hB[e.type],n=AB[e.componentType],s=e.count*r,o=e.count*r*n;return sB(o>=0&&o<=t.byteLength),{ArrayType:i,length:s,byteLength:o}}var mB,vB={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},_B=function(){return P((function e(t){x(this,e),iy(this,"gltf",void 0),iy(this,"sourceBuffers",void 0),iy(this,"byteLength",void 0),this.gltf=t||{json:n({},vB),buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}),[{key:"json",get:function(){return this.gltf.json}},{key:"getApplicationData",value:function(e){return this.json[e]}},{key:"getExtraData",value:function(e){return(this.json.extras||{})[e]}},{key:"getExtension",value:function(e){var t=this.getUsedExtensions().find((function(t){return t===e})),i=this.json.extensions||{};return t?i[e]||!0:null}},{key:"getRequiredExtension",value:function(e){var t=this.getRequiredExtensions().find((function(t){return t===e}));return t?this.getExtension(e):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getRemovedExtensions",value:function(){return this.json.extensionsRemoved||[]}},{key:"getObjectExtension",value:function(e,t){return(e.extensions||{})[t]}},{key:"getScene",value:function(e){return this.getObject("scenes",e)}},{key:"getNode",value:function(e){return this.getObject("nodes",e)}},{key:"getSkin",value:function(e){return this.getObject("skins",e)}},{key:"getMesh",value:function(e){return this.getObject("meshes",e)}},{key:"getMaterial",value:function(e){return this.getObject("materials",e)}},{key:"getAccessor",value:function(e){return this.getObject("accessors",e)}},{key:"getTexture",value:function(e){return this.getObject("textures",e)}},{key:"getSampler",value:function(e){return this.getObject("samplers",e)}},{key:"getImage",value:function(e){return this.getObject("images",e)}},{key:"getBufferView",value:function(e){return this.getObject("bufferViews",e)}},{key:"getBuffer",value:function(e){return this.getObject("buffers",e)}},{key:"getObject",value:function(e,t){if("object"===w(t))return t;var i=this.json[e]&&this.json[e][t];if(!i)throw new Error("glTF file error: Could not find ".concat(e,"[").concat(t,"]"));return i}},{key:"getTypedArrayForBufferView",value:function(e){var t=(e=this.getBufferView(e)).buffer,i=this.gltf.buffers[t];sB(i);var r=(e.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,r,e.byteLength)}},{key:"getTypedArrayForAccessor",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),i=this.getBuffer(t.buffer).data,r=gB(e,t),n=r.ArrayType,s=r.length;return new n(i,t.byteOffset+e.byteOffset,s)}},{key:"getTypedArrayForImageData",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),i=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(i,r,t.byteLength)}},{key:"addApplicationData",value:function(e,t){return this.json[e]=t,this}},{key:"addExtraData",value:function(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}},{key:"addObjectExtension",value:function(e,t,i){return e.extensions=e.extensions||{},e.extensions[t]=i,this.registerUsedExtension(t),this}},{key:"setObjectExtension",value:function(e,t,i){(e.extensions||{})[t]=i}},{key:"removeObjectExtension",value:function(e,t){var i=e.extensions||{},r=i[t];return delete i[t],r}},{key:"addExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sB(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}},{key:"addRequiredExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sB(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}},{key:"registerUsedExtension",value:function(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(t){return t===e}))||this.json.extensionsUsed.push(e)}},{key:"registerRequiredExtension",value:function(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(t){return t===e}))||this.json.extensionsRequired.push(e)}},{key:"removeExtension",value:function(e){if(this.getExtension(e)){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e),this.json.extensions&&delete this.json.extensions[e],Array.isArray(this.json.extensionsRemoved)||(this.json.extensionsRemoved=[]);var t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}}},{key:"setDefaultScene",value:function(e){this.json.scene=e}},{key:"addScene",value:function(e){var t=e.nodeIndices;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}},{key:"addNode",value:function(e){var t=e.meshIndex,i=e.matrix;this.json.nodes=this.json.nodes||[];var r={mesh:t};return i&&(r.matrix=i),this.json.nodes.push(r),this.json.nodes.length-1}},{key:"addMesh",value:function(e){var t=e.attributes,i=e.indices,r=e.material,n=e.mode,s=void 0===n?4:n,o={primitives:[{attributes:this._addAttributes(t),mode:s}]};if(i){var a=this._addIndices(i);o.primitives[0].indices=a}return Number.isFinite(r)&&(o.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}},{key:"addPointCloud",value:function(e){var t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}},{key:"addImage",value:function(e,t){var i=Gx(e),r=t||(null==i?void 0:i.mimeType),n={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}},{key:"addBufferView",value:function(e){var t=e.byteLength;sB(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);var i={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=rB(t,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(i),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(e,t){var i={bufferView:e,type:pB(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(i),this.json.accessors.length-1}},{key:"addBinaryBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},i=this.addBufferView(e),r={min:t.min,max:t.max};r.min&&r.max||(r=this._getAccessorMinMax(e,t.size));var n={size:t.size,componentType:fB(e),count:Math.round(e.length/t.size),min:r.min,max:r.max};return this.addAccessor(i,Object.assign(n,t))}},{key:"addTexture",value:function(e){var t={source:e.imageIndex};return this.json.textures=this.json.textures||[],this.json.textures.push(t),this.json.textures.length-1}},{key:"addMaterial",value:function(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}},{key:"createBinaryChunk",value:function(){var e,t;this.gltf.buffers=[];var i,r=this.byteLength,n=new ArrayBuffer(r),s=new Uint8Array(n),o=0,a=u(this.sourceBuffers||[]);try{for(a.s();!(i=a.n()).done;){o=nB(i.value,s,o)}}catch(e){a.e(e)}finally{a.f()}null!==(e=this.json)&&void 0!==e&&null!==(t=e.buffers)&&void 0!==t&&t[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}},{key:"_removeStringFromArray",value:function(e,t){for(var i=!0;i;){var r=e.indexOf(t);r>-1?e.splice(r,1):i=!1}}},{key:"_addAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};for(var i in e){var r=e[i],n=this._getGltfAttributeName(i),s=this.addBinaryBuffer(r.value,r);t[n]=s}return t}},{key:"_addIndices",value:function(e){return this.addBinaryBuffer(e,{size:1})}},{key:"_getGltfAttributeName",value:function(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}},{key:"_getAccessorMinMax",value:function(e,t){var i={min:null,max:null};if(e.length<t)return i;i.min=[],i.max=[];var r,n=u(e.subarray(0,t));try{for(n.s();!(r=n.n()).done;){var s=r.value;i.min.push(s),i.max.push(s)}}catch(e){n.e(e)}finally{n.f()}for(var o=t;o<e.length;o+=t)for(var a=0;a<t;a++)i.min[0+a]=Math.min(i.min[0+a],e[o+a]),i.max[0+a]=Math.max(i.max[0+a],e[o+a]);return i}}])}(),yB=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]),bB=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]),wB={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},xB={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};function BB(e,t,i,r,n){return PB.apply(this,arguments)}function PB(){return PB=a(s().mark((function e(t,i,r,n,o){var a,l,u=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>5&&void 0!==u[5]?u[5]:"NONE",e.next=3,CB();case 3:TB(l=e.sent,l.exports[xB[o]],t,i,r,n,l.exports[wB[a||"NONE"]]);case 5:case"end":return e.stop()}}),e)}))),PB.apply(this,arguments)}function CB(){return MB.apply(this,arguments)}function MB(){return(MB=a(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mB||(mB=kB()),e.abrupt("return",mB);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kB(){return EB.apply(this,arguments)}function EB(){return(EB=a(s().mark((function e(){var t,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE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DtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",console.log("Warning: meshopt_decoder is using experimental SIMD support")),e.next=4,WebAssembly.instantiate(SB(t),{});case 4:return i=e.sent,e.next=7,i.instance.exports.__wasm_call_ctors();case 7:return e.abrupt("return",i.instance);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function SB(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;++i){var r=e.charCodeAt(i);t[i]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}for(var n=0,s=0;s<e.length;++s)t[n++]=t[s]<60?bB[t[s]]:64*(t[s]-60)+t[++s];return t.buffer.slice(0,n)}function TB(e,t,i,r,n,s,o){var a=e.exports.sbrk,l=r+3&-4,u=a(l*n),c=a(s.length),h=new Uint8Array(e.exports.memory.buffer);h.set(s,c);var A=t(u,r,n,c,s.length);if(0===A&&o&&o(u,l,n),i.set(h.subarray(u,u+r*n)),a(u-a(0)),0!==A)throw new Error("Malformed buffer data: ".concat(A))}var FB="EXT_meshopt_compression",IB=FB;function DB(){return(DB=a(s().mark((function e(t,i){var r,n,o,a,l,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new _B(t),null!=i&&null!==(r=i.gltf)&&void 0!==r&&r.decompressMeshes){e.next=3;break}return e.abrupt("return");case 3:o=[],a=u(t.json.bufferViews||[]);try{for(a.s();!(l=a.n()).done;)c=l.value,o.push(RB(n,c))}catch(e){a.e(e)}finally{a.f()}return e.next=8,Promise.all(o);case 8:n.removeExtension(FB);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function RB(e,t){return OB.apply(this,arguments)}function OB(){return(OB=a(s().mark((function e(t,i){var r,n,o,a,l,u,c,h,A,d,p,f,g,m;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.getObjectExtension(i,FB))){e.next=9;break}return n=r.byteOffset,o=void 0===n?0:n,a=r.byteLength,l=void 0===a?0:a,u=r.byteStride,c=r.count,h=r.mode,A=r.filter,d=void 0===A?"NONE":A,p=r.buffer,f=t.gltf.buffers[p],g=new Uint8Array(f.arrayBuffer,f.byteOffset+o,l),m=new Uint8Array(t.gltf.buffers[i.buffer].arrayBuffer,i.byteOffset,i.byteLength),e.next=8,BB(m,c,u,g,h,d);case 8:return e.abrupt("return",m);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var LB=Object.freeze({__proto__:null,name:IB,decode:function(e,t){return DB.apply(this,arguments)}}),jB="EXT_texture_webp",UB=jB;var NB=Object.freeze({__proto__:null,name:UB,preprocess:function(e,t){var i=new _B(e);if(Zx("image/webp")){var r,n=u(i.json.textures||[]);try{for(n.s();!(r=n.n()).done;){var s=r.value,o=i.getObjectExtension(s,jB);o&&(s.source=o.source),i.removeObjectExtension(s,jB)}}catch(e){n.e(e)}finally{n.f()}i.removeExtension(jB)}else if(i.getRequiredExtensions().includes(jB))throw new Error("gltf: Required extension ".concat(jB," not supported by browser"))}}),VB="KHR_texture_basisu",QB=VB;var HB=Object.freeze({__proto__:null,name:QB,preprocess:function(e,t){var i,r=new _B(e),n=u(r.json.textures||[]);try{for(n.s();!(i=n.n()).done;){var s=i.value,o=r.getObjectExtension(s,VB);o&&(s.source=o.source),r.removeObjectExtension(s,VB)}}catch(e){n.e(e)}finally{n.f()}r.removeExtension(VB)}});var GB={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document},zB=GB.global||GB.self||GB.window||{},WB="object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser,KB="function"==typeof importScripts,XB="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);XB&&parseFloat(XB[1]);var qB=null,YB=Object.freeze({__proto__:null,readFileAsArrayBuffer:null,readFileAsText:null,requireFromFile:qB,requireFromString:null}),JB={};function ZB(e){return $B.apply(this,arguments)}function $B(){return $B=a(s().mark((function e(t){var i,r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>2&&void 0!==n[2]?n[2]:{},(i=n.length>1&&void 0!==n[1]?n[1]:null)&&(t=eP(t,i,r)),JB[t]=JB[t]||tP(t),e.next=6,JB[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)}))),$B.apply(this,arguments)}function eP(e,t,i){if(e.startsWith("http"))return e;var r=i.modules||{};return r[e]?r[e]:WB?i.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(i.CDN.startsWith("http")),"".concat(i.CDN,"/").concat(t,"@").concat("3.4.15","/dist/libs/").concat(e)):KB?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function tP(e){return iP.apply(this,arguments)}function iP(){return(iP=a(s().mark((function e(t){var i,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return i=e.sent,e.next=6,i.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(WB){e.next=20;break}if(e.prev=8,e.t0=YB&&qB,!e.t0){e.next=14;break}return e.next=13,qB(t);case 13:e.t0=e.sent;case 14:return e.abrupt("return",e.t0);case 17:return e.prev=17,e.t1=e.catch(8),e.abrupt("return",null);case 20:if(!KB){e.next=22;break}return e.abrupt("return",importScripts(t));case 22:return e.next=24,fetch(t);case 24:return r=e.sent,e.next=27,r.text();case 27:return n=e.sent,e.abrupt("return",rP(n,t));case 29:case"end":return e.stop()}}),e,null,[[8,17]])})))).apply(this,arguments)}function rP(e,t){if(!WB)return null;if(KB)return eval.call(zB,e),null;var i=document.createElement("script");i.id=t;try{i.appendChild(document.createTextNode(e))}catch(t){i.text=e}return document.body.appendChild(i),null}var nP={draco:{decoderType:"object"===("undefined"==typeof WebAssembly?"undefined":w(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},sP={name:"Draco",id:WB?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:"3.4.15",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:nP};var oP=function(){function e(t,i){x(this,e),iy(this,"fields",void 0),iy(this,"metadata",void 0),function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}(Array.isArray(t)),function(e){var t,i={},r=u(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;i[n.name]&&console.warn("Schema: duplicated field name",n.name,n),i[n.name]=!0}}catch(e){r.e(e)}finally{r.f()}}(t),this.fields=t,this.metadata=i||new Map}return P(e,[{key:"compareTo",value:function(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(var t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}},{key:"select",value:function(){for(var t=Object.create(null),i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s=0,o=r;s<o.length;s++){var a=o[s];t[a]=!0}return new e(this.fields.filter((function(e){return t[e.name]})),this.metadata)}},{key:"selectAt",value:function(){for(var t=this,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return new e(r.map((function(e){return t.fields[e]})).filter(Boolean),this.metadata)}},{key:"assign",value:function(t){var i,r=this.metadata;if(t instanceof e){var n=t;i=n.fields,r=aP(aP(new Map,this.metadata),n.metadata)}else i=t;var s,o=Object.create(null),a=u(this.fields);try{for(a.s();!(s=a.n()).done;){var l=s.value;o[l.name]=l}}catch(e){a.e(e)}finally{a.f()}var c,h=u(i);try{for(h.s();!(c=h.n()).done;){var A=c.value;o[A.name]=A}}catch(e){h.e(e)}finally{h.f()}return new e(Object.values(o),r)}}])}();function aP(e,t){return new Map([].concat(l(e||new Map),l(t||new Map)))}var lP=function(){function e(t,i){x(this,e);var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;iy(this,"name",void 0),iy(this,"type",void 0),iy(this,"nullable",void 0),iy(this,"metadata",void 0),this.name=t,this.type=i,this.nullable=r,this.metadata=n}return P(e,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new e(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])}(),uP=function(e){return e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth",e}({}),cP=function(){return P((function e(){x(this,e)}),[{key:"typeId",get:function(){return uP.NONE}},{key:"compareTo",value:function(e){return this===e}}],[{key:"isNull",value:function(e){return e&&e.typeId===uP.Null}},{key:"isInt",value:function(e){return e&&e.typeId===uP.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===uP.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===uP.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===uP.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===uP.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===uP.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===uP.Date}},{key:"isTime",value:function(e){return e&&e.typeId===uP.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===uP.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===uP.Interval}},{key:"isList",value:function(e){return e&&e.typeId===uP.List}},{key:"isStruct",value:function(e){return e&&e.typeId===uP.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===uP.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===uP.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===uP.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===uP.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===uP.Dictionary}}])}(),hP=function(e,t){function i(e,t){var r;return x(this,i),iy(r=d(this,i),"isSigned",void 0),iy(r,"bitWidth",void 0),r.isSigned=e,r.bitWidth=t,r}return _(i,cP),P(i,[{key:"typeId",get:function(){return uP.Int}},{key:t,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}])}(0,Symbol.toStringTag),AP=function(){function e(){return x(this,e),d(this,e,[!0,8])}return _(e,hP),P(e)}(),dP=function(){function e(){return x(this,e),d(this,e,[!0,16])}return _(e,hP),P(e)}(),pP=function(){function e(){return x(this,e),d(this,e,[!0,32])}return _(e,hP),P(e)}(),fP=function(){function e(){return x(this,e),d(this,e,[!1,8])}return _(e,hP),P(e)}(),gP=function(){function e(){return x(this,e),d(this,e,[!1,16])}return _(e,hP),P(e)}(),mP=function(){function e(){return x(this,e),d(this,e,[!1,32])}return _(e,hP),P(e)}(),vP=32,_P=64,yP=function(e,t){function i(e){var t;return x(this,i),iy(t=d(this,i),"precision",void 0),t.precision=e,t}return _(i,cP),P(i,[{key:"typeId",get:function(){return uP.Float}},{key:t,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}])}(0,Symbol.toStringTag),bP=function(){function e(){return x(this,e),d(this,e,[vP])}return _(e,yP),P(e)}(),wP=function(){function e(){return x(this,e),d(this,e,[_P])}return _(e,yP),P(e)}(),xP=function(e,t){function i(e,t){var r;return x(this,i),iy(r=d(this,i),"listSize",void 0),iy(r,"children",void 0),r.listSize=e,r.children=[t],r}return _(i,cP),P(i,[{key:"typeId",get:function(){return uP.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:t,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}])}(0,Symbol.toStringTag);function BP(e,t,i){var r=function(e){switch(e.constructor){case Int8Array:return new AP;case Uint8Array:return new fP;case Int16Array:return new dP;case Uint16Array:return new gP;case Int32Array:return new pP;case Uint32Array:return new mP;case Float32Array:return new bP;case Float64Array:return new wP;default:throw new Error("array type not supported")}}(t.value),n=i||function(e){var t=new Map;"byteOffset"in e&&t.set("byteOffset",e.byteOffset.toString(10));"byteStride"in e&&t.set("byteStride",e.byteStride.toString(10));"normalized"in e&&t.set("normalized",e.normalized.toString());return t}(t);return new lP(e,new xP(t.size,new lP("value",r)),!1,n)}function PP(e,t,i){return BP(e,t,i?CP(i.metadata):void 0)}function CP(e){var t=new Map;for(var i in e)t.set("".concat(i,".string"),JSON.stringify(e[i]));return t}var MP={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},kP={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},EP=function(){return P((function e(t){x(this,e),iy(this,"draco",void 0),iy(this,"decoder",void 0),iy(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}),[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new this.draco.DecoderBuffer;i.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);var r=this.decoder.GetEncodedGeometryType(i),s=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var o;switch(r){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,s);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!s.ptr){var a="DRACO decompression failed: ".concat(o.error_msg());throw new Error(a)}var l=this._getDracoLoaderData(s,r,t),u=this._getMeshData(s,l,t),c=function(e){for(var t=1/0,i=1/0,r=1/0,n=-1/0,s=-1/0,o=-1/0,a=e.POSITION?e.POSITION.value:[],l=a&&a.length,u=0;u<l;u+=3){var c=a[u],h=a[u+1],A=a[u+2];t=c<t?c:t,i=h<i?h:i,r=A<r?A:r,n=c>n?c:n,s=h>s?h:s,o=A>o?A:o}return[[t,i,r],[n,s,o]]}(u.attributes),h=function(e,t,i){var r=CP(t.metadata),n=[],s=function(e){var t={};for(var i in e){var r=e[i];t[r.name||"undefined"]=r}return t}(t.attributes);for(var o in e){var a=PP(o,e[o],s[o]);n.push(a)}if(i){var l=PP("indices",i);n.push(l)}return new oP(n,r)}(u.attributes,l,u.indices);return n(n({loader:"draco",loaderData:l,header:{vertexCount:s.num_points(),boundingBox:c}},u),{},{schema:h})}finally{this.draco.destroy(i),s&&this.draco.destroy(s)}}},{key:"_getDracoLoaderData",value:function(e,t,i){var r=this._getTopLevelMetadata(e),n=this._getDracoAttributes(e,i);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:n}}},{key:"_getDracoAttributes",value:function(e,t){for(var i={},r=0;r<e.num_attributes();r++){var n=this.decoder.GetAttribute(e,r),s=this._getAttributeMetadata(e,r);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:r,metadata:s};var o=this._getQuantizationTransform(n,t);o&&(i[n.unique_id()].quantization_transform=o);var a=this._getOctahedronTransform(n,t);a&&(i[n.unique_id()].octahedron_transform=a)}return i}},{key:"_getMeshData",value:function(e,t,i){var r=this._getMeshAttributes(t,e,i);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?"triangle-strip"===i.topology?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:r}}},{key:"_getMeshAttributes",value:function(e,t,i){for(var r={},n=0,s=Object.values(e.attributes);n<s.length;n++){var o=s[n],a=this._deduceAttributeName(o,i);o.name=a;var l=this._getAttributeValues(t,o),u=l.value,c=l.size;r[a]={value:u,size:c,byteOffset:o.byte_offset,byteStride:o.byte_stride,normalized:o.normalized}}return r}},{key:"_getTriangleListIndices",value:function(e){var t=3*e.num_faces(),i=4*t,r=this.draco._malloc(i);try{return this.decoder.GetTrianglesUInt32Array(e,i,r),new Uint32Array(this.draco.HEAPF32.buffer,r,t).slice()}finally{this.draco._free(r)}}},{key:"_getTriangleStripIndices",value:function(e){var t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),function(e){for(var t=e.size(),i=new Int32Array(t),r=0;r<t;r++)i[r]=e.GetValue(r);return i}(t)}finally{this.draco.destroy(t)}}},{key:"_getAttributeValues",value:function(e,t){var i,r=kP[t.data_type],n=t.num_components,s=e.num_points()*n,o=s*r.BYTES_PER_ELEMENT,a=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;default:return e.DT_INVALID}}(this.draco,r),l=this.draco._malloc(o);try{var u=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,u,a,o,l),i=new r(this.draco.HEAPF32.buffer,l,s).slice()}finally{this.draco._free(l)}return{value:i,size:n}}},{key:"_deduceAttributeName",value:function(e,t){for(var i=e.unique_id,r=0,n=Object.entries(t.extraAttributes||{});r<n.length;r++){var s=c(n[r],2),o=s[0];if(s[1]===i)return o}var a=e.attribute_type;for(var l in MP){if(this.draco[l]===a)return MP[l]}var u=t.attributeNameEntry||"name";return e.metadata[u]?e.metadata[u].string:"CUSTOM_ATTRIBUTE_".concat(i)}},{key:"_getTopLevelMetadata",value:function(e){var t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}},{key:"_getAttributeMetadata",value:function(e,t){var i=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(i)}},{key:"_getDracoMetadata",value:function(e){if(!e||!e.ptr)return{};for(var t={},i=this.metadataQuerier.NumEntries(e),r=0;r<i;r++){var n=this.metadataQuerier.GetEntryName(e,r);t[n]=this._getDracoMetadataField(e,n)}return t}},{key:"_getDracoMetadataField",value:function(e,t){var i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,i);var r=function(e){for(var t=e.size(),i=new Int32Array(t),r=0;r<t;r++)i[r]=e.GetValue(r);return i}(i);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:r}}finally{this.draco.destroy(i)}}},{key:"_disableAttributeTransforms",value:function(e){var t,i=e.quantizedAttributes,r=void 0===i?[]:i,n=e.octahedronAttributes,s=void 0===n?[]:n,o=u([].concat(l(r),l(s)));try{for(o.s();!(t=o.n()).done;){var a=t.value;this.decoder.SkipAttributeTransform(this.draco[a])}}catch(e){o.e(e)}finally{o.f()}}},{key:"_getQuantizationTransform",value:function(e,t){var i=this,r=t.quantizedAttributes,n=void 0===r?[]:r,s=e.attribute_type();if(n.map((function(e){return i.decoder[e]})).includes(s)){var o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(e))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map((function(e){return o.min_value(e)}))}}finally{this.draco.destroy(o)}}return null}},{key:"_getOctahedronTransform",value:function(e,t){var i=this,r=t.octahedronAttributes,n=void 0===r?[]:r,s=e.attribute_type();if(n.map((function(e){return i.decoder[e]})).includes(s)){var o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(e))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}}])}();var SP,TP="https://www.gstatic.com/draco/versioned/decoders/".concat("1.5.5"),FP="".concat(TP,"/draco_decoder.js"),IP="".concat(TP,"/draco_wasm_wrapper.js"),DP="".concat(TP,"/draco_decoder.wasm");function RP(e){return OP.apply(this,arguments)}function OP(){return(OP=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.modules||{},SP=i.draco3d?SP||i.draco3d.createDecoderModule({}).then((function(e){return{draco:e}})):SP||LP(t),e.next=4,SP;case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function LP(e){return jP.apply(this,arguments)}function jP(){return(jP=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.draco&&t.draco.decoderType,e.next="js"===e.t0?3:(e.t0,7);break;case 3:return e.next=5,ZB(FP,"draco",t);case 5:return i=e.sent,e.abrupt("break",21);case 7:return e.t1=Promise,e.next=10,ZB(IP,"draco",t);case 10:return e.t2=e.sent,e.next=13,ZB(DP,"draco",t);case 13:return e.t3=e.sent,e.t4=[e.t2,e.t3],e.next=17,e.t1.all.call(e.t1,e.t4);case 17:n=e.sent,o=c(n,2),i=o[0],r=o[1];case 21:return i=i||globalThis.DracoDecoderModule,e.next=24,UP(i,r);case 24:return e.abrupt("return",e.sent);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UP(e,t){var i={};return t&&(i.wasmBinary=t),new Promise((function(t){e(n(n({},i),{},{onModuleLoaded:function(e){return t({draco:e})}}))}))}var NP=n(n({},sP),{},{parse:function(e,t){return VP.apply(this,arguments)}});function VP(){return(VP=a(s().mark((function e(t,i){var r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,RP(i);case 2:return r=e.sent,n=r.draco,o=new EP(n),e.prev=5,e.abrupt("return",o.parseSync(t,null==i?void 0:i.draco));case 7:return e.prev=7,o.destroy(),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[5,,7,10]])})))).apply(this,arguments)}function QP(e){var t={};for(var i in e){var r=e[i];if("indices"!==i){var n=HP(r);t[i]=n}}return t}function HP(e){var t=function(e){var t=e,i=1,r=0;e&&e.value&&(t=e.value,i=e.size||1);t&&(ArrayBuffer.isView(t)||(t=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return null;if(Array.isArray(e))return new t(e);if(i&&!(e instanceof t))return new t(e);return e}(t,Float32Array)),r=t.length/i);return{buffer:t,size:i,count:r}}(e),i=t.buffer,r=t.size;return{value:i,size:r,byteOffset:0,count:t.count,type:pB(r),componentType:fB(i)}}var GP="KHR_draco_mesh_compression",zP=GP;function WP(){return(WP=a(s().mark((function e(t,i,r){var n,o,a,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=i&&null!==(n=i.gltf)&&void 0!==n&&n.decompressMeshes){e.next=2;break}return e.abrupt("return");case 2:o=new _B(t),a=[],l=u(JP(o));try{for(l.s();!(c=l.n()).done;)h=c.value,o.getObjectExtension(h,GP)&&a.push(KP(o,h,i,r))}catch(e){l.e(e)}finally{l.f()}return e.next=8,Promise.all(a);case 8:o.removeExtension(GP);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function KP(e,t,i,r){return XP.apply(this,arguments)}function XP(){return XP=a(s().mark((function e(t,i,r,o){var a,l,u,h,A,d,p,f,g,m,v,_,y,b;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.getObjectExtension(i,GP)){e.next=3;break}return e.abrupt("return");case 3:return l=t.getTypedArrayForBufferView(a.bufferView),u=iB(l.buffer,l.byteOffset),h=o.parse,delete(A=n({},r))["3d-tiles"],e.next=10,h(u,NP,A,o);case 10:for(d=e.sent,p=QP(d.attributes),f=0,g=Object.entries(p);f<g.length;f++)m=c(g[f],2),v=m[0],_=m[1],v in i.attributes&&(y=i.attributes[v],null!=(b=t.getAccessor(y))&&b.min&&null!=b&&b.max&&(_.min=b.min,_.max=b.max));i.attributes=p,d.indices&&(i.indices=HP(d.indices)),YP(i);case 16:case"end":return e.stop()}}),e)}))),XP.apply(this,arguments)}function qP(e,t){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");var o=n.DracoWriter.encodeSync({attributes:e}),a=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:e}),l=n._addFauxAttributes(a.attributes),u=n.addBufferView(o);return{primitives:[{attributes:l,mode:r,extensions:b({},GP,{bufferView:u,attributes:l})}]}}function YP(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function JP(e){var t,r,n,o,a,l;return s().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=u(e.json.meshes||[]),i.prev=1,t.s();case 3:if((r=t.n()).done){i.next=24;break}n=r.value,o=u(n.primitives),i.prev=6,o.s();case 8:if((a=o.n()).done){i.next=14;break}return l=a.value,i.next=12,l;case 12:i.next=8;break;case 14:i.next=19;break;case 16:i.prev=16,i.t0=i.catch(6),o.e(i.t0);case 19:return i.prev=19,o.f(),i.finish(19);case 22:i.next=3;break;case 24:i.next=29;break;case 26:i.prev=26,i.t1=i.catch(1),t.e(i.t1);case 29:return i.prev=29,t.f(),i.finish(29);case 32:case"end":return i.stop()}}),i,null,[[1,26,29,32],[6,16,19,22]])}var ZP=Object.freeze({__proto__:null,name:zP,preprocess:function(e,t,i){var r,n=new _B(e),s=u(JP(n));try{for(s.s();!(r=s.n()).done;){var o=r.value;n.getObjectExtension(o,GP)}}catch(e){s.e(e)}finally{s.f()}},decode:function(e,t,i){return WP.apply(this,arguments)},encode:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new _B(e),n=u(r.json.meshes||[]);try{for(n.s();!(t=n.n()).done;){qP(t.value,i),r.addRequiredExtension(GP)}}catch(e){n.e(e)}finally{n.f()}}});function $P(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}var eC={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function tC(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).precision,i=void 0===t?eC.precision:t;return e=function(e){return Math.round(e/eC.EPSILON)*eC.EPSILON}(e),"".concat(parseFloat(e.toPrecision(i)))}function iC(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rC(e,t,i){var r=eC.EPSILON;i&&(eC.EPSILON=i);try{if(e===t)return!0;if(iC(e)&&iC(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!rC(e[n],t[n]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):"number"==typeof e&&"number"==typeof t&&Math.abs(e-t)<=eC.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{eC.EPSILON=r}}function nC(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}var sC=function(){function e(){return x(this,e),d(this,e,arguments)}return _(e,nC(Array)),P(e,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<this.ELEMENTS;++i)this[i]=e[i+t];return this.check()}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<this.ELEMENTS;++i)e[t+i]=this[i];return e}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"to",value:function(e){return e===this?this:iC(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(eC)}},{key:"formatString",value:function(e){for(var t="",i=0;i<this.ELEMENTS;++i)t+=(i>0?", ":"")+tC(this[i],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!rC(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,i){if(void 0===i)return this.lerp(this,e,t);for(var r=0;r<this.ELEMENTS;++r){var n=e[r];this[r]=n+i*(t[r]-n)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.min(Math.max(this[i],e[i]),t[i]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]+=s[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]-=s[o];return this.check()}},{key:"scale",value:function(e){if("number"==typeof e)for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(var i=0;i<this.ELEMENTS&&i<e.length;++i)this[i]*=e[i];return this.check()}},{key:"multiplyByScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"check",value:function(){if(eC.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.multiplyByScalar(1/e)}},{key:"clampScalar",value:function(e,t){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.min(Math.max(this[i],e),t);return this.check()}},{key:"elements",get:function(){return this}}])}();function oC(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function aC(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(eC.debug&&!function(e,t){if(e.length!==t)return!1;for(var i=0;i<e.length;++i)if(!Number.isFinite(e[i]))return!1;return!0}(e,t))throw new Error("math.gl: ".concat(i," some fields set to invalid numbers'"));return e}var lC=function(){function e(){return x(this,e),d(this,e,arguments)}return _(e,sC),P(e,[{key:"x",get:function(){return this[0]},set:function(e){this[0]=oC(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=oC(e)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,i=0;i<this.ELEMENTS;++i){var r=this[i]-e[i];t+=r*r}return oC(t)}},{key:"dot",value:function(e){for(var t=0,i=0;i<this.ELEMENTS;++i)t+=this[i]*e[i];return oC(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]*=s[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]/=s[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return $P(e>=0&&e<this.ELEMENTS,"index is out of range"),oC(this[e])}},{key:"setComponent",value:function(e,t){return $P(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}}])}(),uC="undefined"!=typeof Float32Array?Float32Array:Array;function cC(e,t,i){var r=t[0],n=t[1],s=t[2];return e[0]=r*i[0]+n*i[3]+s*i[6],e[1]=r*i[1]+n*i[4]+s*i[7],e[2]=r*i[2]+n*i[5]+s*i[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),function(){var e,t=(e=new uC(2),uC!=Float32Array&&(e[0]=0,e[1]=0),e)}(),function(){var e,t=(e=new uC(3),uC!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e)}();var hC,AC,dC=[0,0,0],pC=function(){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return x(this,e),t=d(this,e,[-0,-0,-0]),1===arguments.length&&iC(i)?t.copy(i):(eC.debug&&(oC(i),oC(r),oC(n)),t[0]=i,t[1]=r,t[2]=n),t}return _(e,lC),P(e,[{key:"set",value:function(e,t,i){return this[0]=e,this[1]=t,this[2]=i,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return eC.debug&&(oC(e.x),oC(e.y),oC(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=oC(e)}},{key:"angle",value:function(e){return function(e,t){var i=e[0],r=e[1],n=e[2],s=t[0],o=t[1],a=t[2],l=Math.sqrt(i*i+r*r+n*n)*Math.sqrt(s*s+o*o+a*a),u=l&&function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}(this,e)}},{key:"cross",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=i[0],a=i[1],l=i[2];e[0]=n*l-s*a,e[1]=s*o-r*l,e[2]=r*a-n*o}(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,i=e.origin;return function(e,t,i,r){var n=[],s=[];n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[0],s[1]=n[1]*Math.cos(r)-n[2]*Math.sin(r),s[2]=n[1]*Math.sin(r)+n[2]*Math.cos(r),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2]}(this,this,void 0===i?dC:i,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,i=e.origin;return function(e,t,i,r){var n=[],s=[];n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[2]*Math.sin(r)+n[0]*Math.cos(r),s[1]=n[1],s[2]=n[2]*Math.cos(r)-n[0]*Math.sin(r),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2]}(this,this,void 0===i?dC:i,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,i=e.origin;return function(e,t,i,r){var n=[],s=[];n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[0]*Math.cos(r)-n[1]*Math.sin(r),s[1]=n[0]*Math.sin(r)+n[1]*Math.cos(r),s[2]=n[2],e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2]}(this,this,void 0===i?dC:i,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=i[3]*r+i[7]*n+i[11]*s+i[15];o=o||1,e[0]=(i[0]*r+i[4]*n+i[8]*s+i[12])/o,e[1]=(i[1]*r+i[5]*n+i[9]*s+i[13])/o,e[2]=(i[2]*r+i[6]*n+i[10]*s+i[14])/o}(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=i[3]*r+i[7]*n+i[11]*s||1;e[0]=(i[0]*r+i[4]*n+i[8]*s)/o,e[1]=(i[1]*r+i[5]*n+i[9]*s)/o,e[2]=(i[2]*r+i[6]*n+i[10]*s)/o}(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return cC(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,i){var r=t[0],n=t[1];e[0]=i[0]*r+i[2]*n,e[1]=i[1]*r+i[3]*n,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return function(e,t,i){var r=i[0],n=i[1],s=i[2],o=i[3],a=t[0],l=t[1],u=t[2],c=n*u-s*l,h=s*a-r*u,A=r*l-n*a,d=n*A-s*h,p=s*c-r*A,f=r*h-n*c,g=2*o;c*=g,h*=g,A*=g,d*=2,p*=2,f*=2,e[0]=a+c+d,e[1]=l+h+p,e[2]=u+A+f}(this,this,e),this.check()}}],[{key:"ZERO",get:function(){return hC||(hC=new e(0,0,0),Object.freeze(hC)),hC}}])}(),fC=function(){function e(){return x(this,e),d(this,e,arguments)}return _(e,sC),P(e,[{key:"toString",value:function(){var e="[";if(eC.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var i=0;i<this.RANK;++i)e+=" ".concat(this[i*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,i){return this[t*this.RANK+e]=oC(i),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),i=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[i+r];return t}},{key:"setColumn",value:function(e,t){for(var i=e*this.RANK,r=0;r<this.RANK;++r)this[i+r]=t[r];return this}}])}();function gC(e,t,i){var r=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],A=i[0],d=i[1],p=i[2],f=i[3],g=i[4],m=i[5],v=i[6],_=i[7],y=i[8];return e[0]=A*r+d*o+p*u,e[1]=A*n+d*a+p*c,e[2]=A*s+d*l+p*h,e[3]=f*r+g*o+m*u,e[4]=f*n+g*a+m*c,e[5]=f*s+g*l+m*h,e[6]=v*r+_*o+y*u,e[7]=v*n+_*a+y*c,e[8]=v*s+_*l+y*h,e}function mC(e,t,i){var r=i[0],n=i[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=n*t[3],e[4]=n*t[4],e[5]=n*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}!function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL1ROW0=3]="COL1ROW0",e[e.COL1ROW1=4]="COL1ROW1",e[e.COL1ROW2=5]="COL1ROW2",e[e.COL2ROW0=6]="COL2ROW0",e[e.COL2ROW1=7]="COL2ROW1",e[e.COL2ROW2=8]="COL2ROW2"}(AC||(AC={}));var vC,_C,yC=Object.freeze([1,0,0,0,1,0,0,0,1]),bC=function(){function e(t){for(var i,r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return x(this,e),i=d(this,e,[-0,-0,-0,-0,-0,-0,-0,-0,-0]),1===arguments.length&&Array.isArray(t)?i.copy(t):n.length>0?i.copy([t].concat(n)):i.identity(),i}return _(e,fC),P(e,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return AC}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}},{key:"identity",value:function(){return this.copy(yC)}},{key:"fromObject",value:function(e){return this.check()}},{key:"fromQuaternion",value:function(e){return function(e,t){var i=t[0],r=t[1],n=t[2],s=t[3],o=i+i,a=r+r,l=n+n,u=i*o,c=r*o,h=r*a,A=n*o,d=n*a,p=n*l,f=s*o,g=s*a,m=s*l;e[0]=1-h-p,e[3]=c-m,e[6]=A+g,e[1]=c+m,e[4]=1-u-p,e[7]=d-f,e[2]=A-g,e[5]=d+f,e[8]=1-u-h}(this,e),this.check()}},{key:"set",value:function(e,t,i,r,n,s,o,a,l){return this[0]=e,this[1]=t,this[2]=i,this[3]=r,this[4]=n,this[5]=s,this[6]=o,this[7]=a,this[8]=l,this.check()}},{key:"setRowMajor",value:function(e,t,i,r,n,s,o,a,l){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=n,this[5]=a,this[6]=i,this[7]=s,this[8]=l,this.check()}},{key:"determinant",value:function(){return function(e){var t=e[0],i=e[1],r=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],u=e[8];return t*(u*s-o*l)+i*(-u*n+o*a)+r*(l*n-s*a)}(this)}},{key:"transpose",value:function(){return function(e,t){if(e===t){var i=t[1],r=t[2],n=t[5];e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=r,e[7]=n}else 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,this),this.check()}},{key:"invert",value:function(){return function(e,t){var i=t[0],r=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],u=t[7],c=t[8],h=c*o-a*u,A=-c*s+a*l,d=u*s-o*l,p=i*h+r*A+n*d;p&&(p=1/p,e[0]=h*p,e[1]=(-c*r+n*u)*p,e[2]=(a*r-n*o)*p,e[3]=A*p,e[4]=(c*i-n*l)*p,e[5]=(-a*i+n*s)*p,e[6]=d*p,e[7]=(-u*i+r*l)*p,e[8]=(o*i-r*s)*p)}(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return gC(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return gC(this,this,e),this.check()}},{key:"rotate",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],A=Math.sin(i),d=Math.cos(i);e[0]=d*r+A*o,e[1]=d*n+A*a,e[2]=d*s+A*l,e[3]=d*o-A*r,e[4]=d*a-A*n,e[5]=d*l-A*s,e[6]=u,e[7]=c,e[8]=h}(this,this,e),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?mC(this,this,e):mC(this,this,[e,e]),this.check()}},{key:"translate",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],A=i[0],d=i[1];e[0]=r,e[1]=n,e[2]=s,e[3]=o,e[4]=a,e[5]=l,e[6]=A*r+d*o+u,e[7]=A*n+d*a+c,e[8]=A*s+d*l+h}(this,this,e),this.check()}},{key:"transform",value:function(e,t){var i;switch(e.length){case 2:i=function(e,t,i){var r=t[0],n=t[1];return e[0]=i[0]*r+i[3]*n+i[6],e[1]=i[1]*r+i[4]*n+i[7],e}(t||[-0,-0],e,this);break;case 3:i=cC(t||[-0,-0,-0],e,this);break;case 4:i=function(e,t,i){var r=t[0],n=t[1],s=t[2];return e[0]=i[0]*r+i[3]*n+i[6]*s,e[1]=i[1]*r+i[4]*n+i[7]*s,e[2]=i[2]*r+i[5]*n+i[8]*s,e[3]=t[3],e}(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return aC(i,e.length),i}},{key:"transformVector",value:function(e,t){return this.transform(e,t)}},{key:"transformVector2",value:function(e,t){return this.transform(e,t)}},{key:"transformVector3",value:function(e,t){return this.transform(e,t)}}],[{key:"IDENTITY",get:function(){return xC()}},{key:"ZERO",get:function(){return wC()}}])}();function wC(){return vC||(vC=new bC([0,0,0,0,0,0,0,0,0]),Object.freeze(vC)),vC}function xC(){return _C||(_C=new bC,Object.freeze(_C)),_C}var BC={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PC={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},CC="KHR_texture_transform",MC=CC,kC=new pC,EC=new bC,SC=new bC;function TC(){return(TC=a(s().mark((function e(t,i){var r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=new _B(t),r.getExtension(CC)){e.next=4;break}return e.abrupt("return");case 4:for(n=t.json.materials||[],o=0;o<n.length;o++)FC(o,t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function FC(e,t){var i,r,n,s=[],o=null===(i=t.json.materials)||void 0===i?void 0:i[e],a=null==o||null===(r=o.pbrMetallicRoughness)||void 0===r?void 0:r.baseColorTexture;a&&IC(t,e,a,s);var l=null==o?void 0:o.emissiveTexture;l&&IC(t,e,l,s);var u=null==o?void 0:o.normalTexture;u&&IC(t,e,u,s);var c=null==o?void 0:o.occlusionTexture;c&&IC(t,e,c,s);var h=null==o||null===(n=o.pbrMetallicRoughness)||void 0===n?void 0:n.metallicRoughnessTexture;h&&IC(t,e,h,s)}function IC(e,t,i,r){var n=function(e,t){var i,r=null===(i=e.extensions)||void 0===i?void 0:i[CC],n=e.texCoord,s=void 0===n?0:n,o=r.texCoord,a=void 0===o?s:o,l=-1!==t.findIndex((function(e){var t=c(e,2),i=t[0],r=t[1];return i===s&&r===a}));if(!l){var u=function(e){var t=e.offset,i=void 0===t?[0,0]:t,r=e.rotation,n=void 0===r?0:r,s=e.scale,o=void 0===s?[1,1]:s,a=(new bC).set(1,0,0,0,1,0,i[0],i[1],1),l=EC.set(Math.cos(n),Math.sin(n),0,-Math.sin(n),Math.cos(n),0,0,0,1),u=SC.set(o[0],0,0,0,o[1],0,0,0,1);return a.multiplyRight(l).multiplyRight(u)}(r);return s!==a&&(e.texCoord=a),t.push([s,a]),{originalTexCoord:s,texCoord:a,matrix:u}}return null}(i,r);if(n){var s,o=u(e.json.meshes||[]);try{for(o.s();!(s=o.n()).done;){var a,l=u(s.value.primitives);try{for(l.s();!(a=l.n()).done;){var h=a.value,A=h.material;Number.isFinite(A)&&t===A&&DC(e,h,n)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}}}function DC(e,t,i){var r=i.originalTexCoord,n=i.texCoord,s=i.matrix,o=t.attributes["TEXCOORD_".concat(r)];if(Number.isFinite(o)){var a,l=null===(a=e.json.accessors)||void 0===a?void 0:a[o];if(l&&l.bufferView){var u,c=null===(u=e.json.bufferViews)||void 0===u?void 0:u[l.bufferView];if(c){for(var h=e.buffers[c.buffer],A=h.arrayBuffer,d=(h.byteOffset||0)+(l.byteOffset||0)+(c.byteOffset||0),p=gB(l,c),f=p.ArrayType,g=p.length,m=PC[l.componentType],v=BC[l.type],_=c.byteStride||m*v,y=new Float32Array(g),b=0;b<l.count;b++){var w=new f(A,d+b*_,2);kC.set(w[0],w[1],1),kC.transformByMatrix3(s),y.set([kC[0],kC[1]],b*v)}r===n?function(e,t,i,r){e.componentType=5126,i.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength}),t.buffer=i.length-1,t.byteLength=r.buffer.byteLength,t.byteOffset=0,delete t.byteStride}(l,c,e.buffers,y):function(e,t,i,r,n){r.buffers.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength});var s=r.json.bufferViews;if(!s)return;s.push({buffer:r.buffers.length-1,byteLength:n.buffer.byteLength,byteOffset:0});var o=r.json.accessors;if(!o)return;o.push({bufferView:(null==s?void 0:s.length)-1,byteOffset:0,componentType:5126,count:t.count,type:"VEC2"}),i.attributes["TEXCOORD_".concat(e)]=o.length-1}(n,l,t,e,y)}}}}var RC=Object.freeze({__proto__:null,name:MC,decode:function(e,t){return TC.apply(this,arguments)}}),OC="KHR_lights_punctual",LC=OC;function jC(){return(jC=a(s().mark((function e(t){var i,r,n,o,a,l,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=new _B(t),r=i.json,(n=i.getExtension(OC))&&(i.json.lights=n.lights,i.removeExtension(OC)),o=u(r.nodes||[]);try{for(o.s();!(a=o.n()).done;)l=a.value,(c=i.getObjectExtension(l,OC))&&(l.light=c.light),i.removeObjectExtension(l,OC)}catch(e){o.e(e)}finally{o.f()}case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UC(){return(UC=a(s().mark((function e(t){var i,r,n,o,a,l,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=new _B(t),(r=i.json).lights&&(sB(!(n=i.addExtension(OC)).lights),n.lights=r.lights,delete r.lights),i.json.lights){o=u(i.json.lights);try{for(o.s();!(a=o.n()).done;)l=a.value,c=l.node,i.addObjectExtension(c,OC,l)}catch(e){o.e(e)}finally{o.f()}delete i.json.lights}case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var NC="KHR_materials_unlit",VC=NC;function QC(){return(QC=a(s().mark((function e(t){var i,r,n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=new _B(t),r=i.json,n=u(r.materials||[]);try{for(n.s();!(o=n.n()).done;)a=o.value,a.extensions&&a.extensions.KHR_materials_unlit&&(a.unlit=!0),i.removeObjectExtension(a,NC)}catch(e){n.e(e)}finally{n.f()}i.removeExtension(NC);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var HC="KHR_techniques_webgl",GC=HC;function zC(){return(zC=a(s().mark((function e(t){var i,r,n,o,a,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=new _B(t),r=i.json,n=i.getExtension(HC)){o=KC(n,i),a=u(r.materials||[]);try{for(a.s();!(l=a.n()).done;)c=l.value,(h=i.getObjectExtension(c,HC))&&(c.technique=Object.assign({},h,o[h.technique]),c.technique.values=XC(c.technique,i)),i.removeObjectExtension(c,HC)}catch(e){a.e(e)}finally{a.f()}i.removeExtension(HC)}case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function WC(){return(WC=a(s().mark((function e(t,i){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function KC(e,t){var i=e.programs,r=void 0===i?[]:i,n=e.shaders,s=void 0===n?[]:n,o=e.techniques,a=void 0===o?[]:o,l=new TextDecoder;return s.forEach((function(e){if(!Number.isFinite(e.bufferView))throw new Error("KHR_techniques_webgl: no shader code");e.code=l.decode(t.getTypedArrayForBufferView(e.bufferView))})),r.forEach((function(e){e.fragmentShader=s[e.fragmentShader],e.vertexShader=s[e.vertexShader]})),a.forEach((function(e){e.program=r[e.program]})),a}function XC(e,t){var i=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach((function(t){e.uniforms[t].value&&!(t in i)&&(i[t]=e.uniforms[t].value)})),Object.keys(i).forEach((function(e){"object"===w(i[e])&&void 0!==i[e].index&&(i[e].texture=t.getTexture(i[e].index))})),i}var qC="EXT_feature_metadata",YC=qC;function JC(){return(JC=a(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ZC(new _B(t));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ZC(e){var t,i=e.getExtension(qC),r=null==i||null===(t=i.schema)||void 0===t?void 0:t.classes,n=null==i?void 0:i.featureTables;if((null==i?void 0:i.featureTextures)&&console.warn('featureTextures is not yet supported in the "EXT_feature_metadata" extension.'),r&&n)for(var s in r){var o=r[s],a=tM(n,s);a&&$C(e,a,o)}}function $C(e,t,i){for(var r in i.properties){var n,s=i.properties[r],o=null==t||null===(n=t.properties)||void 0===n?void 0:n[r],a=t.count;if(o){var l=eM(e,s,a,o);o.data=l}}}function eM(e,t,i,r){var n=r.bufferView,s=e.getTypedArrayForBufferView(n);if("STRING"===t.type){var o=r.stringOffsetBufferView;s=function(e,t,i){for(var r=[],n=new TextDecoder("utf8"),s=0,o=4,a=0;a<i;a++){var l=t[(a+1)*o]-t[a*o],u=e.subarray(s,l+s),c=n.decode(u);r.push(c),s+=l}return r}(s,e.getTypedArrayForBufferView(o),i)}return s}function tM(e,t){for(var i in e){var r=e[i];if(r.class===t)return r}return null}var iM=[LB,NB,HB,ZP,Object.freeze({__proto__:null,name:LC,decode:function(e){return jC.apply(this,arguments)},encode:function(e){return UC.apply(this,arguments)}}),Object.freeze({__proto__:null,name:VC,decode:function(e){return QC.apply(this,arguments)},encode:function(e){var t=new _B(e),i=t.json;if(t.materials){var r,n=u(i.materials||[]);try{for(n.s();!(r=n.n()).done;){var s=r.value;s.unlit&&(delete s.unlit,t.addObjectExtension(s,NC,{}),t.addExtension(NC))}}catch(e){n.e(e)}finally{n.f()}}}}),Object.freeze({__proto__:null,name:GC,decode:function(e){return zC.apply(this,arguments)},encode:function(e,t){return WC.apply(this,arguments)}}),RC,Object.freeze({__proto__:null,name:YC,decode:function(e){return JC.apply(this,arguments)}})];function rM(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=iM.filter((function(e){return oM(e.name,i)})),s=u(n);try{for(s.s();!(t=s.n()).done;){var o,a=t.value;null===(o=a.preprocess)||void 0===o||o.call(a,e,i,r)}}catch(e){s.e(e)}finally{s.f()}}function nM(e){return sM.apply(this,arguments)}function sM(){return sM=a(s().mark((function e(t){var i,r,n,o,a,l,c,h=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h.length>1&&void 0!==h[1]?h[1]:{},r=h.length>2?h[2]:void 0,n=iM.filter((function(e){return oM(e.name,i)})),o=u(n),e.prev=4,o.s();case 6:if((a=o.n()).done){e.next=12;break}return l=a.value,e.next=10,null===(c=l.decode)||void 0===c?void 0:c.call(l,t,i,r);case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),o.e(e.t0);case 17:return e.prev=17,o.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,14,17,20]])}))),sM.apply(this,arguments)}function oM(e,t){var i,r=(null==t||null===(i=t.gltf)||void 0===i?void 0:i.excludeExtensions)||{};return!(e in r&&!r[e])}var aM="KHR_binary_glTF";var lM={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},uM={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},cM=function(){return P((function e(){x(this,e),iy(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}),iy(this,"json",void 0)}),[{key:"normalize",value:function(e,t){this.json=e.json;var i=e.json;switch(i.asset&&i.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version ".concat(i.asset.version))}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(i),this._convertTopLevelObjectsToArrays(i),function(e){var t,i=new _B(e),r=i.json,n=u(r.images||[]);try{for(n.s();!(t=n.n()).done;){var s=t.value,o=i.getObjectExtension(s,aM);o&&Object.assign(s,o),i.removeObjectExtension(s,aM)}}catch(e){n.e(e)}finally{n.f()}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,i.removeExtension(aM)}(e),this._convertObjectIdsToArrayIndices(i),this._updateObjects(i),this._updateMaterial(i)}},{key:"_addAsset",value:function(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}},{key:"_convertTopLevelObjectsToArrays",value:function(e){for(var t in lM)this._convertTopLevelObjectToArray(e,t)}},{key:"_convertTopLevelObjectToArray",value:function(e,t){var i=e[t];if(i&&!Array.isArray(i))for(var r in e[t]=[],i){var n=i[r];n.id=n.id||r;var s=e[t].length;e[t].push(n),this.idToIndexMap[t][r]=s}}},{key:"_convertObjectIdsToArrayIndices",value:function(e){for(var t in lM)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));var i,r=u(e.textures);try{for(r.s();!(i=r.n()).done;){var n=i.value;this._convertTextureIds(n)}}catch(e){r.e(e)}finally{r.f()}var s,o=u(e.meshes);try{for(o.s();!(s=o.n()).done;){var a=s.value;this._convertMeshIds(a)}}catch(e){o.e(e)}finally{o.f()}var l,c=u(e.nodes);try{for(c.s();!(l=c.n()).done;){var h=l.value;this._convertNodeIds(h)}}catch(e){c.e(e)}finally{c.f()}var A,d=u(e.scenes);try{for(d.s();!(A=d.n()).done;){var p=A.value;this._convertSceneIds(p)}}catch(e){d.e(e)}finally{d.f()}}},{key:"_convertTextureIds",value:function(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}},{key:"_convertMeshIds",value:function(e){var t,i=u(e.primitives);try{for(i.s();!(t=i.n()).done;){var r=t.value,n=r.attributes,s=r.indices,o=r.material;for(var a in n)n[a]=this._convertIdToIndex(n[a],"accessor");s&&(r.indices=this._convertIdToIndex(s,"accessor")),o&&(r.material=this._convertIdToIndex(o,"material"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_convertNodeIds",value:function(e){var t=this;e.children&&(e.children=e.children.map((function(e){return t._convertIdToIndex(e,"node")}))),e.meshes&&(e.meshes=e.meshes.map((function(e){return t._convertIdToIndex(e,"mesh")})))}},{key:"_convertSceneIds",value:function(e){var t=this;e.nodes&&(e.nodes=e.nodes.map((function(e){return t._convertIdToIndex(e,"node")})))}},{key:"_convertIdsToIndices",value:function(e,t){e[t]||(console.warn("gltf v1: json doesn't contain attribute ".concat(t)),e[t]=[]);var i,r=u(e[t]);try{for(r.s();!(i=r.n()).done;){var n=i.value;for(var s in n){var o=n[s],a=this._convertIdToIndex(o,s);n[s]=a}}}catch(e){r.e(e)}finally{r.f()}}},{key:"_convertIdToIndex",value:function(e,t){var i=uM[t];if(i in this.idToIndexMap){var r=this.idToIndexMap[i][e];if(!Number.isFinite(r))throw new Error("gltf v1: failed to resolve ".concat(t," with id ").concat(e));return r}return e}},{key:"_updateObjects",value:function(e){var t,i=u(this.json.buffers);try{for(i.s();!(t=i.n()).done;){delete t.value.type}}catch(e){i.e(e)}finally{i.f()}}},{key:"_updateMaterial",value:function(e){var t,i=u(e.materials);try{var r,n,s,o=function(){var i=t.value;i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};var o=(null===(r=i.values)||void 0===r?void 0:r.tex)||(null===(n=i.values)||void 0===n?void 0:n.texture2d_0)||(null===(s=i.values)||void 0===s?void 0:s.diffuseTex),a=e.textures.findIndex((function(e){return e.id===o}));-1!==a&&(i.pbrMetallicRoughness.baseColorTexture={index:a})};for(i.s();!(t=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}}}])}();function hM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(new cM).normalize(e,t)}var AM={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},dM={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},pM=10240,fM=10241,gM=10242,mM=10243,vM=10497,_M=9986,yM={magFilter:pM,minFilter:fM,wrapS:gM,wrapT:mM},bM=b(b(b(b({},pM,9729),fM,_M),gM,vM),mM,vM);var wM=function(){return P((function e(){x(this,e),iy(this,"baseUri",""),iy(this,"json",{}),iy(this,"buffers",[]),iy(this,"images",[])}),[{key:"postProcess",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.json,r=e.buffers,n=void 0===r?[]:r,s=e.images,o=void 0===s?[]:s,a=e.baseUri,l=void 0===a?"":a;return sB(i),this.baseUri=l,this.json=i,this.buffers=n,this.images=o,this._resolveTree(this.json,t),this.json}},{key:"_resolveTree",value:function(e){var t=this;e.bufferViews&&(e.bufferViews=e.bufferViews.map((function(e,i){return t._resolveBufferView(e,i)}))),e.images&&(e.images=e.images.map((function(e,i){return t._resolveImage(e,i)}))),e.samplers&&(e.samplers=e.samplers.map((function(e,i){return t._resolveSampler(e,i)}))),e.textures&&(e.textures=e.textures.map((function(e,i){return t._resolveTexture(e,i)}))),e.accessors&&(e.accessors=e.accessors.map((function(e,i){return t._resolveAccessor(e,i)}))),e.materials&&(e.materials=e.materials.map((function(e,i){return t._resolveMaterial(e,i)}))),e.meshes&&(e.meshes=e.meshes.map((function(e,i){return t._resolveMesh(e,i)}))),e.nodes&&(e.nodes=e.nodes.map((function(e,i){return t._resolveNode(e,i)}))),e.skins&&(e.skins=e.skins.map((function(e,i){return t._resolveSkin(e,i)}))),e.scenes&&(e.scenes=e.scenes.map((function(e,i){return t._resolveScene(e,i)}))),void 0!==e.scene&&(e.scene=e.scenes[this.json.scene])}},{key:"getScene",value:function(e){return this._get("scenes",e)}},{key:"getNode",value:function(e){return this._get("nodes",e)}},{key:"getSkin",value:function(e){return this._get("skins",e)}},{key:"getMesh",value:function(e){return this._get("meshes",e)}},{key:"getMaterial",value:function(e){return this._get("materials",e)}},{key:"getAccessor",value:function(e){return this._get("accessors",e)}},{key:"getCamera",value:function(e){return null}},{key:"getTexture",value:function(e){return this._get("textures",e)}},{key:"getSampler",value:function(e){return this._get("samplers",e)}},{key:"getImage",value:function(e){return this._get("images",e)}},{key:"getBufferView",value:function(e){return this._get("bufferViews",e)}},{key:"getBuffer",value:function(e){return this._get("buffers",e)}},{key:"_get",value:function(e,t){if("object"===w(t))return t;var i=this.json[e]&&this.json[e][t];return i||console.warn("glTF file error: Could not find ".concat(e,"[").concat(t,"]")),i}},{key:"_resolveScene",value:function(e,t){var i=this;return e.id=e.id||"scene-".concat(t),e.nodes=(e.nodes||[]).map((function(e){return i.getNode(e)})),e}},{key:"_resolveNode",value:function(e,t){var i=this;return e.id=e.id||"node-".concat(t),e.children&&(e.children=e.children.map((function(e){return i.getNode(e)}))),void 0!==e.mesh?e.mesh=this.getMesh(e.mesh):void 0!==e.meshes&&e.meshes.length&&(e.mesh=e.meshes.reduce((function(e,t){var r=i.getMesh(t);return e.id=r.id,e.primitives=e.primitives.concat(r.primitives),e}),{primitives:[]})),void 0!==e.camera&&(e.camera=this.getCamera(e.camera)),void 0!==e.skin&&(e.skin=this.getSkin(e.skin)),e}},{key:"_resolveSkin",value:function(e,t){return e.id=e.id||"skin-".concat(t),e.inverseBindMatrices=this.getAccessor(e.inverseBindMatrices),e}},{key:"_resolveMesh",value:function(e,t){var i=this;return e.id=e.id||"mesh-".concat(t),e.primitives&&(e.primitives=e.primitives.map((function(e){var t=(e=n({},e)).attributes;for(var r in e.attributes={},t)e.attributes[r]=i.getAccessor(t[r]);return void 0!==e.indices&&(e.indices=i.getAccessor(e.indices)),void 0!==e.material&&(e.material=i.getMaterial(e.material)),e}))),e}},{key:"_resolveMaterial",value:function(e,t){if(e.id=e.id||"material-".concat(t),e.normalTexture&&(e.normalTexture=n({},e.normalTexture),e.normalTexture.texture=this.getTexture(e.normalTexture.index)),e.occlusionTexture&&(e.occlustionTexture=n({},e.occlustionTexture),e.occlusionTexture.texture=this.getTexture(e.occlusionTexture.index)),e.emissiveTexture&&(e.emmisiveTexture=n({},e.emmisiveTexture),e.emissiveTexture.texture=this.getTexture(e.emissiveTexture.index)),e.emissiveFactor||(e.emissiveFactor=e.emmisiveTexture?[1,1,1]:[0,0,0]),e.pbrMetallicRoughness){e.pbrMetallicRoughness=n({},e.pbrMetallicRoughness);var i=e.pbrMetallicRoughness;i.baseColorTexture&&(i.baseColorTexture=n({},i.baseColorTexture),i.baseColorTexture.texture=this.getTexture(i.baseColorTexture.index)),i.metallicRoughnessTexture&&(i.metallicRoughnessTexture=n({},i.metallicRoughnessTexture),i.metallicRoughnessTexture.texture=this.getTexture(i.metallicRoughnessTexture.index))}return e}},{key:"_resolveAccessor",value:function(e,t){var i,r;if(e.id=e.id||"accessor-".concat(t),void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView)),e.bytesPerComponent=(i=e.componentType,dM[i]),e.components=(r=e.type,AM[r]),e.bytesPerElement=e.bytesPerComponent*e.components,e.bufferView){var n=e.bufferView.buffer,s=gB(e,e.bufferView),o=s.ArrayType,a=s.byteLength,l=(e.bufferView.byteOffset||0)+(e.byteOffset||0)+n.byteOffset,u=n.arrayBuffer.slice(l,l+a);e.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(n,l,e.bufferView.byteStride,e.bytesPerElement,e.count)),e.value=new o(u)}return e}},{key:"_getValueFromInterleavedBuffer",value:function(e,t,i,r,n){for(var s=new Uint8Array(n*r),o=0;o<n;o++){var a=t+o*i;s.set(new Uint8Array(e.arrayBuffer.slice(a,a+r)),o*r)}return s.buffer}},{key:"_resolveTexture",value:function(e,t){return e.id=e.id||"texture-".concat(t),e.sampler="sampler"in e?this.getSampler(e.sampler):bM,e.source=this.getImage(e.source),e}},{key:"_resolveSampler",value:function(e,t){for(var i in e.id=e.id||"sampler-".concat(t),e.parameters={},e){var r=this._enumSamplerParameter(i);void 0!==r&&(e.parameters[r]=e[i])}return e}},{key:"_enumSamplerParameter",value:function(e){return yM[e]}},{key:"_resolveImage",value:function(e,t){e.id=e.id||"image-".concat(t),void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView));var i=this.images[t];return i&&(e.image=i),e}},{key:"_resolveBufferView",value:function(e,t){var i=e.buffer,r=n(n({id:"bufferView-".concat(t)},e),{},{buffer:this.buffers[i]}),s=this.buffers[i].arrayBuffer,o=this.buffers[i].byteOffset||0;return"byteOffset"in e&&(o+=e.byteOffset),r.data=new Uint8Array(s,o,e.byteLength),r}},{key:"_resolveCamera",value:function(e,t){return e.id=e.id||"camera-".concat(t),e.perspective,e.orthographic,e}}])}();function xM(e,t){return(new wM).postProcess(e,t)}var BM=1735152710,PM=1313821514,CM=5130562,MM=!0;function kM(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new DataView(t),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(e.getUint8(t+0))).concat(String.fromCharCode(e.getUint8(t+1))).concat(String.fromCharCode(e.getUint8(t+2))).concat(String.fromCharCode(e.getUint8(t+3)))}(r,i+0),s=r.getUint32(i+4,MM),o=r.getUint32(i+8,MM);switch(Object.assign(e,{header:{byteOffset:i,byteLength:o,hasBinChunk:!1},type:n,version:s,json:{},binChunks:[]}),i+=12,e.version){case 1:return function(e,t,i){$x(e.header.byteLength>20);var r=t.getUint32(i+0,MM),n=t.getUint32(i+4,MM);return i+=8,$x(0===n),EM(e,t,i,r),i+=r,i+=SM(e,t,i,e.header.byteLength),i}(e,r,i);case 2:return function(e,t,i,r){return $x(e.header.byteLength>20),function(e,t,i,r){for(;i+8<=e.header.byteLength;){var n=t.getUint32(i+0,MM),s=t.getUint32(i+4,MM);switch(i+=8,s){case PM:EM(e,t,i,n);break;case CM:SM(e,t,i,n);break;case 0:r.strict||EM(e,t,i,n);break;case 1:r.strict||SM(e,t,i,n)}i+=rB(n,4)}}(e,t,i,r),i+e.header.byteLength}(e,r,i,{});default:throw new Error("Invalid GLB version ".concat(e.version,". Only supports v1 and v2."))}}function EM(e,t,i,r){var n=new Uint8Array(t.buffer,i,r),s=new TextDecoder("utf8").decode(n);return e.json=JSON.parse(s),rB(r,4)}function SM(e,t,i,r){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:i,byteLength:r,arrayBuffer:t.buffer}),rB(r,4)}function TM(e,t){return FM.apply(this,arguments)}function FM(){return FM=a(s().mark((function e(t,i){var r,n,o,a,l,u,c,h,A,d=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=d.length>4?d[4]:void 0,IM(t,i,d.length>2&&void 0!==d[2]?d[2]:0,l=d.length>3?d[3]:void 0),hM(t,{normalize:null==l||null===(r=l.gltf)||void 0===r?void 0:r.normalize}),rM(t,l,u),c=[],null==l||null===(n=l.gltf)||void 0===n||!n.loadBuffers||!t.json.buffers){e.next=10;break}return e.next=10,DM(t,l,u);case 10:return null!=l&&null!==(o=l.gltf)&&void 0!==o&&o.loadImages&&(h=OM(t,l,u),c.push(h)),A=nM(t,l,u),c.push(A),e.next=15,Promise.all(c);case 15:return e.abrupt("return",null!=l&&null!==(a=l.gltf)&&void 0!==a&&a.postProcess?xM(t,l):t);case 16:case"end":return e.stop()}}),e)}))),FM.apply(this,arguments)}function IM(e,t,i,r){(r.uri&&(e.baseUri=r.uri),t instanceof ArrayBuffer&&!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new DataView(e),n=i.magic,s=void 0===n?BM:n,o=r.getUint32(t,!1);return o===s||o===BM}(t,i,r))&&(t=(new TextDecoder).decode(t));if("string"==typeof t)e.json=tB(t);else if(t instanceof ArrayBuffer){var n={};i=kM(n,t,i,r.glb),sB("glTF"===n.type,"Invalid GLB magic string ".concat(n.type)),e._glb=n,e.json=n.json}else sB(!1,"GLTF: must be ArrayBuffer or string");var s=e.json.buffers||[];if(e.buffers=new Array(s.length).fill(null),e._glb&&e._glb.header.hasBinChunk){var o=e._glb.binChunks;e.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}var a=e.json.images||[];e.images=new Array(a.length).fill({})}function DM(e,t,i){return RM.apply(this,arguments)}function RM(){return(RM=a(s().mark((function e(t,i,r){var n,o,a,l,u,c,h,A;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.json.buffers||[],o=0;case 2:if(!(o<n.length)){e.next=22;break}if(!(a=n[o]).uri){e.next=18;break}return sB(r.fetch),c=oB(a.uri,i),e.next=10,null==r||null===(l=r.fetch)||void 0===l?void 0:l.call(r,c);case 10:return h=e.sent,e.next=13,null==h||null===(u=h.arrayBuffer)||void 0===u?void 0:u.call(h);case 13:A=e.sent,t.buffers[o]={arrayBuffer:A,byteOffset:0,byteLength:A.byteLength},delete a.uri,e.next=19;break;case 18:null===t.buffers[o]&&(t.buffers[o]={arrayBuffer:new ArrayBuffer(a.byteLength),byteOffset:0,byteLength:a.byteLength});case 19:++o,e.next=2;break;case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function OM(e,t,i){return LM.apply(this,arguments)}function LM(){return(LM=a(s().mark((function e(t,i,r){var n,o,a,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=jM(t),o=t.json.images||[],a=[],l=u(n);try{for(l.s();!(c=l.n()).done;)h=c.value,a.push(UM(t,o[h],h,i,r))}catch(e){l.e(e)}finally{l.f()}return e.next=7,Promise.all(a);case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jM(e){var t,i=new Set,r=u(e.json.textures||[]);try{for(r.s();!(t=r.n()).done;){var n=t.value;void 0!==n.source&&i.add(n.source)}}catch(e){r.e(e)}finally{r.f()}return Array.from(i).sort()}function UM(e,t,i,r,n){return NM.apply(this,arguments)}function NM(){return NM=a(s().mark((function e(t,i,r,n,o){var a,l,u,c,h,A,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.fetch,l=o.parse,!i.uri||i.hasOwnProperty("bufferView")){e.next=10;break}return c=oB(i.uri,n),e.next=5,a(c);case 5:return h=e.sent,e.next=8,h.arrayBuffer();case 8:u=e.sent,i.bufferView={data:u};case 10:return Number.isFinite(i.bufferView)&&(A=aB(t.json,t.buffers,i.bufferView),u=iB(A.buffer,A.byteOffset,A.byteLength)),sB(u,"glTF image has no data"),e.next=14,l(u,[Yx,px],{mimeType:i.mimeType,basis:n.basis||{format:dx()}},o);case 14:(d=e.sent)&&d[0]&&(d={compressed:!0,mipmaps:!1,width:d[0].width,height:d[0].height,data:d[0]}),t.images=t.images||[],t.images[r]=d;case 18:case"end":return e.stop()}}),e)}))),NM.apply(this,arguments)}var VM={name:"glTF",id:"gltf",module:"gltf",version:"3.4.15",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:function(e){return QM.apply(this,arguments)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};function QM(){return QM=a(s().mark((function e(t){var i,r,o,a,l,u=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2?u[2]:void 0,(i=n(n({},VM.options),i)).gltf=n(n({},VM.options.gltf),i.gltf),o=i.byteOffset,a=void 0===o?0:o,l={},e.next=8,TM(l,t,a,i,r);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),QM.apply(this,arguments)}var HM=function(){return P((function e(t){x(this,e)}),[{key:"load",value:function(e,t,i,r,n,s,o){!function(e,t,i,r,n,s,o){var a=e.viewer.scene.canvas.spinner;a.processes++;var l="glb"===t.split(".").pop();l?e.dataSource.getGLB(t,(function(o){r.basePath=GM(t),zM(e,t,o,i,r,n,s),a.processes--}),(function(e){a.processes--,o(e)})):e.dataSource.getGLTF(t,(function(o){r.basePath=GM(t),zM(e,t,o,i,r,n,s),a.processes--}),(function(e){a.processes--,o(e)}))}(e,t,i,r=r||{},n,(function(){Ae.scheduleTask((function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1)})),s&&s()}),(function(t){e.error(t),o&&o(t),n.fire("error",t)}))}},{key:"parse",value:function(e,t,i,r,n,s,o){zM(e,"",t,i,r=r||{},n,(function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1),s&&s()}))}}])}();function GM(e){var t=e.lastIndexOf("/");return 0!==t?e.substring(0,t+1):""}function zM(e,t,i,r,n,s,o){var a=e.viewer.scene.canvas.spinner;a.processes++,ow(i,VM,{baseUri:n.basePath}).then((function(i){var l={src:t,entityId:n.entityId,metaModelJSON:r,autoMetaModel:n.autoMetaModel,globalizeObjectIds:n.globalizeObjectIds,metaObjects:[],loadBuffer:n.loadBuffer,basePath:n.basePath,handlenode:n.handlenode,backfaces:!!n.backfaces,gltfData:i,scene:s.scene,plugin:e,sceneModel:s,numObjects:0,nodes:[],nextId:0,log:function(t){e.log(t)}};!function(e){var t=e.gltfData,i=t.textures;if(i)for(var r=0,n=i.length;r<n;r++)WM(e,i[r])}(l),function(e){var t=e.gltfData,i=t.materials;if(i)for(var r=0,n=i.length;r<n;r++){var s=i[r];s._textureSetId=KM(e,s),s._attributes=XM(e,s)}}(l),n.autoMetaModel&&l.metaObjects.push({id:s.id,type:"Default",name:s.id}),function(e){var t=e.gltfData,i=t.scene||t.scenes[0];if(!i)return void function(e,t){e.plugin.error(t)}(e,"glTF has no default scene");var r=i.nodes;if(!r)return;!function e(t){t.forEach((function(t){var i=t.mesh;i&&(i.instances||(i.instances=0),i.instances+=1),t.children&&e(t.children)}))}(r);var n=[],s=null;!function t(i,r,o){i.forEach((function(i){var a=i.name,l=null!=a&&a||0===r&&"entity-"+e.nextId++;if(l){for(;e.sceneModel.objects[l];)l="entity-"+e.nextId++;n.push(s),s=[]}var u=function(e,t){var i;e.matrix&&(i=e.matrix,t=t?Y.mulMat4(t,i,Y.mat4()):i);e.translation&&(i=Y.translationMat4v(e.translation),t=t?Y.mulMat4(t,i,Y.mat4()):i);e.rotation&&(i=Y.quaternionToMat4(e.rotation),t=t?Y.mulMat4(t,i,Y.mat4()):i);e.scale&&(i=Y.scalingMat4v(e.scale),t=t?Y.mulMat4(t,i,Y.mat4()):i);return t}(i,o);if(i.mesh&&function(e,t,i,r){var n=e.mesh;if(!n)return;var s=n.primitives.length;if(s>0)for(var o=0;o<s;o++){var a=n.primitives[o];if(!(a.mode<4)){var l={id:t.sceneModel.id+"."+t.numObjects++},u=a.material;u?(l.textureSetId=u._textureSetId,l.color=u._attributes.color,l.opacity=u._attributes.opacity,l.metallic=u._attributes.metallic,l.roughness=u._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);var c=!1!==t.backfaces||u&&!1!==u.doubleSided;switch(a.mode){case 0:l.primitive="points";break;case 1:case 2:case 3:l.primitive="lines";break;default:l.primitive=c?"triangles":"solid"}var h=a.attributes.POSITION;if(h){l.localPositions=h.value,l.positions=new Float64Array(l.localPositions.length),a.attributes.NORMAL&&(l.normals=a.attributes.NORMAL.value),a.attributes.TEXCOORD_0&&(l.uv=a.attributes.TEXCOORD_0.value),a.indices&&(l.indices=a.indices.value),i?Y.transformPositions3(i,l.localPositions,l.positions):l.positions.set(l.localPositions);var A=Y.vec3();we(l.positions,l.positions,A)&&(l.origin=A),t.sceneModel.createMesh(l),r.push(l.id)}}}}(i,e,u,s),i.children&&t(i.children,r+1,u),l){if(s.length>0){var c=e.globalizeObjectIds?Y.globalizeObjectId(e.sceneModel.id,l):l;e.sceneModel.createEntity({id:c,meshIds:s,isObject:!0}),e.autoMetaModel&&e.metaObjects.push({id:c,type:"Default",name:c,parent:e.sceneModel.id})}s=n.pop()}}))}(r,0,null)}(l),s.finalize(),n.autoMetaModel&&e.viewer.metaScene.createMetaModel(s.id,{metaObjects:l.metaObjects}),a.processes--,o()}))}function WM(e,t){if(t.source&&t.source.image){var i="texture-".concat(e.nextId++),r=Ji;switch(t.sampler.minFilter){case 9728:r=qi;break;case 9729:r=Zi;break;case 9984:r=Yi;break;case 9985:r=$i;break;case 9986:r=Ji;break;case 9987:r=tr}var n=Zi;switch(t.sampler.magFilter){case 9728:n=qi;break;case 9729:n=Zi}var s=Wi;switch(t.sampler.wrapS){case 33071:s=Ki;break;case 33648:s=Xi;break;case 10497:s=Wi}var o=Wi;switch(t.sampler.wrapT){case 33071:o=Ki;break;case 33648:o=Xi;break;case 10497:o=Wi}var a=Wi;switch(t.sampler.wrapR){case 33071:a=Ki;break;case 33648:a=Xi;break;case 10497:a=Wi}e.sceneModel.createTexture({id:i,image:t.source.image,flipY:!!t.flipY,minFilter:r,magFilter:n,wrapS:s,wrapT:o,wrapR:a,encoding:pr}),t._textureId=i}}function KM(e,t){var i={};switch(t.normalTexture&&(i.normalTextureId=t.normalTexture.texture._textureId),t.occlusionTexture&&(i.occlusionTextureId=t.occlusionTexture.texture._textureId),t.emissiveTexture&&(i.emissiveTextureId=t.emissiveTexture.texture._textureId),t.alphaMode){case"OPAQUE":break;case"MASK":var r=t.alphaCutoff;i.alphaCutoff=void 0!==r?r:.5}var n=t.pbrMetallicRoughness;if(t.pbrMetallicRoughness){var s=t.pbrMetallicRoughness,o=s.baseColorTexture||s.colorTexture;o&&(o.texture?i.colorTextureId=o.texture._textureId:i.colorTextureId=e.gltfData.textures[o.index]._textureId),n.metallicRoughnessTexture&&(i.metallicRoughnessTextureId=n.metallicRoughnessTexture.texture._textureId)}var a=t.extensions;if(a){var l=a.KHR_materials_pbrSpecularGlossiness;if(l){l.specularTexture;var u=l.specularColorTexture;null!=u&&(i.colorTextureId=e.gltfData.textures[u.index]._textureId)}}return void 0!==i.normalTextureId||void 0!==i.occlusionTextureId||void 0!==i.emissiveTextureId||void 0!==i.colorTextureId||void 0!==i.metallicRoughnessTextureId?(i.id="textureSet-".concat(e.nextId++,";"),e.sceneModel.createTextureSet(i),i.id):null}function XM(e,t){var i=t.extensions,r={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(i){var n=i.KHR_materials_pbrSpecularGlossiness;if(n){var s=n.diffuseFactor;null!=s&&r.color.set(s)}var o=i.KHR_materials_common;if(o){var a=o.technique,l=o.values||{},u="BLINN"===a,c="PHONG"===a,h="LAMBERT"===a,A=l.diffuse;A&&(u||c||h)&&(ne.isString(A)||r.color.set(A));var d=l.transparency;null!=d&&(r.opacity=d);var p=l.transparent;null!=p&&(r.opacity=p)}}var f=t.pbrMetallicRoughness;if(f){var g=f.baseColorFactor;g&&(r.color[0]=g[0],r.color[1]=g[1],r.color[2]=g[2],r.opacity=g[3]);var m=f.metallicFactor;null!=m&&(r.metallic=m);var v=f.roughnessFactor;null!=v&&(r.roughness=v)}return r.doubleSided=!1!==t.doubleSided,r}var qM={DEFAULT:{}},YM=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x(this,e),(i=d(this,e,["GLTFLoader",t,r]))._sceneModelLoader=new HM(i,r),i.dataSource=r.dataSource,i.objectDefaults=r.objectDefaults,i}return _(e,ge),P(e,[{key:"dataSource",get:function(){return this._dataSource},set:function(e){this._dataSource=e||new _h}},{key:"objectDefaults",get:function(){return this._objectDefaults},set:function(e){this._objectDefaults=e||qM}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.id&&this.viewer.scene.components[t.id]&&(this.error("Component with this ID already exists in viewer: "+t.id+" - will autogenerate this ID"),delete t.id);var i=new $c(this.viewer.scene,ne.apply(t,{isModel:!0,dtxEnabled:t.dtxEnabled})),r=i.id;if(!t.src&&!t.gltf)return this.error("load() param expected: src or gltf"),i;if(t.metaModelSrc||t.metaModelJSON){var n=function(n){e.viewer.metaScene.createMetaModel(r,n,{}),e.viewer.scene.canvas.spinner.processes--,t.src?e._sceneModelLoader.load(e,t.src,n,t,i):e._sceneModelLoader.parse(e,t.gltf,n,t,i)};if(t.metaModelSrc){var s=t.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(s,(function(t){e.viewer.scene.canvas.spinner.processes--,n(t)}),(function(t){e.error("load(): Failed to load model metadata for model '".concat(r," from '").concat(s,"' - ").concat(t)),e.viewer.scene.canvas.spinner.processes--}))}else t.metaModelJSON&&n(t.metaModelJSON)}else t.src?this._sceneModelLoader.load(this,t.src,null,t,i):this._sceneModelLoader.parse(this,t.gltf,null,t,i);return i.once("destroyed",(function(){e.viewer.metaScene.destroyMetaModel(r)})),i}},{key:"destroy",value:function(){g(e,"destroy",this,3)([])}}])}();function JM(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="lightgrey",n=i.hoverColor||"rgba(60,120,125,0.3)",s=i.textColor||"rgba(15,75,80,0.8)",o=500,a=o+o/3,l=a/24,u=e.scene.camera.normalUp,c=[{boundary:[6,6,6,6],color:i.frontColor||i.color||"#55FF55"},{boundary:[18,6,6,6],color:i.backColor||i.color||"#55FF55"},{boundary:[12,6,6,6],color:i.rightColor||i.color||"#FF5555"},{boundary:[0,6,6,6],color:i.leftColor||i.color||"#FF5555"},{boundary:[6,0,6,6],color:i.topColor||i.color||"#7777FF"},{boundary:[6,12,6,6],color:i.bottomColor||i.color||"#7777FF"}],h=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];i.frontColor||i.color,i.backColor||i.color,i.rightColor||i.color,i.leftColor||i.color,i.topColor||i.color,i.bottomColor||i.color;var A=[{areaId:0,label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{areaId:1,label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{areaId:2,label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{areaId:3,label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{areaId:4,label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{areaId:5,label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{areaId:6,boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{areaId:7,boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{areaId:8,boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{areaId:9,boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{areaId:10,boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{areaId:11,boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{areaId:12,boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{areaId:13,boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{areaId:14,boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{areaId:15,boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{areaId:16,boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{areaId:17,boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{areaId:18,boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{areaId:19,boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{areaId:20,boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{areaId:21,boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{areaId:22,boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{areaId:23,boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{areaId:24,boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{areaId:25,boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}],d=[{areaId:0,label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,-1,0]},{areaId:1,label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,-1,0]},{areaId:2,label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[1,0,0],up:[0,-1,0]},{areaId:3,label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[-1,0,0],up:[0,-1,0]},{areaId:4,label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,1,0],up:[0,0,-1]},{areaId:5,label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,-1,0],up:[0,0,1]},{areaId:6,boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{areaId:7,boundaries:[[1,6,4,1],[6,1,1,4]],dir:[-1,1,0],up:[1,1,0]},{areaId:8,boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,1,1],up:[0,1,-1]},{areaId:9,boundaries:[[13,6,4,1],[11,1,1,4]],dir:[1,1,0],up:[-1,1,0]},{areaId:10,boundaries:[[7,11,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{areaId:11,boundaries:[[1,11,4,1],[6,13,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{areaId:12,boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{areaId:13,boundaries:[[13,11,4,1],[11,13,1,4]],dir:[1,-1,0],up:[1,1,0]},{areaId:14,boundaries:[[5,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{areaId:15,boundaries:[[11,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{areaId:16,boundaries:[[17,7,2,4]],dir:[1,0,1],up:[0,1,0]},{areaId:17,boundaries:[[0,7,1,4],[23,7,1,4]],dir:[-1,0,1],up:[0,1,0]},{areaId:18,boundaries:[[5,11,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]},{areaId:19,boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{areaId:20,boundaries:[[5,5,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{areaId:21,boundaries:[[11,17,1,1],[17,11,2,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{areaId:22,boundaries:[[17,6,2,1],[11,0,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{areaId:23,boundaries:[[11,11,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{areaId:24,boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{areaId:25,boundaries:[[11,5,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]}];d.forEach((function(e){e.areaId>5&&(e.up=[-1*e.up[0],-1*e.up[1],-1*e.up[2]])}));for(var p=u?A:d,f=0,g=h.length;f<g;f++)Y.normalizeVec3(h[f].dir,h[f].dir),Y.normalizeVec3(h[f].up,h[f].up);for(var m=0,v=p.length;m<v;m++)Y.normalizeVec3(p[m].dir,p[m].dir),Y.normalizeVec3(p[m].up,p[m].up);var _=p;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=a,this._textureCanvas.height=o,this._textureCanvas.style.width=a+"px",this._textureCanvas.style.height=o+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=r,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.display="none",this._textureCanvas.style["z-index"]=-100,this._textureCanvas.setAttribute("id","myNavCubeRenderImage"),this.cubeParentDiv=document.createElement("div"),this.cubeParentDiv.setAttribute("id","myNavCubeRenderImage_parent"),this.cubeContainer=i.viewerElement,this.cubeParentDiv.appendChild(this._textureCanvas),this.cubeContainer.appendChild(this.cubeParentDiv);var y=this._textureCanvas.getContext("2d"),b=!1;function w(){for(var e=0,i=c.length;e<i;e++){var o=c[e],a=o.boundary,u=Math.round(a[0]*l),h=Math.round(a[1]*l),A=Math.round(a[2]*l),d=Math.round(a[3]*l);y.fillStyle=o.color,y.fillRect(u,h,A,d)}for(var p=0,f=_.length;p<f;p++){for(var g=void 0,m=void 0,v=void 0,b=void 0,w=_[p],x=w.boundaries,B=0,P=x.length;B<P;B++){var M=x[B];g=Math.round(M[0]*l),m=Math.round(M[1]*l),v=Math.round(M[2]*l),b=Math.round(M[3]*l),w.highlighted&&(y.fillStyle=w.highlighted?n:w.color||r,y.fillRect(g,m,v,b))}if(w.label){y.fillStyle=s,y.font="60px sans-serif",y.textAlign="center";var k=g+.5*v,E=m+.7*b;y.fillText(C(w.label),k,E,80)}}t.glRedraw()}var x,B,P,C=(x={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},B={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},P={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"},function(t){var i=b?B:x,r=i?i[t]:null;return r?e.localeService.translate(r)||P[r]||r:t});this.setZUp=function(){b=!0,_=h,this.clear()},this.setYUp=function(){u=e.scene.camera.normalUp,b=!1,_=u?A:d,this.clear()},this.clear=function(){y.fillStyle=r,y.fillRect(0,0,a,o);for(var e=0,t=_.length;e<t;e++){_[e].highlighted=!1}w()},this.getArea=function(e){for(var t=e[0]*a,i=o-e[1]*o,r=0,n=_.length;r<n;r++)for(var s=_[r].boundaries,u=0,c=s.length;u<c;u++){var h=s[u];if(t>=h[0]*l&&t<=(h[0]+h[2])*l&&i>=h[1]*l&&i<=(h[1]+h[3])*l)return r}return-1},this.setAreaHighlighted=function(e,t){var i=_[e];if(!i)throw"Area not found: "+e;i.highlighted=!!t,w()},this.getAreaDir=function(e){var t=_[e];if(!t)throw"Unknown area: "+e;return t.dir},this.getAreaUp=function(e){var t=_[e];if(!t)throw"Unknown area: "+e;return t.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null),this.cubeParentDiv&&(this.cubeParentDiv.parentNode.removeChild(this.cubeParentDiv),this.cubeParentDiv=null)}}var ZM=Y.vec3(),$M=Y.vec3();Y.mat4();var ek=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,e),i=d(this,e,["NavCube",t,r]),t.navCube=i;try{i._navCubeScene=new zi(t,{canvasId:r.canvasId,canvasElement:r.canvasElement,transparent:!0,spinnerElementId:"navcube_spinner",edgesEnabled:!0,contextAttr:{antialias:!0},resolutionScale:window.devicePixelRatio,worldAxis:t.scene.camera.worldAxis}),i._navCubeCanvas=i._navCubeScene.canvas.canvas,i._navCubeScene.input.keyboardEnabled=!1}catch(e){return i.error(e),p(i)}var n=i._navCubeScene;n.clearLights(),new hi(n,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:.8,space:"view"}),new hi(n,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:.8,space:"view"}),new hi(n,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:.8,space:"view"}),i._navCubeCamera=n.camera,i._navCubeCamera.ortho.scale=7,i._navCubeCamera.ortho.near=.1,i._navCubeCamera.ortho.far=2e3,n.edgeMaterial.edgeColor=[.47,.62,.67],n.edgeMaterial.edgeAlpha=.2,n.edgeMaterial.edgeWidth=1,i._zUp=Boolean(t.camera.zUp);var s=i;i.mousedown=!1,i.mouseover=!1,i.setIsProjectNorth(r.isProjectNorth),i.setProjectNorthOffsetAngle(r.projectNorthOffsetAngle);var o,a=i.rotateTrueNorth=(o=Y.mat4(),function(e,t,i){return Y.identityMat4(o),Y.rotationMat4v(e*s._projectNorthOffsetAngle*Y.DEGTORAD,[0,1,0],o),Y.transformVec3(o,t,i)}),l=!1;t.scene.on("aabb",(function(){l=t.scene.camera.normalUp})),i._synchCamera=function(){var e=Y.rotationMat4c(-90*Y.DEGTORAD,1,0,0),i=Y.vec3(),r=Y.vec3(),n=Y.vec3();return function(){var o=t.camera.eye,u=t.camera.look,c=t.camera.up;i=Y.mulVec3Scalar(Y.normalizeVec3(Y.subVec3(o,u,i)),5),s._isProjectNorth&&s._projectNorthOffsetAngle&&(i=a(-1,i,ZM),c=a(-1,c,$M)),s._zUp?(Y.transformVec3(e,i,r),Y.transformVec3(e,c,n),s._navCubeCamera.look=[0,0,0],s._navCubeCamera.eye=Y.transformVec3(e,i,r),s._navCubeCamera.up=Y.transformPoint3(e,c,n)):(s._navCubeCamera.look=[0,0,0],s._navCubeCamera.eye=l?i:Y.mulVec3(i,[-1,-1,1]),s._navCubeCamera.up=c*(l?1:-1))}}(),i._cubeTextureCanvas=new JM(t,n,r),i._cubeSampler=new En(n,{image:i._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Ki,wrapT:Ki}),i._cubeMesh=new on(n,{geometry:new Ci(n,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[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,-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,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new Ti(n,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:i._cubeSampler,emissiveMap:i._cubeSampler}),visible:!0,edges:!0}),i._shadow=!1===r.shadowVisible?null:new on(n,{geometry:new Ci(n,ln({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new Ti(n,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),i._onCameraMatrix=t.camera.on("matrix",i._synchCamera),i._onCameraWorldAxis=t.camera.on("worldAxis",(function(){t.camera.zUp?(i._zUp=!0,i._cubeTextureCanvas.setZUp(),i._repaint(),i._synchCamera()):t.camera.yUp&&(i._zUp=!1,i._cubeTextureCanvas.setYUp(),i._repaint(),i._synchCamera()),l=t.scene.camera.normalUp})),i._onCameraFOV=t.camera.perspective.on("fov",(function(e){i._synchProjection&&(i._navCubeCamera.perspective.fov=e)})),i._onCameraProjection=t.camera.on("projection",(function(e){i._synchProjection&&(i._navCubeCamera.projection="ortho"===e||"perspective"===e?e:"perspective")}));var u=-1;function c(e){var t=[0,0];if(e){for(var i=e.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;t[0]=e.pageX-r,t[1]=e.pageY-n}else e=window.event,t[0]=e.x,t[1]=e.y;return t}var h=null,A=null,f=!1;s.MOUSEDOWN=!1;var g=!1;s.MOUSEOVER=!1;var m,v,_=.5;s._navCubeCanvas.addEventListener("mouseenter",s._onMouseEnter=function(e){g=!0,s.MOUSEOVER=!0}),s._navCubeCanvas.addEventListener("mouseleave",s._onMouseLeave=function(e){g=!1,s.MOUSEOVER=!1}),s._navCubeCanvas.addEventListener("mousedown",s._onMouseDown=function(e){if(1===e.which){h=e.x,A=e.y,m=e.clientX,v=e.clientY;var t=c(e);n.pick({canvasPos:t})?(f=!0,s.MOUSEDOWN=!0):(f=!1,s.MOUSEDOWN=!1)}}),document.addEventListener("mouseup",s._onMouseUp=function(e){if(1===e.which&&(f=!1,s.MOUSEDOWN=!1,null!==h)){var t=c(e),i=n.pick({canvasPos:t,pickSurface:!0});if(i&&i.uv){var r=s._cubeTextureCanvas.getArea(i.uv);if(r>=0&&(u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),r>=0)){if(s._cubeTextureCanvas.setAreaHighlighted(r,!0),u=r,s._repaint(),e.x<h-3||e.x>h+3||e.y<A-3||e.y>A+3)return;var o=s._cubeTextureCanvas.getAreaDir(r);if(o){var l=s._cubeTextureCanvas.getAreaUp(r);s._isProjectNorth&&s._projectNorthOffsetAngle&&(o=a(1,o,ZM),l=a(1,l,$M)),y(o,l,(function(){u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),r>=0&&(s._cubeTextureCanvas.setAreaHighlighted(r,!1),u=-1,s._repaint())}))}}}}}),document.addEventListener("mousemove",s._onMouseMove=function(e){if(u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),1!==e.buttons||f){if(f){var i=e.clientX,r=e.clientY;return document.body.style.cursor="move",void function(e,i){var r=(e-m)*-_,n=(i-v)*-_;t.camera.orbitYaw(r),t.camera.orbitPitch(-n),m=e,v=i}(i,r)}if(g){var o=c(e),a=n.pick({canvasPos:o,pickSurface:!0});if(a){if(a.uv){document.body.style.cursor="pointer";var l=s._cubeTextureCanvas.getArea(a.uv);if(l===u)return;u>=0&&s._cubeTextureCanvas.setAreaHighlighted(u,!1),l>=0&&(s._cubeTextureCanvas.setAreaHighlighted(l,!0),s._repaint(),u=l)}}else document.body.style.cursor="default",u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1)}}});var y=i.flyTo=function(){var e=Y.vec3();return function(i,r,n){var o=s._fitVisible?t.scene.getAABB(t.scene.visibleObjectIds):t.scene.aabb,a=Y.getAABB3Diag(o);Y.getAABB3Center(o,e);var l=Math.abs(a/Math.tan(s._cameraFitFOV*Y.DEGTORAD));t.cameraControl.pivotPos=e,s._cameraFly?t.cameraFlight.flyTo({look:e,eye:[e[0]-l*i[0],e[1]-l*i[1],e[2]-l*i[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:s._cameraFitFOV,duration:s._cameraFlyDuration},n):t.cameraFlight.jumpTo({look:e,eye:[e[0]-l*i[0],e[1]-l*i[1],e[2]-l*i[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:s._cameraFitFOV},n)}}();return i._onUpdated=t.localeService.on("updated",(function(){i._cubeTextureCanvas.clear(),i._repaint()})),i.setVisible(r.visible),i.setCameraFitFOV(r.cameraFitFOV),i.setCameraFly(r.cameraFly),i.setCameraFlyDuration(r.cameraFlyDuration),i.setFitVisible(r.fitVisible),i.setSynchProjection(r.synchProjection),i}return _(e,ge),P(e,[{key:"flyByClick",value:function(e){if(e>=0){this._cubeTextureCanvas.setAreaHighlighted(e,!0),this._repaint();var t=this._cubeTextureCanvas.getAreaDir(e);if(t){var i=this._cubeTextureCanvas.getAreaUp(e);this._isProjectNorth&&this._projectNorthOffsetAngle&&(t=this.rotateTrueNorth(1,t,ZM),i=this.rotateTrueNorth(1,i,$M)),this.flyTo(t,i,(function(){}))}}}},{key:"jumpByClick",value:function(e){this.setCameraFly(!1),this.flyByClick(e),this.setCameraFly(!0)}},{key:"navCubeScene",get:function(){return this._navCubeScene}},{key:"MOUSEDOWN",get:function(){return this.mousedown},set:function(e){this.mousedown=e}},{key:"MOUSEOVER",get:function(){return this.mouseover},set:function(e){this.mouseover=e}},{key:"send",value:function(e,t){if("language"===e)this._cubeTextureCanvas.clear(),this._repaint()}},{key:"_repaint",value:function(){var e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}},{key:"getVisible",value:function(){return!!this._navCubeCanvas&&this._cubeMesh.visible}},{key:"setFitVisible",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._fitVisible=e}},{key:"getFitVisible",value:function(){return this._fitVisible}},{key:"setCameraFly",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._cameraFly=e}},{key:"getCameraFly",value:function(){return this._cameraFly}},{key:"setCameraFitFOV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:45;this._cameraFitFOV=e}},{key:"getCameraFitFOV",value:function(){return this._cameraFitFOV}},{key:"setCameraFlyDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5;this._cameraFlyDuration=e}},{key:"getCameraFlyDuration",value:function(){return this._cameraFlyDuration}},{key:"setSynchProjection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._synchProjection=e}},{key:"getSynchProjection",value:function(){return this._synchProjection}},{key:"setIsProjectNorth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._isProjectNorth=e}},{key:"getIsProjectNorth",value:function(){return this._isProjectNorth}},{key:"setProjectNorthOffsetAngle",value:function(e){this._projectNorthOffsetAngle=e}},{key:"getProjectNorthOffsetAngle",value:function(){return this._projectNorthOffsetAngle}},{key:"destroy",value:function(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,g(e,"destroy",this,3)([])}}])}(),tk=new Float64Array([0,0,1]),ik=new Float64Array(4),rk=function(){return P((function e(t){x(this,e),this.id=null,this.type="control",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}),[{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this.posRate},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.camera.look,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(tk,e,ik)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_createNodes",value:function(){var e=!1,t=this._viewer.scene,i=.01;this._rootNode=new yn(t,{id:this.id,position:[0,0,0],scale:[5,5,5],isObject:!1});var r,n,s=this._rootNode,o={arrowHead:new Ci(s,ln({radiusTop:.001,radiusBottom:.07,radialSegments:32,heightSegments:1,height:.2,openEnded:!1})),arrowHeadBig:new Ci(s,ln({radiusTop:.001,radiusBottom:.09,radialSegments:32,heightSegments:1,height:.25,openEnded:!1})),arrowHeadHandle:new Ci(s,ln({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new Ci(s,On({radius:.8,tube:i,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),curveHandle:new Ci(s,On({radius:.8,tube:.06,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),hoop:new Ci(s,On({radius:.8,tube:i,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new Ci(s,ln({radiusTop:i,radiusBottom:i,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new Ci(s,ln({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},a={pickable:new Ti(s,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),red:new Ti(s,{diffuse:[1,0,0],emissive:[1,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightRed:new Ii(s,{edges:!1,fill:!0,fillColor:[1,0,0],fillAlpha:.6}),green:new Ti(s,{diffuse:[0,1,0],emissive:[0,1,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightGreen:new Ii(s,{edges:!1,fill:!0,fillColor:[0,1,0],fillAlpha:.6}),blue:new Ti(s,{diffuse:[0,0,1],emissive:[0,0,1],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightBlue:new Ii(s,{edges:!1,fill:!0,fillColor:[0,0,1],fillAlpha:.2}),center:new Ti(s,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new Ii(s,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new Ii(s,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:s.addChild(new on(s,{geometry:new Ci(s,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new Ti(s,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Ii(s,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1}),e),planeFrame:s.addChild(new on(s,{geometry:new Ci(s,On({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new Ti(s,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Ii(s,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1}),e),xCurve:s.addChild(new on(s,{geometry:o.curve,material:a.red,matrix:(r=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),n=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4()),Y.mulMat4(n,r,Y.identityMat4())),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xCurveHandle:s.addChild(new on(s,{geometry:o.curveHandle,material:a.pickable,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xCurveArrow1:s.addChild(new on(s,{geometry:o.arrowHead,material:a.red,matrix:function(){var e=Y.translateMat4c(0,-.07,-.8,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(0*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xCurveArrow2:s.addChild(new on(s,{geometry:o.arrowHead,material:a.red,matrix:function(){var e=Y.translateMat4c(0,-.8,-.07,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yCurve:s.addChild(new on(s,{geometry:o.curve,material:a.green,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurveHandle:s.addChild(new on(s,{geometry:o.curveHandle,material:a.pickable,rotation:[-90,0,0],pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurveArrow1:s.addChild(new on(s,{geometry:o.arrowHead,material:a.green,matrix:function(){var e=Y.translateMat4c(.07,0,-.8,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yCurveArrow2:s.addChild(new on(s,{geometry:o.arrowHead,material:a.green,matrix:function(){var e=Y.translateMat4c(.8,0,-.07,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),center:s.addChild(new on(s,{geometry:new Ci(s,un({radius:.05})),material:a.center,pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrow:s.addChild(new on(s,{geometry:o.arrowHead,material:a.red,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrowHandle:s.addChild(new on(s,{geometry:o.arrowHeadHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxis:s.addChild(new on(s,{geometry:o.axis,material:a.red,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisHandle:s.addChild(new on(s,{geometry:o.axisHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:s.addChild(new on(s,{geometry:o.arrowHead,material:a.green,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrowHandle:s.addChild(new on(s,{geometry:o.arrowHeadHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,opacity:.2,isObject:!1}),e),yShaft:s.addChild(new on(s,{geometry:o.axis,material:a.green,position:[0,-.5,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yShaftHandle:s.addChild(new on(s,{geometry:o.axisHandle,material:a.pickable,position:[0,-.5,0],pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:s.addChild(new on(s,{geometry:o.arrowHead,material:a.blue,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrowHandle:s.addChild(new on(s,{geometry:o.arrowHeadHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zShaft:s.addChild(new on(s,{geometry:o.axis,material:a.blue,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!1,collidable:!1,visible:!1,isObject:!1}),e),zAxisHandle:s.addChild(new on(s,{geometry:o.axisHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!0,collidable:!1,visible:!1,isObject:!1}),e)},this._affordanceMeshes={planeFrame:s.addChild(new on(s,{geometry:new Ci(s,On({center:[0,0,0],radius:2,tube:i,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new Ti(s,{ambient:[1,1,1],diffuse:[0,0,0],emissive:[1,1,0]}),highlighted:!0,highlightMaterial:new Ii(s,{edges:!1,filled:!0,fillColor:[1,1,0],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],rotation:[0,0,45],isObject:!1}),e),xHoop:s.addChild(new on(s,{geometry:o.hoop,material:a.red,highlighted:!0,highlightMaterial:a.highlightRed,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yHoop:s.addChild(new on(s,{geometry:o.hoop,material:a.green,highlighted:!0,highlightMaterial:a.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zHoop:s.addChild(new on(s,{geometry:o.hoop,material:a.blue,highlighted:!0,highlightMaterial:a.highlightBlue,matrix:Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4()),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xAxisArrow:s.addChild(new on(s,{geometry:o.arrowHeadBig,material:a.red,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:s.addChild(new on(s,{geometry:o.arrowHeadBig,material:a.green,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:s.addChild(new on(s,{geometry:o.arrowHeadBig,material:a.blue,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e)}}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2,a=3,l=4,u=5,c=this._rootNode,h=null,A=null,d=Y.vec2(),p=Y.vec3([1,0,0]),f=Y.vec3([0,1,0]),g=Y.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,v=this._viewer.camera,_=this._viewer.scene,y=Y.vec3([0,0,0]),b=-1;this._onCameraViewMatrix=_.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=_.camera.on("projMatrix",(function(){})),this._onSceneTick=_.on("tick",(function(){var t=Math.abs(Y.lenVec3(Y.subVec3(_.camera.eye,e._pos,y)));if(t!==b&&"perspective"===v.projection){var i=.07*(Math.tan(v.perspective.fov*Y.DEGTORAD)*t);c.scale=[i,i,i],b=t}if("ortho"===v.projection){var r=v.ortho.scale/10;c.scale=[r,r,r],b=t}}));var w,x,B,P,C,M=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),k=function(){var e=new Float64Array(2);return function(t){if(t||(t=window.event),t.touches&&t.touches.length)e[0]=t.touches[0].pageX,e[1]=t.touches[0].pageY;else{for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}return e}}(),E=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),S=(w=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],w):Y.cross3Vec3(e,[1,0,0],w),Y.cross3Vec3(w,e,w),Y.normalizeVec3(w),w}),T=(x=Y.vec3(),B=Y.vec3(),P=Y.vec4(),function(e,i,r){E(e,P);var n=S(P,i,r);I(i,n,x),I(r,n,B),Y.subVec3(B,x);var s=Y.dotVec3(B,P);t._pos[0]+=P[0]*s*.6,t._pos[1]+=P[1]*s*.6,t._pos[2]+=P[2]*s*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),F=function(){var e=Y.vec4(),i=Y.vec4(),r=Y.vec4(),n=Y.vec4();return function(s,o,a){if(E(s,n),!(I(o,n,e)&&I(a,n,i))){var l=S(n,o,a);I(o,l,e,1),I(a,l,i,1);var u=Y.dotVec3(e,n);e[0]-=u*n[0],e[1]-=u*n[1],e[2]-=u*n[2],u=Y.dotVec3(i,n),i[0]-=u*n[0],i[1]-=u*n[1],i[2]-=u*n[2]}Y.normalizeVec3(e),Y.normalizeVec3(i),u=Y.dotVec3(e,i),u=Y.clamp(u,-1,1);var c=Math.acos(u)*Y.RADTODEG;Y.cross3Vec3(e,i,r),Y.dotVec3(r,n)<0&&(c=-c),t._rootNode.rotate(s,c),D()}}(),I=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/m.width*2-1,e[1]=-(r[1]/m.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(v.projMatrix,v.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=v.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),D=function(){var e=Y.vec3(),i=Y.mat4();return function(){t.sectionPlane&&(Y.quaternionToMat4(c.quaternion,i),Y.transformVec3(i,[0,0,1],e),t._setSectionPlaneDir(e))}}(),R=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){if(e._visible&&!R){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(C&&(C.visible=!1),C=null,h=r,i=!1)})),m.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){R=!0;var r=M(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("clickPlaneStart")}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&R){var i=M(t),r=i[0],c=i[1];switch(A){case n:T(p,d,i);break;case s:T(f,d,i);break;case o:T(g,d,i);break;case a:F(p,d,i);break;case l:F(f,d,i);break;case u:F(g,d,i)}d[0]=r,d[1]=c}}),m.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,R&&(t.which,R=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),m.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))}),this._onCameraControlHover=this._viewer.cameraControl.on("touchEntity",(function(t){if(e._visible&&!R&&!i){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),m.addEventListener("touchstart",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i){e._viewer.cameraControl.pointerEnabled=!1,R=!0;var r=k(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("touchPlaneStart")}}),m.addEventListener("touchmove",this._canvasMouseMoveListener=function(t){if(e._visible&&R){var i=k(t),r=i[0],c=i[1];switch(A){case n:T(p,d,i);break;case s:T(f,d,i);break;case o:T(g,d,i);break;case a:F(p,d,i);break;case l:F(f,d,i);break;case u:F(g,d,i)}d[0]=r,d[1]=c}}),m.addEventListener("touchend",this._canvasTouchEndListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,C&&(C.visible=!1),C=null,h=r,R=!1,i=!1,e.plugin.fire("touchPlaneEnd"))}),m.addEventListener("touchcancel",this._canvasTouchEndListener)}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),nk=new Float64Array([0,0,1]),sk=new Float64Array(4),ok=function(){return P((function e(t,i){x(this,e),this.id=i.id,this.type="control",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,i||(i={}),this._xColor=i.xColor?i.xColor:[.5,.5,.5],this._yColor=i.yColor?i.yColor:[.5,.5,.5],this._zColor=i.zColor?i.zColor:[.5,.5,.5],this._controlFillColor=i.controlFillColor?i.controlFillColor:[.1,.4,.99],this._planeSize=i.planeSize?i.planeSize:1,this._controlSize=i.controlSize?i.controlSize:.07,this._planeOpacity=i.planeOpacity?i.planeOpacity:.4,this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1}),[{key:"_createNodes",value:function(){var e=!1,t=this._viewer.scene,i=t.aabb,r=.01,n=i[3]-i[0],s=i[4]-i[1],o=i[5]-i[2];this._rootNode=new yn(t,{id:"sectionControl",position:[0,0,0],scale:[5,5,5],isObject:!1});var a,l,u=this._rootNode,c={arrowHead:new Ci(u,ln({radiusTop:.001,radiusBottom:.04,radialSegments:32,heightSegments:1,height:.15,openEnded:!1})),arrowHeadBig:new Ci(u,ln({radiusTop:.001,radiusBottom:.05,radialSegments:32,heightSegments:1,height:.18,openEnded:!1})),arrowHeadHandle:new Ci(u,ln({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new Ci(u,On({radius:.5,tube:r,radialSegments:32,tubeSegments:7,arc:2*Math.PI/4})),curveHandle:new Ci(u,On({radius:.5,tube:.04,radialSegments:32,tubeSegments:7,arc:2*Math.PI/4})),hoop:new Ci(u,On({radius:.8,tube:r,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new Ci(u,ln({radiusTop:r,radiusBottom:r,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new Ci(u,ln({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},h={pickable:new Ti(u,{diffuse:[1,1,0],alpha:0,alphaMode:"opaque"}),red:new Ti(u,{diffuse:this._xColor,emissive:this._xColor,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:1.5}),highlightRed:new Ii(u,{edges:!1,fill:!0,fillColor:[.8,.8,.8],fillAlpha:.6}),green:new Ti(u,{diffuse:this._yColor,emissive:this._yColor,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:1.5}),highlightGreen:new Ii(u,{edges:!1,fill:!0,fillColor:[.8,.8,.8],fillAlpha:.6}),blue:new Ti(u,{diffuse:this._zColor,emissive:this._zColor,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:1.5}),highlightBlue:new Ii(u,{edges:!1,fill:!0,fillColor:[.8,.8,.8],fillAlpha:.2}),center:new Ti(u,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new Ii(u,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new Ii(u,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:u.addChild(new on(u,{geometry:new Ci(u,{primitive:"triangles",positions:[10,5,0,10,-5,0,-10,-5,0,-10,5,0],indices:[0,1,2,2,3,0]}),material:new Ti(u,{emissive:[0,0,0],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!1,ghostMaterial:new Ii(u,{edges:!1,filled:!0,fillColor:this._controlFillColor?this._controlFillColor:[.1,.4,.99],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!0,collidable:!1,clippable:!1,visible:!1,scale:[this._planeSize,this._planeSize,this._planeSize],isObject:!1}),e),planeFrame:u.addChild(new on(u,{geometry:new Ci(u,Dn({center:[0,0,0],xSize:.1*n,ySize:.1*s,zSize:.1*o})),material:new Ti(u,{emissive:[.5,.5,.5],diffuse:[.5,.5,.5],specular:[.5,.5,.5],alpha:.2,shininess:10}),highlightMaterial:new Ii(u,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],isObject:!1}),e),xCurve:u.addChild(new on(u,{geometry:c.curve,material:h.red,matrix:(a=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),l=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4()),Y.mulMat4(l,a,Y.identityMat4())),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xCurveHandle:u.addChild(new on(u,{geometry:c.curveHandle,material:h.pickable,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurve:u.addChild(new on(u,{geometry:c.curve,material:h.green,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurveHandle:u.addChild(new on(u,{geometry:c.curveHandle,material:h.pickable,rotation:[-90,0,0],pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),center:u.addChild(new on(u,{geometry:new Ci(u,un({radius:.05})),material:h.center,pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrow:u.addChild(new on(u,{geometry:c.arrowHead,material:h.red,matrix:function(){var e=Y.translateMat4c(0,1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrowHandle:u.addChild(new on(u,{geometry:c.arrowHeadHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxis:u.addChild(new on(u,{geometry:c.axis,material:h.red,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisHandle:u.addChild(new on(u,{geometry:c.axisHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:u.addChild(new on(u,{geometry:c.arrowHead,material:h.green,matrix:function(){var e=Y.translateMat4c(0,1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrowHandle:u.addChild(new on(u,{geometry:c.arrowHeadHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,opacity:.2,isObject:!1}),e),yShaft:u.addChild(new on(u,{geometry:c.axis,material:h.green,position:[0,-.5,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yShaftHandle:u.addChild(new on(u,{geometry:c.axisHandle,material:h.pickable,position:[0,-.5,0],pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:u.addChild(new on(u,{geometry:c.arrowHead,material:h.blue,matrix:function(){var e=Y.translateMat4c(0,1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[2,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrowHandle:u.addChild(new on(u,{geometry:c.arrowHeadHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zShaft:u.addChild(new on(u,{geometry:c.axis,material:h.blue,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!1,collidable:!1,visible:!1,isObject:!1}),e),zAxisHandle:u.addChild(new on(u,{geometry:c.axisHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!0,collidable:!1,visible:!1,isObject:!1}),e)},this._affordanceMeshes={xHoop:u.addChild(new on(u,{geometry:c.hoop,material:h.red,highlighted:!0,highlightMaterial:h.highlightRed,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yHoop:u.addChild(new on(u,{geometry:c.hoop,material:h.green,highlighted:!0,highlightMaterial:h.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zHoop:u.addChild(new on(u,{geometry:c.hoop,material:h.blue,highlighted:!0,highlightMaterial:h.highlightBlue,matrix:Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4()),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xAxisArrow:u.addChild(new on(u,{geometry:c.arrowHeadBig,material:h.red,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:u.addChild(new on(u,{geometry:c.arrowHeadBig,material:h.green,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:u.addChild(new on(u,{geometry:c.arrowHeadBig,material:h.blue,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e)}}},{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.controlId,this._createNodes(),this._bindEvents(),this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this.posRate},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.camera.look,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(nk,e,sk)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2,a=3,l=4,u=5,c=this._rootNode,h=null,A=null,d=Y.vec2(),p=Y.vec3([1,0,0]),f=Y.vec3([0,1,0]),g=Y.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,v=this._viewer.camera,_=this._viewer.scene,y=Y.vec3([0,0,0]),b=-1;this._onCameraViewMatrix=_.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=_.camera.on("projMatrix",(function(){})),this._onSceneTick=_.on("tick",(function(){var t=Math.abs(Y.lenVec3(Y.subVec3(_.camera.eye,e._pos,y)));t!==b&&"perspective"===v.projection&&(Math.tan(v.perspective.fov*Y.DEGTORAD),b=t),"ortho"===v.projection&&(v.ortho.scale,b=t)}));var w,x,B,P,C,M=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),k=function(){var e=new Float64Array(2);return function(t){if(t||(t=window.event),t.touches&&t.touches.length)e[0]=t.touches[0].pageX,e[1]=t.touches[0].pageY;else{for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}return e}}(),E=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),S=(w=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],w):Y.cross3Vec3(e,[1,0,0],w),Y.cross3Vec3(w,e,w),Y.normalizeVec3(w),w}),T=(x=Y.vec3(),B=Y.vec3(),P=Y.vec4(),function(e,i,r){E(e,P);var n=S(P,i,r);I(i,n,x),I(r,n,B),Y.subVec3(B,x);var s=Y.dotVec3(B,P);t._pos[0]+=P[0]*s*.6,t._pos[1]+=P[1]*s*.6,t._pos[2]+=P[2]*s*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),F=function(){var e=Y.vec4(),i=Y.vec4(),r=Y.vec4(),n=Y.vec4();return function(s,o,a){if(E(s,n),!(I(o,n,e)&&I(a,n,i))){var l=S(n,o,a);I(o,l,e,1),I(a,l,i,1);var u=Y.dotVec3(e,n);e[0]-=u*n[0],e[1]-=u*n[1],e[2]-=u*n[2],u=Y.dotVec3(i,n),i[0]-=u*n[0],i[1]-=u*n[1],i[2]-=u*n[2]}Y.normalizeVec3(e),Y.normalizeVec3(i),u=Y.dotVec3(e,i),u=Y.clamp(u,-1,1);var c=Math.acos(u)*Y.RADTODEG;Y.cross3Vec3(e,i,r),Y.dotVec3(r,n)<0&&(c=-c),t._rootNode.rotate(s,c),D()}}(),I=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/m.width*2-1,e[1]=-(r[1]/m.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(v.projMatrix,v.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=v.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),D=function(){var e=Y.vec3(),i=Y.mat4();return function(){t.sectionPlane&&(Y.quaternionToMat4(c.quaternion,i),Y.transformVec3(i,[0,0,1],e),t._setSectionPlaneDir(e))}}(),R=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){if(e._visible&&!R){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(C&&(C.visible=!1),C=null,h=r,i=!1)})),m.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){R=!0;var r=M(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("clickPlaneStart")}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&R&&i){var r=M(t),c=r[0],h=r[1];switch(A){case n:T(p,d,r);break;case s:T(f,d,r);break;case o:T(g,d,r);break;case a:F(p,d,r);break;case l:F(f,d,r);break;case u:F(g,d,r)}d[0]=c,d[1]=h}}),m.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,R&&(R=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),m.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))}),this._onCameraControlHover=this._viewer.cameraControl.on("touchEntity",(function(t){if(e._visible&&!R&&!i){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),m.addEventListener("touchstart",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i){e._viewer.cameraControl.pointerEnabled=!1,R=!0;var r=k(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("touchPlaneStart")}}),m.addEventListener("touchmove",this._canvasMouseMoveListener=function(t){if(e._visible&&R){var i=k(t),r=i[0],c=i[1];switch(A){case n:T(p,d,i);break;case s:T(f,d,i);break;case o:T(g,d,i);break;case a:F(p,d,i);break;case l:F(f,d,i);break;case u:F(g,d,i)}d[0]=r,d[1]=c}}),m.addEventListener("touchend",this._canvasTouchEndListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,C&&(C.visible=!1),C=null,h=r,R=!1,i=!1,e.plugin.fire("touchPlaneEnd"))}),m.addEventListener("touchcancel",this._canvasTouchEndListener)}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),ak=new Float64Array([0,0,1]),lk=new Float64Array(4),uk=function(){return P((function e(t,i){x(this,e),this.id=i.id,this.type="plane",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,i?(this._controlFillColor=i.controlFillColor?i.controlFillColor:[.3,.6,1],this._planeSize=i.planeSize?i.planeSize:1,this._controlSize=i.controlSize?i.controlSize:.07,this._planeOpacity=i.planeOpacity?i.planeOpacity:.4,this._enableClip=!!i.enableClip):(this._controlFillColor=[.3,.6,1],this._planeSize=1,this._controlSize=.07,this._planeOpacity=.4,this._enableClip=!1),this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1}),[{key:"_createNodes",value:function(){var e=!1,t=this._viewer.scene;this._rootNode=new yn(t,{id:this.id,position:[0,0,0],scale:[1,1,1],isObject:!1});var i,r,n=this._rootNode,s=t.aabb,o=s[3]-s[0],a=s[4]-s[1],l=s[5]-s[2];0!=this.dir[0]?(i=l>0?1*l:1*l*-1,r=a>0?1*a:1*a*-1):0!=this.dir[1]?(i=o>0?1*o:1*o*-1,r=l>0?1*l:1*l*-1):0!=this.dir[2]&&(i=o>0?1*o:1*o*-1,r=a>0?1*a:1*a*-1),i+=0,r+=0,this._displayMeshes={plane:n.addChild(new on(n,{geometry:new Ci(n,{primitive:"triangles",positions:[i/2,r/2,.01,i/2,-r/2,.01,-i/2,-r/2,.01,-i/2,r/2,.01],indices:[0,1,2,2,3,0]}),material:new Ti(n,{emissive:[.1,.1,.1],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!0,ghostMaterial:new Ii(n,{edges:!1,filled:!0,fillColor:this._controlFillColor,fillAlpha:.1,backfaces:!0}),pickable:this.pickable,collidable:!1,clippable:this._enableClip,visible:!1,scale:[1*this._planeSize,1*this._planeSize,1*this._planeSize],isObject:!1}),e)},this._affordanceMeshes={plane:n.addChild(new on(n,{geometry:new Ci(n,{primitive:"triangles",positions:[i/2,r/2,.012,i/2,-r/2,.012,-i/2,-r/2,.012,-i/2,r/2,.012],indices:[0,1,2,2,3,0]}),material:new Ti(n,{emissive:[.6,.6,5],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!0,ghostMaterial:new Ii(n,{edges:!1,filled:!0,fillColor:this._controlFillColor,fillAlpha:.1,backfaces:!0}),pickable:!0,collidable:!1,clippable:!0,visible:!1,scale:[1*this._planeSize,1*this._planeSize,1*this._planeSize],isObject:!1}),e)}}},{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.controlId,this.dir=e.dir,this._createNodes(),this._bindEvents(),this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,e.control=this,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this._pos},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.center,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(ak,e,lk)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2;this._rootNode;var a=null,l=null,u=Y.vec2();this.lastCanvasPos=u;var c=Y.vec3([1,0,0]),h=Y.vec3([0,1,0]),A=Y.vec3([0,0,1]),d=this._viewer.scene.canvas.canvas,p=this._viewer.camera,f=this._viewer.scene;this._onCameraViewMatrix=f.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=f.camera.on("projMatrix",(function(){}));var g,m,v,_,y,b=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),w=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),x=(g=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],g):Y.cross3Vec3(e,[1,0,0],g),Y.cross3Vec3(g,e,g),Y.normalizeVec3(g),g}),B=(m=Y.vec3(),v=Y.vec3(),_=Y.vec4(),function(e,i,r){w(e,_);var n=x(_,i,r);P(i,n,m),P(r,n,v),Y.subVec3(v,m);var s,o=Y.dotVec3(v,_),a=t._sectionPlane.dir,l=t._sectionPlane.planeId,u=t._sectionPlane.posRangeMin;if(s=t._sectionPlane.box.boxRanges[(l+3)%6],0!=a[0]){if(a[0]>0){if(s=t._sectionPlane.box.boxRanges[(l+3)%6],t._pos[0]+_[0]*o*.6<u[0]||t._pos[0]+_[0]*o*.6>s[0]-.3)return}else if(t._pos[0]+_[0]*o*.6>u[0]||t._pos[0]+_[0]*o*.6<s[0]+.3)return}else if(0!=a[1]){if(a[1]>0){if(t._pos[1]+_[1]*o*.6<u[1]||t._pos[1]+_[1]*o*.6>s[1]-.3)return}else if(t._pos[1]+_[1]*o*.6>u[1]||t._pos[1]+_[1]*o*.6<s[1]+.3)return}else if(0!=a[2])if(a[2]>0){if(t._pos[2]+_[2]*o*.6<u[2]||t._pos[2]+_[2]*o*.6>s[2]-.3)return}else if(t._pos[2]+_[2]*o*.6>u[2]||t._pos[2]+_[2]*o*.6<s[2]+.3)return;t._pos[0]+=_[0]*o*.6,t._pos[1]+=_[1]*o*.6,t._pos[2]+=_[2]*o*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),P=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/d.width*2-1,e[1]=-(r[1]/d.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(p.projMatrix,p.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=p.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),C=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){var n;e._visible&&(C||(i=!1,y&&(y.visible=!1),t.entity.id===e._displayMeshes.plane.id?(n=e._affordanceMeshes.plane,a=o,n&&(n.visible=!0),y=n,i=!0):a=r))})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(y&&(y.visible=!1),a=r,i=!1)})),d.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){C=!0;var r=b(t);l=a,u[0]=r[0],u[1]=r[1],e.plugin.fire("clickPlaneStart")}}),d.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&C){var i=b(t),r=i[0],a=i[1];switch(l){case n:B(c,u,i);break;case s:B(h,u,i);break;case o:B(A,u,i)}u[0]=r,u[1]=a}}),d.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,C&&(C=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),d.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))})}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),ck=new Float64Array([0,0,1]),hk=new Float64Array(4),Ak=function(){return P((function e(t,i){x(this,e),this.id=null,this.type="plane",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,this._controlFillColor=i&&i.controlFillColor?i.controlFillColor:[.1,.4,.99],this._planeSize=i&&i.planeSize?i.planeSize:1,this._controlSize=i&&i.controlSize?i.controlSize:.07,this._planeOpacity=i&&i.planeOpacity?i.planeOpacity:.4,this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}),[{key:"_createNodes",value:function(){var e=this._viewer.scene;this._rootNode=new yn(e,{position:[0,0,0],scale:[5,5,5],isObject:!1});var t=this._rootNode;this._displayMeshes={plane:t.addChild(new on(t,{geometry:new Ci(t,{primitive:"triangles",positions:[.5,.5,.02,.5,-.5,.02,-.5,-.5,.02,-.5,.5,.02],indices:[0,1,2,2,3,0]}),material:new Ti(t,{emissive:[0,0,0],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!0,ghostMaterial:new Ii(t,{edges:!1,filled:!0,fillColor:this._controlFillColor?this._controlFillColor:[.1,.4,.99],fillAlpha:.1,backfaces:!0}),pickable:!0,collidable:!1,clippable:!1,visible:!1,scale:[2.4*this._planeSize,2.4*this._planeSize,1*this._planeSize],isObject:!1}),!1)},this._affordanceMeshes={}}},{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,e.control=this,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this._pos},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.center,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(ck,e,hk)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2;this._rootNode;var a=null,l=null,u=Y.vec2();this.lastCanvasPos=u;var c=Y.vec3([1,0,0]),h=Y.vec3([0,1,0]),A=Y.vec3([0,0,1]),d=this._viewer.scene.canvas.canvas,p=this._viewer.camera,f=this._viewer.scene,g=Y.vec3([0,0,0]),m=-1;this._onCameraViewMatrix=f.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=f.camera.on("projMatrix",(function(){})),this._onSceneTick=f.on("tick",(function(){var t=Math.abs(Y.lenVec3(Y.subVec3(f.camera.eye,e._pos,g)));t!==m&&"perspective"===p.projection&&(Math.tan(p.perspective.fov*Y.DEGTORAD),m=t),"ortho"===p.projection&&(p.ortho.scale,m=t)}));var v,_,y,b,w=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),x=function(){var e=new Float64Array(2);return function(t){if(t||(t=window.event),t.touches&&t.touches.length)e[0]=t.touches[0].pageX,e[1]=t.touches[0].pageY;else{for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}return e}}(),B=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),P=(v=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],v):Y.cross3Vec3(e,[1,0,0],v),Y.cross3Vec3(v,e,v),Y.normalizeVec3(v),v}),C=(_=Y.vec3(),y=Y.vec3(),b=Y.vec4(),function(e,i,r){B(e,b);var n=P(b,i,r);M(i,n,_),M(r,n,y),Y.subVec3(y,_);var s=Y.dotVec3(y,b);t._pos[0]+=b[0]*s*.6,t._pos[1]+=b[1]*s*.6,t._pos[2]+=b[2]*s*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),M=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/d.width*2-1,e[1]=-(r[1]/d.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(p.projMatrix,p.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=p.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),k=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){e._visible&&(k||(i=!1,t.entity.id===e._displayMeshes.plane.id?(a=o,i=!0):a=r))})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(a=r,i=!1)})),d.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){k=!0;var r=w(t);l=a,u[0]=r[0],u[1]=r[1],e.plugin.fire("clickPlaneStart")}}),d.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&k){var i=w(t),r=i[0],a=i[1];switch(l){case n:C(c,u,i);break;case s:C(h,u,i);break;case o:C(A,u,i)}u[0]=r,u[1]=a}}),d.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,k&&(t.which,k=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),d.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))}),this._onCameraControlHover=this._viewer.cameraControl.on("touchEntity",(function(t){var n;!e._visible||k||i||(t.entity.id===e._displayMeshes.plane.id?(n=e._affordanceMeshes.plane,a=o,n&&(n.visible=!0),i=!0,k=!0):a=r)})),d.addEventListener("touchstart",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&k){e._viewer.cameraControl.pointerEnabled=!1;var r=x(t);l=a,u[0]=r[0],u[1]=r[1],e.plugin.fire("touchPlaneStart")}}),d.addEventListener("touchmove",this._canvasMouseMoveListener=function(t){if(e._visible&&k&&i){var r=x(t),a=r[0],d=r[1];switch(l){case n:C(c,u,r);break;case s:C(h,u,r);break;case o:C(A,u,r)}u[0]=a,u[1]=d}}),d.addEventListener("touchend",this._canvasTouchEndListener=function(t){e._visible&&(i&&(e._viewer.cameraControl.pointerEnabled=!0),a=r,k=!1,i=!1,e.plugin.fire("touchPlaneEnd"))}),d.addEventListener("touchcancel",this._canvasTouchEndListener)}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),dk=function(){return P((function e(t,i,r){var n=this;x(this,e),this.id=r.id,this._sectionPlane=r,this._mesh=new on(i,{id:r.id,geometry:new Ci(i,Mi({xSize:.5,ySize:.5,zSize:.001})),material:new Ti(i,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new Ri(i,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ii(i,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ii(i,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});var s=Y.vec3([0,0,0]),o=Y.vec3(),a=Y.vec3([0,0,1]),l=Y.vec4(4),u=Y.vec3(),c=function(){var e=n._sectionPlane.scene.center,t=[-n._sectionPlane.dir[0],-n._sectionPlane.dir[1],-n._sectionPlane.dir[2]];Y.subVec3(e,n._sectionPlane.pos,s);var i=-Y.dotVec3(t,s);Y.normalizeVec3(t),Y.mulVec3Scalar(t,i,o);var r=Y.vec3PairToQuaternion(a,n._sectionPlane.dir,l);u[0]=.1*o[0],u[1]=.1*o[1],u[2]=.1*o[2],n._mesh.quaternion=r,n._mesh.position=u};this._onSectionPlanePos=this._sectionPlane.on("pos",c),this._onSectionPlaneDir=this._sectionPlane.on("dir",c),this._highlighted=!1,this._selected=!1}),[{key:"setHighlighted",value:function(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}},{key:"getHighlighted",value:function(){return this._highlighted}},{key:"setSelected",value:function(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}},{key:"getSelected",value:function(){return this._selected}},{key:"destroy",value:function(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}}])}(),pk=function(){return P((function e(t,i,r){var n=this;x(this,e),this.id=sectionPlane.id,this._sectionBox=r,this._mesh=new on(i,{id:sectionPlane.id,geometry:new Ci(i,Mi({xSize:.5,ySize:.5,zSize:.001})),material:new Ti(i,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new Ri(i,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ii(i,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ii(i,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});var s=Y.vec3([0,0,0]),o=Y.vec3(),a=Y.vec3([0,0,1]),l=Y.vec4(4),u=Y.vec3(),c=function(){var e=n._sectionBox.scene.center,t=[-n._sectionBox.dir[0],-n._sectionBox.dir[1],-n._sectionBox.dir[2]];Y.subVec3(e,n._sectionBox.pos,s);var i=-Y.dotVec3(t,s);Y.normalizeVec3(t),Y.mulVec3Scalar(t,i,o);var r=Y.vec3PairToQuaternion(a,n._sectionBox.dir,l);u[0]=.1*o[0],u[1]=.1*o[1],u[2]=.1*o[2],n._mesh.quaternion=r,n._mesh.position=u};this._onSectionPlanePos=this._sectionBox.on("pos",c),this._onSectionPlaneDir=this._sectionBox.on("dir",c),this._highlighted=!1,this._selected=!1}),[{key:"setHighlighted",value:function(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}},{key:"getHighlighted",value:function(){return this._highlighted}},{key:"setSelected",value:function(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}},{key:"getSelected",value:function(){return this._selected}},{key:"destroy",value:function(){this._sectionBox.off(this._onSectionPlanePos),this._sectionBox.off(this._onSectionPlaneDir),this._mesh.destroy()}}])}(),fk=function(){return P((function e(t,i){var r=this;if(x(this,e),!(i.onHoverEnterPlane&&i.onHoverLeavePlane&&i.onClickedNothing&&i.onClickedPlane))throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=t,this._viewer=t.viewer,this._onHoverEnterPlane=i.onHoverEnterPlane,this._onHoverLeavePlane=i.onHoverLeavePlane,this._onClickedNothing=i.onClickedNothing,this._onClickedPlane=i.onClickedPlane,this._visible=!0,this._planes={},this._box=null,this._canvas=i.overviewCanvas,this._scene=new zi(this._viewer,{canvasId:this._canvas.id,transparent:!0,spinnerElementId:"overviewer_spinner"}),this._scene.clearLights(),new hi(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new hi(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new hi(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;var n=this._scene.camera,s=Y.rotationMat4c(-90*Y.DEGTORAD,1,0,0),o=Y.vec3(),a=Y.vec3(),l=Y.vec3();this._synchCamera=function(){var e=r._viewer.camera.eye,t=r._viewer.camera.look,i=r._viewer.camera.up;Y.mulVec3Scalar(Y.normalizeVec3(Y.subVec3(e,t,o)),7),r._zUp?(Y.transformVec3(s,o,a),Y.transformVec3(s,i,l),n.look=[0,0,0],n.eye=Y.transformVec3(s,o,a),n.up=Y.transformPoint3(s,i,l)):(n.look=[0,0,0],n.eye=o,n.up=i)},this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",(function(e){r._scene.camera.perspective.fov=e}));var u=null;this._onInputMouseMove=this._scene.input.on("mousemove",(function(e){var t=r._scene.pick({canvasPos:e});if(t){if(!u||t.entity.id!==u.id){if(u)r._planes[u.id]&&r._onHoverLeavePlane(u.id);u=t.entity,r._planes[u.id]&&r._onHoverEnterPlane(u.id)}}else u&&(r._onHoverLeavePlane(u.id),u=null)})),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=function(){u?r._planes[u.id]&&r._onClickedPlane(u.id):r._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=function(){u&&(r._onHoverLeavePlane(u.id),u=null)}),this.setVisible(i.overviewVisible)}),[{key:"addSectionPlane",value:function(e){this._planes[e.id]=new dk(this,this._scene,e)}},{key:"setSectionBox",value:function(e){this._box=new pk(this,this._scene,e)}},{key:"setPlaneHighlighted",value:function(e,t){var i=this._planes[e];i&&i.setHighlighted(t)}},{key:"setPlaneSelected",value:function(e,t){var i=this._planes[e];i&&i.setSelected(t)}},{key:"removeSectionPlane",value:function(e){var t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}},{key:"getVisible",value:function(){return this._visible}},{key:"destroy",value:function(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}])}(),gk=function(){return P((function e(t){x(this,e),this._viewer=t.viewer,this._scene=t.viewer.scene,this._sectionPlugin=t,this._boxCenter=[0,0,0],this._maxRange=[],this._createNodes()}),[{key:"_createNodes",value:function(){var e=this._viewer.scene,t=e.aabb,i=e.center,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2];this._rootNode=new yn(e,{id:"sectionControl",position:i,scale:[1,1,1],isObject:!1});var o=this._rootNode;this._displayMeshes={box:o.addChild(new on(o,{geometry:new Ci(o,Dn({center:this._boxCenter,xSize:.5*(r>0?r:-1*r)+0,ySize:.5*(n>0?n:-1*n)+0,zSize:.5*(s>0?s:-1*s)+0})),material:new Ti(o,{emissive:[.5,6.5,9.5],diffuse:[.5,6.5,9.5],specular:[.5,.5,.5],alpha:.2,shininess:10}),pickable:!1,collidable:!1,clippable:!1,visible:!0,scale:[1,1,1],isObject:!1}),!1)}}},{key:"updateBox",value:function(e,t){if(!(t.length<6)){var i,r,n;i=t[3][0]-t[0][0],r=t[4][1]-t[1][1],n=t[5][2]-t[2][2];var s=this._getGeometryPoisition(e,i,r,n);this._setGeometryPosition(s)}}},{key:"_getGeometryPoisition",value:function(e,t,i,r){var n=.5,s=this._boxCenter;return 0!=e[0]&&(e[0]<0&&(s[0]-=((t>0?t:-1*t)*n+.2)/4),e[0]>0&&(s[0]+=((t>0?t:-1*t)*n+.2)/4)),0!=e[1]&&(e[1]<0&&(s[1]-=((i>0?i:-1*i)*n+.2)/4),e[1]>0&&(s[1]+=((i>0?i:-1*i)*n+.2)/4)),0!=e[2]&&(e[2]<0&&(s[2]-=((r>0?r:-1*r)*n+.2)/4),e[2]>0&&(s[2]+=((r>0?r:-1*r)*n+.2)/4)),Dn({center:s,xSize:(t>0?t:-1*t)*n+.2,ySize:(i>0?i:-1*i)*n+.2,zSize:(r>0?r:-1*r)*n+.2}).positions}},{key:"_setGeometryPosition",value:function(e){this._displayMeshes.box.geometry.positions=e}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"_destroy",value:function(){this._rootNode.destroy(),this._displayMeshes={}}}])}(),mk=Y.AABB3(),vk=Y.vec3(),_k=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(x(this,e),(i=d(this,e,["SectionPlanes",t]))._freeControls=[],i._controlBox=null,i._singleCtrlBox=null,i._sectionWay=null,i._sectionPlanes=t.scene.sectionPlanes,i._controls={},i._currentControl=null,i._shownControlId=null,i._shownControlIds=[],i._boxPlaneConfig={id:"",planeId:-1,enableClip:!1,controlFillColor:[3,9,9]},null!==r.overviewCanvasId&&void 0!==r.overviewCanvasId){var n=document.getElementById(r.overviewCanvasId);n?i._overview=new fk(i,{overviewCanvas:n,visible:r.overviewVisible,onHoverEnterPlane:function(e){i._overview.setPlaneHighlighted(e,!0)},onHoverLeavePlane:function(e){i._overview.setPlaneHighlighted(e,!1)},onClickedPlane:function(e){if(i.getShownControl()!==e){i.showControl(e);var t=i.sectionPlanes[e].pos;mk.set(i.viewer.scene.aabb),Y.getAABB3Center(mk,vk),mk[0]+=t[0]-vk[0],mk[1]+=t[1]-vk[1],mk[2]+=t[2]-vk[2],mk[3]+=t[0]-vk[0],mk[4]+=t[1]-vk[1],mk[5]+=t[2]-vk[2],i.viewer.cameraFlight.flyTo({aabb:mk,fitFOV:65})}else i.hideControl()},onClickedNothing:function(){i.hideControl()}}):i.warn("Can't find overview canvas: '"+r.overviewCanvasId+"' - will create plugin without overview")}return i._onSceneSectionPlaneCreated=t.scene.on("sectionPlaneCreated",(function(e){i._sectionPlaneCreated(e)})),i._onSceneSectionBoxCreated=t.scene.on("sectionBoxCreated",(function(e){i._controlBox=e})),i.controlset=r.controlset,i}return _(e,ge),P(e,[{key:"setOverviewVisible",value:function(e){this._overview&&this._overview.setVisible(e)}},{key:"getOverviewVisible",value:function(){if(this._overview)return this._overview.getVisible()}},{key:"sectionPlanes",get:function(){return this._sectionPlanes}},{key:"createSectionPlane",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0!==e.id&&null!==e.id&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new cn(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}},{key:"createSectionBox",value:function(){this._sectionWay="box";var e=new gk(this);return new Sh(this.viewer.scene,{id:"sectionBox",active:!0,controlIdName:"sectionBoxPlane_",lineBox:e})}},{key:"createSectionSingle",value:function(){return this._sectionWay="box",new Sh(this.viewer.scene,{id:"sectionBox",active:!0,pickable:!1,enableClip:!1,controlIdName:"sectionBoxPlane_"})}},{key:"_sectionPlaneCreated",value:function(e){var t,i=this;switch(this._sectionWay){case"plane":t=this._freeControls.length>0?this._freeControls.pop():new Ak(this,this._controlsConfig);break;case"box":this._boxPlaneConfig.enableClip=e.enableClip,this._boxPlaneConfig.pickable=e.pickable,this._boxPlaneConfig.controlFillColor=e.controlFillColor,t=this._freeControls.length>0?this._freeControls.pop():new uk(this,this._boxPlaneConfig);break;case"singleCtrl":t=this._freeControls.length>0?this._freeControls.pop():new ok(this,this.controlset);break;default:t=new rk(this)}var r=t;r._setSectionPlane(e),r.setVisible(!0),e.control=r,this._currentControl=r,null==e.box&&(this._controls[e.id]=r),this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",(function(){i._sectionPlaneDestroyed(e)}))}},{key:"isTouch",set:function(e){this._isTouch=e,this.sectionWay=!0===e?"plane":this._sectionWay?this._sectionWay:"control"}},{key:"sectionConfigs",set:function(e){this._controlsConfig=e}},{key:"boxPlaneConfigs",set:function(e){this._boxPlaneConfig=e}},{key:"sectionWay",set:function(e){this._sectionWay=e}},{key:"sectionDirection",set:function(e){var t;switch(this.clear(),e){case 0:t=[0,0,-1];break;case 1:t=[-1,0,0];break;case 2:t=[0,-1,0]}var i=this.viewer.scene.center;this.createSectionPlane({pos:Y.AABB3([i[0],i[1],i[2]]),dir:t})}},{key:"sectionSingleDirection",set:function(e){var t;switch(this.hideControl(),this._sectionWay="singleCtrl",e){case 0:t=[0,0,-1];break;case 1:t=[-1,0,0];break;case 2:t=[0,-1,0]}var i=this.viewer.scene.center;this.createSectionPlane({pos:Y.AABB3([i[0],i[1],i[2]]),dir:t})}},{key:"controlBox",get:function(){return this._controlBox}},{key:"setControlPos",value:function(e){null!=this._currentControl&&(this._currentControl.pos=e)}},{key:"getControlPos",value:function(){return null==this._currentControl?-1:this._currentControl.posRate}},{key:"flipSectionPlanes",value:function(){var e=this.viewer.scene.sectionPlanes;for(var t in e){e[t].flipDir()}}},{key:"showControl",value:function(e){var t=this._controls[e];t?(t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e,this._shownControlIds=[e]):this.error("Control not found: "+e)}},{key:"setControlsSize",value:function(e){for(var t in this._controls)this._controls[t].controlSize=e}},{key:"setControlSizeByID",value:function(e,t){this._controls[e]?this._controls[e].controlSize=t:this.error("Control not found: "+e)}},{key:"getShownControl",value:function(){return this._shownControlId}},{key:"getShownControls",value:function(){return this._shownControlIds}},{key:"showAllControl",value:function(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._shownControlIds.push(e),this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1))}},{key:"hideControl",value:function(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null,this._shownControlIds=[]}},{key:"destroySectionPlane",value:function(e){var t=this.viewer.scene.sectionPlanes[e];t?(this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null,this._shownControlIds=[])):this.error("SectionPlane not found: "+e)}},{key:"_sectionPlaneDestroyed",value:function(e){this._overview&&this._overview.removeSectionPlane(e);var t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}},{key:"clear",value:function(){this._controlBox&&this._controlBox.destroy();for(var e=Object.keys(this._sectionPlanes),t=0,i=e.length;t<i;t++)this.destroySectionPlane(e[t])}},{key:"send",value:function(e,t){switch(e){case"snapshotStarting":for(var i in this._controls)this._controls.hasOwnProperty(i)&&this._controls[i].setCulled(!0);break;case"snapshotFinished":for(var r in this._controls)this._controls.hasOwnProperty(r)&&this._controls[r].setCulled(!1);break;case"clearSectionPlanes":this.clear()}}},{key:"destroy",value:function(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),g(e,"destroy",this,3)([])}},{key:"_destroyFreeControls",value:function(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}])}();Y.vec3(),Y.mat4();var yk=function(){function e(t){var i;return x(this,e),(i=d(this,e,["skyboxes",t])).skyboxes={},i._active=!1,i}return _(e,ge),P(e,[{key:"send",value:function(e,t){if("clear"===e)this.clear()}},{key:"createSkybox",value:function(e,t){if(this.viewer.scene.components[e])return this.error("Component with this ID already exists: "+e),this;if(!t.src&&!t.image)return this.error("No legal skybox image or src: "+e),this;if(t.src){var i=new Th(this.viewer.scene,{id:e,size:t.size,scale:t.scale,src:t.src,active:t.active,encoding:3e3});return this.skyboxes[e]=i,i}if(t.image){i=new Th(this.viewer.scene,{id:e,size:t.size,scale:t.scale,image:t.image,active:t.active,encoding:3e3});return this.skyboxes[e]=i,i}}},{key:"setSkyBoxActiveById",value:function(e,t){this.skyboxes[e].active=t}},{key:"active",get:function(){return this._active},set:function(e){this._active=e;for(var t=0;t<this.skyboxes.length;t++)this.skyboxes[t].active=e}},{key:"getSkyBoxById",value:function(e){return this.skyboxes[e]}},{key:"destroySkybox",value:function(e){var t=this.skyboxes[e];t?t.destroy():this.error("Skybox not found: "+e)}},{key:"clear",value:function(){for(var e=Object.keys(this.skyboxes),t=0,i=e.length;t<i;t++)this.destroySkybox(e[t])}},{key:"destroy",value:function(){this.clear()}}])}(),bk=[],wk=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,e),(i=d(this,e,["TreeViewPlugin",t])).errors=[],i.valid=!0;for(var n=0;;n++)if(!bk[n]){bk[n]=i,i._index=n,i._id="tree-".concat(n);break}if(i._metaModels={},i._autoAddModels=!1!==r.autoAddModels,i._autoExpandDepth=r.autoExpandDepth||0,i._sortNodes=!1!==r.sortNodes,i._viewer=t,i._rootElement=null,i._muteSceneEvents=!1,i._muteTreeEvents=!1,i._rootNodes=[],i._objectNodes={},i._nodeNodes={},i._rootNames={},i._sortNodes=r.sortNodes,i._pruneEmptyNodes=r.pruneEmptyNodes,i._showListItemElementId=null,i._onObjectVisibility=i._viewer.scene.on("objectVisibility",(function(e){if(!i._muteSceneEvents){var t=e.id,r=i._objectNodes[t];if(r){var n=e.visible;if(n!==r.checked){i._muteTreeEvents=!0,r.checked=n,n?r.numVisibleEntities++:r.numVisibleEntities--;for(var s=r.parent;s;)s.checked=n,n?s.numVisibleEntities++:s.numVisibleEntities--,s=s.parent;i._muteTreeEvents=!1}}}})),i._onObjectXrayed=i._viewer.scene.on("objectXRayed",(function(e){if(!i._muteSceneEvents){var t=e.id,r=i._objectNodes[t];if(r){i._muteTreeEvents=!0;var n=e.xrayed;n!==r.xrayed&&(r.xrayed=n,i._muteTreeEvents=!1)}}})),i._hierarchy=r.hierarchy||"containment",i._autoExpandDepth=r.autoExpandDepth||0,i._autoAddModels){for(var s=Object.keys(i.viewer.metaScene.metaModels),o=0,a=s.length;o<a;o++){var l=s[o];i.viewer.metaScene.metaModels[l].finalized&&i.addModel(l)}i.viewer.scene.on("modelLoaded",(function(e){i.viewer.metaScene.metaModels[e]&&i.addModel(e)}))}return i.hierarchy=r.hierarchy,i}return _(e,ge),P(e,[{key:"switchExpandHandler",value:function(e){e.preventDefault(),e.stopPropagation(),e.target,this.fire("ExpandHandler",e)}},{key:"switchCollapseHandler",value:function(e){e.preventDefault(),e.stopPropagation(),this.fire("CollapseHandler",e)}},{key:"checkboxChangeHandler",value:function(e){if(this.fire("checkBoxChanged",e),!this._muteTreeEvents){this._muteSceneEvents=!0;var t=e.target,i=t.checked,r=t.id.replace("checkbox-",""),n=this._nodeNodes[r],s=this._viewer.scene.objects,o=0;this._withNodeTree(n,(function(e){var t=e.objectId,r=s[t],n=0===e.children.length;e.numVisibleEntities=i?e.numEntities:0,n&&i!==e.checked&&o++,e.checked=i,function(e,t){var i=document.getElementById("checkbox-".concat(e));i&&t!==i.checked&&(i.checked=t)}(e.nodeId,i),r&&(r.visible=i)}));for(var a=n.parent;a;)a.checked=i,i?a.numVisibleEntities+=o:a.numVisibleEntities-=o,l(a.nodeId,a.numVisibleEntities>0),a=a.parent;this._muteSceneEvents=!1}function l(e,t){var i=document.getElementById("checkbox-".concat(e));i&&t!==i.checked&&(i.checked=t)}}},{key:"hierarchy",get:function(){return this._hierarchy},set:function(e){"containment"!==(e=e||"containment")&&"storeys"!==e&&"types"!==e&&(this.error("Unsupported value for `hierarchy' - defaulting to 'containment'"),e="containment"),this._hierarchy!==e&&(this._hierarchy=e,this._createNodes())}},{key:"muteTreeEvents",get:function(){return this._muteTreeEvents},set:function(e){this._muteTreeEvents=e}},{key:"nodeNodes",get:function(){return this._nodeNodes}},{key:"_createNodes",value:function(){this._rootElement&&(this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null),this._rootNodes=[],this._objectNodes={},this._nodeNodes={},this._validate(),(this.valid||"storeys"!==this._hierarchy)&&this._createEnabledNodes()}},{key:"_createEnabledNodes",value:function(){switch(this._pruneEmptyNodes&&this._findEmptyNodes(),this._hierarchy){case"storeys":this._createStoreysNodes(),0===this._rootNodes.length&&this.error("Failed to build storeys hierarchy");break;case"types":this._createTypesNodes();break;default:this._createContainmentNodes()}this._sortNodes&&this._doSortNodes(),this._synchNodesToEntities(),this.fire("nodeNodes_Created",this._nodeNodes),this.fire("rootNodes_Created",this._rootNodes),this.fire("objectNodes_Created",this._objectNodes)}},{key:"_createStoreysNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._createStoreysNodes2(e[t],null,null,null)}},{key:"_createStoreysNodes2",value:function(e,t,i,r){if(!this._pruneEmptyNodes||0!==e._countEntities){var n=e.type,s=e.name,o=e.children,a=e.id;if("IfcBuilding"===n)t={nodeId:"".concat(this._id,"-").concat(a),objectId:a,title:0===e.metaModels.length?"na":this._rootNames[e.metaModels[0].id]||(s&&""!==s&&"Undefined"!==s&&"Default"!==s?s:n),type:n,parent:null,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},this._rootNodes.push(t),this._objectNodes[t.objectId]=t,this._nodeNodes[t.nodeId]=t;else if("IfcBuildingStorey"===n){if(!t)return void this.error("Failed to build storeys hierarchy for model '"+this.metaModel.id+"' - model does not have an IfcBuilding object, or is not an IFC model");i={nodeId:"".concat(this._id,"-").concat(a),objectId:a,title:s&&""!==s&&"Undefined"!==s&&"Default"!==s?s:n,type:n,parent:t,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},t.children.push(i),this._objectNodes[i.objectId]=i,this._nodeNodes[i.nodeId]=i,r={}}else{if(i)if(this._viewer.scene.objects[a]){var l=(r=r||{})[n];l||(l={nodeId:"".concat(this._id,"-").concat(i.objectId,"-").concat(n),objectId:"".concat(i.objectId,"-").concat(n),title:n,type:n,parent:i,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},i.children.push(l),this._objectNodes[l.objectId]=l,this._nodeNodes[l.nodeId]=l,r[n]=l);var u={nodeId:"".concat(this._id,"-").concat(a),objectId:a,title:s&&""!==s&&"Undefined"!==s&&"Default"!==s?s:n,type:n,parent:l,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]};l.children.push(u),this._objectNodes[u.objectId]=u,this._nodeNodes[u.nodeId]=u}}if(o)for(var c=0,h=o.length;c<h;c++){var A=o[c];this._createStoreysNodes2(A,t,i,r)}}}},{key:"_createTypesNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._createTypesNodes2(e[t],null,null)}},{key:"_createTypesNodes2",value:function(e,t,i){if(!this._pruneEmptyNodes||0!==e._countEntities){var r=e.type,n=e.name,s=e.children,o=e.id;if(e.parent){if(t)if(this._viewer.scene.objects[o]){var a=i[r];a||(a={nodeId:"".concat(this._id,"-").concat(t.objectId,"-").concat(r),objectId:"".concat(t.objectId,"-").concat(r),title:r,type:r,parent:t,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},t.children.push(a),this._objectNodes[a.objectId]=a,this._nodeNodes[a.nodeId]=a,i[r]=a);var l={nodeId:"".concat(this._id,"-").concat(o),objectId:o,title:n&&""!==n&&"Default"!==n?n:r,type:r,parent:a,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]};a.children.push(l),this._objectNodes[l.objectId]=l,this._nodeNodes[l.nodeId]=l}}else t={nodeId:"".concat(this._id,"-").concat(o),objectId:o,title:0===e.metaModels.length?"na":this._rootNames[e.metaModels[0].id]||(n&&""!==n&&"Undefined"!==n&&"Default"!==n?n:r),type:r,parent:null,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},this._rootNodes.push(t),this._objectNodes[t.objectId]=t,this._nodeNodes[t.nodeId]=t,i={};if(s)for(var u=0,c=s.length;u<c;u++){var h=s[u];this._createTypesNodes2(h,t,i)}}}},{key:"_createContainmentNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._createContainmentNodes2(e[t],null)}},{key:"_createContainmentNodes2",value:function(e,t){if(!this._pruneEmptyNodes||0!==e._countEntities){var i=e.type,r=e.name||i,n=e.children,s=e.id,o={nodeId:"".concat(this._id,"-").concat(s),objectId:s,title:t?r&&""!==r&&"Undefined"!==r&&"Default"!==r?r:i:0===e.metaModels.length?"na":this._rootNames[e.metaModels[0].id]||r,type:i,parent:t,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]};if(t?t.children.push(o):this._rootNodes.push(o),this._objectNodes[o.objectId]=o,this._nodeNodes[o.nodeId]=o,n)for(var a=0,l=n.length;a<l;a++){var u=n[a];this._createContainmentNodes2(u,o)}}}},{key:"_synchNodesToEntities",value:function(){for(var e=Object.keys(this.viewer.metaScene.metaObjects),t=this._viewer.metaScene.metaObjects,i=this._viewer.scene.objects,r=0,n=e.length;r<n;r++){var s=e[r];if(t[s]){var o=this._objectNodes[s];if(o){var a=i[s];if(a){var l=a.visible;o.numEntities=1,o.xrayed=a.xrayed,l?(o.numVisibleEntities=1,o.checked=!0):(o.numVisibleEntities=0,o.checked=!1);for(var u=o.parent;u;)u.numEntities++,l&&(u.numVisibleEntities++,u.checked=!0),u=u.parent}}}}}},{key:"_validate",value:function(){if(this.errors=[],"storeys"===this._hierarchy)this.valid=this._validateMetaModelForStoreysHierarchy();else this.valid=this._rootNodes.length>0;return this.valid}},{key:"_validateMetaModelForStoreysHierarchy",value:function(){return!0}},{key:"addModel",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.viewer.scene.models[e];if(!r)throw"Model not found: "+e;var n=this.viewer.metaScene.metaModels[e];n?(this._metaModels[e]&&(this._metaModels[e]=null),this._metaModels[e]=n,i&&i.rootName&&(this._rootNames[e]=i.rootName),r.on("destroyed",(function(){t.removeModel(r.id)})),this._createNodes()):this.error("MetaModel not found: "+e)}},{key:"removeModel",value:function(e){this._metaModels[e]&&(this._rootNames[e]&&delete this._rootNames[e],delete this._metaModels[e],this._createNodes())}},{key:"showNode",value:function(e){this.unShowNode();var t=this._objectNodes[e];if(t){for(var i=t.nodeId,r=t.parent;r;)r=r.parent;this._showListItemElementId=i}}},{key:"unShowNode",value:function(){this._showListItemElementId&&(this._showListItemElementId=null)}},{key:"withNodeTree",value:function(e,t){t(e);var i=e.children;if(i)for(var r=0,n=i.length;r<n;r++)this.withNodeTree(i[r],t)}},{key:"_withNodeTree",value:function(e,t){t(e);var i=e.children;if(i)for(var r=0,n=i.length;r<n;r++)this._withNodeTree(i[r],t)}},{key:"getChildrenById",value:function(e){return this._nodeNodes[e].children}},{key:"getNodeById",value:function(e){return this._nodeNodes[e]}},{key:"destroy",value:function(){this._metaModels={},this._rootElement&&!this._destroyed&&(this._rootElement.parentNode.removeChild(this._rootElement),this._viewer.scene.off(this._onObjectVisibility),this._destroyed=!0),delete bk[this._index],g(e,"destroy",this,3)([])}},{key:"_findEmptyNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._findEmptyNodes2(e[t])}},{key:"_findEmptyNodes2",value:function(e){var t=this.viewer.scene,i=e.children,r=e.id,n=t.objects[r];if(e._countEntities=0,n&&e._countEntities++,i)for(var s=0,o=i.length;s<o;s++){var a=i[s];a._countEntities=this._findEmptyNodes2(a),e._countEntities+=a._countEntities}return e._countEntities}},{key:"_doSortNodes",value:function(){for(var e=0,t=this._rootNodes.length;e<t;e++){var i=this._rootNodes[e];this._sortChildren(i)}}},{key:"_sortChildren",value:function(e){var t=e.children;if(t&&0!==t.length){"storeys"===this._hierarchy&&"IfcBuilding"===e.type?t.sort(this._getSpatialSortFunc()):t.sort(this._alphaSortFunc);for(var i=0,r=t.length;i<r;i++){var n=t[i];this._sortChildren(n)}}}},{key:"_getSpatialSortFunc",value:function(){var e=this.viewer,t=e.scene,i=t.camera,r=e.metaScene;return this._spatialSortFunc||(this._spatialSortFunc=function(e,n){e.aabb&&n.aabb||(e.aabb||(e.aabb=t.getAABB(r.getObjectIDsInSubtree(e.objectId))),n.aabb||(n.aabb=t.getAABB(r.getObjectIDsInSubtree(n.objectId))));var s=0;return s=i.xUp?0:i.yUp?1:2,e.aabb[s]>n.aabb[s]?-1:e.aabb[s]<n.aabb[s]?1:0})}},{key:"_alphaSortFunc",value:function(e,t){var i=e.title.toUpperCase(),r=t.title.toUpperCase();return i<r?-1:i>r?1:0}}])}(),xk=function(){return P((function e(){x(this,e)}),[{key:"getManifest",value:function(e,t,i){ne.loadJSON(e,(function(e){t(e)}),(function(e){i(e)}))}},{key:"getMetaModel",value:function(e,t,i){ne.loadJSON(e,(function(e){t(e)}),(function(e){i(e)}))}},{key:"getXTC",value:function(e,t,i){var r=function(){};t=t||r,i=i||r;var n=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(n){var s=!!n[2],o=n[3];o=window.decodeURIComponent(o),s&&(o=window.atob(o));try{for(var a=new ArrayBuffer(o.length),l=new Uint8Array(a),u=0;u<o.length;u++)l[u]=o.charCodeAt(u);t(a)}catch(e){i(e)}}else{var c=new XMLHttpRequest;c.open("GET",e,!0),c.responseType="arraybuffer",c.onreadystatechange=function(){4===c.readyState&&(200===c.status?t(c.response):i("getXTC error : "+c.response))},c.send(null)}}}])}();!function(e,t){"object"==("undefined"==typeof exports?"undefined":w(exports))&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pako={})}(void 0,(function(e){function t(e){for(var t=e.length;--t>=0;)e[t]=0}var i=new Uint8Array([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]),r=new Uint8Array([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]),n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);t(o);var a=new Array(60);t(a);var l=new Array(512);t(l);var u=new Array(256);t(u);var c=new Array(29);t(c);var h,A,d,p=new Array(30);function f(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(p);var m=function(e){return e<256?l[e]:l[256+(e>>>7)]},v=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},_=function(e,t,i){e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,v(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},y=function(e,t,i){_(e,i[2*t],i[2*t+1])},b=function(e,t){var i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},x=function(e,t,i){var r,n,s=new Array(16),o=0;for(r=1;r<=15;r++)o=o+i[r-1]<<1,s[r]=o;for(n=0;n<=t;n++){var a=e[2*n+1];0!==a&&(e[2*n]=b(s[a]++,a))}},B=function(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},P=function(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},C=function(e,t,i,r){var n=2*t,s=2*i;return e[n]<e[s]||e[n]===e[s]&&r[t]<=r[i]},M=function(e,t,i){for(var r=e.heap[i],n=i<<1;n<=e.heap_len&&(n<e.heap_len&&C(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!C(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r},k=function(e,t,n){var s,o,a,l,h=0;if(0!==e.sym_next)do{s=255&e.pending_buf[e.sym_buf+h++],s+=(255&e.pending_buf[e.sym_buf+h++])<<8,o=e.pending_buf[e.sym_buf+h++],0===s?y(e,o,t):(a=u[o],y(e,a+256+1,t),0!==(l=i[a])&&(o-=c[a],_(e,o,l)),s--,a=m(s),y(e,a,n),0!==(l=r[a])&&(s-=p[a],_(e,s,l)))}while(h<e.sym_next);y(e,256,t)},E=function(e,t){var i,r,n,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,i=0;i<l;i++)0!==s[2*i]?(e.heap[++e.heap_len]=u=i,e.depth[i]=0):s[2*i+1]=0;for(;e.heap_len<2;)s[2*(n=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[n]=0,e.opt_len--,a&&(e.static_len-=o[2*n+1]);for(t.max_code=u,i=e.heap_len>>1;i>=1;i--)M(e,s,i);n=l;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,s,1),r=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=r,s[2*n]=s[2*i]+s[2*r],e.depth[n]=(e.depth[i]>=e.depth[r]?e.depth[i]:e.depth[r])+1,s[2*i+1]=s[2*r+1]=n,e.heap[1]=n++,M(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var i,r,n,s,o,a,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,A=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,f=0;for(s=0;s<=15;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;i<573;i++)(s=l[2*l[2*(r=e.heap[i])+1]+1]+1)>p&&(s=p,f++),l[2*r+1]=s,r>u||(e.bl_count[s]++,o=0,r>=d&&(o=A[r-d]),a=l[2*r],e.opt_len+=a*(s+o),h&&(e.static_len+=a*(c[2*r+1]+o)));if(0!==f){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,f-=2}while(f>0);for(s=p;0!==s;s--)for(r=e.bl_count[s];0!==r;)(n=e.heap[--i])>u||(l[2*n+1]!==s&&(e.opt_len+=(s-l[2*n+1])*l[2*n],l[2*n+1]=s),r--)}}(e,t),x(s,u,e.bl_count)},S=function(e,t,i){var r,n,s=-1,o=t[1],a=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++a<l&&n===o||(a<u?e.bl_tree[2*n]+=a:0!==n?(n!==s&&e.bl_tree[2*n]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,s=n,0===o?(l=138,u=3):n===o?(l=6,u=3):(l=7,u=4))},T=function(e,t,i){var r,n,s=-1,o=t[1],a=0,l=7,u=4;for(0===o&&(l=138,u=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++a<l&&n===o)){if(a<u)do{y(e,n,e.bl_tree)}while(0!=--a);else 0!==n?(n!==s&&(y(e,n,e.bl_tree),a--),y(e,16,e.bl_tree),_(e,a-3,2)):a<=10?(y(e,17,e.bl_tree),_(e,a-3,3)):(y(e,18,e.bl_tree),_(e,a-11,7));a=0,s=n,0===o?(l=138,u=3):n===o?(l=6,u=3):(l=7,u=4)}},F=!1,I=function(e,t,i,r){_(e,0+(r?1:0),3),P(e),v(e,i),v(e,~i),i&&e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i},D=function(e){F||(function(){var e,t,s,g,m,v=new Array(16);for(s=0,g=0;g<28;g++)for(c[g]=s,e=0;e<1<<i[g];e++)u[s++]=g;for(u[s-1]=g,m=0,g=0;g<16;g++)for(p[g]=m,e=0;e<1<<r[g];e++)l[m++]=g;for(m>>=7;g<30;g++)for(p[g]=m<<7,e=0;e<1<<r[g]-7;e++)l[256+m++]=g;for(t=0;t<=15;t++)v[t]=0;for(e=0;e<=143;)o[2*e+1]=8,e++,v[8]++;for(;e<=255;)o[2*e+1]=9,e++,v[9]++;for(;e<=279;)o[2*e+1]=7,e++,v[7]++;for(;e<=287;)o[2*e+1]=8,e++,v[8]++;for(x(o,287,v),e=0;e<30;e++)a[2*e+1]=5,a[2*e]=b(e,5);h=new f(o,i,257,286,15),A=new f(a,r,0,30,15),d=new f(new Array(0),n,0,19,7)}(),F=!0),e.l_desc=new g(e.dyn_ltree,h),e.d_desc=new g(e.dyn_dtree,A),e.bl_desc=new g(e.bl_tree,d),e.bi_buf=0,e.bi_valid=0,B(e)},R=I,O=function(e,t,i,r){var n,l,u=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),E(e,e.l_desc),E(e,e.d_desc),u=function(e){var t;for(S(e,e.dyn_ltree,e.l_desc.max_code),S(e,e.dyn_dtree,e.d_desc.max_code),E(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*s[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),n=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=n&&(n=l)):n=l=i+5,i+4<=n&&-1!==t?I(e,t,i,r):4===e.strategy||l===n?(_(e,2+(r?1:0),3),k(e,o,a)):(_(e,4+(r?1:0),3),function(e,t,i,r){var n;for(_(e,t-257,5),_(e,i-1,5),_(e,r-4,4),n=0;n<r;n++)_(e,e.bl_tree[2*s[n]+1],3);T(e,e.dyn_ltree,t-1),T(e,e.dyn_dtree,i-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),k(e,e.dyn_ltree,e.dyn_dtree)),B(e),r&&P(e)},L=function(e,t,i){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=i,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(u[i]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.sym_next===e.sym_end},j=function(e){_(e,2,3),y(e,256,o),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)},U=function(e,t,i,r){for(var n=65535&e,s=e>>>16&65535,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{s=s+(n=n+t[r++]|0)|0}while(--o);n%=65521,s%=65521}return n|s<<16},N=new Uint32Array(function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}()),V=function(e,t,i,r){var n=N,s=r+i;e^=-1;for(var o=r;o<s;o++)e=e>>>8^n[255&(e^t[o])];return-1^e},Q={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},H={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},G=D,z=R,W=O,K=L,X=j,q=H.Z_NO_FLUSH,Y=H.Z_PARTIAL_FLUSH,J=H.Z_FULL_FLUSH,Z=H.Z_FINISH,$=H.Z_BLOCK,ee=H.Z_OK,te=H.Z_STREAM_END,ie=H.Z_STREAM_ERROR,re=H.Z_DATA_ERROR,ne=H.Z_BUF_ERROR,se=H.Z_DEFAULT_COMPRESSION,oe=H.Z_FILTERED,ae=H.Z_HUFFMAN_ONLY,le=H.Z_RLE,ue=H.Z_FIXED,ce=H.Z_UNKNOWN,he=H.Z_DEFLATED,Ae=258,de=262,pe=42,fe=113,ge=666,me=function(e,t){return e.msg=Q[t],t},ve=function(e){return 2*e-(e>4?9:0)},_e=function(e){for(var t=e.length;--t>=0;)e[t]=0},ye=function(e){var t,i,r,n=e.w_size;r=t=e.hash_size;do{i=e.head[--r],e.head[r]=i>=n?i-n:0}while(--t);r=t=n;do{i=e.prev[--r],e.prev[r]=i>=n?i-n:0}while(--t)},be=function(e,t,i){return(t<<e.hash_shift^i)&e.hash_mask},we=function(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},xe=function(e,t){W(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,we(e.strm)},Be=function(e,t){e.pending_buf[e.pending++]=t},Pe=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ce=function(e,t,i,r){var n=e.avail_in;return n>r&&(n=r),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),i),1===e.state.wrap?e.adler=U(e.adler,t,n,i):2===e.state.wrap&&(e.adler=V(e.adler,t,n,i)),e.next_in+=n,e.total_in+=n,n)},Me=function(e,t){var i,r,n=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-de?e.strstart-(e.w_size-de):0,u=e.window,c=e.w_mask,h=e.prev,A=e.strstart+Ae,d=u[s+o-1],p=u[s+o];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(i=t)+o]===p&&u[i+o-1]===d&&u[i]===u[s]&&u[++i]===u[s+1]){s+=2,i++;do{}while(u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&s<A);if(r=Ae-(A-s),s=A-Ae,r>o){if(e.match_start=t,o=r,r>=a)break;d=u[s+o-1],p=u[s+o]}}}while((t=h[t&c])>l&&0!=--n);return o<=e.lookahead?o:e.lookahead},ke=function(e){var t,i,r,n=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-de)&&(e.window.set(e.window.subarray(n,n+n-i),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),ye(e),i+=n),0===e.strm.avail_in)break;if(t=Ce(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=be(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=be(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<de&&0!==e.strm.avail_in)},Ee=function(e,t){var i,r,n,s=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(i=65535,n=e.bi_valid+42>>3,e.strm.avail_out<n)break;if(n=e.strm.avail_out-n,i>(r=e.strstart-e.block_start)+e.strm.avail_in&&(i=r+e.strm.avail_in),i>n&&(i=n),i<s&&(0===i&&t!==Z||t===q||i!==r+e.strm.avail_in))break;o=t===Z&&i===r+e.strm.avail_in?1:0,z(e,0,0,o),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,we(e.strm),r&&(r>i&&(r=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,i-=r),i&&(Ce(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(0===o);return(a-=e.strm.avail_in)&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==q&&t!==Z&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(n=e.window_size-e.strstart,e.strm.avail_in>n&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,n+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),n>e.strm.avail_in&&(n=e.strm.avail_in),n&&(Ce(e.strm,e.window,e.strstart,n),e.strstart+=n,e.insert+=n>e.w_size-e.insert?e.w_size-e.insert:n),e.high_water<e.strstart&&(e.high_water=e.strstart),n=e.bi_valid+42>>3,s=(n=e.pending_buf_size-n>65535?65535:e.pending_buf_size-n)>e.w_size?e.w_size:n,((r=e.strstart-e.block_start)>=s||(r||t===Z)&&t!==q&&0===e.strm.avail_in&&r<=n)&&(i=r>n?n:r,o=t===Z&&0===e.strm.avail_in&&i===r?1:0,z(e,e.block_start,i,o),e.block_start+=i,we(e.strm)),o?3:1)},Se=function(e,t){for(var i,r;;){if(e.lookahead<de){if(ke(e),e.lookahead<de&&t===q)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-de&&(e.match_length=Me(e,i)),e.match_length>=3)if(r=K(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=be(e,e.ins_h,e.window[e.strstart+1]);else r=K(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(xe(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2},Te=function(e,t){for(var i,r,n;;){if(e.lookahead<de){if(ke(e),e.lookahead<de&&t===q)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-de&&(e.match_length=Me(e,i),e.match_length<=5&&(e.strategy===oe||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,r=K(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(xe(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=K(e,0,e.window[e.strstart-1]))&&xe(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=K(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2};function Fe(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}var Ie=[new Fe(0,0,0,0,Ee),new Fe(4,4,8,4,Se),new Fe(4,5,16,8,Se),new Fe(4,6,32,32,Se),new Fe(4,4,16,16,Te),new Fe(8,16,32,32,Te),new Fe(8,16,128,128,Te),new Fe(8,32,128,256,Te),new Fe(32,128,258,1024,Te),new Fe(32,258,258,4096,Te)];function De(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=he,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),_e(this.dyn_ltree),_e(this.dyn_dtree),_e(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),_e(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_e(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Re=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.status!==pe&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==fe&&t.status!==ge?1:0},Oe=function(e){if(Re(e))return me(e,ie);e.total_in=e.total_out=0,e.data_type=ce;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?pe:fe,e.adler=2===t.wrap?0:1,t.last_flush=-2,G(t),ee},Le=function(e){var t,i=Oe(e);return i===ee&&((t=e.state).window_size=2*t.w_size,_e(t.head),t.max_lazy_match=Ie[t.level].max_lazy,t.good_match=Ie[t.level].good_length,t.nice_match=Ie[t.level].nice_length,t.max_chain_length=Ie[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),i},je=function(e,t,i,r,n,s){if(!e)return ie;var o=1;if(t===se&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>9||i!==he||r<8||r>15||t<0||t>9||s<0||s>ue||8===r&&1!==o)return me(e,ie);8===r&&(r=9);var a=new De;return e.state=a,a.strm=e,a.status=pe,a.wrap=o,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=n+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<n+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=s,a.method=i,Le(e)},Ue=je,Ne=function(e,t){return Re(e)||2!==e.state.wrap?ie:(e.state.gzhead=t,ee)},Ve=function(e,t){if(Re(e)||t>$||t<0)return e?me(e,ie):ie;var i=e.state;if(!e.output||0!==e.avail_in&&!e.input||i.status===ge&&t!==Z)return me(e,0===e.avail_out?ne:ie);var r=i.last_flush;if(i.last_flush=t,0!==i.pending){if(we(e),0===e.avail_out)return i.last_flush=-1,ee}else if(0===e.avail_in&&ve(t)<=ve(r)&&t!==Z)return me(e,ne);if(i.status===ge&&0!==e.avail_in)return me(e,ne);if(i.status===pe&&0===i.wrap&&(i.status=fe),i.status===pe){var n=he+(i.w_bits-8<<4)<<8;if(n|=(i.strategy>=ae||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(n|=32),Pe(i,n+=31-n%31),0!==i.strstart&&(Pe(i,e.adler>>>16),Pe(i,65535&e.adler)),e.adler=1,i.status=fe,we(e),0!==i.pending)return i.last_flush=-1,ee}if(57===i.status)if(e.adler=0,Be(i,31),Be(i,139),Be(i,8),i.gzhead)Be(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Be(i,255&i.gzhead.time),Be(i,i.gzhead.time>>8&255),Be(i,i.gzhead.time>>16&255),Be(i,i.gzhead.time>>24&255),Be(i,9===i.level?2:i.strategy>=ae||i.level<2?4:0),Be(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(Be(i,255&i.gzhead.extra.length),Be(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=V(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69;else if(Be(i,0),Be(i,0),Be(i,0),Be(i,0),Be(i,0),Be(i,9===i.level?2:i.strategy>=ae||i.level<2?4:0),Be(i,3),i.status=fe,we(e),0!==i.pending)return i.last_flush=-1,ee;if(69===i.status){if(i.gzhead.extra){for(var s=i.pending,o=(65535&i.gzhead.extra.length)-i.gzindex;i.pending+o>i.pending_buf_size;){var a=i.pending_buf_size-i.pending;if(i.pending_buf.set(i.gzhead.extra.subarray(i.gzindex,i.gzindex+a),i.pending),i.pending=i.pending_buf_size,i.gzhead.hcrc&&i.pending>s&&(e.adler=V(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex+=a,we(e),0!==i.pending)return i.last_flush=-1,ee;s=0,o-=a}var l=new Uint8Array(i.gzhead.extra);i.pending_buf.set(l.subarray(i.gzindex,i.gzindex+o),i.pending),i.pending+=o,i.gzhead.hcrc&&i.pending>s&&(e.adler=V(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex=0}i.status=73}if(73===i.status){if(i.gzhead.name){var u,c=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>c&&(e.adler=V(e.adler,i.pending_buf,i.pending-c,c)),we(e),0!==i.pending)return i.last_flush=-1,ee;c=0}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,Be(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>c&&(e.adler=V(e.adler,i.pending_buf,i.pending-c,c)),i.gzindex=0}i.status=91}if(91===i.status){if(i.gzhead.comment){var h,A=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>A&&(e.adler=V(e.adler,i.pending_buf,i.pending-A,A)),we(e),0!==i.pending)return i.last_flush=-1,ee;A=0}h=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,Be(i,h)}while(0!==h);i.gzhead.hcrc&&i.pending>A&&(e.adler=V(e.adler,i.pending_buf,i.pending-A,A))}i.status=103}if(103===i.status){if(i.gzhead.hcrc){if(i.pending+2>i.pending_buf_size&&(we(e),0!==i.pending))return i.last_flush=-1,ee;Be(i,255&e.adler),Be(i,e.adler>>8&255),e.adler=0}if(i.status=fe,we(e),0!==i.pending)return i.last_flush=-1,ee}if(0!==e.avail_in||0!==i.lookahead||t!==q&&i.status!==ge){var d=0===i.level?Ee(i,t):i.strategy===ae?function(e,t){for(var i;;){if(0===e.lookahead&&(ke(e),0===e.lookahead)){if(t===q)return 1;break}if(e.match_length=0,i=K(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(xe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2}(i,t):i.strategy===le?function(e,t){for(var i,r,n,s,o=e.window;;){if(e.lookahead<=Ae){if(ke(e),e.lookahead<=Ae&&t===q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&((r=o[n=e.strstart-1])===o[++n]&&r===o[++n]&&r===o[++n])){s=e.strstart+Ae;do{}while(r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&n<s);e.match_length=Ae-(s-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=K(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=K(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(xe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2}(i,t):Ie[i.level].func(i,t);if(3!==d&&4!==d||(i.status=ge),1===d||3===d)return 0===e.avail_out&&(i.last_flush=-1),ee;if(2===d&&(t===Y?X(i):t!==$&&(z(i,0,0,!1),t===J&&(_e(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),we(e),0===e.avail_out))return i.last_flush=-1,ee}return t!==Z?ee:i.wrap<=0?te:(2===i.wrap?(Be(i,255&e.adler),Be(i,e.adler>>8&255),Be(i,e.adler>>16&255),Be(i,e.adler>>24&255),Be(i,255&e.total_in),Be(i,e.total_in>>8&255),Be(i,e.total_in>>16&255),Be(i,e.total_in>>24&255)):(Pe(i,e.adler>>>16),Pe(i,65535&e.adler)),we(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?ee:te)},Qe=function(e){if(Re(e))return ie;var t=e.state.status;return e.state=null,t===fe?me(e,re):ee},He=function(e,t){var i=t.length;if(Re(e))return ie;var r=e.state,n=r.wrap;if(2===n||1===n&&r.status!==pe||r.lookahead)return ie;if(1===n&&(e.adler=U(e.adler,t,i,0)),r.wrap=0,i>=r.w_size){0===n&&(_e(r.head),r.strstart=0,r.block_start=0,r.insert=0);var s=new Uint8Array(r.w_size);s.set(t.subarray(i-r.w_size,i),0),t=s,i=r.w_size}var o=e.avail_in,a=e.next_in,l=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,ke(r);r.lookahead>=3;){var u=r.strstart,c=r.lookahead-2;do{r.ins_h=be(r,r.ins_h,r.window[u+3-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++}while(--c);r.strstart=u,r.lookahead=2,ke(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=l,e.avail_in=o,r.wrap=n,ee},Ge=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ze=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=w(i))throw new TypeError(i+"must be non-object");for(var r in i)Ge(i,r)&&(e[r]=i[r])}}return e},We=function(e){for(var t=0,i=0,r=e.length;i<r;i++)t+=e[i].length;for(var n=new Uint8Array(t),s=0,o=0,a=e.length;s<a;s++){var l=e[s];n.set(l,o),o+=l.length}return n},Ke=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ke=!1}for(var Xe=new Uint8Array(256),qe=0;qe<256;qe++)Xe[qe]=qe>=252?6:qe>=248?5:qe>=240?4:qe>=224?3:qe>=192?2:1;Xe[254]=Xe[254]=1;var Ye=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,i,r,n,s,o=e.length,a=0;for(n=0;n<o;n++)55296==(64512&(i=e.charCodeAt(n)))&&n+1<o&&(56320==(64512&(r=e.charCodeAt(n+1)))&&(i=65536+(i-55296<<10)+(r-56320),n++)),a+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(a),s=0,n=0;s<a;n++)55296==(64512&(i=e.charCodeAt(n)))&&n+1<o&&(56320==(64512&(r=e.charCodeAt(n+1)))&&(i=65536+(i-55296<<10)+(r-56320),n++)),i<128?t[s++]=i:i<2048?(t[s++]=192|i>>>6,t[s++]=128|63&i):i<65536?(t[s++]=224|i>>>12,t[s++]=128|i>>>6&63,t[s++]=128|63&i):(t[s++]=240|i>>>18,t[s++]=128|i>>>12&63,t[s++]=128|i>>>6&63,t[s++]=128|63&i);return t},Je=function(e,t){var i,r,n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var s=new Array(2*n);for(r=0,i=0;i<n;){var o=e[i++];if(o<128)s[r++]=o;else{var a=Xe[o];if(a>4)s[r++]=65533,i+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&i<n;)o=o<<6|63&e[i++],a--;a>1?s[r++]=65533:o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|1023&o)}}}return function(e,t){if(t<65534&&e.subarray&&Ke)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var i="",r=0;r<t;r++)i+=String.fromCharCode(e[r]);return i}(s,r)},Ze=function(e,t){(t=t||e.length)>e.length&&(t=e.length);for(var i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+Xe[e[i]]>t?i:t},$e=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},et=Object.prototype.toString,tt=H.Z_NO_FLUSH,it=H.Z_SYNC_FLUSH,rt=H.Z_FULL_FLUSH,nt=H.Z_FINISH,st=H.Z_OK,ot=H.Z_STREAM_END,at=H.Z_DEFAULT_COMPRESSION,lt=H.Z_DEFAULT_STRATEGY,ut=H.Z_DEFLATED;function ct(e){this.options=ze({level:at,method:ut,chunkSize:16384,windowBits:15,memLevel:8,strategy:lt},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;var i=Ue(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==st)throw new Error(Q[i]);if(t.header&&Ne(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ye(t.dictionary):"[object ArrayBuffer]"===et.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(i=He(this.strm,r))!==st)throw new Error(Q[i]);this._dict_set=!0}}function ht(e,t){var i=new ct(t);if(i.push(e,!0),i.err)throw i.msg||Q[i.err];return i.result}ct.prototype.push=function(e,t){var i,r,n=this.strm,s=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?nt:tt,"string"==typeof e?n.input=Ye(e):"[object ArrayBuffer]"===et.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(s),n.next_out=0,n.avail_out=s),(r===it||r===rt)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if((i=Ve(n,r))===ot)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Qe(this.strm),this.onEnd(i),this.ended=!0,i===st;if(0!==n.avail_out){if(r>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},ct.prototype.onData=function(e){this.chunks.push(e)},ct.prototype.onEnd=function(e){e===st&&(this.result=We(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var At=ct,dt=ht,pt=function(e,t){return(t=t||{}).raw=!0,ht(e,t)},ft=function(e,t){return(t=t||{}).gzip=!0,ht(e,t)},gt=16209,mt=function(e,t){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C=e.state;i=e.next_in,B=e.input,r=i+(e.avail_in-5),n=e.next_out,P=e.output,s=n-(t-e.avail_out),o=n+(e.avail_out-257),a=C.dmax,l=C.wsize,u=C.whave,c=C.wnext,h=C.window,A=C.hold,d=C.bits,p=C.lencode,f=C.distcode,g=(1<<C.lenbits)-1,m=(1<<C.distbits)-1;e:do{d<15&&(A+=B[i++]<<d,d+=8,A+=B[i++]<<d,d+=8),v=p[A&g];t:for(;;){if(A>>>=_=v>>>24,d-=_,0===(_=v>>>16&255))P[n++]=65535&v;else{if(!(16&_)){if(!(64&_)){v=p[(65535&v)+(A&(1<<_)-1)];continue t}if(32&_){C.mode=16191;break e}e.msg="invalid literal/length code",C.mode=gt;break e}y=65535&v,(_&=15)&&(d<_&&(A+=B[i++]<<d,d+=8),y+=A&(1<<_)-1,A>>>=_,d-=_),d<15&&(A+=B[i++]<<d,d+=8,A+=B[i++]<<d,d+=8),v=f[A&m];i:for(;;){if(A>>>=_=v>>>24,d-=_,!(16&(_=v>>>16&255))){if(!(64&_)){v=f[(65535&v)+(A&(1<<_)-1)];continue i}e.msg="invalid distance code",C.mode=gt;break e}if(b=65535&v,d<(_&=15)&&(A+=B[i++]<<d,(d+=8)<_&&(A+=B[i++]<<d,d+=8)),(b+=A&(1<<_)-1)>a){e.msg="invalid distance too far back",C.mode=gt;break e}if(A>>>=_,d-=_,b>(_=n-s)){if((_=b-_)>u&&C.sane){e.msg="invalid distance too far back",C.mode=gt;break e}if(w=0,x=h,0===c){if(w+=l-_,_<y){y-=_;do{P[n++]=h[w++]}while(--_);w=n-b,x=P}}else if(c<_){if(w+=l+c-_,(_-=c)<y){y-=_;do{P[n++]=h[w++]}while(--_);if(w=0,c<y){y-=_=c;do{P[n++]=h[w++]}while(--_);w=n-b,x=P}}}else if(w+=c-_,_<y){y-=_;do{P[n++]=h[w++]}while(--_);w=n-b,x=P}for(;y>2;)P[n++]=x[w++],P[n++]=x[w++],P[n++]=x[w++],y-=3;y&&(P[n++]=x[w++],y>1&&(P[n++]=x[w++]))}else{w=n-b;do{P[n++]=P[w++],P[n++]=P[w++],P[n++]=P[w++],y-=3}while(y>2);y&&(P[n++]=P[w++],y>1&&(P[n++]=P[w++]))}break}}break}}while(i<r&&n<o);i-=y=d>>3,A&=(1<<(d-=y<<3))-1,e.next_in=i,e.next_out=n,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=n<o?o-n+257:257-(n-o),C.hold=A,C.bits=d},vt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),_t=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),yt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),bt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),wt=function(e,t,i,r,n,s,o,a){var l,u,c,h,A,d,p,f,g,m=a.bits,v=0,_=0,y=0,b=0,w=0,x=0,B=0,P=0,C=0,M=0,k=null,E=new Uint16Array(16),S=new Uint16Array(16),T=null;for(v=0;v<=15;v++)E[v]=0;for(_=0;_<r;_++)E[t[i+_]]++;for(w=m,b=15;b>=1&&0===E[b];b--);if(w>b&&(w=b),0===b)return n[s++]=20971520,n[s++]=20971520,a.bits=1,0;for(y=1;y<b&&0===E[y];y++);for(w<y&&(w=y),P=1,v=1;v<=15;v++)if(P<<=1,(P-=E[v])<0)return-1;if(P>0&&(0===e||1!==b))return-1;for(S[1]=0,v=1;v<15;v++)S[v+1]=S[v]+E[v];for(_=0;_<r;_++)0!==t[i+_]&&(o[S[t[i+_]]++]=_);if(0===e?(k=T=o,d=20):1===e?(k=vt,T=_t,d=257):(k=yt,T=bt,d=0),M=0,_=0,v=y,A=s,x=w,B=0,c=-1,h=(C=1<<w)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){p=v-B,o[_]+1<d?(f=0,g=o[_]):o[_]>=d?(f=T[o[_]-d],g=k[o[_]-d]):(f=96,g=0),l=1<<v-B,y=u=1<<x;do{n[A+(M>>B)+(u-=l)]=p<<24|f<<16|g}while(0!==u);for(l=1<<v-1;M&l;)l>>=1;if(0!==l?(M&=l-1,M+=l):M=0,_++,0==--E[v]){if(v===b)break;v=t[i+o[_]]}if(v>w&&(M&h)!==c){for(0===B&&(B=w),A+=y,P=1<<(x=v-B);x+B<b&&!((P-=E[x+B])<=0);)x++,P<<=1;if(C+=1<<x,1===e&&C>852||2===e&&C>592)return 1;n[c=M&h]=w<<24|x<<16|A-s}}return 0!==M&&(n[A+M]=v-B<<24|64<<16),a.bits=w,0},xt=H.Z_FINISH,Bt=H.Z_BLOCK,Pt=H.Z_TREES,Ct=H.Z_OK,Mt=H.Z_STREAM_END,kt=H.Z_NEED_DICT,Et=H.Z_STREAM_ERROR,St=H.Z_DATA_ERROR,Tt=H.Z_MEM_ERROR,Ft=H.Z_BUF_ERROR,It=H.Z_DEFLATED,Dt=16180,Rt=16190,Ot=16191,Lt=16192,jt=16194,Ut=16199,Nt=16200,Vt=16206,Qt=16209,Ht=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function Gt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var zt,Wt,Kt=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Dt||t.mode>16211?1:0},Xt=function(e){if(Kt(e))return Et;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Ct},qt=function(e){if(Kt(e))return Et;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Xt(e)},Yt=function(e,t){var i;if(Kt(e))return Et;var r=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Et:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,qt(e))},Jt=function(e,t){if(!e)return Et;var i=new Gt;e.state=i,i.strm=e,i.window=null,i.mode=Dt;var r=Yt(e,t);return r!==Ct&&(e.state=null),r},Zt=!0,$t=function(e){if(Zt){zt=new Int32Array(512),Wt=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(wt(1,e.lens,0,288,zt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;wt(2,e.lens,0,32,Wt,0,e.work,{bits:5}),Zt=!1}e.lencode=zt,e.lenbits=9,e.distcode=Wt,e.distbits=5},ei=function(e,t,i,r){var n,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(i-s.wsize,i),0),s.wnext=0,s.whave=s.wsize):((n=s.wsize-s.wnext)>r&&(n=r),s.window.set(t.subarray(i-r,i-r+n),s.wnext),(r-=n)?(s.window.set(t.subarray(i-r,i),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0},ti=qt,ii=Jt,ri=function(e,t){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C=0,M=new Uint8Array(4),k=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Kt(e)||!e.output||!e.input&&0!==e.avail_in)return Et;(i=e.state).mode===Ot&&(i.mode=Lt),o=e.next_out,n=e.output,l=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,u=i.hold,c=i.bits,h=a,A=l,x=Ct;e:for(;;)switch(i.mode){case Dt:if(0===i.wrap){i.mode=Lt;break}for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(2&i.wrap&&35615===u){0===i.wbits&&(i.wbits=15),i.check=0,M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0),u=0,c=0,i.mode=16181;break}if(i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",i.mode=Qt;break}if((15&u)!==It){e.msg="unknown compression method",i.mode=Qt;break}if(c-=4,w=8+(15&(u>>>=4)),0===i.wbits&&(i.wbits=w),w>15||w>i.wbits){e.msg="invalid window size",i.mode=Qt;break}i.dmax=1<<i.wbits,i.flags=0,e.adler=i.check=1,i.mode=512&u?16189:Ot,u=0,c=0;break;case 16181:for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(i.flags=u,(255&i.flags)!==It){e.msg="unknown compression method",i.mode=Qt;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Qt;break}i.head&&(i.head.text=u>>8&1),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0)),u=0,c=0,i.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.head&&(i.head.time=u),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,M[2]=u>>>16&255,M[3]=u>>>24&255,i.check=V(i.check,M,4,0)),u=0,c=0,i.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.head&&(i.head.xflags=255&u,i.head.os=u>>8),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0)),u=0,c=0,i.mode=16184;case 16184:if(1024&i.flags){for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.length=u,i.head&&(i.head.extra_len=u),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0)),u=0,c=0}else i.head&&(i.head.extra=null);i.mode=16185;case 16185:if(1024&i.flags&&((d=i.length)>a&&(d=a),d&&(i.head&&(w=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(r.subarray(s,s+d),w)),512&i.flags&&4&i.wrap&&(i.check=V(i.check,r,d,s)),a-=d,s+=d,i.length-=d),i.length))break e;i.length=0,i.mode=16186;case 16186:if(2048&i.flags){if(0===a)break e;d=0;do{w=r[s+d++],i.head&&w&&i.length<65536&&(i.head.name+=String.fromCharCode(w))}while(w&&d<a);if(512&i.flags&&4&i.wrap&&(i.check=V(i.check,r,d,s)),a-=d,s+=d,w)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=16187;case 16187:if(4096&i.flags){if(0===a)break e;d=0;do{w=r[s+d++],i.head&&w&&i.length<65536&&(i.head.comment+=String.fromCharCode(w))}while(w&&d<a);if(512&i.flags&&4&i.wrap&&(i.check=V(i.check,r,d,s)),a-=d,s+=d,w)break e}else i.head&&(i.head.comment=null);i.mode=16188;case 16188:if(512&i.flags){for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(4&i.wrap&&u!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Qt;break}u=0,c=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=Ot;break;case 16189:for(;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}e.adler=i.check=Ht(u),u=0,c=0,i.mode=Rt;case Rt:if(0===i.havedict)return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,i.hold=u,i.bits=c,kt;e.adler=i.check=1,i.mode=Ot;case Ot:if(t===Bt||t===Pt)break e;case Lt:if(i.last){u>>>=7&c,c-=7&c,i.mode=Vt;break}for(;c<3;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}switch(i.last=1&u,c-=1,3&(u>>>=1)){case 0:i.mode=16193;break;case 1:if($t(i),i.mode=Ut,t===Pt){u>>>=2,c-=2;break e}break;case 2:i.mode=16196;break;case 3:e.msg="invalid block type",i.mode=Qt}u>>>=2,c-=2;break;case 16193:for(u>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Qt;break}if(i.length=65535&u,u=0,c=0,i.mode=jt,t===Pt)break e;case jt:i.mode=16195;case 16195:if(d=i.length){if(d>a&&(d=a),d>l&&(d=l),0===d)break e;n.set(r.subarray(s,s+d),o),a-=d,s+=d,l-=d,o+=d,i.length-=d;break}i.mode=Ot;break;case 16196:for(;c<14;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(i.nlen=257+(31&u),u>>>=5,c-=5,i.ndist=1+(31&u),u>>>=5,c-=5,i.ncode=4+(15&u),u>>>=4,c-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Qt;break}i.have=0,i.mode=16197;case 16197:for(;i.have<i.ncode;){for(;c<3;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.lens[k[i.have++]]=7&u,u>>>=3,c-=3}for(;i.have<19;)i.lens[k[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,B={bits:i.lenbits},x=wt(0,i.lens,0,19,i.lencode,0,i.work,B),i.lenbits=B.bits,x){e.msg="invalid code lengths set",i.mode=Qt;break}i.have=0,i.mode=16198;case 16198:for(;i.have<i.nlen+i.ndist;){for(;m=(C=i.lencode[u&(1<<i.lenbits)-1])>>>16&255,v=65535&C,!((g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(v<16)u>>>=g,c-=g,i.lens[i.have++]=v;else{if(16===v){for(P=g+2;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(u>>>=g,c-=g,0===i.have){e.msg="invalid bit length repeat",i.mode=Qt;break}w=i.lens[i.have-1],d=3+(3&u),u>>>=2,c-=2}else if(17===v){for(P=g+3;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}c-=g,w=0,d=3+(7&(u>>>=g)),u>>>=3,c-=3}else{for(P=g+7;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}c-=g,w=0,d=11+(127&(u>>>=g)),u>>>=7,c-=7}if(i.have+d>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Qt;break}for(;d--;)i.lens[i.have++]=w}}if(i.mode===Qt)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Qt;break}if(i.lenbits=9,B={bits:i.lenbits},x=wt(1,i.lens,0,i.nlen,i.lencode,0,i.work,B),i.lenbits=B.bits,x){e.msg="invalid literal/lengths set",i.mode=Qt;break}if(i.distbits=6,i.distcode=i.distdyn,B={bits:i.distbits},x=wt(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,B),i.distbits=B.bits,x){e.msg="invalid distances set",i.mode=Qt;break}if(i.mode=Ut,t===Pt)break e;case Ut:i.mode=Nt;case Nt:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,i.hold=u,i.bits=c,mt(e,A),o=e.next_out,n=e.output,l=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,u=i.hold,c=i.bits,i.mode===Ot&&(i.back=-1);break}for(i.back=0;m=(C=i.lencode[u&(1<<i.lenbits)-1])>>>16&255,v=65535&C,!((g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(m&&!(240&m)){for(_=g,y=m,b=v;m=(C=i.lencode[b+((u&(1<<_+y)-1)>>_)])>>>16&255,v=65535&C,!(_+(g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}u>>>=_,c-=_,i.back+=_}if(u>>>=g,c-=g,i.back+=g,i.length=v,0===m){i.mode=16205;break}if(32&m){i.back=-1,i.mode=Ot;break}if(64&m){e.msg="invalid literal/length code",i.mode=Qt;break}i.extra=15&m,i.mode=16201;case 16201:if(i.extra){for(P=i.extra;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.length+=u&(1<<i.extra)-1,u>>>=i.extra,c-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=16202;case 16202:for(;m=(C=i.distcode[u&(1<<i.distbits)-1])>>>16&255,v=65535&C,!((g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(!(240&m)){for(_=g,y=m,b=v;m=(C=i.distcode[b+((u&(1<<_+y)-1)>>_)])>>>16&255,v=65535&C,!(_+(g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}u>>>=_,c-=_,i.back+=_}if(u>>>=g,c-=g,i.back+=g,64&m){e.msg="invalid distance code",i.mode=Qt;break}i.offset=v,i.extra=15&m,i.mode=16203;case 16203:if(i.extra){for(P=i.extra;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.offset+=u&(1<<i.extra)-1,u>>>=i.extra,c-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Qt;break}i.mode=16204;case 16204:if(0===l)break e;if(d=A-l,i.offset>d){if((d=i.offset-d)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Qt;break}d>i.wnext?(d-=i.wnext,p=i.wsize-d):p=i.wnext-d,d>i.length&&(d=i.length),f=i.window}else f=n,p=o-i.offset,d=i.length;d>l&&(d=l),l-=d,i.length-=d;do{n[o++]=f[p++]}while(--d);0===i.length&&(i.mode=Nt);break;case 16205:if(0===l)break e;n[o++]=i.length,l--,i.mode=Nt;break;case Vt:if(i.wrap){for(;c<32;){if(0===a)break e;a--,u|=r[s++]<<c,c+=8}if(A-=l,e.total_out+=A,i.total+=A,4&i.wrap&&A&&(e.adler=i.check=i.flags?V(i.check,n,A,o-A):U(i.check,n,A,o-A)),A=l,4&i.wrap&&(i.flags?u:Ht(u))!==i.check){e.msg="incorrect data check",i.mode=Qt;break}u=0,c=0}i.mode=16207;case 16207:if(i.wrap&&i.flags){for(;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(4&i.wrap&&u!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Qt;break}u=0,c=0}i.mode=16208;case 16208:x=Mt;break e;case Qt:x=St;break e;case 16210:return Tt;default:return Et}return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,i.hold=u,i.bits=c,(i.wsize||A!==e.avail_out&&i.mode<Qt&&(i.mode<Vt||t!==xt))&&ei(e,e.output,e.next_out,A-e.avail_out),h-=e.avail_in,A-=e.avail_out,e.total_in+=h,e.total_out+=A,i.total+=A,4&i.wrap&&A&&(e.adler=i.check=i.flags?V(i.check,n,A,e.next_out-A):U(i.check,n,A,e.next_out-A)),e.data_type=i.bits+(i.last?64:0)+(i.mode===Ot?128:0)+(i.mode===Ut||i.mode===jt?256:0),(0===h&&0===A||t===xt)&&x===Ct&&(x=Ft),x},ni=function(e){if(Kt(e))return Et;var t=e.state;return t.window&&(t.window=null),e.state=null,Ct},si=function(e,t){if(Kt(e))return Et;var i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,Ct):Et},oi=function(e,t){var i,r=t.length;return Kt(e)?Et:0!==(i=e.state).wrap&&i.mode!==Rt?Et:i.mode===Rt&&U(1,t,r,0)!==i.check?St:ei(e,t,r,r)?(i.mode=16210,Tt):(i.havedict=1,Ct)},ai=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},li=Object.prototype.toString,ui=H.Z_NO_FLUSH,ci=H.Z_FINISH,hi=H.Z_OK,Ai=H.Z_STREAM_END,di=H.Z_NEED_DICT,pi=H.Z_STREAM_ERROR,fi=H.Z_DATA_ERROR,gi=H.Z_MEM_ERROR;function mi(e){this.options=ze({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;var i=ii(this.strm,t.windowBits);if(i!==hi)throw new Error(Q[i]);if(this.header=new ai,si(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ye(t.dictionary):"[object ArrayBuffer]"===li.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=oi(this.strm,t.dictionary))!==hi))throw new Error(Q[i])}function vi(e,t){var i=new mi(t);if(i.push(e),i.err)throw i.msg||Q[i.err];return i.result}mi.prototype.push=function(e,t){var i,r,n,s=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?ci:ui,"[object ArrayBuffer]"===li.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(o),s.next_out=0,s.avail_out=o),(i=ri(s,r))===di&&a&&((i=oi(s,a))===hi?i=ri(s,r):i===fi&&(i=di));s.avail_in>0&&i===Ai&&s.state.wrap>0&&0!==e[s.next_in];)ti(s),i=ri(s,r);switch(i){case pi:case fi:case di:case gi:return this.onEnd(i),this.ended=!0,!1}if(n=s.avail_out,s.next_out&&(0===s.avail_out||i===Ai))if("string"===this.options.to){var l=Ze(s.output,s.next_out),u=s.next_out-l,c=Je(s.output,l);s.next_out=u,s.avail_out=o-u,u&&s.output.set(s.output.subarray(l,l+u),0),this.onData(c)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(i!==hi||0!==n){if(i===Ai)return i=ni(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},mi.prototype.onData=function(e){this.chunks.push(e)},mi.prototype.onEnd=function(e){e===hi&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=We(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _i=function(e,t){return(t=t||{}).raw=!0,vi(e,t)},yi=At,bi=dt,wi=pt,xi=ft,Bi=mi,Pi=vi,Ci=_i,Mi=vi,ki=H,Ei={Deflate:yi,deflate:bi,deflateRaw:wi,gzip:xi,Inflate:Bi,inflate:Pi,inflateRaw:Ci,ungzip:Mi,constants:ki};e.Deflate=yi,e.Inflate=Bi,e.constants=ki,e.default=Ei,e.deflate=bi,e.deflateRaw=wi,e.gzip=xi,e.inflate=Pi,e.inflateRaw=Ci,e.ungzip=Mi,Object.defineProperty(e,"__esModule",{value:!0})}));var Bk=Object.freeze({__proto__:null}),Pk=window.pako||Bk;Pk.inflate||(Pk=Pk.default);var Ck=Y.vec4(),Mk=Y.vec4();var kk,Ek=(kk=new Float32Array(3),function(e){return kk[0]=e[0]/255,kk[1]=e[1]/255,kk[2]=e[2]/255,kk});function Sk(e,t){var i=[];if(t.length>1)for(var r=0,n=t.length-1;r<n;r++)i.push(t[r]),i.push(t[r+1]);else if(e.length>1)for(var s=0,o=e.length/3-1;s<o;s++)i.push(s),i.push(s+1);return i}!function(){var e=document.createElement("canvas"),t=e.getContext("2d")}();var Tk={version:10,parse:function(e,t,i,r,n,s){var o=function(e){var t=0;return{metadata:e[t++],textureData:e[t++],eachTextureDataPortion:e[t++],eachTextureAttributes:e[t++],positions:e[t++],normals:e[t++],colors:e[t++],uvs:e[t++],indices:e[t++],edgeIndices:e[t++],eachTextureSetTextures:e[t++],matrices:e[t++],reusedGeometriesDecodeMatrix:e[t++],eachGeometryPrimitiveType:e[t++],eachGeometryPositionsPortion:e[t++],eachGeometryNormalsPortion:e[t++],eachGeometryColorsPortion:e[t++],eachGeometryUVsPortion:e[t++],eachGeometryIndicesPortion:e[t++],eachGeometryEdgeIndicesPortion:e[t++],eachMeshGeometriesPortion:e[t++],eachMeshMatricesPortion:e[t++],eachMeshTextureSet:e[t++],eachMeshMaterialAttributes:e[t++],eachEntityId:e[t++],eachEntityMeshesPortion:e[t++],eachTileAABB:e[t++],eachTileEntitiesPortion:e[t++]}}(i),a=function(e){function t(e,t){return 0===e.length?[]:Pk.inflate(e,t).buffer}return{metadata:JSON.parse(Pk.inflate(e.metadata,{to:"string"})),textureData:new Uint8Array(t(e.textureData)),eachTextureDataPortion:new Uint32Array(t(e.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(t(e.eachTextureAttributes)),positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),colors:new Uint8Array(t(e.colors)),uvs:new Float32Array(t(e.uvs)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),eachTextureSetTextures:new Int32Array(t(e.eachTextureSetTextures)),matrices:new Float32Array(t(e.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(t(e.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(t(e.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(t(e.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(t(e.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(t(e.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(t(e.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(t(e.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(t(e.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(t(e.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(t(e.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(t(e.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(t(e.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Pk.inflate(e.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(t(e.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(o);!function(e,t,i,r,n,s){var o=s.getNextId(),a=i.metadata,l=i.textureData,u=i.eachTextureDataPortion,c=i.eachTextureAttributes,h=i.positions,A=i.normals,d=i.colors,p=i.uvs,f=i.indices,g=i.edgeIndices,m=i.eachTextureSetTextures,v=i.matrices,_=i.reusedGeometriesDecodeMatrix,y=i.eachGeometryPrimitiveType,b=i.eachGeometryPositionsPortion,w=i.eachGeometryNormalsPortion,x=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,C=i.eachGeometryEdgeIndicesPortion,M=i.eachMeshGeometriesPortion,k=i.eachMeshMatricesPortion,E=i.eachMeshTextureSet,S=i.eachMeshMaterialAttributes,T=i.eachEntityId,F=i.eachEntityMeshesPortion,I=i.eachTileAABB,D=i.eachTileEntitiesPortion,R=u.length,O=m.length/5,L=b.length,j=M.length,U=F.length,N=D.length;n&&n.loadData(a,{includeTypes:t.includeTypes,excludeTypes:t.excludeTypes,globalizeObjectIds:t.globalizeObjectIds});for(var V=0;V<R;V++){var Q=V===R-1,H=u[V],G=Q?l.length:u[V+1],z=G-H>0,W=9*V,K=1===c[W+0];c[W+1],c[W+2],c[W+3];var X=c[W+4],q=c[W+5],J=c[W+6],Z=c[W+7],$=c[W+8];if(z){var ee=new Uint8Array(l.subarray(H,G)).buffer,te="".concat(o,"-texture-").concat(V);K?r.createTexture({id:te,buffers:[ee],minFilter:X,magFilter:q,wrapS:J,wrapT:Z,wrapR:$}):r.createTexture({id:te,imageBuffer:ee,minFilter:X,magFilter:q,wrapS:J,wrapT:Z,wrapR:$})}}for(var ie=0;ie<O;ie++){var re=5*ie,se="".concat(o,"-textureSet-").concat(ie),oe=m[re+0],ae=m[re+1],le=m[re+2],ue=m[re+3],ce=m[re+4];r.createTextureSet({id:se,colorTextureId:oe>=0?"".concat(o,"-texture-").concat(oe):null,normalsTextureId:le>=0?"".concat(o,"-texture-").concat(le):null,metallicRoughnessTextureId:ae>=0?"".concat(o,"-texture-").concat(ae):null,emissiveTextureId:ue>=0?"".concat(o,"-texture-").concat(ue):null,occlusionTextureId:ce>=0?"".concat(o,"-texture-").concat(ce):null})}for(var he=new Uint32Array(L),Ae=0;Ae<j;Ae++){var de=M[Ae];void 0!==he[de]?he[de]++:he[de]=1}for(var pe=Y.vec3(),fe=Y.AABB3(),ge={},me=0;me<N;me++){var ve=me===N-1,_e=D[me],ye=ve?U-1:D[me+1]-1,be=6*me,we=I.subarray(be,be+6);Y.getAABB3Center(we,pe),fe[0]=we[0]-pe[0],fe[1]=we[1]-pe[1],fe[2]=we[2]-pe[2],fe[3]=we[3]-pe[0],fe[4]=we[4]-pe[1],fe[5]=we[5]-pe[2];for(var xe=xi.createPositionsDecodeMatrix(fe),Be={},Pe=_e;Pe<=ye;Pe++){var Ce=T[Pe],Me=t.globalizeObjectIds?Y.globalizeObjectId(r.id,Ce):Ce,ke=Pe===U-1,Ee=F[Pe],Se=ke?M.length-1:F[Pe+1]-1,Te=[],Fe=e.metaScene.metaObjects[Me],Ie={},De={};if(Fe){if(t.excludeTypesMap&&Fe.type&&t.excludeTypesMap[Fe.type])continue;if(t.includeTypesMap&&Fe.type&&!t.includeTypesMap[Fe.type])continue;var Re=t.objectDefaults?t.objectDefaults[Fe.type]||t.objectDefaults.DEFAULT:null;Re&&(!1===Re.visible&&(Ie.visible=!1),!1===Re.pickable&&(Ie.pickable=!1),Re.colorize&&(De.color=Re.colorize),void 0!==Re.opacity&&null!==Re.opacity&&(De.opacity=Re.opacity),void 0!==Re.metallic&&null!==Re.metallic&&(De.metallic=Re.metallic),void 0!==Re.roughness&&null!==Re.roughness&&(De.roughness=Re.roughness))}else if(t.excludeUnclassifiedObjects)continue;for(var Oe=Ee;Oe<=Se;Oe++){var Le=M[Oe],je=he[Le]>1,Ue=Le===L-1,Ne=E[Oe],Ve=Ne>=0?"".concat(o,"-textureSet-").concat(Ne):null,Qe=Ek(S.subarray(6*Oe,6*Oe+3)),He=S[6*Oe+3]/255,Ge=S[6*Oe+4]/255,ze=S[6*Oe+5]/255,We=s.getNextId();if(je){var Ke=k[Oe],Xe=v.slice(Ke,Ke+16),qe="".concat(o,"-geometry.").concat(me,".").concat(Le),Ye=ge[qe];if(!Ye){Ye={batchThisMesh:!t.reuseGeometries};var Je=!1;switch(y[Le]){case 0:Ye.primitiveName="solid",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryNormals=A.subarray(w[Le],Ue?A.length:w[Le+1]),Ye.geometryUVs=p.subarray(B[Le],Ue?p.length:B[Le+1]),Ye.geometryIndices=f.subarray(P[Le],Ue?f.length:P[Le+1]),Ye.geometryEdgeIndices=g.subarray(C[Le],Ue?g.length:C[Le+1]),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;case 1:Ye.primitiveName="surface",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryNormals=A.subarray(w[Le],Ue?A.length:w[Le+1]),Ye.geometryUVs=p.subarray(B[Le],Ue?p.length:B[Le+1]),Ye.geometryIndices=f.subarray(P[Le],Ue?f.length:P[Le+1]),Ye.geometryEdgeIndices=g.subarray(C[Le],Ue?g.length:C[Le+1]),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;case 2:Ye.primitiveName="points",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryColors=d.subarray(x[Le],Ue?d.length:x[Le+1]),Je=Ye.geometryPositions.length>0;break;case 3:Ye.primitiveName="lines",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryIndices=f.subarray(P[Le],Ue?f.length:P[Le+1]),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;case 4:Ye.primitiveName="lines",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryIndices=Sk(Ye.geometryPositions,f.subarray(P[Le],Ue?f.length:P[Le+1])),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;default:continue}if(Je||(Ye=null),Ye&&(Ye.geometryPositions.length,Ye.batchThisMesh)){Ye.decompressedPositions=new Float32Array(Ye.geometryPositions.length),Ye.transformedAndRecompressedPositions=new Uint16Array(Ye.geometryPositions.length);for(var Ze=Ye.geometryPositions,$e=Ye.decompressedPositions,et=0,tt=Ze.length;et<tt;et+=3)$e[et+0]=Ze[et+0]*_[0]+_[12],$e[et+1]=Ze[et+1]*_[5]+_[13],$e[et+2]=Ze[et+2]*_[10]+_[14];Ye.geometryPositions=null,ge[qe]=Ye}}if(Ye)if(Ye.batchThisMesh){for(var it=Ye.decompressedPositions,rt=Ye.transformedAndRecompressedPositions,nt=0,st=it.length;nt<st;nt+=3)Ck[0]=it[nt+0],Ck[1]=it[nt+1],Ck[2]=it[nt+2],Ck[3]=1,Y.transformVec4(Xe,Ck,Mk),xi.compressPosition(Mk,fe,Ck),rt[nt+0]=Ck[0],rt[nt+1]=Ck[1],rt[nt+2]=Ck[2];r.createMesh(ne.apply(De,{id:We,textureSetId:Ve,origin:pe,primitive:Ye.primitiveName,positionsCompressed:rt,normalsCompressed:Ye.geometryNormals,uv:Ye.geometryUVs,colorsCompressed:Ye.geometryColors,indices:Ye.geometryIndices,edgeIndices:Ye.geometryEdgeIndices,positionsDecodeMatrix:xe,color:Qe,metallic:Ge,roughness:ze,opacity:He})),Te.push(We)}else Be[qe]||(r.createGeometry({id:qe,primitive:Ye.primitiveName,positionsCompressed:Ye.geometryPositions,normalsCompressed:Ye.geometryNormals,uv:Ye.geometryUVs,colorsCompressed:Ye.geometryColors,indices:Ye.geometryIndices,edgeIndices:Ye.geometryEdgeIndices,positionsDecodeMatrix:_}),Be[qe]=!0),r.createMesh(ne.apply(De,{id:We,geometryId:qe,textureSetId:Ve,matrix:Xe,color:Qe,metallic:Ge,roughness:ze,opacity:He,origin:pe})),Te.push(We)}else{var ot=void 0,at=void 0,lt=void 0,ut=void 0,ct=void 0,ht=void 0,At=void 0,dt=!1;switch(y[Le]){case 0:ot="solid",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),lt=A.subarray(w[Le],Ue?A.length:w[Le+1]),ut=p.subarray(B[Le],Ue?p.length:B[Le+1]),ht=f.subarray(P[Le],Ue?f.length:P[Le+1]),At=g.subarray(C[Le],Ue?g.length:C[Le+1]),dt=at.length>0&&ht.length>0;break;case 1:ot="surface",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),lt=A.subarray(w[Le],Ue?A.length:w[Le+1]),ut=p.subarray(B[Le],Ue?p.length:B[Le+1]),ht=f.subarray(P[Le],Ue?f.length:P[Le+1]),At=g.subarray(C[Le],Ue?g.length:C[Le+1]),dt=at.length>0&&ht.length>0;break;case 2:ot="points",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),ct=d.subarray(x[Le],Ue?d.length:x[Le+1]),dt=at.length>0;break;case 3:ot="lines",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),ht=f.subarray(P[Le],Ue?f.length:P[Le+1]),dt=at.length>0&&ht.length>0;break;case 4:ot="lines",ht=Sk(at=h.subarray(b[Le],Ue?h.length:b[Le+1]),f.subarray(P[Le],Ue?f.length:P[Le+1])),dt=at.length>0&&ht.length>0;break;default:continue}dt&&(r.createMesh(ne.apply(De,{id:We,textureSetId:Ve,origin:pe,primitive:ot,positionsCompressed:at,normalsCompressed:lt,uv:ut&&ut.length>0?ut:null,colorsCompressed:ct,indices:ht&&ht.length>0?ht:null,edgeIndices:At,positionsDecodeMatrix:xe,color:Qe,metallic:Ge,roughness:ze,opacity:He})),Te.push(We))}}Te.length>0&&r.createEntity(ne.apply(Ie,{id:Me,isObject:!0,meshIds:Te}))}}}(e,t,a,r,n,s)},inflateMetadata:function(e){return JSON.parse(Pk.inflate(e,{to:"string"}))}},Fk={};Fk[Tk.version]=Tk;var Ik=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x(this,e),(i=d(this,e,["XTCLoader",t,r]))._maxGeometryBatchSize=r.maxGeometryBatchSize,i.textureTranscoder=r.textureTranscoder,i.dataSource=r.dataSource,i.objectDefaults=r.objectDefaults,i.includeTypes=r.includeTypes,i.excludeTypes=r.excludeTypes,i.excludeUnclassifiedObjects=r.excludeUnclassifiedObjects,i.reuseGeometries=r.reuseGeometries,i}return _(e,ge),P(e,[{key:"supportedVersions",get:function(){return Object.keys(Fk)}},{key:"textureTranscoder",get:function(){return this._textureTranscoder},set:function(e){this._textureTranscoder=e}},{key:"dataSource",get:function(){return this._dataSource},set:function(e){this._dataSource=e||new xk}},{key:"objectDefaults",get:function(){return this._objectDefaults},set:function(e){this._objectDefaults=e||qM}},{key:"includeTypes",get:function(){return this._includeTypes},set:function(e){this._includeTypes=e}},{key:"excludeTypes",get:function(){return this._excludeTypes},set:function(e){this._excludeTypes=e}},{key:"excludeUnclassifiedObjects",get:function(){return this._excludeUnclassifiedObjects},set:function(e){this._excludeUnclassifiedObjects=!!e}},{key:"globalizeObjectIds",get:function(){return this._globalizeObjectIds},set:function(e){this._globalizeObjectIds=!!e}},{key:"reuseGeometries",get:function(){return this._reuseGeometries},set:function(e){this._reuseGeometries=!1!==e}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.id&&this.viewer.scene.components[t.id]&&(this.error("Component with this ID already exists in viewer: "+t.id+" - will autogenerate this ID"),delete t.id),!(t.src||t.xtc||t.manifestSrc||t.manifest))return this.error("load() param expected: src, xtc, manifestSrc or manifestData"),c;var i={},r=t.includeTypes||this._includeTypes,n=t.excludeTypes||this._excludeTypes,s=t.objectDefaults||this._objectDefaults;if(i.reuseGeometries=null!==t.reuseGeometries&&void 0!==t.reuseGeometries?t.reuseGeometries:!1!==this._reuseGeometries,r){i.includeTypesMap={};for(var o=0,a=r.length;o<a;o++)i.includeTypesMap[r[o]]=!0}if(n){i.excludeTypesMap={};for(var l=0,u=n.length;l<u;l++)i.excludeTypesMap[n[l]]=!0}s&&(i.objectDefaults=s),i.excludeUnclassifiedObjects=void 0!==t.excludeUnclassifiedObjects?!!t.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=void 0!==t.globalizeObjectIds&&null!==t.globalizeObjectIds?!!t.globalizeObjectIds:this._globalizeObjectIds;var c=new $c(this.viewer.scene,ne.apply(t,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:t.origin,disableVertexWelding:t.disableVertexWelding||!1,disableIndexRebucketing:t.disableIndexRebucketing||!1,dtxEnabled:t.dtxEnabled})),h=c.id,A=new vA({metaScene:this.viewer.metaScene,id:h});this.viewer.scene.canvas.spinner.processes++;var d,p,f=function(){c.destroyed||(c.finalize(),A.finalize(),e.viewer.scene.canvas.spinner.processes--,c.once("destroyed",(function(){e.viewer.metaScene.destroyMetaModel(A.id)})),e.scheduleTask((function(){c.destroyed||(c.scene.fire("modelLoaded",c.id),c.fire("loaded",!0,!1))})))},g=function(t){e.viewer.scene.canvas.spinner.processes--,e.error(t),c.fire("error",t)},m=0,v={getNextId:function(){return"".concat(h,".").concat(m++)}};if(t.metaModelSrc||t.metaModelData)if(t.metaModelSrc){var _=t.metaModelSrc;this._dataSource.getMetaModel(_,(function(s){c.destroyed||(A.loadData(s,{includeTypes:r,excludeTypes:n,globalizeObjectIds:i.globalizeObjectIds}),t.src?e._loadModel(t.src,t,i,c,null,v,f,g):(e._parseModel(t.xtc,t,i,c,null,v),f()))}),(function(e){g("load(): Failed to load model metadata for model '".concat(h," from '").concat(_,"' - ").concat(e))}))}else t.metaModelData&&(A.loadData(t.metaModelData,{includeTypes:r,excludeTypes:n,globalizeObjectIds:i.globalizeObjectIds}),t.src?this._loadModel(t.src,t,i,c,null,v,f,g):(this._parseModel(t.xtc,t,i,c,null,v),f()));else if(t.src)this._loadModel(t.src,t,i,c,A,v,f,g);else if(t.xtc)this._parseModel(t.xtc,t,i,c,A,v),f();else if(t.manifestSrc||t.manifest){var y=t.manifestSrc?(d=t.manifestSrc,(p=d.split("/")).pop(),p.join("/")+"/"):"",b=function(t,s,o){var a=0,l=function(){c.destroyed||a>=t.length?s():e._dataSource.getMetaModel("".concat(y).concat(t[a]),(function(t){A.loadData(t,{includeTypes:r,excludeTypes:n,globalizeObjectIds:i.globalizeObjectIds}),a++,e.scheduleTask(l,200)}),o)};l()},w=function(r,n,s){var o=0,a=function(){c.destroyed||o>=r.length?n():e._dataSource.getXTC("".concat(y).concat(r[o]),(function(r){e._parseModel(r,t,i,c,null,v),c.preFinalize(),o++,e.scheduleTask(a,200)}),s)};a()},x=function(r,n,s){var o=0,a=function(){c.destroyed||o>=r.length?n():e._dataSource.getXTC("".concat(y).concat(r[o]),(function(r){e._parseModel(r,t,i,c,A,v),c.preFinalize(),o++,e.scheduleTask(a,100)}),s)};a()};if(t.manifest){var B=t.manifest,P=B.xtcFiles;if(!P||0===P.length)return void g("load(): Failed to load model manifest - manifest not valid");var C=B.metaModelFiles;C?b(C,(function(){w(P,f,g)}),g):x(P,f,g)}else this._dataSource.getManifest(t.manifestSrc,(function(e){if(!c.destroyed){var t=e.xtcFiles;if(t&&0!==t.length){var i=e.metaModelFiles;i?b(i,(function(){w(t,f,g)}),g):x(t,f,g)}else g("load(): Failed to load model manifest - manifest not valid")}}),g)}return c}},{key:"_loadModel",value:function(e,t,i,r,n,s,o,a){var l=this;this._dataSource.getXTC(t.src,(function(e){l._parseModel(e,t,i,r,n,s),r.preFinalize(),o()}),a)}},{key:"_parseModel",value:(t=a(s().mark((function e(t,i,r,n,o,a){var l,u,c,h,A,d,p,f,g;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.destroyed){e.next=2;break}return e.abrupt("return");case 2:if(l=new DataView(t),u=new Uint8Array(t),c=l.getUint32(0,!0),h=Fk[c]){e.next=9;break}return this.error("Unsupported .XTC file version: "+c+" - this XTCLoaderPlugin supports versions "+Object.keys(Fk)),e.abrupt("return");case 9:for(this.log("Loading .xtc V"+c),A=l.getUint32(4,!0),d=[],p=4*(A+2),f=0;f<A;f++)g=l.getUint32(4*(f+2),!0),d.push(u.subarray(p,p+g)),p+=g;h.parse(this.viewer,r,d,n,o,a);case 15:case"end":return e.stop()}}),e,this)}))),function(e,i,r,n,s,o){return t.apply(this,arguments)})},{key:"loadMetadata",value:function(e,t,i,r){var n=this;e._finalized=!1;try{this._workerInflate(e,t,i,(function(t){t.terminate(),n.fire("metaLoaded",{result:"success",metaModel:e}),"function"==typeof r&&r()}),(function(t,i){t.terminate(),n.fire("metaLoaded",{result:"failed",message:i,metaModel:e})}))}catch(t){this.fire("metaloaded",{result:t,metaModel:e})}}},{key:"_workerInflate",value:function(e,t,i,r,n){var s,o,a=this,l=(s=new Blob(['\n self.importScripts(\'https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.11/pako.min.js\');\n \n function inflateMetadata(deflatedData) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(self.pako.inflate(deflatedData, { to: "string" }));\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error("Error inflating metadata:", error);\n\t\t\t\tthrow error;\n\t\t\t} \n\t\t}\n \n self.onmessage = function (e) {\n console.log("start worker:");\n const metaJson = inflateMetadata(e.data.buffer);\n\n self.postMessage({\n metaJson,\n time: new Date().getTime()\n });\n };\n '],{type:"application/javascript"}),o=URL.createObjectURL(s),new Worker(o));l.postMessage({buffer:t}),l.onmessage=function(t){i?e.loadData(t.data.metaJson,(function(){e.finalize(),"function"==typeof r?r(l):l.terminate()}),(function(e){"function"==typeof n&&n(l,e)})):a.fire("metaLoading",(function(){e.loadData(t.data.metaJson,(function(){e.finalize(),"function"==typeof r?r(l):l.terminate()}),(function(e){"function"==typeof n&&n(l,e)}))}))},l.onerror=function(e){"function"==typeof n&&n(l,e.message),l.terminate()}}}]);var t}();var Dk=function(){return P((function e(){x(this,e)}),[{key:"getIFC",value:function(e,t,i){var r=function(){};t=t||r,i=i||r;var n=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(n){var s=!!n[2],o=n[3];o=window.decodeURIComponent(o),s&&(o=window.atob(o));try{for(var a=new ArrayBuffer(o.length),l=new Uint8Array(a),u=0;u<o.length;u++)l[u]=o.charCodeAt(u);t(a)}catch(e){i(e)}}else{var c=new XMLHttpRequest;c.open("GET",e,!0),c.responseType="arraybuffer",c.onreadystatechange=function(){4===c.readyState&&(200===c.status?t(c.response):i("getXTC error : "+c.response))},c.send(null)}}}])}(),Rk=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x(this,e),(i=d(this,e,["ifcLoader",t,r])).dataSource=r.dataSource,i.objectDefaults=r.objectDefaults,i.includeTypes=r.includeTypes,i.excludeTypes=r.excludeTypes,i.excludeUnclassifiedObjects=r.excludeUnclassifiedObjects,r.WebIFC&&(i._webIFC=r.WebIFC,i._ifcAPI=r.IfcAPI,i.webIfcFroMOutside=!0),i}return _(e,ge),P(e,[{key:"supportedVersions",get:function(){return["2x3","4"]}},{key:"dataSource",get:function(){return this._dataSource},set:function(e){this._dataSource=e||new Dk}},{key:"objectDefaults",get:function(){return this._objectDefaults},set:function(e){this._objectDefaults=e||qM}},{key:"includeTypes",get:function(){return this._includeTypes},set:function(e){this._includeTypes=e}},{key:"excludeTypes",get:function(){return this._excludeTypes},set:function(e){this._excludeTypes=e}},{key:"excludeUnclassifiedObjects",get:function(){return this._excludeUnclassifiedObjects},set:function(e){this._excludeUnclassifiedObjects=!!e}},{key:"globalizeObjectIds",get:function(){return this._globalizeObjectIds},set:function(e){this._globalizeObjectIds=!!e}},{key:"load",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);var t=new $c(this.viewer.scene,ne.apply(e,{isModel:!0}));if(!e.src&&!e.ifc)return this.error("load() param expected: src or IFC"),t;var i={autoNormals:!0};if(!1!==e.loadMetadata){var r=e.includeTypes||this._includeTypes,n=e.excludeTypes||this._excludeTypes,s=e.objectDefaults||this._objectDefaults;if(r){i.includeTypesMap={};for(var o=0,a=r.length;o<a;o++)i.includeTypesMap[r[o]]=!0}if(n){i.excludeTypesMap={};for(var l=0,u=n.length;l<u;l++)i.excludeTypesMap[n[l]]=!0}s&&(i.objectDefaults=s),i.excludeUnclassifiedObjects=void 0!==e.excludeUnclassifiedObjects?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=void 0!==e.globalizeObjectIds?!!e.globalizeObjectIds:this._globalizeObjectIds}if(this.webIfcFroMOutside)try{e.src?this._loadModel(e.src,e,i,t):this._parseModel(e.ifc,e,i,t)}catch(e){this.error(e),t.fire("error",e)}return t}},{key:"_loadModel",value:function(e,t,i,r){var n=this,s=this.viewer.scene.canvas.spinner;s.processes++,this._dataSource.getIFC(t.src,(function(e){n._parseModel(e,t,i,r),s.processes--}),(function(e){s.processes--,n.error(e),r.fire("error",e)}))}},{key:"_parseModel",value:function(e,t,i,r){if(!r.destroyed){var n=t.stats||{};if(n.sourceFormat="IFC",n.schemaVersion="",n.title="",n.author="",n.created="",n.numMetaObjects=0,n.numPropertySets=0,n.numObjects=0,n.numGeometries=0,n.numTriangles=0,n.numVertices=0,this.webIfcFroMOutside){if(!this._ifcAPI)throw"WebIFCLoaderPlugin has no WebIFC instance configured - please inject via WebIFCLoaderPlugin constructor"}else i.wasmPath&&this._ifcAPI.SetWasmPath(i.wasmPath);var s,o=new Uint8Array(e),a=this._ifcAPI.OpenModel(o),l=this._ifcAPI.GetModelSchema(a),u=this._ifcAPI.GetLineIDsWithType(a,this._webIFC.IFCPROJECT).get(0),c=!1!==t.loadMetadata,h=void 0!==t.metadata&&null!==t.metadata;s=h?t.metadata:null;var A={ifcProjectId:u,modelID:a,modelSchema:l,sceneModel:r,loadMetadata:c,metadata:c?{id:"",projectId:""+u,author:"",createdAt:"",schema:"",creatingApplication:"",metaObjects:[],propertySets:[]}:s,metaObjects:h?r.metaObjects:{},options:i,nextId:0,stats:n};if(c){if(i.includeTypes){A.includeTypes={};for(var d=0,p=i.includeTypes.length;d<p;d++)A.includeTypes[i.includeTypes[d]]=!0}if(i.excludeTypes){A.excludeTypes={};for(var f=0,g=i.excludeTypes.length;f<g;f++)A.excludeTypes[i.excludeTypes[f]]=!0}this._parseMetaObjects(A),this._parsePropertySets(A)}if(this._parseGeometry(A),r.finalize(),c||h){var m=r.id;this.viewer.metaScene.createMetaModel(m,A.metadata,i)}r.scene.once("tick",(function(){r.destroyed||(r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1))}))}}},{key:"_parseMetaObjects",value:function(e){var t=this._ifcAPI.GetLine(e.modelID,e.ifcProjectId);this._parseSpatialChildren(e,t)}},{key:"_parseSpatialChildren",value:function(e,t,i){var r=this._ifcAPI.GetNameFromTypeCode(t.type);if((!e.includeTypes||e.includeTypes[r])&&(!e.excludeTypes||!e.excludeTypes[r])){this._createMetaObject(e,t,i);var n=t.GlobalId.value;this._parseRelatedItemsOfType(e,t.expressID,"RelatingObject","RelatedObjects",this._webIFC.IFCRELAGGREGATES,n),this._parseRelatedItemsOfType(e,t.expressID,"RelatingStructure","RelatedElements",this._webIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE,n)}}},{key:"_createMetaObject",value:function(e,t,i){var r,n=t.GlobalId.value;r=this.webIfcFroMOutside?this._ifcAPI.GetNameFromTypeCode(t.type):t.__proto__.constructor.name;var s={id:n,name:t.Name&&""!==t.Name.value?t.Name.value:r,type:r,parent:i};e.metadata.metaObjects.push(s),e.metaObjects[n]=s,e.stats.numMetaObjects++}},{key:"_parseRelatedItemsOfType",value:function(e,t,i,r,n,s){for(var o=this,a=this._ifcAPI.GetLineIDsWithType(e.modelID,n),l=0;l<a.size();l++){var u=a.get(l),c=this._ifcAPI.GetLine(e.modelID,u);if(null==c)return;var h=c[i],A=!1;if(Array.isArray(h))A=h.map((function(e){return e.value})).includes(t);else A=h.value===t;if(A){var d=c[r];if(Array.isArray(d))d.forEach((function(t){var i=o._ifcAPI.GetLine(e.modelID,t.value);null!=i&&o._parseSpatialChildren(e,i,s)}));else{var p=this._ifcAPI.GetLine(e.modelID,d.value);if(null==p)return;this._parseSpatialChildren(e,p,s)}}}}},{key:"_parsePropertySets",value:function(e){this.log("start parse property...");for(var t=this._ifcAPI.GetLineIDsWithType(e.modelID,this._webIFC.IFCRELDEFINESBYPROPERTIES),i=0;i<t.size();i++){var r=t.get(i),n=this._ifcAPI.GetLine(e.modelID,r,!0);if(n){var s=n.RelatingPropertyDefinition;if(!s)continue;var o=s.GlobalId.value,a=s.HasProperties;if(a&&a.length>0){for(var l=s.Name.value,u=[],c=0,h=a.length;c<h;c++){var A=a[c],d=A.Name,p=A.NominalValue;if(d&&p){var f={name:d.value,type:p.type,value:p.value,valueType:p.valueType};A.Description?f.description=A.Description.value:p.description&&(f.description=p.description),u.push(f)}}var g={id:o,type:"Default",name:l,properties:u};e.metadata.propertySets.push(g),e.stats.numPropertySets++;var m=n.RelatedObjects;if(!m||0===m.length)return;for(var v=0,_=m.length;v<_;v++){var y=m[v].GlobalId.value,b=e.metaObjects[y];b&&(b.propertySetIds||(b.propertySetIds=[]),b.propertySetIds.push(o))}}}}}},{key:"_parseGeometry",value:function(e){var t=this;this.log("start parse geometry"),this._ifcAPI.StreamAllMeshes(e.modelID,(function(i){var r=i.expressID,n=i.geometries,s=[],o=t._ifcAPI.GetLine(e.modelID,r);if(null!=o){var a=o.GlobalId.value;if(e.loadMetadata){var l=a,u=e.metaObjects[l];if(e.includeTypes&&(!u||!e.includeTypes[u.type]))return;if(e.excludeTypes&&(!u||e.excludeTypes[u.type]))return}for(var c=Y.mat4(),h=Y.vec3(),A=0,d=n.size();A<d;A++){for(var p=n.get(A),f=t._ifcAPI.GetGeometry(e.modelID,p.geometryExpressID),g=t._ifcAPI.GetVertexArray(f.GetVertexData(),f.GetVertexDataSize()),m=t._ifcAPI.GetIndexArray(f.GetIndexData(),f.GetIndexDataSize()),v=new Float64Array(g.length/2),_=new Float32Array(g.length/2),y=0,b=0,w=g.length/6;y<w;y++,b+=3)v[b+0]=g[6*y+0],v[b+1]=g[6*y+1],v[b+2]=g[6*y+2];c.set(p.flatTransformation),Y.transformPositions3(c,v);var x=we(v,v,h);if(!e.options.autoNormals)for(var B=0,P=0,C=g.length/6;B<C;B++,P+=3)_[P+0]=g[6*B+3],_[P+1]=g[6*B+4],_[P+2]=g[6*B+5];e.stats.numGeometries++,e.stats.numVertices+=v.length/3,e.stats.numTriangles+=m.length/3;var M="mesh"+e.nextId++;e.sceneModel.createMesh({id:M,primitive:"triangles",origin:x?h:null,positions:v,normals:e.options.autoNormals?null:_,indices:m,color:[p.color.x,p.color.y,p.color.z],opacity:p.color.w}),s.push(M)}var k=e.options.globalizeObjectIds?Y.globalizeObjectId(e.sceneModel.id,a):a;e.sceneModel.createEntity({id:k,meshIds:s,isObject:!0}),e.stats.numObjects++}})),this._ifcAPI.StreamAllMeshesWithTypes(e.modelID,[3856911033],(function(i,r,n){var s=i.expressID,o=t._ifcAPI.GetLine(e.modelID,s);if(null!=o){for(var a=o.GlobalId.value,l=i.geometries,u=[],c=Y.mat4(),h=Y.vec3(),A=0,d=l.size();A<d;A++){for(var p=l.get(A),f=t._ifcAPI.GetGeometry(e.modelID,p.geometryExpressID),g=t._ifcAPI.GetVertexArray(f.GetVertexData(),f.GetVertexDataSize()),m=t._ifcAPI.GetIndexArray(f.GetIndexData(),f.GetIndexDataSize()),v=new Float64Array(g.length/2),_=new Float32Array(g.length/2),y=0,b=0,w=g.length/6;y<w;y++,b+=3)v[b+0]=g[6*y+0],v[b+1]=g[6*y+1],v[b+2]=g[6*y+2];c.set(p.flatTransformation),Y.transformPositions3(c,v);var x=we(v,v,h);if(!e.options.autoNormals)for(var B=0,P=0,C=g.length/6;B<C;B++,P+=3)_[P+0]=g[6*B+3],_[P+1]=g[6*B+4],_[P+2]=g[6*B+5];e.stats.numGeometries++,e.stats.numVertices+=v.length/3,e.stats.numTriangles+=m.length/3;var M="mesh"+e.nextId++;e.sceneModel.createMesh({id:M,primitive:"triangles",origin:x?h:null,positions:v,normals:e.options.autoNormals?null:_,indices:m,color:[p.color.x,p.color.y,p.color.z],opacity:p.color.w<1?p.color.w:.1}),u.push(M)}var k=e.options.globalizeObjectIds?Y.globalizeObjectId(e.sceneModel.id,a):a;e.sceneModel.createEntity({id:k,meshIds:u,isObject:!0}),e.stats.numObjects++}}))}}])}();const Ok={ch:{NavCube:{front:"前",back:"后",top:"上",bottom:"下",left:"左",right:"右"},modelsExplorer:{title:"模型",loadAll:"加载全部",loadAllTip:"加载项目中的所有模型",unloadAll:"卸载全部",unloadAllTip:"卸载所有模型",add:"添加",addTip:"添加模型"},objectsExplorer:{title:"对象",showAll:"显示全部",showAllTip:"显示所有对象",hideAll:"隐藏全部",hideAllTip:"隐藏所有对象"},classesExplorer:{title:"类别",showAll:"显示全部",showAllTip:"显示所有类别",hideAll:"隐藏全部",hideAllTip:"隐藏所有类别"},storeysExplorer:{title:"楼层",showAll:"显示全部",showAllTip:"显示所有楼层",hideAll:"隐藏全部",hideAllTip:"隐藏所有楼层"},propertiesInspector:{title:"属性",noObjectSelectedWarning:"未选中任何对象。右键单击或长按对象,并选择“检查属性”以在此查看其属性。",noPropSetWarning:"未找到此对象的属性集。"},toolbar:{toggleExplorer:"结构树",toggleProperties:"属性",resetViewTip:"重置视图",toggle2d3dTip:"2D/3D",togglePerspectiveTip:"透视/正交",viewFitTip:"适合视图",firstPersonTip:"第一人称",hideObjectsTip:"隐藏对象",annotationObjectsTip:"标注对象",selectObjectsTip:"选择对象",queryObjectsTip:"查询对象",sliceObjectsTip:"切片对象",slicesMenuTip:"切片菜单",showSpacesTip:"显示空间",numSlicesTip:"现有切片数"}},en:{NavCube:{front:"Front",back:"Back",top:"Top",bottom:"Bottom",left:"Left",right:"Right"},modelsExplorer:{title:"Models",loadAll:"Load all",loadAllTip:"Load all models in this project",unloadAll:"Unload all",unloadAllTip:"Unload all models",add:"Add",addTip:"Add a Model"},objectsExplorer:{title:"Objects",showAll:"Show all",showAllTip:"Show all objects",hideAll:"Hide all",hideAllTip:"Hide all objects"},classesExplorer:{title:"Classes",showAll:"Show all",showAllTip:"Show all classes",hideAll:"Hide all",hideAllTip:"Hide all classes"},storeysExplorer:{title:"Storeys",showAll:"Show all",showAllTip:"Show all storeys",hideAll:"Hide all",hideAllTip:"Hide all storeys"},propertiesInspector:{title:"Properties",noObjectSelectedWarning:"No object inspected. Right-click or long-tab an object and select 'Inspect Properties' to view its properties here.",noPropSetWarning:"No property sets found for this object."},toolbar:{toggleExplorer:"Toggle explorer",toggleProperties:"Toggle properties",resetViewTip:"Reset view",toggle2d3dTip:"Toggle 2D/3D",togglePerspectiveTip:"Toggle Perspective/Ortho",viewFitTip:"View fit",firstPersonTip:"Toggle first person navigation mode",hideObjectsTip:"Hide objects",selectObjectsTip:"Select objects",queryObjectsTip:"Query objects",sliceObjectsTip:"Slice objects",slicesMenuTip:"Slices menu",showSpacesTip:"Show IFCSpaces",numSlicesTip:"Number of existing slices"}},de:{NavCube:{front:"Vorne",back:"Hinten",top:"Oben",bottom:"Unten",left:"Links",right:"Rechts"},modelsExplorer:{title:"Modelle",loadAll:"Alle laden",loadAllTip:"Alle Modelle in diesem Projekt laden",unloadAll:"Alle abwählen",unloadAllTip:"Alle Modelle abwählen",add:"Hinzufügen",addTip:"Modell hinzufügen"},objectsExplorer:{title:"Objekte",showAll:"Alle anzeigen",showAllTip:"Alle Objekte anzeigen",hideAll:"Alle ausblenden",hideAllTip:"Alle Objekte ausblenden"},classesExplorer:{title:"Typen",showAll:"Alle anzeigen",showAllTip:"Alle Typen anzeigen",hideAll:"Alle ausblenden",hideAllTip:"Alle Typen ausblenden"},storeysExplorer:{title:"Stockwerke",showAll:"Alle anzeigen",showAllTip:"Alle Stockwerke anzeigen",hideAll:"Alle ausblenden",hideAllTip:"Alle Stockwerke ausblenden"},propertiesInspector:{title:"Eigenschaften",noObjectSelectedWarning:"Kein Objekt inspiziert. Klicken Sie mit der rechten Maustaste auf ein Objekt oder führen Sie einen langen Tabulator aus und wählen Sie 'Eigenschaften prüfen', um die Eigenschaften des Objekts anzuzeigen.",noPropSetWarning:"Keine Eigenschaftssätze für dieses Objekt gefunden."},toolbar:{toggleExplorer:"Explorer ein- und ausblenden",toggleProperties:"Eigenschaften ein- und ausblenden",resetViewTip:"Ansicht zurücksetzen",toggle2d3dTip:"2D/3D umschalten",togglePerspectiveTip:"Orthogonale/Perspektivische Ansicht umschalten",viewFitTip:"In Ansicht einpassen",firstPersonTip:"Ich-Perspektive umschalten",hideObjectsTip:"Objekte ausblenden",selectObjectsTip:"Objekte auswählen",queryObjectsTip:"Abfrageobjekte",sliceObjectsTip:"Objekte schneiden",slicesMenuTip:"Menü Schnittebenen",showSpacesTip:"IFC-Räume anzeigen",numSlicesTip:"Anzahl der Schnittebenen"}},fr:{NavCube:{front:"Face",back:"Arrière",top:"Dessus",bottom:"Dessous",left:"Droite",right:"Gauche"},modelsExplorer:{title:"Modèles",loadAll:"Afficher tout",loadAllTip:"Afficher tous les modèles du projet",unloadAll:"Masquer tout",unloadAllTip:"Masquer tous les modèles",add:"Ajouter",addTip:"Ajouter un modèle"},objectsExplorer:{title:"Conteneurs",showAll:"Afficher tout",showAllTip:"Afficher tous les objets",hideAll:"Masquer tout",hideAllTip:"Masquer tous les objets"},classesExplorer:{title:"Classes IFC",showAll:"Afficher tout",showAllTip:"Affiche toutes les classes",hideAll:"Masquer tout",hideAllTip:"Masquer toutes les classes"},storeysExplorer:{title:"Étages",showAll:"Afficher tout",showAllTip:"Afficher tous les étages",hideAll:"Masquer tout",hideAllTip:"Masquer tous les étages"},propertiesInspector:{title:"Propriétés",noObjectSelectedWarning:"Aucun objet n'a été inspecté. Cliquez avec le bouton droit ou le bouton long sur un objet et sélectionnez 'Inspecter les propriétés' pour afficher ses propriétés ici.",noPropSetWarning:"Aucun ensemble de propriétés n'a été trouvé pour cet objet."},toolbar:{toggleExplorer:"Afficher la structure",toggleProperties:"Afficher les propriétés",resetViewTip:"Réinitialiser la vue",toggle2d3dTip:"Activer 2D/3D",togglePerspectiveTip:"Activer Perspective/Ortho",viewFitTip:"Recadrer la vue",firstPersonTip:"Mode 1ere personne",hideObjectsTip:"Masquer objets",selectObjectsTip:"Sélectionner",queryObjectsTip:"Informations objets",sliceObjectsTip:"Coupes",slicesMenuTip:"Outils de coupe",showSpacesTip:"Afficher les espaces IFC",numSlicesTip:"Nombre de coupes"}},pl:{NavCube:{front:"Przód",back:"Tył",top:"Góra",bottom:"Dół",left:"Lewy",right:"Prawy"},modelsExplorer:{title:"Model",loadAll:"Załaduj",loadAllTip:"Załaduj wszystkie modele",unloadAll:"Zamknij",unloadAllTip:"Zamnij wszystkie modele",add:"Dodaj",addTip:"Dodaj modele"},objectsExplorer:{title:"Obiekty",showAll:"Pokaż",showAllTip:"Pokaż wszystkie obiekty",hideAll:"Ukryj",hideAllTip:"Ukryj wszystkie obiekty"},classesExplorer:{title:"Typy",showAll:"Pokaż",showAllTip:"Pokaż wszystkie typy",hideAll:"Ukryj",hideAllTip:"Ukryj wszystkie typy"},storeysExplorer:{title:"Piętra",showAll:"Pokaż",showAllTip:"Pokaż wszystkie piętra",hideAll:"Ukryj",hideAllTip:"Ukryj wszystkie piętra"},propertiesInspector:{title:"Właściwości",noObjectSelectedWarning:"Nie sprawdzono żadnego obiektu. Kliknij prawym przyciskiem myszy lub kliknij długo na obiekcie i wybierz opcję 'Sprawdź właściwości', aby wyświetlić jego właściwości.",noPropSetWarning:"Nie znaleziono żadnych zestawów właściwości dla tego obiektu."},toolbar:{toggleExplorer:"Przełączanie eksploratora",toggleProperties:"Przełączanie właściwości",resetViewTip:"Resetuj widok",toggle2d3dTip:"Widok 2D/3D",togglePerspectiveTip:"Widok Ortograficzny/Perspektywiczny",viewFitTip:"Dopasowanie do widoku",firstPersonTip:"Widok perspektywy pierwszoosobowej",hideObjectsTip:"Ukryj obiekt",selectObjectsTip:"Zaznacz obiekt",queryObjectsTip:"Wywołaj obiekt",sliceObjectsTip:"Przekroje obiektów",slicesMenuTip:"Menu przekroi",showSpacesTip:"Pokaż przestrzenie IFC",numSlicesTip:"Liczba przekroi"}},ru:{NavCube:{front:"Фронт",back:"Тыл",top:"Верх",bottom:"Низ",left:"Лево",right:"Право"},modelsExplorer:{title:"Модели",loadAll:"Загрузить все",loadAllTip:"Загрузить все модели в этом проекте",unloadAll:"Выгрузить все",unloadAllTip:"Выгрузить все модели",add:"Добавить",addTip:"Добавить модель"},objectsExplorer:{title:"Объекты",showAll:"Показать все",showAllTip:"Показать все объекты",hideAll:"Скрыть все",hideAllTip:"Скрыть все объекты"},classesExplorer:{title:"Классы",showAll:"Показать все",showAllTip:"Показать все классы",hideAll:"Скрыть все",hideAllTip:"Скрыть все классы"},storeysExplorer:{title:"Этажи",showAll:"Показать все",showAllTip:"Показать все этажи",hideAll:"Скрыть все",hideAllTip:"Скрыть все этажи"},propertiesInspector:{title:"Свойства",noObjectSelectedWarning:"Ни один объект не осмотрен. Щелкните правой кнопкой мыши или длинной меткой на объекте и выберите 'Осмотреть свойства', чтобы просмотреть его свойства здесь.",noPropSetWarning:"Для этого объекта не найдено ни одного набора свойств."},toolbar:{toggleExplorer:"Переключить навигатор",toggleProperties:"Переключить Свойства",resetViewTip:"Сбросить вид",toggle2d3dTip:"Переключить 2D/3D",togglePerspectiveTip:"Переключить проекцию перспектива/орто",viewFitTip:"Показать всю модель",firstPersonTip:"Переключить режим навигации от первого лица",hideObjectsTip:"Скрыть объекты",selectObjectsTip:"Выбрать объекты",queryObjectsTip:"Выбрать объекты",sliceObjectsTip:"Рассечь объекты",slicesMenuTip:"Меню сечений",showSpacesTip:"Показать места IFC",numSlicesTip:"Количество существующих сечений"}}};class Lk{constructor(){this.events={}}on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter((e=>e!==t)))}emit(e,...t){this.events[e]&&this.events[e].forEach((e=>{e(...t)}))}destroy(){this.events={}}}class jk{constructor(e=[],t=0){this.items=[],this._lastUniqueId=0,this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(...e){let t;if(2===e.length){const i=e[0];if(t=e[1],this.items[i])throw new Error(`ID clash: '${i}'`);return this.items[i]=t,i}for(t=e[0]||{};;){this._lastUniqueId+=1;const e=this._lastUniqueId;if(!this.items[e])return this.items[e]=t,e}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}class Uk{constructor(e,t={},i=null,r=null){this._children=[],this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._enabled=null,this._active=null,this.destroyed=!1,this.bimViewer=e?e.bimViewer||e:this,this.server=e?e.server:i,this.viewer=e?e.viewer:r,e&&e._children.push(this)}fire(e,t,i=!1){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==i&&(this._events[e]=t||!0);const r=this._eventSubs[e];let n;r&&Object.keys(r).forEach((i=>{Object.prototype.hasOwnProperty.call(r,i)&&(n=r[i],this._eventCallDepth+=1,this._eventCallDepth<300?n.callback.call(n.scope,t):this.error(`fire: potential stack overflow from recursive event ${e} - dropping this event`),this._eventCallDepth-=1)}))}on(e,t,i=this){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new jk),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={});let r=this._eventSubs[e];r||(r={},this._eventSubs[e]=r);const n=this._subIdMap.addItem();r[n]={callback:t,scope:i||this},this._subIdEvents[n]=e;const s=this._events[e];return void 0!==s&&t.call(i||this,s),n}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const i=this._eventSubs[t];i&&delete i[e],this._subIdMap.removeItem(e)}}once(e,t,i=this){const r=this,n=this.on(e,(e=>{r.off(n),t.call(i||this,e)}),i)}log(e){e=`[LOG] ${e}`,console.log(e)}warn(e){e=`[LOG] ${e}`,window.console.warn(e)}error(e){e=`[LOG] ${e}`,window.console.error(e)}_mutexActivation(e){e.forEach(((t,i)=>{t.on("active",(t=>{t&&e.forEach(((e,t)=>{t!==i&&e.setActive(!1)}))}))}))}setEnabled(e){this._enabled!==e&&(this._enabled=e,this.fire("enabled",this._enabled))}getEnabled(){return this._enabled}setActive(e){this._active!==e&&(this._active=e,this.fire("active",this._active))}getActive(){return this._active}destroy(){this.destroyed||(this.fire("destroyed",this.destroyed=!0),this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._children.forEach((e=>{e.destroy()})),this._children=[])}}const Nk=Y.vec3();class Vk extends Uk{constructor(e,t={}){super(e,t),this._modelMementos={},this.bimViewer.modelsExplorer.on("modelLoaded",(e=>{this.reset()}))}reset(e){this._resetCamera(e)}_resetCamera(e){const{viewer:t}=this,{scene:i}=t;let r;r=this.bimViewer.multiModel?i.getAABB(i.visibleObjectIds):i.aabb;const n=Y.getAABB3Diag(r),s=Y.getAABB3Center(r,Nk),{camera:o}=i;o.perspective.fov;const a=Math.abs(n/Math.tan(45*Y.DEGTORAD)),l=Y.normalizeVec3(o.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),u=Y.normalizeVec3(o.yUp?[-.5,.7071,-.5]:[-1,1,1]);t.cameraControl.pivotPos=s,t.cameraControl.planView&&(t.cameraControl.planView=!1),t.cameraFlight.flyTo({look:s,eye:[s[0]-a*l[0],s[1]-a*l[1],s[2]-a*l[2]],up:u,orthoScale:1.3*n,projection:"perspective",duration:1},e)}}Y.vec3();class Qk extends Uk{constructor(e,t={}){super(e,t)}fit(e){const{viewer:t}=this,{scene:i}=t,{center:r}=i;let n;n=this.bimViewer.multiModel?i.getAABB(i.visibleObjectIds):i.aabb;const s=Y.getAABB3Diag(n);t.cameraControl.pivotPos=r,t.cameraControl.planView&&(t.cameraControl.planView=!1),t.cameraFlight.flyTo({aabb:n,orthoScale:1.3*s,duration:1},e)}set fov(e){this.viewer.scene.cameraFlight.fitFOV=e}get fov(){return this.viewer.scene.cameraFlight.fitFOV}set duration(e){this.viewer.scene.cameraFlight.duration=e}get duration(){return this.viewer.scene.cameraFlight.duration}}class Hk extends Uk{constructor(e,t){super(e,t);const{cameraControl:i}=this.viewer,{cameraControlNavModeMediator:r}=t;i.navMode="orbit",i.followPointer=!0,this.cameraControl=i,i.on("personModeSpeedUp",(t=>{e.eventTrigger.emit("personModeSpeedUp",t)})),i.on("personModeSpeedDown",(t=>{e.eventTrigger.emit("personModeSpeedDown",t)})),this.on("active",(e=>{r.setFirstPersonModeActive(e),e&&(i.followPointer=!0)})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)}))}setdirectionChangeCancel(){this.goLeft=!1,this.goRight=!1,this.goUp=!1,this.goDown=!1,this.goForward=!1,this.goBackward=!1}speedUp(){this.cameraControl.speedUp()}speedDown(){this.cameraControl.speedDown()}set moveRate(e){this.cameraControl.moveRate=e}get moveRate(){return this.cameraControl.moveRate}set goRight(e){this.cameraControl.goRight=e}set goLeft(e){this.cameraControl.goLeft=e}set goUp(e){this.cameraControl.goUp=e}set goDown(e){this.cameraControl.goDown=e}set goForward(e){this.cameraControl.goForward=e}set goBackward(e){this.cameraControl.goBackward=e}smallCanvas(){const e=new W_({spinnerElementId:"manyou_spinner",canvasId:"canvas_manyou",transparent:!0,resolutionScale:window.devicePixelRatio});e.camera.eye=[-3.933,2.855,27.018],e.camera.look=[4.4,3.724,8.899],e.camera.up=[-.018,.999,.039]}}class Gk extends Uk{constructor(e,t){super(e,t),this.on("active",(e=>{e?(this.viewer.cameraControl.doublePickFlyTo=!1,this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.visible=!1)}))):(this.viewer.cameraControl.doublePickFlyTo=!1,void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)}))}}class zk extends Uk{constructor(e,t){super(e,t),this._active=!0,e.eventTrigger.on("metaLoaded",(t=>{const i=this.spaceObjects;if(0==i.length)return;this.viewer.scene.setObjectsCulled(i,!0),this.setIFCSpaceOpacity(),this.viewer.scene.setObjectsHighlighted(i,!0);const r=this.viewer.scene.models[t.metaModel.id],n=r.exceptionIds.concat(i);r.exceptionIds=n,e.resetView()}))}setActive(e,t){this._active!==e&&(this._active=e,e?(this._enterShowSpacesMode(),this.fire("active",this._active)):(this._exitShowSpacesMode(),this.fire("active",this._active)),t&&t())}setIFCSpaceOpacity(){0!=this.spaceObjects.length&&this.viewer.scene.withObjects(this.spaceObjects,(e=>{-1!=e.origin_opacity&&(e.opacity=e.opacity<.5?e.opacity:.1)}))}_enterShowSpacesMode(){const{viewer:e}=this,{scene:t}=e,{metaScene:i}=e,r=i.getObjectIDsByType("IfcSpace");t.setObjectsCulled(r,!1)}_exitShowSpacesMode(){const{viewer:e}=this,{scene:t}=e,{metaScene:i}=e,r=i.getObjectIDsByType("IfcSpace");t.setObjectsCulled(r,!0)}get spaceObjects(){return this.viewer.metaScene.getObjectIDsByType("IfcSpace")}}class Wk extends Uk{constructor(e,t){super(e,t),this.eventTrigger=e.eventTrigger,this._sectionPlanesPlugin=new _k(this.viewer,{}),this._sectionPlanesPlugin.sectionConfigs={planeSize:1.4,controlSize:.2,planeOpacity:.2,controlFillColor:[.1,.4,.99]},this._sectionPlanesPlugin.setOverviewVisible(!1),this._sectionPlanesPlugin.on("touchPlaneStart",(()=>{this.eventTrigger.emit("touchPlaneStart")})),this._sectionPlanesPlugin.on("touchPlaneEnd",(()=>{this.eventTrigger.emit("touchPlaneEnd")})),this._sectionPlanesPlugin.on("clickPlaneStart",(()=>{this.eventTrigger.emit("clickPlaneStart")})),this._sectionPlanesPlugin.on("clickPlaneEnd",(()=>{this.eventTrigger.emit("clickPlaneEnd")})),this._isTouch=!1,this.on("active",(e=>{e?this.showControl():this.hideControl()})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this._initSectionMode()}_initSectionMode(){this.viewer.scene.input.on("mouseclicked",(e=>{if(!this.getActive())return;const t=this.viewer.scene.pick({canvasPos:e,pickSurface:!0});if(t){const e=this._sectionPlanesPlugin.createSectionPlane({pos:t.worldPos,dir:Y.mulVec3Scalar(t.worldNormal,-1)});this._sectionPlanesPlugin.showControl(e.id),this.eventTrigger.emit("createSection",{position:t.worldPos,direction:Y.mulVec3Scalar(t.worldNormal,-1),id:e.id})}}))}set isTouch(e){this._sectionPlanesPlugin.isTouch=e,this._isTouch=e}set sectionWay(e){this._sectionPlanesPlugin.sectionWay=e}set sectionDirection(e){this._sectionPlanesPlugin.sectionDirection=e}setControlPos(e){this._sectionPlanesPlugin.setControlPos(e)}getControlPos(){return this._sectionPlanesPlugin.getControlPos()}set sectionConfigs(e){this._sectionPlanesPlugin.sectionConfigs=e}creatSection(e,t){const i=this._sectionPlanesPlugin.createSectionPlane({pos:e,dir:t});this._sectionPlanesPlugin.showControl(i.id)}getSectionPlanes(){return this._sectionPlanesPlugin.sectionPlanes}getSectionPlane(e){return this.getSectionPlanes()[e]}setSectionEnable(e){this.getSectionPlane(e).active=!0}setSectionDisable(e){this.getSectionPlane(e).active=!1}setSectionPos(e,t){this.getSectionPlane(e).pos=t}flipSection(e){this.getSectionPlane(e).flipDir()}getNumSections(){return Object.keys(this.viewer.scene.sectionPlanes).length}clear(){this._sectionPlanesPlugin.clear()}flipSections(){this._sectionPlanesPlugin.flipSectionPlanes()}getShownControl(){this._sectionPlanesPlugin.getShownControl()}enableSections(){const{sectionPlanes:e}=this.viewer.scene;for(const t in e){e[t].active=!0}}disableSections(){const{sectionPlanes:e}=this.viewer.scene;for(const t in e){e[t].active=!1,this.hideControl()}}hideControl(){this._sectionPlanesPlugin.hideControl()}showControl(){const e=this.getSectionPlanes();for(const t in e)e[t].control.setVisible(!0)}showSectionPlane(e){this._sectionPlanesPlugin.showControl(e)}destroy(){this._sectionPlanesPlugin.destroy(),super.destroy()}destroySectionPlane(e){this._sectionPlanesPlugin.destroySectionPlane(e)}}class Kk extends Uk{constructor(e,t){if(super(e,t),!t.navCubeCanvasElement)throw new Error("Missing config: NavCubeMode navCubeCanvasElement");const{navCubeCanvasElement:i}=t,{viewerElement:r}=t;this._navCubeCanvasElement=i,this._navCubeCanvasElement.oncontextmenu=e=>{e.preventDefault()},this._navCube=new ek(this.viewer,{canvasElement:i,viewerElement:r,fitVisible:!1,color:"#CFCFCF",shadowVisible:!1}),this._navCube.setVisible(this._active),this._visible=!0,this.on("active",(e=>{this._navCube.setVisible(e)}))}set visible(e){this._visible=e,this._navCubeCanvasElement.style.visibility=e?"visible":"hidden"}get visible(){return this._visible}get fitVisible(){return this._navCube.getFitVisible()}set fitVisible(e){this._navCube.setFitVisible(e)}flyByClick(e){this._navCube.flyByClick(e)}destroy(){this._navCube.destroy(),super.destroy()}}let Xk;class qk{constructor(e,t){this._projectId="",this._modelId="",this._server=e,Xk=t.tempVec3a}setProjectId(e){this._projectId=e}setModelId(e){this._modelId=e}getManifest(e,t,i){this._server.getSplitModelManifest(this._projectId,this._modelId,e,t,i)}getMetaModel(e,t,i){this._server.getSplitModelMetadata(this._projectId,this._modelId,e,t,i)}getXTC(e,t,i){this._server.getSplitModelGeometry(this._projectId,this._modelId,e,t,i)}}class Yk extends Uk{constructor(e,t){super(e,t),this._modelFromOutSide=t.modelFromOutSide,this._projectId=t.projectId,this._modelType=t.modelType,this._modelSrc=t.modelSrc,this._eventTrigger=e.eventTrigger,this._dataSource=new qk(this.server,{tempVec3a:t.tempVec3a}),this._modelConfig=t.modelConfig,this._modelsInfo={},this._numModels=0,this._numModelsLoaded=0}getModelIds(){return Object.keys(this._modelsInfo)}getModelInfo(e){return this._modelsInfo[e]}loadModel(e,t,i=()=>{},r=()=>{},n){if(this._modelType=n.modelType,"ifc"==this._modelType){const i=void 0!==n.IfcAPI&&null!==n.IfcAPI,r=void 0!==n.WebIFC&&null!==n.WebIFC;i&&r&&this.log("载入外部传入webifc..."),this._ifcLoader=new Rk(this.viewer,i&&r?{WebIFC:n.WebIFC,IfcAPI:n.IfcAPI}:{}),this._modelsInfo[e]={id:e,ifc:t,metaBuffer:null,edges:!0,loadMetadata:!1,saoEnabled:!0,pbrEnabled:!0,dtxEnabled:!0}}else"xtc"==this._modelType?(this._xtcLoader=new Ik(this.viewer,{dataSource:this._dataSource}),this._xtcLoader.on("metaLoaded",(e=>{this._eventTrigger.emit("metaLoaded",e)})),this._xtcLoader.on("metaLoading",(e=>{this._eventTrigger.emit("metaLoading",e)})),this._modelsInfo[e]={id:e,xtc:t,metaBuffer:null,edges:!0,loadMetadata:!1,saoEnabled:!0,pbrEnabled:!0,dtxEnabled:!0}):"glb"==this._modelType&&(this._glbLoader=new YM(this.viewer),this._modelsInfo[e]={id:e,gltf:t,metaBuffer:null,edges:!0,loadMetadata:!1,saoEnabled:!0,pbrEnabled:!0,dtxEnabled:!0});this._loadGeometry(e,i,r)}unloadModel(e){const t=this.viewer.scene.models[e];t?(t.destroy(),this.fire("modelUnloaded",e)):this.error("Model not loaded: "+e)}loadMetadata(e,t,i,r){this._xtcLoader&&(this._modelsInfo[e]&&(this._modelsInfo[e].metaBuffer=t),this._xtcLoader.loadMetadata(this.viewer.metaScene.metaModels[e],t,i,r))}_loadGeometry(e,t,i){const r=this._modelsInfo[e],n=()=>{this._jumpToInitialCamera(),this.fire("modelLoaded",e),t&&t()},s=e=>{this.error(e),i&&i(e)};if("ifc"==this._modelType&&this._ifcLoader)if(this._modelFromOutSide){this.log("正在载入ifc模型...");const e=this._ifcLoader.load(r);e.on("loaded",n),e.on("error",s)}else{this.log("正在载入引擎从本地获取的ifc模型...");const t=this._ifcLoader.load({id:e,src:this._modelSrc,edges:r.edges,loadMetadata:!1,pbrEnabled:r.pbrEnabled,dtxEnabled:r.dtxEnabled});t.on("loaded",n),t.on("error",s)}else if("xtc"===this._modelType&&this._xtcLoader){if(this._modelFromOutSide){this.log("正在载入xtc模型...");const e=this._xtcLoader.load(r);e.on("loaded",n),e.on("error",s)}}else if("glb"===this._modelType&&this._glbLoader&&this._modelFromOutSide){this.log("正在载入glb模型...");const e=this._glbLoader.load(r);e.on("loaded",n),e.on("error",s)}}_jumpToInitialCamera(){const{viewer:e}=this,{scene:t}=e,i=t.getAABB(t.visibleObjectIds),r=Y.getAABB3Diag(i),n=Y.getAABB3Center(i,Xk),{camera:s}=t,o=Math.abs(r/Math.tan(45*Y.DEGTORAD)),a=Y.normalizeVec3(s.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),l=Y.normalizeVec3(s.yUp?[-.5,.7071,-.5]:[-1,1,1]);e.cameraControl.pivotPos=n,e.cameraControl.planView&&(e.cameraControl.planView=!1),e.cameraFlight.jumpTo({look:n,eye:[n[0]-o*a[0],n[1]-o*a[1],n[2]-o*a[2]],up:l,orthoScale:1.1*r})}destroy(){super.destroy(),this._xtcLoader&&this._xtcLoader.destroy(),this._ifcLoader&&this._ifcLoader.destroy(),this._glbLoader&&this._glbLoader.destroy()}}class Jk extends Uk{constructor(e,t={}){super(e);const{modelType:i}=t;this.eventTrigger=e.eventTrigger,this._treeView=new wk(this.viewer,{hierarchy:"containment",autoAddModels:!1,pruneEmptyNodes:!0,autoExpandDepth:1}),this._treeView.on("rootNodes_Created",(e=>{this._rootNode=e,this.eventTrigger.emit("object_rootNodes",e)})),this._treeView.on("nodeNodes_Created",(e=>{this._nodeList=e,this.eventTrigger.emit("object_nodeNodes",e)})),this._treeView.on("objectNodes_Created",(e=>{this._objectList=e,this.eventTrigger.emit("object_objectNodes",e)})),this._treeView.on("checkBoxChanged",(e=>{this.eventTrigger.emit("object_checkBoxChanged",e)})),"ifc"===i?this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._treeView.addModel(e,{rootName:e})})):this._onMetaDataLoaded=this.eventTrigger.on("metaLoaded",(e=>{"success"===e.result&&(this._treeView.addModel(e.metaModel.id,{rootName:e.metaModel.id}),this.eventTrigger.emit("treeReady"))})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)}))}get rootNode(){return this._rootNode}get nodesList(){return this._nodeList}get objectList(){return this._objectList}get treeView(){return this._treeView}getNodeIdByObjectId(e){if(null==this._objectList[e])return null;this._objectList[e].nodeId}getNodeById(e){return this._treeView.getNodeById(e)}getChildrenById(e){this._treeView.getChildrenById(e)}setEnabled(e){}destroy(){super.destroy(),this._treeView.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),this.viewer.scene.off(this._onMetaDataLoaded)}}class Zk extends Uk{constructor(e,t={}){super(e),this.eventTrigger=e.eventTrigger;const{modelType:i}=t;this._treeView=new wk(this.viewer,{hierarchy:"types",autoAddModels:!1,pruneEmptyNodes:!0,autoExpandDepth:1}),this._treeView.on("rootNodes_Created",(e=>{this._rootNode=e,this.eventTrigger.emit("classes_rootNodes",e)})),this._treeView.on("nodeNodes_Created",(e=>{this._nodeList=e,this.eventTrigger.emit("classes_nodeNodes",e)})),this._treeView.on("objectNodes_Created",(e=>{this._objectList=e,this.eventTrigger.emit("classes_objectNodes",e)})),this._treeView.on("checkBoxChanged",(e=>{this.eventTrigger.emit("classes_checkBoxChanged",e)})),"ifc"===i?this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._treeView.addModel(e,{rootName:e})})):this._onMetaDataLoaded=this.eventTrigger.on("metaLoaded",(e=>{"success"===e.result&&(this._treeView.addModel(e.metaModel.id,{rootName:e.metaModel.id}),this.eventTrigger.emit("treeReady"))})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)}))}get rootNode(){return this._rootNode}get nodesList(){return this._nodeList}get objectList(){return this._objectList}getNodeIdByObjectId(e){return null!=this._objectList[e]?this._objectList[e].nodeId:null}getNodeById(e){return this._treeView.getNodeById(e)}getChildrenById(e){this._treeView.getChildrenById(e)}checkboxChangeHandler(e,t){const i=this._nodeList[e],r=t,{objects:n}=this.viewer.scene;let s=0;this._treeView.withNodeTree(i,(e=>{const{objectId:t}=e,i=n[t],o=0===e.children.length;e.numVisibleEntities=r?e.numEntities:0,o&&r!==e.checked&&s++,e.checked=r,i&&(i.visible=r)}));let{parent:o}=i;for(;o;)o.checked=r,r?o.numVisibleEntities+=s:o.numVisibleEntities-=s,o=o.parent}nodeTitleClicked(e){const{scene:t}=this.viewer,i=this._nodeList[e],r=[];this._treeView.withNodeTree(i,(e=>{e.objectId&&r.push(e.objectId)}));const{checked:n}=i;n?(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!1),t.setObjectsPickable(r,!0)):(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!0),t.setObjectsPickable(r,!0))}setEnabled(e){}expandTreeViewToDepth(e){}showNodeInTreeView(e){this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),this.viewer.scene.off(this._onMetaDataLoaded)}get treeView(){return this._treeView}}const $k=Y.vec3();class eE extends Uk{constructor(e,t={}){super(e);const{modelType:i}=t;this.eventTrigger=e.eventTrigger,this._treeView=new wk(this.viewer,{hierarchy:"storeys",autoAddModels:!1,autoExpandDepth:1}),this._treeView.on("rootNodes_Created",(e=>{this._rootNode=e,this.eventTrigger.emit("storeys_rootNodes",e)})),this._treeView.on("nodeNodes_Created",(e=>{this._nodeList=e,this.eventTrigger.emit("storeys_nodeNodes",e)})),this._treeView.on("objectNodes_Created",(e=>{this._objectList=e,this.eventTrigger.emit("storeys_objectNodes",e)})),this._treeView.on("checkBoxChanged",(e=>{this.eventTrigger.emit("storeys_checkBoxChanged",e)})),"ifc"===i?this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._treeView.addModel(e,{rootName:e})})):this._onMetaDataLoaded=this.eventTrigger.on("metaLoaded",(e=>{"success"===e.result&&(this._treeView.addModel(e.metaModel.id,{rootName:e.metaModel.id}),this.eventTrigger.emit("treeReady"))})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)}))}get rootNode(){return this._rootNode}get nodesList(){return this._nodeList}get objectList(){return this._objectList}getNodeIdByObjectId(e){if(null==this._objectList[e])return null;this._objectList[e].nodeId}getNodeById(e){return this._treeView.getNodeById(e)}getChildrenById(e){this._treeView.getChildrenById(e)}checkboxChangeHandler(e,t){const i=this._nodeList[e],r=t,{objects:n}=this.viewer.scene;let s=0;this._treeView.withNodeTree(i,(e=>{const{objectId:t}=e,i=n[t],o=0===e.children.length;e.numVisibleEntities=r?e.numEntities:0,o&&r!==e.checked&&s++,e.checked=r,i&&(i.visible=r)}));let{parent:o}=i;for(;o;)o.checked=r,r?o.numVisibleEntities+=s:o.numVisibleEntities-=s,o=o.parent}nodeTitleClicked(e){const{scene:t}=this.viewer,i=this._nodeList[e],r=[];this._treeView.withNodeTree(i,(e=>{e.objectId&&r.push(e.objectId)}));const{checked:n}=i;n?(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!1),t.setObjectsPickable(r,!0)):(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!0),t.setObjectsPickable(r,!0))}setEnabled(e){}_selectObjects(e,t){const{scene:i}=this.viewer,r=i.getAABB(e);this.viewer.cameraControl.pivotPos=Y.getAABB3Center(r,$k),t?(i.setObjectsXRayed(i.objectIds,!0),i.setObjectsVisible(i.objectIds,!0),i.setObjectsPickable(i.objectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1),i.setObjectsXRayed(e,!1),i.setObjectsVisible(e,!0),i.setObjectsPickable(e,!0),this.viewer.cameraFlight.flyTo({aabb:r},(()=>{setTimeout((()=>{i.setObjectsVisible(i.xrayedObjectIds,!1),i.setObjectsXRayed(i.xrayedObjectIds,!1)}),500),t()}))):(i.setObjectsVisible(i.objectIds,!1),i.setObjectsPickable(i.xrayedObjectIds,!0),i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1),i.setObjectsVisible(e,!0),this.viewer.cameraFlight.jumpTo({aabb:r}))}destroy(){super.destroy(),this._treeView.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),this.viewer.scene.off(this._onMetaDataLoaded)}expandTreeViewToDepth(e){}showNodeInTreeView(e){this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}selectStorey(e,t){const{metaScene:i}=this.viewer,r=i.metaObjects[e];if(!r)return void this.error(`selectStorey() - object is not found: ${e}`);if("IfcBuildingStorey"!==r.type)return void this.error(`selectStorey() - object is not found: ${e}`);const n=r.getObjectIDsInSubtree();this._selectObjects(n,t)}}const tE=Y.vec3();class iE extends Uk{constructor(e,t){super(e,t),this._saveOrthoActive=null,this._cameraControlNavModeMediator=t.cameraControlNavModeMediator,this._active=!1}setEnabled(e){super.setEnabled(e),this._saveOrthoActive=this.bimViewer.orthoMode.getActive()}setActive(e,t=()=>{}){this._active!==e?(this._active=e,e?this._enterThreeDMode((()=>{this.fire("active",this._active),t&&t()})):this._exitThreeDMode((()=>{this.fire("active",this._active),t&&t()}))):t&&t()}_enterThreeDMode(e=()=>{}){const{viewer:t}=this,{scene:i}=t,{aabb:r}=i,n=Y.getAABB3Diag(r),s=Y.getAABB3Center(r,tE),o=Math.abs(n/Math.tan(32.5)),{camera:a}=i,l=a.yUp?[-1,-1,-1]:[1,1,1],u=a.yUp?[-1,1,-1]:[-1,1,1];t.cameraControl.pivotPos=s,this.bimViewer.navCubeMode.setActive(!0),this.bimViewer.firstPersonMode.setEnabled(!0),this._cameraControlNavModeMediator.setThreeDModeActive(!0),this.bimViewer.sectionTool.setEnabled(!0),this.bimViewer.orthoMode.setEnabled(!0),e?t.cameraFlight.flyTo({look:s,eye:[s[0]-o*l[0],s[1]-o*l[1],s[2]-o*l[2]],up:u,orthoScale:1.3*n,duration:1,projection:this._saveOrthoActive?"ortho":"perspective"},(()=>{e()})):t.cameraFlight.jumpTo({look:s,eye:[s[0]-o*l[0],s[1]-o*l[1],s[2]-o*l[2]],up:u,orthoScale:1.3*n,projection:this._saveOrthoActive?"ortho":"perspective"})}_exitThreeDMode(e=()=>{}){const{viewer:t}=this,{scene:i}=t,{camera:r}=i,{aabb:n}=i,s=Y.getAABB3Center(n),o=Y.getAABB3Diag(n),a=Math.abs(o/Math.tan(45*Y.DEGTORAD)),l=1.3*o,u=tE;u[0]=s[0]+r.worldUp[0]*a,u[1]=s[1]+r.worldUp[1]*a,u[2]=s[2]+r.worldUp[2]*a;const c=Y.mulVec3Scalar(r.worldForward,-1,[]);this.bimViewer.sectionTool.setActive(!1),this.bimViewer.firstPersonMode.setEnabled(!1),this._saveOrthoActive=this.bimViewer.orthoMode.getActive(),this.bimViewer.orthoMode.setEnabled(!1),this._cameraControlNavModeMediator.setThreeDModeActive(!1),e?t.cameraFlight.flyTo({eye:u,look:s,up:c,orthoScale:l,projection:"ortho"},(()=>{this.bimViewer.navCubeMode.setActive(!1)})):(t.cameraFlight.jumpTo({eye:u,look:s,up:c,orthoScale:l,projection:"ortho"}),this.bimViewer.navCubeMode.setActive(!1))}}class rE extends Uk{constructor(e,t){super(e,t),this.viewer.camera.on("projection",(()=>{const e="ortho"===this.viewer.camera.projection;this._active=e})),this._active=!1}setActive(e,t=()=>{}){this._active!==e?(this._active=e,e?t?this._enterOrthoMode((()=>{this.fire("active",this._active),t()})):(this._enterOrthoMode(),this.fire("active",this._active)):t?this._exitOrthoMode((()=>{this.fire("active",this._active),t()})):(this._exitOrthoMode(),this.fire("active",this._active))):t&&t()}_enterOrthoMode(e=()=>{}){e?this.viewer.cameraFlight.flyTo({projection:"ortho",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"ortho"})}_exitOrthoMode(e=()=>{}){e?this.viewer.cameraFlight.flyTo({projection:"perspective",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"perspective"})}}class nE extends Uk{constructor(e,t){if(super(e,t),this._AnnotationList={},this._visible=!0,this._currentType="image",this._modelId=t.modelId,this.eventTrigger=e.eventTrigger,this.imageSrc=new Map,document.getElementById("myAnnotationDiv"))this.annotationWrapper=document.getElementById("myAnnotationDiv");else{this.annotationWrapper=document.createElement("div"),this.annotationWrapper.id="myAnnotationDiv";const{canvas:t}=e.viewer.scene.canvas;t.parentNode.insertBefore(this.annotationWrapper,t)}let i;this.annotationsPlugin=new tt(this.viewer,{markerHTML:"<div class='annotation-marker {{iconType}}' id='{{id}}'entityid='{{entityid}}' style='position:absolute;'><img src='{{iconPath}}'></div>",container:this.annotationWrapper,values:{id:"",entityid:"",iconPath:"",iconType:""}}),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this.on("active",(e=>{})),this.annotationsPlugin.on("markerClicked",(e=>{this.eventTrigger.emit("markerClicked",e),i=e})),this.annotationsPlugin.on("markerDoubleClicked",(e=>{this.eventTrigger.emit("markerDoubleClicked",e)}));const r=e=>{this._active&&("Delete"!==e.key&&8!==e.keyCode||this.eventTrigger.emit("requestDeleteMarker",i.id))};document.addEventListener("keydown",r.bind(this)),this.on("destroy",(()=>{document.removeEventListener("keydown",r.bind(this))}))}setAllVisible(e=!this._visible){this._visible=e,this.annotationsPlugin.setAllVisible(e)}clickToCreateAnno(e){if(!this.getActive())return;if(!this.getEnabled())return;const t=this.getCanvasPos(e),i=this.viewer.scene.pick({canvasPos:t,pickSurface:!0});if(i){const e=i.entity.id,t=`${e}_${this._currentType}_${this.getTime()}`;this.annotationsPlugin.createAnnotation({id:t,pickResult:i,occludable:!0,markerShown:!0,labelShown:!1,values:{id:t,entityid:e,iconPath:this.getTypeImage(this._currentType),iconType:this._currentType}}),this.currentAnnotation={id:"",modelId:this._modelId,entityId:e,type:this._currentType,content:{worldPos:[i.worldPos[0],i.worldPos[1],i.worldPos[2]],fileContent:[],text:""}},this.eventTrigger.emit("createAnnotation",{type:this._currentType,currentAnnotation:this.currentAnnotation})}else console.log("没有获取到合法的坐标,传入的内容:",e)}getTime(){const e=new Date;return e.getFullYear()+(e.getMonth()+1<10?`0${e.getMonth()+1}`:e.getMonth()+1)+(e.getDate()<10?`0${e.getDate()}`:e.getDate())+(e.getHours()<10?`0${e.getHours()}`:e.getHours())+(e.getMinutes()<10?`0${e.getMinutes()}`:e.getMinutes())+(e.getSeconds()<10?`0${e.getSeconds()}`:e.getSeconds())}getCanvasPos(e){const t=[];if(e)if("TouchEvent"in window&&e instanceof TouchEvent){if(!e.touches||0===e.touches.length)return;const i=e.touches[0];let r=e.target,n=0,s=0;for(;r.offsetParent;)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;t[0]=i.pageX-n,t[1]=i.pageY-s}else{let i=this.viewer.scene.canvas.canvas,r=0,n=0;for(;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;t[0]=e.pageX-r,t[1]=e.pageY-n}else e=window.event,t[0]=e.x,t[1]=e.y;return t}setCurrentType(e){this._currentType=e}showAnnotationList(){this.clear();const e=this._AnnotationList;e.length>0&&e.forEach((e=>{this.addAnnotation(e.id.toString(),e.content.worldPos,e.type)}))}addAnnotation(e,t,i){this.annotationsPlugin.createAnnotation({id:e,worldPos:t,occludable:!0,markerShown:this._visible,labelShown:!1,values:{id:e,entityid:e,iconPath:this.getTypeImage(i),iconType:i}})}clear(){this.annotationsPlugin.clear()}get AnnotationList(){return this._AnnotationList}set AnnotationList(e){this._AnnotationList=e}getTypeImage(e){return this.imageSrc.size<1?document.getElementById(`annotation_tool_btn_img_${e}`).src:this.imageSrc.get(e)}setTypeImage(e){for(const t in e)this.imageSrc.set(t,e[t])}destroyAnnotationById(e){this.annotationsPlugin.destroyAnnotation(e),this._AnnotationList[e]&&delete this._AnnotationList[e]}getAnnotationById(e){return this.annotationsPlugin.annotations[e]}get annotationPluginList(){return this.annotationsPlugin.annotations}destroy(){var e;this.fire("destroy",!0),this.clear(),this.annotationsPlugin.destroy(),this.annotationWrapper&&(null===(e=this.annotationWrapper.parentNode)||void 0===e||e.removeChild(this.annotationWrapper))}}class sE extends Uk{constructor(e,t){super(e,t),this._offsetX=0,this._offsetY=0,this._isTouch=!1,this._approximate=!0,this._precision=2,this.eventTrigger=e.eventTrigger,this.angleMeasureContainer=document.createElement("div"),this.angleMeasureContainer.id="myAngleMeasuresDiv";const{canvas:i}=e.viewer.scene.canvas;i.parentNode.insertBefore(this.angleMeasureContainer,i),this._angleMeasurementsPlugin=new Ke(this.viewer,{container:this.angleMeasureContainer,defaultColor:"#0065FC"}),this._angleMeasurementsMouseControl=new We(this._angleMeasurementsPlugin,{snapping:!0,offsetX:t.offsetX,offsetY:t.offsetY}),this._angleMeasurementsTouchControl=new qe(this._angleMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY}),this._angleMeasurementsSimulateMouseControl=new Ye(this._angleMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY,snapping:!0}),this._angleMeasurementsMouseControl.snapping=!0,this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this._initSettings(),this._initializeMeasure()}setActive(e){this._active=e,e?this.chosedTarget&&this.chosedTarget.setHighlighted(!0):(this.refreshMouseState(),this.setAllHightLighted(!1)),this._isTouch?(this._angleMeasurementsTouchControl.active=e,this._angleMeasurementsSimulateMouseControl.active=e):this._angleMeasurementsMouseControl.active=e}getActive(){return this._active}_initSettings(){this._angleMeasurementsMouseControl.activate(),this._angleMeasurementsMouseControl.active=!1,this._angleMeasurementsTouchControl.activate(),this._angleMeasurementsTouchControl.active=!1,this._angleMeasurementsSimulateMouseControl.activate(),this._angleMeasurementsSimulateMouseControl.active=!1}_initializeMeasure(){this._angleMeasurementsPlugin.on("measurementCreated",(e=>{this.eventTrigger.emit("newAngleMeasure",{id:e.id}),this.newMeasure=e,this.chosedTarget=null})),this._angleMeasurementsPlugin.on("measurementEnd",(e=>{0!==this.getMeasureResultByID(e.id)?(this.eventTrigger.emit("createAngleMeasure",{id:e.id,result:this.getMeasureResultByID(e.id)}),this.setAllHightLighted(!1),this.chosedTarget=e,this.chosedTarget.setHighlighted(!0),this.newMeasure=null):this.destroyMeasurementById(e.id)})),this._angleMeasurementsPlugin.on("mouseOver",(e=>{e.measurement.setHighlighted(!0)})),this._angleMeasurementsPlugin.on("mouseLeave",(e=>{e.angleMeasurement==this.chosedTarget&&this._active||e.measurement.setHighlighted(!1)})),this._angleMeasurementsPlugin.on("clickMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickAngleMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._angleMeasurementsPlugin.on("touchMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickAngleMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._angleMeasurementsPlugin.on("measurementDestroyed",(e=>{this.eventTrigger.emit("AngleMeasureDestroyed",{id:e.id})}));const e=()=>{this._active&&this.chosedTarget&&this.chosedTarget.setHighlighted(!0)},t=e=>{if(this._active&&("Delete"===e.key||8===e.keyCode)){if(!this.chosedTarget)return;this.destroyMeasurementById(this.chosedTarget.id),this._angleMeasurementsPlugin.fire("measureDelete",null),0==this.getNumMeasurements()&&(this.chosedTarget=null)}};document.addEventListener("mousemove",e.bind(this)),document.addEventListener("keydown",t.bind(this)),this.on("destroy",(()=>{document.removeEventListener("mousemove",e.bind(this)),document.removeEventListener("keydown",t.bind(this))}))}set isTouch(e){this._isTouch=e,e||this._angleMeasurementsMouseControl.deactivate()}get isTouch(){return this._isTouch}set precision(e){this._precision=e,this._angleMeasurementsPlugin.precision=e}get precision(){return this._precision}set offsetX(e){this._offsetX=e,this._isTouch?(this._angleMeasurementsTouchControl.offsetX=e,this._angleMeasurementsSimulateMouseControl.offsetX=e):this._angleMeasurementsMouseControl.offsetX=e}get offsetX(){return this._offsetX}set offsetY(e){this._offsetY=e,this._isTouch?(this._angleMeasurementsTouchControl.offsetY=e,this._angleMeasurementsSimulateMouseControl.offsetY=e):this._angleMeasurementsMouseControl.offsetY=e}get offsetY(){return this._offsetY}refreshMouseState(){this.newMeasure&&(this.destroyMeasurementById(this.newMeasure.id),this.isTouch?(this._angleMeasurementsTouchControl.touchState=0,this._angleMeasurementsSimulateMouseControl.mouseState=0):this._angleMeasurementsMouseControl.mouseState=0,this.setAllHightLighted(!1),this.newMeasure=null)}setAllVisible(e){this._angleMeasurementsPlugin.setMeasurementsShown(e)}setSnappingEnabled(e){return this._angleMeasurementsMouseControl.snapping=e}getNumMeasurements(){return Object.keys(this._angleMeasurementsPlugin.measurements).length}getMeasurementsList(){return this._angleMeasurementsPlugin.measurements}getMeasurementById(e){return this.getMeasurementsList()[e]}getMeasureResultByID(e){const t=this.getMeasurementById(e);return t?t.angle:0}setMeasureColorByID(e,t){this.getMeasurementById(e).color=t}setMeasureClickbleById(e,t){this.getMeasurementById(e).clickable=t}setMeasureHightlighted(e,t){this.getMeasurementById(e).setHighlighted(t)}setAllHightLighted(e){const t=this.getMeasurementsList();for(const i in t)t[i].setHighlighted(e)}setVisibleById(e,t){this.getMeasurementById(e).visible=t}setAngleLabelVisible(e,t){this.getMeasurementById(e).angleVisible=t}destroyMeasurementById(e){this._angleMeasurementsPlugin.destroyMeasurement(e)}onSimulateMousedown(e){this._angleMeasurementsSimulateMouseControl.onMousedown(e)}onSimulateMousemove(e){this._angleMeasurementsSimulateMouseControl.onMousemove(e)}onSimulateMouseup(e){this._angleMeasurementsSimulateMouseControl.onMouseup(e)}clear(){this._angleMeasurementsPlugin.clear()}stop(){this._isTouch?(this._angleMeasurementsTouchControl.deactivate(),this._angleMeasurementsSimulateMouseControl.deactivate()):this._angleMeasurementsMouseControl.deactivate()}destroy(){this.fire("destroy",!0),this.angleMeasureContainer.parentNode&&this.angleMeasureContainer.parentNode.removeChild(this.angleMeasureContainer),this._angleMeasurementsPlugin.destroy(),this._angleMeasurementsMouseControl.destroy(),this._angleMeasurementsTouchControl.destroy(),this._angleMeasurementsSimulateMouseControl.destroy(),super.destroy()}}class oE extends Uk{constructor(e,t){super(e,t),this._offsetX=0,this._offsetY=0,this._isTouch=!1,this._approximate=!0,this._precision=2,this._scale=1,this._unit="m",this.eventTrigger=e.eventTrigger,this.distanceMeasureContainer=document.createElement("div"),this.distanceMeasureContainer.id="myDistanceMeasuresDiv";const{canvas:i}=e.viewer.scene.canvas;i.parentNode.insertBefore(this.distanceMeasureContainer,i),this._distanceMeasurementsPlugin=new gh(this.viewer,{container:this.distanceMeasureContainer,defaultAxisVisible:!1,defaultColor:"#0065FC"}),this._distanceMeasurementsMouseControl=new fh(this._distanceMeasurementsPlugin,{snapping:!0,offsetX:t.offsetX,offsetY:t.offsetY}),this._distanceMeasurementsTouchControl=new mh(this._distanceMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY}),this._distanceMeasurementsSimulateMouseControl=new vh(this._distanceMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY,snapping:!0}),this._distanceMeasurementsMouseControl.snapping=!0,this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this._initSettings(),this._initializeMeasure()}setActive(e){this._active=e,e?this.chosedTarget&&this.chosedTarget.setHighlighted(!0):(this.refreshMouseState(),this.setAllHightLighted(!1)),this._isTouch?(this._distanceMeasurementsTouchControl.active=e,this._distanceMeasurementsSimulateMouseControl.active=e):this._distanceMeasurementsMouseControl.active=e}getActive(){return this._active}_initSettings(){this._distanceMeasurementsMouseControl.activate(),this._distanceMeasurementsMouseControl.active=!1,this._distanceMeasurementsTouchControl.activate(),this._distanceMeasurementsTouchControl.active=!1,this._distanceMeasurementsSimulateMouseControl.activate(),this._distanceMeasurementsSimulateMouseControl.active=!1}_initializeMeasure(){this._distanceMeasurementsPlugin.on("measurementCreated",(e=>{this.eventTrigger.emit("newDistanceMeasure",{id:e.id}),this.newMeasure=e,this.chosedTarget=null})),this._distanceMeasurementsPlugin.on("measurementEnd",(e=>{0!==this.getMeasureResultByID(e.id)?(this.eventTrigger.emit("createDistanceMeasure",{id:e.id,result:this.getMeasureResultByID(e.id),xResult:e.xLabel,yResult:e.yLabel,zResult:e.zLabel}),this.setAllHightLighted(!1),this.chosedTarget=e,this.chosedTarget.setHighlighted(!0),this.newMeasure=null):this.destroyMeasurementById(e.id)})),this._distanceMeasurementsPlugin.on("mouseOver",(e=>{e.measurement.setHighlighted(!0)})),this._distanceMeasurementsPlugin.on("mouseLeave",(e=>{e.distanceMeasurement==this.chosedTarget&&this._active||e.measurement.setHighlighted(!1)})),this._distanceMeasurementsPlugin.on("clickMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickDistanceMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._distanceMeasurementsPlugin.on("touchMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickDistanceMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._distanceMeasurementsPlugin.on("measurementCancel",(e=>{this.eventTrigger.emit("DistanceMeasureCancel",{id:e.id})})),this._distanceMeasurementsPlugin.on("measurementDestroyed",(e=>{this.eventTrigger.emit("DistanceMeasureDestroyed",{id:e.id})}));const e=()=>{this._active&&this.chosedTarget&&this.chosedTarget.setHighlighted(!0)},t=e=>{if(this._active&&("Delete"===e.key||8===e.keyCode)){if(!this.chosedTarget)return;this.destroyMeasurementById(this.chosedTarget.id),this._distanceMeasurementsPlugin.fire("measureDelete",null),0==this.getNumMeasurements()&&(this.chosedTarget=null)}};document.addEventListener("mousemove",e.bind(this)),document.addEventListener("keydown",t.bind(this)),this.on("destroy",(()=>{document.removeEventListener("mousemove",e.bind(this)),document.removeEventListener("keydown",t.bind(this))}))}set isTouch(e){this._isTouch=e,e||this._distanceMeasurementsMouseControl.deactivate()}get isTouch(){return this._isTouch}set unit(e){switch(this._unit=e,e){case"m":this.viewer.scene.metrics.units="meters",this.viewer.scene.metrics.scale=1*this._scale;break;case"cm":this.viewer.scene.metrics.units="centimeters",this.viewer.scene.metrics.scale=100*this._scale;break;case"mm":this.viewer.scene.metrics.units="millimeters",this.viewer.scene.metrics.scale=1e3*this._scale}}set scale(e){this._scale=e,this.unit=this._unit}get scale(){return this._scale}set precision(e){this._precision=e,this._distanceMeasurementsPlugin.precision=e}get precision(){return this._precision}set offsetX(e){this._offsetX=e,this._isTouch?(this._distanceMeasurementsTouchControl.offsetX=e,this._distanceMeasurementsSimulateMouseControl.offsetX=e):this._distanceMeasurementsMouseControl.offsetX=e}get offsetX(){return this._offsetX}set offsetY(e){this._offsetY=e,this._isTouch?(this._distanceMeasurementsTouchControl.offsetY=e,this._distanceMeasurementsSimulateMouseControl.offsetY=e):this._distanceMeasurementsMouseControl.offsetY=e}get offsetY(){return this._offsetY}refreshMouseState(){this.newMeasure&&(this.destroyMeasurementById(this.newMeasure.id),this.isTouch?(this._distanceMeasurementsTouchControl.touchState=0,this._distanceMeasurementsSimulateMouseControl.mouseState=0):this._distanceMeasurementsMouseControl.mouseState=0,this.setAllHightLighted(!1),this.newMeasure=null)}setAllVisible(e){this._distanceMeasurementsPlugin.setMeasurementsShown(e)}setSnappingEnabled(e){return this._distanceMeasurementsMouseControl.snapping=e}getNumMeasurements(){return Object.keys(this._distanceMeasurementsPlugin.measurements).length}getMeasurementsList(){return this._distanceMeasurementsPlugin.measurements}getMeasurementById(e){return this.getMeasurementsList()[e]}getMeasureResultByID(e){const t=this.getMeasurementById(e);return t?t.length:0}setMeasureColorByID(e,t){this.getMeasurementById(e).color=t}setMeasureClickbleById(e,t){this.getMeasurementById(e).clickable=t}setMeasureHightlighted(e,t){this.getMeasurementById(e).setHighlighted(t)}setAllHightLighted(e){const t=this.getMeasurementsList();for(const i in t)t[i].setHighlighted(e)}setVisibleById(e,t){this.getMeasurementById(e).visible=t}setLableVisibleById(e,t){this.getMeasurementById(e).labelsVisible=t}destroyMeasurementById(e){this._distanceMeasurementsPlugin.destroyMeasurement(e)}onSimulateMousedown(e){this._distanceMeasurementsSimulateMouseControl.onMousedown(e)}onSimulateMousemove(e){this._distanceMeasurementsSimulateMouseControl.onMousemove(e)}onSimulateMouseup(e){this._distanceMeasurementsSimulateMouseControl.onMouseup(e)}clear(){this._distanceMeasurementsPlugin.clear()}stop(){this._isTouch?(this._distanceMeasurementsTouchControl.deactivate(),this._distanceMeasurementsSimulateMouseControl.deactivate()):this._distanceMeasurementsMouseControl.deactivate()}destroy(){this.fire("destroy",!0),this.distanceMeasureContainer.parentNode&&this.distanceMeasureContainer.parentNode.removeChild(this.distanceMeasureContainer),this._distanceMeasurementsPlugin.destroy(),this._distanceMeasurementsMouseControl.destroy(),this._distanceMeasurementsTouchControl.destroy(),this._distanceMeasurementsSimulateMouseControl.destroy(),super.destroy()}}class aE extends Uk{constructor(e,t){super(e),this._isTouch=!1,this._tools={},this._toolType="distance",this.eventTrigger=e.eventTrigger,this._measure_distance_tool=new oE(e,{}),this._measure_angle_tool=new sE(e,{}),this._tools.distance=this._measure_distance_tool,this._tools.angle=this._measure_angle_tool,this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this.setActive(!0),this._initEventHandle()}_initEventHandle(){this.eventTrigger.on("clickAngleMeasure",(e=>{this._active&&(this.getActiveByType("angle")||this.setActiveByType("angle",!0))})),this.eventTrigger.on("clickDistanceMeasure",(e=>{this._active&&(this.getActiveByType("distance")||this.setActiveByType("distance",!0))}))}setActive(e=!this._active){this._active=e,this._measure_angle_tool.setEnabled(e),this._measure_distance_tool.setEnabled(e),e||(this._measure_angle_tool.setActive(e),this._measure_distance_tool.setActive(e))}getActive(){return this._active}set isTouch(e){this._isTouch=e,this._measure_angle_tool.isTouch=e,this._measure_distance_tool.isTouch=e}get isTouch(){return this._isTouch}get measureAngleTool(){return this._measure_angle_tool}get measureDistanceTool(){return this._measure_distance_tool}getMeasureToolByType(e){return this._tools[e]}setActiveByType(e,t=!this._tools[e].getActive()){this._toolType=e;for(let i in this._tools)e==i?this._tools[i].setActive(t):this._tools[i].setActive(!1)}getActiveByType(e){return this._tools[e].getActive()}get currentTool(){return this._tools[this._toolType]}SetMeasureAngleActive(e=!this._measure_angle_tool.getActive(),t=()=>{}){this._measure_angle_tool.setActive(e),t(this._measure_angle_tool.getActive())}SetMeasureDistanceActive(e=!this._measure_distance_tool.getActive(),t=()=>{}){this._measure_distance_tool.setActive(e),t(this._measure_distance_tool.getActive())}setAllDisActive(){for(let e in this._tools)this._tools[e].setActive(!1)}setMeasureOffSet(e,t){this.measureAngleTool.offsetX=e,this.measureAngleTool.offsetY=t,this.measureDistanceTool.offsetX=e,this.measureDistanceTool.offsetY=t}setSnapRadius(e){this.viewer.cameraControl.snapRadius=e}destroy(){this._measure_distance_tool.destroy(),this._measure_angle_tool.destroy()}}
37
+ ***************************************************************************** */var bA=function(e,t){return bA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},bA(e,t)};function wA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}bA(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var xA=function(){return xA=Object.assign||function(e){for(var t,i=1,r=arguments.length;i<r;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},xA.apply(this,arguments)};function BA(e,t,i,r){return new(i||(i=Promise))((function(n,s){function o(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,a)}l((r=r.apply(e,t||[])).next())}))}function PA(e,t){var i,r,n,s,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return s={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(s){return function(a){return function(s){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(n=2&s[0]?r.return:s[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,s[1])).done)return n;switch(r=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){o.label=s[1];break}if(6===s[0]&&o.label<n[1]){o.label=n[1],n=s;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(s);break}n[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{i=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function CA(e,t,i){if(i||2===arguments.length)for(var r,n=0,s=t.length;n<s;n++)!r&&n in t||(r||(r=Array.prototype.slice.call(t,0,n)),r[n]=t[n]);return e.concat(r||t)}for(var MA=function(){function e(e,t,i,r){this.left=e,this.top=t,this.width=i,this.height=r}return e.prototype.add=function(t,i,r,n){return new e(this.left+t,this.top+i,this.width+r,this.height+n)},e.fromClientRect=function(t,i){return new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height)},e.fromDOMRectList=function(t,i){var r=Array.from(i).find((function(e){return 0!==e.width}));return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),kA=function(e,t){return MA.fromClientRect(e,t.getBoundingClientRect())},EA=function(e){for(var t=[],i=0,r=e.length;i<r;){var n=e.charCodeAt(i++);if(n>=55296&&n<=56319&&i<r){var s=e.charCodeAt(i++);56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),i--)}else t.push(n)}return t},SA=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var i=e.length;if(!i)return"";for(var r=[],n=-1,s="";++n<i;){var o=e[n];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(n+1===i||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},TA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",FA="undefined"==typeof Uint8Array?[]:new Uint8Array(256),IA=0;IA<64;IA++)FA[TA.charCodeAt(IA)]=IA;for(var DA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",RA="undefined"==typeof Uint8Array?[]:new Uint8Array(256),OA=0;OA<64;OA++)RA[DA.charCodeAt(OA)]=OA;for(var LA=function(e,t,i){return e.slice?e.slice(t,i):new Uint16Array(Array.prototype.slice.call(e,t,i))},jA=function(){function e(e,t,i,r,n,s){this.initialValue=e,this.errorValue=t,this.highStart=i,this.highValueIndex=r,this.index=n,this.data=s}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),UA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",NA="undefined"==typeof Uint8Array?[]:new Uint8Array(256),VA=0;VA<64;VA++)NA[UA.charCodeAt(VA)]=VA;var QA=10,HA=13,GA=15,zA=17,WA=18,KA=19,XA=20,qA=21,YA=22,JA=24,ZA=25,$A=26,ed=27,td=28,id=30,rd=32,nd=33,sd=34,od=35,ad=37,ld=38,ud=39,cd=40,hd=42,Ad=[9001,65288],dd="×",pd="÷",fd=function(e){var t,i,r,n=function(e){var t,i,r,n,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(u)?u:new Uint8Array(u);for(t=0;t<a;t+=4)i=RA[e.charCodeAt(t)],r=RA[e.charCodeAt(t+1)],n=RA[e.charCodeAt(t+2)],s=RA[e.charCodeAt(t+3)],c[l++]=i<<2|r>>4,c[l++]=(15&r)<<4|n>>2,c[l++]=(3&n)<<6|63&s;return u}(e),s=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=4)i.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return i}(n):new Uint32Array(n),o=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=2)i.push(e[r+1]<<8|e[r]);return i}(n):new Uint16Array(n),a=LA(o,12,s[4]/2),l=2===s[5]?LA(o,(24+s[4])/2):(t=s,i=Math.ceil((24+s[4])/4),t.slice?t.slice(i,r):new Uint32Array(Array.prototype.slice.call(t,i,r)));return new jA(s[0],s[1],s[2],s[3],a,l)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgA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HLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCG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ggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAA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BywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOM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AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHg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AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAC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AeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACU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AeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAe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KwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQ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4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),gd=[id,36],md=[1,2,3,5],vd=[QA,8],_d=[ed,$A],yd=md.concat(vd),bd=[ld,ud,cd,sd,od],wd=[GA,HA],xd=function(e,t,i,r){var n=r[i];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var s=i;s<=r.length;){if((l=r[++s])===t)return!0;if(l!==QA)break}if(n===QA)for(s=i;s>0;){var o=r[--s];if(Array.isArray(e)?-1!==e.indexOf(o):e===o)for(var a=i;a<=r.length;){var l;if((l=r[++a])===t)return!0;if(l!==QA)break}if(o!==QA)break}return!1},Bd=function(e,t){for(var i=e;i>=0;){var r=t[i];if(r!==QA)return r;i--}return 0},Pd=function(e,t,i,r,n){if(0===i[r])return dd;var s=r-1;if(Array.isArray(n)&&!0===n[s])return dd;var o=s-1,a=s+1,l=t[s],u=o>=0?t[o]:0,c=t[a];if(2===l&&3===c)return dd;if(-1!==md.indexOf(l))return"!";if(-1!==md.indexOf(c))return dd;if(-1!==vd.indexOf(c))return dd;if(8===Bd(s,t))return pd;if(11===fd.get(e[s]))return dd;if((l===rd||l===nd)&&11===fd.get(e[a]))return dd;if(7===l||7===c)return dd;if(9===l)return dd;if(-1===[QA,HA,GA].indexOf(l)&&9===c)return dd;if(-1!==[zA,WA,KA,JA,td].indexOf(c))return dd;if(Bd(s,t)===YA)return dd;if(xd(23,YA,s,t))return dd;if(xd([zA,WA],qA,s,t))return dd;if(xd(12,12,s,t))return dd;if(l===QA)return pd;if(23===l||23===c)return dd;if(16===c||16===l)return pd;if(-1!==[HA,GA,qA].indexOf(c)||14===l)return dd;if(36===u&&-1!==wd.indexOf(l))return dd;if(l===td&&36===c)return dd;if(c===XA)return dd;if(-1!==gd.indexOf(c)&&l===ZA||-1!==gd.indexOf(l)&&c===ZA)return dd;if(l===ed&&-1!==[ad,rd,nd].indexOf(c)||-1!==[ad,rd,nd].indexOf(l)&&c===$A)return dd;if(-1!==gd.indexOf(l)&&-1!==_d.indexOf(c)||-1!==_d.indexOf(l)&&-1!==gd.indexOf(c))return dd;if(-1!==[ed,$A].indexOf(l)&&(c===ZA||-1!==[YA,GA].indexOf(c)&&t[a+1]===ZA)||-1!==[YA,GA].indexOf(l)&&c===ZA||l===ZA&&-1!==[ZA,td,JA].indexOf(c))return dd;if(-1!==[ZA,td,JA,zA,WA].indexOf(c))for(var h=s;h>=0;){if((A=t[h])===ZA)return dd;if(-1===[td,JA].indexOf(A))break;h--}if(-1!==[ed,$A].indexOf(c))for(h=-1!==[zA,WA].indexOf(l)?o:s;h>=0;){var A;if((A=t[h])===ZA)return dd;if(-1===[td,JA].indexOf(A))break;h--}if(ld===l&&-1!==[ld,ud,sd,od].indexOf(c)||-1!==[ud,sd].indexOf(l)&&-1!==[ud,cd].indexOf(c)||-1!==[cd,od].indexOf(l)&&c===cd)return dd;if(-1!==bd.indexOf(l)&&-1!==[XA,$A].indexOf(c)||-1!==bd.indexOf(c)&&l===ed)return dd;if(-1!==gd.indexOf(l)&&-1!==gd.indexOf(c))return dd;if(l===JA&&-1!==gd.indexOf(c))return dd;if(-1!==gd.concat(ZA).indexOf(l)&&c===YA&&-1===Ad.indexOf(e[a])||-1!==gd.concat(ZA).indexOf(c)&&l===WA)return dd;if(41===l&&41===c){for(var d=i[s],p=1;d>0&&41===t[--d];)p++;if(p%2!=0)return dd}return l===rd&&c===nd?dd:pd},Cd=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var i=function(e,t){void 0===t&&(t="strict");var i=[],r=[],n=[];return e.forEach((function(e,s){var o=fd.get(e);if(o>50?(n.push(!0),o-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(s),i.push(16);if(4===o||11===o){if(0===s)return r.push(s),i.push(id);var a=i[s-1];return-1===yd.indexOf(a)?(r.push(r[s-1]),i.push(a)):(r.push(s),i.push(id))}return r.push(s),31===o?i.push("strict"===t?qA:ad):o===hd||29===o?i.push(id):43===o?e>=131072&&e<=196605||e>=196608&&e<=262141?i.push(ad):i.push(id):void i.push(o)})),[r,i,n]}(e,t.lineBreak),r=i[0],n=i[1],s=i[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(n=n.map((function(e){return-1!==[ZA,id,hd].indexOf(e)?ad:e})));var o="keep-all"===t.wordBreak?s.map((function(t,i){return t&&e[i]>=19968&&e[i]<=40959})):void 0;return[r,n,o]},Md=function(){function e(e,t,i,r){this.codePoints=e,this.required="!"===t,this.start=i,this.end=r}return e.prototype.slice=function(){return SA.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),kd=45,Ed=43,Sd=-1,Td=function(e){return e>=48&&e<=57},Fd=function(e){return Td(e)||e>=65&&e<=70||e>=97&&e<=102},Id=function(e){return 10===e||9===e||32===e},Dd=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},Rd=function(e){return Dd(e)||Td(e)||e===kd},Od=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},Ld=function(e,t){return 92===e&&10!==t},jd=function(e,t,i){return e===kd?Dd(t)||Ld(t,i):!!Dd(e)||!(92!==e||!Ld(e,t))},Ud=function(e,t,i){return e===Ed||e===kd?!!Td(t)||46===t&&Td(i):Td(46===e?t:e)},Nd=function(e){var t=0,i=1;e[t]!==Ed&&e[t]!==kd||(e[t]===kd&&(i=-1),t++);for(var r=[];Td(e[t]);)r.push(e[t++]);var n=r.length?parseInt(SA.apply(void 0,r),10):0;46===e[t]&&t++;for(var s=[];Td(e[t]);)s.push(e[t++]);var o=s.length,a=o?parseInt(SA.apply(void 0,s),10):0;69!==e[t]&&101!==e[t]||t++;var l=1;e[t]!==Ed&&e[t]!==kd||(e[t]===kd&&(l=-1),t++);for(var u=[];Td(e[t]);)u.push(e[t++]);var c=u.length?parseInt(SA.apply(void 0,u),10):0;return i*(n+a*Math.pow(10,-o))*Math.pow(10,l*c)},Vd={type:2},Qd={type:3},Hd={type:4},Gd={type:13},zd={type:8},Wd={type:21},Kd={type:9},Xd={type:10},qd={type:11},Yd={type:12},Jd={type:14},Zd={type:23},$d={type:1},ep={type:25},tp={type:24},ip={type:26},rp={type:27},np={type:28},sp={type:29},op={type:31},ap={type:32},lp=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(EA(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==ap;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),i=this.peekCodePoint(1),r=this.peekCodePoint(2);if(Rd(t)||Ld(i,r)){var n=jd(t,i,r)?2:1;return{type:5,value:this.consumeName(),flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Gd;break;case 39:return this.consumeStringToken(39);case 40:return Vd;case 41:return Qd;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Jd;break;case Ed:if(Ud(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return Hd;case kd:var s=e,o=this.peekCodePoint(0),a=this.peekCodePoint(1);if(Ud(s,o,a))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(jd(s,o,a))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(o===kd&&62===a)return this.consumeCodePoint(),this.consumeCodePoint(),tp;break;case 46:if(Ud(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(42===l&&47===(l=this.consumeCodePoint()))return this.consumeToken();if(l===Sd)return this.consumeToken()}break;case 58:return ip;case 59:return rp;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===kd&&this.peekCodePoint(2)===kd)return this.consumeCodePoint(),this.consumeCodePoint(),ep;break;case 64:var u=this.peekCodePoint(0),c=this.peekCodePoint(1),h=this.peekCodePoint(2);if(jd(u,c,h))return{type:7,value:this.consumeName()};break;case 91:return np;case 92:if(Ld(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return sp;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),zd;break;case 123:return qd;case 125:return Yd;case 117:case 85:var A=this.peekCodePoint(0),d=this.peekCodePoint(1);return A!==Ed||!Fd(d)&&63!==d||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Kd;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Wd;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Xd;break;case Sd:return ap}return Id(e)?(this.consumeWhiteSpace(),op):Td(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Dd(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:SA(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();Fd(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var i=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),i=!0;if(i)return{type:30,start:parseInt(SA.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(SA.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var r=parseInt(SA.apply(void 0,e),16);if(this.peekCodePoint(0)===kd&&Fd(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var n=[];Fd(t)&&n.length<6;)n.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(SA.apply(void 0,n),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Sd)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var i=this.consumeStringToken(this.consumeCodePoint());return 0===i.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Sd||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),Zd)}for(;;){var r=this.consumeCodePoint();if(r===Sd||41===r)return{type:22,value:SA.apply(void 0,e)};if(Id(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Sd||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:SA.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Zd);if(34===r||39===r||40===r||Od(r))return this.consumeBadUrlRemnants(),Zd;if(92===r){if(!Ld(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Zd;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;Id(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===Sd)return;Ld(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var i=Math.min(5e4,e);t+=SA.apply(void 0,this._value.splice(0,i)),e-=i}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",i=0;;){var r=this._value[i];if(r===Sd||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(i)};if(10===r)return this._value.splice(0,i),$d;if(92===r){var n=this._value[i+1];n!==Sd&&void 0!==n&&(10===n?(t+=this.consumeStringSlice(i),i=-1,this._value.shift()):Ld(r,n)&&(t+=this.consumeStringSlice(i),t+=SA(this.consumeEscapedCodePoint()),i=-1))}i++}},e.prototype.consumeNumber=function(){var e=[],t=4,i=this.peekCodePoint(0);for(i!==Ed&&i!==kd||e.push(this.consumeCodePoint());Td(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===i&&Td(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;Td(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),r=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===i||101===i)&&((r===Ed||r===kd)&&Td(n)||Td(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;Td(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Nd(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],i=e[1],r=this.peekCodePoint(0),n=this.peekCodePoint(1),s=this.peekCodePoint(2);return jd(r,n,s)?{type:15,number:t,flags:i,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:t,flags:i}):{type:17,number:t,flags:i}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Fd(e)){for(var t=SA(e);Fd(this.peekCodePoint(0))&&t.length<6;)t+=SA(this.consumeCodePoint());Id(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(t,16);return 0===i||function(e){return e>=55296&&e<=57343}(i)||i>1114111?65533:i}return e===Sd?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(Rd(t))e+=SA(t);else{if(!Ld(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=SA(this.consumeEscapedCodePoint())}}},e}(),up=function(){function e(e){this._tokens=e}return e.create=function(t){var i=new lp;return i.write(t),new e(i.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},i=this.consumeToken();;){if(32===i.type||vp(i,e))return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue()),i=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var i=this.consumeToken();if(32===i.type||3===i.type)return t;this.reconsumeToken(i),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?ap:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),cp=function(e){return 15===e.type},hp=function(e){return 17===e.type},Ap=function(e){return 20===e.type},dp=function(e){return 0===e.type},pp=function(e,t){return Ap(e)&&e.value===t},fp=function(e){return 31!==e.type},gp=function(e){return 31!==e.type&&4!==e.type},mp=function(e){var t=[],i=[];return e.forEach((function(e){if(4===e.type){if(0===i.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(i),void(i=[])}31!==e.type&&i.push(e)})),i.length&&t.push(i),t},vp=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},_p=function(e){return 17===e.type||15===e.type},yp=function(e){return 16===e.type||_p(e)},bp=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},wp={type:17,number:0,flags:4},xp={type:16,number:50,flags:4},Bp={type:16,number:100,flags:4},Pp=function(e,t,i){var r=e[0],n=e[1];return[Cp(r,t),Cp(void 0!==n?n:r,i)]},Cp=function(e,t){if(16===e.type)return e.number/100*t;if(cp(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},Mp="grad",kp="turn",Ep=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case Mp:return Math.PI/200*t.number;case"rad":return t.number;case kp:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},Sp=function(e){return 15===e.type&&("deg"===e.unit||e.unit===Mp||"rad"===e.unit||e.unit===kp)},Tp=function(e){switch(e.filter(Ap).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[wp,wp];case"to top":case"bottom":return Fp(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[wp,Bp];case"to right":case"left":return Fp(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Bp,Bp];case"to bottom":case"top":return Fp(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Bp,wp];case"to left":case"right":return Fp(270)}return 0},Fp=function(e){return Math.PI*e/180},Ip=function(e,t){if(18===t.type){var i=Vp[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return i(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),n=t.value.substring(1,2),s=t.value.substring(2,3);return Op(parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16),1)}if(4===t.value.length){r=t.value.substring(0,1),n=t.value.substring(1,2),s=t.value.substring(2,3);var o=t.value.substring(3,4);return Op(parseInt(r+r,16),parseInt(n+n,16),parseInt(s+s,16),parseInt(o+o,16)/255)}if(6===t.value.length){r=t.value.substring(0,2),n=t.value.substring(2,4),s=t.value.substring(4,6);return Op(parseInt(r,16),parseInt(n,16),parseInt(s,16),1)}if(8===t.value.length){r=t.value.substring(0,2),n=t.value.substring(2,4),s=t.value.substring(4,6),o=t.value.substring(6,8);return Op(parseInt(r,16),parseInt(n,16),parseInt(s,16),parseInt(o,16)/255)}}if(20===t.type){var a=Hp[t.value.toUpperCase()];if(void 0!==a)return a}return Hp.TRANSPARENT},Dp=function(e){return!(255&e)},Rp=function(e){var t=255&e,i=255&e>>8,r=255&e>>16,n=255&e>>24;return t<255?"rgba("+n+","+r+","+i+","+t/255+")":"rgb("+n+","+r+","+i+")"},Op=function(e,t,i,r){return(e<<24|t<<16|i<<8|Math.round(255*r))>>>0},Lp=function(e,t){if(17===e.type)return e.number;if(16===e.type){var i=3===t?1:255;return 3===t?e.number/100*i:Math.round(e.number/100*i)}return 0},jp=function(e,t){var i=t.filter(gp);if(3===i.length){var r=i.map(Lp),n=r[0],s=r[1],o=r[2];return Op(n,s,o,1)}if(4===i.length){var a=i.map(Lp),l=(n=a[0],s=a[1],o=a[2],a[3]);return Op(n,s,o,l)}return 0};function Up(e,t,i){return i<0&&(i+=1),i>=1&&(i-=1),i<1/6?(t-e)*i*6+e:i<.5?t:i<2/3?6*(t-e)*(2/3-i)+e:e}var Np=function(e,t){var i=t.filter(gp),r=i[0],n=i[1],s=i[2],o=i[3],a=(17===r.type?Fp(r.number):Ep(e,r))/(2*Math.PI),l=yp(n)?n.number/100:0,u=yp(s)?s.number/100:0,c=void 0!==o&&yp(o)?Cp(o,1):1;if(0===l)return Op(255*u,255*u,255*u,1);var h=u<=.5?u*(l+1):u+l-u*l,A=2*u-h,d=Up(A,h,a+1/3),p=Up(A,h,a),f=Up(A,h,a-1/3);return Op(255*d,255*p,255*f,c)},Vp={hsl:Np,hsla:Np,rgb:jp,rgba:jp},Qp=function(e,t){return Ip(e,up.create(t).parseComponentValue())},Hp={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Gp={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Ap(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},zp={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Wp=function(e,t){var i=Ip(e,t[0]),r=t[1];return r&&yp(r)?{color:i,stop:r}:{color:i,stop:null}},Kp=function(e,t){var i=e[0],r=e[e.length-1];null===i.stop&&(i.stop=wp),null===r.stop&&(r.stop=Bp);for(var n=[],s=0,o=0;o<e.length;o++){var a=e[o].stop;if(null!==a){var l=Cp(a,t);l>s?n.push(l):n.push(s),s=l}else n.push(null)}var u=null;for(o=0;o<n.length;o++){var c=n[o];if(null===c)null===u&&(u=o);else if(null!==u){for(var h=o-u,A=(c-n[u-1])/(h+1),d=1;d<=h;d++)n[u+d-1]=A*d;u=null}}return e.map((function(e,i){return{color:e.color,stop:Math.max(Math.min(1,n[i]/t),0)}}))},Xp=function(e,t,i){var r="number"==typeof e?e:function(e,t,i){var r=t/2,n=i/2,s=Cp(e[0],t)-r,o=n-Cp(e[1],i);return(Math.atan2(o,s)+2*Math.PI)%(2*Math.PI)}(e,t,i),n=Math.abs(t*Math.sin(r))+Math.abs(i*Math.cos(r)),s=t/2,o=i/2,a=n/2,l=Math.sin(r-Math.PI/2)*a,u=Math.cos(r-Math.PI/2)*a;return[n,s-u,s+u,o-l,o+l]},qp=function(e,t){return Math.sqrt(e*e+t*t)},Yp=function(e,t,i,r,n){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var s=t[0],o=t[1],a=qp(i-s,r-o);return(n?a<e.optimumDistance:a>e.optimumDistance)?{optimumCorner:t,optimumDistance:a}:e}),{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Jp=function(e,t){var i=Fp(180),r=[];return mp(t).forEach((function(t,n){if(0===n){var s=t[0];if(20===s.type&&-1!==["top","left","right","bottom"].indexOf(s.value))return void(i=Tp(t));if(Sp(s))return void(i=(Ep(e,s)+Fp(270))%Fp(360))}var o=Wp(e,t);r.push(o)})),{angle:i,stops:r,type:1}},Zp="closest-side",$p="farthest-side",ef="closest-corner",tf="farthest-corner",rf="circle",nf="ellipse",sf="cover",of="contain",af=function(e,t){var i=0,r=3,n=[],s=[];return mp(t).forEach((function(t,o){var a=!0;if(0===o?a=t.reduce((function(e,t){if(Ap(t))switch(t.value){case"center":return s.push(xp),!1;case"top":case"left":return s.push(wp),!1;case"right":case"bottom":return s.push(Bp),!1}else if(yp(t)||_p(t))return s.push(t),!1;return e}),a):1===o&&(a=t.reduce((function(e,t){if(Ap(t))switch(t.value){case rf:return i=0,!1;case nf:return i=1,!1;case of:case Zp:return r=0,!1;case $p:return r=1,!1;case ef:return r=2,!1;case sf:case tf:return r=3,!1}else if(_p(t)||yp(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),a)),a){var l=Wp(e,t);n.push(l)}})),{size:r,shape:i,stops:n,position:s,type:2}},lf=function(e,t){if(22===t.type){var i={url:t.value,type:0};return e.cache.addImage(t.value),i}if(18===t.type){var r=cf[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)};var uf,cf={"linear-gradient":function(e,t){var i=Fp(180),r=[];return mp(t).forEach((function(t,n){if(0===n){var s=t[0];if(20===s.type&&"to"===s.value)return void(i=Tp(t));if(Sp(s))return void(i=Ep(e,s))}var o=Wp(e,t);r.push(o)})),{angle:i,stops:r,type:1}},"-moz-linear-gradient":Jp,"-ms-linear-gradient":Jp,"-o-linear-gradient":Jp,"-webkit-linear-gradient":Jp,"radial-gradient":function(e,t){var i=0,r=3,n=[],s=[];return mp(t).forEach((function(t,o){var a=!0;if(0===o){var l=!1;a=t.reduce((function(e,t){if(l)if(Ap(t))switch(t.value){case"center":return s.push(xp),e;case"top":case"left":return s.push(wp),e;case"right":case"bottom":return s.push(Bp),e}else(yp(t)||_p(t))&&s.push(t);else if(Ap(t))switch(t.value){case rf:return i=0,!1;case nf:return i=1,!1;case"at":return l=!0,!1;case Zp:return r=0,!1;case sf:case $p:return r=1,!1;case of:case ef:return r=2,!1;case tf:return r=3,!1}else if(_p(t)||yp(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),a)}if(a){var u=Wp(e,t);n.push(u)}})),{size:r,shape:i,stops:n,position:s,type:2}},"-moz-radial-gradient":af,"-ms-radial-gradient":af,"-o-radial-gradient":af,"-webkit-radial-gradient":af,"-webkit-gradient":function(e,t){var i=Fp(180),r=[],n=1;return mp(t).forEach((function(t,i){var s=t[0];if(0===i){if(Ap(s)&&"linear"===s.value)return void(n=1);if(Ap(s)&&"radial"===s.value)return void(n=2)}if(18===s.type)if("from"===s.name){var o=Ip(e,s.values[0]);r.push({stop:wp,color:o})}else if("to"===s.name){o=Ip(e,s.values[0]);r.push({stop:Bp,color:o})}else if("color-stop"===s.name){var a=s.values.filter(gp);if(2===a.length){o=Ip(e,a[1]);var l=a[0];hp(l)&&r.push({stop:{type:16,number:100*l.number,flags:l.flags},color:o})}}})),1===n?{angle:(i+Fp(180))%Fp(360),stops:r,type:n}:{size:3,shape:0,stops:r,position:[],type:n}}},hf={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var i=t[0];return 20===i.type&&"none"===i.value?[]:t.filter((function(e){return gp(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!cf[e.name])}(e)})).map((function(t){return lf(e,t)}))}},Af={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(Ap(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},df={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return mp(t).map((function(e){return e.filter(yp)})).map(bp)}},pf={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return mp(t).map((function(e){return e.filter(Ap).map((function(e){return e.value})).join(" ")})).map(ff)}},ff=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(uf||(uf={}));var gf,mf={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return mp(t).map((function(e){return e.filter(vf)}))}},vf=function(e){return Ap(e)||yp(e)},_f=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},yf=_f("top"),bf=_f("right"),wf=_f("bottom"),xf=_f("left"),Bf=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return bp(t.filter(yp))}}},Pf=Bf("top-left"),Cf=Bf("top-right"),Mf=Bf("bottom-right"),kf=Bf("bottom-left"),Ef=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Sf=Ef("top"),Tf=Ef("right"),Ff=Ef("bottom"),If=Ef("left"),Df=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return cp(t)?t.number:0}}},Rf=Df("top"),Of=Df("right"),Lf=Df("bottom"),jf=Df("left"),Uf={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Nf={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},Vf={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(Ap).reduce((function(e,t){return e|Qf(t.value)}),0)}},Qf=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Hf={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Gf={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(gf||(gf={}));var zf,Wf={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?gf.STRICT:gf.NORMAL}},Kf={name:"line-height",initialValue:"normal",prefix:!1,type:4},Xf=function(e,t){return Ap(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:yp(e)?Cp(e,t):t},qf={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:lf(e,t)}},Yf={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},Jf={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},Zf=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},$f=Zf("top"),eg=Zf("right"),tg=Zf("bottom"),ig=Zf("left"),rg={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(Ap).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},ng={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},sg=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},og=sg("top"),ag=sg("right"),lg=sg("bottom"),ug=sg("left"),cg={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},hg={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Ag={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&pp(t[0],"none")?[]:mp(t).map((function(t){for(var i={color:Hp.TRANSPARENT,offsetX:wp,offsetY:wp,blur:wp},r=0,n=0;n<t.length;n++){var s=t[n];_p(s)?(0===r?i.offsetX=s:1===r?i.offsetY=s:i.blur=s,r++):i.color=Ip(e,s)}return i}))}},dg={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},pg={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var i=fg[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return i(t.values)}return null}},fg={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),i=t[0],r=t[1];t[2],t[3];var n=t[4],s=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],a=t[13];return t[14],t[15],16===t.length?[i,r,n,s,o,a]:null}},gg={type:16,number:50,flags:4},mg=[gg,gg],vg={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var i=t.filter(yp);return 2!==i.length?mg:[i[0],i[1]]}},_g={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(zf||(zf={}));for(var yg={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return zf.BREAK_ALL;case"keep-all":return zf.KEEP_ALL;default:return zf.NORMAL}}},bg={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(hp(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},wg=function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")},xg={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return hp(t)?t.number:1}},Bg={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Pg={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(Ap).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},Cg={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var i=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:i.push(e.value);break;case 17:i.push(e.number.toString());break;case 4:r.push(i.join(" ")),i.length=0}})),i.length&&r.push(i.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},Mg={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},kg={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return hp(t)?t.number:Ap(t)&&"bold"===t.value?700:400}},Eg={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(Ap).map((function(e){return e.value}))}},Sg={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},Tg=function(e,t){return 0!==(e&t)},Fg={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var i=t[0];return 20===i.type&&"none"===i.value?[]:t}},Ig={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var i=t[0];if(20===i.type&&"none"===i.value)return null;for(var r=[],n=t.filter(fp),s=0;s<n.length;s++){var o=n[s],a=n[s+1];if(20===o.type){var l=a&&hp(a)?a.number:1;r.push({counter:o.value,increment:l})}}return r}},Dg={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var i=[],r=t.filter(fp),n=0;n<r.length;n++){var s=r[n],o=r[n+1];if(Ap(s)&&"none"!==s.value){var a=o&&hp(o)?o.number:0;i.push({counter:s.value,reset:a})}}return i}},Rg={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(cp).map((function(t){return wg(e,t)}))}},Og={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var i=t[0];if(20===i.type&&"none"===i.value)return null;var r=[],n=t.filter(dp);if(n.length%2!=0)return null;for(var s=0;s<n.length;s+=2){var o=n[s].value,a=n[s+1].value;r.push({open:o,close:a})}return r}},Lg=function(e,t,i){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?i?r.open:r.close:""},jg={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&pp(t[0],"none")?[]:mp(t).map((function(t){for(var i={color:255,offsetX:wp,offsetY:wp,blur:wp,spread:wp,inset:!1},r=0,n=0;n<t.length;n++){var s=t[n];pp(s,"inset")?i.inset=!0:_p(s)?(0===r?i.offsetX=s:1===r?i.offsetY=s:2===r?i.blur=s:i.spread=s,r++):i.color=Ip(e,s)}return i}))}},Ug={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var i=[];return t.filter(Ap).forEach((function(e){switch(e.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2)}})),[0,1,2].forEach((function(e){-1===i.indexOf(e)&&i.push(e)})),i}},Ng={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Vg={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return cp(t)?t.number:0}},Qg=function(){function e(e,t){var i,r;this.animationDuration=zg(e,Rg,t.animationDuration),this.backgroundClip=zg(e,Gp,t.backgroundClip),this.backgroundColor=zg(e,zp,t.backgroundColor),this.backgroundImage=zg(e,hf,t.backgroundImage),this.backgroundOrigin=zg(e,Af,t.backgroundOrigin),this.backgroundPosition=zg(e,df,t.backgroundPosition),this.backgroundRepeat=zg(e,pf,t.backgroundRepeat),this.backgroundSize=zg(e,mf,t.backgroundSize),this.borderTopColor=zg(e,yf,t.borderTopColor),this.borderRightColor=zg(e,bf,t.borderRightColor),this.borderBottomColor=zg(e,wf,t.borderBottomColor),this.borderLeftColor=zg(e,xf,t.borderLeftColor),this.borderTopLeftRadius=zg(e,Pf,t.borderTopLeftRadius),this.borderTopRightRadius=zg(e,Cf,t.borderTopRightRadius),this.borderBottomRightRadius=zg(e,Mf,t.borderBottomRightRadius),this.borderBottomLeftRadius=zg(e,kf,t.borderBottomLeftRadius),this.borderTopStyle=zg(e,Sf,t.borderTopStyle),this.borderRightStyle=zg(e,Tf,t.borderRightStyle),this.borderBottomStyle=zg(e,Ff,t.borderBottomStyle),this.borderLeftStyle=zg(e,If,t.borderLeftStyle),this.borderTopWidth=zg(e,Rf,t.borderTopWidth),this.borderRightWidth=zg(e,Of,t.borderRightWidth),this.borderBottomWidth=zg(e,Lf,t.borderBottomWidth),this.borderLeftWidth=zg(e,jf,t.borderLeftWidth),this.boxShadow=zg(e,jg,t.boxShadow),this.color=zg(e,Uf,t.color),this.direction=zg(e,Nf,t.direction),this.display=zg(e,Vf,t.display),this.float=zg(e,Hf,t.cssFloat),this.fontFamily=zg(e,Cg,t.fontFamily),this.fontSize=zg(e,Mg,t.fontSize),this.fontStyle=zg(e,Sg,t.fontStyle),this.fontVariant=zg(e,Eg,t.fontVariant),this.fontWeight=zg(e,kg,t.fontWeight),this.letterSpacing=zg(e,Gf,t.letterSpacing),this.lineBreak=zg(e,Wf,t.lineBreak),this.lineHeight=zg(e,Kf,t.lineHeight),this.listStyleImage=zg(e,qf,t.listStyleImage),this.listStylePosition=zg(e,Yf,t.listStylePosition),this.listStyleType=zg(e,Jf,t.listStyleType),this.marginTop=zg(e,$f,t.marginTop),this.marginRight=zg(e,eg,t.marginRight),this.marginBottom=zg(e,tg,t.marginBottom),this.marginLeft=zg(e,ig,t.marginLeft),this.opacity=zg(e,xg,t.opacity);var n=zg(e,rg,t.overflow);this.overflowX=n[0],this.overflowY=n[n.length>1?1:0],this.overflowWrap=zg(e,ng,t.overflowWrap),this.paddingTop=zg(e,og,t.paddingTop),this.paddingRight=zg(e,ag,t.paddingRight),this.paddingBottom=zg(e,lg,t.paddingBottom),this.paddingLeft=zg(e,ug,t.paddingLeft),this.paintOrder=zg(e,Ug,t.paintOrder),this.position=zg(e,hg,t.position),this.textAlign=zg(e,cg,t.textAlign),this.textDecorationColor=zg(e,Bg,null!==(i=t.textDecorationColor)&&void 0!==i?i:t.color),this.textDecorationLine=zg(e,Pg,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=zg(e,Ag,t.textShadow),this.textTransform=zg(e,dg,t.textTransform),this.transform=zg(e,pg,t.transform),this.transformOrigin=zg(e,vg,t.transformOrigin),this.visibility=zg(e,_g,t.visibility),this.webkitTextStrokeColor=zg(e,Ng,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=zg(e,Vg,t.webkitTextStrokeWidth),this.wordBreak=zg(e,yg,t.wordBreak),this.zIndex=zg(e,bg,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return Dp(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return Tg(this.display,4)||Tg(this.display,33554432)||Tg(this.display,268435456)||Tg(this.display,536870912)||Tg(this.display,67108864)||Tg(this.display,134217728)},e}(),Hg=function(e,t){this.content=zg(e,Fg,t.content),this.quotes=zg(e,Og,t.quotes)},Gg=function(e,t){this.counterIncrement=zg(e,Ig,t.counterIncrement),this.counterReset=zg(e,Dg,t.counterReset)},zg=function(e,t,i){var r=new lp,n=null!=i?i.toString():t.initialValue;r.write(n);var s=new up(r.read());switch(t.type){case 2:var o=s.parseComponentValue();return t.parse(e,Ap(o)?o.value:t.initialValue);case 0:return t.parse(e,s.parseComponentValue());case 1:return t.parse(e,s.parseComponentValues());case 4:return s.parseComponentValue();case 3:switch(t.format){case"angle":return Ep(e,s.parseComponentValue());case"color":return Ip(e,s.parseComponentValue());case"image":return lf(e,s.parseComponentValue());case"length":var a=s.parseComponentValue();return _p(a)?a:wp;case"length-percentage":var l=s.parseComponentValue();return yp(l)?l:wp;case"time":return wg(e,s.parseComponentValue())}}},Wg=function(e,t){var i=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===i||t===i},Kg=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Wg(t,3),this.styles=new Qg(e,window.getComputedStyle(t,null)),Jm(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=kA(this.context,t),Wg(t,4)&&(this.flags|=16)},Xg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qg="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Yg=0;Yg<64;Yg++)qg[Xg.charCodeAt(Yg)]=Yg;for(var Jg=function(e,t,i){return e.slice?e.slice(t,i):new Uint16Array(Array.prototype.slice.call(e,t,i))},Zg=function(){function e(e,t,i,r,n,s){this.initialValue=e,this.errorValue=t,this.highStart=i,this.highValueIndex=r,this.index=n,this.data=s}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),$g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",em="undefined"==typeof Uint8Array?[]:new Uint8Array(256),tm=0;tm<64;tm++)em[$g.charCodeAt(tm)]=tm;var im,rm=8,nm=9,sm=11,om=12,am=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var i=e.length;if(!i)return"";for(var r=[],n=-1,s="";++n<i;){var o=e[n];o<=65535?r.push(o):(o-=65536,r.push(55296+(o>>10),o%1024+56320)),(n+1===i||r.length>16384)&&(s+=String.fromCharCode.apply(String,r),r.length=0)}return s},lm=function(e){var t,i,r,n=function(e){var t,i,r,n,s,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);var u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(o):new Array(o),c=Array.isArray(u)?u:new Uint8Array(u);for(t=0;t<a;t+=4)i=qg[e.charCodeAt(t)],r=qg[e.charCodeAt(t+1)],n=qg[e.charCodeAt(t+2)],s=qg[e.charCodeAt(t+3)],c[l++]=i<<2|r>>4,c[l++]=(15&r)<<4|n>>2,c[l++]=(3&n)<<6|63&s;return u}(e),s=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=4)i.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return i}(n):new Uint32Array(n),o=Array.isArray(n)?function(e){for(var t=e.length,i=[],r=0;r<t;r+=2)i.push(e[r+1]<<8|e[r]);return i}(n):new Uint16Array(n),a=Jg(o,12,s[4]/2),l=2===s[5]?Jg(o,(24+s[4])/2):(t=s,i=Math.ceil((24+s[4])/4),t.slice?t.slice(i,r):new Uint32Array(Array.prototype.slice.call(t,i,r)));return new Zg(s[0],s[1],s[2],s[3],a,l)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAg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AAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAA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AAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),um="×",cm=function(e){return lm.get(e)},hm=function(e,t,i){var r=i-2,n=t[r],s=t[i-1],o=t[i];if(2===s&&3===o)return um;if(2===s||3===s||4===s)return"÷";if(2===o||3===o||4===o)return"÷";if(s===rm&&-1!==[rm,nm,sm,om].indexOf(o))return um;if(!(s!==sm&&s!==nm||o!==nm&&10!==o))return um;if((s===om||10===s)&&10===o)return um;if(13===o||5===o)return um;if(7===o)return um;if(1===s)return um;if(13===s&&14===o){for(;5===n;)n=t[--r];if(14===n)return um}if(15===s&&15===o){for(var a=0;15===n;)a++,n=t[--r];if(a%2==0)return um}return"÷"},Am=function(e){var t=function(e){for(var t=[],i=0,r=e.length;i<r;){var n=e.charCodeAt(i++);if(n>=55296&&n<=56319&&i<r){var s=e.charCodeAt(i++);56320==(64512&s)?t.push(((1023&n)<<10)+(1023&s)+65536):(t.push(n),i--)}else t.push(n)}return t}(e),i=t.length,r=0,n=0,s=t.map(cm);return{next:function(){if(r>=i)return{done:!0,value:null};for(var e=um;r<i&&(e=hm(0,s,++r))===um;);if(e!==um||r===i){var o=am.apply(null,t.slice(n,r));return n=r,{value:o,done:!1}}return{done:!0,value:null}}}},dm=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},pm=function(e,t,i,r,n){var s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return o.setAttributeNS(null,"width",e.toString()),o.setAttributeNS(null,"height",t.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",i.toString()),a.setAttributeNS(null,"y",r.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(n),o},fm=function(e){return new Promise((function(t,i){var r=new Image;r.onload=function(){return t(r)},r.onerror=i,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},gm={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var i=e.createElement("boundtest");i.style.height="123px",i.style.display="block",e.body.appendChild(i),t.selectNode(i);var r=t.getBoundingClientRect(),n=Math.round(r.height);if(e.body.removeChild(i),123===n)return!0}}return!1}(document);return Object.defineProperty(gm,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=gm.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var i=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=t.firstChild,n=EA(r.data).map((function(e){return SA(e)})),s=0,o={},a=n.every((function(e,t){i.setStart(r,s),i.setEnd(r,s+e.length);var n=i.getBoundingClientRect();s+=e.length;var a=n.x>o.x||n.y>o.y;return o=n,0===t||a}));return e.body.removeChild(t),a}(document);return Object.defineProperty(gm,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,i=e.createElement("canvas"),r=i.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),i.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(gm,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),i=100;t.width=i,t.height=i;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,i,i);var n=new Image,s=t.toDataURL();n.src=s;var o=pm(i,i,0,0,n);return r.fillStyle="red",r.fillRect(0,0,i,i),fm(o).then((function(t){r.drawImage(t,0,0);var n=r.getImageData(0,0,i,i).data;r.fillStyle="red",r.fillRect(0,0,i,i);var o=e.createElement("div");return o.style.backgroundImage="url("+s+")",o.style.height=i+"px",dm(n)?fm(pm(i,i,0,0,o)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),dm(r.getImageData(0,0,i,i).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(gm,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(gm,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(gm,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(gm,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(gm,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},mm=function(e,t){this.text=e,this.bounds=t},vm=function(e,t){var i=t.ownerDocument;if(i){var r=i.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var n=t.parentNode;if(n){n.replaceChild(r,t);var s=kA(e,r);return r.firstChild&&n.replaceChild(r.firstChild,r),s}}return MA.EMPTY},_m=function(e,t,i){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var n=r.createRange();return n.setStart(e,t),n.setEnd(e,t+i),n},ym=function(e){if(gm.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,i=Am(e),r=[];!(t=i.next()).done;)t.value&&r.push(t.value.slice());return r}(e)},bm=function(e,t){return 0!==t.letterSpacing?ym(e):function(e,t){if(gm.SUPPORT_NATIVE_TEXT_SEGMENTATION){var i=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(i.segment(e)).map((function(e){return e.segment}))}return xm(e,t)}(e,t)},wm=[32,160,4961,65792,65793,4153,4241],xm=function(e,t){for(var i,r=function(e,t){var i=EA(e),r=Cd(i,t),n=r[0],s=r[1],o=r[2],a=i.length,l=0,u=0;return{next:function(){if(u>=a)return{done:!0,value:null};for(var e=dd;u<a&&(e=Pd(i,s,n,++u,o))===dd;);if(e!==dd||u===a){var t=new Md(i,e,l,u);return l=u,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),n=[],s=function(){if(i.value){var e=i.value.slice(),t=EA(e),r="";t.forEach((function(e){-1===wm.indexOf(e)?r+=SA(e):(r.length&&n.push(r),n.push(SA(e)),r="")})),r.length&&n.push(r)}};!(i=r.next()).done;)s();return n},Bm=function(e,t,i){this.text=Pm(t.data,i.textTransform),this.textBounds=function(e,t,i,r){var n=bm(t,i),s=[],o=0;return n.forEach((function(t){if(i.textDecorationLine.length||t.trim().length>0)if(gm.SUPPORT_RANGE_BOUNDS){var n=_m(r,o,t.length).getClientRects();if(n.length>1){var a=ym(t),l=0;a.forEach((function(t){s.push(new mm(t,MA.fromDOMRectList(e,_m(r,l+o,t.length).getClientRects()))),l+=t.length}))}else s.push(new mm(t,MA.fromDOMRectList(e,n)))}else{var u=r.splitText(t.length);s.push(new mm(t,vm(e,r))),r=u}else gm.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));o+=t.length})),s}(e,this.text,i,t)},Pm=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Cm,Mm);case 2:return e.toUpperCase();default:return e}},Cm=/(^|\s|:|-|\(|\))([a-z])/g,Mm=function(e,t,i){return e.length>0?t+i.toUpperCase():e},km=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.src=i.currentSrc||i.src,r.intrinsicWidth=i.naturalWidth,r.intrinsicHeight=i.naturalHeight,r.context.cache.addImage(r.src),r}return wA(t,e),t}(Kg),Em=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.canvas=i,r.intrinsicWidth=i.width,r.intrinsicHeight=i.height,r}return wA(t,e),t}(Kg),Sm=function(e){function t(t,i){var r=e.call(this,t,i)||this,n=new XMLSerializer,s=kA(t,i);return i.setAttribute("width",s.width+"px"),i.setAttribute("height",s.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(i)),r.intrinsicWidth=i.width.baseVal.value,r.intrinsicHeight=i.height.baseVal.value,r.context.cache.addImage(r.svg),r}return wA(t,e),t}(Kg),Tm=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.value=i.value,r}return wA(t,e),t}(Kg),Fm=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.start=i.start,r.reversed="boolean"==typeof i.reversed&&!0===i.reversed,r}return wA(t,e),t}(Kg),Im=[{type:15,flags:0,unit:"px",number:3}],Dm=[{type:16,flags:0,number:50}],Rm="checkbox",Om="radio",Lm="password",jm=707406591,Um=function(e){function t(t,i){var r,n=e.call(this,t,i)||this;switch(n.type=i.type.toLowerCase(),n.checked=i.checked,n.value=function(e){var t=e.type===Lm?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t}(i),n.type!==Rm&&n.type!==Om||(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=(r=n.bounds).width>r.height?new MA(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new MA(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r),n.type){case Rm:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Im;break;case Om:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=Dm}return n}return wA(t,e),t}(Kg),Nm=function(e){function t(t,i){var r=e.call(this,t,i)||this,n=i.options[i.selectedIndex||0];return r.value=n&&n.text||"",r}return wA(t,e),t}(Kg),Vm=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.value=i.value,r}return wA(t,e),t}(Kg),Qm=function(e){function t(t,i){var r=e.call(this,t,i)||this;r.src=i.src,r.width=parseInt(i.width,10)||0,r.height=parseInt(i.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){r.tree=Wm(t,i.contentWindow.document.documentElement);var n=i.contentWindow.document.documentElement?Qp(t,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):Hp.TRANSPARENT,s=i.contentWindow.document.body?Qp(t,getComputedStyle(i.contentWindow.document.body).backgroundColor):Hp.TRANSPARENT;r.backgroundColor=Dp(n)?Dp(s)?r.styles.backgroundColor:s:n}}catch(e){}return r}return wA(t,e),t}(Kg),Hm=["OL","UL","MENU"],Gm=function(e,t,i,r){for(var n=t.firstChild,s=void 0;n;n=s)if(s=n.nextSibling,qm(n)&&n.data.trim().length>0)i.textNodes.push(new Bm(e,n,i.styles));else if(Ym(n))if(hv(n)&&n.assignedNodes)n.assignedNodes().forEach((function(t){return Gm(e,t,i,r)}));else{var o=zm(e,n);o.styles.isVisible()&&(Km(n,o,r)?o.flags|=4:Xm(o.styles)&&(o.flags|=2),-1!==Hm.indexOf(n.tagName)&&(o.flags|=8),i.elements.push(o),n.slot,n.shadowRoot?Gm(e,n.shadowRoot,o,r):uv(n)||iv(n)||cv(n)||Gm(e,n,o,r))}},zm=function(e,t){return ov(t)?new km(e,t):nv(t)?new Em(e,t):iv(t)?new Sm(e,t):$m(t)?new Tm(e,t):ev(t)?new Fm(e,t):tv(t)?new Um(e,t):cv(t)?new Nm(e,t):uv(t)?new Vm(e,t):av(t)?new Qm(e,t):new Kg(e,t)},Wm=function(e,t){var i=zm(e,t);return i.flags|=4,Gm(e,t,i,i),i},Km=function(e,t,i){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||rv(e)&&i.styles.isTransparent()},Xm=function(e){return e.isPositioned()||e.isFloating()},qm=function(e){return e.nodeType===Node.TEXT_NODE},Ym=function(e){return e.nodeType===Node.ELEMENT_NODE},Jm=function(e){return Ym(e)&&void 0!==e.style&&!Zm(e)},Zm=function(e){return"object"===w(e.className)},$m=function(e){return"LI"===e.tagName},ev=function(e){return"OL"===e.tagName},tv=function(e){return"INPUT"===e.tagName},iv=function(e){return"svg"===e.tagName},rv=function(e){return"BODY"===e.tagName},nv=function(e){return"CANVAS"===e.tagName},sv=function(e){return"VIDEO"===e.tagName},ov=function(e){return"IMG"===e.tagName},av=function(e){return"IFRAME"===e.tagName},lv=function(e){return"STYLE"===e.tagName},uv=function(e){return"TEXTAREA"===e.tagName},cv=function(e){return"SELECT"===e.tagName},hv=function(e){return"SLOT"===e.tagName},Av=function(e){return e.tagName.indexOf("-")>0},dv=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,i=e.counterIncrement,r=e.counterReset,n=!0;null!==i&&i.forEach((function(e){var i=t.counters[e.counter];i&&0!==e.increment&&(n=!1,i.length||i.push(1),i[Math.max(0,i.length-1)]+=e.increment)}));var s=[];return n&&r.forEach((function(e){var i=t.counters[e.counter];s.push(e.counter),i||(i=t.counters[e.counter]=[]),i.push(e.reset)})),s},e}(),pv={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},fv={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},gv={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},mv={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},vv=function(e,t,i,r,n,s){return e<t||e>i?Mv(e,n,s.length>0):r.integers.reduce((function(t,i,n){for(;e>=i;)e-=i,t+=r.values[n];return t}),"")+s},_v=function(e,t,i,r){var n="";do{i||e--,n=r(e)+n,e/=t}while(e*t>=t);return n},yv=function(e,t,i,r,n){var s=i-t+1;return(e<0?"-":"")+(_v(Math.abs(e),s,r,(function(e){return SA(Math.floor(e%s)+t)}))+n)},bv=function(e,t,i){void 0===i&&(i=". ");var r=t.length;return _v(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+i},wv=function(e,t,i,r,n,s){if(e<-9999||e>9999)return Mv(e,4,n.length>0);var o=Math.abs(e),a=n;if(0===o)return t[0]+a;for(var l=0;o>0&&l<=4;l++){var u=o%10;0===u&&Tg(s,1)&&""!==a?a=t[u]+a:u>1||1===u&&0===l||1===u&&1===l&&Tg(s,2)||1===u&&1===l&&Tg(s,4)&&e>100||1===u&&l>1&&Tg(s,8)?a=t[u]+(l>0?i[l-1]:"")+a:1===u&&l>0&&(a=i[l-1]+a),o=Math.floor(o/10)}return(e<0?r:"")+a},xv="十百千萬",Bv="拾佰仟萬",Pv="マイナス",Cv="마이너스",Mv=function(e,t,i){var r=i?". ":"",n=i?"、":"",s=i?", ":"",o=i?" ":"";switch(t){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var a=yv(e,48,57,!0,r);return a.length<4?"0"+a:a;case 4:return bv(e,"〇一二三四五六七八九",n);case 6:return vv(e,1,3999,pv,3,r).toLowerCase();case 7:return vv(e,1,3999,pv,3,r);case 8:return yv(e,945,969,!1,r);case 9:return yv(e,97,122,!1,r);case 10:return yv(e,65,90,!1,r);case 11:return yv(e,1632,1641,!0,r);case 12:case 49:return vv(e,1,9999,fv,3,r);case 35:return vv(e,1,9999,fv,3,r).toLowerCase();case 13:return yv(e,2534,2543,!0,r);case 14:case 30:return yv(e,6112,6121,!0,r);case 15:return bv(e,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return bv(e,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return wv(e,"零一二三四五六七八九",xv,"負",n,14);case 47:return wv(e,"零壹貳參肆伍陸柒捌玖",Bv,"負",n,15);case 42:return wv(e,"零一二三四五六七八九",xv,"负",n,14);case 41:return wv(e,"零壹贰叁肆伍陆柒捌玖",Bv,"负",n,15);case 26:return wv(e,"〇一二三四五六七八九","十百千万",Pv,n,0);case 25:return wv(e,"零壱弐参四伍六七八九","拾百千万",Pv,n,7);case 31:return wv(e,"영일이삼사오육칠팔구","십백천만",Cv,s,7);case 33:return wv(e,"零一二三四五六七八九","十百千萬",Cv,s,0);case 32:return wv(e,"零壹貳參四五六七八九","拾百千",Cv,s,7);case 18:return yv(e,2406,2415,!0,r);case 20:return vv(e,1,19999,mv,3,r);case 21:return yv(e,2790,2799,!0,r);case 22:return yv(e,2662,2671,!0,r);case 22:return vv(e,1,10999,gv,3,r);case 23:return bv(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return bv(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return yv(e,3302,3311,!0,r);case 28:return bv(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return bv(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return yv(e,3792,3801,!0,r);case 37:return yv(e,6160,6169,!0,r);case 38:return yv(e,4160,4169,!0,r);case 39:return yv(e,2918,2927,!0,r);case 40:return yv(e,1776,1785,!0,r);case 43:return yv(e,3046,3055,!0,r);case 44:return yv(e,3174,3183,!0,r);case 45:return yv(e,3664,3673,!0,r);case 46:return yv(e,3872,3881,!0,r);default:return yv(e,48,57,!0,r)}},kv="data-html2canvas-ignore",Ev=function(){function e(e,t,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=t,this.counters=new dv,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var i=this,r=Tv(e,t);if(!r.contentWindow)return Promise.reject("Unable to find iframe window");var n=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,o=r.contentWindow,a=o.document,l=Dv(r).then((function(){return BA(i,void 0,void 0,(function(){var e,i;return PA(this,(function(n){switch(n.label){case 0:return this.scrolledElements.forEach(Uv),o&&(o.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||o.scrollY===t.top&&o.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(i=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:n.sent(),n.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Iv(a)]:[3,4];case 3:n.sent(),n.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(a,i)})).then((function(){return r}))]:[2,r]}}))}))}));return a.open(),a.write(Lv(document.doctype)+"<html></html>"),jv(this.referenceElement.ownerDocument,n,s),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},e.prototype.createElementClone=function(e){if(Wg(e,2),nv(e))return this.createCanvasClone(e);if(sv(e))return this.createVideoClone(e);if(lv(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return ov(t)&&(ov(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Av(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return Ov(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var i=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),r=e.cloneNode(!1);return r.textContent=i,r}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var i=e.ownerDocument.createElement("img");try{return i.src=e.toDataURL(),i}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var n=e.getContext("2d"),s=r.getContext("2d");if(s)if(!this.options.allowTaint&&n)s.putImageData(n.getImageData(0,0,e.width,e.height),0,0);else{var o=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(o){var a=o.getContextAttributes();!1===(null==a?void 0:a.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return r}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var i=t.getContext("2d");try{return i&&(i.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||i.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,i){Ym(t)&&(function(e){return"SCRIPT"===e.tagName}(t)||t.hasAttribute(kv)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Ym(t)&&lv(t)||e.appendChild(this.cloneNode(t,i))},e.prototype.cloneChildNodes=function(e,t,i){for(var r=this,n=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;n;n=n.nextSibling)if(Ym(n)&&hv(n)&&"function"==typeof n.assignedNodes){var s=n.assignedNodes();s.length&&s.forEach((function(e){return r.appendChildNode(t,e,i)}))}else this.appendChildNode(t,n,i)},e.prototype.cloneNode=function(e,t){if(qm(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var i=e.ownerDocument.defaultView;if(i&&Ym(e)&&(Jm(e)||Zm(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var n=i.getComputedStyle(e),s=i.getComputedStyle(e,":before"),o=i.getComputedStyle(e,":after");this.referenceElement===e&&Jm(r)&&(this.clonedReferenceElement=r),rv(r)&&Hv(r);var a=this.counters.parse(new Gg(this.context,n)),l=this.resolvePseudoContent(e,r,s,im.BEFORE);Av(e)&&(t=!0),sv(e)||this.cloneChildNodes(e,r,t),l&&r.insertBefore(l,r.firstChild);var u=this.resolvePseudoContent(e,r,o,im.AFTER);return u&&r.appendChild(u),this.counters.pop(a),(n&&(this.options.copyStyles||Zm(e))&&!av(e)||t)&&Ov(n,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(uv(e)||cv(e))&&(uv(r)||cv(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,i,r){var n=this;if(i){var s=i.content,o=t.ownerDocument;if(o&&s&&"none"!==s&&"-moz-alt-content"!==s&&"none"!==i.display){this.counters.parse(new Gg(this.context,i));var a=new Hg(this.context,i),l=o.createElement("html2canvaspseudoelement");Ov(i,l),a.content.forEach((function(t){if(0===t.type)l.appendChild(o.createTextNode(t.value));else if(22===t.type){var i=o.createElement("img");i.src=t.value,i.style.opacity="1",l.appendChild(i)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter(Ap);r.length&&l.appendChild(o.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var s=t.values.filter(gp),u=s[0],c=s[1];if(u&&Ap(u)){var h=n.counters.getCounterValue(u.value),A=c&&Ap(c)?Jf.parse(n.context,c.value):3;l.appendChild(o.createTextNode(Mv(h,A,!1)))}}else if("counters"===t.name){var d=t.values.filter(gp),p=(u=d[0],d[1]);c=d[2];if(u&&Ap(u)){var f=n.counters.getCounterValues(u.value),g=c&&Ap(c)?Jf.parse(n.context,c.value):3,m=p&&0===p.type?p.value:"",v=f.map((function(e){return Mv(e,g,!1)})).join(m);l.appendChild(o.createTextNode(v))}}}else if(20===t.type)switch(t.value){case"open-quote":l.appendChild(o.createTextNode(Lg(a.quotes,n.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(Lg(a.quotes,--n.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(t.value))}})),l.className=Nv+" "+Vv;var u=r===im.BEFORE?" "+Nv:" "+Vv;return Zm(t)?t.className.baseValue+=u:t.className+=u,l}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(im||(im={}));var Sv,Tv=function(e,t){var i=e.createElement("iframe");return i.className="html2canvas-container",i.style.visibility="hidden",i.style.position="fixed",i.style.left="-10000px",i.style.top="0px",i.style.border="0",i.width=t.width.toString(),i.height=t.height.toString(),i.scrolling="no",i.setAttribute(kv,"true"),e.body.appendChild(i),i},Fv=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},Iv=function(e){return Promise.all([].slice.call(e.images,0).map(Fv))},Dv=function(e){return new Promise((function(t,i){var r=e.contentWindow;if(!r)return i("No window assigned for iframe");var n=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var i=setInterval((function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(i),t(e))}),50)}}))},Rv=["all","d","content"],Ov=function(e,t){for(var i=e.length-1;i>=0;i--){var r=e.item(i);-1===Rv.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},Lv=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},jv=function(e,t,i){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||i!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,i)},Uv=function(e){var t=e[0],i=e[1],r=e[2];t.scrollLeft=i,t.scrollTop=r},Nv="___html2canvas___pseudoelement_before",Vv="___html2canvas___pseudoelement_after",Qv='{\n content: "" !important;\n display: none !important;\n}',Hv=function(e){Gv(e,"."+Nv+":before"+Qv+"\n ."+Vv+":after"+Qv)},Gv=function(e,t){var i=e.ownerDocument;if(i){var r=i.createElement("style");r.textContent=t,e.appendChild(r)}},zv=function(){function e(){}return e.getOrigin=function(t){var i=e._link;return i?(i.href=t,i.href=i.href,i.protocol+i.hostname+i.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Wv=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:$v(e)||Yv(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s=this;return PA(this,(function(o){switch(o.label){case 0:return t=zv.isSameOrigin(e),i=!Jv(e)&&!0===this._options.useCORS&&gm.SUPPORT_CORS_IMAGES&&!t,r=!Jv(e)&&!t&&!$v(e)&&"string"==typeof this._options.proxy&&gm.SUPPORT_CORS_XHR&&!i,t||!1!==this._options.allowTaint||Jv(e)||$v(e)||r||i?(n=e,r?[4,this.proxy(n)]:[3,2]):[2];case 1:n=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Zv(n)||i)&&(r.crossOrigin="anonymous"),r.src=n,!0===r.complete&&setTimeout((function(){return e(r)}),500),s._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+s._options.imageTimeout+"ms) loading image")}),s._options.imageTimeout)}))];case 3:return[2,o.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(n,s){var o=gm.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(200===a.status)if("text"===o)n(a.response);else{var e=new FileReader;e.addEventListener("load",(function(){return n(e.result)}),!1),e.addEventListener("error",(function(e){return s(e)}),!1),e.readAsDataURL(a.response)}else s("Failed to proxy resource "+r+" with status code "+a.status)},a.onerror=s;var l=i.indexOf("?")>-1?"&":"?";if(a.open("GET",""+i+l+"url="+encodeURIComponent(e)+"&responseType="+o),"text"!==o&&a instanceof XMLHttpRequest&&(a.responseType=o),t._options.imageTimeout){var u=t._options.imageTimeout;a.timeout=u,a.ontimeout=function(){return s("Timed out ("+u+"ms) proxying "+r)}}a.send()}))},e}(),Kv=/^data:image\/svg\+xml/i,Xv=/^data:image\/.*;base64,/i,qv=/^data:image\/.*/i,Yv=function(e){return gm.SUPPORT_SVG_DRAWING||!e_(e)},Jv=function(e){return qv.test(e)},Zv=function(e){return Xv.test(e)},$v=function(e){return"blob"===e.substr(0,4)},e_=function(e){return"svg"===e.substr(-3).toLowerCase()||Kv.test(e)},t_=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,i){return new e(this.x+t,this.y+i)},e}(),i_=function(e,t,i){return new t_(e.x+(t.x-e.x)*i,e.y+(t.y-e.y)*i)},r_=function(){function e(e,t,i,r){this.type=1,this.start=e,this.startControl=t,this.endControl=i,this.end=r}return e.prototype.subdivide=function(t,i){var r=i_(this.start,this.startControl,t),n=i_(this.startControl,this.endControl,t),s=i_(this.endControl,this.end,t),o=i_(r,n,t),a=i_(n,s,t),l=i_(o,a,t);return i?new e(this.start,r,o,l):new e(l,a,s,this.end)},e.prototype.add=function(t,i){return new e(this.start.add(t,i),this.startControl.add(t,i),this.endControl.add(t,i),this.end.add(t,i))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),n_=function(e){return 1===e.type},s_=function(e){var t=e.styles,i=e.bounds,r=Pp(t.borderTopLeftRadius,i.width,i.height),n=r[0],s=r[1],o=Pp(t.borderTopRightRadius,i.width,i.height),a=o[0],l=o[1],u=Pp(t.borderBottomRightRadius,i.width,i.height),c=u[0],h=u[1],A=Pp(t.borderBottomLeftRadius,i.width,i.height),d=A[0],p=A[1],f=[];f.push((n+a)/i.width),f.push((d+c)/i.width),f.push((s+p)/i.height),f.push((l+h)/i.height);var g=Math.max.apply(Math,f);g>1&&(n/=g,s/=g,a/=g,l/=g,c/=g,h/=g,d/=g,p/=g);var m=i.width-a,v=i.height-h,_=i.width-c,y=i.height-p,b=t.borderTopWidth,w=t.borderRightWidth,x=t.borderBottomWidth,B=t.borderLeftWidth,P=Cp(t.paddingTop,e.bounds.width),C=Cp(t.paddingRight,e.bounds.width),M=Cp(t.paddingBottom,e.bounds.width),k=Cp(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||s>0?o_(i.left+B/3,i.top+b/3,n-B/3,s-b/3,Sv.TOP_LEFT):new t_(i.left+B/3,i.top+b/3),this.topRightBorderDoubleOuterBox=n>0||s>0?o_(i.left+m,i.top+b/3,a-w/3,l-b/3,Sv.TOP_RIGHT):new t_(i.left+i.width-w/3,i.top+b/3),this.bottomRightBorderDoubleOuterBox=c>0||h>0?o_(i.left+_,i.top+v,c-w/3,h-x/3,Sv.BOTTOM_RIGHT):new t_(i.left+i.width-w/3,i.top+i.height-x/3),this.bottomLeftBorderDoubleOuterBox=d>0||p>0?o_(i.left+B/3,i.top+y,d-B/3,p-x/3,Sv.BOTTOM_LEFT):new t_(i.left+B/3,i.top+i.height-x/3),this.topLeftBorderDoubleInnerBox=n>0||s>0?o_(i.left+2*B/3,i.top+2*b/3,n-2*B/3,s-2*b/3,Sv.TOP_LEFT):new t_(i.left+2*B/3,i.top+2*b/3),this.topRightBorderDoubleInnerBox=n>0||s>0?o_(i.left+m,i.top+2*b/3,a-2*w/3,l-2*b/3,Sv.TOP_RIGHT):new t_(i.left+i.width-2*w/3,i.top+2*b/3),this.bottomRightBorderDoubleInnerBox=c>0||h>0?o_(i.left+_,i.top+v,c-2*w/3,h-2*x/3,Sv.BOTTOM_RIGHT):new t_(i.left+i.width-2*w/3,i.top+i.height-2*x/3),this.bottomLeftBorderDoubleInnerBox=d>0||p>0?o_(i.left+2*B/3,i.top+y,d-2*B/3,p-2*x/3,Sv.BOTTOM_LEFT):new t_(i.left+2*B/3,i.top+i.height-2*x/3),this.topLeftBorderStroke=n>0||s>0?o_(i.left+B/2,i.top+b/2,n-B/2,s-b/2,Sv.TOP_LEFT):new t_(i.left+B/2,i.top+b/2),this.topRightBorderStroke=n>0||s>0?o_(i.left+m,i.top+b/2,a-w/2,l-b/2,Sv.TOP_RIGHT):new t_(i.left+i.width-w/2,i.top+b/2),this.bottomRightBorderStroke=c>0||h>0?o_(i.left+_,i.top+v,c-w/2,h-x/2,Sv.BOTTOM_RIGHT):new t_(i.left+i.width-w/2,i.top+i.height-x/2),this.bottomLeftBorderStroke=d>0||p>0?o_(i.left+B/2,i.top+y,d-B/2,p-x/2,Sv.BOTTOM_LEFT):new t_(i.left+B/2,i.top+i.height-x/2),this.topLeftBorderBox=n>0||s>0?o_(i.left,i.top,n,s,Sv.TOP_LEFT):new t_(i.left,i.top),this.topRightBorderBox=a>0||l>0?o_(i.left+m,i.top,a,l,Sv.TOP_RIGHT):new t_(i.left+i.width,i.top),this.bottomRightBorderBox=c>0||h>0?o_(i.left+_,i.top+v,c,h,Sv.BOTTOM_RIGHT):new t_(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=d>0||p>0?o_(i.left,i.top+y,d,p,Sv.BOTTOM_LEFT):new t_(i.left,i.top+i.height),this.topLeftPaddingBox=n>0||s>0?o_(i.left+B,i.top+b,Math.max(0,n-B),Math.max(0,s-b),Sv.TOP_LEFT):new t_(i.left+B,i.top+b),this.topRightPaddingBox=a>0||l>0?o_(i.left+Math.min(m,i.width-w),i.top+b,m>i.width+w?0:Math.max(0,a-w),Math.max(0,l-b),Sv.TOP_RIGHT):new t_(i.left+i.width-w,i.top+b),this.bottomRightPaddingBox=c>0||h>0?o_(i.left+Math.min(_,i.width-B),i.top+Math.min(v,i.height-x),Math.max(0,c-w),Math.max(0,h-x),Sv.BOTTOM_RIGHT):new t_(i.left+i.width-w,i.top+i.height-x),this.bottomLeftPaddingBox=d>0||p>0?o_(i.left+B,i.top+Math.min(y,i.height-x),Math.max(0,d-B),Math.max(0,p-x),Sv.BOTTOM_LEFT):new t_(i.left+B,i.top+i.height-x),this.topLeftContentBox=n>0||s>0?o_(i.left+B+k,i.top+b+P,Math.max(0,n-(B+k)),Math.max(0,s-(b+P)),Sv.TOP_LEFT):new t_(i.left+B+k,i.top+b+P),this.topRightContentBox=a>0||l>0?o_(i.left+Math.min(m,i.width+B+k),i.top+b+P,m>i.width+B+k?0:a-B+k,l-(b+P),Sv.TOP_RIGHT):new t_(i.left+i.width-(w+C),i.top+b+P),this.bottomRightContentBox=c>0||h>0?o_(i.left+Math.min(_,i.width-(B+k)),i.top+Math.min(v,i.height+b+P),Math.max(0,c-(w+C)),h-(x+M),Sv.BOTTOM_RIGHT):new t_(i.left+i.width-(w+C),i.top+i.height-(x+M)),this.bottomLeftContentBox=d>0||p>0?o_(i.left+B+k,i.top+y,Math.max(0,d-(B+k)),p-(x+M),Sv.BOTTOM_LEFT):new t_(i.left+B+k,i.top+i.height-(x+M))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(Sv||(Sv={}));var o_=function(e,t,i,r,n){var s=(Math.sqrt(2)-1)/3*4,o=i*s,a=r*s,l=e+i,u=t+r;switch(n){case Sv.TOP_LEFT:return new r_(new t_(e,u),new t_(e,u-a),new t_(l-o,t),new t_(l,t));case Sv.TOP_RIGHT:return new r_(new t_(e,t),new t_(e+o,t),new t_(l,u-a),new t_(l,u));case Sv.BOTTOM_RIGHT:return new r_(new t_(l,t),new t_(l,t+a),new t_(e+o,u),new t_(e,u));case Sv.BOTTOM_LEFT:default:return new r_(new t_(l,u),new t_(l-o,u),new t_(e,t+a),new t_(e,t))}},a_=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},l_=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},u_=function(e,t,i){this.offsetX=e,this.offsetY=t,this.matrix=i,this.type=0,this.target=6},c_=function(e,t){this.path=e,this.target=t,this.type=1},h_=function(e){this.opacity=e,this.type=2,this.target=6},A_=function(e){return 1===e.type},d_=function(e,t){return e.length===t.length&&e.some((function(e,i){return e===t[i]}))},p_=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},f_=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new s_(this.container),this.container.styles.opacity<1&&this.effects.push(new h_(this.container.styles.opacity)),null!==this.container.styles.transform){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,n=this.container.styles.transform;this.effects.push(new u_(i,r,n))}if(0!==this.container.styles.overflowX){var s=a_(this.curves),o=l_(this.curves);d_(s,o)?this.effects.push(new c_(s,6)):(this.effects.push(new c_(s,2)),this.effects.push(new c_(o,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),i=this.parent,r=this.effects.slice(0);i;){var n=i.effects.filter((function(e){return!A_(e)}));if(t||0!==i.container.styles.position||!i.parent){if(r.unshift.apply(r,n),t=-1===[2,3].indexOf(i.container.styles.position),0!==i.container.styles.overflowX){var s=a_(i.curves),o=l_(i.curves);d_(s,o)||r.unshift(new c_(o,6))}}else r.unshift.apply(r,n);i=i.parent}return r.filter((function(t){return Tg(t.target,e)}))},e}(),g_=function(e,t,i,r){e.container.elements.forEach((function(n){var s=Tg(n.flags,4),o=Tg(n.flags,2),a=new f_(n,e);Tg(n.styles.display,2048)&&r.push(a);var l=Tg(n.flags,8)?[]:r;if(s||o){var u=s||n.styles.isPositioned()?i:t,c=new p_(a);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var h=n.styles.zIndex.order;if(h<0){var A=0;u.negativeZIndex.some((function(e,t){return h>e.element.container.styles.zIndex.order?(A=t,!1):A>0})),u.negativeZIndex.splice(A,0,c)}else if(h>0){var d=0;u.positiveZIndex.some((function(e,t){return h>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0})),u.positiveZIndex.splice(d,0,c)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?u.nonPositionedFloats.push(c):u.nonPositionedInlineLevel.push(c);g_(a,c,s?c:i,l)}else n.styles.isInlineLevel()?t.inlineLevel.push(a):t.nonInlineLevel.push(a),g_(a,t,i,l);Tg(n.flags,8)&&m_(n,l)}))},m_=function(e,t){for(var i=e instanceof Fm?e.start:1,r=e instanceof Fm&&e.reversed,n=0;n<t.length;n++){var s=t[n];s.container instanceof Tm&&"number"==typeof s.container.value&&0!==s.container.value&&(i=s.container.value),s.listValue=Mv(i,s.container.styles.listStyleType,!0),i+=r?-1:1}},v_=function(e,t){switch(t){case 0:return y_(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return y_(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return y_(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return y_(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},__=function(e,t){var i=[];return n_(e)?i.push(e.subdivide(.5,!1)):i.push(e),n_(t)?i.push(t.subdivide(.5,!0)):i.push(t),i},y_=function(e,t,i,r){var n=[];return n_(e)?n.push(e.subdivide(.5,!1)):n.push(e),n_(i)?n.push(i.subdivide(.5,!0)):n.push(i),n_(r)?n.push(r.subdivide(.5,!0).reverse()):n.push(r),n_(t)?n.push(t.subdivide(.5,!1).reverse()):n.push(t),n},b_=function(e){var t=e.bounds,i=e.styles;return t.add(i.borderLeftWidth,i.borderTopWidth,-(i.borderRightWidth+i.borderLeftWidth),-(i.borderTopWidth+i.borderBottomWidth))},w_=function(e){var t=e.styles,i=e.bounds,r=Cp(t.paddingLeft,i.width),n=Cp(t.paddingRight,i.width),s=Cp(t.paddingTop,i.width),o=Cp(t.paddingBottom,i.width);return i.add(r+t.borderLeftWidth,s+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+n),-(t.borderTopWidth+t.borderBottomWidth+s+o))},x_=function(e,t,i){var r=function(e,t){return 0===e?t.bounds:2===e?w_(t):b_(t)}(M_(e.styles.backgroundOrigin,t),e),n=function(e,t){return 0===e?t.bounds:2===e?w_(t):b_(t)}(M_(e.styles.backgroundClip,t),e),s=C_(M_(e.styles.backgroundSize,t),i,r),o=s[0],a=s[1],l=Pp(M_(e.styles.backgroundPosition,t),r.width-o,r.height-a);return[k_(M_(e.styles.backgroundRepeat,t),l,s,r,n),Math.round(r.left+l[0]),Math.round(r.top+l[1]),o,a]},B_=function(e){return Ap(e)&&e.value===uf.AUTO},P_=function(e){return"number"==typeof e},C_=function(e,t,i){var r=t[0],n=t[1],s=t[2],o=e[0],a=e[1];if(!o)return[0,0];if(yp(o)&&a&&yp(a))return[Cp(o,i.width),Cp(a,i.height)];var l=P_(s);if(Ap(o)&&(o.value===uf.CONTAIN||o.value===uf.COVER))return P_(s)?i.width/i.height<s!=(o.value===uf.COVER)?[i.width,i.width/s]:[i.height*s,i.height]:[i.width,i.height];var u=P_(r),c=P_(n),h=u||c;if(B_(o)&&(!a||B_(a)))return u&&c?[r,n]:l||h?h&&l?[u?r:n*s,c?n:r/s]:[u?r:i.width,c?n:i.height]:[i.width,i.height];if(l){var A=0,d=0;return yp(o)?A=Cp(o,i.width):yp(a)&&(d=Cp(a,i.height)),B_(o)?A=d*s:a&&!B_(a)||(d=A/s),[A,d]}var p=null,f=null;if(yp(o)?p=Cp(o,i.width):a&&yp(a)&&(f=Cp(a,i.height)),null===p||a&&!B_(a)||(f=u&&c?p/r*n:i.height),null!==f&&B_(o)&&(p=u&&c?f/n*r:i.width),null!==p&&null!==f)return[p,f];throw new Error("Unable to calculate background-size for element")},M_=function(e,t){var i=e[t];return void 0===i?e[0]:i},k_=function(e,t,i,r,n){var s=t[0],o=t[1],a=i[0],l=i[1];switch(e){case 2:return[new t_(Math.round(r.left),Math.round(r.top+o)),new t_(Math.round(r.left+r.width),Math.round(r.top+o)),new t_(Math.round(r.left+r.width),Math.round(l+r.top+o)),new t_(Math.round(r.left),Math.round(l+r.top+o))];case 3:return[new t_(Math.round(r.left+s),Math.round(r.top)),new t_(Math.round(r.left+s+a),Math.round(r.top)),new t_(Math.round(r.left+s+a),Math.round(r.height+r.top)),new t_(Math.round(r.left+s),Math.round(r.height+r.top))];case 1:return[new t_(Math.round(r.left+s),Math.round(r.top+o)),new t_(Math.round(r.left+s+a),Math.round(r.top+o)),new t_(Math.round(r.left+s+a),Math.round(r.top+o+l)),new t_(Math.round(r.left+s),Math.round(r.top+o+l))];default:return[new t_(Math.round(n.left),Math.round(n.top)),new t_(Math.round(n.left+n.width),Math.round(n.top)),new t_(Math.round(n.left+n.width),Math.round(n.height+n.top)),new t_(Math.round(n.left),Math.round(n.height+n.top))]}},E_="Hidden Text",S_=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var i=this._document.createElement("div"),r=this._document.createElement("img"),n=this._document.createElement("span"),s=this._document.body;i.style.visibility="hidden",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",s.appendChild(i),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode(E_)),i.appendChild(n),i.appendChild(r);var o=r.offsetTop-n.offsetTop+2;i.removeChild(n),i.appendChild(this._document.createTextNode(E_)),i.style.lineHeight="normal",r.style.verticalAlign="super";var a=r.offsetTop-i.offsetTop+2;return s.removeChild(i),{baseline:o,middle:a}},e.prototype.getMetrics=function(e,t){var i=e+" "+t;return void 0===this._data[i]&&(this._data[i]=this.parseMetrics(e,t)),this._data[i]},e}(),T_=function(e,t){this.context=e,this.options=t},F_=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r._activeEffects=[],r.canvas=i.canvas?i.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),i.canvas||(r.canvas.width=Math.floor(i.width*i.scale),r.canvas.height=Math.floor(i.height*i.scale),r.canvas.style.width=i.width+"px",r.canvas.style.height=i.height+"px"),r.fontMetrics=new S_(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-i.x,-i.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),r}return wA(t,e),t.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},t.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),A_(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},t.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},t.prototype.renderStack=function(e){return BA(this,void 0,void 0,(function(){return PA(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},t.prototype.renderNode=function(e){return BA(this,void 0,void 0,(function(){return PA(this,(function(t){switch(t.label){case 0:return Tg(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},t.prototype.renderTextWithLetterSpacing=function(e,t,i){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+i):ym(e.text).reduce((function(t,n){return r.ctx.fillText(n,t,e.bounds.top+i),t+r.ctx.measureText(n).width}),e.bounds.left)},t.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),i=L_(e.fontFamily).join(", "),r=cp(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,i].join(" "),i,r]},t.prototype.renderTextNode=function(e,t){return BA(this,void 0,void 0,(function(){var i,r,n,s,o,a,l,u,c=this;return PA(this,(function(h){return i=this.createFontStyle(t),r=i[0],n=i[1],s=i[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",o=this.fontMetrics.getMetrics(n,s),a=o.baseline,l=o.middle,u=t.paintOrder,e.textBounds.forEach((function(e){u.forEach((function(i){switch(i){case 0:c.ctx.fillStyle=Rp(t.color),c.renderTextWithLetterSpacing(e,t.letterSpacing,a);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(i){c.ctx.shadowColor=Rp(i.color),c.ctx.shadowOffsetX=i.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=i.offsetY.number*c.options.scale,c.ctx.shadowBlur=i.blur.number,c.renderTextWithLetterSpacing(e,t.letterSpacing,a)})),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),t.textDecorationLine.length&&(c.ctx.fillStyle=Rp(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+a),e.bounds.width,1);break;case 2:c.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:c.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+l),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(c.ctx.strokeStyle=Rp(t.webkitTextStrokeColor),c.ctx.lineWidth=t.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+a)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter"}}))})),[2]}))}))},t.prototype.renderReplacedElement=function(e,t,i){if(i&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=w_(e),n=l_(t);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},t.prototype.renderNodeContent=function(e){return BA(this,void 0,void 0,(function(){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_;return PA(this,(function(y){switch(y.label){case 0:this.applyEffects(e.getEffects(4)),i=e.container,r=e.curves,n=i.styles,s=0,o=i.textNodes,y.label=1;case 1:return s<o.length?(a=o[s],[4,this.renderTextNode(a,n)]):[3,4];case 2:y.sent(),y.label=3;case 3:return s++,[3,1];case 4:if(!(i instanceof km))return[3,8];y.label=5;case 5:return y.trys.push([5,7,,8]),[4,this.context.cache.match(i.src)];case 6:return g=y.sent(),this.renderReplacedElement(i,r,g),[3,8];case 7:return y.sent(),this.context.logger.error("Error loading image "+i.src),[3,8];case 8:if(i instanceof Em&&this.renderReplacedElement(i,r,i.canvas),!(i instanceof Sm))return[3,12];y.label=9;case 9:return y.trys.push([9,11,,12]),[4,this.context.cache.match(i.svg)];case 10:return g=y.sent(),this.renderReplacedElement(i,r,g),[3,12];case 11:return y.sent(),this.context.logger.error("Error loading svg "+i.svg.substring(0,255)),[3,12];case 12:return i instanceof Qm&&i.tree?[4,new t(this.context,{scale:this.options.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}).render(i.tree)]:[3,14];case 13:l=y.sent(),i.width&&i.height&&this.ctx.drawImage(l,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height),y.label=14;case 14:if(i instanceof Um&&(u=Math.min(i.bounds.width,i.bounds.height),i.type===Rm?i.checked&&(this.ctx.save(),this.path([new t_(i.bounds.left+.39363*u,i.bounds.top+.79*u),new t_(i.bounds.left+.16*u,i.bounds.top+.5549*u),new t_(i.bounds.left+.27347*u,i.bounds.top+.44071*u),new t_(i.bounds.left+.39694*u,i.bounds.top+.5649*u),new t_(i.bounds.left+.72983*u,i.bounds.top+.23*u),new t_(i.bounds.left+.84*u,i.bounds.top+.34085*u),new t_(i.bounds.left+.39363*u,i.bounds.top+.79*u)]),this.ctx.fillStyle=Rp(jm),this.ctx.fill(),this.ctx.restore()):i.type===Om&&i.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(i.bounds.left+u/2,i.bounds.top+u/2,u/4,0,2*Math.PI,!0),this.ctx.fillStyle=Rp(jm),this.ctx.fill(),this.ctx.restore())),I_(i)&&i.value.length){switch(c=this.createFontStyle(n),v=c[0],h=c[1],A=this.fontMetrics.getMetrics(v,h).baseline,this.ctx.font=v,this.ctx.fillStyle=Rp(n.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=R_(i.styles.textAlign),_=w_(i),d=0,i.styles.textAlign){case 1:d+=_.width/2;break;case 2:d+=_.width}p=_.add(d,0,0,-_.height/2+1),this.ctx.save(),this.path([new t_(_.left,_.top),new t_(_.left+_.width,_.top),new t_(_.left+_.width,_.top+_.height),new t_(_.left,_.top+_.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new mm(i.value,p),n.letterSpacing,A),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Tg(i.styles.display,2048))return[3,20];if(null===i.styles.listStyleImage)return[3,19];if(0!==(f=i.styles.listStyleImage).type)return[3,18];g=void 0,m=f.url,y.label=15;case 15:return y.trys.push([15,17,,18]),[4,this.context.cache.match(m)];case 16:return g=y.sent(),this.ctx.drawImage(g,i.bounds.left-(g.width+10),i.bounds.top),[3,18];case 17:return y.sent(),this.context.logger.error("Error loading list-style-image "+m),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==i.styles.listStyleType&&(v=this.createFontStyle(n)[0],this.ctx.font=v,this.ctx.fillStyle=Rp(n.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",_=new MA(i.bounds.left,i.bounds.top+Cp(i.styles.paddingTop,i.bounds.width),i.bounds.width,Xf(n.lineHeight,n.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new mm(e.listValue,_),n.letterSpacing,Xf(n.lineHeight,n.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),y.label=20;case 20:return[2]}}))}))},t.prototype.renderStackContent=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s,o,a,l,u,c,h,A,d,p,f;return PA(this,(function(g){switch(g.label){case 0:return Tg(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:g.sent(),t=0,i=e.negativeZIndex,g.label=2;case 2:return t<i.length?(f=i[t],[4,this.renderStack(f)]):[3,5];case 3:g.sent(),g.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:g.sent(),r=0,n=e.nonInlineLevel,g.label=7;case 7:return r<n.length?(f=n[r],[4,this.renderNode(f)]):[3,10];case 8:g.sent(),g.label=9;case 9:return r++,[3,7];case 10:s=0,o=e.nonPositionedFloats,g.label=11;case 11:return s<o.length?(f=o[s],[4,this.renderStack(f)]):[3,14];case 12:g.sent(),g.label=13;case 13:return s++,[3,11];case 14:a=0,l=e.nonPositionedInlineLevel,g.label=15;case 15:return a<l.length?(f=l[a],[4,this.renderStack(f)]):[3,18];case 16:g.sent(),g.label=17;case 17:return a++,[3,15];case 18:u=0,c=e.inlineLevel,g.label=19;case 19:return u<c.length?(f=c[u],[4,this.renderNode(f)]):[3,22];case 20:g.sent(),g.label=21;case 21:return u++,[3,19];case 22:h=0,A=e.zeroOrAutoZIndexOrTransformedOrOpacity,g.label=23;case 23:return h<A.length?(f=A[h],[4,this.renderStack(f)]):[3,26];case 24:g.sent(),g.label=25;case 25:return h++,[3,23];case 26:d=0,p=e.positiveZIndex,g.label=27;case 27:return d<p.length?(f=p[d],[4,this.renderStack(f)]):[3,30];case 28:g.sent(),g.label=29;case 29:return d++,[3,27];case 30:return[2]}}))}))},t.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},t.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},t.prototype.formatPath=function(e){var t=this;e.forEach((function(e,i){var r=n_(e)?e.start:e;0===i?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),n_(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},t.prototype.renderRepeat=function(e,t,i,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(i,r),this.ctx.fill(),this.ctx.translate(-i,-r)},t.prototype.resizeImage=function(e,t,i){var r;if(e.width===t&&e.height===i)return e;var n=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return n.width=Math.max(1,t),n.height=Math.max(1,i),n.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,i),n},t.prototype.renderBackgroundImage=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s,o;return PA(this,(function(a){switch(a.label){case 0:t=e.styles.backgroundImage.length-1,i=function(i){var n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E,S,T,F,I,D;return PA(this,(function(R){switch(R.label){case 0:if(0!==i.type)return[3,5];n=void 0,s=i.url,R.label=1;case 1:return R.trys.push([1,3,,4]),[4,r.context.cache.match(s)];case 2:return n=R.sent(),[3,4];case 3:return R.sent(),r.context.logger.error("Error loading background-image "+s),[3,4];case 4:return n&&(o=x_(e,t,[n.width,n.height,n.width/n.height]),_=o[0],P=o[1],C=o[2],w=o[3],x=o[4],m=r.ctx.createPattern(r.resizeImage(n,w,x),"repeat"),r.renderRepeat(_,m,P,C)),[3,6];case 5:1===i.type?(a=x_(e,t,[null,null,null]),_=a[0],P=a[1],C=a[2],w=a[3],x=a[4],l=Xp(i.angle,w,x),u=l[0],c=l[1],h=l[2],A=l[3],d=l[4],(p=document.createElement("canvas")).width=w,p.height=x,f=p.getContext("2d"),g=f.createLinearGradient(c,A,h,d),Kp(i.stops,u).forEach((function(e){return g.addColorStop(e.stop,Rp(e.color))})),f.fillStyle=g,f.fillRect(0,0,w,x),w>0&&x>0&&(m=r.ctx.createPattern(p,"repeat"),r.renderRepeat(_,m,P,C))):function(e){return 2===e.type}(i)&&(v=x_(e,t,[null,null,null]),_=v[0],y=v[1],b=v[2],w=v[3],x=v[4],B=0===i.position.length?[xp]:i.position,P=Cp(B[0],w),C=Cp(B[B.length-1],x),M=function(e,t,i,r,n){var s=0,o=0;switch(e.size){case 0:0===e.shape?s=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-n)):1===e.shape&&(s=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(i),Math.abs(i-n)));break;case 2:if(0===e.shape)s=o=Math.min(qp(t,i),qp(t,i-n),qp(t-r,i),qp(t-r,i-n));else if(1===e.shape){var a=Math.min(Math.abs(i),Math.abs(i-n))/Math.min(Math.abs(t),Math.abs(t-r)),l=Yp(r,n,t,i,!0),u=l[0],c=l[1];o=a*(s=qp(u-t,(c-i)/a))}break;case 1:0===e.shape?s=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(i),Math.abs(i-n)):1===e.shape&&(s=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(i),Math.abs(i-n)));break;case 3:if(0===e.shape)s=o=Math.max(qp(t,i),qp(t,i-n),qp(t-r,i),qp(t-r,i-n));else if(1===e.shape){a=Math.max(Math.abs(i),Math.abs(i-n))/Math.max(Math.abs(t),Math.abs(t-r));var h=Yp(r,n,t,i,!1);u=h[0],c=h[1],o=a*(s=qp(u-t,(c-i)/a))}}return Array.isArray(e.size)&&(s=Cp(e.size[0],r),o=2===e.size.length?Cp(e.size[1],n):s),[s,o]}(i,P,C,w,x),k=M[0],E=M[1],k>0&&E>0&&(S=r.ctx.createRadialGradient(y+P,b+C,0,y+P,b+C,k),Kp(i.stops,2*k).forEach((function(e){return S.addColorStop(e.stop,Rp(e.color))})),r.path(_),r.ctx.fillStyle=S,k!==E?(T=e.bounds.left+.5*e.bounds.width,F=e.bounds.top+.5*e.bounds.height,D=1/(I=E/k),r.ctx.save(),r.ctx.translate(T,F),r.ctx.transform(1,0,0,I,0,0),r.ctx.translate(-T,-F),r.ctx.fillRect(y,D*(b-F)+F,w,x*D),r.ctx.restore()):r.ctx.fill())),R.label=6;case 6:return t--,[2]}}))},r=this,n=0,s=e.styles.backgroundImage.slice(0).reverse(),a.label=1;case 1:return n<s.length?(o=s[n],[5,i(o)]):[3,4];case 2:a.sent(),a.label=3;case 3:return n++,[3,1];case 4:return[2]}}))}))},t.prototype.renderSolidBorder=function(e,t,i){return BA(this,void 0,void 0,(function(){return PA(this,(function(r){return this.path(v_(i,t)),this.ctx.fillStyle=Rp(e),this.ctx.fill(),[2]}))}))},t.prototype.renderDoubleBorder=function(e,t,i,r){return BA(this,void 0,void 0,(function(){var n,s;return PA(this,(function(o){switch(o.label){case 0:return t<3?[4,this.renderSolidBorder(e,i,r)]:[3,2];case 1:return o.sent(),[2];case 2:return n=function(e,t){switch(t){case 0:return y_(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return y_(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return y_(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return y_(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(r,i),this.path(n),this.ctx.fillStyle=Rp(e),this.ctx.fill(),s=function(e,t){switch(t){case 0:return y_(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return y_(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return y_(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return y_(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(r,i),this.path(s),this.ctx.fill(),[2]}}))}))},t.prototype.renderNodeBackgroundAndBorders=function(e){return BA(this,void 0,void 0,(function(){var t,i,r,n,s,o,a,l,u=this;return PA(this,(function(c){switch(c.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,i=!Dp(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],n=D_(M_(t.backgroundClip,0),e.curves),i||t.boxShadow.length?(this.ctx.save(),this.path(n),this.ctx.clip(),Dp(t.backgroundColor)||(this.ctx.fillStyle=Rp(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){u.ctx.save();var i,r,n,s,o,a=a_(e.curves),l=t.inset?0:1e4,c=(i=a,r=-l+(t.inset?1:-1)*t.spread.number,n=(t.inset?1:-1)*t.spread.number,s=t.spread.number*(t.inset?-2:2),o=t.spread.number*(t.inset?-2:2),i.map((function(e,t){switch(t){case 0:return e.add(r,n);case 1:return e.add(r+s,n);case 2:return e.add(r+s,n+o);case 3:return e.add(r,n+o)}return e})));t.inset?(u.path(a),u.ctx.clip(),u.mask(c)):(u.mask(a),u.ctx.clip(),u.path(c)),u.ctx.shadowOffsetX=t.offsetX.number+l,u.ctx.shadowOffsetY=t.offsetY.number,u.ctx.shadowColor=Rp(t.color),u.ctx.shadowBlur=t.blur.number,u.ctx.fillStyle=t.inset?Rp(t.color):"rgba(0,0,0,1)",u.ctx.fill(),u.ctx.restore()})),c.label=2;case 2:s=0,o=0,a=r,c.label=3;case 3:return o<a.length?0!==(l=a[o]).style&&!Dp(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,s,e.curves,2)]:[3,11]:[3,13];case 4:return c.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,s,e.curves,3)];case 6:return c.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,s,e.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,s,e.curves)];case 10:c.sent(),c.label=11;case 11:s++,c.label=12;case 12:return o++,[3,3];case 13:return[2]}}))}))},t.prototype.renderDashedDottedBorder=function(e,t,i,r,n){return BA(this,void 0,void 0,(function(){var s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y;return PA(this,(function(b){return this.ctx.save(),s=function(e,t){switch(t){case 0:return __(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return __(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return __(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return __(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(r,i),o=v_(r,i),2===n&&(this.path(o),this.ctx.clip()),n_(o[0])?(a=o[0].start.x,l=o[0].start.y):(a=o[0].x,l=o[0].y),n_(o[1])?(u=o[1].end.x,c=o[1].end.y):(u=o[1].x,c=o[1].y),h=0===i||2===i?Math.abs(a-u):Math.abs(l-c),this.ctx.beginPath(),3===n?this.formatPath(s):this.formatPath(o.slice(0,2)),A=t<3?3*t:2*t,d=t<3?2*t:t,3===n&&(A=t,d=t),p=!0,h<=2*A?p=!1:h<=2*A+d?(A*=f=h/(2*A+d),d*=f):(g=Math.floor((h+d)/(A+d)),m=(h-g*A)/(g-1),d=(v=(h-(g+1)*A)/g)<=0||Math.abs(d-m)<Math.abs(d-v)?m:v),p&&(3===n?this.ctx.setLineDash([0,A+d]):this.ctx.setLineDash([A,d])),3===n?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=Rp(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===n&&(n_(o[0])&&(_=o[3],y=o[0],this.ctx.beginPath(),this.formatPath([new t_(_.end.x,_.end.y),new t_(y.start.x,y.start.y)]),this.ctx.stroke()),n_(o[1])&&(_=o[1],y=o[2],this.ctx.beginPath(),this.formatPath([new t_(_.end.x,_.end.y),new t_(y.start.x,y.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},t.prototype.render=function(e){return BA(this,void 0,void 0,(function(){var t;return PA(this,(function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Rp(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),r=new f_(e,null),n=new p_(r),g_(r,n,n,s=[]),m_(r.container,s),t=n,[4,this.renderStack(t)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}var r,n,s}))}))},t}(T_),I_=function(e){return e instanceof Vm||(e instanceof Nm||e instanceof Um&&e.type!==Om&&e.type!==Rm)},D_=function(e,t){switch(e){case 0:return a_(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return l_(t)}},R_=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},O_=["-apple-system","system-ui"],L_=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===O_.indexOf(e)})):e},j_=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.canvas=i.canvas?i.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=i,r.canvas.width=Math.floor(i.width*i.scale),r.canvas.height=Math.floor(i.height*i.scale),r.canvas.style.width=i.width+"px",r.canvas.style.height=i.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-i.x,-i.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),r}return wA(t,e),t.prototype.render=function(e){return BA(this,void 0,void 0,(function(){var t,i;return PA(this,(function(r){switch(r.label){case 0:return t=pm(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,U_(t)];case 1:return i=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Rp(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},t}(T_),U_=function(e){return new Promise((function(t,i){var r=new Image;r.onload=function(){t(r)},r.onerror=i,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},N_=function(){function e(e){var t=e.id,i=e.enabled;this.id=t,this.enabled=i,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,CA([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,CA([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,CA([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,CA([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),V_=function(){function e(t,i){var r;this.windowBounds=i,this.instanceName="#"+e.instanceCount++,this.logger=new N_({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new Wv(this,t)}return e.instanceCount=1,e}(),Q_=function(e,t){return void 0===t&&(t={}),H_(e,t)};"undefined"!=typeof window&&zv.setContext(window);var H_=function(e,t){return BA(void 0,void 0,void 0,(function(){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,x,B,P,C,M,k,E,S,T,F,I,D,R,O,L,j,U,N;return PA(this,(function(V){switch(V.label){case 0:if(!e||"object"!==w(e))return[2,Promise.reject("Invalid element provided as first argument")];if(!(i=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(r=i.defaultView))throw new Error("Document is not attached to a Window");return n={allowTaint:null!==(B=t.allowTaint)&&void 0!==B&&B,imageTimeout:null!==(P=t.imageTimeout)&&void 0!==P?P:15e3,proxy:t.proxy,useCORS:null!==(C=t.useCORS)&&void 0!==C&&C},s=xA({logging:null===(M=t.logging)||void 0===M||M,cache:t.cache},n),o={windowWidth:null!==(k=t.windowWidth)&&void 0!==k?k:r.innerWidth,windowHeight:null!==(E=t.windowHeight)&&void 0!==E?E:r.innerHeight,scrollX:null!==(S=t.scrollX)&&void 0!==S?S:r.pageXOffset,scrollY:null!==(T=t.scrollY)&&void 0!==T?T:r.pageYOffset},a=new MA(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),l=new V_(s,a),u=null!==(F=t.foreignObjectRendering)&&void 0!==F&&F,c={allowTaint:null!==(I=t.allowTaint)&&void 0!==I&&I,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new Ev(l,e,c),(A=h.clonedReferenceElement)?[4,h.toIFrame(i,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return d=V.sent(),p=rv(A)||function(e){return"HTML"===e.tagName}(A)?function(e){var t=e.body,i=e.documentElement;if(!t||!i)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,i.scrollWidth),Math.max(t.offsetWidth,i.offsetWidth),Math.max(t.clientWidth,i.clientWidth)),n=Math.max(Math.max(t.scrollHeight,i.scrollHeight),Math.max(t.offsetHeight,i.offsetHeight),Math.max(t.clientHeight,i.clientHeight));return new MA(0,0,r,n)}(A.ownerDocument):kA(l,A),f=p.width,g=p.height,m=p.left,v=p.top,_=G_(l,A,t.backgroundColor),y={canvas:t.canvas,backgroundColor:_,scale:null!==(R=null!==(D=t.scale)&&void 0!==D?D:r.devicePixelRatio)&&void 0!==R?R:1,x:(null!==(O=t.x)&&void 0!==O?O:0)+m,y:(null!==(L=t.y)&&void 0!==L?L:0)+v,width:null!==(j=t.width)&&void 0!==j?j:Math.ceil(f),height:null!==(U=t.height)&&void 0!==U?U:Math.ceil(g)},u?(l.logger.debug("Document cloned, using foreign object rendering"),[4,new j_(l,y).render(A)]):[3,3];case 2:return b=V.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+m+","+v+" with size "+f+"x"+g+" using computed rendering"),l.logger.debug("Starting DOM parsing"),x=Wm(l,A),_===x.styles.backgroundColor&&(x.styles.backgroundColor=Hp.TRANSPARENT),l.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),[4,new F_(l,y).render(x)];case 4:b=V.sent(),V.label=5;case 5:return(null===(N=t.removeContainer)||void 0===N||N)&&(Ev.destroy(d)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,b]}}))}))},G_=function(e,t,i){var r=t.ownerDocument,n=r.documentElement?Qp(e,getComputedStyle(r.documentElement).backgroundColor):Hp.TRANSPARENT,s=r.body?Qp(e,getComputedStyle(r.body).backgroundColor):Hp.TRANSPARENT,o="string"==typeof i?Qp(e,i):null===i?Hp.TRANSPARENT:4294967295;return t===r.documentElement?Dp(n)?Dp(s)?o:s:n:o};function z_(e,t,i){var r=e.getBoundingClientRect(),n=t.getBoundingClientRect();i[0]+=r.left-n.left,i[1]+=r.top-n.top}var W_=function(){return P((function e(t){var i=this;x(this,e),this.container=t.viewerElement,this.language="en",this.localeService=t.localeService||new yh,this.scene=new zi(this,{canvasId:t.canvasId,canvasElement:t.canvasElement,keyboardEventsElement:t.keyboardEventsElement,contextAttr:{preserveDrawingBuffer:!1!==t.preserveDrawingBuffer,premultipliedAlpha:!!t.premultipliedAlpha,antialias:!1!==t.antialias},spinnerElementId:t.spinnerElementId,transparent:!1!==t.transparent,gammaInput:!0,gammaOutput:!1,backgroundColor:t.backgroundColor,backgroundColorFromAmbientLight:t.backgroundColorFromAmbientLight,ticksPerRender:1,ticksPerOcclusionTest:20,units:t.units,scale:t.scale,origin:t.origin,lightIntensity:t.lightIntensity,saoEnabled:t.saoEnabled,alphaDepthMask:!1!==t.alphaDepthMask,entityOffsetsEnabled:!!t.entityOffsetsEnabled,pickSurfacePrecisionEnabled:!!t.pickSurfacePrecisionEnabled,readableGeometryEnabled:!!t.readableGeometryEnabled,logarithmicDepthBufferEnabled:!!t.logarithmicDepthBufferEnabled,pbrEnabled:!!t.pbrEnabled,colorTextureEnabled:!1!==t.colorTextureEnabled,dtxEnabled:!!t.dtxEnabled,edgesEnabled:t.edgesEnabled,markerZOffset:t.markerZOffset,numCachedSectionPlanes:t.numCachedSectionPlanes,lodEnabled:!!t.lodEnabled,resolutionScale:t.resolutionScale,offset:t.offset,worldAxis:t.worldAxis}),this.metaScene=new _A(this,this.scene),this.id=t.id||this.scene.id,this.camera=this.scene.camera,this.cameraFlight=new kh(this.scene,{duration:.5}),this.cameraControl=new fA(this.scene,{snapRadius:t.snapRadius,doublePickFlyTo:!0}),this.scene.canvas.on("boundary",(function(e){i.cameraControl.updatePivotElement()})),this._plugins=[],this._eventSubs={}}),[{key:"capabilities",get:function(){return this.scene.capabilities}},{key:"on",value:function(e,t){var i=this._eventSubs[e];i||(i=[],this._eventSubs[e]=i),i.push(t)}},{key:"fire",value:function(e,t){var i=this._eventSubs[e];if(i)for(var r=0,n=i.length;r<n;r++)i[r](t)}},{key:"off",value:function(e){}},{key:"log",value:function(e){console.log("[xtctwins viewer ".concat(this.id,"]: ").concat(e))}},{key:"error",value:function(e){console.error("[xtctwins viewer ".concat(this.id,"]: ").concat(e))}},{key:"addPlugin",value:function(e){this._plugins.push(e)}},{key:"removePlugin",value:function(e){for(var t=0,i=this._plugins.length;t<i;t++){var r=this._plugins[t];if(r===e)return r.clear&&r.clear(),void this._plugins.splice(t,1)}}},{key:"sendToPlugins",value:function(e,t){for(var i=0,r=this._plugins.length;i<r;i++){var n=this._plugins[i];n.send&&n.send(e,t)}}},{key:"clear",value:function(){throw'Viewer#clear() no longer implemented - use \'#sendToPlugins("clear") instead'}},{key:"resetView",value:function(){throw"Viewer#resetView() no longer implemented - use CameraMemento & ObjectsMemento classes instead"}},{key:"beginSnapshot",value:function(){this._snapshotBegun||(this.scene._renderer.beginSnapshot(),this._snapshotBegun=!0)}},{key:"getSnapshot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!this._snapshotBegun,i=void 0!==e.width&&void 0!==e.height,r=this.scene.canvas.canvas,n=r.clientWidth,s=r.clientHeight,o=e.width?Math.floor(e.width):r.width,a=e.height?Math.floor(e.height):r.height;i&&(r.width=o,r.height=a),this._snapshotBegun||this.beginSnapshot({width:o,height:a}),e.includeGizmos||this.sendToPlugins("snapshotStarting");for(var l={},u=0,c=this._plugins.length;u<c;u++){var h=this._plugins[u];if(h.getContainerElement){var A=h.getContainerElement();A!==document.body&&(l[A.id]||(l[A.id]=!0,Q_(A).then((function(e){document.body.appendChild(e),setTimeout((function(){document.body.removeChild(e)}),200)}))))}}this.scene.fire("rendering",{},!0),this.scene._renderer.renderSnapshot();var d=this.scene._renderer.readSnapshot(e);return i&&(r.width=n,r.height=s,this.scene.glRedraw()),e.includeGizmos||this.sendToPlugins("snapshotFinished"),t&&this.endSnapshot(),d}},{key:"getSnapshotWithPlugins",value:(e=a(s().mark((function e(){var t,i,r,n,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(t=x.length>0&&void 0!==x[0]?x[0]:{},i=!this._snapshotBegun,r=void 0!==t.width&&void 0!==t.height,n=this.scene.canvas.canvas,o=n.clientWidth,a=n.clientHeight,l=t.width?Math.floor(t.width):n.width,u=t.height?Math.floor(t.height):n.height,r&&(n.width=l,n.height=u),this._snapshotBegun||this.beginSnapshot(),t.includeGizmos||this.sendToPlugins("snapshotStarting"),this.scene._renderer.renderSnapshot(),c=this.scene._renderer.readSnapshotAsCanvas(),r&&(n.width=o,n.height=a,this.scene.glRedraw()),h={},A=[],d=0,p=this._plugins.length;d<p;d++)(f=this._plugins[d]).getContainerElement&&(g=f.getContainerElement())!==document.body&&(h[g.id]||(h[g.id]=!0,A.push(g)));m=0,v=A.length;case 18:if(!(m<v)){e.next=28;break}return _=A[m],y=0==m?c.width/_.clientWidth:1,b=Y.vec2([0,0]),z_(n,_,b),e.next=25,Q_(_,{canvas:c,backgroundColor:null,x:b[0],y:b[1],scale:y});case 25:m++,e.next=18;break;case 28:return t.includeGizmos||this.sendToPlugins("snapshotFinished"),i&&this.endSnapshot(),"jpeg"!==(w=t.format||"png")&&"png"!==w&&"bmp"!==w&&(console.error("Unsupported image format: '"+w+"' - supported types are 'jpeg', 'bmp' and 'png' - defaulting to 'png'"),w="png"),t.includeGizmos||this.sendToPlugins("snapshotFinished"),i&&this.endSnapshot(),e.abrupt("return",c.toDataURL("image/".concat(w)));case 35:case"end":return e.stop()}}),e,this)}))),function(){return e.apply(this,arguments)})},{key:"endSnapshot",value:function(){this._snapshotBegun&&(this.scene._renderer.endSnapshot(),this.scene._renderer.render({force:!0}),this._snapshotBegun=!1)}},{key:"destroy",value:function(e){var t=this._plugins.slice();if(t.length>0)for(var i=0,r=t.length;i<r;i++){t[i].destroy()}this.cameraControl.destroy(),this.scene.destroy(e)}}]);var e}();function K_(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var X_=Boolean("object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser),q_="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);q_&&parseFloat(q_[1]);function Y_(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}var J_="object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser,Z_="undefined"!=typeof window&&void 0!==window.orientation,$_="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);function ey(e){return ey="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},ey(e)}function ty(e){var t=function(e,t){if("object"!=ey(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var r=i.call(e,t||"default");if("object"!=ey(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ey(t)?t:String(t)}function iy(e,t,i){return(t=ty(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}$_&&parseFloat($_[1]);var ry=function(){return P((function e(t,i){var r=this;x(this,e),iy(this,"name",void 0),iy(this,"workerThread",void 0),iy(this,"isRunning",!0),iy(this,"result",void 0),iy(this,"_resolve",(function(){})),iy(this,"_reject",(function(){})),this.name=t,this.workerThread=i,this.result=new Promise((function(e,t){r._resolve=e,r._reject=t}))}),[{key:"postMessage",value:function(e,t){this.workerThread.postMessage({source:"loaders.gl",type:e,payload:t})}},{key:"done",value:function(e){Y_(this.isRunning),this.isRunning=!1,this._resolve(e)}},{key:"error",value:function(e){Y_(this.isRunning),this.isRunning=!1,this._reject(e)}}])}(),ny=function(){return P((function e(){x(this,e)}),[{key:"terminate",value:function(){}}])}(),sy=new Map;function oy(e){Y_(e.source&&!e.url||!e.source&&e.url);var t=sy.get(e.source||e.url);return t||(e.url&&(t=function(e){if(!e.startsWith("http"))return e;return ay((t=e,"try {\n importScripts('".concat(t,"');\n} catch (error) {\n console.error(error);\n throw error;\n}")));var t}(e.url),sy.set(e.url,t)),e.source&&(t=ay(e.source),sy.set(e.source,t))),Y_(t),t}function ay(e){var t=new Blob([e],{type:"application/javascript"});return URL.createObjectURL(t)}function ly(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2?arguments[2]:void 0,r=i||new Set;if(e){if(uy(e))r.add(e);else if(uy(e.buffer))r.add(e.buffer);else if(ArrayBuffer.isView(e));else if(t&&"object"===w(e))for(var n in e)ly(e[n],t,r)}else;return void 0===i?Array.from(r):[]}function uy(e){return!!e&&(e instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&e instanceof MessagePort||("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas)))}var cy=function(){},hy=function(){return P((function e(t){x(this,e),iy(this,"name",void 0),iy(this,"source",void 0),iy(this,"url",void 0),iy(this,"terminated",!1),iy(this,"worker",void 0),iy(this,"onMessage",void 0),iy(this,"onError",void 0),iy(this,"_loadableURL","");var i=t.name,r=t.source,n=t.url;Y_(r||n),this.name=i,this.source=r,this.url=n,this.onMessage=cy,this.onError=function(e){return console.log(e)},this.worker=J_?this._createBrowserWorker():this._createNodeWorker()}),[{key:"destroy",value:function(){this.onMessage=cy,this.onError=cy,this.worker.terminate(),this.terminated=!0}},{key:"isRunning",get:function(){return Boolean(this.onMessage)}},{key:"postMessage",value:function(e,t){t=t||ly(e),this.worker.postMessage(e,t)}},{key:"_getErrorFromErrorEvent",value:function(e){var t="Failed to load ";return t+="worker ".concat(this.name," from ").concat(this.url,". "),e.message&&(t+="".concat(e.message," in ")),e.lineno&&(t+=":".concat(e.lineno,":").concat(e.colno)),new Error(t)}},{key:"_createBrowserWorker",value:function(){var e=this;this._loadableURL=oy({source:this.source,url:this.url});var t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=function(t){t.data?e.onMessage(t.data):e.onError(new Error("No data received"))},t.onerror=function(t){e.onError(e._getErrorFromErrorEvent(t)),e.terminated=!0},t.onmessageerror=function(e){return console.error(e)},t}},{key:"_createNodeWorker",value:function(){var e,t=this;if(this.url){var i=this.url.includes(":/")||this.url.startsWith("/")?this.url:"./".concat(this.url);e=new ny(i,{eval:!1})}else{if(!this.source)throw new Error("no worker");e=new ny(this.source,{eval:!0})}return e.on("message",(function(e){t.onMessage(e)})),e.on("error",(function(e){t.onError(e)})),e.on("exit",(function(e){})),e}}],[{key:"isSupported",value:function(){return"undefined"!=typeof Worker&&J_||void 0!==ny&&!J_}}])}(),Ay=function(){return P((function e(t){x(this,e),iy(this,"name","unnamed"),iy(this,"source",void 0),iy(this,"url",void 0),iy(this,"maxConcurrency",1),iy(this,"maxMobileConcurrency",1),iy(this,"onDebug",(function(){})),iy(this,"reuseWorkers",!0),iy(this,"props",{}),iy(this,"jobQueue",[]),iy(this,"idleQueue",[]),iy(this,"count",0),iy(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}),[{key:"destroy",value:function(){this.idleQueue.forEach((function(e){return e.destroy()})),this.isDestroyed=!0}},{key:"setProps",value:function(e){this.props=n(n({},this.props),e),void 0!==e.name&&(this.name=e.name),void 0!==e.maxConcurrency&&(this.maxConcurrency=e.maxConcurrency),void 0!==e.maxMobileConcurrency&&(this.maxMobileConcurrency=e.maxMobileConcurrency),void 0!==e.reuseWorkers&&(this.reuseWorkers=e.reuseWorkers),void 0!==e.onDebug&&(this.onDebug=e.onDebug)}},{key:"startJob",value:(t=a(s().mark((function e(t){var i,r,n,o=this,a=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:function(e,t,i){return e.done(i)},r=a.length>2&&void 0!==a[2]?a[2]:function(e,t){return e.error(t)},n=new Promise((function(e){return o.jobQueue.push({name:t,onMessage:i,onError:r,onStart:e}),o})),this._startQueuedJob(),e.next=6,n;case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"_startQueuedJob",value:(e=a(s().mark((function e(){var t,i,r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.jobQueue.length){e.next=2;break}return e.abrupt("return");case 2:if(t=this._getAvailableWorker()){e.next=5;break}return e.abrupt("return");case 5:if(!(i=this.jobQueue.shift())){e.next=18;break}return this.onDebug({message:"Starting job",name:i.name,workerThread:t,backlog:this.jobQueue.length}),r=new ry(i.name,t),t.onMessage=function(e){return i.onMessage(r,e.type,e.payload)},t.onError=function(e){return i.onError(r,e)},i.onStart(r),e.prev=12,e.next=15,r.result;case 15:return e.prev=15,this.returnWorkerToQueue(t),e.finish(15);case 18:case"end":return e.stop()}}),e,this,[[12,,15,18]])}))),function(){return e.apply(this,arguments)})},{key:"returnWorkerToQueue",value:function(e){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(e.destroy(),this.count--):this.idleQueue.push(e),this.isDestroyed||this._startQueuedJob()}},{key:"_getAvailableWorker",value:function(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;var e="".concat(this.name.toLowerCase()," (#").concat(this.count," of ").concat(this.maxConcurrency,")");return new hy({name:e,source:this.source,url:this.url})}return null}},{key:"_getMaxConcurrency",value:function(){return Z_?this.maxMobileConcurrency:this.maxConcurrency}}],[{key:"isSupported",value:function(){return hy.isSupported()}}]);var e,t}(),dy={maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,onDebug:function(){}},py=function(){function e(t){x(this,e),iy(this,"props",void 0),iy(this,"workerPools",new Map),this.props=n({},dy),this.setProps(t),this.workerPools=new Map}return P(e,[{key:"destroy",value:function(){var e,t=u(this.workerPools.values());try{for(t.s();!(e=t.n()).done;){e.value.destroy()}}catch(e){t.e(e)}finally{t.f()}this.workerPools=new Map}},{key:"setProps",value:function(e){this.props=n(n({},this.props),e);var t,i=u(this.workerPools.values());try{for(i.s();!(t=i.n()).done;){t.value.setProps(this._getWorkerPoolProps())}}catch(e){i.e(e)}finally{i.f()}}},{key:"getWorkerPool",value:function(e){var t=e.name,i=e.source,r=e.url,n=this.workerPools.get(t);return n||((n=new Ay({name:t,source:i,url:r})).setProps(this._getWorkerPoolProps()),this.workerPools.set(t,n)),n}},{key:"_getWorkerPoolProps",value:function(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}],[{key:"isSupported",value:function(){return hy.isSupported()}},{key:"getWorkerFarm",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e._workerFarm=e._workerFarm||new e({}),e._workerFarm.setProps(t),e._workerFarm}}])}();iy(py,"_workerFarm",void 0);function fy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t[e.id]||{},r="".concat(e.id,"-worker.js"),n=i.workerUrl;if(n||"compression"!==e.id||(n=t.workerUrl),"test"===t._workerType&&(n="modules/".concat(e.module,"/dist/").concat(r)),!n){var s=e.version;"latest"===s&&(s="latest");var o=s?"@".concat(s):"";n="https://unpkg.com/@loaders.gl/".concat(e.module).concat(o,"/dist/").concat(r)}return Y_(n),n}function gy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"3.4.15";Y_(e,"no worker provided");var i=e.version;return!(!t||!i)}function my(e,t){return!!py.isSupported()&&(!!(J_||null!=t&&t._nodeWorkers)&&(e.worker&&(null==t?void 0:t.worker)))}function vy(e,t,i,r,n){return _y.apply(this,arguments)}function _y(){return _y=a(s().mark((function e(t,i,r,n,o){var a,l,u,c,h,A;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.id,l=fy(t,r),u=py.getWorkerFarm(r),c=u.getWorkerPool({name:a,url:l}),r=JSON.parse(JSON.stringify(r)),n=JSON.parse(JSON.stringify(n||{})),e.next=8,c.startJob("process-on-worker",yy.bind(null,o));case 8:return(h=e.sent).postMessage("process",{input:i,options:r,context:n}),e.next=12,h.result;case 12:return A=e.sent,e.next=15,A.result;case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e)}))),_y.apply(this,arguments)}function yy(e,t,i,r){return by.apply(this,arguments)}function by(){return(by=a(s().mark((function e(t,i,r,n){var o,a,l,u,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=r,e.next="done"===e.t0?3:"error"===e.t0?5:"process"===e.t0?7:20;break;case 3:return i.done(n),e.abrupt("break",21);case 5:return i.error(new Error(n.error)),e.abrupt("break",21);case 7:return o=n.id,a=n.input,l=n.options,e.prev=8,e.next=11,t(a,l);case 11:u=e.sent,i.postMessage("done",{id:o,result:u}),e.next=19;break;case 15:e.prev=15,e.t1=e.catch(8),c=e.t1 instanceof Error?e.t1.message:"unknown error",i.postMessage("error",{id:o,error:c});case 19:return e.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(r));case 21:case"end":return e.stop()}}),e,null,[[8,15]])})))).apply(this,arguments)}function wy(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var r,n=t.map((function(e){return e instanceof ArrayBuffer?new Uint8Array(e):e})),s=n.reduce((function(e,t){return e+t.byteLength}),0),o=new Uint8Array(s),a=0,l=u(n);try{for(l.s();!(r=l.n()).done;){var c=r.value;o.set(c,a),a+=c.byteLength}}catch(e){l.e(e)}finally{l.f()}return o.buffer}function xy(e){return By.apply(this,arguments)}function By(){return(By=a(s().mark((function e(t){var i,r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[],r=!1,n=!1,e.prev=3,a=T(t);case 5:return e.next=7,a.next();case 7:if(!(r=!(l=e.sent).done)){e.next=13;break}u=l.value,i.push(u);case 10:r=!1,e.next=5;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(3),n=!0,o=e.t0;case 19:if(e.prev=19,e.prev=20,!r||null==a.return){e.next=24;break}return e.next=24,a.return();case 24:if(e.prev=24,!n){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(19);case 29:return e.abrupt("return",wy.apply(void 0,i));case 30:case"end":return e.stop()}}),e,null,[[3,15,19,29],[20,,24,28]])})))).apply(this,arguments)}var Py={};function Cy(e){for(var t in Py)if(e.startsWith(t)){var i=Py[t];e=e.replace(t,i)}return e.startsWith("http://")||e.startsWith("https://")||(e="".concat("").concat(e)),e}function My(e){if((t=e)&&"object"===w(t)&&t.isBuffer)return e;var t;if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return 0===e.byteOffset&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if("string"==typeof e){var i=e;return(new TextEncoder).encode(i).buffer}if(e&&"object"===w(e)&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function ky(e){var t=e?e.lastIndexOf("/"):-1;return t>=0?e.substr(t+1):""}var Ey=function(e){return"function"==typeof e},Sy=function(e){return null!==e&&"object"===w(e)},Ty=function(e){return Sy(e)&&e.constructor==={}.constructor},Fy=function(e){return e&&"function"==typeof e[Symbol.asyncIterator]},Iy=function(e){return"undefined"!=typeof Response&&e instanceof Response||e&&e.arrayBuffer&&e.text&&e.json},Dy=function(e){return"undefined"!=typeof Blob&&e instanceof Blob},Ry=function(e){return function(e){return"undefined"!=typeof ReadableStream&&e instanceof ReadableStream||Sy(e)&&Ey(e.tee)&&Ey(e.cancel)&&Ey(e.getReader)}(e)||function(e){return Sy(e)&&Ey(e.read)&&Ey(e.pipe)&&function(e){return"boolean"==typeof e}(e.readable)}(e)},Oy=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,Ly=/^([-\w.]+\/[-\w.+]+)/;function jy(e){var t=Oy.exec(e);return t?t[1]:""}var Uy=/\?.*/;function Ny(e){return e.replace(Uy,"")}function Vy(e){return Iy(e)?e.url:Dy(e)?e.name||"":"string"==typeof e?e:""}function Qy(e){if(Iy(e)){var t=e,i=t.headers.get("content-type")||"",r=Ny(t.url);return function(e){var t=Ly.exec(e);return t?t[1]:e}(i)||jy(r)}return Dy(e)?e.type||"":"string"==typeof e?jy(e):""}function Hy(e){return Iy(e)?e.headers["content-length"]||-1:Dy(e)?e.size:"string"==typeof e?e.length:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:-1}function Gy(e){return zy.apply(this,arguments)}function zy(){return(zy=a(s().mark((function e(t){var i,r,n,o,a,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Iy(t)){e.next=2;break}return e.abrupt("return",t);case 2:return i={},(r=Hy(t))>=0&&(i["content-length"]=String(r)),n=Vy(t),(o=Qy(t))&&(i["content-type"]=o),e.next=10,Yy(t);case 10:return(a=e.sent)&&(i["x-first-bytes"]=a),"string"==typeof t&&(t=(new TextEncoder).encode(t)),l=new Response(t,{headers:i}),Object.defineProperty(l,"url",{value:n}),e.abrupt("return",l);case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wy(e){return Ky.apply(this,arguments)}function Ky(){return(Ky=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=5;break}return e.next=3,Xy(t);case 3:throw i=e.sent,new Error(i);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xy(e){return qy.apply(this,arguments)}function qy(){return(qy=a(s().mark((function e(t){var i,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i="Failed to fetch resource ".concat(t.url," (").concat(t.status,"): "),e.prev=1,r=t.headers.get("Content-Type"),n=t.statusText,!r.includes("application/json")){e.next=11;break}return e.t0=n,e.t1=" ",e.next=9,t.text();case 9:e.t2=e.sent,n=e.t0+=e.t1.concat.call(e.t1,e.t2);case 11:i=(i+=n).length>60?"".concat(i.slice(0,60),"..."):i,e.next=17;break;case 15:e.prev=15,e.t3=e.catch(1);case 17:return e.abrupt("return",i);case 18:case"end":return e.stop()}}),e,null,[[1,15]])})))).apply(this,arguments)}function Yy(e){return Jy.apply(this,arguments)}function Jy(){return(Jy=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=5,"string"!=typeof t){e.next=3;break}return e.abrupt("return","data:,".concat(t.slice(0,i)));case 3:if(!(t instanceof Blob)){e.next=8;break}return r=t.slice(0,5),e.next=7,new Promise((function(e){var t=new FileReader;t.onload=function(t){var i;return e(null==t||null===(i=t.target)||void 0===i?void 0:i.result)},t.readAsDataURL(r)}));case 7:return e.abrupt("return",e.sent);case 8:if(!(t instanceof ArrayBuffer)){e.next=12;break}return n=t.slice(0,i),o=Zy(n),e.abrupt("return","data:base64,".concat(o));case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Zy(e){for(var t="",i=new Uint8Array(e),r=0;r<i.byteLength;r++)t+=String.fromCharCode(i[r]);return btoa(t)}function $y(e,t){return eb.apply(this,arguments)}function eb(){return(eb=a(s().mark((function e(t,i){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"!=typeof t){e.next=7;break}return t=Cy(t),r=i,null!=i&&i.fetch&&"function"!=typeof(null==i?void 0:i.fetch)&&(r=i.fetch),e.next=6,fetch(t,r);case 6:case 9:return e.abrupt("return",e.sent);case 7:return e.next=9,Gy(t);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function tb(){return!("object"===("undefined"==typeof process?"undefined":w(process))&&"[object process]"===String(process)&&!process.browser)||function(e){if("undefined"!=typeof window&&"object"===w(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!=typeof process&&"object"===w(process.versions)&&Boolean(process.versions.electron))return!0;var t="object"===("undefined"==typeof navigator?"undefined":w(navigator))&&"string"==typeof navigator.userAgent&&navigator.userAgent,i=e||t;return!!(i&&i.indexOf("Electron")>=0)}()}var ib={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document,process:"object"===("undefined"==typeof process?"undefined":w(process))&&process},rb=ib.window||ib.self||ib.global,nb=ib.process||{},sb="undefined"!=typeof __VERSION__?__VERSION__:"untranspiled source";tb();var ob,ab=function(){return P((function e(t,i){x(this,e);var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";iy(this,"storage",void 0),iy(this,"id",void 0),iy(this,"config",void 0),this.storage=function(e){try{var t=window[e],i="__storage_test__";return t.setItem(i,i),t.removeItem(i),t}catch(e){return null}}(r),this.id=t,this.config=i,this._loadConfiguration()}),[{key:"getConfiguration",value:function(){return this.config}},{key:"setConfiguration",value:function(e){if(Object.assign(this.config,e),this.storage){var t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}},{key:"_loadConfiguration",value:function(){var e={};if(this.storage){var t=this.storage.getItem(this.id);e=t?JSON.parse(t):{}}return Object.assign(this.config,e),this}}])}();function lb(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600,n=e.src.replace(/\(/g,"%28").replace(/\)/g,"%29");e.width>r&&(i=Math.min(i,r/e.width));var s=e.width*i,o=e.height*i,a=["font-size:1px;","padding:".concat(Math.floor(o/2),"px ").concat(Math.floor(s/2),"px;"),"line-height:".concat(o,"px;"),"background:url(".concat(n,");"),"background-size:".concat(s,"px ").concat(o,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),a]}function ub(e){return"string"==typeof e?ob[e.toUpperCase()]||ob.WHITE:e}function cb(e,t){if(!e)throw new Error(t||"Assertion failed")}function hb(){var e,t,i;if(tb&&"performance"in rb)e=null==rb||null===(t=rb.performance)||void 0===t||null===(i=t.now)||void 0===i?void 0:i.call(t);else if("hrtime"in nb){var r,n=null==nb||null===(r=nb.hrtime)||void 0===r?void 0:r.call(nb);e=1e3*n[0]+n[1]/1e6}else e=Date.now();return e}!function(e){e[e.BLACK=30]="BLACK",e[e.RED=31]="RED",e[e.GREEN=32]="GREEN",e[e.YELLOW=33]="YELLOW",e[e.BLUE=34]="BLUE",e[e.MAGENTA=35]="MAGENTA",e[e.CYAN=36]="CYAN",e[e.WHITE=37]="WHITE",e[e.BRIGHT_BLACK=90]="BRIGHT_BLACK",e[e.BRIGHT_RED=91]="BRIGHT_RED",e[e.BRIGHT_GREEN=92]="BRIGHT_GREEN",e[e.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",e[e.BRIGHT_BLUE=94]="BRIGHT_BLUE",e[e.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",e[e.BRIGHT_CYAN=96]="BRIGHT_CYAN",e[e.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(ob||(ob={}));var Ab={debug:tb&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},db={enabled:!0,level:0};function pb(){}var fb={},gb={once:!0},mb=function(){return P((function e(){x(this,e);var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""}).id;iy(this,"id",void 0),iy(this,"VERSION",sb),iy(this,"_startTs",hb()),iy(this,"_deltaTs",hb()),iy(this,"_storage",void 0),iy(this,"userData",{}),iy(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new ab("__probe-".concat(this.id,"__"),db),this.timeStamp("".concat(this.id," started")),function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"],r=Object.getPrototypeOf(e),n=u(Object.getOwnPropertyNames(r));try{var s=function(){var r=t.value;"function"==typeof e[r]&&(i.find((function(e){return r===e}))||(e[r]=e[r].bind(e)))};for(n.s();!(t=n.n()).done;)s()}catch(e){n.e(e)}finally{n.f()}}(this),Object.seal(this)}),[{key:"level",get:function(){return this.getLevel()},set:function(e){this.setLevel(e)}},{key:"isEnabled",value:function(){return this._storage.config.enabled}},{key:"getLevel",value:function(){return this._storage.config.level}},{key:"getTotal",value:function(){return Number((hb()-this._startTs).toPrecision(10))}},{key:"getDelta",value:function(){return Number((hb()-this._deltaTs).toPrecision(10))}},{key:"priority",get:function(){return this.level},set:function(e){this.level=e}},{key:"getPriority",value:function(){return this.level}},{key:"enable",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._storage.setConfiguration({enabled:e}),this}},{key:"setLevel",value:function(e){return this._storage.setConfiguration({level:e}),this}},{key:"get",value:function(e){return this._storage.config[e]}},{key:"set",value:function(e,t){this._storage.setConfiguration(b({},e,t))}},{key:"settings",value:function(){console.table?console.table(this._storage.config):console.log(this._storage.config)}},{key:"assert",value:function(e,t){cb(e,t)}},{key:"warn",value:function(e){return this._getLogFunction(0,e,Ab.warn,arguments,gb)}},{key:"error",value:function(e){return this._getLogFunction(0,e,Ab.error,arguments)}},{key:"deprecated",value:function(e,t){return this.warn("`".concat(e,"` is deprecated and will be removed in a later version. Use `").concat(t,"` instead"))}},{key:"removed",value:function(e,t){return this.error("`".concat(e,"` has been removed. Use `").concat(t,"` instead"))}},{key:"probe",value:function(e,t){return this._getLogFunction(e,t,Ab.log,arguments,{time:!0,once:!0})}},{key:"log",value:function(e,t){return this._getLogFunction(e,t,Ab.debug,arguments)}},{key:"info",value:function(e,t){return this._getLogFunction(e,t,console.info,arguments)}},{key:"once",value:function(e,t){for(var i=arguments.length,r=new Array(i>2?i-2:0),n=2;n<i;n++)r[n-2]=arguments[n];return this._getLogFunction(e,t,Ab.debug||Ab.info,arguments,gb)}},{key:"table",value:function(e,t,i){return t?this._getLogFunction(e,t,console.table||pb,i&&[i],{tag:yb(t)}):pb}},{key:"image",value:function(e){var t=e.logLevel,i=e.priority,r=e.image,n=e.message,s=void 0===n?"":n,o=e.scale,a=void 0===o?1:o;return this._shouldLog(t||i)?tb?function(e){var t=e.image,i=e.message,r=void 0===i?"":i,n=e.scale,s=void 0===n?1:n;if("string"==typeof t){var o=new Image;return o.onload=function(){var e,t=lb(o,r,s);(e=console).log.apply(e,l(t))},o.src=t,pb}var a=t.nodeName||"";if("img"===a.toLowerCase()){var u;return(u=console).log.apply(u,l(lb(t,r,s))),pb}if("canvas"===a.toLowerCase()){var c=new Image;return c.onload=function(){var e;return(e=console).log.apply(e,l(lb(c,r,s)))},c.src=t.toDataURL(),pb}return pb}({image:r,message:s,scale:a}):(console.warn("removed"),pb):pb}},{key:"time",value:function(e,t){return this._getLogFunction(e,t,console.time?console.time:console.info)}},{key:"timeEnd",value:function(e,t){return this._getLogFunction(e,t,console.timeEnd?console.timeEnd:console.info)}},{key:"timeStamp",value:function(e,t){return this._getLogFunction(e,t,console.timeStamp||pb)}},{key:"group",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1},r=_b({logLevel:e,message:t,opts:i}),n=i.collapsed;return r.method=(n?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}},{key:"groupCollapsed",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(e,t,Object.assign({},i,{collapsed:!0}))}},{key:"groupEnd",value:function(e){return this._getLogFunction(e,"",console.groupEnd||pb)}},{key:"withGroup",value:function(e,t,i){this.group(e,t)();try{i()}finally{this.groupEnd(e)()}}},{key:"trace",value:function(){console.trace&&console.trace()}},{key:"_shouldLog",value:function(e){return this.isEnabled()&&this.getLevel()>=vb(e)}},{key:"_getLogFunction",value:function(e,t,i,r,n){if(this._shouldLog(e)){var s;n=_b({logLevel:e,message:t,args:r,opts:n}),cb(i=i||n.method),n.total=this.getTotal(),n.delta=this.getDelta(),this._deltaTs=hb();var o=n.tag||n.message;if(n.once){if(fb[o])return pb;fb[o]=hb()}return t=function(e,t,i){if("string"==typeof t){var r=i.time?function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,i=Math.max(t-e.length,0);return"".concat(" ".repeat(i)).concat(e)}((n=i.total)<10?"".concat(n.toFixed(2),"ms"):n<100?"".concat(n.toFixed(1),"ms"):n<1e3?"".concat(n.toFixed(0),"ms"):"".concat((n/1e3).toFixed(2),"s")):"";t=function(e,t,i){return tb||"string"!=typeof e||(t&&(t=ub(t),e="[".concat(t,"m").concat(e,"")),i&&(t=ub(i),e="[".concat(i+10,"m").concat(e,""))),e}(t=i.time?"".concat(e,": ").concat(r," ").concat(t):"".concat(e,": ").concat(t),i.color,i.background)}var n;return t}(this.id,n.message,n),(s=i).bind.apply(s,[console,t].concat(l(n.args)))}return pb}}])}();function vb(e){if(!e)return 0;var t;switch(w(e)){case"number":t=e;break;case"object":t=e.logLevel||e.priority||0;break;default:return 0}return cb(Number.isFinite(t)&&t>=0),t}function _b(e){var t=e.logLevel,i=e.message;e.logLevel=vb(t);for(var r=e.args?Array.from(e.args):[];r.length&&r.shift()!==i;);switch(w(t)){case"string":case"function":void 0!==i&&r.unshift(i),e.message=t;break;case"object":Object.assign(e,t)}"function"==typeof e.message&&(e.message=e.message());var n=w(e.message);return cb("string"===n||"object"===n),Object.assign(e,{args:r},e.opts)}function yb(e){for(var t in e)for(var i in e[t])return i||"untitled";return"empty"}iy(mb,"VERSION",sb);var bb=new mb({id:"loaders.gl"}),wb=function(){return P((function e(){x(this,e)}),[{key:"log",value:function(){return function(){}}},{key:"info",value:function(){return function(){}}},{key:"warn",value:function(){return function(){}}},{key:"error",value:function(){return function(){}}}])}(),xb={fetch:null,mimeType:void 0,nothrow:!1,log:new(function(){return P((function e(){x(this,e),iy(this,"console",void 0),this.console=console}),[{key:"log",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.log).bind.apply(e,[this.console].concat(i))}},{key:"info",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.info).bind.apply(e,[this.console].concat(i))}},{key:"warn",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.warn).bind.apply(e,[this.console].concat(i))}},{key:"error",value:function(){for(var e,t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=this.console.error).bind.apply(e,[this.console].concat(i))}}])}()),CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:X_,_nodeWorkers:!1,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},Bb={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function Pb(){globalThis.loaders=globalThis.loaders||{};var e=globalThis.loaders;return e._state=e._state||{},e._state}var Cb=function(){var e=Pb();return e.globalOptions=e.globalOptions||n({},xb),e.globalOptions};function Mb(e,t,i,r){return i=i||[],function(e,t){kb(e,null,xb,Bb,t);var i,r=u(t);try{for(r.s();!(i=r.n()).done;){var n=i.value,s=e&&e[n.id]||{},o=n.options&&n.options[n.id]||{},a=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};kb(s,n.id,o,a,t)}}catch(e){r.e(e)}finally{r.f()}}(e,i=Array.isArray(i)?i:[i]),function(e,t,i){var r=e.options||{},s=n({},r);(function(e,t){t&&!("baseUri"in e)&&(e.baseUri=t)})(s,i),null===s.log&&(s.log=new wb);return Sb(s,Cb()),Sb(s,t),s}(t,e,r)}function kb(e,t,i,r,n){var s=t||"Top level",o=t?"".concat(t,"."):"";for(var a in e){var l=!t&&Sy(e[a]);if(!(a in i)&&!("baseUri"===a&&!t)&&!("workerUrl"===a&&t))if(a in r)bb.warn("".concat(s," loader option '").concat(o).concat(a,"' no longer supported, use '").concat(r[a],"'"))();else if(!l){var u=Eb(a,n);bb.warn("".concat(s," loader option '").concat(o).concat(a,"' not recognized. ").concat(u))()}}}function Eb(e,t){var i,r=e.toLowerCase(),n="",s=u(t);try{for(s.s();!(i=s.n()).done;){var o=i.value;for(var a in o.options){if(e===a)return"Did you mean '".concat(o.id,".").concat(a,"'?");var l=a.toLowerCase();(r.startsWith(l)||l.startsWith(r))&&(n=n||"Did you mean '".concat(o.id,".").concat(a,"'?"))}}}catch(e){s.e(e)}finally{s.f()}return n}function Sb(e,t){for(var i in t)if(i in t){var r=t[i];Ty(r)&&Ty(e[i])?e[i]=n(n({},e[i]),t[i]):e[i]=t[i]}}function Tb(e){var t;return!!e&&(Array.isArray(e)&&(e=e[0]),Array.isArray(null===(t=e)||void 0===t?void 0:t.extensions))}function Fb(e){var t,i,r;return K_(e,"null loader"),K_(Tb(e),"invalid loader"),Array.isArray(e)&&(r=e[1],e=n(n({},e=e[0]),{},{options:n(n({},e.options),r)})),(null!==(t=e)&&void 0!==t&&t.parseTextSync||null!==(i=e)&&void 0!==i&&i.parseText)&&(e.text=!0),e.text||(e.binary=!0),e}function Ib(){return(e=Pb()).loaderRegistry=e.loaderRegistry||[],e.loaderRegistry;var e}var Db=new mb({id:"loaders.gl"}),Rb=/\.([^.]+)$/;function Ob(e){return Lb.apply(this,arguments)}function Lb(){return Lb=a(s().mark((function e(t){var i,r,o,a,l=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=l.length>1&&void 0!==l[1]?l[1]:[],r=l.length>2?l[2]:void 0,o=l.length>3?l[3]:void 0,Ub(t)){e.next=5;break}return e.abrupt("return",null);case 5:if(!(a=jb(t,i,n(n({},r),{},{nothrow:!0}),o))){e.next=8;break}return e.abrupt("return",a);case 8:if(!Dy(t)){e.next=13;break}return e.next=11,t.slice(0,10).arrayBuffer();case 11:t=e.sent,a=jb(t,i,r,o);case 13:if(a||null!=r&&r.nothrow){e.next=15;break}throw new Error(Nb(t));case 15:return e.abrupt("return",a);case 16:case"end":return e.stop()}}),e)}))),Lb.apply(this,arguments)}function jb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;if(!Ub(e))return null;if(t&&!Array.isArray(t))return Fb(t);var n,s=[];(t&&(s=s.concat(t)),null!=i&&i.ignoreRegisteredLoaders)||(n=s).push.apply(n,l(Ib()));!function(e){var t,i=u(e);try{for(i.s();!(t=i.n()).done;){Fb(t.value)}}catch(e){i.e(e)}finally{i.f()}}(s);var o=function(e,t,i,r){var n,s=Vy(e),o=Qy(e),a=Ny(s)||(null==r?void 0:r.url),l=null,c="";null!=i&&i.mimeType&&(l=Vb(t,null==i?void 0:i.mimeType),c="match forced by supplied MIME type ".concat(null==i?void 0:i.mimeType));l=l||function(e,t){var i=t&&Rb.exec(t),r=i&&i[1];return r?function(e,t){t=t.toLowerCase();var i,r=u(e);try{for(r.s();!(i=r.n()).done;){var n,s=i.value,o=u(s.extensions);try{for(o.s();!(n=o.n()).done;){if(n.value.toLowerCase()===t)return s}}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return null}(e,r):null}(t,a),c=c||(l?"matched url ".concat(a):""),l=l||Vb(t,o),c=c||(l?"matched MIME type ".concat(o):""),l=l||function(e,t){if(!t)return null;var i,r=u(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;if("string"==typeof t){if(Qb(t,n))return n}else if(ArrayBuffer.isView(t)){if(Hb(t.buffer,t.byteOffset,n))return n}else if(t instanceof ArrayBuffer){if(Hb(t,0,n))return n}}}catch(e){r.e(e)}finally{r.f()}return null}(t,e),c=c||(l?"matched initial data ".concat(Gb(e)):""),l=l||Vb(t,null==i?void 0:i.fallbackMimeType),c=c||(l?"matched fallback MIME type ".concat(o):""),c&&Db.log(1,"selectLoader selected ".concat(null===(n=l)||void 0===n?void 0:n.name,": ").concat(c,"."));return l}(e,s,i,r);if(!(o||null!=i&&i.nothrow))throw new Error(Nb(e));return o}function Ub(e){return!(e instanceof Response&&204===e.status)}function Nb(e){var t=Vy(e),i=Qy(e),r="No valid loader found (";r+=t?"".concat(ky(t),", "):"no url provided, ",r+="MIME type: ".concat(i?'"'.concat(i,'"'):"not provided",", ");var n=e?Gb(e):"";return r+=n?' first bytes: "'.concat(n,'"'):"first bytes: not available",r+=")"}function Vb(e,t){var i,r=u(e);try{for(r.s();!(i=r.n()).done;){var n=i.value;if(n.mimeTypes&&n.mimeTypes.includes(t))return n;if(t==="application/x.".concat(n.id))return n}}catch(e){r.e(e)}finally{r.f()}return null}function Qb(e,t){return t.testText?t.testText(e):(Array.isArray(t.tests)?t.tests:[t.tests]).some((function(t){return e.startsWith(t)}))}function Hb(e,t,i){return(Array.isArray(i.tests)?i.tests:[i.tests]).some((function(r){return function(e,t,i,r){if(r instanceof ArrayBuffer)return function(e,t,i){if(i=i||e.byteLength,e.byteLength<i||t.byteLength<i)return!1;for(var r=new Uint8Array(e),n=new Uint8Array(t),s=0;s<r.length;++s)if(r[s]!==n[s])return!1;return!0}(r,e,r.byteLength);switch(w(r)){case"function":return r(e,i);case"string":return r===zb(e,t,r.length);default:return!1}}(e,t,i,r)}))}function Gb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return zb(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer){return zb(e,0,t)}return""}function zb(e,t,i){if(e.byteLength<t+i)return"";for(var r=new DataView(e),n="",s=0;s<i;s++)n+=String.fromCharCode(r.getUint8(t+s));return n}var Wb=262144;function Kb(e,i){var r,n,o,a,l;return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=(null==i?void 0:i.chunkSize)||Wb,n=0,o=new TextEncoder;case 3:if(!(n<e.length)){t.next=11;break}return a=Math.min(e.length-n,r),l=e.slice(n,n+a),n+=a,t.next=9,o.encode(l);case 9:t.next=3;break;case 11:case"end":return t.stop()}}),t)}function Xb(){return(Xb=k(s().mark((function e(t,i){var r,n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=(null==i?void 0:i.chunkSize)||1048576,n=0;case 2:if(!(n<t.size)){e.next=12;break}return o=n+r,e.next=6,M(t.slice(n,o).arrayBuffer());case 6:return a=e.sent,n=o,e.next=10,a;case 10:e.next=2;break;case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qb(e,t){return X_?function(e,t){return Yb.apply(this,arguments)}(e,t):function(e,t){return Jb.apply(this,arguments)}(e)}function Yb(){return(Yb=k(s().mark((function e(t,i){var r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.getReader(),e.prev=1;case 2:return o=n||r.read(),null!=i&&i._streamReadAhead&&(n=r.read()),e.next=7,M(o);case 7:if(a=e.sent,l=a.done,u=a.value,!l){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,My(u);case 14:e.next=2;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(1),r.releaseLock();case 21:case"end":return e.stop()}}),e,null,[[1,18]])})))).apply(this,arguments)}function Jb(){return(Jb=k(s().mark((function e(t,i){var r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=!1,n=!1,e.prev=2,a=T(t);case 4:return e.next=6,M(a.next());case 6:if(!(r=!(l=e.sent).done)){e.next=13;break}return u=l.value,e.next=10,My(u);case 10:r=!1,e.next=4;break;case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(2),n=!0,o=e.t0;case 19:if(e.prev=19,e.prev=20,!r||null==a.return){e.next=24;break}return e.next=24,M(a.return());case 24:if(e.prev=24,!n){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(19);case 29:case"end":return e.stop()}}),e,null,[[2,15,19,29],[20,,24,28]])})))).apply(this,arguments)}function Zb(e,t){if("string"==typeof e)return Kb(e,t);if(e instanceof ArrayBuffer)return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s().mark((function i(){var r,n,o,a,l,u;return s().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:r=t.chunkSize,n=void 0===r?262144:r,o=0;case 2:if(!(o<e.byteLength)){i.next=13;break}return a=Math.min(e.byteLength-o,n),l=new ArrayBuffer(a),u=new Uint8Array(e,o,a),new Uint8Array(l).set(u),o+=a,i.next=11,l;case 11:i.next=2;break;case 13:case"end":return i.stop()}}),i)}))()}(e,t);if(Dy(e))return function(e,t){return Xb.apply(this,arguments)}(e,t);if(Ry(e))return qb(e,t);if(Iy(e))return qb(e.body,t);throw new Error("makeIterator")}var $b="Cannot convert supplied data type";function ew(e,t,i){if(t.text&&"string"==typeof e)return e;var r;if((r=e)&&"object"===w(r)&&r.isBuffer&&(e=e.buffer),e instanceof ArrayBuffer){var n=e;return t.text&&!t.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(e)){if(t.text&&!t.binary)return new TextDecoder("utf8").decode(e);var s=e.buffer,o=e.byteLength||e.length;return 0===e.byteOffset&&o===s.byteLength||(s=s.slice(e.byteOffset,e.byteOffset+o)),s}throw new Error($b)}function tw(e,t,i){return iw.apply(this,arguments)}function iw(){return iw=a(s().mark((function e(t,i,r){var n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t instanceof ArrayBuffer||ArrayBuffer.isView(t),"string"!=typeof t&&!n){e.next=3;break}return e.abrupt("return",ew(t,i));case 3:if(!Dy(t)){e.next=7;break}return e.next=6,Gy(t);case 6:t=e.sent;case 7:if(!Iy(t)){e.next=21;break}return o=t,e.next=11,Wy(o);case 11:if(!i.binary){e.next=17;break}return e.next=14,o.arrayBuffer();case 14:e.t0=e.sent,e.next=20;break;case 17:return e.next=19,o.text();case 19:e.t0=e.sent;case 20:return e.abrupt("return",e.t0);case 21:if(Ry(t)&&(t=Zb(t,r)),!((s=t)&&"function"==typeof s[Symbol.iterator]||Fy(t))){e.next=24;break}return e.abrupt("return",xy(t));case 24:throw new Error($b);case 25:case"end":return e.stop()}var s}),e)}))),iw.apply(this,arguments)}function rw(e,t){var i=Cb(),r=e||i;return"function"==typeof r.fetch?r.fetch:Sy(r.fetch)?function(e){return $y(e,r)}:null!=t&&t.fetch?null==t?void 0:t.fetch:$y}function nw(e,t,i){if(i)return i;var r,s,o=n({fetch:rw(t,e)},e);if(o.url){var a=Ny(o.url);o.baseUrl=a,o.queryString=function(e){var t=e.match(Uy);return t&&t[0]}(o.url),o.filename=ky(a),o.baseUrl=(s=(r=a)?r.lastIndexOf("/"):-1)>=0?r.substr(0,s):""}return Array.isArray(o.loaders)||(o.loaders=null),o}function sw(e,t){if(!t&&e&&!Array.isArray(e))return e;var i;if(e&&(i=Array.isArray(e)?e:[e]),t&&t.loaders){var r=Array.isArray(t.loaders)?t.loaders:[t.loaders];i=i?[].concat(l(i),l(r)):r}return i&&i.length?i:null}function ow(e,t,i,r){return aw.apply(this,arguments)}function aw(){return(aw=a(s().mark((function e(t,i,r,n){var o,a,l;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Y_(!n||"object"===w(n)),!i||Array.isArray(i)||Tb(i)||(n=void 0,r=i,i=void 0),e.next=4,t;case 4:return t=e.sent,r=r||{},o=Vy(t),a=sw(i,n),e.next=11,Ob(t,a,r);case 11:if(l=e.sent){e.next=14;break}return e.abrupt("return",null);case 14:return r=Mb(r,l,a,o),n=nw({url:o,parse:ow,loaders:a},r,n||null),e.next=18,lw(l,t,r,n);case 18:return e.abrupt("return",e.sent);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lw(e,t,i,r){return uw.apply(this,arguments)}function uw(){return(uw=a(s().mark((function e(t,i,r,n){var o,a,l,u,c,h,A,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return gy(t),Iy(i)&&(a=(o=i).ok,l=o.redirected,u=o.status,c=o.statusText,h=o.type,A=o.url,d=Object.fromEntries(o.headers.entries()),n.response={headers:d,ok:a,redirected:l,status:u,statusText:c,type:h,url:A}),e.next=4,tw(i,t,r);case 4:if(i=e.sent,!t.parseTextSync||"string"!=typeof i){e.next=8;break}return r.dataType="text",e.abrupt("return",t.parseTextSync(i,r,n,t));case 8:if(!my(t,r)){e.next=12;break}return e.next=11,vy(t,i,r,n,ow);case 11:case 15:case 19:return e.abrupt("return",e.sent);case 12:if(!t.parseText||"string"!=typeof i){e.next=16;break}return e.next=15,t.parseText(i,r,n,t);case 16:if(!t.parse){e.next=20;break}return e.next=19,t.parse(i,r,n,t);case 20:throw Y_(!t.parseSync),new Error("".concat(t.id," loader - no parser found and worker is disabled"));case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cw={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document},hw=cw.global||cw.self||cw.window||{},Aw="object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser,dw="function"==typeof importScripts,pw="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);pw&&parseFloat(pw[1]);var fw=null,gw=Object.freeze({__proto__:null,readFileAsArrayBuffer:null,readFileAsText:null,requireFromFile:fw,requireFromString:null}),mw={};function vw(e){return _w.apply(this,arguments)}function _w(){return _w=a(s().mark((function e(t){var i,r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>2&&void 0!==n[2]?n[2]:{},(i=n.length>1&&void 0!==n[1]?n[1]:null)&&(t=yw(t,i,r)),mw[t]=mw[t]||bw(t),e.next=6,mw[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)}))),_w.apply(this,arguments)}function yw(e,t,i){if(e.startsWith("http"))return e;var r=i.modules||{};return r[e]?r[e]:Aw?i.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(i.CDN.startsWith("http")),"".concat(i.CDN,"/").concat(t,"@").concat("3.4.15","/dist/libs/").concat(e)):dw?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function bw(e){return ww.apply(this,arguments)}function ww(){return(ww=a(s().mark((function e(t){var i,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return i=e.sent,e.next=6,i.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(Aw){e.next=20;break}if(e.prev=8,e.t0=gw&&fw,!e.t0){e.next=14;break}return e.next=13,fw(t);case 13:e.t0=e.sent;case 14:return e.abrupt("return",e.t0);case 17:return e.prev=17,e.t1=e.catch(8),e.abrupt("return",null);case 20:if(!dw){e.next=22;break}return e.abrupt("return",importScripts(t));case 22:return e.next=24,fetch(t);case 24:return r=e.sent,e.next=27,r.text();case 27:return n=e.sent,e.abrupt("return",xw(n,t));case 29:case"end":return e.stop()}}),e,null,[[8,17]])})))).apply(this,arguments)}function xw(e,t){if(!Aw)return null;if(dw)return eval.call(hw,e),null;var i=document.createElement("script");i.id=t;try{i.appendChild(document.createTextNode(e))}catch(t){i.text=e}return document.body.appendChild(i),null}var Bw,Pw,Cw="3.4.15",Mw="https://unpkg.com/@loaders.gl/textures@".concat(Cw,"/dist/libs/basis_encoder.wasm"),kw="https://unpkg.com/@loaders.gl/textures@".concat(Cw,"/dist/libs/basis_encoder.js");function Ew(e){return Sw.apply(this,arguments)}function Sw(){return(Sw=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=t.modules||{}).basis){e.next=3;break}return e.abrupt("return",i.basis);case 3:return Bw=Bw||Tw(t),e.next=6,Bw;case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Tw(e){return Fw.apply(this,arguments)}function Fw(){return(Fw=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null,r=null,e.t0=Promise,e.next=5,vw("basis_transcoder.js","textures",t);case 5:return e.t1=e.sent,e.next=8,vw("basis_transcoder.wasm","textures",t);case 8:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=12,e.t0.all.call(e.t0,e.t3);case 12:return n=e.sent,o=c(n,2),i=o[0],r=o[1],i=i||globalThis.BASIS,e.next=19,Iw(i,r);case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Iw(e,t){var i={};return t&&(i.wasmBinary=t),new Promise((function(t){e(i).then((function(e){var i=e.BasisFile;(0,e.initializeBasis)(),t({BasisFile:i})}))}))}function Dw(e){return Rw.apply(this,arguments)}function Rw(){return(Rw=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(i=t.modules||{}).basisEncoder){e.next=3;break}return e.abrupt("return",i.basisEncoder);case 3:return Pw=Pw||Ow(t),e.next=6,Pw;case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ow(e){return Lw.apply(this,arguments)}function Lw(){return(Lw=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=null,r=null,e.t0=Promise,e.next=5,vw(kw,"textures",t);case 5:return e.t1=e.sent,e.next=8,vw(Mw,"textures",t);case 8:return e.t2=e.sent,e.t3=[e.t1,e.t2],e.next=12,e.t0.all.call(e.t0,e.t3);case 12:return n=e.sent,o=c(n,2),i=o[0],r=o[1],i=i||globalThis.BASIS,e.next=19,jw(i,r);case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jw(e,t){var i={};return t&&(i.wasmBinary=t),new Promise((function(t){e(i).then((function(e){var i=e.BasisFile,r=e.KTX2File,n=e.initializeBasis,s=e.BasisEncoder;n(),t({BasisFile:i,KTX2File:r,BasisEncoder:s})}))}))}var Uw,Nw,Vw,Qw,Hw,Gw,zw,Ww,Kw,Xw=33776,qw=33779,Yw=35840,Jw=35842,Zw=36196,$w=37808,ex=["","WEBKIT_","MOZ_"],tx={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"},ix=null;function rx(e){if(!ix){e=e||function(){try{return document.createElement("canvas").getContext("webgl")}catch(e){return null}}()||void 0,ix=new Set;var t,i=u(ex);try{for(i.s();!(t=i.n()).done;){var r=t.value;for(var n in tx)if(e&&e.getExtension("".concat(r).concat(n))){var s=tx[n];ix.add(s)}}}catch(e){i.e(e)}finally{i.f()}}return ix}(Kw=Uw||(Uw={}))[Kw.NONE=0]="NONE",Kw[Kw.BASISLZ=1]="BASISLZ",Kw[Kw.ZSTD=2]="ZSTD",Kw[Kw.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(Nw||(Nw={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(Vw||(Vw={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(Qw||(Qw={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(Hw||(Hw={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Gw||(Gw={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(zw||(zw={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(Ww||(Ww={}));var nx=[171,75,84,88,32,50,48,187,13,10,26,10];function sx(e){var t=new Uint8Array(e);return!(t.byteLength<nx.length||t[0]!==nx[0]||t[1]!==nx[1]||t[2]!==nx[2]||t[3]!==nx[3]||t[4]!==nx[4]||t[5]!==nx[5]||t[6]!==nx[6]||t[7]!==nx[7]||t[8]!==nx[8]||t[9]!==nx[9]||t[10]!==nx[10]||t[11]!==nx[11])}var ox={etc1:{basisFormat:0,compressed:!0,format:Zw},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:Xw},bc3:{basisFormat:3,compressed:!0,format:qw},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:Yw},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:Jw},"astc-4x4":{basisFormat:10,compressed:!0,format:$w},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};function ax(){return(ax=a(s().mark((function e(t,i){var r,n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("auto"!==i.basis.containerFormat){e.next=11;break}if(!sx(t)){e.next=6;break}return e.next=4,Dw(i);case 4:return r=e.sent,e.abrupt("return",cx(r.KTX2File,t,i));case 6:return e.next=8,Ew(i);case 8:return n=e.sent,o=n.BasisFile,e.abrupt("return",lx(o,t,i));case 11:e.t0=i.basis.module,e.next="encoder"===e.t0?14:(e.t0,22);break;case 14:return e.next=16,Dw(i);case 16:a=e.sent,e.t1=i.basis.containerFormat,e.next="ktx2"===e.t1?20:(e.t1,21);break;case 20:return e.abrupt("return",cx(a.KTX2File,t,i));case 21:return e.abrupt("return",lx(a.BasisFile,t,i));case 22:return e.next=24,Ew(i);case 24:return l=e.sent,u=l.BasisFile,e.abrupt("return",lx(u,t,i));case 27:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function lx(e,t,i){var r=new e(new Uint8Array(t));try{if(!r.startTranscoding())throw new Error("Failed to start basis transcoding");for(var n=r.getNumImages(),s=[],o=0;o<n;o++){for(var a=r.getNumLevels(o),l=[],u=0;u<a;u++)l.push(ux(r,o,u,i));s.push(l)}return s}finally{r.close(),r.delete()}}function ux(e,t,i,r){var n=e.getImageWidth(t,i),s=e.getImageHeight(t,i),o=e.getHasAlpha(),a=Ax(r,o),l=a.compressed,u=a.format,c=a.basisFormat,h=e.getImageTranscodedSizeInBytes(t,i,c),A=new Uint8Array(h);if(!e.transcodeImage(A,t,i,c,0,0))throw new Error("failed to start Basis transcoding");return{width:n,height:s,data:A,compressed:l,format:u,hasAlpha:o}}function cx(e,t,i){var r=new e(new Uint8Array(t));try{if(!r.startTranscoding())throw new Error("failed to start KTX2 transcoding");for(var n=r.getLevels(),s=[],o=0;o<n;o++){s.push(hx(r,o,i));break}return[s]}finally{r.close(),r.delete()}}function hx(e,t,i){var r=e.getImageLevelInfo(t,0,0),n=r.alphaFlag,s=r.height,o=r.width,a=Ax(i,n),l=a.compressed,u=a.format,c=a.basisFormat,h=e.getImageTranscodedSizeInBytes(t,0,0,c),A=new Uint8Array(h);if(!e.transcodeImage(A,t,0,0,c,0,-1,-1))throw new Error("Failed to transcode KTX2 image");return{width:o,height:s,data:A,compressed:l,levelSize:h,hasAlpha:n,format:u}}function Ax(e,t){var i=e&&e.basis&&e.basis.format;return"auto"===i&&(i=dx()),"object"===w(i)&&(i=t?i.alpha:i.noAlpha),i=i.toLowerCase(),ox[i]}function dx(){var e=rx();return e.has("astc")?"astc-4x4":e.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:e.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:e.has("etc1")?"etc1":e.has("etc2")?"etc2":"rgb565"}var px=n(n({},{name:"Basis",id:Aw?"basis":"basis-nodejs",module:"textures",version:"3.4.15",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}}),{},{parse:function(e,t){return ax.apply(this,arguments)}});function fx(e,t){if(!e)throw new Error(t||"loader assertion failed.")}var gx=Boolean("object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser),mx="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);mx&&parseFloat(mx[1]);var vx=globalThis._parseImageNode,_x="undefined"!=typeof Image,yx="undefined"!=typeof ImageBitmap,bx=Boolean(vx),wx=!!gx||bx;function xx(e){var t=function(e){if("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap)return"imagebitmap";if("undefined"!=typeof Image&&e instanceof Image)return"image";if(e&&"object"===w(e)&&e.data&&e.width&&e.height)return"data";return null}(e);if(!t)throw new Error("Not an image");return t}function Bx(e){switch(xx(e)){case"data":return e;case"image":case"imagebitmap":var t=document.createElement("canvas"),i=t.getContext("2d");if(!i)throw new Error("getImageData");return t.width=e.width,t.height=e.height,i.drawImage(e,0,0),i.getImageData(0,0,e.width,e.height);default:throw new Error("getImageData")}}var Px=/^data:image\/svg\+xml/,Cx=/\.svg((\?|#).*)?$/;function Mx(e){return e&&(Px.test(e)||Cx.test(e))}function kx(e,t){if(Mx(t)){var i=(new TextDecoder).decode(e);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(i=unescape(encodeURIComponent(i)))}catch(e){throw new Error(e.message)}return"data:image/svg+xml;base64,".concat(btoa(i))}return Ex(e,t)}function Ex(e,t){if(Mx(t))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(e)])}function Sx(e,t,i){return Tx.apply(this,arguments)}function Tx(){return(Tx=a(s().mark((function e(t,i,r){var n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=kx(t,r),o=self.URL||self.webkitURL,a="string"!=typeof n&&o.createObjectURL(n),e.prev=3,e.next=6,Fx(a||n,i);case 6:return e.abrupt("return",e.sent);case 7:return e.prev=7,a&&o.revokeObjectURL(a),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[3,,7,10]])})))).apply(this,arguments)}function Fx(e,t){return Ix.apply(this,arguments)}function Ix(){return Ix=a(s().mark((function e(t,i){var r;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=new Image).src=t,!(i.image&&i.image.decode&&r.decode)){e.next=6;break}return e.next=5,r.decode();case 5:return e.abrupt("return",r);case 6:return e.next=8,new Promise((function(e,i){try{r.onload=function(){return e(r)},r.onerror=function(e){return i(new Error("Could not load image ".concat(t,": ").concat(e)))}}catch(e){i(e)}}));case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),Ix.apply(this,arguments)}var Dx={},Rx=!0;function Ox(e,t,i){return Lx.apply(this,arguments)}function Lx(){return(Lx=a(s().mark((function e(t,i,r){var n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Mx(r)){e.next=7;break}return e.next=3,Sx(t,i,r);case 3:o=e.sent,n=o,e.next=8;break;case 7:n=Ex(t,r);case 8:return a=i&&i.imagebitmap,e.next=11,jx(n,a);case 11:return e.abrupt("return",e.sent);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jx(e){return Ux.apply(this,arguments)}function Ux(){return Ux=a(s().mark((function e(t){var i,r=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Nx(i=r.length>1&&void 0!==r[1]?r[1]:null)&&Rx||(i=null),!i){e.next=13;break}return e.prev=3,e.next=6,createImageBitmap(t,i);case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(3),console.warn(e.t0),Rx=!1;case 13:return e.next=15,createImageBitmap(t);case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e,null,[[3,9]])}))),Ux.apply(this,arguments)}function Nx(e){for(var t in e||Dx)return!1;return!0}function Vx(e){return function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=(s=t,l(s).map((function(e){return e.charCodeAt(0)}))),n=0;n<r.length;++n)if(r[n]!==e[n+i])return!1;var s;return!0}(e,"ftyp",4)&&96&e[8]?function(e){switch((t=e,i=8,r=12,String.fromCharCode.apply(String,l(t.slice(i,r)))).replace("\0"," ").trim()){case"avif":case"avis":return{extension:"avif",mimeType:"image/avif"};default:return null}var t,i,r}(e):null}var Qx=!1,Hx=!0;function Gx(e){var t=zx(e);return function(e){var t=zx(e),i=t.byteLength>=24&&2303741511===t.getUint32(0,Qx);if(!i)return null;return{mimeType:"image/png",width:t.getUint32(16,Qx),height:t.getUint32(20,Qx)}}(t)||function(e){var t=zx(e),i=t.byteLength>=3&&65496===t.getUint16(0,Qx)&&255===t.getUint8(2);if(!i)return null;var r=function(){for(var e=new Set([65499,65476,65484,65501,65534]),t=65504;t<65520;++t)e.add(t);var i=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:e,sofMarkers:i}}(),n=r.tableMarkers,s=r.sofMarkers,o=2;for(;o+9<t.byteLength;){var a=t.getUint16(o,Qx);if(s.has(a))return{mimeType:"image/jpeg",height:t.getUint16(o+5,Qx),width:t.getUint16(o+7,Qx)};if(!n.has(a))return null;o+=2,o+=t.getUint16(o,Qx)}return null}(t)||function(e){var t=zx(e),i=t.byteLength>=10&&1195984440===t.getUint32(0,Qx);if(!i)return null;return{mimeType:"image/gif",width:t.getUint16(6,Hx),height:t.getUint16(8,Hx)}}(t)||function(e){var t=zx(e),i=t.byteLength>=14&&16973===t.getUint16(0,Qx)&&t.getUint32(2,Hx)===t.byteLength;if(!i)return null;return{mimeType:"image/bmp",width:t.getUint32(18,Hx),height:t.getUint32(22,Hx)}}(t)||function(e){var t=new Uint8Array(e instanceof DataView?e.buffer:e),i=Vx(t);if(!i)return null;return{mimeType:i.mimeType,width:0,height:0}}(t)}function zx(e){if(e instanceof DataView)return e;if(ArrayBuffer.isView(e))return new DataView(e.buffer);if(e instanceof ArrayBuffer)return new DataView(e);throw new Error("toDataView")}function Wx(e,t){return Kx.apply(this,arguments)}function Kx(){return Kx=a(s().mark((function e(t,i){var r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=Gx(t)||{},n=r.mimeType,fx(o=globalThis._parseImageNode),e.next=5,o(t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)}))),Kx.apply(this,arguments)}function Xx(){return(Xx=a(s().mark((function e(t,i,r){var n,o,a,l,u;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(i=i||{}).image||{},o=n.type||"auto",a=(r||{}).url,l=qx(o),e.t0=l,e.next="imagebitmap"===e.t0?8:"image"===e.t0?12:"data"===e.t0?16:20;break;case 8:return e.next=10,Ox(t,i,a);case 10:return u=e.sent,e.abrupt("break",21);case 12:return e.next=14,Sx(t,i,a);case 14:return u=e.sent,e.abrupt("break",21);case 16:return e.next=18,Wx(t);case 18:return u=e.sent,e.abrupt("break",21);case 20:fx(!1);case 21:return"data"===o&&(u=Bx(u)),e.abrupt("return",u);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function qx(e){switch(e){case"auto":case"data":return function(){if(yx)return"imagebitmap";if(_x)return"image";if(wx)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(e){switch(e){case"auto":return yx||_x||wx;case"imagebitmap":return yx;case"image":return _x;case"data":return wx;default:throw new Error("@loaders.gl/images: image ".concat(e," not supported in this environment"))}}(e),e}}var Yx={id:"image",module:"images",name:"Images",version:"3.4.15",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/avif","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg","avif"],parse:function(e,t,i){return Xx.apply(this,arguments)},tests:[function(e){return Boolean(Gx(new DataView(e)))}],options:{image:{type:"auto",decode:!0}}},Jx={};function Zx(e){if(void 0===Jx[e]){var t=gx?function(e){switch(e){case"image/avif":case"image/webp":return function(e){try{return 0===document.createElement("canvas").toDataURL(e).indexOf("data:".concat(e))}catch(e){return!1}}(e);default:return!0}}(e):function(e){var t=["image/png","image/jpeg","image/gif"],i=globalThis._parseImageNode,r=globalThis._imageFormatsNode,n=void 0===r?t:r;return Boolean(i)&&n.includes(e)}(e);Jx[e]=t}return Jx[e]}function $x(e,t){if(!e)throw new Error(t||"loader assertion failed.")}function eB(e,t,i){if(e.byteLength<=t+i)return"";for(var r=new DataView(e),n="",s=0;s<i;s++)n+=String.fromCharCode(r.getUint8(t+s));return n}function tB(e){try{return JSON.parse(e)}catch(t){throw new Error('Failed to parse JSON from data starting with "'.concat(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;if("string"==typeof e)return e.slice(0,t);if(ArrayBuffer.isView(e))return eB(e.buffer,e.byteOffset,t);if(e instanceof ArrayBuffer)return eB(e,0,t);return""}(e),'"'))}}function iB(e,t,i){var r=void 0!==i?new Uint8Array(e).subarray(t,t+i):new Uint8Array(e).subarray(t);return new Uint8Array(r).buffer}function rB(e,t){return $x(e>=0),$x(t>0),e+(t-1)&~(t-1)}function nB(e,t,i){var r;if(e instanceof ArrayBuffer)r=new Uint8Array(e);else{var n=e.byteOffset,s=e.byteLength;r=new Uint8Array(e.buffer||e.arrayBuffer,n,s)}return t.set(r,i),i+rB(r.byteLength,4)}function sB(e,t){if(!e)throw new Error(t||"assert failed: gltf")}function oB(e,t){if(e.startsWith("data:")||e.startsWith("http:")||e.startsWith("https:"))return e;var i=t.baseUri||t.uri;if(!i)throw new Error("'baseUri' must be provided to resolve relative url ".concat(e));return i.substr(0,i.lastIndexOf("/")+1)+e}function aB(e,t,i){var r=e.bufferViews[i];sB(r);var n=t[r.buffer];sB(n);var s=(r.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,s,r.byteLength)}var lB=["SCALAR","VEC2","VEC3","VEC4"],uB=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],cB=new Map(uB),hB={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},AB={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},dB={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function pB(e){return lB[e-1]||lB[0]}function fB(e){var t=cB.get(e.constructor);if(!t)throw new Error("Illegal typed array");return t}function gB(e,t){var i=dB[e.componentType],r=hB[e.type],n=AB[e.componentType],s=e.count*r,o=e.count*r*n;return sB(o>=0&&o<=t.byteLength),{ArrayType:i,length:s,byteLength:o}}var mB,vB={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]},_B=function(){return P((function e(t){x(this,e),iy(this,"gltf",void 0),iy(this,"sourceBuffers",void 0),iy(this,"byteLength",void 0),this.gltf=t||{json:n({},vB),buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}),[{key:"json",get:function(){return this.gltf.json}},{key:"getApplicationData",value:function(e){return this.json[e]}},{key:"getExtraData",value:function(e){return(this.json.extras||{})[e]}},{key:"getExtension",value:function(e){var t=this.getUsedExtensions().find((function(t){return t===e})),i=this.json.extensions||{};return t?i[e]||!0:null}},{key:"getRequiredExtension",value:function(e){var t=this.getRequiredExtensions().find((function(t){return t===e}));return t?this.getExtension(e):null}},{key:"getRequiredExtensions",value:function(){return this.json.extensionsRequired||[]}},{key:"getUsedExtensions",value:function(){return this.json.extensionsUsed||[]}},{key:"getRemovedExtensions",value:function(){return this.json.extensionsRemoved||[]}},{key:"getObjectExtension",value:function(e,t){return(e.extensions||{})[t]}},{key:"getScene",value:function(e){return this.getObject("scenes",e)}},{key:"getNode",value:function(e){return this.getObject("nodes",e)}},{key:"getSkin",value:function(e){return this.getObject("skins",e)}},{key:"getMesh",value:function(e){return this.getObject("meshes",e)}},{key:"getMaterial",value:function(e){return this.getObject("materials",e)}},{key:"getAccessor",value:function(e){return this.getObject("accessors",e)}},{key:"getTexture",value:function(e){return this.getObject("textures",e)}},{key:"getSampler",value:function(e){return this.getObject("samplers",e)}},{key:"getImage",value:function(e){return this.getObject("images",e)}},{key:"getBufferView",value:function(e){return this.getObject("bufferViews",e)}},{key:"getBuffer",value:function(e){return this.getObject("buffers",e)}},{key:"getObject",value:function(e,t){if("object"===w(t))return t;var i=this.json[e]&&this.json[e][t];if(!i)throw new Error("glTF file error: Could not find ".concat(e,"[").concat(t,"]"));return i}},{key:"getTypedArrayForBufferView",value:function(e){var t=(e=this.getBufferView(e)).buffer,i=this.gltf.buffers[t];sB(i);var r=(e.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,r,e.byteLength)}},{key:"getTypedArrayForAccessor",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),i=this.getBuffer(t.buffer).data,r=gB(e,t),n=r.ArrayType,s=r.length;return new n(i,t.byteOffset+e.byteOffset,s)}},{key:"getTypedArrayForImageData",value:function(e){e=this.getAccessor(e);var t=this.getBufferView(e.bufferView),i=this.getBuffer(t.buffer).data,r=t.byteOffset||0;return new Uint8Array(i,r,t.byteLength)}},{key:"addApplicationData",value:function(e,t){return this.json[e]=t,this}},{key:"addExtraData",value:function(e,t){return this.json.extras=this.json.extras||{},this.json.extras[e]=t,this}},{key:"addObjectExtension",value:function(e,t,i){return e.extensions=e.extensions||{},e.extensions[t]=i,this.registerUsedExtension(t),this}},{key:"setObjectExtension",value:function(e,t,i){(e.extensions||{})[t]=i}},{key:"removeObjectExtension",value:function(e,t){var i=e.extensions||{},r=i[t];return delete i[t],r}},{key:"addExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sB(t),this.json.extensions=this.json.extensions||{},this.json.extensions[e]=t,this.registerUsedExtension(e),t}},{key:"addRequiredExtension",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sB(t),this.addExtension(e,t),this.registerRequiredExtension(e),t}},{key:"registerUsedExtension",value:function(e){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((function(t){return t===e}))||this.json.extensionsUsed.push(e)}},{key:"registerRequiredExtension",value:function(e){this.registerUsedExtension(e),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((function(t){return t===e}))||this.json.extensionsRequired.push(e)}},{key:"removeExtension",value:function(e){if(this.getExtension(e)){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,e),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,e),this.json.extensions&&delete this.json.extensions[e],Array.isArray(this.json.extensionsRemoved)||(this.json.extensionsRemoved=[]);var t=this.json.extensionsRemoved;t.includes(e)||t.push(e)}}},{key:"setDefaultScene",value:function(e){this.json.scene=e}},{key:"addScene",value:function(e){var t=e.nodeIndices;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:t}),this.json.scenes.length-1}},{key:"addNode",value:function(e){var t=e.meshIndex,i=e.matrix;this.json.nodes=this.json.nodes||[];var r={mesh:t};return i&&(r.matrix=i),this.json.nodes.push(r),this.json.nodes.length-1}},{key:"addMesh",value:function(e){var t=e.attributes,i=e.indices,r=e.material,n=e.mode,s=void 0===n?4:n,o={primitives:[{attributes:this._addAttributes(t),mode:s}]};if(i){var a=this._addIndices(i);o.primitives[0].indices=a}return Number.isFinite(r)&&(o.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}},{key:"addPointCloud",value:function(e){var t={primitives:[{attributes:this._addAttributes(e),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(t),this.json.meshes.length-1}},{key:"addImage",value:function(e,t){var i=Gx(e),r=t||(null==i?void 0:i.mimeType),n={bufferView:this.addBufferView(e),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(n),this.json.images.length-1}},{key:"addBufferView",value:function(e){var t=e.byteLength;sB(Number.isFinite(t)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(e);var i={buffer:0,byteOffset:this.byteLength,byteLength:t};return this.byteLength+=rB(t,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(i),this.json.bufferViews.length-1}},{key:"addAccessor",value:function(e,t){var i={bufferView:e,type:pB(t.size),componentType:t.componentType,count:t.count,max:t.max,min:t.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(i),this.json.accessors.length-1}},{key:"addBinaryBuffer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{size:3},i=this.addBufferView(e),r={min:t.min,max:t.max};r.min&&r.max||(r=this._getAccessorMinMax(e,t.size));var n={size:t.size,componentType:fB(e),count:Math.round(e.length/t.size),min:r.min,max:r.max};return this.addAccessor(i,Object.assign(n,t))}},{key:"addTexture",value:function(e){var t={source:e.imageIndex};return this.json.textures=this.json.textures||[],this.json.textures.push(t),this.json.textures.length-1}},{key:"addMaterial",value:function(e){return this.json.materials=this.json.materials||[],this.json.materials.push(e),this.json.materials.length-1}},{key:"createBinaryChunk",value:function(){var e,t;this.gltf.buffers=[];var i,r=this.byteLength,n=new ArrayBuffer(r),s=new Uint8Array(n),o=0,a=u(this.sourceBuffers||[]);try{for(a.s();!(i=a.n()).done;){o=nB(i.value,s,o)}}catch(e){a.e(e)}finally{a.f()}null!==(e=this.json)&&void 0!==e&&null!==(t=e.buffers)&&void 0!==t&&t[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}},{key:"_removeStringFromArray",value:function(e,t){for(var i=!0;i;){var r=e.indexOf(t);r>-1?e.splice(r,1):i=!1}}},{key:"_addAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};for(var i in e){var r=e[i],n=this._getGltfAttributeName(i),s=this.addBinaryBuffer(r.value,r);t[n]=s}return t}},{key:"_addIndices",value:function(e){return this.addBinaryBuffer(e,{size:1})}},{key:"_getGltfAttributeName",value:function(e){switch(e.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return e}}},{key:"_getAccessorMinMax",value:function(e,t){var i={min:null,max:null};if(e.length<t)return i;i.min=[],i.max=[];var r,n=u(e.subarray(0,t));try{for(n.s();!(r=n.n()).done;){var s=r.value;i.min.push(s),i.max.push(s)}}catch(e){n.e(e)}finally{n.f()}for(var o=t;o<e.length;o+=t)for(var a=0;a<t;a++)i.min[0+a]=Math.min(i.min[0+a],e[o+a]),i.max[0+a]=Math.max(i.max[0+a],e[o+a]);return i}}])}(),yB=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]),bB=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]),wB={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},xB={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};function BB(e,t,i,r,n){return PB.apply(this,arguments)}function PB(){return PB=a(s().mark((function e(t,i,r,n,o){var a,l,u=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=u.length>5&&void 0!==u[5]?u[5]:"NONE",e.next=3,CB();case 3:TB(l=e.sent,l.exports[xB[o]],t,i,r,n,l.exports[wB[a||"NONE"]]);case 5:case"end":return e.stop()}}),e)}))),PB.apply(this,arguments)}function CB(){return MB.apply(this,arguments)}function MB(){return(MB=a(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return mB||(mB=kB()),e.abrupt("return",mB);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kB(){return EB.apply(this,arguments)}function EB(){return(EB=a(s().mark((function e(){var t,i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREE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L9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",console.log("Warning: meshopt_decoder is using experimental SIMD support")),e.next=4,WebAssembly.instantiate(SB(t),{});case 4:return i=e.sent,e.next=7,i.instance.exports.__wasm_call_ctors();case 7:return e.abrupt("return",i.instance);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function SB(e){for(var t=new Uint8Array(e.length),i=0;i<e.length;++i){var r=e.charCodeAt(i);t[i]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}for(var n=0,s=0;s<e.length;++s)t[n++]=t[s]<60?bB[t[s]]:64*(t[s]-60)+t[++s];return t.buffer.slice(0,n)}function TB(e,t,i,r,n,s,o){var a=e.exports.sbrk,l=r+3&-4,u=a(l*n),c=a(s.length),h=new Uint8Array(e.exports.memory.buffer);h.set(s,c);var A=t(u,r,n,c,s.length);if(0===A&&o&&o(u,l,n),i.set(h.subarray(u,u+r*n)),a(u-a(0)),0!==A)throw new Error("Malformed buffer data: ".concat(A))}var FB="EXT_meshopt_compression",IB=FB;function DB(){return(DB=a(s().mark((function e(t,i){var r,n,o,a,l,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=new _B(t),null!=i&&null!==(r=i.gltf)&&void 0!==r&&r.decompressMeshes){e.next=3;break}return e.abrupt("return");case 3:o=[],a=u(t.json.bufferViews||[]);try{for(a.s();!(l=a.n()).done;)c=l.value,o.push(RB(n,c))}catch(e){a.e(e)}finally{a.f()}return e.next=8,Promise.all(o);case 8:n.removeExtension(FB);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function RB(e,t){return OB.apply(this,arguments)}function OB(){return(OB=a(s().mark((function e(t,i){var r,n,o,a,l,u,c,h,A,d,p,f,g,m;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t.getObjectExtension(i,FB))){e.next=9;break}return n=r.byteOffset,o=void 0===n?0:n,a=r.byteLength,l=void 0===a?0:a,u=r.byteStride,c=r.count,h=r.mode,A=r.filter,d=void 0===A?"NONE":A,p=r.buffer,f=t.gltf.buffers[p],g=new Uint8Array(f.arrayBuffer,f.byteOffset+o,l),m=new Uint8Array(t.gltf.buffers[i.buffer].arrayBuffer,i.byteOffset,i.byteLength),e.next=8,BB(m,c,u,g,h,d);case 8:return e.abrupt("return",m);case 9:return e.abrupt("return",null);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var LB=Object.freeze({__proto__:null,name:IB,decode:function(e,t){return DB.apply(this,arguments)}}),jB="EXT_texture_webp",UB=jB;var NB=Object.freeze({__proto__:null,name:UB,preprocess:function(e,t){var i=new _B(e);if(Zx("image/webp")){var r,n=u(i.json.textures||[]);try{for(n.s();!(r=n.n()).done;){var s=r.value,o=i.getObjectExtension(s,jB);o&&(s.source=o.source),i.removeObjectExtension(s,jB)}}catch(e){n.e(e)}finally{n.f()}i.removeExtension(jB)}else if(i.getRequiredExtensions().includes(jB))throw new Error("gltf: Required extension ".concat(jB," not supported by browser"))}}),VB="KHR_texture_basisu",QB=VB;var HB=Object.freeze({__proto__:null,name:QB,preprocess:function(e,t){var i,r=new _B(e),n=u(r.json.textures||[]);try{for(n.s();!(i=n.n()).done;){var s=i.value,o=r.getObjectExtension(s,VB);o&&(s.source=o.source),r.removeObjectExtension(s,VB)}}catch(e){n.e(e)}finally{n.f()}r.removeExtension(VB)}});var GB={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:"undefined"!=typeof global&&global,document:"undefined"!=typeof document&&document},zB=GB.global||GB.self||GB.window||{},WB="object"!==("undefined"==typeof process?"undefined":w(process))||"[object process]"!==String(process)||process.browser,KB="function"==typeof importScripts,XB="undefined"!=typeof process&&process.version&&/v([0-9]*)/.exec(process.version);XB&&parseFloat(XB[1]);var qB=null,YB=Object.freeze({__proto__:null,readFileAsArrayBuffer:null,readFileAsText:null,requireFromFile:qB,requireFromString:null}),JB={};function ZB(e){return $B.apply(this,arguments)}function $B(){return $B=a(s().mark((function e(t){var i,r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>2&&void 0!==n[2]?n[2]:{},(i=n.length>1&&void 0!==n[1]?n[1]:null)&&(t=eP(t,i,r)),JB[t]=JB[t]||tP(t),e.next=6,JB[t];case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e)}))),$B.apply(this,arguments)}function eP(e,t,i){if(e.startsWith("http"))return e;var r=i.modules||{};return r[e]?r[e]:WB?i.CDN?(function(e,t){if(!e)throw new Error(t||"loaders.gl assertion failed.")}(i.CDN.startsWith("http")),"".concat(i.CDN,"/").concat(t,"@").concat("3.4.15","/dist/libs/").concat(e)):KB?"../src/libs/".concat(e):"modules/".concat(t,"/src/libs/").concat(e):"modules/".concat(t,"/dist/libs/").concat(e)}function tP(e){return iP.apply(this,arguments)}function iP(){return(iP=a(s().mark((function e(t){var i,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.endsWith("wasm")){e.next=7;break}return e.next=3,fetch(t);case 3:return i=e.sent,e.next=6,i.arrayBuffer();case 6:return e.abrupt("return",e.sent);case 7:if(WB){e.next=20;break}if(e.prev=8,e.t0=YB&&qB,!e.t0){e.next=14;break}return e.next=13,qB(t);case 13:e.t0=e.sent;case 14:return e.abrupt("return",e.t0);case 17:return e.prev=17,e.t1=e.catch(8),e.abrupt("return",null);case 20:if(!KB){e.next=22;break}return e.abrupt("return",importScripts(t));case 22:return e.next=24,fetch(t);case 24:return r=e.sent,e.next=27,r.text();case 27:return n=e.sent,e.abrupt("return",rP(n,t));case 29:case"end":return e.stop()}}),e,null,[[8,17]])})))).apply(this,arguments)}function rP(e,t){if(!WB)return null;if(KB)return eval.call(zB,e),null;var i=document.createElement("script");i.id=t;try{i.appendChild(document.createTextNode(e))}catch(t){i.text=e}return document.body.appendChild(i),null}var nP={draco:{decoderType:"object"===("undefined"==typeof WebAssembly?"undefined":w(WebAssembly))?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}},sP={name:"Draco",id:WB?"draco":"draco-nodejs",module:"draco",shapes:["mesh"],version:"3.4.15",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:nP};var oP=function(){function e(t,i){x(this,e),iy(this,"fields",void 0),iy(this,"metadata",void 0),function(e,t){if(!e)throw new Error(t||"loader assertion failed.")}(Array.isArray(t)),function(e){var t,i={},r=u(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;i[n.name]&&console.warn("Schema: duplicated field name",n.name,n),i[n.name]=!0}}catch(e){r.e(e)}finally{r.f()}}(t),this.fields=t,this.metadata=i||new Map}return P(e,[{key:"compareTo",value:function(e){if(this.metadata!==e.metadata)return!1;if(this.fields.length!==e.fields.length)return!1;for(var t=0;t<this.fields.length;++t)if(!this.fields[t].compareTo(e.fields[t]))return!1;return!0}},{key:"select",value:function(){for(var t=Object.create(null),i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];for(var s=0,o=r;s<o.length;s++){var a=o[s];t[a]=!0}return new e(this.fields.filter((function(e){return t[e.name]})),this.metadata)}},{key:"selectAt",value:function(){for(var t=this,i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return new e(r.map((function(e){return t.fields[e]})).filter(Boolean),this.metadata)}},{key:"assign",value:function(t){var i,r=this.metadata;if(t instanceof e){var n=t;i=n.fields,r=aP(aP(new Map,this.metadata),n.metadata)}else i=t;var s,o=Object.create(null),a=u(this.fields);try{for(a.s();!(s=a.n()).done;){var l=s.value;o[l.name]=l}}catch(e){a.e(e)}finally{a.f()}var c,h=u(i);try{for(h.s();!(c=h.n()).done;){var A=c.value;o[A.name]=A}}catch(e){h.e(e)}finally{h.f()}return new e(Object.values(o),r)}}])}();function aP(e,t){return new Map([].concat(l(e||new Map),l(t||new Map)))}var lP=function(){function e(t,i){x(this,e);var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Map;iy(this,"name",void 0),iy(this,"type",void 0),iy(this,"nullable",void 0),iy(this,"metadata",void 0),this.name=t,this.type=i,this.nullable=r,this.metadata=n}return P(e,[{key:"typeId",get:function(){return this.type&&this.type.typeId}},{key:"clone",value:function(){return new e(this.name,this.type,this.nullable,this.metadata)}},{key:"compareTo",value:function(e){return this.name===e.name&&this.type===e.type&&this.nullable===e.nullable&&this.metadata===e.metadata}},{key:"toString",value:function(){return"".concat(this.type).concat(this.nullable?", nullable":"").concat(this.metadata?", metadata: ".concat(this.metadata):"")}}])}(),uP=function(e){return e[e.NONE=0]="NONE",e[e.Null=1]="Null",e[e.Int=2]="Int",e[e.Float=3]="Float",e[e.Binary=4]="Binary",e[e.Utf8=5]="Utf8",e[e.Bool=6]="Bool",e[e.Decimal=7]="Decimal",e[e.Date=8]="Date",e[e.Time=9]="Time",e[e.Timestamp=10]="Timestamp",e[e.Interval=11]="Interval",e[e.List=12]="List",e[e.Struct=13]="Struct",e[e.Union=14]="Union",e[e.FixedSizeBinary=15]="FixedSizeBinary",e[e.FixedSizeList=16]="FixedSizeList",e[e.Map=17]="Map",e[e.Dictionary=-1]="Dictionary",e[e.Int8=-2]="Int8",e[e.Int16=-3]="Int16",e[e.Int32=-4]="Int32",e[e.Int64=-5]="Int64",e[e.Uint8=-6]="Uint8",e[e.Uint16=-7]="Uint16",e[e.Uint32=-8]="Uint32",e[e.Uint64=-9]="Uint64",e[e.Float16=-10]="Float16",e[e.Float32=-11]="Float32",e[e.Float64=-12]="Float64",e[e.DateDay=-13]="DateDay",e[e.DateMillisecond=-14]="DateMillisecond",e[e.TimestampSecond=-15]="TimestampSecond",e[e.TimestampMillisecond=-16]="TimestampMillisecond",e[e.TimestampMicrosecond=-17]="TimestampMicrosecond",e[e.TimestampNanosecond=-18]="TimestampNanosecond",e[e.TimeSecond=-19]="TimeSecond",e[e.TimeMillisecond=-20]="TimeMillisecond",e[e.TimeMicrosecond=-21]="TimeMicrosecond",e[e.TimeNanosecond=-22]="TimeNanosecond",e[e.DenseUnion=-23]="DenseUnion",e[e.SparseUnion=-24]="SparseUnion",e[e.IntervalDayTime=-25]="IntervalDayTime",e[e.IntervalYearMonth=-26]="IntervalYearMonth",e}({}),cP=function(){return P((function e(){x(this,e)}),[{key:"typeId",get:function(){return uP.NONE}},{key:"compareTo",value:function(e){return this===e}}],[{key:"isNull",value:function(e){return e&&e.typeId===uP.Null}},{key:"isInt",value:function(e){return e&&e.typeId===uP.Int}},{key:"isFloat",value:function(e){return e&&e.typeId===uP.Float}},{key:"isBinary",value:function(e){return e&&e.typeId===uP.Binary}},{key:"isUtf8",value:function(e){return e&&e.typeId===uP.Utf8}},{key:"isBool",value:function(e){return e&&e.typeId===uP.Bool}},{key:"isDecimal",value:function(e){return e&&e.typeId===uP.Decimal}},{key:"isDate",value:function(e){return e&&e.typeId===uP.Date}},{key:"isTime",value:function(e){return e&&e.typeId===uP.Time}},{key:"isTimestamp",value:function(e){return e&&e.typeId===uP.Timestamp}},{key:"isInterval",value:function(e){return e&&e.typeId===uP.Interval}},{key:"isList",value:function(e){return e&&e.typeId===uP.List}},{key:"isStruct",value:function(e){return e&&e.typeId===uP.Struct}},{key:"isUnion",value:function(e){return e&&e.typeId===uP.Union}},{key:"isFixedSizeBinary",value:function(e){return e&&e.typeId===uP.FixedSizeBinary}},{key:"isFixedSizeList",value:function(e){return e&&e.typeId===uP.FixedSizeList}},{key:"isMap",value:function(e){return e&&e.typeId===uP.Map}},{key:"isDictionary",value:function(e){return e&&e.typeId===uP.Dictionary}}])}(),hP=function(e,t){function i(e,t){var r;return x(this,i),iy(r=d(this,i),"isSigned",void 0),iy(r,"bitWidth",void 0),r.isSigned=e,r.bitWidth=t,r}return _(i,cP),P(i,[{key:"typeId",get:function(){return uP.Int}},{key:t,get:function(){return"Int"}},{key:"toString",value:function(){return"".concat(this.isSigned?"I":"Ui","nt").concat(this.bitWidth)}}])}(0,Symbol.toStringTag),AP=function(){function e(){return x(this,e),d(this,e,[!0,8])}return _(e,hP),P(e)}(),dP=function(){function e(){return x(this,e),d(this,e,[!0,16])}return _(e,hP),P(e)}(),pP=function(){function e(){return x(this,e),d(this,e,[!0,32])}return _(e,hP),P(e)}(),fP=function(){function e(){return x(this,e),d(this,e,[!1,8])}return _(e,hP),P(e)}(),gP=function(){function e(){return x(this,e),d(this,e,[!1,16])}return _(e,hP),P(e)}(),mP=function(){function e(){return x(this,e),d(this,e,[!1,32])}return _(e,hP),P(e)}(),vP=32,_P=64,yP=function(e,t){function i(e){var t;return x(this,i),iy(t=d(this,i),"precision",void 0),t.precision=e,t}return _(i,cP),P(i,[{key:"typeId",get:function(){return uP.Float}},{key:t,get:function(){return"Float"}},{key:"toString",value:function(){return"Float".concat(this.precision)}}])}(0,Symbol.toStringTag),bP=function(){function e(){return x(this,e),d(this,e,[vP])}return _(e,yP),P(e)}(),wP=function(){function e(){return x(this,e),d(this,e,[_P])}return _(e,yP),P(e)}(),xP=function(e,t){function i(e,t){var r;return x(this,i),iy(r=d(this,i),"listSize",void 0),iy(r,"children",void 0),r.listSize=e,r.children=[t],r}return _(i,cP),P(i,[{key:"typeId",get:function(){return uP.FixedSizeList}},{key:"valueType",get:function(){return this.children[0].type}},{key:"valueField",get:function(){return this.children[0]}},{key:t,get:function(){return"FixedSizeList"}},{key:"toString",value:function(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">")}}])}(0,Symbol.toStringTag);function BP(e,t,i){var r=function(e){switch(e.constructor){case Int8Array:return new AP;case Uint8Array:return new fP;case Int16Array:return new dP;case Uint16Array:return new gP;case Int32Array:return new pP;case Uint32Array:return new mP;case Float32Array:return new bP;case Float64Array:return new wP;default:throw new Error("array type not supported")}}(t.value),n=i||function(e){var t=new Map;"byteOffset"in e&&t.set("byteOffset",e.byteOffset.toString(10));"byteStride"in e&&t.set("byteStride",e.byteStride.toString(10));"normalized"in e&&t.set("normalized",e.normalized.toString());return t}(t);return new lP(e,new xP(t.size,new lP("value",r)),!1,n)}function PP(e,t,i){return BP(e,t,i?CP(i.metadata):void 0)}function CP(e){var t=new Map;for(var i in e)t.set("".concat(i,".string"),JSON.stringify(e[i]));return t}var MP={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},kP={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array},EP=function(){return P((function e(t){x(this,e),iy(this,"draco",void 0),iy(this,"decoder",void 0),iy(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}),[{key:"destroy",value:function(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}},{key:"parseSync",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new this.draco.DecoderBuffer;i.Init(new Int8Array(e),e.byteLength),this._disableAttributeTransforms(t);var r=this.decoder.GetEncodedGeometryType(i),s=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{var o;switch(r){case this.draco.TRIANGULAR_MESH:o=this.decoder.DecodeBufferToMesh(i,s);break;case this.draco.POINT_CLOUD:o=this.decoder.DecodeBufferToPointCloud(i,s);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!o.ok()||!s.ptr){var a="DRACO decompression failed: ".concat(o.error_msg());throw new Error(a)}var l=this._getDracoLoaderData(s,r,t),u=this._getMeshData(s,l,t),c=function(e){for(var t=1/0,i=1/0,r=1/0,n=-1/0,s=-1/0,o=-1/0,a=e.POSITION?e.POSITION.value:[],l=a&&a.length,u=0;u<l;u+=3){var c=a[u],h=a[u+1],A=a[u+2];t=c<t?c:t,i=h<i?h:i,r=A<r?A:r,n=c>n?c:n,s=h>s?h:s,o=A>o?A:o}return[[t,i,r],[n,s,o]]}(u.attributes),h=function(e,t,i){var r=CP(t.metadata),n=[],s=function(e){var t={};for(var i in e){var r=e[i];t[r.name||"undefined"]=r}return t}(t.attributes);for(var o in e){var a=PP(o,e[o],s[o]);n.push(a)}if(i){var l=PP("indices",i);n.push(l)}return new oP(n,r)}(u.attributes,l,u.indices);return n(n({loader:"draco",loaderData:l,header:{vertexCount:s.num_points(),boundingBox:c}},u),{},{schema:h})}finally{this.draco.destroy(i),s&&this.draco.destroy(s)}}},{key:"_getDracoLoaderData",value:function(e,t,i){var r=this._getTopLevelMetadata(e),n=this._getDracoAttributes(e,i);return{geometry_type:t,num_attributes:e.num_attributes(),num_points:e.num_points(),num_faces:e instanceof this.draco.Mesh?e.num_faces():0,metadata:r,attributes:n}}},{key:"_getDracoAttributes",value:function(e,t){for(var i={},r=0;r<e.num_attributes();r++){var n=this.decoder.GetAttribute(e,r),s=this._getAttributeMetadata(e,r);i[n.unique_id()]={unique_id:n.unique_id(),attribute_type:n.attribute_type(),data_type:n.data_type(),num_components:n.num_components(),byte_offset:n.byte_offset(),byte_stride:n.byte_stride(),normalized:n.normalized(),attribute_index:r,metadata:s};var o=this._getQuantizationTransform(n,t);o&&(i[n.unique_id()].quantization_transform=o);var a=this._getOctahedronTransform(n,t);a&&(i[n.unique_id()].octahedron_transform=a)}return i}},{key:"_getMeshData",value:function(e,t,i){var r=this._getMeshAttributes(t,e,i);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");return e instanceof this.draco.Mesh?"triangle-strip"===i.topology?{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(e),size:1}}:{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(e),size:1}}:{topology:"point-list",mode:0,attributes:r}}},{key:"_getMeshAttributes",value:function(e,t,i){for(var r={},n=0,s=Object.values(e.attributes);n<s.length;n++){var o=s[n],a=this._deduceAttributeName(o,i);o.name=a;var l=this._getAttributeValues(t,o),u=l.value,c=l.size;r[a]={value:u,size:c,byteOffset:o.byte_offset,byteStride:o.byte_stride,normalized:o.normalized}}return r}},{key:"_getTriangleListIndices",value:function(e){var t=3*e.num_faces(),i=4*t,r=this.draco._malloc(i);try{return this.decoder.GetTrianglesUInt32Array(e,i,r),new Uint32Array(this.draco.HEAPF32.buffer,r,t).slice()}finally{this.draco._free(r)}}},{key:"_getTriangleStripIndices",value:function(e){var t=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(e,t),function(e){for(var t=e.size(),i=new Int32Array(t),r=0;r<t;r++)i[r]=e.GetValue(r);return i}(t)}finally{this.draco.destroy(t)}}},{key:"_getAttributeValues",value:function(e,t){var i,r=kP[t.data_type],n=t.num_components,s=e.num_points()*n,o=s*r.BYTES_PER_ELEMENT,a=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;default:return e.DT_INVALID}}(this.draco,r),l=this.draco._malloc(o);try{var u=this.decoder.GetAttribute(e,t.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(e,u,a,o,l),i=new r(this.draco.HEAPF32.buffer,l,s).slice()}finally{this.draco._free(l)}return{value:i,size:n}}},{key:"_deduceAttributeName",value:function(e,t){for(var i=e.unique_id,r=0,n=Object.entries(t.extraAttributes||{});r<n.length;r++){var s=c(n[r],2),o=s[0];if(s[1]===i)return o}var a=e.attribute_type;for(var l in MP){if(this.draco[l]===a)return MP[l]}var u=t.attributeNameEntry||"name";return e.metadata[u]?e.metadata[u].string:"CUSTOM_ATTRIBUTE_".concat(i)}},{key:"_getTopLevelMetadata",value:function(e){var t=this.decoder.GetMetadata(e);return this._getDracoMetadata(t)}},{key:"_getAttributeMetadata",value:function(e,t){var i=this.decoder.GetAttributeMetadata(e,t);return this._getDracoMetadata(i)}},{key:"_getDracoMetadata",value:function(e){if(!e||!e.ptr)return{};for(var t={},i=this.metadataQuerier.NumEntries(e),r=0;r<i;r++){var n=this.metadataQuerier.GetEntryName(e,r);t[n]=this._getDracoMetadataField(e,n)}return t}},{key:"_getDracoMetadataField",value:function(e,t){var i=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(e,t,i);var r=function(e){for(var t=e.size(),i=new Int32Array(t),r=0;r<t;r++)i[r]=e.GetValue(r);return i}(i);return{int:this.metadataQuerier.GetIntEntry(e,t),string:this.metadataQuerier.GetStringEntry(e,t),double:this.metadataQuerier.GetDoubleEntry(e,t),intArray:r}}finally{this.draco.destroy(i)}}},{key:"_disableAttributeTransforms",value:function(e){var t,i=e.quantizedAttributes,r=void 0===i?[]:i,n=e.octahedronAttributes,s=void 0===n?[]:n,o=u([].concat(l(r),l(s)));try{for(o.s();!(t=o.n()).done;){var a=t.value;this.decoder.SkipAttributeTransform(this.draco[a])}}catch(e){o.e(e)}finally{o.f()}}},{key:"_getQuantizationTransform",value:function(e,t){var i=this,r=t.quantizedAttributes,n=void 0===r?[]:r,s=e.attribute_type();if(n.map((function(e){return i.decoder[e]})).includes(s)){var o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(e))return{quantization_bits:o.quantization_bits(),range:o.range(),min_values:new Float32Array([1,2,3]).map((function(e){return o.min_value(e)}))}}finally{this.draco.destroy(o)}}return null}},{key:"_getOctahedronTransform",value:function(e,t){var i=this,r=t.octahedronAttributes,n=void 0===r?[]:r,s=e.attribute_type();if(n.map((function(e){return i.decoder[e]})).includes(s)){var o=new this.draco.AttributeQuantizationTransform;try{if(o.InitFromAttribute(e))return{quantization_bits:o.quantization_bits()}}finally{this.draco.destroy(o)}}return null}}])}();var SP,TP="https://www.gstatic.com/draco/versioned/decoders/".concat("1.5.5"),FP="".concat(TP,"/draco_decoder.js"),IP="".concat(TP,"/draco_wasm_wrapper.js"),DP="".concat(TP,"/draco_decoder.wasm");function RP(e){return OP.apply(this,arguments)}function OP(){return(OP=a(s().mark((function e(t){var i;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.modules||{},SP=i.draco3d?SP||i.draco3d.createDecoderModule({}).then((function(e){return{draco:e}})):SP||LP(t),e.next=4,SP;case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function LP(e){return jP.apply(this,arguments)}function jP(){return(jP=a(s().mark((function e(t){var i,r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=t.draco&&t.draco.decoderType,e.next="js"===e.t0?3:(e.t0,7);break;case 3:return e.next=5,ZB(FP,"draco",t);case 5:return i=e.sent,e.abrupt("break",21);case 7:return e.t1=Promise,e.next=10,ZB(IP,"draco",t);case 10:return e.t2=e.sent,e.next=13,ZB(DP,"draco",t);case 13:return e.t3=e.sent,e.t4=[e.t2,e.t3],e.next=17,e.t1.all.call(e.t1,e.t4);case 17:n=e.sent,o=c(n,2),i=o[0],r=o[1];case 21:return i=i||globalThis.DracoDecoderModule,e.next=24,UP(i,r);case 24:return e.abrupt("return",e.sent);case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UP(e,t){var i={};return t&&(i.wasmBinary=t),new Promise((function(t){e(n(n({},i),{},{onModuleLoaded:function(e){return t({draco:e})}}))}))}var NP=n(n({},sP),{},{parse:function(e,t){return VP.apply(this,arguments)}});function VP(){return(VP=a(s().mark((function e(t,i){var r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,RP(i);case 2:return r=e.sent,n=r.draco,o=new EP(n),e.prev=5,e.abrupt("return",o.parseSync(t,null==i?void 0:i.draco));case 7:return e.prev=7,o.destroy(),e.finish(7);case 10:case"end":return e.stop()}}),e,null,[[5,,7,10]])})))).apply(this,arguments)}function QP(e){var t={};for(var i in e){var r=e[i];if("indices"!==i){var n=HP(r);t[i]=n}}return t}function HP(e){var t=function(e){var t=e,i=1,r=0;e&&e.value&&(t=e.value,i=e.size||1);t&&(ArrayBuffer.isView(t)||(t=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return null;if(Array.isArray(e))return new t(e);if(i&&!(e instanceof t))return new t(e);return e}(t,Float32Array)),r=t.length/i);return{buffer:t,size:i,count:r}}(e),i=t.buffer,r=t.size;return{value:i,size:r,byteOffset:0,count:t.count,type:pB(r),componentType:fB(i)}}var GP="KHR_draco_mesh_compression",zP=GP;function WP(){return(WP=a(s().mark((function e(t,i,r){var n,o,a,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=i&&null!==(n=i.gltf)&&void 0!==n&&n.decompressMeshes){e.next=2;break}return e.abrupt("return");case 2:o=new _B(t),a=[],l=u(JP(o));try{for(l.s();!(c=l.n()).done;)h=c.value,o.getObjectExtension(h,GP)&&a.push(KP(o,h,i,r))}catch(e){l.e(e)}finally{l.f()}return e.next=8,Promise.all(a);case 8:o.removeExtension(GP);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function KP(e,t,i,r){return XP.apply(this,arguments)}function XP(){return XP=a(s().mark((function e(t,i,r,o){var a,l,u,h,A,d,p,f,g,m,v,_,y,b;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.getObjectExtension(i,GP)){e.next=3;break}return e.abrupt("return");case 3:return l=t.getTypedArrayForBufferView(a.bufferView),u=iB(l.buffer,l.byteOffset),h=o.parse,delete(A=n({},r))["3d-tiles"],e.next=10,h(u,NP,A,o);case 10:for(d=e.sent,p=QP(d.attributes),f=0,g=Object.entries(p);f<g.length;f++)m=c(g[f],2),v=m[0],_=m[1],v in i.attributes&&(y=i.attributes[v],null!=(b=t.getAccessor(y))&&b.min&&null!=b&&b.max&&(_.min=b.min,_.max=b.max));i.attributes=p,d.indices&&(i.indices=HP(d.indices)),YP(i);case 16:case"end":return e.stop()}}),e)}))),XP.apply(this,arguments)}function qP(e,t){var i,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,n=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");var o=n.DracoWriter.encodeSync({attributes:e}),a=null==s||null===(i=s.parseSync)||void 0===i?void 0:i.call(s,{attributes:e}),l=n._addFauxAttributes(a.attributes),u=n.addBufferView(o);return{primitives:[{attributes:l,mode:r,extensions:b({},GP,{bufferView:u,attributes:l})}]}}function YP(e){if(!e.attributes&&Object.keys(e.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}function JP(e){var t,r,n,o,a,l;return s().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:t=u(e.json.meshes||[]),i.prev=1,t.s();case 3:if((r=t.n()).done){i.next=24;break}n=r.value,o=u(n.primitives),i.prev=6,o.s();case 8:if((a=o.n()).done){i.next=14;break}return l=a.value,i.next=12,l;case 12:i.next=8;break;case 14:i.next=19;break;case 16:i.prev=16,i.t0=i.catch(6),o.e(i.t0);case 19:return i.prev=19,o.f(),i.finish(19);case 22:i.next=3;break;case 24:i.next=29;break;case 26:i.prev=26,i.t1=i.catch(1),t.e(i.t1);case 29:return i.prev=29,t.f(),i.finish(29);case 32:case"end":return i.stop()}}),i,null,[[1,26,29,32],[6,16,19,22]])}var ZP=Object.freeze({__proto__:null,name:zP,preprocess:function(e,t,i){var r,n=new _B(e),s=u(JP(n));try{for(s.s();!(r=s.n()).done;){var o=r.value;n.getObjectExtension(o,GP)}}catch(e){s.e(e)}finally{s.f()}},decode:function(e,t,i){return WP.apply(this,arguments)},encode:function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new _B(e),n=u(r.json.meshes||[]);try{for(n.s();!(t=n.n()).done;){qP(t.value,i),r.addRequiredExtension(GP)}}catch(e){n.e(e)}finally{n.f()}}});function $P(e,t){if(!e)throw new Error("math.gl assertion ".concat(t))}var eC={EPSILON:1e-12,debug:!1,precision:4,printTypes:!1,printDegrees:!1,printRowMajor:!0};function tC(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).precision,i=void 0===t?eC.precision:t;return e=function(e){return Math.round(e/eC.EPSILON)*eC.EPSILON}(e),"".concat(parseFloat(e.toPrecision(i)))}function iC(e){return Array.isArray(e)||ArrayBuffer.isView(e)&&!(e instanceof DataView)}function rC(e,t,i){var r=eC.EPSILON;i&&(eC.EPSILON=i);try{if(e===t)return!0;if(iC(e)&&iC(t)){if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(!rC(e[n],t[n]))return!1;return!0}return e&&e.equals?e.equals(t):t&&t.equals?t.equals(e):"number"==typeof e&&"number"==typeof t&&Math.abs(e-t)<=eC.EPSILON*Math.max(1,Math.abs(e),Math.abs(t))}finally{eC.EPSILON=r}}function nC(e){function t(){var t=Reflect.construct(e,Array.from(arguments));return Object.setPrototypeOf(t,Object.getPrototypeOf(this)),t}return t.prototype=Object.create(e.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e,t}var sC=function(){function e(){return x(this,e),d(this,e,arguments)}return _(e,nC(Array)),P(e,[{key:"clone",value:function(){return(new this.constructor).copy(this)}},{key:"fromArray",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<this.ELEMENTS;++i)this[i]=e[i+t];return this.check()}},{key:"toArray",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=0;i<this.ELEMENTS;++i)e[t+i]=this[i];return e}},{key:"from",value:function(e){return Array.isArray(e)?this.copy(e):this.fromObject(e)}},{key:"to",value:function(e){return e===this?this:iC(e)?this.toArray(e):this.toObject(e)}},{key:"toTarget",value:function(e){return e?this.to(e):this}},{key:"toFloat32Array",value:function(){return new Float32Array(this)}},{key:"toString",value:function(){return this.formatString(eC)}},{key:"formatString",value:function(e){for(var t="",i=0;i<this.ELEMENTS;++i)t+=(i>0?", ":"")+tC(this[i],e);return"".concat(e.printTypes?this.constructor.name:"","[").concat(t,"]")}},{key:"equals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(!rC(this[t],e[t]))return!1;return!0}},{key:"exactEquals",value:function(e){if(!e||this.length!==e.length)return!1;for(var t=0;t<this.ELEMENTS;++t)if(this[t]!==e[t])return!1;return!0}},{key:"negate",value:function(){for(var e=0;e<this.ELEMENTS;++e)this[e]=-this[e];return this.check()}},{key:"lerp",value:function(e,t,i){if(void 0===i)return this.lerp(this,e,t);for(var r=0;r<this.ELEMENTS;++r){var n=e[r];this[r]=n+i*(t[r]-n)}return this.check()}},{key:"min",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.min(e[t],this[t]);return this.check()}},{key:"max",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=Math.max(e[t],this[t]);return this.check()}},{key:"clamp",value:function(e,t){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.min(Math.max(this[i],e[i]),t[i]);return this.check()}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]+=s[o];return this.check()}},{key:"subtract",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]-=s[o];return this.check()}},{key:"scale",value:function(e){if("number"==typeof e)for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;else for(var i=0;i<this.ELEMENTS&&i<e.length;++i)this[i]*=e[i];return this.check()}},{key:"multiplyByScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"check",value:function(){if(eC.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}},{key:"validate",value:function(){for(var e=this.length===this.ELEMENTS,t=0;t<this.ELEMENTS;++t)e=e&&Number.isFinite(this[t]);return e}},{key:"sub",value:function(e){return this.subtract(e)}},{key:"setScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]=e;return this.check()}},{key:"addScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]+=e;return this.check()}},{key:"subScalar",value:function(e){return this.addScalar(-e)}},{key:"multiplyScalar",value:function(e){for(var t=0;t<this.ELEMENTS;++t)this[t]*=e;return this.check()}},{key:"divideScalar",value:function(e){return this.multiplyByScalar(1/e)}},{key:"clampScalar",value:function(e,t){for(var i=0;i<this.ELEMENTS;++i)this[i]=Math.min(Math.max(this[i],e),t);return this.check()}},{key:"elements",get:function(){return this}}])}();function oC(e){if(!Number.isFinite(e))throw new Error("Invalid number ".concat(e));return e}function aC(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(eC.debug&&!function(e,t){if(e.length!==t)return!1;for(var i=0;i<e.length;++i)if(!Number.isFinite(e[i]))return!1;return!0}(e,t))throw new Error("math.gl: ".concat(i," some fields set to invalid numbers'"));return e}var lC=function(){function e(){return x(this,e),d(this,e,arguments)}return _(e,sC),P(e,[{key:"x",get:function(){return this[0]},set:function(e){this[0]=oC(e)}},{key:"y",get:function(){return this[1]},set:function(e){this[1]=oC(e)}},{key:"len",value:function(){return Math.sqrt(this.lengthSquared())}},{key:"magnitude",value:function(){return this.len()}},{key:"lengthSquared",value:function(){for(var e=0,t=0;t<this.ELEMENTS;++t)e+=this[t]*this[t];return e}},{key:"magnitudeSquared",value:function(){return this.lengthSquared()}},{key:"distance",value:function(e){return Math.sqrt(this.distanceSquared(e))}},{key:"distanceSquared",value:function(e){for(var t=0,i=0;i<this.ELEMENTS;++i){var r=this[i]-e[i];t+=r*r}return oC(t)}},{key:"dot",value:function(e){for(var t=0,i=0;i<this.ELEMENTS;++i)t+=this[i]*e[i];return oC(t)}},{key:"normalize",value:function(){var e=this.magnitude();if(0!==e)for(var t=0;t<this.ELEMENTS;++t)this[t]/=e;return this.check()}},{key:"multiply",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]*=s[o];return this.check()}},{key:"divide",value:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];for(var r=0,n=t;r<n.length;r++)for(var s=n[r],o=0;o<this.ELEMENTS;++o)this[o]/=s[o];return this.check()}},{key:"lengthSq",value:function(){return this.lengthSquared()}},{key:"distanceTo",value:function(e){return this.distance(e)}},{key:"distanceToSquared",value:function(e){return this.distanceSquared(e)}},{key:"getComponent",value:function(e){return $P(e>=0&&e<this.ELEMENTS,"index is out of range"),oC(this[e])}},{key:"setComponent",value:function(e,t){return $P(e>=0&&e<this.ELEMENTS,"index is out of range"),this[e]=t,this.check()}},{key:"addVectors",value:function(e,t){return this.copy(e).add(t)}},{key:"subVectors",value:function(e,t){return this.copy(e).subtract(t)}},{key:"multiplyVectors",value:function(e,t){return this.copy(e).multiply(t)}},{key:"addScaledVector",value:function(e,t){return this.add(new this.constructor(e).multiplyScalar(t))}}])}(),uC="undefined"!=typeof Float32Array?Float32Array:Array;function cC(e,t,i){var r=t[0],n=t[1],s=t[2];return e[0]=r*i[0]+n*i[3]+s*i[6],e[1]=r*i[1]+n*i[4]+s*i[7],e[2]=r*i[2]+n*i[5]+s*i[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),function(){var e,t=(e=new uC(2),uC!=Float32Array&&(e[0]=0,e[1]=0),e)}(),function(){var e,t=(e=new uC(3),uC!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e)}();var hC,AC,dC=[0,0,0],pC=function(){function e(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return x(this,e),t=d(this,e,[-0,-0,-0]),1===arguments.length&&iC(i)?t.copy(i):(eC.debug&&(oC(i),oC(r),oC(n)),t[0]=i,t[1]=r,t[2]=n),t}return _(e,lC),P(e,[{key:"set",value:function(e,t,i){return this[0]=e,this[1]=t,this[2]=i,this.check()}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this.check()}},{key:"fromObject",value:function(e){return eC.debug&&(oC(e.x),oC(e.y),oC(e.z)),this[0]=e.x,this[1]=e.y,this[2]=e.z,this.check()}},{key:"toObject",value:function(e){return e.x=this[0],e.y=this[1],e.z=this[2],e}},{key:"ELEMENTS",get:function(){return 3}},{key:"z",get:function(){return this[2]},set:function(e){this[2]=oC(e)}},{key:"angle",value:function(e){return function(e,t){var i=e[0],r=e[1],n=e[2],s=t[0],o=t[1],a=t[2],l=Math.sqrt(i*i+r*r+n*n)*Math.sqrt(s*s+o*o+a*a),u=l&&function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}(e,t)/l;return Math.acos(Math.min(Math.max(u,-1),1))}(this,e)}},{key:"cross",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=i[0],a=i[1],l=i[2];e[0]=n*l-s*a,e[1]=s*o-r*l,e[2]=r*a-n*o}(this,this,e),this.check()}},{key:"rotateX",value:function(e){var t=e.radians,i=e.origin;return function(e,t,i,r){var n=[],s=[];n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[0],s[1]=n[1]*Math.cos(r)-n[2]*Math.sin(r),s[2]=n[1]*Math.sin(r)+n[2]*Math.cos(r),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2]}(this,this,void 0===i?dC:i,t),this.check()}},{key:"rotateY",value:function(e){var t=e.radians,i=e.origin;return function(e,t,i,r){var n=[],s=[];n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[2]*Math.sin(r)+n[0]*Math.cos(r),s[1]=n[1],s[2]=n[2]*Math.cos(r)-n[0]*Math.sin(r),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2]}(this,this,void 0===i?dC:i,t),this.check()}},{key:"rotateZ",value:function(e){var t=e.radians,i=e.origin;return function(e,t,i,r){var n=[],s=[];n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[0]*Math.cos(r)-n[1]*Math.sin(r),s[1]=n[0]*Math.sin(r)+n[1]*Math.cos(r),s[2]=n[2],e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2]}(this,this,void 0===i?dC:i,t),this.check()}},{key:"transform",value:function(e){return this.transformAsPoint(e)}},{key:"transformAsPoint",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=i[3]*r+i[7]*n+i[11]*s+i[15];o=o||1,e[0]=(i[0]*r+i[4]*n+i[8]*s+i[12])/o,e[1]=(i[1]*r+i[5]*n+i[9]*s+i[13])/o,e[2]=(i[2]*r+i[6]*n+i[10]*s+i[14])/o}(this,this,e),this.check()}},{key:"transformAsVector",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=i[3]*r+i[7]*n+i[11]*s||1;e[0]=(i[0]*r+i[4]*n+i[8]*s)/o,e[1]=(i[1]*r+i[5]*n+i[9]*s)/o,e[2]=(i[2]*r+i[6]*n+i[10]*s)/o}(this,this,e),this.check()}},{key:"transformByMatrix3",value:function(e){return cC(this,this,e),this.check()}},{key:"transformByMatrix2",value:function(e){return function(e,t,i){var r=t[0],n=t[1];e[0]=i[0]*r+i[2]*n,e[1]=i[1]*r+i[3]*n,e[2]=t[2]}(this,this,e),this.check()}},{key:"transformByQuaternion",value:function(e){return function(e,t,i){var r=i[0],n=i[1],s=i[2],o=i[3],a=t[0],l=t[1],u=t[2],c=n*u-s*l,h=s*a-r*u,A=r*l-n*a,d=n*A-s*h,p=s*c-r*A,f=r*h-n*c,g=2*o;c*=g,h*=g,A*=g,d*=2,p*=2,f*=2,e[0]=a+c+d,e[1]=l+h+p,e[2]=u+A+f}(this,this,e),this.check()}}],[{key:"ZERO",get:function(){return hC||(hC=new e(0,0,0),Object.freeze(hC)),hC}}])}(),fC=function(){function e(){return x(this,e),d(this,e,arguments)}return _(e,sC),P(e,[{key:"toString",value:function(){var e="[";if(eC.printRowMajor){e+="row-major:";for(var t=0;t<this.RANK;++t)for(var i=0;i<this.RANK;++i)e+=" ".concat(this[i*this.RANK+t])}else{e+="column-major:";for(var r=0;r<this.ELEMENTS;++r)e+=" ".concat(this[r])}return e+="]"}},{key:"getElementIndex",value:function(e,t){return t*this.RANK+e}},{key:"getElement",value:function(e,t){return this[t*this.RANK+e]}},{key:"setElement",value:function(e,t,i){return this[t*this.RANK+e]=oC(i),this}},{key:"getColumn",value:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Array(this.RANK).fill(-0),i=e*this.RANK,r=0;r<this.RANK;++r)t[r]=this[i+r];return t}},{key:"setColumn",value:function(e,t){for(var i=e*this.RANK,r=0;r<this.RANK;++r)this[i+r]=t[r];return this}}])}();function gC(e,t,i){var r=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],A=i[0],d=i[1],p=i[2],f=i[3],g=i[4],m=i[5],v=i[6],_=i[7],y=i[8];return e[0]=A*r+d*o+p*u,e[1]=A*n+d*a+p*c,e[2]=A*s+d*l+p*h,e[3]=f*r+g*o+m*u,e[4]=f*n+g*a+m*c,e[5]=f*s+g*l+m*h,e[6]=v*r+_*o+y*u,e[7]=v*n+_*a+y*c,e[8]=v*s+_*l+y*h,e}function mC(e,t,i){var r=i[0],n=i[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=n*t[3],e[4]=n*t[4],e[5]=n*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}!function(e){e[e.COL0ROW0=0]="COL0ROW0",e[e.COL0ROW1=1]="COL0ROW1",e[e.COL0ROW2=2]="COL0ROW2",e[e.COL1ROW0=3]="COL1ROW0",e[e.COL1ROW1=4]="COL1ROW1",e[e.COL1ROW2=5]="COL1ROW2",e[e.COL2ROW0=6]="COL2ROW0",e[e.COL2ROW1=7]="COL2ROW1",e[e.COL2ROW2=8]="COL2ROW2"}(AC||(AC={}));var vC,_C,yC=Object.freeze([1,0,0,0,1,0,0,0,1]),bC=function(){function e(t){for(var i,r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];return x(this,e),i=d(this,e,[-0,-0,-0,-0,-0,-0,-0,-0,-0]),1===arguments.length&&Array.isArray(t)?i.copy(t):n.length>0?i.copy([t].concat(n)):i.identity(),i}return _(e,fC),P(e,[{key:"ELEMENTS",get:function(){return 9}},{key:"RANK",get:function(){return 3}},{key:"INDICES",get:function(){return AC}},{key:"copy",value:function(e){return this[0]=e[0],this[1]=e[1],this[2]=e[2],this[3]=e[3],this[4]=e[4],this[5]=e[5],this[6]=e[6],this[7]=e[7],this[8]=e[8],this.check()}},{key:"identity",value:function(){return this.copy(yC)}},{key:"fromObject",value:function(e){return this.check()}},{key:"fromQuaternion",value:function(e){return function(e,t){var i=t[0],r=t[1],n=t[2],s=t[3],o=i+i,a=r+r,l=n+n,u=i*o,c=r*o,h=r*a,A=n*o,d=n*a,p=n*l,f=s*o,g=s*a,m=s*l;e[0]=1-h-p,e[3]=c-m,e[6]=A+g,e[1]=c+m,e[4]=1-u-p,e[7]=d-f,e[2]=A-g,e[5]=d+f,e[8]=1-u-h}(this,e),this.check()}},{key:"set",value:function(e,t,i,r,n,s,o,a,l){return this[0]=e,this[1]=t,this[2]=i,this[3]=r,this[4]=n,this[5]=s,this[6]=o,this[7]=a,this[8]=l,this.check()}},{key:"setRowMajor",value:function(e,t,i,r,n,s,o,a,l){return this[0]=e,this[1]=r,this[2]=o,this[3]=t,this[4]=n,this[5]=a,this[6]=i,this[7]=s,this[8]=l,this.check()}},{key:"determinant",value:function(){return function(e){var t=e[0],i=e[1],r=e[2],n=e[3],s=e[4],o=e[5],a=e[6],l=e[7],u=e[8];return t*(u*s-o*l)+i*(-u*n+o*a)+r*(l*n-s*a)}(this)}},{key:"transpose",value:function(){return function(e,t){if(e===t){var i=t[1],r=t[2],n=t[5];e[1]=t[3],e[2]=t[6],e[3]=i,e[5]=t[7],e[6]=r,e[7]=n}else 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,this),this.check()}},{key:"invert",value:function(){return function(e,t){var i=t[0],r=t[1],n=t[2],s=t[3],o=t[4],a=t[5],l=t[6],u=t[7],c=t[8],h=c*o-a*u,A=-c*s+a*l,d=u*s-o*l,p=i*h+r*A+n*d;p&&(p=1/p,e[0]=h*p,e[1]=(-c*r+n*u)*p,e[2]=(a*r-n*o)*p,e[3]=A*p,e[4]=(c*i-n*l)*p,e[5]=(-a*i+n*s)*p,e[6]=d*p,e[7]=(-u*i+r*l)*p,e[8]=(o*i-r*s)*p)}(this,this),this.check()}},{key:"multiplyLeft",value:function(e){return gC(this,e,this),this.check()}},{key:"multiplyRight",value:function(e){return gC(this,this,e),this.check()}},{key:"rotate",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],A=Math.sin(i),d=Math.cos(i);e[0]=d*r+A*o,e[1]=d*n+A*a,e[2]=d*s+A*l,e[3]=d*o-A*r,e[4]=d*a-A*n,e[5]=d*l-A*s,e[6]=u,e[7]=c,e[8]=h}(this,this,e),this.check()}},{key:"scale",value:function(e){return Array.isArray(e)?mC(this,this,e):mC(this,this,[e,e]),this.check()}},{key:"translate",value:function(e){return function(e,t,i){var r=t[0],n=t[1],s=t[2],o=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],A=i[0],d=i[1];e[0]=r,e[1]=n,e[2]=s,e[3]=o,e[4]=a,e[5]=l,e[6]=A*r+d*o+u,e[7]=A*n+d*a+c,e[8]=A*s+d*l+h}(this,this,e),this.check()}},{key:"transform",value:function(e,t){var i;switch(e.length){case 2:i=function(e,t,i){var r=t[0],n=t[1];return e[0]=i[0]*r+i[3]*n+i[6],e[1]=i[1]*r+i[4]*n+i[7],e}(t||[-0,-0],e,this);break;case 3:i=cC(t||[-0,-0,-0],e,this);break;case 4:i=function(e,t,i){var r=t[0],n=t[1],s=t[2];return e[0]=i[0]*r+i[3]*n+i[6]*s,e[1]=i[1]*r+i[4]*n+i[7]*s,e[2]=i[2]*r+i[5]*n+i[8]*s,e[3]=t[3],e}(t||[-0,-0,-0,-0],e,this);break;default:throw new Error("Illegal vector")}return aC(i,e.length),i}},{key:"transformVector",value:function(e,t){return this.transform(e,t)}},{key:"transformVector2",value:function(e,t){return this.transform(e,t)}},{key:"transformVector3",value:function(e,t){return this.transform(e,t)}}],[{key:"IDENTITY",get:function(){return xC()}},{key:"ZERO",get:function(){return wC()}}])}();function wC(){return vC||(vC=new bC([0,0,0,0,0,0,0,0,0]),Object.freeze(vC)),vC}function xC(){return _C||(_C=new bC,Object.freeze(_C)),_C}var BC={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},PC={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},CC="KHR_texture_transform",MC=CC,kC=new pC,EC=new bC,SC=new bC;function TC(){return(TC=a(s().mark((function e(t,i){var r,n,o;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=new _B(t),r.getExtension(CC)){e.next=4;break}return e.abrupt("return");case 4:for(n=t.json.materials||[],o=0;o<n.length;o++)FC(o,t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function FC(e,t){var i,r,n,s=[],o=null===(i=t.json.materials)||void 0===i?void 0:i[e],a=null==o||null===(r=o.pbrMetallicRoughness)||void 0===r?void 0:r.baseColorTexture;a&&IC(t,e,a,s);var l=null==o?void 0:o.emissiveTexture;l&&IC(t,e,l,s);var u=null==o?void 0:o.normalTexture;u&&IC(t,e,u,s);var c=null==o?void 0:o.occlusionTexture;c&&IC(t,e,c,s);var h=null==o||null===(n=o.pbrMetallicRoughness)||void 0===n?void 0:n.metallicRoughnessTexture;h&&IC(t,e,h,s)}function IC(e,t,i,r){var n=function(e,t){var i,r=null===(i=e.extensions)||void 0===i?void 0:i[CC],n=e.texCoord,s=void 0===n?0:n,o=r.texCoord,a=void 0===o?s:o,l=-1!==t.findIndex((function(e){var t=c(e,2),i=t[0],r=t[1];return i===s&&r===a}));if(!l){var u=function(e){var t=e.offset,i=void 0===t?[0,0]:t,r=e.rotation,n=void 0===r?0:r,s=e.scale,o=void 0===s?[1,1]:s,a=(new bC).set(1,0,0,0,1,0,i[0],i[1],1),l=EC.set(Math.cos(n),Math.sin(n),0,-Math.sin(n),Math.cos(n),0,0,0,1),u=SC.set(o[0],0,0,0,o[1],0,0,0,1);return a.multiplyRight(l).multiplyRight(u)}(r);return s!==a&&(e.texCoord=a),t.push([s,a]),{originalTexCoord:s,texCoord:a,matrix:u}}return null}(i,r);if(n){var s,o=u(e.json.meshes||[]);try{for(o.s();!(s=o.n()).done;){var a,l=u(s.value.primitives);try{for(l.s();!(a=l.n()).done;){var h=a.value,A=h.material;Number.isFinite(A)&&t===A&&DC(e,h,n)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){o.e(e)}finally{o.f()}}}function DC(e,t,i){var r=i.originalTexCoord,n=i.texCoord,s=i.matrix,o=t.attributes["TEXCOORD_".concat(r)];if(Number.isFinite(o)){var a,l=null===(a=e.json.accessors)||void 0===a?void 0:a[o];if(l&&l.bufferView){var u,c=null===(u=e.json.bufferViews)||void 0===u?void 0:u[l.bufferView];if(c){for(var h=e.buffers[c.buffer],A=h.arrayBuffer,d=(h.byteOffset||0)+(l.byteOffset||0)+(c.byteOffset||0),p=gB(l,c),f=p.ArrayType,g=p.length,m=PC[l.componentType],v=BC[l.type],_=c.byteStride||m*v,y=new Float32Array(g),b=0;b<l.count;b++){var w=new f(A,d+b*_,2);kC.set(w[0],w[1],1),kC.transformByMatrix3(s),y.set([kC[0],kC[1]],b*v)}r===n?function(e,t,i,r){e.componentType=5126,i.push({arrayBuffer:r.buffer,byteOffset:0,byteLength:r.buffer.byteLength}),t.buffer=i.length-1,t.byteLength=r.buffer.byteLength,t.byteOffset=0,delete t.byteStride}(l,c,e.buffers,y):function(e,t,i,r,n){r.buffers.push({arrayBuffer:n.buffer,byteOffset:0,byteLength:n.buffer.byteLength});var s=r.json.bufferViews;if(!s)return;s.push({buffer:r.buffers.length-1,byteLength:n.buffer.byteLength,byteOffset:0});var o=r.json.accessors;if(!o)return;o.push({bufferView:(null==s?void 0:s.length)-1,byteOffset:0,componentType:5126,count:t.count,type:"VEC2"}),i.attributes["TEXCOORD_".concat(e)]=o.length-1}(n,l,t,e,y)}}}}var RC=Object.freeze({__proto__:null,name:MC,decode:function(e,t){return TC.apply(this,arguments)}}),OC="KHR_lights_punctual",LC=OC;function jC(){return(jC=a(s().mark((function e(t){var i,r,n,o,a,l,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=new _B(t),r=i.json,(n=i.getExtension(OC))&&(i.json.lights=n.lights,i.removeExtension(OC)),o=u(r.nodes||[]);try{for(o.s();!(a=o.n()).done;)l=a.value,(c=i.getObjectExtension(l,OC))&&(l.light=c.light),i.removeObjectExtension(l,OC)}catch(e){o.e(e)}finally{o.f()}case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function UC(){return(UC=a(s().mark((function e(t){var i,r,n,o,a,l,c;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=new _B(t),(r=i.json).lights&&(sB(!(n=i.addExtension(OC)).lights),n.lights=r.lights,delete r.lights),i.json.lights){o=u(i.json.lights);try{for(o.s();!(a=o.n()).done;)l=a.value,c=l.node,i.addObjectExtension(c,OC,l)}catch(e){o.e(e)}finally{o.f()}delete i.json.lights}case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var NC="KHR_materials_unlit",VC=NC;function QC(){return(QC=a(s().mark((function e(t){var i,r,n,o,a;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=new _B(t),r=i.json,n=u(r.materials||[]);try{for(n.s();!(o=n.n()).done;)a=o.value,a.extensions&&a.extensions.KHR_materials_unlit&&(a.unlit=!0),i.removeObjectExtension(a,NC)}catch(e){n.e(e)}finally{n.f()}i.removeExtension(NC);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var HC="KHR_techniques_webgl",GC=HC;function zC(){return(zC=a(s().mark((function e(t){var i,r,n,o,a,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=new _B(t),r=i.json,n=i.getExtension(HC)){o=KC(n,i),a=u(r.materials||[]);try{for(a.s();!(l=a.n()).done;)c=l.value,(h=i.getObjectExtension(c,HC))&&(c.technique=Object.assign({},h,o[h.technique]),c.technique.values=XC(c.technique,i)),i.removeObjectExtension(c,HC)}catch(e){a.e(e)}finally{a.f()}i.removeExtension(HC)}case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function WC(){return(WC=a(s().mark((function e(t,i){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function KC(e,t){var i=e.programs,r=void 0===i?[]:i,n=e.shaders,s=void 0===n?[]:n,o=e.techniques,a=void 0===o?[]:o,l=new TextDecoder;return s.forEach((function(e){if(!Number.isFinite(e.bufferView))throw new Error("KHR_techniques_webgl: no shader code");e.code=l.decode(t.getTypedArrayForBufferView(e.bufferView))})),r.forEach((function(e){e.fragmentShader=s[e.fragmentShader],e.vertexShader=s[e.vertexShader]})),a.forEach((function(e){e.program=r[e.program]})),a}function XC(e,t){var i=Object.assign({},e.values);return Object.keys(e.uniforms||{}).forEach((function(t){e.uniforms[t].value&&!(t in i)&&(i[t]=e.uniforms[t].value)})),Object.keys(i).forEach((function(e){"object"===w(i[e])&&void 0!==i[e].index&&(i[e].texture=t.getTexture(i[e].index))})),i}var qC="EXT_feature_metadata",YC=qC;function JC(){return(JC=a(s().mark((function e(t){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ZC(new _B(t));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ZC(e){var t,i=e.getExtension(qC),r=null==i||null===(t=i.schema)||void 0===t?void 0:t.classes,n=null==i?void 0:i.featureTables;if((null==i?void 0:i.featureTextures)&&console.warn('featureTextures is not yet supported in the "EXT_feature_metadata" extension.'),r&&n)for(var s in r){var o=r[s],a=tM(n,s);a&&$C(e,a,o)}}function $C(e,t,i){for(var r in i.properties){var n,s=i.properties[r],o=null==t||null===(n=t.properties)||void 0===n?void 0:n[r],a=t.count;if(o){var l=eM(e,s,a,o);o.data=l}}}function eM(e,t,i,r){var n=r.bufferView,s=e.getTypedArrayForBufferView(n);if("STRING"===t.type){var o=r.stringOffsetBufferView;s=function(e,t,i){for(var r=[],n=new TextDecoder("utf8"),s=0,o=4,a=0;a<i;a++){var l=t[(a+1)*o]-t[a*o],u=e.subarray(s,l+s),c=n.decode(u);r.push(c),s+=l}return r}(s,e.getTypedArrayForBufferView(o),i)}return s}function tM(e,t){for(var i in e){var r=e[i];if(r.class===t)return r}return null}var iM=[LB,NB,HB,ZP,Object.freeze({__proto__:null,name:LC,decode:function(e){return jC.apply(this,arguments)},encode:function(e){return UC.apply(this,arguments)}}),Object.freeze({__proto__:null,name:VC,decode:function(e){return QC.apply(this,arguments)},encode:function(e){var t=new _B(e),i=t.json;if(t.materials){var r,n=u(i.materials||[]);try{for(n.s();!(r=n.n()).done;){var s=r.value;s.unlit&&(delete s.unlit,t.addObjectExtension(s,NC,{}),t.addExtension(NC))}}catch(e){n.e(e)}finally{n.f()}}}}),Object.freeze({__proto__:null,name:GC,decode:function(e){return zC.apply(this,arguments)},encode:function(e,t){return WC.apply(this,arguments)}}),RC,Object.freeze({__proto__:null,name:YC,decode:function(e){return JC.apply(this,arguments)}})];function rM(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=iM.filter((function(e){return oM(e.name,i)})),s=u(n);try{for(s.s();!(t=s.n()).done;){var o,a=t.value;null===(o=a.preprocess)||void 0===o||o.call(a,e,i,r)}}catch(e){s.e(e)}finally{s.f()}}function nM(e){return sM.apply(this,arguments)}function sM(){return sM=a(s().mark((function e(t){var i,r,n,o,a,l,c,h=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=h.length>1&&void 0!==h[1]?h[1]:{},r=h.length>2?h[2]:void 0,n=iM.filter((function(e){return oM(e.name,i)})),o=u(n),e.prev=4,o.s();case 6:if((a=o.n()).done){e.next=12;break}return l=a.value,e.next=10,null===(c=l.decode)||void 0===c?void 0:c.call(l,t,i,r);case 10:e.next=6;break;case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),o.e(e.t0);case 17:return e.prev=17,o.f(),e.finish(17);case 20:case"end":return e.stop()}}),e,null,[[4,14,17,20]])}))),sM.apply(this,arguments)}function oM(e,t){var i,r=(null==t||null===(i=t.gltf)||void 0===i?void 0:i.excludeExtensions)||{};return!(e in r&&!r[e])}var aM="KHR_binary_glTF";var lM={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},uM={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"},cM=function(){return P((function e(){x(this,e),iy(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}),iy(this,"json",void 0)}),[{key:"normalize",value:function(e,t){this.json=e.json;var i=e.json;switch(i.asset&&i.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version ".concat(i.asset.version))}if(!t.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(i),this._convertTopLevelObjectsToArrays(i),function(e){var t,i=new _B(e),r=i.json,n=u(r.images||[]);try{for(n.s();!(t=n.n()).done;){var s=t.value,o=i.getObjectExtension(s,aM);o&&Object.assign(s,o),i.removeObjectExtension(s,aM)}}catch(e){n.e(e)}finally{n.f()}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,i.removeExtension(aM)}(e),this._convertObjectIdsToArrayIndices(i),this._updateObjects(i),this._updateMaterial(i)}},{key:"_addAsset",value:function(e){e.asset=e.asset||{},e.asset.version="2.0",e.asset.generator=e.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}},{key:"_convertTopLevelObjectsToArrays",value:function(e){for(var t in lM)this._convertTopLevelObjectToArray(e,t)}},{key:"_convertTopLevelObjectToArray",value:function(e,t){var i=e[t];if(i&&!Array.isArray(i))for(var r in e[t]=[],i){var n=i[r];n.id=n.id||r;var s=e[t].length;e[t].push(n),this.idToIndexMap[t][r]=s}}},{key:"_convertObjectIdsToArrayIndices",value:function(e){for(var t in lM)this._convertIdsToIndices(e,t);"scene"in e&&(e.scene=this._convertIdToIndex(e.scene,"scene"));var i,r=u(e.textures);try{for(r.s();!(i=r.n()).done;){var n=i.value;this._convertTextureIds(n)}}catch(e){r.e(e)}finally{r.f()}var s,o=u(e.meshes);try{for(o.s();!(s=o.n()).done;){var a=s.value;this._convertMeshIds(a)}}catch(e){o.e(e)}finally{o.f()}var l,c=u(e.nodes);try{for(c.s();!(l=c.n()).done;){var h=l.value;this._convertNodeIds(h)}}catch(e){c.e(e)}finally{c.f()}var A,d=u(e.scenes);try{for(d.s();!(A=d.n()).done;){var p=A.value;this._convertSceneIds(p)}}catch(e){d.e(e)}finally{d.f()}}},{key:"_convertTextureIds",value:function(e){e.source&&(e.source=this._convertIdToIndex(e.source,"image"))}},{key:"_convertMeshIds",value:function(e){var t,i=u(e.primitives);try{for(i.s();!(t=i.n()).done;){var r=t.value,n=r.attributes,s=r.indices,o=r.material;for(var a in n)n[a]=this._convertIdToIndex(n[a],"accessor");s&&(r.indices=this._convertIdToIndex(s,"accessor")),o&&(r.material=this._convertIdToIndex(o,"material"))}}catch(e){i.e(e)}finally{i.f()}}},{key:"_convertNodeIds",value:function(e){var t=this;e.children&&(e.children=e.children.map((function(e){return t._convertIdToIndex(e,"node")}))),e.meshes&&(e.meshes=e.meshes.map((function(e){return t._convertIdToIndex(e,"mesh")})))}},{key:"_convertSceneIds",value:function(e){var t=this;e.nodes&&(e.nodes=e.nodes.map((function(e){return t._convertIdToIndex(e,"node")})))}},{key:"_convertIdsToIndices",value:function(e,t){e[t]||(console.warn("gltf v1: json doesn't contain attribute ".concat(t)),e[t]=[]);var i,r=u(e[t]);try{for(r.s();!(i=r.n()).done;){var n=i.value;for(var s in n){var o=n[s],a=this._convertIdToIndex(o,s);n[s]=a}}}catch(e){r.e(e)}finally{r.f()}}},{key:"_convertIdToIndex",value:function(e,t){var i=uM[t];if(i in this.idToIndexMap){var r=this.idToIndexMap[i][e];if(!Number.isFinite(r))throw new Error("gltf v1: failed to resolve ".concat(t," with id ").concat(e));return r}return e}},{key:"_updateObjects",value:function(e){var t,i=u(this.json.buffers);try{for(i.s();!(t=i.n()).done;){delete t.value.type}}catch(e){i.e(e)}finally{i.f()}}},{key:"_updateMaterial",value:function(e){var t,i=u(e.materials);try{var r,n,s,o=function(){var i=t.value;i.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};var o=(null===(r=i.values)||void 0===r?void 0:r.tex)||(null===(n=i.values)||void 0===n?void 0:n.texture2d_0)||(null===(s=i.values)||void 0===s?void 0:s.diffuseTex),a=e.textures.findIndex((function(e){return e.id===o}));-1!==a&&(i.pbrMetallicRoughness.baseColorTexture={index:a})};for(i.s();!(t=i.n()).done;)o()}catch(e){i.e(e)}finally{i.f()}}}])}();function hM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(new cM).normalize(e,t)}var AM={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},dM={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},pM=10240,fM=10241,gM=10242,mM=10243,vM=10497,_M=9986,yM={magFilter:pM,minFilter:fM,wrapS:gM,wrapT:mM},bM=b(b(b(b({},pM,9729),fM,_M),gM,vM),mM,vM);var wM=function(){return P((function e(){x(this,e),iy(this,"baseUri",""),iy(this,"json",{}),iy(this,"buffers",[]),iy(this,"images",[])}),[{key:"postProcess",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.json,r=e.buffers,n=void 0===r?[]:r,s=e.images,o=void 0===s?[]:s,a=e.baseUri,l=void 0===a?"":a;return sB(i),this.baseUri=l,this.json=i,this.buffers=n,this.images=o,this._resolveTree(this.json,t),this.json}},{key:"_resolveTree",value:function(e){var t=this;e.bufferViews&&(e.bufferViews=e.bufferViews.map((function(e,i){return t._resolveBufferView(e,i)}))),e.images&&(e.images=e.images.map((function(e,i){return t._resolveImage(e,i)}))),e.samplers&&(e.samplers=e.samplers.map((function(e,i){return t._resolveSampler(e,i)}))),e.textures&&(e.textures=e.textures.map((function(e,i){return t._resolveTexture(e,i)}))),e.accessors&&(e.accessors=e.accessors.map((function(e,i){return t._resolveAccessor(e,i)}))),e.materials&&(e.materials=e.materials.map((function(e,i){return t._resolveMaterial(e,i)}))),e.meshes&&(e.meshes=e.meshes.map((function(e,i){return t._resolveMesh(e,i)}))),e.nodes&&(e.nodes=e.nodes.map((function(e,i){return t._resolveNode(e,i)}))),e.skins&&(e.skins=e.skins.map((function(e,i){return t._resolveSkin(e,i)}))),e.scenes&&(e.scenes=e.scenes.map((function(e,i){return t._resolveScene(e,i)}))),void 0!==e.scene&&(e.scene=e.scenes[this.json.scene])}},{key:"getScene",value:function(e){return this._get("scenes",e)}},{key:"getNode",value:function(e){return this._get("nodes",e)}},{key:"getSkin",value:function(e){return this._get("skins",e)}},{key:"getMesh",value:function(e){return this._get("meshes",e)}},{key:"getMaterial",value:function(e){return this._get("materials",e)}},{key:"getAccessor",value:function(e){return this._get("accessors",e)}},{key:"getCamera",value:function(e){return null}},{key:"getTexture",value:function(e){return this._get("textures",e)}},{key:"getSampler",value:function(e){return this._get("samplers",e)}},{key:"getImage",value:function(e){return this._get("images",e)}},{key:"getBufferView",value:function(e){return this._get("bufferViews",e)}},{key:"getBuffer",value:function(e){return this._get("buffers",e)}},{key:"_get",value:function(e,t){if("object"===w(t))return t;var i=this.json[e]&&this.json[e][t];return i||console.warn("glTF file error: Could not find ".concat(e,"[").concat(t,"]")),i}},{key:"_resolveScene",value:function(e,t){var i=this;return e.id=e.id||"scene-".concat(t),e.nodes=(e.nodes||[]).map((function(e){return i.getNode(e)})),e}},{key:"_resolveNode",value:function(e,t){var i=this;return e.id=e.id||"node-".concat(t),e.children&&(e.children=e.children.map((function(e){return i.getNode(e)}))),void 0!==e.mesh?e.mesh=this.getMesh(e.mesh):void 0!==e.meshes&&e.meshes.length&&(e.mesh=e.meshes.reduce((function(e,t){var r=i.getMesh(t);return e.id=r.id,e.primitives=e.primitives.concat(r.primitives),e}),{primitives:[]})),void 0!==e.camera&&(e.camera=this.getCamera(e.camera)),void 0!==e.skin&&(e.skin=this.getSkin(e.skin)),e}},{key:"_resolveSkin",value:function(e,t){return e.id=e.id||"skin-".concat(t),e.inverseBindMatrices=this.getAccessor(e.inverseBindMatrices),e}},{key:"_resolveMesh",value:function(e,t){var i=this;return e.id=e.id||"mesh-".concat(t),e.primitives&&(e.primitives=e.primitives.map((function(e){var t=(e=n({},e)).attributes;for(var r in e.attributes={},t)e.attributes[r]=i.getAccessor(t[r]);return void 0!==e.indices&&(e.indices=i.getAccessor(e.indices)),void 0!==e.material&&(e.material=i.getMaterial(e.material)),e}))),e}},{key:"_resolveMaterial",value:function(e,t){if(e.id=e.id||"material-".concat(t),e.normalTexture&&(e.normalTexture=n({},e.normalTexture),e.normalTexture.texture=this.getTexture(e.normalTexture.index)),e.occlusionTexture&&(e.occlustionTexture=n({},e.occlustionTexture),e.occlusionTexture.texture=this.getTexture(e.occlusionTexture.index)),e.emissiveTexture&&(e.emmisiveTexture=n({},e.emmisiveTexture),e.emissiveTexture.texture=this.getTexture(e.emissiveTexture.index)),e.emissiveFactor||(e.emissiveFactor=e.emmisiveTexture?[1,1,1]:[0,0,0]),e.pbrMetallicRoughness){e.pbrMetallicRoughness=n({},e.pbrMetallicRoughness);var i=e.pbrMetallicRoughness;i.baseColorTexture&&(i.baseColorTexture=n({},i.baseColorTexture),i.baseColorTexture.texture=this.getTexture(i.baseColorTexture.index)),i.metallicRoughnessTexture&&(i.metallicRoughnessTexture=n({},i.metallicRoughnessTexture),i.metallicRoughnessTexture.texture=this.getTexture(i.metallicRoughnessTexture.index))}return e}},{key:"_resolveAccessor",value:function(e,t){var i,r;if(e.id=e.id||"accessor-".concat(t),void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView)),e.bytesPerComponent=(i=e.componentType,dM[i]),e.components=(r=e.type,AM[r]),e.bytesPerElement=e.bytesPerComponent*e.components,e.bufferView){var n=e.bufferView.buffer,s=gB(e,e.bufferView),o=s.ArrayType,a=s.byteLength,l=(e.bufferView.byteOffset||0)+(e.byteOffset||0)+n.byteOffset,u=n.arrayBuffer.slice(l,l+a);e.bufferView.byteStride&&(u=this._getValueFromInterleavedBuffer(n,l,e.bufferView.byteStride,e.bytesPerElement,e.count)),e.value=new o(u)}return e}},{key:"_getValueFromInterleavedBuffer",value:function(e,t,i,r,n){for(var s=new Uint8Array(n*r),o=0;o<n;o++){var a=t+o*i;s.set(new Uint8Array(e.arrayBuffer.slice(a,a+r)),o*r)}return s.buffer}},{key:"_resolveTexture",value:function(e,t){return e.id=e.id||"texture-".concat(t),e.sampler="sampler"in e?this.getSampler(e.sampler):bM,e.source=this.getImage(e.source),e}},{key:"_resolveSampler",value:function(e,t){for(var i in e.id=e.id||"sampler-".concat(t),e.parameters={},e){var r=this._enumSamplerParameter(i);void 0!==r&&(e.parameters[r]=e[i])}return e}},{key:"_enumSamplerParameter",value:function(e){return yM[e]}},{key:"_resolveImage",value:function(e,t){e.id=e.id||"image-".concat(t),void 0!==e.bufferView&&(e.bufferView=this.getBufferView(e.bufferView));var i=this.images[t];return i&&(e.image=i),e}},{key:"_resolveBufferView",value:function(e,t){var i=e.buffer,r=n(n({id:"bufferView-".concat(t)},e),{},{buffer:this.buffers[i]}),s=this.buffers[i].arrayBuffer,o=this.buffers[i].byteOffset||0;return"byteOffset"in e&&(o+=e.byteOffset),r.data=new Uint8Array(s,o,e.byteLength),r}},{key:"_resolveCamera",value:function(e,t){return e.id=e.id||"camera-".concat(t),e.perspective,e.orthographic,e}}])}();function xM(e,t){return(new wM).postProcess(e,t)}var BM=1735152710,PM=1313821514,CM=5130562,MM=!0;function kM(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=new DataView(t),n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return"".concat(String.fromCharCode(e.getUint8(t+0))).concat(String.fromCharCode(e.getUint8(t+1))).concat(String.fromCharCode(e.getUint8(t+2))).concat(String.fromCharCode(e.getUint8(t+3)))}(r,i+0),s=r.getUint32(i+4,MM),o=r.getUint32(i+8,MM);switch(Object.assign(e,{header:{byteOffset:i,byteLength:o,hasBinChunk:!1},type:n,version:s,json:{},binChunks:[]}),i+=12,e.version){case 1:return function(e,t,i){$x(e.header.byteLength>20);var r=t.getUint32(i+0,MM),n=t.getUint32(i+4,MM);return i+=8,$x(0===n),EM(e,t,i,r),i+=r,i+=SM(e,t,i,e.header.byteLength),i}(e,r,i);case 2:return function(e,t,i,r){return $x(e.header.byteLength>20),function(e,t,i,r){for(;i+8<=e.header.byteLength;){var n=t.getUint32(i+0,MM),s=t.getUint32(i+4,MM);switch(i+=8,s){case PM:EM(e,t,i,n);break;case CM:SM(e,t,i,n);break;case 0:r.strict||EM(e,t,i,n);break;case 1:r.strict||SM(e,t,i,n)}i+=rB(n,4)}}(e,t,i,r),i+e.header.byteLength}(e,r,i,{});default:throw new Error("Invalid GLB version ".concat(e.version,". Only supports v1 and v2."))}}function EM(e,t,i,r){var n=new Uint8Array(t.buffer,i,r),s=new TextDecoder("utf8").decode(n);return e.json=JSON.parse(s),rB(r,4)}function SM(e,t,i,r){return e.header.hasBinChunk=!0,e.binChunks.push({byteOffset:i,byteLength:r,arrayBuffer:t.buffer}),rB(r,4)}function TM(e,t){return FM.apply(this,arguments)}function FM(){return FM=a(s().mark((function e(t,i){var r,n,o,a,l,u,c,h,A,d=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=d.length>4?d[4]:void 0,IM(t,i,d.length>2&&void 0!==d[2]?d[2]:0,l=d.length>3?d[3]:void 0),hM(t,{normalize:null==l||null===(r=l.gltf)||void 0===r?void 0:r.normalize}),rM(t,l,u),c=[],null==l||null===(n=l.gltf)||void 0===n||!n.loadBuffers||!t.json.buffers){e.next=10;break}return e.next=10,DM(t,l,u);case 10:return null!=l&&null!==(o=l.gltf)&&void 0!==o&&o.loadImages&&(h=OM(t,l,u),c.push(h)),A=nM(t,l,u),c.push(A),e.next=15,Promise.all(c);case 15:return e.abrupt("return",null!=l&&null!==(a=l.gltf)&&void 0!==a&&a.postProcess?xM(t,l):t);case 16:case"end":return e.stop()}}),e)}))),FM.apply(this,arguments)}function IM(e,t,i,r){(r.uri&&(e.baseUri=r.uri),t instanceof ArrayBuffer&&!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new DataView(e),n=i.magic,s=void 0===n?BM:n,o=r.getUint32(t,!1);return o===s||o===BM}(t,i,r))&&(t=(new TextDecoder).decode(t));if("string"==typeof t)e.json=tB(t);else if(t instanceof ArrayBuffer){var n={};i=kM(n,t,i,r.glb),sB("glTF"===n.type,"Invalid GLB magic string ".concat(n.type)),e._glb=n,e.json=n.json}else sB(!1,"GLTF: must be ArrayBuffer or string");var s=e.json.buffers||[];if(e.buffers=new Array(s.length).fill(null),e._glb&&e._glb.header.hasBinChunk){var o=e._glb.binChunks;e.buffers[0]={arrayBuffer:o[0].arrayBuffer,byteOffset:o[0].byteOffset,byteLength:o[0].byteLength}}var a=e.json.images||[];e.images=new Array(a.length).fill({})}function DM(e,t,i){return RM.apply(this,arguments)}function RM(){return(RM=a(s().mark((function e(t,i,r){var n,o,a,l,u,c,h,A;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.json.buffers||[],o=0;case 2:if(!(o<n.length)){e.next=22;break}if(!(a=n[o]).uri){e.next=18;break}return sB(r.fetch),c=oB(a.uri,i),e.next=10,null==r||null===(l=r.fetch)||void 0===l?void 0:l.call(r,c);case 10:return h=e.sent,e.next=13,null==h||null===(u=h.arrayBuffer)||void 0===u?void 0:u.call(h);case 13:A=e.sent,t.buffers[o]={arrayBuffer:A,byteOffset:0,byteLength:A.byteLength},delete a.uri,e.next=19;break;case 18:null===t.buffers[o]&&(t.buffers[o]={arrayBuffer:new ArrayBuffer(a.byteLength),byteOffset:0,byteLength:a.byteLength});case 19:++o,e.next=2;break;case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function OM(e,t,i){return LM.apply(this,arguments)}function LM(){return(LM=a(s().mark((function e(t,i,r){var n,o,a,l,c,h;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=jM(t),o=t.json.images||[],a=[],l=u(n);try{for(l.s();!(c=l.n()).done;)h=c.value,a.push(UM(t,o[h],h,i,r))}catch(e){l.e(e)}finally{l.f()}return e.next=7,Promise.all(a);case 7:return e.abrupt("return",e.sent);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jM(e){var t,i=new Set,r=u(e.json.textures||[]);try{for(r.s();!(t=r.n()).done;){var n=t.value;void 0!==n.source&&i.add(n.source)}}catch(e){r.e(e)}finally{r.f()}return Array.from(i).sort()}function UM(e,t,i,r,n){return NM.apply(this,arguments)}function NM(){return NM=a(s().mark((function e(t,i,r,n,o){var a,l,u,c,h,A,d;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=o.fetch,l=o.parse,!i.uri||i.hasOwnProperty("bufferView")){e.next=10;break}return c=oB(i.uri,n),e.next=5,a(c);case 5:return h=e.sent,e.next=8,h.arrayBuffer();case 8:u=e.sent,i.bufferView={data:u};case 10:return Number.isFinite(i.bufferView)&&(A=aB(t.json,t.buffers,i.bufferView),u=iB(A.buffer,A.byteOffset,A.byteLength)),sB(u,"glTF image has no data"),e.next=14,l(u,[Yx,px],{mimeType:i.mimeType,basis:n.basis||{format:dx()}},o);case 14:(d=e.sent)&&d[0]&&(d={compressed:!0,mipmaps:!1,width:d[0].width,height:d[0].height,data:d[0]}),t.images=t.images||[],t.images[r]=d;case 18:case"end":return e.stop()}}),e)}))),NM.apply(this,arguments)}var VM={name:"glTF",id:"gltf",module:"gltf",version:"3.4.15",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:function(e){return QM.apply(this,arguments)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};function QM(){return QM=a(s().mark((function e(t){var i,r,o,a,l,u=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>1&&void 0!==u[1]?u[1]:{},r=u.length>2?u[2]:void 0,(i=n(n({},VM.options),i)).gltf=n(n({},VM.options.gltf),i.gltf),o=i.byteOffset,a=void 0===o?0:o,l={},e.next=8,TM(l,t,a,i,r);case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)}))),QM.apply(this,arguments)}var HM=function(){return P((function e(t){x(this,e)}),[{key:"load",value:function(e,t,i,r,n,s,o){!function(e,t,i,r,n,s,o){var a=e.viewer.scene.canvas.spinner;a.processes++;var l="glb"===t.split(".").pop();l?e.dataSource.getGLB(t,(function(o){r.basePath=GM(t),zM(e,t,o,i,r,n,s),a.processes--}),(function(e){a.processes--,o(e)})):e.dataSource.getGLTF(t,(function(o){r.basePath=GM(t),zM(e,t,o,i,r,n,s),a.processes--}),(function(e){a.processes--,o(e)}))}(e,t,i,r=r||{},n,(function(){Ae.scheduleTask((function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1)})),s&&s()}),(function(t){e.error(t),o&&o(t),n.fire("error",t)}))}},{key:"parse",value:function(e,t,i,r,n,s,o){zM(e,"",t,i,r=r||{},n,(function(){n.scene.fire("modelLoaded",n.id),n.fire("loaded",!0,!1),s&&s()}))}}])}();function GM(e){var t=e.lastIndexOf("/");return 0!==t?e.substring(0,t+1):""}function zM(e,t,i,r,n,s,o){var a=e.viewer.scene.canvas.spinner;a.processes++,ow(i,VM,{baseUri:n.basePath}).then((function(i){var l={src:t,entityId:n.entityId,metaModelJSON:r,autoMetaModel:n.autoMetaModel,globalizeObjectIds:n.globalizeObjectIds,metaObjects:[],loadBuffer:n.loadBuffer,basePath:n.basePath,handlenode:n.handlenode,backfaces:!!n.backfaces,gltfData:i,scene:s.scene,plugin:e,sceneModel:s,numObjects:0,nodes:[],nextId:0,log:function(t){e.log(t)}};!function(e){var t=e.gltfData,i=t.textures;if(i)for(var r=0,n=i.length;r<n;r++)WM(e,i[r])}(l),function(e){var t=e.gltfData,i=t.materials;if(i)for(var r=0,n=i.length;r<n;r++){var s=i[r];s._textureSetId=KM(e,s),s._attributes=XM(e,s)}}(l),n.autoMetaModel&&l.metaObjects.push({id:s.id,type:"Default",name:s.id}),function(e){var t=e.gltfData,i=t.scene||t.scenes[0];if(!i)return void function(e,t){e.plugin.error(t)}(e,"glTF has no default scene");var r=i.nodes;if(!r)return;!function e(t){t.forEach((function(t){var i=t.mesh;i&&(i.instances||(i.instances=0),i.instances+=1),t.children&&e(t.children)}))}(r);var n=[],s=null;!function t(i,r,o){i.forEach((function(i){var a=i.name,l=null!=a&&a||0===r&&"entity-"+e.nextId++;if(l){for(;e.sceneModel.objects[l];)l="entity-"+e.nextId++;n.push(s),s=[]}var u=function(e,t){var i;e.matrix&&(i=e.matrix,t=t?Y.mulMat4(t,i,Y.mat4()):i);e.translation&&(i=Y.translationMat4v(e.translation),t=t?Y.mulMat4(t,i,Y.mat4()):i);e.rotation&&(i=Y.quaternionToMat4(e.rotation),t=t?Y.mulMat4(t,i,Y.mat4()):i);e.scale&&(i=Y.scalingMat4v(e.scale),t=t?Y.mulMat4(t,i,Y.mat4()):i);return t}(i,o);if(i.mesh&&function(e,t,i,r){var n=e.mesh;if(!n)return;var s=n.primitives.length;if(s>0)for(var o=0;o<s;o++){var a=n.primitives[o];if(!(a.mode<4)){var l={id:t.sceneModel.id+"."+t.numObjects++},u=a.material;u?(l.textureSetId=u._textureSetId,l.color=u._attributes.color,l.opacity=u._attributes.opacity,l.metallic=u._attributes.metallic,l.roughness=u._attributes.roughness):(l.color=new Float32Array([1,1,1]),l.opacity=1);var c=!1!==t.backfaces||u&&!1!==u.doubleSided;switch(a.mode){case 0:l.primitive="points";break;case 1:case 2:case 3:l.primitive="lines";break;default:l.primitive=c?"triangles":"solid"}var h=a.attributes.POSITION;if(h){l.localPositions=h.value,l.positions=new Float64Array(l.localPositions.length),a.attributes.NORMAL&&(l.normals=a.attributes.NORMAL.value),a.attributes.TEXCOORD_0&&(l.uv=a.attributes.TEXCOORD_0.value),a.indices&&(l.indices=a.indices.value),i?Y.transformPositions3(i,l.localPositions,l.positions):l.positions.set(l.localPositions);var A=Y.vec3();we(l.positions,l.positions,A)&&(l.origin=A),t.sceneModel.createMesh(l),r.push(l.id)}}}}(i,e,u,s),i.children&&t(i.children,r+1,u),l){if(s.length>0){var c=e.globalizeObjectIds?Y.globalizeObjectId(e.sceneModel.id,l):l;e.sceneModel.createEntity({id:c,meshIds:s,isObject:!0}),e.autoMetaModel&&e.metaObjects.push({id:c,type:"Default",name:c,parent:e.sceneModel.id})}s=n.pop()}}))}(r,0,null)}(l),s.finalize(),n.autoMetaModel&&e.viewer.metaScene.createMetaModel(s.id,{metaObjects:l.metaObjects}),a.processes--,o()}))}function WM(e,t){if(t.source&&t.source.image){var i="texture-".concat(e.nextId++),r=Ji;switch(t.sampler.minFilter){case 9728:r=qi;break;case 9729:r=Zi;break;case 9984:r=Yi;break;case 9985:r=$i;break;case 9986:r=Ji;break;case 9987:r=tr}var n=Zi;switch(t.sampler.magFilter){case 9728:n=qi;break;case 9729:n=Zi}var s=Wi;switch(t.sampler.wrapS){case 33071:s=Ki;break;case 33648:s=Xi;break;case 10497:s=Wi}var o=Wi;switch(t.sampler.wrapT){case 33071:o=Ki;break;case 33648:o=Xi;break;case 10497:o=Wi}var a=Wi;switch(t.sampler.wrapR){case 33071:a=Ki;break;case 33648:a=Xi;break;case 10497:a=Wi}e.sceneModel.createTexture({id:i,image:t.source.image,flipY:!!t.flipY,minFilter:r,magFilter:n,wrapS:s,wrapT:o,wrapR:a,encoding:pr}),t._textureId=i}}function KM(e,t){var i={};switch(t.normalTexture&&(i.normalTextureId=t.normalTexture.texture._textureId),t.occlusionTexture&&(i.occlusionTextureId=t.occlusionTexture.texture._textureId),t.emissiveTexture&&(i.emissiveTextureId=t.emissiveTexture.texture._textureId),t.alphaMode){case"OPAQUE":break;case"MASK":var r=t.alphaCutoff;i.alphaCutoff=void 0!==r?r:.5}var n=t.pbrMetallicRoughness;if(t.pbrMetallicRoughness){var s=t.pbrMetallicRoughness,o=s.baseColorTexture||s.colorTexture;o&&(o.texture?i.colorTextureId=o.texture._textureId:i.colorTextureId=e.gltfData.textures[o.index]._textureId),n.metallicRoughnessTexture&&(i.metallicRoughnessTextureId=n.metallicRoughnessTexture.texture._textureId)}var a=t.extensions;if(a){var l=a.KHR_materials_pbrSpecularGlossiness;if(l){l.specularTexture;var u=l.specularColorTexture;null!=u&&(i.colorTextureId=e.gltfData.textures[u.index]._textureId)}}return void 0!==i.normalTextureId||void 0!==i.occlusionTextureId||void 0!==i.emissiveTextureId||void 0!==i.colorTextureId||void 0!==i.metallicRoughnessTextureId?(i.id="textureSet-".concat(e.nextId++,";"),e.sceneModel.createTextureSet(i),i.id):null}function XM(e,t){var i=t.extensions,r={color:new Float32Array([1,1,1,1]),opacity:1,metallic:0,roughness:1,doubleSided:!0};if(i){var n=i.KHR_materials_pbrSpecularGlossiness;if(n){var s=n.diffuseFactor;null!=s&&r.color.set(s)}var o=i.KHR_materials_common;if(o){var a=o.technique,l=o.values||{},u="BLINN"===a,c="PHONG"===a,h="LAMBERT"===a,A=l.diffuse;A&&(u||c||h)&&(ne.isString(A)||r.color.set(A));var d=l.transparency;null!=d&&(r.opacity=d);var p=l.transparent;null!=p&&(r.opacity=p)}}var f=t.pbrMetallicRoughness;if(f){var g=f.baseColorFactor;g&&(r.color[0]=g[0],r.color[1]=g[1],r.color[2]=g[2],r.opacity=g[3]);var m=f.metallicFactor;null!=m&&(r.metallic=m);var v=f.roughnessFactor;null!=v&&(r.roughness=v)}return r.doubleSided=!1!==t.doubleSided,r}var qM={DEFAULT:{}},YM=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x(this,e),(i=d(this,e,["GLTFLoader",t,r]))._sceneModelLoader=new HM(i,r),i.dataSource=r.dataSource,i.objectDefaults=r.objectDefaults,i}return _(e,ge),P(e,[{key:"dataSource",get:function(){return this._dataSource},set:function(e){this._dataSource=e||new _h}},{key:"objectDefaults",get:function(){return this._objectDefaults},set:function(e){this._objectDefaults=e||qM}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.id&&this.viewer.scene.components[t.id]&&(this.error("Component with this ID already exists in viewer: "+t.id+" - will autogenerate this ID"),delete t.id);var i=new $c(this.viewer.scene,ne.apply(t,{isModel:!0,dtxEnabled:t.dtxEnabled})),r=i.id;if(!t.src&&!t.gltf)return this.error("load() param expected: src or gltf"),i;if(t.metaModelSrc||t.metaModelJSON){var n=function(n){e.viewer.metaScene.createMetaModel(r,n,{}),e.viewer.scene.canvas.spinner.processes--,t.src?e._sceneModelLoader.load(e,t.src,n,t,i):e._sceneModelLoader.parse(e,t.gltf,n,t,i)};if(t.metaModelSrc){var s=t.metaModelSrc;this.viewer.scene.canvas.spinner.processes++,this._dataSource.getMetaModel(s,(function(t){e.viewer.scene.canvas.spinner.processes--,n(t)}),(function(t){e.error("load(): Failed to load model metadata for model '".concat(r," from '").concat(s,"' - ").concat(t)),e.viewer.scene.canvas.spinner.processes--}))}else t.metaModelJSON&&n(t.metaModelJSON)}else t.src?this._sceneModelLoader.load(this,t.src,null,t,i):this._sceneModelLoader.parse(this,t.gltf,null,t,i);return i.once("destroyed",(function(){e.viewer.metaScene.destroyMetaModel(r)})),i}},{key:"destroy",value:function(){g(e,"destroy",this,3)([])}}])}();function JM(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r="lightgrey",n=i.hoverColor||"rgba(60,120,125,0.3)",s=i.textColor||"rgba(15,75,80,0.8)",o=500,a=o+o/3,l=a/24,u=e.scene.camera.normalUp,c=[{boundary:[6,6,6,6],color:i.frontColor||i.color||"#55FF55"},{boundary:[18,6,6,6],color:i.backColor||i.color||"#55FF55"},{boundary:[12,6,6,6],color:i.rightColor||i.color||"#FF5555"},{boundary:[0,6,6,6],color:i.leftColor||i.color||"#FF5555"},{boundary:[6,0,6,6],color:i.topColor||i.color||"#7777FF"},{boundary:[6,12,6,6],color:i.bottomColor||i.color||"#7777FF"}],h=[{label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,1,0],up:[0,0,1]},{label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,-1,0],up:[0,0,1]},{label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,0,1]},{label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,0,1]},{label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,0,-1],up:[0,1,0]},{label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,0,1],up:[0,-1,0]},{boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,0,-1],up:[1,0,1]},{boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-1,-1],up:[0,-1,1]},{boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,0,-1],up:[-1,0,1]},{boundaries:[[7,11,4,2]],dir:[0,1,1],up:[0,-1,1]},{boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,0,1],up:[-1,0,1]},{boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-1,1],up:[0,1,1]},{boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,0,1],up:[1,0,1]},{boundaries:[[5,7,2,4]],dir:[1,1,0],up:[0,0,1]},{boundaries:[[11,7,2,4]],dir:[-1,1,0],up:[0,0,1]},{boundaries:[[17,7,2,4]],dir:[-1,-1,0],up:[0,0,1]},{boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,-1,0],up:[0,0,1]},{boundaries:[[5,11,2,2]],dir:[1,1,1],up:[-1,-1,1]},{boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[1,-1,1],up:[-1,1,1]},{boundaries:[[5,5,2,2]],dir:[1,1,-1],up:[1,1,1]},{boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-1,-1,1],up:[1,1,1]},{boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-1,-1,-1],up:[-1,-1,1]},{boundaries:[[11,11,2,2]],dir:[-1,1,1],up:[1,-1,1]},{boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[1,-1,-1],up:[1,-1,1]},{boundaries:[[11,5,2,2]],dir:[-1,1,-1],up:[-1,1,1]}];i.frontColor||i.color,i.backColor||i.color,i.rightColor||i.color,i.leftColor||i.color,i.topColor||i.color,i.bottomColor||i.color;var A=[{areaId:0,label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,1,0]},{areaId:1,label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,1,0]},{areaId:2,label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[-1,0,0],up:[0,1,0]},{areaId:3,label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[1,0,0],up:[0,1,0]},{areaId:4,label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,-1,0],up:[0,0,-1]},{areaId:5,label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,1,0],up:[0,0,1]},{areaId:6,boundaries:[[7,5,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{areaId:7,boundaries:[[1,6,4,1],[6,1,1,4]],dir:[1,-1,0],up:[1,1,0]},{areaId:8,boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{areaId:9,boundaries:[[13,6,4,1],[11,1,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{areaId:10,boundaries:[[7,11,4,2]],dir:[0,1,-1],up:[0,1,1]},{areaId:11,boundaries:[[1,11,4,1],[6,13,1,4]],dir:[1,1,0],up:[-1,1,0]},{areaId:12,boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,1,1],up:[0,1,-1]},{areaId:13,boundaries:[[13,11,4,1],[11,13,1,4]],dir:[-1,1,0],up:[1,1,0]},{areaId:14,boundaries:[[5,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{areaId:15,boundaries:[[11,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{areaId:16,boundaries:[[17,7,2,4]],dir:[-1,0,1],up:[0,1,0]},{areaId:17,boundaries:[[0,7,1,4],[23,7,1,4]],dir:[1,0,1],up:[0,1,0]},{areaId:18,boundaries:[[5,11,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]},{areaId:19,boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{areaId:20,boundaries:[[5,5,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{areaId:21,boundaries:[[11,17,1,1],[17,11,2,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{areaId:22,boundaries:[[17,6,2,1],[11,0,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{areaId:23,boundaries:[[11,11,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{areaId:24,boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{areaId:25,boundaries:[[11,5,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]}],d=[{areaId:0,label:"NavCube.front",boundaries:[[7,7,4,4]],dir:[0,0,-1],up:[0,-1,0]},{areaId:1,label:"NavCube.back",boundaries:[[19,7,4,4]],dir:[0,0,1],up:[0,-1,0]},{areaId:2,label:"NavCube.right",boundaries:[[13,7,4,4]],dir:[1,0,0],up:[0,-1,0]},{areaId:3,label:"NavCube.left",boundaries:[[1,7,4,4]],dir:[-1,0,0],up:[0,-1,0]},{areaId:4,label:"NavCube.top",boundaries:[[7,1,4,4]],dir:[0,1,0],up:[0,0,-1]},{areaId:5,label:"NavCube.bottom",boundaries:[[7,13,4,4]],dir:[0,-1,0],up:[0,0,1]},{areaId:6,boundaries:[[7,5,4,2]],dir:[0,1,-1],up:[0,1,1]},{areaId:7,boundaries:[[1,6,4,1],[6,1,1,4]],dir:[-1,1,0],up:[1,1,0]},{areaId:8,boundaries:[[7,0,4,1],[19,6,4,1]],dir:[0,1,1],up:[0,1,-1]},{areaId:9,boundaries:[[13,6,4,1],[11,1,1,4]],dir:[1,1,0],up:[-1,1,0]},{areaId:10,boundaries:[[7,11,4,2]],dir:[0,-.7071,-.7071],up:[0,.7071,-.7071]},{areaId:11,boundaries:[[1,11,4,1],[6,13,1,4]],dir:[-1,-1,0],up:[-1,1,0]},{areaId:12,boundaries:[[7,17,4,1],[19,11,4,1]],dir:[0,-.7071,.7071],up:[0,.7071,.7071]},{areaId:13,boundaries:[[13,11,4,1],[11,13,1,4]],dir:[1,-1,0],up:[1,1,0]},{areaId:14,boundaries:[[5,7,2,4]],dir:[-1,0,-1],up:[0,1,0]},{areaId:15,boundaries:[[11,7,2,4]],dir:[1,0,-1],up:[0,1,0]},{areaId:16,boundaries:[[17,7,2,4]],dir:[1,0,1],up:[0,1,0]},{areaId:17,boundaries:[[0,7,1,4],[23,7,1,4]],dir:[-1,0,1],up:[0,1,0]},{areaId:18,boundaries:[[5,11,2,2]],dir:[-.5,-.7071,-.5],up:[-.5,.7071,-.5]},{areaId:19,boundaries:[[23,11,1,1],[6,17,1,1],[0,11,1,1]],dir:[-.5,-.7071,.5],up:[-.5,.7071,.5]},{areaId:20,boundaries:[[5,5,2,2]],dir:[-.5,.7071,-.5],up:[.5,.7071,.5]},{areaId:21,boundaries:[[11,17,1,1],[17,11,2,1]],dir:[.5,-.7071,.5],up:[.5,.7071,.5]},{areaId:22,boundaries:[[17,6,2,1],[11,0,1,1]],dir:[.5,.7071,.5],up:[-.5,.7071,-.5]},{areaId:23,boundaries:[[11,11,2,2]],dir:[.5,-.7071,-.5],up:[.5,.7071,-.5]},{areaId:24,boundaries:[[0,6,1,1],[6,0,1,1],[23,6,1,1]],dir:[-.5,.7071,.5],up:[.5,.7071,-.5]},{areaId:25,boundaries:[[11,5,2,2]],dir:[.5,.7071,-.5],up:[-.5,.7071,.5]}];d.forEach((function(e){e.areaId>5&&(e.up=[-1*e.up[0],-1*e.up[1],-1*e.up[2]])}));for(var p=u?A:d,f=0,g=h.length;f<g;f++)Y.normalizeVec3(h[f].dir,h[f].dir),Y.normalizeVec3(h[f].up,h[f].up);for(var m=0,v=p.length;m<v;m++)Y.normalizeVec3(p[m].dir,p[m].dir),Y.normalizeVec3(p[m].up,p[m].up);var _=p;this._textureCanvas=document.createElement("canvas"),this._textureCanvas.width=a,this._textureCanvas.height=o,this._textureCanvas.style.width=a+"px",this._textureCanvas.style.height=o+"px",this._textureCanvas.style.padding="0",this._textureCanvas.style.margin="0",this._textureCanvas.style.top="0",this._textureCanvas.style.background=r,this._textureCanvas.style.position="absolute",this._textureCanvas.style.opacity="1.0",this._textureCanvas.style.display="none",this._textureCanvas.style["z-index"]=-100,this._textureCanvas.setAttribute("id","myNavCubeRenderImage"),this.cubeParentDiv=document.createElement("div"),this.cubeParentDiv.setAttribute("id","myNavCubeRenderImage_parent"),this.cubeContainer=i.viewerElement,this.cubeParentDiv.appendChild(this._textureCanvas),this.cubeContainer.appendChild(this.cubeParentDiv);var y=this._textureCanvas.getContext("2d"),b=!1;function w(){for(var e=0,i=c.length;e<i;e++){var o=c[e],a=o.boundary,u=Math.round(a[0]*l),h=Math.round(a[1]*l),A=Math.round(a[2]*l),d=Math.round(a[3]*l);y.fillStyle=o.color,y.fillRect(u,h,A,d)}for(var p=0,f=_.length;p<f;p++){for(var g=void 0,m=void 0,v=void 0,b=void 0,w=_[p],x=w.boundaries,B=0,P=x.length;B<P;B++){var M=x[B];g=Math.round(M[0]*l),m=Math.round(M[1]*l),v=Math.round(M[2]*l),b=Math.round(M[3]*l),w.highlighted&&(y.fillStyle=w.highlighted?n:w.color||r,y.fillRect(g,m,v,b))}if(w.label){y.fillStyle=s,y.font="60px sans-serif",y.textAlign="center";var k=g+.5*v,E=m+.7*b;y.fillText(C(w.label),k,E,80)}}t.glRedraw()}var x,B,P,C=(x={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},B={"NavCube.front":"NavCube.front","NavCube.back":"NavCube.back","NavCube.right":"NavCube.right","NavCube.left":"NavCube.left","NavCube.top":"NavCube.top","NavCube.bottom":"NavCube.bottom"},P={"NavCube.front":"FRONT","NavCube.back":"BACK","NavCube.right":"RIGHT","NavCube.left":"LEFT","NavCube.top":"TOP","NavCube.bottom":"BOTTOM"},function(t){var i=b?B:x,r=i?i[t]:null;return r?e.localeService.translate(r)||P[r]||r:t});this.setZUp=function(){b=!0,_=h,this.clear()},this.setYUp=function(){u=e.scene.camera.normalUp,b=!1,_=u?A:d,this.clear()},this.clear=function(){y.fillStyle=r,y.fillRect(0,0,a,o);for(var e=0,t=_.length;e<t;e++){_[e].highlighted=!1}w()},this.getArea=function(e){for(var t=e[0]*a,i=o-e[1]*o,r=0,n=_.length;r<n;r++)for(var s=_[r].boundaries,u=0,c=s.length;u<c;u++){var h=s[u];if(t>=h[0]*l&&t<=(h[0]+h[2])*l&&i>=h[1]*l&&i<=(h[1]+h[3])*l)return r}return-1},this.setAreaHighlighted=function(e,t){var i=_[e];if(!i)throw"Area not found: "+e;i.highlighted=!!t,w()},this.getAreaDir=function(e){var t=_[e];if(!t)throw"Unknown area: "+e;return t.dir},this.getAreaUp=function(e){var t=_[e];if(!t)throw"Unknown area: "+e;return t.up},this.getImage=function(){return this._textureCanvas},this.destroy=function(){this._textureCanvas&&(this._textureCanvas.parentNode.removeChild(this._textureCanvas),this._textureCanvas=null),this.cubeParentDiv&&(this.cubeParentDiv.parentNode.removeChild(this.cubeParentDiv),this.cubeParentDiv=null)}}var ZM=Y.vec3(),$M=Y.vec3();Y.mat4();var ek=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,e),i=d(this,e,["NavCube",t,r]),t.navCube=i;try{i._navCubeScene=new zi(t,{canvasId:r.canvasId,canvasElement:r.canvasElement,transparent:!0,spinnerElementId:"navcube_spinner",edgesEnabled:!0,contextAttr:{antialias:!0},resolutionScale:window.devicePixelRatio,worldAxis:t.scene.camera.worldAxis}),i._navCubeCanvas=i._navCubeScene.canvas.canvas,i._navCubeScene.input.keyboardEnabled=!1}catch(e){return i.error(e),p(i)}var n=i._navCubeScene;n.clearLights(),new hi(n,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:.8,space:"view"}),new hi(n,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:.8,space:"view"}),new hi(n,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:.8,space:"view"}),i._navCubeCamera=n.camera,i._navCubeCamera.ortho.scale=7,i._navCubeCamera.ortho.near=.1,i._navCubeCamera.ortho.far=2e3,n.edgeMaterial.edgeColor=[.47,.62,.67],n.edgeMaterial.edgeAlpha=.2,n.edgeMaterial.edgeWidth=1,i._zUp=Boolean(t.camera.zUp);var s=i;i.mousedown=!1,i.mouseover=!1,i.setIsProjectNorth(r.isProjectNorth),i.setProjectNorthOffsetAngle(r.projectNorthOffsetAngle);var o,a=i.rotateTrueNorth=(o=Y.mat4(),function(e,t,i){return Y.identityMat4(o),Y.rotationMat4v(e*s._projectNorthOffsetAngle*Y.DEGTORAD,[0,1,0],o),Y.transformVec3(o,t,i)}),l=!1;t.scene.on("aabb",(function(){l=t.scene.camera.normalUp})),i._synchCamera=function(){var e=Y.rotationMat4c(-90*Y.DEGTORAD,1,0,0),i=Y.vec3(),r=Y.vec3(),n=Y.vec3();return function(){var o=t.camera.eye,u=t.camera.look,c=t.camera.up;i=Y.mulVec3Scalar(Y.normalizeVec3(Y.subVec3(o,u,i)),5),s._isProjectNorth&&s._projectNorthOffsetAngle&&(i=a(-1,i,ZM),c=a(-1,c,$M)),s._zUp?(Y.transformVec3(e,i,r),Y.transformVec3(e,c,n),s._navCubeCamera.look=[0,0,0],s._navCubeCamera.eye=Y.transformVec3(e,i,r),s._navCubeCamera.up=Y.transformPoint3(e,c,n)):(s._navCubeCamera.look=[0,0,0],s._navCubeCamera.eye=l?i:Y.mulVec3(i,[-1,-1,1]),s._navCubeCamera.up=c*(l?1:-1))}}(),i._cubeTextureCanvas=new JM(t,n,r),i._cubeSampler=new En(n,{image:i._cubeTextureCanvas.getImage(),flipY:!0,wrapS:Ki,wrapT:Ki}),i._cubeMesh=new on(n,{geometry:new Ci(n,{primitive:"triangles",normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],positions:[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,-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,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),material:new Ti(n,{diffuse:[.4,.4,.4],specular:[.4,.4,.4],emissive:[.6,.6,.6],diffuseMap:i._cubeSampler,emissiveMap:i._cubeSampler}),visible:!0,edges:!0}),i._shadow=!1===r.shadowVisible?null:new on(n,{geometry:new Ci(n,ln({center:[0,0,0],radiusTop:.001,radiusBottom:1.4,height:.01,radialSegments:20,heightSegments:1,openEnded:!0})),material:new Ti(n,{diffuse:[0,0,0],specular:[0,0,0],emissive:[0,0,0],alpha:.5}),position:[0,-1.5,0],visible:!0,pickable:!1,backfaces:!1}),i._onCameraMatrix=t.camera.on("matrix",i._synchCamera),i._onCameraWorldAxis=t.camera.on("worldAxis",(function(){t.camera.zUp?(i._zUp=!0,i._cubeTextureCanvas.setZUp(),i._repaint(),i._synchCamera()):t.camera.yUp&&(i._zUp=!1,i._cubeTextureCanvas.setYUp(),i._repaint(),i._synchCamera()),l=t.scene.camera.normalUp})),i._onCameraFOV=t.camera.perspective.on("fov",(function(e){i._synchProjection&&(i._navCubeCamera.perspective.fov=e)})),i._onCameraProjection=t.camera.on("projection",(function(e){i._synchProjection&&(i._navCubeCamera.projection="ortho"===e||"perspective"===e?e:"perspective")}));var u=-1;function c(e){var t=[0,0];if(e){for(var i=e.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;t[0]=e.pageX-r,t[1]=e.pageY-n}else e=window.event,t[0]=e.x,t[1]=e.y;return t}var h=null,A=null,f=!1;s.MOUSEDOWN=!1;var g=!1;s.MOUSEOVER=!1;var m,v,_=.5;s._navCubeCanvas.addEventListener("mouseenter",s._onMouseEnter=function(e){g=!0,s.MOUSEOVER=!0}),s._navCubeCanvas.addEventListener("mouseleave",s._onMouseLeave=function(e){g=!1,s.MOUSEOVER=!1}),s._navCubeCanvas.addEventListener("mousedown",s._onMouseDown=function(e){if(1===e.which){h=e.x,A=e.y,m=e.clientX,v=e.clientY;var t=c(e);n.pick({canvasPos:t})?(f=!0,s.MOUSEDOWN=!0):(f=!1,s.MOUSEDOWN=!1)}}),document.addEventListener("mouseup",s._onMouseUp=function(e){if(1===e.which&&(f=!1,s.MOUSEDOWN=!1,null!==h)){var t=c(e),i=n.pick({canvasPos:t,pickSurface:!0});if(i&&i.uv){var r=s._cubeTextureCanvas.getArea(i.uv);if(r>=0&&(u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),r>=0)){if(s._cubeTextureCanvas.setAreaHighlighted(r,!0),u=r,s._repaint(),e.x<h-3||e.x>h+3||e.y<A-3||e.y>A+3)return;var o=s._cubeTextureCanvas.getAreaDir(r);if(o){var l=s._cubeTextureCanvas.getAreaUp(r);s._isProjectNorth&&s._projectNorthOffsetAngle&&(o=a(1,o,ZM),l=a(1,l,$M)),y(o,l,(function(){u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),r>=0&&(s._cubeTextureCanvas.setAreaHighlighted(r,!1),u=-1,s._repaint())}))}}}}}),document.addEventListener("mousemove",s._onMouseMove=function(e){if(u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1),1!==e.buttons||f){if(f){var i=e.clientX,r=e.clientY;return document.body.style.cursor="move",void function(e,i){var r=(e-m)*-_,n=(i-v)*-_;t.camera.orbitYaw(r),t.camera.orbitPitch(-n),m=e,v=i}(i,r)}if(g){var o=c(e),a=n.pick({canvasPos:o,pickSurface:!0});if(a){if(a.uv){document.body.style.cursor="pointer";var l=s._cubeTextureCanvas.getArea(a.uv);if(l===u)return;u>=0&&s._cubeTextureCanvas.setAreaHighlighted(u,!1),l>=0&&(s._cubeTextureCanvas.setAreaHighlighted(l,!0),s._repaint(),u=l)}}else document.body.style.cursor="default",u>=0&&(s._cubeTextureCanvas.setAreaHighlighted(u,!1),s._repaint(),u=-1)}}});var y=i.flyTo=function(){var e=Y.vec3();return function(i,r,n){var o=s._fitVisible?t.scene.getAABB(t.scene.visibleObjectIds):t.scene.aabb,a=Y.getAABB3Diag(o);Y.getAABB3Center(o,e);var l=Math.abs(a/Math.tan(s._cameraFitFOV*Y.DEGTORAD));t.cameraControl.pivotPos=e,s._cameraFly?t.cameraFlight.flyTo({look:e,eye:[e[0]-l*i[0],e[1]-l*i[1],e[2]-l*i[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:s._cameraFitFOV,duration:s._cameraFlyDuration},n):t.cameraFlight.jumpTo({look:e,eye:[e[0]-l*i[0],e[1]-l*i[1],e[2]-l*i[2]],up:r||[0,1,0],orthoScale:1.1*a,fitFOV:s._cameraFitFOV},n)}}();return i._onUpdated=t.localeService.on("updated",(function(){i._cubeTextureCanvas.clear(),i._repaint()})),i.setVisible(r.visible),i.setCameraFitFOV(r.cameraFitFOV),i.setCameraFly(r.cameraFly),i.setCameraFlyDuration(r.cameraFlyDuration),i.setFitVisible(r.fitVisible),i.setSynchProjection(r.synchProjection),i}return _(e,ge),P(e,[{key:"flyByClick",value:function(e){if(e>=0){this._cubeTextureCanvas.setAreaHighlighted(e,!0),this._repaint();var t=this._cubeTextureCanvas.getAreaDir(e);if(t){var i=this._cubeTextureCanvas.getAreaUp(e);this._isProjectNorth&&this._projectNorthOffsetAngle&&(t=this.rotateTrueNorth(1,t,ZM),i=this.rotateTrueNorth(1,i,$M)),this.flyTo(t,i,(function(){}))}}}},{key:"jumpByClick",value:function(e){this.setCameraFly(!1),this.flyByClick(e),this.setCameraFly(!0)}},{key:"navCubeScene",get:function(){return this._navCubeScene}},{key:"MOUSEDOWN",get:function(){return this.mousedown},set:function(e){this.mousedown=e}},{key:"MOUSEOVER",get:function(){return this.mouseover},set:function(e){this.mouseover=e}},{key:"send",value:function(e,t){if("language"===e)this._cubeTextureCanvas.clear(),this._repaint()}},{key:"_repaint",value:function(){var e=this._cubeTextureCanvas.getImage();this._cubeMesh.material.diffuseMap.image=e,this._cubeMesh.material.emissiveMap.image=e}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._navCubeCanvas&&(this._cubeMesh.visible=e,this._shadow&&(this._shadow.visible=e),this._navCubeCanvas.style.visibility=e?"visible":"hidden")}},{key:"getVisible",value:function(){return!!this._navCubeCanvas&&this._cubeMesh.visible}},{key:"setFitVisible",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._fitVisible=e}},{key:"getFitVisible",value:function(){return this._fitVisible}},{key:"setCameraFly",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._cameraFly=e}},{key:"getCameraFly",value:function(){return this._cameraFly}},{key:"setCameraFitFOV",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:45;this._cameraFitFOV=e}},{key:"getCameraFitFOV",value:function(){return this._cameraFitFOV}},{key:"setCameraFlyDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5;this._cameraFlyDuration=e}},{key:"getCameraFlyDuration",value:function(){return this._cameraFlyDuration}},{key:"setSynchProjection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._synchProjection=e}},{key:"getSynchProjection",value:function(){return this._synchProjection}},{key:"setIsProjectNorth",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._isProjectNorth=e}},{key:"getIsProjectNorth",value:function(){return this._isProjectNorth}},{key:"setProjectNorthOffsetAngle",value:function(e){this._projectNorthOffsetAngle=e}},{key:"getProjectNorthOffsetAngle",value:function(){return this._projectNorthOffsetAngle}},{key:"destroy",value:function(){this._navCubeCanvas&&(this.viewer.localeService.off(this._onUpdated),this.viewer.camera.off(this._onCameraMatrix),this.viewer.camera.off(this._onCameraWorldAxis),this.viewer.camera.perspective.off(this._onCameraFOV),this.viewer.camera.off(this._onCameraProjection),this._navCubeCanvas.removeEventListener("mouseenter",this._onMouseEnter),this._navCubeCanvas.removeEventListener("mouseleave",this._onMouseLeave),this._navCubeCanvas.removeEventListener("mousedown",this._onMouseDown),document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),this._navCubeCanvas=null,this._cubeTextureCanvas.destroy(),this._cubeTextureCanvas=null,this._onMouseEnter=null,this._onMouseLeave=null,this._onMouseDown=null,this._onMouseMove=null,this._onMouseUp=null),this._navCubeScene.destroy(),this._navCubeScene=null,this._cubeMesh=null,this._shadow=null,g(e,"destroy",this,3)([])}}])}(),tk=new Float64Array([0,0,1]),ik=new Float64Array(4),rk=function(){return P((function e(t){x(this,e),this.id=null,this.type="control",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}),[{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this.posRate},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.camera.look,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(tk,e,ik)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_createNodes",value:function(){var e=!1,t=this._viewer.scene,i=.01;this._rootNode=new yn(t,{id:this.id,position:[0,0,0],scale:[5,5,5],isObject:!1});var r,n,s=this._rootNode,o={arrowHead:new Ci(s,ln({radiusTop:.001,radiusBottom:.07,radialSegments:32,heightSegments:1,height:.2,openEnded:!1})),arrowHeadBig:new Ci(s,ln({radiusTop:.001,radiusBottom:.09,radialSegments:32,heightSegments:1,height:.25,openEnded:!1})),arrowHeadHandle:new Ci(s,ln({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new Ci(s,On({radius:.8,tube:i,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),curveHandle:new Ci(s,On({radius:.8,tube:.06,radialSegments:64,tubeSegments:14,arc:2*Math.PI/4})),hoop:new Ci(s,On({radius:.8,tube:i,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new Ci(s,ln({radiusTop:i,radiusBottom:i,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new Ci(s,ln({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},a={pickable:new Ti(s,{diffuse:[1,1,0],alpha:0,alphaMode:"blend"}),red:new Ti(s,{diffuse:[1,0,0],emissive:[1,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightRed:new Ii(s,{edges:!1,fill:!0,fillColor:[1,0,0],fillAlpha:.6}),green:new Ti(s,{diffuse:[0,1,0],emissive:[0,1,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightGreen:new Ii(s,{edges:!1,fill:!0,fillColor:[0,1,0],fillAlpha:.6}),blue:new Ti(s,{diffuse:[0,0,1],emissive:[0,0,1],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:2}),highlightBlue:new Ii(s,{edges:!1,fill:!0,fillColor:[0,0,1],fillAlpha:.2}),center:new Ti(s,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new Ii(s,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new Ii(s,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:s.addChild(new on(s,{geometry:new Ci(s,{primitive:"triangles",positions:[.5,.5,0,.5,-.5,0,-.5,-.5,0,-.5,.5,0,.5,.5,-0,.5,-.5,-0,-.5,-.5,-0,-.5,.5,-0],indices:[0,1,2,2,3,0]}),material:new Ti(s,{emissive:[0,0,0],diffuse:[0,0,0],backfaces:!0}),opacity:.6,ghosted:!0,ghostMaterial:new Ii(s,{edges:!1,filled:!0,fillColor:[1,1,0],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[2.4,2.4,1],isObject:!1}),e),planeFrame:s.addChild(new on(s,{geometry:new Ci(s,On({center:[0,0,0],radius:1.7,tube:.02,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new Ti(s,{emissive:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],shininess:0}),highlightMaterial:new Ii(s,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,.1],rotation:[0,0,45],isObject:!1}),e),xCurve:s.addChild(new on(s,{geometry:o.curve,material:a.red,matrix:(r=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),n=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4()),Y.mulMat4(n,r,Y.identityMat4())),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xCurveHandle:s.addChild(new on(s,{geometry:o.curveHandle,material:a.pickable,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xCurveArrow1:s.addChild(new on(s,{geometry:o.arrowHead,material:a.red,matrix:function(){var e=Y.translateMat4c(0,-.07,-.8,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(0*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xCurveArrow2:s.addChild(new on(s,{geometry:o.arrowHead,material:a.red,matrix:function(){var e=Y.translateMat4c(0,-.8,-.07,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yCurve:s.addChild(new on(s,{geometry:o.curve,material:a.green,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurveHandle:s.addChild(new on(s,{geometry:o.curveHandle,material:a.pickable,rotation:[-90,0,0],pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurveArrow1:s.addChild(new on(s,{geometry:o.arrowHead,material:a.green,matrix:function(){var e=Y.translateMat4c(.07,0,-.8,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yCurveArrow2:s.addChild(new on(s,{geometry:o.arrowHead,material:a.green,matrix:function(){var e=Y.translateMat4c(.8,0,-.07,Y.identityMat4()),t=Y.scaleMat4v([.6,.6,.6],Y.identityMat4()),i=Y.rotationMat4v(90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(Y.mulMat4(e,t,Y.identityMat4()),i,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),center:s.addChild(new on(s,{geometry:new Ci(s,un({radius:.05})),material:a.center,pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrow:s.addChild(new on(s,{geometry:o.arrowHead,material:a.red,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrowHandle:s.addChild(new on(s,{geometry:o.arrowHeadHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxis:s.addChild(new on(s,{geometry:o.axis,material:a.red,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisHandle:s.addChild(new on(s,{geometry:o.axisHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:s.addChild(new on(s,{geometry:o.arrowHead,material:a.green,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrowHandle:s.addChild(new on(s,{geometry:o.arrowHeadHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,opacity:.2,isObject:!1}),e),yShaft:s.addChild(new on(s,{geometry:o.axis,material:a.green,position:[0,-.5,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yShaftHandle:s.addChild(new on(s,{geometry:o.axisHandle,material:a.pickable,position:[0,-.5,0],pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:s.addChild(new on(s,{geometry:o.arrowHead,material:a.blue,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrowHandle:s.addChild(new on(s,{geometry:o.arrowHeadHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zShaft:s.addChild(new on(s,{geometry:o.axis,material:a.blue,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!1,collidable:!1,visible:!1,isObject:!1}),e),zAxisHandle:s.addChild(new on(s,{geometry:o.axisHandle,material:a.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!0,collidable:!1,visible:!1,isObject:!1}),e)},this._affordanceMeshes={planeFrame:s.addChild(new on(s,{geometry:new Ci(s,On({center:[0,0,0],radius:2,tube:i,radialSegments:4,tubeSegments:4,arc:2*Math.PI})),material:new Ti(s,{ambient:[1,1,1],diffuse:[0,0,0],emissive:[1,1,0]}),highlighted:!0,highlightMaterial:new Ii(s,{edges:!1,filled:!0,fillColor:[1,1,0],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],rotation:[0,0,45],isObject:!1}),e),xHoop:s.addChild(new on(s,{geometry:o.hoop,material:a.red,highlighted:!0,highlightMaterial:a.highlightRed,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yHoop:s.addChild(new on(s,{geometry:o.hoop,material:a.green,highlighted:!0,highlightMaterial:a.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zHoop:s.addChild(new on(s,{geometry:o.hoop,material:a.blue,highlighted:!0,highlightMaterial:a.highlightBlue,matrix:Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4()),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xAxisArrow:s.addChild(new on(s,{geometry:o.arrowHeadBig,material:a.red,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:s.addChild(new on(s,{geometry:o.arrowHeadBig,material:a.green,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:s.addChild(new on(s,{geometry:o.arrowHeadBig,material:a.blue,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e)}}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2,a=3,l=4,u=5,c=this._rootNode,h=null,A=null,d=Y.vec2(),p=Y.vec3([1,0,0]),f=Y.vec3([0,1,0]),g=Y.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,v=this._viewer.camera,_=this._viewer.scene,y=Y.vec3([0,0,0]),b=-1;this._onCameraViewMatrix=_.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=_.camera.on("projMatrix",(function(){})),this._onSceneTick=_.on("tick",(function(){var t=Math.abs(Y.lenVec3(Y.subVec3(_.camera.eye,e._pos,y)));if(t!==b&&"perspective"===v.projection){var i=.07*(Math.tan(v.perspective.fov*Y.DEGTORAD)*t);c.scale=[i,i,i],b=t}if("ortho"===v.projection){var r=v.ortho.scale/10;c.scale=[r,r,r],b=t}}));var w,x,B,P,C,M=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),k=function(){var e=new Float64Array(2);return function(t){if(t||(t=window.event),t.touches&&t.touches.length)e[0]=t.touches[0].pageX,e[1]=t.touches[0].pageY;else{for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}return e}}(),E=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),S=(w=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],w):Y.cross3Vec3(e,[1,0,0],w),Y.cross3Vec3(w,e,w),Y.normalizeVec3(w),w}),T=(x=Y.vec3(),B=Y.vec3(),P=Y.vec4(),function(e,i,r){E(e,P);var n=S(P,i,r);I(i,n,x),I(r,n,B),Y.subVec3(B,x);var s=Y.dotVec3(B,P);t._pos[0]+=P[0]*s*.6,t._pos[1]+=P[1]*s*.6,t._pos[2]+=P[2]*s*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),F=function(){var e=Y.vec4(),i=Y.vec4(),r=Y.vec4(),n=Y.vec4();return function(s,o,a){if(E(s,n),!(I(o,n,e)&&I(a,n,i))){var l=S(n,o,a);I(o,l,e,1),I(a,l,i,1);var u=Y.dotVec3(e,n);e[0]-=u*n[0],e[1]-=u*n[1],e[2]-=u*n[2],u=Y.dotVec3(i,n),i[0]-=u*n[0],i[1]-=u*n[1],i[2]-=u*n[2]}Y.normalizeVec3(e),Y.normalizeVec3(i),u=Y.dotVec3(e,i),u=Y.clamp(u,-1,1);var c=Math.acos(u)*Y.RADTODEG;Y.cross3Vec3(e,i,r),Y.dotVec3(r,n)<0&&(c=-c),t._rootNode.rotate(s,c),D()}}(),I=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/m.width*2-1,e[1]=-(r[1]/m.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(v.projMatrix,v.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=v.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),D=function(){var e=Y.vec3(),i=Y.mat4();return function(){t.sectionPlane&&(Y.quaternionToMat4(c.quaternion,i),Y.transformVec3(i,[0,0,1],e),t._setSectionPlaneDir(e))}}(),R=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){if(e._visible&&!R){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(C&&(C.visible=!1),C=null,h=r,i=!1)})),m.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){R=!0;var r=M(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("clickPlaneStart")}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&R){var i=M(t),r=i[0],c=i[1];switch(A){case n:T(p,d,i);break;case s:T(f,d,i);break;case o:T(g,d,i);break;case a:F(p,d,i);break;case l:F(f,d,i);break;case u:F(g,d,i)}d[0]=r,d[1]=c}}),m.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,R&&(t.which,R=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),m.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))}),this._onCameraControlHover=this._viewer.cameraControl.on("touchEntity",(function(t){if(e._visible&&!R&&!i){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),m.addEventListener("touchstart",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i){e._viewer.cameraControl.pointerEnabled=!1,R=!0;var r=k(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("touchPlaneStart")}}),m.addEventListener("touchmove",this._canvasMouseMoveListener=function(t){if(e._visible&&R){var i=k(t),r=i[0],c=i[1];switch(A){case n:T(p,d,i);break;case s:T(f,d,i);break;case o:T(g,d,i);break;case a:F(p,d,i);break;case l:F(f,d,i);break;case u:F(g,d,i)}d[0]=r,d[1]=c}}),m.addEventListener("touchend",this._canvasTouchEndListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,C&&(C.visible=!1),C=null,h=r,R=!1,i=!1,e.plugin.fire("touchPlaneEnd"))}),m.addEventListener("touchcancel",this._canvasTouchEndListener)}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),nk=new Float64Array([0,0,1]),sk=new Float64Array(4),ok=function(){return P((function e(t,i){x(this,e),this.id=i.id,this.type="control",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,i||(i={}),this._xColor=i.xColor?i.xColor:[.5,.5,.5],this._yColor=i.yColor?i.yColor:[.5,.5,.5],this._zColor=i.zColor?i.zColor:[.5,.5,.5],this._controlFillColor=i.controlFillColor?i.controlFillColor:[.1,.4,.99],this._planeSize=i.planeSize?i.planeSize:1,this._controlSize=i.controlSize?i.controlSize:.07,this._planeOpacity=i.planeOpacity?i.planeOpacity:.4,this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1}),[{key:"_createNodes",value:function(){var e=!1,t=this._viewer.scene,i=t.aabb,r=.01,n=i[3]-i[0],s=i[4]-i[1],o=i[5]-i[2];this._rootNode=new yn(t,{id:"sectionControl",position:[0,0,0],scale:[5,5,5],isObject:!1});var a,l,u=this._rootNode,c={arrowHead:new Ci(u,ln({radiusTop:.001,radiusBottom:.04,radialSegments:32,heightSegments:1,height:.15,openEnded:!1})),arrowHeadBig:new Ci(u,ln({radiusTop:.001,radiusBottom:.05,radialSegments:32,heightSegments:1,height:.18,openEnded:!1})),arrowHeadHandle:new Ci(u,ln({radiusTop:.09,radiusBottom:.09,radialSegments:8,heightSegments:1,height:.37,openEnded:!1})),curve:new Ci(u,On({radius:.5,tube:r,radialSegments:32,tubeSegments:7,arc:2*Math.PI/4})),curveHandle:new Ci(u,On({radius:.5,tube:.04,radialSegments:32,tubeSegments:7,arc:2*Math.PI/4})),hoop:new Ci(u,On({radius:.8,tube:r,radialSegments:64,tubeSegments:8,arc:2*Math.PI})),axis:new Ci(u,ln({radiusTop:r,radiusBottom:r,radialSegments:20,heightSegments:1,height:1,openEnded:!1})),axisHandle:new Ci(u,ln({radiusTop:.08,radiusBottom:.08,radialSegments:20,heightSegments:1,height:1,openEnded:!1}))},h={pickable:new Ti(u,{diffuse:[1,1,0],alpha:0,alphaMode:"opaque"}),red:new Ti(u,{diffuse:this._xColor,emissive:this._xColor,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:1.5}),highlightRed:new Ii(u,{edges:!1,fill:!0,fillColor:[.8,.8,.8],fillAlpha:.6}),green:new Ti(u,{diffuse:this._yColor,emissive:this._yColor,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:1.5}),highlightGreen:new Ii(u,{edges:!1,fill:!0,fillColor:[.8,.8,.8],fillAlpha:.6}),blue:new Ti(u,{diffuse:this._zColor,emissive:this._zColor,ambient:[0,0,0],specular:[.6,.6,.3],shininess:80,lineWidth:1.5}),highlightBlue:new Ii(u,{edges:!1,fill:!0,fillColor:[.8,.8,.8],fillAlpha:.2}),center:new Ti(u,{diffuse:[0,0,0],emissive:[0,0,0],ambient:[0,0,0],specular:[.6,.6,.3],shininess:80}),highlightBall:new Ii(u,{edges:!1,fill:!0,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1}),highlightPlane:new Ii(u,{edges:!0,edgeWidth:3,fill:!1,fillColor:[.5,.5,.5],fillAlpha:.5,vertices:!1})};this._displayMeshes={plane:u.addChild(new on(u,{geometry:new Ci(u,{primitive:"triangles",positions:[10,5,0,10,-5,0,-10,-5,0,-10,5,0],indices:[0,1,2,2,3,0]}),material:new Ti(u,{emissive:[0,0,0],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!1,ghostMaterial:new Ii(u,{edges:!1,filled:!0,fillColor:this._controlFillColor?this._controlFillColor:[.1,.4,.99],edgeColor:[0,0,0],fillAlpha:.1,backfaces:!0}),pickable:!0,collidable:!1,clippable:!1,visible:!1,scale:[this._planeSize,this._planeSize,this._planeSize],isObject:!1}),e),planeFrame:u.addChild(new on(u,{geometry:new Ci(u,Dn({center:[0,0,0],xSize:.1*n,ySize:.1*s,zSize:.1*o})),material:new Ti(u,{emissive:[.5,.5,.5],diffuse:[.5,.5,.5],specular:[.5,.5,.5],alpha:.2,shininess:10}),highlightMaterial:new Ii(u,{edges:!1,edgeColor:[0,0,0],filled:!0,fillColor:[.8,.8,.8],fillAlpha:1}),pickable:!1,collidable:!1,clippable:!1,visible:!1,scale:[1,1,1],isObject:!1}),e),xCurve:u.addChild(new on(u,{geometry:c.curve,material:h.red,matrix:(a=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),l=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4()),Y.mulMat4(l,a,Y.identityMat4())),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xCurveHandle:u.addChild(new on(u,{geometry:c.curveHandle,material:h.pickable,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurve:u.addChild(new on(u,{geometry:c.curve,material:h.green,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),yCurveHandle:u.addChild(new on(u,{geometry:c.curveHandle,material:h.pickable,rotation:[-90,0,0],pickable:!0,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),center:u.addChild(new on(u,{geometry:new Ci(u,un({radius:.05})),material:h.center,pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrow:u.addChild(new on(u,{geometry:c.arrowHead,material:h.red,matrix:function(){var e=Y.translateMat4c(0,1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisArrowHandle:u.addChild(new on(u,{geometry:c.arrowHeadHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxis:u.addChild(new on(u,{geometry:c.axis,material:h.red,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),xAxisHandle:u.addChild(new on(u,{geometry:c.axisHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:u.addChild(new on(u,{geometry:c.arrowHead,material:h.green,matrix:function(){var e=Y.translateMat4c(0,1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrowHandle:u.addChild(new on(u,{geometry:c.arrowHeadHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,opacity:.2,isObject:!1}),e),yShaft:u.addChild(new on(u,{geometry:c.axis,material:h.green,position:[0,-.5,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yShaftHandle:u.addChild(new on(u,{geometry:c.axisHandle,material:h.pickable,position:[0,-.5,0],pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:u.addChild(new on(u,{geometry:c.arrowHead,material:h.blue,matrix:function(){var e=Y.translateMat4c(0,1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[2,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrowHandle:u.addChild(new on(u,{geometry:c.arrowHeadHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!0,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zShaft:u.addChild(new on(u,{geometry:c.axis,material:h.blue,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!1,collidable:!1,visible:!1,isObject:!1}),e),zAxisHandle:u.addChild(new on(u,{geometry:c.axisHandle,material:h.pickable,matrix:function(){var e=Y.translateMat4c(0,.5,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),clippable:!1,pickable:!0,collidable:!1,visible:!1,isObject:!1}),e)},this._affordanceMeshes={xHoop:u.addChild(new on(u,{geometry:c.hoop,material:h.red,highlighted:!0,highlightMaterial:h.highlightRed,matrix:function(){var e=Y.rotationMat4v(90*Y.DEGTORAD,[0,1,0],Y.identityMat4()),t=Y.rotationMat4v(270*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yHoop:u.addChild(new on(u,{geometry:c.hoop,material:h.green,highlighted:!0,highlightMaterial:h.highlightGreen,rotation:[-90,0,0],pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zHoop:u.addChild(new on(u,{geometry:c.hoop,material:h.blue,highlighted:!0,highlightMaterial:h.highlightBlue,matrix:Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4()),pickable:!1,collidable:!1,clippable:!1,backfaces:!0,visible:!1,isObject:!1}),e),xAxisArrow:u.addChild(new on(u,{geometry:c.arrowHeadBig,material:h.red,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[0,0,1],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),yAxisArrow:u.addChild(new on(u,{geometry:c.arrowHeadBig,material:h.green,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(180*Y.DEGTORAD,[1,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e),zAxisArrow:u.addChild(new on(u,{geometry:c.arrowHeadBig,material:h.blue,matrix:function(){var e=Y.translateMat4c(0,1.1,0,Y.identityMat4()),t=Y.rotationMat4v(-90*Y.DEGTORAD,[.8,0,0],Y.identityMat4());return Y.mulMat4(t,e,Y.identityMat4())}(),pickable:!1,collidable:!1,clippable:!1,visible:!1,isObject:!1}),e)}}},{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.controlId,this._createNodes(),this._bindEvents(),this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this.posRate},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.camera.look,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(nk,e,sk)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2,a=3,l=4,u=5,c=this._rootNode,h=null,A=null,d=Y.vec2(),p=Y.vec3([1,0,0]),f=Y.vec3([0,1,0]),g=Y.vec3([0,0,1]),m=this._viewer.scene.canvas.canvas,v=this._viewer.camera,_=this._viewer.scene,y=Y.vec3([0,0,0]),b=-1;this._onCameraViewMatrix=_.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=_.camera.on("projMatrix",(function(){})),this._onSceneTick=_.on("tick",(function(){var t=Math.abs(Y.lenVec3(Y.subVec3(_.camera.eye,e._pos,y)));t!==b&&"perspective"===v.projection&&(Math.tan(v.perspective.fov*Y.DEGTORAD),b=t),"ortho"===v.projection&&(v.ortho.scale,b=t)}));var w,x,B,P,C,M=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),k=function(){var e=new Float64Array(2);return function(t){if(t||(t=window.event),t.touches&&t.touches.length)e[0]=t.touches[0].pageX,e[1]=t.touches[0].pageY;else{for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}return e}}(),E=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),S=(w=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],w):Y.cross3Vec3(e,[1,0,0],w),Y.cross3Vec3(w,e,w),Y.normalizeVec3(w),w}),T=(x=Y.vec3(),B=Y.vec3(),P=Y.vec4(),function(e,i,r){E(e,P);var n=S(P,i,r);I(i,n,x),I(r,n,B),Y.subVec3(B,x);var s=Y.dotVec3(B,P);t._pos[0]+=P[0]*s*.6,t._pos[1]+=P[1]*s*.6,t._pos[2]+=P[2]*s*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),F=function(){var e=Y.vec4(),i=Y.vec4(),r=Y.vec4(),n=Y.vec4();return function(s,o,a){if(E(s,n),!(I(o,n,e)&&I(a,n,i))){var l=S(n,o,a);I(o,l,e,1),I(a,l,i,1);var u=Y.dotVec3(e,n);e[0]-=u*n[0],e[1]-=u*n[1],e[2]-=u*n[2],u=Y.dotVec3(i,n),i[0]-=u*n[0],i[1]-=u*n[1],i[2]-=u*n[2]}Y.normalizeVec3(e),Y.normalizeVec3(i),u=Y.dotVec3(e,i),u=Y.clamp(u,-1,1);var c=Math.acos(u)*Y.RADTODEG;Y.cross3Vec3(e,i,r),Y.dotVec3(r,n)<0&&(c=-c),t._rootNode.rotate(s,c),D()}}(),I=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/m.width*2-1,e[1]=-(r[1]/m.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(v.projMatrix,v.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=v.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),D=function(){var e=Y.vec3(),i=Y.mat4();return function(){t.sectionPlane&&(Y.quaternionToMat4(c.quaternion,i),Y.transformVec3(i,[0,0,1],e),t._setSectionPlaneDir(e))}}(),R=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){if(e._visible&&!R){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(C&&(C.visible=!1),C=null,h=r,i=!1)})),m.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){R=!0;var r=M(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("clickPlaneStart")}}),m.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&R&&i){var r=M(t),c=r[0],h=r[1];switch(A){case n:T(p,d,r);break;case s:T(f,d,r);break;case o:T(g,d,r);break;case a:F(p,d,r);break;case l:F(f,d,r);break;case u:F(g,d,r)}d[0]=c,d[1]=h}}),m.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,R&&(R=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),m.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))}),this._onCameraControlHover=this._viewer.cameraControl.on("touchEntity",(function(t){if(e._visible&&!R&&!i){var u;switch(i=!1,C&&(C.visible=!1),t.entity.id){case e._displayMeshes.xAxisArrowHandle.id:case e._displayMeshes.xAxisHandle.id:u=e._affordanceMeshes.xAxisArrow,h=n;break;case e._displayMeshes.yAxisArrowHandle.id:case e._displayMeshes.yShaftHandle.id:u=e._affordanceMeshes.yAxisArrow,h=s;break;case e._displayMeshes.zAxisArrowHandle.id:case e._displayMeshes.zAxisHandle.id:u=e._affordanceMeshes.zAxisArrow,h=o;break;case e._displayMeshes.xCurveHandle.id:u=e._affordanceMeshes.xHoop,h=a;break;case e._displayMeshes.yCurveHandle.id:u=e._affordanceMeshes.yHoop,h=l;break;default:return void(h=r)}u&&(u.visible=!0),C=u,i=!0}})),m.addEventListener("touchstart",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i){e._viewer.cameraControl.pointerEnabled=!1,R=!0;var r=k(t);A=h,d[0]=r[0],d[1]=r[1],e.plugin.fire("touchPlaneStart")}}),m.addEventListener("touchmove",this._canvasMouseMoveListener=function(t){if(e._visible&&R){var i=k(t),r=i[0],c=i[1];switch(A){case n:T(p,d,i);break;case s:T(f,d,i);break;case o:T(g,d,i);break;case a:F(p,d,i);break;case l:F(f,d,i);break;case u:F(g,d,i)}d[0]=r,d[1]=c}}),m.addEventListener("touchend",this._canvasTouchEndListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,C&&(C.visible=!1),C=null,h=r,R=!1,i=!1,e.plugin.fire("touchPlaneEnd"))}),m.addEventListener("touchcancel",this._canvasTouchEndListener)}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),ak=new Float64Array([0,0,1]),lk=new Float64Array(4),uk=function(){return P((function e(t,i){x(this,e),this.id=i.id,this.type="plane",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,i?(this._controlFillColor=i.controlFillColor?i.controlFillColor:[.3,.6,1],this._planeSize=i.planeSize?i.planeSize:1,this._controlSize=i.controlSize?i.controlSize:.07,this._planeOpacity=i.planeOpacity?i.planeOpacity:.4,this._enableClip=!!i.enableClip):(this._controlFillColor=[.3,.6,1],this._planeSize=1,this._controlSize=.07,this._planeOpacity=.4,this._enableClip=!1),this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1}),[{key:"_createNodes",value:function(){var e=!1,t=this._viewer.scene;this._rootNode=new yn(t,{id:this.id,position:[0,0,0],scale:[1,1,1],isObject:!1});var i,r,n=this._rootNode,s=t.aabb,o=s[3]-s[0],a=s[4]-s[1],l=s[5]-s[2];0!=this.dir[0]?(i=l>0?1*l:1*l*-1,r=a>0?1*a:1*a*-1):0!=this.dir[1]?(i=o>0?1*o:1*o*-1,r=l>0?1*l:1*l*-1):0!=this.dir[2]&&(i=o>0?1*o:1*o*-1,r=a>0?1*a:1*a*-1),i+=0,r+=0,this._displayMeshes={plane:n.addChild(new on(n,{geometry:new Ci(n,{primitive:"triangles",positions:[i/2,r/2,.01,i/2,-r/2,.01,-i/2,-r/2,.01,-i/2,r/2,.01],indices:[0,1,2,2,3,0]}),material:new Ti(n,{emissive:[.1,.1,.1],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!0,ghostMaterial:new Ii(n,{edges:!1,filled:!0,fillColor:this._controlFillColor,fillAlpha:.1,backfaces:!0}),pickable:this.pickable,collidable:!1,clippable:this._enableClip,visible:!1,scale:[1*this._planeSize,1*this._planeSize,1*this._planeSize],isObject:!1}),e)},this._affordanceMeshes={plane:n.addChild(new on(n,{geometry:new Ci(n,{primitive:"triangles",positions:[i/2,r/2,.012,i/2,-r/2,.012,-i/2,-r/2,.012,-i/2,r/2,.012],indices:[0,1,2,2,3,0]}),material:new Ti(n,{emissive:[.6,.6,5],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!0,ghostMaterial:new Ii(n,{edges:!1,filled:!0,fillColor:this._controlFillColor,fillAlpha:.1,backfaces:!0}),pickable:!0,collidable:!1,clippable:!0,visible:!1,scale:[1*this._planeSize,1*this._planeSize,1*this._planeSize],isObject:!1}),e)}}},{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.controlId,this.dir=e.dir,this._createNodes(),this._bindEvents(),this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,e.control=this,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this._pos},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.center,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(ak,e,lk)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2;this._rootNode;var a=null,l=null,u=Y.vec2();this.lastCanvasPos=u;var c=Y.vec3([1,0,0]),h=Y.vec3([0,1,0]),A=Y.vec3([0,0,1]),d=this._viewer.scene.canvas.canvas,p=this._viewer.camera,f=this._viewer.scene;this._onCameraViewMatrix=f.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=f.camera.on("projMatrix",(function(){}));var g,m,v,_,y,b=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),w=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),x=(g=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],g):Y.cross3Vec3(e,[1,0,0],g),Y.cross3Vec3(g,e,g),Y.normalizeVec3(g),g}),B=(m=Y.vec3(),v=Y.vec3(),_=Y.vec4(),function(e,i,r){w(e,_);var n=x(_,i,r);P(i,n,m),P(r,n,v),Y.subVec3(v,m);var s,o=Y.dotVec3(v,_),a=t._sectionPlane.dir,l=t._sectionPlane.planeId,u=t._sectionPlane.posRangeMin;if(s=t._sectionPlane.box.boxRanges[(l+3)%6],0!=a[0]){if(a[0]>0){if(s=t._sectionPlane.box.boxRanges[(l+3)%6],t._pos[0]+_[0]*o*.6<u[0]||t._pos[0]+_[0]*o*.6>s[0]-.3)return}else if(t._pos[0]+_[0]*o*.6>u[0]||t._pos[0]+_[0]*o*.6<s[0]+.3)return}else if(0!=a[1]){if(a[1]>0){if(t._pos[1]+_[1]*o*.6<u[1]||t._pos[1]+_[1]*o*.6>s[1]-.3)return}else if(t._pos[1]+_[1]*o*.6>u[1]||t._pos[1]+_[1]*o*.6<s[1]+.3)return}else if(0!=a[2])if(a[2]>0){if(t._pos[2]+_[2]*o*.6<u[2]||t._pos[2]+_[2]*o*.6>s[2]-.3)return}else if(t._pos[2]+_[2]*o*.6>u[2]||t._pos[2]+_[2]*o*.6<s[2]+.3)return;t._pos[0]+=_[0]*o*.6,t._pos[1]+=_[1]*o*.6,t._pos[2]+=_[2]*o*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),P=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/d.width*2-1,e[1]=-(r[1]/d.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(p.projMatrix,p.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=p.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),C=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){var n;e._visible&&(C||(i=!1,y&&(y.visible=!1),t.entity.id===e._displayMeshes.plane.id?(n=e._affordanceMeshes.plane,a=o,n&&(n.visible=!0),y=n,i=!0):a=r))})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(y&&(y.visible=!1),a=r,i=!1)})),d.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){C=!0;var r=b(t);l=a,u[0]=r[0],u[1]=r[1],e.plugin.fire("clickPlaneStart")}}),d.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&C){var i=b(t),r=i[0],a=i[1];switch(l){case n:B(c,u,i);break;case s:B(h,u,i);break;case o:B(A,u,i)}u[0]=r,u[1]=a}}),d.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,C&&(C=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),d.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))})}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),ck=new Float64Array([0,0,1]),hk=new Float64Array(4),Ak=function(){return P((function e(t,i){x(this,e),this.id=null,this.type="plane",this.plugin=t,this._viewer=t.viewer,this._scene=t.viewer.scene,this._controlFillColor=i&&i.controlFillColor?i.controlFillColor:[.1,.4,.99],this._planeSize=i&&i.planeSize?i.planeSize:1,this._controlSize=i&&i.controlSize?i.controlSize:.07,this._planeOpacity=i&&i.planeOpacity?i.planeOpacity:.4,this._visible=!1,this._pos=Y.vec3(),this._origin=Y.vec3(),this._rtcPos=Y.vec3(),this._baseDir=Y.vec3(),this._rootNode=null,this._displayMeshes=null,this._affordanceMeshes=null,this._ignoreNextSectionPlaneDirUpdate=!1,this._createNodes(),this._bindEvents()}),[{key:"_createNodes",value:function(){var e=this._viewer.scene;this._rootNode=new yn(e,{position:[0,0,0],scale:[5,5,5],isObject:!1});var t=this._rootNode;this._displayMeshes={plane:t.addChild(new on(t,{geometry:new Ci(t,{primitive:"triangles",positions:[.5,.5,.02,.5,-.5,.02,-.5,-.5,.02,-.5,.5,.02],indices:[0,1,2,2,3,0]}),material:new Ti(t,{emissive:[0,0,0],diffuse:this._controlFillColor,backfaces:!0}),opacity:this._planeOpacity,ghosted:!0,ghostMaterial:new Ii(t,{edges:!1,filled:!0,fillColor:this._controlFillColor?this._controlFillColor:[.1,.4,.99],fillAlpha:.1,backfaces:!0}),pickable:!0,collidable:!1,clippable:!1,visible:!1,scale:[2.4*this._planeSize,2.4*this._planeSize,1*this._planeSize],isObject:!1}),!1)},this._affordanceMeshes={}}},{key:"_setSectionPlane",value:function(e){var t=this;this._sectionPlane&&(this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._onSectionPlanePos=null,this._onSectionPlaneDir=null,this._sectionPlane=null),e&&(this.id=e.id,this._setPos(e.pos),this._setDir(e.dir),this._sectionPlane=e,e.control=this,this._onSectionPlanePos=e.on("pos",(function(){t._setPos(t._sectionPlane.pos)})),this._onSectionPlaneDir=e.on("dir",(function(){t._ignoreNextSectionPlaneDirUpdate?t._ignoreNextSectionPlaneDirUpdate=!1:t._setDir(t._sectionPlane.dir)})))}},{key:"sectionPlane",get:function(){return this._sectionPlane}},{key:"pos",get:function(){return this._pos},set:function(e){if(!(e<0||e>100)){var t=this._scene.aabb,i=this._scene.center,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2],o=Y.vec3();o[0]=this.pos[0],o[1]=this.pos[1],o[2]=this.pos[2];var a,l=this._sectionPlane.dir;0!=l[0]?(a=e/100*r,o[0]=i[0]-r/2+a):0!=l[1]?(a=e/100*n,o[1]=i[1]-n/2+a):0!=l[2]&&(a=e/100*s,o[2]=i[2]-s/2+a),this._sectionPlane.pos=o}}},{key:"posRate",get:function(){var e=this._scene.aabb,t=this._scene.center,i=e[3]-e[0],r=e[4]-e[1],n=e[5]-e[2],s=this._sectionPlane.pos,o=this._sectionPlane.dir,a=0;if(0!=o[0])a=(s[0]-(t[0]-i/2))/i*100;else if(0!=o[1]){a=(s[1]-(t[1]-r/2))/r*100}else if(0!=o[2]){a=(s[2]-(t[2]-n/2))/n*100}return a=Math.max(0,Math.min(100,a)),parseInt(a)}},{key:"_setPos",value:function(e){this._pos.set(e),be(this._pos,this._origin,this._rtcPos),this._rootNode.origin=this._origin,this._rootNode.position=this._rtcPos}},{key:"_setDir",value:function(e){this._baseDir.set(e),this._rootNode.quaternion=Y.vec3PairToQuaternion(ck,e,hk)}},{key:"_setSectionPlaneDir",value:function(e){this._sectionPlane&&(this._ignoreNextSectionPlaneDirUpdate=!0,this._sectionPlane.dir=e)}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"setCulled",value:function(e){var t;for(t in this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].culled=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].culled=e)}},{key:"_bindEvents",value:function(){var e=this,t=this,i=!1,r=-1,n=0,s=1,o=2;this._rootNode;var a=null,l=null,u=Y.vec2();this.lastCanvasPos=u;var c=Y.vec3([1,0,0]),h=Y.vec3([0,1,0]),A=Y.vec3([0,0,1]),d=this._viewer.scene.canvas.canvas,p=this._viewer.camera,f=this._viewer.scene,g=Y.vec3([0,0,0]),m=-1;this._onCameraViewMatrix=f.camera.on("viewMatrix",(function(){})),this._onCameraProjMatrix=f.camera.on("projMatrix",(function(){})),this._onSceneTick=f.on("tick",(function(){var t=Math.abs(Y.lenVec3(Y.subVec3(f.camera.eye,e._pos,g)));t!==m&&"perspective"===p.projection&&(Math.tan(p.perspective.fov*Y.DEGTORAD),m=t),"ortho"===p.projection&&(p.ortho.scale,m=t)}));var v,_,y,b,w=function(){var e=new Float64Array(2);return function(t){if(t){for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}else t=window.event,e[0]=t.x,e[1]=t.y;return e}}(),x=function(){var e=new Float64Array(2);return function(t){if(t||(t=window.event),t.touches&&t.touches.length)e[0]=t.touches[0].pageX,e[1]=t.touches[0].pageY;else{for(var i=t.target,r=0,n=0;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;e[0]=t.pageX-r,e[1]=t.pageY-n}return e}}(),B=function(){var e=Y.mat4();return function(i,r){return Y.quaternionToMat4(t._rootNode.quaternion,e),Y.transformVec3(e,i,r),Y.normalizeVec3(r),r}}(),P=(v=Y.vec3(),function(e){var t=Math.abs(e[0]);return t>Math.abs(e[1])&&t>Math.abs(e[2])?Y.cross3Vec3(e,[0,1,0],v):Y.cross3Vec3(e,[1,0,0],v),Y.cross3Vec3(v,e,v),Y.normalizeVec3(v),v}),C=(_=Y.vec3(),y=Y.vec3(),b=Y.vec4(),function(e,i,r){B(e,b);var n=P(b,i,r);M(i,n,_),M(r,n,y),Y.subVec3(y,_);var s=Y.dotVec3(y,b);t._pos[0]+=b[0]*s*.6,t._pos[1]+=b[1]*s*.6,t._pos[2]+=b[2]*s*.6,t._rootNode.position=t._pos,t._sectionPlane&&(t._sectionPlane.pos=t._pos)}),M=function(){var e=Y.vec4([0,0,0,1]),i=Y.mat4();return function(r,n,s,o){o=o||0,e[0]=r[0]/d.width*2-1,e[1]=-(r[1]/d.height*2-1),e[2]=0,e[3]=1,Y.mulMat4(p.projMatrix,p.viewMatrix,i),Y.inverseMat4(i),Y.transformVec4(i,e,e),Y.mulVec4Scalar(e,1/e[3]);var a=p.eye;Y.subVec4(e,a,e);var l=t._sectionPlane.pos,u=-Y.dotVec3(l,n)-o,c=Y.dotVec3(n,e);if(Math.abs(c)>.005){var h=-(Y.dotVec3(n,a)+u)/c;return Y.mulVec3Scalar(e,h,s),Y.addVec3(s,a),Y.subVec3(s,l,s),!0}return!1}}(),k=!1;this._onCameraControlHover=this._viewer.cameraControl.on("hoverEnter",(function(t){e._visible&&(k||(i=!1,t.entity.id===e._displayMeshes.plane.id?(a=o,i=!0):a=r))})),this._onCameraControlHoverLeave=this._viewer.cameraControl.on("hoverOut",(function(t){e._visible&&(a=r,i=!1)})),d.addEventListener("mousedown",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&(e._viewer.cameraControl.pointerEnabled=!1,1===t.which)){k=!0;var r=w(t);l=a,u[0]=r[0],u[1]=r[1],e.plugin.fire("clickPlaneStart")}}),d.addEventListener("mousemove",this._canvasMouseMoveListener=function(t){if(e._visible&&k){var i=w(t),r=i[0],a=i[1];switch(l){case n:C(c,u,i);break;case s:C(h,u,i);break;case o:C(A,u,i)}u[0]=r,u[1]=a}}),d.addEventListener("mouseup",this._canvasMouseUpListener=function(t){e._visible&&(e._viewer.cameraControl.pointerEnabled=!0,k&&(t.which,k=!1,i=!1,e.plugin.fire("clickPlaneEnd")))}),d.addEventListener("wheel",this._canvasWheelListener=function(t){if(e._visible)Math.max(-1,Math.min(1,40*-t.deltaY))}),this._onCameraControlHover=this._viewer.cameraControl.on("touchEntity",(function(t){var n;!e._visible||k||i||(t.entity.id===e._displayMeshes.plane.id?(n=e._affordanceMeshes.plane,a=o,n&&(n.visible=!0),i=!0,k=!0):a=r)})),d.addEventListener("touchstart",this._canvasMouseDownListener=function(t){if(t.preventDefault(),e._visible&&i&&k){e._viewer.cameraControl.pointerEnabled=!1;var r=x(t);l=a,u[0]=r[0],u[1]=r[1],e.plugin.fire("touchPlaneStart")}}),d.addEventListener("touchmove",this._canvasMouseMoveListener=function(t){if(e._visible&&k&&i){var r=x(t),a=r[0],d=r[1];switch(l){case n:C(c,u,r);break;case s:C(h,u,r);break;case o:C(A,u,r)}u[0]=a,u[1]=d}}),d.addEventListener("touchend",this._canvasTouchEndListener=function(t){e._visible&&(i&&(e._viewer.cameraControl.pointerEnabled=!0),a=r,k=!1,i=!1,e.plugin.fire("touchPlaneEnd"))}),d.addEventListener("touchcancel",this._canvasTouchEndListener)}},{key:"_destroy",value:function(){this._unbindEvents(),this._destroyNodes()}},{key:"_unbindEvents",value:function(){var e=this._viewer,t=e.scene,i=t.canvas.canvas,r=e.camera,n=e.cameraControl;t.off(this._onSceneTick),i.removeEventListener("mousedown",this._canvasMouseDownListener),i.removeEventListener("mousemove",this._canvasMouseMoveListener),i.removeEventListener("mouseup",this._canvasMouseUpListener),i.removeEventListener("wheel",this._canvasWheelListener),i.removeEventListener("touchend",this._canvasTouchEndListener),i.removeEventListener("touchcancel",this._canvasTouchEndListener),r.off(this._onCameraViewMatrix),r.off(this._onCameraProjMatrix),n.off(this._onCameraControlHover),n.off(this._onCameraControlHoverLeave)}},{key:"_destroyNodes",value:function(){this._setSectionPlane(null),this._rootNode.destroy(),this._displayMeshes={},this._affordanceMeshes={}}}])}(),dk=function(){return P((function e(t,i,r){var n=this;x(this,e),this.id=r.id,this._sectionPlane=r,this._mesh=new on(i,{id:r.id,geometry:new Ci(i,Mi({xSize:.5,ySize:.5,zSize:.001})),material:new Ti(i,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new Ri(i,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ii(i,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ii(i,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});var s=Y.vec3([0,0,0]),o=Y.vec3(),a=Y.vec3([0,0,1]),l=Y.vec4(4),u=Y.vec3(),c=function(){var e=n._sectionPlane.scene.center,t=[-n._sectionPlane.dir[0],-n._sectionPlane.dir[1],-n._sectionPlane.dir[2]];Y.subVec3(e,n._sectionPlane.pos,s);var i=-Y.dotVec3(t,s);Y.normalizeVec3(t),Y.mulVec3Scalar(t,i,o);var r=Y.vec3PairToQuaternion(a,n._sectionPlane.dir,l);u[0]=.1*o[0],u[1]=.1*o[1],u[2]=.1*o[2],n._mesh.quaternion=r,n._mesh.position=u};this._onSectionPlanePos=this._sectionPlane.on("pos",c),this._onSectionPlaneDir=this._sectionPlane.on("dir",c),this._highlighted=!1,this._selected=!1}),[{key:"setHighlighted",value:function(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}},{key:"getHighlighted",value:function(){return this._highlighted}},{key:"setSelected",value:function(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}},{key:"getSelected",value:function(){return this._selected}},{key:"destroy",value:function(){this._sectionPlane.off(this._onSectionPlanePos),this._sectionPlane.off(this._onSectionPlaneDir),this._mesh.destroy()}}])}(),pk=function(){return P((function e(t,i,r){var n=this;x(this,e),this.id=sectionPlane.id,this._sectionBox=r,this._mesh=new on(i,{id:sectionPlane.id,geometry:new Ci(i,Mi({xSize:.5,ySize:.5,zSize:.001})),material:new Ti(i,{emissive:[1,1,1],diffuse:[0,0,0],backfaces:!1}),edgeMaterial:new Ri(i,{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),highlightMaterial:new Ii(i,{fill:!0,fillColor:[.5,1,.5],fillAlpha:.7,edges:!0,edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1}),selectedMaterial:new Ii(i,{fill:!0,fillColor:[0,0,1],fillAlpha:.7,edges:!0,edgeColor:[1,0,0],edgeAlpha:1,edgeWidth:1}),highlighted:!0,scale:[3,3,3],position:[0,0,0],rotation:[0,0,0],opacity:.3,edges:!0});var s=Y.vec3([0,0,0]),o=Y.vec3(),a=Y.vec3([0,0,1]),l=Y.vec4(4),u=Y.vec3(),c=function(){var e=n._sectionBox.scene.center,t=[-n._sectionBox.dir[0],-n._sectionBox.dir[1],-n._sectionBox.dir[2]];Y.subVec3(e,n._sectionBox.pos,s);var i=-Y.dotVec3(t,s);Y.normalizeVec3(t),Y.mulVec3Scalar(t,i,o);var r=Y.vec3PairToQuaternion(a,n._sectionBox.dir,l);u[0]=.1*o[0],u[1]=.1*o[1],u[2]=.1*o[2],n._mesh.quaternion=r,n._mesh.position=u};this._onSectionPlanePos=this._sectionBox.on("pos",c),this._onSectionPlaneDir=this._sectionBox.on("dir",c),this._highlighted=!1,this._selected=!1}),[{key:"setHighlighted",value:function(e){this._highlighted=!!e,this._mesh.highlighted=this._highlighted,this._mesh.highlightMaterial.fillColor=e?[0,.7,0]:[0,0,0]}},{key:"getHighlighted",value:function(){return this._highlighted}},{key:"setSelected",value:function(e){this._selected=!!e,this._mesh.edgeMaterial.edgeWidth=e?3:1,this._mesh.highlightMaterial.edgeWidth=e?3:1}},{key:"getSelected",value:function(){return this._selected}},{key:"destroy",value:function(){this._sectionBox.off(this._onSectionPlanePos),this._sectionBox.off(this._onSectionPlaneDir),this._mesh.destroy()}}])}(),fk=function(){return P((function e(t,i){var r=this;if(x(this,e),!(i.onHoverEnterPlane&&i.onHoverLeavePlane&&i.onClickedNothing&&i.onClickedPlane))throw"Missing config(s): onHoverEnterPlane, onHoverLeavePlane, onClickedNothing || onClickedPlane";this.plugin=t,this._viewer=t.viewer,this._onHoverEnterPlane=i.onHoverEnterPlane,this._onHoverLeavePlane=i.onHoverLeavePlane,this._onClickedNothing=i.onClickedNothing,this._onClickedPlane=i.onClickedPlane,this._visible=!0,this._planes={},this._box=null,this._canvas=i.overviewCanvas,this._scene=new zi(this._viewer,{canvasId:this._canvas.id,transparent:!0,spinnerElementId:"overviewer_spinner"}),this._scene.clearLights(),new hi(this._scene,{dir:[.4,-.4,.8],color:[.8,1,1],intensity:1,space:"view"}),new hi(this._scene,{dir:[-.8,-.3,-.4],color:[.8,.8,.8],intensity:1,space:"view"}),new hi(this._scene,{dir:[.8,-.6,-.8],color:[1,1,1],intensity:1,space:"view"}),this._scene.camera,this._scene.camera.perspective.fov=70,this._zUp=!1;var n=this._scene.camera,s=Y.rotationMat4c(-90*Y.DEGTORAD,1,0,0),o=Y.vec3(),a=Y.vec3(),l=Y.vec3();this._synchCamera=function(){var e=r._viewer.camera.eye,t=r._viewer.camera.look,i=r._viewer.camera.up;Y.mulVec3Scalar(Y.normalizeVec3(Y.subVec3(e,t,o)),7),r._zUp?(Y.transformVec3(s,o,a),Y.transformVec3(s,i,l),n.look=[0,0,0],n.eye=Y.transformVec3(s,o,a),n.up=Y.transformPoint3(s,i,l)):(n.look=[0,0,0],n.eye=o,n.up=i)},this._onViewerCameraMatrix=this._viewer.camera.on("matrix",this._synchCamera),this._onViewerCameraWorldAxis=this._viewer.camera.on("worldAxis",this._synchCamera),this._onViewerCameraFOV=this._viewer.camera.perspective.on("fov",(function(e){r._scene.camera.perspective.fov=e}));var u=null;this._onInputMouseMove=this._scene.input.on("mousemove",(function(e){var t=r._scene.pick({canvasPos:e});if(t){if(!u||t.entity.id!==u.id){if(u)r._planes[u.id]&&r._onHoverLeavePlane(u.id);u=t.entity,r._planes[u.id]&&r._onHoverEnterPlane(u.id)}}else u&&(r._onHoverLeavePlane(u.id),u=null)})),this._scene.canvas.canvas.addEventListener("mouseup",this._onCanvasMouseUp=function(){u?r._planes[u.id]&&r._onClickedPlane(u.id):r._onClickedNothing()}),this._scene.canvas.canvas.addEventListener("mouseout",this._onCanvasMouseOut=function(){u&&(r._onHoverLeavePlane(u.id),u=null)}),this.setVisible(i.overviewVisible)}),[{key:"addSectionPlane",value:function(e){this._planes[e.id]=new dk(this,this._scene,e)}},{key:"setSectionBox",value:function(e){this._box=new pk(this,this._scene,e)}},{key:"setPlaneHighlighted",value:function(e,t){var i=this._planes[e];i&&i.setHighlighted(t)}},{key:"setPlaneSelected",value:function(e,t){var i=this._planes[e];i&&i.setSelected(t)}},{key:"removeSectionPlane",value:function(e){var t=this._planes[e.id];t&&(t.destroy(),delete this._planes[e.id])}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._visible=e,this._canvas.style.visibility=e?"visible":"hidden"}},{key:"getVisible",value:function(){return this._visible}},{key:"destroy",value:function(){this._viewer.camera.off(this._onViewerCameraMatrix),this._viewer.camera.off(this._onViewerCameraWorldAxis),this._viewer.camera.perspective.off(this._onViewerCameraFOV),this._scene.input.off(this._onInputMouseMove),this._scene.canvas.canvas.removeEventListener("mouseup",this._onCanvasMouseUp),this._scene.canvas.canvas.removeEventListener("mouseout",this._onCanvasMouseOut),this._scene.destroy()}}])}(),gk=function(){return P((function e(t){x(this,e),this._viewer=t.viewer,this._scene=t.viewer.scene,this._sectionPlugin=t,this._boxCenter=[0,0,0],this._maxRange=[],this._createNodes()}),[{key:"_createNodes",value:function(){var e=this._viewer.scene,t=e.aabb,i=e.center,r=t[3]-t[0],n=t[4]-t[1],s=t[5]-t[2];this._rootNode=new yn(e,{id:"sectionControl",position:i,scale:[1,1,1],isObject:!1});var o=this._rootNode;this._displayMeshes={box:o.addChild(new on(o,{geometry:new Ci(o,Dn({center:this._boxCenter,xSize:.5*(r>0?r:-1*r)+0,ySize:.5*(n>0?n:-1*n)+0,zSize:.5*(s>0?s:-1*s)+0})),material:new Ti(o,{emissive:[.5,6.5,9.5],diffuse:[.5,6.5,9.5],specular:[.5,.5,.5],alpha:.2,shininess:10}),pickable:!1,collidable:!1,clippable:!1,visible:!0,scale:[1,1,1],isObject:!1}),!1)}}},{key:"updateBox",value:function(e,t){if(!(t.length<6)){var i,r,n;i=t[3][0]-t[0][0],r=t[4][1]-t[1][1],n=t[5][2]-t[2][2];var s=this._getGeometryPoisition(e,i,r,n);this._setGeometryPosition(s)}}},{key:"_getGeometryPoisition",value:function(e,t,i,r){var n=.5,s=this._boxCenter;return 0!=e[0]&&(e[0]<0&&(s[0]-=((t>0?t:-1*t)*n+.2)/4),e[0]>0&&(s[0]+=((t>0?t:-1*t)*n+.2)/4)),0!=e[1]&&(e[1]<0&&(s[1]-=((i>0?i:-1*i)*n+.2)/4),e[1]>0&&(s[1]+=((i>0?i:-1*i)*n+.2)/4)),0!=e[2]&&(e[2]<0&&(s[2]-=((r>0?r:-1*r)*n+.2)/4),e[2]>0&&(s[2]+=((r>0?r:-1*r)*n+.2)/4)),Dn({center:s,xSize:(t>0?t:-1*t)*n+.2,ySize:(i>0?i:-1*i)*n+.2,zSize:(r>0?r:-1*r)*n+.2}).positions}},{key:"_setGeometryPosition",value:function(e){this._displayMeshes.box.geometry.positions=e}},{key:"setVisible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this._visible!==e){var t;for(t in this._visible=e,this._displayMeshes)this._displayMeshes.hasOwnProperty(t)&&(this._displayMeshes[t].visible=e);if(!e)for(t in this._affordanceMeshes)this._affordanceMeshes.hasOwnProperty(t)&&(this._affordanceMeshes[t].visible=e)}}},{key:"getVisible",value:function(){return this._visible}},{key:"_destroy",value:function(){this._rootNode.destroy(),this._displayMeshes={}}}])}(),mk=Y.AABB3(),vk=Y.vec3(),_k=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(x(this,e),(i=d(this,e,["SectionPlanes",t]))._freeControls=[],i._controlBox=null,i._singleCtrlBox=null,i._sectionWay=null,i._sectionPlanes=t.scene.sectionPlanes,i._controls={},i._currentControl=null,i._shownControlId=null,i._shownControlIds=[],i._boxPlaneConfig={id:"",planeId:-1,enableClip:!1,controlFillColor:[3,9,9]},null!==r.overviewCanvasId&&void 0!==r.overviewCanvasId){var n=document.getElementById(r.overviewCanvasId);n?i._overview=new fk(i,{overviewCanvas:n,visible:r.overviewVisible,onHoverEnterPlane:function(e){i._overview.setPlaneHighlighted(e,!0)},onHoverLeavePlane:function(e){i._overview.setPlaneHighlighted(e,!1)},onClickedPlane:function(e){if(i.getShownControl()!==e){i.showControl(e);var t=i.sectionPlanes[e].pos;mk.set(i.viewer.scene.aabb),Y.getAABB3Center(mk,vk),mk[0]+=t[0]-vk[0],mk[1]+=t[1]-vk[1],mk[2]+=t[2]-vk[2],mk[3]+=t[0]-vk[0],mk[4]+=t[1]-vk[1],mk[5]+=t[2]-vk[2],i.viewer.cameraFlight.flyTo({aabb:mk,fitFOV:65})}else i.hideControl()},onClickedNothing:function(){i.hideControl()}}):i.warn("Can't find overview canvas: '"+r.overviewCanvasId+"' - will create plugin without overview")}return i._onSceneSectionPlaneCreated=t.scene.on("sectionPlaneCreated",(function(e){i._sectionPlaneCreated(e)})),i._onSceneSectionBoxCreated=t.scene.on("sectionBoxCreated",(function(e){i._controlBox=e})),i.controlset=r.controlset,i}return _(e,ge),P(e,[{key:"setOverviewVisible",value:function(e){this._overview&&this._overview.setVisible(e)}},{key:"getOverviewVisible",value:function(){if(this._overview)return this._overview.getVisible()}},{key:"sectionPlanes",get:function(){return this._sectionPlanes}},{key:"createSectionPlane",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return void 0!==e.id&&null!==e.id&&this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),new cn(this.viewer.scene,{id:e.id,pos:e.pos,dir:e.dir,active:!0})}},{key:"createSectionBox",value:function(){this._sectionWay="box";var e=new gk(this);return new Sh(this.viewer.scene,{id:"sectionBox",active:!0,controlIdName:"sectionBoxPlane_",lineBox:e})}},{key:"createSectionSingle",value:function(){return this._sectionWay="box",new Sh(this.viewer.scene,{id:"sectionBox",active:!0,pickable:!1,enableClip:!1,controlIdName:"sectionBoxPlane_"})}},{key:"_sectionPlaneCreated",value:function(e){var t,i=this;switch(this._sectionWay){case"plane":t=this._freeControls.length>0?this._freeControls.pop():new Ak(this,this._controlsConfig);break;case"box":this._boxPlaneConfig.enableClip=e.enableClip,this._boxPlaneConfig.pickable=e.pickable,this._boxPlaneConfig.controlFillColor=e.controlFillColor,t=this._freeControls.length>0?this._freeControls.pop():new uk(this,this._boxPlaneConfig);break;case"singleCtrl":t=this._freeControls.length>0?this._freeControls.pop():new ok(this,this.controlset);break;default:t=new rk(this)}var r=t;r._setSectionPlane(e),r.setVisible(!0),e.control=r,this._currentControl=r,null==e.box&&(this._controls[e.id]=r),this._overview&&this._overview.addSectionPlane(e),e.once("destroyed",(function(){i._sectionPlaneDestroyed(e)}))}},{key:"isTouch",set:function(e){this._isTouch=e,this.sectionWay=!0===e?"plane":this._sectionWay?this._sectionWay:"control"}},{key:"sectionConfigs",set:function(e){this._controlsConfig=e}},{key:"boxPlaneConfigs",set:function(e){this._boxPlaneConfig=e}},{key:"sectionWay",set:function(e){this._sectionWay=e}},{key:"sectionDirection",set:function(e){var t;switch(this.clear(),e){case 0:t=[0,0,-1];break;case 1:t=[-1,0,0];break;case 2:t=[0,-1,0]}var i=this.viewer.scene.center;this.createSectionPlane({pos:Y.AABB3([i[0],i[1],i[2]]),dir:t})}},{key:"sectionSingleDirection",set:function(e){var t;switch(this.hideControl(),this._sectionWay="singleCtrl",e){case 0:t=[0,0,-1];break;case 1:t=[-1,0,0];break;case 2:t=[0,-1,0]}var i=this.viewer.scene.center;this.createSectionPlane({pos:Y.AABB3([i[0],i[1],i[2]]),dir:t})}},{key:"controlBox",get:function(){return this._controlBox}},{key:"setControlPos",value:function(e){null!=this._currentControl&&(this._currentControl.pos=e)}},{key:"getControlPos",value:function(){return null==this._currentControl?-1:this._currentControl.posRate}},{key:"flipSectionPlanes",value:function(){var e=this.viewer.scene.sectionPlanes;for(var t in e){e[t].flipDir()}}},{key:"showControl",value:function(e){var t=this._controls[e];t?(t.setVisible(!0),this._overview&&this._overview.setPlaneSelected(e,!0),this._shownControlId=e,this._shownControlIds=[e]):this.error("Control not found: "+e)}},{key:"setControlsSize",value:function(e){for(var t in this._controls)this._controls[t].controlSize=e}},{key:"setControlSizeByID",value:function(e,t){this._controls[e]?this._controls[e].controlSize=t:this.error("Control not found: "+e)}},{key:"getShownControl",value:function(){return this._shownControlId}},{key:"getShownControls",value:function(){return this._shownControlIds}},{key:"showAllControl",value:function(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._shownControlIds.push(e),this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1))}},{key:"hideControl",value:function(){for(var e in this._controls)this._controls.hasOwnProperty(e)&&(this._controls[e].setVisible(!1),this._overview&&this._overview.setPlaneSelected(e,!1));this._shownControlId=null,this._shownControlIds=[]}},{key:"destroySectionPlane",value:function(e){var t=this.viewer.scene.sectionPlanes[e];t?(this._sectionPlaneDestroyed(t),t.destroy(),e===this._shownControlId&&(this._shownControlId=null,this._shownControlIds=[])):this.error("SectionPlane not found: "+e)}},{key:"_sectionPlaneDestroyed",value:function(e){this._overview&&this._overview.removeSectionPlane(e);var t=this._controls[e.id];t&&(t.setVisible(!1),t._setSectionPlane(null),delete this._controls[e.id],this._freeControls.push(t))}},{key:"clear",value:function(){this._controlBox&&this._controlBox.destroy();for(var e=Object.keys(this._sectionPlanes),t=0,i=e.length;t<i;t++)this.destroySectionPlane(e[t])}},{key:"send",value:function(e,t){switch(e){case"snapshotStarting":for(var i in this._controls)this._controls.hasOwnProperty(i)&&this._controls[i].setCulled(!0);break;case"snapshotFinished":for(var r in this._controls)this._controls.hasOwnProperty(r)&&this._controls[r].setCulled(!1);break;case"clearSectionPlanes":this.clear()}}},{key:"destroy",value:function(){this.clear(),this._overview&&this._overview.destroy(),this._destroyFreeControls(),g(e,"destroy",this,3)([])}},{key:"_destroyFreeControls",value:function(){for(var e=this._freeControls.pop();e;)e._destroy(),e=this._freeControls.pop();this.viewer.scene.off(this._onSceneSectionPlaneCreated)}}])}();Y.vec3(),Y.mat4();var yk=function(){function e(t){var i;return x(this,e),(i=d(this,e,["skyboxes",t])).skyboxes={},i._active=!1,i}return _(e,ge),P(e,[{key:"send",value:function(e,t){if("clear"===e)this.clear()}},{key:"createSkybox",value:function(e,t){if(this.viewer.scene.components[e])return this.error("Component with this ID already exists: "+e),this;if(!t.src&&!t.image)return this.error("No legal skybox image or src: "+e),this;if(t.src){var i=new Th(this.viewer.scene,{id:e,size:t.size,scale:t.scale,src:t.src,active:t.active,encoding:3e3});return this.skyboxes[e]=i,i}if(t.image){i=new Th(this.viewer.scene,{id:e,size:t.size,scale:t.scale,image:t.image,active:t.active,encoding:3e3});return this.skyboxes[e]=i,i}}},{key:"setSkyBoxActiveById",value:function(e,t){this.skyboxes[e].active=t}},{key:"active",get:function(){return this._active},set:function(e){this._active=e;for(var t=0;t<this.skyboxes.length;t++)this.skyboxes[t].active=e}},{key:"getSkyBoxById",value:function(e){return this.skyboxes[e]}},{key:"destroySkybox",value:function(e){var t=this.skyboxes[e];t?t.destroy():this.error("Skybox not found: "+e)}},{key:"clear",value:function(){for(var e=Object.keys(this.skyboxes),t=0,i=e.length;t<i;t++)this.destroySkybox(e[t])}},{key:"destroy",value:function(){this.clear()}}])}(),bk=[],wk=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};x(this,e),(i=d(this,e,["TreeViewPlugin",t])).errors=[],i.valid=!0;for(var n=0;;n++)if(!bk[n]){bk[n]=i,i._index=n,i._id="tree-".concat(n);break}if(i._metaModels={},i._autoAddModels=!1!==r.autoAddModels,i._autoExpandDepth=r.autoExpandDepth||0,i._sortNodes=!1!==r.sortNodes,i._viewer=t,i._rootElement=null,i._muteSceneEvents=!1,i._muteTreeEvents=!1,i._rootNodes=[],i._objectNodes={},i._nodeNodes={},i._rootNames={},i._sortNodes=r.sortNodes,i._pruneEmptyNodes=r.pruneEmptyNodes,i._showListItemElementId=null,i._onObjectVisibility=i._viewer.scene.on("objectVisibility",(function(e){if(!i._muteSceneEvents){var t=e.id,r=i._objectNodes[t];if(r){var n=e.visible;if(n!==r.checked){i._muteTreeEvents=!0,r.checked=n,n?r.numVisibleEntities++:r.numVisibleEntities--;for(var s=r.parent;s;)s.checked=n,n?s.numVisibleEntities++:s.numVisibleEntities--,s=s.parent;i._muteTreeEvents=!1}}}})),i._onObjectXrayed=i._viewer.scene.on("objectXRayed",(function(e){if(!i._muteSceneEvents){var t=e.id,r=i._objectNodes[t];if(r){i._muteTreeEvents=!0;var n=e.xrayed;n!==r.xrayed&&(r.xrayed=n,i._muteTreeEvents=!1)}}})),i._hierarchy=r.hierarchy||"containment",i._autoExpandDepth=r.autoExpandDepth||0,i._autoAddModels){for(var s=Object.keys(i.viewer.metaScene.metaModels),o=0,a=s.length;o<a;o++){var l=s[o];i.viewer.metaScene.metaModels[l].finalized&&i.addModel(l)}i.viewer.scene.on("modelLoaded",(function(e){i.viewer.metaScene.metaModels[e]&&i.addModel(e)}))}return i.hierarchy=r.hierarchy,i}return _(e,ge),P(e,[{key:"switchExpandHandler",value:function(e){e.preventDefault(),e.stopPropagation(),e.target,this.fire("ExpandHandler",e)}},{key:"switchCollapseHandler",value:function(e){e.preventDefault(),e.stopPropagation(),this.fire("CollapseHandler",e)}},{key:"checkboxChangeHandler",value:function(e){if(this.fire("checkBoxChanged",e),!this._muteTreeEvents){this._muteSceneEvents=!0;var t=e.target,i=t.checked,r=t.id.replace("checkbox-",""),n=this._nodeNodes[r],s=this._viewer.scene.objects,o=0;this._withNodeTree(n,(function(e){var t=e.objectId,r=s[t],n=0===e.children.length;e.numVisibleEntities=i?e.numEntities:0,n&&i!==e.checked&&o++,e.checked=i,function(e,t){var i=document.getElementById("checkbox-".concat(e));i&&t!==i.checked&&(i.checked=t)}(e.nodeId,i),r&&(r.visible=i)}));for(var a=n.parent;a;)a.checked=i,i?a.numVisibleEntities+=o:a.numVisibleEntities-=o,l(a.nodeId,a.numVisibleEntities>0),a=a.parent;this._muteSceneEvents=!1}function l(e,t){var i=document.getElementById("checkbox-".concat(e));i&&t!==i.checked&&(i.checked=t)}}},{key:"hierarchy",get:function(){return this._hierarchy},set:function(e){"containment"!==(e=e||"containment")&&"storeys"!==e&&"types"!==e&&(this.error("Unsupported value for `hierarchy' - defaulting to 'containment'"),e="containment"),this._hierarchy!==e&&(this._hierarchy=e,this._createNodes())}},{key:"muteTreeEvents",get:function(){return this._muteTreeEvents},set:function(e){this._muteTreeEvents=e}},{key:"nodeNodes",get:function(){return this._nodeNodes}},{key:"_createNodes",value:function(){this._rootElement&&(this._rootElement.parentNode.removeChild(this._rootElement),this._rootElement=null),this._rootNodes=[],this._objectNodes={},this._nodeNodes={},this._validate(),(this.valid||"storeys"!==this._hierarchy)&&this._createEnabledNodes()}},{key:"_createEnabledNodes",value:function(){switch(this._pruneEmptyNodes&&this._findEmptyNodes(),this._hierarchy){case"storeys":this._createStoreysNodes(),0===this._rootNodes.length&&this.error("Failed to build storeys hierarchy");break;case"types":this._createTypesNodes();break;default:this._createContainmentNodes()}this._sortNodes&&this._doSortNodes(),this._synchNodesToEntities(),this.fire("nodeNodes_Created",this._nodeNodes),this.fire("rootNodes_Created",this._rootNodes),this.fire("objectNodes_Created",this._objectNodes)}},{key:"_createStoreysNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._createStoreysNodes2(e[t],null,null,null)}},{key:"_createStoreysNodes2",value:function(e,t,i,r){if(!this._pruneEmptyNodes||0!==e._countEntities){var n=e.type,s=e.name,o=e.children,a=e.id;if("IfcBuilding"===n)t={nodeId:"".concat(this._id,"-").concat(a),objectId:a,title:0===e.metaModels.length?"na":this._rootNames[e.metaModels[0].id]||(s&&""!==s&&"Undefined"!==s&&"Default"!==s?s:n),type:n,parent:null,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},this._rootNodes.push(t),this._objectNodes[t.objectId]=t,this._nodeNodes[t.nodeId]=t;else if("IfcBuildingStorey"===n){if(!t)return void this.error("Failed to build storeys hierarchy for model '"+this.metaModel.id+"' - model does not have an IfcBuilding object, or is not an IFC model");i={nodeId:"".concat(this._id,"-").concat(a),objectId:a,title:s&&""!==s&&"Undefined"!==s&&"Default"!==s?s:n,type:n,parent:t,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},t.children.push(i),this._objectNodes[i.objectId]=i,this._nodeNodes[i.nodeId]=i,r={}}else{if(i)if(this._viewer.scene.objects[a]){var l=(r=r||{})[n];l||(l={nodeId:"".concat(this._id,"-").concat(i.objectId,"-").concat(n),objectId:"".concat(i.objectId,"-").concat(n),title:n,type:n,parent:i,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},i.children.push(l),this._objectNodes[l.objectId]=l,this._nodeNodes[l.nodeId]=l,r[n]=l);var u={nodeId:"".concat(this._id,"-").concat(a),objectId:a,title:s&&""!==s&&"Undefined"!==s&&"Default"!==s?s:n,type:n,parent:l,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]};l.children.push(u),this._objectNodes[u.objectId]=u,this._nodeNodes[u.nodeId]=u}}if(o)for(var c=0,h=o.length;c<h;c++){var A=o[c];this._createStoreysNodes2(A,t,i,r)}}}},{key:"_createTypesNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._createTypesNodes2(e[t],null,null)}},{key:"_createTypesNodes2",value:function(e,t,i){if(!this._pruneEmptyNodes||0!==e._countEntities){var r=e.type,n=e.name,s=e.children,o=e.id;if(e.parent){if(t)if(this._viewer.scene.objects[o]){var a=i[r];a||(a={nodeId:"".concat(this._id,"-").concat(t.objectId,"-").concat(r),objectId:"".concat(t.objectId,"-").concat(r),title:r,type:r,parent:t,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},t.children.push(a),this._objectNodes[a.objectId]=a,this._nodeNodes[a.nodeId]=a,i[r]=a);var l={nodeId:"".concat(this._id,"-").concat(o),objectId:o,title:n&&""!==n&&"Default"!==n?n:r,type:r,parent:a,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]};a.children.push(l),this._objectNodes[l.objectId]=l,this._nodeNodes[l.nodeId]=l}}else t={nodeId:"".concat(this._id,"-").concat(o),objectId:o,title:0===e.metaModels.length?"na":this._rootNames[e.metaModels[0].id]||(n&&""!==n&&"Undefined"!==n&&"Default"!==n?n:r),type:r,parent:null,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]},this._rootNodes.push(t),this._objectNodes[t.objectId]=t,this._nodeNodes[t.nodeId]=t,i={};if(s)for(var u=0,c=s.length;u<c;u++){var h=s[u];this._createTypesNodes2(h,t,i)}}}},{key:"_createContainmentNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._createContainmentNodes2(e[t],null)}},{key:"_createContainmentNodes2",value:function(e,t){if(!this._pruneEmptyNodes||0!==e._countEntities){var i=e.type,r=e.name||i,n=e.children,s=e.id,o={nodeId:"".concat(this._id,"-").concat(s),objectId:s,title:t?r&&""!==r&&"Undefined"!==r&&"Default"!==r?r:i:0===e.metaModels.length?"na":this._rootNames[e.metaModels[0].id]||r,type:i,parent:t,numEntities:0,numVisibleEntities:0,checked:!1,xrayed:!1,children:[]};if(t?t.children.push(o):this._rootNodes.push(o),this._objectNodes[o.objectId]=o,this._nodeNodes[o.nodeId]=o,n)for(var a=0,l=n.length;a<l;a++){var u=n[a];this._createContainmentNodes2(u,o)}}}},{key:"_synchNodesToEntities",value:function(){for(var e=Object.keys(this.viewer.metaScene.metaObjects),t=this._viewer.metaScene.metaObjects,i=this._viewer.scene.objects,r=0,n=e.length;r<n;r++){var s=e[r];if(t[s]){var o=this._objectNodes[s];if(o){var a=i[s];if(a){var l=a.visible;o.numEntities=1,o.xrayed=a.xrayed,l?(o.numVisibleEntities=1,o.checked=!0):(o.numVisibleEntities=0,o.checked=!1);for(var u=o.parent;u;)u.numEntities++,l&&(u.numVisibleEntities++,u.checked=!0),u=u.parent}}}}}},{key:"_validate",value:function(){if(this.errors=[],"storeys"===this._hierarchy)this.valid=this._validateMetaModelForStoreysHierarchy();else this.valid=this._rootNodes.length>0;return this.valid}},{key:"_validateMetaModelForStoreysHierarchy",value:function(){return!0}},{key:"addModel",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.viewer.scene.models[e];if(!r)throw"Model not found: "+e;var n=this.viewer.metaScene.metaModels[e];n?(this._metaModels[e]&&(this._metaModels[e]=null),this._metaModels[e]=n,i&&i.rootName&&(this._rootNames[e]=i.rootName),r.on("destroyed",(function(){t.removeModel(r.id)})),this._createNodes()):this.error("MetaModel not found: "+e)}},{key:"removeModel",value:function(e){this._metaModels[e]&&(this._rootNames[e]&&delete this._rootNames[e],delete this._metaModels[e],this._createNodes())}},{key:"showNode",value:function(e){this.unShowNode();var t=this._objectNodes[e];if(t){for(var i=t.nodeId,r=t.parent;r;)r=r.parent;this._showListItemElementId=i}}},{key:"unShowNode",value:function(){this._showListItemElementId&&(this._showListItemElementId=null)}},{key:"withNodeTree",value:function(e,t){t(e);var i=e.children;if(i)for(var r=0,n=i.length;r<n;r++)this.withNodeTree(i[r],t)}},{key:"_withNodeTree",value:function(e,t){t(e);var i=e.children;if(i)for(var r=0,n=i.length;r<n;r++)this._withNodeTree(i[r],t)}},{key:"getChildrenById",value:function(e){return this._nodeNodes[e].children}},{key:"getNodeById",value:function(e){return this._nodeNodes[e]}},{key:"destroy",value:function(){this._metaModels={},this._rootElement&&!this._destroyed&&(this._rootElement.parentNode.removeChild(this._rootElement),this._viewer.scene.off(this._onObjectVisibility),this._destroyed=!0),delete bk[this._index],g(e,"destroy",this,3)([])}},{key:"_findEmptyNodes",value:function(){var e=this._viewer.metaScene.rootMetaObjects;for(var t in e)this._findEmptyNodes2(e[t])}},{key:"_findEmptyNodes2",value:function(e){var t=this.viewer.scene,i=e.children,r=e.id,n=t.objects[r];if(e._countEntities=0,n&&e._countEntities++,i)for(var s=0,o=i.length;s<o;s++){var a=i[s];a._countEntities=this._findEmptyNodes2(a),e._countEntities+=a._countEntities}return e._countEntities}},{key:"_doSortNodes",value:function(){for(var e=0,t=this._rootNodes.length;e<t;e++){var i=this._rootNodes[e];this._sortChildren(i)}}},{key:"_sortChildren",value:function(e){var t=e.children;if(t&&0!==t.length){"storeys"===this._hierarchy&&"IfcBuilding"===e.type?t.sort(this._getSpatialSortFunc()):t.sort(this._alphaSortFunc);for(var i=0,r=t.length;i<r;i++){var n=t[i];this._sortChildren(n)}}}},{key:"_getSpatialSortFunc",value:function(){var e=this.viewer,t=e.scene,i=t.camera,r=e.metaScene;return this._spatialSortFunc||(this._spatialSortFunc=function(e,n){e.aabb&&n.aabb||(e.aabb||(e.aabb=t.getAABB(r.getObjectIDsInSubtree(e.objectId))),n.aabb||(n.aabb=t.getAABB(r.getObjectIDsInSubtree(n.objectId))));var s=0;return s=i.xUp?0:i.yUp?1:2,e.aabb[s]>n.aabb[s]?-1:e.aabb[s]<n.aabb[s]?1:0})}},{key:"_alphaSortFunc",value:function(e,t){var i=e.title.toUpperCase(),r=t.title.toUpperCase();return i<r?-1:i>r?1:0}}])}(),xk=function(){return P((function e(){x(this,e)}),[{key:"getManifest",value:function(e,t,i){ne.loadJSON(e,(function(e){t(e)}),(function(e){i(e)}))}},{key:"getMetaModel",value:function(e,t,i){ne.loadJSON(e,(function(e){t(e)}),(function(e){i(e)}))}},{key:"getXTC",value:function(e,t,i){var r=function(){};t=t||r,i=i||r;var n=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(n){var s=!!n[2],o=n[3];o=window.decodeURIComponent(o),s&&(o=window.atob(o));try{for(var a=new ArrayBuffer(o.length),l=new Uint8Array(a),u=0;u<o.length;u++)l[u]=o.charCodeAt(u);t(a)}catch(e){i(e)}}else{var c=new XMLHttpRequest;c.open("GET",e,!0),c.responseType="arraybuffer",c.onreadystatechange=function(){4===c.readyState&&(200===c.status?t(c.response):i("getXTC error : "+c.response))},c.send(null)}}}])}();!function(e,t){"object"==("undefined"==typeof exports?"undefined":w(exports))&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).pako={})}(void 0,(function(e){function t(e){for(var t=e.length;--t>=0;)e[t]=0}var i=new Uint8Array([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]),r=new Uint8Array([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]),n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),s=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);t(o);var a=new Array(60);t(a);var l=new Array(512);t(l);var u=new Array(256);t(u);var c=new Array(29);t(c);var h,A,d,p=new Array(30);function f(e,t,i,r,n){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=r,this.max_length=n,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}t(p);var m=function(e){return e<256?l[e]:l[256+(e>>>7)]},v=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},_=function(e,t,i){e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,v(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},y=function(e,t,i){_(e,i[2*t],i[2*t+1])},b=function(e,t){var i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},x=function(e,t,i){var r,n,s=new Array(16),o=0;for(r=1;r<=15;r++)o=o+i[r-1]<<1,s[r]=o;for(n=0;n<=t;n++){var a=e[2*n+1];0!==a&&(e[2*n]=b(s[a]++,a))}},B=function(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},P=function(e){e.bi_valid>8?v(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},C=function(e,t,i,r){var n=2*t,s=2*i;return e[n]<e[s]||e[n]===e[s]&&r[t]<=r[i]},M=function(e,t,i){for(var r=e.heap[i],n=i<<1;n<=e.heap_len&&(n<e.heap_len&&C(t,e.heap[n+1],e.heap[n],e.depth)&&n++,!C(t,r,e.heap[n],e.depth));)e.heap[i]=e.heap[n],i=n,n<<=1;e.heap[i]=r},k=function(e,t,n){var s,o,a,l,h=0;if(0!==e.sym_next)do{s=255&e.pending_buf[e.sym_buf+h++],s+=(255&e.pending_buf[e.sym_buf+h++])<<8,o=e.pending_buf[e.sym_buf+h++],0===s?y(e,o,t):(a=u[o],y(e,a+256+1,t),0!==(l=i[a])&&(o-=c[a],_(e,o,l)),s--,a=m(s),y(e,a,n),0!==(l=r[a])&&(s-=p[a],_(e,s,l)))}while(h<e.sym_next);y(e,256,t)},E=function(e,t){var i,r,n,s=t.dyn_tree,o=t.stat_desc.static_tree,a=t.stat_desc.has_stree,l=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,i=0;i<l;i++)0!==s[2*i]?(e.heap[++e.heap_len]=u=i,e.depth[i]=0):s[2*i+1]=0;for(;e.heap_len<2;)s[2*(n=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[n]=0,e.opt_len--,a&&(e.static_len-=o[2*n+1]);for(t.max_code=u,i=e.heap_len>>1;i>=1;i--)M(e,s,i);n=l;do{i=e.heap[1],e.heap[1]=e.heap[e.heap_len--],M(e,s,1),r=e.heap[1],e.heap[--e.heap_max]=i,e.heap[--e.heap_max]=r,s[2*n]=s[2*i]+s[2*r],e.depth[n]=(e.depth[i]>=e.depth[r]?e.depth[i]:e.depth[r])+1,s[2*i+1]=s[2*r+1]=n,e.heap[1]=n++,M(e,s,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var i,r,n,s,o,a,l=t.dyn_tree,u=t.max_code,c=t.stat_desc.static_tree,h=t.stat_desc.has_stree,A=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,f=0;for(s=0;s<=15;s++)e.bl_count[s]=0;for(l[2*e.heap[e.heap_max]+1]=0,i=e.heap_max+1;i<573;i++)(s=l[2*l[2*(r=e.heap[i])+1]+1]+1)>p&&(s=p,f++),l[2*r+1]=s,r>u||(e.bl_count[s]++,o=0,r>=d&&(o=A[r-d]),a=l[2*r],e.opt_len+=a*(s+o),h&&(e.static_len+=a*(c[2*r+1]+o)));if(0!==f){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,f-=2}while(f>0);for(s=p;0!==s;s--)for(r=e.bl_count[s];0!==r;)(n=e.heap[--i])>u||(l[2*n+1]!==s&&(e.opt_len+=(s-l[2*n+1])*l[2*n],l[2*n+1]=s),r--)}}(e,t),x(s,u,e.bl_count)},S=function(e,t,i){var r,n,s=-1,o=t[1],a=0,l=7,u=4;for(0===o&&(l=138,u=3),t[2*(i+1)+1]=65535,r=0;r<=i;r++)n=o,o=t[2*(r+1)+1],++a<l&&n===o||(a<u?e.bl_tree[2*n]+=a:0!==n?(n!==s&&e.bl_tree[2*n]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,s=n,0===o?(l=138,u=3):n===o?(l=6,u=3):(l=7,u=4))},T=function(e,t,i){var r,n,s=-1,o=t[1],a=0,l=7,u=4;for(0===o&&(l=138,u=3),r=0;r<=i;r++)if(n=o,o=t[2*(r+1)+1],!(++a<l&&n===o)){if(a<u)do{y(e,n,e.bl_tree)}while(0!=--a);else 0!==n?(n!==s&&(y(e,n,e.bl_tree),a--),y(e,16,e.bl_tree),_(e,a-3,2)):a<=10?(y(e,17,e.bl_tree),_(e,a-3,3)):(y(e,18,e.bl_tree),_(e,a-11,7));a=0,s=n,0===o?(l=138,u=3):n===o?(l=6,u=3):(l=7,u=4)}},F=!1,I=function(e,t,i,r){_(e,0+(r?1:0),3),P(e),v(e,i),v(e,~i),i&&e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i},D=function(e){F||(function(){var e,t,s,g,m,v=new Array(16);for(s=0,g=0;g<28;g++)for(c[g]=s,e=0;e<1<<i[g];e++)u[s++]=g;for(u[s-1]=g,m=0,g=0;g<16;g++)for(p[g]=m,e=0;e<1<<r[g];e++)l[m++]=g;for(m>>=7;g<30;g++)for(p[g]=m<<7,e=0;e<1<<r[g]-7;e++)l[256+m++]=g;for(t=0;t<=15;t++)v[t]=0;for(e=0;e<=143;)o[2*e+1]=8,e++,v[8]++;for(;e<=255;)o[2*e+1]=9,e++,v[9]++;for(;e<=279;)o[2*e+1]=7,e++,v[7]++;for(;e<=287;)o[2*e+1]=8,e++,v[8]++;for(x(o,287,v),e=0;e<30;e++)a[2*e+1]=5,a[2*e]=b(e,5);h=new f(o,i,257,286,15),A=new f(a,r,0,30,15),d=new f(new Array(0),n,0,19,7)}(),F=!0),e.l_desc=new g(e.dyn_ltree,h),e.d_desc=new g(e.dyn_dtree,A),e.bl_desc=new g(e.bl_tree,d),e.bi_buf=0,e.bi_valid=0,B(e)},R=I,O=function(e,t,i,r){var n,l,u=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),E(e,e.l_desc),E(e,e.d_desc),u=function(e){var t;for(S(e,e.dyn_ltree,e.l_desc.max_code),S(e,e.dyn_dtree,e.d_desc.max_code),E(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*s[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),n=e.opt_len+3+7>>>3,(l=e.static_len+3+7>>>3)<=n&&(n=l)):n=l=i+5,i+4<=n&&-1!==t?I(e,t,i,r):4===e.strategy||l===n?(_(e,2+(r?1:0),3),k(e,o,a)):(_(e,4+(r?1:0),3),function(e,t,i,r){var n;for(_(e,t-257,5),_(e,i-1,5),_(e,r-4,4),n=0;n<r;n++)_(e,e.bl_tree[2*s[n]+1],3);T(e,e.dyn_ltree,t-1),T(e,e.dyn_dtree,i-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),k(e,e.dyn_ltree,e.dyn_dtree)),B(e),r&&P(e)},L=function(e,t,i){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=i,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(u[i]+256+1)]++,e.dyn_dtree[2*m(t)]++),e.sym_next===e.sym_end},j=function(e){_(e,2,3),y(e,256,o),function(e){16===e.bi_valid?(v(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)},U=function(e,t,i,r){for(var n=65535&e,s=e>>>16&65535,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{s=s+(n=n+t[r++]|0)|0}while(--o);n%=65521,s%=65521}return n|s<<16},N=new Uint32Array(function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}()),V=function(e,t,i,r){var n=N,s=r+i;e^=-1;for(var o=r;o<s;o++)e=e>>>8^n[255&(e^t[o])];return-1^e},Q={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},H={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},G=D,z=R,W=O,K=L,X=j,q=H.Z_NO_FLUSH,Y=H.Z_PARTIAL_FLUSH,J=H.Z_FULL_FLUSH,Z=H.Z_FINISH,$=H.Z_BLOCK,ee=H.Z_OK,te=H.Z_STREAM_END,ie=H.Z_STREAM_ERROR,re=H.Z_DATA_ERROR,ne=H.Z_BUF_ERROR,se=H.Z_DEFAULT_COMPRESSION,oe=H.Z_FILTERED,ae=H.Z_HUFFMAN_ONLY,le=H.Z_RLE,ue=H.Z_FIXED,ce=H.Z_UNKNOWN,he=H.Z_DEFLATED,Ae=258,de=262,pe=42,fe=113,ge=666,me=function(e,t){return e.msg=Q[t],t},ve=function(e){return 2*e-(e>4?9:0)},_e=function(e){for(var t=e.length;--t>=0;)e[t]=0},ye=function(e){var t,i,r,n=e.w_size;r=t=e.hash_size;do{i=e.head[--r],e.head[r]=i>=n?i-n:0}while(--t);r=t=n;do{i=e.prev[--r],e.prev[r]=i>=n?i-n:0}while(--t)},be=function(e,t,i){return(t<<e.hash_shift^i)&e.hash_mask},we=function(e){var t=e.state,i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},xe=function(e,t){W(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,we(e.strm)},Be=function(e,t){e.pending_buf[e.pending++]=t},Pe=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ce=function(e,t,i,r){var n=e.avail_in;return n>r&&(n=r),0===n?0:(e.avail_in-=n,t.set(e.input.subarray(e.next_in,e.next_in+n),i),1===e.state.wrap?e.adler=U(e.adler,t,n,i):2===e.state.wrap&&(e.adler=V(e.adler,t,n,i)),e.next_in+=n,e.total_in+=n,n)},Me=function(e,t){var i,r,n=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-de?e.strstart-(e.w_size-de):0,u=e.window,c=e.w_mask,h=e.prev,A=e.strstart+Ae,d=u[s+o-1],p=u[s+o];e.prev_length>=e.good_match&&(n>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(i=t)+o]===p&&u[i+o-1]===d&&u[i]===u[s]&&u[++i]===u[s+1]){s+=2,i++;do{}while(u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&u[++s]===u[++i]&&s<A);if(r=Ae-(A-s),s=A-Ae,r>o){if(e.match_start=t,o=r,r>=a)break;d=u[s+o-1],p=u[s+o]}}}while((t=h[t&c])>l&&0!=--n);return o<=e.lookahead?o:e.lookahead},ke=function(e){var t,i,r,n=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-de)&&(e.window.set(e.window.subarray(n,n+n-i),0),e.match_start-=n,e.strstart-=n,e.block_start-=n,e.insert>e.strstart&&(e.insert=e.strstart),ye(e),i+=n),0===e.strm.avail_in)break;if(t=Ce(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=t,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=be(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=be(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<de&&0!==e.strm.avail_in)},Ee=function(e,t){var i,r,n,s=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(i=65535,n=e.bi_valid+42>>3,e.strm.avail_out<n)break;if(n=e.strm.avail_out-n,i>(r=e.strstart-e.block_start)+e.strm.avail_in&&(i=r+e.strm.avail_in),i>n&&(i=n),i<s&&(0===i&&t!==Z||t===q||i!==r+e.strm.avail_in))break;o=t===Z&&i===r+e.strm.avail_in?1:0,z(e,0,0,o),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,we(e.strm),r&&(r>i&&(r=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,i-=r),i&&(Ce(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(0===o);return(a-=e.strm.avail_in)&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==q&&t!==Z&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(n=e.window_size-e.strstart,e.strm.avail_in>n&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,n+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),n>e.strm.avail_in&&(n=e.strm.avail_in),n&&(Ce(e.strm,e.window,e.strstart,n),e.strstart+=n,e.insert+=n>e.w_size-e.insert?e.w_size-e.insert:n),e.high_water<e.strstart&&(e.high_water=e.strstart),n=e.bi_valid+42>>3,s=(n=e.pending_buf_size-n>65535?65535:e.pending_buf_size-n)>e.w_size?e.w_size:n,((r=e.strstart-e.block_start)>=s||(r||t===Z)&&t!==q&&0===e.strm.avail_in&&r<=n)&&(i=r>n?n:r,o=t===Z&&0===e.strm.avail_in&&i===r?1:0,z(e,e.block_start,i,o),e.block_start+=i,we(e.strm)),o?3:1)},Se=function(e,t){for(var i,r;;){if(e.lookahead<de){if(ke(e),e.lookahead<de&&t===q)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-de&&(e.match_length=Me(e,i)),e.match_length>=3)if(r=K(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=be(e,e.ins_h,e.window[e.strstart+1]);else r=K(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(xe(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2},Te=function(e,t){for(var i,r,n;;){if(e.lookahead<de){if(ke(e),e.lookahead<de&&t===q)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-de&&(e.match_length=Me(e,i),e.match_length<=5&&(e.strategy===oe||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){n=e.strstart+e.lookahead-3,r=K(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=n&&(e.ins_h=be(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(xe(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=K(e,0,e.window[e.strstart-1]))&&xe(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=K(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2};function Fe(e,t,i,r,n){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=r,this.func=n}var Ie=[new Fe(0,0,0,0,Ee),new Fe(4,4,8,4,Se),new Fe(4,5,16,8,Se),new Fe(4,6,32,32,Se),new Fe(4,4,16,16,Te),new Fe(8,16,32,32,Te),new Fe(8,16,128,128,Te),new Fe(8,32,128,256,Te),new Fe(32,128,258,1024,Te),new Fe(32,258,258,4096,Te)];function De(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=he,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),_e(this.dyn_ltree),_e(this.dyn_dtree),_e(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),_e(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_e(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Re=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.status!==pe&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==fe&&t.status!==ge?1:0},Oe=function(e){if(Re(e))return me(e,ie);e.total_in=e.total_out=0,e.data_type=ce;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?pe:fe,e.adler=2===t.wrap?0:1,t.last_flush=-2,G(t),ee},Le=function(e){var t,i=Oe(e);return i===ee&&((t=e.state).window_size=2*t.w_size,_e(t.head),t.max_lazy_match=Ie[t.level].max_lazy,t.good_match=Ie[t.level].good_length,t.nice_match=Ie[t.level].nice_length,t.max_chain_length=Ie[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),i},je=function(e,t,i,r,n,s){if(!e)return ie;var o=1;if(t===se&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),n<1||n>9||i!==he||r<8||r>15||t<0||t>9||s<0||s>ue||8===r&&1!==o)return me(e,ie);8===r&&(r=9);var a=new De;return e.state=a,a.strm=e,a.status=pe,a.wrap=o,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=n+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<n+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=s,a.method=i,Le(e)},Ue=je,Ne=function(e,t){return Re(e)||2!==e.state.wrap?ie:(e.state.gzhead=t,ee)},Ve=function(e,t){if(Re(e)||t>$||t<0)return e?me(e,ie):ie;var i=e.state;if(!e.output||0!==e.avail_in&&!e.input||i.status===ge&&t!==Z)return me(e,0===e.avail_out?ne:ie);var r=i.last_flush;if(i.last_flush=t,0!==i.pending){if(we(e),0===e.avail_out)return i.last_flush=-1,ee}else if(0===e.avail_in&&ve(t)<=ve(r)&&t!==Z)return me(e,ne);if(i.status===ge&&0!==e.avail_in)return me(e,ne);if(i.status===pe&&0===i.wrap&&(i.status=fe),i.status===pe){var n=he+(i.w_bits-8<<4)<<8;if(n|=(i.strategy>=ae||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(n|=32),Pe(i,n+=31-n%31),0!==i.strstart&&(Pe(i,e.adler>>>16),Pe(i,65535&e.adler)),e.adler=1,i.status=fe,we(e),0!==i.pending)return i.last_flush=-1,ee}if(57===i.status)if(e.adler=0,Be(i,31),Be(i,139),Be(i,8),i.gzhead)Be(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Be(i,255&i.gzhead.time),Be(i,i.gzhead.time>>8&255),Be(i,i.gzhead.time>>16&255),Be(i,i.gzhead.time>>24&255),Be(i,9===i.level?2:i.strategy>=ae||i.level<2?4:0),Be(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(Be(i,255&i.gzhead.extra.length),Be(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=V(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69;else if(Be(i,0),Be(i,0),Be(i,0),Be(i,0),Be(i,0),Be(i,9===i.level?2:i.strategy>=ae||i.level<2?4:0),Be(i,3),i.status=fe,we(e),0!==i.pending)return i.last_flush=-1,ee;if(69===i.status){if(i.gzhead.extra){for(var s=i.pending,o=(65535&i.gzhead.extra.length)-i.gzindex;i.pending+o>i.pending_buf_size;){var a=i.pending_buf_size-i.pending;if(i.pending_buf.set(i.gzhead.extra.subarray(i.gzindex,i.gzindex+a),i.pending),i.pending=i.pending_buf_size,i.gzhead.hcrc&&i.pending>s&&(e.adler=V(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex+=a,we(e),0!==i.pending)return i.last_flush=-1,ee;s=0,o-=a}var l=new Uint8Array(i.gzhead.extra);i.pending_buf.set(l.subarray(i.gzindex,i.gzindex+o),i.pending),i.pending+=o,i.gzhead.hcrc&&i.pending>s&&(e.adler=V(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex=0}i.status=73}if(73===i.status){if(i.gzhead.name){var u,c=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>c&&(e.adler=V(e.adler,i.pending_buf,i.pending-c,c)),we(e),0!==i.pending)return i.last_flush=-1,ee;c=0}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,Be(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>c&&(e.adler=V(e.adler,i.pending_buf,i.pending-c,c)),i.gzindex=0}i.status=91}if(91===i.status){if(i.gzhead.comment){var h,A=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>A&&(e.adler=V(e.adler,i.pending_buf,i.pending-A,A)),we(e),0!==i.pending)return i.last_flush=-1,ee;A=0}h=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,Be(i,h)}while(0!==h);i.gzhead.hcrc&&i.pending>A&&(e.adler=V(e.adler,i.pending_buf,i.pending-A,A))}i.status=103}if(103===i.status){if(i.gzhead.hcrc){if(i.pending+2>i.pending_buf_size&&(we(e),0!==i.pending))return i.last_flush=-1,ee;Be(i,255&e.adler),Be(i,e.adler>>8&255),e.adler=0}if(i.status=fe,we(e),0!==i.pending)return i.last_flush=-1,ee}if(0!==e.avail_in||0!==i.lookahead||t!==q&&i.status!==ge){var d=0===i.level?Ee(i,t):i.strategy===ae?function(e,t){for(var i;;){if(0===e.lookahead&&(ke(e),0===e.lookahead)){if(t===q)return 1;break}if(e.match_length=0,i=K(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(xe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2}(i,t):i.strategy===le?function(e,t){for(var i,r,n,s,o=e.window;;){if(e.lookahead<=Ae){if(ke(e),e.lookahead<=Ae&&t===q)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&((r=o[n=e.strstart-1])===o[++n]&&r===o[++n]&&r===o[++n])){s=e.strstart+Ae;do{}while(r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&r===o[++n]&&n<s);e.match_length=Ae-(s-n),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=K(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=K(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(xe(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Z?(xe(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(xe(e,!1),0===e.strm.avail_out)?1:2}(i,t):Ie[i.level].func(i,t);if(3!==d&&4!==d||(i.status=ge),1===d||3===d)return 0===e.avail_out&&(i.last_flush=-1),ee;if(2===d&&(t===Y?X(i):t!==$&&(z(i,0,0,!1),t===J&&(_e(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),we(e),0===e.avail_out))return i.last_flush=-1,ee}return t!==Z?ee:i.wrap<=0?te:(2===i.wrap?(Be(i,255&e.adler),Be(i,e.adler>>8&255),Be(i,e.adler>>16&255),Be(i,e.adler>>24&255),Be(i,255&e.total_in),Be(i,e.total_in>>8&255),Be(i,e.total_in>>16&255),Be(i,e.total_in>>24&255)):(Pe(i,e.adler>>>16),Pe(i,65535&e.adler)),we(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?ee:te)},Qe=function(e){if(Re(e))return ie;var t=e.state.status;return e.state=null,t===fe?me(e,re):ee},He=function(e,t){var i=t.length;if(Re(e))return ie;var r=e.state,n=r.wrap;if(2===n||1===n&&r.status!==pe||r.lookahead)return ie;if(1===n&&(e.adler=U(e.adler,t,i,0)),r.wrap=0,i>=r.w_size){0===n&&(_e(r.head),r.strstart=0,r.block_start=0,r.insert=0);var s=new Uint8Array(r.w_size);s.set(t.subarray(i-r.w_size,i),0),t=s,i=r.w_size}var o=e.avail_in,a=e.next_in,l=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,ke(r);r.lookahead>=3;){var u=r.strstart,c=r.lookahead-2;do{r.ins_h=be(r,r.ins_h,r.window[u+3-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++}while(--c);r.strstart=u,r.lookahead=2,ke(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=l,e.avail_in=o,r.wrap=n,ee},Ge=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},ze=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=w(i))throw new TypeError(i+"must be non-object");for(var r in i)Ge(i,r)&&(e[r]=i[r])}}return e},We=function(e){for(var t=0,i=0,r=e.length;i<r;i++)t+=e[i].length;for(var n=new Uint8Array(t),s=0,o=0,a=e.length;s<a;s++){var l=e[s];n.set(l,o),o+=l.length}return n},Ke=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Ke=!1}for(var Xe=new Uint8Array(256),qe=0;qe<256;qe++)Xe[qe]=qe>=252?6:qe>=248?5:qe>=240?4:qe>=224?3:qe>=192?2:1;Xe[254]=Xe[254]=1;var Ye=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,i,r,n,s,o=e.length,a=0;for(n=0;n<o;n++)55296==(64512&(i=e.charCodeAt(n)))&&n+1<o&&(56320==(64512&(r=e.charCodeAt(n+1)))&&(i=65536+(i-55296<<10)+(r-56320),n++)),a+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(a),s=0,n=0;s<a;n++)55296==(64512&(i=e.charCodeAt(n)))&&n+1<o&&(56320==(64512&(r=e.charCodeAt(n+1)))&&(i=65536+(i-55296<<10)+(r-56320),n++)),i<128?t[s++]=i:i<2048?(t[s++]=192|i>>>6,t[s++]=128|63&i):i<65536?(t[s++]=224|i>>>12,t[s++]=128|i>>>6&63,t[s++]=128|63&i):(t[s++]=240|i>>>18,t[s++]=128|i>>>12&63,t[s++]=128|i>>>6&63,t[s++]=128|63&i);return t},Je=function(e,t){var i,r,n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var s=new Array(2*n);for(r=0,i=0;i<n;){var o=e[i++];if(o<128)s[r++]=o;else{var a=Xe[o];if(a>4)s[r++]=65533,i+=a-1;else{for(o&=2===a?31:3===a?15:7;a>1&&i<n;)o=o<<6|63&e[i++],a--;a>1?s[r++]=65533:o<65536?s[r++]=o:(o-=65536,s[r++]=55296|o>>10&1023,s[r++]=56320|1023&o)}}}return function(e,t){if(t<65534&&e.subarray&&Ke)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var i="",r=0;r<t;r++)i+=String.fromCharCode(e[r]);return i}(s,r)},Ze=function(e,t){(t=t||e.length)>e.length&&(t=e.length);for(var i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+Xe[e[i]]>t?i:t},$e=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},et=Object.prototype.toString,tt=H.Z_NO_FLUSH,it=H.Z_SYNC_FLUSH,rt=H.Z_FULL_FLUSH,nt=H.Z_FINISH,st=H.Z_OK,ot=H.Z_STREAM_END,at=H.Z_DEFAULT_COMPRESSION,lt=H.Z_DEFAULT_STRATEGY,ut=H.Z_DEFLATED;function ct(e){this.options=ze({level:at,method:ut,chunkSize:16384,windowBits:15,memLevel:8,strategy:lt},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;var i=Ue(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==st)throw new Error(Q[i]);if(t.header&&Ne(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Ye(t.dictionary):"[object ArrayBuffer]"===et.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(i=He(this.strm,r))!==st)throw new Error(Q[i]);this._dict_set=!0}}function ht(e,t){var i=new ct(t);if(i.push(e,!0),i.err)throw i.msg||Q[i.err];return i.result}ct.prototype.push=function(e,t){var i,r,n=this.strm,s=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?nt:tt,"string"==typeof e?n.input=Ye(e):"[object ArrayBuffer]"===et.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(s),n.next_out=0,n.avail_out=s),(r===it||r===rt)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if((i=Ve(n,r))===ot)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Qe(this.strm),this.onEnd(i),this.ended=!0,i===st;if(0!==n.avail_out){if(r>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},ct.prototype.onData=function(e){this.chunks.push(e)},ct.prototype.onEnd=function(e){e===st&&(this.result=We(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var At=ct,dt=ht,pt=function(e,t){return(t=t||{}).raw=!0,ht(e,t)},ft=function(e,t){return(t=t||{}).gzip=!0,ht(e,t)},gt=16209,mt=function(e,t){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C=e.state;i=e.next_in,B=e.input,r=i+(e.avail_in-5),n=e.next_out,P=e.output,s=n-(t-e.avail_out),o=n+(e.avail_out-257),a=C.dmax,l=C.wsize,u=C.whave,c=C.wnext,h=C.window,A=C.hold,d=C.bits,p=C.lencode,f=C.distcode,g=(1<<C.lenbits)-1,m=(1<<C.distbits)-1;e:do{d<15&&(A+=B[i++]<<d,d+=8,A+=B[i++]<<d,d+=8),v=p[A&g];t:for(;;){if(A>>>=_=v>>>24,d-=_,0===(_=v>>>16&255))P[n++]=65535&v;else{if(!(16&_)){if(!(64&_)){v=p[(65535&v)+(A&(1<<_)-1)];continue t}if(32&_){C.mode=16191;break e}e.msg="invalid literal/length code",C.mode=gt;break e}y=65535&v,(_&=15)&&(d<_&&(A+=B[i++]<<d,d+=8),y+=A&(1<<_)-1,A>>>=_,d-=_),d<15&&(A+=B[i++]<<d,d+=8,A+=B[i++]<<d,d+=8),v=f[A&m];i:for(;;){if(A>>>=_=v>>>24,d-=_,!(16&(_=v>>>16&255))){if(!(64&_)){v=f[(65535&v)+(A&(1<<_)-1)];continue i}e.msg="invalid distance code",C.mode=gt;break e}if(b=65535&v,d<(_&=15)&&(A+=B[i++]<<d,(d+=8)<_&&(A+=B[i++]<<d,d+=8)),(b+=A&(1<<_)-1)>a){e.msg="invalid distance too far back",C.mode=gt;break e}if(A>>>=_,d-=_,b>(_=n-s)){if((_=b-_)>u&&C.sane){e.msg="invalid distance too far back",C.mode=gt;break e}if(w=0,x=h,0===c){if(w+=l-_,_<y){y-=_;do{P[n++]=h[w++]}while(--_);w=n-b,x=P}}else if(c<_){if(w+=l+c-_,(_-=c)<y){y-=_;do{P[n++]=h[w++]}while(--_);if(w=0,c<y){y-=_=c;do{P[n++]=h[w++]}while(--_);w=n-b,x=P}}}else if(w+=c-_,_<y){y-=_;do{P[n++]=h[w++]}while(--_);w=n-b,x=P}for(;y>2;)P[n++]=x[w++],P[n++]=x[w++],P[n++]=x[w++],y-=3;y&&(P[n++]=x[w++],y>1&&(P[n++]=x[w++]))}else{w=n-b;do{P[n++]=P[w++],P[n++]=P[w++],P[n++]=P[w++],y-=3}while(y>2);y&&(P[n++]=P[w++],y>1&&(P[n++]=P[w++]))}break}}break}}while(i<r&&n<o);i-=y=d>>3,A&=(1<<(d-=y<<3))-1,e.next_in=i,e.next_out=n,e.avail_in=i<r?r-i+5:5-(i-r),e.avail_out=n<o?o-n+257:257-(n-o),C.hold=A,C.bits=d},vt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),_t=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),yt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),bt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),wt=function(e,t,i,r,n,s,o,a){var l,u,c,h,A,d,p,f,g,m=a.bits,v=0,_=0,y=0,b=0,w=0,x=0,B=0,P=0,C=0,M=0,k=null,E=new Uint16Array(16),S=new Uint16Array(16),T=null;for(v=0;v<=15;v++)E[v]=0;for(_=0;_<r;_++)E[t[i+_]]++;for(w=m,b=15;b>=1&&0===E[b];b--);if(w>b&&(w=b),0===b)return n[s++]=20971520,n[s++]=20971520,a.bits=1,0;for(y=1;y<b&&0===E[y];y++);for(w<y&&(w=y),P=1,v=1;v<=15;v++)if(P<<=1,(P-=E[v])<0)return-1;if(P>0&&(0===e||1!==b))return-1;for(S[1]=0,v=1;v<15;v++)S[v+1]=S[v]+E[v];for(_=0;_<r;_++)0!==t[i+_]&&(o[S[t[i+_]]++]=_);if(0===e?(k=T=o,d=20):1===e?(k=vt,T=_t,d=257):(k=yt,T=bt,d=0),M=0,_=0,v=y,A=s,x=w,B=0,c=-1,h=(C=1<<w)-1,1===e&&C>852||2===e&&C>592)return 1;for(;;){p=v-B,o[_]+1<d?(f=0,g=o[_]):o[_]>=d?(f=T[o[_]-d],g=k[o[_]-d]):(f=96,g=0),l=1<<v-B,y=u=1<<x;do{n[A+(M>>B)+(u-=l)]=p<<24|f<<16|g}while(0!==u);for(l=1<<v-1;M&l;)l>>=1;if(0!==l?(M&=l-1,M+=l):M=0,_++,0==--E[v]){if(v===b)break;v=t[i+o[_]]}if(v>w&&(M&h)!==c){for(0===B&&(B=w),A+=y,P=1<<(x=v-B);x+B<b&&!((P-=E[x+B])<=0);)x++,P<<=1;if(C+=1<<x,1===e&&C>852||2===e&&C>592)return 1;n[c=M&h]=w<<24|x<<16|A-s}}return 0!==M&&(n[A+M]=v-B<<24|64<<16),a.bits=w,0},xt=H.Z_FINISH,Bt=H.Z_BLOCK,Pt=H.Z_TREES,Ct=H.Z_OK,Mt=H.Z_STREAM_END,kt=H.Z_NEED_DICT,Et=H.Z_STREAM_ERROR,St=H.Z_DATA_ERROR,Tt=H.Z_MEM_ERROR,Ft=H.Z_BUF_ERROR,It=H.Z_DEFLATED,Dt=16180,Rt=16190,Ot=16191,Lt=16192,jt=16194,Ut=16199,Nt=16200,Vt=16206,Qt=16209,Ht=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function Gt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var zt,Wt,Kt=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode<Dt||t.mode>16211?1:0},Xt=function(e){if(Kt(e))return Et;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Dt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Ct},qt=function(e){if(Kt(e))return Et;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Xt(e)},Yt=function(e,t){var i;if(Kt(e))return Et;var r=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Et:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=i,r.wbits=t,qt(e))},Jt=function(e,t){if(!e)return Et;var i=new Gt;e.state=i,i.strm=e,i.window=null,i.mode=Dt;var r=Yt(e,t);return r!==Ct&&(e.state=null),r},Zt=!0,$t=function(e){if(Zt){zt=new Int32Array(512),Wt=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(wt(1,e.lens,0,288,zt,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;wt(2,e.lens,0,32,Wt,0,e.work,{bits:5}),Zt=!1}e.lencode=zt,e.lenbits=9,e.distcode=Wt,e.distbits=5},ei=function(e,t,i,r){var n,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),r>=s.wsize?(s.window.set(t.subarray(i-s.wsize,i),0),s.wnext=0,s.whave=s.wsize):((n=s.wsize-s.wnext)>r&&(n=r),s.window.set(t.subarray(i-r,i-r+n),s.wnext),(r-=n)?(s.window.set(t.subarray(i-r,i),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0},ti=qt,ii=Jt,ri=function(e,t){var i,r,n,s,o,a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C=0,M=new Uint8Array(4),k=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Kt(e)||!e.output||!e.input&&0!==e.avail_in)return Et;(i=e.state).mode===Ot&&(i.mode=Lt),o=e.next_out,n=e.output,l=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,u=i.hold,c=i.bits,h=a,A=l,x=Ct;e:for(;;)switch(i.mode){case Dt:if(0===i.wrap){i.mode=Lt;break}for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(2&i.wrap&&35615===u){0===i.wbits&&(i.wbits=15),i.check=0,M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0),u=0,c=0,i.mode=16181;break}if(i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",i.mode=Qt;break}if((15&u)!==It){e.msg="unknown compression method",i.mode=Qt;break}if(c-=4,w=8+(15&(u>>>=4)),0===i.wbits&&(i.wbits=w),w>15||w>i.wbits){e.msg="invalid window size",i.mode=Qt;break}i.dmax=1<<i.wbits,i.flags=0,e.adler=i.check=1,i.mode=512&u?16189:Ot,u=0,c=0;break;case 16181:for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(i.flags=u,(255&i.flags)!==It){e.msg="unknown compression method",i.mode=Qt;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=Qt;break}i.head&&(i.head.text=u>>8&1),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0)),u=0,c=0,i.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.head&&(i.head.time=u),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,M[2]=u>>>16&255,M[3]=u>>>24&255,i.check=V(i.check,M,4,0)),u=0,c=0,i.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.head&&(i.head.xflags=255&u,i.head.os=u>>8),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0)),u=0,c=0,i.mode=16184;case 16184:if(1024&i.flags){for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.length=u,i.head&&(i.head.extra_len=u),512&i.flags&&4&i.wrap&&(M[0]=255&u,M[1]=u>>>8&255,i.check=V(i.check,M,2,0)),u=0,c=0}else i.head&&(i.head.extra=null);i.mode=16185;case 16185:if(1024&i.flags&&((d=i.length)>a&&(d=a),d&&(i.head&&(w=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(r.subarray(s,s+d),w)),512&i.flags&&4&i.wrap&&(i.check=V(i.check,r,d,s)),a-=d,s+=d,i.length-=d),i.length))break e;i.length=0,i.mode=16186;case 16186:if(2048&i.flags){if(0===a)break e;d=0;do{w=r[s+d++],i.head&&w&&i.length<65536&&(i.head.name+=String.fromCharCode(w))}while(w&&d<a);if(512&i.flags&&4&i.wrap&&(i.check=V(i.check,r,d,s)),a-=d,s+=d,w)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=16187;case 16187:if(4096&i.flags){if(0===a)break e;d=0;do{w=r[s+d++],i.head&&w&&i.length<65536&&(i.head.comment+=String.fromCharCode(w))}while(w&&d<a);if(512&i.flags&&4&i.wrap&&(i.check=V(i.check,r,d,s)),a-=d,s+=d,w)break e}else i.head&&(i.head.comment=null);i.mode=16188;case 16188:if(512&i.flags){for(;c<16;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(4&i.wrap&&u!==(65535&i.check)){e.msg="header crc mismatch",i.mode=Qt;break}u=0,c=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=Ot;break;case 16189:for(;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}e.adler=i.check=Ht(u),u=0,c=0,i.mode=Rt;case Rt:if(0===i.havedict)return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,i.hold=u,i.bits=c,kt;e.adler=i.check=1,i.mode=Ot;case Ot:if(t===Bt||t===Pt)break e;case Lt:if(i.last){u>>>=7&c,c-=7&c,i.mode=Vt;break}for(;c<3;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}switch(i.last=1&u,c-=1,3&(u>>>=1)){case 0:i.mode=16193;break;case 1:if($t(i),i.mode=Ut,t===Pt){u>>>=2,c-=2;break e}break;case 2:i.mode=16196;break;case 3:e.msg="invalid block type",i.mode=Qt}u>>>=2,c-=2;break;case 16193:for(u>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",i.mode=Qt;break}if(i.length=65535&u,u=0,c=0,i.mode=jt,t===Pt)break e;case jt:i.mode=16195;case 16195:if(d=i.length){if(d>a&&(d=a),d>l&&(d=l),0===d)break e;n.set(r.subarray(s,s+d),o),a-=d,s+=d,l-=d,o+=d,i.length-=d;break}i.mode=Ot;break;case 16196:for(;c<14;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(i.nlen=257+(31&u),u>>>=5,c-=5,i.ndist=1+(31&u),u>>>=5,c-=5,i.ncode=4+(15&u),u>>>=4,c-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=Qt;break}i.have=0,i.mode=16197;case 16197:for(;i.have<i.ncode;){for(;c<3;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.lens[k[i.have++]]=7&u,u>>>=3,c-=3}for(;i.have<19;)i.lens[k[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,B={bits:i.lenbits},x=wt(0,i.lens,0,19,i.lencode,0,i.work,B),i.lenbits=B.bits,x){e.msg="invalid code lengths set",i.mode=Qt;break}i.have=0,i.mode=16198;case 16198:for(;i.have<i.nlen+i.ndist;){for(;m=(C=i.lencode[u&(1<<i.lenbits)-1])>>>16&255,v=65535&C,!((g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(v<16)u>>>=g,c-=g,i.lens[i.have++]=v;else{if(16===v){for(P=g+2;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(u>>>=g,c-=g,0===i.have){e.msg="invalid bit length repeat",i.mode=Qt;break}w=i.lens[i.have-1],d=3+(3&u),u>>>=2,c-=2}else if(17===v){for(P=g+3;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}c-=g,w=0,d=3+(7&(u>>>=g)),u>>>=3,c-=3}else{for(P=g+7;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}c-=g,w=0,d=11+(127&(u>>>=g)),u>>>=7,c-=7}if(i.have+d>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=Qt;break}for(;d--;)i.lens[i.have++]=w}}if(i.mode===Qt)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=Qt;break}if(i.lenbits=9,B={bits:i.lenbits},x=wt(1,i.lens,0,i.nlen,i.lencode,0,i.work,B),i.lenbits=B.bits,x){e.msg="invalid literal/lengths set",i.mode=Qt;break}if(i.distbits=6,i.distcode=i.distdyn,B={bits:i.distbits},x=wt(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,B),i.distbits=B.bits,x){e.msg="invalid distances set",i.mode=Qt;break}if(i.mode=Ut,t===Pt)break e;case Ut:i.mode=Nt;case Nt:if(a>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,i.hold=u,i.bits=c,mt(e,A),o=e.next_out,n=e.output,l=e.avail_out,s=e.next_in,r=e.input,a=e.avail_in,u=i.hold,c=i.bits,i.mode===Ot&&(i.back=-1);break}for(i.back=0;m=(C=i.lencode[u&(1<<i.lenbits)-1])>>>16&255,v=65535&C,!((g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(m&&!(240&m)){for(_=g,y=m,b=v;m=(C=i.lencode[b+((u&(1<<_+y)-1)>>_)])>>>16&255,v=65535&C,!(_+(g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}u>>>=_,c-=_,i.back+=_}if(u>>>=g,c-=g,i.back+=g,i.length=v,0===m){i.mode=16205;break}if(32&m){i.back=-1,i.mode=Ot;break}if(64&m){e.msg="invalid literal/length code",i.mode=Qt;break}i.extra=15&m,i.mode=16201;case 16201:if(i.extra){for(P=i.extra;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.length+=u&(1<<i.extra)-1,u>>>=i.extra,c-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=16202;case 16202:for(;m=(C=i.distcode[u&(1<<i.distbits)-1])>>>16&255,v=65535&C,!((g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(!(240&m)){for(_=g,y=m,b=v;m=(C=i.distcode[b+((u&(1<<_+y)-1)>>_)])>>>16&255,v=65535&C,!(_+(g=C>>>24)<=c);){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}u>>>=_,c-=_,i.back+=_}if(u>>>=g,c-=g,i.back+=g,64&m){e.msg="invalid distance code",i.mode=Qt;break}i.offset=v,i.extra=15&m,i.mode=16203;case 16203:if(i.extra){for(P=i.extra;c<P;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}i.offset+=u&(1<<i.extra)-1,u>>>=i.extra,c-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=Qt;break}i.mode=16204;case 16204:if(0===l)break e;if(d=A-l,i.offset>d){if((d=i.offset-d)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=Qt;break}d>i.wnext?(d-=i.wnext,p=i.wsize-d):p=i.wnext-d,d>i.length&&(d=i.length),f=i.window}else f=n,p=o-i.offset,d=i.length;d>l&&(d=l),l-=d,i.length-=d;do{n[o++]=f[p++]}while(--d);0===i.length&&(i.mode=Nt);break;case 16205:if(0===l)break e;n[o++]=i.length,l--,i.mode=Nt;break;case Vt:if(i.wrap){for(;c<32;){if(0===a)break e;a--,u|=r[s++]<<c,c+=8}if(A-=l,e.total_out+=A,i.total+=A,4&i.wrap&&A&&(e.adler=i.check=i.flags?V(i.check,n,A,o-A):U(i.check,n,A,o-A)),A=l,4&i.wrap&&(i.flags?u:Ht(u))!==i.check){e.msg="incorrect data check",i.mode=Qt;break}u=0,c=0}i.mode=16207;case 16207:if(i.wrap&&i.flags){for(;c<32;){if(0===a)break e;a--,u+=r[s++]<<c,c+=8}if(4&i.wrap&&u!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=Qt;break}u=0,c=0}i.mode=16208;case 16208:x=Mt;break e;case Qt:x=St;break e;case 16210:return Tt;default:return Et}return e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=a,i.hold=u,i.bits=c,(i.wsize||A!==e.avail_out&&i.mode<Qt&&(i.mode<Vt||t!==xt))&&ei(e,e.output,e.next_out,A-e.avail_out),h-=e.avail_in,A-=e.avail_out,e.total_in+=h,e.total_out+=A,i.total+=A,4&i.wrap&&A&&(e.adler=i.check=i.flags?V(i.check,n,A,e.next_out-A):U(i.check,n,A,e.next_out-A)),e.data_type=i.bits+(i.last?64:0)+(i.mode===Ot?128:0)+(i.mode===Ut||i.mode===jt?256:0),(0===h&&0===A||t===xt)&&x===Ct&&(x=Ft),x},ni=function(e){if(Kt(e))return Et;var t=e.state;return t.window&&(t.window=null),e.state=null,Ct},si=function(e,t){if(Kt(e))return Et;var i=e.state;return 2&i.wrap?(i.head=t,t.done=!1,Ct):Et},oi=function(e,t){var i,r=t.length;return Kt(e)?Et:0!==(i=e.state).wrap&&i.mode!==Rt?Et:i.mode===Rt&&U(1,t,r,0)!==i.check?St:ei(e,t,r,r)?(i.mode=16210,Tt):(i.havedict=1,Ct)},ai=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},li=Object.prototype.toString,ui=H.Z_NO_FLUSH,ci=H.Z_FINISH,hi=H.Z_OK,Ai=H.Z_STREAM_END,di=H.Z_NEED_DICT,pi=H.Z_STREAM_ERROR,fi=H.Z_DATA_ERROR,gi=H.Z_MEM_ERROR;function mi(e){this.options=ze({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&!(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new $e,this.strm.avail_out=0;var i=ii(this.strm,t.windowBits);if(i!==hi)throw new Error(Q[i]);if(this.header=new ai,si(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Ye(t.dictionary):"[object ArrayBuffer]"===li.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=oi(this.strm,t.dictionary))!==hi))throw new Error(Q[i])}function vi(e,t){var i=new mi(t);if(i.push(e),i.err)throw i.msg||Q[i.err];return i.result}mi.prototype.push=function(e,t){var i,r,n,s=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?ci:ui,"[object ArrayBuffer]"===li.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;;){for(0===s.avail_out&&(s.output=new Uint8Array(o),s.next_out=0,s.avail_out=o),(i=ri(s,r))===di&&a&&((i=oi(s,a))===hi?i=ri(s,r):i===fi&&(i=di));s.avail_in>0&&i===Ai&&s.state.wrap>0&&0!==e[s.next_in];)ti(s),i=ri(s,r);switch(i){case pi:case fi:case di:case gi:return this.onEnd(i),this.ended=!0,!1}if(n=s.avail_out,s.next_out&&(0===s.avail_out||i===Ai))if("string"===this.options.to){var l=Ze(s.output,s.next_out),u=s.next_out-l,c=Je(s.output,l);s.next_out=u,s.avail_out=o-u,u&&s.output.set(s.output.subarray(l,l+u),0),this.onData(c)}else this.onData(s.output.length===s.next_out?s.output:s.output.subarray(0,s.next_out));if(i!==hi||0!==n){if(i===Ai)return i=ni(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===s.avail_in)break}}return!0},mi.prototype.onData=function(e){this.chunks.push(e)},mi.prototype.onEnd=function(e){e===hi&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=We(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var _i=function(e,t){return(t=t||{}).raw=!0,vi(e,t)},yi=At,bi=dt,wi=pt,xi=ft,Bi=mi,Pi=vi,Ci=_i,Mi=vi,ki=H,Ei={Deflate:yi,deflate:bi,deflateRaw:wi,gzip:xi,Inflate:Bi,inflate:Pi,inflateRaw:Ci,ungzip:Mi,constants:ki};e.Deflate=yi,e.Inflate=Bi,e.constants=ki,e.default=Ei,e.deflate=bi,e.deflateRaw=wi,e.gzip=xi,e.inflate=Pi,e.inflateRaw=Ci,e.ungzip=Mi,Object.defineProperty(e,"__esModule",{value:!0})}));var Bk=Object.freeze({__proto__:null}),Pk=window.pako||Bk;Pk.inflate||(Pk=Pk.default);var Ck=Y.vec4(),Mk=Y.vec4();var kk,Ek=(kk=new Float32Array(3),function(e){return kk[0]=e[0]/255,kk[1]=e[1]/255,kk[2]=e[2]/255,kk});function Sk(e,t){var i=[];if(t.length>1)for(var r=0,n=t.length-1;r<n;r++)i.push(t[r]),i.push(t[r+1]);else if(e.length>1)for(var s=0,o=e.length/3-1;s<o;s++)i.push(s),i.push(s+1);return i}!function(){var e=document.createElement("canvas"),t=e.getContext("2d")}();var Tk={version:10,parse:function(e,t,i,r,n,s){var o=function(e){var t=0;return{metadata:e[t++],textureData:e[t++],eachTextureDataPortion:e[t++],eachTextureAttributes:e[t++],positions:e[t++],normals:e[t++],colors:e[t++],uvs:e[t++],indices:e[t++],edgeIndices:e[t++],eachTextureSetTextures:e[t++],matrices:e[t++],reusedGeometriesDecodeMatrix:e[t++],eachGeometryPrimitiveType:e[t++],eachGeometryPositionsPortion:e[t++],eachGeometryNormalsPortion:e[t++],eachGeometryColorsPortion:e[t++],eachGeometryUVsPortion:e[t++],eachGeometryIndicesPortion:e[t++],eachGeometryEdgeIndicesPortion:e[t++],eachMeshGeometriesPortion:e[t++],eachMeshMatricesPortion:e[t++],eachMeshTextureSet:e[t++],eachMeshMaterialAttributes:e[t++],eachEntityId:e[t++],eachEntityMeshesPortion:e[t++],eachTileAABB:e[t++],eachTileEntitiesPortion:e[t++]}}(i),a=function(e){function t(e,t){return 0===e.length?[]:Pk.inflate(e,t).buffer}return{metadata:JSON.parse(Pk.inflate(e.metadata,{to:"string"})),textureData:new Uint8Array(t(e.textureData)),eachTextureDataPortion:new Uint32Array(t(e.eachTextureDataPortion)),eachTextureAttributes:new Uint16Array(t(e.eachTextureAttributes)),positions:new Uint16Array(t(e.positions)),normals:new Int8Array(t(e.normals)),colors:new Uint8Array(t(e.colors)),uvs:new Float32Array(t(e.uvs)),indices:new Uint32Array(t(e.indices)),edgeIndices:new Uint32Array(t(e.edgeIndices)),eachTextureSetTextures:new Int32Array(t(e.eachTextureSetTextures)),matrices:new Float32Array(t(e.matrices)),reusedGeometriesDecodeMatrix:new Float32Array(t(e.reusedGeometriesDecodeMatrix)),eachGeometryPrimitiveType:new Uint8Array(t(e.eachGeometryPrimitiveType)),eachGeometryPositionsPortion:new Uint32Array(t(e.eachGeometryPositionsPortion)),eachGeometryNormalsPortion:new Uint32Array(t(e.eachGeometryNormalsPortion)),eachGeometryColorsPortion:new Uint32Array(t(e.eachGeometryColorsPortion)),eachGeometryUVsPortion:new Uint32Array(t(e.eachGeometryUVsPortion)),eachGeometryIndicesPortion:new Uint32Array(t(e.eachGeometryIndicesPortion)),eachGeometryEdgeIndicesPortion:new Uint32Array(t(e.eachGeometryEdgeIndicesPortion)),eachMeshGeometriesPortion:new Uint32Array(t(e.eachMeshGeometriesPortion)),eachMeshMatricesPortion:new Uint32Array(t(e.eachMeshMatricesPortion)),eachMeshTextureSet:new Int32Array(t(e.eachMeshTextureSet)),eachMeshMaterialAttributes:new Uint8Array(t(e.eachMeshMaterialAttributes)),eachEntityId:JSON.parse(Pk.inflate(e.eachEntityId,{to:"string"})),eachEntityMeshesPortion:new Uint32Array(t(e.eachEntityMeshesPortion)),eachTileAABB:new Float64Array(t(e.eachTileAABB)),eachTileEntitiesPortion:new Uint32Array(t(e.eachTileEntitiesPortion))}}(o);!function(e,t,i,r,n,s){var o=s.getNextId(),a=i.metadata,l=i.textureData,u=i.eachTextureDataPortion,c=i.eachTextureAttributes,h=i.positions,A=i.normals,d=i.colors,p=i.uvs,f=i.indices,g=i.edgeIndices,m=i.eachTextureSetTextures,v=i.matrices,_=i.reusedGeometriesDecodeMatrix,y=i.eachGeometryPrimitiveType,b=i.eachGeometryPositionsPortion,w=i.eachGeometryNormalsPortion,x=i.eachGeometryColorsPortion,B=i.eachGeometryUVsPortion,P=i.eachGeometryIndicesPortion,C=i.eachGeometryEdgeIndicesPortion,M=i.eachMeshGeometriesPortion,k=i.eachMeshMatricesPortion,E=i.eachMeshTextureSet,S=i.eachMeshMaterialAttributes,T=i.eachEntityId,F=i.eachEntityMeshesPortion,I=i.eachTileAABB,D=i.eachTileEntitiesPortion,R=u.length,O=m.length/5,L=b.length,j=M.length,U=F.length,N=D.length;n&&n.loadData(a,{includeTypes:t.includeTypes,excludeTypes:t.excludeTypes,globalizeObjectIds:t.globalizeObjectIds});for(var V=0;V<R;V++){var Q=V===R-1,H=u[V],G=Q?l.length:u[V+1],z=G-H>0,W=9*V,K=1===c[W+0];c[W+1],c[W+2],c[W+3];var X=c[W+4],q=c[W+5],J=c[W+6],Z=c[W+7],$=c[W+8];if(z){var ee=new Uint8Array(l.subarray(H,G)).buffer,te="".concat(o,"-texture-").concat(V);K?r.createTexture({id:te,buffers:[ee],minFilter:X,magFilter:q,wrapS:J,wrapT:Z,wrapR:$}):r.createTexture({id:te,imageBuffer:ee,minFilter:X,magFilter:q,wrapS:J,wrapT:Z,wrapR:$})}}for(var ie=0;ie<O;ie++){var re=5*ie,se="".concat(o,"-textureSet-").concat(ie),oe=m[re+0],ae=m[re+1],le=m[re+2],ue=m[re+3],ce=m[re+4];r.createTextureSet({id:se,colorTextureId:oe>=0?"".concat(o,"-texture-").concat(oe):null,normalsTextureId:le>=0?"".concat(o,"-texture-").concat(le):null,metallicRoughnessTextureId:ae>=0?"".concat(o,"-texture-").concat(ae):null,emissiveTextureId:ue>=0?"".concat(o,"-texture-").concat(ue):null,occlusionTextureId:ce>=0?"".concat(o,"-texture-").concat(ce):null})}for(var he=new Uint32Array(L),Ae=0;Ae<j;Ae++){var de=M[Ae];void 0!==he[de]?he[de]++:he[de]=1}for(var pe=Y.vec3(),fe=Y.AABB3(),ge={},me=0;me<N;me++){var ve=me===N-1,_e=D[me],ye=ve?U-1:D[me+1]-1,be=6*me,we=I.subarray(be,be+6);Y.getAABB3Center(we,pe),fe[0]=we[0]-pe[0],fe[1]=we[1]-pe[1],fe[2]=we[2]-pe[2],fe[3]=we[3]-pe[0],fe[4]=we[4]-pe[1],fe[5]=we[5]-pe[2];for(var xe=xi.createPositionsDecodeMatrix(fe),Be={},Pe=_e;Pe<=ye;Pe++){var Ce=T[Pe],Me=t.globalizeObjectIds?Y.globalizeObjectId(r.id,Ce):Ce,ke=Pe===U-1,Ee=F[Pe],Se=ke?M.length-1:F[Pe+1]-1,Te=[],Fe=e.metaScene.metaObjects[Me],Ie={},De={};if(Fe){if(t.excludeTypesMap&&Fe.type&&t.excludeTypesMap[Fe.type])continue;if(t.includeTypesMap&&Fe.type&&!t.includeTypesMap[Fe.type])continue;var Re=t.objectDefaults?t.objectDefaults[Fe.type]||t.objectDefaults.DEFAULT:null;Re&&(!1===Re.visible&&(Ie.visible=!1),!1===Re.pickable&&(Ie.pickable=!1),Re.colorize&&(De.color=Re.colorize),void 0!==Re.opacity&&null!==Re.opacity&&(De.opacity=Re.opacity),void 0!==Re.metallic&&null!==Re.metallic&&(De.metallic=Re.metallic),void 0!==Re.roughness&&null!==Re.roughness&&(De.roughness=Re.roughness))}else if(t.excludeUnclassifiedObjects)continue;for(var Oe=Ee;Oe<=Se;Oe++){var Le=M[Oe],je=he[Le]>1,Ue=Le===L-1,Ne=E[Oe],Ve=Ne>=0?"".concat(o,"-textureSet-").concat(Ne):null,Qe=Ek(S.subarray(6*Oe,6*Oe+3)),He=S[6*Oe+3]/255,Ge=S[6*Oe+4]/255,ze=S[6*Oe+5]/255,We=s.getNextId();if(je){var Ke=k[Oe],Xe=v.slice(Ke,Ke+16),qe="".concat(o,"-geometry.").concat(me,".").concat(Le),Ye=ge[qe];if(!Ye){Ye={batchThisMesh:!t.reuseGeometries};var Je=!1;switch(y[Le]){case 0:Ye.primitiveName="solid",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryNormals=A.subarray(w[Le],Ue?A.length:w[Le+1]),Ye.geometryUVs=p.subarray(B[Le],Ue?p.length:B[Le+1]),Ye.geometryIndices=f.subarray(P[Le],Ue?f.length:P[Le+1]),Ye.geometryEdgeIndices=g.subarray(C[Le],Ue?g.length:C[Le+1]),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;case 1:Ye.primitiveName="surface",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryNormals=A.subarray(w[Le],Ue?A.length:w[Le+1]),Ye.geometryUVs=p.subarray(B[Le],Ue?p.length:B[Le+1]),Ye.geometryIndices=f.subarray(P[Le],Ue?f.length:P[Le+1]),Ye.geometryEdgeIndices=g.subarray(C[Le],Ue?g.length:C[Le+1]),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;case 2:Ye.primitiveName="points",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryColors=d.subarray(x[Le],Ue?d.length:x[Le+1]),Je=Ye.geometryPositions.length>0;break;case 3:Ye.primitiveName="lines",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryIndices=f.subarray(P[Le],Ue?f.length:P[Le+1]),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;case 4:Ye.primitiveName="lines",Ye.geometryPositions=h.subarray(b[Le],Ue?h.length:b[Le+1]),Ye.geometryIndices=Sk(Ye.geometryPositions,f.subarray(P[Le],Ue?f.length:P[Le+1])),Je=Ye.geometryPositions.length>0&&Ye.geometryIndices.length>0;break;default:continue}if(Je||(Ye=null),Ye&&(Ye.geometryPositions.length,Ye.batchThisMesh)){Ye.decompressedPositions=new Float32Array(Ye.geometryPositions.length),Ye.transformedAndRecompressedPositions=new Uint16Array(Ye.geometryPositions.length);for(var Ze=Ye.geometryPositions,$e=Ye.decompressedPositions,et=0,tt=Ze.length;et<tt;et+=3)$e[et+0]=Ze[et+0]*_[0]+_[12],$e[et+1]=Ze[et+1]*_[5]+_[13],$e[et+2]=Ze[et+2]*_[10]+_[14];Ye.geometryPositions=null,ge[qe]=Ye}}if(Ye)if(Ye.batchThisMesh){for(var it=Ye.decompressedPositions,rt=Ye.transformedAndRecompressedPositions,nt=0,st=it.length;nt<st;nt+=3)Ck[0]=it[nt+0],Ck[1]=it[nt+1],Ck[2]=it[nt+2],Ck[3]=1,Y.transformVec4(Xe,Ck,Mk),xi.compressPosition(Mk,fe,Ck),rt[nt+0]=Ck[0],rt[nt+1]=Ck[1],rt[nt+2]=Ck[2];r.createMesh(ne.apply(De,{id:We,textureSetId:Ve,origin:pe,primitive:Ye.primitiveName,positionsCompressed:rt,normalsCompressed:Ye.geometryNormals,uv:Ye.geometryUVs,colorsCompressed:Ye.geometryColors,indices:Ye.geometryIndices,edgeIndices:Ye.geometryEdgeIndices,positionsDecodeMatrix:xe,color:Qe,metallic:Ge,roughness:ze,opacity:He})),Te.push(We)}else Be[qe]||(r.createGeometry({id:qe,primitive:Ye.primitiveName,positionsCompressed:Ye.geometryPositions,normalsCompressed:Ye.geometryNormals,uv:Ye.geometryUVs,colorsCompressed:Ye.geometryColors,indices:Ye.geometryIndices,edgeIndices:Ye.geometryEdgeIndices,positionsDecodeMatrix:_}),Be[qe]=!0),r.createMesh(ne.apply(De,{id:We,geometryId:qe,textureSetId:Ve,matrix:Xe,color:Qe,metallic:Ge,roughness:ze,opacity:He,origin:pe})),Te.push(We)}else{var ot=void 0,at=void 0,lt=void 0,ut=void 0,ct=void 0,ht=void 0,At=void 0,dt=!1;switch(y[Le]){case 0:ot="solid",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),lt=A.subarray(w[Le],Ue?A.length:w[Le+1]),ut=p.subarray(B[Le],Ue?p.length:B[Le+1]),ht=f.subarray(P[Le],Ue?f.length:P[Le+1]),At=g.subarray(C[Le],Ue?g.length:C[Le+1]),dt=at.length>0&&ht.length>0;break;case 1:ot="surface",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),lt=A.subarray(w[Le],Ue?A.length:w[Le+1]),ut=p.subarray(B[Le],Ue?p.length:B[Le+1]),ht=f.subarray(P[Le],Ue?f.length:P[Le+1]),At=g.subarray(C[Le],Ue?g.length:C[Le+1]),dt=at.length>0&&ht.length>0;break;case 2:ot="points",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),ct=d.subarray(x[Le],Ue?d.length:x[Le+1]),dt=at.length>0;break;case 3:ot="lines",at=h.subarray(b[Le],Ue?h.length:b[Le+1]),ht=f.subarray(P[Le],Ue?f.length:P[Le+1]),dt=at.length>0&&ht.length>0;break;case 4:ot="lines",ht=Sk(at=h.subarray(b[Le],Ue?h.length:b[Le+1]),f.subarray(P[Le],Ue?f.length:P[Le+1])),dt=at.length>0&&ht.length>0;break;default:continue}dt&&(r.createMesh(ne.apply(De,{id:We,textureSetId:Ve,origin:pe,primitive:ot,positionsCompressed:at,normalsCompressed:lt,uv:ut&&ut.length>0?ut:null,colorsCompressed:ct,indices:ht&&ht.length>0?ht:null,edgeIndices:At,positionsDecodeMatrix:xe,color:Qe,metallic:Ge,roughness:ze,opacity:He})),Te.push(We))}}Te.length>0&&r.createEntity(ne.apply(Ie,{id:Me,isObject:!0,meshIds:Te}))}}}(e,t,a,r,n,s)},inflateMetadata:function(e){return JSON.parse(Pk.inflate(e,{to:"string"}))}},Fk={};Fk[Tk.version]=Tk;var Ik=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x(this,e),(i=d(this,e,["XTCLoader",t,r]))._maxGeometryBatchSize=r.maxGeometryBatchSize,i.textureTranscoder=r.textureTranscoder,i.dataSource=r.dataSource,i.objectDefaults=r.objectDefaults,i.includeTypes=r.includeTypes,i.excludeTypes=r.excludeTypes,i.excludeUnclassifiedObjects=r.excludeUnclassifiedObjects,i.reuseGeometries=r.reuseGeometries,i}return _(e,ge),P(e,[{key:"supportedVersions",get:function(){return Object.keys(Fk)}},{key:"textureTranscoder",get:function(){return this._textureTranscoder},set:function(e){this._textureTranscoder=e}},{key:"dataSource",get:function(){return this._dataSource},set:function(e){this._dataSource=e||new xk}},{key:"objectDefaults",get:function(){return this._objectDefaults},set:function(e){this._objectDefaults=e||qM}},{key:"includeTypes",get:function(){return this._includeTypes},set:function(e){this._includeTypes=e}},{key:"excludeTypes",get:function(){return this._excludeTypes},set:function(e){this._excludeTypes=e}},{key:"excludeUnclassifiedObjects",get:function(){return this._excludeUnclassifiedObjects},set:function(e){this._excludeUnclassifiedObjects=!!e}},{key:"globalizeObjectIds",get:function(){return this._globalizeObjectIds},set:function(e){this._globalizeObjectIds=!!e}},{key:"reuseGeometries",get:function(){return this._reuseGeometries},set:function(e){this._reuseGeometries=!1!==e}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.id&&this.viewer.scene.components[t.id]&&(this.error("Component with this ID already exists in viewer: "+t.id+" - will autogenerate this ID"),delete t.id),!(t.src||t.xtc||t.manifestSrc||t.manifest))return this.error("load() param expected: src, xtc, manifestSrc or manifestData"),c;var i={},r=t.includeTypes||this._includeTypes,n=t.excludeTypes||this._excludeTypes,s=t.objectDefaults||this._objectDefaults;if(i.reuseGeometries=null!==t.reuseGeometries&&void 0!==t.reuseGeometries?t.reuseGeometries:!1!==this._reuseGeometries,r){i.includeTypesMap={};for(var o=0,a=r.length;o<a;o++)i.includeTypesMap[r[o]]=!0}if(n){i.excludeTypesMap={};for(var l=0,u=n.length;l<u;l++)i.excludeTypesMap[n[l]]=!0}s&&(i.objectDefaults=s),i.excludeUnclassifiedObjects=void 0!==t.excludeUnclassifiedObjects?!!t.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=void 0!==t.globalizeObjectIds&&null!==t.globalizeObjectIds?!!t.globalizeObjectIds:this._globalizeObjectIds;var c=new $c(this.viewer.scene,ne.apply(t,{isModel:!0,textureTranscoder:this._textureTranscoder,maxGeometryBatchSize:this._maxGeometryBatchSize,origin:t.origin,disableVertexWelding:t.disableVertexWelding||!1,disableIndexRebucketing:t.disableIndexRebucketing||!1,dtxEnabled:t.dtxEnabled})),h=c.id,A=new vA({metaScene:this.viewer.metaScene,id:h});this.viewer.scene.canvas.spinner.processes++;var d,p,f=function(){c.destroyed||(c.finalize(),A.finalize(),e.viewer.scene.canvas.spinner.processes--,c.once("destroyed",(function(){e.viewer.metaScene.destroyMetaModel(A.id)})),e.scheduleTask((function(){c.destroyed||(c.scene.fire("modelLoaded",c.id),c.fire("loaded",!0,!1))})))},g=function(t){e.viewer.scene.canvas.spinner.processes--,e.error(t),c.fire("error",t)},m=0,v={getNextId:function(){return"".concat(h,".").concat(m++)}};if(t.metaModelSrc||t.metaModelData)if(t.metaModelSrc){var _=t.metaModelSrc;this._dataSource.getMetaModel(_,(function(s){c.destroyed||(A.loadData(s,{includeTypes:r,excludeTypes:n,globalizeObjectIds:i.globalizeObjectIds}),t.src?e._loadModel(t.src,t,i,c,null,v,f,g):(e._parseModel(t.xtc,t,i,c,null,v),f()))}),(function(e){g("load(): Failed to load model metadata for model '".concat(h," from '").concat(_,"' - ").concat(e))}))}else t.metaModelData&&(A.loadData(t.metaModelData,{includeTypes:r,excludeTypes:n,globalizeObjectIds:i.globalizeObjectIds}),t.src?this._loadModel(t.src,t,i,c,null,v,f,g):(this._parseModel(t.xtc,t,i,c,null,v),f()));else if(t.src)this._loadModel(t.src,t,i,c,A,v,f,g);else if(t.xtc)this._parseModel(t.xtc,t,i,c,A,v),f();else if(t.manifestSrc||t.manifest){var y=t.manifestSrc?(d=t.manifestSrc,(p=d.split("/")).pop(),p.join("/")+"/"):"",b=function(t,s,o){var a=0,l=function(){c.destroyed||a>=t.length?s():e._dataSource.getMetaModel("".concat(y).concat(t[a]),(function(t){A.loadData(t,{includeTypes:r,excludeTypes:n,globalizeObjectIds:i.globalizeObjectIds}),a++,e.scheduleTask(l,200)}),o)};l()},w=function(r,n,s){var o=0,a=function(){c.destroyed||o>=r.length?n():e._dataSource.getXTC("".concat(y).concat(r[o]),(function(r){e._parseModel(r,t,i,c,null,v),c.preFinalize(),o++,e.scheduleTask(a,200)}),s)};a()},x=function(r,n,s){var o=0,a=function(){c.destroyed||o>=r.length?n():e._dataSource.getXTC("".concat(y).concat(r[o]),(function(r){e._parseModel(r,t,i,c,A,v),c.preFinalize(),o++,e.scheduleTask(a,100)}),s)};a()};if(t.manifest){var B=t.manifest,P=B.xtcFiles;if(!P||0===P.length)return void g("load(): Failed to load model manifest - manifest not valid");var C=B.metaModelFiles;C?b(C,(function(){w(P,f,g)}),g):x(P,f,g)}else this._dataSource.getManifest(t.manifestSrc,(function(e){if(!c.destroyed){var t=e.xtcFiles;if(t&&0!==t.length){var i=e.metaModelFiles;i?b(i,(function(){w(t,f,g)}),g):x(t,f,g)}else g("load(): Failed to load model manifest - manifest not valid")}}),g)}return c}},{key:"_loadModel",value:function(e,t,i,r,n,s,o,a){var l=this;this._dataSource.getXTC(t.src,(function(e){l._parseModel(e,t,i,r,n,s),r.preFinalize(),o()}),a)}},{key:"_parseModel",value:(t=a(s().mark((function e(t,i,r,n,o,a){var l,u,c,h,A,d,p,f,g;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.destroyed){e.next=2;break}return e.abrupt("return");case 2:if(l=new DataView(t),u=new Uint8Array(t),c=l.getUint32(0,!0),h=Fk[c]){e.next=9;break}return this.error("Unsupported .XTC file version: "+c+" - this XTCLoaderPlugin supports versions "+Object.keys(Fk)),e.abrupt("return");case 9:for(this.log("Loading .xtc V"+c),A=l.getUint32(4,!0),d=[],p=4*(A+2),f=0;f<A;f++)g=l.getUint32(4*(f+2),!0),d.push(u.subarray(p,p+g)),p+=g;h.parse(this.viewer,r,d,n,o,a);case 15:case"end":return e.stop()}}),e,this)}))),function(e,i,r,n,s,o){return t.apply(this,arguments)})},{key:"loadMetadata",value:function(e,t,i,r){var n=this;e._finalized=!1;try{this._workerInflate(e,t,i,(function(t){t.terminate(),n.fire("metaLoaded",{result:"success",metaModel:e}),"function"==typeof r&&r()}),(function(t,i){t.terminate(),n.fire("metaLoaded",{result:"failed",message:i,metaModel:e})}))}catch(t){this.fire("metaloaded",{result:t,metaModel:e})}}},{key:"_workerInflate",value:function(e,t,i,r,n){var s,o,a=this,l=(s=new Blob(['\n self.importScripts(\'https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.11/pako.min.js\');\n \n function inflateMetadata(deflatedData) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(self.pako.inflate(deflatedData, { to: "string" }));\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error("Error inflating metadata:", error);\n\t\t\t\tthrow error;\n\t\t\t} \n\t\t}\n \n self.onmessage = function (e) {\n console.log("start worker:");\n const metaJson = inflateMetadata(e.data.buffer);\n\n self.postMessage({\n metaJson,\n time: new Date().getTime()\n });\n };\n '],{type:"application/javascript"}),o=URL.createObjectURL(s),new Worker(o));l.postMessage({buffer:t}),l.onmessage=function(t){i?e.loadData(t.data.metaJson,(function(){e.finalize(),"function"==typeof r?r(l):l.terminate()}),(function(e){"function"==typeof n&&n(l,e)})):a.fire("metaLoading",(function(){e.loadData(t.data.metaJson,(function(){e.finalize(),"function"==typeof r?r(l):l.terminate()}),(function(e){"function"==typeof n&&n(l,e)}))}))},l.onerror=function(e){"function"==typeof n&&n(l,e.message),l.terminate()}}}]);var t}();var Dk=function(){return P((function e(){x(this,e)}),[{key:"getIFC",value:function(e,t,i){var r=function(){};t=t||r,i=i||r;var n=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(n){var s=!!n[2],o=n[3];o=window.decodeURIComponent(o),s&&(o=window.atob(o));try{for(var a=new ArrayBuffer(o.length),l=new Uint8Array(a),u=0;u<o.length;u++)l[u]=o.charCodeAt(u);t(a)}catch(e){i(e)}}else{var c=new XMLHttpRequest;c.open("GET",e,!0),c.responseType="arraybuffer",c.onreadystatechange=function(){4===c.readyState&&(200===c.status?t(c.response):i("getXTC error : "+c.response))},c.send(null)}}}])}(),Rk=function(){function e(t){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return x(this,e),(i=d(this,e,["ifcLoader",t,r])).dataSource=r.dataSource,i.objectDefaults=r.objectDefaults,i.includeTypes=r.includeTypes,i.excludeTypes=r.excludeTypes,i.excludeUnclassifiedObjects=r.excludeUnclassifiedObjects,r.WebIFC&&(i._webIFC=r.WebIFC,i._ifcAPI=r.IfcAPI,i.webIfcFroMOutside=!0),i}return _(e,ge),P(e,[{key:"supportedVersions",get:function(){return["2x3","4"]}},{key:"dataSource",get:function(){return this._dataSource},set:function(e){this._dataSource=e||new Dk}},{key:"objectDefaults",get:function(){return this._objectDefaults},set:function(e){this._objectDefaults=e||qM}},{key:"includeTypes",get:function(){return this._includeTypes},set:function(e){this._includeTypes=e}},{key:"excludeTypes",get:function(){return this._excludeTypes},set:function(e){this._excludeTypes=e}},{key:"excludeUnclassifiedObjects",get:function(){return this._excludeUnclassifiedObjects},set:function(e){this._excludeUnclassifiedObjects=!!e}},{key:"globalizeObjectIds",get:function(){return this._globalizeObjectIds},set:function(e){this._globalizeObjectIds=!!e}},{key:"load",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.id&&this.viewer.scene.components[e.id]&&(this.error("Component with this ID already exists in viewer: "+e.id+" - will autogenerate this ID"),delete e.id);var t=new $c(this.viewer.scene,ne.apply(e,{isModel:!0}));if(!e.src&&!e.ifc)return this.error("load() param expected: src or IFC"),t;var i={autoNormals:!0};if(!1!==e.loadMetadata){var r=e.includeTypes||this._includeTypes,n=e.excludeTypes||this._excludeTypes,s=e.objectDefaults||this._objectDefaults;if(r){i.includeTypesMap={};for(var o=0,a=r.length;o<a;o++)i.includeTypesMap[r[o]]=!0}if(n){i.excludeTypesMap={};for(var l=0,u=n.length;l<u;l++)i.excludeTypesMap[n[l]]=!0}s&&(i.objectDefaults=s),i.excludeUnclassifiedObjects=void 0!==e.excludeUnclassifiedObjects?!!e.excludeUnclassifiedObjects:this._excludeUnclassifiedObjects,i.globalizeObjectIds=void 0!==e.globalizeObjectIds?!!e.globalizeObjectIds:this._globalizeObjectIds}if(this.webIfcFroMOutside)try{e.src?this._loadModel(e.src,e,i,t):this._parseModel(e.ifc,e,i,t)}catch(e){this.error(e),t.fire("error",e)}return t}},{key:"_loadModel",value:function(e,t,i,r){var n=this,s=this.viewer.scene.canvas.spinner;s.processes++,this._dataSource.getIFC(t.src,(function(e){n._parseModel(e,t,i,r),s.processes--}),(function(e){s.processes--,n.error(e),r.fire("error",e)}))}},{key:"_parseModel",value:function(e,t,i,r){if(!r.destroyed){var n=t.stats||{};if(n.sourceFormat="IFC",n.schemaVersion="",n.title="",n.author="",n.created="",n.numMetaObjects=0,n.numPropertySets=0,n.numObjects=0,n.numGeometries=0,n.numTriangles=0,n.numVertices=0,this.webIfcFroMOutside){if(!this._ifcAPI)throw"WebIFCLoaderPlugin has no WebIFC instance configured - please inject via WebIFCLoaderPlugin constructor"}else i.wasmPath&&this._ifcAPI.SetWasmPath(i.wasmPath);var s,o=new Uint8Array(e),a=this._ifcAPI.OpenModel(o),l=this._ifcAPI.GetModelSchema(a),u=this._ifcAPI.GetLineIDsWithType(a,this._webIFC.IFCPROJECT).get(0),c=!1!==t.loadMetadata,h=void 0!==t.metadata&&null!==t.metadata;s=h?t.metadata:null;var A={ifcProjectId:u,modelID:a,modelSchema:l,sceneModel:r,loadMetadata:c,metadata:c?{id:"",projectId:""+u,author:"",createdAt:"",schema:"",creatingApplication:"",metaObjects:[],propertySets:[]}:s,metaObjects:h?r.metaObjects:{},options:i,nextId:0,stats:n};if(c){if(i.includeTypes){A.includeTypes={};for(var d=0,p=i.includeTypes.length;d<p;d++)A.includeTypes[i.includeTypes[d]]=!0}if(i.excludeTypes){A.excludeTypes={};for(var f=0,g=i.excludeTypes.length;f<g;f++)A.excludeTypes[i.excludeTypes[f]]=!0}this._parseMetaObjects(A),this._parsePropertySets(A)}if(this._parseGeometry(A),r.finalize(),c||h){var m=r.id;this.viewer.metaScene.createMetaModel(m,A.metadata,i)}r.scene.once("tick",(function(){r.destroyed||(r.scene.fire("modelLoaded",r.id),r.fire("loaded",!0,!1))}))}}},{key:"_parseMetaObjects",value:function(e){var t=this._ifcAPI.GetLine(e.modelID,e.ifcProjectId);this._parseSpatialChildren(e,t)}},{key:"_parseSpatialChildren",value:function(e,t,i){var r=this._ifcAPI.GetNameFromTypeCode(t.type);if((!e.includeTypes||e.includeTypes[r])&&(!e.excludeTypes||!e.excludeTypes[r])){this._createMetaObject(e,t,i);var n=t.GlobalId.value;this._parseRelatedItemsOfType(e,t.expressID,"RelatingObject","RelatedObjects",this._webIFC.IFCRELAGGREGATES,n),this._parseRelatedItemsOfType(e,t.expressID,"RelatingStructure","RelatedElements",this._webIFC.IFCRELCONTAINEDINSPATIALSTRUCTURE,n)}}},{key:"_createMetaObject",value:function(e,t,i){var r,n=t.GlobalId.value;r=this.webIfcFroMOutside?this._ifcAPI.GetNameFromTypeCode(t.type):t.__proto__.constructor.name;var s={id:n,name:t.Name&&""!==t.Name.value?t.Name.value:r,type:r,parent:i};e.metadata.metaObjects.push(s),e.metaObjects[n]=s,e.stats.numMetaObjects++}},{key:"_parseRelatedItemsOfType",value:function(e,t,i,r,n,s){for(var o=this,a=this._ifcAPI.GetLineIDsWithType(e.modelID,n),l=0;l<a.size();l++){var u=a.get(l),c=this._ifcAPI.GetLine(e.modelID,u);if(null==c)return;var h=c[i],A=!1;if(Array.isArray(h))A=h.map((function(e){return e.value})).includes(t);else A=h.value===t;if(A){var d=c[r];if(Array.isArray(d))d.forEach((function(t){var i=o._ifcAPI.GetLine(e.modelID,t.value);null!=i&&o._parseSpatialChildren(e,i,s)}));else{var p=this._ifcAPI.GetLine(e.modelID,d.value);if(null==p)return;this._parseSpatialChildren(e,p,s)}}}}},{key:"_parsePropertySets",value:function(e){this.log("start parse property...");for(var t=this._ifcAPI.GetLineIDsWithType(e.modelID,this._webIFC.IFCRELDEFINESBYPROPERTIES),i=0;i<t.size();i++){var r=t.get(i),n=this._ifcAPI.GetLine(e.modelID,r,!0);if(n){var s=n.RelatingPropertyDefinition;if(!s)continue;var o=s.GlobalId.value,a=s.HasProperties;if(a&&a.length>0){for(var l=s.Name.value,u=[],c=0,h=a.length;c<h;c++){var A=a[c],d=A.Name,p=A.NominalValue;if(d&&p){var f={name:d.value,type:p.type,value:p.value,valueType:p.valueType};A.Description?f.description=A.Description.value:p.description&&(f.description=p.description),u.push(f)}}var g={id:o,type:"Default",name:l,properties:u};e.metadata.propertySets.push(g),e.stats.numPropertySets++;var m=n.RelatedObjects;if(!m||0===m.length)return;for(var v=0,_=m.length;v<_;v++){var y=m[v].GlobalId.value,b=e.metaObjects[y];b&&(b.propertySetIds||(b.propertySetIds=[]),b.propertySetIds.push(o))}}}}}},{key:"_parseGeometry",value:function(e){var t=this;this.log("start parse geometry"),this._ifcAPI.StreamAllMeshes(e.modelID,(function(i){var r=i.expressID,n=i.geometries,s=[],o=t._ifcAPI.GetLine(e.modelID,r);if(null!=o){var a=o.GlobalId.value;if(e.loadMetadata){var l=a,u=e.metaObjects[l];if(e.includeTypes&&(!u||!e.includeTypes[u.type]))return;if(e.excludeTypes&&(!u||e.excludeTypes[u.type]))return}for(var c=Y.mat4(),h=Y.vec3(),A=0,d=n.size();A<d;A++){for(var p=n.get(A),f=t._ifcAPI.GetGeometry(e.modelID,p.geometryExpressID),g=t._ifcAPI.GetVertexArray(f.GetVertexData(),f.GetVertexDataSize()),m=t._ifcAPI.GetIndexArray(f.GetIndexData(),f.GetIndexDataSize()),v=new Float64Array(g.length/2),_=new Float32Array(g.length/2),y=0,b=0,w=g.length/6;y<w;y++,b+=3)v[b+0]=g[6*y+0],v[b+1]=g[6*y+1],v[b+2]=g[6*y+2];c.set(p.flatTransformation),Y.transformPositions3(c,v);var x=we(v,v,h);if(!e.options.autoNormals)for(var B=0,P=0,C=g.length/6;B<C;B++,P+=3)_[P+0]=g[6*B+3],_[P+1]=g[6*B+4],_[P+2]=g[6*B+5];e.stats.numGeometries++,e.stats.numVertices+=v.length/3,e.stats.numTriangles+=m.length/3;var M="mesh"+e.nextId++;e.sceneModel.createMesh({id:M,primitive:"triangles",origin:x?h:null,positions:v,normals:e.options.autoNormals?null:_,indices:m,color:[p.color.x,p.color.y,p.color.z],opacity:p.color.w}),s.push(M)}var k=e.options.globalizeObjectIds?Y.globalizeObjectId(e.sceneModel.id,a):a;e.sceneModel.createEntity({id:k,meshIds:s,isObject:!0}),e.stats.numObjects++}})),this._ifcAPI.StreamAllMeshesWithTypes(e.modelID,[3856911033],(function(i,r,n){var s=i.expressID,o=t._ifcAPI.GetLine(e.modelID,s);if(null!=o){for(var a=o.GlobalId.value,l=i.geometries,u=[],c=Y.mat4(),h=Y.vec3(),A=0,d=l.size();A<d;A++){for(var p=l.get(A),f=t._ifcAPI.GetGeometry(e.modelID,p.geometryExpressID),g=t._ifcAPI.GetVertexArray(f.GetVertexData(),f.GetVertexDataSize()),m=t._ifcAPI.GetIndexArray(f.GetIndexData(),f.GetIndexDataSize()),v=new Float64Array(g.length/2),_=new Float32Array(g.length/2),y=0,b=0,w=g.length/6;y<w;y++,b+=3)v[b+0]=g[6*y+0],v[b+1]=g[6*y+1],v[b+2]=g[6*y+2];c.set(p.flatTransformation),Y.transformPositions3(c,v);var x=we(v,v,h);if(!e.options.autoNormals)for(var B=0,P=0,C=g.length/6;B<C;B++,P+=3)_[P+0]=g[6*B+3],_[P+1]=g[6*B+4],_[P+2]=g[6*B+5];e.stats.numGeometries++,e.stats.numVertices+=v.length/3,e.stats.numTriangles+=m.length/3;var M="mesh"+e.nextId++;e.sceneModel.createMesh({id:M,primitive:"triangles",origin:x?h:null,positions:v,normals:e.options.autoNormals?null:_,indices:m,color:[p.color.x,p.color.y,p.color.z],opacity:p.color.w<1?p.color.w:.1}),u.push(M)}var k=e.options.globalizeObjectIds?Y.globalizeObjectId(e.sceneModel.id,a):a;e.sceneModel.createEntity({id:k,meshIds:u,isObject:!0}),e.stats.numObjects++}}))}}])}();const Ok={ch:{NavCube:{front:"前",back:"后",top:"上",bottom:"下",left:"左",right:"右"},modelsExplorer:{title:"模型",loadAll:"加载全部",loadAllTip:"加载项目中的所有模型",unloadAll:"卸载全部",unloadAllTip:"卸载所有模型",add:"添加",addTip:"添加模型"},objectsExplorer:{title:"对象",showAll:"显示全部",showAllTip:"显示所有对象",hideAll:"隐藏全部",hideAllTip:"隐藏所有对象"},classesExplorer:{title:"类别",showAll:"显示全部",showAllTip:"显示所有类别",hideAll:"隐藏全部",hideAllTip:"隐藏所有类别"},storeysExplorer:{title:"楼层",showAll:"显示全部",showAllTip:"显示所有楼层",hideAll:"隐藏全部",hideAllTip:"隐藏所有楼层"},propertiesInspector:{title:"属性",noObjectSelectedWarning:"未选中任何对象。右键单击或长按对象,并选择“检查属性”以在此查看其属性。",noPropSetWarning:"未找到此对象的属性集。"},toolbar:{toggleExplorer:"结构树",toggleProperties:"属性",resetViewTip:"重置视图",toggle2d3dTip:"2D/3D",togglePerspectiveTip:"透视/正交",viewFitTip:"适合视图",firstPersonTip:"第一人称",hideObjectsTip:"隐藏对象",annotationObjectsTip:"标注对象",selectObjectsTip:"选择对象",queryObjectsTip:"查询对象",sliceObjectsTip:"切片对象",slicesMenuTip:"切片菜单",showSpacesTip:"显示空间",numSlicesTip:"现有切片数"}},en:{NavCube:{front:"Front",back:"Back",top:"Top",bottom:"Bottom",left:"Left",right:"Right"},modelsExplorer:{title:"Models",loadAll:"Load all",loadAllTip:"Load all models in this project",unloadAll:"Unload all",unloadAllTip:"Unload all models",add:"Add",addTip:"Add a Model"},objectsExplorer:{title:"Objects",showAll:"Show all",showAllTip:"Show all objects",hideAll:"Hide all",hideAllTip:"Hide all objects"},classesExplorer:{title:"Classes",showAll:"Show all",showAllTip:"Show all classes",hideAll:"Hide all",hideAllTip:"Hide all classes"},storeysExplorer:{title:"Storeys",showAll:"Show all",showAllTip:"Show all storeys",hideAll:"Hide all",hideAllTip:"Hide all storeys"},propertiesInspector:{title:"Properties",noObjectSelectedWarning:"No object inspected. Right-click or long-tab an object and select 'Inspect Properties' to view its properties here.",noPropSetWarning:"No property sets found for this object."},toolbar:{toggleExplorer:"Toggle explorer",toggleProperties:"Toggle properties",resetViewTip:"Reset view",toggle2d3dTip:"Toggle 2D/3D",togglePerspectiveTip:"Toggle Perspective/Ortho",viewFitTip:"View fit",firstPersonTip:"Toggle first person navigation mode",hideObjectsTip:"Hide objects",selectObjectsTip:"Select objects",queryObjectsTip:"Query objects",sliceObjectsTip:"Slice objects",slicesMenuTip:"Slices menu",showSpacesTip:"Show IFCSpaces",numSlicesTip:"Number of existing slices"}},de:{NavCube:{front:"Vorne",back:"Hinten",top:"Oben",bottom:"Unten",left:"Links",right:"Rechts"},modelsExplorer:{title:"Modelle",loadAll:"Alle laden",loadAllTip:"Alle Modelle in diesem Projekt laden",unloadAll:"Alle abwählen",unloadAllTip:"Alle Modelle abwählen",add:"Hinzufügen",addTip:"Modell hinzufügen"},objectsExplorer:{title:"Objekte",showAll:"Alle anzeigen",showAllTip:"Alle Objekte anzeigen",hideAll:"Alle ausblenden",hideAllTip:"Alle Objekte ausblenden"},classesExplorer:{title:"Typen",showAll:"Alle anzeigen",showAllTip:"Alle Typen anzeigen",hideAll:"Alle ausblenden",hideAllTip:"Alle Typen ausblenden"},storeysExplorer:{title:"Stockwerke",showAll:"Alle anzeigen",showAllTip:"Alle Stockwerke anzeigen",hideAll:"Alle ausblenden",hideAllTip:"Alle Stockwerke ausblenden"},propertiesInspector:{title:"Eigenschaften",noObjectSelectedWarning:"Kein Objekt inspiziert. Klicken Sie mit der rechten Maustaste auf ein Objekt oder führen Sie einen langen Tabulator aus und wählen Sie 'Eigenschaften prüfen', um die Eigenschaften des Objekts anzuzeigen.",noPropSetWarning:"Keine Eigenschaftssätze für dieses Objekt gefunden."},toolbar:{toggleExplorer:"Explorer ein- und ausblenden",toggleProperties:"Eigenschaften ein- und ausblenden",resetViewTip:"Ansicht zurücksetzen",toggle2d3dTip:"2D/3D umschalten",togglePerspectiveTip:"Orthogonale/Perspektivische Ansicht umschalten",viewFitTip:"In Ansicht einpassen",firstPersonTip:"Ich-Perspektive umschalten",hideObjectsTip:"Objekte ausblenden",selectObjectsTip:"Objekte auswählen",queryObjectsTip:"Abfrageobjekte",sliceObjectsTip:"Objekte schneiden",slicesMenuTip:"Menü Schnittebenen",showSpacesTip:"IFC-Räume anzeigen",numSlicesTip:"Anzahl der Schnittebenen"}},fr:{NavCube:{front:"Face",back:"Arrière",top:"Dessus",bottom:"Dessous",left:"Droite",right:"Gauche"},modelsExplorer:{title:"Modèles",loadAll:"Afficher tout",loadAllTip:"Afficher tous les modèles du projet",unloadAll:"Masquer tout",unloadAllTip:"Masquer tous les modèles",add:"Ajouter",addTip:"Ajouter un modèle"},objectsExplorer:{title:"Conteneurs",showAll:"Afficher tout",showAllTip:"Afficher tous les objets",hideAll:"Masquer tout",hideAllTip:"Masquer tous les objets"},classesExplorer:{title:"Classes IFC",showAll:"Afficher tout",showAllTip:"Affiche toutes les classes",hideAll:"Masquer tout",hideAllTip:"Masquer toutes les classes"},storeysExplorer:{title:"Étages",showAll:"Afficher tout",showAllTip:"Afficher tous les étages",hideAll:"Masquer tout",hideAllTip:"Masquer tous les étages"},propertiesInspector:{title:"Propriétés",noObjectSelectedWarning:"Aucun objet n'a été inspecté. Cliquez avec le bouton droit ou le bouton long sur un objet et sélectionnez 'Inspecter les propriétés' pour afficher ses propriétés ici.",noPropSetWarning:"Aucun ensemble de propriétés n'a été trouvé pour cet objet."},toolbar:{toggleExplorer:"Afficher la structure",toggleProperties:"Afficher les propriétés",resetViewTip:"Réinitialiser la vue",toggle2d3dTip:"Activer 2D/3D",togglePerspectiveTip:"Activer Perspective/Ortho",viewFitTip:"Recadrer la vue",firstPersonTip:"Mode 1ere personne",hideObjectsTip:"Masquer objets",selectObjectsTip:"Sélectionner",queryObjectsTip:"Informations objets",sliceObjectsTip:"Coupes",slicesMenuTip:"Outils de coupe",showSpacesTip:"Afficher les espaces IFC",numSlicesTip:"Nombre de coupes"}},pl:{NavCube:{front:"Przód",back:"Tył",top:"Góra",bottom:"Dół",left:"Lewy",right:"Prawy"},modelsExplorer:{title:"Model",loadAll:"Załaduj",loadAllTip:"Załaduj wszystkie modele",unloadAll:"Zamknij",unloadAllTip:"Zamnij wszystkie modele",add:"Dodaj",addTip:"Dodaj modele"},objectsExplorer:{title:"Obiekty",showAll:"Pokaż",showAllTip:"Pokaż wszystkie obiekty",hideAll:"Ukryj",hideAllTip:"Ukryj wszystkie obiekty"},classesExplorer:{title:"Typy",showAll:"Pokaż",showAllTip:"Pokaż wszystkie typy",hideAll:"Ukryj",hideAllTip:"Ukryj wszystkie typy"},storeysExplorer:{title:"Piętra",showAll:"Pokaż",showAllTip:"Pokaż wszystkie piętra",hideAll:"Ukryj",hideAllTip:"Ukryj wszystkie piętra"},propertiesInspector:{title:"Właściwości",noObjectSelectedWarning:"Nie sprawdzono żadnego obiektu. Kliknij prawym przyciskiem myszy lub kliknij długo na obiekcie i wybierz opcję 'Sprawdź właściwości', aby wyświetlić jego właściwości.",noPropSetWarning:"Nie znaleziono żadnych zestawów właściwości dla tego obiektu."},toolbar:{toggleExplorer:"Przełączanie eksploratora",toggleProperties:"Przełączanie właściwości",resetViewTip:"Resetuj widok",toggle2d3dTip:"Widok 2D/3D",togglePerspectiveTip:"Widok Ortograficzny/Perspektywiczny",viewFitTip:"Dopasowanie do widoku",firstPersonTip:"Widok perspektywy pierwszoosobowej",hideObjectsTip:"Ukryj obiekt",selectObjectsTip:"Zaznacz obiekt",queryObjectsTip:"Wywołaj obiekt",sliceObjectsTip:"Przekroje obiektów",slicesMenuTip:"Menu przekroi",showSpacesTip:"Pokaż przestrzenie IFC",numSlicesTip:"Liczba przekroi"}},ru:{NavCube:{front:"Фронт",back:"Тыл",top:"Верх",bottom:"Низ",left:"Лево",right:"Право"},modelsExplorer:{title:"Модели",loadAll:"Загрузить все",loadAllTip:"Загрузить все модели в этом проекте",unloadAll:"Выгрузить все",unloadAllTip:"Выгрузить все модели",add:"Добавить",addTip:"Добавить модель"},objectsExplorer:{title:"Объекты",showAll:"Показать все",showAllTip:"Показать все объекты",hideAll:"Скрыть все",hideAllTip:"Скрыть все объекты"},classesExplorer:{title:"Классы",showAll:"Показать все",showAllTip:"Показать все классы",hideAll:"Скрыть все",hideAllTip:"Скрыть все классы"},storeysExplorer:{title:"Этажи",showAll:"Показать все",showAllTip:"Показать все этажи",hideAll:"Скрыть все",hideAllTip:"Скрыть все этажи"},propertiesInspector:{title:"Свойства",noObjectSelectedWarning:"Ни один объект не осмотрен. Щелкните правой кнопкой мыши или длинной меткой на объекте и выберите 'Осмотреть свойства', чтобы просмотреть его свойства здесь.",noPropSetWarning:"Для этого объекта не найдено ни одного набора свойств."},toolbar:{toggleExplorer:"Переключить навигатор",toggleProperties:"Переключить Свойства",resetViewTip:"Сбросить вид",toggle2d3dTip:"Переключить 2D/3D",togglePerspectiveTip:"Переключить проекцию перспектива/орто",viewFitTip:"Показать всю модель",firstPersonTip:"Переключить режим навигации от первого лица",hideObjectsTip:"Скрыть объекты",selectObjectsTip:"Выбрать объекты",queryObjectsTip:"Выбрать объекты",sliceObjectsTip:"Рассечь объекты",slicesMenuTip:"Меню сечений",showSpacesTip:"Показать места IFC",numSlicesTip:"Количество существующих сечений"}}};class Lk{constructor(){this.events={}}on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}off(e,t){this.events[e]&&(this.events[e]=this.events[e].filter((e=>e!==t)))}emit(e,...t){this.events[e]&&this.events[e].forEach((e=>{e(...t)}))}destroy(){this.events={}}}class jk{constructor(e=[],t=0){this.items=[],this._lastUniqueId=0,this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(...e){let t;if(2===e.length){const i=e[0];if(t=e[1],this.items[i])throw new Error(`ID clash: '${i}'`);return this.items[i]=t,i}for(t=e[0]||{};;){this._lastUniqueId+=1;const e=this._lastUniqueId;if(!this.items[e])return this.items[e]=t,e}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}class Uk{constructor(e,t={},i=null,r=null){this._children=[],this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._enabled=null,this._active=null,this.destroyed=!1,this.bimViewer=e?e.bimViewer||e:this,this.server=e?e.server:i,this.viewer=e?e.viewer:r,e&&e._children.push(this)}fire(e,t,i=!1){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==i&&(this._events[e]=t||!0);const r=this._eventSubs[e];let n;r&&Object.keys(r).forEach((i=>{Object.prototype.hasOwnProperty.call(r,i)&&(n=r[i],this._eventCallDepth+=1,this._eventCallDepth<300?n.callback.call(n.scope,t):this.error(`fire: potential stack overflow from recursive event ${e} - dropping this event`),this._eventCallDepth-=1)}))}on(e,t,i=this){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new jk),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={});let r=this._eventSubs[e];r||(r={},this._eventSubs[e]=r);const n=this._subIdMap.addItem();r[n]={callback:t,scope:i||this},this._subIdEvents[n]=e;const s=this._events[e];return void 0!==s&&t.call(i||this,s),n}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const i=this._eventSubs[t];i&&delete i[e],this._subIdMap.removeItem(e)}}once(e,t,i=this){const r=this,n=this.on(e,(e=>{r.off(n),t.call(i||this,e)}),i)}log(e){e=`[LOG] ${e}`,console.log(e)}warn(e){e=`[LOG] ${e}`,window.console.warn(e)}error(e){e=`[LOG] ${e}`,window.console.error(e)}_mutexActivation(e){e.forEach(((t,i)=>{t.on("active",(t=>{t&&e.forEach(((e,t)=>{t!==i&&e.setActive(!1)}))}))}))}setEnabled(e){this._enabled!==e&&(this._enabled=e,this.fire("enabled",this._enabled))}getEnabled(){return this._enabled}setActive(e){this._active!==e&&(this._active=e,this.fire("active",this._active))}getActive(){return this._active}destroy(){this.destroyed||(this.fire("destroyed",this.destroyed=!0),this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._events=null,this._eventCallDepth=0,this._children.forEach((e=>{e.destroy()})),this._children=[])}}const Nk=Y.vec3();class Vk extends Uk{constructor(e,t={}){super(e,t),this._modelMementos={},this.bimViewer.modelsExplorer.on("modelLoaded",(e=>{this.reset()}))}reset(e){this._resetCamera(e)}_resetCamera(e){const{viewer:t}=this,{scene:i}=t;let r;r=this.bimViewer.multiModel?i.getAABB(i.visibleObjectIds):i.aabb;const n=Y.getAABB3Diag(r),s=Y.getAABB3Center(r,Nk),{camera:o}=i;o.perspective.fov;const a=Math.abs(n/Math.tan(45*Y.DEGTORAD)),l=Y.normalizeVec3(o.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),u=Y.normalizeVec3(o.yUp?[-.5,.7071,-.5]:[-1,1,1]);t.cameraControl.pivotPos=s,t.cameraControl.planView&&(t.cameraControl.planView=!1),t.cameraFlight.flyTo({look:s,eye:[s[0]-a*l[0],s[1]-a*l[1],s[2]-a*l[2]],up:u,orthoScale:1.3*n,projection:"perspective",duration:1},e)}}Y.vec3();class Qk extends Uk{constructor(e,t={}){super(e,t)}fit(e){const{viewer:t}=this,{scene:i}=t,{center:r}=i;let n;n=this.bimViewer.multiModel?i.getAABB(i.visibleObjectIds):i.aabb;const s=Y.getAABB3Diag(n);t.cameraControl.pivotPos=r,t.cameraControl.planView&&(t.cameraControl.planView=!1),t.cameraFlight.flyTo({aabb:n,orthoScale:1.3*s,duration:1},e)}set fov(e){this.viewer.scene.cameraFlight.fitFOV=e}get fov(){return this.viewer.scene.cameraFlight.fitFOV}set duration(e){this.viewer.scene.cameraFlight.duration=e}get duration(){return this.viewer.scene.cameraFlight.duration}}class Hk extends Uk{constructor(e,t){super(e,t);const{cameraControl:i}=this.viewer,{cameraControlNavModeMediator:r}=t;i.navMode="orbit",i.followPointer=!0,this.cameraControl=i,i.on("personModeSpeedUp",(t=>{e.eventTrigger.emit("personModeSpeedUp",t)})),i.on("personModeSpeedDown",(t=>{e.eventTrigger.emit("personModeSpeedDown",t)})),this.on("active",(e=>{r.setFirstPersonModeActive(e),e&&(i.followPointer=!0)})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)}))}setdirectionChangeCancel(){this.goLeft=!1,this.goRight=!1,this.goUp=!1,this.goDown=!1,this.goForward=!1,this.goBackward=!1}speedUp(){this.cameraControl.speedUp()}speedDown(){this.cameraControl.speedDown()}set moveRate(e){this.cameraControl.moveRate=e}get moveRate(){return this.cameraControl.moveRate}set goRight(e){this.cameraControl.goRight=e}set goLeft(e){this.cameraControl.goLeft=e}set goUp(e){this.cameraControl.goUp=e}set goDown(e){this.cameraControl.goDown=e}set goForward(e){this.cameraControl.goForward=e}set goBackward(e){this.cameraControl.goBackward=e}smallCanvas(){const e=new W_({spinnerElementId:"manyou_spinner",canvasId:"canvas_manyou",transparent:!0,resolutionScale:window.devicePixelRatio});e.camera.eye=[-3.933,2.855,27.018],e.camera.look=[4.4,3.724,8.899],e.camera.up=[-.018,.999,.039]}}class Gk extends Uk{constructor(e,t){super(e,t),this.on("active",(e=>{e?(this.viewer.cameraControl.doublePickFlyTo=!1,this._onPick=this.viewer.cameraControl.on("picked",(e=>{e.entity&&(e.entity.visible=!1)}))):(this.viewer.cameraControl.doublePickFlyTo=!1,void 0!==this._onPick&&(this.viewer.cameraControl.off(this._onPick),this._onPick=void 0))})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)}))}}class zk extends Uk{constructor(e,t){super(e,t),this._active=!0,e.eventTrigger.on("metaLoaded",(t=>{const i=this.spaceObjects;if(0==i.length)return;this.viewer.scene.setObjectsCulled(i,!0),this.setIFCSpaceOpacity(),this.viewer.scene.setObjectsHighlighted(i,!0);const r=this.viewer.scene.models[t.metaModel.id],n=r.exceptionIds.concat(i);r.exceptionIds=n,e.resetView()}))}setActive(e,t){this._active!==e&&(this._active=e,e?(this._enterShowSpacesMode(),this.fire("active",this._active)):(this._exitShowSpacesMode(),this.fire("active",this._active)),t&&t())}setIFCSpaceOpacity(){0!=this.spaceObjects.length&&this.viewer.scene.withObjects(this.spaceObjects,(e=>{-1!=e.origin_opacity&&(e.opacity=e.opacity<.5?e.opacity:.1)}))}_enterShowSpacesMode(){const{viewer:e}=this,{scene:t}=e,{metaScene:i}=e,r=i.getObjectIDsByType("IfcSpace");t.setObjectsCulled(r,!1)}_exitShowSpacesMode(){const{viewer:e}=this,{scene:t}=e,{metaScene:i}=e,r=i.getObjectIDsByType("IfcSpace");t.setObjectsCulled(r,!0)}get spaceObjects(){return this.viewer.metaScene.getObjectIDsByType("IfcSpace")}}class Wk extends Uk{constructor(e,t){super(e,t),this.eventTrigger=e.eventTrigger,this._sectionPlanesPlugin=new _k(this.viewer,{}),this._sectionPlanesPlugin.sectionConfigs={planeSize:1.4,controlSize:.2,planeOpacity:.2,controlFillColor:[.1,.4,.99]},this._sectionPlanesPlugin.setOverviewVisible(!1),this._sectionPlanesPlugin.on("touchPlaneStart",(()=>{this.eventTrigger.emit("touchPlaneStart")})),this._sectionPlanesPlugin.on("touchPlaneEnd",(()=>{this.eventTrigger.emit("touchPlaneEnd")})),this._sectionPlanesPlugin.on("clickPlaneStart",(()=>{this.eventTrigger.emit("clickPlaneStart")})),this._sectionPlanesPlugin.on("clickPlaneEnd",(()=>{this.eventTrigger.emit("clickPlaneEnd")})),this._isTouch=!1,this.on("active",(e=>{e?this.showControl():this.hideControl()})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this._initSectionMode()}_initSectionMode(){this.viewer.scene.input.on("mouseclicked",(e=>{if(!this.getActive())return;const t=this.viewer.scene.pick({canvasPos:e,pickSurface:!0});if(t){const e=this._sectionPlanesPlugin.createSectionPlane({pos:t.worldPos,dir:Y.mulVec3Scalar(t.worldNormal,-1)});this._sectionPlanesPlugin.showControl(e.id),this.eventTrigger.emit("createSection",{position:t.worldPos,direction:Y.mulVec3Scalar(t.worldNormal,-1),id:e.id})}}))}set isTouch(e){this._sectionPlanesPlugin.isTouch=e,this._isTouch=e}set sectionWay(e){this._sectionPlanesPlugin.sectionWay=e}set sectionDirection(e){this._sectionPlanesPlugin.sectionDirection=e}setControlPos(e){this._sectionPlanesPlugin.setControlPos(e)}getControlPos(){return this._sectionPlanesPlugin.getControlPos()}set sectionConfigs(e){this._sectionPlanesPlugin.sectionConfigs=e}creatSection(e,t){const i=this._sectionPlanesPlugin.createSectionPlane({pos:e,dir:t});this._sectionPlanesPlugin.showControl(i.id)}getSectionPlanes(){return this._sectionPlanesPlugin.sectionPlanes}getSectionPlane(e){return this.getSectionPlanes()[e]}setSectionEnable(e){this.getSectionPlane(e).active=!0}setSectionDisable(e){this.getSectionPlane(e).active=!1}setSectionPos(e,t){this.getSectionPlane(e).pos=t}flipSection(e){this.getSectionPlane(e).flipDir()}getNumSections(){return Object.keys(this.viewer.scene.sectionPlanes).length}clear(){this._sectionPlanesPlugin.clear()}flipSections(){this._sectionPlanesPlugin.flipSectionPlanes()}getShownControl(){this._sectionPlanesPlugin.getShownControl()}enableSections(){const{sectionPlanes:e}=this.viewer.scene;for(const t in e){e[t].active=!0}}disableSections(){const{sectionPlanes:e}=this.viewer.scene;for(const t in e){e[t].active=!1,this.hideControl()}}hideControl(){this._sectionPlanesPlugin.hideControl()}showControl(){const e=this.getSectionPlanes();for(const t in e)e[t].control.setVisible(!0)}showSectionPlane(e){this._sectionPlanesPlugin.showControl(e)}destroy(){this._sectionPlanesPlugin.destroy(),super.destroy()}destroySectionPlane(e){this._sectionPlanesPlugin.destroySectionPlane(e)}}class Kk extends Uk{constructor(e,t){if(super(e,t),!t.navCubeCanvasElement)throw new Error("Missing config: NavCubeMode navCubeCanvasElement");const{navCubeCanvasElement:i}=t,{viewerElement:r}=t;this._navCubeCanvasElement=i,this._navCubeCanvasElement.oncontextmenu=e=>{e.preventDefault()},this._navCube=new ek(this.viewer,{canvasElement:i,viewerElement:r,fitVisible:!1,color:"#CFCFCF",shadowVisible:!1}),this._navCube.setVisible(this._active),this._visible=!0,this.on("active",(e=>{this._navCube.setVisible(e)}))}set visible(e){this._visible=e,this._navCubeCanvasElement.style.visibility=e?"visible":"hidden"}get visible(){return this._visible}get fitVisible(){return this._navCube.getFitVisible()}set fitVisible(e){this._navCube.setFitVisible(e)}flyByClick(e){this._navCube.flyByClick(e)}destroy(){this._navCube.destroy(),super.destroy()}}let Xk;class qk{constructor(e,t){this._projectId="",this._modelId="",this._server=e,Xk=t.tempVec3a}setProjectId(e){this._projectId=e}setModelId(e){this._modelId=e}getManifest(e,t,i){this._server.getSplitModelManifest(this._projectId,this._modelId,e,t,i)}getMetaModel(e,t,i){this._server.getSplitModelMetadata(this._projectId,this._modelId,e,t,i)}getXTC(e,t,i){this._server.getSplitModelGeometry(this._projectId,this._modelId,e,t,i)}}class Yk extends Uk{constructor(e,t){super(e,t),this._modelFromOutSide=t.modelFromOutSide,this._projectId=t.projectId,this._modelType=t.modelType,this._modelSrc=t.modelSrc,this._eventTrigger=e.eventTrigger,this._dataSource=new qk(this.server,{tempVec3a:t.tempVec3a}),this._modelConfig=t.modelConfig,this._modelsInfo={},this._numModels=0,this._numModelsLoaded=0}getModelIds(){return Object.keys(this._modelsInfo)}getModelInfo(e){return this._modelsInfo[e]}loadModel(e,t,i=()=>{},r=()=>{},n){if(this._modelType=n.modelType,"ifc"==this._modelType){const i=void 0!==n.IfcAPI&&null!==n.IfcAPI,r=void 0!==n.WebIFC&&null!==n.WebIFC;i&&r&&this.log("载入外部传入webifc..."),this._ifcLoader=new Rk(this.viewer,i&&r?{WebIFC:n.WebIFC,IfcAPI:n.IfcAPI}:{}),this._modelsInfo[e]={id:e,ifc:t,metaBuffer:null,edges:!0,loadMetadata:!1,saoEnabled:!0,pbrEnabled:!0,dtxEnabled:!0}}else"xtc"==this._modelType?(this._xtcLoader=new Ik(this.viewer,{dataSource:this._dataSource}),this._xtcLoader.on("metaLoaded",(e=>{this._eventTrigger.emit("metaLoaded",e)})),this._xtcLoader.on("metaLoading",(e=>{this._eventTrigger.emit("metaLoading",e)})),this._modelsInfo[e]={id:e,xtc:t,metaBuffer:null,edges:!0,loadMetadata:!1,saoEnabled:!0,pbrEnabled:!0,dtxEnabled:!0}):"glb"==this._modelType&&(this._glbLoader=new YM(this.viewer),this._modelsInfo[e]={id:e,gltf:t,metaBuffer:null,edges:!0,loadMetadata:!1,saoEnabled:!0,pbrEnabled:!0,dtxEnabled:!0});this._loadGeometry(e,i,r)}unloadModel(e){const t=this.viewer.scene.models[e];t?(t.destroy(),this.fire("modelUnloaded",e)):this.error("Model not loaded: "+e)}loadMetadata(e,t,i,r){this._xtcLoader&&(this._modelsInfo[e]&&(this._modelsInfo[e].metaBuffer=t),this._xtcLoader.loadMetadata(this.viewer.metaScene.metaModels[e],t,i,r))}_loadGeometry(e,t,i){const r=this._modelsInfo[e],n=()=>{this._jumpToInitialCamera(),this.fire("modelLoaded",e),t&&t()},s=e=>{this.error(e),i&&i(e)};if("ifc"==this._modelType&&this._ifcLoader)if(this._modelFromOutSide){this.log("正在载入ifc模型...");const e=this._ifcLoader.load(r);e.on("loaded",n),e.on("error",s)}else{this.log("正在载入引擎从本地获取的ifc模型...");const t=this._ifcLoader.load({id:e,src:this._modelSrc,edges:r.edges,loadMetadata:!1,pbrEnabled:r.pbrEnabled,dtxEnabled:r.dtxEnabled});t.on("loaded",n),t.on("error",s)}else if("xtc"===this._modelType&&this._xtcLoader){if(this._modelFromOutSide){this.log("正在载入xtc模型...");const e=this._xtcLoader.load(r);e.on("loaded",n),e.on("error",s)}}else if("glb"===this._modelType&&this._glbLoader&&this._modelFromOutSide){this.log("正在载入glb模型...");const e=this._glbLoader.load(r);e.on("loaded",n),e.on("error",s)}}_jumpToInitialCamera(){const{viewer:e}=this,{scene:t}=e,i=t.getAABB(t.visibleObjectIds),r=Y.getAABB3Diag(i),n=Y.getAABB3Center(i,Xk),{camera:s}=t,o=Math.abs(r/Math.tan(45*Y.DEGTORAD)),a=Y.normalizeVec3(s.yUp?[-.5,-.7071,-.5]:[-1,1,-1]),l=Y.normalizeVec3(s.yUp?[-.5,.7071,-.5]:[-1,1,1]);e.cameraControl.pivotPos=n,e.cameraControl.planView&&(e.cameraControl.planView=!1),e.cameraFlight.jumpTo({look:n,eye:[n[0]-o*a[0],n[1]-o*a[1],n[2]-o*a[2]],up:l,orthoScale:1.1*r})}destroy(){super.destroy(),this._xtcLoader&&this._xtcLoader.destroy(),this._ifcLoader&&this._ifcLoader.destroy(),this._glbLoader&&this._glbLoader.destroy()}}class Jk extends Uk{constructor(e,t={}){super(e);const{modelType:i}=t;this.eventTrigger=e.eventTrigger,this._treeView=new wk(this.viewer,{hierarchy:"containment",autoAddModels:!1,pruneEmptyNodes:!0,autoExpandDepth:1}),this._treeView.on("rootNodes_Created",(e=>{this._rootNode=e,this.eventTrigger.emit("object_rootNodes",e)})),this._treeView.on("nodeNodes_Created",(e=>{this._nodeList=e,this.eventTrigger.emit("object_nodeNodes",e)})),this._treeView.on("objectNodes_Created",(e=>{this._objectList=e,this.eventTrigger.emit("object_objectNodes",e)})),this._treeView.on("checkBoxChanged",(e=>{this.eventTrigger.emit("object_checkBoxChanged",e)})),"ifc"===i?this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._treeView.addModel(e,{rootName:e})})):this._onMetaDataLoaded=this.eventTrigger.on("metaLoaded",(e=>{"success"===e.result&&(this._treeView.addModel(e.metaModel.id,{rootName:e.metaModel.id}),this.eventTrigger.emit("treeReady"))})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)}))}get rootNode(){return this._rootNode}get nodesList(){return this._nodeList}get objectList(){return this._objectList}get treeView(){return this._treeView}getNodeIdByObjectId(e){if(null==this._objectList[e])return null;this._objectList[e].nodeId}getNodeById(e){return this._treeView.getNodeById(e)}getChildrenById(e){this._treeView.getChildrenById(e)}setEnabled(e){}destroy(){super.destroy(),this._treeView.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),this.viewer.scene.off(this._onMetaDataLoaded)}}class Zk extends Uk{constructor(e,t={}){super(e),this.eventTrigger=e.eventTrigger;const{modelType:i}=t;this._treeView=new wk(this.viewer,{hierarchy:"types",autoAddModels:!1,pruneEmptyNodes:!0,autoExpandDepth:1}),this._treeView.on("rootNodes_Created",(e=>{this._rootNode=e,this.eventTrigger.emit("classes_rootNodes",e)})),this._treeView.on("nodeNodes_Created",(e=>{this._nodeList=e,this.eventTrigger.emit("classes_nodeNodes",e)})),this._treeView.on("objectNodes_Created",(e=>{this._objectList=e,this.eventTrigger.emit("classes_objectNodes",e)})),this._treeView.on("checkBoxChanged",(e=>{this.eventTrigger.emit("classes_checkBoxChanged",e)})),"ifc"===i?this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._treeView.addModel(e,{rootName:e})})):this._onMetaDataLoaded=this.eventTrigger.on("metaLoaded",(e=>{"success"===e.result&&(this._treeView.addModel(e.metaModel.id,{rootName:e.metaModel.id}),this.eventTrigger.emit("treeReady"))})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)}))}get rootNode(){return this._rootNode}get nodesList(){return this._nodeList}get objectList(){return this._objectList}getNodeIdByObjectId(e){return null!=this._objectList[e]?this._objectList[e].nodeId:null}getNodeById(e){return this._treeView.getNodeById(e)}getChildrenById(e){this._treeView.getChildrenById(e)}checkboxChangeHandler(e,t){const i=this._nodeList[e],r=t,{objects:n}=this.viewer.scene;let s=0;this._treeView.withNodeTree(i,(e=>{const{objectId:t}=e,i=n[t],o=0===e.children.length;e.numVisibleEntities=r?e.numEntities:0,o&&r!==e.checked&&s++,e.checked=r,i&&(i.visible=r)}));let{parent:o}=i;for(;o;)o.checked=r,r?o.numVisibleEntities+=s:o.numVisibleEntities-=s,o=o.parent}nodeTitleClicked(e){const{scene:t}=this.viewer,i=this._nodeList[e],r=[];this._treeView.withNodeTree(i,(e=>{e.objectId&&r.push(e.objectId)}));const{checked:n}=i;n?(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!1),t.setObjectsPickable(r,!0)):(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!0),t.setObjectsPickable(r,!0))}setEnabled(e){}expandTreeViewToDepth(e){}showNodeInTreeView(e){this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}destroy(){super.destroy(),this._treeView.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),this.viewer.scene.off(this._onMetaDataLoaded)}get treeView(){return this._treeView}}const $k=Y.vec3();class eE extends Uk{constructor(e,t={}){super(e);const{modelType:i}=t;this.eventTrigger=e.eventTrigger,this._treeView=new wk(this.viewer,{hierarchy:"storeys",autoAddModels:!1,autoExpandDepth:1}),this._treeView.on("rootNodes_Created",(e=>{this._rootNode=e,this.eventTrigger.emit("storeys_rootNodes",e)})),this._treeView.on("nodeNodes_Created",(e=>{this._nodeList=e,this.eventTrigger.emit("storeys_nodeNodes",e)})),this._treeView.on("objectNodes_Created",(e=>{this._objectList=e,this.eventTrigger.emit("storeys_objectNodes",e)})),this._treeView.on("checkBoxChanged",(e=>{this.eventTrigger.emit("storeys_checkBoxChanged",e)})),"ifc"===i?this._onModelLoaded=this.viewer.scene.on("modelLoaded",(e=>{this._treeView.addModel(e,{rootName:e})})):this._onMetaDataLoaded=this.eventTrigger.on("metaLoaded",(e=>{"success"===e.result&&(this._treeView.addModel(e.metaModel.id,{rootName:e.metaModel.id}),this.eventTrigger.emit("treeReady"))})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this.viewer.metaScene.metaModels[e]&&this._treeView.removeModel(e)}))}get rootNode(){return this._rootNode}get nodesList(){return this._nodeList}get objectList(){return this._objectList}getNodeIdByObjectId(e){if(null==this._objectList[e])return null;this._objectList[e].nodeId}getNodeById(e){return this._treeView.getNodeById(e)}getChildrenById(e){this._treeView.getChildrenById(e)}checkboxChangeHandler(e,t){const i=this._nodeList[e],r=t,{objects:n}=this.viewer.scene;let s=0;this._treeView.withNodeTree(i,(e=>{const{objectId:t}=e,i=n[t],o=0===e.children.length;e.numVisibleEntities=r?e.numEntities:0,o&&r!==e.checked&&s++,e.checked=r,i&&(i.visible=r)}));let{parent:o}=i;for(;o;)o.checked=r,r?o.numVisibleEntities+=s:o.numVisibleEntities-=s,o=o.parent}nodeTitleClicked(e){const{scene:t}=this.viewer,i=this._nodeList[e],r=[];this._treeView.withNodeTree(i,(e=>{e.objectId&&r.push(e.objectId)}));const{checked:n}=i;n?(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!1),t.setObjectsPickable(r,!0)):(t.setObjectsXRayed(r,!1),t.setObjectsVisible(r,!0),t.setObjectsPickable(r,!0))}setEnabled(e){}_selectObjects(e,t){const{scene:i}=this.viewer,r=i.getAABB(e);this.viewer.cameraControl.pivotPos=Y.getAABB3Center(r,$k),t?(i.setObjectsXRayed(i.objectIds,!0),i.setObjectsVisible(i.objectIds,!0),i.setObjectsPickable(i.objectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1),i.setObjectsXRayed(e,!1),i.setObjectsVisible(e,!0),i.setObjectsPickable(e,!0),this.viewer.cameraFlight.flyTo({aabb:r},(()=>{setTimeout((()=>{i.setObjectsVisible(i.xrayedObjectIds,!1),i.setObjectsXRayed(i.xrayedObjectIds,!1)}),500),t()}))):(i.setObjectsVisible(i.objectIds,!1),i.setObjectsPickable(i.xrayedObjectIds,!0),i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1),i.setObjectsVisible(e,!0),this.viewer.cameraFlight.jumpTo({aabb:r}))}destroy(){super.destroy(),this._treeView.destroy(),this.viewer.scene.off(this._onModelLoaded),this.viewer.scene.off(this._onModelUnloaded),this.viewer.scene.off(this._onMetaDataLoaded)}expandTreeViewToDepth(e){}showNodeInTreeView(e){this._treeView.showNode(e)}unShowNodeInTreeView(){this._treeView.unShowNode()}selectStorey(e,t){const{metaScene:i}=this.viewer,r=i.metaObjects[e];if(!r)return void this.error(`selectStorey() - object is not found: ${e}`);if("IfcBuildingStorey"!==r.type)return void this.error(`selectStorey() - object is not found: ${e}`);const n=r.getObjectIDsInSubtree();this._selectObjects(n,t)}}const tE=Y.vec3();class iE extends Uk{constructor(e,t){super(e,t),this._saveOrthoActive=null,this._cameraControlNavModeMediator=t.cameraControlNavModeMediator,this._active=!1}setEnabled(e){super.setEnabled(e),this._saveOrthoActive=this.bimViewer.orthoMode.getActive()}setActive(e,t=()=>{}){this._active!==e?(this._active=e,e?this._enterThreeDMode((()=>{this.fire("active",this._active),t&&t()})):this._exitThreeDMode((()=>{this.fire("active",this._active),t&&t()}))):t&&t()}_enterThreeDMode(e=()=>{}){const{viewer:t}=this,{scene:i}=t,{aabb:r}=i,n=Y.getAABB3Diag(r),s=Y.getAABB3Center(r,tE),o=Math.abs(n/Math.tan(32.5)),{camera:a}=i,l=a.yUp?[-1,-1,-1]:[1,1,1],u=a.yUp?[-1,1,-1]:[-1,1,1];t.cameraControl.pivotPos=s,this.bimViewer.navCubeMode.setActive(!0),this.bimViewer.firstPersonMode.setEnabled(!0),this._cameraControlNavModeMediator.setThreeDModeActive(!0),this.bimViewer.sectionTool.setEnabled(!0),this.bimViewer.orthoMode.setEnabled(!0),e?t.cameraFlight.flyTo({look:s,eye:[s[0]-o*l[0],s[1]-o*l[1],s[2]-o*l[2]],up:u,orthoScale:1.3*n,duration:1,projection:this._saveOrthoActive?"ortho":"perspective"},(()=>{e()})):t.cameraFlight.jumpTo({look:s,eye:[s[0]-o*l[0],s[1]-o*l[1],s[2]-o*l[2]],up:u,orthoScale:1.3*n,projection:this._saveOrthoActive?"ortho":"perspective"})}_exitThreeDMode(e=()=>{}){const{viewer:t}=this,{scene:i}=t,{camera:r}=i,{aabb:n}=i,s=Y.getAABB3Center(n),o=Y.getAABB3Diag(n),a=Math.abs(o/Math.tan(45*Y.DEGTORAD)),l=1.3*o,u=tE;u[0]=s[0]+r.worldUp[0]*a,u[1]=s[1]+r.worldUp[1]*a,u[2]=s[2]+r.worldUp[2]*a;const c=Y.mulVec3Scalar(r.worldForward,-1,[]);this.bimViewer.sectionTool.setActive(!1),this.bimViewer.firstPersonMode.setEnabled(!1),this._saveOrthoActive=this.bimViewer.orthoMode.getActive(),this.bimViewer.orthoMode.setEnabled(!1),this._cameraControlNavModeMediator.setThreeDModeActive(!1),e?t.cameraFlight.flyTo({eye:u,look:s,up:c,orthoScale:l,projection:"ortho"},(()=>{this.bimViewer.navCubeMode.setActive(!1)})):(t.cameraFlight.jumpTo({eye:u,look:s,up:c,orthoScale:l,projection:"ortho"}),this.bimViewer.navCubeMode.setActive(!1))}}class rE extends Uk{constructor(e,t){super(e,t),this.viewer.camera.on("projection",(()=>{const e="ortho"===this.viewer.camera.projection;this._active=e})),this._active=!1}setActive(e,t=()=>{}){this._active!==e?(this._active=e,e?t?this._enterOrthoMode((()=>{this.fire("active",this._active),t()})):(this._enterOrthoMode(),this.fire("active",this._active)):t?this._exitOrthoMode((()=>{this.fire("active",this._active),t()})):(this._exitOrthoMode(),this.fire("active",this._active))):t&&t()}_enterOrthoMode(e=()=>{}){e?this.viewer.cameraFlight.flyTo({projection:"ortho",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"ortho"})}_exitOrthoMode(e=()=>{}){e?this.viewer.cameraFlight.flyTo({projection:"perspective",duration:.5},e):this.viewer.cameraFlight.jumpTo({projection:"perspective"})}}class nE extends Uk{constructor(e,t){if(super(e,t),this._AnnotationList={},this._visible=!0,this._currentType="image",this._modelId=t.modelId,this.eventTrigger=e.eventTrigger,this.imageSrc=new Map,document.getElementById("myAnnotationDiv"))this.annotationWrapper=document.getElementById("myAnnotationDiv");else{this.annotationWrapper=document.createElement("div"),this.annotationWrapper.id="myAnnotationDiv";const{canvas:t}=e.viewer.scene.canvas;t.parentNode.insertBefore(this.annotationWrapper,t)}let i;this.annotationsPlugin=new tt(this.viewer,{markerHTML:"<div class='annotation-marker annotation-marker-{{iconType}} {{iconType}}' id='{{id}}' entityid='{{entityid}}' style='position:absolute;'><img src='{{iconPath}}'></div>",container:this.annotationWrapper,values:{id:"",entityid:"",iconPath:"",iconType:""}}),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this.on("active",(e=>{})),this.annotationsPlugin.on("markerClicked",(e=>{this.eventTrigger.emit("markerClicked",e),i=e})),this.annotationsPlugin.on("markerDoubleClicked",(e=>{this.eventTrigger.emit("markerDoubleClicked",e)}));const r=e=>{this._active&&("Delete"!==e.key&&8!==e.keyCode||this.eventTrigger.emit("requestDeleteMarker",i.id))};document.addEventListener("keydown",r.bind(this)),this.on("destroy",(()=>{document.removeEventListener("keydown",r.bind(this))}))}setAllVisible(e=!this._visible){this._visible=e,this.annotationsPlugin.setAllVisible(e)}clickToCreateAnno(e){if(!this.getActive())return;if(!this.getEnabled())return;const t=this.getCanvasPos(e),i=this.viewer.scene.pick({canvasPos:t,pickSurface:!0});if(i){const e=i.entity.id,t=`${e}_${this._currentType}_${this.getTime()}`;this.annotationsPlugin.createAnnotation({id:t,pickResult:i,occludable:!0,markerShown:!0,labelShown:!1,values:{id:t,entityid:e,iconPath:this.getTypeImage(this._currentType),iconType:this._currentType}}),this.currentAnnotation={id:"",modelId:this._modelId,entityId:e,type:this._currentType,content:{worldPos:[i.worldPos[0],i.worldPos[1],i.worldPos[2]],fileContent:[],text:""}},this.eventTrigger.emit("createAnnotation",{type:this._currentType,currentAnnotation:this.currentAnnotation})}else console.log("没有获取到合法的坐标,传入的内容:",e)}getTime(){const e=new Date;return e.getFullYear()+(e.getMonth()+1<10?`0${e.getMonth()+1}`:e.getMonth()+1)+(e.getDate()<10?`0${e.getDate()}`:e.getDate())+(e.getHours()<10?`0${e.getHours()}`:e.getHours())+(e.getMinutes()<10?`0${e.getMinutes()}`:e.getMinutes())+(e.getSeconds()<10?`0${e.getSeconds()}`:e.getSeconds())}getCanvasPos(e){const t=[];if(e)if("TouchEvent"in window&&e instanceof TouchEvent){if(!e.touches||0===e.touches.length)return;const i=e.touches[0];let r=e.target,n=0,s=0;for(;r.offsetParent;)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;t[0]=i.pageX-n,t[1]=i.pageY-s}else{let i=this.viewer.scene.canvas.canvas,r=0,n=0;for(;i.offsetParent;)r+=i.offsetLeft,n+=i.offsetTop,i=i.offsetParent;t[0]=e.pageX-r,t[1]=e.pageY-n}else e=window.event,t[0]=e.x,t[1]=e.y;return t}setCurrentType(e){this._currentType=e}showAnnotationList(){this.clear();const e=this._AnnotationList;e.length>0&&e.forEach((e=>{this.addAnnotation(e.id.toString(),e.content.worldPos,e.type)}))}addAnnotation(e,t,i){this.annotationsPlugin.createAnnotation({id:e,worldPos:t,occludable:!0,markerShown:this._visible,labelShown:!1,values:{id:e,entityid:e,iconPath:this.getTypeImage(i),iconType:i}})}clear(){this.annotationsPlugin.clear()}get AnnotationList(){return this._AnnotationList}set AnnotationList(e){this._AnnotationList=e}getTypeImage(e){if(this.imageSrc.size<1){let t=document.getElementById(`annotation_tool_btn_img_${e}`);return t&&t instanceof HTMLImageElement&&t.src?t.src:null}return this.imageSrc.get(e)}setTypeImage(e){for(const t in e)this.imageSrc.set(t,e[t])}destroyAnnotationById(e){this.annotationsPlugin.destroyAnnotation(e),this._AnnotationList[e]&&delete this._AnnotationList[e]}getAnnotationById(e){return this.annotationsPlugin.annotations[e]}get annotationPluginList(){return this.annotationsPlugin.annotations}destroy(){var e;this.fire("destroy",!0),this.clear(),this.annotationsPlugin.destroy(),this.annotationWrapper&&(null===(e=this.annotationWrapper.parentNode)||void 0===e||e.removeChild(this.annotationWrapper))}}class sE extends Uk{constructor(e,t){super(e,t),this._offsetX=0,this._offsetY=0,this._isTouch=!1,this._approximate=!0,this._precision=2,this.eventTrigger=e.eventTrigger,this.angleMeasureContainer=document.createElement("div"),this.angleMeasureContainer.id="myAngleMeasuresDiv";const{canvas:i}=e.viewer.scene.canvas;i.parentNode.insertBefore(this.angleMeasureContainer,i),this._angleMeasurementsPlugin=new Ke(this.viewer,{container:this.angleMeasureContainer,defaultColor:"#0065FC"}),this._angleMeasurementsMouseControl=new We(this._angleMeasurementsPlugin,{snapping:!0,offsetX:t.offsetX,offsetY:t.offsetY}),this._angleMeasurementsTouchControl=new qe(this._angleMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY}),this._angleMeasurementsSimulateMouseControl=new Ye(this._angleMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY,snapping:!0}),this._angleMeasurementsMouseControl.snapping=!0,this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this._initSettings(),this._initializeMeasure()}setActive(e){this._active=e,e?this.chosedTarget&&this.chosedTarget.setHighlighted(!0):(this.refreshMouseState(),this.setAllHightLighted(!1)),this._isTouch?(this._angleMeasurementsTouchControl.active=e,this._angleMeasurementsSimulateMouseControl.active=e):this._angleMeasurementsMouseControl.active=e}getActive(){return this._active}_initSettings(){this._angleMeasurementsMouseControl.activate(),this._angleMeasurementsMouseControl.active=!1,this._angleMeasurementsTouchControl.activate(),this._angleMeasurementsTouchControl.active=!1,this._angleMeasurementsSimulateMouseControl.activate(),this._angleMeasurementsSimulateMouseControl.active=!1}_initializeMeasure(){this._angleMeasurementsPlugin.on("measurementCreated",(e=>{this.eventTrigger.emit("newAngleMeasure",{id:e.id}),this.newMeasure=e,this.chosedTarget=null})),this._angleMeasurementsPlugin.on("measurementEnd",(e=>{0!==this.getMeasureResultByID(e.id)?(this.eventTrigger.emit("createAngleMeasure",{id:e.id,result:this.getMeasureResultByID(e.id)}),this.setAllHightLighted(!1),this.chosedTarget=e,this.chosedTarget.setHighlighted(!0),this.newMeasure=null):this.destroyMeasurementById(e.id)})),this._angleMeasurementsPlugin.on("mouseOver",(e=>{e.measurement.setHighlighted(!0)})),this._angleMeasurementsPlugin.on("mouseLeave",(e=>{e.angleMeasurement==this.chosedTarget&&this._active||e.measurement.setHighlighted(!1)})),this._angleMeasurementsPlugin.on("clickMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickAngleMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._angleMeasurementsPlugin.on("touchMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickAngleMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._angleMeasurementsPlugin.on("measurementDestroyed",(e=>{this.eventTrigger.emit("AngleMeasureDestroyed",{id:e.id})}));const e=()=>{this._active&&this.chosedTarget&&this.chosedTarget.setHighlighted(!0)},t=e=>{if(this._active&&("Delete"===e.key||8===e.keyCode)){if(!this.chosedTarget)return;this.destroyMeasurementById(this.chosedTarget.id),this._angleMeasurementsPlugin.fire("measureDelete",null),0==this.getNumMeasurements()&&(this.chosedTarget=null)}};document.addEventListener("mousemove",e.bind(this)),document.addEventListener("keydown",t.bind(this)),this.on("destroy",(()=>{document.removeEventListener("mousemove",e.bind(this)),document.removeEventListener("keydown",t.bind(this))}))}set isTouch(e){this._isTouch=e,e||this._angleMeasurementsMouseControl.deactivate()}get isTouch(){return this._isTouch}set precision(e){this._precision=e,this._angleMeasurementsPlugin.precision=e}get precision(){return this._precision}set offsetX(e){this._offsetX=e,this._isTouch?(this._angleMeasurementsTouchControl.offsetX=e,this._angleMeasurementsSimulateMouseControl.offsetX=e):this._angleMeasurementsMouseControl.offsetX=e}get offsetX(){return this._offsetX}set offsetY(e){this._offsetY=e,this._isTouch?(this._angleMeasurementsTouchControl.offsetY=e,this._angleMeasurementsSimulateMouseControl.offsetY=e):this._angleMeasurementsMouseControl.offsetY=e}get offsetY(){return this._offsetY}refreshMouseState(){this.newMeasure&&(this.destroyMeasurementById(this.newMeasure.id),this.isTouch?(this._angleMeasurementsTouchControl.touchState=0,this._angleMeasurementsSimulateMouseControl.mouseState=0):this._angleMeasurementsMouseControl.mouseState=0,this.setAllHightLighted(!1),this.newMeasure=null)}setAllVisible(e){this._angleMeasurementsPlugin.setMeasurementsShown(e)}setSnappingEnabled(e){return this._angleMeasurementsMouseControl.snapping=e}getNumMeasurements(){return Object.keys(this._angleMeasurementsPlugin.measurements).length}getMeasurementsList(){return this._angleMeasurementsPlugin.measurements}getMeasurementById(e){return this.getMeasurementsList()[e]}getMeasureResultByID(e){const t=this.getMeasurementById(e);return t?t.angle:0}setMeasureColorByID(e,t){this.getMeasurementById(e).color=t}setMeasureClickbleById(e,t){this.getMeasurementById(e).clickable=t}setMeasureHightlighted(e,t){this.getMeasurementById(e).setHighlighted(t)}setAllHightLighted(e){const t=this.getMeasurementsList();for(const i in t)t[i].setHighlighted(e)}setVisibleById(e,t){this.getMeasurementById(e).visible=t}setAngleLabelVisible(e,t){this.getMeasurementById(e).angleVisible=t}destroyMeasurementById(e){this._angleMeasurementsPlugin.destroyMeasurement(e)}onSimulateMousedown(e){this._angleMeasurementsSimulateMouseControl.onMousedown(e)}onSimulateMousemove(e){this._angleMeasurementsSimulateMouseControl.onMousemove(e)}onSimulateMouseup(e){this._angleMeasurementsSimulateMouseControl.onMouseup(e)}clear(){this._angleMeasurementsPlugin.clear()}stop(){this._isTouch?(this._angleMeasurementsTouchControl.deactivate(),this._angleMeasurementsSimulateMouseControl.deactivate()):this._angleMeasurementsMouseControl.deactivate()}destroy(){this.fire("destroy",!0),this.angleMeasureContainer.parentNode&&this.angleMeasureContainer.parentNode.removeChild(this.angleMeasureContainer),this._angleMeasurementsPlugin.destroy(),this._angleMeasurementsMouseControl.destroy(),this._angleMeasurementsTouchControl.destroy(),this._angleMeasurementsSimulateMouseControl.destroy(),super.destroy()}}class oE extends Uk{constructor(e,t){super(e,t),this._offsetX=0,this._offsetY=0,this._isTouch=!1,this._approximate=!0,this._precision=2,this._scale=1,this._unit="m",this.eventTrigger=e.eventTrigger,this.distanceMeasureContainer=document.createElement("div"),this.distanceMeasureContainer.id="myDistanceMeasuresDiv";const{canvas:i}=e.viewer.scene.canvas;i.parentNode.insertBefore(this.distanceMeasureContainer,i),this._distanceMeasurementsPlugin=new gh(this.viewer,{container:this.distanceMeasureContainer,defaultAxisVisible:!1,defaultColor:"#0065FC"}),this._distanceMeasurementsMouseControl=new fh(this._distanceMeasurementsPlugin,{snapping:!0,offsetX:t.offsetX,offsetY:t.offsetY}),this._distanceMeasurementsTouchControl=new mh(this._distanceMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY}),this._distanceMeasurementsSimulateMouseControl=new vh(this._distanceMeasurementsPlugin,{offsetX:t.offsetX,offsetY:t.offsetY,snapping:!0}),this._distanceMeasurementsMouseControl.snapping=!0,this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this._initSettings(),this._initializeMeasure()}setActive(e){this._active=e,e?this.chosedTarget&&this.chosedTarget.setHighlighted(!0):(this.refreshMouseState(),this.setAllHightLighted(!1)),this._isTouch?(this._distanceMeasurementsTouchControl.active=e,this._distanceMeasurementsSimulateMouseControl.active=e):this._distanceMeasurementsMouseControl.active=e}getActive(){return this._active}_initSettings(){this._distanceMeasurementsMouseControl.activate(),this._distanceMeasurementsMouseControl.active=!1,this._distanceMeasurementsTouchControl.activate(),this._distanceMeasurementsTouchControl.active=!1,this._distanceMeasurementsSimulateMouseControl.activate(),this._distanceMeasurementsSimulateMouseControl.active=!1}_initializeMeasure(){this._distanceMeasurementsPlugin.on("measurementCreated",(e=>{this.eventTrigger.emit("newDistanceMeasure",{id:e.id}),this.newMeasure=e,this.chosedTarget=null})),this._distanceMeasurementsPlugin.on("measurementEnd",(e=>{0!==this.getMeasureResultByID(e.id)?(this.eventTrigger.emit("createDistanceMeasure",{id:e.id,result:this.getMeasureResultByID(e.id),xResult:e.xLabel,yResult:e.yLabel,zResult:e.zLabel}),this.setAllHightLighted(!1),this.chosedTarget=e,this.chosedTarget.setHighlighted(!0),this.newMeasure=null):this.destroyMeasurementById(e.id)})),this._distanceMeasurementsPlugin.on("mouseOver",(e=>{e.measurement.setHighlighted(!0)})),this._distanceMeasurementsPlugin.on("mouseLeave",(e=>{e.distanceMeasurement==this.chosedTarget&&this._active||e.measurement.setHighlighted(!1)})),this._distanceMeasurementsPlugin.on("clickMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickDistanceMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._distanceMeasurementsPlugin.on("touchMeasure",(e=>{this.chosedTarget&&this.chosedTarget.id!==e.measurement.id&&this.chosedTarget.setHighlighted(!1),this.chosedTarget=e.measurement,this.chosedTarget.setHighlighted(!0),this.eventTrigger.emit("clickDistanceMeasure",{id:this.chosedTarget.id,result:this.getMeasureResultByID(this.chosedTarget.id)})})),this._distanceMeasurementsPlugin.on("measurementCancel",(e=>{this.eventTrigger.emit("DistanceMeasureCancel",{id:e.id})})),this._distanceMeasurementsPlugin.on("measurementDestroyed",(e=>{this.eventTrigger.emit("DistanceMeasureDestroyed",{id:e.id})}));const e=()=>{this._active&&this.chosedTarget&&this.chosedTarget.setHighlighted(!0)},t=e=>{if(this._active&&("Delete"===e.key||8===e.keyCode)){if(!this.chosedTarget)return;this.destroyMeasurementById(this.chosedTarget.id),this._distanceMeasurementsPlugin.fire("measureDelete",null),0==this.getNumMeasurements()&&(this.chosedTarget=null)}};document.addEventListener("mousemove",e.bind(this)),document.addEventListener("keydown",t.bind(this)),this.on("destroy",(()=>{document.removeEventListener("mousemove",e.bind(this)),document.removeEventListener("keydown",t.bind(this))}))}set isTouch(e){this._isTouch=e,e||this._distanceMeasurementsMouseControl.deactivate()}get isTouch(){return this._isTouch}set unit(e){switch(this._unit=e,e){case"m":this.viewer.scene.metrics.units="meters",this.viewer.scene.metrics.scale=1*this._scale;break;case"cm":this.viewer.scene.metrics.units="centimeters",this.viewer.scene.metrics.scale=100*this._scale;break;case"mm":this.viewer.scene.metrics.units="millimeters",this.viewer.scene.metrics.scale=1e3*this._scale}}set scale(e){this._scale=e,this.unit=this._unit}get scale(){return this._scale}set precision(e){this._precision=e,this._distanceMeasurementsPlugin.precision=e}get precision(){return this._precision}set offsetX(e){this._offsetX=e,this._isTouch?(this._distanceMeasurementsTouchControl.offsetX=e,this._distanceMeasurementsSimulateMouseControl.offsetX=e):this._distanceMeasurementsMouseControl.offsetX=e}get offsetX(){return this._offsetX}set offsetY(e){this._offsetY=e,this._isTouch?(this._distanceMeasurementsTouchControl.offsetY=e,this._distanceMeasurementsSimulateMouseControl.offsetY=e):this._distanceMeasurementsMouseControl.offsetY=e}get offsetY(){return this._offsetY}refreshMouseState(){this.newMeasure&&(this.destroyMeasurementById(this.newMeasure.id),this.isTouch?(this._distanceMeasurementsTouchControl.touchState=0,this._distanceMeasurementsSimulateMouseControl.mouseState=0):this._distanceMeasurementsMouseControl.mouseState=0,this.setAllHightLighted(!1),this.newMeasure=null)}setAllVisible(e){this._distanceMeasurementsPlugin.setMeasurementsShown(e)}setSnappingEnabled(e){return this._distanceMeasurementsMouseControl.snapping=e}getNumMeasurements(){return Object.keys(this._distanceMeasurementsPlugin.measurements).length}getMeasurementsList(){return this._distanceMeasurementsPlugin.measurements}getMeasurementById(e){return this.getMeasurementsList()[e]}getMeasureResultByID(e){const t=this.getMeasurementById(e);return t?t.length:0}setMeasureColorByID(e,t){this.getMeasurementById(e).color=t}setMeasureClickbleById(e,t){this.getMeasurementById(e).clickable=t}setMeasureHightlighted(e,t){this.getMeasurementById(e).setHighlighted(t)}setAllHightLighted(e){const t=this.getMeasurementsList();for(const i in t)t[i].setHighlighted(e)}setVisibleById(e,t){this.getMeasurementById(e).visible=t}setLableVisibleById(e,t){this.getMeasurementById(e).labelsVisible=t}destroyMeasurementById(e){this._distanceMeasurementsPlugin.destroyMeasurement(e)}onSimulateMousedown(e){this._distanceMeasurementsSimulateMouseControl.onMousedown(e)}onSimulateMousemove(e){this._distanceMeasurementsSimulateMouseControl.onMousemove(e)}onSimulateMouseup(e){this._distanceMeasurementsSimulateMouseControl.onMouseup(e)}clear(){this._distanceMeasurementsPlugin.clear()}stop(){this._isTouch?(this._distanceMeasurementsTouchControl.deactivate(),this._distanceMeasurementsSimulateMouseControl.deactivate()):this._distanceMeasurementsMouseControl.deactivate()}destroy(){this.fire("destroy",!0),this.distanceMeasureContainer.parentNode&&this.distanceMeasureContainer.parentNode.removeChild(this.distanceMeasureContainer),this._distanceMeasurementsPlugin.destroy(),this._distanceMeasurementsMouseControl.destroy(),this._distanceMeasurementsTouchControl.destroy(),this._distanceMeasurementsSimulateMouseControl.destroy(),super.destroy()}}class aE extends Uk{constructor(e,t){super(e),this._isTouch=!1,this._tools={},this._toolType="distance",this.eventTrigger=e.eventTrigger,this._measure_distance_tool=new oE(e,{}),this._measure_angle_tool=new sE(e,{}),this._tools.distance=this._measure_distance_tool,this._tools.angle=this._measure_angle_tool,this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this.setActive(!0),this._initEventHandle()}_initEventHandle(){this.eventTrigger.on("clickAngleMeasure",(e=>{this._active&&(this.getActiveByType("angle")||this.setActiveByType("angle",!0))})),this.eventTrigger.on("clickDistanceMeasure",(e=>{this._active&&(this.getActiveByType("distance")||this.setActiveByType("distance",!0))}))}setActive(e=!this._active){this._active=e,this._measure_angle_tool.setEnabled(e),this._measure_distance_tool.setEnabled(e),e||(this._measure_angle_tool.setActive(e),this._measure_distance_tool.setActive(e))}getActive(){return this._active}set isTouch(e){this._isTouch=e,this._measure_angle_tool.isTouch=e,this._measure_distance_tool.isTouch=e}get isTouch(){return this._isTouch}get measureAngleTool(){return this._measure_angle_tool}get measureDistanceTool(){return this._measure_distance_tool}getMeasureToolByType(e){return this._tools[e]}setActiveByType(e,t=!this._tools[e].getActive()){this._toolType=e;for(let i in this._tools)e==i?this._tools[i].setActive(t):this._tools[i].setActive(!1)}getActiveByType(e){return this._tools[e].getActive()}get currentTool(){return this._tools[this._toolType]}SetMeasureAngleActive(e=!this._measure_angle_tool.getActive(),t=()=>{}){this._measure_angle_tool.setActive(e),t(this._measure_angle_tool.getActive())}SetMeasureDistanceActive(e=!this._measure_distance_tool.getActive(),t=()=>{}){this._measure_distance_tool.setActive(e),t(this._measure_distance_tool.getActive())}setAllDisActive(){for(let e in this._tools)this._tools[e].setActive(!1)}setMeasureOffSet(e,t){this.measureAngleTool.offsetX=e,this.measureAngleTool.offsetY=t,this.measureDistanceTool.offsetX=e,this.measureDistanceTool.offsetY=t}setSnapRadius(e){this.viewer.cameraControl.snapRadius=e}destroy(){this._measure_distance_tool.destroy(),this._measure_angle_tool.destroy()}}
38
38
  /*!
39
39
  * decimal.js v10.5.0
40
40
  * An arbitrary-precision Decimal type for JavaScript.
41
41
  * https://github.com/MikeMcl/decimal.js
42
42
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
43
43
  * MIT Licence
44
- */var lE,uE,cE=9e15,hE=1e9,AE="0123456789abcdef",dE="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",pE="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",fE={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-cE,maxE:cE,crypto:!1},gE=!0,mE="[DecimalError] ",vE=mE+"Invalid argument: ",_E=mE+"Precision limit exceeded",yE=mE+"crypto unavailable",bE="[object Decimal]",wE=Math.floor,xE=Math.pow,BE=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,PE=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,CE=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ME=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kE=1e7,EE=dE.length-1,SE=pE.length-1,TE={toStringTag:bE};function FE(e){var t,i,r,n=e.length-1,s="",o=e[0];if(n>0){for(s+=o,t=1;t<n;t++)(i=7-(r=e[t]+"").length)&&(s+=HE(i)),s+=r;(i=7-(r=(o=e[t])+"").length)&&(s+=HE(i))}else if(0===o)return"0";for(;o%10==0;)o/=10;return s+o}function IE(e,t,i){if(e!==~~e||e<t||e>i)throw Error(vE+e)}function DE(e,t,i,r){var n,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=7,n=0):(n=Math.ceil((t+1)/7),t%=7),s=xE(10,7-t),a=e[n]%s|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),o=i<4&&99999==a||i>3&&49999==a||5e4==a||0==a):o=(i<4&&a+1==s||i>3&&a+1==s/2)&&(e[n+1]/s/100|0)==xE(10,t-2)-1||(a==s/2||0==a)&&!(e[n+1]/s/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),o=(r||i<4)&&9999==a||!r&&i>3&&4999==a):o=((r||i<4)&&a+1==s||!r&&i>3&&a+1==s/2)&&(e[n+1]/s/1e3|0)==xE(10,t-3)-1,o}function RE(e,t,i){for(var r,n,s=[0],o=0,a=e.length;o<a;){for(n=s.length;n--;)s[n]*=t;for(s[0]+=AE.indexOf(e.charAt(o++)),r=0;r<s.length;r++)s[r]>i-1&&(void 0===s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}TE.absoluteValue=TE.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),LE(e)},TE.ceil=function(){return LE(new this.constructor(this),this.e+1,2)},TE.clampedTo=TE.clamp=function(e,t){var i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(vE+t);return i.cmp(e)<0?e:i.cmp(t)>0?t:new r(i)},TE.comparedTo=TE.cmp=function(e){var t,i,r,n,s=this,o=s.d,a=(e=new s.constructor(e)).d,l=s.s,u=e.s;if(!o||!a)return l&&u?l!==u?l:o===a?0:!o^l<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?l:a[0]?-u:0;if(l!==u)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=0,i=(r=o.length)<(n=a.length)?r:n;t<i;++t)if(o[t]!==a[t])return o[t]>a[t]^l<0?1:-1;return r===n?0:r>n^l<0?1:-1},TE.cosine=TE.cos=function(){var e,t,i=this,r=i.constructor;return i.d?i.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(e,t){var i,r,n;if(t.isZero())return t;r=t.d.length,r<32?n=(1/$E(4,i=Math.ceil(r/3))).toString():(i=16,n="2.3283064365386962890625e-10");e.precision+=i,t=ZE(e,1,t.times(n),new e(1));for(var s=i;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,t}(r,eS(r,i)),r.precision=e,r.rounding=t,LE(2==uE||3==uE?i.neg():i,e,t,!0)):new r(1):new r(NaN)},TE.cubeRoot=TE.cbrt=function(){var e,t,i,r,n,s,o,a,l,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(gE=!1,(s=c.s*xE(c.s*c,1/3))&&Math.abs(s)!=1/0?r=new h(s.toString()):(i=FE(c.d),(s=((e=c.e)-i.length+1)%3)&&(i+=1==s||-2==s?"0":"00"),s=xE(i,1/3),e=wE((e+1)/3)-(e%3==(e<0?-1:2)),(r=new h(i=s==1/0?"5e"+e:(i=s.toExponential()).slice(0,i.indexOf("e")+1)+e)).s=c.s),o=(e=h.precision)+3;;)if(u=(l=(a=r).times(a).times(a)).plus(c),r=OE(u.plus(c).times(a),u.plus(l),o+2,1),FE(a.d).slice(0,o)===(i=FE(r.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(n||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||(LE(r,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!n&&(LE(a,e+1,0),a.times(a).times(a).eq(c))){r=a;break}o+=4,n=1}return gE=!0,LE(r,e,h.rounding,t)},TE.decimalPlaces=TE.dp=function(){var e,t=this.d,i=NaN;if(t){if(i=7*((e=t.length-1)-wE(this.e/7)),e=t[e])for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i},TE.dividedBy=TE.div=function(e){return OE(this,new this.constructor(e))},TE.dividedToIntegerBy=TE.divToInt=function(e){var t=this.constructor;return LE(OE(this,new t(e),0,1,1),t.precision,t.rounding)},TE.equals=TE.eq=function(e){return 0===this.cmp(e)},TE.floor=function(){return LE(new this.constructor(this),this.e+1,3)},TE.greaterThan=TE.gt=function(e){return this.cmp(e)>0},TE.greaterThanOrEqualTo=TE.gte=function(e){var t=this.cmp(e);return 1==t||0===t},TE.hyperbolicCosine=TE.cosh=function(){var e,t,i,r,n,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;i=o.precision,r=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,(n=s.d.length)<32?t=(1/$E(4,e=Math.ceil(n/3))).toString():(e=16,t="2.3283064365386962890625e-10"),s=ZE(o,1,s.times(t),new o(1),!0);for(var l,u=e,c=new o(8);u--;)l=s.times(s),s=a.minus(l.times(c.minus(l.times(c))));return LE(s,o.precision=i,o.rounding=r,!0)},TE.hyperbolicSine=TE.sinh=function(){var e,t,i,r,n=this,s=n.constructor;if(!n.isFinite()||n.isZero())return new s(n);if(t=s.precision,i=s.rounding,s.precision=t+Math.max(n.e,n.sd())+4,s.rounding=1,(r=n.d.length)<3)n=ZE(s,2,n,n,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,n=ZE(s,2,n=n.times(1/$E(5,e)),n,!0);for(var o,a=new s(5),l=new s(16),u=new s(20);e--;)o=n.times(n),n=n.times(a.plus(o.times(l.times(o).plus(u))))}return s.precision=t,s.rounding=i,LE(n,t,i,!0)},TE.hyperbolicTangent=TE.tanh=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,OE(i.sinh(),i.cosh(),r.precision=e,r.rounding=t)):new r(i.s)},TE.inverseCosine=TE.acos=function(){var e=this,t=e.constructor,i=e.abs().cmp(1),r=t.precision,n=t.rounding;return-1!==i?0===i?e.isNeg()?VE(t,r,n):new t(0):new t(NaN):e.isZero()?VE(t,r+4,n).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=n,e.times(2))},TE.inverseHyperbolicCosine=TE.acosh=function(){var e,t,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,gE=!1,i=i.times(i).minus(1).sqrt().plus(i),gE=!0,r.precision=e,r.rounding=t,i.ln()):new r(i)},TE.inverseHyperbolicSine=TE.asinh=function(){var e,t,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,gE=!1,i=i.times(i).plus(1).sqrt().plus(i),gE=!0,r.precision=e,r.rounding=t,i.ln())},TE.inverseHyperbolicTangent=TE.atanh=function(){var e,t,i,r,n=this,s=n.constructor;return n.isFinite()?n.e>=0?new s(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=s.precision,t=s.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?LE(new s(n),e,t,!0):(s.precision=i=r-n.e,n=OE(n.plus(1),new s(1).minus(n),i+e,1),s.precision=e+4,s.rounding=1,n=n.ln(),s.precision=e,s.rounding=t,n.times(.5))):new s(NaN)},TE.inverseSine=TE.asin=function(){var e,t,i,r,n=this,s=n.constructor;return n.isZero()?new s(n):(t=n.abs().cmp(1),i=s.precision,r=s.rounding,-1!==t?0===t?((e=VE(s,i+4,r).times(.5)).s=n.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,n=n.div(new s(1).minus(n.times(n)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=r,n.times(2)))},TE.inverseTangent=TE.atan=function(){var e,t,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,A=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=SE)return(o=VE(c,h+4,A).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(h+4<=SE)return(o=VE(c,h+4,A).times(.5)).s=u.s,o}for(c.precision=a=h+10,c.rounding=1,e=i=Math.min(28,a/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(gE=!1,t=Math.ceil(a/7),r=1,l=u.times(u),o=new c(u),n=u;-1!==e;)if(n=n.times(l),s=o.minus(n.div(r+=2)),n=n.times(l),void 0!==(o=s.plus(n.div(r+=2))).d[t])for(e=t;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<<i-1)),gE=!0,LE(o,c.precision=h,c.rounding=A,!0)},TE.isFinite=function(){return!!this.d},TE.isInteger=TE.isInt=function(){return!!this.d&&wE(this.e/7)>this.d.length-2},TE.isNaN=function(){return!this.s},TE.isNegative=TE.isNeg=function(){return this.s<0},TE.isPositive=TE.isPos=function(){return this.s>0},TE.isZero=function(){return!!this.d&&0===this.d[0]},TE.lessThan=TE.lt=function(e){return this.cmp(e)<0},TE.lessThanOrEqualTo=TE.lte=function(e){return this.cmp(e)<1},TE.logarithm=TE.log=function(e){var t,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,A=c.rounding;if(null==e)e=new c(10),t=!0;else{if(i=(e=new c(e)).d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(i=u.d,u.s<0||!i||!i[0]||u.eq(1))return new c(i&&!i[0]?-1/0:1!=u.s?NaN:i?0:1/0);if(t)if(i.length>1)s=!0;else{for(n=i[0];n%10==0;)n/=10;s=1!==n}if(gE=!1,o=XE(u,a=h+5),r=t?NE(c,a+10):XE(e,a),DE((l=OE(o,r,a,1)).d,n=h,A))do{if(o=XE(u,a+=10),r=t?NE(c,a+10):XE(e,a),l=OE(o,r,a,1),!s){+FE(l.d).slice(n+1,n+15)+1==1e14&&(l=LE(l,h+1,0));break}}while(DE(l.d,n+=10,A));return gE=!0,LE(l,h,A)},TE.minus=TE.sub=function(e){var t,i,r,n,s,o,a,l,u,c,h,A,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN):e=new p(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(u=d.d,A=e.d,a=p.precision,l=p.rounding,!u[0]||!A[0]){if(A[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(d)}return gE?LE(e,a,l):e}if(i=wE(e.e/7),c=wE(d.e/7),u=u.slice(),s=c-i){for((h=s<0)?(t=u,s=-s,o=A.length):(t=A,i=c,o=u.length),s>(r=Math.max(Math.ceil(a/7),o)+2)&&(s=r,t.length=1),t.reverse(),r=s;r--;)t.push(0);t.reverse()}else{for((h=(r=u.length)<(o=A.length))&&(o=r),r=0;r<o;r++)if(u[r]!=A[r]){h=u[r]<A[r];break}s=0}for(h&&(t=u,u=A,A=t,e.s=-e.s),o=u.length,r=A.length-o;r>0;--r)u[o++]=0;for(r=A.length;r>s;){if(u[--r]<A[r]){for(n=r;n&&0===u[--n];)u[n]=kE-1;--u[n],u[r]+=kE}u[r]-=A[r]}for(;0===u[--o];)u.pop();for(;0===u[0];u.shift())--i;return u[0]?(e.d=u,e.e=UE(u,i),gE?LE(e,a,l):e):new p(3===l?-0:0)},TE.modulo=TE.mod=function(e){var t,i=this,r=i.constructor;return e=new r(e),!i.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||i.d&&!i.d[0]?LE(new r(i),r.precision,r.rounding):(gE=!1,9==r.modulo?(t=OE(i,e.abs(),0,3,1)).s*=e.s:t=OE(i,e,0,r.modulo,1),t=t.times(e),gE=!0,i.minus(t))},TE.naturalExponential=TE.exp=function(){return KE(this)},TE.naturalLogarithm=TE.ln=function(){return XE(this)},TE.negated=TE.neg=function(){var e=new this.constructor(this);return e.s=-e.s,LE(e)},TE.plus=TE.add=function(e){var t,i,r,n,s,o,a,l,u,c,h=this,A=h.constructor;if(e=new A(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new A(e.d||h.s===e.s?h:NaN)):e=new A(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(u=h.d,c=e.d,a=A.precision,l=A.rounding,!u[0]||!c[0])return c[0]||(e=new A(h)),gE?LE(e,a,l):e;if(s=wE(h.e/7),r=wE(e.e/7),u=u.slice(),n=s-r){for(n<0?(i=u,n=-n,o=c.length):(i=c,r=s,o=u.length),n>(o=(s=Math.ceil(a/7))>o?s+1:o+1)&&(n=o,i.length=1),i.reverse();n--;)i.push(0);i.reverse()}for((o=u.length)-(n=c.length)<0&&(n=o,i=c,c=u,u=i),t=0;n;)t=(u[--n]=u[n]+c[n]+t)/kE|0,u[n]%=kE;for(t&&(u.unshift(t),++r),o=u.length;0==u[--o];)u.pop();return e.d=u,e.e=UE(u,r),gE?LE(e,a,l):e},TE.precision=TE.sd=function(e){var t,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(vE+e);return i.d?(t=QE(i.d),e&&i.e+1>t&&(t=i.e+1)):t=NaN,t},TE.round=function(){var e=this,t=e.constructor;return LE(new t(e),e.e+1,t.rounding)},TE.sine=TE.sin=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(e,t){var i,r=t.d.length;if(r<3)return t.isZero()?t:ZE(e,2,t,t);i=(i=1.4*Math.sqrt(r))>16?16:0|i,t=t.times(1/$E(5,i)),t=ZE(e,2,t,t);for(var n,s=new e(5),o=new e(16),a=new e(20);i--;)n=t.times(t),t=t.times(s.plus(n.times(o.times(n).minus(a))));return t}(r,eS(r,i)),r.precision=e,r.rounding=t,LE(uE>2?i.neg():i,e,t,!0)):new r(NaN)},TE.squareRoot=TE.sqrt=function(){var e,t,i,r,n,s,o=this,a=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);for(gE=!1,0==(u=Math.sqrt(+o))||u==1/0?(((t=FE(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=wE((l+1)/2)-(l<0||l%2),r=new c(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new c(u.toString()),i=(l=c.precision)+3;;)if(r=(s=r).plus(OE(o,s,i+2,1)).times(.5),FE(s.d).slice(0,i)===(t=FE(r.d)).slice(0,i)){if("9999"!=(t=t.slice(i-3,i+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(LE(r,l+1,1),e=!r.times(r).eq(o));break}if(!n&&(LE(s,l+1,0),s.times(s).eq(o))){r=s;break}i+=4,n=1}return gE=!0,LE(r,l,c.rounding,e)},TE.tangent=TE.tan=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(i=i.sin()).s=1,i=OE(i,new r(1).minus(i.times(i)).sqrt(),e+10,0),r.precision=e,r.rounding=t,LE(2==uE||4==uE?i.neg():i,e,t,!0)):new r(NaN)},TE.times=TE.mul=function(e){var t,i,r,n,s,o,a,l,u,c=this,h=c.constructor,A=c.d,d=(e=new h(e)).d;if(e.s*=c.s,!(A&&A[0]&&d&&d[0]))return new h(!e.s||A&&!A[0]&&!d||d&&!d[0]&&!A?NaN:A&&d?0*e.s:e.s/0);for(i=wE(c.e/7)+wE(e.e/7),(l=A.length)<(u=d.length)&&(s=A,A=d,d=s,o=l,l=u,u=o),s=[],r=o=l+u;r--;)s.push(0);for(r=u;--r>=0;){for(t=0,n=l+r;n>r;)a=s[n]+d[r]*A[n-r-1]+t,s[n--]=a%kE|0,t=a/kE|0;s[n]=(s[n]+t)%kE|0}for(;!s[--o];)s.pop();return t?++i:s.shift(),e.d=s,e.e=UE(s,i),gE?LE(e,h.precision,h.rounding):e},TE.toBinary=function(e,t){return tS(this,2,e,t)},TE.toDecimalPlaces=TE.toDP=function(e,t){var i=this,r=i.constructor;return i=new r(i),void 0===e?i:(IE(e,0,hE),void 0===t?t=r.rounding:IE(t,0,8),LE(i,e+i.e+1,t))},TE.toExponential=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=jE(r,!0):(IE(e,0,hE),void 0===t?t=n.rounding:IE(t,0,8),i=jE(r=LE(new n(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+i:i},TE.toFixed=function(e,t){var i,r,n=this,s=n.constructor;return void 0===e?i=jE(n):(IE(e,0,hE),void 0===t?t=s.rounding:IE(t,0,8),i=jE(r=LE(new s(n),e+n.e+1,t),!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+i:i},TE.toFraction=function(e){var t,i,r,n,s,o,a,l,u,c,h,A,d=this,p=d.d,f=d.constructor;if(!p)return new f(d);if(u=i=new f(1),r=l=new f(0),o=(s=(t=new f(r)).e=QE(p)-d.e-1)%7,t.d[0]=xE(10,o<0?7+o:o),null==e)e=s>0?t:u;else{if(!(a=new f(e)).isInt()||a.lt(u))throw Error(vE+a);e=a.gt(t)?s>0?t:u:a}for(gE=!1,a=new f(FE(p)),c=f.precision,f.precision=s=7*p.length*2;h=OE(a,t,0,1,1),1!=(n=i.plus(h.times(r))).cmp(e);)i=r,r=n,n=u,u=l.plus(h.times(n)),l=n,n=t,t=a.minus(h.times(n)),a=n;return n=OE(e.minus(i),r,0,1,1),l=l.plus(n.times(u)),i=i.plus(n.times(r)),l.s=u.s=d.s,A=OE(u,r,s,1).minus(d).abs().cmp(OE(l,i,s,1).minus(d).abs())<1?[u,r]:[l,i],f.precision=c,gE=!0,A},TE.toHexadecimal=TE.toHex=function(e,t){return tS(this,16,e,t)},TE.toNearest=function(e,t){var i=this,r=i.constructor;if(i=new r(i),null==e){if(!i.d)return i;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:IE(t,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(gE=!1,i=OE(i,e,0,t,1).times(e),gE=!0,LE(i)):(e.s=i.s,i=e),i},TE.toNumber=function(){return+this},TE.toOctal=function(e,t){return tS(this,8,e,t)},TE.toPower=TE.pow=function(e){var t,i,r,n,s,o,a=this,l=a.constructor,u=+(e=new l(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new l(xE(+a,u));if((a=new l(a)).eq(1))return a;if(r=l.precision,s=l.rounding,e.eq(1))return LE(a,r,s);if((t=wE(e.e/7))>=e.d.length-1&&(i=u<0?-u:u)<=9007199254740991)return n=GE(l,a,i,r),e.s<0?new l(1).div(n):LE(n,r,s);if((o=a.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(t=0!=(i=xE(+a,u))&&isFinite(i)?new l(i+"").e:wE(u*(Math.log("0."+FE(a.d))/Math.LN10+a.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?o/0:0):(gE=!1,l.rounding=a.s=1,i=Math.min(12,(t+"").length),(n=KE(e.times(XE(a,r+i)),r)).d&&DE((n=LE(n,r+5,1)).d,r,s)&&(t=r+10,+FE((n=LE(KE(e.times(XE(a,t+i)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(n=LE(n,r+1,0))),n.s=o,gE=!0,l.rounding=s,LE(n,r,s))},TE.toPrecision=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=jE(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(IE(e,1,hE),void 0===t?t=n.rounding:IE(t,0,8),i=jE(r=LE(new n(r),e,t),e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+i:i},TE.toSignificantDigits=TE.toSD=function(e,t){var i=this.constructor;return void 0===e?(e=i.precision,t=i.rounding):(IE(e,1,hE),void 0===t?t=i.rounding:IE(t,0,8)),LE(new i(this),e,t)},TE.toString=function(){var e=this,t=e.constructor,i=jE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i},TE.truncated=TE.trunc=function(){return LE(new this.constructor(this),this.e+1,1)},TE.valueOf=TE.toJSON=function(){var e=this,t=e.constructor,i=jE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+i:i};var OE=function(){function e(e,t,i){var r,n=0,s=e.length;for(e=e.slice();s--;)r=e[s]*t+n,e[s]=r%i|0,n=r/i|0;return n&&e.unshift(n),e}function t(e,t,i,r){var n,s;if(i!=r)s=i>r?1:-1;else for(n=s=0;n<i;n++)if(e[n]!=t[n]){s=e[n]>t[n]?1:-1;break}return s}function i(e,t,i,r){for(var n=0;i--;)e[i]-=n,n=e[i]<t[i]?1:0,e[i]=n*r+e[i]-t[i];for(;!e[0]&&e.length>1;)e.shift()}return function(r,n,s,o,a,l){var u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E=r.constructor,S=r.s==n.s?1:-1,T=r.d,F=n.d;if(!(T&&T[0]&&F&&F[0]))return new E(r.s&&n.s&&(T?!F||T[0]!=F[0]:F)?T&&0==T[0]||!F?0*S:S/0:NaN);for(l?(d=1,c=r.e-n.e):(l=kE,d=7,c=wE(r.e/d)-wE(n.e/d)),M=F.length,P=T.length,v=(m=new E(S)).d=[],h=0;F[h]==(T[h]||0);h++);if(F[h]>(T[h]||0)&&c--,null==s?(w=s=E.precision,o=E.rounding):w=a?s+(r.e-n.e)+1:s,w<0)v.push(1),p=!0;else{if(w=w/d+2|0,h=0,1==M){for(A=0,F=F[0],w++;(h<P||A)&&w--;h++)x=A*l+(T[h]||0),v[h]=x/F|0,A=x%F|0;p=A||h<P}else{for((A=l/(F[0]+1)|0)>1&&(F=e(F,A,l),T=e(T,A,l),M=F.length,P=T.length),B=M,y=(_=T.slice(0,M)).length;y<M;)_[y++]=0;(k=F.slice()).unshift(0),C=F[0],F[1]>=l/2&&++C;do{A=0,(u=t(F,_,M,y))<0?(b=_[0],M!=y&&(b=b*l+(_[1]||0)),(A=b/C|0)>1?(A>=l&&(A=l-1),1==(u=t(f=e(F,A,l),_,g=f.length,y=_.length))&&(A--,i(f,M<g?k:F,g,l))):(0==A&&(u=A=1),f=F.slice()),(g=f.length)<y&&f.unshift(0),i(_,f,y,l),-1==u&&(u=t(F,_,M,y=_.length))<1&&(A++,i(_,M<y?k:F,y,l)),y=_.length):0===u&&(A++,_=[0]),v[h++]=A,u&&_[0]?_[y++]=T[B]||0:(_=[T[B]],y=1)}while((B++<P||void 0!==_[0])&&w--);p=void 0!==_[0]}v[0]||v.shift()}if(1==d)m.e=c,lE=p;else{for(h=1,A=v[0];A>=10;A/=10)h++;m.e=h+c*d-1,LE(m,a?s+m.e+1:s,o,p)}return m}}();function LE(e,t,i,r){var n,s,o,a,l,u,c,h,A,d=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(n=1,a=h[0];a>=10;a/=10)n++;if((s=t-n)<0)s+=7,o=t,l=(c=h[A=0])/xE(10,n-o-1)%10|0;else if((A=Math.ceil((s+1)/7))>=(a=h.length)){if(!r)break e;for(;a++<=A;)h.push(0);c=l=0,n=1,o=(s%=7)-7+1}else{for(c=a=h[A],n=1;a>=10;a/=10)n++;l=(o=(s%=7)-7+n)<0?0:c/xE(10,n-o-1)%10|0}if(r=r||t<0||void 0!==h[A+1]||(o<0?c:c%xE(10,n-o-1)),u=i<4?(l||r)&&(0==i||i==(e.s<0?3:2)):l>5||5==l&&(4==i||r||6==i&&(s>0?o>0?c/xE(10,n-o):0:h[A-1])%10&1||i==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=xE(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==s?(h.length=A,a=1,A--):(h.length=A+1,a=xE(10,7-s),h[A]=o>0?(c/xE(10,n-o)%xE(10,o)|0)*a:0),u)for(;;){if(0==A){for(s=1,o=h[0];o>=10;o/=10)s++;for(o=h[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,h[0]==kE&&(h[0]=1));break}if(h[A]+=a,h[A]!=kE)break;h[A--]=0,a=1}for(s=h.length;0===h[--s];)h.pop()}return gE&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function jE(e,t,i){if(!e.isFinite())return qE(e);var r,n=e.e,s=FE(e.d),o=s.length;return t?(i&&(r=i-o)>0?s=s.charAt(0)+"."+s.slice(1)+HE(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):n<0?(s="0."+HE(-n-1)+s,i&&(r=i-o)>0&&(s+=HE(r))):n>=o?(s+=HE(n+1-o),i&&(r=i-n-1)>0&&(s=s+"."+HE(r))):((r=n+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),i&&(r=i-o)>0&&(n+1===o&&(s+="."),s+=HE(r))),s}function UE(e,t){var i=e[0];for(t*=7;i>=10;i/=10)t++;return t}function NE(e,t,i){if(t>EE)throw gE=!0,i&&(e.precision=i),Error(_E);return LE(new e(dE),t,1,!0)}function VE(e,t,i){if(t>SE)throw Error(_E);return LE(new e(pE),t,i,!0)}function QE(e){var t=e.length-1,i=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)i--;for(t=e[0];t>=10;t/=10)i++}return i}function HE(e){for(var t="";e--;)t+="0";return t}function GE(e,t,i,r){var n,s=new e(1),o=Math.ceil(r/7+4);for(gE=!1;;){if(i%2&&iS((s=s.times(t)).d,o)&&(n=!0),0===(i=wE(i/2))){i=s.d.length-1,n&&0===s.d[i]&&++s.d[i];break}iS((t=t.times(t)).d,o)}return gE=!0,s}function zE(e){return 1&e.d[e.d.length-1]}function WE(e,t,i){for(var r,n,s=new e(t[0]),o=0;++o<t.length;){if(!(n=new e(t[o])).s){s=n;break}((r=s.cmp(n))===i||0===r&&s.s===i)&&(s=n)}return s}function KE(e,t){var i,r,n,s,o,a,l,u=0,c=0,h=0,A=e.constructor,d=A.rounding,p=A.precision;if(!e.d||!e.d[0]||e.e>17)return new A(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(gE=!1,l=p):l=t,a=new A(.03125);e.e>-2;)e=e.times(a),h+=5;for(l+=r=Math.log(xE(2,h))/Math.LN10*2+5|0,i=s=o=new A(1),A.precision=l;;){if(s=LE(s.times(e),l,1),i=i.times(++c),FE((a=o.plus(OE(s,i,l,1))).d).slice(0,l)===FE(o.d).slice(0,l)){for(n=h;n--;)o=LE(o.times(o),l,1);if(null!=t)return A.precision=p,o;if(!(u<3&&DE(o.d,l-r,d,u)))return LE(o,A.precision=p,d,gE=!0);A.precision=l+=10,i=s=a=new A(1),c=0,u++}o=a}}function XE(e,t){var i,r,n,s,o,a,l,u,c,h,A,d=1,p=e,f=p.d,g=p.constructor,m=g.rounding,v=g.precision;if(p.s<0||!f||!f[0]||!p.e&&1==f[0]&&1==f.length)return new g(f&&!f[0]?-1/0:1!=p.s?NaN:f?0:p);if(null==t?(gE=!1,c=v):c=t,g.precision=c+=10,r=(i=FE(f)).charAt(0),!(Math.abs(s=p.e)<15e14))return u=NE(g,c+2,v).times(s+""),p=XE(new g(r+"."+i.slice(1)),c-10).plus(u),g.precision=v,null==t?LE(p,v,m,gE=!0):p;for(;r<7&&1!=r||1==r&&i.charAt(1)>3;)r=(i=FE((p=p.times(e)).d)).charAt(0),d++;for(s=p.e,r>1?(p=new g("0."+i),s++):p=new g(r+"."+i.slice(1)),h=p,l=o=p=OE(p.minus(1),p.plus(1),c,1),A=LE(p.times(p),c,1),n=3;;){if(o=LE(o.times(A),c,1),FE((u=l.plus(OE(o,new g(n),c,1))).d).slice(0,c)===FE(l.d).slice(0,c)){if(l=l.times(2),0!==s&&(l=l.plus(NE(g,c+2,v).times(s+""))),l=OE(l,new g(d),c,1),null!=t)return g.precision=v,l;if(!DE(l.d,c-10,m,a))return LE(l,g.precision=v,m,gE=!0);g.precision=c+=10,u=o=p=OE(h.minus(1),h.plus(1),c,1),A=LE(p.times(p),c,1),n=a=1}l=u,n+=2}}function qE(e){return String(e.s*e.s/0)}function YE(e,t){var i,r,n;for((i=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(i<0&&(i=r),i+=+t.slice(r+1),t=t.substring(0,r)):i<0&&(i=t.length),r=0;48===t.charCodeAt(r);r++);for(n=t.length;48===t.charCodeAt(n-1);--n);if(t=t.slice(r,n)){if(n-=r,e.e=i=i-r-1,e.d=[],r=(i+1)%7,i<0&&(r+=7),r<n){for(r&&e.d.push(+t.slice(0,r)),n-=7;r<n;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=n;for(;r--;)t+="0";e.d.push(+t),gE&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function JE(e,t){var i,r,n,s,o,a,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ME.test(t))return YE(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(PE.test(t))i=16,t=t.toLowerCase();else if(BE.test(t))i=2;else{if(!CE.test(t))throw Error(vE+t);i=8}for((s=t.search(/p/i))>0?(l=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),o=(s=t.indexOf("."))>=0,r=e.constructor,o&&(s=(a=(t=t.replace(".","")).length)-s,n=GE(r,new r(i),s,2*s)),s=c=(u=RE(t,i,kE)).length-1;0===u[s];--s)u.pop();return s<0?new r(0*e.s):(e.e=UE(u,c),e.d=u,gE=!1,o&&(e=OE(e,n,4*a)),l&&(e=e.times(Math.abs(l)<54?xE(2,l):HS.pow(2,l))),gE=!0,e)}function ZE(e,t,i,r,n){var s,o,a,l,u=e.precision,c=Math.ceil(u/7);for(gE=!1,l=i.times(i),a=new e(r);;){if(o=OE(a.times(l),new e(t++*t++),u,1),a=n?r.plus(o):r.minus(o),r=OE(o.times(l),new e(t++*t++),u,1),void 0!==(o=a.plus(r)).d[c]){for(s=c;o.d[s]===a.d[s]&&s--;);if(-1==s)break}s=a,a=r,r=o,o=s}return gE=!0,o.d.length=c+1,o}function $E(e,t){for(var i=e;--t;)i*=e;return i}function eS(e,t){var i,r=t.s<0,n=VE(e,e.precision,1),s=n.times(.5);if((t=t.abs()).lte(s))return uE=r?4:1,t;if((i=t.divToInt(n)).isZero())uE=r?3:2;else{if((t=t.minus(i.times(n))).lte(s))return uE=zE(i)?r?2:3:r?4:1,t;uE=zE(i)?r?1:4:r?3:2}return t.minus(n).abs()}function tS(e,t,i,r){var n,s,o,a,l,u,c,h,A,d=e.constructor,p=void 0!==i;if(p?(IE(i,1,hE),void 0===r?r=d.rounding:IE(r,0,8)):(i=d.precision,r=d.rounding),e.isFinite()){for(p?(n=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):n=t,(o=(c=jE(e)).indexOf("."))>=0&&(c=c.replace(".",""),(A=new d(1)).e=c.length-o,A.d=RE(jE(A),10,n),A.e=A.d.length),s=l=(h=RE(c,10,n)).length;0==h[--l];)h.pop();if(h[0]){if(o<0?s--:((e=new d(e)).d=h,e.e=s,h=(e=OE(e,A,i,r,0,n)).d,s=e.e,u=lE),o=h[i],a=n/2,u=u||void 0!==h[i+1],u=r<4?(void 0!==o||u)&&(0===r||r===(e.s<0?3:2)):o>a||o===a&&(4===r||u||6===r&&1&h[i-1]||r===(e.s<0?8:7)),h.length=i,u)for(;++h[--i]>n-1;)h[i]=0,i||(++s,h.unshift(1));for(l=h.length;!h[l-1];--l);for(o=0,c="";o<l;o++)c+=AE.charAt(h[o]);if(p){if(l>1)if(16==t||8==t){for(o=16==t?4:3,--l;l%o;l++)c+="0";for(l=(h=RE(c,n,t)).length;!h[l-1];--l);for(o=1,c="1.";o<l;o++)c+=AE.charAt(h[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>l)for(s-=l;s--;)c+="0";else s<l&&(c=c.slice(0,s)+"."+c.slice(s))}else c=p?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=qE(e);return e.s<0?"-"+c:c}function iS(e,t){if(e.length>t)return e.length=t,!0}function rS(e){return new this(e).abs()}function nS(e){return new this(e).acos()}function sS(e){return new this(e).acosh()}function oS(e,t){return new this(e).plus(t)}function aS(e){return new this(e).asin()}function lS(e){return new this(e).asinh()}function uS(e){return new this(e).atan()}function cS(e){return new this(e).atanh()}function hS(e,t){e=new this(e),t=new this(t);var i,r=this.precision,n=this.rounding,s=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(i=t.s<0?VE(this,r,n):new this(0)).s=e.s:!e.d||t.isZero()?(i=VE(this,s,1).times(.5)).s=e.s:t.s<0?(this.precision=s,this.rounding=1,i=this.atan(OE(e,t,s,1)),t=VE(this,s,1),this.precision=r,this.rounding=n,i=e.s<0?i.minus(t):i.plus(t)):i=this.atan(OE(e,t,s,1)):(i=VE(this,s,1).times(t.s>0?.25:.75)).s=e.s:i=new this(NaN),i}function AS(e){return new this(e).cbrt()}function dS(e){return LE(e=new this(e),e.e+1,2)}function pS(e,t,i){return new this(e).clamp(t,i)}function fS(e){if(!e||"object"!=typeof e)throw Error(mE+"Object expected");var t,i,r,n=!0===e.defaults,s=["precision",1,hE,"rounding",0,8,"toExpNeg",-cE,0,"toExpPos",0,cE,"maxE",0,cE,"minE",-cE,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(i=s[t],n&&(this[i]=fE[i]),void 0!==(r=e[i])){if(!(wE(r)===r&&r>=s[t+1]&&r<=s[t+2]))throw Error(vE+i+": "+r);this[i]=r}if(i="crypto",n&&(this[i]=fE[i]),void 0!==(r=e[i])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(vE+i+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(yE);this[i]=!0}else this[i]=!1}return this}function gS(e){return new this(e).cos()}function mS(e){return new this(e).cosh()}function vS(e,t){return new this(e).div(t)}function _S(e){return new this(e).exp()}function yS(e){return LE(e=new this(e),e.e+1,3)}function bS(){var e,t,i=new this(0);for(gE=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)i.d&&(i=i.plus(t.times(t)));else{if(t.s)return gE=!0,new this(1/0);i=t}return gE=!0,i.sqrt()}function wS(e){return e instanceof HS||e&&e.toStringTag===bE||!1}function xS(e){return new this(e).ln()}function BS(e,t){return new this(e).log(t)}function PS(e){return new this(e).log(2)}function CS(e){return new this(e).log(10)}function MS(){return WE(this,arguments,-1)}function kS(){return WE(this,arguments,1)}function ES(e,t){return new this(e).mod(t)}function SS(e,t){return new this(e).mul(t)}function TS(e,t){return new this(e).pow(t)}function FS(e){var t,i,r,n,s=0,o=new this(1),a=[];if(void 0===e?e=this.precision:IE(e,1,hE),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));s<r;)(n=t[s])>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=n%1e7;else{if(!crypto.randomBytes)throw Error(yE);for(t=crypto.randomBytes(r*=4);s<r;)(n=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((127&t[s+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(n%1e7),s+=4);s=r/4}else for(;s<r;)a[s++]=1e7*Math.random()|0;for(e%=7,(r=a[--s])&&e&&(n=xE(10,7-e),a[s]=(r/n|0)*n);0===a[s];s--)a.pop();if(s<0)i=0,a=[0];else{for(i=-1;0===a[0];i-=7)a.shift();for(r=1,n=a[0];n>=10;n/=10)r++;r<7&&(i-=7-r)}return o.e=i,o.d=a,o}function IS(e){return LE(e=new this(e),e.e+1,this.rounding)}function DS(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function RS(e){return new this(e).sin()}function OS(e){return new this(e).sinh()}function LS(e){return new this(e).sqrt()}function jS(e,t){return new this(e).sub(t)}function US(){var e=0,t=arguments,i=new this(t[e]);for(gE=!1;i.s&&++e<t.length;)i=i.plus(t[e]);return gE=!0,LE(i,this.precision,this.rounding)}function NS(e){return new this(e).tan()}function VS(e){return new this(e).tanh()}function QS(e){return LE(e=new this(e),e.e+1,1)}TE[Symbol.for("nodejs.util.inspect.custom")]=TE.toString,TE[Symbol.toStringTag]="Decimal";var HS=TE.constructor=function e(t){var i,r,n;function s(e){var t,i,r,n=this;if(!(n instanceof s))return new s(e);if(n.constructor=s,wS(e))return n.s=e.s,void(gE?!e.d||e.e>s.maxE?(n.e=NaN,n.d=null):e.e<s.minE?(n.e=0,n.d=[0]):(n.e=e.e,n.d=e.d.slice()):(n.e=e.e,n.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return n.s=1/e<0?-1:1,n.e=0,void(n.d=[0]);if(e<0?(e=-e,n.s=-1):n.s=1,e===~~e&&e<1e7){for(t=0,i=e;i>=10;i/=10)t++;return void(gE?t>s.maxE?(n.e=NaN,n.d=null):t<s.minE?(n.e=0,n.d=[0]):(n.e=t,n.d=[e]):(n.e=t,n.d=[e]))}return 0*e!=0?(e||(n.s=NaN),n.e=NaN,void(n.d=null)):YE(n,e.toString())}if("string"===r)return 45===(i=e.charCodeAt(0))?(e=e.slice(1),n.s=-1):(43===i&&(e=e.slice(1)),n.s=1),ME.test(e)?YE(n,e):JE(n,e);if("bigint"===r)return e<0?(e=-e,n.s=-1):n.s=1,YE(n,e.toString());throw Error(vE+e)}if(s.prototype=TE,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=fS,s.clone=e,s.isDecimal=wS,s.abs=rS,s.acos=nS,s.acosh=sS,s.add=oS,s.asin=aS,s.asinh=lS,s.atan=uS,s.atanh=cS,s.atan2=hS,s.cbrt=AS,s.ceil=dS,s.clamp=pS,s.cos=gS,s.cosh=mS,s.div=vS,s.exp=_S,s.floor=yS,s.hypot=bS,s.ln=xS,s.log=BS,s.log10=CS,s.log2=PS,s.max=MS,s.min=kS,s.mod=ES,s.mul=SS,s.pow=TS,s.random=FS,s.round=IS,s.sign=DS,s.sin=RS,s.sinh=OS,s.sqrt=LS,s.sub=jS,s.sum=US,s.tan=NS,s.tanh=VS,s.trunc=QS,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],i=0;i<n.length;)t.hasOwnProperty(r=n[i++])||(t[r]=this[r]);return s.config(t),s}(fE);dE=new HS(dE),pE=new HS(pE);class GS extends Uk{constructor(e,t){super(e,t),this._commentsList={},this.eventTrigger=e.eventTrigger,this._commentsList={},this._currentMode="path",this._Pathcolor="#066CFC",this._Ellipsecolor="#066CFC",this._Rectcolor="#066CFC",this._Arrowcolor="#066CFC",this._Textcolor="#066CFC",this._PathstrokeWidth="2",this._EllipsestrokeWidth="2",this._RectstrokeWidth="2",this._ArrowstrokeWidth="2",this._TextstrokeWidth="1",this._offsetX=0,this._offsetY=0,this._FontSize="18",this._stratchPos="",this.isCreating=!1,this.isDrawing=!1,this.isMoving=!1,this.isChosed=!1,this.isHolding=!1,this.isStretch=!1,this.isHovering=!1,this.isDuplicate=!1,this.isTyping=!1,this._isTouch=!1,this._revocationMechanism=null,this.on("active",(e=>{e?this.saveSVG():this.endCommentsTool()})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this.initEventListeners()}saveSVG(){const e=document.getElementById("myCanvas"),t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("width",window.innerWidth.toString()),t.setAttribute("height",window.innerHeight.toString());const i=document.createElementNS("http://www.w3.org/2000/svg","image");i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("width",window.innerWidth.toString()),i.setAttribute("height",window.innerHeight.toString()),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.toDataURL()),t.appendChild(i),t.setAttribute("id","svgImage");const r=document.getElementById("comments_panel");r&&(r.innerHTML=""),null==r||r.appendChild(t),this.checkSelectionBox(),this._revocationMechanism=new zS(this.eventTrigger),this.eventTrigger.emit("saveImage")}initEventListeners(){let e,t,i,r,n;const s=(e,t,i,r)=>{const n=[e-t,i-r],s=this.getInitVector(n[0],n[1]),o=this.getVerticalUnitVector(n[0],n[1]),a=.5;return`M ${t},${r}L ${(t-2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(r-2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e-2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i-2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e-7*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i-7*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e+12*Number(this._ArrowstrokeWidth)*a*s[0]).toString()},${(i+12*Number(this._ArrowstrokeWidth)*a*s[1]).toString()}L ${(e+7*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i+7*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e+2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i+2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(t+2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(r+2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L${t},${r}`};this.eventTrigger.on("saveImage",(()=>{const o=document.getElementById("svgImage"),a=e=>{const{target:t}=e;if("text"===t.tagName){this.hiddenAllInput();const e=t.parentNode,i=e.querySelector("foreignObject"),r=i.querySelector("input"),{textContent:n}=e;if(r)r.style.display="inline",t.textContent="";else{const e=document.createElement("input");e.setAttribute("type","text"),e.setAttribute("class","commentInputBox"),""!=n&&e.setAttribute("placeholder",n),i.appendChild(e)}this.isTyping=!0}},l=n=>{if(this._isTouch)return;const{target:s}=n;if("ellipse"===s.tagName||"path"===s.tagName||"rect"===s.tagName||"text"===s.tagName)if("selectionBox"==s.id);else if("handle"==s.getAttribute("type")){e=n.clientX+this._offsetX,t=n.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.isStretch=!0;const{id:s}=n.target;this._stratchPos=s,this.hiddenAllInput()}else this.chosedTarget!=s&&(this.isDuplicate=!1,this.chosedTarget=s),this.showHiddenSelectedBox(!0),this.isChosed=!0,this.isHolding=!0,e=n.clientX+this._offsetX,t=n.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.autoSaveInput(),this.setCurrentMode(""),this.eventTrigger.emit("choseTarget");else if(s.classList.contains("commentInputBox"))this.isTyping=!0;else{if(this.isChosed&&"circle"!==n.target&&(this.showHiddenSelectedBox(!1),this.isChosed=!1,this.chosedTarget=null,this.eventTrigger.emit("choseNothing")),this.isTyping&&this.autoSaveInput(),""==this._currentMode)return;if(!this.isCreating){this.showHiddenSelectedBox(!1),this.isCreating=!0,e=n.clientX+this._offsetX,t=n.clientY+this._offsetY;const i=document.createElementNS("http://www.w3.org/2000/svg","g");let r;switch(i.setAttribute("id",`${this._currentMode}_${this.getTime()}`),this._currentMode){case"path":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke",this._Pathcolor),r.setAttribute("stroke-width",this._PathstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","path");break;case"ellipse":r=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),r.setAttribute("cx",e.toString()),r.setAttribute("cy",t.toString()),r.setAttribute("rx","0"),r.setAttribute("ry","0"),r.setAttribute("stroke",this._Ellipsecolor),r.setAttribute("stroke-width",this._EllipsestrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","ellipse");break;case"rect":r=document.createElementNS("http://www.w3.org/2000/svg","rect"),r.setAttribute("x",e.toString()),r.setAttribute("y",t.toString()),r.setAttribute("stroke",this._Rectcolor),r.setAttribute("stroke-width",this._RectstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","rect");break;case"arrow":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke-width","20"),r.setAttribute("stroke","transparent"),r.setAttribute("fill",this._Arrowcolor),i.setAttribute("type","arrow");break;case"text":if(this.isTyping)this.autoSaveInput();else if(!this.isChosed){const r=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");let n=0;"16"==this._FontSize?(r.setAttribute("width","120"),r.setAttribute("height","26"),n=28):"18"==this._FontSize?(r.setAttribute("width","140"),r.setAttribute("height","28"),n=30):Number(this._FontSize)<=14&&(r.setAttribute("width","100"),r.setAttribute("height",(Number(this._FontSize)+10).toString()),n=Number(this._FontSize)+10),r.setAttribute("x",e),r.setAttribute("y",t);const s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("class","commentInputBox"),s.setAttribute("placeholder","输入内容...");const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("x",e+3),a.setAttribute("y",(t+n-Number(this._FontSize)/2).toString()),a.setAttribute("font-size",this._FontSize),a.setAttribute("stroke",this._Textcolor),a.setAttribute("stroke-width",this._TextstrokeWidth),a.setAttribute("fill",this._Textcolor),a.setAttribute("lengthAdjust","spacingAndGlyphs"),r.appendChild(s),i.setAttribute("type","text"),i.appendChild(r),i.appendChild(a),null==o||o.insertBefore(i,null==o?void 0:o.lastElementChild),s.click(),this.isTyping=!0,this.eventTrigger.emit("createNew")}}"text"!=this._currentMode&&""!=this._currentMode&&(i.appendChild(r),null==o||o.insertBefore(i,null==o?void 0:o.lastElementChild)),this.isChosed=!1}}},u=o=>{var a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E,S,T,F,I,D,R,O,L,j;if(this._isTouch)return;const U=o.clientX+this._offsetX,N=o.clientY+this._offsetY;let V;if(this.isCreating)switch(this.isDrawing=!0,this._currentMode){case"path":V=document.querySelectorAll("g");const i=[];V.forEach((e=>{"path"==e.getAttribute("type")&&i.push(e)}));const r=i[i.length-1].querySelector("path");let n=r.getAttribute("d");n&&(n+=`L ${U},${N}`,r.setAttribute("d",n));break;case"ellipse":var Q=document.querySelectorAll("ellipse"),H=Q[Q.length-1];if(H){var G=Math.abs(U-e)/2,z=Math.abs(N-t)/2;H.setAttribute("cx",((U+e)/2).toString()),H.setAttribute("cy",((N+t)/2).toString()),H.setAttribute("rx",G.toString()),H.setAttribute("ry",z.toString())}break;case"rect":const o=document.querySelectorAll("g"),a=[];o.forEach((e=>{"rect"==e.getAttribute("type")&&a.push(e.childNodes[0])}));const l=a[a.length-1],u=l.getAttribute("x"),c=l.getAttribute("y");if(u&&c){const e=Math.abs(parseInt(u)-U),t=Math.abs(parseInt(c)-N);l.setAttribute("width",e.toString()),l.setAttribute("height",t.toString()),l.setAttribute("rx","9"),l.setAttribute("ry","9"),l.setAttribute("type","comment")}break;case"arrow":V=document.querySelectorAll("g");const h=[];V.forEach((e=>{"arrow"==e.getAttribute("type")&&h.push(e)}));const A=h[h.length-1].querySelector("path");if(A.getAttribute("d")){const i=s(U,e,N,t);A.setAttribute("d",i)}break;case"text":this.isDrawing=!1}else if(this.isHolding){(Math.abs(U-e)>=1||Math.abs(N-t)>=1)&&(this.isMoving=!0);const n=null===(a=this.chosedTarget)||void 0===a?void 0:a.getBBox();switch(this.chosedTarget.tagName){case"path":const s=(null===(l=this.chosedTarget)||void 0===l?void 0:l.getAttribute("d")).replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(s=>{const[o,a]=s.split(",").map(parseFloat),l=Number(o)+Number(U)-Number(n.x)-(Number(e)-Number(i)),u=Number(a)+Number(N)-Number(n.y)-(Number(t)-Number(r));return`${l.toString()},${u.toString()}`}));null===(u=this.chosedTarget)||void 0===u||u.setAttribute("d",s);break;case"ellipse":var W=Number(null===(c=this.chosedTarget)||void 0===c?void 0:c.getAttribute("cx")),K=Number(null===(h=this.chosedTarget)||void 0===h?void 0:h.getAttribute("cy"));const o=Number(null===(A=this.chosedTarget)||void 0===A?void 0:A.getAttribute("rx")),a=Number(null===(d=this.chosedTarget)||void 0===d?void 0:d.getAttribute("ry"));null===(p=this.chosedTarget)||void 0===p||p.setAttribute("cx",U-(e-i)/2+o),null===(f=this.chosedTarget)||void 0===f||f.setAttribute("cy",N-(t-r)/2+a);break;case"rect":null===(g=this.chosedTarget)||void 0===g||g.setAttribute("x",U-(e-i)),null===(m=this.chosedTarget)||void 0===m||m.setAttribute("y",N-(t-r));break;case"text":null===(v=this.chosedTarget)||void 0===v||v.setAttribute("x",(U-(e-i)).toString()),null===(_=this.chosedTarget)||void 0===_||_.setAttribute("y",(N-(t-r)+3*n.height/4).toString());var X=this.chosedTarget.getAttribute("font-size");const y=this.chosedTarget.parentNode;if(y){const e=y.querySelector("foreignObject");e&&(e.setAttribute("x",Number(this.chosedTarget.getAttribute("x"))-3),e.setAttribute("y",Number(this.chosedTarget.getAttribute("y"))-(24-Number(X)/2)))}}this.updateSelectionBox()}else if(this.isStretch){switch(this.chosedTarget.parentNode.getAttribute("type")){case"path":const i=null===(y=this.chosedTarget)||void 0===y?void 0:y.getAttribute("d");let r,s,o,a,l;n=null===(b=this.chosedTarget)||void 0===b?void 0:b.getBBox(),-1!==this._stratchPos.indexOf("right")&&n.width+U-e<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("left")&&n.width-(U-e)<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("top")&&n.height-(N-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),-1!==this._stratchPos.indexOf("bottom")&&n.height+(N-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),r=i.replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(i=>{const[r,u]=i.split(",").map(parseFloat);return-1!==this._stratchPos.indexOf("left")||-1!==this._stratchPos.indexOf("right")?(-1!==this._stratchPos.indexOf("right")&&(a=new HS(U-e).mul(new HS(r-n.x).div(n.width))),-1!==this._stratchPos.indexOf("left")&&(a=new HS(U-e).mul(new HS(n.x+n.width-r).div(n.width))),!Number.isNaN(a)&&a||(a=new HS(0)),s=new HS(r).add(a)):s=new HS(r),-1!==this._stratchPos.indexOf("top")||-1!==this._stratchPos.indexOf("bottom")?(-1!==this._stratchPos.indexOf("top")&&(l=new HS(N-t).mul(new HS(n.y+n.height-u).div(n.height))),-1!==this._stratchPos.indexOf("bottom")&&(l=new HS(N-t).mul(new HS(u-n.y).div(n.height))),!Number.isNaN(l)&&l||(l=new HS(0)),o=new HS(u).add(l)):o=new HS(u),`${s.toFixed(16)},${o.toFixed(16)}`})),null===(w=this.chosedTarget)||void 0===w||w.setAttribute("d",r);break;case"ellipse":W=Number(null===(x=this.chosedTarget)||void 0===x?void 0:x.getAttribute("cx")),K=Number(null===(B=this.chosedTarget)||void 0===B?void 0:B.getAttribute("cy")),G=Number(null===(P=this.chosedTarget)||void 0===P?void 0:P.getAttribute("rx")),z=Number(null===(C=this.chosedTarget)||void 0===C?void 0:C.getAttribute("ry"));-1!==this._stratchPos.indexOf("left")?(W+=.5*(U-e),G-=.5*(U-e)):-1!==this._stratchPos.indexOf("right")&&(W+=.5*(U-e),G+=.5*(U-e)),-1!==this._stratchPos.indexOf("top")?(K+=.5*(N-t),z-=.5*(N-t)):-1!==this._stratchPos.indexOf("bottom")&&(K+=.5*(N-t),z+=.5*(N-t)),G<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(M=this.chosedTarget)||void 0===M||M.setAttribute("cx",W.toString()),null===(k=this.chosedTarget)||void 0===k||k.setAttribute("rx",G.toString())),z<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(E=this.chosedTarget)||void 0===E||E.setAttribute("cy",K.toString()),null===(S=this.chosedTarget)||void 0===S||S.setAttribute("ry",z.toString()));break;case"rect":var q=Number(null===(T=this.chosedTarget)||void 0===T?void 0:T.getAttribute("x")),Y=Number(null===(F=this.chosedTarget)||void 0===F?void 0:F.getAttribute("y")),J=Number(null===(I=this.chosedTarget)||void 0===I?void 0:I.getAttribute("width")),Z=Number(null===(D=this.chosedTarget)||void 0===D?void 0:D.getAttribute("height"));-1!==this._stratchPos.indexOf("left")?(q+=U-e,J-=U-e):-1!==this._stratchPos.indexOf("right")&&(J+=U-e),J<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(R=this.chosedTarget)||void 0===R||R.setAttribute("x",q.toString()),null===(O=this.chosedTarget)||void 0===O||O.setAttribute("width",J.toString())),-1!==this._stratchPos.indexOf("top")?(Y+=N-t,Z-=N-t):-1!==this._stratchPos.indexOf("bottom")&&(Z+=N-t),Z<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(L=this.chosedTarget)||void 0===L||L.setAttribute("y",Y.toString()),null===(j=this.chosedTarget)||void 0===j||j.setAttribute("height",Z.toString()))}this.updateSelectionBox(),e=o.clientX+this._offsetX,t=o.clientY+this._offsetY}},c=()=>{if(!this._isTouch)if(this.isHolding&&(this.isMoving&&(this.isMoving=!1,this.AddNewState((()=>{}))),this.isHolding=!1),this.isCreating){if(this.isDrawing)this.isDrawing=!1,this.eventTrigger.emit("createNew"),this.AddNewState((()=>{}));else if(!this.isChosed&&!this.isStretch&&"text"!=this._currentMode&&""!=this._currentMode){const e=null==o?void 0:o.lastElementChild;if(e){const t=e.previousElementSibling;null==o||o.removeChild(t)}}this.chosedTarget=null,this.isCreating=!1}else this.isStretch&&(this.isStretch=!1,this.AddNewState((()=>{})))},h=e=>{"Delete"!==e.key&&8!==e.keyCode||this.deleteCurrentComments(),!e.ctrlKey||"c"!==e.key&&"C"!==e.key||this.isChosed&&(this.isDuplicate=!0),!e.ctrlKey||"v"!==e.key&&"V"!==e.key||this.isDuplicate&&this.duplicateComment(),(e.ctrlKey&&"z"===e.key||"Z"===e.key)&&this.UnDo((()=>{})),(e.ctrlKey&&"y"===e.key||"Y"===e.key)&&this.ReDo((()=>{})),"Enter"===e.key&&this.autoSaveInput()},A=n=>{if(!this._isTouch)return;const s=n.touches[0],{target:a}=s;if("ellipse"===a.tagName||"path"===a.tagName||"rect"===a.tagName||"arrow"===a.tagName||"text"===a.tagName)if("handle"==a.getAttribute("type")){e=s.clientX+this._offsetX,t=s.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.isStretch=!0;const{id:n}=s.target;this._stratchPos=n}else this.chosedTarget!=a&&(this.isDuplicate=!1,this.chosedTarget=a),this.showHiddenSelectedBox(!0),this.isChosed=!0,this.isHolding=!0,e=s.clientX+this._offsetX,t=s.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.setCurrentMode(""),this.eventTrigger.emit("choseTarget");else if(a.classList.contains("commentInputBox"))this.isTyping=!0;else{if(this.isChosed&&"circle"!==s.target&&(this.showHiddenSelectedBox(!1),this.isChosed=!1,this.chosedTarget=null,this.eventTrigger.emit("choseNothing")),""==this._currentMode)return;if(!this.isCreating){this.showHiddenSelectedBox(!1),this.isCreating=!0,e=s.clientX+this._offsetX,t=s.clientY+this._offsetY;const i=document.createElementNS("http://www.w3.org/2000/svg","g");let r;switch(i.setAttribute("id",`${this._currentMode}_${this.getTime()}`),this._currentMode){case"path":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke",this._Pathcolor),r.setAttribute("stroke-width",this._PathstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","path");break;case"ellipse":r=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),r.setAttribute("cx",e.toString()),r.setAttribute("cy",t.toString()),r.setAttribute("rx","0"),r.setAttribute("ry","0"),r.setAttribute("stroke",this._Ellipsecolor),r.setAttribute("stroke-width",this._EllipsestrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","ellipse");break;case"rect":r=document.createElementNS("http://www.w3.org/2000/svg","rect"),r.setAttribute("x",e.toString()),r.setAttribute("y",t.toString()),r.setAttribute("stroke",this._Rectcolor),r.setAttribute("stroke-width",this._RectstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","rect");break;case"arrow":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke-width","20"),r.setAttribute("stroke","transparent"),r.setAttribute("fill",this._Arrowcolor),i.setAttribute("type","arrow");break;case"text":this.eventTrigger.emit("clickCreateText",s)}"text"!=this._currentMode&&""!=this._currentMode&&(i.appendChild(r),null==o||o.insertBefore(i,null==o?void 0:o.lastElementChild)),this.isChosed=!1}}},d=o=>{var a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E,S,T,F,I,D,R,O,L,j;if(!this._isTouch)return;const U=o.touches[0],N=U.clientX+this._offsetX,V=U.clientY+this._offsetY;let Q;if(this.isCreating)switch(this.isDrawing=!0,this._currentMode){case"path":Q=document.querySelectorAll("g");const i=[];Q.forEach((e=>{"path"==e.getAttribute("type")&&i.push(e)}));const r=i[i.length-1].querySelector("path");let n=r.getAttribute("d");n&&(n+=`L ${N},${V}`,r.setAttribute("d",n));break;case"ellipse":var H=document.querySelectorAll("ellipse"),G=H[H.length-1];if(G){var z=Math.abs(N-e)/2,W=Math.abs(V-t)/2;G.setAttribute("cx",((N+e)/2).toString()),G.setAttribute("cy",((V+t)/2).toString()),G.setAttribute("rx",z.toString()),G.setAttribute("ry",W.toString())}break;case"rect":var K=document.querySelectorAll("rect"),X=K[K.length-10],q=X.getAttribute("x"),Y=X.getAttribute("y");if(q&&Y){var J=Math.abs(parseInt(q)-N),Z=Math.abs(parseInt(Y)-V);X.setAttribute("width",J.toString()),X.setAttribute("height",Z.toString()),X.setAttribute("rx","9"),X.setAttribute("ry","9"),X.setAttribute("type","comment")}break;case"arrow":Q=document.querySelectorAll("g");const o=[];Q.forEach((e=>{"arrow"==e.getAttribute("type")&&o.push(e)}));const a=o[o.length-1].querySelector("path");if(a.getAttribute("d")){const i=s(N,e,V,t);a.setAttribute("d",i)}break;case"text":this.isDrawing=!1}else if(this.isHolding){(Math.abs(N-e)>=1||Math.abs(V-t)>=1)&&(this.isMoving=!0);const n=null===(a=this.chosedTarget)||void 0===a?void 0:a.getBBox();switch(this.chosedTarget.tagName){case"path":const s=(null===(l=this.chosedTarget)||void 0===l?void 0:l.getAttribute("d")).replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(s=>{const[o,a]=s.split(",").map(parseFloat),l=Number(o)+Number(N)-Number(n.x)-(Number(e)-Number(i)),u=Number(a)+Number(V)-Number(n.y)-(Number(t)-Number(r));return`${l.toString()},${u.toString()}`}));null===(u=this.chosedTarget)||void 0===u||u.setAttribute("d",s);break;case"ellipse":var $=Number(null===(c=this.chosedTarget)||void 0===c?void 0:c.getAttribute("cx")),ee=Number(null===(h=this.chosedTarget)||void 0===h?void 0:h.getAttribute("cy"));const o=Number(null===(A=this.chosedTarget)||void 0===A?void 0:A.getAttribute("rx")),a=Number(null===(d=this.chosedTarget)||void 0===d?void 0:d.getAttribute("ry"));null===(p=this.chosedTarget)||void 0===p||p.setAttribute("cx",N-(e-i)/2+o),null===(f=this.chosedTarget)||void 0===f||f.setAttribute("cy",V-(t-r)/2+a);break;case"rect":null===(g=this.chosedTarget)||void 0===g||g.setAttribute("x",N-(e-i)),null===(m=this.chosedTarget)||void 0===m||m.setAttribute("y",V-(t-r));break;case"text":null===(v=this.chosedTarget)||void 0===v||v.setAttribute("x",(N-(e-i)).toString()),null===(_=this.chosedTarget)||void 0===_||_.setAttribute("y",(V-(t-r)+3*n.height/4).toString());var te=this.chosedTarget.getAttribute("font-size");const y=this.chosedTarget.parentNode;if(y){const e=y.querySelector("foreignObject");e&&(e.setAttribute("x",Number(this.chosedTarget.getAttribute("x"))-3),e.setAttribute("y",Number(this.chosedTarget.getAttribute("y"))-(24-Number(te)/2)))}}this.updateSelectionBox()}else if(this.isStretch){switch(this.chosedTarget.parentNode.getAttribute("type")){case"path":const i=null===(y=this.chosedTarget)||void 0===y?void 0:y.getAttribute("d");let r,s,o,a,l;n=null===(b=this.chosedTarget)||void 0===b?void 0:b.getBBox(),-1!==this._stratchPos.indexOf("right")&&n.width+N-e<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("left")&&n.width-(N-e)<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("top")&&n.height-(V-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),-1!==this._stratchPos.indexOf("bottom")&&n.height+(V-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),r=i.replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(i=>{const[r,u]=i.split(",").map(parseFloat);return-1!==this._stratchPos.indexOf("left")||-1!==this._stratchPos.indexOf("right")?(-1!==this._stratchPos.indexOf("right")&&(a=new HS(N-e).mul(new HS(r-n.x).div(n.width))),-1!==this._stratchPos.indexOf("left")&&(a=new HS(N-e).mul(new HS(n.x+n.width-r).div(n.width))),!Number.isNaN(a)&&a||(a=new HS(0)),s=new HS(r).add(a)):s=new HS(r),-1!==this._stratchPos.indexOf("top")||-1!==this._stratchPos.indexOf("bottom")?(-1!==this._stratchPos.indexOf("top")&&(l=new HS(V-t).mul(new HS(n.y+n.height-u).div(n.height))),-1!==this._stratchPos.indexOf("bottom")&&(l=new HS(V-t).mul(new HS(u-n.y).div(n.height))),!Number.isNaN(l)&&l||(l=new HS(0)),o=new HS(u).add(l)):o=new HS(u),`${s.toFixed(16)},${o.toFixed(16)}`})),null===(w=this.chosedTarget)||void 0===w||w.setAttribute("d",r);break;case"ellipse":$=Number(null===(x=this.chosedTarget)||void 0===x?void 0:x.getAttribute("cx")),ee=Number(null===(B=this.chosedTarget)||void 0===B?void 0:B.getAttribute("cy")),z=Number(null===(P=this.chosedTarget)||void 0===P?void 0:P.getAttribute("rx")),W=Number(null===(C=this.chosedTarget)||void 0===C?void 0:C.getAttribute("ry"));-1!==this._stratchPos.indexOf("left")?($+=.5*(N-e),z-=.5*(N-e)):-1!==this._stratchPos.indexOf("right")&&($+=.5*(N-e),z+=.5*(N-e)),-1!==this._stratchPos.indexOf("top")?(ee+=.5*(V-t),W-=.5*(V-t)):-1!==this._stratchPos.indexOf("bottom")&&(ee+=.5*(V-t),W+=.5*(V-t)),z<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(M=this.chosedTarget)||void 0===M||M.setAttribute("cx",$.toString()),null===(k=this.chosedTarget)||void 0===k||k.setAttribute("rx",z.toString())),W<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(E=this.chosedTarget)||void 0===E||E.setAttribute("cy",ee.toString()),null===(S=this.chosedTarget)||void 0===S||S.setAttribute("ry",W.toString()));break;case"rect":var ie=Number(null===(T=this.chosedTarget)||void 0===T?void 0:T.getAttribute("x")),re=Number(null===(F=this.chosedTarget)||void 0===F?void 0:F.getAttribute("y"));J=Number(null===(I=this.chosedTarget)||void 0===I?void 0:I.getAttribute("width")),Z=Number(null===(D=this.chosedTarget)||void 0===D?void 0:D.getAttribute("height"));-1!==this._stratchPos.indexOf("left")?(ie+=N-e,J-=N-e):-1!==this._stratchPos.indexOf("right")&&(J+=N-e),J<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(R=this.chosedTarget)||void 0===R||R.setAttribute("x",ie.toString()),null===(O=this.chosedTarget)||void 0===O||O.setAttribute("width",J.toString())),-1!==this._stratchPos.indexOf("top")?(re+=V-t,Z-=V-t):-1!==this._stratchPos.indexOf("bottom")&&(Z+=V-t),Z<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(L=this.chosedTarget)||void 0===L||L.setAttribute("y",re.toString()),null===(j=this.chosedTarget)||void 0===j||j.setAttribute("height",Z.toString()))}this.updateSelectionBox(),e=U.clientX+this._offsetX,t=U.clientY+this._offsetY}},p=e=>{if(this._isTouch)if(this.isHolding&&(this.isMoving&&(this.isMoving=!1,this.AddNewState((()=>{}))),this.isHolding=!1),this.isCreating){if(this.isDrawing)this.isDrawing=!1,this.eventTrigger.emit("createNew"),this.AddNewState((()=>{}));else if(!this.isChosed&&!this.isStretch&&"text"!=this._currentMode&&""!=this._currentMode){const e=null==o?void 0:o.lastElementChild;if(e){const t=e.previousElementSibling;null==o||o.removeChild(t)}}this.chosedTarget=null,this.isCreating=!1}else this.isStretch&&(this.isStretch=!1,this.AddNewState((()=>{})))};o?(document.addEventListener("keydown",h.bind(this)),o.addEventListener("dblclick",a.bind(this)),o.addEventListener("mousedown",l.bind(this)),document.addEventListener("mousemove",u.bind(this)),o.addEventListener("mouseup",c.bind(this)),o.addEventListener("touchstart",A.bind(this)),document.addEventListener("touchmove",d.bind(this)),o.addEventListener("touchend",p.bind(this))):this.log("no svgImage");const f=()=>{const e=document.getElementById("svgImage");e?(document.removeEventListener("keydown",h.bind(this)),e.removeEventListener("dblclick",a.bind(this)),e.removeEventListener("mousedown",l.bind(this)),document.removeEventListener("mousemove",u.bind(this)),e.removeEventListener("mouseup",c.bind(this)),e.removeEventListener("touchstart",A.bind(this)),document.removeEventListener("touchmove",d.bind(this)),e.removeEventListener("touchend",p.bind(this))):this.log("no svgImage");const t=document.getElementById("comments_panel");t&&(t.innerHTML=""),this.eventTrigger.off("clearAll",f)};this.eventTrigger.on("clearAll",f)}))}clickCreateText(e,t){var i,r;let n;n=e.touches?e.touches[0]:e,this.showHiddenSelectedBox(!1);const s=n.clientX+this._offsetX,o=n.clientY+this._offsetY,a=document.createElementNS("http://www.w3.org/2000/svg","g");if(a.setAttribute("id",`${this._currentMode}_${this.getTime()}`),!this.isTyping&&!this.isChosed){const e=document.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("x",s+3),e.setAttribute("y",(o+24-Number(this._FontSize)/2).toString()),e.setAttribute("font-size",this._FontSize),e.setAttribute("stroke",this._Textcolor),e.setAttribute("stroke-width",this._TextstrokeWidth),e.setAttribute("fill",this._Textcolor),e.setAttribute("lengthAdjust","spacingAndGlyphs"),e.textContent=t,a.setAttribute("type","text"),a.appendChild(e);const n=document.getElementById("selectionBox_g");n&&(null===(i=n.parentNode)||void 0===i||i.insertBefore(a,null===(r=n.parentNode)||void 0===r?void 0:r.lastElementChild)),this.isTyping=!0,this.AddNewState((()=>{this.eventTrigger.emit("createNew")}))}}getInitVector(e,t){const i=Math.sqrt(e*e+t*t);return 0==i?[0,0]:[e/i,t/i]}getVerticalUnitVector(e,t){if(0===Math.sqrt(e*e+t*t))return[0,0];const i=-t,r=e,n=Math.sqrt(i*i+r*r);return[i/n,r/n]}getTwoPointLength(e,t){return e==t?0:Math.sqrt(e*e+t*t)}hiddenAllInput(){const e=document.querySelectorAll("foreignObject");e.length>0&&e.forEach((e=>{const t=e.querySelector("input"),i=e.parentNode;let r;i&&(r=i.querySelector("text")),r&&t&&(""!=t.value?r.textContent=t.value:r.textContent="双击此处输入内容",t.style.display="none")}))}showHiddenSelectedBox(e){if(e){const e=this.chosedTarget.getBBox();this.selectionBox.setAttribute("x",e.x),this.selectionBox.setAttribute("y",e.y),this.selectionBox.setAttribute("width",e.width),this.selectionBox.setAttribute("height",e.height),this.selectionBox.style.display="inline";for(var t=0;t<8;t++)this.handles[t].style.display="inline"}else{this.selectionBox.style.display="none";for(t=0;t<8;t++)this.handles[t].style.display="none"}this.updateSelectionBox()}updateSelectionBox(){var e;const t=null===(e=this.chosedTarget)||void 0===e?void 0:e.getBBox();if(t){this.selectionBox.setAttribute("x",t.x-4),this.selectionBox.setAttribute("y",t.y-4),this.selectionBox.setAttribute("width",t.width+8),this.selectionBox.setAttribute("height",t.height+8);const e=this.selectionBox.getBBox();for(let t=0;t<8;t++){const i=this.handles[t];switch(t){case 0:i.setAttribute("x",e.x-4),i.setAttribute("y",e.y-4);break;case 1:i.setAttribute("x",e.x+e.width/2-4),i.setAttribute("y",e.y-4);break;case 2:i.setAttribute("x",e.x+e.width-4),i.setAttribute("y",e.y-4);break;case 3:i.setAttribute("x",e.x+e.width-4),i.setAttribute("y",e.y+e.height/2-4);break;case 4:i.setAttribute("x",e.x+e.width-4),i.setAttribute("y",e.y+e.height-4);break;case 5:i.setAttribute("x",e.x+e.width/2-4),i.setAttribute("y",e.y+e.height-4);break;case 6:i.setAttribute("x",e.x-4),i.setAttribute("y",e.y+e.height-4);break;case 7:i.setAttribute("x",e.x-4),i.setAttribute("y",e.y+e.height/2-4)}}}}publishComments(){this.deleteSvgCommentsListeners()}updateCommentsColor(){document.querySelectorAll("path").forEach((e=>{e.setAttribute("stroke","red")}));document.querySelectorAll("ellipse").forEach((e=>{e.setAttribute("stroke","blue")}));document.querySelectorAll("rect").forEach((e=>{"selectionBox"!=e.id&&e.setAttribute("stroke","green")}))}deleteSvgCommentsListeners(){const e=document.getElementById("svgImage");e&&(e.removeEventListener("mousedown",(()=>{})),document.removeEventListener("mousemove",(()=>{})),e.removeEventListener("mouseup",(()=>{})),e.removeEventListener("mouseover",(()=>{})))}deleteCurrentComments(){if(this.isChosed){const e=document.getElementById("svgImage");null==e||e.removeChild(this.chosedTarget.parentNode),this.showHiddenSelectedBox(!1)}this.AddNewState((()=>{}))}getTime(){const e=new Date;return e.getFullYear()+(e.getMonth()+1<10?`0${e.getMonth()+1}`:e.getMonth()+1)+(e.getDate()<10?`0${e.getDate()}`:e.getDate())+(e.getHours()<10?`0${e.getHours()}`:e.getHours())+(e.getMinutes()<10?`0${e.getMinutes()}`:e.getMinutes())+(e.getSeconds()<10?`0${e.getSeconds()}`:e.getSeconds())}duplicateComment(){var e,t,i,r,n,s,o,a,l,u,c,h,A,d;if(this.isChosed){const f=document.getElementById("svgImage"),g=this.chosedTarget.parentNode.cloneNode(!0);switch(null==f||f.insertBefore(g,null==f?void 0:f.lastElementChild),this.chosedTarget=g.firstChild,this.chosedTarget.tagName){case"path":const f=(null===(e=this.chosedTarget)||void 0===e?void 0:e.getAttribute("d")).replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(e=>{const[t,i]=e.split(",").map(parseFloat);return`${t+20},${i+10}`}));null===(t=this.chosedTarget)||void 0===t||t.setAttribute("d",f);break;case"ellipse":null===(i=this.chosedTarget)||void 0===i||i.setAttribute("cx",(Number(null===(r=this.chosedTarget)||void 0===r?void 0:r.getAttribute("cx"))+20).toString()),null===(n=this.chosedTarget)||void 0===n||n.setAttribute("cy",(Number(null===(s=this.chosedTarget)||void 0===s?void 0:s.getAttribute("cy"))+10).toString());break;case"rect":null===(o=this.chosedTarget)||void 0===o||o.setAttribute("x",(Number(null===(a=this.chosedTarget)||void 0===a?void 0:a.getAttribute("x"))+20).toString()),null===(l=this.chosedTarget)||void 0===l||l.setAttribute("y",(Number(null===(u=this.chosedTarget)||void 0===u?void 0:u.getAttribute("y"))+10).toString());break;case"text":null===(c=this.chosedTarget)||void 0===c||c.setAttribute("x",(Number(null===(h=this.chosedTarget)||void 0===h?void 0:h.getAttribute("x"))+20).toString()),null===(A=this.chosedTarget)||void 0===A||A.setAttribute("y",(Number(null===(d=this.chosedTarget)||void 0===d?void 0:d.getAttribute("x"))+10).toString());var p=this.chosedTarget.getAttribute("font-size");const g=this.chosedTarget.parentNode;if(g){const e=g.querySelector("foreignObject");e&&(e.setAttribute("x",(Number(this.chosedTarget.getAttribute("x"))-3+20).toString()),e.setAttribute("y",(Number(this.chosedTarget.getAttribute("y"))-(24-Number(p)/2)+10).toString()))}}this.updateSelectionBox()}this.AddNewState((()=>{}))}AddNewState(e){this.saveCurrentState((t=>{this._revocationMechanism&&this._revocationMechanism&&this._revocationMechanism.AddNewState(t,e)})),this.eventTrigger.emit("newState")}saveCurrentState(e){function t(e){const t={};for(let i=0;i<e.length;i++){const r=e[i];t[r.name]=r.value}return t}const i=document.getElementById("svgImage");if(i){const e=i.querySelectorAll("g");var r=[];e.forEach((e=>{if(e.getAttribute("id")){const n=e.attributes,s=e.children,o=new Map;let a=null;if("text"===e.getAttribute("type")){for(let e=0;e<s.length;e++){const{tagName:i}=s[e];o.set(i,t(s[e].attributes)),"text"===i&&(a=s[e].textContent)}var i=new WS(n,o,a);r.push(i)}else{for(let e=0;e<s.length;e++)o.set(s[e].tagName,t(s[e].attributes));i=new WS(n,o,null);r.push(i)}}}))}e(r)}displayState(e){const t=document.getElementById("svgImage");if(t){t.querySelectorAll("g").forEach((e=>{e.getAttribute("id")&&t.removeChild(e)}));for(const n in e){const s=e[n];var i=document.createElementNS("http://www.w3.org/2000/svg","g");const{attributes:o}=s;var{textContent:r}=s;for(let e=0;e<o.length;e++){const t=o[e].name,r=o[e].value;i.setAttribute(t,r)}const{childrenContents:a}=s;a.forEach(((e,t)=>{const n=document.createElementNS("http://www.w3.org/2000/svg",t);if("text"==t&&(n.textContent=r),e)for(const t in e){const i=e[t];n.setAttribute(t,i)}i.appendChild(n)})),null==t||t.insertBefore(i,null==t?void 0:t.lastElementChild);const l=null==t?void 0:t.querySelector("image");l&&(null==t||t.insertBefore(l,null==t?void 0:t.firstElementChild));const u=null==t?void 0:t.querySelector("#selectionBox_g");u&&(null==t||t.removeChild(u),null==t||t.appendChild(u))}}}autoSaveInput(e){this.isTyping&&(this.isTyping=!1,this.hiddenAllInput(),this.AddNewState((()=>{e&&e()})))}setCurrentMode(e){this.autoSaveInput(),this._currentMode=e,""===e&&this.eventTrigger.emit("cancelAllMode")}ReDo(e){this.autoSaveInput(),this._revocationMechanism&&this._revocationMechanism.ReDo((t=>{this.displayState(t),this.showHiddenSelectedBox(!1),e&&e()})),this.checkSelectionBox()}UnDo(e){this.autoSaveInput(),this._revocationMechanism&&this._revocationMechanism.UnDo((t=>{this.displayState(t),this.showHiddenSelectedBox(!1),e&&e()})),this.checkSelectionBox()}checkSelectionBox(){const e=document.getElementById("svgImage"),t=null==e?void 0:e.querySelector("#selectionBox_g");if(t){if(t.childNodes.length>2)return;null==e||e.removeChild(t)}this.selectionBox=null,this.handles=[];const i=document.createElementNS("http://www.w3.org/2000/svg","g");this.selectionBox=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.selectionBox.setAttribute("stroke","#066CFC"),this.selectionBox.setAttribute("stroke-width","1"),this.selectionBox.setAttribute("fill","none"),this.selectionBox.setAttribute("id","selectionBox"),this.selectionBox.style.display="none",i.setAttribute("id","selectionBox_g"),i.appendChild(this.selectionBox);for(let e=0;e<8;e++){const t=document.createElementNS("http://www.w3.org/2000/svg","rect");var r;t.setAttribute("width","8"),t.setAttribute("height","8"),t.setAttribute("rx","2"),t.setAttribute("ry","2"),0==e&&(r="left_top",t.setAttribute("id",r)),1==e&&(r="top",t.setAttribute("id",r)),2==e&&(r="right_top",t.setAttribute("id",r)),3==e&&(r="right",t.setAttribute("id",r)),4==e&&(r="right_bottom",t.setAttribute("id",r)),5==e&&(r="bottom",t.setAttribute("id",r)),6==e&&(r="left_bottom",t.setAttribute("id",r)),7==e&&(r="left",t.setAttribute("id",r)),t.setAttribute("type","handle"),t.setAttribute("fill","white"),t.setAttribute("stroke-width","0.8"),t.setAttribute("stroke","#066CFC"),t.setAttribute("class","selection_box_handle"),t.style.cursor="pointer",t.style.display="none",i.appendChild(t),this.handles.push(t)}null==e||e.appendChild(i)}endCommentsTool(){var e;this._commentsList={},this._currentMode="path",this._Pathcolor="#066CFC",this._Ellipsecolor="#066CFC",this._Rectcolor="#066CFC",this._Arrowcolor="#066CFC",this._Textcolor="#066CFC",this._PathstrokeWidth="2",this._EllipsestrokeWidth="2",this._RectstrokeWidth="2",this._ArrowstrokeWidth="2",this._TextstrokeWidth="1",this._FontSize="16",this._stratchPos="",this.isCreating=!1,this.isDrawing=!1,this.isMoving=!1,this.isChosed=!1,this.isHolding=!1,this.isStretch=!1,this.isHovering=!1,this.isDuplicate=!1,this.isTyping=!1,this.chosedTarget=null,this.selectionBox=null,this.handles=null,this.setActive(!1),null===(e=this._revocationMechanism)||void 0===e||e.destroy(),this._revocationMechanism=null,this.eventTrigger.emit("clearAll")}saveComments(e){this.showHiddenSelectedBox(!1),this.autoSaveInput(e)}setTargetColor(e){if("text"==this.chosedTarget.tagName)this.chosedTarget.setAttribute("stroke",e),this.chosedTarget.setAttribute("fill",e);else if("path"==this.chosedTarget.tagName){const t=this.chosedTarget.parentNode;t&&"arrow"==t.getAttribute("type")?(this.chosedTarget.setAttribute("stroke",e),this.chosedTarget.setAttribute("fill",e)):this.chosedTarget.setAttribute("stroke",e)}else this.chosedTarget.setAttribute("stroke",e);this.AddNewState((()=>{}))}setTargetWidth(e){"text"==this.chosedTarget.tagName?this.chosedTarget.setAttribute("font-size",e.toString()):this.chosedTarget.setAttribute("stroke-width",e.toString()),this.AddNewState((()=>{}))}set isTouch(e){this._isTouch=e}set offsetX(e){this._offsetX=e}set offsetY(e){this._offsetY=e}set pathColor(e){this._Pathcolor=e}set ellipseColor(e){this._Ellipsecolor=e}set rectColor(e){this._Rectcolor=e}set arrowColor(e){this._Arrowcolor=e}set textColor(e){this._Textcolor=e}set pathStrokeWidth(e){this._PathstrokeWidth=e}set ellipseStrokeWidth(e){this._EllipsestrokeWidth=e}set rectStrokeWidth(e){this._RectstrokeWidth=e}set arrowSize(e){this._ArrowstrokeWidth=e}set textFontSize(e){this._FontSize=e}destroy(){this.endCommentsTool()}}class zS{constructor(e){this.eventTrigger=e,this.stateMap=new Map,this.stateIndex=0,this.stateMap.set(0,null)}AddNewState(e,t){if(0===this.stateIndex)this.stateIndex+=1,this.stateMap.set(this.stateIndex,e),this.stateIndex+=1;else{(function(e,t){if(null==t||null==e||e.length!==t.length)return!1;for(let r=0;r<e.length;r++){if(!i(e[r],t[r]))return!1}return!0})(e,this.stateMap.get(this.stateIndex-1))||(this.stateMap.set(this.stateIndex,e),this.stateIndex+=1)}if(this.stateMap.size-1>this.stateIndex){for(let e=this.stateIndex;e<=this.stateMap.size;e++)this.stateMap.delete(e);this.stateIndex=this.stateMap.size-1}function i(e,t){return Object.keys(e).length===Object.keys(t).length&&(!!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){const r=e.item(i),n=t.item(i);if(r&&n&&(r.name!==n.name||r.value!==n.value))return!1}return!0}(e.attributes,t.attributes)&&(!!function(e,t){if(e.size!==t.size)return!1;for(const[i,r]of e)if(!t.has(i)||t.get(i)!==r)return!1;return!0}(e.childrenContents,t.childrenContents)&&e.textContent===t.textContent))}t()}ReDo(e){this.stateIndex==this.stateMap.size?(this.eventTrigger.emit("noNewState"),e(this.stateMap.get(this.stateIndex-1))):(this.stateIndex+=1,this.stateIndex==this.stateMap.size&&this.eventTrigger.emit("noNewState"),e(this.stateMap.get(this.stateIndex-1)))}UnDo(e){1==this.stateIndex?this.eventTrigger.emit("noPreviousState"):(this.stateIndex-=1,1==this.stateIndex&&this.eventTrigger.emit("noPreviousState"),e(this.stateMap.get(this.stateIndex-1)))}destroy(){this.stateIndex=0,this.stateMap.clear()}}class WS{constructor(e,t,i){this.attributes=e,this.childrenContents=t,this.textContent=i}}function KS(e,t){return function(){return e.apply(t,arguments)}}const{toString:XS}=Object.prototype,{getPrototypeOf:qS}=Object,{iterator:YS,toStringTag:JS}=Symbol,ZS=(e=>t=>{const i=XS.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),$S=e=>(e=e.toLowerCase(),t=>ZS(t)===e),eT=e=>t=>typeof t===e,{isArray:tT}=Array,iT=eT("undefined");const rT=$S("ArrayBuffer");const nT=eT("string"),sT=eT("function"),oT=eT("number"),aT=e=>null!==e&&"object"==typeof e,lT=e=>{if("object"!==ZS(e))return!1;const t=qS(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||JS in e||YS in e)},uT=$S("Date"),cT=$S("File"),hT=$S("Blob"),AT=$S("FileList"),dT=$S("URLSearchParams"),[pT,fT,gT,mT]=["ReadableStream","Request","Response","Headers"].map($S);function vT(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let r,n;if("object"!=typeof e&&(e=[e]),tT(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{const n=i?Object.getOwnPropertyNames(e):Object.keys(e),s=n.length;let o;for(r=0;r<s;r++)o=n[r],t.call(null,e[o],o,e)}}function _T(e,t){t=t.toLowerCase();const i=Object.keys(e);let r,n=i.length;for(;n-- >0;)if(r=i[n],t===r.toLowerCase())return r;return null}const yT="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,bT=e=>!iT(e)&&e!==yT;const wT=(xT="undefined"!=typeof Uint8Array&&qS(Uint8Array),e=>xT&&e instanceof xT);var xT;const BT=$S("HTMLFormElement"),PT=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),CT=$S("RegExp"),MT=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),r={};vT(i,((i,n)=>{let s;!1!==(s=t(i,n,e))&&(r[n]=s||i)})),Object.defineProperties(e,r)};const kT=$S("AsyncFunction"),ET=(ST="function"==typeof setImmediate,TT=sT(yT.postMessage),ST?setImmediate:TT?(FT=`axios@${Math.random()}`,IT=[],yT.addEventListener("message",(({source:e,data:t})=>{e===yT&&t===FT&&IT.length&&IT.shift()()}),!1),e=>{IT.push(e),yT.postMessage(FT,"*")}):e=>setTimeout(e));var ST,TT,FT,IT;const DT="undefined"!=typeof queueMicrotask?queueMicrotask.bind(yT):"undefined"!=typeof process&&process.nextTick||ET;var RT={isArray:tT,isArrayBuffer:rT,isBuffer:function(e){return null!==e&&!iT(e)&&null!==e.constructor&&!iT(e.constructor)&&sT(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||sT(e.append)&&("formdata"===(t=ZS(e))||"object"===t&&sT(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&rT(e.buffer),t},isString:nT,isNumber:oT,isBoolean:e=>!0===e||!1===e,isObject:aT,isPlainObject:lT,isReadableStream:pT,isRequest:fT,isResponse:gT,isHeaders:mT,isUndefined:iT,isDate:uT,isFile:cT,isBlob:hT,isRegExp:CT,isFunction:sT,isStream:e=>aT(e)&&sT(e.pipe),isURLSearchParams:dT,isTypedArray:wT,isFileList:AT,forEach:vT,merge:function e(){const{caseless:t}=bT(this)&&this||{},i={},r=(r,n)=>{const s=t&&_T(i,n)||n;lT(i[s])&&lT(r)?i[s]=e(i[s],r):lT(r)?i[s]=e({},r):tT(r)?i[s]=r.slice():i[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&vT(arguments[e],r);return i},extend:(e,t,i,{allOwnKeys:r}={})=>(vT(t,((t,r)=>{i&&sT(t)?e[r]=KS(t,i):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,i,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,r)=>{let n,s,o;const a={};if(t=t||{},null==e)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)o=n[s],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==i&&qS(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:ZS,kindOfTest:$S,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const r=e.indexOf(t,i);return-1!==r&&r===i},toArray:e=>{if(!e)return null;if(tT(e))return e;let t=e.length;if(!oT(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[YS]).call(e);let r;for(;(r=i.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const r=[];for(;null!==(i=e.exec(t));)r.push(i);return r},isHTMLForm:BT,hasOwnProperty:PT,hasOwnProp:PT,reduceDescriptors:MT,freezeMethods:e=>{MT(e,((t,i)=>{if(sT(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const r=e[i];sT(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},toObjectSet:(e,t)=>{const i={},r=e=>{e.forEach((e=>{i[e]=!0}))};return tT(e)?r(e):r(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_T,global:yT,isContextDefined:bT,isSpecCompliantForm:function(e){return!!(e&&sT(e.append)&&"FormData"===e[JS]&&e[YS])},toJSONObject:e=>{const t=new Array(10),i=(e,r)=>{if(aT(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=tT(e)?[]:{};return vT(e,((e,t)=>{const s=i(e,r+1);!iT(s)&&(n[t]=s)})),t[r]=void 0,n}}return e};return i(e,0)},isAsyncFn:kT,isThenable:e=>e&&(aT(e)||sT(e))&&sT(e.then)&&sT(e.catch),setImmediate:ET,asap:DT,isIterable:e=>null!=e&&sT(e[YS])};function OT(e,t,i,r,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n,this.status=n.status?n.status:null)}RT.inherits(OT,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:RT.toJSONObject(this.config),code:this.code,status:this.status}}});const LT=OT.prototype,jT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{jT[e]={value:e}})),Object.defineProperties(OT,jT),Object.defineProperty(LT,"isAxiosError",{value:!0}),OT.from=(e,t,i,r,n,s)=>{const o=Object.create(LT);return RT.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),OT.call(o,e.message,t,i,r,n),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};function UT(e){return RT.isPlainObject(e)||RT.isArray(e)}function NT(e){return RT.endsWith(e,"[]")?e.slice(0,-2):e}function VT(e,t,i){return e?e.concat(t).map((function(e,t){return e=NT(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}const QT=RT.toFlatObject(RT,{},null,(function(e){return/^is[A-Z]/.test(e)}));function HT(e,t,i){if(!RT.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(i=RT.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!RT.isUndefined(t[e])}))).metaTokens,n=i.visitor||u,s=i.dots,o=i.indexes,a=(i.Blob||"undefined"!=typeof Blob&&Blob)&&RT.isSpecCompliantForm(t);if(!RT.isFunction(n))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(RT.isDate(e))return e.toISOString();if(!a&&RT.isBlob(e))throw new OT("Blob is not supported. Use a Buffer instead.");return RT.isArrayBuffer(e)||RT.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,i,n){let a=e;if(e&&!n&&"object"==typeof e)if(RT.endsWith(i,"{}"))i=r?i:i.slice(0,-2),e=JSON.stringify(e);else if(RT.isArray(e)&&function(e){return RT.isArray(e)&&!e.some(UT)}(e)||(RT.isFileList(e)||RT.endsWith(i,"[]"))&&(a=RT.toArray(e)))return i=NT(i),a.forEach((function(e,r){!RT.isUndefined(e)&&null!==e&&t.append(!0===o?VT([i],r,s):null===o?i:i+"[]",l(e))})),!1;return!!UT(e)||(t.append(VT(n,i,s),l(e)),!1)}const c=[],h=Object.assign(QT,{defaultVisitor:u,convertValue:l,isVisitable:UT});if(!RT.isObject(e))throw new TypeError("data must be an object");return function e(i,r){if(!RT.isUndefined(i)){if(-1!==c.indexOf(i))throw Error("Circular reference detected in "+r.join("."));c.push(i),RT.forEach(i,(function(i,s){!0===(!(RT.isUndefined(i)||null===i)&&n.call(t,i,RT.isString(s)?s.trim():s,r,h))&&e(i,r?r.concat(s):[s])})),c.pop()}}(e),t}function GT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function zT(e,t){this._pairs=[],e&&HT(e,this,t)}const WT=zT.prototype;function KT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function XT(e,t,i){if(!t)return e;const r=i&&i.encode||KT;RT.isFunction(i)&&(i={serialize:i});const n=i&&i.serialize;let s;if(s=n?n(t,i):RT.isURLSearchParams(t)?t.toString():new zT(t,i).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}WT.append=function(e,t){this._pairs.push([e,t])},WT.toString=function(e){const t=e?function(t){return e.call(this,t,GT)}:GT;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var qT=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){RT.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},YT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JT={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zT,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ZT="undefined"!=typeof window&&"undefined"!=typeof document,$T="object"==typeof navigator&&navigator||void 0,eF=ZT&&(!$T||["ReactNative","NativeScript","NS"].indexOf($T.product)<0),tF="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,iF=ZT&&window.location.href||"http://localhost";var rF={...Object.freeze({__proto__:null,hasBrowserEnv:ZT,hasStandardBrowserWebWorkerEnv:tF,hasStandardBrowserEnv:eF,navigator:$T,origin:iF}),...JT};function nF(e){function t(e,i,r,n){let s=e[n++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=n>=e.length;if(s=!s&&RT.isArray(r)?r.length:s,a)return RT.hasOwnProp(r,s)?r[s]=[r[s],i]:r[s]=i,!o;r[s]&&RT.isObject(r[s])||(r[s]=[]);return t(e,i,r[s],n)&&RT.isArray(r[s])&&(r[s]=function(e){const t={},i=Object.keys(e);let r;const n=i.length;let s;for(r=0;r<n;r++)s=i[r],t[s]=e[s];return t}(r[s])),!o}if(RT.isFormData(e)&&RT.isFunction(e.entries)){const i={};return RT.forEachEntry(e,((e,r)=>{t(function(e){return RT.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,i,0)})),i}return null}const sF={transitional:YT,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,n=RT.isObject(e);n&&RT.isHTMLForm(e)&&(e=new FormData(e));if(RT.isFormData(e))return r?JSON.stringify(nF(e)):e;if(RT.isArrayBuffer(e)||RT.isBuffer(e)||RT.isStream(e)||RT.isFile(e)||RT.isBlob(e)||RT.isReadableStream(e))return e;if(RT.isArrayBufferView(e))return e.buffer;if(RT.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return HT(e,new rF.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,r){return rF.isNode&&RT.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=RT.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return HT(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return n||r?(t.setContentType("application/json",!1),function(e,t,i){if(RT.isString(e))try{return(t||JSON.parse)(e),RT.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||sF.transitional,i=t&&t.forcedJSONParsing,r="json"===this.responseType;if(RT.isResponse(e)||RT.isReadableStream(e))return e;if(e&&RT.isString(e)&&(i&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw OT.from(e,OT.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rF.classes.FormData,Blob:rF.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};RT.forEach(["delete","get","head","post","put","patch"],(e=>{sF.headers[e]={}}));var oF=sF;const aF=RT.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const lF=Symbol("internals");function uF(e){return e&&String(e).trim().toLowerCase()}function cF(e){return!1===e||null==e?e:RT.isArray(e)?e.map(cF):String(e)}function hF(e,t,i,r,n){return RT.isFunction(r)?r.call(this,t,i):(n&&(t=i),RT.isString(t)?RT.isString(r)?-1!==t.indexOf(r):RT.isRegExp(r)?r.test(t):void 0:void 0)}class AF{constructor(e){e&&this.set(e)}set(e,t,i){const r=this;function n(e,t,i){const n=uF(t);if(!n)throw new Error("header name must be a non-empty string");const s=RT.findKey(r,n);(!s||void 0===r[s]||!0===i||void 0===i&&!1!==r[s])&&(r[s||t]=cF(e))}const s=(e,t)=>RT.forEach(e,((e,i)=>n(e,i,t)));if(RT.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(RT.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let i,r,n;return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),i=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!i||t[i]&&aF[i]||("set-cookie"===i?t[i]?t[i].push(r):t[i]=[r]:t[i]=t[i]?t[i]+", "+r:r)})),t})(e),t);else if(RT.isObject(e)&&RT.isIterable(e)){let i,r,n={};for(const t of e){if(!RT.isArray(t))throw TypeError("Object iterator must return a key-value pair");n[r=t[0]]=(i=n[r])?RT.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}s(n,t)}else null!=e&&n(t,e,i);return this}get(e,t){if(e=uF(e)){const i=RT.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(e);)t[r[1]]=r[2];return t}(e);if(RT.isFunction(t))return t.call(this,e,i);if(RT.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=uF(e)){const i=RT.findKey(this,e);return!(!i||void 0===this[i]||t&&!hF(0,this[i],i,t))}return!1}delete(e,t){const i=this;let r=!1;function n(e){if(e=uF(e)){const n=RT.findKey(i,e);!n||t&&!hF(0,i[n],n,t)||(delete i[n],r=!0)}}return RT.isArray(e)?e.forEach(n):n(e),r}clear(e){const t=Object.keys(this);let i=t.length,r=!1;for(;i--;){const n=t[i];e&&!hF(0,this[n],n,e,!0)||(delete this[n],r=!0)}return r}normalize(e){const t=this,i={};return RT.forEach(this,((r,n)=>{const s=RT.findKey(i,n);if(s)return t[s]=cF(r),void delete t[n];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}(n):String(n).trim();o!==n&&delete t[n],t[o]=cF(r),i[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return RT.forEach(this,((i,r)=>{null!=i&&!1!==i&&(t[r]=e&&RT.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=(this[lF]=this[lF]={accessors:{}}).accessors,i=this.prototype;function r(e){const r=uF(e);t[r]||(!function(e,t){const i=RT.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+i,{value:function(e,i,n){return this[r].call(this,t,e,i,n)},configurable:!0})}))}(i,e),t[r]=!0)}return RT.isArray(e)?e.forEach(r):r(e),this}}AF.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),RT.reduceDescriptors(AF.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),RT.freezeMethods(AF);var dF=AF;function pF(e,t){const i=this||oF,r=t||i,n=dF.from(r.headers);let s=r.data;return RT.forEach(e,(function(e){s=e.call(i,s,n.normalize(),t?t.status:void 0)})),n.normalize(),s}function fF(e){return!(!e||!e.__CANCEL__)}function gF(e,t,i){OT.call(this,null==e?"canceled":e,OT.ERR_CANCELED,t,i),this.name="CanceledError"}function mF(e,t,i){const r=i.config.validateStatus;i.status&&r&&!r(i.status)?t(new OT("Request failed with status code "+i.status,[OT.ERR_BAD_REQUEST,OT.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}RT.inherits(gF,OT,{__CANCEL__:!0});const vF=(e,t,i=3)=>{let r=0;const n=function(e,t){e=e||10;const i=new Array(e),r=new Array(e);let n,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),u=r[o];n||(n=l),i[s]=a,r[s]=l;let c=o,h=0;for(;c!==s;)h+=i[c++],c%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-n<t)return;const A=u&&l-u;return A?Math.round(1e3*h/A):void 0}}(50,250);return function(e,t){let i,r,n=0,s=1e3/t;const o=(t,s=Date.now())=>{n=s,i=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-n;a>=s?o(e,t):(i=e,r||(r=setTimeout((()=>{r=null,o(i)}),s-a)))},()=>i&&o(i)]}((i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,l=n(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:i,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),i)},_F=(e,t)=>{const i=null!=e;return[r=>t[0]({lengthComputable:i,total:e,loaded:r}),t[1]]},yF=e=>(...t)=>RT.asap((()=>e(...t)));var bF=rF.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,rF.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(rF.origin),rF.navigator&&/(msie|trident)/i.test(rF.navigator.userAgent)):()=>!0,wF=rF.hasStandardBrowserEnv?{write(e,t,i,r,n,s){const o=[e+"="+encodeURIComponent(t)];RT.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),RT.isString(r)&&o.push("path="+r),RT.isString(n)&&o.push("domain="+n),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function xF(e,t,i){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==i)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const BF=e=>e instanceof dF?{...e}:e;function PF(e,t){t=t||{};const i={};function r(e,t,i,r){return RT.isPlainObject(e)&&RT.isPlainObject(t)?RT.merge.call({caseless:r},e,t):RT.isPlainObject(t)?RT.merge({},t):RT.isArray(t)?t.slice():t}function n(e,t,i,n){return RT.isUndefined(t)?RT.isUndefined(e)?void 0:r(void 0,e,0,n):r(e,t,0,n)}function s(e,t){if(!RT.isUndefined(t))return r(void 0,t)}function o(e,t){return RT.isUndefined(t)?RT.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(i,n,s){return s in t?r(i,n):s in e?r(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,i)=>n(BF(e),BF(t),0,!0)};return RT.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=l[r]||n,o=s(e[r],t[r],r);RT.isUndefined(o)&&s!==a||(i[r]=o)})),i}var CF=e=>{const t=PF({},e);let i,{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:l}=t;if(t.headers=a=dF.from(a),t.url=XT(xF(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),RT.isFormData(r))if(rF.hasStandardBrowserEnv||rF.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(rF.hasStandardBrowserEnv&&(n&&RT.isFunction(n)&&(n=n(t)),n||!1!==n&&bF(t.url))){const e=s&&o&&wF.read(o);e&&a.set(s,e)}return t};var MF="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,i){const r=CF(e);let n=r.data;const s=dF.from(r.headers).normalize();let o,a,l,u,c,{responseType:h,onUploadProgress:A,onDownloadProgress:d}=r;function p(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function g(){if(!f)return;const r=dF.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());mF((function(e){t(e),p()}),(function(e){i(e),p()}),{data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(i(new OT("Request aborted",OT.ECONNABORTED,e,f)),f=null)},f.onerror=function(){i(new OT("Network Error",OT.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const n=r.transitional||YT;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),i(new OT(t,n.clarifyTimeoutError?OT.ETIMEDOUT:OT.ECONNABORTED,e,f)),f=null},void 0===n&&s.setContentType(null),"setRequestHeader"in f&&RT.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),RT.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),h&&"json"!==h&&(f.responseType=r.responseType),d&&([l,c]=vF(d,!0),f.addEventListener("progress",l)),A&&f.upload&&([a,u]=vF(A),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{f&&(i(!t||t.type?new gF(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===rF.protocols.indexOf(m)?i(new OT("Unsupported protocol "+m+":",OT.ERR_BAD_REQUEST,e)):f.send(n||null)}))};var kF=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,r=new AbortController;const n=function(e){if(!i){i=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof OT?t:new gF(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,n(new OT(`timeout ${t} of ms exceeded`,OT.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(n):e.removeEventListener("abort",n)})),e=null)};e.forEach((e=>e.addEventListener("abort",n)));const{signal:a}=r;return a.unsubscribe=()=>RT.asap(o),a}};const EF=function*(e,t){let i=e.byteLength;if(!t||i<t)return void(yield e);let r,n=0;for(;n<i;)r=n+t,yield e.slice(n,r),n=r},SF=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},TF=(e,t,i,r)=>{const n=async function*(e,t){for await(const i of SF(e))yield*EF(i,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await n.next();if(t)return a(),void e.close();let s=r.byteLength;if(i){let e=o+=s;i(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),n.return())},{highWaterMark:2})},FF="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,IF=FF&&"function"==typeof ReadableStream,DF=FF&&("function"==typeof TextEncoder?(RF=new TextEncoder,e=>RF.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var RF;const OF=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},LF=IF&&OF((()=>{let e=!1;const t=new Request(rF.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),jF=IF&&OF((()=>RT.isReadableStream(new Response("").body))),UF={stream:jF&&(e=>e.body)};var NF;FF&&(NF=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!UF[e]&&(UF[e]=RT.isFunction(NF[e])?t=>t[e]():(t,i)=>{throw new OT(`Response type '${e}' is not supported`,OT.ERR_NOT_SUPPORT,i)})})));const VF=async(e,t)=>{const i=RT.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(RT.isBlob(e))return e.size;if(RT.isSpecCompliantForm(e)){const t=new Request(rF.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return RT.isArrayBufferView(e)||RT.isArrayBuffer(e)?e.byteLength:(RT.isURLSearchParams(e)&&(e+=""),RT.isString(e)?(await DF(e)).byteLength:void 0)})(t):i};var QF=FF&&(async e=>{let{url:t,method:i,data:r,signal:n,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:h="same-origin",fetchOptions:A}=CF(e);u=u?(u+"").toLowerCase():"text";let d,p=kF([n,s&&s.toAbortSignal()],o);const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&LF&&"get"!==i&&"head"!==i&&0!==(g=await VF(c,r))){let e,i=new Request(t,{method:"POST",body:r,duplex:"half"});if(RT.isFormData(r)&&(e=i.headers.get("content-type"))&&c.setContentType(e),i.body){const[e,t]=_F(g,vF(yF(l)));r=TF(i.body,65536,e,t)}}RT.isString(h)||(h=h?"include":"omit");const n="credentials"in Request.prototype;d=new Request(t,{...A,signal:p,method:i.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:n?h:void 0});let s=await fetch(d);const o=jF&&("stream"===u||"response"===u);if(jF&&(a||o&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=RT.toFiniteNumber(s.headers.get("content-length")),[i,r]=a&&_F(t,vF(yF(a),!0))||[];s=new Response(TF(s.body,65536,i,(()=>{r&&r(),f&&f()})),e)}u=u||"text";let m=await UF[RT.findKey(UF,u)||"text"](s,e);return!o&&f&&f(),await new Promise(((t,i)=>{mF(t,i,{data:m,headers:dF.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:d})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new OT("Network Error",OT.ERR_NETWORK,e,d),{cause:t.cause||t});throw OT.from(t,t&&t.code,e,d)}});const HF={http:null,xhr:MF,fetch:QF};RT.forEach(HF,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const GF=e=>`- ${e}`,zF=e=>RT.isFunction(e)||null===e||!1===e;var WF=e=>{e=RT.isArray(e)?e:[e];const{length:t}=e;let i,r;const n={};for(let s=0;s<t;s++){let t;if(i=e[s],r=i,!zF(i)&&(r=HF[(t=String(i)).toLowerCase()],void 0===r))throw new OT(`Unknown adapter '${t}'`);if(r)break;n[t||"#"+s]=r}if(!r){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new OT("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(GF).join("\n"):" "+GF(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function KF(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gF(null,e)}function XF(e){KF(e),e.headers=dF.from(e.headers),e.data=pF.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return WF(e.adapter||oF.adapter)(e).then((function(t){return KF(e),t.data=pF.call(e,e.transformResponse,t),t.headers=dF.from(t.headers),t}),(function(t){return fF(t)||(KF(e),t&&t.response&&(t.response.data=pF.call(e,e.transformResponse,t.response),t.response.headers=dF.from(t.response.headers))),Promise.reject(t)}))}const qF="1.9.0",YF={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{YF[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const JF={};YF.transitional=function(e,t,i){function r(e,t){return"[Axios v1.9.0] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,n,s)=>{if(!1===e)throw new OT(r(n," has been removed"+(t?" in "+t:"")),OT.ERR_DEPRECATED);return t&&!JF[n]&&(JF[n]=!0,console.warn(r(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,n,s)}},YF.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};var ZF={assertOptions:function(e,t,i){if("object"!=typeof e)throw new OT("options must be an object",OT.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let n=r.length;for(;n-- >0;){const s=r[n],o=t[s];if(o){const t=e[s],i=void 0===t||o(t,s,e);if(!0!==i)throw new OT("option "+s+" must be "+i,OT.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new OT("Unknown option "+s,OT.ERR_BAD_OPTION)}},validators:YF};const $F=ZF.validators;class eI{constructor(e){this.defaults=e||{},this.interceptors={request:new qT,response:new qT}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const i=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=PF(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:n}=t;void 0!==i&&ZF.assertOptions(i,{silentJSONParsing:$F.transitional($F.boolean),forcedJSONParsing:$F.transitional($F.boolean),clarifyTimeoutError:$F.transitional($F.boolean)},!1),null!=r&&(RT.isFunction(r)?t.paramsSerializer={serialize:r}:ZF.assertOptions(r,{encode:$F.function,serialize:$F.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ZF.assertOptions(t,{baseUrl:$F.spelling("baseURL"),withXsrfToken:$F.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=n&&RT.merge(n.common,n[t.method]);n&&RT.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete n[e]})),t.headers=dF.concat(s,n);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,h=0;if(!a){const e=[XF.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);h<c;)u=u.then(e[h++],e[h++]);return u}c=o.length;let A=t;for(h=0;h<c;){const e=o[h++],t=o[h++];try{A=e(A)}catch(e){t.call(this,e);break}}try{u=XF.call(this,A)}catch(e){return Promise.reject(e)}for(h=0,c=l.length;h<c;)u=u.then(l[h++],l[h++]);return u}getUri(e){return XT(xF((e=PF(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}RT.forEach(["delete","get","head","options"],(function(e){eI.prototype[e]=function(t,i){return this.request(PF(i||{},{method:e,url:t,data:(i||{}).data}))}})),RT.forEach(["post","put","patch"],(function(e){function t(t){return function(i,r,n){return this.request(PF(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}eI.prototype[e]=t(),eI.prototype[e+"Form"]=t(!0)}));var tI=eI;class iI{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const i=this;this.promise.then((e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{i.subscribe(e),t=e})).then(e);return r.cancel=function(){i.unsubscribe(t)},r},e((function(e,r,n){i.reason||(i.reason=new gF(e,r,n),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new iI((function(t){e=t})),cancel:e}}}var rI=iI;const nI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nI).forEach((([e,t])=>{nI[t]=e}));var sI=nI;const oI=function e(t){const i=new tI(t),r=KS(tI.prototype.request,i);return RT.extend(r,tI.prototype,i,{allOwnKeys:!0}),RT.extend(r,i,null,{allOwnKeys:!0}),r.create=function(i){return e(PF(t,i))},r}(oF);oI.Axios=tI,oI.CanceledError=gF,oI.CancelToken=rI,oI.isCancel=fF,oI.VERSION=qF,oI.toFormData=HT,oI.AxiosError=OT,oI.Cancel=oI.CanceledError,oI.all=function(e){return Promise.all(e)},oI.spread=function(e){return function(t){return e.apply(null,t)}},oI.isAxiosError=function(e){return RT.isObject(e)&&!0===e.isAxiosError},oI.mergeConfig=PF,oI.AxiosHeaders=dF,oI.formToJSON=e=>nF(RT.isHTMLForm(e)?new FormData(e):e),oI.getAdapter=WF,oI.HttpStatusCode=sI,oI.default=oI;var aI=oI,lI="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function uI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cI(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var i=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}function hI(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var AI,dI={exports:{}};var pI=(AI||(AI=1,function(e){!function(t){e.exports=function(){function e(t,i,r){function n(o,a){if(!i[o]){if(!t[o]){if(!a&&hI)return hI(o);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[o]={exports:{}};t[o][0].call(u.exports,(function(e){return n(t[o][1][e]||e)}),u,u.exports,e,t,i,r)}return i[o].exports}for(var s=hI,o=0;o<r.length;o++)n(r[o]);return n}return e}()({1:[function(e,t,i){var r=e("./browser/client");r.Buffer=e("buffer").Buffer,r.urllib=e("../shims/xhr"),r.version=e("./browser/version").version,t.exports=r},{"../shims/xhr":546,"./browser/client":3,"./browser/version":6,buffer:103}],2:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.slice.js");var o=e("assert"),a=e("../common/utils/checkBucketName").checkBucketName,l=i;function u(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function c(e){return e?u(e)?e:[e]:[]}l.useBucket=function(e){return a(e),this.options.bucket=e,this},l.setBucket=function(e){return a(e),this.options.bucket=e,this},l.getBucket=function(){return this.options.bucket},l.deleteBucket=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this._bucketRequestParams("DELETE",t,"",i),e.next=3,this.request(r);case 3:if(200!==(s=e.sent).status&&204!==s.status){e.next=6;break}return e.abrupt("return",{res:s.res});case 6:return e.next=8,this.requestError(s);case 8:throw e.sent;case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketACL=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=this._bucketRequestParams("PUT",t,"acl",r)).headers={"x-oss-acl":i},s.successStatuses=[200],e.next=5,this.request(s);case 5:return o=e.sent,e.abrupt("return",{bucket:o.headers.location&&o.headers.location.substring(1)||null,res:o.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l.getBucketACL=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"acl",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,e.abrupt("return",{acl:s.data.AccessControlList.Grant,owner:{id:s.data.Owner.ID,displayName:s.data.Owner.DisplayName},res:s.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketLogging=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._bucketRequestParams("PUT",t,"logging",r),o='<?xml version="1.0" encoding="UTF-8"?>\n<BucketLoggingStatus>\n<LoggingEnabled>\n<TargetBucket>'.concat(t,"</TargetBucket>\n"),i&&(o+="<TargetPrefix>".concat(i,"</TargetPrefix>\n")),o+="</LoggingEnabled>\n</BucketLoggingStatus>",s.content=o,s.mime="xml",s.successStatuses=[200],e.next=9,this.request(s);case 9:return a=e.sent,e.abrupt("return",{res:a.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l.getBucketLogging=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"logging",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,o=s.data.LoggingEnabled,e.abrupt("return",{enable:!!o,prefix:o&&o.TargetPrefix||null,res:s.res});case 8:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.deleteBucketLogging=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("DELETE",t,"logging",i)).successStatuses=[204,200],e.next=4,this.request(r);case 4:return s=e.sent,e.abrupt("return",{res:s.res});case 6:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketCORS=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,a,l,u,h,A,d,p,f,g;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o((i=i||[]).length,"rules is required"),i.forEach((function(e){o(e.allowedOrigin,"allowedOrigin is required"),o(e.allowedMethod,"allowedMethod is required")})),s=this._bucketRequestParams("PUT",t,"cors",r),a='<?xml version="1.0" encoding="UTF-8"?>\n<CORSConfiguration>',l=function(e){a+="<AllowedOrigin>".concat(e,"</AllowedOrigin>")},u=function(e){a+="<AllowedMethod>".concat(e,"</AllowedMethod>")},h=function(e){a+="<AllowedHeader>".concat(e,"</AllowedHeader>")},A=function(e){a+="<ExposeHeader>".concat(e,"</ExposeHeader>")},d=0,p=i.length;d<p;d++)f=i[d],a+="<CORSRule>",c(f.allowedOrigin).forEach(l),c(f.allowedMethod).forEach(u),c(f.allowedHeader).forEach(h),c(f.exposeHeader).forEach(A),f.maxAgeSeconds&&(a+="<MaxAgeSeconds>".concat(f.maxAgeSeconds,"</MaxAgeSeconds>")),a+="</CORSRule>";return a+="</CORSConfiguration>",s.content=a,s.mime="xml",s.successStatuses=[200],e.next=16,this.request(s);case 16:return g=e.sent,e.abrupt("return",{res:g.res});case 18:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l.getBucketCORS=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"cors",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,o=[],s.data&&s.data.CORSRule&&(u(a=s.data.CORSRule)||(a=[a]),a.forEach((function(e){var t={};Object.keys(e).forEach((function(i){t[i.slice(0,1).toLowerCase()+i.slice(1,i.length)]=e[i]})),o.push(t)}))),e.abrupt("return",{rules:o,res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.deleteBucketCORS=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("DELETE",t,"cors",i)).successStatuses=[204],e.next=4,this.request(r);case 4:return s=e.sent,e.abrupt("return",{res:s.res});case 6:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketReferer=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var o,a,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this._bucketRequestParams("PUT",t,"referer",s),a='<?xml version="1.0" encoding="UTF-8"?>\n<RefererConfiguration>\n',a+=" <AllowEmptyReferer>".concat(i?"true":"false","</AllowEmptyReferer>\n"),r&&r.length>0){for(a+=" <RefererList>\n",l=0;l<r.length;l++)a+=" <Referer>".concat(r[l],"</Referer>\n");a+=" </RefererList>\n"}else a+=" <RefererList />\n";return a+="</RefererConfiguration>",o.content=a,o.mime="xml",o.successStatuses=[200],e.next=10,this.request(o);case 10:return u=e.sent,e.abrupt("return",{res:u.res});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),l.getBucketReferer=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"referer",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,(o=s.data.RefererList.Referer||null)&&(u(o)||(o=[o])),e.abrupt("return",{allowEmpty:"true"===s.data.AllowEmptyReferer,referers:o,res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.deleteBucketReferer=function(){var e=(0,s.default)(n.default.mark((function e(t,i){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.putBucketReferer(t,!0,null,i);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l._bucketRequestParams=function(e,t,i,r){return{method:e,bucket:t,subres:i,additionalHeaders:r&&r.additionalHeaders,timeout:r&&r.timeout,ctx:r&&r.ctx}}},{"../common/utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,assert:95,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/web.dom-collections.for-each.js":380}],3:[function(e,t,i){(function(i,r){(function(){var n=e("@babel/runtime/helpers/interopRequireDefault"),s=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.regexp.to-string.js");var a=e("debug")("ali-oss"),l=e("xml2js"),u=e("agentkeepalive"),c=e("merge-descriptors"),h=e("platform"),A=e("utility"),d=e("urllib"),p=e("./version"),f=e("bowser"),g=e("../common/signUtils"),m=e("../common/client/initOptions"),v=e("../common/utils/createRequest").createRequest,_=e("../common/utils/encoder").encoder,y=e("../common/client/getReqUrl").getReqUrl,b=e("../common/utils/setSTSToken").setSTSToken,w=e("../common/utils/retry").retry,x=e("../common/utils/isFunction").isFunction,B=e("../common/utils/getStandardRegion").getStandardRegion,P=new u;function C(){var e=h.name,t=h.version;e&&e.toLowerCase&&"ie"===e.toLowerCase()&&t.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&"https:"===location.protocol}function k(e,t){if(C(),!(this instanceof k))return new k(e,t);e&&e.inited?this.options=e:this.options=k.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=d,this.agent=this.options.agent||P),this.ctx=t,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}t.exports=k,k.initOptions=function(e){e.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var t=Object.assign({secure:M(),useFetch:!1},e);return m(t)};var E=k.prototype;function S(e){return T.apply(this,arguments)}function T(){return(T=(0,o.default)(s.default.mark((function e(t){var i,r,n,o,a,l;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.stsToken||!x(this.options.refreshSTSToken)){e.next=3;break}return e.next=3,b.call(this);case 3:return i=v.call(this,t),this.options.useFetch||(i.params.mode="disable-fetch"),o=!!t.stream,e.prev=6,e.next=9,this.urllib.request(i.url,i.params);case 9:r=e.sent,this.debug("response %s %s, got %s, headers: %j",t.method,i.url,r.status,r.headers,"info"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),n=e.t0;case 16:if(!r||!t.successStatuses||-1!==t.successStatuses.indexOf(r.status)){e.next=28;break}return e.next=19,this.requestError(r);case 19:if("RequestTimeTooSkewed"!==(a=e.sent).code||o){e.next=25;break}return this.options.amendTimeSkewed=+new Date(a.serverTime)-new Date,e.next=24,this.request(t);case 24:return e.abrupt("return",e.sent);case 25:a.params=t,e.next=32;break;case 28:if(!n){e.next=32;break}return e.next=31,this.requestError(n);case 31:a=e.sent;case 32:if(!a){e.next=34;break}throw a;case 34:if(!t.xmlResponse){e.next=39;break}return e.next=37,this.parseXML(r.data);case 37:l=e.sent,r.data=l;case 39:return e.abrupt("return",r);case 40:case"end":return e.stop()}}),e,this,[[6,13]])})))).apply(this,arguments)}E.debug=a,c(E,e("./object")),c(E,e("./bucket")),c(E,e("../common/bucket/getBucketWebsite")),c(E,e("../common/bucket/putBucketWebsite")),c(E,e("../common/bucket/deleteBucketWebsite")),c(E,e("../common/bucket/getBucketLifecycle")),c(E,e("../common/bucket/putBucketLifecycle")),c(E,e("../common/bucket/deleteBucketLifecycle")),c(E,e("../common/bucket/putBucketVersioning")),c(E,e("../common/bucket/getBucketVersioning")),c(E,e("../common/bucket/getBucketInventory")),c(E,e("../common/bucket/deleteBucketInventory")),c(E,e("../common/bucket/listBucketInventory")),c(E,e("../common/bucket/putBucketInventory")),c(E,e("../common/bucket/abortBucketWorm")),c(E,e("../common/bucket/completeBucketWorm")),c(E,e("../common/bucket/extendBucketWorm")),c(E,e("../common/bucket/getBucketWorm")),c(E,e("../common/bucket/initiateBucketWorm")),c(E,e("./managed-upload")),c(E,e("../common/multipart-copy")),c(E,e("../common/multipart")),c(E,e("../common/parallel")),E.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),g.computeSignature(this.options.accessKeySecret,e,this.options.headerEncoding)},E._getReqUrl=y,E.authorization=function(e,t,i,r){var n=g.buildCanonicalString(e.toUpperCase(),t,{headers:r,parameters:i});return g.authorization(this.options.accessKeyId,this.options.accessKeySecret,n,this.options.headerEncoding)},E.authorizationV4=function(e,t,i,r,n){return g.authorizationV4(this.options.accessKeyId,this.options.accessKeySecret,B(this.options.region),e,t,i,r,n,this.options.headerEncoding)},E.request=function(){var e=(0,o.default)(s.default.mark((function e(t){var i=this;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.retryMax){e.next=6;break}return e.next=3,w(S.bind(this),this.options.retryMax,{errorHandler:function(e){return!!function(e){if(t.stream)return!1;var r=[-1,-2].includes(e.status),n=i.options.requestErrorRetryHandle||function(){return!0};return r&&n(e)}(e)}})(t);case 3:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",S.call(this,t));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),E._getResource=function(e){var t="/";return e.bucket&&(t+="".concat(e.bucket,"/")),e.object&&(t+=_(e.object,this.options.headerEncoding)),t},E._escape=function(e){return A.encodeURIComponent(e).replace(/%2F/g,"/")},E._getUserAgent=function(){var e=r&&r.browser?"js":"nodejs",t="aliyun-sdk-".concat(e,"/").concat(p.version),i=h.description;return!i&&r&&(i="Node.js ".concat(r.version.slice(1)," on ").concat(r.platform," ").concat(r.arch)),this._checkUserAgent("".concat(t," ").concat(i))},E._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},E.checkBrowserAndVersion=function(e,t){return f.name===e&&f.version.split(".")[0]===t},E.parseXML=function(e){return new Promise((function(t,r){i.isBuffer(e)&&(e=e.toString()),l.parseString(e,{explicitRoot:!1,explicitArray:!1},(function(e,i){e?r(e):t(i)}))}))},E.requestError=function(){var e=(0,o.default)(s.default.mark((function e(t){var i,r,n,a,l,u=this;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null,r=function(){var e=(0,o.default)(s.default.mark((function e(r){var n,o;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.parseXML(r);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:n=e.t0,e.next=16;break;case 9:return e.prev=9,e.t1=e.catch(0),u.debug(r,"error"),e.t1.message+="\nraw xml: ".concat(r),e.t1.status=t.status,e.t1.requestId=t.headers&&t.headers["x-oss-request-id"],e.abrupt("return",e.t1);case 16:return o=n.Message||"unknow request error, status: ".concat(t.status),n.Condition&&(o+=" (condition: ".concat(n.Condition,")")),(i=new Error(o)).name=n.Code?"".concat(n.Code,"Error"):"UnknownError",i.status=t.status,i.code=n.Code,i.ecCode=n.EC,i.requestId=n.RequestId,i.hostId=n.HostId,i.serverTime=n.ServerTime,e.abrupt("return",i);case 27:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),t.data&&t.data.length){e.next=38;break}if(-1!==t.status&&-2!==t.status){e.next=10;break}(i=new Error(t.message)).name=t.name,i.status=t.status,i.code=t.name,e.next=36;break;case 10:if(404!==t.status){e.next=17;break}(i=new Error("Object not exists")).name="NoSuchKeyError",i.status=404,i.code="NoSuchKey",e.next=34;break;case 17:if(412!==t.status){e.next=24;break}(i=new Error("Pre condition failed")).name="PreconditionFailedError",i.status=412,i.code="PreconditionFailed",e.next=34;break;case 24:if((i=new Error("Unknow error, status: ".concat(t.status))).name="UnknownError",i.status=t.status,i.res=t,!(n=t.headers&&t.headers["x-oss-err"])){e.next=34;break}return a=atob(n),e.next=33,r(a);case 33:i=e.sent;case 34:i.requestId=t.headers&&t.headers["x-oss-request-id"],i.host="";case 36:e.next=43;break;case 38:return l=String(t.data),this.debug("request response error data: %s",l,"error"),e.next=42,r(l);case 42:i=e.sent;case 43:return this.debug("generate error %j",i,"error"),e.abrupt("return",i);case 45:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}).call(this)}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")},e("_process"))},{"../../node_modules/is-buffer/index.js":409,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":51,"../common/signUtils":52,"../common/utils/createRequest":58,"../common/utils/encoder":62,"../common/utils/getStandardRegion":65,"../common/utils/isFunction":72,"../common/utils/retry":80,"../common/utils/setSTSToken":82,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,agentkeepalive:94,bowser:101,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/es.symbol.description.js":351,"core-js/modules/es.symbol.js":354,debug:536,"merge-descriptors":428,platform:440,urllib:546,utility:545,xml2js:496}],4:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.array-buffer.slice.js"),e("core-js/modules/es.typed-array.uint8-array.js"),e("core-js/modules/es.typed-array.copy-within.js"),e("core-js/modules/es.typed-array.every.js"),e("core-js/modules/es.typed-array.fill.js"),e("core-js/modules/es.typed-array.filter.js"),e("core-js/modules/es.typed-array.find.js"),e("core-js/modules/es.typed-array.find-index.js"),e("core-js/modules/es.typed-array.for-each.js"),e("core-js/modules/es.typed-array.includes.js"),e("core-js/modules/es.typed-array.index-of.js"),e("core-js/modules/es.typed-array.iterator.js"),e("core-js/modules/es.typed-array.join.js"),e("core-js/modules/es.typed-array.last-index-of.js"),e("core-js/modules/es.typed-array.map.js"),e("core-js/modules/es.typed-array.reduce.js"),e("core-js/modules/es.typed-array.reduce-right.js"),e("core-js/modules/es.typed-array.reverse.js"),e("core-js/modules/es.typed-array.set.js"),e("core-js/modules/es.typed-array.slice.js"),e("core-js/modules/es.typed-array.some.js"),e("core-js/modules/es.typed-array.sort.js"),e("core-js/modules/es.typed-array.subarray.js"),e("core-js/modules/es.typed-array.to-locale-string.js"),e("core-js/modules/es.typed-array.to-string.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("util"),a=e("path"),l=e("mime"),u=e("copy-to"),c=e("../common/utils/isBlob").isBlob,h=e("../common/utils/isFile").isFile,A=e("../common/utils/isBuffer").isBuffer,d=i;d.multipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,u,d,p,f,g,m,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=v.length>2&&void 0!==v[2]?v[2]:{},this.resetCancelFlag(),r.disabledMD5=void 0===r.disabledMD5||!!r.disabledMD5,!r.checkpoint||!r.checkpoint.uploadId){e.next=8;break}return i&&h(i)&&(r.checkpoint.file=i),e.next=7,this._resumeMultipart(r.checkpoint,r);case 7:case 41:return e.abrupt("return",e.sent);case 8:return s=102400,r.mime||(h(i)?r.mime=l.getType(a.extname(i.name)):c(i)?r.mime=i.type:A(i)?r.mime="":r.mime=l.getType(a.extname(i))),r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),e.next=14,this._getFileSize(i);case 14:if(!((o=e.sent)<s)){e.next=26;break}return r.contentLength=o,e.next=19,this.put(t,i,r);case 19:if(u=e.sent,!r||!r.progress){e.next=23;break}return e.next=23,r.progress(1);case 23:return d={res:u.res,bucket:this.options.bucket,name:t,etag:u.res.headers.etag},(r.headers&&r.headers["x-oss-callback"]||r.callback)&&(d.data=u.data),e.abrupt("return",d);case 26:if(!r.partSize||parseInt(r.partSize,10)===r.partSize){e.next=28;break}throw new Error("partSize must be int number");case 28:if(!(r.partSize&&r.partSize<s)){e.next=30;break}throw new Error("partSize must not be smaller than ".concat(s));case 30:return e.next=32,this.initMultipartUpload(t,r);case 32:if(p=e.sent,f=p.uploadId,g=this._getPartSize(o,r.partSize),m={file:i,name:t,fileSize:o,partSize:g,uploadId:f,doneParts:[]},!r||!r.progress){e.next=39;break}return e.next=39,r.progress(0,m,p.res);case 39:return e.next=41,this._resumeMultipart(m,r);case 42:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),d._resumeMultipart=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,o,a,l,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,!this.isCancel()){e.next=3;break}throw this._makeCancelEvent();case 3:return o=t.file,a=t.fileSize,l=t.partSize,c=t.uploadId,h=t.doneParts,A=t.name,d=[],h.length>0&&u(h).to(d),p=this._divideParts(a,l),f=p.length,g=!1,m=function(e,r){return new Promise(function(){var a=(0,s.default)(n.default.mark((function s(a,l){var d,m,v,_,y;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,e.isCancel()){n.next=29;break}return d=p[r-1],n.next=5,e._createBuffer(o,d.start,d.end);case 5:return m=n.sent,v={content:m,size:d.end-d.start},n.prev=7,n.next=10,e._uploadPart(A,c,r,v,i);case 10:_=n.sent,n.next=18;break;case 13:if(n.prev=13,n.t0=n.catch(7),404!==n.t0.status){n.next=17;break}throw e._makeAbortEvent();case 17:throw n.t0;case 18:if(e.isCancel()||g){n.next=26;break}if(t.doneParts.push({number:r,etag:_.res.headers.etag}),!i.progress){n.next=23;break}return n.next=23,i.progress(h.length/(f+1),t,_.res);case 23:a({number:r,etag:_.res.headers.etag}),n.next=27;break;case 26:a();case 27:n.next=30;break;case 29:a();case 30:n.next=41;break;case 32:n.prev=32,n.t1=n.catch(0),(y=new Error).name=n.t1.name,y.message=n.t1.message,y.stack=n.t1.stack,y.partNum=r,u(n.t1).to(y),l(y);case 41:case"end":return n.stop()}}),s,null,[[0,32],[7,13]])})));return function(e,t){return a.apply(this,arguments)}}())},v=Array.from(new Array(f),(function(e,t){return t+1})),_=d.map((function(e){return e.number})),y=v.filter((function(e){return _.indexOf(e)<0})),b=5,w=i.parallel||b,e.next=17,this._parallel(y,w,(function(e){return new Promise((function(t,i){m(r,e).then((function(e){e&&d.push(e),t()})).catch((function(e){i(e)}))}))}));case 17:if(x=e.sent,g=!0,!(B=x.find((function(e){return"abort"===e.name})))){e.next=22;break}throw B;case 22:if(!this.isCancel()){e.next=25;break}throw m=null,this._makeCancelEvent();case 25:if(!(x&&x.length>0)){e.next=28;break}throw x[0].message="Failed to upload some parts with error: ".concat(x[0].toString()," part_num: ").concat(x[0].partNum),x[0];case 28:return e.next=30,this.completeMultipartUpload(A,c,d,i);case 30:return e.abrupt("return",e.sent);case 31:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),d._getFileSize=function(){var e=(0,s.default)(n.default.mark((function e(t){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!c(t)&&!h(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}();var p=e("stream").Readable;function f(e,t){if(!(this instanceof f))return new f(e,t);p.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}function g(e){return e.arrayBuffer?e.arrayBuffer():new Promise((function(t,i){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){i(e)},r.readAsArrayBuffer(e)}))}o.inherits(f,p),f.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var i=this.start,r=i+e;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(i,r))}},f.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var i=this;this.reader.onload=function(r){i.fileBuffer=t.from(new Uint8Array(r.target.result)),i.file=null,i.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},d._createBuffer=function(){var e=(0,s.default)(n.default.mark((function e(i,r,s){var o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c(i)&&!h(i)){e.next=8;break}return o=i.slice(r,s),e.next=4,g(o);case 4:return a=e.sent,e.abrupt("return",t.from(a));case 8:if(!A(i)){e.next=12;break}return e.abrupt("return",i.subarray(r,s));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return e.stop()}}),e)})));function i(t,i,r){return e.apply(this,arguments)}return i}(),d._getPartSize=function(e,t){var i=1e4;t||(t=1048576);var r=Math.ceil(e/i);return t<r&&(t=r,console.warn("partSize has been set to ".concat(t,", because the partSize you provided causes partNumber to be greater than 10,000"))),t},d._divideParts=function(e,t){for(var i=Math.ceil(e/t),r=[],n=0;n<i;n++){var s=t*n,o=Math.min(s+t,e);r.push({start:s,end:o})}return r}}).call(this)}).call(this,e("buffer").Buffer)},{"../common/utils/isBlob":68,"../common/utils/isBuffer":69,"../common/utils/isFile":71,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,buffer:103,"copy-to":107,"core-js/modules/es.array-buffer.slice.js":309,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.typed-array.copy-within.js":356,"core-js/modules/es.typed-array.every.js":357,"core-js/modules/es.typed-array.fill.js":358,"core-js/modules/es.typed-array.filter.js":359,"core-js/modules/es.typed-array.find-index.js":360,"core-js/modules/es.typed-array.find.js":361,"core-js/modules/es.typed-array.for-each.js":362,"core-js/modules/es.typed-array.includes.js":363,"core-js/modules/es.typed-array.index-of.js":364,"core-js/modules/es.typed-array.iterator.js":365,"core-js/modules/es.typed-array.join.js":366,"core-js/modules/es.typed-array.last-index-of.js":367,"core-js/modules/es.typed-array.map.js":368,"core-js/modules/es.typed-array.reduce-right.js":369,"core-js/modules/es.typed-array.reduce.js":370,"core-js/modules/es.typed-array.reverse.js":371,"core-js/modules/es.typed-array.set.js":372,"core-js/modules/es.typed-array.slice.js":373,"core-js/modules/es.typed-array.some.js":374,"core-js/modules/es.typed-array.sort.js":375,"core-js/modules/es.typed-array.subarray.js":376,"core-js/modules/es.typed-array.to-locale-string.js":377,"core-js/modules/es.typed-array.to-string.js":378,"core-js/modules/es.typed-array.uint8-array.js":379,mime:430,path:439,stream:468,util:489}],5:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.promise.js");var n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("fs"),a=e("copy-to"),l=e("path"),u=e("mime"),c=e("../common/callback"),h=e("merge-descriptors"),A=e("../common/utils/isBlob").isBlob,d=e("../common/utils/isFile").isFile,p=e("../common/utils/isBuffer").isBuffer,f=e("../common/utils/obj2xml").obj2xml,g=e("../common/utils/parseRestoreInfo").parseRestoreInfo,m=i;m.append=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===(r=r||{}).position&&(r.position="0"),r.subres={append:"",position:r.position},r.method="POST",e.next=6,this.put(t,i,r);case 6:return(s=e.sent).nextAppendPosition=s.res.headers["x-oss-next-append-position"],e.abrupt("return",s);case 9:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),m.put=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o,a,h,f;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=r||{}).disabledMD5=void 0===r.disabledMD5||!!r.disabledMD5,r.headers=r.headers||{},t=this._objectName(t),!p(i)){e.next=8;break}s=i,e.next=19;break;case 8:if(!A(i)&&!d(i)){e.next=18;break}return r.mime||(d(i)?r.mime=u.getType(l.extname(i.name)):r.mime=i.type),e.next=12,this._createBuffer(i,0,i.size);case 12:return s=e.sent,e.next=15,this._getFileSize(i);case 15:r.contentLength=e.sent,e.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(r.meta,r.headers),o=r.method||"PUT",a=this._objectRequestParams(o,t,r),c.encodeCallback(a,r),a.mime=r.mime,a.disabledMD5=r.disabledMD5,a.content=s,a.successStatuses=[200],e.next=29,this.request(a);case 29:return h=e.sent,f={name:t,url:this._objectUrl(t),res:h.res},a.headers&&a.headers["x-oss-callback"]&&(f.data=JSON.parse(h.data.toString())),e.abrupt("return",f);case 33:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),m.putStream=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},t=this._objectName(t),r.contentLength?r.headers["Content-Length"]=r.contentLength:r.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(r.meta,r.headers),s=r.method||"PUT",o=this._objectRequestParams(s,t,r),c.encodeCallback(o,r),o.mime=r.mime,o.stream=i,o.successStatuses=[200],e.next=13,this.request(o);case 13:return a=e.sent,l={name:t,url:this._objectUrl(t),res:a.res},o.headers&&o.headers["x-oss-callback"]&&(l.data=JSON.parse(a.data.toString())),e.abrupt("return",l);case 17:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),h(m,e("../common/object/copyObject")),h(m,e("../common/object/getObjectTagging")),h(m,e("../common/object/putObjectTagging")),h(m,e("../common/object/deleteObjectTagging")),h(m,e("../common/image")),h(m,e("../common/object/getBucketVersions")),h(m,e("../common/object/getACL")),h(m,e("../common/object/putACL")),h(m,e("../common/object/head")),h(m,e("../common/object/delete")),h(m,e("../common/object/get")),h(m,e("../common/object/putSymlink")),h(m,e("../common/object/getSymlink")),h(m,e("../common/object/deleteMulti")),h(m,e("../common/object/getObjectMeta")),h(m,e("../common/object/getObjectUrl")),h(m,e("../common/object/generateObjectUrl")),h(m,e("../common/object/signatureUrl")),h(m,e("../common/object/asyncSignatureUrl")),h(m,e("../common/object/signatureUrlV4")),h(m,e("../common/object/signPostObjectPolicyV4")),m.putMeta=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.copy(t,t,{meta:i||{},timeout:r&&r.timeout,ctx:r&&r.ctx});case 2:return s=e.sent,e.abrupt("return",s);case 4:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),m.list=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("GET","",i)).query=t,r.xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return s=e.sent,o=s.data.Contents||[],a=this,o&&(Array.isArray(o)||(o=[o]),o=o.map((function(e){return{name:e.Key,url:a._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName},restoreInfo:g(e.RestoreInfo)}}))),(l=s.data.CommonPrefixes||null)&&(Array.isArray(l)||(l=[l]),l=l.map((function(e){return e.Prefix}))),e.abrupt("return",{res:s.res,objects:o,prefixes:l,nextMarker:s.data.NextMarker||null,isTruncated:"true"===s.data.IsTruncated});case 13:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),m.listV2=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,a,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=c.length>1&&void 0!==c[1]?c[1]:{},(r=t["continuation-token"]||t.continuationToken)&&(i.subres=Object.assign({"continuation-token":r},i.subres)),(s=this._objectRequestParams("GET","",i)).query=Object.assign({"list-type":2},t),delete s.query["continuation-token"],delete s.query.continuationToken,s.xmlResponse=!0,s.successStatuses=[200],e.next=11,this.request(s);case 11:return o=e.sent,a=o.data.Contents||[],l=this,a&&(Array.isArray(a)||(a=[a]),a=a.map((function(e){var t=null;return e.Owner&&(t={id:e.Owner.ID,displayName:e.Owner.DisplayName}),{name:e.Key,url:l._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:t,restoreInfo:g(e.RestoreInfo)}}))),(u=o.data.CommonPrefixes||null)&&(Array.isArray(u)||(u=[u]),u=u.map((function(e){return e.Prefix}))),e.abrupt("return",{res:o.res,objects:a,prefixes:u,isTruncated:"true"===o.data.IsTruncated,keyCount:+o.data.KeyCount,continuationToken:o.data.ContinuationToken||null,nextContinuationToken:o.data.NextContinuationToken||null});case 18:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),m.restore=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=(i=a.length>1&&void 0!==a[1]?a[1]:{type:"Archive"})||{}).subres=Object.assign({restore:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),r=this._objectRequestParams("POST",t,i),s={RestoreRequest:{Days:i.Days?i.Days:2}},"ColdArchive"!==i.type&&"DeepColdArchive"!==i.type||(s.RestoreRequest.JobParameters={Tier:i.JobParameters?i.JobParameters:"Standard"}),r.content=f(s,{headers:!0}),r.mime="xml",r.successStatuses=[202],e.next=12,this.request(r);case 12:return o=e.sent,e.abrupt("return",{res:o.res});case 14:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),m._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},m._objectRequestParams=function(e,t,i){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");i=i||{};var r={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:i&&i.subres,additionalHeaders:i&&i.additionalHeaders,timeout:i&&i.timeout,ctx:i&&i.ctx};return i.headers&&(r.headers={},a(i.headers).to(r.headers)),r},m._objectName=function(e){return e.replace(/^\/+/,"")},m._convertMetaToHeaders=function(e,t){e&&Object.keys(e).forEach((function(i){t["x-oss-meta-".concat(i)]=e[i]}))},m._deleteFileSafe=function(e){var t=this;return new Promise((function(i){o.exists(e,(function(r){r?o.unlink(e,(function(r){r&&t.debug("unlink %j error: %s",e,r,"error"),i()})):i()}))}))}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signPostObjectPolicyV4":48,"../common/object/signatureUrl":49,"../common/object/signatureUrlV4":50,"../common/utils/isBlob":68,"../common/utils/isBuffer":69,"../common/utils/isFile":71,"../common/utils/obj2xml":76,"../common/utils/parseRestoreInfo":78,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.number.constructor.js":324,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380,fs:102,"merge-descriptors":428,mime:430,path:439}],6:[function(e,t,i){i.version="6.23.0"},{}],7:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.abortBucketWorm=void 0;var o=e("../utils/checkBucketName");function a(e,t){return l.apply(this,arguments)}function l(){return l=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),r=this._bucketRequestParams("DELETE",t,"worm",i),e.next=4,this.request(r);case 4:return s=e.sent,e.abrupt("return",{res:s.res,status:s.status});case 6:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}i.abortBucketWorm=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],8:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.completeBucketWorm=void 0;var o=e("../utils/checkBucketName");function a(e,t,i){return l.apply(this,arguments)}function l(){return l=(0,s.default)(n.default.mark((function e(t,i,r){var s,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),s=this._bucketRequestParams("POST",t,{wormId:i},r),e.next=4,this.request(s);case 4:return a=e.sent,e.abrupt("return",{res:a.res,status:a.status});case 6:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}i.completeBucketWorm=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],9:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.deleteBucketInventory=void 0;var o=e("../utils/checkBucketName");function a(e,t){return l.apply(this,arguments)}function l(){return l=(0,s.default)(n.default.mark((function e(t,i){var r,s,a,l,u=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]?u[2]:{},s=Object.assign({inventory:"",inventoryId:i},r.subres),o.checkBucketName(t),(a=this._bucketRequestParams("DELETE",t,s,r)).successStatuses=[204],e.next=7,this.request(a);case 7:return l=e.sent,e.abrupt("return",{status:l.status,res:l.res});case 9:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}i.deleteBucketInventory=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],10:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName;i.deleteBucketLifecycle=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("DELETE",t,"lifecycle",i)).successStatuses=[204],e.next=5,this.request(r);case 5:return s=e.sent,e.abrupt("return",{res:s.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],11:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName;i.deleteBucketWebsite=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("DELETE",t,"website",i)).successStatuses=[204],e.next=5,this.request(r);case 5:return s=e.sent,e.abrupt("return",{res:s.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],12:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.extendBucketWorm=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/obj2xml");function l(e,t,i,r){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i,r,s){var l,u,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),l=this._bucketRequestParams("POST",t,{wormExtend:"",wormId:i},s),u={ExtendWormConfiguration:{RetentionPeriodInDays:r}},l.mime="xml",l.content=a.obj2xml(u,{headers:!0}),l.successStatuses=[200],e.next=8,this.request(l);case 8:return c=e.sent,e.abrupt("return",{res:c.res,status:c.status});case 10:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.extendBucketWorm=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],13:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.getBucketInventory=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/formatInventoryConfig");function l(e,t){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]?c[2]:{},s=Object.assign({inventory:"",inventoryId:i},r.subres),o.checkBucketName(t),(l=this._bucketRequestParams("GET",t,s,r)).successStatuses=[200],l.xmlResponse=!0,e.next=8,this.request(l);case 8:return u=e.sent,e.abrupt("return",{status:u.status,res:u.res,inventory:a.formatInventoryConfig(u.data)});case 10:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.getBucketInventory=l},{"../utils/checkBucketName":53,"../utils/formatInventoryConfig":63,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],14:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isArray").isArray,l=e("../utils/formatObjKey").formatObjKey;i.getBucketLifecycle=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("GET",t,"lifecycle",i)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return s=e.sent,(u=s.data.Rule||null)&&(a(u)||(u=[u]),u=u.map((function(e){return e.ID&&(e.id=e.ID,delete e.ID),e.Tag&&!a(e.Tag)&&(e.Tag=[e.Tag]),l(e,"firstLowerCase")}))),e.abrupt("return",{rules:u,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/formatObjKey":64,"../utils/isArray":67,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318}],15:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName;i.getBucketVersioning=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("GET",t,"versioning",i)).xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return s=e.sent,a=s.data.Status,e.abrupt("return",{status:s.status,versionStatus:a,res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],16:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isObject").isObject;i.getBucketWebsite=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("GET",t,"website",i)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return s=e.sent,l=[],s.data.RoutingRules&&s.data.RoutingRules.RoutingRule&&(l=a(s.data.RoutingRules.RoutingRule)?[s.data.RoutingRules.RoutingRule]:s.data.RoutingRules.RoutingRule),e.abrupt("return",{index:s.data.IndexDocument&&s.data.IndexDocument.Suffix||"",supportSubDir:s.data.IndexDocument&&s.data.IndexDocument.SupportSubDir||"false",type:s.data.IndexDocument&&s.data.IndexDocument.Type,routingRules:l,error:s.data.ErrorDocument&&s.data.ErrorDocument.Key||null,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],17:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.getBucketWorm=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/dataFix");function l(e,t){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),(r=this._bucketRequestParams("GET",t,"worm",i)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return s=e.sent,a.dataFix(s.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),e.abrupt("return",Object.assign(Object.assign({},s.data),{res:s.res,status:s.status}));case 9:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.getBucketWorm=l},{"../utils/checkBucketName":53,"../utils/dataFix":59,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],18:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.initiateBucketWorm=void 0;var o=e("../utils/obj2xml"),a=e("../utils/checkBucketName");function l(e,t,i){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i,r){var s,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),s=this._bucketRequestParams("POST",t,"worm",r),l={InitiateWormConfiguration:{RetentionPeriodInDays:i}},s.mime="xml",s.content=o.obj2xml(l,{headers:!0}),s.successStatuses=[200],e.next=8,this.request(s);case 8:return u=e.sent,e.abrupt("return",{res:u.res,wormId:u.res.headers["x-oss-worm-id"],status:u.status});case 10:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.initiateBucketWorm=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],19:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.listBucketInventory=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/formatInventoryConfig");function l(e){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t){var i,r,s,l,u,c,h,A,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>1&&void 0!==d[1]?d[1]:{},r=i.continuationToken,s=Object.assign({inventory:""},r&&{"continuation-token":r},i.subres),o.checkBucketName(t),(l=this._bucketRequestParams("GET",t,s,i)).successStatuses=[200],l.xmlResponse=!0,e.next=9,this.request(l);case 9:return u=e.sent,c=u.data,h=u.res,A=u.status,e.abrupt("return",{isTruncated:"true"===c.IsTruncated,nextContinuationToken:c.NextContinuationToken,inventoryList:a.formatInventoryConfig(c.InventoryConfiguration,!0),status:A,res:h});case 12:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.listBucketInventory=l},{"../utils/checkBucketName":53,"../utils/formatInventoryConfig":63,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],20:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.concat.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.putBucketInventory=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/obj2xml");function l(e,t){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c,h,A,d,p,f,g,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m.length>2&&void 0!==m[2]?m[2]:{},s=Object.assign({inventory:"",inventoryId:i.id},r.subres),o.checkBucketName(t),l=i.OSSBucketDestination,u=i.optionalFields,c=i.includedObjectVersions,h="acs:oss:::",A="acs:ram::".concat(l.accountId,":role/"),d={InventoryConfiguration:{Id:i.id,IsEnabled:i.isEnabled,Filter:{Prefix:i.prefix||""},Destination:{OSSBucketDestination:{Format:l.format,AccountId:l.accountId,RoleArn:"".concat(A).concat(l.rolename),Bucket:"".concat(h).concat(l.bucket),Prefix:l.prefix||"",Encryption:l.encryption||""}},Schedule:{Frequency:i.frequency},IncludedObjectVersions:c,OptionalFields:{Field:(null==u?void 0:u.field)||[]}}},p=a.obj2xml(d,{headers:!0,firstUpperCase:!0}),(f=this._bucketRequestParams("PUT",t,s,r)).successStatuses=[200],f.mime="xml",f.content=p,e.next=14,this.request(f);case 14:return g=e.sent,e.abrupt("return",{status:g.status,res:g.res});case 16:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.putBucketInventory=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.assign.js":325}],21:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.array.includes.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isArray").isArray,l=e("../utils/deepCopy").deepCopy,u=e("../utils/isObject").isObject,c=e("../utils/obj2xml").obj2xml,h=e("../utils/checkObjectTag").checkObjectTag,A=e("../utils/getStrBytesCount").getStrBytesCount;function d(e){e.days&&(e.expiration={days:e.days}),e.date&&(e.expiration={createdBeforeDate:e.date})}function p(e,t){var i=e.days,r=e.createdBeforeDate;if(!i&&!r)throw new Error("".concat(t," must includes days or createdBeforeDate"));if(i&&(a(i)||!/^[1-9][0-9]*$/.test(i)))throw new Error("days must be a positive integer");if(r&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(r))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function f(e,t){var i=e.noncurrentDays;if(!i)throw new Error("".concat(t," must includes noncurrentDays"));if(i&&(a(i)||!/^[1-9][0-9]*$/.test(i)))throw new Error("noncurrentDays must be a positive integer")}function g(e){if(!a(e)&&!u(e))throw new Error("tag must be Object or Array");e=u(e)?[e]:e;var t={};l(e).forEach((function(e){t[e.key]=e.value})),h(t)}function m(e){if(!["IA","Archive","ColdArchive","DeepColdArchive"].includes(e))throw new Error("StorageClass must be IA or Archive or ColdArchive or DeepColdArchive")}function v(e){if(e.id&&A(e.id)>255)throw new Error("ID is composed of 255 bytes at most");if(void 0===e.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(e.status))throw new Error("Status must be Enabled or Disabled");if(!(e.expiration||e.noncurrentVersionExpiration||e.abortMultipartUpload||e.transition||e.noncurrentVersionTransition))throw new Error("Rule must includes expiration or noncurrentVersionExpiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(e.transition&&(m(e.transition.storageClass),p(e.transition,"Transition")),e.expiration)if(e.expiration.expiredObjectDeleteMarker){if(e.expiration.days||e.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else p(e.expiration,"Expiration");if(e.abortMultipartUpload&&p(e.abortMultipartUpload,"AbortMultipartUpload"),e.noncurrentVersionTransition&&(m(e.noncurrentVersionTransition.storageClass),f(e.noncurrentVersionTransition,"NoncurrentVersionTransition")),e.noncurrentVersionExpiration&&f(e.noncurrentVersionExpiration,"NoncurrentVersionExpiration"),e.tag){if(e.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");g(e.tag)}}i.putBucketLifecycle=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,l,u,h,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o(t),a(i)){e.next=3;break}throw new Error("rules must be Array");case 3:return s=this._bucketRequestParams("PUT",t,"lifecycle",r),u={LifecycleConfiguration:{Rule:l=[]}},i.forEach((function(e){d(e),v(e),e.id&&(e.ID=e.id,delete e.id),l.push(e)})),h=c(u,{headers:!0,firstUpperCase:!0}),s.content=h,s.mime="xml",s.successStatuses=[200],e.next=13,this.request(s);case 13:return A=e.sent,e.abrupt("return",{res:A.res});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/checkObjectTag":56,"../utils/deepCopy":60,"../utils/getStrBytesCount":66,"../utils/isArray":67,"../utils/isObject":74,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/web.dom-collections.for-each.js":380}],22:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.includes.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/obj2xml").obj2xml;i.putBucketVersioning=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:{},o(t),["Enabled","Suspended"].includes(i)){e.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return s=this._bucketRequestParams("PUT",t,"versioning",r),l={VersioningConfiguration:{Status:i}},s.mime="xml",s.content=a(l,{headers:!0}),e.next=10,this.request(s);case 10:return u=e.sent,e.abrupt("return",{res:u.res,status:u.status});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.includes.js":315}],23:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/obj2xml").obj2xml,l=e("../utils/isArray").isArray;i.putBucketWebsite=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,u,c,h,A,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=d.length>1&&void 0!==d[1]?d[1]:{},r=d.length>2?d[2]:void 0,o(t),s=this._bucketRequestParams("PUT",t,"website",r),u={Suffix:i.index||"index.html"},h={WebsiteConfiguration:c={IndexDocument:u}},i.supportSubDir&&(u.SupportSubDir=i.supportSubDir),i.type&&(u.Type=i.type),i.error&&(c.ErrorDocument={Key:i.error}),void 0===i.routingRules){e.next=14;break}if(l(i.routingRules)){e.next=13;break}throw new Error("RoutingRules must be Array");case 13:c.RoutingRules={RoutingRule:i.routingRules};case 14:return h=a(h),s.content=h,s.mime="xml",s.successStatuses=[200],e.next=20,this.request(s);case 20:return A=e.sent,e.abrupt("return",{res:A.res});case 22:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/isArray":67,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],24:[function(e,t,i){(function(t){(function(){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),i.encodeCallback=function(e,i){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&i.callback){var r={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};i.callback.host&&(r.callbackHost=i.callback.host),i.callback.contentType&&(r.callbackBodyType=i.callback.contentType),i.callback.callbackSNI&&(r.callbackSNI=i.callback.callbackSNI);var n=t.from(JSON.stringify(r)).toString("base64");if(e.headers["x-oss-callback"]=n,i.callback.customValue){var s={};Object.keys(i.callback.customValue).forEach((function(e){s["x:".concat(e)]=i.callback.customValue[e].toString()})),e.headers["x-oss-callback-var"]=t.from(JSON.stringify(s)).toString("base64")}}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:103,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/web.dom-collections.for-each.js":380}],25:[function(e,t,i){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.getReqUrl=void 0;var n=r(e("copy-to")),s=r(e("url")),o=r(e("merge-descriptors")),a=r(e("is-type-of")),l=e("../utils/isIP"),u=e("../utils/checkConfigValid");function c(e){var t={},i=this.options.cname;u.checkConfigValid(this.options.endpoint,"endpoint"),n.default(this.options.endpoint,!1).to(t),!e.bucket||i||l.isIP(t.hostname)||this.options.sldEnable||(t.host="".concat(e.bucket,".").concat(t.host));var r="/";e.bucket&&this.options.sldEnable&&(r+="".concat(e.bucket,"/")),e.object&&(r+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=r;var c={};if(e.query&&o.default(c,e.query),e.subres){var h={};a.default.string(e.subres)?h[e.subres]="":a.default.array(e.subres)?e.subres.forEach((function(e){h[e]=""})):h=e.subres,o.default(c,h)}return t.query=c,s.default.format(t)}i.getReqUrl=c},{"../utils/checkConfigValid":54,"../utils/isIP":73,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380,"is-type-of":537,"merge-descriptors":428,url:543}],26:[function(e,t,i){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.string.trim.js");var r=e("humanize-ms"),n=e("url"),s=e("../utils/checkBucketName").checkBucketName,o=e("../utils/setRegion").setRegion,a=e("../utils/checkConfigValid").checkConfigValid;function l(e,t){a(e,"endpoint");var i=n.parse(e);if(i.protocol||(i=n.parse("http".concat(t?"s":"","://").concat(e))),"http:"!==i.protocol&&"https:"!==i.protocol)throw new Error("Endpoint protocol must be http or https.");return i}t.exports=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");!e.stsToken||e.refreshSTSToken||e.refreshSTSTokenInterval||console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken、accessKeyId、accessKeySecret automatically when sts token has expired"),e.bucket&&s(e.bucket);var t=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:3e5,retryMax:0,authorizationV4:!1},e);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=r(t.timeout)),t.endpoint)t.endpoint=l(t.endpoint,t.secure);else{if(!t.region)throw new Error("require options.endpoint or options.region");t.endpoint=o(t.region,t.internal,t.secure)}return t.inited=!0,t}},{"../utils/checkBucketName":53,"../utils/checkConfigValid":54,"../utils/setRegion":81,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.string.trim.js":349,"humanize-ms":399,url:543}],27:[function(e,t,i){e("merge-descriptors")(i,e("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":428}],28:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("querystring"),l=e("js-base64").Base64.encode;function u(e,t){if(!e)throw new Error("".concat(t," is required"));if("string"!=typeof e)throw new Error("".concat(t," must be String"))}i.processObjectSave=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var c,h,A,d;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(t,"sourceObject"),u(i,"targetObject"),u(r,"process"),i=this._objectName(i),s&&o(s),c=this._objectRequestParams("POST",t,{subres:"x-oss-process"}),h=s?",b_".concat(l(s)):"",i=l(i),A={"x-oss-process":"".concat(r,"|sys/saveas,o_").concat(i).concat(h)},c.content=a.stringify(A),e.next=12,this.request(c);case 12:return d=e.sent,e.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"js-base64":413,querystring:451}],29:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.regexp.to-string.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("debug")("ali-oss:multipart-copy"),a=e("copy-to"),l=i;l.uploadPartCopy=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s,o){var a,l,u,c,h,A=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=A.length>5&&void 0!==A[5]?A[5]:{}).headers=a.headers||{},l=a.versionId||a.subres&&a.subres.versionId||null,u=l?"/".concat(o.sourceBucketName,"/").concat(encodeURIComponent(o.sourceKey),"?versionId=").concat(l):"/".concat(o.sourceBucketName,"/").concat(encodeURIComponent(o.sourceKey)),a.headers["x-oss-copy-source"]=u,s&&(a.headers["x-oss-copy-source-range"]="bytes=".concat(s)),a.subres={partNumber:r,uploadId:i},(c=this._objectRequestParams("PUT",t,a)).mime=a.mime,c.successStatuses=[200],e.next=12,this.request(c);case 12:return h=e.sent,e.abrupt("return",{name:t,etag:h.res.headers.etag,res:h.res});case 14:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n,s){return e.apply(this,arguments)}return t}(),l.multipartUploadCopy=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,a,l,u,c,h,A,d,p,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.length>2&&void 0!==f[2]?f[2]:{},this.resetCancelFlag(),s=r.versionId,o={versionId:void 0===s?null:s},e.next=6,this._getObjectMeta(i.sourceBucketName,i.sourceKey,o);case 6:if(a=e.sent,l=a.res.headers["content-length"],i.startOffset=i.startOffset||0,i.endOffset=i.endOffset||l,!r.checkpoint||!r.checkpoint.uploadId){e.next=14;break}return e.next=13,this._resumeMultipartCopy(r.checkpoint,i,r);case 13:case 31:return e.abrupt("return",e.sent);case 14:if(u=102400,!((c=i.endOffset-i.startOffset)<u)){e.next=18;break}throw new Error("copySize must not be smaller than ".concat(u));case 18:if(!(r.partSize&&r.partSize<u)){e.next=20;break}throw new Error("partSize must not be smaller than ".concat(u));case 20:return e.next=22,this.initMultipartUpload(t,r);case 22:if(h=e.sent,A=h.uploadId,d=this._getPartSize(c,r.partSize),p={name:t,copySize:c,partSize:d,uploadId:A,doneParts:[]},!r||!r.progress){e.next=29;break}return e.next=29,r.progress(0,p,h.res);case 29:return e.next=31,this._resumeMultipartCopy(p,i,r);case 32:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l._resumeMultipartCopy=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isCancel()){e.next=2;break}throw this._makeCancelEvent();case 2:if(l=r.versionId,c={versionId:u=void 0===l?null:l},h=t.copySize,A=t.partSize,d=t.uploadId,p=t.doneParts,f=t.name,g=this._divideMultipartCopyParts(h,A,i.startOffset),m=g.length,v={headers:{}},r.copyheaders&&a(r.copyheaders).to(v.headers),u&&a(c).to(v),_=function(e,i,a){return new Promise(function(){var l=(0,s.default)(n.default.mark((function s(l,u){var c,h,A;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,e.isCancel()){n.next=22;break}return c=g[i-1],h="".concat(c.start,"-").concat(c.end-1),n.prev=4,n.next=7,e.uploadPartCopy(f,d,i,h,a,v);case 7:A=n.sent,n.next=15;break;case 10:if(n.prev=10,n.t0=n.catch(4),404!==n.t0.status){n.next=14;break}throw e._makeAbortEvent();case 14:throw n.t0;case 15:if(e.isCancel()){n.next=22;break}if(o("content-range ".concat(A.res.headers["content-range"])),p.push({number:i,etag:A.res.headers.etag}),t.doneParts=p,!r||!r.progress){n.next=22;break}return n.next=22,r.progress(p.length/m,t,A.res);case 22:l(),n.next=29;break;case 25:n.prev=25,n.t1=n.catch(0),n.t1.partNum=i,u(n.t1);case 29:case"end":return n.stop()}}),s,null,[[0,25],[4,10]])})));return function(e,t){return l.apply(this,arguments)}}())},y=Array.from(new Array(m),(function(e,t){return t+1})),b=p.map((function(e){return e.number})),w=y.filter((function(e){return b.indexOf(e)<0})),x=5,B=r.parallel||x,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==B){e.next=28;break}P=0;case 18:if(!(P<w.length)){e.next=26;break}if(!this.isCancel()){e.next=21;break}throw this._makeCancelEvent();case 21:return e.next=23,_(this,w[P],i);case 23:P++,e.next=18;break;case 26:e.next=40;break;case 28:return e.next=30,this._parallelNode(w,B,_,i);case 30:if(C=e.sent,M=C.find((function(e){return"abort"===e.name})),!M){e.next=34;break}throw M;case 34:if(!this.isCancel()){e.next=36;break}throw this._makeCancelEvent();case 36:if(!(C&&C.length>0)){e.next=40;break}throw(k=C[0]).message="Failed to copy some parts with error: ".concat(k.toString()," part_num: ").concat(k.partNum),k;case 40:return e.next=42,this.completeMultipartUpload(f,d,p,r);case 42:return e.abrupt("return",e.sent);case 43:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l._divideMultipartCopyParts=function(e,t,i){for(var r=Math.ceil(e/t),n=[],s=0;s<r;s++){var o=t*s+i,a=Math.min(o+t,e+i);n.push({start:o,end:a})}return n},l._getObjectMeta=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this.getBucket(),this.setBucket(t),e.next=4,this.head(i,r);case 4:return o=e.sent,this.setBucket(s),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,debug:536}],30:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.regexp.to-string.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("copy-to"),a=e("./callback"),l=e("./utils/deepCopy").deepCopyWith,u=e("./utils/isBuffer").isBuffer,c=e("./utils/omit").omit,h=i;h.listUploads=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},o(i=i||{}).to(r),r.subres="uploads",(s=this._objectRequestParams("GET","",r)).query=t,s.xmlResponse=!0,s.successStatuses=[200],e.next=10,this.request(s);case 10:return a=e.sent,l=a.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),e.abrupt("return",{res:a.res,uploads:l,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:"true"===a.data.IsTruncated});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),h.listParts=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var a,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},o(s=s||{}).to(a),a.subres={uploadId:i},(l=this._objectRequestParams("GET",t,a)).query=r,l.xmlResponse=!0,l.successStatuses=[200],e.next=10,this.request(l);case 10:return u=e.sent,e.abrupt("return",{res:u.res,uploadId:u.data.UploadId,bucket:u.data.Bucket,name:u.data.Key,partNumberMarker:u.data.PartNumberMarker,nextPartNumberMarker:u.data.NextPartNumberMarker,maxParts:u.data.MaxParts,isTruncated:u.data.IsTruncated,parts:u.data.Part||[]});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),h.abortMultipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._stop(),s={},o(r=r||{}).to(s),s.subres={uploadId:i},(a=this._objectRequestParams("DELETE",t,s)).successStatuses=[204],e.next=9,this.request(a);case 9:return l=e.sent,e.abrupt("return",{res:l.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),h.initMultipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},o(i=i||{}).to(r),r.headers=r.headers||{},this._convertMetaToHeaders(i.meta,r.headers),r.subres="uploads",(s=this._objectRequestParams("POST",t,r)).mime=i.mime,s.xmlResponse=!0,s.successStatuses=[200],e.next=12,this.request(s);case 12:return a=e.sent,e.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),h.uploadPart=function(){var e=(0,s.default)(n.default.mark((function e(i,r,s,o,a,l,u){var c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c={size:l-a},!t||!t.browser){e.next=8;break}return e.next=5,this._createBuffer(o,a,l);case 5:c.content=e.sent,e.next=11;break;case 8:return e.next=10,this._createStream(o,a,l);case 10:c.stream=e.sent;case 11:return e.next=13,this._uploadPart(i,r,s,c,u);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)})));function i(t,i,r,n,s,o,a){return e.apply(this,arguments)}return i}(),h.completeMultipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var o,h,A,d,p,f,g,m;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=r.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,i){return!t||e.number!==i[t-1].number})),h='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',A=0;A<o.length;A++)d=o[A],h+="<Part>\n",h+="<PartNumber>".concat(d.number,"</PartNumber>\n"),h+="<ETag>".concat(d.etag,"</ETag>\n"),h+="</Part>\n";return h+="</CompleteMultipartUpload>",p={},(p=l(s=s||{},(function(e){if(u(e))return null}))).subres={uploadId:i},p.headers=c(p.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),f=this._objectRequestParams("POST",t,p),a.encodeCallback(f,p),f.mime="xml",f.content=h,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],e.next=17,this.request(f);case 17:if(g=e.sent,!s.progress){e.next=21;break}return e.next=21,s.progress(1,null,g.res);case 21:return m={res:g.res,bucket:f.bucket,name:t,etag:g.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(m.data=JSON.parse(g.data.toString())),e.abrupt("return",m);case 24:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),h._uploadPart=function(){var e=(0,s.default)(n.default.mark((function e(i,r,s,a,l){var u,h,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u={},o(l=l||{}).to(u),u.headers=u.headers||{},u.headers["Content-Length"]=a.size,u.headers=c(u.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),u.subres={partNumber:s,uploadId:r},(h=this._objectRequestParams("PUT",i,u)).mime=u.mime,t&&t.browser?h.content=a.content:h.stream=a.stream,h.successStatuses=[200],h.disabledMD5=l.disabledMD5,e.next=15,this.request(h);case 15:if((A=e.sent).res.headers.etag){e.next=18;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 18:return a.stream&&(a.stream=null,h.stream=null),e.abrupt("return",{name:i,etag:A.res.headers.etag,res:A.res});case 20:case"end":return e.stop()}}),e,this)})));function i(t,i,r,n,s){return e.apply(this,arguments)}return i}()}).call(this)}).call(this,e("_process"))},{"./callback":24,"./utils/deepCopy":60,"./utils/isBuffer":69,"./utils/omit":77,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.sort.js":320,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],31:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("url"),a=e("utility"),l=e("copy-to"),u=e("../../common/signUtils"),c=e("../utils/isIP").isIP,h=e("../utils/setSTSToken").setSTSToken,A=e("../utils/isFunction").isFunction;i.asyncSignatureUrl=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,d,p,f,g,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(m.length>2&&void 0!==m[2])||m[2],!c(this.options.endpoint.hostname)){e.next=3;break}throw new Error("can not get the object URL when endpoint is IP");case 3:if(!r||!/^\?/.test(t)){e.next=5;break}throw new Error("Invalid object name ".concat(t));case 5:if(i=i||{},t=this._objectName(t),i.method=i.method||"GET",s=a.timestamp()+(i.expires||1800),d={bucket:this.options.bucket,object:t},p=this._getResource(d),!this.options.stsToken||!A(this.options.refreshSTSToken)){e.next=14;break}return e.next=14,h.call(this);case 14:return this.options.stsToken&&(i["security-token"]=this.options.stsToken),f=u._signatureForURL(this.options.accessKeySecret,i,p,s),(g=o.parse(this._getReqUrl(d))).query={OSSAccessKeyId:this.options.accessKeyId,Expires:s,Signature:f.Signature},l(f.subResource).to(g.query),e.abrupt("return",g.format());case 20:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../../common/signUtils":52,"../utils/isFunction":72,"../utils/isIP":73,"../utils/setSTSToken":82,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.regexp.exec.js":338,url:543,utility:545}],32:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var s=r(e("@babel/runtime/helpers/typeof")),o=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,l=i,u=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];l.copy=function(){var e=(0,o.default)(n.default.mark((function e(t,i,r,o){var a,l,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===(0,s.default)(r)&&(o=r),(o=o||{}).headers=o.headers||{},Object.keys(o.headers).forEach((function(e){o.headers["x-oss-copy-source-".concat(e.toLowerCase())]=o.headers[e]})),(o.meta||Object.keys(o.headers).find((function(e){return u.includes(e.toLowerCase())})))&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),i=this._getSourceName(i,r),o.versionId&&(i="".concat(i,"?versionId=").concat(o.versionId)),o.headers["x-oss-copy-source"]=i,(a=this._objectRequestParams("PUT",t,o)).xmlResponse=!0,a.successStatuses=[200,304],e.next=14,this.request(a);case 14:return l=e.sent,(c=l.data)&&(c={etag:c.ETag,lastModified:c.LastModified}),e.abrupt("return",{data:c,res:l.res});case 18:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),l._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),a(t),e=encodeURIComponent(e),e="/".concat(t,"/").concat(e)}},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],33:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.delete=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=o.length>1&&void 0!==o[1]?o[1]:{}).subres=Object.assign({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("DELETE",t,i)).successStatuses=[204],e.next=7,this.request(r);case 7:return s=e.sent,e.abrupt("return",{res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],34:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("utility"),a=e("../utils/obj2xml").obj2xml;i.deleteMulti=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,l,u,c,h,A,d,p,f,g,m,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=v.length>1&&void 0!==v[1]?v[1]:{},r=[],t&&t.length){e.next=4;break}throw new Error("names is required");case 4:for(s=0;s<t.length;s++)l={},"string"==typeof t[s]?l.Key=o.escape(this._objectName(t[s])):(u=t[s],c=u.key,h=u.versionId,l.Key=o.escape(this._objectName(c)),l.VersionId=h),r.push(l);return A={Delete:{Quiet:!!i.quiet,Object:r}},d=a(A,{headers:!0}),i.subres=Object.assign({delete:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(p=this._objectRequestParams("POST","",i)).mime="xml",p.content=d,p.xmlResponse=!0,p.successStatuses=[200],e.next=16,this.request(p);case 16:return f=e.sent,g=f.data,(m=g&&g.Deleted||null)&&(Array.isArray(m)||(m=[m])),e.abrupt("return",{res:f.res,deleted:m||[]});case 21:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,utility:545}],35:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.deleteObjectTagging=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=o.length>1&&void 0!==o[1]?o[1]:{}).subres=Object.assign({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("DELETE",t,i)).successStatuses=[204],e.next=8,this.request(r);case 8:return s=e.sent,e.abrupt("return",{status:s.status,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],36:[function(e,t,i){e("core-js/modules/es.array.concat.js");var r=e("url"),n=e("../utils/isIP").isIP;i.generateObjectUrl=function(e,t){if(n(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var i=r.parse(t),s=this.options.bucket;i.hostname="".concat(s,".").concat(i.hostname),i.host="".concat(s,".").concat(i.host),t=i.format()}return t+this._escape(this._objectName(e))}},{"../utils/isIP":73,"core-js/modules/es.array.concat.js":310,url:543}],37:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("fs"),a=e("is-type-of"),l=e("../utils/isObject").isObject;i.get=function(){var e=(0,s.default)(n.default.mark((function e(i,r){var s,u,c,h,A,d,p,f,g=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.length>2&&void 0!==g[2]?g[2]:{},u=null,c=!1,a.writableStream(r)?u=r:a.string(r)?(u=o.createWriteStream(r),c=!0):l(r)&&(s=r),s=s||{},h=t&&t.browser,A=null===s.responseCacheControl?"":"no-cache",d=h&&A?{"response-cache-control":A}:{},s.subres=Object.assign(d,s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.process&&(s.subres["x-oss-process"]=s.process),e.prev=11,(f=this._objectRequestParams("GET",i,s)).writeStream=u,f.successStatuses=[200,206,304],e.next=17,this.request(f);case 17:p=e.sent,c&&u.destroy(),e.next=28;break;case 21:if(e.prev=21,e.t0=e.catch(11),!c){e.next=27;break}return u.destroy(),e.next=27,this._deleteFileSafe(r);case 27:throw e.t0;case 28:return e.abrupt("return",{res:p.res,content:p.data});case 29:case"end":return e.stop()}}),e,this,[[11,21]])})));function i(t,i){return e.apply(this,arguments)}return i}()}).call(this)}).call(this,e("_process"))},{"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,"core-js/modules/es.object.assign.js":325,fs:102,"is-type-of":537}],38:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.getACL=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=o.length>1&&void 0!==o[1]?o[1]:{}).subres=Object.assign({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,i)).successStatuses=[200],r.xmlResponse=!0,e.next=9,this.request(r);case 9:return s=e.sent,e.abrupt("return",{acl:s.data.AccessControlList.Grant,owner:{id:s.data.Owner.ID,displayName:s.data.Owner.DisplayName},res:s.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],39:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=i,a=e("../utils/isObject").isObject,l=e("../utils/isArray").isArray,u=e("../utils/parseRestoreInfo").parseRestoreInfo;function c(){return h.apply(this,arguments)}function h(){return h=(0,s.default)(n.default.mark((function e(){var t,i,r,s,o,a,c,h,A=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=A.length>0&&void 0!==A[0]?A[0]:{},i=A.length>1&&void 0!==A[1]?A[1]:{},!t.versionIdMarker||void 0!==t.keyMarker){e.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return i.subres=Object.assign({versions:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("GET","",i)).xmlResponse=!0,r.successStatuses=[200],r.query=d(t),e.next=12,this.request(r);case 12:return s=e.sent,o=s.data.Version||[],a=s.data.DeleteMarker||[],c=this,o&&(Array.isArray(o)||(o=[o]),o=o.map((function(e){return{name:e.Key,url:c._objectUrl(e.Key),lastModified:e.LastModified,isLatest:"true"===e.IsLatest,versionId:e.VersionId,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName},restoreInfo:u(e.RestoreInfo)}}))),a&&(l(a)||(a=[a]),a=a.map((function(e){return{name:e.Key,lastModified:e.LastModified,versionId:e.VersionId,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(h=s.data.CommonPrefixes||null)&&(l(h)||(h=[h]),h=h.map((function(e){return e.Prefix}))),e.abrupt("return",{res:s.res,objects:o,deleteMarker:a,prefixes:h,nextMarker:s.data.NextKeyMarker||null,NextVersionIdMarker:s.data.NextVersionIdMarker||null,nextKeyMarker:s.data.NextKeyMarker||null,nextVersionIdMarker:s.data.NextVersionIdMarker||null,isTruncated:"true"===s.data.IsTruncated});case 21:case"end":return e.stop()}}),e,this)}))),h.apply(this,arguments)}function A(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return a(e)&&Object.keys(e).forEach((function(i){t[A(i)]=e[i]})),t}o.getBucketVersions=c,o.listObjectVersions=c},{"../utils/isArray":67,"../utils/isObject":74,"../utils/parseRestoreInfo":78,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318,"core-js/modules/es.number.constructor.js":324,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],40:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.getObjectMeta=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=i||{},t=this._objectName(t),i.subres=Object.assign({objectMeta:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("HEAD",t,i)).successStatuses=[200],e.next=8,this.request(r);case 8:return s=e.sent,e.abrupt("return",{status:s.status,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],41:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=i,a=e("../utils/isObject").isObject;o.getObjectTagging=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=c.length>1&&void 0!==c[1]?c[1]:{}).subres=Object.assign({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,i)).successStatuses=[200],e.next=8,this.request(r);case 8:return s=e.sent,e.next=11,this.parseXML(s.data);case 11:return o=e.sent,l=(l=o.TagSet.Tag)&&a(l)?[l]:l||[],u={},l.forEach((function(e){u[e.Key]=e.Value})),e.abrupt("return",{status:s.status,res:s.res,tag:u});case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],42:[function(e,t,i){var r=e("../utils/isIP").isIP;i.getObjectUrl=function(e,t){if(r(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))}},{"../utils/isIP":73}],43:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.getSymlink=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=a.length>1&&void 0!==a[1]?a[1]:{}).subres=Object.assign({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,i)).successStatuses=[200],e.next=8,this.request(r);case 8:return s=e.sent,o=s.res.headers["x-oss-symlink-target"],e.abrupt("return",{targetName:decodeURIComponent(o),res:s.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],44:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkEnv").checkEnv;i.head=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,a,l=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=l.length>1&&void 0!==l[1]?l[1]:{},o("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),i.subres=Object.assign({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("HEAD",t,i)).successStatuses=[200,304],e.next=8,this.request(r);case 8:return s=e.sent,a={meta:null,res:s.res,status:s.status},200===s.status&&Object.keys(s.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=s.headers[e])})),e.abrupt("return",a);case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/checkEnv":55,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],45:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.putACL=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).subres=Object.assign({acl:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.headers=r.headers||{},r.headers["x-oss-object-acl"]=i,t=this._objectName(t),(s=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=10,this.request(s);case 10:return o=e.sent,e.abrupt("return",{res:o.res});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],46:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.object.keys.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/obj2xml").obj2xml,a=e("../utils/checkObjectTag").checkObjectTag;i.putObjectTagging=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]?c[2]:{},a(i),r.subres=Object.assign({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(s=this._objectRequestParams("PUT",t,r)).successStatuses=[200],i=Object.keys(i).map((function(e){return{Key:e,Value:i[e]}})),l={Tagging:{TagSet:{Tag:i}}},s.mime="xml",s.content=o(l),e.next=13,this.request(s);case 13:return u=e.sent,e.abrupt("return",{res:u.res,status:u.status});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkObjectTag":56,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328}],47:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.putSymlink=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},i=this._escape(this._objectName(i)),this._convertMetaToHeaders(r.meta,r.headers),r.headers["x-oss-symlink-target"]=i,r.subres=Object.assign({symlink:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.storageClass&&(r.headers["x-oss-storage-class"]=r.storageClass),t=this._objectName(t),(s=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=13,this.request(s);case 13:return o=e.sent,e.abrupt("return",{res:o.res});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],48:[function(e,t,i){(function(t){(function(){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.signPostObjectPolicyV4=void 0;var n=r(e("dateformat")),s=e("../utils/getStandardRegion"),o=e("../utils/policy2Str"),a=e("../signUtils");function l(e,i){var r=t.from(o.policy2Str(e),"utf8").toString("base64"),l=n.default(i,"UTC:yyyymmdd'T'HHMMss'Z'").split("T")[0];return a.getSignatureV4(this.options.accessKeySecret,l,s.getStandardRegion(this.options.region),r)}i.signPostObjectPolicyV4=l}).call(this)}).call(this,e("buffer").Buffer)},{"../signUtils":52,"../utils/getStandardRegion":65,"../utils/policy2Str":79,buffer:103,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,dateformat:383}],49:[function(e,t,i){e("core-js/modules/es.regexp.exec.js");var r=e("url"),n=e("utility"),s=e("copy-to"),o=e("../../common/signUtils"),a=e("../utils/isIP").isIP;i.signatureUrl=function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(a(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(i&&/^\?/.test(e))throw new Error("Invalid object name ".concat(e));t=t||{},e=this._objectName(e),t.method=t.method||"GET";var l=n.timestamp()+(t.expires||1800),u={bucket:this.options.bucket,object:e},c=this._getResource(u);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var h=o._signatureForURL(this.options.accessKeySecret,t,c,l),A=r.parse(this._getReqUrl(u));return A.query={OSSAccessKeyId:this.options.accessKeyId,Expires:l,Signature:h.Signature},s(h.subResource).to(A.query),A.format()}},{"../../common/signUtils":52,"../utils/isIP":73,"copy-to":107,"core-js/modules/es.regexp.exec.js":338,url:543,utility:545}],50:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.join.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("dateformat"),a=e("url"),l=e("../../common/signUtils"),u=e("../utils/setSTSToken").setSTSToken,c=e("../utils/isFunction").isFunction,h=e("../utils/getStandardRegion").getStandardRegion;i.signatureUrlV4=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s,A){var d,p,f,g,m,v,_,y,b,w,x,B;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=this.options.cloudBoxId,p=l.getProduct(d),f=l.getSignRegion(h(this.options.region),d),g=r&&r.headers||{},m=Object.assign({},r&&r.queries||{}),v=new Date,_=o(v,"UTC:yyyymmdd'T'HHMMss'Z'"),y=_.split("T")[0],(b=l.fixAdditionalHeaders(A)).length>0&&(m["x-oss-additional-headers"]=b.join(";")),m["x-oss-credential"]=l.getCredential(y,f,this.options.accessKeyId,p),m["x-oss-date"]=_,m["x-oss-expires"]=i,m["x-oss-signature-version"]="OSS4-HMAC-SHA256",!this.options.stsToken||!c(this.options.refreshSTSToken)){e.next=17;break}return e.next=17,u.call(this);case 17:return this.options.stsToken&&(m["x-oss-security-token"]=this.options.stsToken),w=l.getCanonicalRequest(t,{headers:g,queries:m},this.options.bucket,s,b),x=l.getStringToSign(f,_,w,p),m["x-oss-signature"]=l.getSignatureV4(this.options.accessKeySecret,y,f,x,p),(B=a.parse(this._getReqUrl({bucket:this.options.bucket,object:s}))).query=Object.assign({},m),e.abrupt("return",B.format());case 24:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n,s){return e.apply(this,arguments)}return t}()},{"../../common/signUtils":52,"../utils/getStandardRegion":65,"../utils/isFunction":72,"../utils/setSTSToken":82,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.join.js":317,"core-js/modules/es.object.assign.js":325,dateformat:383,url:543}],51:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.function.name.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("./utils/isArray").isArray,a=i;a._parallelNode=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var o,a,l,u,c,h,A,d;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=this,a=[],l=[],u=t.length/i,c=t.length%i,h=0===c?u:(t.length-c)/i+1,A=1,d=0;case 8:if(!(d<t.length)){e.next=26;break}if(!o.isCancel()){e.next=11;break}return e.abrupt("break",26);case 11:if(s?l.push(r(o,t[d],s)):l.push(r(o,t[d])),l.length!==i&&(A!==h||d!==t.length-1)){e.next=23;break}return e.prev=13,A+=1,e.next=17,Promise.all(l);case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(13),a.push(e.t0);case 22:l=[];case 23:d++,e.next=8;break;case 26:return e.abrupt("return",a);case 27:case"end":return e.stop()}}),e,this,[[13,19]])})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),a._parallel=function(e,t,i){var r=this;return new Promise((function(n){var s=[];if(t<=0||!e)n(s);else{var o=h(e),a=!1,l=0,u=!1;p()}function c(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}function h(e){var t=-1,i=e.length;return function(){return++t<i&&!r.isCancel()?{value:e[t],key:t}:null}}function A(e){l-=1,e?(a=!0,s.push(e),n(s)):a&&l<=0?(a=!0,n(s)):u||(r.isCancel()?n(s):p())}function d(e,t){i(e).then((function(e){t(null,e)})).catch((function(e){t(e)}))}function p(){for(u=!0;l<t&&!a&&!r.isCancel();){var e=o();if(null===e||s.length>0)return a=!0,void(l<=0&&n(s));l+=1,d(e.value,c(A))}u=!1}}))},a.cancel=function(e){this.options.cancelFlag=!0,o(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach((function(e){if(!1===e.destroyed){var t={name:"cancel",message:"cancel"};e.destroy(t)}})),this.multipartUploadStreams=[],e&&this.abortMultipartUpload(e.name,e.uploadId,e.options)},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1},a._stop=function(){this.options.cancelFlag=!0},a._makeCancelEvent=function(){return{status:0,name:"cancel"}},a._makeAbortEvent=function(){return{status:0,name:"abort",message:"upload task has been abort"}}},{"./utils/isArray":67,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.string.iterator.js":343,"core-js/modules/web.dom-collections.for-each.js":380,"core-js/modules/web.dom-collections.iterator.js":381}],52:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/toConsumableArray"));e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.set.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.string.starts-with.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.to-string.js");var n=e("./../../shims/crypto/crypto.js"),s=e("is-type-of"),o=e("qs"),a=e("./utils/lowercaseKeyHeader").lowercaseKeyHeader,l=e("./utils/encodeString").encodeString;i.getProduct=function(e){return void 0===e?"oss":"oss-cloudbox"},i.getSignRegion=function(e,t){return void 0===t?e:t},i.buildCanonicalizedResource=function(e,t){var i="".concat(e),r="?";if(s.string(t)&&""!==t.trim())i+=r+t;else if(s.array(t))t.sort(),i+=r+t.join("&");else if(t){var n=function(e){i+=r+e,(t[e]||0===t[e])&&(i+="=".concat(t[e])),r="&"};Object.keys(t).sort().forEach(n)}return i},i.buildCanonicalString=function(e,t,i,r){var n=a((i=i||{}).headers),s="x-oss-",o=[],l={},u=[e.toUpperCase(),n["content-md5"]||"",n["content-type"],r||n["x-oss-date"]];return Object.keys(n).forEach((function(e){var t=e.toLowerCase();0===t.indexOf(s)&&(l[t]=String(n[e]).trim())})),Object.keys(l).sort().forEach((function(e){o.push("".concat(e,":").concat(l[e]))})),(u=u.concat(o)).push(this.buildCanonicalizedResource(t,i.parameters)),u.join("\n")},i.computeSignature=function(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"utf-8";return n.createHmac("sha1",e).update(t.from(i,r)).digest("base64")},i.authorization=function(e,t,i,r){return"OSS ".concat(e,":").concat(this.computeSignature(t,i,r))},i.fixAdditionalHeaders=function(e){if(!e)return[];var t="x-oss-";return(0,r.default)(new Set(e.map((function(e){return e.toLowerCase()})))).filter((function(e){return"content-type"!==e&&"content-md5"!==e&&!e.startsWith(t)})).sort()},i.getCanonicalRequest=function(e,t,i,n,u){var c=a(t.headers),h=t.queries||{},A="x-oss-";if(n&&!i)throw Error("Please ensure that bucketName is passed into getCanonicalRequest.");var d=[e.toUpperCase(),l("/".concat(i?"".concat(i,"/"):"").concat(n||"")).replace(/%2F/g,"/")];d.push(o.stringify(h,{encoder:l,sort:function(e,t){return e.localeCompare(t)},strictNullHandling:!0})),u&&u.forEach((function(e){if(!Object.prototype.hasOwnProperty.call(c,e))throw Error("Can't find additional header ".concat(e," in request headers."))}));var p=new Set(u);Object.keys(c).forEach((function(e){("content-type"===e||"content-md5"===e||e.startsWith(A))&&p.add(e)}));var f="".concat((0,r.default)(p).sort().map((function(e){return"".concat(e,":").concat(s.string(c[e])?c[e].trim():c[e],"\n")})).join(""));return d.push(f),u&&u.length>0?d.push(u.join(";")):d.push(""),d.push(c["x-oss-content-sha256"]||"UNSIGNED-PAYLOAD"),d.join("\n")},i.getCredential=function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"oss",n="".concat(e,"/").concat(t,"/").concat(r,"/aliyun_v4_request");return i?"".concat(i,"/").concat(n):n},i.getStringToSign=function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"oss";return["OSS4-HMAC-SHA256",t,this.getCredential(t.split("T")[0],e,void 0,r),n.createHash("sha256").update(i).digest("hex")].join("\n")},i.getSignatureV4=function(e,t,i,r){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oss",o=n.createHmac("sha256","aliyun_v4".concat(e)).update(t).digest(),a=n.createHmac("sha256",o).update(i).digest(),l=n.createHmac("sha256",a).update(s).digest(),u=n.createHmac("sha256",l).update("aliyun_v4_request").digest();return n.createHmac("sha256",u).update(r).digest("hex")},i.authorizationV4=function(e,i,r,n,o,a,l,u){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"utf-8",h=arguments.length>9?arguments[9]:void 0,A=this.getProduct(h),d=this.fixAdditionalHeaders(u),p={};Object.entries(o.headers).forEach((function(e){p[e[0]]=s.string(e[1])?t.from(e[1],c).toString():e[1]}));var f=p["x-oss-date"]||o.queries&&o.queries["x-oss-date"],g=this.getCanonicalRequest(n,{headers:p,queries:o.queries},a,l,d),m=this.getStringToSign(r,f,g,A),v=f.split("T")[0],_=this.getSignatureV4(i,v,r,m,A),y=d.length>0?"AdditionalHeaders=".concat(d.join(";"),","):"";return"OSS4-HMAC-SHA256 Credential=".concat(this.getCredential(v,r,e,A),",").concat(y,"Signature=").concat(_)},i._signatureForURL=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,o={},a=i.subResource,l=void 0===a?{}:a;if(i.process&&(l["x-oss-process"]=i.process),i.trafficLimit&&(l["x-oss-traffic-limit"]=i.trafficLimit),i.response&&Object.keys(i.response).forEach((function(e){var t="response-".concat(e.toLowerCase());l[t]=i.response[e]})),Object.keys(i).forEach((function(e){var t=e.toLowerCase(),r=i[e];0===t.indexOf("x-oss-")?o[t]=r:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(o[e]=r)})),Object.prototype.hasOwnProperty.call(i,"security-token")&&(l["security-token"]=i["security-token"]),Object.prototype.hasOwnProperty.call(i,"callback")){var u={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};if(i.callback.host&&(u.callbackHost=i.callback.host),i.callback.contentType&&(u.callbackBodyType=i.callback.contentType),i.callback.callbackSNI&&(u.callbackSNI=i.callback.callbackSNI),l.callback=t.from(JSON.stringify(u)).toString("base64"),i.callback.customValue){var c={};Object.keys(i.callback.customValue).forEach((function(e){c["x:".concat(e)]=i.callback.customValue[e]})),l["callback-var"]=t.from(JSON.stringify(c)).toString("base64")}}var h=this.buildCanonicalString(i.method,r,{headers:o,parameters:l},n.toString());return{Signature:this.computeSignature(e,h,s),subResource:l}}}).call(this)}).call(this,e("buffer").Buffer)},{"./../../shims/crypto/crypto.js":531,"./utils/encodeString":61,"./utils/lowercaseKeyHeader":75,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/toConsumableArray":90,buffer:103,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.join.js":317,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.sort.js":320,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.set.js":341,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.string.replace.js":345,"core-js/modules/es.string.starts-with.js":348,"core-js/modules/es.string.trim.js":349,"core-js/modules/web.dom-collections.for-each.js":380,"core-js/modules/web.dom-collections.iterator.js":381,"is-type-of":537,qs:445}],53:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkBucketName=void 0,i.checkBucketName=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(e))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":338}],54:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkConfigValid=void 0;var r={endpoint:n,region:/^[a-zA-Z0-9\-_]+$/};function n(e){return"string"==typeof e?/^[a-zA-Z0-9._:/-]+$/.test(e):!!e.host&&/^[a-zA-Z0-9._:/-]+$/.test(e.host)}i.checkConfigValid=function(e,t){if(r[t]&&!(r[t]instanceof Function?r[t](e):r[t].test(e)))throw new Error("The ".concat(t," must be conform to the specifications"))}},{"core-js/modules/es.regexp.exec.js":338}],55:[function(e,t,i){(function(e){(function(){function t(t){e.browser&&console.warn(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.checkEnv=void 0,i.checkEnv=t}).call(this)}).call(this,e("_process"))},{_process:538}],56:[function(e,t,i){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkObjectTag=void 0;var r=e("./checkValid").checkValid,n=e("./isObject").isObject,s=[{validator:function(e){if("string"!=typeof e)throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],o={key:[].concat(s,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(s,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function a(e){if(!n(e))throw new Error("tag must be Object");var t=Object.entries(e);if(t.length>10)throw new Error("maximum of 10 tags for a object");var i=["key","value"];t.forEach((function(e){e.forEach((function(e,t){r(e,o[i[t]])}))}))}i.checkObjectTag=a},{"./checkValid":57,"./isObject":74,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],57:[function(e,t,i){function r(e,t){t.forEach((function(t){if(t.validator)t.validator(e);else if(t.pattern&&!t.pattern.test(e))throw new Error(t.msg)}))}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkValid=void 0,i.checkValid=r},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/web.dom-collections.for-each.js":380}],58:[function(e,t,i){(function(t){(function(){e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.array.concat.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.createRequest=void 0;var r=e("./../../../shims/crypto/crypto.js"),n=e("debug")("ali-oss"),s=e("lodash/isString"),o=e("lodash/isArray"),a=e("lodash/isObject"),l=e("mime"),u=e("dateformat"),c=e("copy-to"),h=e("path"),A=e("./encoder").encoder,d=e("./isIP").isIP,p=e("./setRegion").setRegion,f=e("../client/getReqUrl").getReqUrl,g=e("./isDingTalk").isDingTalk;function m(e,t){return e[t]||e[t.toLowerCase()]}function v(e,t){delete e[t],delete e[t.toLowerCase()]}function _(e){var i=new Date;this.options.amendTimeSkewed&&(i=+new Date+this.options.amendTimeSkewed);var _={"x-oss-date":u(i,this.options.authorizationV4?"UTC:yyyymmdd'T'HHMMss'Z'":"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};this.options.authorizationV4&&(_["x-oss-content-sha256"]="UNSIGNED-PAYLOAD"),"undefined"!=typeof window&&(_["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(_["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(_,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(_["x-oss-security-token"]=this.options.stsToken),c(e.headers).to(_),m(_,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?_["Content-Type"]=e.mime:g()?_["Content-Type"]="application/octet-stream":_["Content-Type"]=l.getType(e.mime||h.extname(e.object||""))),m(_,"Content-Type")||v(_,"Content-Type"),e.content&&(e.disabledMD5||(e.headers&&e.headers["Content-MD5"]?_["Content-MD5"]=e.headers["Content-MD5"]:_["Content-MD5"]=r.createHash("md5").update(t.from(e.content,"utf8")).digest("base64")),_["Content-Length"]||(_["Content-Length"]=e.content.length));var y=Object.prototype.hasOwnProperty;for(var b in _)_[b]&&y.call(_,b)&&(_[b]=A(String(_[b]),this.options.headerEncoding));var w={};if(s(e.subres)?w[e.subres]=null:o(e.subres)?e.subres.forEach((function(e){w[e]=null})):a(e.subres)&&Object.entries(e.subres).forEach((function(e){w[e[0]]=""===e[1]?null:e[1]})),a(e.query)&&Object.entries(e.query).forEach((function(e){w[e[0]]=e[1]})),_.authorization=this.options.authorizationV4?this.authorizationV4(e.method,{headers:_,queries:w},e.bucket,e.object,e.additionalHeaders):this.authorization(e.method,this._getResource(e),e.subres,_,this.options.headerEncoding),d(this.options.endpoint.hostname)){var x=this.options,B=x.region,P=x.internal,C=x.secure,M=p(B,P,C);_.host="".concat(e.bucket,".").concat(M.host)}var k=f.bind(this)(e);n("request %s %s, with headers %j, !!stream: %s",e.method,k,_,!!e.stream);var E=e.timeout||this.options.timeout,S={method:e.method,content:e.content,stream:e.stream,headers:_,timeout:E,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx};return this.agent&&(S.agent=this.agent),this.httpsAgent&&(S.httpsAgent=this.httpsAgent),S.enableProxy=!!this.options.enableProxy,S.proxy=this.options.proxy?this.options.proxy:null,{url:k,params:S}}i.createRequest=_}).call(this)}).call(this,e("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":531,"./encoder":62,"./isDingTalk":70,"./isIP":73,"./setRegion":81,buffer:103,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.string.includes.js":342,"core-js/modules/web.dom-collections.for-each.js":380,dateformat:383,debug:536,"lodash/isArray":422,"lodash/isObject":423,"lodash/isString":425,mime:430,path:439}],59:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.dataFix=void 0;var r=e("./isObject"),n=["true","TRUE","1",1],s=["false","FALSE","0",0];function o(e,t,i){if(r.isObject(e)){var n=t.remove,s=void 0===n?[]:n,u=t.rename,c=void 0===u?{}:u,h=t.camel,A=void 0===h?[]:h,d=t.bool,p=void 0===d?[]:d,f=t.lowerFirst,g=void 0!==f&&f;return s.forEach((function(t){return delete e[t]})),Object.entries(c).forEach((function(t){e[t[0]]&&(e[t[1]]||(e[t[1]]=e[t[0]],delete e[t[0]]))})),A.forEach((function(t){if(e[t]){var i=t.replace(/^(.)/,(function(e){return e.toLowerCase()})).replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));e[i]||(e[i]=e[t])}})),p.forEach((function(t){e[t]=a(e[t])})),"function"==typeof i&&i(e),l(e,g),o}}function a(e){return!!e&&(!!n.includes(e)||!s.includes(e)&&e)}function l(e,t){t&&Object.keys(e).forEach((function(t){var i=t.replace(/^\w/,(function(e){return e.toLowerCase()}));void 0===e[i]&&(e[i]=e[t],delete e[t])}))}i.dataFix=o},{"./isObject":74,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],60:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var n=r(e("@babel/runtime/helpers/typeof"));Object.defineProperty(i,"__esModule",{value:!0}),i.deepCopyWith=i.deepCopy=void 0;var s=e("./isBuffer");i.deepCopy=function(e){if(null===e||"object"!==(0,n.default)(e))return e;if(s.isBuffer(e))return e.slice();var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(r){t[r]=i.deepCopy(e[r])})),t},i.deepCopyWith=function(e,t){function r(e,i,o){var a=t(e,i,o);if(void 0!==a)return a;if(null===e||"object"!==(0,n.default)(e))return e;if(s.isBuffer(e))return e.slice();var l=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(t){l[t]=r(e[t],t,e)})),l}return t?r(e,"",null):i.deepCopy(e)}},{"./isBuffer":69,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],61:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.encodeString=void 0;var n=r(e("lodash/toString"));function s(e){var t=n.default(e);return encodeURIComponent(t).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}i.encodeString=s},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"lodash/toString":427}],62:[function(e,t,i){(function(t){(function(){function r(e){return"utf-8"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?e:t.from(e).toString("latin1")}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.encoder=void 0,i.encoder=r}).call(this)}).call(this,e("buffer").Buffer)},{buffer:103,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],63:[function(e,t,i){e("core-js/modules/es.array.map.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.formatInventoryConfig=void 0;var r=e("../utils/dataFix"),n=e("../utils/isObject"),s=e("../utils/isArray"),o=e("../utils/formatObjKey");function a(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&n.isObject(e)&&(e=[e]),e=s.isArray(e)?e.map(l):l(e)}function l(e){return r.dataFix(e,{bool:["IsEnabled"]},(function(e){var t,i;e.prefix=e.Filter.Prefix,delete e.Filter,e.OSSBucketDestination=e.Destination.OSSBucketDestination,e.OSSBucketDestination.rolename=e.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete e.OSSBucketDestination.RoleArn,e.OSSBucketDestination.bucket=e.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete e.OSSBucketDestination.Bucket,delete e.Destination,e.frequency=e.Schedule.Frequency,delete e.Schedule.Frequency,(null===(t=null==e?void 0:e.OptionalFields)||void 0===t?void 0:t.Field)&&!s.isArray(null===(i=e.OptionalFields)||void 0===i?void 0:i.Field)&&(e.OptionalFields.Field=[e.OptionalFields.Field])})),e=o.formatObjKey(e,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]})}i.formatInventoryConfig=a},{"../utils/dataFix":59,"../utils/formatObjKey":64,"../utils/isArray":67,"../utils/isObject":74,"core-js/modules/es.array.map.js":318,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345}],64:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var n=r(e("@babel/runtime/helpers/typeof"));function s(e,t,i){if(null===e||"object"!==(0,n.default)(e))return e;var r;if(Array.isArray(e)){r=[];for(var a=0;a<e.length;a++)r.push(s(e[a],t,i))}else r={},Object.keys(e).forEach((function(n){r[o(n,t,i)]=s(e[n],t,i)}));return r}function o(e,t,i){return i&&i.exclude&&i.exclude.includes(e)||("firstUpperCase"===t?e=e.replace(/^./,(function(e){return e.toUpperCase()})):"firstLowerCase"===t&&(e=e.replace(/^./,(function(e){return e.toLowerCase()})))),e}Object.defineProperty(i,"__esModule",{value:!0}),i.formatObjKey=void 0,i.formatObjKey=s},{"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.includes.js":342,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],65:[function(e,t,i){function r(e){return e.replace(/^oss-/g,"")}e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.getStandardRegion=void 0,i.getStandardRegion=r},{"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345}],66:[function(e,t,i){function r(e){for(var t=0,i=0;i<e.length;i++){var r=e.charAt(i);/^[\u00-\uff]$/.test(r)?t+=1:t+=2}return t}e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.getStrBytesCount=void 0,i.getStrBytesCount=r},{"core-js/modules/es.regexp.exec.js":338}],67:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isArray=void 0,i.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],68:[function(e,t,i){function r(e){return"undefined"!=typeof Blob&&e instanceof Blob}Object.defineProperty(i,"__esModule",{value:!0}),i.isBlob=void 0,i.isBlob=r},{}],69:[function(e,t,i){(function(e){(function(){function t(t){return e.isBuffer(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.isBuffer=void 0,i.isBuffer=t}).call(this)}).call(this,{isBuffer:e("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":409}],70:[function(e,t,i){(function(t){(function(){function r(){return!(!t.browser||!window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isDingTalk=void 0,i.isDingTalk=r}).call(this)}).call(this,e("_process"))},{_process:538,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.string.includes.js":342}],71:[function(e,t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isFile=void 0,i.isFile=function(e){return"undefined"!=typeof File&&e instanceof File}},{}],72:[function(e,t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isFunction=void 0,i.isFunction=function(e){return"function"==typeof e}},{}],73:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isIP=void 0,i.isIP=function(e){var t=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1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e)||t.test(e)}},{"core-js/modules/es.regexp.exec.js":338}],74:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isObject=void 0,i.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],75:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.lowercaseKeyHeader=void 0;var r=e("./isObject");function n(e){var t={};return r.isObject(e)&&Object.keys(e).forEach((function(i){t[i.toLowerCase()]=e[i]})),t}i.lowercaseKeyHeader=n},{"./isObject":74,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],76:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.array.map.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.obj2xml=void 0;var r=e("./formatObjKey");function n(e){return Object.prototype.toString.call(e).replace(/(.*? |])/g,"").toLowerCase()}function s(e,t){var i="";return t&&t.headers&&(i='<?xml version="1.0" encoding="UTF-8"?>\n'),t&&t.firstUpperCase&&(e=r.formatObjKey(e,"firstUpperCase")),"object"===n(e)?Object.keys(e).forEach((function(t){"undefined"!==n(e[t])&&"null"!==n(e[t])&&("string"===n(e[t])||"number"===n(e[t])?i+="<".concat(t,">").concat(e[t],"</").concat(t,">"):"object"===n(e[t])?i+="<".concat(t,">").concat(s(e[t]),"</").concat(t,">"):"array"===n(e[t])?i+=e[t].map((function(e){return"<".concat(t,">").concat(s(e),"</").concat(t,">")})).join(""):i+="<".concat(t,">").concat(e[t].toString(),"</").concat(t,">"))})):i+=e.toString(),i}i.obj2xml=s},{"./formatObjKey":64,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.join.js":317,"core-js/modules/es.array.map.js":318,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],77:[function(e,t,i){function r(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=n(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s:s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}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,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}function n(e,t){if(e){if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function o(e,t){var i,n=Object.assign({},e),s=r(t);try{for(s.s();!(i=s.n()).done;)delete n[i.value]}catch(e){s.e(e)}finally{s.f()}return n}e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.symbol.iterator.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.object.assign.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.omit=void 0,i.omit=o},{"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.symbol.description.js":351,"core-js/modules/es.symbol.iterator.js":353,"core-js/modules/es.symbol.js":354,"core-js/modules/web.dom-collections.iterator.js":381}],78:[function(e,t,i){e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.match.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.parseRestoreInfo=void 0,i.parseRestoreInfo=function(e){var t;if(e&&!(t={ongoingRequest:e.includes("true")}).ongoingRequest){var i=e.match(/expiry-date="(.*)"/);i&&i[1]&&(t.expiryDate=new Date(i[1]))}return t}},{"core-js/modules/es.array.includes.js":315,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.includes.js":342,"core-js/modules/es.string.match.js":344}],79:[function(e,t,i){function r(e){var t;if(e)if("string"==typeof e)try{t=JSON.stringify(JSON.parse(e))}catch(e){throw new Error("Policy string is not a valid JSON: ".concat(e.message))}else t=JSON.stringify(e);return t}e("core-js/modules/es.object.keys.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.policy2Str=void 0,i.policy2Str=r},{"core-js/modules/es.object.keys.js":328}],80:[function(e,t,i){function r(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=0,n=i.retryDelay,s=void 0===n?500:n,o=i.errorHandler,a=void 0===o?function(){return!0}:o,l=function i(){for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return new Promise((function(n,l){e.apply(void 0,o).then((function(e){r=0,n(e)})).catch((function(e){r<t&&a(e)?(r++,setTimeout((function(){n(i.apply(void 0,o))}),s)):(r=0,l(e))}))}))};return l}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.retry=void 0,i.retry=r},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333}],81:[function(e,t,i){var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.setRegion=void 0;var n=r(e("url")),s=e("./checkConfigValid");function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s.checkConfigValid(e,"region");var r=i?"https://":"http://",o=t?"-internal.aliyuncs.com":".aliyuncs.com",a="vpc100-oss-cn-";return e.substr(0,a.length)===a&&(o=".aliyuncs.com"),n.default.parse(r+e+o)}i.setRegion=o},{"./checkConfigValid":54,url:543}],82:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.checkCredentials=i.setSTSToken=void 0;var o=e("./formatObjKey");function a(){return l.apply(this,arguments)}function l(){return(l=(0,s.default)(n.default.mark((function e(){var t,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options||(this.options={}),t=new Date,!this.stsTokenFreshTime){e.next=14;break}if(!(+t-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){e.next=12;break}return this.stsTokenFreshTime=t,e.next=7,this.options.refreshSTSToken();case 7:i=e.sent,(i=o.formatObjKey(i,"firstLowerCase")).securityToken&&(i.stsToken=i.securityToken),u(i),Object.assign(this.options,i);case 12:e.next=15;break;case 14:this.stsTokenFreshTime=t;case 15:return e.abrupt("return",null);case 16:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function u(e){var t=["accessKeySecret","accessKeyId","stsToken"],i=Object.keys(e);t.forEach((function(e){if(!i.find((function(t){return t===e})))throw Error("refreshSTSToken must return contains ".concat(e))}))}i.setSTSToken=a,i.checkCredentials=u},{"./formatObjKey":64,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.find.js":313,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329}],83:[function(e,t,i){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],84:[function(e,t,i){var r=e("./arrayLikeToArray.js");function n(e){if(Array.isArray(e))return r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":83}],85:[function(e,t,i){function r(e,t,i,r,n,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(r,n)}function n(e){return function(){var t=this,i=arguments;return new Promise((function(n,s){var o=e.apply(t,i);function a(e){r(o,n,s,a,l,"next",e)}function l(e){r(o,n,s,a,l,"throw",e)}a(void 0)}))}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],86:[function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],87:[function(e,t,i){function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],88:[function(e,t,i){function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],89:[function(e,t,i){var r=e("./typeof.js").default;function n(){t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var e,i={},s=Object.prototype,o=s.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",h=l.toStringTag||"@@toStringTag";function A(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{A({},"")}catch(e){A=function(e,t,i){return e[t]=i}}function d(e,t,i,r){var n=t&&t.prototype instanceof y?t:y,s=Object.create(n.prototype),o=new I(r||[]);return a(s,"_invoke",{value:E(e,i,o)}),s}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=d;var f="suspendedStart",g="suspendedYield",m="executing",v="completed",_={};function y(){}function b(){}function w(){}var x={};A(x,u,(function(){return this}));var B=Object.getPrototypeOf,P=B&&B(B(D([])));P&&P!==s&&o.call(P,u)&&(x=P);var C=w.prototype=y.prototype=Object.create(x);function M(e){["next","throw","return"].forEach((function(t){A(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(n,s,a,l){var u=p(e[n],e,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==r(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,l)}))}l(u.arg)}var n;a(this,"_invoke",{value:function(e,r){function s(){return new t((function(t,n){i(e,r,t,n)}))}return n=n?n.then(s,s):s()}})}function E(t,i,r){var n=f;return function(s,o){if(n===m)throw new Error("Generator is already running");if(n===v){if("throw"===s)throw o;return{value:e,done:!0}}for(r.method=s,r.arg=o;;){var a=r.delegate;if(a){var l=S(a,r);if(l){if(l===_)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=m;var u=p(t,i,r);if("normal"===u.type){if(n=r.done?v:g,u.arg===_)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}function S(t,i){var r=i.method,n=t.iterator[r];if(n===e)return i.delegate=null,"throw"===r&&t.iterator.return&&(i.method="return",i.arg=e,S(t,i),"throw"===i.method)||"return"!==r&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var s=p(n,t.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,_;var o=s.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,_):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,_)}function T(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 F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function i(){for(;++n<t.length;)if(o.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=e,i.done=!0,i};return s.next=s}}throw new TypeError(r(t)+" is not iterable")}return b.prototype=w,a(C,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=A(w,h,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,A(e,h,"GeneratorFunction")),e.prototype=Object.create(C),e},i.awrap=function(e){return{__await:e}},M(k.prototype),A(k.prototype,c,(function(){return this})),i.AsyncIterator=k,i.async=function(e,t,r,n,s){void 0===s&&(s=Promise);var o=new k(d(e,t,r,n),s);return i.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},M(C),A(C,h,"Generator"),A(C,u,(function(){return this})),A(C,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),i=[];for(var r in t)i.push(r);return i.reverse(),function e(){for(;i.length;){var r=i.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},i.values=D,I.prototype={constructor:I,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(F),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=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 i=this;function r(r,n){return a.type="throw",a.arg=t,i.next=r,n&&(i.method="next",i.arg=e),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(l&&u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var s=n?n.completion:{};return s.type=e,s.arg=t,n?(this.method="next",this.next=n.finallyLoc,_):this.complete(s)},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),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),F(i),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var r=i.completion;if("throw"===r.type){var n=r.arg;F(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:D(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=e),_}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{"./typeof.js":91}],90:[function(e,t,i){var r=e("./arrayWithoutHoles.js"),n=e("./iterableToArray.js"),s=e("./unsupportedIterableToArray.js"),o=e("./nonIterableSpread.js");function a(e){return r(e)||n(e)||s(e)||o()}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":84,"./iterableToArray.js":87,"./nonIterableSpread.js":88,"./unsupportedIterableToArray.js":92}],91:[function(e,t,i){function r(e){return t.exports=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},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],92:[function(e,t,i){var r=e("./arrayLikeToArray.js");function n(e,t){if(e){if("string"==typeof e)return r(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(e,t):void 0}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":83}],93:[function(e,t,i){var r=e("../helpers/regeneratorRuntime")();t.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},{"../helpers/regeneratorRuntime":89}],94:[function(e,t,i){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],95:[function(e,i,r){(function(t){(function(){var r=e("object.assign/polyfill")();
44
+ */var lE,uE,cE=9e15,hE=1e9,AE="0123456789abcdef",dE="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",pE="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",fE={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-cE,maxE:cE,crypto:!1},gE=!0,mE="[DecimalError] ",vE=mE+"Invalid argument: ",_E=mE+"Precision limit exceeded",yE=mE+"crypto unavailable",bE="[object Decimal]",wE=Math.floor,xE=Math.pow,BE=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,PE=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,CE=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ME=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,kE=1e7,EE=dE.length-1,SE=pE.length-1,TE={toStringTag:bE};function FE(e){var t,i,r,n=e.length-1,s="",o=e[0];if(n>0){for(s+=o,t=1;t<n;t++)(i=7-(r=e[t]+"").length)&&(s+=HE(i)),s+=r;(i=7-(r=(o=e[t])+"").length)&&(s+=HE(i))}else if(0===o)return"0";for(;o%10==0;)o/=10;return s+o}function IE(e,t,i){if(e!==~~e||e<t||e>i)throw Error(vE+e)}function DE(e,t,i,r){var n,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=7,n=0):(n=Math.ceil((t+1)/7),t%=7),s=xE(10,7-t),a=e[n]%s|0,null==r?t<3?(0==t?a=a/100|0:1==t&&(a=a/10|0),o=i<4&&99999==a||i>3&&49999==a||5e4==a||0==a):o=(i<4&&a+1==s||i>3&&a+1==s/2)&&(e[n+1]/s/100|0)==xE(10,t-2)-1||(a==s/2||0==a)&&!(e[n+1]/s/100|0):t<4?(0==t?a=a/1e3|0:1==t?a=a/100|0:2==t&&(a=a/10|0),o=(r||i<4)&&9999==a||!r&&i>3&&4999==a):o=((r||i<4)&&a+1==s||!r&&i>3&&a+1==s/2)&&(e[n+1]/s/1e3|0)==xE(10,t-3)-1,o}function RE(e,t,i){for(var r,n,s=[0],o=0,a=e.length;o<a;){for(n=s.length;n--;)s[n]*=t;for(s[0]+=AE.indexOf(e.charAt(o++)),r=0;r<s.length;r++)s[r]>i-1&&(void 0===s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}TE.absoluteValue=TE.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),LE(e)},TE.ceil=function(){return LE(new this.constructor(this),this.e+1,2)},TE.clampedTo=TE.clamp=function(e,t){var i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(vE+t);return i.cmp(e)<0?e:i.cmp(t)>0?t:new r(i)},TE.comparedTo=TE.cmp=function(e){var t,i,r,n,s=this,o=s.d,a=(e=new s.constructor(e)).d,l=s.s,u=e.s;if(!o||!a)return l&&u?l!==u?l:o===a?0:!o^l<0?1:-1:NaN;if(!o[0]||!a[0])return o[0]?l:a[0]?-u:0;if(l!==u)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=0,i=(r=o.length)<(n=a.length)?r:n;t<i;++t)if(o[t]!==a[t])return o[t]>a[t]^l<0?1:-1;return r===n?0:r>n^l<0?1:-1},TE.cosine=TE.cos=function(){var e,t,i=this,r=i.constructor;return i.d?i.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(e,t){var i,r,n;if(t.isZero())return t;r=t.d.length,r<32?n=(1/$E(4,i=Math.ceil(r/3))).toString():(i=16,n="2.3283064365386962890625e-10");e.precision+=i,t=ZE(e,1,t.times(n),new e(1));for(var s=i;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,t}(r,eS(r,i)),r.precision=e,r.rounding=t,LE(2==uE||3==uE?i.neg():i,e,t,!0)):new r(1):new r(NaN)},TE.cubeRoot=TE.cbrt=function(){var e,t,i,r,n,s,o,a,l,u,c=this,h=c.constructor;if(!c.isFinite()||c.isZero())return new h(c);for(gE=!1,(s=c.s*xE(c.s*c,1/3))&&Math.abs(s)!=1/0?r=new h(s.toString()):(i=FE(c.d),(s=((e=c.e)-i.length+1)%3)&&(i+=1==s||-2==s?"0":"00"),s=xE(i,1/3),e=wE((e+1)/3)-(e%3==(e<0?-1:2)),(r=new h(i=s==1/0?"5e"+e:(i=s.toExponential()).slice(0,i.indexOf("e")+1)+e)).s=c.s),o=(e=h.precision)+3;;)if(u=(l=(a=r).times(a).times(a)).plus(c),r=OE(u.plus(c).times(a),u.plus(l),o+2,1),FE(a.d).slice(0,o)===(i=FE(r.d)).slice(0,o)){if("9999"!=(i=i.slice(o-3,o+1))&&(n||"4999"!=i)){+i&&(+i.slice(1)||"5"!=i.charAt(0))||(LE(r,e+1,1),t=!r.times(r).times(r).eq(c));break}if(!n&&(LE(a,e+1,0),a.times(a).times(a).eq(c))){r=a;break}o+=4,n=1}return gE=!0,LE(r,e,h.rounding,t)},TE.decimalPlaces=TE.dp=function(){var e,t=this.d,i=NaN;if(t){if(i=7*((e=t.length-1)-wE(this.e/7)),e=t[e])for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i},TE.dividedBy=TE.div=function(e){return OE(this,new this.constructor(e))},TE.dividedToIntegerBy=TE.divToInt=function(e){var t=this.constructor;return LE(OE(this,new t(e),0,1,1),t.precision,t.rounding)},TE.equals=TE.eq=function(e){return 0===this.cmp(e)},TE.floor=function(){return LE(new this.constructor(this),this.e+1,3)},TE.greaterThan=TE.gt=function(e){return this.cmp(e)>0},TE.greaterThanOrEqualTo=TE.gte=function(e){var t=this.cmp(e);return 1==t||0===t},TE.hyperbolicCosine=TE.cosh=function(){var e,t,i,r,n,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;i=o.precision,r=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,(n=s.d.length)<32?t=(1/$E(4,e=Math.ceil(n/3))).toString():(e=16,t="2.3283064365386962890625e-10"),s=ZE(o,1,s.times(t),new o(1),!0);for(var l,u=e,c=new o(8);u--;)l=s.times(s),s=a.minus(l.times(c.minus(l.times(c))));return LE(s,o.precision=i,o.rounding=r,!0)},TE.hyperbolicSine=TE.sinh=function(){var e,t,i,r,n=this,s=n.constructor;if(!n.isFinite()||n.isZero())return new s(n);if(t=s.precision,i=s.rounding,s.precision=t+Math.max(n.e,n.sd())+4,s.rounding=1,(r=n.d.length)<3)n=ZE(s,2,n,n,!0);else{e=(e=1.4*Math.sqrt(r))>16?16:0|e,n=ZE(s,2,n=n.times(1/$E(5,e)),n,!0);for(var o,a=new s(5),l=new s(16),u=new s(20);e--;)o=n.times(n),n=n.times(a.plus(o.times(l.times(o).plus(u))))}return s.precision=t,s.rounding=i,LE(n,t,i,!0)},TE.hyperbolicTangent=TE.tanh=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,OE(i.sinh(),i.cosh(),r.precision=e,r.rounding=t)):new r(i.s)},TE.inverseCosine=TE.acos=function(){var e=this,t=e.constructor,i=e.abs().cmp(1),r=t.precision,n=t.rounding;return-1!==i?0===i?e.isNeg()?VE(t,r,n):new t(0):new t(NaN):e.isZero()?VE(t,r+4,n).times(.5):(t.precision=r+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=r,t.rounding=n,e.times(2))},TE.inverseHyperbolicCosine=TE.acosh=function(){var e,t,i=this,r=i.constructor;return i.lte(1)?new r(i.eq(1)?0:NaN):i.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(i.e),i.sd())+4,r.rounding=1,gE=!1,i=i.times(i).minus(1).sqrt().plus(i),gE=!0,r.precision=e,r.rounding=t,i.ln()):new r(i)},TE.inverseHyperbolicSine=TE.asinh=function(){var e,t,i=this,r=i.constructor;return!i.isFinite()||i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,r.rounding=1,gE=!1,i=i.times(i).plus(1).sqrt().plus(i),gE=!0,r.precision=e,r.rounding=t,i.ln())},TE.inverseHyperbolicTangent=TE.atanh=function(){var e,t,i,r,n=this,s=n.constructor;return n.isFinite()?n.e>=0?new s(n.abs().eq(1)?n.s/0:n.isZero()?n:NaN):(e=s.precision,t=s.rounding,r=n.sd(),Math.max(r,e)<2*-n.e-1?LE(new s(n),e,t,!0):(s.precision=i=r-n.e,n=OE(n.plus(1),new s(1).minus(n),i+e,1),s.precision=e+4,s.rounding=1,n=n.ln(),s.precision=e,s.rounding=t,n.times(.5))):new s(NaN)},TE.inverseSine=TE.asin=function(){var e,t,i,r,n=this,s=n.constructor;return n.isZero()?new s(n):(t=n.abs().cmp(1),i=s.precision,r=s.rounding,-1!==t?0===t?((e=VE(s,i+4,r).times(.5)).s=n.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,n=n.div(new s(1).minus(n.times(n)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=r,n.times(2)))},TE.inverseTangent=TE.atan=function(){var e,t,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,A=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&h+4<=SE)return(o=VE(c,h+4,A).times(.25)).s=u.s,o}else{if(!u.s)return new c(NaN);if(h+4<=SE)return(o=VE(c,h+4,A).times(.5)).s=u.s,o}for(c.precision=a=h+10,c.rounding=1,e=i=Math.min(28,a/7+2|0);e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(gE=!1,t=Math.ceil(a/7),r=1,l=u.times(u),o=new c(u),n=u;-1!==e;)if(n=n.times(l),s=o.minus(n.div(r+=2)),n=n.times(l),void 0!==(o=s.plus(n.div(r+=2))).d[t])for(e=t;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<<i-1)),gE=!0,LE(o,c.precision=h,c.rounding=A,!0)},TE.isFinite=function(){return!!this.d},TE.isInteger=TE.isInt=function(){return!!this.d&&wE(this.e/7)>this.d.length-2},TE.isNaN=function(){return!this.s},TE.isNegative=TE.isNeg=function(){return this.s<0},TE.isPositive=TE.isPos=function(){return this.s>0},TE.isZero=function(){return!!this.d&&0===this.d[0]},TE.lessThan=TE.lt=function(e){return this.cmp(e)<0},TE.lessThanOrEqualTo=TE.lte=function(e){return this.cmp(e)<1},TE.logarithm=TE.log=function(e){var t,i,r,n,s,o,a,l,u=this,c=u.constructor,h=c.precision,A=c.rounding;if(null==e)e=new c(10),t=!0;else{if(i=(e=new c(e)).d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(i=u.d,u.s<0||!i||!i[0]||u.eq(1))return new c(i&&!i[0]?-1/0:1!=u.s?NaN:i?0:1/0);if(t)if(i.length>1)s=!0;else{for(n=i[0];n%10==0;)n/=10;s=1!==n}if(gE=!1,o=XE(u,a=h+5),r=t?NE(c,a+10):XE(e,a),DE((l=OE(o,r,a,1)).d,n=h,A))do{if(o=XE(u,a+=10),r=t?NE(c,a+10):XE(e,a),l=OE(o,r,a,1),!s){+FE(l.d).slice(n+1,n+15)+1==1e14&&(l=LE(l,h+1,0));break}}while(DE(l.d,n+=10,A));return gE=!0,LE(l,h,A)},TE.minus=TE.sub=function(e){var t,i,r,n,s,o,a,l,u,c,h,A,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN):e=new p(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(u=d.d,A=e.d,a=p.precision,l=p.rounding,!u[0]||!A[0]){if(A[0])e.s=-e.s;else{if(!u[0])return new p(3===l?-0:0);e=new p(d)}return gE?LE(e,a,l):e}if(i=wE(e.e/7),c=wE(d.e/7),u=u.slice(),s=c-i){for((h=s<0)?(t=u,s=-s,o=A.length):(t=A,i=c,o=u.length),s>(r=Math.max(Math.ceil(a/7),o)+2)&&(s=r,t.length=1),t.reverse(),r=s;r--;)t.push(0);t.reverse()}else{for((h=(r=u.length)<(o=A.length))&&(o=r),r=0;r<o;r++)if(u[r]!=A[r]){h=u[r]<A[r];break}s=0}for(h&&(t=u,u=A,A=t,e.s=-e.s),o=u.length,r=A.length-o;r>0;--r)u[o++]=0;for(r=A.length;r>s;){if(u[--r]<A[r]){for(n=r;n&&0===u[--n];)u[n]=kE-1;--u[n],u[r]+=kE}u[r]-=A[r]}for(;0===u[--o];)u.pop();for(;0===u[0];u.shift())--i;return u[0]?(e.d=u,e.e=UE(u,i),gE?LE(e,a,l):e):new p(3===l?-0:0)},TE.modulo=TE.mod=function(e){var t,i=this,r=i.constructor;return e=new r(e),!i.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||i.d&&!i.d[0]?LE(new r(i),r.precision,r.rounding):(gE=!1,9==r.modulo?(t=OE(i,e.abs(),0,3,1)).s*=e.s:t=OE(i,e,0,r.modulo,1),t=t.times(e),gE=!0,i.minus(t))},TE.naturalExponential=TE.exp=function(){return KE(this)},TE.naturalLogarithm=TE.ln=function(){return XE(this)},TE.negated=TE.neg=function(){var e=new this.constructor(this);return e.s=-e.s,LE(e)},TE.plus=TE.add=function(e){var t,i,r,n,s,o,a,l,u,c,h=this,A=h.constructor;if(e=new A(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new A(e.d||h.s===e.s?h:NaN)):e=new A(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(u=h.d,c=e.d,a=A.precision,l=A.rounding,!u[0]||!c[0])return c[0]||(e=new A(h)),gE?LE(e,a,l):e;if(s=wE(h.e/7),r=wE(e.e/7),u=u.slice(),n=s-r){for(n<0?(i=u,n=-n,o=c.length):(i=c,r=s,o=u.length),n>(o=(s=Math.ceil(a/7))>o?s+1:o+1)&&(n=o,i.length=1),i.reverse();n--;)i.push(0);i.reverse()}for((o=u.length)-(n=c.length)<0&&(n=o,i=c,c=u,u=i),t=0;n;)t=(u[--n]=u[n]+c[n]+t)/kE|0,u[n]%=kE;for(t&&(u.unshift(t),++r),o=u.length;0==u[--o];)u.pop();return e.d=u,e.e=UE(u,r),gE?LE(e,a,l):e},TE.precision=TE.sd=function(e){var t,i=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(vE+e);return i.d?(t=QE(i.d),e&&i.e+1>t&&(t=i.e+1)):t=NaN,t},TE.round=function(){var e=this,t=e.constructor;return LE(new t(e),e.e+1,t.rounding)},TE.sine=TE.sin=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+Math.max(i.e,i.sd())+7,r.rounding=1,i=function(e,t){var i,r=t.d.length;if(r<3)return t.isZero()?t:ZE(e,2,t,t);i=(i=1.4*Math.sqrt(r))>16?16:0|i,t=t.times(1/$E(5,i)),t=ZE(e,2,t,t);for(var n,s=new e(5),o=new e(16),a=new e(20);i--;)n=t.times(t),t=t.times(s.plus(n.times(o.times(n).minus(a))));return t}(r,eS(r,i)),r.precision=e,r.rounding=t,LE(uE>2?i.neg():i,e,t,!0)):new r(NaN)},TE.squareRoot=TE.sqrt=function(){var e,t,i,r,n,s,o=this,a=o.d,l=o.e,u=o.s,c=o.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?o:1/0);for(gE=!1,0==(u=Math.sqrt(+o))||u==1/0?(((t=FE(a)).length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=wE((l+1)/2)-(l<0||l%2),r=new c(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):r=new c(u.toString()),i=(l=c.precision)+3;;)if(r=(s=r).plus(OE(o,s,i+2,1)).times(.5),FE(s.d).slice(0,i)===(t=FE(r.d)).slice(0,i)){if("9999"!=(t=t.slice(i-3,i+1))&&(n||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(LE(r,l+1,1),e=!r.times(r).eq(o));break}if(!n&&(LE(s,l+1,0),s.times(s).eq(o))){r=s;break}i+=4,n=1}return gE=!0,LE(r,l,c.rounding,e)},TE.tangent=TE.tan=function(){var e,t,i=this,r=i.constructor;return i.isFinite()?i.isZero()?new r(i):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(i=i.sin()).s=1,i=OE(i,new r(1).minus(i.times(i)).sqrt(),e+10,0),r.precision=e,r.rounding=t,LE(2==uE||4==uE?i.neg():i,e,t,!0)):new r(NaN)},TE.times=TE.mul=function(e){var t,i,r,n,s,o,a,l,u,c=this,h=c.constructor,A=c.d,d=(e=new h(e)).d;if(e.s*=c.s,!(A&&A[0]&&d&&d[0]))return new h(!e.s||A&&!A[0]&&!d||d&&!d[0]&&!A?NaN:A&&d?0*e.s:e.s/0);for(i=wE(c.e/7)+wE(e.e/7),(l=A.length)<(u=d.length)&&(s=A,A=d,d=s,o=l,l=u,u=o),s=[],r=o=l+u;r--;)s.push(0);for(r=u;--r>=0;){for(t=0,n=l+r;n>r;)a=s[n]+d[r]*A[n-r-1]+t,s[n--]=a%kE|0,t=a/kE|0;s[n]=(s[n]+t)%kE|0}for(;!s[--o];)s.pop();return t?++i:s.shift(),e.d=s,e.e=UE(s,i),gE?LE(e,h.precision,h.rounding):e},TE.toBinary=function(e,t){return tS(this,2,e,t)},TE.toDecimalPlaces=TE.toDP=function(e,t){var i=this,r=i.constructor;return i=new r(i),void 0===e?i:(IE(e,0,hE),void 0===t?t=r.rounding:IE(t,0,8),LE(i,e+i.e+1,t))},TE.toExponential=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=jE(r,!0):(IE(e,0,hE),void 0===t?t=n.rounding:IE(t,0,8),i=jE(r=LE(new n(r),e+1,t),!0,e+1)),r.isNeg()&&!r.isZero()?"-"+i:i},TE.toFixed=function(e,t){var i,r,n=this,s=n.constructor;return void 0===e?i=jE(n):(IE(e,0,hE),void 0===t?t=s.rounding:IE(t,0,8),i=jE(r=LE(new s(n),e+n.e+1,t),!1,e+r.e+1)),n.isNeg()&&!n.isZero()?"-"+i:i},TE.toFraction=function(e){var t,i,r,n,s,o,a,l,u,c,h,A,d=this,p=d.d,f=d.constructor;if(!p)return new f(d);if(u=i=new f(1),r=l=new f(0),o=(s=(t=new f(r)).e=QE(p)-d.e-1)%7,t.d[0]=xE(10,o<0?7+o:o),null==e)e=s>0?t:u;else{if(!(a=new f(e)).isInt()||a.lt(u))throw Error(vE+a);e=a.gt(t)?s>0?t:u:a}for(gE=!1,a=new f(FE(p)),c=f.precision,f.precision=s=7*p.length*2;h=OE(a,t,0,1,1),1!=(n=i.plus(h.times(r))).cmp(e);)i=r,r=n,n=u,u=l.plus(h.times(n)),l=n,n=t,t=a.minus(h.times(n)),a=n;return n=OE(e.minus(i),r,0,1,1),l=l.plus(n.times(u)),i=i.plus(n.times(r)),l.s=u.s=d.s,A=OE(u,r,s,1).minus(d).abs().cmp(OE(l,i,s,1).minus(d).abs())<1?[u,r]:[l,i],f.precision=c,gE=!0,A},TE.toHexadecimal=TE.toHex=function(e,t){return tS(this,16,e,t)},TE.toNearest=function(e,t){var i=this,r=i.constructor;if(i=new r(i),null==e){if(!i.d)return i;e=new r(1),t=r.rounding}else{if(e=new r(e),void 0===t?t=r.rounding:IE(t,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(gE=!1,i=OE(i,e,0,t,1).times(e),gE=!0,LE(i)):(e.s=i.s,i=e),i},TE.toNumber=function(){return+this},TE.toOctal=function(e,t){return tS(this,8,e,t)},TE.toPower=TE.pow=function(e){var t,i,r,n,s,o,a=this,l=a.constructor,u=+(e=new l(e));if(!(a.d&&e.d&&a.d[0]&&e.d[0]))return new l(xE(+a,u));if((a=new l(a)).eq(1))return a;if(r=l.precision,s=l.rounding,e.eq(1))return LE(a,r,s);if((t=wE(e.e/7))>=e.d.length-1&&(i=u<0?-u:u)<=9007199254740991)return n=GE(l,a,i,r),e.s<0?new l(1).div(n):LE(n,r,s);if((o=a.s)<0){if(t<e.d.length-1)return new l(NaN);if(1&e.d[t]||(o=1),0==a.e&&1==a.d[0]&&1==a.d.length)return a.s=o,a}return(t=0!=(i=xE(+a,u))&&isFinite(i)?new l(i+"").e:wE(u*(Math.log("0."+FE(a.d))/Math.LN10+a.e+1)))>l.maxE+1||t<l.minE-1?new l(t>0?o/0:0):(gE=!1,l.rounding=a.s=1,i=Math.min(12,(t+"").length),(n=KE(e.times(XE(a,r+i)),r)).d&&DE((n=LE(n,r+5,1)).d,r,s)&&(t=r+10,+FE((n=LE(KE(e.times(XE(a,t+i)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14&&(n=LE(n,r+1,0))),n.s=o,gE=!0,l.rounding=s,LE(n,r,s))},TE.toPrecision=function(e,t){var i,r=this,n=r.constructor;return void 0===e?i=jE(r,r.e<=n.toExpNeg||r.e>=n.toExpPos):(IE(e,1,hE),void 0===t?t=n.rounding:IE(t,0,8),i=jE(r=LE(new n(r),e,t),e<=r.e||r.e<=n.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+i:i},TE.toSignificantDigits=TE.toSD=function(e,t){var i=this.constructor;return void 0===e?(e=i.precision,t=i.rounding):(IE(e,1,hE),void 0===t?t=i.rounding:IE(t,0,8)),LE(new i(this),e,t)},TE.toString=function(){var e=this,t=e.constructor,i=jE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i},TE.truncated=TE.trunc=function(){return LE(new this.constructor(this),this.e+1,1)},TE.valueOf=TE.toJSON=function(){var e=this,t=e.constructor,i=jE(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+i:i};var OE=function(){function e(e,t,i){var r,n=0,s=e.length;for(e=e.slice();s--;)r=e[s]*t+n,e[s]=r%i|0,n=r/i|0;return n&&e.unshift(n),e}function t(e,t,i,r){var n,s;if(i!=r)s=i>r?1:-1;else for(n=s=0;n<i;n++)if(e[n]!=t[n]){s=e[n]>t[n]?1:-1;break}return s}function i(e,t,i,r){for(var n=0;i--;)e[i]-=n,n=e[i]<t[i]?1:0,e[i]=n*r+e[i]-t[i];for(;!e[0]&&e.length>1;)e.shift()}return function(r,n,s,o,a,l){var u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E=r.constructor,S=r.s==n.s?1:-1,T=r.d,F=n.d;if(!(T&&T[0]&&F&&F[0]))return new E(r.s&&n.s&&(T?!F||T[0]!=F[0]:F)?T&&0==T[0]||!F?0*S:S/0:NaN);for(l?(d=1,c=r.e-n.e):(l=kE,d=7,c=wE(r.e/d)-wE(n.e/d)),M=F.length,P=T.length,v=(m=new E(S)).d=[],h=0;F[h]==(T[h]||0);h++);if(F[h]>(T[h]||0)&&c--,null==s?(w=s=E.precision,o=E.rounding):w=a?s+(r.e-n.e)+1:s,w<0)v.push(1),p=!0;else{if(w=w/d+2|0,h=0,1==M){for(A=0,F=F[0],w++;(h<P||A)&&w--;h++)x=A*l+(T[h]||0),v[h]=x/F|0,A=x%F|0;p=A||h<P}else{for((A=l/(F[0]+1)|0)>1&&(F=e(F,A,l),T=e(T,A,l),M=F.length,P=T.length),B=M,y=(_=T.slice(0,M)).length;y<M;)_[y++]=0;(k=F.slice()).unshift(0),C=F[0],F[1]>=l/2&&++C;do{A=0,(u=t(F,_,M,y))<0?(b=_[0],M!=y&&(b=b*l+(_[1]||0)),(A=b/C|0)>1?(A>=l&&(A=l-1),1==(u=t(f=e(F,A,l),_,g=f.length,y=_.length))&&(A--,i(f,M<g?k:F,g,l))):(0==A&&(u=A=1),f=F.slice()),(g=f.length)<y&&f.unshift(0),i(_,f,y,l),-1==u&&(u=t(F,_,M,y=_.length))<1&&(A++,i(_,M<y?k:F,y,l)),y=_.length):0===u&&(A++,_=[0]),v[h++]=A,u&&_[0]?_[y++]=T[B]||0:(_=[T[B]],y=1)}while((B++<P||void 0!==_[0])&&w--);p=void 0!==_[0]}v[0]||v.shift()}if(1==d)m.e=c,lE=p;else{for(h=1,A=v[0];A>=10;A/=10)h++;m.e=h+c*d-1,LE(m,a?s+m.e+1:s,o,p)}return m}}();function LE(e,t,i,r){var n,s,o,a,l,u,c,h,A,d=e.constructor;e:if(null!=t){if(!(h=e.d))return e;for(n=1,a=h[0];a>=10;a/=10)n++;if((s=t-n)<0)s+=7,o=t,l=(c=h[A=0])/xE(10,n-o-1)%10|0;else if((A=Math.ceil((s+1)/7))>=(a=h.length)){if(!r)break e;for(;a++<=A;)h.push(0);c=l=0,n=1,o=(s%=7)-7+1}else{for(c=a=h[A],n=1;a>=10;a/=10)n++;l=(o=(s%=7)-7+n)<0?0:c/xE(10,n-o-1)%10|0}if(r=r||t<0||void 0!==h[A+1]||(o<0?c:c%xE(10,n-o-1)),u=i<4?(l||r)&&(0==i||i==(e.s<0?3:2)):l>5||5==l&&(4==i||r||6==i&&(s>0?o>0?c/xE(10,n-o):0:h[A-1])%10&1||i==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=xE(10,(7-t%7)%7),e.e=-t||0):h[0]=e.e=0,e;if(0==s?(h.length=A,a=1,A--):(h.length=A+1,a=xE(10,7-s),h[A]=o>0?(c/xE(10,n-o)%xE(10,o)|0)*a:0),u)for(;;){if(0==A){for(s=1,o=h[0];o>=10;o/=10)s++;for(o=h[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,h[0]==kE&&(h[0]=1));break}if(h[A]+=a,h[A]!=kE)break;h[A--]=0,a=1}for(s=h.length;0===h[--s];)h.pop()}return gE&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function jE(e,t,i){if(!e.isFinite())return qE(e);var r,n=e.e,s=FE(e.d),o=s.length;return t?(i&&(r=i-o)>0?s=s.charAt(0)+"."+s.slice(1)+HE(r):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):n<0?(s="0."+HE(-n-1)+s,i&&(r=i-o)>0&&(s+=HE(r))):n>=o?(s+=HE(n+1-o),i&&(r=i-n-1)>0&&(s=s+"."+HE(r))):((r=n+1)<o&&(s=s.slice(0,r)+"."+s.slice(r)),i&&(r=i-o)>0&&(n+1===o&&(s+="."),s+=HE(r))),s}function UE(e,t){var i=e[0];for(t*=7;i>=10;i/=10)t++;return t}function NE(e,t,i){if(t>EE)throw gE=!0,i&&(e.precision=i),Error(_E);return LE(new e(dE),t,1,!0)}function VE(e,t,i){if(t>SE)throw Error(_E);return LE(new e(pE),t,i,!0)}function QE(e){var t=e.length-1,i=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)i--;for(t=e[0];t>=10;t/=10)i++}return i}function HE(e){for(var t="";e--;)t+="0";return t}function GE(e,t,i,r){var n,s=new e(1),o=Math.ceil(r/7+4);for(gE=!1;;){if(i%2&&iS((s=s.times(t)).d,o)&&(n=!0),0===(i=wE(i/2))){i=s.d.length-1,n&&0===s.d[i]&&++s.d[i];break}iS((t=t.times(t)).d,o)}return gE=!0,s}function zE(e){return 1&e.d[e.d.length-1]}function WE(e,t,i){for(var r,n,s=new e(t[0]),o=0;++o<t.length;){if(!(n=new e(t[o])).s){s=n;break}((r=s.cmp(n))===i||0===r&&s.s===i)&&(s=n)}return s}function KE(e,t){var i,r,n,s,o,a,l,u=0,c=0,h=0,A=e.constructor,d=A.rounding,p=A.precision;if(!e.d||!e.d[0]||e.e>17)return new A(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(gE=!1,l=p):l=t,a=new A(.03125);e.e>-2;)e=e.times(a),h+=5;for(l+=r=Math.log(xE(2,h))/Math.LN10*2+5|0,i=s=o=new A(1),A.precision=l;;){if(s=LE(s.times(e),l,1),i=i.times(++c),FE((a=o.plus(OE(s,i,l,1))).d).slice(0,l)===FE(o.d).slice(0,l)){for(n=h;n--;)o=LE(o.times(o),l,1);if(null!=t)return A.precision=p,o;if(!(u<3&&DE(o.d,l-r,d,u)))return LE(o,A.precision=p,d,gE=!0);A.precision=l+=10,i=s=a=new A(1),c=0,u++}o=a}}function XE(e,t){var i,r,n,s,o,a,l,u,c,h,A,d=1,p=e,f=p.d,g=p.constructor,m=g.rounding,v=g.precision;if(p.s<0||!f||!f[0]||!p.e&&1==f[0]&&1==f.length)return new g(f&&!f[0]?-1/0:1!=p.s?NaN:f?0:p);if(null==t?(gE=!1,c=v):c=t,g.precision=c+=10,r=(i=FE(f)).charAt(0),!(Math.abs(s=p.e)<15e14))return u=NE(g,c+2,v).times(s+""),p=XE(new g(r+"."+i.slice(1)),c-10).plus(u),g.precision=v,null==t?LE(p,v,m,gE=!0):p;for(;r<7&&1!=r||1==r&&i.charAt(1)>3;)r=(i=FE((p=p.times(e)).d)).charAt(0),d++;for(s=p.e,r>1?(p=new g("0."+i),s++):p=new g(r+"."+i.slice(1)),h=p,l=o=p=OE(p.minus(1),p.plus(1),c,1),A=LE(p.times(p),c,1),n=3;;){if(o=LE(o.times(A),c,1),FE((u=l.plus(OE(o,new g(n),c,1))).d).slice(0,c)===FE(l.d).slice(0,c)){if(l=l.times(2),0!==s&&(l=l.plus(NE(g,c+2,v).times(s+""))),l=OE(l,new g(d),c,1),null!=t)return g.precision=v,l;if(!DE(l.d,c-10,m,a))return LE(l,g.precision=v,m,gE=!0);g.precision=c+=10,u=o=p=OE(h.minus(1),h.plus(1),c,1),A=LE(p.times(p),c,1),n=a=1}l=u,n+=2}}function qE(e){return String(e.s*e.s/0)}function YE(e,t){var i,r,n;for((i=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(i<0&&(i=r),i+=+t.slice(r+1),t=t.substring(0,r)):i<0&&(i=t.length),r=0;48===t.charCodeAt(r);r++);for(n=t.length;48===t.charCodeAt(n-1);--n);if(t=t.slice(r,n)){if(n-=r,e.e=i=i-r-1,e.d=[],r=(i+1)%7,i<0&&(r+=7),r<n){for(r&&e.d.push(+t.slice(0,r)),n-=7;r<n;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=n;for(;r--;)t+="0";e.d.push(+t),gE&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function JE(e,t){var i,r,n,s,o,a,l,u,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ME.test(t))return YE(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(PE.test(t))i=16,t=t.toLowerCase();else if(BE.test(t))i=2;else{if(!CE.test(t))throw Error(vE+t);i=8}for((s=t.search(/p/i))>0?(l=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),o=(s=t.indexOf("."))>=0,r=e.constructor,o&&(s=(a=(t=t.replace(".","")).length)-s,n=GE(r,new r(i),s,2*s)),s=c=(u=RE(t,i,kE)).length-1;0===u[s];--s)u.pop();return s<0?new r(0*e.s):(e.e=UE(u,c),e.d=u,gE=!1,o&&(e=OE(e,n,4*a)),l&&(e=e.times(Math.abs(l)<54?xE(2,l):HS.pow(2,l))),gE=!0,e)}function ZE(e,t,i,r,n){var s,o,a,l,u=e.precision,c=Math.ceil(u/7);for(gE=!1,l=i.times(i),a=new e(r);;){if(o=OE(a.times(l),new e(t++*t++),u,1),a=n?r.plus(o):r.minus(o),r=OE(o.times(l),new e(t++*t++),u,1),void 0!==(o=a.plus(r)).d[c]){for(s=c;o.d[s]===a.d[s]&&s--;);if(-1==s)break}s=a,a=r,r=o,o=s}return gE=!0,o.d.length=c+1,o}function $E(e,t){for(var i=e;--t;)i*=e;return i}function eS(e,t){var i,r=t.s<0,n=VE(e,e.precision,1),s=n.times(.5);if((t=t.abs()).lte(s))return uE=r?4:1,t;if((i=t.divToInt(n)).isZero())uE=r?3:2;else{if((t=t.minus(i.times(n))).lte(s))return uE=zE(i)?r?2:3:r?4:1,t;uE=zE(i)?r?1:4:r?3:2}return t.minus(n).abs()}function tS(e,t,i,r){var n,s,o,a,l,u,c,h,A,d=e.constructor,p=void 0!==i;if(p?(IE(i,1,hE),void 0===r?r=d.rounding:IE(r,0,8)):(i=d.precision,r=d.rounding),e.isFinite()){for(p?(n=2,16==t?i=4*i-3:8==t&&(i=3*i-2)):n=t,(o=(c=jE(e)).indexOf("."))>=0&&(c=c.replace(".",""),(A=new d(1)).e=c.length-o,A.d=RE(jE(A),10,n),A.e=A.d.length),s=l=(h=RE(c,10,n)).length;0==h[--l];)h.pop();if(h[0]){if(o<0?s--:((e=new d(e)).d=h,e.e=s,h=(e=OE(e,A,i,r,0,n)).d,s=e.e,u=lE),o=h[i],a=n/2,u=u||void 0!==h[i+1],u=r<4?(void 0!==o||u)&&(0===r||r===(e.s<0?3:2)):o>a||o===a&&(4===r||u||6===r&&1&h[i-1]||r===(e.s<0?8:7)),h.length=i,u)for(;++h[--i]>n-1;)h[i]=0,i||(++s,h.unshift(1));for(l=h.length;!h[l-1];--l);for(o=0,c="";o<l;o++)c+=AE.charAt(h[o]);if(p){if(l>1)if(16==t||8==t){for(o=16==t?4:3,--l;l%o;l++)c+="0";for(l=(h=RE(c,n,t)).length;!h[l-1];--l);for(o=1,c="1.";o<l;o++)c+=AE.charAt(h[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>l)for(s-=l;s--;)c+="0";else s<l&&(c=c.slice(0,s)+"."+c.slice(s))}else c=p?"0p+0":"0";c=(16==t?"0x":2==t?"0b":8==t?"0o":"")+c}else c=qE(e);return e.s<0?"-"+c:c}function iS(e,t){if(e.length>t)return e.length=t,!0}function rS(e){return new this(e).abs()}function nS(e){return new this(e).acos()}function sS(e){return new this(e).acosh()}function oS(e,t){return new this(e).plus(t)}function aS(e){return new this(e).asin()}function lS(e){return new this(e).asinh()}function uS(e){return new this(e).atan()}function cS(e){return new this(e).atanh()}function hS(e,t){e=new this(e),t=new this(t);var i,r=this.precision,n=this.rounding,s=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(i=t.s<0?VE(this,r,n):new this(0)).s=e.s:!e.d||t.isZero()?(i=VE(this,s,1).times(.5)).s=e.s:t.s<0?(this.precision=s,this.rounding=1,i=this.atan(OE(e,t,s,1)),t=VE(this,s,1),this.precision=r,this.rounding=n,i=e.s<0?i.minus(t):i.plus(t)):i=this.atan(OE(e,t,s,1)):(i=VE(this,s,1).times(t.s>0?.25:.75)).s=e.s:i=new this(NaN),i}function AS(e){return new this(e).cbrt()}function dS(e){return LE(e=new this(e),e.e+1,2)}function pS(e,t,i){return new this(e).clamp(t,i)}function fS(e){if(!e||"object"!=typeof e)throw Error(mE+"Object expected");var t,i,r,n=!0===e.defaults,s=["precision",1,hE,"rounding",0,8,"toExpNeg",-cE,0,"toExpPos",0,cE,"maxE",0,cE,"minE",-cE,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(i=s[t],n&&(this[i]=fE[i]),void 0!==(r=e[i])){if(!(wE(r)===r&&r>=s[t+1]&&r<=s[t+2]))throw Error(vE+i+": "+r);this[i]=r}if(i="crypto",n&&(this[i]=fE[i]),void 0!==(r=e[i])){if(!0!==r&&!1!==r&&0!==r&&1!==r)throw Error(vE+i+": "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(yE);this[i]=!0}else this[i]=!1}return this}function gS(e){return new this(e).cos()}function mS(e){return new this(e).cosh()}function vS(e,t){return new this(e).div(t)}function _S(e){return new this(e).exp()}function yS(e){return LE(e=new this(e),e.e+1,3)}function bS(){var e,t,i=new this(0);for(gE=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)i.d&&(i=i.plus(t.times(t)));else{if(t.s)return gE=!0,new this(1/0);i=t}return gE=!0,i.sqrt()}function wS(e){return e instanceof HS||e&&e.toStringTag===bE||!1}function xS(e){return new this(e).ln()}function BS(e,t){return new this(e).log(t)}function PS(e){return new this(e).log(2)}function CS(e){return new this(e).log(10)}function MS(){return WE(this,arguments,-1)}function kS(){return WE(this,arguments,1)}function ES(e,t){return new this(e).mod(t)}function SS(e,t){return new this(e).mul(t)}function TS(e,t){return new this(e).pow(t)}function FS(e){var t,i,r,n,s=0,o=new this(1),a=[];if(void 0===e?e=this.precision:IE(e,1,hE),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));s<r;)(n=t[s])>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=n%1e7;else{if(!crypto.randomBytes)throw Error(yE);for(t=crypto.randomBytes(r*=4);s<r;)(n=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((127&t[s+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(n%1e7),s+=4);s=r/4}else for(;s<r;)a[s++]=1e7*Math.random()|0;for(e%=7,(r=a[--s])&&e&&(n=xE(10,7-e),a[s]=(r/n|0)*n);0===a[s];s--)a.pop();if(s<0)i=0,a=[0];else{for(i=-1;0===a[0];i-=7)a.shift();for(r=1,n=a[0];n>=10;n/=10)r++;r<7&&(i-=7-r)}return o.e=i,o.d=a,o}function IS(e){return LE(e=new this(e),e.e+1,this.rounding)}function DS(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function RS(e){return new this(e).sin()}function OS(e){return new this(e).sinh()}function LS(e){return new this(e).sqrt()}function jS(e,t){return new this(e).sub(t)}function US(){var e=0,t=arguments,i=new this(t[e]);for(gE=!1;i.s&&++e<t.length;)i=i.plus(t[e]);return gE=!0,LE(i,this.precision,this.rounding)}function NS(e){return new this(e).tan()}function VS(e){return new this(e).tanh()}function QS(e){return LE(e=new this(e),e.e+1,1)}TE[Symbol.for("nodejs.util.inspect.custom")]=TE.toString,TE[Symbol.toStringTag]="Decimal";var HS=TE.constructor=function e(t){var i,r,n;function s(e){var t,i,r,n=this;if(!(n instanceof s))return new s(e);if(n.constructor=s,wS(e))return n.s=e.s,void(gE?!e.d||e.e>s.maxE?(n.e=NaN,n.d=null):e.e<s.minE?(n.e=0,n.d=[0]):(n.e=e.e,n.d=e.d.slice()):(n.e=e.e,n.d=e.d?e.d.slice():e.d));if("number"===(r=typeof e)){if(0===e)return n.s=1/e<0?-1:1,n.e=0,void(n.d=[0]);if(e<0?(e=-e,n.s=-1):n.s=1,e===~~e&&e<1e7){for(t=0,i=e;i>=10;i/=10)t++;return void(gE?t>s.maxE?(n.e=NaN,n.d=null):t<s.minE?(n.e=0,n.d=[0]):(n.e=t,n.d=[e]):(n.e=t,n.d=[e]))}return 0*e!=0?(e||(n.s=NaN),n.e=NaN,void(n.d=null)):YE(n,e.toString())}if("string"===r)return 45===(i=e.charCodeAt(0))?(e=e.slice(1),n.s=-1):(43===i&&(e=e.slice(1)),n.s=1),ME.test(e)?YE(n,e):JE(n,e);if("bigint"===r)return e<0?(e=-e,n.s=-1):n.s=1,YE(n,e.toString());throw Error(vE+e)}if(s.prototype=TE,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=fS,s.clone=e,s.isDecimal=wS,s.abs=rS,s.acos=nS,s.acosh=sS,s.add=oS,s.asin=aS,s.asinh=lS,s.atan=uS,s.atanh=cS,s.atan2=hS,s.cbrt=AS,s.ceil=dS,s.clamp=pS,s.cos=gS,s.cosh=mS,s.div=vS,s.exp=_S,s.floor=yS,s.hypot=bS,s.ln=xS,s.log=BS,s.log10=CS,s.log2=PS,s.max=MS,s.min=kS,s.mod=ES,s.mul=SS,s.pow=TS,s.random=FS,s.round=IS,s.sign=DS,s.sin=RS,s.sinh=OS,s.sqrt=LS,s.sub=jS,s.sum=US,s.tan=NS,s.tanh=VS,s.trunc=QS,void 0===t&&(t={}),t&&!0!==t.defaults)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],i=0;i<n.length;)t.hasOwnProperty(r=n[i++])||(t[r]=this[r]);return s.config(t),s}(fE);dE=new HS(dE),pE=new HS(pE);class GS extends Uk{constructor(e,t){super(e,t),this._commentsList={},this.eventTrigger=e.eventTrigger,this._commentsList={},this._currentMode="path",this._Pathcolor="#066CFC",this._Ellipsecolor="#066CFC",this._Rectcolor="#066CFC",this._Arrowcolor="#066CFC",this._Textcolor="#066CFC",this._PathstrokeWidth="2",this._EllipsestrokeWidth="2",this._RectstrokeWidth="2",this._ArrowstrokeWidth="2",this._TextstrokeWidth="1",this._offsetX=0,this._offsetY=0,this._FontSize="18",this._stratchPos="",this.isCreating=!1,this.isDrawing=!1,this.isMoving=!1,this.isChosed=!1,this.isHolding=!1,this.isStretch=!1,this.isHovering=!1,this.isDuplicate=!1,this.isTyping=!1,this._isTouch=!1,this._revocationMechanism=null,this.on("active",(e=>{e?this.saveSVG():this.endCommentsTool()})),this.bimViewer.on("closeAll",(()=>{this.setActive(!1)})),this.initEventListeners()}saveSVG(){const e=document.getElementById("myCanvas");let t=e.clientWidth,i=e.clientHeight;const r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("width",t.toString()),r.setAttribute("height",i.toString());const n=document.createElementNS("http://www.w3.org/2000/svg","image");n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("width",t.toString()),n.setAttribute("height",i.toString()),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.toDataURL()),r.appendChild(n),r.setAttribute("id","svgImage");const s=document.getElementById("comments_panel");s&&(s.innerHTML=""),null==s||s.appendChild(r),this.checkSelectionBox(),this._revocationMechanism=new zS(this.eventTrigger),this.eventTrigger.emit("saveImage")}initEventListeners(){let e,t,i,r,n;const s=(e,t,i,r)=>{const n=[e-t,i-r],s=this.getInitVector(n[0],n[1]),o=this.getVerticalUnitVector(n[0],n[1]),a=.5;return`M ${t},${r}L ${(t-2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(r-2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e-2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i-2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e-7*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i-7*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e+12*Number(this._ArrowstrokeWidth)*a*s[0]).toString()},${(i+12*Number(this._ArrowstrokeWidth)*a*s[1]).toString()}L ${(e+7*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i+7*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(e+2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(i+2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L ${(t+2*Number(this._ArrowstrokeWidth)*a*o[0]).toString()},${(r+2*Number(this._ArrowstrokeWidth)*a*o[1]).toString()}L${t},${r}`};this.eventTrigger.on("saveImage",(()=>{const o=document.getElementById("svgImage"),a=e=>{const{target:t}=e;if("text"===t.tagName){this.hiddenAllInput();const e=t.parentNode,i=e.querySelector("foreignObject"),r=i.querySelector("input"),{textContent:n}=e;if(r)r.style.display="inline",t.textContent="";else{const e=document.createElement("input");e.setAttribute("type","text"),e.setAttribute("class","commentInputBox"),""!=n&&e.setAttribute("placeholder",n),i.appendChild(e)}this.isTyping=!0}},l=n=>{if(this._isTouch)return;const{target:s}=n;if("ellipse"===s.tagName||"path"===s.tagName||"rect"===s.tagName||"text"===s.tagName)if("selectionBox"==s.id);else if("handle"==s.getAttribute("type")){e=n.clientX+this._offsetX,t=n.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.isStretch=!0;const{id:s}=n.target;this._stratchPos=s,this.hiddenAllInput()}else this.chosedTarget!=s&&(this.isDuplicate=!1,this.chosedTarget=s),this.showHiddenSelectedBox(!0),this.isChosed=!0,this.isHolding=!0,e=n.clientX+this._offsetX,t=n.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.autoSaveInput(),this.setCurrentMode(""),this.eventTrigger.emit("choseTarget");else if(s.classList.contains("commentInputBox"))this.isTyping=!0;else{if(this.isChosed&&"circle"!==n.target&&(this.showHiddenSelectedBox(!1),this.isChosed=!1,this.chosedTarget=null,this.eventTrigger.emit("choseNothing")),this.isTyping&&this.autoSaveInput(),""==this._currentMode)return;if(!this.isCreating){this.showHiddenSelectedBox(!1),this.isCreating=!0,e=n.clientX+this._offsetX,t=n.clientY+this._offsetY;const i=document.createElementNS("http://www.w3.org/2000/svg","g");let r;switch(i.setAttribute("id",`${this._currentMode}_${this.getTime()}`),this._currentMode){case"path":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke",this._Pathcolor),r.setAttribute("stroke-width",this._PathstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","path");break;case"ellipse":r=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),r.setAttribute("cx",e.toString()),r.setAttribute("cy",t.toString()),r.setAttribute("rx","0"),r.setAttribute("ry","0"),r.setAttribute("stroke",this._Ellipsecolor),r.setAttribute("stroke-width",this._EllipsestrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","ellipse");break;case"rect":r=document.createElementNS("http://www.w3.org/2000/svg","rect"),r.setAttribute("x",e.toString()),r.setAttribute("y",t.toString()),r.setAttribute("stroke",this._Rectcolor),r.setAttribute("stroke-width",this._RectstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","rect");break;case"arrow":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke-width","20"),r.setAttribute("stroke","transparent"),r.setAttribute("fill",this._Arrowcolor),i.setAttribute("type","arrow");break;case"text":if(this.isTyping)this.autoSaveInput();else if(!this.isChosed){const r=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");let n=0;"16"==this._FontSize?(r.setAttribute("width","120"),r.setAttribute("height","26"),n=28):"18"==this._FontSize?(r.setAttribute("width","140"),r.setAttribute("height","28"),n=30):Number(this._FontSize)<=14&&(r.setAttribute("width","100"),r.setAttribute("height",(Number(this._FontSize)+10).toString()),n=Number(this._FontSize)+10),r.setAttribute("x",e),r.setAttribute("y",t);const s=document.createElement("input");s.setAttribute("type","text"),s.setAttribute("class","commentInputBox"),s.setAttribute("placeholder","输入内容...");const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("x",e+3),a.setAttribute("y",(t+n-Number(this._FontSize)/2).toString()),a.setAttribute("font-size",this._FontSize),a.setAttribute("stroke",this._Textcolor),a.setAttribute("stroke-width",this._TextstrokeWidth),a.setAttribute("fill",this._Textcolor),a.setAttribute("lengthAdjust","spacingAndGlyphs"),r.appendChild(s),i.setAttribute("type","text"),i.appendChild(r),i.appendChild(a),null==o||o.insertBefore(i,null==o?void 0:o.lastElementChild),s.click(),this.isTyping=!0,this.eventTrigger.emit("createNew")}}"text"!=this._currentMode&&""!=this._currentMode&&(i.appendChild(r),null==o||o.insertBefore(i,null==o?void 0:o.lastElementChild)),this.isChosed=!1}}},u=o=>{var a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E,S,T,F,I,D,R,O,L,j;if(this._isTouch)return;const U=o.clientX+this._offsetX,N=o.clientY+this._offsetY;let V;if(this.isCreating)switch(this.isDrawing=!0,this._currentMode){case"path":V=document.querySelectorAll("g");const i=[];V.forEach((e=>{"path"==e.getAttribute("type")&&i.push(e)}));const r=i[i.length-1].querySelector("path");let n=r.getAttribute("d");n&&(n+=`L ${U},${N}`,r.setAttribute("d",n));break;case"ellipse":var Q=document.querySelectorAll("ellipse"),H=Q[Q.length-1];if(H){var G=Math.abs(U-e)/2,z=Math.abs(N-t)/2;H.setAttribute("cx",((U+e)/2).toString()),H.setAttribute("cy",((N+t)/2).toString()),H.setAttribute("rx",G.toString()),H.setAttribute("ry",z.toString())}break;case"rect":const o=document.querySelectorAll("g"),a=[];o.forEach((e=>{"rect"==e.getAttribute("type")&&a.push(e.childNodes[0])}));const l=a[a.length-1],u=l.getAttribute("x"),c=l.getAttribute("y");if(u&&c){const e=Math.abs(parseInt(u)-U),t=Math.abs(parseInt(c)-N);l.setAttribute("width",e.toString()),l.setAttribute("height",t.toString()),l.setAttribute("rx","9"),l.setAttribute("ry","9"),l.setAttribute("type","comment")}break;case"arrow":V=document.querySelectorAll("g");const h=[];V.forEach((e=>{"arrow"==e.getAttribute("type")&&h.push(e)}));const A=h[h.length-1].querySelector("path");if(A.getAttribute("d")){const i=s(U,e,N,t);A.setAttribute("d",i)}break;case"text":this.isDrawing=!1}else if(this.isHolding){(Math.abs(U-e)>=1||Math.abs(N-t)>=1)&&(this.isMoving=!0);const n=null===(a=this.chosedTarget)||void 0===a?void 0:a.getBBox();switch(this.chosedTarget.tagName){case"path":const s=(null===(l=this.chosedTarget)||void 0===l?void 0:l.getAttribute("d")).replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(s=>{const[o,a]=s.split(",").map(parseFloat),l=Number(o)+Number(U)-Number(n.x)-(Number(e)-Number(i)),u=Number(a)+Number(N)-Number(n.y)-(Number(t)-Number(r));return`${l.toString()},${u.toString()}`}));null===(u=this.chosedTarget)||void 0===u||u.setAttribute("d",s);break;case"ellipse":var W=Number(null===(c=this.chosedTarget)||void 0===c?void 0:c.getAttribute("cx")),K=Number(null===(h=this.chosedTarget)||void 0===h?void 0:h.getAttribute("cy"));const o=Number(null===(A=this.chosedTarget)||void 0===A?void 0:A.getAttribute("rx")),a=Number(null===(d=this.chosedTarget)||void 0===d?void 0:d.getAttribute("ry"));null===(p=this.chosedTarget)||void 0===p||p.setAttribute("cx",U-(e-i)/2+o),null===(f=this.chosedTarget)||void 0===f||f.setAttribute("cy",N-(t-r)/2+a);break;case"rect":null===(g=this.chosedTarget)||void 0===g||g.setAttribute("x",U-(e-i)),null===(m=this.chosedTarget)||void 0===m||m.setAttribute("y",N-(t-r));break;case"text":null===(v=this.chosedTarget)||void 0===v||v.setAttribute("x",(U-(e-i)).toString()),null===(_=this.chosedTarget)||void 0===_||_.setAttribute("y",(N-(t-r)+3*n.height/4).toString());var X=this.chosedTarget.getAttribute("font-size");const y=this.chosedTarget.parentNode;if(y){const e=y.querySelector("foreignObject");e&&(e.setAttribute("x",Number(this.chosedTarget.getAttribute("x"))-3),e.setAttribute("y",Number(this.chosedTarget.getAttribute("y"))-(24-Number(X)/2)))}}this.updateSelectionBox()}else if(this.isStretch){switch(this.chosedTarget.parentNode.getAttribute("type")){case"path":const i=null===(y=this.chosedTarget)||void 0===y?void 0:y.getAttribute("d");let r,s,o,a,l;n=null===(b=this.chosedTarget)||void 0===b?void 0:b.getBBox(),-1!==this._stratchPos.indexOf("right")&&n.width+U-e<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("left")&&n.width-(U-e)<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("top")&&n.height-(N-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),-1!==this._stratchPos.indexOf("bottom")&&n.height+(N-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),r=i.replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(i=>{const[r,u]=i.split(",").map(parseFloat);return-1!==this._stratchPos.indexOf("left")||-1!==this._stratchPos.indexOf("right")?(-1!==this._stratchPos.indexOf("right")&&(a=new HS(U-e).mul(new HS(r-n.x).div(n.width))),-1!==this._stratchPos.indexOf("left")&&(a=new HS(U-e).mul(new HS(n.x+n.width-r).div(n.width))),!Number.isNaN(a)&&a||(a=new HS(0)),s=new HS(r).add(a)):s=new HS(r),-1!==this._stratchPos.indexOf("top")||-1!==this._stratchPos.indexOf("bottom")?(-1!==this._stratchPos.indexOf("top")&&(l=new HS(N-t).mul(new HS(n.y+n.height-u).div(n.height))),-1!==this._stratchPos.indexOf("bottom")&&(l=new HS(N-t).mul(new HS(u-n.y).div(n.height))),!Number.isNaN(l)&&l||(l=new HS(0)),o=new HS(u).add(l)):o=new HS(u),`${s.toFixed(16)},${o.toFixed(16)}`})),null===(w=this.chosedTarget)||void 0===w||w.setAttribute("d",r);break;case"ellipse":W=Number(null===(x=this.chosedTarget)||void 0===x?void 0:x.getAttribute("cx")),K=Number(null===(B=this.chosedTarget)||void 0===B?void 0:B.getAttribute("cy")),G=Number(null===(P=this.chosedTarget)||void 0===P?void 0:P.getAttribute("rx")),z=Number(null===(C=this.chosedTarget)||void 0===C?void 0:C.getAttribute("ry"));-1!==this._stratchPos.indexOf("left")?(W+=.5*(U-e),G-=.5*(U-e)):-1!==this._stratchPos.indexOf("right")&&(W+=.5*(U-e),G+=.5*(U-e)),-1!==this._stratchPos.indexOf("top")?(K+=.5*(N-t),z-=.5*(N-t)):-1!==this._stratchPos.indexOf("bottom")&&(K+=.5*(N-t),z+=.5*(N-t)),G<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(M=this.chosedTarget)||void 0===M||M.setAttribute("cx",W.toString()),null===(k=this.chosedTarget)||void 0===k||k.setAttribute("rx",G.toString())),z<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(E=this.chosedTarget)||void 0===E||E.setAttribute("cy",K.toString()),null===(S=this.chosedTarget)||void 0===S||S.setAttribute("ry",z.toString()));break;case"rect":var q=Number(null===(T=this.chosedTarget)||void 0===T?void 0:T.getAttribute("x")),Y=Number(null===(F=this.chosedTarget)||void 0===F?void 0:F.getAttribute("y")),J=Number(null===(I=this.chosedTarget)||void 0===I?void 0:I.getAttribute("width")),Z=Number(null===(D=this.chosedTarget)||void 0===D?void 0:D.getAttribute("height"));-1!==this._stratchPos.indexOf("left")?(q+=U-e,J-=U-e):-1!==this._stratchPos.indexOf("right")&&(J+=U-e),J<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(R=this.chosedTarget)||void 0===R||R.setAttribute("x",q.toString()),null===(O=this.chosedTarget)||void 0===O||O.setAttribute("width",J.toString())),-1!==this._stratchPos.indexOf("top")?(Y+=N-t,Z-=N-t):-1!==this._stratchPos.indexOf("bottom")&&(Z+=N-t),Z<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(L=this.chosedTarget)||void 0===L||L.setAttribute("y",Y.toString()),null===(j=this.chosedTarget)||void 0===j||j.setAttribute("height",Z.toString()))}this.updateSelectionBox(),e=o.clientX+this._offsetX,t=o.clientY+this._offsetY}},c=()=>{if(!this._isTouch)if(this.isHolding&&(this.isMoving&&(this.isMoving=!1,this.AddNewState((()=>{}))),this.isHolding=!1),this.isCreating){if(this.isDrawing)this.isDrawing=!1,this.eventTrigger.emit("createNew"),this.AddNewState((()=>{}));else if(!this.isChosed&&!this.isStretch&&"text"!=this._currentMode&&""!=this._currentMode){const e=null==o?void 0:o.lastElementChild;if(e){const t=e.previousElementSibling;null==o||o.removeChild(t)}}this.chosedTarget=null,this.isCreating=!1}else this.isStretch&&(this.isStretch=!1,this.AddNewState((()=>{})))},h=e=>{"Delete"!==e.key&&8!==e.keyCode||this.deleteCurrentComments(),!e.ctrlKey||"c"!==e.key&&"C"!==e.key||this.isChosed&&(this.isDuplicate=!0),!e.ctrlKey||"v"!==e.key&&"V"!==e.key||this.isDuplicate&&this.duplicateComment(),(e.ctrlKey&&"z"===e.key||"Z"===e.key)&&this.UnDo((()=>{})),(e.ctrlKey&&"y"===e.key||"Y"===e.key)&&this.ReDo((()=>{})),"Enter"===e.key&&this.autoSaveInput()},A=n=>{if(!this._isTouch)return;const s=n.touches[0],{target:a}=s;if("ellipse"===a.tagName||"path"===a.tagName||"rect"===a.tagName||"arrow"===a.tagName||"text"===a.tagName)if("handle"==a.getAttribute("type")){e=s.clientX+this._offsetX,t=s.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.isStretch=!0;const{id:n}=s.target;this._stratchPos=n}else this.chosedTarget!=a&&(this.isDuplicate=!1,this.chosedTarget=a),this.showHiddenSelectedBox(!0),this.isChosed=!0,this.isHolding=!0,e=s.clientX+this._offsetX,t=s.clientY+this._offsetY,i=this.chosedTarget.getBBox().x,r=this.chosedTarget.getBBox().y,this.chosedTarget.getBBox().width,this.chosedTarget.getBBox().height,this.setCurrentMode(""),this.eventTrigger.emit("choseTarget");else if(a.classList.contains("commentInputBox"))this.isTyping=!0;else{if(this.isChosed&&"circle"!==s.target&&(this.showHiddenSelectedBox(!1),this.isChosed=!1,this.chosedTarget=null,this.eventTrigger.emit("choseNothing")),""==this._currentMode)return;if(!this.isCreating){this.showHiddenSelectedBox(!1),this.isCreating=!0,e=s.clientX+this._offsetX,t=s.clientY+this._offsetY;const i=document.createElementNS("http://www.w3.org/2000/svg","g");let r;switch(i.setAttribute("id",`${this._currentMode}_${this.getTime()}`),this._currentMode){case"path":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke",this._Pathcolor),r.setAttribute("stroke-width",this._PathstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","path");break;case"ellipse":r=document.createElementNS("http://www.w3.org/2000/svg","ellipse"),r.setAttribute("cx",e.toString()),r.setAttribute("cy",t.toString()),r.setAttribute("rx","0"),r.setAttribute("ry","0"),r.setAttribute("stroke",this._Ellipsecolor),r.setAttribute("stroke-width",this._EllipsestrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","ellipse");break;case"rect":r=document.createElementNS("http://www.w3.org/2000/svg","rect"),r.setAttribute("x",e.toString()),r.setAttribute("y",t.toString()),r.setAttribute("stroke",this._Rectcolor),r.setAttribute("stroke-width",this._RectstrokeWidth),r.setAttribute("fill","transparent"),i.setAttribute("type","rect");break;case"arrow":r=document.createElementNS("http://www.w3.org/2000/svg","path"),r.setAttribute("d",`M ${e},${t}`),r.setAttribute("stroke-width","20"),r.setAttribute("stroke","transparent"),r.setAttribute("fill",this._Arrowcolor),i.setAttribute("type","arrow");break;case"text":this.eventTrigger.emit("clickCreateText",s)}"text"!=this._currentMode&&""!=this._currentMode&&(i.appendChild(r),null==o||o.insertBefore(i,null==o?void 0:o.lastElementChild)),this.isChosed=!1}}},d=o=>{var a,l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k,E,S,T,F,I,D,R,O,L,j;if(!this._isTouch)return;const U=o.touches[0],N=U.clientX+this._offsetX,V=U.clientY+this._offsetY;let Q;if(this.isCreating)switch(this.isDrawing=!0,this._currentMode){case"path":Q=document.querySelectorAll("g");const i=[];Q.forEach((e=>{"path"==e.getAttribute("type")&&i.push(e)}));const r=i[i.length-1].querySelector("path");let n=r.getAttribute("d");n&&(n+=`L ${N},${V}`,r.setAttribute("d",n));break;case"ellipse":var H=document.querySelectorAll("ellipse"),G=H[H.length-1];if(G){var z=Math.abs(N-e)/2,W=Math.abs(V-t)/2;G.setAttribute("cx",((N+e)/2).toString()),G.setAttribute("cy",((V+t)/2).toString()),G.setAttribute("rx",z.toString()),G.setAttribute("ry",W.toString())}break;case"rect":var K=document.querySelectorAll("rect"),X=K[K.length-10],q=X.getAttribute("x"),Y=X.getAttribute("y");if(q&&Y){var J=Math.abs(parseInt(q)-N),Z=Math.abs(parseInt(Y)-V);X.setAttribute("width",J.toString()),X.setAttribute("height",Z.toString()),X.setAttribute("rx","9"),X.setAttribute("ry","9"),X.setAttribute("type","comment")}break;case"arrow":Q=document.querySelectorAll("g");const o=[];Q.forEach((e=>{"arrow"==e.getAttribute("type")&&o.push(e)}));const a=o[o.length-1].querySelector("path");if(a.getAttribute("d")){const i=s(N,e,V,t);a.setAttribute("d",i)}break;case"text":this.isDrawing=!1}else if(this.isHolding){(Math.abs(N-e)>=1||Math.abs(V-t)>=1)&&(this.isMoving=!0);const n=null===(a=this.chosedTarget)||void 0===a?void 0:a.getBBox();switch(this.chosedTarget.tagName){case"path":const s=(null===(l=this.chosedTarget)||void 0===l?void 0:l.getAttribute("d")).replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(s=>{const[o,a]=s.split(",").map(parseFloat),l=Number(o)+Number(N)-Number(n.x)-(Number(e)-Number(i)),u=Number(a)+Number(V)-Number(n.y)-(Number(t)-Number(r));return`${l.toString()},${u.toString()}`}));null===(u=this.chosedTarget)||void 0===u||u.setAttribute("d",s);break;case"ellipse":var $=Number(null===(c=this.chosedTarget)||void 0===c?void 0:c.getAttribute("cx")),ee=Number(null===(h=this.chosedTarget)||void 0===h?void 0:h.getAttribute("cy"));const o=Number(null===(A=this.chosedTarget)||void 0===A?void 0:A.getAttribute("rx")),a=Number(null===(d=this.chosedTarget)||void 0===d?void 0:d.getAttribute("ry"));null===(p=this.chosedTarget)||void 0===p||p.setAttribute("cx",N-(e-i)/2+o),null===(f=this.chosedTarget)||void 0===f||f.setAttribute("cy",V-(t-r)/2+a);break;case"rect":null===(g=this.chosedTarget)||void 0===g||g.setAttribute("x",N-(e-i)),null===(m=this.chosedTarget)||void 0===m||m.setAttribute("y",V-(t-r));break;case"text":null===(v=this.chosedTarget)||void 0===v||v.setAttribute("x",(N-(e-i)).toString()),null===(_=this.chosedTarget)||void 0===_||_.setAttribute("y",(V-(t-r)+3*n.height/4).toString());var te=this.chosedTarget.getAttribute("font-size");const y=this.chosedTarget.parentNode;if(y){const e=y.querySelector("foreignObject");e&&(e.setAttribute("x",Number(this.chosedTarget.getAttribute("x"))-3),e.setAttribute("y",Number(this.chosedTarget.getAttribute("y"))-(24-Number(te)/2)))}}this.updateSelectionBox()}else if(this.isStretch){switch(this.chosedTarget.parentNode.getAttribute("type")){case"path":const i=null===(y=this.chosedTarget)||void 0===y?void 0:y.getAttribute("d");let r,s,o,a,l;n=null===(b=this.chosedTarget)||void 0===b?void 0:b.getBBox(),-1!==this._stratchPos.indexOf("right")&&n.width+N-e<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("left")&&n.width-(N-e)<=0&&(this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left"))),-1!==this._stratchPos.indexOf("top")&&n.height-(V-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),-1!==this._stratchPos.indexOf("bottom")&&n.height+(V-t)<=0&&(this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top"))),r=i.replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(i=>{const[r,u]=i.split(",").map(parseFloat);return-1!==this._stratchPos.indexOf("left")||-1!==this._stratchPos.indexOf("right")?(-1!==this._stratchPos.indexOf("right")&&(a=new HS(N-e).mul(new HS(r-n.x).div(n.width))),-1!==this._stratchPos.indexOf("left")&&(a=new HS(N-e).mul(new HS(n.x+n.width-r).div(n.width))),!Number.isNaN(a)&&a||(a=new HS(0)),s=new HS(r).add(a)):s=new HS(r),-1!==this._stratchPos.indexOf("top")||-1!==this._stratchPos.indexOf("bottom")?(-1!==this._stratchPos.indexOf("top")&&(l=new HS(V-t).mul(new HS(n.y+n.height-u).div(n.height))),-1!==this._stratchPos.indexOf("bottom")&&(l=new HS(V-t).mul(new HS(u-n.y).div(n.height))),!Number.isNaN(l)&&l||(l=new HS(0)),o=new HS(u).add(l)):o=new HS(u),`${s.toFixed(16)},${o.toFixed(16)}`})),null===(w=this.chosedTarget)||void 0===w||w.setAttribute("d",r);break;case"ellipse":$=Number(null===(x=this.chosedTarget)||void 0===x?void 0:x.getAttribute("cx")),ee=Number(null===(B=this.chosedTarget)||void 0===B?void 0:B.getAttribute("cy")),z=Number(null===(P=this.chosedTarget)||void 0===P?void 0:P.getAttribute("rx")),W=Number(null===(C=this.chosedTarget)||void 0===C?void 0:C.getAttribute("ry"));-1!==this._stratchPos.indexOf("left")?($+=.5*(N-e),z-=.5*(N-e)):-1!==this._stratchPos.indexOf("right")&&($+=.5*(N-e),z+=.5*(N-e)),-1!==this._stratchPos.indexOf("top")?(ee+=.5*(V-t),W-=.5*(V-t)):-1!==this._stratchPos.indexOf("bottom")&&(ee+=.5*(V-t),W+=.5*(V-t)),z<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(M=this.chosedTarget)||void 0===M||M.setAttribute("cx",$.toString()),null===(k=this.chosedTarget)||void 0===k||k.setAttribute("rx",z.toString())),W<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(E=this.chosedTarget)||void 0===E||E.setAttribute("cy",ee.toString()),null===(S=this.chosedTarget)||void 0===S||S.setAttribute("ry",W.toString()));break;case"rect":var ie=Number(null===(T=this.chosedTarget)||void 0===T?void 0:T.getAttribute("x")),re=Number(null===(F=this.chosedTarget)||void 0===F?void 0:F.getAttribute("y"));J=Number(null===(I=this.chosedTarget)||void 0===I?void 0:I.getAttribute("width")),Z=Number(null===(D=this.chosedTarget)||void 0===D?void 0:D.getAttribute("height"));-1!==this._stratchPos.indexOf("left")?(ie+=N-e,J-=N-e):-1!==this._stratchPos.indexOf("right")&&(J+=N-e),J<0?this._stratchPos=this._stratchPos.replace(/left|right/g,(e=>"left"===e?"right":"left")):(null===(R=this.chosedTarget)||void 0===R||R.setAttribute("x",ie.toString()),null===(O=this.chosedTarget)||void 0===O||O.setAttribute("width",J.toString())),-1!==this._stratchPos.indexOf("top")?(re+=V-t,Z-=V-t):-1!==this._stratchPos.indexOf("bottom")&&(Z+=V-t),Z<0?this._stratchPos=this._stratchPos.replace(/top|bottom/g,(e=>"top"===e?"bottom":"top")):(null===(L=this.chosedTarget)||void 0===L||L.setAttribute("y",re.toString()),null===(j=this.chosedTarget)||void 0===j||j.setAttribute("height",Z.toString()))}this.updateSelectionBox(),e=U.clientX+this._offsetX,t=U.clientY+this._offsetY}},p=e=>{if(this._isTouch)if(this.isHolding&&(this.isMoving&&(this.isMoving=!1,this.AddNewState((()=>{}))),this.isHolding=!1),this.isCreating){if(this.isDrawing)this.isDrawing=!1,this.eventTrigger.emit("createNew"),this.AddNewState((()=>{}));else if(!this.isChosed&&!this.isStretch&&"text"!=this._currentMode&&""!=this._currentMode){const e=null==o?void 0:o.lastElementChild;if(e){const t=e.previousElementSibling;null==o||o.removeChild(t)}}this.chosedTarget=null,this.isCreating=!1}else this.isStretch&&(this.isStretch=!1,this.AddNewState((()=>{})))};o?(document.addEventListener("keydown",h.bind(this)),o.addEventListener("dblclick",a.bind(this)),o.addEventListener("mousedown",l.bind(this)),document.addEventListener("mousemove",u.bind(this)),o.addEventListener("mouseup",c.bind(this)),o.addEventListener("touchstart",A.bind(this)),document.addEventListener("touchmove",d.bind(this)),o.addEventListener("touchend",p.bind(this))):this.log("no svgImage");const f=()=>{const e=document.getElementById("svgImage");e?(document.removeEventListener("keydown",h.bind(this)),e.removeEventListener("dblclick",a.bind(this)),e.removeEventListener("mousedown",l.bind(this)),document.removeEventListener("mousemove",u.bind(this)),e.removeEventListener("mouseup",c.bind(this)),e.removeEventListener("touchstart",A.bind(this)),document.removeEventListener("touchmove",d.bind(this)),e.removeEventListener("touchend",p.bind(this))):this.log("no svgImage");const t=document.getElementById("comments_panel");t&&(t.innerHTML=""),this.eventTrigger.off("clearAll",f)};this.eventTrigger.on("clearAll",f)}))}clickCreateText(e,t){var i,r;let n;n=e.touches?e.touches[0]:e,this.showHiddenSelectedBox(!1);const s=n.clientX+this._offsetX,o=n.clientY+this._offsetY,a=document.createElementNS("http://www.w3.org/2000/svg","g");if(a.setAttribute("id",`${this._currentMode}_${this.getTime()}`),!this.isTyping&&!this.isChosed){const e=document.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("x",s+3),e.setAttribute("y",(o+24-Number(this._FontSize)/2).toString()),e.setAttribute("font-size",this._FontSize),e.setAttribute("stroke",this._Textcolor),e.setAttribute("stroke-width",this._TextstrokeWidth),e.setAttribute("fill",this._Textcolor),e.setAttribute("lengthAdjust","spacingAndGlyphs"),e.textContent=t,a.setAttribute("type","text"),a.appendChild(e);const n=document.getElementById("selectionBox_g");n&&(null===(i=n.parentNode)||void 0===i||i.insertBefore(a,null===(r=n.parentNode)||void 0===r?void 0:r.lastElementChild)),this.isTyping=!0,this.AddNewState((()=>{this.eventTrigger.emit("createNew")}))}}getInitVector(e,t){const i=Math.sqrt(e*e+t*t);return 0==i?[0,0]:[e/i,t/i]}getVerticalUnitVector(e,t){if(0===Math.sqrt(e*e+t*t))return[0,0];const i=-t,r=e,n=Math.sqrt(i*i+r*r);return[i/n,r/n]}getTwoPointLength(e,t){return e==t?0:Math.sqrt(e*e+t*t)}hiddenAllInput(){const e=document.querySelectorAll("foreignObject");e.length>0&&e.forEach((e=>{const t=e.querySelector("input"),i=e.parentNode;let r;i&&(r=i.querySelector("text")),r&&t&&(""!=t.value?r.textContent=t.value:r.textContent="双击此处输入内容",t.style.display="none")}))}showHiddenSelectedBox(e){if(e){const e=this.chosedTarget.getBBox();this.selectionBox.setAttribute("x",e.x),this.selectionBox.setAttribute("y",e.y),this.selectionBox.setAttribute("width",e.width),this.selectionBox.setAttribute("height",e.height),this.selectionBox.style.display="inline";for(var t=0;t<8;t++)this.handles[t].style.display="inline"}else{this.selectionBox.style.display="none";for(t=0;t<8;t++)this.handles[t].style.display="none"}this.updateSelectionBox()}updateSelectionBox(){var e;const t=null===(e=this.chosedTarget)||void 0===e?void 0:e.getBBox();if(t){this.selectionBox.setAttribute("x",t.x-4),this.selectionBox.setAttribute("y",t.y-4),this.selectionBox.setAttribute("width",t.width+8),this.selectionBox.setAttribute("height",t.height+8);const e=this.selectionBox.getBBox();for(let t=0;t<8;t++){const i=this.handles[t];switch(t){case 0:i.setAttribute("x",e.x-4),i.setAttribute("y",e.y-4);break;case 1:i.setAttribute("x",e.x+e.width/2-4),i.setAttribute("y",e.y-4);break;case 2:i.setAttribute("x",e.x+e.width-4),i.setAttribute("y",e.y-4);break;case 3:i.setAttribute("x",e.x+e.width-4),i.setAttribute("y",e.y+e.height/2-4);break;case 4:i.setAttribute("x",e.x+e.width-4),i.setAttribute("y",e.y+e.height-4);break;case 5:i.setAttribute("x",e.x+e.width/2-4),i.setAttribute("y",e.y+e.height-4);break;case 6:i.setAttribute("x",e.x-4),i.setAttribute("y",e.y+e.height-4);break;case 7:i.setAttribute("x",e.x-4),i.setAttribute("y",e.y+e.height/2-4)}}}}publishComments(){this.deleteSvgCommentsListeners()}updateCommentsColor(){document.querySelectorAll("path").forEach((e=>{e.setAttribute("stroke","red")}));document.querySelectorAll("ellipse").forEach((e=>{e.setAttribute("stroke","blue")}));document.querySelectorAll("rect").forEach((e=>{"selectionBox"!=e.id&&e.setAttribute("stroke","green")}))}deleteSvgCommentsListeners(){const e=document.getElementById("svgImage");e&&(e.removeEventListener("mousedown",(()=>{})),document.removeEventListener("mousemove",(()=>{})),e.removeEventListener("mouseup",(()=>{})),e.removeEventListener("mouseover",(()=>{})))}deleteCurrentComments(){if(this.isChosed){const e=document.getElementById("svgImage");null==e||e.removeChild(this.chosedTarget.parentNode),this.showHiddenSelectedBox(!1)}this.AddNewState((()=>{}))}getTime(){const e=new Date;return e.getFullYear()+(e.getMonth()+1<10?`0${e.getMonth()+1}`:e.getMonth()+1)+(e.getDate()<10?`0${e.getDate()}`:e.getDate())+(e.getHours()<10?`0${e.getHours()}`:e.getHours())+(e.getMinutes()<10?`0${e.getMinutes()}`:e.getMinutes())+(e.getSeconds()<10?`0${e.getSeconds()}`:e.getSeconds())}duplicateComment(){var e,t,i,r,n,s,o,a,l,u,c,h,A,d;if(this.isChosed){const f=document.getElementById("svgImage"),g=this.chosedTarget.parentNode.cloneNode(!0);switch(null==f||f.insertBefore(g,null==f?void 0:f.lastElementChild),this.chosedTarget=g.firstChild,this.chosedTarget.tagName){case"path":const f=(null===(e=this.chosedTarget)||void 0===e?void 0:e.getAttribute("d")).replace(/-?\d+(\.\d+)?\s*,\s*-?\d+(\.\d+)?/g,(e=>{const[t,i]=e.split(",").map(parseFloat);return`${t+20},${i+10}`}));null===(t=this.chosedTarget)||void 0===t||t.setAttribute("d",f);break;case"ellipse":null===(i=this.chosedTarget)||void 0===i||i.setAttribute("cx",(Number(null===(r=this.chosedTarget)||void 0===r?void 0:r.getAttribute("cx"))+20).toString()),null===(n=this.chosedTarget)||void 0===n||n.setAttribute("cy",(Number(null===(s=this.chosedTarget)||void 0===s?void 0:s.getAttribute("cy"))+10).toString());break;case"rect":null===(o=this.chosedTarget)||void 0===o||o.setAttribute("x",(Number(null===(a=this.chosedTarget)||void 0===a?void 0:a.getAttribute("x"))+20).toString()),null===(l=this.chosedTarget)||void 0===l||l.setAttribute("y",(Number(null===(u=this.chosedTarget)||void 0===u?void 0:u.getAttribute("y"))+10).toString());break;case"text":null===(c=this.chosedTarget)||void 0===c||c.setAttribute("x",(Number(null===(h=this.chosedTarget)||void 0===h?void 0:h.getAttribute("x"))+20).toString()),null===(A=this.chosedTarget)||void 0===A||A.setAttribute("y",(Number(null===(d=this.chosedTarget)||void 0===d?void 0:d.getAttribute("x"))+10).toString());var p=this.chosedTarget.getAttribute("font-size");const g=this.chosedTarget.parentNode;if(g){const e=g.querySelector("foreignObject");e&&(e.setAttribute("x",(Number(this.chosedTarget.getAttribute("x"))-3+20).toString()),e.setAttribute("y",(Number(this.chosedTarget.getAttribute("y"))-(24-Number(p)/2)+10).toString()))}}this.updateSelectionBox()}this.AddNewState((()=>{}))}AddNewState(e){this.saveCurrentState((t=>{this._revocationMechanism&&this._revocationMechanism&&this._revocationMechanism.AddNewState(t,e)})),this.eventTrigger.emit("newState")}saveCurrentState(e){function t(e){const t={};for(let i=0;i<e.length;i++){const r=e[i];t[r.name]=r.value}return t}const i=document.getElementById("svgImage");if(i){const e=i.querySelectorAll("g");var r=[];e.forEach((e=>{if(e.getAttribute("id")){const n=e.attributes,s=e.children,o=new Map;let a=null;if("text"===e.getAttribute("type")){for(let e=0;e<s.length;e++){const{tagName:i}=s[e];o.set(i,t(s[e].attributes)),"text"===i&&(a=s[e].textContent)}var i=new WS(n,o,a);r.push(i)}else{for(let e=0;e<s.length;e++)o.set(s[e].tagName,t(s[e].attributes));i=new WS(n,o,null);r.push(i)}}}))}e(r)}displayState(e){const t=document.getElementById("svgImage");if(t){t.querySelectorAll("g").forEach((e=>{e.getAttribute("id")&&t.removeChild(e)}));for(const n in e){const s=e[n];var i=document.createElementNS("http://www.w3.org/2000/svg","g");const{attributes:o}=s;var{textContent:r}=s;for(let e=0;e<o.length;e++){const t=o[e].name,r=o[e].value;i.setAttribute(t,r)}const{childrenContents:a}=s;a.forEach(((e,t)=>{const n=document.createElementNS("http://www.w3.org/2000/svg",t);if("text"==t&&(n.textContent=r),e)for(const t in e){const i=e[t];n.setAttribute(t,i)}i.appendChild(n)})),null==t||t.insertBefore(i,null==t?void 0:t.lastElementChild);const l=null==t?void 0:t.querySelector("image");l&&(null==t||t.insertBefore(l,null==t?void 0:t.firstElementChild));const u=null==t?void 0:t.querySelector("#selectionBox_g");u&&(null==t||t.removeChild(u),null==t||t.appendChild(u))}}}autoSaveInput(e){this.isTyping&&(this.isTyping=!1,this.hiddenAllInput(),this.AddNewState((()=>{e&&e()})))}setCurrentMode(e){this.autoSaveInput(),this._currentMode=e,""===e&&this.eventTrigger.emit("cancelAllMode")}ReDo(e){this.autoSaveInput(),this._revocationMechanism&&this._revocationMechanism.ReDo((t=>{this.displayState(t),this.showHiddenSelectedBox(!1),e&&e()})),this.checkSelectionBox()}UnDo(e){this.autoSaveInput(),this._revocationMechanism&&this._revocationMechanism.UnDo((t=>{this.displayState(t),this.showHiddenSelectedBox(!1),e&&e()})),this.checkSelectionBox()}checkSelectionBox(){const e=document.getElementById("svgImage"),t=null==e?void 0:e.querySelector("#selectionBox_g");if(t){if(t.childNodes.length>2)return;null==e||e.removeChild(t)}this.selectionBox=null,this.handles=[];const i=document.createElementNS("http://www.w3.org/2000/svg","g");this.selectionBox=document.createElementNS("http://www.w3.org/2000/svg","rect"),this.selectionBox.setAttribute("stroke","#066CFC"),this.selectionBox.setAttribute("stroke-width","1"),this.selectionBox.setAttribute("fill","none"),this.selectionBox.setAttribute("id","selectionBox"),this.selectionBox.style.display="none",i.setAttribute("id","selectionBox_g"),i.appendChild(this.selectionBox);for(let e=0;e<8;e++){const t=document.createElementNS("http://www.w3.org/2000/svg","rect");var r;t.setAttribute("width","8"),t.setAttribute("height","8"),t.setAttribute("rx","2"),t.setAttribute("ry","2"),0==e&&(r="left_top",t.setAttribute("id",r)),1==e&&(r="top",t.setAttribute("id",r)),2==e&&(r="right_top",t.setAttribute("id",r)),3==e&&(r="right",t.setAttribute("id",r)),4==e&&(r="right_bottom",t.setAttribute("id",r)),5==e&&(r="bottom",t.setAttribute("id",r)),6==e&&(r="left_bottom",t.setAttribute("id",r)),7==e&&(r="left",t.setAttribute("id",r)),t.setAttribute("type","handle"),t.setAttribute("fill","white"),t.setAttribute("stroke-width","0.8"),t.setAttribute("stroke","#066CFC"),t.setAttribute("class","selection_box_handle"),t.style.cursor="pointer",t.style.display="none",i.appendChild(t),this.handles.push(t)}null==e||e.appendChild(i)}endCommentsTool(){var e;this._commentsList={},this._currentMode="path",this._Pathcolor="#066CFC",this._Ellipsecolor="#066CFC",this._Rectcolor="#066CFC",this._Arrowcolor="#066CFC",this._Textcolor="#066CFC",this._PathstrokeWidth="2",this._EllipsestrokeWidth="2",this._RectstrokeWidth="2",this._ArrowstrokeWidth="2",this._TextstrokeWidth="1",this._FontSize="16",this._stratchPos="",this.isCreating=!1,this.isDrawing=!1,this.isMoving=!1,this.isChosed=!1,this.isHolding=!1,this.isStretch=!1,this.isHovering=!1,this.isDuplicate=!1,this.isTyping=!1,this.chosedTarget=null,this.selectionBox=null,this.handles=null,this.setActive(!1),null===(e=this._revocationMechanism)||void 0===e||e.destroy(),this._revocationMechanism=null,this.eventTrigger.emit("clearAll")}saveComments(e){this.showHiddenSelectedBox(!1),this.autoSaveInput(e)}setTargetColor(e){if("text"==this.chosedTarget.tagName)this.chosedTarget.setAttribute("stroke",e),this.chosedTarget.setAttribute("fill",e);else if("path"==this.chosedTarget.tagName){const t=this.chosedTarget.parentNode;t&&"arrow"==t.getAttribute("type")?(this.chosedTarget.setAttribute("stroke",e),this.chosedTarget.setAttribute("fill",e)):this.chosedTarget.setAttribute("stroke",e)}else this.chosedTarget.setAttribute("stroke",e);this.AddNewState((()=>{}))}setTargetWidth(e){"text"==this.chosedTarget.tagName?this.chosedTarget.setAttribute("font-size",e.toString()):this.chosedTarget.setAttribute("stroke-width",e.toString()),this.AddNewState((()=>{}))}set isTouch(e){this._isTouch=e}set offsetX(e){this._offsetX=e}set offsetY(e){this._offsetY=e}set pathColor(e){this._Pathcolor=e}set ellipseColor(e){this._Ellipsecolor=e}set rectColor(e){this._Rectcolor=e}set arrowColor(e){this._Arrowcolor=e}set textColor(e){this._Textcolor=e}set pathStrokeWidth(e){this._PathstrokeWidth=e}set ellipseStrokeWidth(e){this._EllipsestrokeWidth=e}set rectStrokeWidth(e){this._RectstrokeWidth=e}set arrowSize(e){this._ArrowstrokeWidth=e}set textFontSize(e){this._FontSize=e}destroy(){this.endCommentsTool()}}class zS{constructor(e){this.eventTrigger=e,this.stateMap=new Map,this.stateIndex=0,this.stateMap.set(0,null)}AddNewState(e,t){if(0===this.stateIndex)this.stateIndex+=1,this.stateMap.set(this.stateIndex,e),this.stateIndex+=1;else{(function(e,t){if(null==t||null==e||e.length!==t.length)return!1;for(let r=0;r<e.length;r++){if(!i(e[r],t[r]))return!1}return!0})(e,this.stateMap.get(this.stateIndex-1))||(this.stateMap.set(this.stateIndex,e),this.stateIndex+=1)}if(this.stateMap.size-1>this.stateIndex){for(let e=this.stateIndex;e<=this.stateMap.size;e++)this.stateMap.delete(e);this.stateIndex=this.stateMap.size-1}function i(e,t){return Object.keys(e).length===Object.keys(t).length&&(!!function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){const r=e.item(i),n=t.item(i);if(r&&n&&(r.name!==n.name||r.value!==n.value))return!1}return!0}(e.attributes,t.attributes)&&(!!function(e,t){if(e.size!==t.size)return!1;for(const[i,r]of e)if(!t.has(i)||t.get(i)!==r)return!1;return!0}(e.childrenContents,t.childrenContents)&&e.textContent===t.textContent))}t()}ReDo(e){this.stateIndex==this.stateMap.size?(this.eventTrigger.emit("noNewState"),e(this.stateMap.get(this.stateIndex-1))):(this.stateIndex+=1,this.stateIndex==this.stateMap.size&&this.eventTrigger.emit("noNewState"),e(this.stateMap.get(this.stateIndex-1)))}UnDo(e){1==this.stateIndex?this.eventTrigger.emit("noPreviousState"):(this.stateIndex-=1,1==this.stateIndex&&this.eventTrigger.emit("noPreviousState"),e(this.stateMap.get(this.stateIndex-1)))}destroy(){this.stateIndex=0,this.stateMap.clear()}}class WS{constructor(e,t,i){this.attributes=e,this.childrenContents=t,this.textContent=i}}function KS(e,t){return function(){return e.apply(t,arguments)}}const{toString:XS}=Object.prototype,{getPrototypeOf:qS}=Object,{iterator:YS,toStringTag:JS}=Symbol,ZS=(e=>t=>{const i=XS.call(t);return e[i]||(e[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),$S=e=>(e=e.toLowerCase(),t=>ZS(t)===e),eT=e=>t=>typeof t===e,{isArray:tT}=Array,iT=eT("undefined");const rT=$S("ArrayBuffer");const nT=eT("string"),sT=eT("function"),oT=eT("number"),aT=e=>null!==e&&"object"==typeof e,lT=e=>{if("object"!==ZS(e))return!1;const t=qS(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||JS in e||YS in e)},uT=$S("Date"),cT=$S("File"),hT=$S("Blob"),AT=$S("FileList"),dT=$S("URLSearchParams"),[pT,fT,gT,mT]=["ReadableStream","Request","Response","Headers"].map($S);function vT(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let r,n;if("object"!=typeof e&&(e=[e]),tT(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{const n=i?Object.getOwnPropertyNames(e):Object.keys(e),s=n.length;let o;for(r=0;r<s;r++)o=n[r],t.call(null,e[o],o,e)}}function _T(e,t){t=t.toLowerCase();const i=Object.keys(e);let r,n=i.length;for(;n-- >0;)if(r=i[n],t===r.toLowerCase())return r;return null}const yT="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,bT=e=>!iT(e)&&e!==yT;const wT=(xT="undefined"!=typeof Uint8Array&&qS(Uint8Array),e=>xT&&e instanceof xT);var xT;const BT=$S("HTMLFormElement"),PT=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),CT=$S("RegExp"),MT=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),r={};vT(i,((i,n)=>{let s;!1!==(s=t(i,n,e))&&(r[n]=s||i)})),Object.defineProperties(e,r)};const kT=$S("AsyncFunction"),ET=(ST="function"==typeof setImmediate,TT=sT(yT.postMessage),ST?setImmediate:TT?(FT=`axios@${Math.random()}`,IT=[],yT.addEventListener("message",(({source:e,data:t})=>{e===yT&&t===FT&&IT.length&&IT.shift()()}),!1),e=>{IT.push(e),yT.postMessage(FT,"*")}):e=>setTimeout(e));var ST,TT,FT,IT;const DT="undefined"!=typeof queueMicrotask?queueMicrotask.bind(yT):"undefined"!=typeof process&&process.nextTick||ET;var RT={isArray:tT,isArrayBuffer:rT,isBuffer:function(e){return null!==e&&!iT(e)&&null!==e.constructor&&!iT(e.constructor)&&sT(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||sT(e.append)&&("formdata"===(t=ZS(e))||"object"===t&&sT(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&rT(e.buffer),t},isString:nT,isNumber:oT,isBoolean:e=>!0===e||!1===e,isObject:aT,isPlainObject:lT,isReadableStream:pT,isRequest:fT,isResponse:gT,isHeaders:mT,isUndefined:iT,isDate:uT,isFile:cT,isBlob:hT,isRegExp:CT,isFunction:sT,isStream:e=>aT(e)&&sT(e.pipe),isURLSearchParams:dT,isTypedArray:wT,isFileList:AT,forEach:vT,merge:function e(){const{caseless:t}=bT(this)&&this||{},i={},r=(r,n)=>{const s=t&&_T(i,n)||n;lT(i[s])&&lT(r)?i[s]=e(i[s],r):lT(r)?i[s]=e({},r):tT(r)?i[s]=r.slice():i[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&vT(arguments[e],r);return i},extend:(e,t,i,{allOwnKeys:r}={})=>(vT(t,((t,r)=>{i&&sT(t)?e[r]=KS(t,i):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,i,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,r)=>{let n,s,o;const a={};if(t=t||{},null==e)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)o=n[s],r&&!r(o,e,t)||a[o]||(t[o]=e[o],a[o]=!0);e=!1!==i&&qS(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:ZS,kindOfTest:$S,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const r=e.indexOf(t,i);return-1!==r&&r===i},toArray:e=>{if(!e)return null;if(tT(e))return e;let t=e.length;if(!oT(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[YS]).call(e);let r;for(;(r=i.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const r=[];for(;null!==(i=e.exec(t));)r.push(i);return r},isHTMLForm:BT,hasOwnProperty:PT,hasOwnProp:PT,reduceDescriptors:MT,freezeMethods:e=>{MT(e,((t,i)=>{if(sT(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const r=e[i];sT(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))}))},toObjectSet:(e,t)=>{const i={},r=e=>{e.forEach((e=>{i[e]=!0}))};return tT(e)?r(e):r(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_T,global:yT,isContextDefined:bT,isSpecCompliantForm:function(e){return!!(e&&sT(e.append)&&"FormData"===e[JS]&&e[YS])},toJSONObject:e=>{const t=new Array(10),i=(e,r)=>{if(aT(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=tT(e)?[]:{};return vT(e,((e,t)=>{const s=i(e,r+1);!iT(s)&&(n[t]=s)})),t[r]=void 0,n}}return e};return i(e,0)},isAsyncFn:kT,isThenable:e=>e&&(aT(e)||sT(e))&&sT(e.then)&&sT(e.catch),setImmediate:ET,asap:DT,isIterable:e=>null!=e&&sT(e[YS])};function OT(e,t,i,r,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),r&&(this.request=r),n&&(this.response=n,this.status=n.status?n.status:null)}RT.inherits(OT,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:RT.toJSONObject(this.config),code:this.code,status:this.status}}});const LT=OT.prototype,jT={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{jT[e]={value:e}})),Object.defineProperties(OT,jT),Object.defineProperty(LT,"isAxiosError",{value:!0}),OT.from=(e,t,i,r,n,s)=>{const o=Object.create(LT);return RT.toFlatObject(e,o,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),OT.call(o,e.message,t,i,r,n),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};function UT(e){return RT.isPlainObject(e)||RT.isArray(e)}function NT(e){return RT.endsWith(e,"[]")?e.slice(0,-2):e}function VT(e,t,i){return e?e.concat(t).map((function(e,t){return e=NT(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}const QT=RT.toFlatObject(RT,{},null,(function(e){return/^is[A-Z]/.test(e)}));function HT(e,t,i){if(!RT.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(i=RT.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!RT.isUndefined(t[e])}))).metaTokens,n=i.visitor||u,s=i.dots,o=i.indexes,a=(i.Blob||"undefined"!=typeof Blob&&Blob)&&RT.isSpecCompliantForm(t);if(!RT.isFunction(n))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(RT.isDate(e))return e.toISOString();if(RT.isBoolean(e))return e.toString();if(!a&&RT.isBlob(e))throw new OT("Blob is not supported. Use a Buffer instead.");return RT.isArrayBuffer(e)||RT.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,i,n){let a=e;if(e&&!n&&"object"==typeof e)if(RT.endsWith(i,"{}"))i=r?i:i.slice(0,-2),e=JSON.stringify(e);else if(RT.isArray(e)&&function(e){return RT.isArray(e)&&!e.some(UT)}(e)||(RT.isFileList(e)||RT.endsWith(i,"[]"))&&(a=RT.toArray(e)))return i=NT(i),a.forEach((function(e,r){!RT.isUndefined(e)&&null!==e&&t.append(!0===o?VT([i],r,s):null===o?i:i+"[]",l(e))})),!1;return!!UT(e)||(t.append(VT(n,i,s),l(e)),!1)}const c=[],h=Object.assign(QT,{defaultVisitor:u,convertValue:l,isVisitable:UT});if(!RT.isObject(e))throw new TypeError("data must be an object");return function e(i,r){if(!RT.isUndefined(i)){if(-1!==c.indexOf(i))throw Error("Circular reference detected in "+r.join("."));c.push(i),RT.forEach(i,(function(i,s){!0===(!(RT.isUndefined(i)||null===i)&&n.call(t,i,RT.isString(s)?s.trim():s,r,h))&&e(i,r?r.concat(s):[s])})),c.pop()}}(e),t}function GT(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function zT(e,t){this._pairs=[],e&&HT(e,this,t)}const WT=zT.prototype;function KT(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function XT(e,t,i){if(!t)return e;const r=i&&i.encode||KT;RT.isFunction(i)&&(i={serialize:i});const n=i&&i.serialize;let s;if(s=n?n(t,i):RT.isURLSearchParams(t)?t.toString():new zT(t,i).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}WT.append=function(e,t){this._pairs.push([e,t])},WT.toString=function(e){const t=e?function(t){return e.call(this,t,GT)}:GT;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var qT=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){RT.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},YT={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JT={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:zT,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ZT="undefined"!=typeof window&&"undefined"!=typeof document,$T="object"==typeof navigator&&navigator||void 0,eF=ZT&&(!$T||["ReactNative","NativeScript","NS"].indexOf($T.product)<0),tF="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,iF=ZT&&window.location.href||"http://localhost";var rF={...Object.freeze({__proto__:null,hasBrowserEnv:ZT,hasStandardBrowserWebWorkerEnv:tF,hasStandardBrowserEnv:eF,navigator:$T,origin:iF}),...JT};function nF(e){function t(e,i,r,n){let s=e[n++];if("__proto__"===s)return!0;const o=Number.isFinite(+s),a=n>=e.length;if(s=!s&&RT.isArray(r)?r.length:s,a)return RT.hasOwnProp(r,s)?r[s]=[r[s],i]:r[s]=i,!o;r[s]&&RT.isObject(r[s])||(r[s]=[]);return t(e,i,r[s],n)&&RT.isArray(r[s])&&(r[s]=function(e){const t={},i=Object.keys(e);let r;const n=i.length;let s;for(r=0;r<n;r++)s=i[r],t[s]=e[s];return t}(r[s])),!o}if(RT.isFormData(e)&&RT.isFunction(e.entries)){const i={};return RT.forEachEntry(e,((e,r)=>{t(function(e){return RT.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,i,0)})),i}return null}const sF={transitional:YT,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,n=RT.isObject(e);n&&RT.isHTMLForm(e)&&(e=new FormData(e));if(RT.isFormData(e))return r?JSON.stringify(nF(e)):e;if(RT.isArrayBuffer(e)||RT.isBuffer(e)||RT.isStream(e)||RT.isFile(e)||RT.isBlob(e)||RT.isReadableStream(e))return e;if(RT.isArrayBufferView(e))return e.buffer;if(RT.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(n){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return HT(e,new rF.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,r){return rF.isNode&&RT.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=RT.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return HT(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return n||r?(t.setContentType("application/json",!1),function(e,t,i){if(RT.isString(e))try{return(t||JSON.parse)(e),RT.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||sF.transitional,i=t&&t.forcedJSONParsing,r="json"===this.responseType;if(RT.isResponse(e)||RT.isReadableStream(e))return e;if(e&&RT.isString(e)&&(i&&!this.responseType||r)){const i=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw OT.from(e,OT.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rF.classes.FormData,Blob:rF.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};RT.forEach(["delete","get","head","post","put","patch"],(e=>{sF.headers[e]={}}));var oF=sF;const aF=RT.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const lF=Symbol("internals");function uF(e){return e&&String(e).trim().toLowerCase()}function cF(e){return!1===e||null==e?e:RT.isArray(e)?e.map(cF):String(e)}function hF(e,t,i,r,n){return RT.isFunction(r)?r.call(this,t,i):(n&&(t=i),RT.isString(t)?RT.isString(r)?-1!==t.indexOf(r):RT.isRegExp(r)?r.test(t):void 0:void 0)}class AF{constructor(e){e&&this.set(e)}set(e,t,i){const r=this;function n(e,t,i){const n=uF(t);if(!n)throw new Error("header name must be a non-empty string");const s=RT.findKey(r,n);(!s||void 0===r[s]||!0===i||void 0===i&&!1!==r[s])&&(r[s||t]=cF(e))}const s=(e,t)=>RT.forEach(e,((e,i)=>n(e,i,t)));if(RT.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(RT.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let i,r,n;return e&&e.split("\n").forEach((function(e){n=e.indexOf(":"),i=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!i||t[i]&&aF[i]||("set-cookie"===i?t[i]?t[i].push(r):t[i]=[r]:t[i]=t[i]?t[i]+", "+r:r)})),t})(e),t);else if(RT.isObject(e)&&RT.isIterable(e)){let i,r,n={};for(const t of e){if(!RT.isArray(t))throw TypeError("Object iterator must return a key-value pair");n[r=t[0]]=(i=n[r])?RT.isArray(i)?[...i,t[1]]:[i,t[1]]:t[1]}s(n,t)}else null!=e&&n(t,e,i);return this}get(e,t){if(e=uF(e)){const i=RT.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=i.exec(e);)t[r[1]]=r[2];return t}(e);if(RT.isFunction(t))return t.call(this,e,i);if(RT.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=uF(e)){const i=RT.findKey(this,e);return!(!i||void 0===this[i]||t&&!hF(0,this[i],i,t))}return!1}delete(e,t){const i=this;let r=!1;function n(e){if(e=uF(e)){const n=RT.findKey(i,e);!n||t&&!hF(0,i[n],n,t)||(delete i[n],r=!0)}}return RT.isArray(e)?e.forEach(n):n(e),r}clear(e){const t=Object.keys(this);let i=t.length,r=!1;for(;i--;){const n=t[i];e&&!hF(0,this[n],n,e,!0)||(delete this[n],r=!0)}return r}normalize(e){const t=this,i={};return RT.forEach(this,((r,n)=>{const s=RT.findKey(i,n);if(s)return t[s]=cF(r),void delete t[n];const o=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,i)=>t.toUpperCase()+i))}(n):String(n).trim();o!==n&&delete t[n],t[o]=cF(r),i[o]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return RT.forEach(this,((i,r)=>{null!=i&&!1!==i&&(t[r]=e&&RT.isArray(i)?i.join(", "):i)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach((e=>i.set(e))),i}static accessor(e){const t=(this[lF]=this[lF]={accessors:{}}).accessors,i=this.prototype;function r(e){const r=uF(e);t[r]||(!function(e,t){const i=RT.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+i,{value:function(e,i,n){return this[r].call(this,t,e,i,n)},configurable:!0})}))}(i,e),t[r]=!0)}return RT.isArray(e)?e.forEach(r):r(e),this}}AF.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),RT.reduceDescriptors(AF.prototype,(({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}})),RT.freezeMethods(AF);var dF=AF;function pF(e,t){const i=this||oF,r=t||i,n=dF.from(r.headers);let s=r.data;return RT.forEach(e,(function(e){s=e.call(i,s,n.normalize(),t?t.status:void 0)})),n.normalize(),s}function fF(e){return!(!e||!e.__CANCEL__)}function gF(e,t,i){OT.call(this,null==e?"canceled":e,OT.ERR_CANCELED,t,i),this.name="CanceledError"}function mF(e,t,i){const r=i.config.validateStatus;i.status&&r&&!r(i.status)?t(new OT("Request failed with status code "+i.status,[OT.ERR_BAD_REQUEST,OT.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}RT.inherits(gF,OT,{__CANCEL__:!0});const vF=(e,t,i=3)=>{let r=0;const n=function(e,t){e=e||10;const i=new Array(e),r=new Array(e);let n,s=0,o=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),u=r[o];n||(n=l),i[s]=a,r[s]=l;let c=o,h=0;for(;c!==s;)h+=i[c++],c%=e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-n<t)return;const A=u&&l-u;return A?Math.round(1e3*h/A):void 0}}(50,250);return function(e,t){let i,r,n=0,s=1e3/t;const o=(t,s=Date.now())=>{n=s,i=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-n;a>=s?o(e,t):(i=e,r||(r=setTimeout((()=>{r=null,o(i)}),s-a)))},()=>i&&o(i)]}((i=>{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-r,l=n(a);r=s;e({loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&s<=o?(o-s)/l:void 0,event:i,lengthComputable:null!=o,[t?"download":"upload"]:!0})}),i)},_F=(e,t)=>{const i=null!=e;return[r=>t[0]({lengthComputable:i,total:e,loaded:r}),t[1]]},yF=e=>(...t)=>RT.asap((()=>e(...t)));var bF=rF.hasStandardBrowserEnv?((e,t)=>i=>(i=new URL(i,rF.origin),e.protocol===i.protocol&&e.host===i.host&&(t||e.port===i.port)))(new URL(rF.origin),rF.navigator&&/(msie|trident)/i.test(rF.navigator.userAgent)):()=>!0,wF=rF.hasStandardBrowserEnv?{write(e,t,i,r,n,s){const o=[e+"="+encodeURIComponent(t)];RT.isNumber(i)&&o.push("expires="+new Date(i).toGMTString()),RT.isString(r)&&o.push("path="+r),RT.isString(n)&&o.push("domain="+n),!0===s&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function xF(e,t,i){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==i)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const BF=e=>e instanceof dF?{...e}:e;function PF(e,t){t=t||{};const i={};function r(e,t,i,r){return RT.isPlainObject(e)&&RT.isPlainObject(t)?RT.merge.call({caseless:r},e,t):RT.isPlainObject(t)?RT.merge({},t):RT.isArray(t)?t.slice():t}function n(e,t,i,n){return RT.isUndefined(t)?RT.isUndefined(e)?void 0:r(void 0,e,0,n):r(e,t,0,n)}function s(e,t){if(!RT.isUndefined(t))return r(void 0,t)}function o(e,t){return RT.isUndefined(t)?RT.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(i,n,s){return s in t?r(i,n):s in e?r(void 0,i):void 0}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(e,t,i)=>n(BF(e),BF(t),0,!0)};return RT.forEach(Object.keys(Object.assign({},e,t)),(function(r){const s=l[r]||n,o=s(e[r],t[r],r);RT.isUndefined(o)&&s!==a||(i[r]=o)})),i}var CF=e=>{const t=PF({},e);let i,{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:a,auth:l}=t;if(t.headers=a=dF.from(a),t.url=XT(xF(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),RT.isFormData(r))if(rF.hasStandardBrowserEnv||rF.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(i=a.getContentType())){const[e,...t]=i?i.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(rF.hasStandardBrowserEnv&&(n&&RT.isFunction(n)&&(n=n(t)),n||!1!==n&&bF(t.url))){const e=s&&o&&wF.read(o);e&&a.set(s,e)}return t};var MF="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,i){const r=CF(e);let n=r.data;const s=dF.from(r.headers).normalize();let o,a,l,u,c,{responseType:h,onUploadProgress:A,onDownloadProgress:d}=r;function p(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(o),r.signal&&r.signal.removeEventListener("abort",o)}let f=new XMLHttpRequest;function g(){if(!f)return;const r=dF.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());mF((function(e){t(e),p()}),(function(e){i(e),p()}),{data:h&&"text"!==h&&"json"!==h?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:r,config:e,request:f}),f=null}f.open(r.method.toUpperCase(),r.url,!0),f.timeout=r.timeout,"onloadend"in f?f.onloadend=g:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(g)},f.onabort=function(){f&&(i(new OT("Request aborted",OT.ECONNABORTED,e,f)),f=null)},f.onerror=function(){i(new OT("Network Error",OT.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const n=r.transitional||YT;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),i(new OT(t,n.clarifyTimeoutError?OT.ETIMEDOUT:OT.ECONNABORTED,e,f)),f=null},void 0===n&&s.setContentType(null),"setRequestHeader"in f&&RT.forEach(s.toJSON(),(function(e,t){f.setRequestHeader(t,e)})),RT.isUndefined(r.withCredentials)||(f.withCredentials=!!r.withCredentials),h&&"json"!==h&&(f.responseType=r.responseType),d&&([l,c]=vF(d,!0),f.addEventListener("progress",l)),A&&f.upload&&([a,u]=vF(A),f.upload.addEventListener("progress",a),f.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(o=t=>{f&&(i(!t||t.type?new gF(null,e,f):t),f.abort(),f=null)},r.cancelToken&&r.cancelToken.subscribe(o),r.signal&&(r.signal.aborted?o():r.signal.addEventListener("abort",o)));const m=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);m&&-1===rF.protocols.indexOf(m)?i(new OT("Unsupported protocol "+m+":",OT.ERR_BAD_REQUEST,e)):f.send(n||null)}))};var kF=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,r=new AbortController;const n=function(e){if(!i){i=!0,o();const t=e instanceof Error?e:this.reason;r.abort(t instanceof OT?t:new gF(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,n(new OT(`timeout ${t} of ms exceeded`,OT.ETIMEDOUT))}),t);const o=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(n):e.removeEventListener("abort",n)})),e=null)};e.forEach((e=>e.addEventListener("abort",n)));const{signal:a}=r;return a.unsubscribe=()=>RT.asap(o),a}};const EF=function*(e,t){let i=e.byteLength;if(!t||i<t)return void(yield e);let r,n=0;for(;n<i;)r=n+t,yield e.slice(n,r),n=r},SF=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},TF=(e,t,i,r)=>{const n=async function*(e,t){for await(const i of SF(e))yield*EF(i,t)}(e,t);let s,o=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await n.next();if(t)return a(),void e.close();let s=r.byteLength;if(i){let e=o+=s;i(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),n.return())},{highWaterMark:2})},FF="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,IF=FF&&"function"==typeof ReadableStream,DF=FF&&("function"==typeof TextEncoder?(RF=new TextEncoder,e=>RF.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var RF;const OF=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},LF=IF&&OF((()=>{let e=!1;const t=new Request(rF.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),jF=IF&&OF((()=>RT.isReadableStream(new Response("").body))),UF={stream:jF&&(e=>e.body)};var NF;FF&&(NF=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!UF[e]&&(UF[e]=RT.isFunction(NF[e])?t=>t[e]():(t,i)=>{throw new OT(`Response type '${e}' is not supported`,OT.ERR_NOT_SUPPORT,i)})})));const VF=async(e,t)=>{const i=RT.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(RT.isBlob(e))return e.size;if(RT.isSpecCompliantForm(e)){const t=new Request(rF.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return RT.isArrayBufferView(e)||RT.isArrayBuffer(e)?e.byteLength:(RT.isURLSearchParams(e)&&(e+=""),RT.isString(e)?(await DF(e)).byteLength:void 0)})(t):i};var QF=FF&&(async e=>{let{url:t,method:i,data:r,signal:n,cancelToken:s,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:u,headers:c,withCredentials:h="same-origin",fetchOptions:A}=CF(e);u=u?(u+"").toLowerCase():"text";let d,p=kF([n,s&&s.toAbortSignal()],o);const f=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let g;try{if(l&&LF&&"get"!==i&&"head"!==i&&0!==(g=await VF(c,r))){let e,i=new Request(t,{method:"POST",body:r,duplex:"half"});if(RT.isFormData(r)&&(e=i.headers.get("content-type"))&&c.setContentType(e),i.body){const[e,t]=_F(g,vF(yF(l)));r=TF(i.body,65536,e,t)}}RT.isString(h)||(h=h?"include":"omit");const n="credentials"in Request.prototype;d=new Request(t,{...A,signal:p,method:i.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:n?h:void 0});let s=await fetch(d,A);const o=jF&&("stream"===u||"response"===u);if(jF&&(a||o&&f)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=RT.toFiniteNumber(s.headers.get("content-length")),[i,r]=a&&_F(t,vF(yF(a),!0))||[];s=new Response(TF(s.body,65536,i,(()=>{r&&r(),f&&f()})),e)}u=u||"text";let m=await UF[RT.findKey(UF,u)||"text"](s,e);return!o&&f&&f(),await new Promise(((t,i)=>{mF(t,i,{data:m,headers:dF.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:d})}))}catch(t){if(f&&f(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new OT("Network Error",OT.ERR_NETWORK,e,d),{cause:t.cause||t});throw OT.from(t,t&&t.code,e,d)}});const HF={http:null,xhr:MF,fetch:QF};RT.forEach(HF,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const GF=e=>`- ${e}`,zF=e=>RT.isFunction(e)||null===e||!1===e;var WF=e=>{e=RT.isArray(e)?e:[e];const{length:t}=e;let i,r;const n={};for(let s=0;s<t;s++){let t;if(i=e[s],r=i,!zF(i)&&(r=HF[(t=String(i)).toLowerCase()],void 0===r))throw new OT(`Unknown adapter '${t}'`);if(r)break;n[t||"#"+s]=r}if(!r){const e=Object.entries(n).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new OT("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(GF).join("\n"):" "+GF(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function KF(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new gF(null,e)}function XF(e){KF(e),e.headers=dF.from(e.headers),e.data=pF.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return WF(e.adapter||oF.adapter)(e).then((function(t){return KF(e),t.data=pF.call(e,e.transformResponse,t),t.headers=dF.from(t.headers),t}),(function(t){return fF(t)||(KF(e),t&&t.response&&(t.response.data=pF.call(e,e.transformResponse,t.response),t.response.headers=dF.from(t.response.headers))),Promise.reject(t)}))}const qF="1.10.0",YF={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{YF[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));const JF={};YF.transitional=function(e,t,i){function r(e,t){return"[Axios v"+qF+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,n,s)=>{if(!1===e)throw new OT(r(n," has been removed"+(t?" in "+t:"")),OT.ERR_DEPRECATED);return t&&!JF[n]&&(JF[n]=!0,console.warn(r(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,n,s)}},YF.spelling=function(e){return(t,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};var ZF={assertOptions:function(e,t,i){if("object"!=typeof e)throw new OT("options must be an object",OT.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let n=r.length;for(;n-- >0;){const s=r[n],o=t[s];if(o){const t=e[s],i=void 0===t||o(t,s,e);if(!0!==i)throw new OT("option "+s+" must be "+i,OT.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new OT("Unknown option "+s,OT.ERR_BAD_OPTION)}},validators:YF};const $F=ZF.validators;class eI{constructor(e){this.defaults=e||{},this.interceptors={request:new qT,response:new qT}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const i=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=PF(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:n}=t;void 0!==i&&ZF.assertOptions(i,{silentJSONParsing:$F.transitional($F.boolean),forcedJSONParsing:$F.transitional($F.boolean),clarifyTimeoutError:$F.transitional($F.boolean)},!1),null!=r&&(RT.isFunction(r)?t.paramsSerializer={serialize:r}:ZF.assertOptions(r,{encode:$F.function,serialize:$F.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),ZF.assertOptions(t,{baseUrl:$F.spelling("baseURL"),withXsrfToken:$F.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=n&&RT.merge(n.common,n[t.method]);n&&RT.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete n[e]})),t.headers=dF.concat(s,n);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const l=[];let u;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let c,h=0;if(!a){const e=[XF.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,l),c=e.length,u=Promise.resolve(t);h<c;)u=u.then(e[h++],e[h++]);return u}c=o.length;let A=t;for(h=0;h<c;){const e=o[h++],t=o[h++];try{A=e(A)}catch(e){t.call(this,e);break}}try{u=XF.call(this,A)}catch(e){return Promise.reject(e)}for(h=0,c=l.length;h<c;)u=u.then(l[h++],l[h++]);return u}getUri(e){return XT(xF((e=PF(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}RT.forEach(["delete","get","head","options"],(function(e){eI.prototype[e]=function(t,i){return this.request(PF(i||{},{method:e,url:t,data:(i||{}).data}))}})),RT.forEach(["post","put","patch"],(function(e){function t(t){return function(i,r,n){return this.request(PF(n||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:r}))}}eI.prototype[e]=t(),eI.prototype[e+"Form"]=t(!0)}));var tI=eI;class iI{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const i=this;this.promise.then((e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{i.subscribe(e),t=e})).then(e);return r.cancel=function(){i.unsubscribe(t)},r},e((function(e,r,n){i.reason||(i.reason=new gF(e,r,n),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new iI((function(t){e=t})),cancel:e}}}var rI=iI;const nI={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(nI).forEach((([e,t])=>{nI[t]=e}));var sI=nI;const oI=function e(t){const i=new tI(t),r=KS(tI.prototype.request,i);return RT.extend(r,tI.prototype,i,{allOwnKeys:!0}),RT.extend(r,i,null,{allOwnKeys:!0}),r.create=function(i){return e(PF(t,i))},r}(oF);oI.Axios=tI,oI.CanceledError=gF,oI.CancelToken=rI,oI.isCancel=fF,oI.VERSION=qF,oI.toFormData=HT,oI.AxiosError=OT,oI.Cancel=oI.CanceledError,oI.all=function(e){return Promise.all(e)},oI.spread=function(e){return function(t){return e.apply(null,t)}},oI.isAxiosError=function(e){return RT.isObject(e)&&!0===e.isAxiosError},oI.mergeConfig=PF,oI.AxiosHeaders=dF,oI.formToJSON=e=>nF(RT.isHTMLForm(e)?new FormData(e):e),oI.getAdapter=WF,oI.HttpStatusCode=sI,oI.default=oI;var aI=oI,lI="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function uI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cI(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var i=function e(){var i=!1;try{i=this instanceof e}catch{}return i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};i.prototype=t.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),i}function hI(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var AI,dI={exports:{}};var pI=(AI||(AI=1,function(e){!function(t){e.exports=function(){function e(t,i,r){function n(o,a){if(!i[o]){if(!t[o]){if(!a&&hI)return hI(o);if(s)return s(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=i[o]={exports:{}};t[o][0].call(u.exports,(function(e){return n(t[o][1][e]||e)}),u,u.exports,e,t,i,r)}return i[o].exports}for(var s=hI,o=0;o<r.length;o++)n(r[o]);return n}return e}()({1:[function(e,t,i){var r=e("./browser/client");r.Buffer=e("buffer").Buffer,r.urllib=e("../shims/xhr"),r.version=e("./browser/version").version,t.exports=r},{"../shims/xhr":546,"./browser/client":3,"./browser/version":6,buffer:103}],2:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.slice.js");var o=e("assert"),a=e("../common/utils/checkBucketName").checkBucketName,l=i;function u(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)}function c(e){return e?u(e)?e:[e]:[]}l.useBucket=function(e){return a(e),this.options.bucket=e,this},l.setBucket=function(e){return a(e),this.options.bucket=e,this},l.getBucket=function(){return this.options.bucket},l.deleteBucket=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this._bucketRequestParams("DELETE",t,"",i),e.next=3,this.request(r);case 3:if(200!==(s=e.sent).status&&204!==s.status){e.next=6;break}return e.abrupt("return",{res:s.res});case 6:return e.next=8,this.requestError(s);case 8:throw e.sent;case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketACL=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(s=this._bucketRequestParams("PUT",t,"acl",r)).headers={"x-oss-acl":i},s.successStatuses=[200],e.next=5,this.request(s);case 5:return o=e.sent,e.abrupt("return",{bucket:o.headers.location&&o.headers.location.substring(1)||null,res:o.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l.getBucketACL=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"acl",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,e.abrupt("return",{acl:s.data.AccessControlList.Grant,owner:{id:s.data.Owner.ID,displayName:s.data.Owner.DisplayName},res:s.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketLogging=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this._bucketRequestParams("PUT",t,"logging",r),o='<?xml version="1.0" encoding="UTF-8"?>\n<BucketLoggingStatus>\n<LoggingEnabled>\n<TargetBucket>'.concat(t,"</TargetBucket>\n"),i&&(o+="<TargetPrefix>".concat(i,"</TargetPrefix>\n")),o+="</LoggingEnabled>\n</BucketLoggingStatus>",s.content=o,s.mime="xml",s.successStatuses=[200],e.next=9,this.request(s);case 9:return a=e.sent,e.abrupt("return",{res:a.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l.getBucketLogging=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"logging",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,o=s.data.LoggingEnabled,e.abrupt("return",{enable:!!o,prefix:o&&o.TargetPrefix||null,res:s.res});case 8:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.deleteBucketLogging=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("DELETE",t,"logging",i)).successStatuses=[204,200],e.next=4,this.request(r);case 4:return s=e.sent,e.abrupt("return",{res:s.res});case 6:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketCORS=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,a,l,u,h,A,d,p,f,g;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o((i=i||[]).length,"rules is required"),i.forEach((function(e){o(e.allowedOrigin,"allowedOrigin is required"),o(e.allowedMethod,"allowedMethod is required")})),s=this._bucketRequestParams("PUT",t,"cors",r),a='<?xml version="1.0" encoding="UTF-8"?>\n<CORSConfiguration>',l=function(e){a+="<AllowedOrigin>".concat(e,"</AllowedOrigin>")},u=function(e){a+="<AllowedMethod>".concat(e,"</AllowedMethod>")},h=function(e){a+="<AllowedHeader>".concat(e,"</AllowedHeader>")},A=function(e){a+="<ExposeHeader>".concat(e,"</ExposeHeader>")},d=0,p=i.length;d<p;d++)f=i[d],a+="<CORSRule>",c(f.allowedOrigin).forEach(l),c(f.allowedMethod).forEach(u),c(f.allowedHeader).forEach(h),c(f.exposeHeader).forEach(A),f.maxAgeSeconds&&(a+="<MaxAgeSeconds>".concat(f.maxAgeSeconds,"</MaxAgeSeconds>")),a+="</CORSRule>";return a+="</CORSConfiguration>",s.content=a,s.mime="xml",s.successStatuses=[200],e.next=16,this.request(s);case 16:return g=e.sent,e.abrupt("return",{res:g.res});case 18:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l.getBucketCORS=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"cors",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,o=[],s.data&&s.data.CORSRule&&(u(a=s.data.CORSRule)||(a=[a]),a.forEach((function(e){var t={};Object.keys(e).forEach((function(i){t[i.slice(0,1).toLowerCase()+i.slice(1,i.length)]=e[i]})),o.push(t)}))),e.abrupt("return",{rules:o,res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.deleteBucketCORS=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("DELETE",t,"cors",i)).successStatuses=[204],e.next=4,this.request(r);case 4:return s=e.sent,e.abrupt("return",{res:s.res});case 6:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.putBucketReferer=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var o,a,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this._bucketRequestParams("PUT",t,"referer",s),a='<?xml version="1.0" encoding="UTF-8"?>\n<RefererConfiguration>\n',a+=" <AllowEmptyReferer>".concat(i?"true":"false","</AllowEmptyReferer>\n"),r&&r.length>0){for(a+=" <RefererList>\n",l=0;l<r.length;l++)a+=" <Referer>".concat(r[l],"</Referer>\n");a+=" </RefererList>\n"}else a+=" <RefererList />\n";return a+="</RefererConfiguration>",o.content=a,o.mime="xml",o.successStatuses=[200],e.next=10,this.request(o);case 10:return u=e.sent,e.abrupt("return",{res:u.res});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),l.getBucketReferer=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._bucketRequestParams("GET",t,"referer",i)).successStatuses=[200],r.xmlResponse=!0,e.next=5,this.request(r);case 5:return s=e.sent,(o=s.data.RefererList.Referer||null)&&(u(o)||(o=[o])),e.abrupt("return",{allowEmpty:"true"===s.data.AllowEmptyReferer,referers:o,res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l.deleteBucketReferer=function(){var e=(0,s.default)(n.default.mark((function e(t,i){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.putBucketReferer(t,!0,null,i);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l._bucketRequestParams=function(e,t,i,r){return{method:e,bucket:t,subres:i,additionalHeaders:r&&r.additionalHeaders,timeout:r&&r.timeout,ctx:r&&r.ctx}}},{"../common/utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,assert:95,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/web.dom-collections.for-each.js":380}],3:[function(e,t,i){(function(i,r){(function(){var n=e("@babel/runtime/helpers/interopRequireDefault"),s=n(e("@babel/runtime/regenerator")),o=n(e("@babel/runtime/helpers/asyncToGenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.regexp.to-string.js");var a=e("debug")("ali-oss"),l=e("xml2js"),u=e("agentkeepalive"),c=e("merge-descriptors"),h=e("platform"),A=e("utility"),d=e("urllib"),p=e("./version"),f=e("bowser"),g=e("../common/signUtils"),m=e("../common/client/initOptions"),v=e("../common/utils/createRequest").createRequest,_=e("../common/utils/encoder").encoder,y=e("../common/client/getReqUrl").getReqUrl,b=e("../common/utils/setSTSToken").setSTSToken,w=e("../common/utils/retry").retry,x=e("../common/utils/isFunction").isFunction,B=e("../common/utils/getStandardRegion").getStandardRegion,P=new u;function C(){var e=h.name,t=h.version;e&&e.toLowerCase&&"ie"===e.toLowerCase()&&t.split(".")[0]<10&&console.warn("ali-oss does not support the current browser")}function M(){return location&&"https:"===location.protocol}function k(e,t){if(C(),!(this instanceof k))return new k(e,t);e&&e.inited?this.options=e:this.options=k.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=d,this.agent=this.options.agent||P),this.ctx=t,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}t.exports=k,k.initOptions=function(e){e.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");var t=Object.assign({secure:M(),useFetch:!1},e);return m(t)};var E=k.prototype;function S(e){return T.apply(this,arguments)}function T(){return(T=(0,o.default)(s.default.mark((function e(t){var i,r,n,o,a,l;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.stsToken||!x(this.options.refreshSTSToken)){e.next=3;break}return e.next=3,b.call(this);case 3:return i=v.call(this,t),this.options.useFetch||(i.params.mode="disable-fetch"),o=!!t.stream,e.prev=6,e.next=9,this.urllib.request(i.url,i.params);case 9:r=e.sent,this.debug("response %s %s, got %s, headers: %j",t.method,i.url,r.status,r.headers,"info"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),n=e.t0;case 16:if(!r||!t.successStatuses||-1!==t.successStatuses.indexOf(r.status)){e.next=28;break}return e.next=19,this.requestError(r);case 19:if("RequestTimeTooSkewed"!==(a=e.sent).code||o){e.next=25;break}return this.options.amendTimeSkewed=+new Date(a.serverTime)-new Date,e.next=24,this.request(t);case 24:return e.abrupt("return",e.sent);case 25:a.params=t,e.next=32;break;case 28:if(!n){e.next=32;break}return e.next=31,this.requestError(n);case 31:a=e.sent;case 32:if(!a){e.next=34;break}throw a;case 34:if(!t.xmlResponse){e.next=39;break}return e.next=37,this.parseXML(r.data);case 37:l=e.sent,r.data=l;case 39:return e.abrupt("return",r);case 40:case"end":return e.stop()}}),e,this,[[6,13]])})))).apply(this,arguments)}E.debug=a,c(E,e("./object")),c(E,e("./bucket")),c(E,e("../common/bucket/getBucketWebsite")),c(E,e("../common/bucket/putBucketWebsite")),c(E,e("../common/bucket/deleteBucketWebsite")),c(E,e("../common/bucket/getBucketLifecycle")),c(E,e("../common/bucket/putBucketLifecycle")),c(E,e("../common/bucket/deleteBucketLifecycle")),c(E,e("../common/bucket/putBucketVersioning")),c(E,e("../common/bucket/getBucketVersioning")),c(E,e("../common/bucket/getBucketInventory")),c(E,e("../common/bucket/deleteBucketInventory")),c(E,e("../common/bucket/listBucketInventory")),c(E,e("../common/bucket/putBucketInventory")),c(E,e("../common/bucket/abortBucketWorm")),c(E,e("../common/bucket/completeBucketWorm")),c(E,e("../common/bucket/extendBucketWorm")),c(E,e("../common/bucket/getBucketWorm")),c(E,e("../common/bucket/initiateBucketWorm")),c(E,e("./managed-upload")),c(E,e("../common/multipart-copy")),c(E,e("../common/multipart")),c(E,e("../common/parallel")),E.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),g.computeSignature(this.options.accessKeySecret,e,this.options.headerEncoding)},E._getReqUrl=y,E.authorization=function(e,t,i,r){var n=g.buildCanonicalString(e.toUpperCase(),t,{headers:r,parameters:i});return g.authorization(this.options.accessKeyId,this.options.accessKeySecret,n,this.options.headerEncoding)},E.authorizationV4=function(e,t,i,r,n){return g.authorizationV4(this.options.accessKeyId,this.options.accessKeySecret,B(this.options.region),e,t,i,r,n,this.options.headerEncoding)},E.request=function(){var e=(0,o.default)(s.default.mark((function e(t){var i=this;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.options.retryMax){e.next=6;break}return e.next=3,w(S.bind(this),this.options.retryMax,{errorHandler:function(e){return!!function(e){if(t.stream)return!1;var r=[-1,-2].includes(e.status),n=i.options.requestErrorRetryHandle||function(){return!0};return r&&n(e)}(e)}})(t);case 3:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",S.call(this,t));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),E._getResource=function(e){var t="/";return e.bucket&&(t+="".concat(e.bucket,"/")),e.object&&(t+=_(e.object,this.options.headerEncoding)),t},E._escape=function(e){return A.encodeURIComponent(e).replace(/%2F/g,"/")},E._getUserAgent=function(){var e=r&&r.browser?"js":"nodejs",t="aliyun-sdk-".concat(e,"/").concat(p.version),i=h.description;return!i&&r&&(i="Node.js ".concat(r.version.slice(1)," on ").concat(r.platform," ").concat(r.arch)),this._checkUserAgent("".concat(t," ").concat(i))},E._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},E.checkBrowserAndVersion=function(e,t){return f.name===e&&f.version.split(".")[0]===t},E.parseXML=function(e){return new Promise((function(t,r){i.isBuffer(e)&&(e=e.toString()),l.parseString(e,{explicitRoot:!1,explicitArray:!1},(function(e,i){e?r(e):t(i)}))}))},E.requestError=function(){var e=(0,o.default)(s.default.mark((function e(t){var i,r,n,a,l,u=this;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null,r=function(){var e=(0,o.default)(s.default.mark((function e(r){var n,o;return s.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,u.parseXML(r);case 3:if(e.t0=e.sent,e.t0){e.next=6;break}e.t0={};case 6:n=e.t0,e.next=16;break;case 9:return e.prev=9,e.t1=e.catch(0),u.debug(r,"error"),e.t1.message+="\nraw xml: ".concat(r),e.t1.status=t.status,e.t1.requestId=t.headers&&t.headers["x-oss-request-id"],e.abrupt("return",e.t1);case 16:return o=n.Message||"unknow request error, status: ".concat(t.status),n.Condition&&(o+=" (condition: ".concat(n.Condition,")")),(i=new Error(o)).name=n.Code?"".concat(n.Code,"Error"):"UnknownError",i.status=t.status,i.code=n.Code,i.ecCode=n.EC,i.requestId=n.RequestId,i.hostId=n.HostId,i.serverTime=n.ServerTime,e.abrupt("return",i);case 27:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}(),t.data&&t.data.length){e.next=38;break}if(-1!==t.status&&-2!==t.status){e.next=10;break}(i=new Error(t.message)).name=t.name,i.status=t.status,i.code=t.name,e.next=36;break;case 10:if(404!==t.status){e.next=17;break}(i=new Error("Object not exists")).name="NoSuchKeyError",i.status=404,i.code="NoSuchKey",e.next=34;break;case 17:if(412!==t.status){e.next=24;break}(i=new Error("Pre condition failed")).name="PreconditionFailedError",i.status=412,i.code="PreconditionFailed",e.next=34;break;case 24:if((i=new Error("Unknow error, status: ".concat(t.status))).name="UnknownError",i.status=t.status,i.res=t,!(n=t.headers&&t.headers["x-oss-err"])){e.next=34;break}return a=atob(n),e.next=33,r(a);case 33:i=e.sent;case 34:i.requestId=t.headers&&t.headers["x-oss-request-id"],i.host="";case 36:e.next=43;break;case 38:return l=String(t.data),this.debug("request response error data: %s",l,"error"),e.next=42,r(l);case 42:i=e.sent;case 43:return this.debug("generate error %j",i,"error"),e.abrupt("return",i);case 45:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()}).call(this)}).call(this,{isBuffer:e("../../node_modules/is-buffer/index.js")},e("_process"))},{"../../node_modules/is-buffer/index.js":409,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":51,"../common/signUtils":52,"../common/utils/createRequest":58,"../common/utils/encoder":62,"../common/utils/getStandardRegion":65,"../common/utils/isFunction":72,"../common/utils/retry":80,"../common/utils/setSTSToken":82,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,agentkeepalive:94,bowser:101,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/es.symbol.description.js":351,"core-js/modules/es.symbol.js":354,debug:536,"merge-descriptors":428,platform:440,urllib:546,utility:545,xml2js:496}],4:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.array-buffer.slice.js"),e("core-js/modules/es.typed-array.uint8-array.js"),e("core-js/modules/es.typed-array.copy-within.js"),e("core-js/modules/es.typed-array.every.js"),e("core-js/modules/es.typed-array.fill.js"),e("core-js/modules/es.typed-array.filter.js"),e("core-js/modules/es.typed-array.find.js"),e("core-js/modules/es.typed-array.find-index.js"),e("core-js/modules/es.typed-array.for-each.js"),e("core-js/modules/es.typed-array.includes.js"),e("core-js/modules/es.typed-array.index-of.js"),e("core-js/modules/es.typed-array.iterator.js"),e("core-js/modules/es.typed-array.join.js"),e("core-js/modules/es.typed-array.last-index-of.js"),e("core-js/modules/es.typed-array.map.js"),e("core-js/modules/es.typed-array.reduce.js"),e("core-js/modules/es.typed-array.reduce-right.js"),e("core-js/modules/es.typed-array.reverse.js"),e("core-js/modules/es.typed-array.set.js"),e("core-js/modules/es.typed-array.slice.js"),e("core-js/modules/es.typed-array.some.js"),e("core-js/modules/es.typed-array.sort.js"),e("core-js/modules/es.typed-array.subarray.js"),e("core-js/modules/es.typed-array.to-locale-string.js"),e("core-js/modules/es.typed-array.to-string.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("util"),a=e("path"),l=e("mime"),u=e("copy-to"),c=e("../common/utils/isBlob").isBlob,h=e("../common/utils/isFile").isFile,A=e("../common/utils/isBuffer").isBuffer,d=i;d.multipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,u,d,p,f,g,m,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=v.length>2&&void 0!==v[2]?v[2]:{},this.resetCancelFlag(),r.disabledMD5=void 0===r.disabledMD5||!!r.disabledMD5,!r.checkpoint||!r.checkpoint.uploadId){e.next=8;break}return i&&h(i)&&(r.checkpoint.file=i),e.next=7,this._resumeMultipart(r.checkpoint,r);case 7:case 41:return e.abrupt("return",e.sent);case 8:return s=102400,r.mime||(h(i)?r.mime=l.getType(a.extname(i.name)):c(i)?r.mime=i.type:A(i)?r.mime="":r.mime=l.getType(a.extname(i))),r.headers=r.headers||{},this._convertMetaToHeaders(r.meta,r.headers),e.next=14,this._getFileSize(i);case 14:if(!((o=e.sent)<s)){e.next=26;break}return r.contentLength=o,e.next=19,this.put(t,i,r);case 19:if(u=e.sent,!r||!r.progress){e.next=23;break}return e.next=23,r.progress(1);case 23:return d={res:u.res,bucket:this.options.bucket,name:t,etag:u.res.headers.etag},(r.headers&&r.headers["x-oss-callback"]||r.callback)&&(d.data=u.data),e.abrupt("return",d);case 26:if(!r.partSize||parseInt(r.partSize,10)===r.partSize){e.next=28;break}throw new Error("partSize must be int number");case 28:if(!(r.partSize&&r.partSize<s)){e.next=30;break}throw new Error("partSize must not be smaller than ".concat(s));case 30:return e.next=32,this.initMultipartUpload(t,r);case 32:if(p=e.sent,f=p.uploadId,g=this._getPartSize(o,r.partSize),m={file:i,name:t,fileSize:o,partSize:g,uploadId:f,doneParts:[]},!r||!r.progress){e.next=39;break}return e.next=39,r.progress(0,m,p.res);case 39:return e.next=41,this._resumeMultipart(m,r);case 42:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),d._resumeMultipart=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,o,a,l,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this,!this.isCancel()){e.next=3;break}throw this._makeCancelEvent();case 3:return o=t.file,a=t.fileSize,l=t.partSize,c=t.uploadId,h=t.doneParts,A=t.name,d=[],h.length>0&&u(h).to(d),p=this._divideParts(a,l),f=p.length,g=!1,m=function(e,r){return new Promise(function(){var a=(0,s.default)(n.default.mark((function s(a,l){var d,m,v,_,y;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,e.isCancel()){n.next=29;break}return d=p[r-1],n.next=5,e._createBuffer(o,d.start,d.end);case 5:return m=n.sent,v={content:m,size:d.end-d.start},n.prev=7,n.next=10,e._uploadPart(A,c,r,v,i);case 10:_=n.sent,n.next=18;break;case 13:if(n.prev=13,n.t0=n.catch(7),404!==n.t0.status){n.next=17;break}throw e._makeAbortEvent();case 17:throw n.t0;case 18:if(e.isCancel()||g){n.next=26;break}if(t.doneParts.push({number:r,etag:_.res.headers.etag}),!i.progress){n.next=23;break}return n.next=23,i.progress(h.length/(f+1),t,_.res);case 23:a({number:r,etag:_.res.headers.etag}),n.next=27;break;case 26:a();case 27:n.next=30;break;case 29:a();case 30:n.next=41;break;case 32:n.prev=32,n.t1=n.catch(0),(y=new Error).name=n.t1.name,y.message=n.t1.message,y.stack=n.t1.stack,y.partNum=r,u(n.t1).to(y),l(y);case 41:case"end":return n.stop()}}),s,null,[[0,32],[7,13]])})));return function(e,t){return a.apply(this,arguments)}}())},v=Array.from(new Array(f),(function(e,t){return t+1})),_=d.map((function(e){return e.number})),y=v.filter((function(e){return _.indexOf(e)<0})),b=5,w=i.parallel||b,e.next=17,this._parallel(y,w,(function(e){return new Promise((function(t,i){m(r,e).then((function(e){e&&d.push(e),t()})).catch((function(e){i(e)}))}))}));case 17:if(x=e.sent,g=!0,!(B=x.find((function(e){return"abort"===e.name})))){e.next=22;break}throw B;case 22:if(!this.isCancel()){e.next=25;break}throw m=null,this._makeCancelEvent();case 25:if(!(x&&x.length>0)){e.next=28;break}throw x[0].message="Failed to upload some parts with error: ".concat(x[0].toString()," part_num: ").concat(x[0].partNum),x[0];case 28:return e.next=30,this.completeMultipartUpload(A,c,d,i);case 30:return e.abrupt("return",e.sent);case 31:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),d._getFileSize=function(){var e=(0,s.default)(n.default.mark((function e(t){return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!A(t)){e.next=4;break}return e.abrupt("return",t.length);case 4:if(!c(t)&&!h(t)){e.next=6;break}return e.abrupt("return",t.size);case 6:throw new Error("_getFileSize requires Buffer/File/Blob.");case 7:case"end":return e.stop()}}),e)})));function t(t){return e.apply(this,arguments)}return t}();var p=e("stream").Readable;function f(e,t){if(!(this instanceof f))return new f(e,t);p.call(this,t),this.file=e,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}function g(e){return e.arrayBuffer?e.arrayBuffer():new Promise((function(t,i){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){i(e)},r.readAsArrayBuffer(e)}))}o.inherits(f,p),f.prototype.readFileAndPush=function(e){if(this.fileBuffer)for(var t=!0;t&&this.fileBuffer&&this.start<this.fileBuffer.length;){var i=this.start,r=i+e;r=r>this.fileBuffer.length?this.fileBuffer.length:r,this.start=r,t=this.push(this.fileBuffer.slice(i,r))}},f.prototype._read=function(e){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);e=e||16384;var i=this;this.reader.onload=function(r){i.fileBuffer=t.from(new Uint8Array(r.target.result)),i.file=null,i.readFileAndPush(e)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(e)},d._createBuffer=function(){var e=(0,s.default)(n.default.mark((function e(i,r,s){var o,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!c(i)&&!h(i)){e.next=8;break}return o=i.slice(r,s),e.next=4,g(o);case 4:return a=e.sent,e.abrupt("return",t.from(a));case 8:if(!A(i)){e.next=12;break}return e.abrupt("return",i.subarray(r,s));case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return e.stop()}}),e)})));function i(t,i,r){return e.apply(this,arguments)}return i}(),d._getPartSize=function(e,t){var i=1e4;t||(t=1048576);var r=Math.ceil(e/i);return t<r&&(t=r,console.warn("partSize has been set to ".concat(t,", because the partSize you provided causes partNumber to be greater than 10,000"))),t},d._divideParts=function(e,t){for(var i=Math.ceil(e/t),r=[],n=0;n<i;n++){var s=t*n,o=Math.min(s+t,e);r.push({start:s,end:o})}return r}}).call(this)}).call(this,e("buffer").Buffer)},{"../common/utils/isBlob":68,"../common/utils/isBuffer":69,"../common/utils/isFile":71,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,buffer:103,"copy-to":107,"core-js/modules/es.array-buffer.slice.js":309,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.typed-array.copy-within.js":356,"core-js/modules/es.typed-array.every.js":357,"core-js/modules/es.typed-array.fill.js":358,"core-js/modules/es.typed-array.filter.js":359,"core-js/modules/es.typed-array.find-index.js":360,"core-js/modules/es.typed-array.find.js":361,"core-js/modules/es.typed-array.for-each.js":362,"core-js/modules/es.typed-array.includes.js":363,"core-js/modules/es.typed-array.index-of.js":364,"core-js/modules/es.typed-array.iterator.js":365,"core-js/modules/es.typed-array.join.js":366,"core-js/modules/es.typed-array.last-index-of.js":367,"core-js/modules/es.typed-array.map.js":368,"core-js/modules/es.typed-array.reduce-right.js":369,"core-js/modules/es.typed-array.reduce.js":370,"core-js/modules/es.typed-array.reverse.js":371,"core-js/modules/es.typed-array.set.js":372,"core-js/modules/es.typed-array.slice.js":373,"core-js/modules/es.typed-array.some.js":374,"core-js/modules/es.typed-array.sort.js":375,"core-js/modules/es.typed-array.subarray.js":376,"core-js/modules/es.typed-array.to-locale-string.js":377,"core-js/modules/es.typed-array.to-string.js":378,"core-js/modules/es.typed-array.uint8-array.js":379,mime:430,path:439,stream:468,util:489}],5:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.promise.js");var n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("fs"),a=e("copy-to"),l=e("path"),u=e("mime"),c=e("../common/callback"),h=e("merge-descriptors"),A=e("../common/utils/isBlob").isBlob,d=e("../common/utils/isFile").isFile,p=e("../common/utils/isBuffer").isBuffer,f=e("../common/utils/obj2xml").obj2xml,g=e("../common/utils/parseRestoreInfo").parseRestoreInfo,m=i;m.append=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return void 0===(r=r||{}).position&&(r.position="0"),r.subres={append:"",position:r.position},r.method="POST",e.next=6,this.put(t,i,r);case 6:return(s=e.sent).nextAppendPosition=s.res.headers["x-oss-next-append-position"],e.abrupt("return",s);case 9:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),m.put=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o,a,h,f;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=r||{}).disabledMD5=void 0===r.disabledMD5||!!r.disabledMD5,r.headers=r.headers||{},t=this._objectName(t),!p(i)){e.next=8;break}s=i,e.next=19;break;case 8:if(!A(i)&&!d(i)){e.next=18;break}return r.mime||(d(i)?r.mime=u.getType(l.extname(i.name)):r.mime=i.type),e.next=12,this._createBuffer(i,0,i.size);case 12:return s=e.sent,e.next=15,this._getFileSize(i);case 15:r.contentLength=e.sent,e.next=19;break;case 18:throw new TypeError("Must provide Buffer/Blob/File for put.");case 19:return this._convertMetaToHeaders(r.meta,r.headers),o=r.method||"PUT",a=this._objectRequestParams(o,t,r),c.encodeCallback(a,r),a.mime=r.mime,a.disabledMD5=r.disabledMD5,a.content=s,a.successStatuses=[200],e.next=29,this.request(a);case 29:return h=e.sent,f={name:t,url:this._objectUrl(t),res:h.res},a.headers&&a.headers["x-oss-callback"]&&(f.data=JSON.parse(h.data.toString())),e.abrupt("return",f);case 33:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),m.putStream=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},t=this._objectName(t),r.contentLength?r.headers["Content-Length"]=r.contentLength:r.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(r.meta,r.headers),s=r.method||"PUT",o=this._objectRequestParams(s,t,r),c.encodeCallback(o,r),o.mime=r.mime,o.stream=i,o.successStatuses=[200],e.next=13,this.request(o);case 13:return a=e.sent,l={name:t,url:this._objectUrl(t),res:a.res},o.headers&&o.headers["x-oss-callback"]&&(l.data=JSON.parse(a.data.toString())),e.abrupt("return",l);case 17:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),h(m,e("../common/object/copyObject")),h(m,e("../common/object/getObjectTagging")),h(m,e("../common/object/putObjectTagging")),h(m,e("../common/object/deleteObjectTagging")),h(m,e("../common/image")),h(m,e("../common/object/getBucketVersions")),h(m,e("../common/object/getACL")),h(m,e("../common/object/putACL")),h(m,e("../common/object/head")),h(m,e("../common/object/delete")),h(m,e("../common/object/get")),h(m,e("../common/object/putSymlink")),h(m,e("../common/object/getSymlink")),h(m,e("../common/object/deleteMulti")),h(m,e("../common/object/getObjectMeta")),h(m,e("../common/object/getObjectUrl")),h(m,e("../common/object/generateObjectUrl")),h(m,e("../common/object/signatureUrl")),h(m,e("../common/object/asyncSignatureUrl")),h(m,e("../common/object/signatureUrlV4")),h(m,e("../common/object/signPostObjectPolicyV4")),m.putMeta=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.copy(t,t,{meta:i||{},timeout:r&&r.timeout,ctx:r&&r.ctx});case 2:return s=e.sent,e.abrupt("return",s);case 4:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),m.list=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=this._objectRequestParams("GET","",i)).query=t,r.xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return s=e.sent,o=s.data.Contents||[],a=this,o&&(Array.isArray(o)||(o=[o]),o=o.map((function(e){return{name:e.Key,url:a._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName},restoreInfo:g(e.RestoreInfo)}}))),(l=s.data.CommonPrefixes||null)&&(Array.isArray(l)||(l=[l]),l=l.map((function(e){return e.Prefix}))),e.abrupt("return",{res:s.res,objects:o,prefixes:l,nextMarker:s.data.NextMarker||null,isTruncated:"true"===s.data.IsTruncated});case 13:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),m.listV2=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,a,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=c.length>1&&void 0!==c[1]?c[1]:{},(r=t["continuation-token"]||t.continuationToken)&&(i.subres=Object.assign({"continuation-token":r},i.subres)),(s=this._objectRequestParams("GET","",i)).query=Object.assign({"list-type":2},t),delete s.query["continuation-token"],delete s.query.continuationToken,s.xmlResponse=!0,s.successStatuses=[200],e.next=11,this.request(s);case 11:return o=e.sent,a=o.data.Contents||[],l=this,a&&(Array.isArray(a)||(a=[a]),a=a.map((function(e){var t=null;return e.Owner&&(t={id:e.Owner.ID,displayName:e.Owner.DisplayName}),{name:e.Key,url:l._objectUrl(e.Key),lastModified:e.LastModified,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:t,restoreInfo:g(e.RestoreInfo)}}))),(u=o.data.CommonPrefixes||null)&&(Array.isArray(u)||(u=[u]),u=u.map((function(e){return e.Prefix}))),e.abrupt("return",{res:o.res,objects:a,prefixes:u,isTruncated:"true"===o.data.IsTruncated,keyCount:+o.data.KeyCount,continuationToken:o.data.ContinuationToken||null,nextContinuationToken:o.data.NextContinuationToken||null});case 18:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),m.restore=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=(i=a.length>1&&void 0!==a[1]?a[1]:{type:"Archive"})||{}).subres=Object.assign({restore:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),r=this._objectRequestParams("POST",t,i),s={RestoreRequest:{Days:i.Days?i.Days:2}},"ColdArchive"!==i.type&&"DeepColdArchive"!==i.type||(s.RestoreRequest.JobParameters={Tier:i.JobParameters?i.JobParameters:"Standard"}),r.content=f(s,{headers:!0}),r.mime="xml",r.successStatuses=[202],e.next=12,this.request(r);case 12:return o=e.sent,e.abrupt("return",{res:o.res});case 14:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),m._objectUrl=function(e){return this._getReqUrl({bucket:this.options.bucket,object:e})},m._objectRequestParams=function(e,t,i){if(!this.options.bucket&&!this.options.cname)throw new Error("Please create a bucket first");i=i||{};var r={object:t=this._objectName(t),bucket:this.options.bucket,method:e,subres:i&&i.subres,additionalHeaders:i&&i.additionalHeaders,timeout:i&&i.timeout,ctx:i&&i.ctx};return i.headers&&(r.headers={},a(i.headers).to(r.headers)),r},m._objectName=function(e){return e.replace(/^\/+/,"")},m._convertMetaToHeaders=function(e,t){e&&Object.keys(e).forEach((function(i){t["x-oss-meta-".concat(i)]=e[i]}))},m._deleteFileSafe=function(e){var t=this;return new Promise((function(i){o.exists(e,(function(r){r?o.unlink(e,(function(r){r&&t.debug("unlink %j error: %s",e,r,"error"),i()})):i()}))}))}},{"../common/callback":24,"../common/image":27,"../common/object/asyncSignatureUrl":31,"../common/object/copyObject":32,"../common/object/delete":33,"../common/object/deleteMulti":34,"../common/object/deleteObjectTagging":35,"../common/object/generateObjectUrl":36,"../common/object/get":37,"../common/object/getACL":38,"../common/object/getBucketVersions":39,"../common/object/getObjectMeta":40,"../common/object/getObjectTagging":41,"../common/object/getObjectUrl":42,"../common/object/getSymlink":43,"../common/object/head":44,"../common/object/putACL":45,"../common/object/putObjectTagging":46,"../common/object/putSymlink":47,"../common/object/signPostObjectPolicyV4":48,"../common/object/signatureUrl":49,"../common/object/signatureUrlV4":50,"../common/utils/isBlob":68,"../common/utils/isBuffer":69,"../common/utils/isFile":71,"../common/utils/obj2xml":76,"../common/utils/parseRestoreInfo":78,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.number.constructor.js":324,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380,fs:102,"merge-descriptors":428,mime:430,path:439}],6:[function(e,t,i){i.version="6.23.0"},{}],7:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.abortBucketWorm=void 0;var o=e("../utils/checkBucketName");function a(e,t){return l.apply(this,arguments)}function l(){return l=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),r=this._bucketRequestParams("DELETE",t,"worm",i),e.next=4,this.request(r);case 4:return s=e.sent,e.abrupt("return",{res:s.res,status:s.status});case 6:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}i.abortBucketWorm=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],8:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.completeBucketWorm=void 0;var o=e("../utils/checkBucketName");function a(e,t,i){return l.apply(this,arguments)}function l(){return l=(0,s.default)(n.default.mark((function e(t,i,r){var s,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),s=this._bucketRequestParams("POST",t,{wormId:i},r),e.next=4,this.request(s);case 4:return a=e.sent,e.abrupt("return",{res:a.res,status:a.status});case 6:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}i.completeBucketWorm=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],9:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.deleteBucketInventory=void 0;var o=e("../utils/checkBucketName");function a(e,t){return l.apply(this,arguments)}function l(){return l=(0,s.default)(n.default.mark((function e(t,i){var r,s,a,l,u=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]?u[2]:{},s=Object.assign({inventory:"",inventoryId:i},r.subres),o.checkBucketName(t),(a=this._bucketRequestParams("DELETE",t,s,r)).successStatuses=[204],e.next=7,this.request(a);case 7:return l=e.sent,e.abrupt("return",{status:l.status,res:l.res});case 9:case"end":return e.stop()}}),e,this)}))),l.apply(this,arguments)}i.deleteBucketInventory=a},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],10:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName;i.deleteBucketLifecycle=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("DELETE",t,"lifecycle",i)).successStatuses=[204],e.next=5,this.request(r);case 5:return s=e.sent,e.abrupt("return",{res:s.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],11:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName;i.deleteBucketWebsite=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("DELETE",t,"website",i)).successStatuses=[204],e.next=5,this.request(r);case 5:return s=e.sent,e.abrupt("return",{res:s.res});case 7:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],12:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.extendBucketWorm=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/obj2xml");function l(e,t,i,r){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i,r,s){var l,u,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),l=this._bucketRequestParams("POST",t,{wormExtend:"",wormId:i},s),u={ExtendWormConfiguration:{RetentionPeriodInDays:r}},l.mime="xml",l.content=a.obj2xml(u,{headers:!0}),l.successStatuses=[200],e.next=8,this.request(l);case 8:return c=e.sent,e.abrupt("return",{res:c.res,status:c.status});case 10:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.extendBucketWorm=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],13:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.getBucketInventory=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/formatInventoryConfig");function l(e,t){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]?c[2]:{},s=Object.assign({inventory:"",inventoryId:i},r.subres),o.checkBucketName(t),(l=this._bucketRequestParams("GET",t,s,r)).successStatuses=[200],l.xmlResponse=!0,e.next=8,this.request(l);case 8:return u=e.sent,e.abrupt("return",{status:u.status,res:u.res,inventory:a.formatInventoryConfig(u.data)});case 10:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.getBucketInventory=l},{"../utils/checkBucketName":53,"../utils/formatInventoryConfig":63,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],14:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isArray").isArray,l=e("../utils/formatObjKey").formatObjKey;i.getBucketLifecycle=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("GET",t,"lifecycle",i)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return s=e.sent,(u=s.data.Rule||null)&&(a(u)||(u=[u]),u=u.map((function(e){return e.ID&&(e.id=e.ID,delete e.ID),e.Tag&&!a(e.Tag)&&(e.Tag=[e.Tag]),l(e,"firstLowerCase")}))),e.abrupt("return",{rules:u,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/formatObjKey":64,"../utils/isArray":67,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318}],15:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName;i.getBucketVersioning=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("GET",t,"versioning",i)).xmlResponse=!0,r.successStatuses=[200],e.next=6,this.request(r);case 6:return s=e.sent,a=s.data.Status,e.abrupt("return",{status:s.status,versionStatus:a,res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],16:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isObject").isObject;i.getBucketWebsite=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o(t),(r=this._bucketRequestParams("GET",t,"website",i)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return s=e.sent,l=[],s.data.RoutingRules&&s.data.RoutingRules.RoutingRule&&(l=a(s.data.RoutingRules.RoutingRule)?[s.data.RoutingRules.RoutingRule]:s.data.RoutingRules.RoutingRule),e.abrupt("return",{index:s.data.IndexDocument&&s.data.IndexDocument.Suffix||"",supportSubDir:s.data.IndexDocument&&s.data.IndexDocument.SupportSubDir||"false",type:s.data.IndexDocument&&s.data.IndexDocument.Type,routingRules:l,error:s.data.ErrorDocument&&s.data.ErrorDocument.Key||null,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],17:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.getBucketWorm=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/dataFix");function l(e,t){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o.checkBucketName(t),(r=this._bucketRequestParams("GET",t,"worm",i)).successStatuses=[200],r.xmlResponse=!0,e.next=6,this.request(r);case 6:return s=e.sent,a.dataFix(s.data,{lowerFirst:!0,rename:{RetentionPeriodInDays:"days"}}),e.abrupt("return",Object.assign(Object.assign({},s.data),{res:s.res,status:s.status}));case 9:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.getBucketWorm=l},{"../utils/checkBucketName":53,"../utils/dataFix":59,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],18:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.initiateBucketWorm=void 0;var o=e("../utils/obj2xml"),a=e("../utils/checkBucketName");function l(e,t,i){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i,r){var s,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.checkBucketName(t),s=this._bucketRequestParams("POST",t,"worm",r),l={InitiateWormConfiguration:{RetentionPeriodInDays:i}},s.mime="xml",s.content=o.obj2xml(l,{headers:!0}),s.successStatuses=[200],e.next=8,this.request(s);case 8:return u=e.sent,e.abrupt("return",{res:u.res,wormId:u.res.headers["x-oss-worm-id"],status:u.status});case 10:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.initiateBucketWorm=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],19:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.listBucketInventory=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/formatInventoryConfig");function l(e){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t){var i,r,s,l,u,c,h,A,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=d.length>1&&void 0!==d[1]?d[1]:{},r=i.continuationToken,s=Object.assign({inventory:""},r&&{"continuation-token":r},i.subres),o.checkBucketName(t),(l=this._bucketRequestParams("GET",t,s,i)).successStatuses=[200],l.xmlResponse=!0,e.next=9,this.request(l);case 9:return u=e.sent,c=u.data,h=u.res,A=u.status,e.abrupt("return",{isTruncated:"true"===c.IsTruncated,nextContinuationToken:c.NextContinuationToken,inventoryList:a.formatInventoryConfig(c.InventoryConfiguration,!0),status:A,res:h});case 12:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.listBucketInventory=l},{"../utils/checkBucketName":53,"../utils/formatInventoryConfig":63,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],20:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.concat.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.putBucketInventory=void 0;var o=e("../utils/checkBucketName"),a=e("../utils/obj2xml");function l(e,t){return u.apply(this,arguments)}function u(){return u=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c,h,A,d,p,f,g,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=m.length>2&&void 0!==m[2]?m[2]:{},s=Object.assign({inventory:"",inventoryId:i.id},r.subres),o.checkBucketName(t),l=i.OSSBucketDestination,u=i.optionalFields,c=i.includedObjectVersions,h="acs:oss:::",A="acs:ram::".concat(l.accountId,":role/"),d={InventoryConfiguration:{Id:i.id,IsEnabled:i.isEnabled,Filter:{Prefix:i.prefix||""},Destination:{OSSBucketDestination:{Format:l.format,AccountId:l.accountId,RoleArn:"".concat(A).concat(l.rolename),Bucket:"".concat(h).concat(l.bucket),Prefix:l.prefix||"",Encryption:l.encryption||""}},Schedule:{Frequency:i.frequency},IncludedObjectVersions:c,OptionalFields:{Field:(null==u?void 0:u.field)||[]}}},p=a.obj2xml(d,{headers:!0,firstUpperCase:!0}),(f=this._bucketRequestParams("PUT",t,s,r)).successStatuses=[200],f.mime="xml",f.content=p,e.next=14,this.request(f);case 14:return g=e.sent,e.abrupt("return",{status:g.status,res:g.res});case 16:case"end":return e.stop()}}),e,this)}))),u.apply(this,arguments)}i.putBucketInventory=l},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.assign.js":325}],21:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.array.includes.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/isArray").isArray,l=e("../utils/deepCopy").deepCopy,u=e("../utils/isObject").isObject,c=e("../utils/obj2xml").obj2xml,h=e("../utils/checkObjectTag").checkObjectTag,A=e("../utils/getStrBytesCount").getStrBytesCount;function d(e){e.days&&(e.expiration={days:e.days}),e.date&&(e.expiration={createdBeforeDate:e.date})}function p(e,t){var i=e.days,r=e.createdBeforeDate;if(!i&&!r)throw new Error("".concat(t," must includes days or createdBeforeDate"));if(i&&(a(i)||!/^[1-9][0-9]*$/.test(i)))throw new Error("days must be a positive integer");if(r&&!/\d{4}-\d{2}-\d{2}T00:00:00.000Z/.test(r))throw new Error("createdBeforeDate must be date and conform to iso8601 format")}function f(e,t){var i=e.noncurrentDays;if(!i)throw new Error("".concat(t," must includes noncurrentDays"));if(i&&(a(i)||!/^[1-9][0-9]*$/.test(i)))throw new Error("noncurrentDays must be a positive integer")}function g(e){if(!a(e)&&!u(e))throw new Error("tag must be Object or Array");e=u(e)?[e]:e;var t={};l(e).forEach((function(e){t[e.key]=e.value})),h(t)}function m(e){if(!["IA","Archive","ColdArchive","DeepColdArchive"].includes(e))throw new Error("StorageClass must be IA or Archive or ColdArchive or DeepColdArchive")}function v(e){if(e.id&&A(e.id)>255)throw new Error("ID is composed of 255 bytes at most");if(void 0===e.prefix)throw new Error("Rule must includes prefix");if(!["Enabled","Disabled"].includes(e.status))throw new Error("Status must be Enabled or Disabled");if(!(e.expiration||e.noncurrentVersionExpiration||e.abortMultipartUpload||e.transition||e.noncurrentVersionTransition))throw new Error("Rule must includes expiration or noncurrentVersionExpiration or abortMultipartUpload or transition or noncurrentVersionTransition");if(e.transition&&(m(e.transition.storageClass),p(e.transition,"Transition")),e.expiration)if(e.expiration.expiredObjectDeleteMarker){if(e.expiration.days||e.expiration.createdBeforeDate)throw new Error("expiredObjectDeleteMarker cannot be used with days or createdBeforeDate")}else p(e.expiration,"Expiration");if(e.abortMultipartUpload&&p(e.abortMultipartUpload,"AbortMultipartUpload"),e.noncurrentVersionTransition&&(m(e.noncurrentVersionTransition.storageClass),f(e.noncurrentVersionTransition,"NoncurrentVersionTransition")),e.noncurrentVersionExpiration&&f(e.noncurrentVersionExpiration,"NoncurrentVersionExpiration"),e.tag){if(e.abortMultipartUpload)throw new Error("Tag cannot be used with abortMultipartUpload");g(e.tag)}}i.putBucketLifecycle=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,l,u,h,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o(t),a(i)){e.next=3;break}throw new Error("rules must be Array");case 3:return s=this._bucketRequestParams("PUT",t,"lifecycle",r),u={LifecycleConfiguration:{Rule:l=[]}},i.forEach((function(e){d(e),v(e),e.id&&(e.ID=e.id,delete e.id),l.push(e)})),h=c(u,{headers:!0,firstUpperCase:!0}),s.content=h,s.mime="xml",s.successStatuses=[200],e.next=13,this.request(s);case 13:return A=e.sent,e.abrupt("return",{res:A.res});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/checkObjectTag":56,"../utils/deepCopy":60,"../utils/getStrBytesCount":66,"../utils/isArray":67,"../utils/isObject":74,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/web.dom-collections.for-each.js":380}],22:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.includes.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/obj2xml").obj2xml;i.putBucketVersioning=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:{},o(t),["Enabled","Suspended"].includes(i)){e.next=4;break}throw new Error("status must be Enabled or Suspended");case 4:return s=this._bucketRequestParams("PUT",t,"versioning",r),l={VersioningConfiguration:{Status:i}},s.mime="xml",s.content=a(l,{headers:!0}),e.next=10,this.request(s);case 10:return u=e.sent,e.abrupt("return",{res:u.res,status:u.status});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.includes.js":315}],23:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator")),s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("../utils/obj2xml").obj2xml,l=e("../utils/isArray").isArray;i.putBucketWebsite=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,u,c,h,A,d=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=d.length>1&&void 0!==d[1]?d[1]:{},r=d.length>2?d[2]:void 0,o(t),s=this._bucketRequestParams("PUT",t,"website",r),u={Suffix:i.index||"index.html"},h={WebsiteConfiguration:c={IndexDocument:u}},i.supportSubDir&&(u.SupportSubDir=i.supportSubDir),i.type&&(u.Type=i.type),i.error&&(c.ErrorDocument={Key:i.error}),void 0===i.routingRules){e.next=14;break}if(l(i.routingRules)){e.next=13;break}throw new Error("RoutingRules must be Array");case 13:c.RoutingRules={RoutingRule:i.routingRules};case 14:return h=a(h),s.content=h,s.mime="xml",s.successStatuses=[200],e.next=20,this.request(s);case 20:return A=e.sent,e.abrupt("return",{res:A.res});case 22:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"../utils/isArray":67,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93}],24:[function(e,t,i){(function(t){(function(){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),i.encodeCallback=function(e,i){if(e.headers=e.headers||{},!Object.prototype.hasOwnProperty.call(e.headers,"x-oss-callback")&&i.callback){var r={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};i.callback.host&&(r.callbackHost=i.callback.host),i.callback.contentType&&(r.callbackBodyType=i.callback.contentType),i.callback.callbackSNI&&(r.callbackSNI=i.callback.callbackSNI);var n=t.from(JSON.stringify(r)).toString("base64");if(e.headers["x-oss-callback"]=n,i.callback.customValue){var s={};Object.keys(i.callback.customValue).forEach((function(e){s["x:".concat(e)]=i.callback.customValue[e].toString()})),e.headers["x-oss-callback-var"]=t.from(JSON.stringify(s)).toString("base64")}}}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:103,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/web.dom-collections.for-each.js":380}],25:[function(e,t,i){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.getReqUrl=void 0;var n=r(e("copy-to")),s=r(e("url")),o=r(e("merge-descriptors")),a=r(e("is-type-of")),l=e("../utils/isIP"),u=e("../utils/checkConfigValid");function c(e){var t={},i=this.options.cname;u.checkConfigValid(this.options.endpoint,"endpoint"),n.default(this.options.endpoint,!1).to(t),!e.bucket||i||l.isIP(t.hostname)||this.options.sldEnable||(t.host="".concat(e.bucket,".").concat(t.host));var r="/";e.bucket&&this.options.sldEnable&&(r+="".concat(e.bucket,"/")),e.object&&(r+=this._escape(e.object).replace(/\+/g,"%2B")),t.pathname=r;var c={};if(e.query&&o.default(c,e.query),e.subres){var h={};a.default.string(e.subres)?h[e.subres]="":a.default.array(e.subres)?e.subres.forEach((function(e){h[e]=""})):h=e.subres,o.default(c,h)}return t.query=c,s.default.format(t)}i.getReqUrl=c},{"../utils/checkConfigValid":54,"../utils/isIP":73,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380,"is-type-of":537,"merge-descriptors":428,url:543}],26:[function(e,t,i){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.string.trim.js");var r=e("humanize-ms"),n=e("url"),s=e("../utils/checkBucketName").checkBucketName,o=e("../utils/setRegion").setRegion,a=e("../utils/checkConfigValid").checkConfigValid;function l(e,t){a(e,"endpoint");var i=n.parse(e);if(i.protocol||(i=n.parse("http".concat(t?"s":"","://").concat(e))),"http:"!==i.protocol&&"https:"!==i.protocol)throw new Error("Endpoint protocol must be http or https.");return i}t.exports=function(e){if(!e||!e.accessKeyId||!e.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");!e.stsToken||e.refreshSTSToken||e.refreshSTSTokenInterval||console.warn("It's recommended to set 'refreshSTSToken' and 'refreshSTSTokenInterval' to refresh stsToken、accessKeyId、accessKeySecret automatically when sts token has expired"),e.bucket&&s(e.bucket);var t=Object.assign({region:"oss-cn-hangzhou",internal:!1,secure:!1,timeout:6e4,bucket:null,endpoint:null,cname:!1,isRequestPay:!1,sldEnable:!1,headerEncoding:"utf-8",refreshSTSToken:null,refreshSTSTokenInterval:3e5,retryMax:0,authorizationV4:!1},e);if(t.accessKeyId=t.accessKeyId.trim(),t.accessKeySecret=t.accessKeySecret.trim(),t.timeout&&(t.timeout=r(t.timeout)),t.endpoint)t.endpoint=l(t.endpoint,t.secure);else{if(!t.region)throw new Error("require options.endpoint or options.region");t.endpoint=o(t.region,t.internal,t.secure)}return t.inited=!0,t}},{"../utils/checkBucketName":53,"../utils/checkConfigValid":54,"../utils/setRegion":81,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.string.trim.js":349,"humanize-ms":399,url:543}],27:[function(e,t,i){e("merge-descriptors")(i,e("./processObjectSave"))},{"./processObjectSave":28,"merge-descriptors":428}],28:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkBucketName").checkBucketName,a=e("querystring"),l=e("js-base64").Base64.encode;function u(e,t){if(!e)throw new Error("".concat(t," is required"));if("string"!=typeof e)throw new Error("".concat(t," must be String"))}i.processObjectSave=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var c,h,A,d;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(t,"sourceObject"),u(i,"targetObject"),u(r,"process"),i=this._objectName(i),s&&o(s),c=this._objectRequestParams("POST",t,{subres:"x-oss-process"}),h=s?",b_".concat(l(s)):"",i=l(i),A={"x-oss-process":"".concat(r,"|sys/saveas,o_").concat(i).concat(h)},c.content=a.stringify(A),e.next=12,this.request(c);case 12:return d=e.sent,e.abrupt("return",{res:d.res,status:d.res.status});case 14:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}()},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"js-base64":413,querystring:451}],29:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.regexp.to-string.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("debug")("ali-oss:multipart-copy"),a=e("copy-to"),l=i;l.uploadPartCopy=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s,o){var a,l,u,c,h,A=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(a=A.length>5&&void 0!==A[5]?A[5]:{}).headers=a.headers||{},l=a.versionId||a.subres&&a.subres.versionId||null,u=l?"/".concat(o.sourceBucketName,"/").concat(encodeURIComponent(o.sourceKey),"?versionId=").concat(l):"/".concat(o.sourceBucketName,"/").concat(encodeURIComponent(o.sourceKey)),a.headers["x-oss-copy-source"]=u,s&&(a.headers["x-oss-copy-source-range"]="bytes=".concat(s)),a.subres={partNumber:r,uploadId:i},(c=this._objectRequestParams("PUT",t,a)).mime=a.mime,c.successStatuses=[200],e.next=12,this.request(c);case 12:return h=e.sent,e.abrupt("return",{name:t,etag:h.res.headers.etag,res:h.res});case 14:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n,s){return e.apply(this,arguments)}return t}(),l.multipartUploadCopy=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,o,a,l,u,c,h,A,d,p,f=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.length>2&&void 0!==f[2]?f[2]:{},this.resetCancelFlag(),s=r.versionId,o={versionId:void 0===s?null:s},e.next=6,this._getObjectMeta(i.sourceBucketName,i.sourceKey,o);case 6:if(a=e.sent,l=a.res.headers["content-length"],i.startOffset=i.startOffset||0,i.endOffset=i.endOffset||l,!r.checkpoint||!r.checkpoint.uploadId){e.next=14;break}return e.next=13,this._resumeMultipartCopy(r.checkpoint,i,r);case 13:case 31:return e.abrupt("return",e.sent);case 14:if(u=102400,!((c=i.endOffset-i.startOffset)<u)){e.next=18;break}throw new Error("copySize must not be smaller than ".concat(u));case 18:if(!(r.partSize&&r.partSize<u)){e.next=20;break}throw new Error("partSize must not be smaller than ".concat(u));case 20:return e.next=22,this.initMultipartUpload(t,r);case 22:if(h=e.sent,A=h.uploadId,d=this._getPartSize(c,r.partSize),p={name:t,copySize:c,partSize:d,uploadId:A,doneParts:[]},!r||!r.progress){e.next=29;break}return e.next=29,r.progress(0,p,h.res);case 29:return e.next=31,this._resumeMultipartCopy(p,i,r);case 32:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),l._resumeMultipartCopy=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var l,u,c,h,A,d,p,f,g,m,v,_,y,b,w,x,B,P,C,M,k;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isCancel()){e.next=2;break}throw this._makeCancelEvent();case 2:if(l=r.versionId,c={versionId:u=void 0===l?null:l},h=t.copySize,A=t.partSize,d=t.uploadId,p=t.doneParts,f=t.name,g=this._divideMultipartCopyParts(h,A,i.startOffset),m=g.length,v={headers:{}},r.copyheaders&&a(r.copyheaders).to(v.headers),u&&a(c).to(v),_=function(e,i,a){return new Promise(function(){var l=(0,s.default)(n.default.mark((function s(l,u){var c,h,A;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(n.prev=0,e.isCancel()){n.next=22;break}return c=g[i-1],h="".concat(c.start,"-").concat(c.end-1),n.prev=4,n.next=7,e.uploadPartCopy(f,d,i,h,a,v);case 7:A=n.sent,n.next=15;break;case 10:if(n.prev=10,n.t0=n.catch(4),404!==n.t0.status){n.next=14;break}throw e._makeAbortEvent();case 14:throw n.t0;case 15:if(e.isCancel()){n.next=22;break}if(o("content-range ".concat(A.res.headers["content-range"])),p.push({number:i,etag:A.res.headers.etag}),t.doneParts=p,!r||!r.progress){n.next=22;break}return n.next=22,r.progress(p.length/m,t,A.res);case 22:l(),n.next=29;break;case 25:n.prev=25,n.t1=n.catch(0),n.t1.partNum=i,u(n.t1);case 29:case"end":return n.stop()}}),s,null,[[0,25],[4,10]])})));return function(e,t){return l.apply(this,arguments)}}())},y=Array.from(new Array(m),(function(e,t){return t+1})),b=p.map((function(e){return e.number})),w=y.filter((function(e){return b.indexOf(e)<0})),x=5,B=r.parallel||x,!this.checkBrowserAndVersion("Internet Explorer","10")&&1!==B){e.next=28;break}P=0;case 18:if(!(P<w.length)){e.next=26;break}if(!this.isCancel()){e.next=21;break}throw this._makeCancelEvent();case 21:return e.next=23,_(this,w[P],i);case 23:P++,e.next=18;break;case 26:e.next=40;break;case 28:return e.next=30,this._parallelNode(w,B,_,i);case 30:if(C=e.sent,M=C.find((function(e){return"abort"===e.name})),!M){e.next=34;break}throw M;case 34:if(!this.isCancel()){e.next=36;break}throw this._makeCancelEvent();case 36:if(!(C&&C.length>0)){e.next=40;break}throw(k=C[0]).message="Failed to copy some parts with error: ".concat(k.toString()," part_num: ").concat(k.partNum),k;case 40:return e.next=42,this.completeMultipartUpload(f,d,p,r);case 42:return e.abrupt("return",e.sent);case 43:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),l._divideMultipartCopyParts=function(e,t,i){for(var r=Math.ceil(e/t),n=[],s=0;s<r;s++){var o=t*s+i,a=Math.min(o+t,e+i);n.push({start:o,end:a})}return n},l._getObjectMeta=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=this.getBucket(),this.setBucket(t),e.next=4,this.head(i,r);case 4:return o=e.sent,this.setBucket(s),e.abrupt("return",o);case 7:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.map.js":318,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,debug:536}],30:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.map.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.regexp.to-string.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("copy-to"),a=e("./callback"),l=e("./utils/deepCopy").deepCopyWith,u=e("./utils/isBuffer").isBuffer,c=e("./utils/omit").omit,h=i;h.listUploads=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},o(i=i||{}).to(r),r.subres="uploads",(s=this._objectRequestParams("GET","",r)).query=t,s.xmlResponse=!0,s.successStatuses=[200],e.next=10,this.request(s);case 10:return a=e.sent,l=a.data.Upload||[],Array.isArray(l)||(l=[l]),l=l.map((function(e){return{name:e.Key,uploadId:e.UploadId,initiated:e.Initiated}})),e.abrupt("return",{res:a.res,uploads:l,bucket:a.data.Bucket,nextKeyMarker:a.data.NextKeyMarker,nextUploadIdMarker:a.data.NextUploadIdMarker,isTruncated:"true"===a.data.IsTruncated});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),h.listParts=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var a,l,u;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a={},o(s=s||{}).to(a),a.subres={uploadId:i},(l=this._objectRequestParams("GET",t,a)).query=r,l.xmlResponse=!0,l.successStatuses=[200],e.next=10,this.request(l);case 10:return u=e.sent,e.abrupt("return",{res:u.res,uploadId:u.data.UploadId,bucket:u.data.Bucket,name:u.data.Key,partNumberMarker:u.data.PartNumberMarker,nextPartNumberMarker:u.data.NextPartNumberMarker,maxParts:u.data.MaxParts,isTruncated:u.data.IsTruncated,parts:u.data.Part||[]});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),h.abortMultipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,a,l;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._stop(),s={},o(r=r||{}).to(s),s.subres={uploadId:i},(a=this._objectRequestParams("DELETE",t,s)).successStatuses=[204],e.next=9,this.request(a);case 9:return l=e.sent,e.abrupt("return",{res:l.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}(),h.initMultipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,a;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={},o(i=i||{}).to(r),r.headers=r.headers||{},this._convertMetaToHeaders(i.meta,r.headers),r.subres="uploads",(s=this._objectRequestParams("POST",t,r)).mime=i.mime,s.xmlResponse=!0,s.successStatuses=[200],e.next=12,this.request(s);case 12:return a=e.sent,e.abrupt("return",{res:a.res,bucket:a.data.Bucket,name:a.data.Key,uploadId:a.data.UploadId});case 14:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}(),h.uploadPart=function(){var e=(0,s.default)(n.default.mark((function e(i,r,s,o,a,l,u){var c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c={size:l-a},!t||!t.browser){e.next=8;break}return e.next=5,this._createBuffer(o,a,l);case 5:c.content=e.sent,e.next=11;break;case 8:return e.next=10,this._createStream(o,a,l);case 10:c.stream=e.sent;case 11:return e.next=13,this._uploadPart(i,r,s,c,u);case 13:return e.abrupt("return",e.sent);case 14:case"end":return e.stop()}}),e,this)})));function i(t,i,r,n,s,o,a){return e.apply(this,arguments)}return i}(),h.completeMultipartUpload=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var o,h,A,d,p,f,g,m;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(o=r.concat().sort((function(e,t){return e.number-t.number})).filter((function(e,t,i){return!t||e.number!==i[t-1].number})),h='<?xml version="1.0" encoding="UTF-8"?>\n<CompleteMultipartUpload>\n',A=0;A<o.length;A++)d=o[A],h+="<Part>\n",h+="<PartNumber>".concat(d.number,"</PartNumber>\n"),h+="<ETag>".concat(d.etag,"</ETag>\n"),h+="</Part>\n";return h+="</CompleteMultipartUpload>",p={},(p=l(s=s||{},(function(e){if(u(e))return null}))).subres={uploadId:i},p.headers=c(p.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),f=this._objectRequestParams("POST",t,p),a.encodeCallback(f,p),f.mime="xml",f.content=h,f.headers&&f.headers["x-oss-callback"]||(f.xmlResponse=!0),f.successStatuses=[200],e.next=17,this.request(f);case 17:if(g=e.sent,!s.progress){e.next=21;break}return e.next=21,s.progress(1,null,g.res);case 21:return m={res:g.res,bucket:f.bucket,name:t,etag:g.res.headers.etag},f.headers&&f.headers["x-oss-callback"]&&(m.data=JSON.parse(g.data.toString())),e.abrupt("return",m);case 24:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),h._uploadPart=function(){var e=(0,s.default)(n.default.mark((function e(i,r,s,a,l){var u,h,A;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u={},o(l=l||{}).to(u),u.headers=u.headers||{},u.headers["Content-Length"]=a.size,u.headers=c(u.headers,["x-oss-server-side-encryption","x-oss-storage-class"]),u.subres={partNumber:s,uploadId:r},(h=this._objectRequestParams("PUT",i,u)).mime=u.mime,t&&t.browser?h.content=a.content:h.stream=a.stream,h.successStatuses=[200],h.disabledMD5=l.disabledMD5,e.next=15,this.request(h);case 15:if((A=e.sent).res.headers.etag){e.next=18;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 18:return a.stream&&(a.stream=null,h.stream=null),e.abrupt("return",{name:i,etag:A.res.headers.etag,res:A.res});case 20:case"end":return e.stop()}}),e,this)})));function i(t,i,r,n,s){return e.apply(this,arguments)}return i}()}).call(this)}).call(this,e("_process"))},{"./callback":24,"./utils/deepCopy":60,"./utils/isBuffer":69,"./utils/omit":77,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.sort.js":320,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],31:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("url"),a=e("utility"),l=e("copy-to"),u=e("../../common/signUtils"),c=e("../utils/isIP").isIP,h=e("../utils/setSTSToken").setSTSToken,A=e("../utils/isFunction").isFunction;i.asyncSignatureUrl=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,d,p,f,g,m=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(m.length>2&&void 0!==m[2])||m[2],!c(this.options.endpoint.hostname)){e.next=3;break}throw new Error("can not get the object URL when endpoint is IP");case 3:if(!r||!/^\?/.test(t)){e.next=5;break}throw new Error("Invalid object name ".concat(t));case 5:if(i=i||{},t=this._objectName(t),i.method=i.method||"GET",s=a.timestamp()+(i.expires||1800),d={bucket:this.options.bucket,object:t},p=this._getResource(d),!this.options.stsToken||!A(this.options.refreshSTSToken)){e.next=14;break}return e.next=14,h.call(this);case 14:return this.options.stsToken&&(i["security-token"]=this.options.stsToken),f=u._signatureForURL(this.options.accessKeySecret,i,p,s),(g=o.parse(this._getReqUrl(d))).query={OSSAccessKeyId:this.options.accessKeyId,Expires:s,Signature:f.Signature},l(f.subResource).to(g.query),e.abrupt("return",g.format());case 20:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../../common/signUtils":52,"../utils/isFunction":72,"../utils/isIP":73,"../utils/setSTSToken":82,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"copy-to":107,"core-js/modules/es.regexp.exec.js":338,url:543,utility:545}],32:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var s=r(e("@babel/runtime/helpers/typeof")),o=r(e("@babel/runtime/helpers/asyncToGenerator")),a=e("../utils/checkBucketName").checkBucketName,l=i,u=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];l.copy=function(){var e=(0,o.default)(n.default.mark((function e(t,i,r,o){var a,l,c;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"object"===(0,s.default)(r)&&(o=r),(o=o||{}).headers=o.headers||{},Object.keys(o.headers).forEach((function(e){o.headers["x-oss-copy-source-".concat(e.toLowerCase())]=o.headers[e]})),(o.meta||Object.keys(o.headers).find((function(e){return u.includes(e.toLowerCase())})))&&(o.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(o.meta,o.headers),i=this._getSourceName(i,r),o.versionId&&(i="".concat(i,"?versionId=").concat(o.versionId)),o.headers["x-oss-copy-source"]=i,(a=this._objectRequestParams("PUT",t,o)).xmlResponse=!0,a.successStatuses=[200,304],e.next=14,this.request(a);case 14:return l=e.sent,(c=l.data)&&(c={etag:c.ETag,lastModified:c.LastModified}),e.abrupt("return",{data:c,res:l.res});case 18:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),l._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),a(t),e=encodeURIComponent(e),e="/".concat(t,"/").concat(e)}},{"../utils/checkBucketName":53,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"@babel/runtime/regenerator":93,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.find.js":313,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],33:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.delete=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=o.length>1&&void 0!==o[1]?o[1]:{}).subres=Object.assign({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("DELETE",t,i)).successStatuses=[204],e.next=7,this.request(r);case 7:return s=e.sent,e.abrupt("return",{res:s.res});case 9:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],34:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("utility"),a=e("../utils/obj2xml").obj2xml;i.deleteMulti=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,l,u,c,h,A,d,p,f,g,m,v=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=v.length>1&&void 0!==v[1]?v[1]:{},r=[],t&&t.length){e.next=4;break}throw new Error("names is required");case 4:for(s=0;s<t.length;s++)l={},"string"==typeof t[s]?l.Key=o.escape(this._objectName(t[s])):(u=t[s],c=u.key,h=u.versionId,l.Key=o.escape(this._objectName(c)),l.VersionId=h),r.push(l);return A={Delete:{Quiet:!!i.quiet,Object:r}},d=a(A,{headers:!0}),i.subres=Object.assign({delete:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(p=this._objectRequestParams("POST","",i)).mime="xml",p.content=d,p.xmlResponse=!0,p.successStatuses=[200],e.next=16,this.request(p);case 16:return f=e.sent,g=f.data,(m=g&&g.Deleted||null)&&(Array.isArray(m)||(m=[m])),e.abrupt("return",{res:f.res,deleted:m||[]});case 21:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,utility:545}],35:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.deleteObjectTagging=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=o.length>1&&void 0!==o[1]?o[1]:{}).subres=Object.assign({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("DELETE",t,i)).successStatuses=[204],e.next=8,this.request(r);case 8:return s=e.sent,e.abrupt("return",{status:s.status,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],36:[function(e,t,i){e("core-js/modules/es.array.concat.js");var r=e("url"),n=e("../utils/isIP").isIP;i.generateObjectUrl=function(e,t){if(n(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(t)"/"!==t[t.length-1]&&(t+="/");else{t=this.options.endpoint.format();var i=r.parse(t),s=this.options.bucket;i.hostname="".concat(s,".").concat(i.hostname),i.host="".concat(s,".").concat(i.host),t=i.format()}return t+this._escape(this._objectName(e))}},{"../utils/isIP":73,"core-js/modules/es.array.concat.js":310,url:543}],37:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("fs"),a=e("is-type-of"),l=e("../utils/isObject").isObject;i.get=function(){var e=(0,s.default)(n.default.mark((function e(i,r){var s,u,c,h,A,d,p,f,g=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=g.length>2&&void 0!==g[2]?g[2]:{},u=null,c=!1,a.writableStream(r)?u=r:a.string(r)?(u=o.createWriteStream(r),c=!0):l(r)&&(s=r),s=s||{},h=t&&t.browser,A=null===s.responseCacheControl?"":"no-cache",d=h&&A?{"response-cache-control":A}:{},s.subres=Object.assign(d,s.subres),s.versionId&&(s.subres.versionId=s.versionId),s.process&&(s.subres["x-oss-process"]=s.process),e.prev=11,(f=this._objectRequestParams("GET",i,s)).writeStream=u,f.successStatuses=[200,206,304],e.next=17,this.request(f);case 17:p=e.sent,c&&u.destroy(),e.next=28;break;case 21:if(e.prev=21,e.t0=e.catch(11),!c){e.next=27;break}return u.destroy(),e.next=27,this._deleteFileSafe(r);case 27:throw e.t0;case 28:return e.abrupt("return",{res:p.res,content:p.data});case 29:case"end":return e.stop()}}),e,this,[[11,21]])})));function i(t,i){return e.apply(this,arguments)}return i}()}).call(this)}).call(this,e("_process"))},{"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,_process:538,"core-js/modules/es.object.assign.js":325,fs:102,"is-type-of":537}],38:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.getACL=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=o.length>1&&void 0!==o[1]?o[1]:{}).subres=Object.assign({acl:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,i)).successStatuses=[200],r.xmlResponse=!0,e.next=9,this.request(r);case 9:return s=e.sent,e.abrupt("return",{acl:s.data.AccessControlList.Grant,owner:{id:s.data.Owner.ID,displayName:s.data.Owner.DisplayName},res:s.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],39:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.number.constructor.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=i,a=e("../utils/isObject").isObject,l=e("../utils/isArray").isArray,u=e("../utils/parseRestoreInfo").parseRestoreInfo;function c(){return h.apply(this,arguments)}function h(){return h=(0,s.default)(n.default.mark((function e(){var t,i,r,s,o,a,c,h,A=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=A.length>0&&void 0!==A[0]?A[0]:{},i=A.length>1&&void 0!==A[1]?A[1]:{},!t.versionIdMarker||void 0!==t.keyMarker){e.next=4;break}throw new Error("A version-id marker cannot be specified without a key marker");case 4:return i.subres=Object.assign({versions:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("GET","",i)).xmlResponse=!0,r.successStatuses=[200],r.query=d(t),e.next=12,this.request(r);case 12:return s=e.sent,o=s.data.Version||[],a=s.data.DeleteMarker||[],c=this,o&&(Array.isArray(o)||(o=[o]),o=o.map((function(e){return{name:e.Key,url:c._objectUrl(e.Key),lastModified:e.LastModified,isLatest:"true"===e.IsLatest,versionId:e.VersionId,etag:e.ETag,type:e.Type,size:Number(e.Size),storageClass:e.StorageClass,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName},restoreInfo:u(e.RestoreInfo)}}))),a&&(l(a)||(a=[a]),a=a.map((function(e){return{name:e.Key,lastModified:e.LastModified,versionId:e.VersionId,owner:{id:e.Owner.ID,displayName:e.Owner.DisplayName}}}))),(h=s.data.CommonPrefixes||null)&&(l(h)||(h=[h]),h=h.map((function(e){return e.Prefix}))),e.abrupt("return",{res:s.res,objects:o,deleteMarker:a,prefixes:h,nextMarker:s.data.NextKeyMarker||null,NextVersionIdMarker:s.data.NextVersionIdMarker||null,nextKeyMarker:s.data.NextKeyMarker||null,nextVersionIdMarker:s.data.NextVersionIdMarker||null,isTruncated:"true"===s.data.IsTruncated});case 21:case"end":return e.stop()}}),e,this)}))),h.apply(this,arguments)}function A(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return a(e)&&Object.keys(e).forEach((function(i){t[A(i)]=e[i]})),t}o.getBucketVersions=c,o.listObjectVersions=c},{"../utils/isArray":67,"../utils/isObject":74,"../utils/parseRestoreInfo":78,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318,"core-js/modules/es.number.constructor.js":324,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],40:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.getObjectMeta=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=i||{},t=this._objectName(t),i.subres=Object.assign({objectMeta:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("HEAD",t,i)).successStatuses=[200],e.next=8,this.request(r);case 8:return s=e.sent,e.abrupt("return",{status:s.status,res:s.res});case 10:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],41:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=i,a=e("../utils/isObject").isObject;o.getObjectTagging=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=c.length>1&&void 0!==c[1]?c[1]:{}).subres=Object.assign({tagging:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,i)).successStatuses=[200],e.next=8,this.request(r);case 8:return s=e.sent,e.next=11,this.parseXML(s.data);case 11:return o=e.sent,l=(l=o.TagSet.Tag)&&a(l)?[l]:l||[],u={},l.forEach((function(e){u[e.Key]=e.Value})),e.abrupt("return",{status:s.status,res:s.res,tag:u});case 17:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/isObject":74,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],42:[function(e,t,i){var r=e("../utils/isIP").isIP;i.getObjectUrl=function(e,t){if(r(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");return t?"/"!==t[t.length-1]&&(t+="/"):t=this.options.endpoint.format(),t+this._escape(this._objectName(e))}},{"../utils/isIP":73}],43:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.getSymlink=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,o,a=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(i=a.length>1&&void 0!==a[1]?a[1]:{}).subres=Object.assign({symlink:""},i.subres),i.versionId&&(i.subres.versionId=i.versionId),t=this._objectName(t),(r=this._objectRequestParams("GET",t,i)).successStatuses=[200],e.next=8,this.request(r);case 8:return s=e.sent,o=s.res.headers["x-oss-symlink-target"],e.abrupt("return",{targetName:decodeURIComponent(o),res:s.res});case 11:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],44:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/checkEnv").checkEnv;i.head=function(){var e=(0,s.default)(n.default.mark((function e(t){var i,r,s,a,l=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=l.length>1&&void 0!==l[1]?l[1]:{},o("Because HeadObject has gzip enabled, head cannot get the file size correctly. If you need to get the file size, please use getObjectMeta"),i.subres=Object.assign({},i.subres),i.versionId&&(i.subres.versionId=i.versionId),(r=this._objectRequestParams("HEAD",t,i)).successStatuses=[200,304],e.next=8,this.request(r);case 8:return s=e.sent,a={meta:null,res:s.res,status:s.status},200===s.status&&Object.keys(s.headers).forEach((function(e){0===e.indexOf("x-oss-meta-")&&(a.meta||(a.meta={}),a.meta[e.substring(11)]=s.headers[e])})),e.abrupt("return",a);case 12:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{"../utils/checkEnv":55,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],45:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.putACL=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).subres=Object.assign({acl:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.headers=r.headers||{},r.headers["x-oss-object-acl"]=i,t=this._objectName(t),(s=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=10,this.request(s);case 10:return o=e.sent,e.abrupt("return",{res:o.res});case 12:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],46:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.object.keys.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("../utils/obj2xml").obj2xml,a=e("../utils/checkObjectTag").checkObjectTag;i.putObjectTagging=function(){var e=(0,s.default)(n.default.mark((function e(t,i){var r,s,l,u,c=arguments;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=c.length>2&&void 0!==c[2]?c[2]:{},a(i),r.subres=Object.assign({tagging:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),t=this._objectName(t),(s=this._objectRequestParams("PUT",t,r)).successStatuses=[200],i=Object.keys(i).map((function(e){return{Key:e,Value:i[e]}})),l={Tagging:{TagSet:{Tag:i}}},s.mime="xml",s.content=o(l),e.next=13,this.request(s);case 13:return u=e.sent,e.abrupt("return",{res:u.res,status:u.status});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i){return e.apply(this,arguments)}return t}()},{"../utils/checkObjectTag":56,"../utils/obj2xml":76,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.map.js":318,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328}],47:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));i.putSymlink=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r){var s,o;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=r||{}).headers=r.headers||{},i=this._escape(this._objectName(i)),this._convertMetaToHeaders(r.meta,r.headers),r.headers["x-oss-symlink-target"]=i,r.subres=Object.assign({symlink:""},r.subres),r.versionId&&(r.subres.versionId=r.versionId),r.storageClass&&(r.headers["x-oss-storage-class"]=r.storageClass),t=this._objectName(t),(s=this._objectRequestParams("PUT",t,r)).successStatuses=[200],e.next=13,this.request(s);case 13:return o=e.sent,e.abrupt("return",{res:o.res});case 15:case"end":return e.stop()}}),e,this)})));function t(t,i,r){return e.apply(this,arguments)}return t}()},{"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.object.assign.js":325}],48:[function(e,t,i){(function(t){(function(){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.signPostObjectPolicyV4=void 0;var n=r(e("dateformat")),s=e("../utils/getStandardRegion"),o=e("../utils/policy2Str"),a=e("../signUtils");function l(e,i){var r=t.from(o.policy2Str(e),"utf8").toString("base64"),l=n.default(i,"UTC:yyyymmdd'T'HHMMss'Z'").split("T")[0];return a.getSignatureV4(this.options.accessKeySecret,l,s.getStandardRegion(this.options.region),r)}i.signPostObjectPolicyV4=l}).call(this)}).call(this,e("buffer").Buffer)},{"../signUtils":52,"../utils/getStandardRegion":65,"../utils/policy2Str":79,buffer:103,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339,dateformat:383}],49:[function(e,t,i){e("core-js/modules/es.regexp.exec.js");var r=e("url"),n=e("utility"),s=e("copy-to"),o=e("../../common/signUtils"),a=e("../utils/isIP").isIP;i.signatureUrl=function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(a(this.options.endpoint.hostname))throw new Error("can not get the object URL when endpoint is IP");if(i&&/^\?/.test(e))throw new Error("Invalid object name ".concat(e));t=t||{},e=this._objectName(e),t.method=t.method||"GET";var l=n.timestamp()+(t.expires||1800),u={bucket:this.options.bucket,object:e},c=this._getResource(u);this.options.stsToken&&(t["security-token"]=this.options.stsToken);var h=o._signatureForURL(this.options.accessKeySecret,t,c,l),A=r.parse(this._getReqUrl(u));return A.query={OSSAccessKeyId:this.options.accessKeyId,Expires:l,Signature:h.Signature},s(h.subResource).to(A.query),A.format()}},{"../../common/signUtils":52,"../utils/isIP":73,"copy-to":107,"core-js/modules/es.regexp.exec.js":338,url:543,utility:545}],50:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.array.join.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("dateformat"),a=e("url"),l=e("../../common/signUtils"),u=e("../utils/setSTSToken").setSTSToken,c=e("../utils/isFunction").isFunction,h=e("../utils/getStandardRegion").getStandardRegion;i.signatureUrlV4=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s,A){var d,p,f,g,m,v,_,y,b,w,x,B;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=this.options.cloudBoxId,p=l.getProduct(d),f=l.getSignRegion(h(this.options.region),d),g=r&&r.headers||{},m=Object.assign({},r&&r.queries||{}),v=new Date,_=o(v,"UTC:yyyymmdd'T'HHMMss'Z'"),y=_.split("T")[0],(b=l.fixAdditionalHeaders(A)).length>0&&(m["x-oss-additional-headers"]=b.join(";")),m["x-oss-credential"]=l.getCredential(y,f,this.options.accessKeyId,p),m["x-oss-date"]=_,m["x-oss-expires"]=i,m["x-oss-signature-version"]="OSS4-HMAC-SHA256",!this.options.stsToken||!c(this.options.refreshSTSToken)){e.next=17;break}return e.next=17,u.call(this);case 17:return this.options.stsToken&&(m["x-oss-security-token"]=this.options.stsToken),w=l.getCanonicalRequest(t,{headers:g,queries:m},this.options.bucket,s,b),x=l.getStringToSign(f,_,w,p),m["x-oss-signature"]=l.getSignatureV4(this.options.accessKeySecret,y,f,x,p),(B=a.parse(this._getReqUrl({bucket:this.options.bucket,object:s}))).query=Object.assign({},m),e.abrupt("return",B.format());case 24:case"end":return e.stop()}}),e,this)})));function t(t,i,r,n,s){return e.apply(this,arguments)}return t}()},{"../../common/signUtils":52,"../utils/getStandardRegion":65,"../utils/isFunction":72,"../utils/setSTSToken":82,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.join.js":317,"core-js/modules/es.object.assign.js":325,dateformat:383,url:543}],51:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.function.name.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator")),o=e("./utils/isArray").isArray,a=i;a._parallelNode=function(){var e=(0,s.default)(n.default.mark((function e(t,i,r,s){var o,a,l,u,c,h,A,d;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=this,a=[],l=[],u=t.length/i,c=t.length%i,h=0===c?u:(t.length-c)/i+1,A=1,d=0;case 8:if(!(d<t.length)){e.next=26;break}if(!o.isCancel()){e.next=11;break}return e.abrupt("break",26);case 11:if(s?l.push(r(o,t[d],s)):l.push(r(o,t[d])),l.length!==i&&(A!==h||d!==t.length-1)){e.next=23;break}return e.prev=13,A+=1,e.next=17,Promise.all(l);case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(13),a.push(e.t0);case 22:l=[];case 23:d++,e.next=8;break;case 26:return e.abrupt("return",a);case 27:case"end":return e.stop()}}),e,this,[[13,19]])})));function t(t,i,r,n){return e.apply(this,arguments)}return t}(),a._parallel=function(e,t,i){var r=this;return new Promise((function(n){var s=[];if(t<=0||!e)n(s);else{var o=h(e),a=!1,l=0,u=!1;p()}function c(e){return function(){if(null===e)throw new Error("Callback was already called.");var t=e;e=null;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];t.apply(this,r)}}function h(e){var t=-1,i=e.length;return function(){return++t<i&&!r.isCancel()?{value:e[t],key:t}:null}}function A(e){l-=1,e?(a=!0,s.push(e),n(s)):a&&l<=0?(a=!0,n(s)):u||(r.isCancel()?n(s):p())}function d(e,t){i(e).then((function(e){t(null,e)})).catch((function(e){t(e)}))}function p(){for(u=!0;l<t&&!a&&!r.isCancel();){var e=o();if(null===e||s.length>0)return a=!0,void(l<=0&&n(s));l+=1,d(e.value,c(A))}u=!1}}))},a.cancel=function(e){this.options.cancelFlag=!0,o(this.multipartUploadStreams)&&this.multipartUploadStreams.forEach((function(e){if(!1===e.destroyed){var t={name:"cancel",message:"cancel"};e.destroy(t)}})),this.multipartUploadStreams=[],e&&this.abortMultipartUpload(e.name,e.uploadId,e.options)},a.isCancel=function(){return this.options.cancelFlag},a.resetCancelFlag=function(){this.options.cancelFlag=!1},a._stop=function(){this.options.cancelFlag=!0},a._makeCancelEvent=function(){return{status:0,name:"cancel"}},a._makeAbortEvent=function(){return{status:0,name:"abort",message:"upload task has been abort"}}},{"./utils/isArray":67,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333,"core-js/modules/es.string.iterator.js":343,"core-js/modules/web.dom-collections.for-each.js":380,"core-js/modules/web.dom-collections.iterator.js":381}],52:[function(e,t,i){(function(t){(function(){var r=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/toConsumableArray"));e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.array.sort.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.filter.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.set.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.array.map.js"),e("core-js/modules/es.string.starts-with.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.to-string.js");var n=e("./../../shims/crypto/crypto.js"),s=e("is-type-of"),o=e("qs"),a=e("./utils/lowercaseKeyHeader").lowercaseKeyHeader,l=e("./utils/encodeString").encodeString;i.getProduct=function(e){return void 0===e?"oss":"oss-cloudbox"},i.getSignRegion=function(e,t){return void 0===t?e:t},i.buildCanonicalizedResource=function(e,t){var i="".concat(e),r="?";if(s.string(t)&&""!==t.trim())i+=r+t;else if(s.array(t))t.sort(),i+=r+t.join("&");else if(t){var n=function(e){i+=r+e,(t[e]||0===t[e])&&(i+="=".concat(t[e])),r="&"};Object.keys(t).sort().forEach(n)}return i},i.buildCanonicalString=function(e,t,i,r){var n=a((i=i||{}).headers),s="x-oss-",o=[],l={},u=[e.toUpperCase(),n["content-md5"]||"",n["content-type"],r||n["x-oss-date"]];return Object.keys(n).forEach((function(e){var t=e.toLowerCase();0===t.indexOf(s)&&(l[t]=String(n[e]).trim())})),Object.keys(l).sort().forEach((function(e){o.push("".concat(e,":").concat(l[e]))})),(u=u.concat(o)).push(this.buildCanonicalizedResource(t,i.parameters)),u.join("\n")},i.computeSignature=function(e,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"utf-8";return n.createHmac("sha1",e).update(t.from(i,r)).digest("base64")},i.authorization=function(e,t,i,r){return"OSS ".concat(e,":").concat(this.computeSignature(t,i,r))},i.fixAdditionalHeaders=function(e){if(!e)return[];var t="x-oss-";return(0,r.default)(new Set(e.map((function(e){return e.toLowerCase()})))).filter((function(e){return"content-type"!==e&&"content-md5"!==e&&!e.startsWith(t)})).sort()},i.getCanonicalRequest=function(e,t,i,n,u){var c=a(t.headers),h=t.queries||{},A="x-oss-";if(n&&!i)throw Error("Please ensure that bucketName is passed into getCanonicalRequest.");var d=[e.toUpperCase(),l("/".concat(i?"".concat(i,"/"):"").concat(n||"")).replace(/%2F/g,"/")];d.push(o.stringify(h,{encoder:l,sort:function(e,t){return e.localeCompare(t)},strictNullHandling:!0})),u&&u.forEach((function(e){if(!Object.prototype.hasOwnProperty.call(c,e))throw Error("Can't find additional header ".concat(e," in request headers."))}));var p=new Set(u);Object.keys(c).forEach((function(e){("content-type"===e||"content-md5"===e||e.startsWith(A))&&p.add(e)}));var f="".concat((0,r.default)(p).sort().map((function(e){return"".concat(e,":").concat(s.string(c[e])?c[e].trim():c[e],"\n")})).join(""));return d.push(f),u&&u.length>0?d.push(u.join(";")):d.push(""),d.push(c["x-oss-content-sha256"]||"UNSIGNED-PAYLOAD"),d.join("\n")},i.getCredential=function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"oss",n="".concat(e,"/").concat(t,"/").concat(r,"/aliyun_v4_request");return i?"".concat(i,"/").concat(n):n},i.getStringToSign=function(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"oss";return["OSS4-HMAC-SHA256",t,this.getCredential(t.split("T")[0],e,void 0,r),n.createHash("sha256").update(i).digest("hex")].join("\n")},i.getSignatureV4=function(e,t,i,r){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"oss",o=n.createHmac("sha256","aliyun_v4".concat(e)).update(t).digest(),a=n.createHmac("sha256",o).update(i).digest(),l=n.createHmac("sha256",a).update(s).digest(),u=n.createHmac("sha256",l).update("aliyun_v4_request").digest();return n.createHmac("sha256",u).update(r).digest("hex")},i.authorizationV4=function(e,i,r,n,o,a,l,u){var c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"utf-8",h=arguments.length>9?arguments[9]:void 0,A=this.getProduct(h),d=this.fixAdditionalHeaders(u),p={};Object.entries(o.headers).forEach((function(e){p[e[0]]=s.string(e[1])?t.from(e[1],c).toString():e[1]}));var f=p["x-oss-date"]||o.queries&&o.queries["x-oss-date"],g=this.getCanonicalRequest(n,{headers:p,queries:o.queries},a,l,d),m=this.getStringToSign(r,f,g,A),v=f.split("T")[0],_=this.getSignatureV4(i,v,r,m,A),y=d.length>0?"AdditionalHeaders=".concat(d.join(";"),","):"";return"OSS4-HMAC-SHA256 Credential=".concat(this.getCredential(v,r,e,A),",").concat(y,"Signature=").concat(_)},i._signatureForURL=function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,s=arguments.length>4?arguments[4]:void 0,o={},a=i.subResource,l=void 0===a?{}:a;if(i.process&&(l["x-oss-process"]=i.process),i.trafficLimit&&(l["x-oss-traffic-limit"]=i.trafficLimit),i.response&&Object.keys(i.response).forEach((function(e){var t="response-".concat(e.toLowerCase());l[t]=i.response[e]})),Object.keys(i).forEach((function(e){var t=e.toLowerCase(),r=i[e];0===t.indexOf("x-oss-")?o[t]=r:(0===t.indexOf("content-md5")||0===t.indexOf("content-type"))&&(o[e]=r)})),Object.prototype.hasOwnProperty.call(i,"security-token")&&(l["security-token"]=i["security-token"]),Object.prototype.hasOwnProperty.call(i,"callback")){var u={callbackUrl:encodeURI(i.callback.url),callbackBody:i.callback.body};if(i.callback.host&&(u.callbackHost=i.callback.host),i.callback.contentType&&(u.callbackBodyType=i.callback.contentType),i.callback.callbackSNI&&(u.callbackSNI=i.callback.callbackSNI),l.callback=t.from(JSON.stringify(u)).toString("base64"),i.callback.customValue){var c={};Object.keys(i.callback.customValue).forEach((function(e){c["x:".concat(e)]=i.callback.customValue[e]})),l["callback-var"]=t.from(JSON.stringify(c)).toString("base64")}}var h=this.buildCanonicalString(i.method,r,{headers:o,parameters:l},n.toString());return{Signature:this.computeSignature(e,h,s),subResource:l}}}).call(this)}).call(this,e("buffer").Buffer)},{"./../../shims/crypto/crypto.js":531,"./utils/encodeString":61,"./utils/lowercaseKeyHeader":75,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/toConsumableArray":90,buffer:103,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.filter.js":312,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.join.js":317,"core-js/modules/es.array.map.js":318,"core-js/modules/es.array.sort.js":320,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.set.js":341,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.string.replace.js":345,"core-js/modules/es.string.starts-with.js":348,"core-js/modules/es.string.trim.js":349,"core-js/modules/web.dom-collections.for-each.js":380,"core-js/modules/web.dom-collections.iterator.js":381,"is-type-of":537,qs:445}],53:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkBucketName=void 0,i.checkBucketName=function(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?/^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/:/^[a-z0-9_][a-z0-9-_]{1,61}[a-z0-9_]$/).test(e))throw new Error("The bucket must be conform to the specifications")}},{"core-js/modules/es.regexp.exec.js":338}],54:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkConfigValid=void 0;var r={endpoint:n,region:/^[a-zA-Z0-9\-_]+$/};function n(e){return"string"==typeof e?/^[a-zA-Z0-9._:/-]+$/.test(e):!!e.host&&/^[a-zA-Z0-9._:/-]+$/.test(e.host)}i.checkConfigValid=function(e,t){if(r[t]&&!(r[t]instanceof Function?r[t](e):r[t].test(e)))throw new Error("The ".concat(t," must be conform to the specifications"))}},{"core-js/modules/es.regexp.exec.js":338}],55:[function(e,t,i){(function(e){(function(){function t(t){e.browser&&console.warn(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.checkEnv=void 0,i.checkEnv=t}).call(this)}).call(this,e("_process"))},{_process:538}],56:[function(e,t,i){e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkObjectTag=void 0;var r=e("./checkValid").checkValid,n=e("./isObject").isObject,s=[{validator:function(e){if("string"!=typeof e)throw new Error("the key and value of the tag must be String")}},{pattern:/^[a-zA-Z0-9 +-=._:/]+$/,msg:"tag can contain letters, numbers, spaces, and the following symbols: plus sign (+), hyphen (-), equal sign (=), period (.), underscore (_), colon (:), and forward slash (/)"}],o={key:[].concat(s,[{pattern:/^.{1,128}$/,msg:"tag key can be a maximum of 128 bytes in length"}]),value:[].concat(s,[{pattern:/^.{0,256}$/,msg:"tag value can be a maximum of 256 bytes in length"}])};function a(e){if(!n(e))throw new Error("tag must be Object");var t=Object.entries(e);if(t.length>10)throw new Error("maximum of 10 tags for a object");var i=["key","value"];t.forEach((function(e){e.forEach((function(e,t){r(e,o[i[t]])}))}))}i.checkObjectTag=a},{"./checkValid":57,"./isObject":74,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],57:[function(e,t,i){function r(e,t){t.forEach((function(t){if(t.validator)t.validator(e);else if(t.pattern&&!t.pattern.test(e))throw new Error(t.msg)}))}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.checkValid=void 0,i.checkValid=r},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/web.dom-collections.for-each.js":380}],58:[function(e,t,i){(function(t){(function(){e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.object.assign.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.array.concat.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.createRequest=void 0;var r=e("./../../../shims/crypto/crypto.js"),n=e("debug")("ali-oss"),s=e("lodash/isString"),o=e("lodash/isArray"),a=e("lodash/isObject"),l=e("mime"),u=e("dateformat"),c=e("copy-to"),h=e("path"),A=e("./encoder").encoder,d=e("./isIP").isIP,p=e("./setRegion").setRegion,f=e("../client/getReqUrl").getReqUrl,g=e("./isDingTalk").isDingTalk;function m(e,t){return e[t]||e[t.toLowerCase()]}function v(e,t){delete e[t],delete e[t.toLowerCase()]}function _(e){var i=new Date;this.options.amendTimeSkewed&&(i=+new Date+this.options.amendTimeSkewed);var _={"x-oss-date":u(i,this.options.authorizationV4?"UTC:yyyymmdd'T'HHMMss'Z'":"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'")};this.options.authorizationV4&&(_["x-oss-content-sha256"]="UNSIGNED-PAYLOAD"),"undefined"!=typeof window&&(_["x-oss-user-agent"]=this.userAgent),this.userAgent.includes("nodejs")&&(_["User-Agent"]=this.userAgent),this.options.isRequestPay&&Object.assign(_,{"x-oss-request-payer":"requester"}),this.options.stsToken&&(_["x-oss-security-token"]=this.options.stsToken),c(e.headers).to(_),m(_,"Content-Type")||(e.mime&&e.mime.indexOf("/")>0?_["Content-Type"]=e.mime:g()?_["Content-Type"]="application/octet-stream":_["Content-Type"]=l.getType(e.mime||h.extname(e.object||""))),m(_,"Content-Type")||v(_,"Content-Type"),e.content&&(e.disabledMD5||(e.headers&&e.headers["Content-MD5"]?_["Content-MD5"]=e.headers["Content-MD5"]:_["Content-MD5"]=r.createHash("md5").update(t.from(e.content,"utf8")).digest("base64")),_["Content-Length"]||(_["Content-Length"]=e.content.length));var y=Object.prototype.hasOwnProperty;for(var b in _)_[b]&&y.call(_,b)&&(_[b]=A(String(_[b]),this.options.headerEncoding));var w={};if(s(e.subres)?w[e.subres]=null:o(e.subres)?e.subres.forEach((function(e){w[e]=null})):a(e.subres)&&Object.entries(e.subres).forEach((function(e){w[e[0]]=""===e[1]?null:e[1]})),a(e.query)&&Object.entries(e.query).forEach((function(e){w[e[0]]=e[1]})),_.authorization=this.options.authorizationV4?this.authorizationV4(e.method,{headers:_,queries:w},e.bucket,e.object,e.additionalHeaders):this.authorization(e.method,this._getResource(e),e.subres,_,this.options.headerEncoding),d(this.options.endpoint.hostname)){var x=this.options,B=x.region,P=x.internal,C=x.secure,M=p(B,P,C);_.host="".concat(e.bucket,".").concat(M.host)}var k=f.bind(this)(e);n("request %s %s, with headers %j, !!stream: %s",e.method,k,_,!!e.stream);var E=e.timeout||this.options.timeout,S={method:e.method,content:e.content,stream:e.stream,headers:_,timeout:E,writeStream:e.writeStream,customResponse:e.customResponse,ctx:e.ctx||this.ctx};return this.agent&&(S.agent=this.agent),this.httpsAgent&&(S.httpsAgent=this.httpsAgent),S.enableProxy=!!this.options.enableProxy,S.proxy=this.options.proxy?this.options.proxy:null,{url:k,params:S}}i.createRequest=_}).call(this)}).call(this,e("buffer").Buffer)},{"../client/getReqUrl":25,"./../../../shims/crypto/crypto.js":531,"./encoder":62,"./isDingTalk":70,"./isIP":73,"./setRegion":81,buffer:103,"copy-to":107,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.string.includes.js":342,"core-js/modules/web.dom-collections.for-each.js":380,dateformat:383,debug:536,"lodash/isArray":422,"lodash/isObject":423,"lodash/isString":425,mime:430,path:439}],59:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.entries.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.dataFix=void 0;var r=e("./isObject"),n=["true","TRUE","1",1],s=["false","FALSE","0",0];function o(e,t,i){if(r.isObject(e)){var n=t.remove,s=void 0===n?[]:n,u=t.rename,c=void 0===u?{}:u,h=t.camel,A=void 0===h?[]:h,d=t.bool,p=void 0===d?[]:d,f=t.lowerFirst,g=void 0!==f&&f;return s.forEach((function(t){return delete e[t]})),Object.entries(c).forEach((function(t){e[t[0]]&&(e[t[1]]||(e[t[1]]=e[t[0]],delete e[t[0]]))})),A.forEach((function(t){if(e[t]){var i=t.replace(/^(.)/,(function(e){return e.toLowerCase()})).replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));e[i]||(e[i]=e[t])}})),p.forEach((function(t){e[t]=a(e[t])})),"function"==typeof i&&i(e),l(e,g),o}}function a(e){return!!e&&(!!n.includes(e)||!s.includes(e)&&e)}function l(e,t){t&&Object.keys(e).forEach((function(t){var i=t.replace(/^\w/,(function(e){return e.toLowerCase()}));void 0===e[i]&&(e[i]=e[t],delete e[t])}))}i.dataFix=o},{"./isObject":74,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.entries.js":326,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],60:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js");var n=r(e("@babel/runtime/helpers/typeof"));Object.defineProperty(i,"__esModule",{value:!0}),i.deepCopyWith=i.deepCopy=void 0;var s=e("./isBuffer");i.deepCopy=function(e){if(null===e||"object"!==(0,n.default)(e))return e;if(s.isBuffer(e))return e.slice();var t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(r){t[r]=i.deepCopy(e[r])})),t},i.deepCopyWith=function(e,t){function r(e,i,o){var a=t(e,i,o);if(void 0!==a)return a;if(null===e||"object"!==(0,n.default)(e))return e;if(s.isBuffer(e))return e.slice();var l=Array.isArray(e)?[]:{};return Object.keys(e).forEach((function(t){l[t]=r(e[t],t,e)})),l}return t?r(e,"",null):i.deepCopy(e)}},{"./isBuffer":69,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],61:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js");var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.encodeString=void 0;var n=r(e("lodash/toString"));function s(e){var t=n.default(e);return encodeURIComponent(t).replace(/[!'()*]/g,(function(e){return"%".concat(e.charCodeAt(0).toString(16).toUpperCase())}))}i.encodeString=s},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"lodash/toString":427}],62:[function(e,t,i){(function(t){(function(){function r(e){return"utf-8"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf-8")?e:t.from(e).toString("latin1")}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.encoder=void 0,i.encoder=r}).call(this)}).call(this,e("buffer").Buffer)},{buffer:103,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],63:[function(e,t,i){e("core-js/modules/es.array.map.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.formatInventoryConfig=void 0;var r=e("../utils/dataFix"),n=e("../utils/isObject"),s=e("../utils/isArray"),o=e("../utils/formatObjKey");function a(e){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&n.isObject(e)&&(e=[e]),e=s.isArray(e)?e.map(l):l(e)}function l(e){return r.dataFix(e,{bool:["IsEnabled"]},(function(e){var t,i;e.prefix=e.Filter.Prefix,delete e.Filter,e.OSSBucketDestination=e.Destination.OSSBucketDestination,e.OSSBucketDestination.rolename=e.OSSBucketDestination.RoleArn.replace(/.*\//,""),delete e.OSSBucketDestination.RoleArn,e.OSSBucketDestination.bucket=e.OSSBucketDestination.Bucket.replace(/.*:::/,""),delete e.OSSBucketDestination.Bucket,delete e.Destination,e.frequency=e.Schedule.Frequency,delete e.Schedule.Frequency,(null===(t=null==e?void 0:e.OptionalFields)||void 0===t?void 0:t.Field)&&!s.isArray(null===(i=e.OptionalFields)||void 0===i?void 0:i.Field)&&(e.OptionalFields.Field=[e.OptionalFields.Field])})),e=o.formatObjKey(e,"firstLowerCase",{exclude:["OSSBucketDestination","SSE-OSS","SSE-KMS"]})}i.formatInventoryConfig=a},{"../utils/dataFix":59,"../utils/formatObjKey":64,"../utils/isArray":67,"../utils/isObject":74,"core-js/modules/es.array.map.js":318,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345}],64:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault");e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var n=r(e("@babel/runtime/helpers/typeof"));function s(e,t,i){if(null===e||"object"!==(0,n.default)(e))return e;var r;if(Array.isArray(e)){r=[];for(var a=0;a<e.length;a++)r.push(s(e[a],t,i))}else r={},Object.keys(e).forEach((function(n){r[o(n,t,i)]=s(e[n],t,i)}));return r}function o(e,t,i){return i&&i.exclude&&i.exclude.includes(e)||("firstUpperCase"===t?e=e.replace(/^./,(function(e){return e.toUpperCase()})):"firstLowerCase"===t&&(e=e.replace(/^./,(function(e){return e.toLowerCase()})))),e}Object.defineProperty(i,"__esModule",{value:!0}),i.formatObjKey=void 0,i.formatObjKey=s},{"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/helpers/typeof":91,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.includes.js":342,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],65:[function(e,t,i){function r(e){return e.replace(/^oss-/g,"")}e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.getStandardRegion=void 0,i.getStandardRegion=r},{"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.replace.js":345}],66:[function(e,t,i){function r(e){for(var t=0,i=0;i<e.length;i++){var r=e.charAt(i);/^[\u00-\uff]$/.test(r)?t+=1:t+=2}return t}e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.getStrBytesCount=void 0,i.getStrBytesCount=r},{"core-js/modules/es.regexp.exec.js":338}],67:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isArray=void 0,i.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],68:[function(e,t,i){function r(e){return"undefined"!=typeof Blob&&e instanceof Blob}Object.defineProperty(i,"__esModule",{value:!0}),i.isBlob=void 0,i.isBlob=r},{}],69:[function(e,t,i){(function(e){(function(){function t(t){return e.isBuffer(t)}Object.defineProperty(i,"__esModule",{value:!0}),i.isBuffer=void 0,i.isBuffer=t}).call(this)}).call(this,{isBuffer:e("../../../node_modules/is-buffer/index.js")})},{"../../../node_modules/is-buffer/index.js":409}],70:[function(e,t,i){(function(t){(function(){function r(){return!(!t.browser||!window.navigator.userAgent.toLowerCase().includes("aliapp(dingtalk"))}e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isDingTalk=void 0,i.isDingTalk=r}).call(this)}).call(this,e("_process"))},{_process:538,"core-js/modules/es.array.includes.js":315,"core-js/modules/es.string.includes.js":342}],71:[function(e,t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isFile=void 0,i.isFile=function(e){return"undefined"!=typeof File&&e instanceof File}},{}],72:[function(e,t,i){Object.defineProperty(i,"__esModule",{value:!0}),i.isFunction=void 0,i.isFunction=function(e){return"function"==typeof e}},{}],73:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isIP=void 0,i.isIP=function(e){var t=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/.test(e)||t.test(e)}},{"core-js/modules/es.regexp.exec.js":338}],74:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.isObject=void 0,i.isObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.to-string.js":339}],75:[function(e,t,i){e("core-js/modules/es.object.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.lowercaseKeyHeader=void 0;var r=e("./isObject");function n(e){var t={};return r.isObject(e)&&Object.keys(e).forEach((function(i){t[i.toLowerCase()]=e[i]})),t}i.lowercaseKeyHeader=n},{"./isObject":74,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/web.dom-collections.for-each.js":380}],76:[function(e,t,i){e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.array.map.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.obj2xml=void 0;var r=e("./formatObjKey");function n(e){return Object.prototype.toString.call(e).replace(/(.*? |])/g,"").toLowerCase()}function s(e,t){var i="";return t&&t.headers&&(i='<?xml version="1.0" encoding="UTF-8"?>\n'),t&&t.firstUpperCase&&(e=r.formatObjKey(e,"firstUpperCase")),"object"===n(e)?Object.keys(e).forEach((function(t){"undefined"!==n(e[t])&&"null"!==n(e[t])&&("string"===n(e[t])||"number"===n(e[t])?i+="<".concat(t,">").concat(e[t],"</").concat(t,">"):"object"===n(e[t])?i+="<".concat(t,">").concat(s(e[t]),"</").concat(t,">"):"array"===n(e[t])?i+=e[t].map((function(e){return"<".concat(t,">").concat(s(e),"</").concat(t,">")})).join(""):i+="<".concat(t,">").concat(e[t].toString(),"</").concat(t,">"))})):i+=e.toString(),i}i.obj2xml=s},{"./formatObjKey":64,"core-js/modules/es.array.concat.js":310,"core-js/modules/es.array.join.js":317,"core-js/modules/es.array.map.js":318,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.replace.js":345,"core-js/modules/web.dom-collections.for-each.js":380}],77:[function(e,t,i){function r(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=n(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s:s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}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,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}function n(e,t){if(e){if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function o(e,t){var i,n=Object.assign({},e),s=r(t);try{for(s.s();!(i=s.n()).done;)delete n[i.value]}catch(e){s.e(e)}finally{s.f()}return n}e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.regexp.to-string.js"),e("core-js/modules/es.function.name.js"),e("core-js/modules/es.array.from.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.symbol.js"),e("core-js/modules/es.symbol.description.js"),e("core-js/modules/es.symbol.iterator.js"),e("core-js/modules/es.array.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/es.object.assign.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.omit=void 0,i.omit=o},{"core-js/modules/es.array.from.js":314,"core-js/modules/es.array.iterator.js":316,"core-js/modules/es.array.slice.js":319,"core-js/modules/es.function.name.js":322,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.regexp.to-string.js":339,"core-js/modules/es.string.iterator.js":343,"core-js/modules/es.symbol.description.js":351,"core-js/modules/es.symbol.iterator.js":353,"core-js/modules/es.symbol.js":354,"core-js/modules/web.dom-collections.iterator.js":381}],78:[function(e,t,i){e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.string.includes.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.match.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.parseRestoreInfo=void 0,i.parseRestoreInfo=function(e){var t;if(e&&!(t={ongoingRequest:e.includes("true")}).ongoingRequest){var i=e.match(/expiry-date="(.*)"/);i&&i[1]&&(t.expiryDate=new Date(i[1]))}return t}},{"core-js/modules/es.array.includes.js":315,"core-js/modules/es.regexp.exec.js":338,"core-js/modules/es.string.includes.js":342,"core-js/modules/es.string.match.js":344}],79:[function(e,t,i){function r(e){var t;if(e)if("string"==typeof e)try{t=JSON.stringify(JSON.parse(e))}catch(e){throw new Error("Policy string is not a valid JSON: ".concat(e.message))}else t=JSON.stringify(e);return t}e("core-js/modules/es.object.keys.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.policy2Str=void 0,i.policy2Str=r},{"core-js/modules/es.object.keys.js":328}],80:[function(e,t,i){function r(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=0,n=i.retryDelay,s=void 0===n?500:n,o=i.errorHandler,a=void 0===o?function(){return!0}:o,l=function i(){for(var n=arguments.length,o=new Array(n),l=0;l<n;l++)o[l]=arguments[l];return new Promise((function(n,l){e.apply(void 0,o).then((function(e){r=0,n(e)})).catch((function(e){r<t&&a(e)?(r++,setTimeout((function(){n(i.apply(void 0,o))}),s)):(r=0,l(e))}))}))};return l}e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),Object.defineProperty(i,"__esModule",{value:!0}),i.retry=void 0,i.retry=r},{"core-js/modules/es.object.to-string.js":329,"core-js/modules/es.promise.js":333}],81:[function(e,t,i){var r=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.setRegion=void 0;var n=r(e("url")),s=e("./checkConfigValid");function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s.checkConfigValid(e,"region");var r=i?"https://":"http://",o=t?"-internal.aliyuncs.com":".aliyuncs.com",a="vpc100-oss-cn-";return e.substr(0,a.length)===a&&(o=".aliyuncs.com"),n.default.parse(r+e+o)}i.setRegion=o},{"./checkConfigValid":54,url:543}],82:[function(e,t,i){var r=e("@babel/runtime/helpers/interopRequireDefault"),n=r(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.object.assign.js");var s=r(e("@babel/runtime/helpers/asyncToGenerator"));Object.defineProperty(i,"__esModule",{value:!0}),i.checkCredentials=i.setSTSToken=void 0;var o=e("./formatObjKey");function a(){return l.apply(this,arguments)}function l(){return(l=(0,s.default)(n.default.mark((function e(){var t,i;return n.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options||(this.options={}),t=new Date,!this.stsTokenFreshTime){e.next=14;break}if(!(+t-this.stsTokenFreshTime>=this.options.refreshSTSTokenInterval)){e.next=12;break}return this.stsTokenFreshTime=t,e.next=7,this.options.refreshSTSToken();case 7:i=e.sent,(i=o.formatObjKey(i,"firstLowerCase")).securityToken&&(i.stsToken=i.securityToken),u(i),Object.assign(this.options,i);case 12:e.next=15;break;case 14:this.stsTokenFreshTime=t;case 15:return e.abrupt("return",null);case 16:case"end":return e.stop()}}),e,this)})))).apply(this,arguments)}function u(e){var t=["accessKeySecret","accessKeyId","stsToken"],i=Object.keys(e);t.forEach((function(e){if(!i.find((function(t){return t===e})))throw Error("refreshSTSToken must return contains ".concat(e))}))}i.setSTSToken=a,i.checkCredentials=u},{"./formatObjKey":64,"@babel/runtime/helpers/asyncToGenerator":85,"@babel/runtime/helpers/interopRequireDefault":86,"@babel/runtime/regenerator":93,"core-js/modules/es.array.find.js":313,"core-js/modules/es.object.assign.js":325,"core-js/modules/es.object.keys.js":328,"core-js/modules/es.object.to-string.js":329}],83:[function(e,t,i){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],84:[function(e,t,i){var r=e("./arrayLikeToArray.js");function n(e){if(Array.isArray(e))return r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":83}],85:[function(e,t,i){function r(e,t,i,r,n,s,o){try{var a=e[s](o),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(r,n)}function n(e){return function(){var t=this,i=arguments;return new Promise((function(n,s){var o=e.apply(t,i);function a(e){r(o,n,s,a,l,"next",e)}function l(e){r(o,n,s,a,l,"throw",e)}a(void 0)}))}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{}],86:[function(e,t,i){function r(e){return e&&e.__esModule?e:{default:e}}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],87:[function(e,t,i){function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],88:[function(e,t,i){function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],89:[function(e,t,i){var r=e("./typeof.js").default;function n(){t.exports=n=function(){return i},t.exports.__esModule=!0,t.exports.default=t.exports;var e,i={},s=Object.prototype,o=s.hasOwnProperty,a=Object.defineProperty||function(e,t,i){e[t]=i.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",h=l.toStringTag||"@@toStringTag";function A(e,t,i){return Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{A({},"")}catch(e){A=function(e,t,i){return e[t]=i}}function d(e,t,i,r){var n=t&&t.prototype instanceof y?t:y,s=Object.create(n.prototype),o=new I(r||[]);return a(s,"_invoke",{value:E(e,i,o)}),s}function p(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}i.wrap=d;var f="suspendedStart",g="suspendedYield",m="executing",v="completed",_={};function y(){}function b(){}function w(){}var x={};A(x,u,(function(){return this}));var B=Object.getPrototypeOf,P=B&&B(B(D([])));P&&P!==s&&o.call(P,u)&&(x=P);var C=w.prototype=y.prototype=Object.create(x);function M(e){["next","throw","return"].forEach((function(t){A(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function i(n,s,a,l){var u=p(e[n],e,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==r(h)&&o.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,l)}),(function(e){i("throw",e,a,l)})):t.resolve(h).then((function(e){c.value=e,a(c)}),(function(e){return i("throw",e,a,l)}))}l(u.arg)}var n;a(this,"_invoke",{value:function(e,r){function s(){return new t((function(t,n){i(e,r,t,n)}))}return n=n?n.then(s,s):s()}})}function E(t,i,r){var n=f;return function(s,o){if(n===m)throw new Error("Generator is already running");if(n===v){if("throw"===s)throw o;return{value:e,done:!0}}for(r.method=s,r.arg=o;;){var a=r.delegate;if(a){var l=S(a,r);if(l){if(l===_)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=m;var u=p(t,i,r);if("normal"===u.type){if(n=r.done?v:g,u.arg===_)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n=v,r.method="throw",r.arg=u.arg)}}}function S(t,i){var r=i.method,n=t.iterator[r];if(n===e)return i.delegate=null,"throw"===r&&t.iterator.return&&(i.method="return",i.arg=e,S(t,i),"throw"===i.method)||"return"!==r&&(i.method="throw",i.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var s=p(n,t.iterator,i.arg);if("throw"===s.type)return i.method="throw",i.arg=s.arg,i.delegate=null,_;var o=s.arg;return o?o.done?(i[t.resultName]=o.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,_):o:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,_)}function T(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 F(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function D(t){if(t||""===t){var i=t[u];if(i)return i.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,s=function i(){for(;++n<t.length;)if(o.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=e,i.done=!0,i};return s.next=s}}throw new TypeError(r(t)+" is not iterable")}return b.prototype=w,a(C,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=A(w,h,"GeneratorFunction"),i.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},i.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,A(e,h,"GeneratorFunction")),e.prototype=Object.create(C),e},i.awrap=function(e){return{__await:e}},M(k.prototype),A(k.prototype,c,(function(){return this})),i.AsyncIterator=k,i.async=function(e,t,r,n,s){void 0===s&&(s=Promise);var o=new k(d(e,t,r,n),s);return i.isGeneratorFunction(t)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},M(C),A(C,h,"Generator"),A(C,u,(function(){return this})),A(C,"toString",(function(){return"[object Generator]"})),i.keys=function(e){var t=Object(e),i=[];for(var r in t)i.push(r);return i.reverse(),function e(){for(;i.length;){var r=i.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},i.values=D,I.prototype={constructor:I,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(F),!t)for(var i in this)"t"===i.charAt(0)&&o.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=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 i=this;function r(r,n){return a.type="throw",a.arg=t,i.next=r,n&&(i.method="next",i.arg=e),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n],a=s.completion;if("root"===s.tryLoc)return r("end");if(s.tryLoc<=this.prev){var l=o.call(s,"catchLoc"),u=o.call(s,"finallyLoc");if(l&&u){if(this.prev<s.catchLoc)return r(s.catchLoc,!0);if(this.prev<s.finallyLoc)return r(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return r(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return r(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var n=r;break}}n&&("break"===e||"continue"===e)&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var s=n?n.completion:{};return s.type=e,s.arg=t,n?(this.method="next",this.next=n.finallyLoc,_):this.complete(s)},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),_},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),F(i),_}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var r=i.completion;if("throw"===r.type){var n=r.arg;F(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:D(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=e),_}},i}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{"./typeof.js":91}],90:[function(e,t,i){var r=e("./arrayWithoutHoles.js"),n=e("./iterableToArray.js"),s=e("./unsupportedIterableToArray.js"),o=e("./nonIterableSpread.js");function a(e){return r(e)||n(e)||s(e)||o()}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayWithoutHoles.js":84,"./iterableToArray.js":87,"./nonIterableSpread.js":88,"./unsupportedIterableToArray.js":92}],91:[function(e,t,i){function r(e){return t.exports=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},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},{}],92:[function(e,t,i){var r=e("./arrayLikeToArray.js");function n(e,t){if(e){if("string"==typeof e)return r(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?r(e,t):void 0}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},{"./arrayLikeToArray.js":83}],93:[function(e,t,i){var r=e("../helpers/regeneratorRuntime")();t.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},{"../helpers/regeneratorRuntime":89}],94:[function(e,t,i){function r(){}t.exports=r,t.exports.HttpsAgent=r},{}],95:[function(e,i,r){(function(t){(function(){var r=e("object.assign/polyfill")();
45
45
  /*!
46
46
  * The buffer module from node.js, for the browser.
47
47
  *